Find an object in array?
Does Swift have something like [_.findWhere](http://underscorejs.org/#findWhere) in Underscore.js? I have an array of structs of type `T` and would like to check if array contains a struct object who...
"Expected BEGIN_OBJECT but was STRING at line 1 column 1"
I have this method: ``` public static Object parseStringToObject(String json) { String Object = json; Gson gson = new Gson(); Object objects = gson.fromJson(object, Object.class); par...
How to insert a line break <br> in markdown
I'm trying to create a Markdown file with some paragraphs containing both a link and a line of text on the next line. The problem I've encountered is that when I make a new line after the link, it is ...
- Modified
- 27 Mar at 15:6
Classpath resource not found when running as jar
Having this problem both in Spring Boot 1.1.5 and 1.1.6 - I'm loading a classpath resource using an @Value annotation, which works just fine when I run the application from within STS (3.6.0, Windows)...
- Modified
- 2 Oct at 14:36
How can I add a table of contents to a Jupyter / JupyterLab notebook?
The documentation at [http://ipython.org/ipython-doc/stable/interactive/notebook.html](http://ipython.org/ipython-doc/stable/interactive/notebook.html) says > You can provide a conceptual structure f...
- Modified
- 4 Apr at 20:40
Unable to create a constant value of type Only primitive types or enumeration types are supported in this context
I am getting this error for the query below > Unable to create a constant value of type `API.Models.PersonProtocol`. Only primitive types or enumeration types are supported in this context `ppCombin...
- Modified
- 13 Oct at 11:10
Check if list contains element that contains a string and get that element
While searching for an answer to this question, I've run into similar ones utilizing LINQ but I haven't been able to fully understand them (and thus, implement them), as I'm not familiarized with it. ...
Difference between IsNullOrEmpty and IsNullOrWhiteSpace in C#
What are differences between these commands in C# ``` string text= " "; 1-string.IsNullOrEmpty(text.Trim()) 2-string.IsNullOrWhiteSpace(text) ```
- Modified
- 19 Dec at 11:30
java.nio.file.Path for a classpath resource
Is there an API to get a classpath resource (e.g. what I'd get from [Class.getResource(String)](http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getResource%28java.lang.String%29)) as a [...
Remove useless zero digits from decimals in PHP
I'm trying to find a fast way to remove `zero decimals` from number values like this: ``` echo cleanNumber('125.00'); // 125 echo cleanNumber('966.70'); // 966.7 echo cleanNumber(844.011); // 844.0...
How to send JSON instead of a query string with $.ajax?
Can someone explain in an easy way how to make jQuery send actual JSON instead of a query string? ``` $.ajax({ url : url, dataType : 'json', // I was pretty sure this would do the trick ...
- Modified
- 26 Apr at 00:42
Store query result in a variable using in PL/pgSQL
How to assign the result of a query to a variable in PL/pgSQL, the procedural language of PostgreSQL? I have a function: ``` CREATE OR REPLACE FUNCTION test(x numeric) RETURNS character varying AS $...
- Modified
- 26 Mar at 15:0
How to write a comment in a Razor view?
How to write a comment in a MVC view, that won't be transmitted to the final HTML (i.e.,to browser, to response). One can make a comment with: ``` <!--<a href="/">My comment</a> --> ``` but, it is ...
- Modified
- 1 Oct at 07:18
How to specify in crontab by what user to run script?
I have few crontab jobs that run under root, but that gives me some problems. For example all folders created in process of that cron job are under user root and group root. How can i make it to run ...
REST API Authentication
I'm building an application which will be hosted on a server. I want to build an API for the application to facilitate interaction with from any platform (Web App, Mobile App). What I'm not understand...
- Modified
- 23 Mar at 14:20
Error "gnu/stubs-32.h: No such file or directory" while compiling Nachos source code
I am trying to install Nachos on my laptop and I have Ubuntu 11.04 on the laptop. The code is in C and so to build it I assume I will need cross compiler. This is where my problem is. I downloaded ...
- Modified
- 9 Apr at 09:32
Java: Get month Integer from Date
How do I get the month as an integer from a Date object (`java.util.Date`)?
Is there an XNOR (Logical biconditional) operator in C#?
I could not find an [XNOR](http://en.wikipedia.org/wiki/Logical_biconditional) operator to provide this truth table: Is there a specific operator for this? Or I need to use !(A^B)?
- Modified
- 29 Dec at 03:14
Remove leading zeros from a number in Javascript
> [Truncate leading zeros of a string in Javascript](https://stackoverflow.com/questions/594325/truncate-leading-zeros-of-a-string-in-javascript) What is the simplest and cross-browser compati...
- Modified
- 23 May at 12:26
convert '1' to '0001' in JavaScript
> [Is there a JavaScript function that can pad a string to get to a determined length?](https://stackoverflow.com/questions/2686855/is-there-a-javascript-function-that-can-pad-a-string-to-get-to-a-...
- Modified
- 23 May at 12:26
changing source on html5 video tag
I'm trying to build a video player that works everywhere. so far I'd be going with: ``` <video> <source src="video.mp4"></source> <source src="video.ogv"></source> <object data="flowplayer...
- Modified
- 18 Mar at 04:40
Check variable equality against a list of values
I'm checking a variable, say `foo`, for equality to a number of values. For example, ``` if( foo == 1 || foo == 3 || foo == 12 ) { // ... } ``` The point is that it is rather much code for such...
- Modified
- 8 Nov at 16:48
Can you write virtual functions / methods in Java?
Is it possible to write methods in Java, as one would do in C++? Or, is there a proper Java approach which you can implement that produces similar behavior? Could I please have some examples?
- Modified
- 11 Apr at 19:10
Is it possible to refresh a single UITableViewCell in a UITableView?
I have a custom `UITableView` using `UITableViewCell`s. Each `UITableViewCell` has 2 buttons. Clicking these buttons will change an image in a `UIImageView` within the cell. Is it possible to refresh...
- Modified
- 15 Dec at 23:2
convert double to int
What is the best way to convert a `double` to an `int`? Should a cast be used?
- Modified
- 11 Mar at 22:48