How to initialize private static members in C++?
What is the best way to initialize a private, static data member in C++? I tried this in my header file, but it gives me weird linker errors: ``` class foo { private: static int i; }; i...
- Modified
- 20 Mar at 21:27
how to insert datetime into the SQL Database table?
How can I insert datetime into the SQL Database table ? Is there a way to insert this query through the insert command in C# / .NET?
- Modified
- 24 Jul at 16:14
How do you import classes in JSP?
I am a complete JSP beginner. I am trying to use a `java.util.List` in a JSP page. What do I need to do to use classes other than ones in `java.lang`?
Equivalent of jQuery .hide() to set visibility: hidden
In jQuery, there are `.hide()` and `.show()` methods which sets the CSS `display: none` setting. Is there an equivalent function which would set the `visibility: hidden` setting? I know I can use ...
- Modified
- 28 Nov at 21:39
Click event doesn't work on dynamically generated elements
``` <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("button").click(function() { ...
How to remove a column from an existing table?
How to remove a column from an existing table? I have a table `MEN` with `Fname` and `Lname` I need to remove the `Lname` How to do it?
- Modified
- 9 Sep at 17:47
Best way to read a large file into a byte array in C#?
I have a web server which will read large binary files (several megabytes) into byte arrays. The server could be reading several files at the same time (different page requests), so I am looking for t...
- Modified
- 26 Jun at 19:8
Chrome ignores autocomplete="off"
I've created a web application which uses a tagbox drop down. This works great in all browsers except Chrome browser (Version 21.0.1180.89). Despite both the `input` fields AND the `form` field havin...
- Modified
- 3 Jan at 20:14
join list of lists in python
Is the a short syntax for joining a list of lists into a single list( or iterator) in python? For example I have a list as follows and I want to iterate over a,b and c. ``` x = [["a","b"], ["c"]] ...
- Modified
- 4 Apr at 04:0
Convert timestamp to date in MySQL query
I want to convert a `timestamp` in MySQL to a date. I would like to format the user.registration field into the text file as a `yyyy-mm-dd`. Here is my SQL: ``` $sql = requestSQL("SELECT user.email, ...
- Modified
- 20 Jun at 09:12
How can I detect if this dictionary key exists in C#?
I am working with the Exchange Web Services Managed API, with contact data. I have the following code, which is , but not ideal: ``` foreach (Contact c in contactList) { string openItemUrl = "htt...
- Modified
- 10 Jul at 21:24
How to use ADB Shell when Multiple Devices are connected? Fails with "error: more than one device and emulator"
``` $ adb --help ``` --- ``` -s SERIAL use device with given serial (overrides $ANDROID_SERIAL) ``` --- ``` $ adb devices List of devices attached emulator-5554 device 7f1c864e device `...
- Modified
- 5 Nov at 08:30
How do I spool to a CSV formatted file using SQLPLUS?
I want to extract some queries to a CSV output format. Unfortunately, I can't use any fancy SQL client or any language to do it. I must use SQLPLUS. How do I do it?
Oracle client ORA-12541: TNS:no listener
I am new on Oracle database, but I have one issue. On my Database server (server1) listener and database instance run correctly and I can use `sqlplus` to connect to this DB. When I connect to databa...
PowerShell: How do I convert an array object to a string in PowerShell?
How can I convert an array object to string? I tried: ``` $a = "This", "Is", "a", "cat" [system.String]::Join(" ", $a) ``` . What are different possibilities in PowerShell?
- Modified
- 4 Aug at 16:39
How do you round to 1 decimal place in Javascript?
Can you round a number in javascript to 1 character after the decimal point (properly rounded)? I tried the *10, round, /10 but it leaves two decimals at the end of the int.
- Modified
- 3 Aug at 08:0
How to use switch statement inside a React component?
I have a React component, and inside the `render` method of the component I have something like this: ``` render() { return ( <div> <div> // removed for brevit...
- Modified
- 5 Oct at 19:1
Can I catch multiple Java exceptions in the same catch clause?
In Java, I want to do something like this: ``` try { ... } catch (/* code to catch IllegalArgumentException, SecurityException, IllegalAccessException, and NoSuchFieldException ...
- Modified
- 1 Nov at 20:16
How to increase font size in a plot in R?
I am confused. What is the right way to increase font size of text in the title, labels and other places of a plot? For example ``` x <- rnorm(100) hist(x, xlim=range(x), xlab= "Variable Label", ...
React.createElement: type is invalid -- expected a string
Trying to get react-router (v4.0.0) and react-hot-loader (3.0.0-beta.6) to play nicely, but getting the following error in the browser console: ``` Warning: React.createElement: type is invalid -- exp...
- Modified
- 18 Jan at 08:0
How can I remove an element from a list?
I have a list and I want to remove a single element from it. How can I do this? I've tried looking up what I think the obvious names for this function would be in the reference manual and I haven't ...
Get table column names in MySQL?
Is there a way to grab the columns name of a table in MySQL using PHP?
How do I apply the for-each loop to every character in a String?
So I want to iterate for each character in a string. So I thought: ``` for (char c : "xyz") ``` but I get a compiler error: ``` MyClass.java:20: foreach not applicable to expression type ``` Ho...
How do I tar a directory of files and folders without including the directory itself?
I typically do: ``` tar -czvf my_directory.tar.gz my_directory ``` What if I just want to include everything (including any hidden system files) in my_directory, but not the directory itself? I don...
How can I create an object based on an interface file definition in TypeScript?
I have defined an interface like this: ``` interface IModal { content: string; form: string; href: string; $form: JQuery; $message: JQuery; $modal: JQuery; $submits: JQuer...
- Modified
- 25 Apr at 15:21