Questions

How do you cast a List of supertypes to a List of subtypes?

For example, lets say you have two classes: ``` public class TestA {} public class TestB extends TestA{} ``` I have a method that returns a `List<TestA>` and I would like to cast all the objects in...

26 Sep at 02:17

How do I set a column value to NULL in SQL Server Management Studio?

How do I clear the value from a cell and make it NULL?

25 Mar at 13:50

How to perform string interpolation in TypeScript?

C# uses string interpolation ``` int value = 100; Console.WriteLine($"The size is {value}."); ``` Output: > The size is 100. How to do the same thing in TypeScript?

How do I fix the npm UNMET PEER DEPENDENCY warning?

I'm on Windows 10, with Node 5.6.0 and npm 3.6.0. I'm trying to install angular-material and mdi into my working folder. errors with: ``` +-- angular@1.5.0 +-- UNMET PEER DEPENDENCY angular-animate...

What does $ mean before a string?

I was going to use verbatim string but I mistakenly typed `$` instead of `@`. But the compiler didn't give me any error and compiled successfully. I want to know what it is and what it does. I searche...

10 Jul at 20:2

How do I enable NuGet Package Restore in Visual Studio?

There's a [similar post](https://stackoverflow.com/questions/15435366/vs2012-enable-nuget-package-restore-disappears-missing) on stack but it doesn't help with my issue possibly because I am using Vis...

How to use radio buttons in ReactJS?

I am new to ReactJS, sorry if this sounds off. I have a component that creates several table rows according to the received data. Each cell within the column has a radio checkbox. Hence the user can ...

8 Dec at 08:58

How do I read a large csv file with pandas?

I am trying to read a large csv file (aprox. 6 GB) in pandas and i am getting a memory error: ``` MemoryError Traceback (most recent call last) <ipython-input-58-67a7268...

10 Apr at 14:23

pandas three-way joining multiple dataframes on columns

I have 3 CSV files. Each has the first column as the (string) names of people, while all the other columns in each dataframe are attributes of that person. How can I "join" together all three CSV do...

10 Sep at 21:8

In Typescript, How to check if a string is Numeric

In Typescript, this shows an error saying isNaN accepts only numeric values ``` isNaN('9BX46B6A') ``` and this returns false because `parseFloat('9BX46B6A')` evaluates to `9` ``` isNaN(parseFloat(...

2 May at 21:47

Failed to build gem native extension (installing Compass)

When I attempt to install the latest version of compass ([https://rubygems.org/gems/compass/versions/1.0.0.alpha.17](https://rubygems.org/gems/compass/versions/1.0.0.alpha.17)), I get the following er...

20 Mar at 20:59

How to call Stored Procedure in Entity Framework 6 (Code-First)?

I am very new to Entity Framework 6 and I want to implement stored procedures in my project. I have a stored procedure as follows: ``` ALTER PROCEDURE [dbo].[insert_department] @Name [varchar](10...

How to compare dates in datetime fields in Postgresql?

I have been facing a strange scenario when comparing dates in postgresql(version 9.2.4 in windows). I have a column in my table say `update_date` with type `timestamp without timezone`. Client can se...

14 Mar at 18:58

How to call a method defined in an AngularJS directive?

I have a directive, here is the code : ``` .directive('map', function() { return { restrict: 'E', replace: true, template: '<div></div>', link: function($scope, e...

1 Apr at 16:11

How do I cancel a build that is in progress in Visual Studio?

Almost unconsciously I hit the keyboard build macro that builds my entire solution. This can happen just as I notice a code change. The build dominates my computer, and I basically have to wait till i...

6 Jul at 23:34

Is there a “not in” operator in JavaScript for checking object properties?

Is there any sort of "not in" operator in JavaScript to check if a property does not exist in an object? I couldn’t find anything about this around Google or Stack Overflow. Here’s a small snippet of ...

How to create a remote Git repository from a local one?

I have a local Git repository. I would like to make it available on a remote, ssh-enabled, server. How do I do this?

9 Jan at 08:36

How do I read the first line of a file using cat?

How do I read the first line of a file using `cat`?

27 Sep at 15:35

Can I change the name of `nohup.out`?

When I run `nohup some_command &`, the output goes to `nohup.out`; `man nohup` says to look at `info nohup` which in turn says: > If standard output is a terminal, the command's standard output is ...

25 Jul at 20:5

How do you 'redo' changes after 'undo' with Emacs?

[This article](http://www2.lib.uchicago.edu/keith/tcl-course/emacs-tutorial.html) says that "Emacs has redo because you can reverse direction while undoing, thereby undoing the undo". What does this ...

20 Feb at 01:56

Delete directory with files in it?

I wonder, what's the easiest way to delete a directory with all its files in it? I'm using `rmdir(PATH . '/' . $value);` to delete a folder, however, if there are files inside of it, I simply can't d...

21 Nov at 21:17

How can I convert JSON to CSV?

I have a JSON file I want to convert to a CSV file. How can I do this with Python? I tried: ``` import json import csv f = open('data.json') data = json.load(f) f.close() f = open('data.csv') csv_fi...

3 Mar at 23:8

How to fix Array indexOf() in JavaScript for Internet Explorer browsers

If you have worked with JavaScript at any length you are aware that Internet Explorer does not implement the ECMAScript function for Array.prototype.indexOf() [including Internet Explorer 8]. It is no...

What does "async: false" do in jQuery.ajax()?

Specifically, how does it differ from the default ( `async: true` ) ? In what circumstances would I want to explicit set `async` to `false`, and does it have something to do with preventing other ev...

24 Dec at 07:6

Environment variable substitution in sed

If I run these commands from a script: ``` #my.sh PWD=bla sed 's/xxx/'$PWD'/' ... $ ./my.sh xxx bla ``` it is fine. But, if I run: ``` #my.sh sed 's/xxx/'$PWD'/' ... $ ./my.sh $ sed: -e expressio...

5 May at 13:38