Questions

How to use executables from a package installed locally in node_modules?

How do I use a local version of a module in `node.js`. For example, in my app, I installed coffee-script: ``` npm install coffee-script ``` This installs it in `./node_modules` and the coffee comma...

25 Mar at 11:47

How do I catch a PHP fatal (`E_ERROR`) error?

I can use `set_error_handler()` to catch most PHP errors, but it doesn't work for fatal (`E_ERROR`) errors, such as calling a function that doesn't exist. Is there another way to catch these errors? ...

21 Apr at 01:22

How to easily initialize a list of Tuples?

I love [tuples](http://msdn.microsoft.com/en-us/library/system.tuple.aspx). They allow you to quickly group relevant information together without having to write a struct or class for it. This is very...

11 Feb at 08:38

MVVM: Tutorial from start to finish?

I'm a C#/Windows Forms programmer with more than 5 years experience. I've been investigating WPF using the MVVM (Model-View-ViewModel) design pattern. I have searched the Internet for tutorials. I hav...

27 Oct at 12:20

Html.DropdownListFor selected value not being set

How can I set the selected value of a Html.DropDownListFor? I've been having a look online and have seen that it can be achieved by using the fourth parameter so like the below: ``` @Html.DropDownLis...

24 Jun at 11:48

How to create an 2D ArrayList in java?

I want to create a 2D array that each cell is an `ArrayList`! I consider this defintions, but I can not add anything to them are these defintions true?! ``` ArrayList<ArrayList<String>> table = new ...

Validate that end date is greater than start date with jQuery

How do I check/validate in jQuery whether end date [textbox] is greater than start date [textbox]?

25 Aug at 11:58

anaconda/conda - install a specific package version

I want to install the 'rope' package in my current active environment using conda. Currently, the following 'rope' versions are available: ``` (data_downloader)user@user-ThinkPad ~/code/data_download...

16 Jul at 13:57

How to add new line into txt file

I'd like to add new line with text to my date.txt file, but instead of adding it into existing date.txt, app is creating new date.txt file.. ``` TextWriter tw = new StreamWriter("date.txt"); // writ...

10 Nov at 11:0

Angular 2 @ViewChild annotation returns undefined

I am trying to learn Angular 2. I would like to access to a child component from a parent component using the Annotation. Here some lines of code: In I have: ``` import { ViewChild, Component, Injec...

10 Aug at 06:1

How to Validate a DateTime in C#?

I doubt I am the only one who has come up with this solution, but if you have a better one please post it here. I simply want to leave this question here so I and others can search it later. I neede...

19 Dec at 12:38

Difference between a virtual function and a pure virtual function

What is the difference between a pure virtual function and a virtual function? I know "Pure Virtual Function is a Virtual function with no body", but what does this mean and what is actually done by...

31 Jan at 07:10

How can I capture the right-click event in JavaScript?

I want to block the standard context menus, and handle the right-click event manually. How is this done?

Background color not showing in print preview

I am trying to print a page. In that page I have given a table a background color. When I view the print preview in chrome its not taking on the background color property... So I tried this property:...

17 Jun at 21:12

How to show a custom error or warning message box in .NET Winforms?

How can I show message boxes with a "Ding!" sound and a red 'close' button in it? This is what I'm talking about: [](https://i.stack.imgur.com/FEweg.jpg) I'm trying to create some custom errors and wa...

9 Mar at 14:23

How to display length of filtered ng-repeat data

I have a data array which contains many objects (JSON format). The following can be assumed as the contents of this array: ``` var data = [ { "name": "Jim", "age" : 25 }, { "name":...

24 Feb at 22:8

What is the 'realtime' process priority setting for?

From what I've read in the past, you're encouraged not to change the priority of your Windows applications programmatically, and if you do, you should never change them to 'Realtime'. What does the 'R...

JavaScript/jQuery to download file via POST with JSON data

I have a jquery-based single-page webapp. It communicates with a RESTful web service via AJAX calls. I'm trying to accomplish the following: 1. Submit a POST that contains JSON data to a REST url....

12 May at 13:33

random.seed(): What does it do?

I am a bit confused on what `random.seed()` does in Python. For example, why does the below trials do what they do (consistently)? ``` >>> import random >>> random.seed(9001) >>> random.randint(1, 1...

18 Dec at 08:56

Javascript Equivalent to PHP Explode()

I have this string: > 0000000020C90037:TEMP:data I need this string: > TEMP:data. With PHP I would do this: ``` $str = '0000000020C90037:TEMP:data'; $arr = explode(':', $str); $var = $arr[1].':'....

4 Apr at 07:37

JavaScript: function returning an object

I'm taking some JavaScript/jQuery lessons at codecademy.com. Normally the lessons provide answers or hints, but for this one it doesn't give any help and I'm a little confused by the instructions. I...

16 Sep at 02:39

How to add many functions in ONE ng-click?

I've be looking for how to execute this but I can't find anything related so far, :( I could nest both functions yes but I'm just wondering if this is possible? I'd like to do this literally: ``` <t...

4 Aug at 06:13

Replace tabs with spaces in vim

I would like to convert tab to spaces in gVim. I added the following line to my `_vimrc`: ``` set tabstop=2 ``` It works to stop at two spaces but it still looks like one tab key is inserted (I tri...

23 May at 02:29

HTML5 Local storage vs. Session storage

Apart from being non persistent and scoped only to the current window, are there any benefits (performance, data access, etc) to Session Storage over Local Storage?

Resetting MySQL Root Password with XAMPP on Localhost

So for the past hour I've been trying to figure out how to reset my 'root' password for MySQL as I cannot log into PHPMyAdmin. I've tried changing the password in the config.inc.php file and searching...

4 Jul at 03:50