Questions

trying to align html button at the center of the my page

I'm trying to align an HTML button exactly at the centre of the page irrespective of the browser used. It is either floating to the left while still being at the vertical centre or being somewhere on ...

Fatal error: Maximum execution time of 30 seconds exceeded

I am downloading a JSON file from an online source and and when it runs through the loop I am getting this error: > Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\temp\fetc...

5 May at 16:16

How to check if a string "StartsWith" another string?

How would I write the equivalent of C#'s [String.StartsWith](http://msdn.microsoft.com/en-us/library/baketfxw.aspx) in JavaScript? ``` var haystack = 'hello world'; var needle = 'he'; haystack.start...

8 Sep at 20:54

Tomcat 404 error: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists

I was following the tutorial on and got stuck at step 6: [http://o7planning.org/en/10169/java-servlet-tutorial](http://o7planning.org/en/10169/java-servlet-tutorial) It's just a simple project that s...

20 Jun at 09:12

IIS 500.19 with 0x80070005 The requested page cannot be accessed because the related configuration data for the page is invalid error

I want to upload my own asp.net website on IIS with IIS Manager. But when I do this, I get the following error > HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed be...

22 Jun at 12:29

How do I position one image on top of another in HTML?

I'm a beginner at rails programming, attempting to show many images on a page. Some images are to lay on top of others. To make it simple, say I want a blue square, with a red square in the upper ri...

19 Sep at 10:49

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I am getting the following error when I try to connect to mysql: `Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)` Is there a solution for this error? What might ...

12 May at 06:3

Using two CSS classes on one element

What am I doing wrong here? I have a `.social` `div`, but on the first one I want zero padding on the top, and on the second one I want no bottom border. I have attempted to create classes for this ...

15 May at 17:31

How do I determine the size of an object in Python?

How do I get the size occupied in memory by an object in Python?

Is there a way to check for both `null` and `undefined`?

Since TypeScript is strongly-typed, simply using `if () {}` to check for `null` and `undefined` doesn't sound right. Does TypeScript have any dedicated function or syntax sugar for this?

23 Apr at 07:53

What is reflection and why is it useful?

What is reflection, and why is it useful? I'm particularly interested in Java, but I assume the principles are the same in any language.

27 Nov at 07:51

How do you access the matched groups in a JavaScript regular expression?

I want to match a portion of a string using a [regular expression](https://en.wikipedia.org/wiki/Regular_expression) and then access that parenthesized substring: ``` var myString = "something format_...

21 Jan at 19:24

how to sort pandas dataframe from one column

I have a data frame like this: ``` print(df) 0 1 2 0 354.7 April 4.0 1 55.4 August 8.0 2 176.5 December 12.0 3 95.5 February 2.0 4 85.6 Janu...

5 Feb at 14:21

How do I use $scope.$watch and $scope.$apply in AngularJS?

I don't understand how to use `$scope.$watch` and `$scope.$apply`. The official documentation isn't helpful. What I don't understand specifically: - - - I tried [this tutorial](http://css.dzone.co...

7 Jan at 15:1

How can I set max-length in an HTML5 "input type=number" element?

For `<input type="number">` element, `maxlength` is not working. How can I restrict the `maxlength` for that number element?

31 Jan at 19:1

How to select the nth row in a SQL database table?

I'm interested in learning some (ideally) database agnostic ways of selecting the th row from a database table. It would also be interesting to see how this can be achieved using the native functional...

19 Jul at 22:51

What is the optimal algorithm for the game 2048?

I have recently stumbled upon the game [2048](http://gabrielecirulli.github.io/2048/). You merge similar tiles by moving them in any of the four directions to make "bigger" tiles. After each move, a n...

Read and parse a Json File in C#

How does one read a very large JSON file into an array in c# to be split up for later processing? --- I have managed to get something working that will: - - This was done with the code below but i...

2 Feb at 16:20

Convert Pandas Column to DateTime

I have one field in a pandas DataFrame that was imported as string format. It should be a datetime variable. How do I convert it to a datetime column and then filter based on date. Example: ``` df = p...

29 Jan at 18:42

Shell script "for" loop syntax

I have gotten the following to work: ``` for i in {2..10} do echo "output: $i" done ``` It produces a bunch of lines of `output: 2`, `output: 3`, so on. However, trying to run the following: ...

19 Jan at 22:8

How can I do a FULL OUTER JOIN in MySQL?

I want to do a [full outer join](https://en.wikipedia.org/wiki/Join_(SQL)#Full_outer_join) in MySQL. Is this possible? Is a supported by MySQL?

Maven Install on Mac OS X

I'm trying to install maven through the terminal by following [these instructions](http://maven.apache.org/download.html). So far I got this: ``` export M2_HOME=/user/apple/apache-maven-3.0.3 export M...

21 Apr at 08:34

Which MySQL data type to use for storing boolean values

Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse' for storing true/false information in MySQL? Especially in the context of writing and reading from/to a PHP sc...

4 May at 19:39

What does it mean if a Python object is "subscriptable" or not?

Which types of objects fall into the domain of "subscriptable"?

16 Sep at 12:26

How do I name and retrieve a Git stash by name?

How do I save/apply a stash with a name? I don't want to have to look up its index number in `git stash list`. I tried `git stash save "my_stash_name"`, but that only changes the stash description, an...

2 Sep at 02:0