How to run a JAR file
I created a JAR file like this: ``` jar cf Predit.jar *.* ``` I ran this JAR file by double clicking on it (it didn't work). So I ran it from the DOS prompt like this: ``` java -jar Predit.jar ```...
How do I use spaces in the Command Prompt?
How can I use spaces in the Windows Command Line? ``` cmd /C C:\Program Files (x86)\WinRar\Rar.exe a D:\Hello 2\File.rar D:\Hello 2\*.* ```
How to update record using Entity Framework 6?
I am trying to update a record using EF6. First finding the record, if it exists, update. Here is my code: ``` var book = new Model.Book { BookNumber = _book.BookNumber, BookName = _book.Book...
- Modified
- 16 Mar at 08:34
Check if a variable is of function type
Suppose I have any variable, which is defined as follows: ``` var a = function() {/* Statements */}; ``` I want a function which checks if the type of the variable is function-like. i.e. : ``` fun...
- Modified
- 30 Jan at 21:4
What's is the difference between include and extend in use case diagram?
What is the difference between `include` and `extend` in a [use case diagram](http://en.wikipedia.org/wiki/Use_case_diagram)?
- Modified
- 8 Jun at 17:45
How to repeatedly execute a function every x seconds?
I want to repeatedly execute a function in Python every 60 seconds forever (just like an [NSTimer](http://web.archive.org/web/20090823012700/http://developer.apple.com:80/DOCUMENTATION/Cocoa/Reference...
IOException: The process cannot access the file 'file path' because it is being used by another process
I have some code and when it executes, it throws a `IOException`, saying that > The process cannot access the file 'filename' because it is being used by another process What does this mean, and...
- Modified
- 29 Mar at 01:23
Evaluate empty or null JSTL c tags
How can I validate if a `String` is null or empty using the `c` tags of `JSTL`? I have a variable of name `var1` and I can display it, but I want to add a comparator to validate it. ``` <c:out value...
Query comparing dates in SQL
I have a table with dates that all happened in the month November. I wrote this query ``` select id,numbers_from,created_date,amount_numbers,SMS_text from Test_Table where created_date <= '2013-0...
- Modified
- 12 Nov at 08:42
String representation of an Enum
I have the following enumeration: ``` public enum AuthenticationMethod { FORMS = 1, WINDOWSAUTHENTICATION = 2, SINGLESIGNON = 3 } ``` The problem however is that I need the word "FORMS"...
Formatting Decimal places in R
I have a number, for example 1.128347132904321674821 that I would like to show as only two decimal places when output to screen (or written to a file). How does one do that? ``` x <- 1.1283471329043...
- Modified
- 17 Sep at 19:23
JavaScript math, round to two decimal places
I have the following JavaScript syntax: ``` var discount = Math.round(100 - (price / listprice) * 100); ``` This rounds up to the whole number. How can I return the result with two decimal places? ...
- Modified
- 1 Nov at 03:28
How can I convert JSON to CSV?
I have a JSON file I want to convert to a CSV file. How can I do this with Python? I tried: ``` import json import csv f = open('data.json') data = json.load(f) f.close() f = open('data.csv') csv_fi...
- Modified
- 3 Mar at 23:8
How to show Page Loading div until the page has finished loading?
I have a section on our website that loads quite slowly as it's doing some intensive calls. Any idea how I can get a `div` to say something similar to "loading" to show while the page prepares itself ...
- Modified
- 22 Jun at 09:25
How to add images in select list?
I have a select list of genders. Code: ``` <select> <option>male</option> <option>female</option> <option>others</option> </select> ``` I want to use an image in drop down list as drop-down-icon.j...
Declare and Initialize String Array in VBA
This should work according to another stack overflow post but its not: ``` Dim arrWsNames As String() = {"Value1", "Value2"} ``` Can anyone let me know what is wrong?
- Modified
- 14 Oct at 20:54
How do I load an HTML page in a div using JavaScript?
I want home.html to load in `<div id="content">`. ``` <div id="topBar"> <a href ="#" onclick="load_home()"> HOME </a> </div> <div id ="content"> </div> <script> function load_home(){ ...
- Modified
- 6 Dec at 22:19
How do you change the datatype of a column in SQL Server?
I am trying to change a column from a `varchar(50)` to a `nvarchar(200)`. What is the SQL command to alter this table?
- Modified
- 21 Oct at 00:19
How to clear the console?
Can any body please tell me what code is used for clear screen in Java? For example, in C++: ``` system("CLS"); ``` What code is used in Java to clear the screen?
Cast from VARCHAR to INT - MySQL
My Current Data for ``` SELECT PROD_CODE FROM `PRODUCT` ``` is ``` PROD_CODE 2 5 7 8 22 10 9 11 ``` I have tried all the four queries and none work. ([Ref](http://dev.mysql.com/doc/refman/5.5/en...
jQuery: count number of rows in a table
How do I count the number of tr elements within a table using jQuery? I know there is a [similar question](https://stackoverflow.com/questions/613024/count-number-of-table-rows-between-two-specific-r...
indexOf method in an object array?
How can I simply and directly find the index within an array of objects meeting some condition? For example, given this input: ``` var hello = { hello: 'world', foo: 'bar' }; var qaz = { h...
- Modified
- 12 Jan at 21:24
What are bitwise shift (bit-shift) operators and how do they work?
I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators)... At a core level, what does bit-shifting (`<<`, `>>`, `>>>...
- Modified
- 29 Aug at 12:33
How to cast an Object to an int
How can I cast an Object to an int in java?
Get class list for element with jQuery
Is there a way in jQuery to loop through or assign to an array all of the classes that are assigned to an element? ex. ``` <div class="Lorem ipsum dolor_spec sit amet">Hello World!</div> ``` I wil...
- Modified
- 17 Dec at 23:11