Questions

HTML - Display image after selecting filename

I have a form that allows me with ``` <input type="file" name="filename" accept="image/gif, image/jpeg, image/png"> ``` to browse and select a file. What I want to do is display that image immedi...

23 May at 12:2

Tablix: Repeat header rows on each page not working - Report Builder 3.0

I have a tablix with lots of rows that span over multiple pages. I have set the Tablix property Repeat header rows on each page but this does not work. I read somewhere that this is a known bug in Rep...

What's the advantage of a Java enum versus a class with public static final fields?

I am very familiar with C# but starting to work more in Java. I expected to learn that enums in Java were basically equivalent to those in C# but apparently this is not the case. Initially I was excit...

23 May at 12:2

Android: Share plain text using intent (to all messaging apps)

I'm trying to share some text using an intent: ``` Intent i = new Intent(android.content.Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(android.content.Intent.EXTRA_TEXT, "TEXT"); ``` a...

18 Aug at 08:44

How do I use grep to search the current directory for all files having the a string "hello" yet display only .h and .cc files?

How do I use grep to search the current directory for any and all files containing the string "hello" and display only .h and .cc files?

9 Feb at 19:10

Freeze the top row for an html table only (Fixed Table Header Scrolling)

I want to make an html table with the top row frozen (so when you scroll down vertically you can always see it). Is there a clever way to make this happen without javascript? Note that I do NOT nee...

11 Nov at 16:18

GROUP_CONCAT comma separator - MySQL

I have a query where I am using `GROUP_CONCAT` and a custom separator as my results may contain commas: '----' This all works well, however it is still comma separated, so my output is: ``` Result A...

5 Feb at 09:3

css overflow - only 1 line of text

I have `div` with the following css style: ``` width:335px; float:left; overflow:hidden; padding-left:5px; ``` When I insert, into that `div`, a long line of text, it's breaking to a new line and d...

25 Dec at 00:41

How to switch activity without animation in Android?

How can I use properly the Intent flag `FLAG_ACTIVITY_NO_ANIMATION` in AndroidManifest file? I supose my problem is trivial, but I can't find good example or solution to it. ``` <intent-filter> ...

Eclipse: Enable autocomplete / content assist

How can I enable autocomplete in Eclipse? I can't find it!

11 May at 03:3

Flask-SQLalchemy update a row's information

How can I update a row's information? For example I'd like to alter the name column of the row that has the id 5.

1 Dec at 07:16

How do I prevent node.js from crashing? try-catch doesn't work

From my experience, a php server would throw an exception to the log or to the server end, but node.js just simply crashes. Surrounding my code with a try-catch doesn't work either since everything is...

Reading and writing environment variables in Python?

My python script which calls many python functions and shell scripts. I want to set a environment variable in Python (main calling function) and all the daughter processes including the shell scripts ...

31 Jan at 07:12

Ignore outliers in ggplot2 boxplot

How would I ignore outliers in ggplot2 boxplot? I don't simply want them to disappear (i.e. outlier.size=0), but I want them to be ignored such that the y axis scales to show 1st/3rd percentile. My ...

26 Mar at 01:41

Convert JS date time to MySQL datetime

Does anyone know how to convert JS dateTime to MySQL datetime? Also is there a way to add a specific number of minutes to JS datetime and then pass it to MySQL datetime?

26 Feb at 20:44

Get "Value" property in IGrouping

I have a data structure like ``` public DespatchGroup(DateTime despatchDate, List<Products> products); ``` And I am trying to do... ``` var list = new List<DespatchGroup>(); foreach (var group in...

30 Nov at 16:3

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo

I was trying to run a sample code While launching the application in the android 1.5 emulator , I got these errors.... Any one have some hint..? ERROR from LogCat: ``` 01-13 02:28:08.392: ERROR/And...

19 Jul at 18:13

Why do we have to normalize the input for an artificial neural network?

Why do we have to normalize the input for a neural network? I understand that sometimes, when for example the input values are non-numerical a certain transformation must be performed, but when we hav...

Facebook development in localhost

Just wanted to know if there is any way I could develop Facebook applications in localhost.

6 Sep at 04:28

How to avoid the need to specify the WSDL location in a CXF or JAX-WS generated webservice client?

When I generate a webservice client using wsdl2java from CXF (which generates something similar to wsimport), via maven, my services starts with codes like this: ``` @WebServiceClient(name = "StatusM...

21 Nov at 15:16

Is it possible to ping a server from Javascript?

I'm making a web app that requires that I check to see if remote servers are online or not. When I run it from the command line, my page load goes up to a full 60s (for 8 entries, it will scale linear...

9 Sep at 12:56

Entity Framework: table without primary key

I have an existing DB with which I would like to build a new app using `EF4.0` Some tables do not have primary keys defined so that when I create a new Entity Data Model, I get the following message: ...

Check if value already exists within list of dictionaries?

I've got a Python list of dictionaries, as follows: ``` a = [ {'main_color': 'red', 'second_color':'blue'}, {'main_color': 'yellow', 'second_color':'green'}, {'main_color': 'yellow', 'sec...

27 Jun at 05:30

How do I create a dictionary with keys from a list and values defaulting to (say) zero?

I have `a = [1,2,3,4]` and I want `d = {1:0, 2:0, 3:0, 4:0}` ``` d = dict(zip(q,[0 for x in range(0,len(q))])) ``` works but is ugly. What's a cleaner way?

28 Sep at 02:22

How to check if a word is an English word with Python?

I want to check in a Python program if a word is in the English dictionary. I believe nltk wordnet interface might be the way to go but I have no clue how to use it for such a simple task. ``` def i...

20 Sep at 22:13