What does ON [PRIMARY] mean?
I'm creating an SQL setup script and I'm using someone else's script as an example. Here's an example of the script: ``` SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[be_Categ...
- Modified
- 4 Dec at 22:48
C++, What does the colon after a constructor mean?
> [Variables After the Colon in a Constructor](https://stackoverflow.com/questions/2349978/variables-after-the-colon-in-a-constructor) [C++ constructor syntax question (noob)](https://stackoverfl...
- Modified
- 5 Sep at 07:55
Iterate through every file in one directory
How do I write a loop in ruby so that I can execute a block of code on each file? I'm new to ruby, and I've concluded that the way to do this is a do each loop. The ruby file will be executed from a ...
- Modified
- 30 Sep at 14:59
How can I get the scrollbar position with JavaScript?
I'm trying to detect the position of the browser's scrollbar with JavaScript to decide where in the page the current view is. My guess is that I have to detect where the thumb on the track is, and the...
- Modified
- 7 May at 20:19
How to get Spinner value?
In Android, I am trying to get the selected Spinner value with a listener. What is the best way to get the spinner's value?
Correct way to use get_or_create?
I'm trying to use get_or_create for some fields in my forms, but I'm getting a 500 error when I try to do so. One of the lines looks like this: ``` customer.source = Source.objects.get_or_create(nam...
iterating over and removing from a map
I was doing: ``` for (Object key : map.keySet()) if (something) map.remove(key); ``` which threw a ConcurrentModificationException, so i changed it to: ``` for (Object key : new ArrayList...
- Modified
- 15 Oct at 16:20
Why do you create a View in a database?
When and Why does some one decide that they need to create a View in their database? Why not just run a normal stored procedure or select?
- Modified
- 14 Aug at 15:26
How to list table foreign keys
Is there a way using SQL to list all foreign keys for a given table? I know the table name / schema and I can plug that in.
- Modified
- 29 Apr at 19:39
What's the difference between SortedList and SortedDictionary?
Is there any real practical difference between a [SortedList<TKey,TValue>](https://msdn.microsoft.com/en-us/library/ms132319(v=vs.110).aspx) and a [SortedDictionary<TKey,TValue>](https://msdn.microsof...
- Modified
- 27 Jul at 13:42
Run a single migration file
Is there an easy way to run a single migration? I don't want to migrate to a certain version I just want to run a specific one.
- Modified
- 15 Apr at 22:3
How do I write a bash script to restart a process if it dies?
I have a python script that'll be checking a queue and performing an action on each item: ``` # checkqueue.py while True: check_queue() do_something() ``` How do I write a bash script that will...
Request format is unrecognized for URL unexpectedly ending in
When consuming a WebService, I got the following error: > Request format is unrecognized for URL unexpectedly ending in How can this be solved?
- Modified
- 20 Jul at 18:16
Array slices in C#
How do you do it? Given a byte array: ``` byte[] foo = new byte[4096]; ``` How would I get the first x bytes of the array as a separate array? (Specifically, I need it as an `IEnumerable<byte>`) T...
How to do joins in LINQ on multiple fields in single join
I need to do a LINQ2DataSet query that does a join on more than one field (as ``` var result = from x in entity join y in entity2 on x.field1 = y.field1 and x.field2 = y.field2 ``...
DateTime.Now vs. DateTime.UtcNow
I've been wondering what exactly are the principles of how the two properties work. I know the second one is universal and basically doesn't deal with time zones, but can someone explain in detail how...
- Modified
- 15 Sep at 11:4
Merging two arrays in .NET
Is there a built in function in .NET 2.0 that will take two arrays and merge them into one array? The arrays are both of the same type. I'm getting these arrays from a widely used function within my ...
How to implement the Softmax function in Python
From the [Udacity's deep learning class](https://www.udacity.com/course/viewer#!/c-ud730/l-6370362152/m-6379811820), the softmax of y_i is simply the exponential divided by the sum of exponential of t...
- Modified
- 11 Dec at 15:18
Does Conda replace the need for virtualenv?
I recently discovered [Conda](http://conda.pydata.org/docs/index.html) after I was having trouble installing SciPy, specifically on a Heroku app that I am developing. With Conda you create environmen...
- Modified
- 21 Dec at 15:3
Store Kinect's v2.0 Motion to BVH File
I would like to store the motion capture data from Kinect 2 as a BVH file. I found code which does so for Kinect 1 which can be found [here](https://bitbucket.org/nguyenivan/kinect2bvh.v2/src/d19ccd4e...
- Modified
- 27 Feb at 21:18
React / JSX Dynamic Component Name
I am trying to dynamically render components based on their type. For example: ``` var type = "Example"; var ComponentName = type + "Component"; return <ComponentName />; // Returns <examplecomponent...
- Modified
- 12 Dec at 12:25
How do I set a mock date in Jest?
I'm using moment.js to do most of my date logic in a helper file for my React components but I haven't been able to figure out how to mock a date in Jest a la `sinon.useFakeTimers()`. The Jest docs on...
- Modified
- 9 Apr at 14:53
Seaborn plots not showing up
I'm sure I'm forgetting something very simple, but I cannot get certain plots to work with Seaborn. If I do: ``` import seaborn as sns ``` Then any plots that I create as usual with matplotlib ge...
- Modified
- 6 Jan at 11:45
Git error: "Please make sure you have the correct access rights and the repository exists"
I am using TortoiseGit on Windows. When I am trying to Clone from the context menu of the standard Windows Explorer, I get this error: > Please make sure you have the correct access rights and the re...
- Modified
- 25 Jan at 10:46
How to change background color in the Notepad++ text editor?
Does anyone know how to change the background color, font size, and other appearance-based settings in Notepad++? The default is white but I am trying to change it into a dark gray or something else. ...