This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the maven command will make the repo directory structure for you | |
mvn install:install-file \ | |
-Dfile=D:\SomeThingCool\lib\remote\dependencies\ThirdParty-1.0.1.jar \ | |
-DgroupId=org.somethingcool \ | |
-DartifactId=thirdparty \ | |
-Dversion=1.0.1 \ | |
-Dpackaging=jar \ | |
-DlocalRepositoryPath=src\repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.view; | |
import org.h2.util.MathUtils; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mo.nkeyco.de; | |
import java.io.IOException; | |
import java.util.Enumeration; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/main/java/dan/langford/SomeTest.java | |
package dan.langford; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class SomeBean { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings("serial") | |
List<Map<String, String>> query(String q) { | |
final ItemIterable<QueryResult> results = getSession().query(q, false); | |
return new ArrayList<Map<String, String>>() { { | |
for (final QueryResult result : results) { | |
add(new HashMap<String, String>() { { | |
for (PropertyData<?> prop : result.getProperties()) { | |
put(prop.getQueryName(), prop.getFirstValue() .toString()); | |
} | |
}}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dan.langford; | |
import static org.testng.Assert.assertEquals; | |
import java.util.logging.Logger; | |
import org.apache.commons.lang.StringUtils; | |
import org.springframework.util.StopWatch; | |
import org.testng.annotations.Test; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gonna need underscore | |
// http://underscorejs.org/underscore-min.js | |
window.myObj = { | |
getNames : | |
function(group){ return _.pluck( _.filter(this.data, function(i){ return i.groups.indexOf(group)>=0; }), 'name' ) } | |
, | |
getGroups : | |
function(name){ return _.find(this.data, function(i){ return i.name===name.toUpperCase(); }).groups } | |
, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script> | |
<script src="https://raw.github.com/jgallen23/cookie-monster/master/dist/monster.js"></script> | |
</head> | |
<body> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tubes = (function() { | |
return { | |
online: function() { }, | |
offline: function() { }, | |
test: function() { | |
var i = new Image(); | |
i.onload = this.online; | |
i.onerror = this.offline; | |
i.src="http://lh3.googleusercontent.com/-nVLoR1a5pwU/TvERe2G2-II/AAAAAAAAA_k/D4Y6NIGINpQ/s800/settings.png?d="+escape(Date()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="AntTmplt" xmlns:ivy="antlib:org.apache.ivy.ant" default="run" basedir="."> | |
<target name="all" depends="setup,resolve" description="Build, compile, and package the entire application"> | |
<!-- Now we compile and package our project. --> | |
<antcall target="compile"/> | |
<antcall target="package" /> | |
</target> |