Is background-color:none valid CSS?
Can anyone tell me if the following CSS is valid? ``` .class { background-color:none; } ```
- Modified
- 20 Apr at 18:8
What is %2C in a URL?
In a URL, what does the `%2C` encoding mean and what are its uses?
How to exclude file only from root folder in Git
I am aware of using `.gitignore` file to exclude some files being added, but I have several `config.php` files in source tree and I need to exclude only one, located in the root while other keep under...
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 { ...
- Modified
- 23 Jan at 13:51
Should a RESTful 'PUT' operation return something....
I was wondering what people's opinions are of a RESTful `PUT` operation that returns nothing (null) in the response body.
Which version of Python do I have installed?
I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter? I was thinking of updating to the latest version of Python.
- Modified
- 24 Nov at 16:58
MySQL DROP all tables, ignoring foreign keys
Is there a nice easy way to drop all tables from a MySQL database, ignoring any foreign key constraints that may be in there?
- Modified
- 27 Oct at 11:20
How to send emails from my Android application?
I am developing an application in Android. I don't know how to send an email from the application?
Why does C# forbid generic attribute types?
This causes a compile-time exception: ``` public sealed class ValidatesAttribute<T> : Attribute { } [Validates<string>] public static class StringValidation { } ``` I realize C# does not support...
- Modified
- 31 Jan at 15:31
On design patterns: When should I use the singleton?
The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design. Give me scenarios, other than the good old logger where it makes sense to use the singleton. ...
- Modified
- 25 Feb at 14:5
PHP mail function doesn't complete sending of e-mail
``` <?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $from = 'From: yoursite.com'; $to = 'contact@yoursite.com'; $subject = 'Customer Inqui...
What is the difference between Bootstrap .container and .container-fluid classes?
Just downloaded 3.1 and found in the docs... > Turn any fixed-width grid layout into a full-width layout by changing your outermost `.container` to `.container-fluid`. Looking in `bootstrap.css`, it a...
- Modified
- 29 Dec at 00:28
How do you attach and detach from Docker's process?
I can attach to a docker process but + doesn't work to detach from it. `exit` basically halts the process. What's the recommended workflow to have the process running, occasionally attaching to it to ...
- Modified
- 1 Feb at 07:24
How to find all occurrences of a substring?
Python has `string.find()` and `string.rfind()` to get the index of a substring in a string. I'm wondering whether there is something like `string.find_all()` which can return all found indexes (not o...
How do I rename the extension for a bunch of files?
In a directory, I have a bunch of `*.html` files. I'd like to rename them all to `*.txt` How can I do that? I use the bash shell.
- Modified
- 15 May at 07:6
List<T> or IList<T>
Can anyone explain to me why I would want to use IList over List in C#? [Why is it considered bad to expose List<T>](https://stackoverflow.com/questions/387937)
How to check the exit status using an 'if' statement
What would be the best way to check the in an `if` statement in order to echo a specific output? I'm thinking of it being: ``` if [ $? -eq 1 ] then echo "blah blah blah" fi ``` The issue I am a...
- Modified
- 1 May at 02:4
Click button copy to clipboard
How do I copy the text inside a div to the clipboard? I have a div and need to add a link which will add the text to the clipboard. Is there a solution for this? ``` <p class="content">Lorem Ipsum i...
Freeze screen in chrome debugger / DevTools panel for popover inspection?
I'm using the chrome inspector to try and analyze the `z-index` of a twitter bootstrap popover, and finding it extremely frustrating... Is there a way to freeze the popover (while shown) so that I c...
- Modified
- 26 Mar at 04:25
No module named pkg_resources
I'm deploying a Django app to a dev server and am hitting this error when I run `pip install -r requirements.txt`: ``` Traceback (most recent call last): File "/var/www/mydir/virtualenvs/dev/bin/pi...
- Modified
- 20 Mar at 22:16
How can I deserialize JSON with C#?
I have the following code: ``` var user = (Dictionary<string, object>)serializer.DeserializeObject(responsecontent); ``` The input in `responsecontent` is JSON, but it is not properly deserialized in...
- Modified
- 15 Jun at 15:26
Incrementing a date in JavaScript
I need to increment a date value by one day in JavaScript. For example, I have a date value 2010-09-11 and I need to store the date of the next day in a JavaScript variable. How can I increment a da...
- Modified
- 10 Sep at 19:26
Check whether a String is not Null and not Empty
How can I check whether a string is not `null` and not empty? ``` public void doStuff(String str) { if (str != null && str != "**here I want to check the 'str' is empty or not**") { /*...
- Modified
- 2 Dec at 12:21
How do I close a single buffer (out of many) in Vim?
I open several files in Vim by, for example, running ``` vim a/*.php ``` which opens 23 files. I then make my edit and run the following twice ``` :q ``` which closes all my buffers.