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
import org.vertx.java.core.Handler | |
import org.vertx.java.core.buffer.Buffer | |
import org.vertx.java.core.eventbus.EventBus | |
import org.vertx.java.core.json.JsonObject | |
import org.vertx.java.core.net.NetSocket | |
import org.vertx.java.platform.Verticle | |
import org.vertx.java.core.parsetools.RecordParser | |
public class GroovyVerticle extends Verticle { |
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
//invoke with VERTX_OPTS="" vertx run vertx-bug.groovy | |
def client = vertx.createNetClient(); | |
//The docs appear to be wrong. TODO file bug with vertx http://vertx.io/core_manual_groovy.html#catching-exceptions-on-the-net-client | |
//Caused by: groovy.lang.MissingMethodException: No signature of method: org.vertx.groovy.core.net.impl.DefaultNetClient.exceptionHandler() is applicable for argument types: (vertx-bug$_run_closure1) values: [vertx-bug$_run_closure1@32d16fe3] | |
client.exceptionHandler { ex -> println "Failed to connect $ex"; container.exit() } | |
client.connect(1234, "localhost") { socket -> | |
socket.dataHandler { buffer -> |
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
# domain: cmwmini.com | |
# public: /home/josh/public/cmwmini.com/ | |
<VirtualHost cmwmini.com:80> | |
# Admin email, Server Name (domain name), and any aliases | |
ServerAdmin [email protected] | |
ServerName www.cmwmini.com | |
ServerAlias cmwmini.com | |
# Index file and Document Root (where the public files are located) |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
android:versionCode="1" android:versionName="1.0" package="javajosh.poc.spring2012"> | |
<supports-screens android:largeScreens="true" android:normalScreens="true" | |
android:smallScreens="true" android:resizeable="true" android:anyDensity="true" /> | |
<uses-permission android:name="android.permission.CAMERA" /> | |
<uses-permission android:name="android.permission.VIBRATE" /> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> |
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
04-07 16:18:33.203: D/BluetoothChatService(1893): Socket TypeSecurecancel Thread[AcceptThreadSecure,5,main] | |
04-07 16:18:33.203: E/BluetoothChatService(1893): Socket Type: Secureaccept() failed | |
04-07 16:18:33.203: E/BluetoothChatService(1893): java.io.IOException: Operation Canceled | |
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothSocket.acceptNative(Native Method) | |
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothSocket.accept(BluetoothSocket.java:287) | |
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:105) | |
04-07 16:18:33.203: E/BluetoothChatService(1893): at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:91) | |
04-07 16:18:33.203: E/BluetoothChatService(1893): at com.example.android.BluetoothChat.BluetoothChatService$AcceptThread.run(BluetoothChatService.java:302) | |
04-07 16:18:33.203: D/BluetoothChatService(1893): Socket TypeInsecurecancel Thread |
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
import java.io.BufferedInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.apache.lucene.analysis.Analyzer; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
import org.apache.lucene.document.Document; | |
import org.apache.lucene.document.Field; |
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 javajosh.hello; | |
public class Main { | |
//All children print out their names when they init | |
static class InitPrint { | |
{System.out.println(this.getClass().getName() + ": init()");} | |
} | |
static class StaticClassExample { | |
static class Parent extends InitPrint{ | |
private static String value = "ParentValue"; |
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 controller; | |
2 | |
3 import java.util.Map; | |
4 import javax.servlet.http.HttpServletRequest; | |
5 import javax.servlet.http.HttpServletResponse; | |
6 import org.springframework.web.servlet.ModelAndView; | |
7 import org.springframework.web.servlet.View; | |
8 import org.springframework.web.servlet.mvc.AbstractController; | |
9 | |
10 /** |
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
// ==UserScript== | |
// @name capiche | |
// @namespace http://capiche.org/greasemonkey | |
// @description Developer tool for RESTful APIs | |
// @author Josh | |
// @homepage http://capiche.org | |
// @include http://localhost:8080/* | |
// ==/UserScript== | |
var p = unsafeWindow.XMLHttpRequest.prototype; |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<link type="text/css" rel="stylesheet" href="Gwt.css"> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /> | |
<title>Web Application Starter Project</title> | |
<script type="text/javascript" language="javascript" src="gwt/gwt.nocache.js"></script> |