Where does Console.WriteLine go in ASP.NET?
In a J2EE application (like one running in WebSphere), when I use `System.out.println()`, my text goes to standard out, which is mapped to a file by the WebSphere admin console. In an ASP.NET applica...
- Modified
- 14 Apr at 12:59
How to get first element in a list of tuples?
I have a list like below where the first element is the id and the other is a string: ``` [(1, u'abc'), (2, u'def')] ``` I want to create a list of ids only from this list of tuples as below: ``` ...
'uint32_t' identifier not found error
I'm porting code from Linux C to Visual C++ for windows. Visual C++ doesn't know `#include <stdint.h>` so I commented it out. Later, I found a lot of those `'uint32_t': identifier not found` errors....
- Modified
- 2 Aug at 20:15
Python datetime - setting fixed hour and minute after using strptime to get day,month,year
I've successfully converted something of `26 Sep 2012` format to `26-09-2012` using: ``` datetime.strptime(request.POST['sample_date'],'%d %b %Y') ``` However, I don't know how to set the hour and mi...
- Modified
- 26 Oct at 15:54
Get value of c# dynamic property via string
I'd like to access the value of a `dynamic` c# property with a string: `dynamic d = new { value1 = "some", value2 = "random", value3 = "value" };` How can I get the value of d.value2 ("random") if I...
Get Base64 encode file-data from Input Form
I've got a basic HTML form from which I can grab a bit of information that I'm examining in Firebug. My only issues is that I'm trying to encode the file data before it's sent to the server where it'...
- Modified
- 16 Feb at 18:33
What does npm install --legacy-peer-deps do exactly? When is it recommended / What's a potential use case?
Just ran into this error: ``` npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: nexttwin@0.1.0 npm ERR! Found: react@17.0.1 npm ERR! node_m...
- Modified
- 17 Feb at 10:3
Background images: how to fill whole div if image is small and vice versa
I have three problems: 1. When I tried to use a background image in a smaller size div, the div shows only part of image. How can I show the full or a specific part of image? 2. I have a smaller ima...
- Modified
- 21 Mar at 05:19
Call Python function from JavaScript code
I'd like to call a Python function from JavaScript code, because there isn't an alternative in JavaScript for doing what I want. Is this possible? Could you adjust the below snippet to work? JavaScri...
- Modified
- 31 May at 02:52
Extract a substring according to a pattern
Suppose I have a list of string: ``` string = c("G1:E001", "G2:E002", "G3:E003") ``` Now I hope to get a vector of string that contains only the parts after the colon ":", i.e `substring = c(E001,E...
How to solve "The directory is not empty" error when running rmdir command in a batch script?
I am making a batch script and part of the script is trying to remove a directory and all of its sub-directories. I am getting an intermittent error about a sub-directory not being empty. I read one a...
- Modified
- 26 Sep at 00:54
Package php5 have no installation candidate (Ubuntu 16.04)
When i try to install php5 in Ubuntu 16.04 by using following code: ``` sudo apt-get install php5 php5-mcrypt ``` I get following error: ``` Reading package lists... Done Building dependency tree ...
- Modified
- 12 Jul at 19:7
How to implement a Map with multiple keys?
I need a data structure which behaves like a Map, but uses multiple (differently-typed) keys to access its values. Something like: ``` MyMap<K1,K2,V> ... ``` With methods like: ``` getByKey1(...
- Modified
- 11 Apr at 15:48
How to undo local changes to a specific file
I'm trying to undo local changes to a specific file. Nothing has been committed. When I want to revert all changes, I can perform `git revert --reset HEAD`. However, in this case, I don't want to rev...
- Modified
- 23 May at 12:26
tsconfig.json: Build:No inputs were found in config file
I have an ASP.NET core project and I'm getting this error when I try to build it: ``` error TS18003: Build:No inputs were found in config file 'Z:/Projects/client/ZV/src/ZV/Scripts/tsconfig.json'. Sp...
- Modified
- 10 Apr at 22:33
Create an instance of a class from a string
Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string.
- Modified
- 11 Dec at 04:28
Subtract 1 day with PHP
I'm trying to take a date object that's coming out of my Drupal CMS, subtract one day and print out both dates. Here's what I have ``` $date_raw = $messagenode->field_message_date[0]['value']; prin...
- Modified
- 4 Oct at 16:45
Get specific line from text file using just shell script
I am trying to get a specific line from a text file. So far, online I have only seen stuff like sed, (I can only use the sh -not bash or sed or anything like that). I need to do this only using a bas...
upstream sent too big header while reading response header from upstream
I am getting these kind of errors: > 2014/05/24 11:49:06 [error] 8376#0: *54031 upstream sent too big header while reading response header from upstream, client: 107.21.193.210, server: aamjanata.com...
- Modified
- 18 Nov at 08:42
UIView with rounded corners and drop shadow?
I’ve been working on an application for a couple of years and received a simple design request: Round the corners on a UIView and add a drop shadow.To do as given below. I want a custom `UIView`... : ...
- Modified
- 10 Sep at 16:11
The given key was not present in the dictionary. Which key?
Is there a way to get the value of the given key in the following exception in C# in a way that affects all generic classes? I think this is a big miss in the exception description from Microsoft. ``...
- Modified
- 13 Jan at 14:40
What's the difference between text/xml vs application/xml for webservice response
This is more of a general question about the difference between `text/xml` and `application/xml`. I am fairly new to writing webservices (REST - Jersey). I have been producing `application/xml` since ...
Prevent form redirect OR refresh on submit?
I've searched through a bunch of pages, but can't find my problem, so I had to make a post. I have a form that has a submit button, and when submitted I want it to NOT refresh OR redirect. I just wan...
- Modified
- 10 Mar at 07:53
Angular pass callback function to child component as @Input similar to AngularJS way
AngularJS has the & parameters where you could pass a callback to a directive (e.g [AngularJS way of callbacks](https://stackoverflow.com/questions/31440366/pass-callback-function-to-directive). Is it...
- Modified
- 19 Jul at 10:31
Exception in thread "main" java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)
> [unsupported major .minor version 51.0](https://stackoverflow.com/questions/10382929/unsupported-major-minor-version-51-0) I installed JDK7, a simple hello word program gets compile but when...
- Modified
- 23 May at 12:26