Questions

What's the significance of the "No newline at end of file" log?

When doing a `git diff` it says . What's the significance of the message and what's it trying to tell us?

14 Apr at 19:27

Align text to the bottom of a div

I tried to align my text to the bottom of a div from other posts and answers in Stack Overflow I learned to handle this with different CSS properties. But I can't get it done. Basically my HTML code i...

13 Mar at 15:42

The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

When I attempt to connect to a MySQL server from PHP, I see the following error: > Deprecated: The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /path/...

19 Dec at 03:11

Converting strings to floats in a DataFrame

How to covert a DataFrame column containing strings and `NaN` values to floats. And there is another column whose values are strings and floats; how to convert this entire column to floats.

24 May at 07:34

Why is Spring's ApplicationContext.getBean considered bad?

I asked a general Spring question: [Auto-cast Spring Beans](https://stackoverflow.com/questions/812178/auto-cast-spring-beans) and had multiple people respond that calling Spring's `ApplicationContext...

23 May at 12:26

The transaction log for the database is full

I have a long running process that holds open a transaction for the full duration. I have no control over the way this is executed. Because a transaction is held open for the full duration, when t...

CSS 100% height with padding/margin

With HTML/CSS, how can I make an element that has a width and/or height that is 100% of it's parent element and still has proper padding or margins? By "proper" I mean that if my parent element is `2...

28 Sep at 14:42

"’" showing on page instead of " ' "

`’` is showing on my page instead of `'`. I have the `Content-Type` set to `UTF-8` in both my `<head>` tag and my HTTP headers: ``` <meta http-equiv="Content-Type" content="text/html; charset=UTF-...

28 Dec at 23:43

How to step through Python code to help debug issues?

In Java/C# you can easily step through code to trace what might be going wrong, and IDE's make this process very user friendly. Can you trace through python code in a similar fashion?

30 Jan at 05:16

Get and Set a Single Cookie with Node.js HTTP Server

I want to be able to set a single cookie, and read that single cookie with each request made to the nodejs server instance. Can it be done in a few lines of code, without the need to pull in a third p...

Array of PHP Objects

So I have been searching for a while and cannot find the answer to a simple question. Is it possible to have an array of objects in PHP? Such as: ``` $ar=array(); $ar[]=$Obj1 $ar[]=$obj2 ``` ...

23 Dec at 04:42

How to compare datetime with only date in SQL Server

``` Select * from [User] U where U.DateCreated = '2014-02-07' ``` but in the database the user was created on `2014-02-07 12:30:47.220` and when I only put `'2014-02-07'` It does not show any data...

15 Oct at 02:50

How to execute Python scripts in Windows?

I have a simple script blah.py (using Python 2): ``` import sys print sys.argv[1] ``` If I execute my script by: ``` python c:/..../blah.py argument ``` It prints argument but if I execute scrip...

How to get the focused element with jQuery?

Using jQuery, how can I get the input element that has the caret's (cursor's) focus? Or in other words, how to determine if an input has the caret's focus?

22 Dec at 19:20

Simulator or Emulator? What is the difference?

While I understand what simulation and emulation mean in general, I almost always get confused about them. Assume that I create a piece of software that mimics existing hardware/software, what should ...

30 Dec at 18:0

Create a CSV File for a user in PHP

I have data in a MySQL database. I am sending the user a URL to get their data out as a CSV file. I have the e-mailing of the link, MySQL query, etc. covered. How can I, when they click the link, ha...

23 Jan at 04:19

Converting numpy dtypes to native python types

If I have a numpy dtype, how do I automatically convert it to its closest python data type? For example, ``` numpy.float32 -> "python float" numpy.float64 -> "python float" numpy.uint32 -> "python ...

8 Sep at 09:37

Using port number in Windows host file

After installing TeamViewer, I have changed the wampserver port to 8080, so the address is `http://localhost:8080.` For the host file located at C:\WINDOWS\system32\drivers\etc\, I have also made the...

20 Aug at 15:11

Pass props to parent component in React.js

Is there not a simple way to pass a child's `props` to its parent using events, in React.js? ``` var Child = React.createClass({ render: function() { <a onClick={this.props.onClick}>Click me</a...

1 Aug at 15:7

How do I find the last column with data?

I've found this method for finding the last data containing row in a sheet: ``` ws.Range("A65536").End(xlUp).row ``` Is there a similar method for finding the last data containing column in a sheet...

25 Jun at 13:9

jQuery ajax success callback function definition

I want to use jQuery ajax to retrieve data from a server. I want to put the success callback function definition outside the `.ajax()` block like the following. So do I need to declare the variable `...

7 Feb at 15:22

ALTER TABLE to add a composite primary key

I have a table called `provider`. I have three columns called `person`, `place`, `thing`. There can be duplicate persons, duplicate places, and duplicate things, but there can never be a dupicate pers...

Understanding the main method of python

I am new to Python, but I have experience in other OOP languages. My course does not explain the main method in python. Please tell me how main method works in python ? I am confused because I am tr...

25 Apr at 17:28

Strtotime() doesn't work with dd/mm/YYYY format

I really like the `strtotime()` function, but the user manual doesn't give a complete description of the supported date formats. `strtotime('dd/mm/YYYY')` doesn't work, it works only with `mm/dd/YYYY`...

13 Dec at 13:21

How can I check MySQL engine type for a specific table?

My MySQL database contains several tables using different storage engines (specifically myisam and innodb). How can I find out which tables are using which engine?

13 Jul at 19:39