Appending to list in Python dictionary
Is there a more elegant way to write this code? What I am doing: I have keys and dates. There can be a number of dates assigned to a key and so I am creating a dictionary of lists of dates to repres...
- Modified
- 5 Jun at 08:56
How to assign an exec result to a sql variable?
How do you assign the result of an exec call to a variable in SQL? I have a stored proc called `up_GetBusinessDay`, which returns a single date. Can you do something like this: ``` exec @Previous...
- Modified
- 7 May at 00:42
Which passwordchar shows a black dot (•) in a winforms textbox?
Short question here: In , how do I use the `PasswordChar` property of a `Textbox` to show a common as a ? Is there perhaps some font I can use that has this as a character? If I use '`UseSystemPass...
How to get current working directory in Java?
Let's say I have my main class in `C:\Users\Justian\Documents\`. How can I get my program to show that it's in `C:\Users\Justian\Documents`? Hard-Coding is not an option- it needs to be adaptable if ...
- Modified
- 18 Dec at 18:57
How to display svg icons(.svg files) in UI using React Component?
I have seen a lot of libraries for svg on react but none gave me how to import an svg file in the react component. I have seen code which talk about bring the svg code into react rather than using the...
How to get the request parameters in Symfony 2?
I am very new to symfony. In other languages like java and others I can use `request.getParameter('parmeter name')` to get the value. Is there anything similar that we can do with symfony2. I have se...
CSS hide scroll bar if not needed
I am trying to figure out how I can hide the `overflow-y:scroll;` if not needed. What I mean is that I am building a website and I have a main area which posts will be displayed and I want to hide the...
React native text going off my screen, refusing to wrap. What to do?
The following code can be found in [this live example](https://rnplay.org/apps/dN8pPA) I've got the following react native element: ``` 'use strict'; var React = require('react-native'); var { Ap...
- Modified
- 30 Mar at 12:49
Align <div> elements side by side
I know this is a rather simple question, but I can't figure it out for the life of me. I have two links which I've applied a background image to. Here's what it currently looks like (apologies for ...
What does the question mark and the colon (?: ternary operator) mean in objective-c?
What does this line of code mean? ``` label.frame = (inPseudoEditMode) ? kLabelIndentedRect : kLabelRect; ``` The `?` and `:` confuse me.
- Modified
- 7 Jan at 08:45
JSON.stringify output to div in pretty print way
I `JSON.stringify` a json object by ``` result = JSON.stringify(message, my_json, 2) ``` The `2` in the argument above is supposed to pretty print the result. It does this if I do something like `al...
- Modified
- 3 Aug at 14:44
How do you put an image file in a json object?
I am making a database for video games, each containing elements like name, genre, and and image of the game. Is it possible to put images into a json object for the db? If not is there a way around ...
- Modified
- 27 Dec at 22:17
How to get the IP address of the server on which my C# application is running on?
I am running a server, and I want to display my own IP address. What is the syntax for getting the computer's own (if possible, external) IP address? Someone wrote the following code. ``` IPHostEnt...
- Modified
- 28 Jul at 21:22
How to get element by innerText
How to get tag in html page, if I know what text tag contains. E.g.: ``` <a ...>SearchingText</a> ```
- Modified
- 28 Jun at 14:27
What exactly is nullptr?
We now have C++11 with many new features. An interesting and confusing one (at least for me) is the new `nullptr`. Well, no need anymore for the nasty macro `NULL`. ``` int* x = nullptr; myclass* ob...
What's the difference between window.location= and window.location.replace()?
Is there a difference between these two lines? ``` var url = "http://www.google.com/"; window.location = url; window.location.replace(url); ```
- Modified
- 26 Sep at 19:46
When do items in HTML5 local storage expire?
For how long is data stored in `localStorage` (as part of DOM Storage in HTML5) available? Can I set an expiration time for the data which I put into local storage?
- Modified
- 1 Jul at 15:41
Saving an Object (Data persistence)
I've created an object like this: ``` company1.name = 'banana' company1.value = 40 ``` I would like to save this object. How can I do that?
- Modified
- 31 Jul at 07:10
How do you increase the max number of concurrent connections in Apache?
What httpd conf settings do I need to change to increase the max number of concurrent connections for Apache? NOTE: I turned off KeepAlive since this is mainly an API server. ``` # # KeepAlive: Wheth...
- Modified
- 2 Aug at 16:2
Getting a list of values from a list of dicts
I have a list of dicts like this: ``` [{'value': 'apple', 'blah': 2}, {'value': 'banana', 'blah': 3} , {'value': 'cars', 'blah': 4}] ``` I want `['apple', 'banana', 'cars']` Whats the best way...
- Modified
- 5 Apr at 08:4
How can I convert JSON to a HashMap using Gson?
I'm requesting data from a server which returns data in the JSON format. Casting a HashMap into JSON when making the request wasn't hard at all but the other way seems to be a little tricky. The JSON ...
- Modified
- 10 May at 16:37
Find PHP version on windows command line
I just tried to know version of my PHP from windows command typing, `C:\> php -v` But it is not working. It says `php is not recognized as internal or external command`.
Split string in Lua?
I need to do a simple split of a string, but there doesn't seem to be a function for this, and the manual way I tested didn't seem to work. How would I do it?
What is the string concatenation operator in Oracle?
What is the string concatenation operator in Oracle SQL? Are there any "interesting" features I should be careful of? (This seems obvious, but I couldn't find a previous question asking it).
- Modified
- 29 Jun at 21:28
Simple pagination in javascript
I am trying to make pagination for my site. ([http://anuntorhei.md](http://anuntorhei.md)) : ``` var someVar = 50; function someStupidFunction() { if (objJson.length > 50) { ...
- Modified
- 21 Aug at 20:11