Questions

What is the instanceof operator in JavaScript?

The `instanceof` keyword in JavaScript can be quite confusing when it is first encountered, as people tend to think that JavaScript is not an object-oriented programming language. - - -

10 Apr at 20:46

What is "entropy and information gain"?

I am reading this book ([NLTK](http://www.nltk.org/book)) and it is confusing. is [defined as](http://www.nltk.org/book/ch06.html#entropy-and-information-gain): > Entropy is the sum of the probabil...

How to quickly and conveniently disable all console.log statements in my code?

Is there any way to turn off all `console.log` statements in my JavaScript code, for testing purposes?

28 Feb at 08:16

Converting string to title case

I have a string which contains words in a mixture of upper and lower case characters. For example: `string myData = "a Simple string";` I need to convert the first character of each word (separated...

25 Apr at 09:52

CSS Child vs Descendant selectors

I am a bit confused between these 2 selectors. Does the selector: ``` div p ``` select all `p` within a `div` whether or not it's an immediate descedent? So if the `p` is inside another `div` it...

12 Feb at 02:0

Java ResultSet how to check if there are any results

[Resultset](http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html) has no method for hasNext. I want to check if the resultSet has any value is this the correct way ``` if (!resultSet.nex...

15 May at 06:8

Use of "this" keyword in formal parameters for static methods in C#

I've come across several instances of C# code like the following: ``` public static int Foo(this MyClass arg) ``` I haven't been able to find an explanation of what the `this` keyword means in this...

11 May at 05:5

What is the best way to find the user's home directory in Java?

What is the best way to find the user's home directory in Java? The difficulty is that the solution should be cross-platform; it should work on Windows 2000, XP, Vista, OS X, Linux, and other Unix var...

10 Feb at 20:19

Changing an element's ID with jQuery

I need to change an element's ID using jQuery. Apparently these don't work: ``` jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid" ``` I found out that I can make it happ...

29 Mar at 20:0

Easier way to debug a Windows service

Is there an easier way to step through the code than to start the service through the Windows Service Control Manager and then attaching the debugger to the thread? It's kind of cumbersome and I'm won...

If async-await doesn't create any additional threads, then how does it make applications responsive?

Time and time again, I see it said that using `async`-`await` doesn't create any additional threads. That doesn't make sense because the only ways that a computer can appear to be doing more than 1 th...

Angular window resize event

I would like to perform some tasks based on the window re-size event (on load and dynamically). Currently I have my DOM as follows: ``` <div id="Harbour"> <div id="Port" (window:resize)="onResize(...

7 Oct at 17:32

Angular EXCEPTION: No provider for Http

I am getting the `EXCEPTION: No provider for Http!` in my Angular app. What am I doing wrong? ``` import {Http, Headers} from 'angular2/http'; import {Injectable} from 'angular2/core' @Component({ ...

17 Dec at 08:27

Bootstrap 4 - Glyphicons migration?

We have a project that uses glyphicons intensively. Bootstrap v4 drops the glyphicon font altogether. Is there an equivalent for icons shipped with Bootstrap V4? [](https://i.stack.imgur.com/98yvZ.p...

25 Sep at 15:22

What does the error "JSX element type '...' does not have any construct or call signatures" mean?

I wrote some code: ``` function renderGreeting(Elem: React.Component<any, any>) { return <span>Hello, <Elem />!</span>; } ``` I'm getting an error: > JSX element type `Elem` does not have any ...

29 Mar at 07:20

I am getting Failed to load resource: net::ERR_BLOCKED_BY_CLIENT with Google chrome

I am getting white page after running my project but its work with .net Client properly Do I need any settings in the browser? and the link will come after the error ``` Failed to load resource: net:...

29 Mar at 10:1

Get environment variable value in Dockerfile

I'm building a container for a ruby app. My app's configuration is contained within environment variables (loaded inside the app with [dotenv](http://github.com/bkeepers/dotenv)). One of those config...

23 Oct at 09:16

How to print out a variable in makefile

In my makefile, I have a variable 'NDK_PROJECT_PATH', my question is how can I print it out when it compiles? I read [Make file echo displaying "$PATH" string](https://stackoverflow.com/questions/370...

23 May at 12:18

Unable to launch the IIS Express Web server

I have an ASP.NET MVC 4 solution. When I try to open it using Visual Studio 2012, I get following error: > Configuring Web `https://localhost:` for ASP.NET 4.5 failed. You must manually configure this...

10 Oct at 17:38

How to perform grep operation on all files in a directory?

Working with xenserver, and I want to perform a command on each file that is in a directory, grepping some stuff out of the output of the command and appending it in a file. I'm clear on the command ...

3 Dec at 20:28

nginx - nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

All of a sudden I am getting the below nginx error ``` * Restarting nginx * Stopping nginx nginx ...done. * Starting nginx nginx nginx: [emerg] bind() to [::]:80 failed (98: Address already in u...

23 Feb at 20:5

How to get a list of all valid IP addresses in a local network?

Is there a way to get a list of all valid IP addresses in a local network? I mean all IP addresses that each user is using in the network.

13 Apr at 09:3

count number of lines in terminal output

couldn't find this on SO. I ran the following command in the terminal: ``` >> grep -Rl "curl" ./ ``` and this displays the list of files where the keyword curl occurs. I want to count the number o...

17 Sep at 10:31

What is the difference between atomic / volatile / synchronized?

How do atomic / volatile / synchronized work internally? What is the difference between the following code blocks? Code 1 ``` private int counter; public int getNextUniqueIndex() { return coun...

Can we have functions inside functions in C++?

I mean something like: ``` int main() { void a() { // code } a(); return 0; } ```

19 Mar at 02:58