Questions

Explanation of <script type = "text/template"> ... </script>

I just stumbled upon something I've never seen before. In the source of Backbone.js's example TODO application ([Backbone TODO Example](http://documentcloud.github.com/backbone/examples/todos/index.ht...

Finding Number of Cores in Java

How can I find the number of cores available to my application from within Java code?

16 Jan at 23:22

Get Value of a Edit Text field

I am learning how to create UI elements. I have created a few EditText input fields. On the click of a Button I want to capture the content typed into that input field. ``` <EditText android:id="@+id...

9 Nov at 00:23

Why are you not able to declare a class as static in Java?

Why are you not able to declare a class as static in Java?

2 Feb at 17:22

Regex lookahead, lookbehind and atomic groups

I found these things in my regex body but I haven't got a clue what I can use them for. Does somebody have examples so I can try to understand how they work? ``` (?!) - negative lookahead (?=) - posi...

5 Oct at 17:14

What are Unicode, UTF-8, and UTF-16?

What's the basis for Unicode and why the need for UTF-8 or UTF-16? I have researched this on Google and searched here as well, but it's not clear to me. In [VSS](https://en.wikipedia.org/wiki/Microsof...

18 Feb at 17:51

Is there a /dev/null on Windows?

What is the equivalent of `/dev/null` on Windows?

26 Apr at 23:3

What are your favorite extension methods for C#? (codeplex.com/extensionoverflow)

Let's make a list of answers where you post your excellent and favorite [extension methods](http://en.wikipedia.org/wiki/Extension_method). The requirement is that the full code must be posted and a...

23 May at 12:18

List<T> OrderBy Alphabetical Order

I'm using C# on Framework 3.5. I'm looking to quickly sort a Generic `List<T>`. For the sake of this example, let's say I have a List of a `Person` type with a property of lastname. How would I sor...

3 Jul at 18:26

A Windows equivalent of the Unix tail command

I'm looking for the equivalent of the Unix 'tail' command that will allow me to watch the output of a log file while it is being written to.

8 Sep at 20:43

What is the syntax for an inner join in LINQ to SQL?

I'm writing a LINQ to SQL statement, and I'm after the standard syntax for a normal inner join with an `ON` clause in C#. How do you represent the following in LINQ to SQL: ``` select DealerContact....

21 Aug at 10:31

How does String substring work in Swift

I've been updating some of my old code and answers with Swift 3 but when I got to Swift Strings and Indexing with substrings things got confusing. Specifically I was trying the following: ``` let s...

15 Nov at 02:16

How to input a regex in string.replace?

I need some help on declaring a regex. My inputs are like the following: ``` this is a paragraph with<[1> in between</[1> and then there are cases ... where the<[99> number ranges from 1-100</[99>. a...

9 Aug at 12:4

When to use RSpec let()?

I tend to use before blocks to set instance variables. I then use those variables across my examples. I recently came upon `let()`. According to RSpec docs, it is used to > ... to define a memoized ...

17 Sep at 17:58

The default for KeyValuePair

I have an object of the type `IEnumerable<KeyValuePair<T,U>> keyValueList`, I am using ``` var getResult= keyValueList.SingleOrDefault(); if(getResult==/*default */) { } else { } ``` How can...

11 Mar at 18:32

What's the opposite of 'make install', i.e. how do you uninstall a library in Linux?

While running ``` ./configure --prefix=/mingw ``` on a MinGW/MSYS system for a library I had previously run ``` './configure --prefix=/mingw && make && make install' ``` I came across this mes...

16 Jul at 10:45

C# generics syntax for multiple type parameter constraints

> [Generic methods and multiple constraints](https://stackoverflow.com/questions/588643/generic-methods-and-multiple-constraints) I need a generic function that has two type constraints, each ...

23 May at 11:55

Git checkout: updating paths is incompatible with switching branches

My problem is related to [Fatal Git error when switching branch](https://stackoverflow.com/questions/180064). I try to fetch a remote branch with the command ``` git checkout -b local-name origin/re...

23 May at 11:54

How do I print debug messages in the Google Chrome JavaScript Console?

How do I print debug messages in the Google Chrome JavaScript Console? Please note that the JavaScript Console is not the same as the JavaScript Debugger; they have different syntaxes AFAIK, so the ...

Should we @Override an interface's method implementation?

Should a method that implements an interface method be annotated with `@Override`? The [javadoc of the Override annotation](http://java.sun.com/javase/6/docs/api/java/lang/Override.html) says: > In...

23 May at 12:3

Explicit vs implicit SQL joins

Is there any efficiency difference in an explicit vs implicit inner join? For example: ``` SELECT * FROM table a INNER JOIN table b ON a.id = b.id; ``` vs. ``` SELECT a.*, b.* FROM table a, table ...

26 Oct at 19:14

How to sort a list of strings?

What is the best way of creating an alphabetically sorted list in Python?

25 Apr at 19:27

Is it possible to opt-out of dark mode on iOS 13?

A large part of my app consists of web views to provide functionality not yet available through native implementations. The web team has no plans to implement a dark theme for the website. As such, my...

24 Apr at 15:24

Error:Cannot fit requested classes in a single dex file.Try supplying a main-dex list. # methods: 72477 > 65536

I want to add fused location services but it shows me some error. Help me. ``` apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion "27.0.1" defau...

8 Dec at 19:11

How to listen for 'props' changes

In the [VueJs 2.0 docs](https://v2.vuejs.org/v2/guide/instance.html) I can't find any hooks that would listen on `props` changes. Does VueJs have such hooks like `onPropsUpdated()` or similar? As @wo...