This file contains 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
/Users/yoshi/local/openjdk/jdk8-b102-hs25-b45/hotspot/src/os/bsd/vm/attachListener_bsd.cpp: In static member function ‘static void AttachListener::vm_start()’: | |
/Users/yoshi/local/openjdk/jdk8-b102-hs25-b45/hotspot/src/os/bsd/vm/attachListener_bsd.cpp:455: warning: ‘stat64’ is deprecated (declared at /usr/include/sys/stat.h:466) | |
/Users/yoshi/local/openjdk/jdk8-b102-hs25-b45/hotspot/src/os/bsd/vm/attachListener_bsd.cpp:455: warning: ‘stat64’ is deprecated (declared at /usr/include/sys/stat.h:466) | |
make[8]: *** [attachListener_bsd.o] Error 1 | |
make[8]: *** Waiting for unfinished jobs.... | |
make[7]: *** [the_vm] Error 2 | |
make[6]: *** [product] Error 2 | |
make[5]: *** [generic_build2] Error 2 | |
make[4]: *** [product] Error 2 | |
make[3]: *** [all_product_universal] Error 2 |
This file contains 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.InputStream; | |
import java.net.*; | |
// import java.util.concurrent.Phaser; | |
// Try mutex/condvar style. | |
// If it didn't work, try semaphore | |
// test for JDK-8006395 | |
// Racey test, will not always fail, but if it does then we have a problem. | |
public class Race15 { |
This file contains 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
/** | |
* Small utility script to use JavaFX 2 from scala REPL | |
* To use ':l fxutil.scala' in REPL. | |
* Recent java7 JDK contains javafx runtime at $JAVA_HOME/jre/lib/jfxrt.jar | |
* Scala 2.9 takes -cp or CLASSPATH, so specify the jfxrt.jar path using | |
* either way. | |
* Scala 2.10 does not work in the same way. Its startup script passes | |
* -classpath "", thus -cp does not work. Instead, it has -toolcp option, | |
* so specify the jfxrt.jar using the option. | |
* |
This file contains 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 persist.gettingStarted | |
import com.sleepycat.persist.model.{Entity, PrimaryKey, SecondaryKey} | |
import com.sleepycat.persist.model.Relationship._ | |
@Entity | |
class Vendor { | |
var address: String = _ | |
var bizPhoneNumber: String = _ | |
var city: String = _ |
This file contains 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
/* Simple test program to verify si_code=SI_KERNEL(128) for address | |
* above TASK_SIZE64 or TASK_SIZE_MAX (0x800000000000 - 4096 = 0x7ffffffff000) | |
* See do_page_fault(k). | |
*/ | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <signal.h> | |
#include <string.h> | |
#include <unistd.h> |
This file contains 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
cl /Zi -D_UNICODE ps2.cpp Psapi.lib |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <sys/time.h> | |
#include <signal.h> | |
#include <string.h> |
This file contains 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
#!/bin/sh | |
exec ~/local/scala-2.10.0/bin/scala "$0" "$@" | |
!# | |
val ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment | |
val mode = ge.getDefaultScreenDevice.getDisplayMode | |
println("%dx%d".format(mode.getWidth, mode.getHeight)) |
This file contains 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
/** | |
* Print thread stack use for each thread. | |
* This is for linux which has /proc/<pid>/smaps and /proc/<pid>/task/<tid>/stat. | |
*/ | |
object StackUse extends App { | |
import scala.util.control.Exception._ | |
import scala.io.Source | |
import java.io.File | |
/** | |
* Parse (pid, task stat string) tuple and returns (pid, sp) tuple. |
This file contains 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
/* | |
* A small cpu and memory stress program | |
* compile: CC cpumem.cpp -o cpumem -lpthread | |
* or: make LDFLAGS=-lpthread cpumem | |
*/ | |
#include <pthread.h> | |
#include <iostream> | |
#include <vector> | |
#include <sys/types.h> | |
#include <assert.h> |