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 <assert.h> | |
#include <vector> | |
#include <map> | |
class DecisionStmt { | |
public: | |
enum { DECISION_RET = (unsigned) -1 }; | |
typedef std::map<unsigned, int> CondResult; | |
typedef std::vector<CondResult> AccResults; | |
typedef std::vector<unsigned> CondList; |
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
/* | |
* http://www.bittorrent.org/beps/bep_0010.html | |
* http://www.bittorrent.org/beps/bep_0009.html | |
*/ | |
package bep.impl | |
import java.io._ | |
import io.netty.channel.ChannelHandlerContext | |
import io.netty.channel.ChannelInboundHandlerAdapter | |
import io.netty.buffer._ |
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 <iostream> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
class A | |
{ | |
}; | |
class B |
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
/* | |
* http://www.bittorrent.org/beps/bep_0010.html | |
* http://www.bittorrent.org/beps/bep_0009.html | |
*/ | |
package netty.sample | |
import io.netty.channel.ChannelHandlerContext | |
import io.netty.channel.ChannelInboundHandlerAdapter | |
import io.netty.buffer.ByteBuf | |
import io.netty.bootstrap.Bootstrap |
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
// e.g: copyDir("folder\\", "destFolder\\", false); | |
bool copyDir(const char *r_szSrcPath, const char *r_szDesPath, bool recur) { | |
WIN32_FIND_DATA FindFileData; | |
HANDLE hFind; | |
char l_szTmp[MAX_PATH]; | |
strcpy(l_szTmp, r_szSrcPath); | |
char l_szSrcPath[MAX_PATH]; | |
char l_szDesPath[MAX_PATH]; | |
strcpy(l_szSrcPath, r_szSrcPath); |
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 netty.sample | |
import io.netty.channel.ChannelHandlerContext | |
import io.netty.channel.ChannelInboundHandlerAdapter | |
import io.netty.buffer.ByteBuf | |
import io.netty.bootstrap.Bootstrap | |
import io.netty.channel._ | |
import io.netty.channel.nio._ | |
import io.netty.channel.socket._ | |
import io.netty.channel.socket.nio._ |
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 netty.sample | |
import io.netty.channel.ChannelHandlerContext | |
import io.netty.channel.ChannelInboundHandlerAdapter | |
import io.netty.buffer.ByteBuf | |
import io.netty.bootstrap.ServerBootstrap | |
import io.netty.channel.ChannelOption | |
import io.netty.channel.ChannelOption._ | |
import io.netty.channel.ChannelFuture | |
import io.netty.channel.ChannelInitializer |
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 squtest | |
import org.squeryl.PrimitiveTypeMode._ | |
import org.squeryl.Schema | |
import org.squeryl.annotations.Column | |
import org.squeryl.SessionFactory | |
import org.squeryl.Session | |
import org.squeryl.KeyedEntity | |
import org.squeryl.adapters.H2Adapter | |
import java.util.Date |
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 test | |
import com.sun.jna._ | |
import com.sun.jna.ptr._ | |
trait Kernel32 extends Library { | |
def GetDiskFreeSpaceA(lpRootPathName: String, | |
lpSectorsPerCluster: IntByReference, lpBytesPerSector: IntByReference, | |
lpNumberOfFreeClusters: IntByReference, lpTotalNumberOfClusters: IntByReference): Boolean | |
def GetComputerNameW(outName: Array[Char], size: IntByReference): Boolean |
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
object Test2 { | |
//Also: def callFn(a: Int, f: (Int) => Int) = { | |
def callFn(a: Int, f: Int => Int) = { | |
a + f(a) | |
} | |
// 2 parameters | |
def callFnMult(a: Int, f: (Int, Int) => Int) = { | |
a + f(a, a) |