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 FindProxyForURL(url, host) | |
{ | |
return "SOCKS 192.168.0.101:1080"; | |
} |
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
/* | |
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
* | |
* | |
* | |
* | |
* | |
* | |
* | |
* |
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 com.github.lzy.web.net; | |
import java.io.IOException; | |
import java.net.DatagramPacket; | |
import java.net.DatagramSocket; | |
import java.net.InetSocketAddress; | |
import java.net.SocketException; | |
/** | |
* Description: |
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 com.github.lzy.web.net.udp; | |
import java.io.IOException; | |
import java.net.DatagramPacket; | |
import java.net.DatagramSocket; | |
import java.net.InetSocketAddress; | |
import java.net.SocketAddress; | |
import java.net.SocketException; | |
import java.nio.ByteBuffer; | |
import java.nio.channels.DatagramChannel; |
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
public class UDPServer { | |
public void start() { | |
try { | |
DatagramChannel datagramChannel = DatagramChannel.open(); | |
datagramChannel.bind(new InetSocketAddress(8089)); | |
while(true) { | |
ByteBuffer byteBuffer = ByteBuffer.allocate(1024); | |
SocketAddress receive = datagramChannel.receive(byteBuffer); | |
byteBuffer.flip(); | |
System.out.println("Receive " + byteBuffer.toString()); |
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.lang.reflect.*; | |
import java.lang.reflect.Method; | |
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.*; | |
import sun.jvm.hotspot.utilities.*; |
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
private final class Sync extends AbstractQueuedSynchronizer { | |
private int count; | |
public Sync(int count) { | |
this.count = count; | |
} | |
@Override | |
protected int tryAcquireShared(int arg) { | |
return (getState() == 0 ? 1 : -1); |
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 com.lzy.research; | |
import org.objectweb.asm.ClassWriter; | |
import org.objectweb.asm.MethodVisitor; | |
import org.objectweb.asm.Opcodes; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.lang.reflect.InvocationTargetException; |
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
Object[] objects = new String[]{"s"}; | |
objects[0] = 2; | |
System.out.println("h"); |
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 com.lzy.algo.collect; | |
import java.util.concurrent.atomic.AtomicReference; | |
/** | |
* Description: Concurrent Stack | |
* | |
* @author liuzhengyang | |
* @version 1.0 | |
* @since 2016-04-07 |
NewerOlder