Skip to content

Instantly share code, notes, and snippets.

//attach_shm.c
#include<sys/types.h>
#include<sys/ipc.h>
#include<sys/shm.h>
#include<stdio.h>
#define BUFSZ 1024
int main()
{
@liuxinglanyue
liuxinglanyue / ws.py
Last active December 4, 2015 08:28
通过python连接websocket
# install ws4py
# pip install ws4py
# easy_install ws4py
from ws4py.client.threadedclient import WebSocketClient
class DummyClient(WebSocketClient):
def opened(self):
self.send("www.baidu.com")
def closed(self, code, reason=None):
@liuxinglanyue
liuxinglanyue / B.java
Last active June 27, 2016 07:59
内部类类名和父类类名相同的问题
public class B {
public static void main(String[] args) {
}
public class B {
public String d;
}
}