Questions

How to print all session variables currently set?

Without having to call each session variable by name, is there a way to display the content of all the session variables currently set?

11 Jan at 19:17

location.host vs location.hostname and cross-browser compatibility?

Which one of these is the most effective vs checking if the user agent is accessing via the correct domain. We would like to show a small js based 'top bar' style warning if they are accessing the do...

18 Oct at 16:28

Spring MVC How take the parameter value of a GET HTTP Request in my controller method?

In this period I am studing the Spring MVC showcase example (downloadable from STS dasboard) and I have some simple question about the `Request Mapping` examples: 1) In my `home.jsp` page I have this...

16 Jan at 16:31

Format y axis as percent

I have an existing plot that was created with pandas like this: ``` df['myvar'].plot(kind='bar') ``` The y axis is format as float and I want to change the y axis to percentages. All of the soluti...

23 May at 10:31

How can I run Android emulator for Intel x86 Atom without hardware acceleration on Windows 8 for API 21 and 19?

I have not enabled Hyper V or hardware acceleration and don't want to either. Is there any way that I can start android emulator for Intel x86 Atom Without hardware acceleration on Windows 8 I have...

C# MessageBox dialog result

I want to make a MessageBox confirmation. Here is the message box: ``` MessageBox.Show("Do you want to save changes?", "Confirmation", messageBoxButtons.YesNoCancel); ``` And I want to make somethi...

19 May at 14:13

How to pass a vector to a function?

I'm trying to send a vector as an argument to a function and i can't figure out how to make it work. Tried a bunch of different ways but they all give different error messages. I only include part of ...

28 Jul at 15:49

Hash and salt passwords in C#

I was just going through one of DavidHayden's articles on [Hashing User Passwords](http://web.archive.org/web/20120413180026/http://davidhayden.com/blog/dave/archive/2004/02/16/157.aspx). Really I ca...

24 Jul at 21:37

How do you simulate Mouse Click in C#?

How do you simulate Mouse clicks in C# winforms applications?

7 Jan at 09:47

Descending order by date filter in AngularJs

``` <div class="recent" ng-repeat="reader in (filteredItems = (book.reader | orderBy: 'created_at' | limitTo: 1))"> </div> ``` So the book comes from rest api and it has many readers attached. I...

28 Apr at 09:12

The entity type <type> is not part of the model for the current context

I am getting into the Entity Framework, but I am unsure if I am missing a critical point in the code-first approach. I am using a generic repository pattern based on the code from [https://genericuni...

angular js unknown provider

I'm trying to "customize" the mongolab example to fit my own REST API. Now I'm running into this error and I am not sure what I am doing wrong: ``` Error: Unknown provider: ProductProvider <- Product...

28 Aug at 08:32

Could pandas use column as index?

I have a spreadsheet like this: ``` Locality 2005 2006 2007 2008 2009 ABBOTSFORD 427000 448000 602500 600000 638500 ABERFELDIE 534000 600000 735000 710000 775000 AIREYS INLE...

18 Jul at 06:4

How to convert a column number (e.g. 127) into an Excel column (e.g. AA)

How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel. Excel 2007 has a possible range of 1 to 16384, which is the number ...

2 Mar at 08:31

android TextView: setting the background color dynamically doesn't work

Setting the background color programatically of an android `TextView` doesn't seem to work. I'm I missing something! ``` TextView et = new TextView(activity); et.setText("350"); et.setBackgroundColor...

3 Jan at 11:55

How do I get and set Environment variables in C#?

How can I get Environnment variables and if something is missing, set the value?

CreateProcess error=2, The system cannot find the file specified

I am writing a program in java which would execute winrar and unzip a jar file for me placed in `h:\myjar.jar` into the folder `h:\new`. My java code goes something like this ``` import java.io.File;...

23 Aug at 11:3

Using OpenSSL what does "unable to write 'random state'" mean?

I'm generating a self-signed SSL certificate to protect my server's admin section, and I keep getting this message from OpenSSL: > unable to write 'random state' What does this mean? This is on an ...

16 Feb at 17:59

Use dynamic (variable) string as regex pattern in JavaScript

I want to to values with regex, the pattern works fine with PHP but I have troubles implementing it into JavaScript. The pattern is (`value` is the variable): ``` /(?!(?:[^<]+>|[^>]+<\/a>))\b(value...

29 Aug at 12:52

What is mapDispatchToProps?

I was reading the documentation for the Redux library and it has this example: > In addition to reading the state, container components can dispatch actions. In a similar fashion, you can define a fun...

How do I iterate and modify Java Sets?

Let's say I have a Set of Integers, and I want to increment every Integer in the Set. How would I do this? Am I allowed to add and remove elements from the set while iterating it? Would I need to c...

12 Sep at 20:16

Error:(23, 17) Failed to resolve: junit:junit:4.12

Why is it that every time I create a new project in Android Studio, it always comes up with: > Error:(23, 17) Failed to resolve: junit:junit:4.12? When I remove `testCompile 'junit:junit:4.12'` in d...

31 Aug at 09:9

How to fix this strange error: "RuntimeError: CUDA error: out of memory"

I successfully trained the network but got this error during validation: > RuntimeError: CUDA error: out of memory

29 Mar at 06:34

Unrecognized escape sequence for path string containing backslashes

The following code generates a compiler error about an "unrecognized escape sequence" for each backslash: ``` string foo = "D:\Projects\Some\Kind\Of\Pathproblem\wuhoo.xml"; ``` I guess I need to es...

9 Aug at 07:51

Writing binary number system in C code

As we use `0x` prefix for hexadecimal numbers, and `0` for octal ones, is there anything that can be done for binary numbers? I tried the `b` suffix, but the [GCC](http://en.wikipedia.org/wiki/GNU_Co...

2 Jul at 19:33