How does the ARM architecture differ from x86?
Is the x86 Architecture specially designed to work with a keyboard while ARM expects to be mobile? What are the key differences between the two?
- Modified
- 28 May at 03:4
How to use format() on a moment.js duration?
Is there any way I can use the [moment.js](http://momentjs.com/) `format` method on duration objects? I can't find it anywhere in the docs and it doesn't seen to be an attribute on duration objects. ...
- Modified
- 28 Dec at 13:43
How can I convert comma separated string into a List<int>
``` string tags = "9,3,12,43,2" List<int> TagIds = tags.Split(','); ``` This doesn't work cause the split method returns a string[]
How to open a file using the open with statement
I'm looking at how to do file input and output in Python. I've written the following code to read a list of names (one per line) from a file into another file while checking a name against the names i...
- Modified
- 24 Jan at 14:57
Subtract two variables in Bash
I have the script below to subtract the counts of files between two directories but the `COUNT=` expression does not work. What is the correct syntax? ``` #!/usr/bin/env bash FIRSTV=`ls -1 | wc -l` ...
On delete cascade with doctrine2
I'm trying to make a simple example in order to learn how to delete a row from a parent table and automatically delete the matching rows in the child table using Doctrine2. Here are the two entities ...
- Modified
- 13 Jun at 09:17
How to Empty Caches and Clean All Targets Xcode 4 and later
Jonathan suggest here: [Xcode Includes .xib files that have been deleted!](https://stackoverflow.com/questions/4980296/xcode-includes-xib-files-that-have-been-deleted/4980405#4980405) that cleaning al...
Preprocessor directives in Razor
I am writing my first Razor page today, and can't figure out how to enter ``` #if debug ... #else ... #endif ``` How can I do that in Razor?
- Modified
- 27 Feb at 14:27
How do you get the width and height of a multi-dimensional array?
I have an array defined: ``` int [,] ary; // ... int nArea = ary.Length; // x*y or total area ``` This is all well and good, but I need to know how wide this array is in the `x` and `y` dimensions ...
- Modified
- 17 Aug at 16:59
Dictionary returning a default value if the key does not exist
I find myself using the current pattern quite often in my code nowadays ``` var dictionary = new Dictionary<type, IList<othertype>>(); // Add stuff to dictionary var somethingElse = dictionary.Conta...
- Modified
- 8 Apr at 16:4
jQuery: Get height of hidden element in jQuery
I need to get height of an element that is within a div that is hidden. Right now I show the div, get the height, and hide the parent div. This seems a bit silly. Is there a better way? I'm using jQu...
- Modified
- 23 Dec at 00:11
Best way to parse command-line parameters?
What's the best way to parse command-line parameters in Scala? I personally prefer something lightweight that does not require external jar. Related: - [How do I parse command line arguments in Java...
- Modified
- 19 Feb at 06:1
Check if an image is loaded (no errors) with jQuery
I'm using JavaScript with the jQuery library to manipulate image thumbnails contained in a unordered list. When the image is loaded it does one thing, when an error occurs it does something else. I'm ...
- Modified
- 20 Aug at 21:53
How to do constructor chaining in C#
I know that this is supposedly a super simple question, but I've been struggling with the concept for some time now. My question is, how do you chain constructors in C#? I'm in my first OOP clas...
- Modified
- 12 Mar at 21:58
CSS selector for a checked radio button's label
Is it possible to apply a css(3) style to a label of a checked radio button? I have the following markup: ``` <input type="radio" id="rad" name="radio"/> <label for="rad">A Label</label> ``` What ...
How to redirect the output of a PowerShell to a file during its execution
I have a PowerShell script for which I would like to redirect the output to a file. The problem is that I cannot change the way this script is called. So I cannot do: ``` .\MyScript.ps1 > output.txt ...
- Modified
- 11 Jul at 23:39
Smart way to truncate long strings
Does anyone have a more sophisticated solution/library for truncating strings with JavaScript and putting an ellipsis on the end, than the obvious one: ``` if (string.length > 25) { string = string...
- Modified
- 22 Feb at 03:7
'react-scripts' is not recognized as an internal or external command
I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like `mavenapp/src/main/javascript/[npm project files]` Inside my package.json...
- Modified
- 27 Aug at 08:14
Casting a number to a string in TypeScript
Which is the the best way (if there is one) to cast from number to string in Typescript? ``` var page_number:number = 3; window.location.hash = page_number; ``` In this case the compiler throws the...
- Modified
- 13 Sep at 21:46
Spring - No EntityManager with actual transaction available for current thread - cannot reliably process 'persist' call
I get this error when trying to invoke "persist" method to save entity model to database in my Spring MVC web application. Can't really find any post or page in internet that can relate to this partic...
- Modified
- 28 Aug at 10:44
What exactly is std::atomic?
I understand that `std::atomic<>` is an atomic object. But atomic to what extent? To my understanding an operation can be atomic. What exactly is meant by making an object atomic? For example if there...
- Modified
- 2 Jun at 04:1
How to disable margin-collapsing?
Is there a way to disable margin-collapsing altogether? The only solutions I've found (by the name of "uncollapsing") entail using a 1px border or 1px padding. I find this unacceptable: the extraneo...
Stop form refreshing page on submit
How would I go about preventing the page from refreshing when pressing the send button without any data in the fields? The validation is setup working fine, all fields go red but then the page is imme...
- Modified
- 7 Feb at 15:53
JavaScript string encryption and decryption?
I'm interested in building a small app for personal use that will encrypt and decrypt information on the client side using JavaScript. The encrypted information will be stored in a database on a serv...
- Modified
- 5 Sep at 17:23
How can I convert uppercase letters to lowercase in Notepad++
I use Notepad ++ for coding mostly. How can I convert capital letters to lowercase and vice versa?
- Modified
- 30 Nov at 16:1