Skip to content

Instantly share code, notes, and snippets.

2012-04-20 13:45:26
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.6-b01-414 mixed mode):
"hz._hzInstance_1_hazelcast-jcook.MC.UDP.Listener" prio=5 tid=7ff818850800 nid=0x11770e000 runnable [11770d000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <7c839ac68> (a java.net.PlainDatagramSocketImpl)
at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:145)
- locked <7c839ac68> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(DatagramSocket.java:725)
var log = require( 'ringo/logging' ).getLogger( module.id );
function main() {
log.info( 'Executing main' );
require( 'system' ).exit( 0 );
}
if ( require.main === module ) {
require( "ringo/engine" ).addShutdownHook( function () {
log.error( 'SHUTTING DOWN' );
@oravecz
oravecz / main.js
Last active August 29, 2015 13:56
EJS - Hello World
var {Application} = require( 'stick' );
var response = require( 'ringo/jsgi/response' );
var app = exports.app = new Application();
app.configure( 'route' );
app.get( '/', function ( req ) {
return response.html( 'Hello, World' );
} );
$(document).on("init", function(){
var frame;
if (mghApiLoaded) {
if(typeof MGH_API != "undefined"){
activityAPI = new MGH_API();
frame = new buildingblock(params);
frame.init();
} else {
setTimeout(arguments.callee, 100);
@oravecz
oravecz / async_example.js
Created July 6, 2014 01:08
Promises Presentation
(function() {
var a = 10;
setTimeout(function() {
a = a + 10;
}, 1000);
console.log('Value of a: ' + a);
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
{
"actor": {
"name": "Sally Student",
"account": {
"homePage": "https://connected.mcgraw-hill.com",
"name": "sally518"
}
},
"verb": {
"id": "http://mheducation.com/lrs/verbs/completed",
@oravecz
oravecz / example1.js
Last active August 29, 2015 14:05
Services Presentation
function myFilter( $locale ) {
var formats = $locale.NUMBER_FORMATS;
return something;
}
myFilter.$inject = ['$locale'];
$injector.invoke( myFilter );
$injector.invoke( ['$locale', myFilter] );
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"type": "object",
"properties": {
"about": {
"id": "#about",
"type": "object",
"required": [
"version"
@oravecz
oravecz / Code
Last active May 11, 2020 08:28
Custom format support in fge/json-schema-validator
protected static Library getFormatLibrary(String version) throws IOException {
String formatPath = "/xapi/schemas/" + version + "/formats.json";
final LibraryBuilder libraryBuilder = DraftV4Library.get().thaw();
final JsonNode formats = JsonLoader.fromResource(formatPath);
// Iterate over each of the custom formats in the file
final Iterator<String> names = formats.fieldNames();
while (names.hasNext()) {