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
#line 3 "lex.yy.c" | |
#define YY_INT_ALIGNED short int | |
/* A lexical scanner generated by flex */ | |
#define FLEX_SCANNER | |
#define YY_FLEX_MAJOR_VERSION 2 | |
#define YY_FLEX_MINOR_VERSION 5 |
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 service | |
import ( | |
pwi "pkg-without-interface" | |
) | |
type service struct {} | |
func (s *service) ListPosts() []Post { | |
posts := pwi.ListPosts() // ListPosts is a pkg function. |
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 main | |
import ( | |
"fmt" | |
"sort" | |
"sync" | |
"testing" | |
"time" | |
) |
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 main | |
import ( | |
"testing" | |
"github.com/jinzhu/gorm" | |
_ "github.com/jinzhu/gorm/dialects/mysql" | |
) | |
type Post struct { |
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
Syscall | Type | |
---|---|---|
SYS_TIME | RawSyscall | |
SYS_GETTIMEOFDAY | RawSyscall | |
SYS_SETRLIMIT | RawSyscall | |
SYS_GETRLIMIT | RawSyscall | |
SYS_EPOLL_WAIT | Syscall | |
SYS_MMAP2 | Syscall | |
SYS__NEWSELECT | Syscall | |
SYS_SETGROUPS32 | RawSyscall | |
SYS_GETGROUPS32 | RawSyscall |
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 main | |
import ( | |
"fmt" | |
) | |
var balance float64 = 0 | |
func main() { | |
deposit(.1) |
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 <math.h> | |
#include <stdio.h> | |
double attackerSuccessProbability(double q, int z) { | |
double p = 1.0 - q; | |
double lambda = z * (q / p); | |
double sum = 1.0; | |
int i, k; | |
for (k = 0; k <= z; k++) { | |
double poisson = exp(-lambda); |
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 main | |
import ( | |
"errors" | |
"sync" | |
"testing" | |
) | |
func BenchmarkChannel(b *testing.B) { | |
ch := make(chan error, 1) |
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 main | |
import ( | |
"fmt" | |
"math/rand" | |
"sort" | |
"sync" | |
"time" | |
"github.com/RussellLuo/timingwheel" |
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
func selectgo(cas0 *scase, order0 *uint16, ncases int) (int, bool) { | |
// ... | |
loop: | |
// ... | |
for i := 0; i < ncases; i++ { | |
casi = int(pollorder[i]) | |
cas = &scases[casi] | |
c = cas.c | |
switch cas.kind { |
NewerOlder