Questions

Should I use != or <> for not equal in T-SQL?

I have seen `SQL` that uses both `!=` and `<>` for . What is the preferred syntax and why? I like `!=`, because `<>` reminds me of `Visual Basic`.

26 Mar at 09:48

Creating a new DOM element from an HTML string using built-in DOM methods or Prototype

I have an HTML string representing an element: `'<li>text</li>'`. I'd like to append it to an element in the DOM (a `ul` in my case). How can I do this with Prototype or with DOM methods? (I know i c...

12 Jan at 11:49

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

How does one remove a Docker image?

I'm running Docker under Vagrant under OS X 10.8.4 (Mountain Lion), and whenever I try to delete a saved image, I get an error: ``` $ docker rmi some-image-id 2013/07/15 hh:mm:ss unexpected JSON inp...

24 Jan at 22:0

How to sort a list/tuple of lists/tuples by the element at a given index?

I have some data either in a list of lists or a list of tuples, like this: ``` data = [[1,2,3], [4,5,6], [7,8,9]] data = [(1,2,3), (4,5,6), (7,8,9)] ``` And I want to sort by the 2nd element in the...

6 Apr at 13:12

Pass Method as Parameter using C#

I have several methods all with the same parameter types and return values but different names and blocks. I want to pass the name of the method to run to another method that will invoke the passed me...

24 Aug at 03:5

How do I concatenate strings and variables in PowerShell?

Suppose I have the following snippet: ``` $assoc = New-Object PSObject -Property @{ Id = 42 Name = "Slim Shady" Owner = "Eminem" } Write-Host $assoc.Id + " - " + $assoc.Name + " - " ...

27 Jun at 10:36

Changing the image source using jQuery

My DOM looks like this: ``` <div id="d1"> <div class="c1"> <a href="#"><img src="img1_on.gif"></a> <a href="#"><img src="img2_on.gif"></a> </div> </div> ``` When someo...

18 Jul at 21:50

Best practices for API versioning?

Are there any known how-tos or best practices for web service REST API versioning? I have noticed that [AWS does versioning by the URL of the endpoint](http://docs.aws.amazon.com/AmazonSimpleDB/lates...

30 Jun at 13:51

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?

10 May at 15:16

error: Unable to find vcvarsall.bat

I tried to install the Python package [dulwich](https://pypi.python.org/pypi/dulwich): ``` pip install dulwich ``` But I get a cryptic error message: ``` error: Unable to find vcvarsall.bat ``` ...

What's the difference between identifying and non-identifying relationships?

I haven't been able to fully grasp the differences. Can you describe both concepts and use real world examples?

Most efficient method to groupby on an array of objects

What is the most efficient way to groupby objects in an array? For example, given this array of objects: ``` [ { Phase: "Phase 1", Step: "Step 1", Task: "Task 1", Value: "5" }, { Phase: "Ph...

How to link a folder with an existing Heroku app

I have an existing Rails app on GitHub and deployed on Heroku. I'm trying to set up a new development machine and have cloned the project from my GitHub repository. However, I'm confused as to how to ...

30 Aug at 14:19

Include jQuery in the JavaScript Console

Is there an easy way to include jQuery in the Chrome JavaScript console for sites that do not use it? For example, on a website I would like to get the number of rows in a table. I know this is really...

19 Nov at 15:46

File Upload ASP.NET MVC 3.0

(Preface: this question is about ASP.NET MVC 3.0 which [was released in 2011](https://stackoverflow.com/questions/51390971/im-lost-what-happened-to-asp-net-mvc-5/51391202#51391202), it is not about w...

27 Dec at 13:36

Difference between id and name attributes in HTML

What is the difference between the `id` and `name` attributes? They both seem to serve the same purpose of providing an identifier. I would like to know (specifically with regards to HTML forms) whet...

8 Jul at 16:54

Using Python 3 in virtualenv

Using [virtualenv](https://virtualenv.pypa.io/en/latest/), I run my projects with the default version of Python (2.7). On one project, I need to use Python 3.4. I used `brew install python3` to inst...

16 Mar at 13:32

Validation failed for one or more entities. See 'EntityValidationErrors' property for more details

I am having this error when seeding my database with code first approach. > Validation failed for one or more entities. See 'EntityValidationErrors' property for more details. To be honest I don't k...

How can I convert a comma-separated string to an array?

I have a comma-separated string that I want to convert into an array, so I can loop through it. Is there anything built-in to do this? For example, I have this string ``` var str = "January,February,M...

30 Sep at 03:25

DateTime2 vs DateTime in SQL Server

Which one: - [datetime](https://msdn.microsoft.com/en-us/library/ms187819.aspx)- [datetime2](https://msdn.microsoft.com/en-us/library/bb677335.aspx) is recommended way to store date and time in SQ...

20 Mar at 19:25

Windows batch files: .bat vs .cmd?

As I understand it, `.bat` is the old 16-bit naming convention, and `.cmd` is for 32-bit Windows, i.e., starting with NT. But I continue to see .bat files everywhere, and they seem to work exactly the...

18 Oct at 18:5

Unfortunately MyApp has stopped. How can I solve this?

I am developing an application, and everytime I run it, I get the message: > Unfortunately, MyApp has stopped. What can I do to solve this? --- [What is a stack trace, and how can I use it to d...

21 Jul at 22:35

How do I get the day of week given a date?

I want to find out the following: given a date (`datetime` object), what is the corresponding day of the week? For instance, Sunday is the first day, Monday: second day.. and so on And then if the i...

23 May at 07:14

What does "connection reset by peer" mean?

What is the meaning of the "connection reset by peer" error on a TCP connection? Is it a fatal error or just a notification or related to the network failure?

28 Apr at 09:58