Skip to content

Instantly share code, notes, and snippets.

package com.badlogic.gdx.tests;
import com.badlogic.gdx.Files.FileType;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
until `java -jar slave.jar -jnlpUrl http://144.76.220.132:8080/computer/Mac/slave-agent.jnlp -secret YOUR_SECRET_HERE; do
echo 'freaking slave died again'
sleep 5
done
@badlogic
badlogic / gist:a1ad5b04900bf0db2350
Created June 17, 2014 21:59
Updated OCaml KNN benchmark
badlogic@Marios-MacBook-Pro:~/workspace/knn$ cat src/knn.ml
let read_lines name : string list =
let ic = open_in name in
let try_read () =
try Some (input_line ic) with End_of_file -> None in
let rec loop acc = match try_read () with
| Some s -> loop (s :: acc)
| None -> close_in ic; List.rev acc in
loop []
public class SslTest extends UIApplicationDelegateAdapter {
private UIWindow window = null;
@Override
public boolean didFinishLaunching (UIApplication application, NSDictionary launchOptions) {
try {
// HttpURLConnection connection = (HttpURLConnection)new URL("https://www.google.at/images/srpr/logo11w.png").openConnection();
HttpURLConnection connection = (HttpURLConnection)new URL("http://i.imgur.com/XZt9E04.jpg").openConnection();
System.out.println("connection: " + connection);
InputStream in = connection.getInputStream();
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class SslTest {
public static void main (String[] args) {
try {
HttpURLConnection connection = (HttpURLConnection)new URL("https://www.google.at/images/srpr/logo11w.png").openConnection();
EventProcessor.pollEvent: Got process event
EventProcessor.broadcastEvent: Stopped
==> Stopped thread #14, frame #0: 0x0000000100000e06 a.out`threadStart(thread=0x356662656638323a) + 22 at test.c:23, reason: eStopReasonTrace
EventProcessor.executeTask: Executing task Hello task
Hello Task: Hello World
EventProcessor.executeTask: Voting for process resume after task execution
EventProcessor.checkVotes: Vote results: suspend=0, resume=1
EventProcessor.checkVotes: Resumed process
EventProcessor.postTask: Submitted task Hello task to event processor thread
EventProcessor.run: ======== Finished event loop iteration ======
EventProcessor.pollEvent: Got process event
EventProcessor.broadcastEvent: Stopped
==> Stopped thread #1, frame #0: 0x00007fff8bd95486 libsystem_kernel.dylib`__semwait_signal + 10, reason: eStopReasonSignal
EventProcessor.executeTask: Executing task Hello task
Hello Task: Hello World
EventProcessor.executeTask: Voting for process resume after task execution
EventProcessor.checkVotes: Vote results: suspend=0, resume=1
EventProcessor.checkVotes: Resumed process
EventProcessor.run: ======== Finished event loop iteration ======
import java.util.Arrays;
public class HelloWorld {
public static void main(String[] args) throws InterruptedException {
for (int wu : Arrays.asList(0, 1, 2)) {
wu += 1;
if (wu == 0) {
wu -= 1;
}
}
(lldb) r
There is a running process, kill it and restart?: [Y/n] y
Process 50054 exited with status = 9 (0x00000009)
Process 50059 launched: '/tmp/InvalidFrameTest/InvalidFrameTest' (x86_64)
Process 50059 stopped
* thread #1: tid = 0x61f40, 0x000000010014bb1e InvalidFrameTest`[J]com.robovm.debug.server.apps.InvalidFrame.main(__$env=0x0000000101abbfa0, args=0x0000000102811e00)V + 37 at InvalidFrame.java:6, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x000000010014bb1e InvalidFrameTest`[J]com.robovm.debug.server.apps.InvalidFrame.main(__$env=0x0000000101abbfa0, args=0x0000000102811e00)V + 37 at InvalidFrame.java:6
3
4 public class InvalidFrame {
This file has been truncated, but you can view the full file.
INSTCOMBINE ITERATION #0 on [J]javafx.scene.shape.ArcTo.addArcTo(Lcom/sun/javafx/sg/prism/NGPath;Lcom/sun/javafx/geom/Path2D;DD)V
IC: ADDING: 341 instrs to worklist
IC: Visiting: %r0 = alloca %Object*
IC: ERASE store %Object* %p1, %Object** %r0
IC: ADD: %r0 = alloca %Object*
IC: ERASE %r0 = alloca %Object*
IC: Visiting: %r1 = alloca %Object*
IC: Visiting: %r2 = alloca %Object*
IC: Visiting: %d0 = alloca double
IC: ERASE store double %p4, double* %d0