1052: Column 'id' in field list is ambiguous
I have 2 tables. `tbl_names` and `tbl_section` which has both the `id` field in them. How do I go about selecting the `id` field, because I always get this error: ``` 1052: Column 'id' in field list ...
- Modified
- 15 Jun at 20:22
Getting the error "Missing $ inserted" in LaTeX
I try to write the following in latex: ``` \begin{itemize} \item \textbf{insert(element|text)} inserts the element or text passed at the start of the selection. \item \textbf{insert_after(ele...
- Modified
- 19 Mar at 18:59
What causes javac to issue the "uses unchecked or unsafe operations" warning
For example: ``` javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ```
How can I make the cursor turn to the wait cursor?
How can I display the Wait/Busy Cursor (usually the hourglass) to the user to let them know the program is doing something?
- Modified
- 22 Dec at 19:21
Truncate a string to first n characters of a string and add three dots if any characters are removed
How can I get the first n characters of a string in PHP? What's the fastest way to trim a string to a specific number of characters, and append '...' if needed?
- Modified
- 3 Mar at 03:36
What's the difference between <b> and <strong>, <i> and <em>?
What's the difference between `<b>` and `<strong>`, `<i>` and `<em>` in HTML/XHTML? When should you use each?
"Exception has been thrown by the target of an invocation" error (mscorlib)
I have a website developed in ASP.Net 2.0 that is throwing the error ``` "Exception has been thrown by the target of an invocation" ``` in the production environment. It was not throwing this erro...
How to mock a final class with mockito
I have a final class, something like this: ``` public final class RainOnTrees{ public void startRain(){ // some code here } } ``` I am using this class in some other class like this...
How to install SQL Server Management Studio 2012 (SSMS) Express?
I just installed , I can connect with database from `VS2012RC`. Database is working :) I use `Win7 SP1 64bit`. [I download program from page](http://www.microsoft.com/en-us/download/details.aspx?id...
- Modified
- 21 May at 05:41
'Property does not exist on type 'never'
This is similar to [#40796374](https://stackoverflow.com/questions/40796374/property-x-does-not-exist-on-type-never) but that is around types, while I am using interfaces. Given the code below: ``` in...
- Modified
- 17 Nov at 22:46
How to parse JSON string in Typescript
Is there a way to parse strings as JSON in TypeScript? For example in JavaScript, we can use [JSON.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)...
- Modified
- 20 Feb at 21:1
How to set background color of a View
I'm trying to set the background color of a View (in this case a Button). I use this code: ``` // set the background to green v.setBackgroundColor(0x0000FF00 ); v.invalidate(); ``` It causes the B...
- Modified
- 28 May at 19:37
How to respond with an HTTP 400 error in a Spring MVC @ResponseBody method returning String
I'm using Spring MVC for a simple JSON API, with `@ResponseBody` based approach like the following. (I already have a service layer producing JSON directly.) ``` @RequestMapping(value = "/matches/{mat...
- Modified
- 19 Jun at 12:3
Java: method to get position of a match in a String?
``` String match = "hello"; String text = "0123456789hello0123456789"; int position = getPosition(match, text); // should be 10, is there such a method? ```
Why does Date.parse give incorrect results?
### Case One: ``` new Date(Date.parse("Jul 8, 2005")); ``` ### Output: Fri Jul 08 2005 00:00:00 GMT-0700 (PST) ### Case Two: ``` new Date(Date.parse("2005-07-08")); ``` ### Output: ...
- Modified
- 28 Mar at 12:3
async/await - when to return a Task vs void?
Under what scenarios would one want to use ``` public async Task AsyncMethod(int num) ``` instead of ``` public async void AsyncMethod(int num) ``` The only scenario that I can think of is if ...
- Modified
- 14 Sep at 15:21
Select values from XML field in SQL Server 2008
Just looking at my XML field, my rows look like this: ``` <person><firstName>Jon</firstName><lastName>Johnson</lastName></person> <person><firstName>Kathy</firstName><lastName>Carter</lastName></pers...
- Modified
- 22 May at 18:32
Need to navigate to a folder in command prompt
My command prompt starts in C:\Users\ (Name) and I need it to be in a different folder, how can I do this using the command prompt itself?
How to empty a char array?
Have an array of chars like char members[255]. How can I empty it completely without using a loop? ``` char members[255]; ``` By "empty" I mean that if it had some values stored in it then it shoul...
Filter LogCat to get only the messages from My Application in Android?
I observed that when i use Logcat with Eclipse with ADT for Android, I get messages from many other applications as well. Is there a way to filter this and show only messages from my own application o...
- Modified
- 30 May at 14:47
Making a mocked method return an argument that was passed to it
Consider a method signature like: ``` public String myFunction(String abc); ``` Can Mockito help return the same string that the method received?
How can I add a vertical scrollbar to my div automatically?
I want to add a vertical scrollbar to my `<div>`. I've tried `overflow: auto`, but it is not working. I've tested my code in Firefox and Chrome. I'm pasting the div style code here: ``` float: left...
How to resolve git stash conflict without commit?
As [asked in this question](https://stackoverflow.com/q/7517124/11343), I also want to know how to resolve a conflicting `git stash pop` without adding all modifications to a commit (just like "git st...
How do you prevent install of "devDependencies" NPM modules for Node.js (package.json)?
I have this in my package.json file (shortened version): ``` { "name": "a-module", "version": "0.0.1", "dependencies": { "coffee-script": ">= 1.1.3" }, "devDependencies": { "st...
Set NOW() as Default Value for datetime datatype?
I have two columns in table users namely `registerDate and lastVisitDate` which consist of datetime data type. I would like to do the following. 1. Set registerDate defaults value to MySQL NOW() 2. ...
- Modified
- 30 Jul at 12:52