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.*; | |
import java.util.*; | |
import sun.jvm.hotspot.memory.*; | |
import sun.jvm.hotspot.oops.*; | |
import sun.jvm.hotspot.debugger.*; | |
import sun.jvm.hotspot.runtime.*; | |
import sun.jvm.hotspot.tools.*; | |
public class DumpClassURL extends Tool { | |
public void run() { |
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
function Node(value) { | |
this.value = value; | |
this.left = null; | |
this.right = null; | |
} | |
function build_btree(number_array) { | |
length = number_array.length; | |
middle = Math.floor((0 + length - 1) / 2); | |
root = new Node(number_array[middle]); |
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 com.sun.btrace.annotations.*; | |
import static com.sun.btrace.BTraceUtils.*; | |
@BTrace | |
public class OfferTrace { | |
@TLS | |
private static long startTime = 0; | |
@TLS |
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 demo.tool; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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 location.api.baidu; | |
import java.io.UnsupportedEncodingException; | |
import java.net.URLEncoder; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
// java版计算signature签名 |
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 codec; | |
import java.security.Key; | |
import org.jose4j.jwe.ContentEncryptionAlgorithmIdentifiers; | |
import org.jose4j.jwe.JsonWebEncryption; | |
import org.jose4j.jwe.KeyManagementAlgorithmIdentifiers; | |
import org.jose4j.keys.AesKey; | |
import org.jose4j.lang.ByteUtil; | |
import org.jose4j.lang.JoseException; |
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.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.security.KeyStore; | |
import java.security.MessageDigest; | |
import java.security.cert.CertificateException; | |
import java.security.cert.X509Certificate; |
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 test; | |
import java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class JavaTest { | |
private static class Node { | |
public int value; |
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
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
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
for file in /proc/*/status ; do awk '/VmSwap|^Pid/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | head |