Questions

SELECT list is not in GROUP BY clause and contains nonaggregated column .... incompatible with sql_mode=only_full_group_by

I'm using MySQL 5.7.13 on my windows PC with WAMP Server My problem is while executing this query ``` SELECT * FROM `tbl_customer_pod_uploads` WHERE `load_id` = '78' AND `status` = 'Active' GROU...

12 Jan at 18:31

Check if a number is int or float

Here's how I did it: ``` inNumber = somenumber inNumberint = int(inNumber) if inNumber == inNumberint: print "this number is an int" else: print "this number is a float" ``` Something like ...

27 Dec at 19:14

Android: How do I get string from resources using its name?

I would like to have 2 languages for the UI and separate string values for them in my resource file `res\values\strings.xml`: ``` <string name="tab_Books_en">Books</string> <string name="tab_Quote...

30 Nov at 08:25

getting the ng-object selected with ng-change

Given the following select element ``` <select ng-options="size.code as size.name for size in sizes " ng-model="item.size.code" ng-change="update(MAGIC_THING)"> </select> ``` Is t...

29 Apr at 09:22

Why do I get "'property cannot be assigned" when sending an SMTP email?

I can't understand why this code is not working. I get an error saying property can not be assigned ``` MailMessage mail = new MailMessage(); SmtpClient client = new SmtpClient(); client.Port = 25; cl...

22 Jun at 00:24

ld cannot find an existing library

I am attempting to link an application with g++ on this Debian lenny system. ld is complaining it cannot find specified libraries. The specific example here is ImageMagick, but I am having similar pro...

Datetime equal or greater than today in MySQL

What's the best way to do following: ``` SELECT * FROM users WHERE created >= today; ``` Note: created is a datetime field.

9 Mar at 10:24

How to check if a variable is an integer in JavaScript?

How do I check if a variable is an integer in JavaScript, and throw an alert if it isn't? I tried this, but it doesn't work: ``` <html> <head> <script type="text/javascript"> ...

7 Sep at 14:36

Suppress InsecureRequestWarning: Unverified HTTPS request is being made in Python2.6

I am writing scripts in Python2.6 with use of [pyVmomi](https://github.com/vmware/pyvmomi) and while using one of the connection methods: ``` service_instance = connect.SmartConnect(host=args.ip, ...

How to install Xcode Command Line Tools

How do I get the command-line build tools installed with the current Xcode/Mac OS X v10.8 (Mountain Lion) or later? Unlike Xcode there is no installer, it's just a bundle. It looks like all the comm...

21 Dec at 21:25

Check if user is using IE

I am calling a function like the one below by click on divs with a certain class. Is there a way I can check when starting the function if a user is using Internet Explorer and abort / cancel it if ...

Angular HTML binding

I am writing an Angular application and I have an HTML response I want to display. How do I do that? If I simply use the binding syntax `{{myVal}}` it encodes all HTML characters (of course). I nee...

Keep only date part when using pandas.to_datetime

I use `pandas.to_datetime` to parse the dates in my data. Pandas by default represents the dates with `datetime64[ns]` even though the dates are all daily only. I wonder whether there is an elegant/cl...

22 Oct at 16:12

How to calculate number of days between two dates?

For example, given two dates in input boxes: ``` <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/> <script> alert(datediff("day", first, second)); // what goes here? </scri...

22 Jan at 15:31

Parsing JSON giving "unexpected token o" error

I am having a problem parsing simple JSON strings. I have checked them on [JSONLint](http://www.JSONLint.com) and it shows that they are valid. But when I try to parse them using either `JSON.parse` o...

8 Nov at 01:44

Why is python setup.py saying invalid command 'bdist_wheel' on Travis CI?

My Python package has a `setup.py` which builds fine locally on Ubuntu Trusty and on a fresh Vagrant Ubuntu Trusty VM when I provision it like this: ``` sudo apt-get install python python-dev --force...

15 May at 10:37

How do I get NuGet to install/update all the packages in the packages.config?

I have a solution with multiple projects in it. Most of the third party references are missing, yet there are `packages.config` file for each project. Does this need to be done via command line for ...

30 Nov at 05:51

Convert array of strings into a string in Java

I want the Java code for converting an array of strings into an string.

7 Apr at 07:25

How to check whether an object is a date?

I have an annoying bug in on a webpage: > date.GetMonth() is not a function So, I suppose that I am doing something wrong. The variable `date` is not an object of type `Date`. I tried to add a `if ...

21 Aug at 15:25

Change label text using JavaScript

Why doesn't the following work for me? ``` <script> document.getElementById('lbltipAddedComment').innerHTML = 'Your tip has been submitted!'; </script> <label id="lbltipAddedComment"></label> ```...

6 Oct at 11:19

Best way to Format a Double value to 2 Decimal places

I am dealing with lot of double values in my application, is there is any easy way to handle the formatting of decimal values in Java? Is there any other better way of doing it than ``` DecimalForm...

23 May at 12:18

Default behavior of "git push" without a branch specified

I use the following command to push to my remote branch: ``` git push origin sandbox ``` If I say ``` git push origin ``` does that push changes in my other branches too, or does it only update ...

24 Jun at 04:40

How do I remove the default link color of the html hyperlink 'a' tag?

The default link color is blue. How do I remove the default link color of the html hyperlink tag `<a>`?

8 Dec at 01:34

Script to kill all connections to a database (More than RESTRICTED_USER ROLLBACK)

I have a development database that re-deploy frequently from a Visual Studio Database project (via a TFS Auto Build). Sometimes when I run my build I get this error: ``` ALTER DATABASE failed becaus...

Laravel Redirect Back with() Message

I am trying to redirect to the previous page with a message when there is a fatal error. ``` App::fatal(function($exception) { return Redirect::back()->with('msg', 'The Message'); } ``` In the ...

29 Jan at 00:58