Questions

Presenting modal in iOS 13 fullscreen

In iOS 13 there is a new behaviour for modal view controller when being presented. Now it's not fullscreen by default and when I try to slide down, the app just dismiss the View Controller automatica...

Converting timestamp to time ago in PHP e.g 1 day ago, 2 days ago...

I am trying to convert a timestamp of the format `2009-09-12 20:57:19` and turn it into something like `3 minutes ago` with PHP. I found a useful script to do this, but I think it's looking for a dif...

27 Sep at 09:37

AssertNull should be used or AssertNotNull

This is a pretty dumb question but my first time with unit testing so: lets say I have an object variable like obj and I want my unit test to Fail if this obj is Null. so for assertions, should I say ...

19 Aug at 15:9

Pandas (python): How to add column to dataframe for index?

The index that I have in the dataframe (with 30 rows) is of the form: ``` Int64Index([171, 174,173, 172, 199.............. ....175, 200]) ``` The index is not strictly increasing because the ...

4 Nov at 11:12

Total number of items defined in an enum

How can I get the number of items defined in an enum?

26 Nov at 01:4

Tab separated values in awk

How do I select the first column from the TAB separated string? ``` # echo "LOAD_SETTLED LOAD_INIT 2011-01-13 03:50:01" | awk -F'\t' '{print $1}' ``` The above will return the entire line ...

21 Mar at 06:0

cURL equivalent in Node.js?

I'm looking to use information from an HTTP request using Node.js (i.e. call a remote web service and echo the response to the client). In PHP I would have used cURL to do this. What is the best pra...

9 Feb at 19:2

The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider" could not be located

It's a WebApi project using VS2015. Step to reproduce: 1. Create an empty WebApi project 2. Change Build output path from "bin\" to "bin\Debug\" 3. Run [](https://i.stack.imgur.com/xbBFo.gif) ...

24 Oct at 15:11

jQuery to retrieve and set selected option value of html select element

I am attempting to retrieve and set the selected value of a select element (drop down list) with jQuery. for retrievel i have tried `$("#myId").find(':selected').val()`, as well as `$("#myId").val()`...

18 Dec at 20:5

How do I assert my exception message with JUnit Test annotation?

I have written a few JUnit tests with `@Test` annotation. If my test method throws a checked exception and if I want to assert the message along with the exception, is there a way to do so with JUnit ...

Why is my CSS style not being applied?

I've got this html: ``` <p> <span class="fancify">Parting is such sweet sorrow!</span><span> - Bill Rattleandrollspeer</span> </p> ``` ...and this css (added to the bottom of Site.css): ``` .f...

22 Jun at 09:58

Difference between signed / unsigned char

So I know that the difference between a `signed int` and `unsigned int` is that a bit is used to signify if the number if positive or negative, but how does this apply to a `char`? How can a character...

28 May at 21:35

Is it valid to have a html form inside another html form?

Is it valid html to have the following: ``` <form action="a"> <input.../> <form action="b"> <input.../> <input.../> <input.../> </form> <input.../> </form> ```...

What is the `data-target` attribute in Bootstrap 3?

Can you tell me what is the system or behavior behind the `data-target` attribute used by Bootstrap 3? I know that data-toggle used to aim API JavaScript of Bootstrap of graphical functionality.

6 Jul at 14:1

How to remove new line characters from a string?

I have a string in the following format ``` string s = "This is a Test String.\n This is a next line.\t This is a tab.\n' ``` I want to remove all the occurrences of `\n` and `\r` from the string...

23 Apr at 14:58

How to convert string to integer in UNIX shelll

I have `d1="11"` and `d2="07"`. I want to convert `d1` and `d2` to integers and perform `d1-d2`. How do I do this in UNIX? `d1 - d2` currently returns `"11-07"` as result for me.

15 Jul at 12:22

HTML Image not displaying, while the src url works

``` <img class="sealImage" alt="Image of Seal" src="file:///C:/Users/Anna/Pictures/Nikon%20Transfer/SEALS%20PROJECT/j3evn.jpg"> ``` That doesn't display an image, just the alt. But if I go to ``` f...

24 Aug at 01:7

MySQL with Node.js

I've just started getting into Node.js. I come from a PHP background, so I'm fairly used to using MySQL for all my database needs. How can I use MySQL with Node.js?

21 Nov at 12:49

Disable a textbox using CSS

How to disable a textbox in CSS? Currently we are having a textbox in our view which can be enabled/disabled depending on a property in the model. We are having asp.net MVC view; depending on the valu...

2 May at 23:50

.htaccess redirect http to https

I have an old url (`www1.test.net`) and I would like to redirect it to `https://www1.test.net` I have implemented and installed our SSL certificate on my site. This is my old file `.htaccess`: ``` Re...

12 Jan at 09:4

Liquibase lock - reasons?

I get this when running a lot of liquibase-scripts against a Oracle-server. SomeComputer is me. ``` Waiting for changelog lock.... Waiting for changelog lock.... Waiting for changelog lock.... Waitin...

5 Jan at 14:39

How to access pandas groupby dataframe by key

How do I access the corresponding groupby dataframe in a groupby object by the key? With the following groupby: ``` rand = np.random.RandomState(1) df = pd.DataFrame({'A': ['foo', 'bar'] * 3, ...

Convert array of strings to List<string>

I've seen examples of this done using `.ToList()` on array types, this seems to be available only [in .Net 3.5+](http://msdn.microsoft.com/en-us/library/bb342261.aspx). I'm working with .NET Framework...

11 Oct at 19:47

Best way to check if a Data Table has a null value in it

what is the best way to check if a Data Table has a null value in it ? Most of the time in our scenario, one column will have all null values. (This datatable is returned by a 3rd party application ...

5 Jan at 13:16

Property 'value' does not exist on type EventTarget in TypeScript

So the following code is in Angular 4 and I can't figure out why it doesn't work the way as expected. Here is a snippet of my handler: ``` onUpdatingServerName(event: Event) { console.log(event); ...

18 Dec at 00:24