Install a Windows service using a Windows command prompt?
I want to install a Windows service using a Windows command prompt (not the Visual Studio command prompt). How do I do this?
- Modified
- 1 Feb at 15:23
How can I escape a double quote inside double quotes?
How can I escape double quotes inside a double string in Bash? For example, in my shell script ``` #!/bin/bash dbload="load data local infile \"'gfpoint.csv'\" into table $dbtable FIELDS TERMINATED...
How do I make a text input non-editable?
So I have a text input ``` <input type="text" value="3" class="field left"> ``` Here is my CSS for it ``` background:url("images/number-bg.png") no-repeat scroll 0 0 transparent; border:0 none; co...
- Modified
- 29 Apr at 16:39
How to get the current URL within a Django template?
I was wondering how to get the current URL within a template. Say my current URL is: ``` .../user/profile/ ``` How do I return this to the template?
- Modified
- 5 Apr at 19:13
Variable number of arguments in C++?
How can I write a function that accepts a variable number of arguments? Is this possible, how?
- Modified
- 2 Apr at 17:25
Set transparent background of an imageview on Android
I am using a web view in which I am adding an image view. How can I set the background of this image view to transparent? I have tried this: ``` mImageview.setBackgroundResource(R.color.trans); ``` ...
- Modified
- 28 Apr at 21:26
How can I add a class to a DOM element in JavaScript?
How do I add a class for the `div`? ``` var new_row = document.createElement('div'); ```
- Modified
- 15 Dec at 04:52
Java Ordered Map
Is there an object in Java that acts like a Map for storing and accessing key/value pairs, but can return an ordered list of keys and an ordered list of values, such that the key and value lists are i...
- Modified
- 7 Oct at 11:35
SQL Server - stop or break execution of a SQL script
Is there a way to immediately stop execution of a SQL script in SQL server, like a "break" or "exit" command? I have a script that does some validation and lookups before it starts doing inserts, and...
- Modified
- 2 Dec at 14:52
What is the worst gotcha in C# or .NET?
I was recently working with a `DateTime` object, and wrote something like this: ``` DateTime dt = DateTime.Now; dt.AddDays(1); return dt; // still today's date! WTF? ``` The intellisense documentat...
What is the difference between bool and Boolean types in C#
What is the difference between `bool` and `Boolean` types in C#?
Git - remote: Repository not found
I have SourceTree with local working copy. And all operations work good, I can simple fetch, push, pull and etc via SourceTree. I just needed to make force push which does not exist in SourceTree. I ...
- Modified
- 14 Jun at 13:31
What's the difference between returning value or Promise.resolve from then()
What is the difference between: ``` new Promise(function(res, rej) { res("aaa"); }) .then(function(result) { return "bbb"; // directly returning string }) .then(function(result) { ...
- Modified
- 12 Sep at 13:15
appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'
When attempting to use the latest appcompat-v7 support library in my project, I get the following error: ``` /Users/greg/dev/mobile/android_project/app/build/intermediates/exploded-aar/com.android.su...
- Modified
- 16 Dec at 18:7
Make xargs handle filenames that contain spaces
``` $ ls *mp3 | xargs mplayer Playing Lemon. File not found: 'Lemon' Playing Tree.mp3. File not found: 'Tree.mp3' Exiting... (End of file) ``` My command fails because the file "Lemon Tr...
Twitter Bootstrap Tabs: Go to Specific Tab on Page Reload or Hyperlink
I'm developing a web page in which I'm using Twitter's Bootstrap Framework and their [Bootstrap Tabs JS](http://twitter.github.com/bootstrap/javascript.html#tabs). It works great except for a few mino...
- Modified
- 13 Nov at 19:38
MySQL with Node.js
I've just started getting into Node.js. I come from a PHP background, so I'm fairly used to using MySQL for all my database needs. How can I use MySQL with Node.js?
Need a good hex editor for Linux
I need a good hex editor for Linux, and by good I mean: - - - - - What can you suggest?
- Modified
- 5 Oct at 07:10
Android: install .apk programmatically
I made this with help from [Android download binary file problems](https://stackoverflow.com/questions/576513/android-download-binary-file-problems) and [Install Application programmatically on Andr...
- Modified
- 24 Feb at 09:12
Force IE compatibility mode off using tags
I am doing work for a client who forces compatibility mode on all intranet sites. I was wondering if there is a tag I can put into my HTML that forces compatibility mode off.
- Modified
- 6 Mar at 16:52
PDOException “could not find driver”
I have just installed Debian Lenny with Apache, MySQL, and PHP and I am receiving a PDOException `could not find driver`. This is the specific line of code it is referring to: `$dbh = new PDO('mysql...
How do I assert my exception message with JUnit Test annotation?
I have written a few JUnit tests with `@Test` annotation. If my test method throws a checked exception and if I want to assert the message along with the exception, is there a way to do so with JUnit ...
- Modified
- 13 May at 07:25
Why do we need boxing and unboxing in C#?
Why do we need boxing and unboxing in C#? I know what boxing and unboxing is, but I can't comprehend the real use of it. Why and where should I use it? ``` short s = 25; object objshort = s; //Box...
Easy way to dismiss keyboard?
I have quite a few controls scattered throughout many table cells in my table, and I was wondering if there's an easier way to dismiss the keyboard without having to loop through all my controls and r...
- Modified
- 7 Aug at 13:48
How do I find the width & height of a terminal window?
As a simple example, I want to write a CLI script which can print `=` across the entire width of the terminal window. ``` #!/usr/bin/env php <?php echo str_repeat('=', ???); ``` or ``` #!/usr/bin/...
- Modified
- 7 Sep at 17:22