Questions

What's the difference between Hibernate and Spring Data JPA

What are the main differences between Hibernate and Spring Data JPA? When should we not use Hibernate or Spring Data JPA? Also, when may Spring JDBC template perform better than Hibernate and Spring D...

How to open a URL in a new Tab using JavaScript or jQuery?

How to open a URL in new tab instead of new window programatically?

23 Jul at 14:50

SASS - use variables across multiple files

I would like to keep one central .scss file that stores all SASS variable definitions for a project. ``` // _master.scss $accent: #6D87A7; $error: #811702; $warning: #F9E055; $valid: #03...

4 Jan at 18:9

How to install Python package from GitHub?

I want to use a new feature of httpie. This feature is in the github repo [https://github.com/jkbr/httpie](https://github.com/jkbr/httpie) but not in the release on the python package index [https://p...

7 Mar at 10:39

Run Cron job every N minutes plus offset

`*/20 * * * *` Ensures it runs every 20 minutes, I'd like to run a task every 20 minutes, starting at 5 past the hour, is this possible with Cron? Would it be: `5/20 * * * *` ?

8 Oct at 17:16

How to exclude property from Json Serialization

I have a DTO class which I Serialize ``` Json.Serialize(MyClass) ``` How can I exclude a property of it? (It has to be public, as I use it in my code somewhere else)

16 Apr at 07:29

Git symbolic links in Windows

Our developers use a mix of Windows and Unix-based OSes. Therefore, symbolic links created on Unix machines become a problem for Windows developers. In Windows ([MSysGit](https://github.com/msysgit/))...

2 May at 19:48

Convert String to double in Java

How can I convert a `String` such as `"12.34"` to a `double` in Java?

Force "portrait" orientation mode

I'm trying to force the "portrait" mode for my application because my application is absolutely not designed for the "landscape" mode. After reading some forums, I added these lines in my manifest fi...

How to discard local commits in Git?

I'd been working on something, and decided it was completely screwed...after having committed some of it. So I tried the following sequence: ``` git reset --hard git rebase origin git fetch git pull ...

21 Jul at 14:57

Where does VBA Debug.Print log to?

Where does `Debug.Print` output messages?

31 Jan at 13:56

Why am I getting an OPTIONS request instead of a GET request?

``` <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> <script> $.get("http://example.com/", function(data) { alert(data); }); </script> ``...

How to determine if a list of polygon points are in clockwise order?

Having a list of points, how do I find if they are in clockwise order? For example: ``` point[0] = (5,0) point[1] = (6,4) point[2] = (4,5) point[3] = (1,5) point[4] = (1,0) ``` would say that it i...

Why use Gradle instead of Ant or Maven?

What does another build tool targeted at Java really get me? If you use Gradle over another tool, why?

30 Aug at 10:6

How can I put a database under git (version control)?

I'm doing a web app, and I need to make a branch for some major changes, the thing is, these changes require changes to the database schema, so I'd like to put the entire database under git as well. ...

Get URL parameters from a string in .NET

I've got a string in .NET which is actually a URL. I want an easy way to get the value from a particular parameter. Normally, I'd just use `Request.Params["theThingIWant"]`, but this string isn't fro...

2 Apr at 06:13

What is Shelving in TFS?

Is shelving in TFS merely a soft checkin so other team members can see the source code? i.e. the shelved code will not be compiled right?

20 May at 07:22

REST API - file (ie images) processing - best practices

We are developing server with REST API, which accepts and responses with JSON. The problem is, if you need to upload images from client to server. Note: and also I am talking about a use-case where t...

7 Jun at 19:30

Go to "next" iteration in JavaScript forEach loop

How do I go to the next iteration of a JavaScript `Array.forEach()` loop? For example: ``` var myArr = [1, 2, 3, 4]; myArr.forEach(function(elem){ if (elem === 3) { // Go to "next" iteration....

11 Aug at 22:45

nginx error connect to php5-fpm.sock failed (13: Permission denied)

I update nginx to and php to , After that I got the . Before I update everything works fine. nginx-error.log ``` 2014/05/03 13:27:41 [crit] 4202#0: *1 connect() to unix:/var/run/php5-fpm.sock faile...

2 Jun at 08:25

Loop through files in a directory using PowerShell

How can I change the following code to look at all the .log files in the directory and not just the one file? I need to loop through all the files and delete all lines that do not contain "step4" or ...

27 Dec at 02:3

Install gitk on Mac

How can I install gitk on a Mac? From their official website, it seems gitk comes with Git, but the version of my Git () does not come with gitk. `brew install gitk` does not work for gitk. Version in...

7 Apr at 00:30

How to handle anchor hash linking in AngularJS

Do any of you know how to nicely handle anchor hash linking in ? I have the following markup for a simple FAQ-page ``` <a href="#faq-1">Question 1</a> <a href="#faq-2">Question 2</a> <a href="#faq-3...

13 Feb at 07:24

jQuery UI: Datepicker set year range dropdown to 100 years

Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added. How can we set the initial range to be 100 years so that ...

Recommendation for compressing JPG files with ImageMagick

I want to compress a JPG image file with ImageMagick but can't get much difference in size. By default the output size is bigger than the input. I don't know why, but after adding some +profile option...

29 Oct at 11:15