JavaScript Value | JavaScript Type | Java Type | Is Scriptable | Is Function |
---|---|---|---|---|
{a:1, b:['x','y']} |
object |
org.mozilla.javascript.NativeObject |
+ | - |
[1,2,3] |
object |
org.mozilla.javascript.NativeArray |
+ | - |
1 |
number |
java.lang.Double |
- | - |
1.2345 |
number |
java.lang.Double |
- | - |
NaN |
number |
java.lang.Double |
- | - |
Infinity |
number |
java.lang.Double |
- | - |
-Infinity |
number |
java.lang.Double |
- | - |
true |
boolean |
java.lang.Boolean |
- |
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
Scriptable scope = cx.initStandardObjects(); | |
Object result = cx.evaluateString(scope, "obj = {a:1, b:['x','y']}; arr = [1,2,3]; i = 1; d = 1.2345; b = true; s = 'string'; re=/.*/; f = function() { }; dt = new Date(); n=null; un=undefined; nan=Number.NaN; pinf=Infinity; ninf=-Infinity;", "MySource", 1, null); | |
for (String name: new String[]{"obj", "arr", "i", "d", "b", "s", "n", "un", "re", "f", "dt", "nan", "pinf", "ninf"}) { | |
Object o = scope.get(name, scope); | |
String msg = name + "=" + String.valueOf(o) + " " + (o != null ? o.getClass().getName() : "null"); | |
if (o instanceof Scriptable) { | |
msg += " Scriptable"; | |
} | |
if (o instanceof Function) { |
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
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08 | |
Copyright (C) 2011 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "i686-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://bugs.launchpad.net/gdb-linaro/>... | |
Reading symbols from /usr/local/bin/geany...done. |
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.IOException; | |
import java.io.InputStream; | |
import java.nio.BufferOverflowException; | |
/** | |
* Cyclic byte array backed buffer that allows independent reads and writes. | |
*/ | |
public class CyclicByteBuffer | |
{ | |
public CyclicByteBuffer(int capacity) |
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
#!/bin/bash | |
set -e | |
if [ $# == 0 -o $# -gt 3 ]; then | |
echo "usage: $0 version [base_url] [maven_repo]" | |
echo "defaults:" | |
echo " base_url=http://jogamp.org/deployment/v<version>" | |
echo " maven_repo=`echo ~/.m2/repository`" | |
echo "example:" |
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
#!/usr/bin/env python | |
####################################################################### | |
# This is a script that converts iTunes SMS backup database (that is stored | |
# inf 3d0d7e5fb2ce288813306e4d4636395e047a3d28 file) into | |
# an XML file that can be restored on Android with SMS Backup & Restore | |
# app (https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore) | |
# | |
# Usage: | |
# python ibackup-sms-xml-converter.py /path/to/3d0d7e5fb2ce288813306e4d4636395e047a3d28 /path/to/smses.xml |
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 benchmark; | |
import com.google.caliper.runner.CaliperMain; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicLong; | |
public class VolatileVsSynchronized { | |
public interface Common { |
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
+>,[--------------------------------[-[+++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.-------.>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..<.>--.+++++++++++++.[-]<[-]<[->+>+<<]>>[-<<+>>]<>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]>[-]+<<<[-<->>[-]>[-]<<<[->>+>+<<<]>>>[-<<<+>>>]+<[>-<[-]]>[>[-]<<<[-]>>[-]]<<]>>>[<<<<<-------------------------------->>>>>[-]]<<<<<.[>]>>]<[>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++++++++++++++++.---------------------.+++++++++.-----------.++++++++++++.------------.+++++++++++++++++++.-----------.++++++.-.+++++++++++++++++.------------------.------------.+++++++++++++++++.-------.[>]>>]]<[>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.---.---------------.++.++.[>]>>]>,[<++++++++++++++++++++++++++++++++.+++++++++++.-----------.>>]<] |
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
+ | |
> | |
, | |
[ | |
-------------------------------- | |
is space? | |
[ no | |
- is exclamation mark? | |
[ no |
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
<!-- | |
This POM downloads and installs Qooxdoo SDK into local Maven repository. | |
Note that the installed ZIP won't include the top level qooxdoo-x.x.x-sdk directory. | |
Usage: | |
mvn [-Dqx.version=5.0.1] | |
--> | |
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>net.emphased.qooxdoo</groupId> |
OlderNewer