"The import org.springframework cannot be resolved."
Here is my POM.xml file: ``` <project> <properties> <jdk.version>1.6</jdk.version> <spring.version>3.2.2.RELEASE</spring.version> <spring.batch.version>2.2.0.RELEASE</spri...
Is it possible to have empty RequestParam values use the defaultValue?
if I have a a request mapping similar to the following: ``` @RequestMapping(value = "/test", method = RequestMethod.POST) @ResponseBody public void test(@RequestParam(value = "i", defaultValue = "10"...
- Modified
- 19 Jan at 05:21
Cell spacing in UICollectionView
How do I set cell spacing in a section of `UICollectionView`? I know there is a property `minimumInteritemSpacing` I have set it to 5.0 still the spacing is not appearing 5.0. I have implemented the f...
- Modified
- 22 Dec at 12:27
log4j:WARN No appenders could be found for logger in web.xml
I already put the log4jConfigLocation in web.xml, but I still get the following warning: ``` log4j:WARN No appenders could be found for logger ⤦ ⤥ (org.springframework.web.context.ContextLoader)....
- Modified
- 5 May at 10:35
How to read request body in an asp.net core webapi controller?
I'm trying to read the request body in the `OnActionExecuting` method, but I always get `null` for the body. ``` var request = context.HttpContext.Request; var stream = new StreamReader(request.Body);...
- Modified
- 24 Sep at 07:27
How can a LEFT OUTER JOIN return more records than exist in the left table?
I have a very basic LEFT OUTER JOIN to return all results from the left table and some additional information from a much bigger table. The left table contains 4935 records yet when I LEFT OUTER JOIN ...
- Modified
- 21 Sep at 19:25
Get number of digits with JavaScript
As the title of my post suggests, I would like to know how many digits `var number` has. For example: If `number = 15;` my function should return `2`. Currently, it looks like this: ``` function getl...
- Modified
- 30 Jan at 07:2
How to get text of an input text box during onKeyPress?
I am trying to get the text in a text box as the user types in it ([jsfiddle playground](http://jsfiddle.net/VDd6C/3/)): ``` function edValueKeyPress() { var edValue = document.getElementById("ed...
- Modified
- 4 Jan at 13:34
How to merge two sorted arrays into a sorted array?
This was asked of me in an interview and this is the solution I provided: ``` public static int[] merge(int[] a, int[] b) { int[] answer = new int[a.length + b.length]; int i = 0, j = 0, k =...
How to hide the bar at the top of "youtube" even when mouse hovers over it?
I am attempting to embed a youtube video, however, I have not discovered a way to keep the bar at the top from showing when the mouse hovers over it. For my purposes it is important that users are not...
Subtract a value from every number in a list in Python?
I have a list ``` a = [49, 51, 53, 56] ``` How do I subtract 13 from each integer value in the list?
- Modified
- 4 Oct at 00:39
UTL_FILE.FOPEN() procedure not accepting path for directory?
I am trying to write in a file stored in c:\ drive named vin1.txt and getting this error .Please suggest! ``` > ERROR at line 1: ORA-29280: invalid > directory path ORA-06512: at > "SYS.UTL_FILE", li...
How to use EOF to run through a text file in C?
I have a text file that has strings on each line. I want to increment a number for each line in the text file, but when it reaches the end of the file it obviously needs to stop. I've tried doing some...
'NOT LIKE' in an SQL query
Why does this simple query return 'ORA-00936: missing expression' (the database is Oracle as you can tell): ``` SELECT * FROM transactions WHERE id NOT LIKE '1%' AND NOT LIKE '2%' ``` I feel silly,...
Simplest PHP example for retrieving user_timeline with Twitter API version 1.1
Because of the Twitter API 1.0 retirement as of [June 11th 2013](https://dev.twitter.com/blog/api-v1-retirement-date-extended-to-june-11), the script below does not work anymore. ``` // Create curl r...
How to escape special characters of a string with single backslashes
I'm trying to escape the characters `-]\^$*.` each with a single backslash `\`. For example the string: `^stack.*/overflo\w$arr=1` will become: ``` \^stack\.\*/overflo\\w\$arr=1 ``` What's the mos...
How to query for Xml values and attributes from table in SQL Server?
I have a table that contains a `Xml` column: ``` SELECT * FROM Sqm ``` ![enter image description here](https://i.stack.imgur.com/nVgUG.png) A sample of the `xml` data of a row would be: ``` <Sqm...
- Modified
- 1 Jul at 17:3
How do I split a string in Rust?
From the [documentation](https://doc.rust-lang.org/std/primitive.str.html), it's not clear. In Java you could use the `split` method like so: ``` "some string 123 ffd".split("123"); ```
- Modified
- 12 May at 17:25
Select query to remove non-numeric characters
I've got dirty data in a column with variable alpha length. I just want to strip out anything that is not 0-9. I do not want to run a function or proc. I have a script that is similar that just grab...
- Modified
- 25 Oct at 20:0
How to find a min/max with Ruby
I want to use `min(5,10)`, or `Math.max(4,7)`. Are there functions to this effect in Ruby?
- Modified
- 26 Feb at 08:56
How to get elements with multiple classes
Say I have this: ``` <div class="class1 class2"></div> ``` How do I select this `div` element? ``` document.getElementsByClassName('class1')[0].getElementsByClassName('class2')[0] ``` That does ...
- Modified
- 18 Jul at 05:15
How do I get a list of connected sockets/clients with Socket.IO?
I'm trying to get a list of all the sockets/clients that are currently connected. `io.sockets` does not return an array, unfortunately. I know I could keep my own list using an array, but I don't thin...
How to re import an updated package while in Python Interpreter?
I often test my module in the Python Interpreter, and when I see an error, I quickly update the .py file. But how do I make it reflect on the Interpreter ? So, far I have been exiting and reentering t...
- Modified
- 26 Mar at 01:19
How to convert an XML string to a dictionary?
I have a program that reads an XML document from a socket. I have the XML document stored in a string which I would like to convert directly to a Python dictionary, the same way it is done in Django's...
- Modified
- 1 Apr at 19:58
In C#, should I use string.Empty or String.Empty or "" to intitialize a string?
In C#, I want to initialize a string value with an empty string. How should I do this? What is the right way, and why? ``` string willi = string.Empty; ``` or ``` string willi = String.Empty; ``...
- Modified
- 12 Jan at 00:11