Questions

Change default global installation directory for node.js modules in Windows?

In my windows installation `PATH` includes `C:\Program Files\nodejs`, where executable `node.exe` is. I'm able to launch `node` from the shell, as well as `npm`. I'd like new executables to be install...

9 Nov at 09:49

Multi-line strings in PHP

Consider: ``` $xml = "l"; $xml = "vv"; echo $xml; ``` This will echo . Why and how can I do multi-line strings for things like [SimpleXML](https://en.wikipedia.org/wiki/SimpleXML), etc.?

13 Feb at 17:27

Get a worksheet name using Excel VBA

I would like to create an `user-defined` function in `Excel` that can return the current worksheet. I could use the ``` sheetname = ActiveSheet.Name ``` But the problem with this is, it works and...

9 Jul at 18:41

Getting ssh to execute a command in the background on target machine

This is a follow-on question to the [How do you use ssh in a shell script?](https://stackoverflow.com/questions/29061/how-do-you-use-ssh-in-a-shell-script) question. If I want to execute a command on...

26 Aug at 21:57

Get a CSS value with JavaScript

I know I can a CSS value through JavaScript such as: ``` document.getElementById('image_1').style.top = '100px'; ``` But, can I a current specific style value? I've read where I can get the entir...

7 Jan at 22:40

Cannot find or open the PDB file in Visual Studio C++ 2010

I use Visual Studio 2010 C++ and my project builds without errors but when I run it I get this. I am on Windows XP. ``` 'Shaders.exe': Loaded 'C:\Documents and Settings\User\My Documents\Visual Studi...

31 May at 19:5

Why doesn't a string in parentheses make a tuple with just that string?

I have a problem with Python threading and sending a string in the arguments. ``` def processLine(line) : print "hello"; return; ``` . ``` dRecieved = connFile.readline(); processThread = thr...

27 Feb at 05:58

Set and Get Methods in java?

How can I use the set and get methods, and why should I use them? Are they really helpful? And also can you give me examples of set and get methods?

How to make CSS width to fill parent?

I am sure this problem has been asked before but I cannot seem to find the answer. I have the following markup: ``` <div id="foo"> <div id="bar"> here be dragons </div> </div> ``` ...

10 Nov at 11:28

How to read the value of a private field from a different class in Java?

I have a poorly designed class in a 3rd-party `JAR` and I need to access one of its fields. For example, why should I need to choose private field is it necessary? ``` class IWasDesignedPoorly { ...

23 Jan at 13:51

How can I fill a div with an image while keeping it proportional?

I found this thread — [How do you stretch an image to fill a <div> while keeping the image's aspect-ratio?](https://stackoverflow.com/questions/1891857/how-do-you-stretch-an-image-to-fill-a-div-while-...

11 Jul at 17:57

Why do we use volatile keyword?

> [Why does volatile exist?](https://stackoverflow.com/questions/72552/) I have never used it but I wonder why people use it? What does it exactly do? I searched the forum, I found it only C# or Jav...

14 Jan at 12:41

How to use DbContext.Database.SqlQuery<TElement>(sql, params) with stored procedure? EF Code First CTP5

I have a stored procedure that has three parameters and I've been trying to use the following to return the results: ``` context.Database.SqlQuery<myEntityType>("mySpName", param1, param2, param3); `...

Xcode - ld: library not found for -lPods

I get these errors when I try to build an iOS application. ``` ld: library not found for -lPods clang: error: linker command failed with exit code 1 (use -v to see invocation) Ld /Users/Markus/Libra...

6 Jun at 11:17

How to trim a string in SQL Server before 2017?

In SQL Server 2017, you can use this syntax, but not in earlier versions: ``` SELECT Name = TRIM(Name) FROM dbo.Customer; ```

19 Feb at 09:41

key_load_public: invalid format

I used PuTTY Key Generator to generate a 4096 bit RSA-2 key with a passphrase. I save the .ppk and an openSSL format public key. The putty format public key doesn't work. In any case, my error is as...

17 Mar at 17:37

Difference between BYTE and CHAR in column datatypes

In Oracle, what is the difference between : ``` CREATE TABLE CLIENT ( NAME VARCHAR2(11 BYTE), ID_CLIENT NUMBER ) ``` and ``` CREATE TABLE CLIENT ( NAME VARCHAR2(11 CHAR), -- or even VARCHAR2(11...

20 Jan at 11:41

Differences between Lodash and Underscore.js

Why would someone prefer either the [Lodash](http://lodash.com/) or [Underscore.js](http://underscorejs.org/) utility library over the other? Lodash seems to be a drop-in replacement for underscore, t...

14 Oct at 19:8

Is there a MessageBox equivalent in WPF?

Is there a standard message box in WPF, like WinForms' [System.Windows.Forms.MessageBox.Show()](https://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.aspx), or should I use the WinF...

12 May at 13:37

Evaluate a string with a switch in C++

I want to evaluate a string with a switch but when I read the string entered by the user throws me the following error. ``` #include<iostream> using namespace std; int main() { string a;...

5 May at 19:56

Sending email with gmail smtp with codeigniter email library

``` <?php class Email extends Controller { function Email() { parent::Controller(); $this->load->library('email'); } function index() { $config['protoc...

15 Mar at 04:28

How to register multiple implementations of the same interface in Asp.Net Core?

I have services that are derived from the same interface. ``` public interface IService { } public class ServiceA : IService { } public class ServiceB : IService { } public class ServiceC : IService...

Setting size for icon in CSS

I'm working on JSF, and I'm using this code to display an error box. ``` <div class="pnx-msg pnx-msg-warning clearfix"> <i class="pnx-msg-icon pnx-icon-msg-warning"/> </div> ``` The `<i class....

23 Jan at 15:13

Populating a razor dropdownlist from a List<object> in MVC

I have a model: ``` public class DbUserRole { public int UserRoleId { get; set; } public string UserRole { get; set; } } public class DbUserRoles { public List<Db...

Configuring Git over SSH to login once

I have cloned my git repository over ssh. So, each time I communicate with the origin master by pushing or pulling, I have to reenter my password. How can I configure git so that I do not need to ente...

29 Jan at 15:36