Questions

How to access host port from docker container

I have a docker container running jenkins. As part of the build process, I need to access a web server that is run locally on the host machine. Is there a way the host web server (which can be configu...

14 Mar at 09:52

Unresolved external symbol in object files

During coding in Visual Studio I got an unresolved external symbol error and I've got no idea what to do. I don't know what's wrong. Could you please decipher me? Where should I be looking for what ki...

How to get first and last day of previous month (with timestamp) in SQL Server

I could not find the solution which gives first and last day of previous month with timestamp. Here is the solution. ``` SELECT DATEADD(month, DATEDIFF(month, -1, getdate()) - 2, 0) as FirtDayPrevious...

29 Jan at 04:17

CreateElement with id?

I'm trying to modify this code to also give this div item an ID, however I have not found anything on google, and idName does not work. I read something about , however it seems pretty complicated for...

23 Feb at 23:21

What is the difference between int, Int16, Int32 and Int64?

What is the difference between `int`, `System.Int16`, `System.Int32` and `System.Int64` other than their sizes?

5 Oct at 15:17

How to change Status Bar text color in iOS

My application has a dark background, but in iOS 7 the status bar became transparent. So I can't see anything there, only the green battery indicator in the corner. How can I change the status bar tex...

21 Feb at 17:39

What is the C++ function to raise a number to a power?

How do I raise a number to a power? ``` 2^1 2^2 2^3 ``` etc...

10 May at 19:24

Delete empty lines using sed

I am trying to delete empty lines using sed: ``` sed '/^$/d' ``` but I have no luck with it. For example, I have these lines: ``` xxxxxx yyyyyy zzzzzz ``` and I want it to be like: ``` xxx...

10 Aug at 13:47

Is there a destructor for Java?

Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect? To make my question more specific, I am writing an applic...

How to remove files and directories quickly via terminal (bash shell)

From a terminal window: When I use the `rm` command it can only remove files. When I use the `rmdir` command it only removes empty folders. If I have a directory nested with files and folders within ...

8 Nov at 02:27

Refused to load the script because it violates the following Content Security Policy directive

When I tried to deploy my app onto devices with Android system above 5.0.0 ([Lollipop](https://en.wikipedia.org/wiki/Android_Lollipop)), I kept getting these kind of error messages: > 07-03 18:39:21.6...

Resize HTML5 canvas to fit window

How can I automatically scale the HTML5 `<canvas>` element to fit the page? For example, I can get a `<div>` to scale by setting the `height` and `width` properties to 100%, but a `<canvas>` won't sc...

21 Jul at 03:36

How to run TypeScript files from command line?

I'm having a surprisingly hard time finding an answer to this. With plain Node.JS, you can run any js file with `node path/to/file.js`, with CoffeeScript it's `coffee hello.coffee` and ES6 has `babel-...

5 Nov at 02:54

How to define hash tables in Bash?

What is the equivalent of [Python dictionaries](https://docs.python.org/2/tutorial/datastructures.html#dictionaries) but in Bash (should work across OS X and Linux).

How to place div side by side

I have a main wrapper div that is set 100% width. Inside that i would like to have two divs, one that is fixed width and the other that fills the rest of the space. How do i float the second div to fi...

14 Apr at 13:28

Turning a Comma Separated string into individual rows

I have a SQL Table like this: | SomeID | OtherID | Data | | ------ | ------- | ---- | | abcdef-..... | cdef123-... | 18,20,22 | | abcdef-..... | 4554a24-... | 17,19 | | 987654-..... | 12324a2-......

28 Feb at 09:48

AppSettings get value from .config file

I'm not able to access values in configuration file. ``` Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var clientsFilePath = config.AppSettings.Settin...

Difference between HashMap, LinkedHashMap and TreeMap

What is the difference between `HashMap`, `LinkedHashMap` and `TreeMap` in Java? I don't see any difference in the output as all the three has `keySet` and `values`. What are `Hashtable`s? ``` Map m...

30 Jun at 13:49

How to install Python MySQLdb module using pip?

How can I install the [MySQLdb](http://mysql-python.sourceforge.net/MySQLdb.html) module for Python using pip?

24 Apr at 19:30

npm can't find package.json

I'm trying to install the dependencies of some example: npm's `express 2.5.8` that I've downloaded, but all of the apps throw the same error: ``` c:\node\stylus>npm install -d npm info it worked if i...

21 Jun at 19:9

How can you speed up Eclipse?

For instance: Instead of using a plugin for [Mercurial](http://en.wikipedia.org/wiki/Mercurial), I configure [TortoiseHG](https://en.wikipedia.org/wiki/TortoiseHg) as an external tool.

28 Aug at 09:16

"No such file or directory" but it exists

I simply want to run an executable from the command line, `./arm-mingw32ce-g++`, but then I get the error message, ``` bash: ./arm-mingw32ce-g++: No such file or directory ``` I'm running Ubuntu Li...

16 Oct at 14:0

Retrieve last 100 lines logs

I need to retrieve last 100 lines of logs from the log file. I tried the sed command ``` sed -n -e '100,$p' logfilename ``` Please let me know how can I change this command to specifically retrieve...

6 Aug at 12:10

What is the difference between MVC and MVVM?

Is there a difference between the standard "Model View Controller" pattern and Microsoft's Model/View/ViewModel pattern?

How to get jQuery dropdown value onchange event

I have added two jQuery UI Dropdown Autocomplete script. Now I want get both value onchange of second dropdown and want to store separately in variable. How it is possible? Any ideas or suggestions? ...