Decimal precision and scale in EF Code First
I'm experimenting with this code-first approach, but I'm find out now that a property of type System.Decimal gets mapped to a sql column of type decimal(18, 0). How do I set the precision of the dat...
- Modified
- 25 Jan at 01:8
Select every Nth element in CSS
Is it possible to select, say, every fourth element in a set of elements? Ex: I have 16 `<div>` elements... I could write something like. ``` div:nth-child(4), div:nth-child(8), div:nth-child(12), d...
- Modified
- 25 Aug at 02:43
When does a process get SIGABRT (signal 6)?
What are the scenarios where a process gets a SIGABRT in C++? Does this signal always come from within the process or can this signal be sent from one process to another? Is there a way to identify ...
How to check in Javascript if one element is contained within another
How can I check if one DOM element is a child of another DOM element? Are there any built in methods for this? For example, something like: ``` if (element1.hasDescendant(element2)) ``` or ``` if ...
- Modified
- 20 Feb at 22:32
Parsing query strings on Android
Java EE has [ServletRequest.getParameterValues()](http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletRequest.html). On non-EE platforms, [URL.getQuery()](http://download.oracle.com/jav...
View array in Visual Studio debugger?
Is it possible to view an array in the Visual Studio debugger? QuickWatch only shows the first element of the array.
- Modified
- 9 Jun at 21:15
Why doesn't Python have multiline comments?
OK, I'm aware that triple-quotes strings can serve as multiline comments. For example, ``` """Hello, I am a multiline comment""" ``` and ``` '''Hello, I am a multiline comment''' ``` Bu...
Captured variable in a loop in C#
I met an interesting issue about C#. I have code like below. ``` List<Func<int>> actions = new List<Func<int>>(); int variable = 0; while (variable < 5) { actions.Add(() => variable * 2); ++...
- Modified
- 17 Jan at 18:43
What does it mean that Javascript is a prototype based language?
One of the major advantages with Javascript is said to be that it is a prototype based language. But what does it mean that Javascript is prototype based, and why is that an advantage?
- Modified
- 28 Dec at 15:28
Generating Random Passwords
When a user on our site loses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "neede...
How can I create a Git repository with the default branch name other than "master"?
In the [Pro Git book](https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches), it says > “origin” is not specialJust like the branch name “master” does not have any special meaning in Git, neith...
- Modified
- 24 Jun at 09:30
How does spring.jpa.hibernate.ddl-auto property exactly work in Spring?
I was working on my Spring boot app project and noticed that, sometimes there is a connection time out error to my Database on another server(SQL Server). This happens specially when I try to do some...
- Modified
- 3 Oct at 13:54
React Native Change Default iOS Simulator Device
When I run this command: ``` react-native run-ios ``` My app runs by default in the iPhone6 simulator device: ``` Found Xcode project RN.xcodeproj Launching iPhone 6 (9.2)... ``` How can I have ...
- Modified
- 14 Sep at 07:31
Delegation: EventEmitter or Observable in Angular
I am trying to implement something like a delegation pattern in Angular. When the user clicks on a `nav-item`, I would like to call a function which then emits an event which should in turn be handle...
- Modified
- 17 Dec at 08:35
JavaScript Array to Set
MDN references JavaScript's [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) collection abstraction. I've got an array of objects that I'd like to convert to...
- Modified
- 25 Oct at 14:46
How can I include a module from another file from the same project?
By following [this guide](https://doc.rust-lang.org/0.12.0/guide.html#crates-and-modules) I created a Cargo project. `src/main.rs` ``` fn main() { hello::print_hello(); } mod hello { pub fn p...
- Modified
- 5 May at 21:24
After installation of Gulp: “no command 'gulp' found”
After installing [gulp.js](http://gulpjs.com/) via npm, I receive a `no command 'gulp' found` error when running the `gulp` command from the same directory it was installed into. When looking under t...
- Modified
- 26 Apr at 00:56
How can I add a filter class in Spring Boot?
Is there any annotation for a `Filter` class (for web applications) in Spring Boot? Perhaps `@Filter`? I want to add a custom filter in my project. [The Spring Boot Reference Guide](http://docs.spring...
- Modified
- 12 May at 08:2
How do I change the IntelliJ IDEA default JDK?
I use IntelliJ IDEA as my development environment, and Maven for dependency management. I frequently build my project structure (directories, poms, etc) outside of IDEA and then import the project in...
- Modified
- 24 Sep at 16:34
How to set time delay in javascript
I have this a piece of js in my website to switch images but need a delay when you click the image a second time. The delay should be 1000ms. So you would click the img.jpg then the img_onclick.jpg wo...
- Modified
- 27 Jun at 09:56
How to convert a string of numbers to an array of numbers?
I have below string - ``` var a = "1,2,3,4"; ``` when I do - ``` var b = a.split(','); ``` I get `b` as `["1", "2", "3", "4"]` can I do something to get `b` as `[1, 2, 3, 4]` ?
- Modified
- 31 Jul at 22:29
How to check if a string array contains one string in JavaScript?
I have a string array and one string. I'd like to test this string against the array values and apply a condition the result - if the array contains the string do "A", else do "B". How can I do that?...
- Modified
- 8 Apr at 14:33
SQL - HAVING vs. WHERE
I have the following two tables: ``` 1. Lecturers (LectID, Fname, Lname, degree). 2. Lecturers_Specialization (LectID, Expertise). ``` I want to find the lecturer with the most Specialization. When...
- Modified
- 26 Sep at 05:45
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...
- Modified
- 22 Jun at 00:24
Hide separator line on one UITableViewCell
I'm customizing a `UITableView`. I want to hide the line separating on the cell ... can i do this? I know I can do `tableView.separatorStyle = UITableViewCellStyle.None` but that would affect the c...
- Modified
- 12 May at 16:28