content
stringlengths
263
5.24M
pred_label
stringclasses
1 value
pred_score_pos
float64
0.6
1
#include "sam.h" #include "parse.h" int Glooping; int nest; int append(File*, Cmd*, Posn); int display(File*); void looper(File*, Cmd*, int); void filelooper(Cmd*, int); void linelooper(File*, Cmd*); void resetxec(void) { Glooping = nest = 0; } int cmdexec(File *f, Cmd *cp) { int i; Addr *ap; Address a; if(f ...
__label__POS
0.60201
#include "sam.h" Rune samname[] = L"~~sam~~"; Rune *left[]= { L"{[(<«", L"\n", L"'\"`", 0 }; Rune *right[]= { L"}])>»", L"\n", L"'\"`", 0 }; char RSAM[] = "sam"; char SAMTERM[] = "/bin/aux/samterm"; char HOME[] = "home"; char TMPDIR[] = "/tmp"; char SH[] = "rc"; char SHPATH[] = "/bin/rc"; char RX[] = "rx"; c...
__label__POS
0.672246
/* * Plan 9 versions of system-specific functions * By convention, exported routines herein have names beginning with an * upper case letter. */ #include "rc.h" #include "exec.h" #include "io.h" #include "fns.h" #include "getflags.h" char *Signame[] = { "sigexit", "sighup", "sigint", "sigquit", "sigalrm", "sigkil...
__label__POS
0.617686
#include "rc.h" #include "exec.h" #include "fns.h" unsigned hash(char *as, int n) { int i = 1; unsigned h = 0; uchar *s; s = (uchar *)as; while (*s) h += *s++ * i++; return h % n; } #define NKW 30 struct kw{ char *name; int type; struct kw *next; }*kw[NKW]; void kenter(int type, char *name) { int h = ha...
__label__POS
0.796209
#include "rc.h" #include "getflags.h" #include "fns.h" char *flagset[] = {"<flag>"}; char **flag[NFLAG]; char *cmdname; static char *flagarg=""; static void reverse(char**, char**); static int scanflag(int, char*); static void errn(char*, int); static void errs(char*); static void errc(int); static int reason; #define ...
__label__POS
0.613634
#include "rc.h" #include "exec.h" #include "io.h" #include "fns.h" tree *treenodes; /* * create and clear a new tree node, and add it * to the node list. */ tree* newtree(void) { tree *t = new(tree); t->iskw = 0; t->str = 0; t->child[0] = t->child[1] = t->child[2] = 0; t->next = treenodes; treenodes = t; ret...
__label__POS
0.8103
#include "rc.h" #include "getflags.h" #include "exec.h" #include "io.h" #include "fns.h" int havefork = 0; static char ** rcargv(char *s) { int argc; char **argv; word *p; p = vlook("*")->val; argv = emalloc((count(p)+6)*sizeof(char*)); argc = 0; argv[argc++] = argv0; if(flag['e']) argv[argc++] = "-Se"; e...
__label__POS
0.659841
adm d775 sys sys /tmp/empty nvram 400 sys sys ./root/nvram timezone d775 sys sys /tmp/empty lib d775 sys sys /tmp/empty namespace 664 sys sys ./root/k10root.namespace profile 664 sys sys ../root/profile mnt d775 sys sys /tmp/empty cons d775 sys sys /tmp/empty cons d775 sys sys /tmp/empty consctl d775 sys sys /...
__label__POS
1.00001
#include <u.h> #include <libc.h> #include <draw.h> #include "cons.h" /* * bind a pipe onto consctl and keep reading it to * get changes to console state. */ Consstate* consctl(void) { int i, n, fd, tries; char buf[128]; Consstate *x; char *field[10]; x = segattach(0, "shared", 0, sizeof *x); if(x == (void*...
__label__POS
0.870173
#include <u.h> #include <libc.h> #include <fcall.h> #include <bio.h> #include <regexp.h> #define Extern #include "exportfs.h" Reprog **exclude, **include; char *patternfile; void exclusions(void) { Biobuf *f; int ni, nmaxi, ne, nmaxe; char *line; if(patternfile == nil) return; f = Bopen(patternfile, OREAD); ...
__label__POS
0.888019
#include <u.h> #include <libc.h> #include <bio.h> #include <String.h> #include <thread.h> #include "wiki.h" /* * Get HTML and text templates from underlying file system. * Caches them, which means changes don't take effect for * up to Tcache seconds after they are made. * * If the files are deleted, we keep retu...
__label__POS
0.606327
#include <u.h> #include <libc.h> #include <bio.h> #include <String.h> #include <ctype.h> #include <thread.h> #include "wiki.h" void* erealloc(void *v, ulong n) { v = realloc(v, n); if(v == nil) sysfatal("out of memory reallocating %lud", n); setmalloctag(v, getcallerpc(&v)); return v; } void* emalloc(ulong n) {...
__label__POS
0.984813
#define EXTERN #include "gc.h" /* Bits bor(Bits a, Bits b) { Bits c; int i; for(i=0; i<BITS; i++) c.b[i] = a.b[i] | b.b[i]; return c; } */ /* Bits band(Bits a, Bits b) { Bits c; int i; for(i=0; i<BITS; i++) c.b[i] = a.b[i] & b.b[i]; return c; } */ /* Bits bnot(Bits a) { Bits c; int i; for(i=0; i<BI...
__label__POS
0.904604
#include <u.h> /* * The code makes two assumptions: strlen(ld) is 1 or 2; latintab[i].ld can be a * prefix of latintab[j].ld only when j<i. */ struct cvlist { char *ld; /* must be seen before using this conversion */ char *si; /* options for last input characters */ Rune *so; /* the corresponding Rune for eac...
__label__POS
0.991911
#include <u.h> #include <libc.h> #include "compat.h" typedef struct Exporter Exporter; struct Exporter { int fd; Chan **roots; int nroots; }; int mounter(char *mntpt, int how, int fd, int n) { char buf[32]; int i, ok, mfd; ok = 1; for(i = 0; i < n; i++){ snprint(buf, sizeof buf, "%d", i); mfd = dup(fd, -1...
__label__POS
0.884579
local abbremand = require('abbremand') local default_config = require('config') local api = vim.api local abbreinder = { next_abbr_id = 0, -- [abbr_id] = {tooltip_id, hl_id} abbr_data = {}, -- [buf_num] = bool enabled = {}, } -- @return namespace id local function get_namespace() local ns_nam...
__label__POS
0.800111
#include "astro.h" double dist(Obj1 *p, Obj1 *q) { double a; a = sin(p->decl2)*sin(q->decl2) + cos(p->decl2)*cos(q->decl2)*cos(p->ra-q->ra); a = fabs(atan2(pyth(a), a)) / radsec; return a; } int rline(int f) { char *p; int c; static char buf[1024]; static int bc, bn, bf; if(bf != f) { bf = f; bn = 0;...
__label__POS
0.884405
#include <u.h> #include <libc.h> #include <bio.h> #include <ip.h> #include <plumb.h> #include <thread.h> #include <fcall.h> #include <9p.h> #include "dat.h" #include "fns.h" void initibuf(Ibuf *b, Ioproc *io, int fd) { b->fd = fd; b->io = io; b->rp = b->wp = b->buf; } int readibuf(Ibuf *b, char *buf, int len) { i...
__label__POS
0.963846
#include <u.h> #include <libc.h> #include <bio.h> #include <ip.h> #include <plumb.h> #include <thread.h> #include <fcall.h> #include <9p.h> #include <mp.h> #include <libsec.h> #include "dat.h" #include "fns.h" static long _iovfprint(va_list *arg) { int fd; char *fmt; va_list arg2; fd = va_arg(*arg, int); fmt = v...
__label__POS
0.783244
#include "astro.h" double mercfp[] = { 0.013, 0.6807, 0.048, 0.6283, 0.185, 0.6231, 0.711, 0.6191, 0.285, 0.5784, 0.075, 0.5411, 0.019, 0.5585, 0.010, 2.8449, 0.039, 2.8117, 0.147, 2.8135, 0.552, 2.8126, 2.100, 2.8126, 3.724, 2.8046, 0.729, 2.7883, 0.186, 2.7890, 0.049, 2.7943, 0.013, ...
__label__POS
0.805465
#include <u.h> #include <libc.h> #include <bio.h> #include "sky.h" double PI_180 = 0.0174532925199432957692369; double TWOPI = 6.2831853071795864769252867665590057683943387987502; double LN2 = 0.69314718055994530941723212145817656807550013436025; static double angledangle=(180./PI)*MILLIARCSEC; int rint(char *p, int ...
__label__POS
0.664394
#include "gc.h" /* Bits bor(Bits a, Bits b) { Bits c; int i; for(i=0; i<BITS; i++) c.b[i] = a.b[i] | b.b[i]; return c; } */ /* Bits band(Bits a, Bits b) { Bits c; int i; for(i=0; i<BITS; i++) c.b[i] = a.b[i] & b.b[i]; return c; } */ /* Bits bnot(Bits a) { Bits c; int i; for(i=0; i<BITS; i++) c.b[...
__label__POS
0.909683
#include <u.h> #include <libc.h> void reboot(void) { int fd; fd = open("/dev/reboot", OWRITE); if(fd >= 0) write(fd, "reboot", 6); exits(0); } char* readenv(char *name, char *buf, int n) { char *ans; int f; char ename[200]; ans = buf; ename[0] = 0; strcat(ename, "/env/"); strcat(ename, name); f = open(...
__label__POS
0.988363
#include <u.h> #include <libc.h> #include <ctype.h> void usage(void) { print("status=usage\n"); exits(0); } char* skipspace(char *p) { while(isspace(*p)) p++; return p; } char* nextarg(char *p) { char *s; s = strchr(p, ','); if(s == nil) return p+strlen(p); /* to \0 */ while(*s == ',' || isspace(*s)) ...
__label__POS
0.681326
#include "stdinc.h" #include "9.h" typedef struct { char* argv0; int (*cmd)(int, char*[]); } Cmd; static struct { VtLock* lock; Cmd* cmd; int ncmd; int hi; } cbox; enum { NCmdIncr = 20, }; int cliError(char* fmt, ...) { char *p; va_list arg; va_start(arg, fmt); p = vsmprint(fmt, arg); vtSetError("%s",...
__label__POS
0.952103
#include <u.h> #include <libc.h> typedef uvlong u64int; #define TWID64 ((u64int)~(u64int)0) u64int unittoull(char *s) { char *es; u64int n; if(s == nil) return TWID64; n = strtoul(s, &es, 0); if(*es == 'k' || *es == 'K'){ n *= 1024; es++; }else if(*es == 'm' || *es == 'M'){ n *= 1024*1024; es++; }...
__label__POS
0.689696
</$objtype/mkfile TARG=\ 8prefix\ 9pcon\ accupoint\ acidleak\ apm\ astarld\ cddb\ clog\ consolefs\ data2s\ depend\ disksim\ getflags\ htmlsanitize\ lines\ listen\ listen1\ mklatinkbd\ ms2\ msexceltables\ mswordstrings\ mouse\ nfsmount\ olefs\ pcmcia\ portmap\ rdwr\ reboot\ searchfs\ statu...
__label__POS
0.716745
/* tc.c: find character not in table to delimit fields */ # include "t.h" # define COMMON "\002\003\005\006\007!%&#/?,:;<=>@`^~_{}+-*" \ "ABCDEFGHIJKMNOPQRSTUVWXZabcdefgjkoqrstwxyz" void choochar(void) { /* choose funny characters to delimit fields */ int had[128], ilin, icol, k; char *s; for (icol = 0; icol...
__label__POS
0.685348
/* ti.c: classify line intersections */ # include "t.h" /* determine local environment for intersections */ int interv(int i, int c) { int ku, kl; if (c >= ncol || c == 0) { if (dboxflg) { if (i == 0) return(BOT); if (i >= nlin) return(TOP); return(THRU); } if (c >= ncol) return(0); } ...
__label__POS
0.959217
/* tt.c: subroutines for drawing horizontal lines */ # include "t.h" int ctype(int il, int ic) { if (instead[il]) return(0); if (fullbot[il]) return(0); il = stynum[il]; return(style[ic][il]); } int min(int a, int b) { return(a < b ? a : b); } int fspan(int i, int c) { c++; return(c < ncol && ctype(i, c...
__label__POS
0.956749
#include <u.h> #include <libc.h> #include <thread.h> #include <venti.h> #include <bio.h> char *host; Biobuf b; VtConn *z; uchar *buf; void run(Biobuf*); int nn; void usage(void) { fprint(2, "usage: readlist [-h host] list\n"); threadexitsall("usage"); } int parsescore(uchar *score, char *buf, int n) { int i, c; ...
__label__POS
0.772804
#include "l.h" static usize nhunk; static usize tothunk; static char* hunk; void diag(char *fmt, ...) { char buf[STRINGSZ], *tn; va_list arg; tn = "??none??"; if(curtext != P && curtext->from.sym != S) tn = curtext->from.sym->name; va_start(arg, fmt); vseprint(buf, buf+sizeof(buf), fmt, arg); va_end(arg); ...
__label__POS
0.812083
#include "all.h" #define FDEV(d) ((d)->fw.fw) enum { DEBUG = 0 }; Devsize fwormsize(Device *d) { Devsize l; l = devsize(FDEV(d)); l -= l/(BUFSIZE*8) + 1; return l; } void fwormream(Device *d) { Iobuf *p; Device *fdev; Off a, b; print("fworm ream\n"); devinit(d); fdev = FDEV(d); a = fwormsize(d); b = ...
__label__POS
0.801529
#include "all.h" struct { char* name; Userid uid; Userid lead; } minusers[] = { "adm", -1, -1, "none", 0, -1, "tor", 1, 1, "sys", 10000, 0, "map", 10001, 10001, "doc", 10002, 0, "upas", 10003, 10003, "font", 10004, 0, "bootes", 10005, 10005, 0 }; static char buf[4096]; static Rune ichar[] = L"?=+...
__label__POS
0.699051
#include <u.h> #include <libc.h> enum { Soh= 0x1, Eot= 0x4, Ack= 0x6, Nak= 0x15, Cancel= 0x18, }; int notifyf(void*, char*); int readupto(uchar*, int); int receive(int, uchar); void send(int); int debug, dfd; void main(int argc, char **argv) { int fd; uchar seqno; ulong bytes; ARGBEGIN { case 'd': dfd ...
__label__POS
0.777528
#define EXTERN #include "gc.h" void listinit(void) { fmtinstall('A', Aconv); fmtinstall('P', Pconv); fmtinstall('S', Sconv); fmtinstall('N', Nconv); fmtinstall('D', Dconv); fmtinstall('B', Bconv); } int Bconv(Fmt *fp) { char str[STRINGSZ], ss[STRINGSZ], *s; Bits bits; int i; str[0] = 0; bits = va_arg(fp-...
__label__POS
0.671403
// // BZGFormViewController.h // // https://github.com/benzguo/BZGFormViewController // #import <UIKit/UIKit.h> #import "BZGFormCell.h" #import "NSError+BZGFormViewController.h" @class BZGInfoCell, BZGTextFieldCell, BZGPhoneTextFieldCell; @interface BZGFormViewController : UIViewController <UITableViewDelegate, UI...
__label__POS
0.775795
// // BZGKeyboardControlSpecs.m // // https://github.com/benzguo/BZGFormViewController // #import "BZGKeyboardControl.h" #import "BZGTextFieldCell.h" BZGKeyboardControl *keyboardControl; BZGTextFieldCell *cell1; BZGTextFieldCell *cell2; SpecBegin(BZGKeyboardControl) before(^{ keyboardControl = [[BZGKey...
__label__POS
0.781306
#include <u.h> #include <libc.h> #include <ctype.h> #include <authsrv.h> #include <mp.h> #include <libsec.h> #include <bio.h> #include "authcmdlib.h" char authkey[DESKEYLEN]; int verb; int usepass; int convert(char*, char*, int); int dofcrypt(int, char*, char*, int); void usage(void); void main(int argc, char *argv[...
__label__POS
0.691051
#include <u.h> #include <libc.h> #include <bio.h> #include <ctype.h> #include "authcmdlib.h" void clrbio(Acctbio *a) { int i; if(a->user) free(a->user); if(a->name) free(a->name); if(a->dept) free(a->dept); for(i = 0; i < Nemail; i++) if(a->email[i]) free(a->email[i]); memset(a, 0, sizeof(Acctbio)); ...
__label__POS
0.756984
#include <u.h> #include <libc.h> #include <authsrv.h> #include <bio.h> #include "authcmdlib.h" static char *pbmsg = "AS protocol botch"; int asrdresp(int fd, char *buf, int len) { char error[AERRLEN]; if(read(fd, buf, 1) != 1){ werrstr(pbmsg); return -1; } switch(buf[0]){ case AuthOK: if(readn(fd, buf, l...
__label__POS
0.626201
typedef struct Opt Opt; int debug; #define DPRINT if(debug)fprint enum { /* control characters */ Se= 240, /* end subnegotiation */ NOP= 241, Mark= 242, /* data mark */ Break= 243, Interrupt= 244, Abort= 245, /* TENEX ^O */ AreYouThere= 246, Erasechar= 247, /* erase last character */ Eraseline= 248...
__label__POS
0.699186
#include <u.h> #include <libc.h> #include <bio.h> #include "cb.h" #include "cbtype.h" static void usage(void) { fprint(2, "usage: cb [-sj] [-l width]\n"); exits("usage"); } void main(int argc, char *argv[]) { Biobuf stdin, stdout; ARGBEGIN{ case 'j': join = 1; break; case 'l': maxleng = atoi(EARGF(usage(...
__label__POS
0.740062
#include "headers.h" #define BUFFER 1 #define STRUCT 2 #define PUSHED 4 struct SmbBuffer { uchar *buf; ulong realmaxlen; ulong maxlen; ulong rn; ulong wn; ulong savewn; int flags; }; void smbbufferreset(SmbBuffer *s) { if (s == nil) return; s->rn = 0; s->wn = 0; s->flags &= ~PUSHED; } void smbbufferset...
__label__POS
0.864262
ushort smbnhgets(uchar *); ulong smbnhgetl(uchar *); vlong smbnhgetv(uchar *); void smbhnputs(uchar *, ushort); void smbhnputl(uchar *, ulong); void smbhnputv(uchar *, vlong); SMBPROCESSFN smbnegotiate; SMBPROCESSFN smbcomsessionsetupandx; SMBPROCESSFN smbcomtreeconnectandx; SMBPROCESSFN smbcomtransaction; SMBPROCESSF...
__label__POS
0.781471
#include <u.h> #include <libc.h> #include <ip.h> #include <thread.h> #include "netbios.h" int nbnsaddname(uchar *serveripaddr, NbName name, ulong ttl, uchar *ipaddr) { NbnsMessage *nq; Alt aa[3]; int tries = NbnsRetryBroadcast; NbnsAlarm *a; int rv; NbnsMessage *response; nq = nbnsmessagenameregistrationreques...
__label__POS
0.692182
#include <u.h> #include <libc.h> #include <ip.h> #include <thread.h> #include "netbios.h" static int decodehex(char c) { if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'A' && c <= 'F') return c - 'A' + 10; else if (c >= 'a' && c <= 'f') return c - 'a' + 10; return 0; } static char encodehex(int n) ...
__label__POS
0.872578
#include <u.h> #include <libc.h> #include <ip.h> #include <thread.h> #include "netbios.h" void nbnsmessagequestionfree(NbnsMessageQuestion **qp) { NbnsMessageQuestion *q = *qp; if (q) { free(q); *qp = nil; } } void nbnsmessageresourcefree(NbnsMessageResource **rp) { NbnsMessageResource *r = *rp; if (r) { f...
__label__POS
0.69698
#include "headers.h" void smbresponsereset(SmbSession *s) { smbbufferreset(s->response); } void smbresponseinit(SmbSession *s, ushort maxlen) { smbbufferfree(&s->response); s->response = smbbuffernew(maxlen); } int smbresponsealignl2(SmbSession *s, int l2a) { return smbbufferalignl2(s->response, l2a); } int smb...
__label__POS
0.940454
#include "all.h" #include <ndb.h> static int alarmflag; static int Iconv(Fmt*); static void openudp(int); static void cachereply(Rpccall*, void*, int); static int replycache(int, Rpccall*, long (*)(int, void*, long)); static void udpserver(int, Progmap*); static void tcpserver(int, Progmap*); static void getendpoints...
__label__POS
0.703869
#include <u.h> #include <libc.h> #include <ip.h> #include <thread.h> #include "netbios.h" int nbdgramconvM2S(NbDgram *s, uchar *ap, uchar *ep) { uchar *p = ap; int n; ushort length; if (ap + 6 + IPv4addrlen > ep) return 0; s->type = *p++; s->flags = *p++; s->id = nhgets(p); p+= 2; v4tov6(s->srcip, p); p+= I...
__label__POS
0.992044
#include <u.h> #include <libc.h> #include <ip.h> #include <thread.h> #include "netbios.h" int nbnsfindname(uchar *serveripaddr, NbName name, uchar *ipaddr, ulong *ttlp) { NbnsMessage *nq; Alt aa[3]; int tries = NbnsRetryBroadcast; NbnsAlarm *a; int rv; NbnsMessage *response; nq = nbnsmessagenamequeryrequestnew...
__label__POS
0.620355
#include "headers.h" static QLock logreflock, logprintlock; static int locked; void smbloglock(void) { qlock(&logreflock); if (locked++ == 0) qlock(&logprintlock); qunlock(&logreflock); } void smblogunlock(void) { qlock(&logreflock); if (locked && --locked == 0) qunlock(&logprintlock); qunlock(&logreflock)...
__label__POS
0.977104
#include "headers.h" int smbmatch(char *name, Reprog *rep) { Resub sub; sub.sp = nil; sub.ep = nil; if (regexec(rep, name, &sub, 1) && sub.sp == name && *sub.ep == 0) return 1; return 0; } Reprog * smbmkrep(char *pattern) { Reprog *r; int l; char *tmp, *p, *q, *t; l = strlen(pattern); tmp = smbemalloc(l *...
__label__POS
0.684417
#include "ssh.h" #include <bio.h> #include <ndb.h> char Edecode[] = "error decoding input packet"; char Eencode[] = "out of space encoding output packet (BUG)"; char Ehangup[] = "hungup connection"; char Ememory[] = "out of memory"; int debuglevel; int doabort; void error(char *fmt, ...) { va_list arg; char buf[20...
__label__POS
0.711371
#include "ssh.h" #include <bio.h> #include <ctype.h> static int parsepubkey(char *s, RSApub *key, char **sp, int base) { int n; char *host, *p, *z; z = nil; n = strtoul(s, &p, 10); host = nil; if(n < 256 || !isspace(*p)){ /* maybe this is a host name */ host = s; s = strpbrk(s, " \t"); if(s == nil) ret...
__label__POS
0.901071
#include <u.h> #include <libc.h> #include "iotrack.h" #include "dat.h" #include "fns.h" int readonly; static int deverror(char *name, Xfs *xf, long addr, long n, long nret) { errno = Eio; if(nret < 0){ chat("%s errstr=\"%r\"...", name); close(xf->dev); xf->dev = -1; return -1; } fprint(2, "dev %d sector %...
__label__POS
0.99982
#include <u.h> #include <libc.h> #include <bio.h> #include <ctype.h> Biobuf in; Biobuf out; enum { Empty, Sys, Dk, Ip, Domain, }; int iscomment(char *name) { return *name == '#'; } /* * is this a fully specified datakit name? */ int isdk(char *name) { int slash; slash = 0; for(; *name; name++){ if(is...
__label__POS
0.916784
/* * common code for all the assemblers */ void pragpack(void) { while(getnsc() != '\n') ; } void pragvararg(void) { while(getnsc() != '\n') ; } void pragfpround(void) { while(getnsc() != '\n') ; } void pragprofile(void) { while(getnsc() != '\n') ; } void pragincomplete(void) { while(getnsc() != '\n...
__label__POS
0.703456
#include "cc.h" static char *kwd[] = { "$adt", "$aggr", "$append", "$complex", "$defn", "$delete", "$do", "$else", "$eval", "$head", "$if", "$local", "$loop", "$return", "$tail", "$then", "$union", "$whatis", "$while", }; static char picklestr[] = "\tpickle(s, un, "; static char* pmap(char *s) { int i, bot, top,...
__label__POS
0.652314
#define VARMAC 0x80 long getnsn(void) { long n; int c; c = getnsc(); if(c < '0' || c > '9') return -1; n = 0; while(c >= '0' && c <= '9') { n = n*10 + c-'0'; c = getc(); } unget(c); return n; } Sym* getsym(void) { int c; char *cp; c = getnsc(); if(!isalpha(c) && c != '_' && c < Runeself) { unge...
__label__POS
0.633821
using Microsoft.Extensions.Logging; using MudBlazor; using MudBlazor.Services; using SerialSync.Misc; using System.Diagnostics; namespace SerialSync { public static class MauiProgram { public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder(); builde...
__label__POS
0.988082
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SerialSync.Models { using Microsoft.Maui.Storage; using System.Diagnostics; public class LayoutInfo { public bool LogIsRight { get; set; } public bool UserSett...
__label__POS
0.77021
using Microsoft.Extensions.Logging; using NLog.Extensions.Logging; using NLog.Targets; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SerialSync.Misc { public static class LogSetup { public static void ConfigureNLog(IServic...
__label__POS
0.946804
/* Copyright © Coraid, Inc. 2006. All rights reserved. */ #include <u.h> #include <libc.h> #include "cec.h" int fd = -1; int cfd = -1; int efd = -1; int netopen0(char *e) { char buf[128], ctl[13]; int n; snprint(buf, sizeof buf, "%s/clone", e); if((efd = open(buf, ORDWR)) == -1) return -1; memset(ctl, 0, siz...
__label__POS
0.988782
#include <u.h> #include <libc.h> #include <draw.h> #include <thread.h> #include <cursor.h> #include <mouse.h> #include <keyboard.h> #include <frame.h> #include <fcall.h> #include <plumb.h> #include "dat.h" #include "fns.h" #include <ctype.h> char Ebadwr[] = "bad rectangle in wctl request"; char Ewalloc[] = "window a...
__label__POS
0.741086
#include <u.h> #include <libc.h> int alarmed; int done; void usage(void) { fprint(2, "usage: %s [-q]\n", argv0); exits("usage"); } void ding(void*, char *s) { if(strstr(s, "alarm")){ alarmed = 1; noted(NCONT); } else noted(NDFLT); } void main(int argc, char **argv) { int fd, cfd; int i; char buf[1]; ...
__label__POS
0.617678
#include <u.h> #include <libc.h> void usage(void) { fprint(2, "usage: %s [-q] [-t secs] goodstring [badstring ...]\n", argv0); exits("usage"); } void catch(void*, char *s) { exits(s); } int writewithoutcr(int fd, char *p, int i) { char *q, *e; /* dump cr's */ for(e = p+i; p < e; ){ q = memchr(p, '\r', e-p);...
__label__POS
0.951009
#include "netvars.hpp" #include <fstream> #include <utility> #include "interfaces.hpp" void NetvarSys::Initialize() { m_tables.clear(); ClientClass* clientClass = iff.g_pClient->GetAllClasses(); if (!clientClass) return; while (clientClass) { RecvTable* recvTable = clientClass-...
__label__POS
0.964382
#include <u.h> #include <libc.h> void usage(void) { fprint(2, "usage: %s [-q] [-t seconds] command\n", argv0); exits("usage"); } struct { char *resp; int ok; } tab[] = { { "ok\n", 1 }, { "connect\n", 1 }, { "no carrier\n", 0 }, { "no dialtone\n", 0 }, { "error\n", 0 }, { "busy\n", 0 }, { "no answer\n",...
__label__POS
0.926794
/* * * debugger * */ #include "defs.h" #include "fns.h" int printcol = 0; int infile = STDIN; int maxpos = MAXPOS; Biobuf stdout; void printc(int c) { dprint("%c", c); } /* was move to next f1-sized tab stop; now just print a tab */ int tconv(Fmt *f) { return fmtstrcpy(f, "\t"); } void flushbuf(void) { if...
__label__POS
0.704482
#ifndef PHANDLE_H #define PHANDLE_H #ifdef _WIN32 #pragma once #endif #include "VGUI.h" namespace vgui { class Panel; class PHandle { public: PHandle() : m_iPanelID(INVALID_PANEL) {} Panel* Get(); Panel* Set(Panel* pPanel); Panel* Set(HPanel hPanel); operator Panel* () { return Get(); } Panel*...
__label__POS
0.630916
#include <u.h> #include <libc.h> #include <mp.h> #include <ctype.h> #include <libsec.h> #include <fcall.h> #include <thread.h> #include <9p.h> #include "netssh.h" enum { Arbsz = 256, }; static int parsepubkey(char *s, RSApub *key, char **sp, int base) { int n; char *host, *p, *z; z = nil; n = strtoul(s, &p, 10)...
__label__POS
0.661997
AAA pc,nopref AAAS pc,nopref aardvark n Aaron n AARP pc,nopref AAU pc,nopref AAUP pc,nopref AAUW pc,nopref ABA pc,nopref Ababa pc aback d abacus n abaft d abalone n abandon v,er,va abase v,er,va abash v,er,va abate v,er,va abattoir n abbe n abbess n abbey n abbot n Abbott n abbreviate v,ion abc n abcdefghijklmnopqrstuv...
__label__POS
0.999539
accessorize v,ion,va accouter v,va acknowledgment n aggrandize v,er,va airplane n allegorize v,er aluminize v,ion aluminum n americanize v,ion,va amphitheater n analog n,na analyze v,er,va anapest n anathematize v,ion anatomize v,ion anemia n anemic a anesthesia n anesthesiology n,na anesthetic n,na anesthetist n anest...
__label__POS
0.92625
acclimatise v,er,ion accoutre v,va aeon n aerodrome n aeroplane n aether n,na aetiology n aggrandise v,va alarum n,v allegorise v,er aluminise v,ion aluminium n americanise v,ion,va amphitheatre n anaemia n anaemic a anaesthesia n anaesthesiology n,na anaesthetic n,na anaesthetise v,ion anaesthetist n analyse v,er,va a...
__label__POS
0.964726
3B d 3B2 d 3B20 d 5ESS n,nopref AAAI pc,nopref abend n Abhaya pc,nopref Abramowitz n,nopref abs d Ackermann pc ACR pc,nopref Acta pc,nopref ACU n,nopref ADAPSO pc,nopref ADP pc,nopref ADPCM pc,nopref Afek n,nopref AFIPS pc,nopref Agrawal n,nopref Aho n,nopref AI pc,nopref AIP pc,nopref Airey n,nopref Alcatel pc,nopref ...
__label__POS
0.894236
accessive s accidently s acreless s actional s actioning s actless s actorize s adaptative s ailless s airyism s alienment s alteringly s amenment s analist s anality s analize s andless s anglingly s anticede s antichamber s anticlimatic s anticore s antidate s antidoe s antidot s antigent s antigone s antiline s anti...
__label__POS
0.999428
#include <u.h> #include <libc.h> #include <bio.h> #include "chain.h" #include "debug.h" #include "tap.h" #include "lebo.h" #include "bebo.h" #include "jtag.h" #include "icert.h" #include "mpsse.h" #include "/sys/src/9/kw/arm.h" #include "mmu.h" /* * Read, paying special atention to anything called * embedded-ice/d...
__label__POS
0.646268
#include <u.h> #include <libc.h> #include <bio.h> #include "chain.h" #include "debug.h" #include "tap.h" #include "lebo.h" #include "bebo.h" #include "jtag.h" #include "icert.h" #include "mmu.h" #include "mpsse.h" #include "/sys/src/9/kw/arm.h" /* * Feroceon's scan chain 15 does not work, I suspect it has the multi-...
__label__POS
0.839236
#include "gc.h" /* * Based on: Granlund, T.; Montgomery, P.L. * "Division by Invariant Integers using Multiplication". * SIGPLAN Notices, Vol. 29, June 1994, page 61. */ #define TN(n) ((uvlong)1 << (n)) #define T31 TN(31) #define T32 TN(32) int multiplier(ulong d, int p, uvlong *mp) { int l; uvlong mlo, mhi, t...
__label__POS
0.950891
#include "mk.h" static char *vexpand(char*, Envy*, Bufblock*); static char *shquote(char*, Rune, Bufblock*); static char *shbquote(char*, Bufblock*); void shprint(char *s, Envy *env, Bufblock *buf) { int n; Rune r; while(*s) { n = chartorune(&r, s); if (r == '$') s = vexpand(s, env, buf); else { rinse...
__label__POS
0.674456
#include "mk.h" char *shell = "/bin/rc"; char *shellname = "rc"; static Word *encodenulls(char*, int); void readenv(void) { char *p; int envf, f; Dir *e; char nam[1024]; int i, n, len; Word *w; rfork(RFENVG); /* use copy of the current environment variables */ envf = open("/env", OREAD); if(envf < 0) ...
__label__POS
0.628196
#ifndef DAR_H #define DAR_H #ifdef _WIN32 #pragma once #endif #include <stdlib.h> #include <string.h> #include "VGUI.h" #include "utlvector.h" #include "memdbgon.h" namespace vgui { template<class ELEMTYPE> class Dar : public CUtlVector< ELEMTYPE > { typedef CUtlVector< ELEMTYPE > BaseClass; public: Dar() ...
__label__POS
0.800891
#include <u.h> #include <libc.h> #include <bio.h> #include "snap.h" void panic(char *s) { fprint(2, "%s\n", s); abort(); exits(s); } static Proc* findpid(Proc *plist, long pid) { while(plist) { if(plist->pid == pid) break; plist = plist->link; } return plist; } Page* findpage(Proc *plist, long pid, int ...
__label__POS
0.787165
#include "a.h" /* * 16. Conditional acceptance of input. * * conditions are * c - condition letter (o, e, t, n) * !c - not c * N - N>0 * !N - N <= 0 * 'a'b' - if a==b * !'a'b' - if a!=b * * \{xxx\} can be used for newline in bodies * * .if .ie .el * */ int iftrue[20]; int niftrue; void startbody...
__label__POS
0.621958
#include "a.h" /* * 11. Local Horizontal and Vertical Motions, and the Width Function. */ int e_0(void) { /* digit-width space */ return ' '; } int dv(int d) { Rune sub[6]; d += getnr(L(".dv")); nr(L(".dv"), d); runestrcpy(sub, L("<sub>")); sub[0] = Ult; sub[4] = Ugt; if(d < 0){ sub[3] = 'p'; ihtml(...
__label__POS
0.872089
/* * Convert troff -ms input to HTML. */ #include "a.h" Biobuf bout; char* tmacdir; int verbose; int utf8 = 0; void usage(void) { fprint(2, "usage: htmlroff [-iuv] [-m mac] [-r an] [file...]\n"); exits("usage"); } void main(int argc, char **argv) { int i, dostdin; char *p; Rune *r; Rune buf[2]; Binit(&...
__label__POS
0.660342
# -*- coding: utf-8 -*- # Author:0verWatch def get_key(): key = 0 print("输入秘钥数字") key = int(input()) % 26 return key def get_message(): print("你的信息") message = input() return message def Encryption(message, key): encryption = "" for i in message: if i.isalpha(): ...
__label__POS
0.9973
# -*- coding: utf-8 -*- # Author:0verWatch from DES_destruct import * import re import base64 def write_in_file(str_mess): try: f = open('DES.txt','w',encoding='utf-8') f.write(str_mess) f.close() print("文件输出成功!") except IOError: print('文件加解密出错!!!') def read_out_file(...
__label__POS
0.95788
#include <u.h> #include <libc.h> #include <bio.h> #include "dict.h" void thesprintentry(Entry e, int cmd) { char *p, *pe; int c, i; p = e.start; pe = e.end; while(p < pe) { c = *p++; if(cmd == 'r') { outchar(c); continue; } switch(c) { case '*': c = *p++; if(cmd == 'h' && c != 'L') { ou...
__label__POS
0.760432
# -*- coding: utf-8 -*- # Author:0verWatch X = '' Y = '' Z = '' import base64 import re def str2bin(str_mess): res = "" for i in str_mess: tmp = bin(ord(i))[2:].zfill(8) res += tmp return res def bin2str(bin_mess): res = "" tmp = re.findall(r'.{8}',bin_mess) for i in tmp: ...
__label__POS
0.916684
# -*- coding: utf-8 -*- # Author:0verWatch import gmpy2 import math import random #也可以用自带的gmpy2库专门处理大数解密,相当于别人封装好了,但是对于理解这个算法各个部分还是得深入一下 def gmpy_enc(plain_mess, num_e, num_n): e = gmpy2.mpz(num_e) # 初始化大数 plain_mess = gmpy2.mpz(plain_mess) return pow(plain_mess, num_e, n) def gmpy_dec(cipher_mess, ...
__label__POS
0.843594
#ifndef UTLBLOCKMEMORY_H #define UTLBLOCKMEMORY_H #ifdef _WIN32 #pragma once #endif #include "dbg.h" #include "platform.h" #include "mathlib.h" #include "memalloc.h" #include "memdbgon.h" #pragma warning (disable:4100) #pragma warning (disable:4514) #ifdef UTBLOCKLMEMORY_TRACK #define UTLBLOCKMEMORY_TRACK_ALLOC() ...
__label__POS
0.688258
#include <u.h> #include <libc.h> #include <bio.h> #include "dict.h" /* * American Heritage Dictionary (encrypted) */ static Rune intab[256] = { [0x82] L'é', [0x85] L'à', [0x89] L'ë', [0x8a] L'è', [0xa4] L'ñ', [0xf8] L'°', [0xf9] L'·', }; static char tag[64]; enum{ Run, Openper, Openat, Closeat }; void ah...
__label__POS
0.713829
# MusicKit ### Pitch * `Pitch` is the basic unit of `MusicKit`. * A `Pitch` can be created with a MIDI number, or with a chroma and octave number. ```swift let A4 = Pitch(midi: 69) print(A4.noteName) // A4 print(A4.frequency) // 440.0 let DSharp2 = Pitch(chroma: .Ds, octave: 2) let C5 = Chroma.C*5 ``` * Chang...
__label__POS
0.645716
import XCTest import MusicKit final class PitchTests: XCTestCase { func testInitWithIntegralMidiNumber() { let sut = Pitch(midi: 69) XCTAssertEqual(sut.midi, 69) XCTAssert(sut.chroma == Optional(Chroma.a)) } func testInitWithNonIntegralMidiNumber() { var sut = Pitch(midi: 6...
__label__POS
0.795637
/* * push changes from client to server. */ #include "all.h" int douid; Db *db; char **x; int nx; int justshow; int verbose; int conflicts; char newpath[10000]; char oldpath[10000]; char *clientroot; char *serverroot; int copyfile(char*, char*, Dir*, int); int metafile(char*, Dir*); char **match; int nmatch; int is...
__label__POS
0.898412
import XCTest import MusicKit final class ChromaTests: XCTestCase { func testEquatable() { let sut1 = Chroma.c let sut2 = Chroma.d XCTAssertNotEqual(sut1, sut2) } func testHashable() { let sut = Chroma.c let hashValue = sut.hashValue XCTAssertEqual(hashValue...
__label__POS
0.754257
#include <u.h> #include <libc.h> #include <draw.h> #include <thread.h> #include <mouse.h> #include <keyboard.h> #include <frame.h> #include "flayer.h" #include "samterm.h" int cursorfd; int plumbfd = -1; int input; int got; int block; int kbdc; int resized; uchar *hostp; uchar *hoststop; uchar *plumbbase; uchar *plumb...
__label__POS
0.639078