Groovy executing shell commands
Groovy adds the `execute` method to `String` to make executing shells fairly easy; ``` println "ls".execute().text ``` but if an error happens, then there is no resulting output. (other than cre...
- Modified
- 20 Jan at 20:48
How to install Android SDK on Ubuntu?
For my [Ubuntu](http://www.ubuntu.com/) machine, I downloaded the latest version of Android SDK from [this](http://developer.android.com/sdk/index.html#Requirements) page. After extracting the downloa...
- Modified
- 20 Jun at 09:12
Postgresql - change the size of a varchar column to lower length
I have a question about the `ALTER TABLE` command on a really large table (almost 30 millions rows). One of its columns is a `varchar(255)` and I would like to resize it to a `varchar(40)`. Basically,...
- Modified
- 2 Sep at 09:31
Test if a variable is a list or tuple
In python, what's the best way to test if a variable contains a list or a tuple? (ie. a collection) Is `isinstance()` as evil as suggested here? [http://www.canonical.org/~kragen/isinstance/](http://...
How to create a zip archive with PowerShell?
Is it possible to create a zip archive using PowerShell?
- Modified
- 9 Feb at 20:24
How can I close a browser window without receiving the "Do you want to close this window" prompt?
How can I close a browser window without receiving the prompt? The prompt occurs when I use the `window.close();` function.
- Modified
- 26 Aug at 15:45
base_url() function not working in codeigniter
In my web application using codeigniter. I am trying to use base_url() function but it shows empty results. I have also used autoload helper through autoload file, but then too it doesn't seem to work...
- Modified
- 10 Jan at 09:53
Delete files or folder recursively on Windows CMD
How do I delete files or folders recursively on Windows from the command line? I have found this solution where path we drive on the command line and run this command. I have given an example with a...
- Modified
- 18 Sep at 19:11
What is Vim recording and how can it be disabled?
I keep seeing the `recording` message at the bottom of my gVim 7.2 window. What is it and how do I turn it off?
- Modified
- 18 May at 01:37
What is a 'workspace' in Visual Studio Code?
For example, Visual Studio Code talks about [applying settings at the user level vs the workspace level](https://code.visualstudio.com/docs/getstarted/settings). On the one hand, - - The page referen...
- Modified
- 22 Oct at 20:10
What's the difference between REST & RESTful
What's the difference between a REST system and a system that is RESTful? From a few things I've [read](http://www.infoq.com/articles/subbu-allamaraju-rest) most so called REST services are actually ...
- Modified
- 19 Apr at 14:12
Enable 'xp_cmdshell' SQL Server
I want to execute `EXEC master..xp_cmdshell @bcpquery` But I am getting the following error: > SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this compo...
- Modified
- 28 Feb at 09:59
How do I make the return type of a method generic?
Is there a way to make this method generic so I can return a string, bool, int, or double? Right now, it's returning a string, but if it's able find "true" or "false" as the configuration value, I'd ...
- Modified
- 21 Mar at 15:44
Check if current date is between two dates Oracle SQL
I would like to select `1` if current date falls between 2 dates through Oracle SQL. I wrote an SQL after reading through other questions. [https://stackoverflow.com/questions/2369222/oracle-date-be...
Deserializing JSON data to C# using JSON.NET
I'm relatively new to working with C# and JSON data and am seeking guidance. I'm using C# 3.0, with .NET3.5SP1, and JSON.NET 3.5r6. I have a defined C# class that I need to populate from a JSON stru...
- Modified
- 1 Oct at 05:27
.war vs .ear file
What is the difference between a .war and .ear file?
- Modified
- 30 Jun at 17:19
Call Javascript function from URL/address bar
Is it possible to call a javascript function from the URL? I am basically trying to leverage JS methods in a page I don't have access to the source. Something like: `http://www.example.com/mypage.asp...
- Modified
- 20 Feb at 08:37
How do I hide javascript code in a webpage?
Is it possible to hide the Javascript code from the html of a webpage, when the source code is viewed through the browsers View Source feature? I know it is possible to obfuscate the code, but I wou...
- Modified
- 17 Jul at 22:8
curl : (1) Protocol https not supported or disabled in libcurl
I'm trying to install the Rails environments on Ubuntu 11.04. When I launch the command `rvm install 1.9.2 --with-openssl-dir=/usr/local` the following error is received: ``` curl : (1) Protocol http...
- Modified
- 25 Feb at 15:28
How to take screenshot of a div with JavaScript?
I am building something called the "HTML Quiz". It's completely ran on JavaScript and it's pretty cool. At the end, a results box pops up that says "Your Results:" and it shows how much time they too...
- Modified
- 13 Apr at 01:4
Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
I have my first node.js app (runs fine locally) - but I am unable to deploy it via heroku (first time w/ heroku as well). The code is below. SO doesn't let me write so much code, so I would just say t...
How to find and replace text in a file
My code so far ``` StreamReader reading = File.OpenText("test.txt"); string str; while ((str = reading.ReadLine())!=null) { if (str.Contains("some text")) { StreamWriter write =...
- Modified
- 7 Dec at 08:31
How can I "inverse match" with regex?
I'm processing a file, line-by-line, and I'd like to do an inverse match. For instance, I want to match lines where there is a string of six letters, but only if these six letters are not ''. How sho...
- Modified
- 1 Dec at 21:12
Scale image to fit a bounding box
Is there a css-only solution to scale an image into a bounding box (keeping aspect-ratio)? This works if the image is bigger than the container: ``` img { max-width: 100%; max-height: 100%; } ```...
- Modified
- 22 Jul at 00:37
How To Show And Hide Input Fields Based On Radio Button Selection
Here is the code to show input fields depending on radio selection like: # SCRIPT ``` <script type="text/javascript"> function yesnoCheck() { if (document.getElementById('yesCheck').checked) {...
- Modified
- 20 Jun at 09:12