text
stringlengths
2
99.9k
meta
dict
/***************************************************************************** ** Copyright (c) 2012 Ushahidi Inc ** All rights reserved ** Contact: [email protected] ** Website: http://www.ushahidi.com ** ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: http://www.gnu.org/licenses/lgpl.html. ** ** ** If you have questions regarding the use of this file, please contact ** Ushahidi developers at [email protected]. ** *****************************************************************************/ #import "USHPhoto.h" #import "USHReport.h" @implementation USHPhoto @dynamic identifier; @dynamic image; @dynamic thumb; @dynamic title; @dynamic url; @dynamic report; @end
{ "pile_set_name": "Github" }
/ init -- process control initialization mount = 21. sys intr; 0 / turn off interrupts sys quit; 0 cmp csw,$73700 / single user? bne 1f / no help: clr r0 / yes sys close / close current read mov $1,r0 / and write sys close / files sys open; ctty; 0 / open control tty sys open; ctty; 1 / for read and write sys exec; shell; shellp / execute shell br help / keep trying 1: mov $'0,r1 / prepare to change 1 : movb r1,tapx+8 / mode of dec tape drive x, where sys chmod; tapx; 17 / x=0 to 7, to read/write by owner or inc r1 / non-owner mode cmp r1,$'8 / finished? blo 1b / no sys mount; rk0; usr / yes, root file on mounted rko5 / disk ls /usr sys creat; utmp; 16 / truncate /tmp/utmp sys close / close it movb $'x,zero+8. / put identifier in output buffer jsr pc,wtmprec / go to write accting info mov $itab,r1 / address of table to r1 / create shell processes 1: mov (r1)+,r0 / 'x, x=0, 1... to r0 beq 1f / branch if table end movb r0,ttyx+8 / put symbol in ttyx jsr pc,dfork / go to make new init for this ttyx mov r0,(r1)+ / save child id in word offer '0, '1,...etc. br 1b / set up next child / wait for process to die 1: sys wait / wait for user to terminate process mov $itab,r1 / initialize for search / search for process id 2: tst (r1)+ / bump r1 to child id location beq 1b / ? something silly cmp r0,(r1)+ / which process has terminated
{ "pile_set_name": "Github" }
//char INT_CIGAROP[] = {'M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'}; int BTI[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A | C | G | T 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // a | c | g | t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; typedef struct // probabilities are in log10space { int states; // match, insertion,deletion float** TRS; // transition probabilities between states float** MEM; // probability of A->C, A->G (match state) float match; float mismatch; float insertion; float deletion; // emission probs // ***probabilities in log10 space *** float** lTRS; // transition probabilities between states float** lMEM; // probability of A->C, A->G (match state) float lmatch; float lmismatch; float linsertion; float ldeletion; // emission probs } Align_Params; extern Align_Params *AP; // allocate memory and initializes Align_Params* init_params() { int i=0,j=0; Align_Params *AP = malloc(sizeof(Align_Params)); (*AP).states = 3; (*AP).lTRS = calloc((*AP).states,sizeof(float*)); // match =0, ins =1, del = 2 for (i=0;i<AP->states;i++) AP->lTRS[i] = calloc(sizeof(float),AP->states); // initialize alignment parameters data structure AP->lmatch = log10(0.97); AP->lmismatch = log10(0.01); AP->ldeletion = log10(1); AP->linsertion =log10(1); AP->lTRS[0][0] = log10(0.892); AP->lTRS[0][1] = log10(0.071); AP->lTRS[0][2] = log10(0.037); // match to match, ins, del AP->lTRS[1][0] = log10(0.740); AP->lTRS[1][1] = log10(0.26); // insertion AP->lTRS[2][0] = log10(0.88); AP->lTRS[2][2] = log10(0.12); // deletion AP->lMEM = calloc(4,sizeof(float*)); for (i=0;i<4;i++) AP->lMEM[i] = calloc(4,sizeof(float)); for (i=0;i<4;i++) { for (j=0;j<4;j++) { if (i==j) AP->lMEM[i][j] = AP->lmatch; else AP->lMEM[i][j] = AP->lmismatch; } } (*AP).TRS = calloc((*AP).states,sizeof(float*)); // match =0, ins =1, del = 2 for (i=0;i<AP->states;i++) AP->TRS[i] = calloc(sizeof(float),AP->states); AP->MEM = calloc(4,sizeof(float*)); for (i=0;i<4;i++) AP->MEM[i] = calloc(4,sizeof(float)); AP->match = pow(10,AP->lmatch); AP->mismatch = pow(10,AP->lmismatch); AP->deletion = pow(10,AP->ldeletion); AP->insertion = pow(10,AP->linsertion); for (i=0;i<4;i++) { for (j=0;j<4;j++) { AP->MEM[i][j] = pow(10,AP->lMEM[i][j]); if (i < 3 && j < 3) AP->TRS[i][j] = pow(10,AP->lTRS[i][j]); } } return AP; } // for every HP of length 'k', tabulate # of times read-correctly and indel error int estimate_counts_read(struct alignedread* read,REFLIST* reflist,int* emission_counts,int* trans_counts,int* indel_lengths) { //static int emission_counts[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // AA AC AG AT | CA,CC,CG,CT |... 16 pairs im match state //static int trans_counts[9] = {0,0,0,0,0,0,0,0,0}; // M->M, M->I,M-D | I->M, I->D, I->I // 0 = M | I =1, D = 2 from cigar encoding // read->strand is also needed for emission counts int b1=0,b2=0; int current = reflist->current; if (current < 0 || reflist->used[current] ==0) return -1; //int f=0; int i=0,t=0, l1=0,l2=0; int l=0; int op; int prevop = -1; for (i=0;i<read->cigs;i++) { op = read->cigarlist[i]&0xf; l = read->cigarlist[i]>>4; if (op == BAM_CMATCH || op == BAM_CEQUAL || op == BAM_CDIFF) { if (prevop == 1) { trans_counts[1*3+0] +=1; indel_lengths[20] +=1; } else if (prevop == 2) { trans_counts[2*3+0] +=1; indel_lengths[0] +=1; } trans_counts[0*3+0] += l-1; // l-1 self loops for (t=0;t<l;t++) { //fprintf(stdout,"current %d len %d %d %d %c\n",current,reflist->lengths[current],read->position,l2,reflist->sequences[current][0]); b1 = BTI[reflist->sequences[current][read->position+l2+t-1]]; b2 = BTI[(int)read->sequence[l1+t]]; if (b1 > 0 && b2 > 0 && b1 <= 4 && b2 <= 4) { if ((read->flag & 16) ==0) emission_counts[(b1-1)*4 + (b2-1)] +=1; else emission_counts[(4-b1)*4 + (4-b2)] +=1; } } } if (op == BAM_CDEL) { if (VERBOSE==3 && l < 10) { for (t=-5;t<0;t++) fprintf(stderr,"%c",reflist->sequences[current][read->position+l2+t-1]); fprintf(stderr,"|"); for (t=0;t<l;t++) fprintf(stderr,"%c",reflist->sequences[current][read->position+l2+t-1]); fprintf(stderr,"|"); for (t=l;t<l+15;t++) fprintf(stderr,"%c",reflist->sequences[current][read->position+l2+t-1]); fprintf(stderr," DEL %d %d\n",l,l2+read->position-1); /* */ } if (prevop == BAM_CMATCH || prevop == BAM_CEQUAL || prevop == BAM_CDIFF) trans_counts[0*3 + 2] +=1; if (l < 10) trans_counts[2*3+2] +=l-1; if (l < 20) indel_lengths[l] +=1; } if (op == BAM_CINS) { if (VERBOSE==3 && l < 10) { for (t=-5;t<0;t++) fprintf(stderr,"%c",reflist->sequences[current][read->position+l2+t-1]); fprintf(stderr,"|"); for (t=0;t<l;t++) fprintf(stderr,"%c",read->sequence[l1+t]); fprintf(stderr,"|"); for (t=l;t<l+15;t++) fprintf(stderr,"%c",reflist->sequences[current][read->position+l2+t-1]); fprintf(stderr," INS %d %d\n",l,read->position+l2-1); /* */ } if (prevop == BAM_CMATCH || prevop == BAM_CEQUAL || prevop == BAM_CDIFF) trans_counts[0*3 + 1] +=1; if (l < 10) trans_counts[1*3+1] +=l-1; if (l < 20) indel_lengths[l+20] +=1; } if (op == BAM_CMATCH || op >= 7) { l1 +=l; l2 +=l; } else if (op == BAM_CDEL || op == BAM_CREF_SKIP) l2 +=l; else if (op == BAM_CINS || op == BAM_CSOFT_CLIP) l1 += l; prevop = op; } return 1; } void print_error_params(int* emission_counts,int* trans_counts,int* indel_lengths,Align_Params* AP) { char ITB[] = {'A','C','G','T'}; char state[] = {'M','I','D'}; int b1=0,b2=0; for (b1=0;b1<4;b1++) { int total =0.01; for (b2=0;b2<4;b2++) total += emission_counts[b1*4+b2]; for (b2=0;b2<4;b2++) { AP->lMEM[b1][b2] = log10((float)(emission_counts[b1*4+b2]+1)/total); AP->MEM[b1][b2] = (float)(emission_counts[b1*4+b2]+1)/total; fprintf(stderr,"%c -> %c %0.4f %f | ",ITB[b1],ITB[b2],(float)emission_counts[b1*4+b2]/total,AP->MEM[b1][b2]); } fprintf(stderr,"\n"); } for (b1=0;b1<3;b1++) { int total =0.01; for (b2=0;b2<3;b2++) total += trans_counts[b1*3+b2]; for (b2=0;b2<3;b2++) { AP->lTRS[b1][b2] = log10((float)(trans_counts[b1*3+b2]+1)/total); AP->TRS[b1][b2] = (float)(trans_counts[b1*3+b2]+1)/total; fprintf(stderr,"%c -> %c %0.4f %f | ",state[b1],state[b2],(float)trans_counts[b1*3+b2]/total,AP->TRS[b1][b2]); } fprintf(stderr,"\n"); } //for (pr=0;pr<16;pr++) fprintf(stdout,"%c:%c %d \n",ITB[pr/4],ITB[pr%4],emission_counts[pr]); //fprintf(stderr,"emission for match state \nreads transition counts \n"); //for (pr=0;pr<9;pr++) fprintf(stdout,"%c:%c %d \n",state[pr/3],state[pr%3],trans_counts[pr]); //for (pr=0;pr<10;pr++) fprintf(stderr,"%d del: %d ins: %d \n",pr,indel_lengths[pr],indel_lengths[pr+20]); } // reflist only has sequences for contigs in VCF, so this can cause segfault int realignment_params(char* bamfile,REFLIST* reflist,char* regions,Align_Params* AP) { struct alignedread* read = (struct alignedread*) malloc(sizeof (struct alignedread)); int i=0; int emission_counts[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; // AA AC AG AT | CA,CC,CG,CT |... 16 pairs im match state int trans_counts[] = {0,0,0,0,0,0,0,0,0}; // M->M, M->I,M-D | I->M, I->D, I->I int *indel_lengths = calloc(40,sizeof(int)); for (i=0;i<40;i++) indel_lengths[i]=0; // 0 = M | I =1, D = 2 from cigar encoding char* newregion = calloc(4096,sizeof(char)); samFile *fp; bam_hdr_t *hdr; bam1_t *b; hts_itr_t *iter = NULL; hts_idx_t *idx; // bam file index int ret; //int ref=-1,beg=0,end=0; if ((fp = sam_open(bamfile, "r")) == NULL) { fprintf(stderr, "Fail to open BAM file %s\n", bamfile); return -1; } if ((hdr = sam_hdr_read(fp)) == NULL) { fprintf(stderr, "Fail to read header from file %s\n", bamfile); sam_close(fp); return -1; } if (regions != NULL) { strcpy(newregion,regions); for (i=0;i<strlen(newregion);i++) { if (newregion[i] == ':') break; } newregion[i+1] = '\0'; //fprintf(stderr,"newrion %s %s \n",regions,newregion); if ((idx = bam_index_load(bamfile)) ==0) { fprintf(stderr,"unable to load bam index for file %s\n",bamfile); return -1; } iter = sam_itr_querys(idx,hdr,newregion); if (iter == NULL) { fprintf(stderr,"invalid region for bam file %s \n",regions); return -1; } } b = bam_init1(); // sam_read1(fp,hdr,b) int prevtid =-1; int reads=0,ureads=0,useful=0; reflist->current = -1; while (reads < 10000) { if (!iter) ret = sam_read1(fp,hdr,b); // read full bam file else ret = sam_itr_next(fp,iter,b); // specific region if (ret < 0) break; fetch_func(b, hdr, read); if ((read->flag & (BAM_FUNMAP | BAM_FSECONDARY | BAM_FQCFAIL | BAM_FDUP | 2048)) || read->mquality < MIN_MQ) { free_readmemory(read); continue; } if (read->tid != prevtid) { reflist->current = -1; for (i = 0; i < reflist->ns; i++) { if (strcmp(reflist->names[i], read->chrom) == 0) { reflist->current = i; break; } } } //if (reflist->current < 0) continue; reads +=1; //print_read_debug(read); useful = estimate_counts_read(read,reflist,emission_counts,trans_counts,indel_lengths); if (useful > 0) ureads +=1; prevtid = read->tid; } fprintf(stderr,"using %d reads to estimate realignment parameters for HMM \n",reads); if (ureads > 1000) print_error_params(emission_counts,trans_counts,indel_lengths,AP); bam_destroy1(b); bam_hdr_destroy(hdr); sam_close(fp); free(newregion); return 0; }
{ "pile_set_name": "Github" }
package com.hfad.bitsandpizzas; /** * Created by davidg on 04/05/2017. */ public class Pizza { private String name; private int imageResourceId; public static final Pizza[] pizzas = { new Pizza("Diavolo", R.drawable.diavolo), new Pizza("Funghi", R.drawable.funghi) }; private Pizza(String name, int imageResourceId) { this.name = name; this.imageResourceId = imageResourceId; } public String getName() { return name; } public int getImageResourceId() { return imageResourceId; } }
{ "pile_set_name": "Github" }
/* crypto/evp/e_xcbc_d.c */ /* Copyright (C) 1995-1998 Eric Young ([email protected]) * All rights reserved. * * This package is an SSL implementation written * by Eric Young ([email protected]). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson ([email protected]). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young ([email protected])" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson ([email protected])" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #include "cryptlib.h" #ifdef OPENSSL_SYS_WINDOWS #include <stdio.h> #endif #ifndef OPENSSL_NO_DES #include <openssl/evp.h> #include <openssl/objects.h> #include "evp_locl.h" #include <openssl/des.h> static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv,int enc); static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl); typedef struct { DES_key_schedule ks;/* key schedule */ DES_cblock inw; DES_cblock outw; } DESX_CBC_KEY; #define data(ctx) ((DESX_CBC_KEY *)(ctx)->cipher_data) static const EVP_CIPHER d_xcbc_cipher= { NID_desx_cbc, 8,24,8, EVP_CIPH_CBC_MODE, desx_cbc_init_key, desx_cbc_cipher, NULL, sizeof(DESX_CBC_KEY), EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL, NULL }; const EVP_CIPHER *EVP_desx_cbc(void) { return(&d_xcbc_cipher); } static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { DES_cblock *deskey = (DES_cblock *)key; DES_set_key_unchecked(deskey,&data(ctx)->ks); TINYCLR_SSL_MEMCPY(&data(ctx)->inw[0],&key[8],8); TINYCLR_SSL_MEMCPY(&data(ctx)->outw[0],&key[16],8); return 1; } static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while (inl>=EVP_MAXCHUNK) { DES_xcbc_encrypt(in,out,(long)EVP_MAXCHUNK,&data(ctx)->ks, (DES_cblock *)&(ctx->iv[0]), &data(ctx)->inw, &data(ctx)->outw, ctx->encrypt); inl-=EVP_MAXCHUNK; in +=EVP_MAXCHUNK; out+=EVP_MAXCHUNK; } if (inl) DES_xcbc_encrypt(in,out,(long)inl,&data(ctx)->ks, (DES_cblock *)&(ctx->iv[0]), &data(ctx)->inw, &data(ctx)->outw, ctx->encrypt); return 1; } #endif
{ "pile_set_name": "Github" }
package opentracing import ( "context" "github.com/opentracing/opentracing-go" otext "github.com/opentracing/opentracing-go/ext" "github.com/go-kit/kit/endpoint" ) // TraceServer returns a Middleware that wraps the `next` Endpoint in an // OpenTracing Span called `operationName`. // // If `ctx` already has a Span, it is re-used and the operation name is // overwritten. If `ctx` does not yet have a Span, one is created here. func TraceServer(tracer opentracing.Tracer, operationName string) endpoint.Middleware { return func(next endpoint.Endpoint) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { serverSpan := opentracing.SpanFromContext(ctx) if serverSpan == nil { // All we can do is create a new root span. serverSpan = tracer.StartSpan(operationName) } else { serverSpan.SetOperationName(operationName) } defer serverSpan.Finish() otext.SpanKindRPCServer.Set(serverSpan) ctx = opentracing.ContextWithSpan(ctx, serverSpan) return next(ctx, request) } } } // TraceClient returns a Middleware that wraps the `next` Endpoint in an // OpenTracing Span called `operationName`. func TraceClient(tracer opentracing.Tracer, operationName string) endpoint.Middleware { return func(next endpoint.Endpoint) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { var clientSpan opentracing.Span if parentSpan := opentracing.SpanFromContext(ctx); parentSpan != nil { clientSpan = tracer.StartSpan( operationName, opentracing.ChildOf(parentSpan.Context()), ) } else { clientSpan = tracer.StartSpan(operationName) } defer clientSpan.Finish() otext.SpanKindRPCClient.Set(clientSpan) ctx = opentracing.ContextWithSpan(ctx, clientSpan) return next(ctx, request) } } }
{ "pile_set_name": "Github" }
export function parseStyle(str) { if (typeof str != 'string') return str; var style = {}, parts = str.split(';'); for (var i = 0; i < parts.length; i++) { let part = parts[i]; let colonIndex = part.indexOf(':'); if (colonIndex == -1) continue; let name = part.substring(0, colonIndex).trim(); let value = part.substring(colonIndex + 1).trim(); name = name.split('-') .map((p, i)=>(i == 0 ? p : (p[0].toUpperCase() + p.substring(1)))) .join(''); style[name] = value; } return style; }
{ "pile_set_name": "Github" }
#! /usr/bin/env python """Token constants (from "token.h").""" # Taken from Python (r53757) and modified to include some tokens # originally monkeypatched in by pgen2.tokenize #--start constants-- ENDMARKER = 0 NAME = 1 NUMBER = 2 STRING = 3 NEWLINE = 4 INDENT = 5 DEDENT = 6 LPAR = 7 RPAR = 8 LSQB = 9 RSQB = 10 COLON = 11 COMMA = 12 SEMI = 13 PLUS = 14 MINUS = 15 STAR = 16 SLASH = 17 VBAR = 18 AMPER = 19 LESS = 20 GREATER = 21 EQUAL = 22 DOT = 23 PERCENT = 24 BACKQUOTE = 25 LBRACE = 26 RBRACE = 27 EQEQUAL = 28 NOTEQUAL = 29 LESSEQUAL = 30 GREATEREQUAL = 31 TILDE = 32 CIRCUMFLEX = 33 LEFTSHIFT = 34 RIGHTSHIFT = 35 DOUBLESTAR = 36 PLUSEQUAL = 37 MINEQUAL = 38 STAREQUAL = 39 SLASHEQUAL = 40 PERCENTEQUAL = 41 AMPEREQUAL = 42 VBAREQUAL = 43 CIRCUMFLEXEQUAL = 44 LEFTSHIFTEQUAL = 45 RIGHTSHIFTEQUAL = 46 DOUBLESTAREQUAL = 47 DOUBLESLASH = 48 DOUBLESLASHEQUAL = 49 AT = 50 OP = 51 COMMENT = 52 NL = 53 RARROW = 54 ERRORTOKEN = 55 N_TOKENS = 56 NT_OFFSET = 256 #--end constants-- tok_name = {} for _name, _value in globals().items(): if type(_value) is type(0): tok_name[_value] = _name def ISTERMINAL(x): return x < NT_OFFSET def ISNONTERMINAL(x): return x >= NT_OFFSET def ISEOF(x): return x == ENDMARKER
{ "pile_set_name": "Github" }
.. _data_get_img_params: Get Image Calibration Parameters ================================ Use ``GetIntrinsics()`` & ``GetExtrinsics()`` to get image calibration parameters. .. tip:: The detailed meaning of parameters can reference the files in ``tools/writer/config`` , of these the image calibration parameters of S21XX are in ``tools/writer/config/S21XX`` the image calibration parameters of S1030 are in ``tools/writer/config/S1030`` Note Camera Intrinsics/Extrinsics, please ref to: ros `CameraInfo <http://docs.ros.org/melodic/api/sensor_msgs/html/msg/CameraInfo.html>`_. Reference code snippet: .. code-block:: c++ auto &&api = API::Create(argc, argv); LOG(INFO) << "Intrinsics left: {" << *api->GetIntrinsicsBase(Stream::LEFT) << "}"; LOG(INFO) << "Intrinsics right: {" << *api->GetIntrinsicsBase(Stream::RIGHT) << "}"; LOG(INFO) << "Extrinsics right to left: {" << api->GetExtrinsics(Stream::RIGHT, Stream::LEFT) << "}"; Reference result on Linux: .. code-block:: bash $ ./samples/_output/bin/get_img_params I/utils.cc:48 MYNT EYE devices: I/utils.cc:51 index: 0, name: MYNT-EYE-S1030, sn: 4B4C192400090712, firmware: 2.4 I/utils.cc:60 Only one MYNT EYE device, select index: 0 I/synthetic.cc:59 camera calib model: kannala_brandt I/utils.cc:93 MYNT EYE requests: I/utils.cc:96 index: 0, request: width: 752, height: 480, format: Format::YUYV, fps: 60 I/utils.cc:96 index: 1, request: width: 376, height: 240, format: Format::YUYV, fps: 60 I/utils.cc:107 There are 2 stream requests, select index: 0 I/get_img_params.cc:44 Intrinsics left: {equidistant, width: 752, height: 480, k2: 0.00986113697985857, k3: -0.11937208025856659, k4: 0.19092250072175385, k5: -0.10168315832257743, mu: 356.41566867259672335, mv: 356.31078130432149464, u0: 375.76739787805968263, v0: 246.20025492033516912} I/get_img_params.cc:45 Intrinsics right: {equidistant, width: 752, height: 480, k2: -0.02246312175999786, k3: 0.01303393297719630, k4: -0.01735983686524734, k5: 0.00675132874903371, mu: 357.96820061652590539, mv: 357.76889287108474491, u0: 397.09281703352422710, v0: 258.93978588846073308} I/get_img_params.cc:46 Extrinsics right to left: {rotation: [0.99997489222742053, 0.00041828202737396, -0.00707389248605010, -0.00042920419615213, 0.99999871813992847, -0.00154256353448567, 0.00707323819170721, 0.00154556094848940, 0.99997378992793495], translation: [-120.01607586757218371, 0.34488126401045993, 0.64552185106557303]} ROSMsgInfoPair: left: width: 752, height: 480 distortion_model: KANNALA_BRANDT D: 0.00986114,-0.119372,0.190923,-0.101683,0, K: 356.416,0,375.767,0,356.311,246.2,0,0,1, R: 0.999919,-0.00246361,-0.0124477,0.00245407,0.999997,-0.000781093,0.0124496,0.000750482,0.999922, P: 357.04,0,511.114,0,0,357.04,311.965,0,0,0,1,0, right: width: 752, height: 480 distortion_model: KANNALA_BRANDT D: -0.0224631,0.0130339,-0.0173598,0.00675133,0, K: 357.968,0,397.093,0,357.769,258.94,0,0,1, R: 0.999981,-0.00287357,-0.00537853,0.00287782,0.999996,0.000781842,0.00537626,-0.000797306,0.999985, P: 357.04,0,511.114,-42851.3,0,357.04,311.965,0,0,0,1,0, Complete code examples, see `get_img_params.cc <https://github.com/slightech/MYNT-EYE-S-SDK/blob/master/samples/get_img_params.cc>`_ .
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=enum.LiteralKind.html"> </head> <body> <p>Redirecting to <a href="enum.LiteralKind.html">enum.LiteralKind.html</a>...</p> <script>location.replace("enum.LiteralKind.html" + location.search + location.hash);</script> </body> </html>
{ "pile_set_name": "Github" }
pip
{ "pile_set_name": "Github" }
{ "__comment": "Generated by generateResources.py function: model", "parent": "item/generated", "textures": { "layer0": "tfc:items/gem/normal/emerald" } }
{ "pile_set_name": "Github" }
#define COMPONENT sys_intercom #define COMPONENT_BEAUTIFIED Vehicle Intercom #include "\idi\acre\addons\main\script_mod.hpp" // #define DRAW_INFANTRYPHONE_INFO // Draws infantry phone position // #define DRAW_CURSORPOS_INFO // Draws cursor position and intersection with object // #define DEBUG_VEHICLE_INFO // Uses a long dummy vehicle info line // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_SYS_INTERCOM #define DEBUG_MODE_FULL #endif #ifdef DEBUG_SETTINGS_SYS_INTERCOM #define DEBUG_SETTINGS DEBUG_SETTINGS_SYS_INTERCOM #endif #include "\idi\acre\addons\main\script_macros.hpp" #include "script_acre_rackIntercom_defines.hpp" #include "script_acre_intercom_defines.hpp" #define PHONE_MAXDISTANCE_DEFAULT 10 #define PHONE_MAXDISTANCE_HULL 3 // Infantry phone default configuration (fnc_infantryPhoneRingingPFH.sqf) #define INFANTRY_PHONE_SOUNDFILE QPATHTO_R(sounds\Cellphone_Ring.wss); #define INFANTRY_PHONE_SOUND_PFH_DURATION 2.25 #define INFANTRY_PHONE_VOLUME 3.16 #define INFANTRY_PHONE_SOUNDPITCH 1 #define INFANTRY_PHONE_MAX_DISTANCE 75 #define ACTION_INTERCOM_PTT 0 #define ACTION_BROADCAST 1 #define INTERCOM_ACCENT_VOLUME_FACTOR 0.8 #define MINIMUM_INTERCOM_ACCENT_VOLUME 0.1 #define MAIN_DISPLAY (findDisplay 31337)
{ "pile_set_name": "Github" }
<?php /** * PHPExcel * * Copyright (c) 2006 - 2014 PHPExcel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * @category PHPExcel * @package PHPExcel_Calculation * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL * @version ##VERSION##, ##DATE## */ /** * PHPExcel_Calculation_Exception * * @category PHPExcel * @package PHPExcel_Calculation * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) */ class PHPExcel_Calculation_Exception extends PHPExcel_Exception { /** * Error handler callback * * @param mixed $code * @param mixed $string * @param mixed $file * @param mixed $line * @param mixed $context */ public static function errorHandlerCallback($code, $string, $file, $line, $context) { $e = new self($string, $code); $e->line = $line; $e->file = $file; throw $e; } }
{ "pile_set_name": "Github" }
0000..0040; Not-Uppercase 0041..005A; Uppercase 005B..00BF; Not-Uppercase 00C0..00D6; Uppercase 00D7..00D7; Not-Uppercase 00D8..00DE; Uppercase 00DF..00FF; Not-Uppercase 0100..0100; Uppercase 0101..0101; Not-Uppercase 0102..0102; Uppercase 0103..0103; Not-Uppercase 0104..0104; Uppercase 0105..0105; Not-Uppercase 0106..0106; Uppercase 0107..0107; Not-Uppercase 0108..0108; Uppercase 0109..0109; Not-Uppercase 010A..010A; Uppercase 010B..010B; Not-Uppercase 010C..010C; Uppercase 010D..010D; Not-Uppercase 010E..010E; Uppercase 010F..010F; Not-Uppercase 0110..0110; Uppercase 0111..0111; Not-Uppercase 0112..0112; Uppercase 0113..0113; Not-Uppercase 0114..0114; Uppercase 0115..0115; Not-Uppercase 0116..0116; Uppercase 0117..0117; Not-Uppercase 0118..0118; Uppercase 0119..0119; Not-Uppercase 011A..011A; Uppercase 011B..011B; Not-Uppercase 011C..011C; Uppercase 011D..011D; Not-Uppercase 011E..011E; Uppercase 011F..011F; Not-Uppercase 0120..0120; Uppercase 0121..0121; Not-Uppercase 0122..0122; Uppercase 0123..0123; Not-Uppercase 0124..0124; Uppercase 0125..0125; Not-Uppercase 0126..0126; Uppercase 0127..0127; Not-Uppercase 0128..0128; Uppercase 0129..0129; Not-Uppercase 012A..012A; Uppercase 012B..012B; Not-Uppercase 012C..012C; Uppercase 012D..012D; Not-Uppercase 012E..012E; Uppercase 012F..012F; Not-Uppercase 0130..0130; Uppercase 0131..0131; Not-Uppercase 0132..0132; Uppercase 0133..0133; Not-Uppercase 0134..0134; Uppercase 0135..0135; Not-Uppercase 0136..0136; Uppercase 0137..0138; Not-Uppercase 0139..0139; Uppercase 013A..013A; Not-Uppercase 013B..013B; Uppercase 013C..013C; Not-Uppercase 013D..013D; Uppercase 013E..013E; Not-Uppercase 013F..013F; Uppercase 0140..0140; Not-Uppercase 0141..0141; Uppercase 0142..0142; Not-Uppercase 0143..0143; Uppercase 0144..0144; Not-Uppercase 0145..0145; Uppercase 0146..0146; Not-Uppercase 0147..0147; Uppercase 0148..0149; Not-Uppercase 014A..014A; Uppercase 014B..014B; Not-Uppercase 014C..014C; Uppercase 014D..014D; Not-Uppercase 014E..014E; Uppercase 014F..014F; Not-Uppercase 0150..0150; Uppercase 0151..0151; Not-Uppercase 0152..0152; Uppercase 0153..0153; Not-Uppercase 0154..0154; Uppercase 0155..0155; Not-Uppercase 0156..0156; Uppercase 0157..0157; Not-Uppercase 0158..0158; Uppercase 0159..0159; Not-Uppercase 015A..015A; Uppercase 015B..015B; Not-Uppercase 015C..015C; Uppercase 015D..015D; Not-Uppercase 015E..015E; Uppercase 015F..015F; Not-Uppercase 0160..0160; Uppercase 0161..0161; Not-Uppercase 0162..0162; Uppercase 0163..0163; Not-Uppercase 0164..0164; Uppercase 0165..0165; Not-Uppercase 0166..0166; Uppercase 0167..0167; Not-Uppercase 0168..0168; Uppercase 0169..0169; Not-Uppercase 016A..016A; Uppercase 016B..016B; Not-Uppercase 016C..016C; Uppercase 016D..016D; Not-Uppercase 016E..016E; Uppercase 016F..016F; Not-Uppercase 0170..0170; Uppercase 0171..0171; Not-Uppercase 0172..0172; Uppercase 0173..0173; Not-Uppercase 0174..0174; Uppercase 0175..0175; Not-Uppercase 0176..0176; Uppercase 0177..0177; Not-Uppercase 0178..0179; Uppercase 017A..017A; Not-Uppercase 017B..017B; Uppercase 017C..017C; Not-Uppercase 017D..017D; Uppercase 017E..0180; Not-Uppercase 0181..0182; Uppercase 0183..0183; Not-Uppercase 0184..0184; Uppercase 0185..0185; Not-Uppercase 0186..0187; Uppercase 0188..0188; Not-Uppercase 0189..018B; Uppercase 018C..018D; Not-Uppercase 018E..0191; Uppercase 0192..0192; Not-Uppercase 0193..0194; Uppercase 0195..0195; Not-Uppercase 0196..0198; Uppercase 0199..019B; Not-Uppercase 019C..019D; Uppercase 019E..019E; Not-Uppercase 019F..01A0; Uppercase 01A1..01A1; Not-Uppercase 01A2..01A2; Uppercase 01A3..01A3; Not-Uppercase 01A4..01A4; Uppercase 01A5..01A5; Not-Uppercase 01A6..01A7; Uppercase 01A8..01A8; Not-Uppercase 01A9..01A9; Uppercase 01AA..01AB; Not-Uppercase 01AC..01AC; Uppercase 01AD..01AD; Not-Uppercase 01AE..01AF; Uppercase 01B0..01B0; Not-Uppercase 01B1..01B3; Uppercase 01B4..01B4; Not-Uppercase 01B5..01B5; Uppercase 01B6..01B6; Not-Uppercase 01B7..01B8; Uppercase 01B9..01BB; Not-Uppercase 01BC..01BC; Uppercase 01BD..01C3; Not-Uppercase 01C4..01C4; Uppercase 01C5..01C6; Not-Uppercase 01C7..01C7; Uppercase 01C8..01C9; Not-Uppercase 01CA..01CA; Uppercase 01CB..01CC; Not-Uppercase 01CD..01CD; Uppercase 01CE..01CE; Not-Uppercase 01CF..01CF; Uppercase 01D0..01D0; Not-Uppercase 01D1..01D1; Uppercase 01D2..01D2; Not-Uppercase 01D3..01D3; Uppercase 01D4..01D4; Not-Uppercase 01D5..01D5; Uppercase 01D6..01D6; Not-Uppercase 01D7..01D7; Uppercase 01D8..01D8; Not-Uppercase 01D9..01D9; Uppercase 01DA..01DA; Not-Uppercase 01DB..01DB; Uppercase 01DC..01DD; Not-Uppercase 01DE..01DE; Uppercase 01DF..01DF; Not-Uppercase 01E0..01E0; Uppercase 01E1..01E1; Not-Uppercase 01E2..01E2; Uppercase 01E3..01E3; Not-Uppercase 01E4..01E4; Uppercase 01E5..01E5; Not-Uppercase 01E6..01E6; Uppercase 01E7..01E7; Not-Uppercase 01E8..01E8; Uppercase 01E9..01E9; Not-Uppercase 01EA..01EA; Uppercase 01EB..01EB; Not-Uppercase 01EC..01EC; Uppercase 01ED..01ED; Not-Uppercase 01EE..01EE; Uppercase 01EF..01F0; Not-Uppercase 01F1..01F1; Uppercase 01F2..01F3; Not-Uppercase 01F4..01F4; Uppercase 01F5..01F5; Not-Uppercase 01F6..01F8; Uppercase 01F9..01F9; Not-Uppercase 01FA..01FA; Uppercase 01FB..01FB; Not-Uppercase 01FC..01FC; Uppercase 01FD..01FD; Not-Uppercase 01FE..01FE; Uppercase 01FF..01FF; Not-Uppercase 0200..0200; Uppercase 0201..0201; Not-Uppercase 0202..0202; Uppercase 0203..0203; Not-Uppercase 0204..0204; Uppercase 0205..0205; Not-Uppercase 0206..0206; Uppercase 0207..0207; Not-Uppercase 0208..0208; Uppercase 0209..0209; Not-Uppercase 020A..020A; Uppercase 020B..020B; Not-Uppercase 020C..020C; Uppercase 020D..020D; Not-Uppercase 020E..020E; Uppercase 020F..020F; Not-Uppercase 0210..0210; Uppercase 0211..0211; Not-Uppercase 0212..0212; Uppercase 0213..0213; Not-Uppercase 0214..0214; Uppercase 0215..0215; Not-Uppercase 0216..0216; Uppercase 0217..0217; Not-Uppercase 0218..0218; Uppercase 0219..0219; Not-Uppercase 021A..021A; Uppercase 021B..021B; Not-Uppercase 021C..021C; Uppercase 021D..021D; Not-Uppercase 021E..021E; Uppercase 021F..021F; Not-Uppercase 0220..0220; Uppercase 0221..0221; Not-Uppercase 0222..0222; Uppercase 0223..0223; Not-Uppercase 0224..0224; Uppercase 0225..0225; Not-Uppercase 0226..0226; Uppercase 0227..0227; Not-Uppercase 0228..0228; Uppercase 0229..0229; Not-Uppercase 022A..022A; Uppercase 022B..022B; Not-Uppercase 022C..022C; Uppercase 022D..022D; Not-Uppercase 022E..022E; Uppercase 022F..022F; Not-Uppercase 0230..0230; Uppercase 0231..0231; Not-Uppercase 0232..0232; Uppercase 0233..0239; Not-Uppercase 023A..023B; Uppercase 023C..023C; Not-Uppercase 023D..023E; Uppercase 023F..0240; Not-Uppercase 0241..0241; Uppercase 0242..0242; Not-Uppercase 0243..0246; Uppercase 0247..0247; Not-Uppercase 0248..0248; Uppercase 0249..0249; Not-Uppercase 024A..024A; Uppercase 024B..024B; Not-Uppercase 024C..024C; Uppercase 024D..024D; Not-Uppercase 024E..024E; Uppercase 024F..036F; Not-Uppercase 0370..0370; Uppercase 0371..0371; Not-Uppercase 0372..0372; Uppercase 0373..0375; Not-Uppercase 0376..0376; Uppercase 0377..0385; Not-Uppercase 0386..0386; Uppercase 0387..0387; Not-Uppercase 0388..038A; Uppercase 038B..038B; Not-Uppercase 038C..038C; Uppercase 038D..038D; Not-Uppercase 038E..038F; Uppercase 0390..0390; Not-Uppercase 0391..03A1; Uppercase 03A2..03A2; Not-Uppercase 03A3..03AB; Uppercase 03AC..03CE; Not-Uppercase 03CF..03CF; Uppercase 03D0..03D1; Not-Uppercase 03D2..03D4; Uppercase 03D5..03D7; Not-Uppercase 03D8..03D8; Uppercase 03D9..03D9; Not-Uppercase 03DA..03DA; Uppercase 03DB..03DB; Not-Uppercase 03DC..03DC; Uppercase 03DD..03DD; Not-Uppercase 03DE..03DE; Uppercase 03DF..03DF; Not-Uppercase 03E0..03E0; Uppercase 03E1..03E1; Not-Uppercase 03E2..03E2; Uppercase 03E3..03E3; Not-Uppercase 03E4..03E4; Uppercase 03E5..03E5; Not-Uppercase 03E6..03E6; Uppercase 03E7..03E7; Not-Uppercase 03E8..03E8; Uppercase 03E9..03E9; Not-Uppercase 03EA..03EA; Uppercase 03EB..03EB; Not-Uppercase 03EC..03EC; Uppercase 03ED..03ED; Not-Uppercase 03EE..03EE; Uppercase 03EF..03F3; Not-Uppercase 03F4..03F4; Uppercase 03F5..03F6; Not-Uppercase 03F7..03F7; Uppercase 03F8..03F8; Not-Uppercase 03F9..03FA; Uppercase 03FB..03FC; Not-Uppercase 03FD..042F; Uppercase 0430..045F; Not-Uppercase 0460..0460; Uppercase 0461..0461; Not-Uppercase 0462..0462; Uppercase 0463..0463; Not-Uppercase 0464..0464; Uppercase 0465..0465; Not-Uppercase 0466..0466; Uppercase 0467..0467; Not-Uppercase 0468..0468; Uppercase 0469..0469; Not-Uppercase 046A..046A; Uppercase 046B..046B; Not-Uppercase 046C..046C; Uppercase 046D..046D; Not-Uppercase 046E..046E; Uppercase 046F..046F; Not-Uppercase 0470..0470; Uppercase 0471..0471; Not-Uppercase 0472..0472; Uppercase 0473..0473; Not-Uppercase 0474..0474; Uppercase 0475..0475; Not-Uppercase 0476..0476; Uppercase 0477..0477; Not-Uppercase 0478..0478; Uppercase 0479..0479; Not-Uppercase 047A..047A; Uppercase 047B..047B; Not-Uppercase 047C..047C; Uppercase 047D..047D; Not-Uppercase 047E..047E; Uppercase 047F..047F; Not-Uppercase 0480..0480; Uppercase 0481..0489; Not-Uppercase 048A..048A; Uppercase 048B..048B; Not-Uppercase 048C..048C; Uppercase 048D..048D; Not-Uppercase 048E..048E; Uppercase 048F..048F; Not-Uppercase 0490..0490; Uppercase 0491..0491; Not-Uppercase 0492..0492; Uppercase 0493..0493; Not-Uppercase 0494..0494; Uppercase 0495..0495; Not-Uppercase 0496..0496; Uppercase 0497..0497; Not-Uppercase 0498..0498; Uppercase 0499..0499; Not-Uppercase 049A..049A; Uppercase 049B..049B; Not-Uppercase 049C..049C; Uppercase 049D..049D; Not-Uppercase 049E..049E; Uppercase 049F..049F; Not-Uppercase 04A0..04A0; Uppercase 04A1..04A1; Not-Uppercase 04A2..04A2; Uppercase 04A3..04A3; Not-Uppercase 04A4..04A4; Uppercase 04A5..04A5; Not-Uppercase 04A6..04A6; Uppercase 04A7..04A7; Not-Uppercase 04A8..04A8; Uppercase 04A9..04A9; Not-Uppercase 04AA..04AA; Uppercase 04AB..04AB; Not-Uppercase 04AC..04AC; Uppercase 04AD..04AD; Not-Uppercase 04AE..04AE; Uppercase 04AF..04AF; Not-Uppercase 04B0..04B0; Uppercase 04B1..04B1; Not-Uppercase 04B2..04B2; Uppercase 04B3..04B3; Not-Uppercase 04B4..04B4; Uppercase 04B5..04B5; Not-Uppercase 04B6..04B6; Uppercase 04B7..04B7; Not-Uppercase 04B8..04B8; Uppercase 04B9..04B9; Not-Uppercase 04BA..04BA; Uppercase 04BB..04BB; Not-Uppercase 04BC..04BC; Uppercase 04BD..04BD; Not-Uppercase 04BE..04BE; Uppercase 04BF..04BF; Not-Uppercase 04C0..04C1; Uppercase 04C2..04C2; Not-Uppercase 04C3..04C3; Uppercase 04C4..04C4; Not-Uppercase 04C5..04C5; Uppercase 04C6..04C6; Not-Uppercase 04C7..04C7; Uppercase 04C8..04C8; Not-Uppercase 04C9..04C9; Uppercase 04CA..04CA; Not-Uppercase 04CB..04CB; Uppercase 04CC..04CC; Not-Uppercase 04CD..04CD; Uppercase 04CE..04CF; Not-Uppercase 04D0..04D0; Uppercase 04D1..04D1; Not-Uppercase 04D2..04D2; Uppercase 04D3..04D3; Not-Uppercase 04D4..04D4; Uppercase 04D5..04D5; Not-Uppercase 04D6..04D6; Uppercase 04D7..04D7; Not-Uppercase 04D8..04D8; Uppercase 04D9..04D9; Not-Uppercase 04DA..04DA; Uppercase 04DB..04DB; Not-Uppercase 04DC..04DC; Uppercase 04DD..04DD; Not-Uppercase 04DE..04DE; Uppercase 04DF..04DF; Not-Uppercase 04E0..04E0; Uppercase 04E1..04E1; Not-Uppercase 04E2..04E2; Uppercase 04E3..04E3; Not-Uppercase 04E4..04E4; Uppercase 04E5..04E5; Not-Uppercase 04E6..04E6; Uppercase 04E7..04E7; Not-Uppercase 04E8..04E8; Uppercase 04E9..04E9; Not-Uppercase 04EA..04EA; Uppercase 04EB..04EB; Not-Uppercase 04EC..04EC; Uppercase 04ED..04ED; Not-Uppercase 04EE..04EE; Uppercase 04EF..04EF; Not-Uppercase 04F0..04F0; Uppercase 04F1..04F1; Not-Uppercase 04F2..04F2; Uppercase 04F3..04F3; Not-Uppercase 04F4..04F4; Uppercase 04F5..04F5; Not-Uppercase 04F6..04F6; Uppercase 04F7..04F7; Not-Uppercase 04F8..04F8; Uppercase 04F9..04F9; Not-Uppercase 04FA..04FA; Uppercase 04FB..04FB; Not-Uppercase 04FC..04FC; Uppercase 04FD..04FD; Not-Uppercase 04FE..04FE; Uppercase 04FF..04FF; Not-Uppercase 0500..0500; Uppercase 0501..0501; Not-Uppercase 0502..0502; Uppercase 0503..0503; Not-Uppercase 0504..0504; Uppercase 0505..0505; Not-Uppercase 0506..0506; Uppercase 0507..0507; Not-Uppercase 0508..0508; Uppercase 0509..0509; Not-Uppercase 050A..050A; Uppercase 050B..050B; Not-Uppercase 050C..050C; Uppercase 050D..050D; Not-Uppercase 050E..050E; Uppercase 050F..050F; Not-Uppercase 0510..0510; Uppercase 0511..0511; Not-Uppercase 0512..0512; Uppercase 0513..0513; Not-Uppercase 0514..0514; Uppercase 0515..0515; Not-Uppercase 0516..0516; Uppercase 0517..0517; Not-Uppercase 0518..0518; Uppercase 0519..0519; Not-Uppercase 051A..051A; Uppercase 051B..051B; Not-Uppercase 051C..051C; Uppercase 051D..051D; Not-Uppercase 051E..051E; Uppercase 051F..051F; Not-Uppercase 0520..0520; Uppercase 0521..0521; Not-Uppercase 0522..0522; Uppercase 0523..0523; Not-Uppercase 0524..0524; Uppercase 0525..0525; Not-Uppercase 0526..0526; Uppercase 0527..0530; Not-Uppercase 0531..0556; Uppercase 0557..109F; Not-Uppercase 10A0..10C5; Uppercase 10C6..10C6; Not-Uppercase 10C7..10C7; Uppercase 10C8..10CC; Not-Uppercase 10CD..10CD; Uppercase 10CE..1DFF; Not-Uppercase 1E00..1E00; Uppercase 1E01..1E01; Not-Uppercase 1E02..1E02; Uppercase 1E03..1E03; Not-Uppercase 1E04..1E04; Uppercase 1E05..1E05; Not-Uppercase 1E06..1E06; Uppercase 1E07..1E07; Not-Uppercase 1E08..1E08; Uppercase 1E09..1E09; Not-Uppercase 1E0A..1E0A; Uppercase 1E0B..1E0B; Not-Uppercase 1E0C..1E0C; Uppercase 1E0D..1E0D; Not-Uppercase 1E0E..1E0E; Uppercase 1E0F..1E0F; Not-Uppercase 1E10..1E10; Uppercase 1E11..1E11; Not-Uppercase 1E12..1E12; Uppercase 1E13..1E13; Not-Uppercase 1E14..1E14; Uppercase 1E15..1E15; Not-Uppercase 1E16..1E16; Uppercase 1E17..1E17; Not-Uppercase 1E18..1E18; Uppercase 1E19..1E19; Not-Uppercase 1E1A..1E1A; Uppercase 1E1B..1E1B; Not-Uppercase 1E1C..1E1C; Uppercase 1E1D..1E1D; Not-Uppercase 1E1E..1E1E; Uppercase 1E1F..1E1F; Not-Uppercase 1E20..1E20; Uppercase 1E21..1E21; Not-Uppercase 1E22..1E22; Uppercase 1E23..1E23; Not-Uppercase 1E24..1E24; Uppercase 1E25..1E25; Not-Uppercase 1E26..1E26; Uppercase 1E27..1E27; Not-Uppercase 1E28..1E28; Uppercase 1E29..1E29; Not-Uppercase 1E2A..1E2A; Uppercase 1E2B..1E2B; Not-Uppercase 1E2C..1E2C; Uppercase 1E2D..1E2D; Not-Uppercase 1E2E..1E2E; Uppercase 1E2F..1E2F; Not-Uppercase 1E30..1E30; Uppercase 1E31..1E31; Not-Uppercase 1E32..1E32; Uppercase 1E33..1E33; Not-Uppercase 1E34..1E34; Uppercase 1E35..1E35; Not-Uppercase 1E36..1E36; Uppercase 1E37..1E37; Not-Uppercase 1E38..1E38; Uppercase 1E39..1E39; Not-Uppercase 1E3A..1E3A; Uppercase 1E3B..1E3B; Not-Uppercase 1E3C..1E3C; Uppercase 1E3D..1E3D; Not-Uppercase 1E3E..1E3E; Uppercase 1E3F..1E3F; Not-Uppercase 1E40..1E40; Uppercase 1E41..1E41; Not-Uppercase 1E42..1E42; Uppercase 1E43..1E43; Not-Uppercase 1E44..1E44; Uppercase 1E45..1E45; Not-Uppercase 1E46..1E46; Uppercase 1E47..1E47; Not-Uppercase 1E48..1E48; Uppercase 1E49..1E49; Not-Uppercase 1E4A..1E4A; Uppercase 1E4B..1E4B; Not-Uppercase 1E4C..1E4C; Uppercase 1E4D..1E4D; Not-Uppercase 1E4E..1E4E; Uppercase 1E4F..1E4F; Not-Uppercase 1E50..1E50; Uppercase 1E51..1E51; Not-Uppercase 1E52..1E52; Uppercase 1E53..1E53; Not-Uppercase 1E54..1E54; Uppercase 1E55..1E55; Not-Uppercase 1E56..1E56; Uppercase 1E57..1E57; Not-Uppercase 1E58..1E58; Uppercase 1E59..1E59; Not-Uppercase 1E5A..1E5A; Uppercase 1E5B..1E5B; Not-Uppercase 1E5C..1E5C; Uppercase 1E5D..1E5D; Not-Uppercase 1E5E..1E5E; Uppercase 1E5F..1E5F; Not-Uppercase 1E60..1E60; Uppercase 1E61..1E61; Not-Uppercase 1E62..1E62; Uppercase 1E63..1E63; Not-Uppercase 1E64..1E64; Uppercase 1E65..1E65; Not-Uppercase 1E66..1E66; Uppercase 1E67..1E67; Not-Uppercase 1E68..1E68; Uppercase 1E69..1E69; Not-Uppercase 1E6A..1E6A; Uppercase 1E6B..1E6B; Not-Uppercase 1E6C..1E6C; Uppercase 1E6D..1E6D; Not-Uppercase 1E6E..1E6E; Uppercase 1E6F..1E6F; Not-Uppercase 1E70..1E70; Uppercase 1E71..1E71; Not-Uppercase 1E72..1E72; Uppercase 1E73..1E73; Not-Uppercase 1E74..1E74; Uppercase 1E75..1E75; Not-Uppercase 1E76..1E76; Uppercase 1E77..1E77; Not-Uppercase 1E78..1E78; Uppercase 1E79..1E79; Not-Uppercase 1E7A..1E7A; Uppercase 1E7B..1E7B; Not-Uppercase 1E7C..1E7C; Uppercase 1E7D..1E7D; Not-Uppercase 1E7E..1E7E; Uppercase 1E7F..1E7F; Not-Uppercase 1E80..1E80; Uppercase 1E81..1E81; Not-Uppercase 1E82..1E82; Uppercase 1E83..1E83; Not-Uppercase 1E84..1E84; Uppercase 1E85..1E85; Not-Uppercase 1E86..1E86; Uppercase 1E87..1E87; Not-Uppercase 1E88..1E88; Uppercase 1E89..1E89; Not-Uppercase 1E8A..1E8A; Uppercase 1E8B..1E8B; Not-Uppercase 1E8C..1E8C; Uppercase 1E8D..1E8D; Not-Uppercase 1E8E..1E8E; Uppercase 1E8F..1E8F; Not-Uppercase 1E90..1E90; Uppercase 1E91..1E91; Not-Uppercase 1E92..1E92; Uppercase 1E93..1E93; Not-Uppercase 1E94..1E94; Uppercase 1E95..1E9D; Not-Uppercase 1E9E..1E9E; Uppercase 1E9F..1E9F; Not-Uppercase 1EA0..1EA0; Uppercase 1EA1..1EA1; Not-Uppercase 1EA2..1EA2; Uppercase 1EA3..1EA3; Not-Uppercase 1EA4..1EA4; Uppercase 1EA5..1EA5; Not-Uppercase 1EA6..1EA6; Uppercase 1EA7..1EA7; Not-Uppercase 1EA8..1EA8; Uppercase 1EA9..1EA9; Not-Uppercase 1EAA..1EAA; Uppercase 1EAB..1EAB; Not-Uppercase 1EAC..1EAC; Uppercase 1EAD..1EAD; Not-Uppercase 1EAE..1EAE; Uppercase 1EAF..1EAF; Not-Uppercase 1EB0..1EB0; Uppercase 1EB1..1EB1; Not-Uppercase 1EB2..1EB2; Uppercase 1EB3..1EB3; Not-Uppercase 1EB4..1EB4; Uppercase 1EB5..1EB5; Not-Uppercase 1EB6..1EB6; Uppercase 1EB7..1EB7; Not-Uppercase 1EB8..1EB8; Uppercase 1EB9..1EB9; Not-Uppercase 1EBA..1EBA; Uppercase 1EBB..1EBB; Not-Uppercase 1EBC..1EBC; Uppercase 1EBD..1EBD; Not-Uppercase 1EBE..1EBE; Uppercase 1EBF..1EBF; Not-Uppercase 1EC0..1EC0; Uppercase 1EC1..1EC1; Not-Uppercase 1EC2..1EC2; Uppercase 1EC3..1EC3; Not-Uppercase 1EC4..1EC4; Uppercase 1EC5..1EC5; Not-Uppercase 1EC6..1EC6; Uppercase 1EC7..1EC7; Not-Uppercase 1EC8..1EC8; Uppercase 1EC9..1EC9; Not-Uppercase 1ECA..1ECA; Uppercase 1ECB..1ECB; Not-Uppercase 1ECC..1ECC; Uppercase 1ECD..1ECD; Not-Uppercase 1ECE..1ECE; Uppercase 1ECF..1ECF; Not-Uppercase 1ED0..1ED0; Uppercase 1ED1..1ED1; Not-Uppercase 1ED2..1ED2; Uppercase 1ED3..1ED3; Not-Uppercase 1ED4..1ED4; Uppercase 1ED5..1ED5; Not-Uppercase 1ED6..1ED6; Uppercase 1ED7..1ED7; Not-Uppercase 1ED8..1ED8; Uppercase 1ED9..1ED9; Not-Uppercase 1EDA..1EDA; Uppercase 1EDB..1EDB; Not-Uppercase 1EDC..1EDC; Uppercase 1EDD..1EDD; Not-Uppercase 1EDE..1EDE; Uppercase 1EDF..1EDF; Not-Uppercase 1EE0..1EE0; Uppercase 1EE1..1EE1; Not-Uppercase 1EE2..1EE2; Uppercase 1EE3..1EE3; Not-Uppercase 1EE4..1EE4; Uppercase 1EE5..1EE5; Not-Uppercase 1EE6..1EE6; Uppercase 1EE7..1EE7; Not-Uppercase 1EE8..1EE8; Uppercase 1EE9..1EE9; Not-Uppercase 1EEA..1EEA; Uppercase 1EEB..1EEB; Not-Uppercase 1EEC..1EEC; Uppercase 1EED..1EED; Not-Uppercase 1EEE..1EEE; Uppercase 1EEF..1EEF; Not-Uppercase 1EF0..1EF0; Uppercase 1EF1..1EF1; Not-Uppercase 1EF2..1EF2; Uppercase 1EF3..1EF3; Not-Uppercase 1EF4..1EF4; Uppercase 1EF5..1EF5; Not-Uppercase 1EF6..1EF6; Uppercase 1EF7..1EF7; Not-Uppercase 1EF8..1EF8; Uppercase 1EF9..1EF9; Not-Uppercase 1EFA..1EFA; Uppercase 1EFB..1EFB; Not-Uppercase 1EFC..1EFC; Uppercase 1EFD..1EFD; Not-Uppercase 1EFE..1EFE; Uppercase 1EFF..1F07; Not-Uppercase 1F08..1F0F; Uppercase 1F10..1F17; Not-Uppercase 1F18..1F1D; Uppercase 1F1E..1F27; Not-Uppercase 1F28..1F2F; Uppercase 1F30..1F37; Not-Uppercase 1F38..1F3F; Uppercase 1F40..1F47; Not-Uppercase 1F48..1F4D; Uppercase 1F4E..1F58; Not-Uppercase 1F59..1F59; Uppercase 1F5A..1F5A; Not-Uppercase 1F5B..1F5B; Uppercase 1F5C..1F5C; Not-Uppercase 1F5D..1F5D; Uppercase 1F5E..1F5E; Not-Uppercase 1F5F..1F5F; Uppercase 1F60..1F67; Not-Uppercase 1F68..1F6F; Uppercase 1F70..1FB7; Not-Uppercase 1FB8..1FBB; Uppercase 1FBC..1FC7; Not-Uppercase 1FC8..1FCB; Uppercase 1FCC..1FD7; Not-Uppercase 1FD8..1FDB; Uppercase 1FDC..1FE7; Not-Uppercase 1FE8..1FEC; Uppercase 1FED..1FF7; Not-Uppercase 1FF8..1FFB; Uppercase 1FFC..2101; Not-Uppercase 2102..2102; Uppercase 2103..2106; Not-Uppercase 2107..2107; Uppercase 2108..210A; Not-Uppercase 210B..210D; Uppercase 210E..210F; Not-Uppercase 2110..2112; Uppercase 2113..2114; Not-Uppercase 2115..2115; Uppercase 2116..2118; Not-Uppercase 2119..211D; Uppercase 211E..2123; Not-Uppercase 2124..2124; Uppercase 2125..2125; Not-Uppercase 2126..2126; Uppercase 2127..2127; Not-Uppercase 2128..2128; Uppercase 2129..2129; Not-Uppercase 212A..212D; Uppercase 212E..212F; Not-Uppercase 2130..2133; Uppercase 2134..213D; Not-Uppercase 213E..213F; Uppercase 2140..2144; Not-Uppercase 2145..2145; Uppercase 2146..215F; Not-Uppercase 2160..216F; Uppercase 2170..2182; Not-Uppercase 2183..2183; Uppercase 2184..24B5; Not-Uppercase 24B6..24CF; Uppercase 24D0..2BFF; Not-Uppercase 2C00..2C2E; Uppercase 2C2F..2C5F; Not-Uppercase 2C60..2C60; Uppercase 2C61..2C61; Not-Uppercase 2C62..2C64; Uppercase 2C65..2C66; Not-Uppercase 2C67..2C67; Uppercase 2C68..2C68; Not-Uppercase 2C69..2C69; Uppercase 2C6A..2C6A; Not-Uppercase 2C6B..2C6B; Uppercase 2C6C..2C6C; Not-Uppercase 2C6D..2C70; Uppercase 2C71..2C71; Not-Uppercase 2C72..2C72; Uppercase 2C73..2C74; Not-Uppercase 2C75..2C75; Uppercase 2C76..2C7D; Not-Uppercase 2C7E..2C80; Uppercase 2C81..2C81; Not-Uppercase 2C82..2C82; Uppercase 2C83..2C83; Not-Uppercase 2C84..2C84; Uppercase 2C85..2C85; Not-Uppercase 2C86..2C86; Uppercase 2C87..2C87; Not-Uppercase 2C88..2C88; Uppercase 2C89..2C89; Not-Uppercase 2C8A..2C8A; Uppercase 2C8B..2C8B; Not-Uppercase 2C8C..2C8C; Uppercase 2C8D..2C8D; Not-Uppercase 2C8E..2C8E; Uppercase 2C8F..2C8F; Not-Uppercase 2C90..2C90; Uppercase 2C91..2C91; Not-Uppercase 2C92..2C92; Uppercase 2C93..2C93; Not-Uppercase 2C94..2C94; Uppercase 2C95..2C95; Not-Uppercase 2C96..2C96; Uppercase 2C97..2C97; Not-Uppercase 2C98..2C98; Uppercase 2C99..2C99; Not-Uppercase 2C9A..2C9A; Uppercase 2C9B..2C9B; Not-Uppercase 2C9C..2C9C; Uppercase 2C9D..2C9D; Not-Uppercase 2C9E..2C9E; Uppercase 2C9F..2C9F; Not-Uppercase 2CA0..2CA0; Uppercase 2CA1..2CA1; Not-Uppercase 2CA2..2CA2; Uppercase 2CA3..2CA3; Not-Uppercase 2CA4..2CA4; Uppercase 2CA5..2CA5; Not-Uppercase 2CA6..2CA6; Uppercase 2CA7..2CA7; Not-Uppercase 2CA8..2CA8; Uppercase 2CA9..2CA9; Not-Uppercase 2CAA..2CAA; Uppercase 2CAB..2CAB; Not-Uppercase 2CAC..2CAC; Uppercase 2CAD..2CAD; Not-Uppercase 2CAE..2CAE; Uppercase 2CAF..2CAF; Not-Uppercase 2CB0..2CB0; Uppercase 2CB1..2CB1; Not-Uppercase 2CB2..2CB2; Uppercase 2CB3..2CB3; Not-Uppercase 2CB4..2CB4; Uppercase 2CB5..2CB5; Not-Uppercase 2CB6..2CB6; Uppercase 2CB7..2CB7; Not-Uppercase 2CB8..2CB8; Uppercase 2CB9..2CB9; Not-Uppercase 2CBA..2CBA; Uppercase 2CBB..2CBB; Not-Uppercase 2CBC..2CBC; Uppercase 2CBD..2CBD; Not-Uppercase 2CBE..2CBE; Uppercase 2CBF..2CBF; Not-Uppercase 2CC0..2CC0; Uppercase 2CC1..2CC1; Not-Uppercase 2CC2..2CC2; Uppercase 2CC3..2CC3; Not-Uppercase 2CC4..2CC4; Uppercase 2CC5..2CC5; Not-Uppercase 2CC6..2CC6; Uppercase 2CC7..2CC7; Not-Uppercase 2CC8..2CC8; Uppercase 2CC9..2CC9; Not-Uppercase 2CCA..2CCA; Uppercase 2CCB..2CCB; Not-Uppercase 2CCC..2CCC; Uppercase 2CCD..2CCD; Not-Uppercase 2CCE..2CCE; Uppercase 2CCF..2CCF; Not-Uppercase 2CD0..2CD0; Uppercase 2CD1..2CD1; Not-Uppercase 2CD2..2CD2; Uppercase 2CD3..2CD3; Not-Uppercase 2CD4..2CD4; Uppercase 2CD5..2CD5; Not-Uppercase 2CD6..2CD6; Uppercase 2CD7..2CD7; Not-Uppercase 2CD8..2CD8; Uppercase 2CD9..2CD9; Not-Uppercase 2CDA..2CDA; Uppercase 2CDB..2CDB; Not-Uppercase 2CDC..2CDC; Uppercase 2CDD..2CDD; Not-Uppercase 2CDE..2CDE; Uppercase 2CDF..2CDF; Not-Uppercase 2CE0..2CE0; Uppercase 2CE1..2CE1; Not-Uppercase 2CE2..2CE2; Uppercase 2CE3..2CEA; Not-Uppercase 2CEB..2CEB; Uppercase 2CEC..2CEC; Not-Uppercase 2CED..2CED; Uppercase 2CEE..2CF1; Not-Uppercase 2CF2..2CF2; Uppercase 2CF3..A63F; Not-Uppercase A640..A640; Uppercase A641..A641; Not-Uppercase A642..A642; Uppercase A643..A643; Not-Uppercase A644..A644; Uppercase A645..A645; Not-Uppercase A646..A646; Uppercase A647..A647; Not-Uppercase A648..A648; Uppercase A649..A649; Not-Uppercase A64A..A64A; Uppercase A64B..A64B; Not-Uppercase A64C..A64C; Uppercase A64D..A64D; Not-Uppercase A64E..A64E; Uppercase A64F..A64F; Not-Uppercase A650..A650; Uppercase A651..A651; Not-Uppercase A652..A652; Uppercase A653..A653; Not-Uppercase A654..A654; Uppercase A655..A655; Not-Uppercase A656..A656; Uppercase A657..A657; Not-Uppercase A658..A658; Uppercase A659..A659; Not-Uppercase A65A..A65A; Uppercase A65B..A65B; Not-Uppercase A65C..A65C; Uppercase A65D..A65D; Not-Uppercase A65E..A65E; Uppercase A65F..A65F; Not-Uppercase A660..A660; Uppercase A661..A661; Not-Uppercase A662..A662; Uppercase A663..A663; Not-Uppercase A664..A664; Uppercase A665..A665; Not-Uppercase A666..A666; Uppercase A667..A667; Not-Uppercase A668..A668; Uppercase A669..A669; Not-Uppercase A66A..A66A; Uppercase A66B..A66B; Not-Uppercase A66C..A66C; Uppercase A66D..A67F; Not-Uppercase A680..A680; Uppercase A681..A681; Not-Uppercase A682..A682; Uppercase A683..A683; Not-Uppercase A684..A684; Uppercase A685..A685; Not-Uppercase A686..A686; Uppercase A687..A687; Not-Uppercase A688..A688; Uppercase A689..A689; Not-Uppercase A68A..A68A; Uppercase A68B..A68B; Not-Uppercase A68C..A68C; Uppercase A68D..A68D; Not-Uppercase A68E..A68E; Uppercase A68F..A68F; Not-Uppercase A690..A690; Uppercase A691..A691; Not-Uppercase A692..A692; Uppercase A693..A693; Not-Uppercase A694..A694; Uppercase A695..A695; Not-Uppercase A696..A696; Uppercase A697..A721; Not-Uppercase A722..A722; Uppercase A723..A723; Not-Uppercase A724..A724; Uppercase A725..A725; Not-Uppercase A726..A726; Uppercase A727..A727; Not-Uppercase A728..A728; Uppercase A729..A729; Not-Uppercase A72A..A72A; Uppercase A72B..A72B; Not-Uppercase A72C..A72C; Uppercase A72D..A72D; Not-Uppercase A72E..A72E; Uppercase A72F..A731; Not-Uppercase A732..A732; Uppercase A733..A733; Not-Uppercase A734..A734; Uppercase A735..A735; Not-Uppercase A736..A736; Uppercase A737..A737; Not-Uppercase A738..A738; Uppercase A739..A739; Not-Uppercase A73A..A73A; Uppercase A73B..A73B; Not-Uppercase A73C..A73C; Uppercase A73D..A73D; Not-Uppercase A73E..A73E; Uppercase A73F..A73F; Not-Uppercase A740..A740; Uppercase A741..A741; Not-Uppercase A742..A742; Uppercase A743..A743; Not-Uppercase A744..A744; Uppercase A745..A745; Not-Uppercase A746..A746; Uppercase A747..A747; Not-Uppercase A748..A748; Uppercase A749..A749; Not-Uppercase A74A..A74A; Uppercase A74B..A74B; Not-Uppercase A74C..A74C; Uppercase A74D..A74D; Not-Uppercase A74E..A74E; Uppercase A74F..A74F; Not-Uppercase A750..A750; Uppercase A751..A751; Not-Uppercase A752..A752; Uppercase A753..A753; Not-Uppercase A754..A754; Uppercase A755..A755; Not-Uppercase A756..A756; Uppercase A757..A757; Not-Uppercase A758..A758; Uppercase A759..A759; Not-Uppercase A75A..A75A; Uppercase A75B..A75B; Not-Uppercase A75C..A75C; Uppercase A75D..A75D; Not-Uppercase A75E..A75E; Uppercase A75F..A75F; Not-Uppercase A760..A760; Uppercase A761..A761; Not-Uppercase A762..A762; Uppercase A763..A763; Not-Uppercase A764..A764; Uppercase A765..A765; Not-Uppercase A766..A766; Uppercase A767..A767; Not-Uppercase A768..A768; Uppercase A769..A769; Not-Uppercase A76A..A76A; Uppercase A76B..A76B; Not-Uppercase A76C..A76C; Uppercase A76D..A76D; Not-Uppercase A76E..A76E; Uppercase A76F..A778; Not-Uppercase A779..A779; Uppercase A77A..A77A; Not-Uppercase A77B..A77B; Uppercase A77C..A77C; Not-Uppercase A77D..A77E; Uppercase A77F..A77F; Not-Uppercase A780..A780; Uppercase A781..A781; Not-Uppercase A782..A782; Uppercase A783..A783; Not-Uppercase A784..A784; Uppercase A785..A785; Not-Uppercase A786..A786; Uppercase A787..A78A; Not-Uppercase A78B..A78B; Uppercase A78C..A78C; Not-Uppercase A78D..A78D; Uppercase A78E..A78F; Not-Uppercase A790..A790; Uppercase A791..A791; Not-Uppercase A792..A792; Uppercase A793..A79F; Not-Uppercase A7A0..A7A0; Uppercase A7A1..A7A1; Not-Uppercase A7A2..A7A2; Uppercase A7A3..A7A3; Not-Uppercase A7A4..A7A4; Uppercase A7A5..A7A5; Not-Uppercase A7A6..A7A6; Uppercase A7A7..A7A7; Not-Uppercase A7A8..A7A8; Uppercase A7A9..A7A9; Not-Uppercase A7AA..A7AA; Uppercase A7AB..D7FF; Not-Uppercase E000..FF20; Not-Uppercase FF21..FF3A; Uppercase FF3B..103FF; Not-Uppercase 10400..10427; Uppercase 10428..1D3FF; Not-Uppercase 1D400..1D419; Uppercase 1D41A..1D433; Not-Uppercase 1D434..1D44D; Uppercase 1D44E..1D467; Not-Uppercase 1D468..1D481; Uppercase 1D482..1D49B; Not-Uppercase 1D49C..1D49C; Uppercase 1D49D..1D49D; Not-Uppercase 1D49E..1D49F; Uppercase 1D4A0..1D4A1; Not-Uppercase 1D4A2..1D4A2; Uppercase 1D4A3..1D4A4; Not-Uppercase 1D4A5..1D4A6; Uppercase 1D4A7..1D4A8; Not-Uppercase 1D4A9..1D4AC; Uppercase 1D4AD..1D4AD; Not-Uppercase 1D4AE..1D4B5; Uppercase 1D4B6..1D4CF; Not-Uppercase 1D4D0..1D4E9; Uppercase 1D4EA..1D503; Not-Uppercase 1D504..1D505; Uppercase 1D506..1D506; Not-Uppercase 1D507..1D50A; Uppercase 1D50B..1D50C; Not-Uppercase 1D50D..1D514; Uppercase 1D515..1D515; Not-Uppercase 1D516..1D51C; Uppercase 1D51D..1D537; Not-Uppercase 1D538..1D539; Uppercase 1D53A..1D53A; Not-Uppercase 1D53B..1D53E; Uppercase 1D53F..1D53F; Not-Uppercase 1D540..1D544; Uppercase 1D545..1D545; Not-Uppercase 1D546..1D546; Uppercase 1D547..1D549; Not-Uppercase 1D54A..1D550; Uppercase 1D551..1D56B; Not-Uppercase 1D56C..1D585; Uppercase 1D586..1D59F; Not-Uppercase 1D5A0..1D5B9; Uppercase 1D5BA..1D5D3; Not-Uppercase 1D5D4..1D5ED; Uppercase 1D5EE..1D607; Not-Uppercase 1D608..1D621; Uppercase 1D622..1D63B; Not-Uppercase 1D63C..1D655; Uppercase 1D656..1D66F; Not-Uppercase 1D670..1D689; Uppercase 1D68A..1D6A7; Not-Uppercase 1D6A8..1D6C0; Uppercase 1D6C1..1D6E1; Not-Uppercase 1D6E2..1D6FA; Uppercase 1D6FB..1D71B; Not-Uppercase 1D71C..1D734; Uppercase 1D735..1D755; Not-Uppercase 1D756..1D76E; Uppercase 1D76F..1D78F; Not-Uppercase 1D790..1D7A8; Uppercase 1D7A9..1D7C9; Not-Uppercase 1D7CA..1D7CA; Uppercase 1D7CB..10FFFF; Not-Uppercase
{ "pile_set_name": "Github" }
Make iconv 1.11.x link correctly with libtool2 - argument "-Xcompiler" ensures "-shared" is passed to $(CC) when used as linker. Otherwise $(CC) tries to create an executable and fails while looking for a main()-function diff -ruN libiconv-1.11.1/lib/Makefile.in libiconv-1.11.1.mod/lib/Makefile.in --- libiconv-1.11.1/lib/Makefile.in 2006-07-14 15:18:42.000000000 +0200 +++ libiconv-1.11.1.mod/lib/Makefile.in 2010-12-01 20:47:57.000000000 +0100 @@ -70,9 +70,9 @@ preloadable_libiconv_linux.so : $(SOURCES) if test -n "@GCC@"; then \ - $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \ + $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -Xcompiler -shared -o preloadable_libiconv_linux.so; \ else \ - $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \ + $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -Xcompiler -shared -o preloadable_libiconv_linux.so; \ fi preloadable_libiconv_solaris.so : $(SOURCES)
{ "pile_set_name": "Github" }
import Abstract from '../views/common/abstract.vue'; export default [{ path: '/', name: '首页', component: (resolve) => require(['../views/index.vue'], resolve), children: [{ path: '/roles', name: '平台-角色管理', meta: { name: '角色管理' }, component: (resolve) => require(['../views/roles.vue'], resolve) }, { path: '/accounts', name: '平台-账号管理', meta: { name: '账号管理' }, component: (resolve) => require(['../views/accounts.vue'], resolve) }, { path: '/goods', name: '商品管理', meta: { icon: '&#xe62e;' }, component: Abstract, children: [{ path: 'list', name: '商品信息', meta: { }, component: (resolve) => require(['../views/goods-list.vue'], resolve) }] }] }];
{ "pile_set_name": "Github" }
# Import standard library import random from math import sqrt from typing import Tuple # Import modules import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib as mpl import numpy as np import seagull as sg import seagull.lifeforms as lf import streamlit as st from loguru import logger from scipy.signal import convolve2d def main(): # Sidebar st.sidebar.header("Parameters") st.sidebar.markdown("Control the automata's behavior") repro_rate = st.sidebar.slider( "Extinction rate: controls how many dead cells will stay dead on the next iteration", min_value=0, max_value=8, value=2, ) stasis_rate = st.sidebar.slider( "Stasis rate: controls how many live cells will stay alive on the next iteration", min_value=0, max_value=8, value=3, ) n_iters = st.sidebar.slider( "No. of iterations", min_value=0, max_value=20, value=1 ) st.sidebar.header("Styling") st.sidebar.markdown("Add design and make it unique!") n_sprites = st.sidebar.radio( "Number of sprites (grid)", options=[1, 4, 9, 16], index=2 ) # Main Page st.title("Create sprites using Cellular Automata!") st.markdown( """ ## Instructions Play with the parameters in the sidebar to generate your own 8-bit sprites. """ ) if st.button("Refresh"): with st.spinner("Wait for it..."): fig = make_sprite( n_sprites=n_sprites, n_iters=n_iters, repro_rate=repro_rate, stasis_rate=stasis_rate, ) else: with st.spinner("Wait for it..."): fig = make_sprite( n_sprites=n_sprites, n_iters=n_iters, repro_rate=repro_rate, stasis_rate=stasis_rate, ) st.pyplot(fig=fig, bbox_inches="tight") st.markdown("*To download, simply right-click the image, and save as PNG*") st.markdown( """ ## Cellular Automata? **Cellular Automata** is an abstract computational system that evolves given a discrete number of steps and a set of rules governing its behaviour. The classic Conway's Game of Life has the following rules: * **Overpopulation**: if a living cell is surrounded by more that three living cells, it dies. * **Stasis**: if a living cell is surrounded by two or three living cells, it survives. * **Underpopulation**: if a living cell is surrounded by fewer than two living cells, it dies * **Reproduction**: if a dead cell is surrounded by exactly three cells, it becomes a live cell. I find artifical life and nature-inspired computing highly-interesting. Before, I made a particle swarm optimization library called [PySwarms](https://github.com/ljvmiranda921/pyswarms), then two years later, I built a Conways' Game of Life simulator called [Seagull](https://github.com/ljvmiranda921/seagull). There's a certain energy and curiosity whenever I see these simulations seemingly "come to life!" ## Contributing Contributions are welcome! The source code for this web app can be found [here](https://github.com/ljvmiranda921/seagull/tree/master/docs/notebooks). For Issues and Pull Requests, please direct them to this [link](https://github.com/ljvmiranda921/seagull/issues)! """ ) st.markdown( """ --- This application is made with :heart: by [Lj V. Miranda](ljvmiranda921.github.io) using [ljvmiranda921/seagull](https://github.com/ljvmiranda921/seagull), a Python library for Conway's Game of Life, and [Streamlit](https://github.com/streamlit/streamlit)! Inspired and ported into Python from [yurkth/sprator](https://github.com/yurkth/sprator). """ ) def make_sprite( n_sprites: int, n_iters: int, repro_rate: int, stasis_rate: int, ): """Main function for creating sprites Parameters ---------- n_sprites : int Number of sprites to generate n_iters : int Number of iterations to run the simulator repro_rate : int Inverse reproduction rate stasis_rate : int Stasis rate """ logger.info("Initializing board") board = sg.Board(size=(8, 4)) logger.info("Running simulation") sprator_list = [] for sprite in range(n_sprites): noise = np.random.choice([0, 1], size=(8, 4)) custom_lf = lf.Custom(noise) board.add(custom_lf, loc=(0, 0)) sim = sg.Simulator(board) sim.run( custom_rule, iters=n_iters, repro_rate=repro_rate, stasis_rate=stasis_rate, ) fstate = sim.get_history()[-1] logger.info(f"Generating sprite/s: {sprite}") sprator = np.hstack([fstate, np.fliplr(fstate)]) sprator = np.pad( sprator, mode="constant", pad_width=1, constant_values=1 ) sprator_with_outline = add_outline(sprator) sprator_gradient = get_gradient(sprator_with_outline) sprator_final = combine(sprator_with_outline, sprator_gradient) sprator_list.append(sprator_final) # Generate plot based on the grid size n_grid = int(sqrt(n_sprites)) # Generate random colors as cmap r = lambda: "#%02X%02X%02X" % ( random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), ) colors = ["black", "#f2f2f2", r(), r(), r()] cm.register_cmap( cmap=mpl.colors.LinearSegmentedColormap.from_list( "custom", colors ).reversed() ) if n_grid == 1: fig, axs = plt.subplots(n_grid, n_grid, figsize=(5, 5)) axs = fig.add_axes([0, 0, 1, 1], xticks=[], yticks=[], frameon=False) axs.imshow(sprator_list[0], cmap="custom_r", interpolation="nearest") fig.text(0, -0.05, "bit.ly/CellularSprites", ha="left", color="black") else: fig, axs = plt.subplots(n_grid, n_grid, figsize=(5, 5)) for ax, sprator in zip(axs.flat, sprator_list): # TODO: Remove duplicates # Generate random colors as cmap r = lambda: "#%02X%02X%02X" % ( random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), ) colors = ["black", "#f2f2f2", r(), r(), r()] cm.register_cmap( cmap=mpl.colors.LinearSegmentedColormap.from_list( "custom", colors ).reversed() ) ax.imshow(sprator, cmap="custom_r", interpolation="nearest") ax.set_axis_off() fig.text(0.125, 0.05, "bit.ly/CellularSprites", ha="left") return fig def custom_rule(X, repro_rate=3, stasis_rate=3) -> np.ndarray: """Custom Sprator Rule""" n = convolve2d(X, np.ones((3, 3)), mode="same", boundary="fill") - X reproduction_rule = (X == 0) & (n <= repro_rate) stasis_rule = (X == 1) & ((n == 2) | (n == stasis_rate)) return reproduction_rule | stasis_rule def add_outline(mat: np.ndarray) -> np.ndarray: """Pad the matrix""" m = np.ones(mat.shape) for idx, orig_val in np.ndenumerate(mat): x, y = idx neighbors = [(x, y + 1), (x + 1, y), (x, y - 1), (x - 1, y)] if orig_val == 0: m[idx] = 0 # Set the coordinate in the new matrix as 0 for n_coord in neighbors: try: m[n_coord] = 0.5 if mat[n_coord] == 1 else 0 except IndexError: pass m = np.pad(m, mode="constant", pad_width=1, constant_values=1) # Let's do a switcheroo, I know this isn't elegant but please feel free to # do a PR to make this more efficient! m[m == 1] = np.inf m[m == 0.5] = 1 m[m == np.inf] = 0.5 return m def get_gradient(mat: np.ndarray) -> np.ndarray: """Get gradient of an outline sprator""" grad = np.gradient(mat)[0] def _remap(new_range, matrix): old_min, old_max = np.min(matrix), np.max(matrix) new_min, new_max = new_range old = old_max - old_min new = new_max - new_min return (((matrix - old_min) * new) / old) + new_min return _remap((0.2, 0.25), grad) def combine(mat_outline: np.ndarray, mat_gradient: np.ndarray): """Combine the matrix with outline and the one with grads""" mat_final = np.copy(mat_outline) mask = mat_outline == 0 mat_final[mask] = mat_gradient[mask] return mat_final main()
{ "pile_set_name": "Github" }
/* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ import { HashedItemStore } from './hashed_item_store'; export const HashedItemStoreSingleton = new HashedItemStore(window.sessionStorage);
{ "pile_set_name": "Github" }
// Copyright 2007, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Author: [email protected] (Zhanyong Wan) // Google Mock - a framework for writing C++ mock classes. // // This file tests the built-in actions generated by a script. #include "gmock/gmock-generated-actions.h" #include <functional> #include <sstream> #include <string> #include "gmock/gmock.h" #include "gtest/gtest.h" namespace testing { namespace gmock_generated_actions_test { using ::std::plus; using ::std::string; using ::std::tr1::get; using ::std::tr1::make_tuple; using ::std::tr1::tuple; using ::std::tr1::tuple_element; using testing::_; using testing::Action; using testing::ActionInterface; using testing::ByRef; using testing::DoAll; using testing::Invoke; using testing::Return; using testing::ReturnNew; using testing::SetArgPointee; using testing::StaticAssertTypeEq; using testing::Unused; using testing::WithArgs; // For suppressing compiler warnings on conversion possibly losing precision. inline short Short(short n) { return n; } // NOLINT inline char Char(char ch) { return ch; } // Sample functions and functors for testing various actions. int Nullary() { return 1; } class NullaryFunctor { public: int operator()() { return 2; } }; bool g_done = false; bool Unary(int x) { return x < 0; } const char* Plus1(const char* s) { return s + 1; } bool ByConstRef(const string& s) { return s == "Hi"; } const double g_double = 0; bool ReferencesGlobalDouble(const double& x) { return &x == &g_double; } string ByNonConstRef(string& s) { return s += "+"; } // NOLINT struct UnaryFunctor { int operator()(bool x) { return x ? 1 : -1; } }; const char* Binary(const char* input, short n) { return input + n; } // NOLINT void VoidBinary(int, char) { g_done = true; } int Ternary(int x, char y, short z) { return x + y + z; } // NOLINT void VoidTernary(int, char, bool) { g_done = true; } int SumOf4(int a, int b, int c, int d) { return a + b + c + d; } string Concat4(const char* s1, const char* s2, const char* s3, const char* s4) { return string(s1) + s2 + s3 + s4; } int SumOf5(int a, int b, int c, int d, int e) { return a + b + c + d + e; } struct SumOf5Functor { int operator()(int a, int b, int c, int d, int e) { return a + b + c + d + e; } }; string Concat5(const char* s1, const char* s2, const char* s3, const char* s4, const char* s5) { return string(s1) + s2 + s3 + s4 + s5; } int SumOf6(int a, int b, int c, int d, int e, int f) { return a + b + c + d + e + f; } struct SumOf6Functor { int operator()(int a, int b, int c, int d, int e, int f) { return a + b + c + d + e + f; } }; string Concat6(const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, const char* s6) { return string(s1) + s2 + s3 + s4 + s5 + s6; } string Concat7(const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, const char* s6, const char* s7) { return string(s1) + s2 + s3 + s4 + s5 + s6 + s7; } string Concat8(const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, const char* s6, const char* s7, const char* s8) { return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8; } string Concat9(const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, const char* s6, const char* s7, const char* s8, const char* s9) { return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9; } string Concat10(const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, const char* s6, const char* s7, const char* s8, const char* s9, const char* s10) { return string(s1) + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10; } // A helper that turns the type of a C-string literal from const // char[N] to const char*. inline const char* CharPtr(const char* s) { return s; } // Tests InvokeArgument<N>(...). // Tests using InvokeArgument with a nullary function. TEST(InvokeArgumentTest, Function0) { Action<int(int, int(*)())> a = InvokeArgument<1>(); // NOLINT EXPECT_EQ(1, a.Perform(make_tuple(2, &Nullary))); } // Tests using InvokeArgument with a unary function. TEST(InvokeArgumentTest, Functor1) { Action<int(UnaryFunctor)> a = InvokeArgument<0>(true); // NOLINT EXPECT_EQ(1, a.Perform(make_tuple(UnaryFunctor()))); } // Tests using InvokeArgument with a 5-ary function. TEST(InvokeArgumentTest, Function5) { Action<int(int(*)(int, int, int, int, int))> a = // NOLINT InvokeArgument<0>(10000, 2000, 300, 40, 5); EXPECT_EQ(12345, a.Perform(make_tuple(&SumOf5))); } // Tests using InvokeArgument with a 5-ary functor. TEST(InvokeArgumentTest, Functor5) { Action<int(SumOf5Functor)> a = // NOLINT InvokeArgument<0>(10000, 2000, 300, 40, 5); EXPECT_EQ(12345, a.Perform(make_tuple(SumOf5Functor()))); } // Tests using InvokeArgument with a 6-ary function. TEST(InvokeArgumentTest, Function6) { Action<int(int(*)(int, int, int, int, int, int))> a = // NOLINT InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6); EXPECT_EQ(123456, a.Perform(make_tuple(&SumOf6))); } // Tests using InvokeArgument with a 6-ary functor. TEST(InvokeArgumentTest, Functor6) { Action<int(SumOf6Functor)> a = // NOLINT InvokeArgument<0>(100000, 20000, 3000, 400, 50, 6); EXPECT_EQ(123456, a.Perform(make_tuple(SumOf6Functor()))); } // Tests using InvokeArgument with a 7-ary function. TEST(InvokeArgumentTest, Function7) { Action<string(string(*)(const char*, const char*, const char*, const char*, const char*, const char*, const char*))> a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7"); EXPECT_EQ("1234567", a.Perform(make_tuple(&Concat7))); } // Tests using InvokeArgument with a 8-ary function. TEST(InvokeArgumentTest, Function8) { Action<string(string(*)(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*))> a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8"); EXPECT_EQ("12345678", a.Perform(make_tuple(&Concat8))); } // Tests using InvokeArgument with a 9-ary function. TEST(InvokeArgumentTest, Function9) { Action<string(string(*)(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*))> a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9"); EXPECT_EQ("123456789", a.Perform(make_tuple(&Concat9))); } // Tests using InvokeArgument with a 10-ary function. TEST(InvokeArgumentTest, Function10) { Action<string(string(*)(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*))> a = InvokeArgument<0>("1", "2", "3", "4", "5", "6", "7", "8", "9", "0"); EXPECT_EQ("1234567890", a.Perform(make_tuple(&Concat10))); } // Tests using InvokeArgument with a function that takes a pointer argument. TEST(InvokeArgumentTest, ByPointerFunction) { Action<const char*(const char*(*)(const char* input, short n))> a = // NOLINT InvokeArgument<0>(static_cast<const char*>("Hi"), Short(1)); EXPECT_STREQ("i", a.Perform(make_tuple(&Binary))); } // Tests using InvokeArgument with a function that takes a const char* // by passing it a C-string literal. TEST(InvokeArgumentTest, FunctionWithCStringLiteral) { Action<const char*(const char*(*)(const char* input, short n))> a = // NOLINT InvokeArgument<0>("Hi", Short(1)); EXPECT_STREQ("i", a.Perform(make_tuple(&Binary))); } // Tests using InvokeArgument with a function that takes a const reference. TEST(InvokeArgumentTest, ByConstReferenceFunction) { Action<bool(bool(*function)(const string& s))> a = // NOLINT InvokeArgument<0>(string("Hi")); // When action 'a' is constructed, it makes a copy of the temporary // string object passed to it, so it's OK to use 'a' later, when the // temporary object has already died. EXPECT_TRUE(a.Perform(make_tuple(&ByConstRef))); } // Tests using InvokeArgument with ByRef() and a function that takes a // const reference. TEST(InvokeArgumentTest, ByExplicitConstReferenceFunction) { Action<bool(bool(*)(const double& x))> a = // NOLINT InvokeArgument<0>(ByRef(g_double)); // The above line calls ByRef() on a const value. EXPECT_TRUE(a.Perform(make_tuple(&ReferencesGlobalDouble))); double x = 0; a = InvokeArgument<0>(ByRef(x)); // This calls ByRef() on a non-const. EXPECT_FALSE(a.Perform(make_tuple(&ReferencesGlobalDouble))); } // Tests using WithArgs and with an action that takes 1 argument. TEST(WithArgsTest, OneArg) { Action<bool(double x, int n)> a = WithArgs<1>(Invoke(Unary)); // NOLINT EXPECT_TRUE(a.Perform(make_tuple(1.5, -1))); EXPECT_FALSE(a.Perform(make_tuple(1.5, 1))); } // Tests using WithArgs with an action that takes 2 arguments. TEST(WithArgsTest, TwoArgs) { Action<const char*(const char* s, double x, short n)> a = WithArgs<0, 2>(Invoke(Binary)); const char s[] = "Hello"; EXPECT_EQ(s + 2, a.Perform(make_tuple(CharPtr(s), 0.5, Short(2)))); } // Tests using WithArgs with an action that takes 3 arguments. TEST(WithArgsTest, ThreeArgs) { Action<int(int, double, char, short)> a = // NOLINT WithArgs<0, 2, 3>(Invoke(Ternary)); EXPECT_EQ(123, a.Perform(make_tuple(100, 6.5, Char(20), Short(3)))); } // Tests using WithArgs with an action that takes 4 arguments. TEST(WithArgsTest, FourArgs) { Action<string(const char*, const char*, double, const char*, const char*)> a = WithArgs<4, 3, 1, 0>(Invoke(Concat4)); EXPECT_EQ("4310", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), 2.5, CharPtr("3"), CharPtr("4")))); } // Tests using WithArgs with an action that takes 5 arguments. TEST(WithArgsTest, FiveArgs) { Action<string(const char*, const char*, const char*, const char*, const char*)> a = WithArgs<4, 3, 2, 1, 0>(Invoke(Concat5)); EXPECT_EQ("43210", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), CharPtr("3"), CharPtr("4")))); } // Tests using WithArgs with an action that takes 6 arguments. TEST(WithArgsTest, SixArgs) { Action<string(const char*, const char*, const char*)> a = WithArgs<0, 1, 2, 2, 1, 0>(Invoke(Concat6)); EXPECT_EQ("012210", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2")))); } // Tests using WithArgs with an action that takes 7 arguments. TEST(WithArgsTest, SevenArgs) { Action<string(const char*, const char*, const char*, const char*)> a = WithArgs<0, 1, 2, 3, 2, 1, 0>(Invoke(Concat7)); EXPECT_EQ("0123210", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), CharPtr("3")))); } // Tests using WithArgs with an action that takes 8 arguments. TEST(WithArgsTest, EightArgs) { Action<string(const char*, const char*, const char*, const char*)> a = WithArgs<0, 1, 2, 3, 0, 1, 2, 3>(Invoke(Concat8)); EXPECT_EQ("01230123", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), CharPtr("3")))); } // Tests using WithArgs with an action that takes 9 arguments. TEST(WithArgsTest, NineArgs) { Action<string(const char*, const char*, const char*, const char*)> a = WithArgs<0, 1, 2, 3, 1, 2, 3, 2, 3>(Invoke(Concat9)); EXPECT_EQ("012312323", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), CharPtr("3")))); } // Tests using WithArgs with an action that takes 10 arguments. TEST(WithArgsTest, TenArgs) { Action<string(const char*, const char*, const char*, const char*)> a = WithArgs<0, 1, 2, 3, 2, 1, 0, 1, 2, 3>(Invoke(Concat10)); EXPECT_EQ("0123210123", a.Perform(make_tuple(CharPtr("0"), CharPtr("1"), CharPtr("2"), CharPtr("3")))); } // Tests using WithArgs with an action that is not Invoke(). class SubstractAction : public ActionInterface<int(int, int)> { // NOLINT public: virtual int Perform(const tuple<int, int>& args) { return get<0>(args) - get<1>(args); } }; TEST(WithArgsTest, NonInvokeAction) { Action<int(const string&, int, int)> a = // NOLINT WithArgs<2, 1>(MakeAction(new SubstractAction)); EXPECT_EQ(8, a.Perform(make_tuple(string("hi"), 2, 10))); } // Tests using WithArgs to pass all original arguments in the original order. TEST(WithArgsTest, Identity) { Action<int(int x, char y, short z)> a = // NOLINT WithArgs<0, 1, 2>(Invoke(Ternary)); EXPECT_EQ(123, a.Perform(make_tuple(100, Char(20), Short(3)))); } // Tests using WithArgs with repeated arguments. TEST(WithArgsTest, RepeatedArguments) { Action<int(bool, int m, int n)> a = // NOLINT WithArgs<1, 1, 1, 1>(Invoke(SumOf4)); EXPECT_EQ(4, a.Perform(make_tuple(false, 1, 10))); } // Tests using WithArgs with reversed argument order. TEST(WithArgsTest, ReversedArgumentOrder) { Action<const char*(short n, const char* input)> a = // NOLINT WithArgs<1, 0>(Invoke(Binary)); const char s[] = "Hello"; EXPECT_EQ(s + 2, a.Perform(make_tuple(Short(2), CharPtr(s)))); } // Tests using WithArgs with compatible, but not identical, argument types. TEST(WithArgsTest, ArgsOfCompatibleTypes) { Action<long(short x, char y, double z, char c)> a = // NOLINT WithArgs<0, 1, 3>(Invoke(Ternary)); EXPECT_EQ(123, a.Perform(make_tuple(Short(100), Char(20), 5.6, Char(3)))); } // Tests using WithArgs with an action that returns void. TEST(WithArgsTest, VoidAction) { Action<void(double x, char c, int n)> a = WithArgs<2, 1>(Invoke(VoidBinary)); g_done = false; a.Perform(make_tuple(1.5, 'a', 3)); EXPECT_TRUE(g_done); } // Tests DoAll(a1, a2). TEST(DoAllTest, TwoActions) { int n = 0; Action<int(int*)> a = DoAll(SetArgPointee<0>(1), // NOLINT Return(2)); EXPECT_EQ(2, a.Perform(make_tuple(&n))); EXPECT_EQ(1, n); } // Tests DoAll(a1, a2, a3). TEST(DoAllTest, ThreeActions) { int m = 0, n = 0; Action<int(int*, int*)> a = DoAll(SetArgPointee<0>(1), // NOLINT SetArgPointee<1>(2), Return(3)); EXPECT_EQ(3, a.Perform(make_tuple(&m, &n))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); } // Tests DoAll(a1, a2, a3, a4). TEST(DoAllTest, FourActions) { int m = 0, n = 0; char ch = '\0'; Action<int(int*, int*, char*)> a = // NOLINT DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), Return(3)); EXPECT_EQ(3, a.Perform(make_tuple(&m, &n, &ch))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', ch); } // Tests DoAll(a1, a2, a3, a4, a5). TEST(DoAllTest, FiveActions) { int m = 0, n = 0; char a = '\0', b = '\0'; Action<int(int*, int*, char*, char*)> action = // NOLINT DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), SetArgPointee<3>('b'), Return(3)); EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', a); EXPECT_EQ('b', b); } // Tests DoAll(a1, a2, ..., a6). TEST(DoAllTest, SixActions) { int m = 0, n = 0; char a = '\0', b = '\0', c = '\0'; Action<int(int*, int*, char*, char*, char*)> action = // NOLINT DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), SetArgPointee<3>('b'), SetArgPointee<4>('c'), Return(3)); EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', a); EXPECT_EQ('b', b); EXPECT_EQ('c', c); } // Tests DoAll(a1, a2, ..., a7). TEST(DoAllTest, SevenActions) { int m = 0, n = 0; char a = '\0', b = '\0', c = '\0', d = '\0'; Action<int(int*, int*, char*, char*, char*, char*)> action = // NOLINT DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), SetArgPointee<3>('b'), SetArgPointee<4>('c'), SetArgPointee<5>('d'), Return(3)); EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', a); EXPECT_EQ('b', b); EXPECT_EQ('c', c); EXPECT_EQ('d', d); } // Tests DoAll(a1, a2, ..., a8). TEST(DoAllTest, EightActions) { int m = 0, n = 0; char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0'; Action<int(int*, int*, char*, char*, char*, char*, // NOLINT char*)> action = DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), SetArgPointee<3>('b'), SetArgPointee<4>('c'), SetArgPointee<5>('d'), SetArgPointee<6>('e'), Return(3)); EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', a); EXPECT_EQ('b', b); EXPECT_EQ('c', c); EXPECT_EQ('d', d); EXPECT_EQ('e', e); } // Tests DoAll(a1, a2, ..., a9). TEST(DoAllTest, NineActions) { int m = 0, n = 0; char a = '\0', b = '\0', c = '\0', d = '\0', e = '\0', f = '\0'; Action<int(int*, int*, char*, char*, char*, char*, // NOLINT char*, char*)> action = DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), SetArgPointee<3>('b'), SetArgPointee<4>('c'), SetArgPointee<5>('d'), SetArgPointee<6>('e'), SetArgPointee<7>('f'), Return(3)); EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', a); EXPECT_EQ('b', b); EXPECT_EQ('c', c); EXPECT_EQ('d', d); EXPECT_EQ('e', e); EXPECT_EQ('f', f); } // Tests DoAll(a1, a2, ..., a10). TEST(DoAllTest, TenActions) { int m = 0, n = 0; char a = '\0', b = '\0', c = '\0', d = '\0'; char e = '\0', f = '\0', g = '\0'; Action<int(int*, int*, char*, char*, char*, char*, // NOLINT char*, char*, char*)> action = DoAll(SetArgPointee<0>(1), SetArgPointee<1>(2), SetArgPointee<2>('a'), SetArgPointee<3>('b'), SetArgPointee<4>('c'), SetArgPointee<5>('d'), SetArgPointee<6>('e'), SetArgPointee<7>('f'), SetArgPointee<8>('g'), Return(3)); EXPECT_EQ(3, action.Perform(make_tuple(&m, &n, &a, &b, &c, &d, &e, &f, &g))); EXPECT_EQ(1, m); EXPECT_EQ(2, n); EXPECT_EQ('a', a); EXPECT_EQ('b', b); EXPECT_EQ('c', c); EXPECT_EQ('d', d); EXPECT_EQ('e', e); EXPECT_EQ('f', f); EXPECT_EQ('g', g); } // The ACTION*() macros trigger warning C4100 (unreferenced formal // parameter) in MSVC with -W4. Unfortunately they cannot be fixed in // the macro definition, as the warnings are generated when the macro // is expanded and macro expansion cannot contain #pragma. Therefore // we suppress them here. #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable:4100) #endif // Tests the ACTION*() macro family. // Tests that ACTION() can define an action that doesn't reference the // mock function arguments. ACTION(Return5) { return 5; } TEST(ActionMacroTest, WorksWhenNotReferencingArguments) { Action<double()> a1 = Return5(); EXPECT_DOUBLE_EQ(5, a1.Perform(make_tuple())); Action<int(double, bool)> a2 = Return5(); EXPECT_EQ(5, a2.Perform(make_tuple(1, true))); } // Tests that ACTION() can define an action that returns void. ACTION(IncrementArg1) { (*arg1)++; } TEST(ActionMacroTest, WorksWhenReturningVoid) { Action<void(int, int*)> a1 = IncrementArg1(); int n = 0; a1.Perform(make_tuple(5, &n)); EXPECT_EQ(1, n); } // Tests that the body of ACTION() can reference the type of the // argument. ACTION(IncrementArg2) { StaticAssertTypeEq<int*, arg2_type>(); arg2_type temp = arg2; (*temp)++; } TEST(ActionMacroTest, CanReferenceArgumentType) { Action<void(int, bool, int*)> a1 = IncrementArg2(); int n = 0; a1.Perform(make_tuple(5, false, &n)); EXPECT_EQ(1, n); } // Tests that the body of ACTION() can reference the argument tuple // via args_type and args. ACTION(Sum2) { StaticAssertTypeEq< ::std::tr1::tuple<int, char, int*>, args_type>(); args_type args_copy = args; return get<0>(args_copy) + get<1>(args_copy); } TEST(ActionMacroTest, CanReferenceArgumentTuple) { Action<int(int, char, int*)> a1 = Sum2(); int dummy = 0; EXPECT_EQ(11, a1.Perform(make_tuple(5, Char(6), &dummy))); } // Tests that the body of ACTION() can reference the mock function // type. int Dummy(bool flag) { return flag? 1 : 0; } ACTION(InvokeDummy) { StaticAssertTypeEq<int(bool), function_type>(); function_type* fp = &Dummy; return (*fp)(true); } TEST(ActionMacroTest, CanReferenceMockFunctionType) { Action<int(bool)> a1 = InvokeDummy(); EXPECT_EQ(1, a1.Perform(make_tuple(true))); EXPECT_EQ(1, a1.Perform(make_tuple(false))); } // Tests that the body of ACTION() can reference the mock function's // return type. ACTION(InvokeDummy2) { StaticAssertTypeEq<int, return_type>(); return_type result = Dummy(true); return result; } TEST(ActionMacroTest, CanReferenceMockFunctionReturnType) { Action<int(bool)> a1 = InvokeDummy2(); EXPECT_EQ(1, a1.Perform(make_tuple(true))); EXPECT_EQ(1, a1.Perform(make_tuple(false))); } // Tests that ACTION() works for arguments passed by const reference. ACTION(ReturnAddrOfConstBoolReferenceArg) { StaticAssertTypeEq<const bool&, arg1_type>(); return &arg1; } TEST(ActionMacroTest, WorksForConstReferenceArg) { Action<const bool*(int, const bool&)> a = ReturnAddrOfConstBoolReferenceArg(); const bool b = false; EXPECT_EQ(&b, a.Perform(tuple<int, const bool&>(0, b))); } // Tests that ACTION() works for arguments passed by non-const reference. ACTION(ReturnAddrOfIntReferenceArg) { StaticAssertTypeEq<int&, arg0_type>(); return &arg0; } TEST(ActionMacroTest, WorksForNonConstReferenceArg) { Action<int*(int&, bool, int)> a = ReturnAddrOfIntReferenceArg(); int n = 0; EXPECT_EQ(&n, a.Perform(tuple<int&, bool, int>(n, true, 1))); } // Tests that ACTION() can be used in a namespace. namespace action_test { ACTION(Sum) { return arg0 + arg1; } } // namespace action_test TEST(ActionMacroTest, WorksInNamespace) { Action<int(int, int)> a1 = action_test::Sum(); EXPECT_EQ(3, a1.Perform(make_tuple(1, 2))); } // Tests that the same ACTION definition works for mock functions with // different argument numbers. ACTION(PlusTwo) { return arg0 + 2; } TEST(ActionMacroTest, WorksForDifferentArgumentNumbers) { Action<int(int)> a1 = PlusTwo(); EXPECT_EQ(4, a1.Perform(make_tuple(2))); Action<double(float, void*)> a2 = PlusTwo(); int dummy; EXPECT_DOUBLE_EQ(6, a2.Perform(make_tuple(4.0f, &dummy))); } // Tests that ACTION_P can define a parameterized action. ACTION_P(Plus, n) { return arg0 + n; } TEST(ActionPMacroTest, DefinesParameterizedAction) { Action<int(int m, bool t)> a1 = Plus(9); EXPECT_EQ(10, a1.Perform(make_tuple(1, true))); } // Tests that the body of ACTION_P can reference the argument types // and the parameter type. ACTION_P(TypedPlus, n) { arg0_type t1 = arg0; n_type t2 = n; return t1 + t2; } TEST(ActionPMacroTest, CanReferenceArgumentAndParameterTypes) { Action<int(char m, bool t)> a1 = TypedPlus(9); EXPECT_EQ(10, a1.Perform(make_tuple(Char(1), true))); } // Tests that a parameterized action can be used in any mock function // whose type is compatible. TEST(ActionPMacroTest, WorksInCompatibleMockFunction) { Action<std::string(const std::string& s)> a1 = Plus("tail"); const std::string re = "re"; EXPECT_EQ("retail", a1.Perform(make_tuple(re))); } // Tests that we can use ACTION*() to define actions overloaded on the // number of parameters. ACTION(OverloadedAction) { return arg0 ? arg1 : "hello"; } ACTION_P(OverloadedAction, default_value) { return arg0 ? arg1 : default_value; } ACTION_P2(OverloadedAction, true_value, false_value) { return arg0 ? true_value : false_value; } TEST(ActionMacroTest, CanDefineOverloadedActions) { typedef Action<const char*(bool, const char*)> MyAction; const MyAction a1 = OverloadedAction(); EXPECT_STREQ("hello", a1.Perform(make_tuple(false, CharPtr("world")))); EXPECT_STREQ("world", a1.Perform(make_tuple(true, CharPtr("world")))); const MyAction a2 = OverloadedAction("hi"); EXPECT_STREQ("hi", a2.Perform(make_tuple(false, CharPtr("world")))); EXPECT_STREQ("world", a2.Perform(make_tuple(true, CharPtr("world")))); const MyAction a3 = OverloadedAction("hi", "you"); EXPECT_STREQ("hi", a3.Perform(make_tuple(true, CharPtr("world")))); EXPECT_STREQ("you", a3.Perform(make_tuple(false, CharPtr("world")))); } // Tests ACTION_Pn where n >= 3. ACTION_P3(Plus, m, n, k) { return arg0 + m + n + k; } TEST(ActionPnMacroTest, WorksFor3Parameters) { Action<double(int m, bool t)> a1 = Plus(100, 20, 3.4); EXPECT_DOUBLE_EQ(3123.4, a1.Perform(make_tuple(3000, true))); Action<std::string(const std::string& s)> a2 = Plus("tail", "-", ">"); const std::string re = "re"; EXPECT_EQ("retail->", a2.Perform(make_tuple(re))); } ACTION_P4(Plus, p0, p1, p2, p3) { return arg0 + p0 + p1 + p2 + p3; } TEST(ActionPnMacroTest, WorksFor4Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4); EXPECT_EQ(10 + 1 + 2 + 3 + 4, a1.Perform(make_tuple(10))); } ACTION_P5(Plus, p0, p1, p2, p3, p4) { return arg0 + p0 + p1 + p2 + p3 + p4; } TEST(ActionPnMacroTest, WorksFor5Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4, 5); EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5, a1.Perform(make_tuple(10))); } ACTION_P6(Plus, p0, p1, p2, p3, p4, p5) { return arg0 + p0 + p1 + p2 + p3 + p4 + p5; } TEST(ActionPnMacroTest, WorksFor6Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6); EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6, a1.Perform(make_tuple(10))); } ACTION_P7(Plus, p0, p1, p2, p3, p4, p5, p6) { return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6; } TEST(ActionPnMacroTest, WorksFor7Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7); EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7, a1.Perform(make_tuple(10))); } ACTION_P8(Plus, p0, p1, p2, p3, p4, p5, p6, p7) { return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7; } TEST(ActionPnMacroTest, WorksFor8Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8); EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8, a1.Perform(make_tuple(10))); } ACTION_P9(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8) { return arg0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8; } TEST(ActionPnMacroTest, WorksFor9Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9); EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9, a1.Perform(make_tuple(10))); } ACTION_P10(Plus, p0, p1, p2, p3, p4, p5, p6, p7, p8, last_param) { arg0_type t0 = arg0; last_param_type t9 = last_param; return t0 + p0 + p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + t9; } TEST(ActionPnMacroTest, WorksFor10Parameters) { Action<int(int)> a1 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); EXPECT_EQ(10 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10, a1.Perform(make_tuple(10))); } // Tests that the action body can promote the parameter types. ACTION_P2(PadArgument, prefix, suffix) { // The following lines promote the two parameters to desired types. std::string prefix_str(prefix); char suffix_char = static_cast<char>(suffix); return prefix_str + arg0 + suffix_char; } TEST(ActionPnMacroTest, SimpleTypePromotion) { Action<std::string(const char*)> no_promo = PadArgument(std::string("foo"), 'r'); Action<std::string(const char*)> promo = PadArgument("foo", static_cast<int>('r')); EXPECT_EQ("foobar", no_promo.Perform(make_tuple(CharPtr("ba")))); EXPECT_EQ("foobar", promo.Perform(make_tuple(CharPtr("ba")))); } // Tests that we can partially restrict parameter types using a // straight-forward pattern. // Defines a generic action that doesn't restrict the types of its // parameters. ACTION_P3(ConcatImpl, a, b, c) { std::stringstream ss; ss << a << b << c; return ss.str(); } // Next, we try to restrict that either the first parameter is a // string, or the second parameter is an int. // Defines a partially specialized wrapper that restricts the first // parameter to std::string. template <typename T1, typename T2> // ConcatImplActionP3 is the class template ACTION_P3 uses to // implement ConcatImpl. We shouldn't change the name as this // pattern requires the user to use it directly. ConcatImplActionP3<std::string, T1, T2> Concat(const std::string& a, T1 b, T2 c) { if (true) { // This branch verifies that ConcatImpl() can be invoked without // explicit template arguments. return ConcatImpl(a, b, c); } else { // This branch verifies that ConcatImpl() can also be invoked with // explicit template arguments. It doesn't really need to be // executed as this is a compile-time verification. return ConcatImpl<std::string, T1, T2>(a, b, c); } } // Defines another partially specialized wrapper that restricts the // second parameter to int. template <typename T1, typename T2> ConcatImplActionP3<T1, int, T2> Concat(T1 a, int b, T2 c) { return ConcatImpl(a, b, c); } TEST(ActionPnMacroTest, CanPartiallyRestrictParameterTypes) { Action<const std::string()> a1 = Concat("Hello", "1", 2); EXPECT_EQ("Hello12", a1.Perform(make_tuple())); a1 = Concat(1, 2, 3); EXPECT_EQ("123", a1.Perform(make_tuple())); } // Verifies the type of an ACTION*. ACTION(DoFoo) {} ACTION_P(DoFoo, p) {} ACTION_P2(DoFoo, p0, p1) {} TEST(ActionPnMacroTest, TypesAreCorrect) { // DoFoo() must be assignable to a DoFooAction variable. DoFooAction a0 = DoFoo(); // DoFoo(1) must be assignable to a DoFooActionP variable. DoFooActionP<int> a1 = DoFoo(1); // DoFoo(p1, ..., pk) must be assignable to a DoFooActionPk // variable, and so on. DoFooActionP2<int, char> a2 = DoFoo(1, '2'); PlusActionP3<int, int, char> a3 = Plus(1, 2, '3'); PlusActionP4<int, int, int, char> a4 = Plus(1, 2, 3, '4'); PlusActionP5<int, int, int, int, char> a5 = Plus(1, 2, 3, 4, '5'); PlusActionP6<int, int, int, int, int, char> a6 = Plus(1, 2, 3, 4, 5, '6'); PlusActionP7<int, int, int, int, int, int, char> a7 = Plus(1, 2, 3, 4, 5, 6, '7'); PlusActionP8<int, int, int, int, int, int, int, char> a8 = Plus(1, 2, 3, 4, 5, 6, 7, '8'); PlusActionP9<int, int, int, int, int, int, int, int, char> a9 = Plus(1, 2, 3, 4, 5, 6, 7, 8, '9'); PlusActionP10<int, int, int, int, int, int, int, int, int, char> a10 = Plus(1, 2, 3, 4, 5, 6, 7, 8, 9, '0'); // Avoid "unused variable" warnings. (void)a0; (void)a1; (void)a2; (void)a3; (void)a4; (void)a5; (void)a6; (void)a7; (void)a8; (void)a9; (void)a10; } // Tests that an ACTION_P*() action can be explicitly instantiated // with reference-typed parameters. ACTION_P(Plus1, x) { return x; } ACTION_P2(Plus2, x, y) { return x + y; } ACTION_P3(Plus3, x, y, z) { return x + y + z; } ACTION_P10(Plus10, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9; } TEST(ActionPnMacroTest, CanExplicitlyInstantiateWithReferenceTypes) { int x = 1, y = 2, z = 3; const tuple<> empty = make_tuple(); Action<int()> a = Plus1<int&>(x); EXPECT_EQ(1, a.Perform(empty)); a = Plus2<const int&, int&>(x, y); EXPECT_EQ(3, a.Perform(empty)); a = Plus3<int&, const int&, int&>(x, y, z); EXPECT_EQ(6, a.Perform(empty)); int n[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; a = Plus10<const int&, int&, const int&, int&, const int&, int&, const int&, int&, const int&, int&>(n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7], n[8], n[9]); EXPECT_EQ(55, a.Perform(empty)); } class NullaryConstructorClass { public: NullaryConstructorClass() : value_(123) {} int value_; }; // Tests using ReturnNew() with a nullary constructor. TEST(ReturnNewTest, NoArgs) { Action<NullaryConstructorClass*()> a = ReturnNew<NullaryConstructorClass>(); NullaryConstructorClass* c = a.Perform(make_tuple()); EXPECT_EQ(123, c->value_); delete c; } class UnaryConstructorClass { public: explicit UnaryConstructorClass(int value) : value_(value) {} int value_; }; // Tests using ReturnNew() with a unary constructor. TEST(ReturnNewTest, Unary) { Action<UnaryConstructorClass*()> a = ReturnNew<UnaryConstructorClass>(4000); UnaryConstructorClass* c = a.Perform(make_tuple()); EXPECT_EQ(4000, c->value_); delete c; } TEST(ReturnNewTest, UnaryWorksWhenMockMethodHasArgs) { Action<UnaryConstructorClass*(bool, int)> a = ReturnNew<UnaryConstructorClass>(4000); UnaryConstructorClass* c = a.Perform(make_tuple(false, 5)); EXPECT_EQ(4000, c->value_); delete c; } TEST(ReturnNewTest, UnaryWorksWhenMockMethodReturnsPointerToConst) { Action<const UnaryConstructorClass*()> a = ReturnNew<UnaryConstructorClass>(4000); const UnaryConstructorClass* c = a.Perform(make_tuple()); EXPECT_EQ(4000, c->value_); delete c; } class TenArgConstructorClass { public: TenArgConstructorClass(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10) : value_(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10) { } int value_; }; // Tests using ReturnNew() with a 10-argument constructor. TEST(ReturnNewTest, ConstructorThatTakes10Arguments) { Action<TenArgConstructorClass*()> a = ReturnNew<TenArgConstructorClass>(1000000000, 200000000, 30000000, 4000000, 500000, 60000, 7000, 800, 90, 0); TenArgConstructorClass* c = a.Perform(make_tuple()); EXPECT_EQ(1234567890, c->value_); delete c; } // Tests that ACTION_TEMPLATE works when there is no value parameter. ACTION_TEMPLATE(CreateNew, HAS_1_TEMPLATE_PARAMS(typename, T), AND_0_VALUE_PARAMS()) { return new T; } TEST(ActionTemplateTest, WorksWithoutValueParam) { const Action<int*()> a = CreateNew<int>(); int* p = a.Perform(make_tuple()); delete p; } // Tests that ACTION_TEMPLATE works when there are value parameters. ACTION_TEMPLATE(CreateNew, HAS_1_TEMPLATE_PARAMS(typename, T), AND_1_VALUE_PARAMS(a0)) { return new T(a0); } TEST(ActionTemplateTest, WorksWithValueParams) { const Action<int*()> a = CreateNew<int>(42); int* p = a.Perform(make_tuple()); EXPECT_EQ(42, *p); delete p; } // Tests that ACTION_TEMPLATE works for integral template parameters. ACTION_TEMPLATE(MyDeleteArg, HAS_1_TEMPLATE_PARAMS(int, k), AND_0_VALUE_PARAMS()) { delete std::tr1::get<k>(args); } // Resets a bool variable in the destructor. class BoolResetter { public: explicit BoolResetter(bool* value) : value_(value) {} ~BoolResetter() { *value_ = false; } private: bool* value_; }; TEST(ActionTemplateTest, WorksForIntegralTemplateParams) { const Action<void(int*, BoolResetter*)> a = MyDeleteArg<1>(); int n = 0; bool b = true; BoolResetter* resetter = new BoolResetter(&b); a.Perform(make_tuple(&n, resetter)); EXPECT_FALSE(b); // Verifies that resetter is deleted. } // Tests that ACTION_TEMPLATES works for template template parameters. ACTION_TEMPLATE(ReturnSmartPointer, HAS_1_TEMPLATE_PARAMS(template <typename Pointee> class, Pointer), AND_1_VALUE_PARAMS(pointee)) { return Pointer<pointee_type>(new pointee_type(pointee)); } TEST(ActionTemplateTest, WorksForTemplateTemplateParameters) { using ::testing::internal::linked_ptr; const Action<linked_ptr<int>()> a = ReturnSmartPointer<linked_ptr>(42); linked_ptr<int> p = a.Perform(make_tuple()); EXPECT_EQ(42, *p); } // Tests that ACTION_TEMPLATE works for 10 template parameters. template <typename T1, typename T2, typename T3, int k4, bool k5, unsigned int k6, typename T7, typename T8, typename T9> struct GiantTemplate { public: explicit GiantTemplate(int a_value) : value(a_value) {} int value; }; ACTION_TEMPLATE(ReturnGiant, HAS_10_TEMPLATE_PARAMS( typename, T1, typename, T2, typename, T3, int, k4, bool, k5, unsigned int, k6, class, T7, class, T8, class, T9, template <typename T> class, T10), AND_1_VALUE_PARAMS(value)) { return GiantTemplate<T10<T1>, T2, T3, k4, k5, k6, T7, T8, T9>(value); } TEST(ActionTemplateTest, WorksFor10TemplateParameters) { using ::testing::internal::linked_ptr; typedef GiantTemplate<linked_ptr<int>, bool, double, 5, true, 6, char, unsigned, int> Giant; const Action<Giant()> a = ReturnGiant< int, bool, double, 5, true, 6, char, unsigned, int, linked_ptr>(42); Giant giant = a.Perform(make_tuple()); EXPECT_EQ(42, giant.value); } // Tests that ACTION_TEMPLATE works for 10 value parameters. ACTION_TEMPLATE(ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_10_VALUE_PARAMS(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)) { return static_cast<Number>(v1) + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10; } TEST(ActionTemplateTest, WorksFor10ValueParameters) { const Action<int()> a = ReturnSum<int>(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); EXPECT_EQ(55, a.Perform(make_tuple())); } // Tests that ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded // on the number of value parameters. ACTION(ReturnSum) { return 0; } ACTION_P(ReturnSum, x) { return x; } ACTION_TEMPLATE(ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_2_VALUE_PARAMS(v1, v2)) { return static_cast<Number>(v1) + v2; } ACTION_TEMPLATE(ReturnSum, HAS_1_TEMPLATE_PARAMS(typename, Number), AND_3_VALUE_PARAMS(v1, v2, v3)) { return static_cast<Number>(v1) + v2 + v3; } ACTION_TEMPLATE(ReturnSum, HAS_2_TEMPLATE_PARAMS(typename, Number, int, k), AND_4_VALUE_PARAMS(v1, v2, v3, v4)) { return static_cast<Number>(v1) + v2 + v3 + v4 + k; } TEST(ActionTemplateTest, CanBeOverloadedOnNumberOfValueParameters) { const Action<int()> a0 = ReturnSum(); const Action<int()> a1 = ReturnSum(1); const Action<int()> a2 = ReturnSum<int>(1, 2); const Action<int()> a3 = ReturnSum<int>(1, 2, 3); const Action<int()> a4 = ReturnSum<int, 10000>(2000, 300, 40, 5); EXPECT_EQ(0, a0.Perform(make_tuple())); EXPECT_EQ(1, a1.Perform(make_tuple())); EXPECT_EQ(3, a2.Perform(make_tuple())); EXPECT_EQ(6, a3.Perform(make_tuple())); EXPECT_EQ(12345, a4.Perform(make_tuple())); } #ifdef _MSC_VER # pragma warning(pop) #endif } // namespace gmock_generated_actions_test } // namespace testing
{ "pile_set_name": "Github" }
/* * Copyright (C) 2006-2009 Martin Willi * HSR Hochschule fuer Technik Rapperswil * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ /** * @defgroup psk_authenticator psk_authenticator * @{ @ingroup authenticators_v2 */ #ifndef PSK_AUTHENTICATOR_H_ #define PSK_AUTHENTICATOR_H_ typedef struct psk_authenticator_t psk_authenticator_t; #include <sa/authenticator.h> /** * Implementation of authenticator_t using pre-shared keys. */ struct psk_authenticator_t { /** * Implemented authenticator_t interface. */ authenticator_t authenticator; }; /** * Create an authenticator to build PSK signatures. * * @param ike_sa associated ike_sa * @param received_nonce nonce received in IKE_SA_INIT * @param sent_init sent IKE_SA_INIT message data * @param reserved reserved bytes of ID payload * @return PSK authenticator */ psk_authenticator_t *psk_authenticator_create_builder(ike_sa_t *ike_sa, chunk_t received_nonce, chunk_t sent_init, char reserved[3]); /** * Create an authenticator to verify PSK signatures. * * @param ike_sa associated ike_sa * @param sent_nonce nonce sent in IKE_SA_INIT * @param received_init received IKE_SA_INIT message data * @param reserved reserved bytes of ID payload * @return PSK authenticator */ psk_authenticator_t *psk_authenticator_create_verifier(ike_sa_t *ike_sa, chunk_t sent_nonce, chunk_t received_init, char reserved[3]); #endif /** PSK_AUTHENTICATOR_H_ @}*/
{ "pile_set_name": "Github" }
/* * Copyright (c) 2006-2007 Silicon Graphics, Inc. * All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_mru_cache.h" /* * The MRU Cache data structure consists of a data store, an array of lists and * a lock to protect its internal state. At initialisation time, the client * supplies an element lifetime in milliseconds and a group count, as well as a * function pointer to call when deleting elements. A data structure for * queueing up work in the form of timed callbacks is also included. * * The group count controls how many lists are created, and thereby how finely * the elements are grouped in time. When reaping occurs, all the elements in * all the lists whose time has expired are deleted. * * To give an example of how this works in practice, consider a client that * initialises an MRU Cache with a lifetime of ten seconds and a group count of * five. Five internal lists will be created, each representing a two second * period in time. When the first element is added, time zero for the data * structure is initialised to the current time. * * All the elements added in the first two seconds are appended to the first * list. Elements added in the third second go into the second list, and so on. * If an element is accessed at any point, it is removed from its list and * inserted at the head of the current most-recently-used list. * * The reaper function will have nothing to do until at least twelve seconds * have elapsed since the first element was added. The reason for this is that * if it were called at t=11s, there could be elements in the first list that * have only been inactive for nine seconds, so it still does nothing. If it is * called anywhere between t=12 and t=14 seconds, it will delete all the * elements that remain in the first list. It's therefore possible for elements * to remain in the data store even after they've been inactive for up to * (t + t/g) seconds, where t is the inactive element lifetime and g is the * number of groups. * * The above example assumes that the reaper function gets called at least once * every (t/g) seconds. If it is called less frequently, unused elements will * accumulate in the reap list until the reaper function is eventually called. * The current implementation uses work queue callbacks to carefully time the * reaper function calls, so this should happen rarely, if at all. * * From a design perspective, the primary reason for the choice of a list array * representing discrete time intervals is that it's only practical to reap * expired elements in groups of some appreciable size. This automatically * introduces a granularity to element lifetimes, so there's no point storing an * individual timeout with each element that specifies a more precise reap time. * The bonus is a saving of sizeof(long) bytes of memory per element stored. * * The elements could have been stored in just one list, but an array of * counters or pointers would need to be maintained to allow them to be divided * up into discrete time groups. More critically, the process of touching or * removing an element would involve walking large portions of the entire list, * which would have a detrimental effect on performance. The additional memory * requirement for the array of list heads is minimal. * * When an element is touched or deleted, it needs to be removed from its * current list. Doubly linked lists are used to make the list maintenance * portion of these operations O(1). Since reaper timing can be imprecise, * inserts and lookups can occur when there are no free lists available. When * this happens, all the elements on the LRU list need to be migrated to the end * of the reap list. To keep the list maintenance portion of these operations * O(1) also, list tails need to be accessible without walking the entire list. * This is the reason why doubly linked list heads are used. */ /* * An MRU Cache is a dynamic data structure that stores its elements in a way * that allows efficient lookups, but also groups them into discrete time * intervals based on insertion time. This allows elements to be efficiently * and automatically reaped after a fixed period of inactivity. * * When a client data pointer is stored in the MRU Cache it needs to be added to * both the data store and to one of the lists. It must also be possible to * access each of these entries via the other, i.e. to: * * a) Walk a list, removing the corresponding data store entry for each item. * b) Look up a data store entry, then access its list entry directly. * * To achieve both of these goals, each entry must contain both a list entry and * a key, in addition to the user's data pointer. Note that it's not a good * idea to have the client embed one of these structures at the top of their own * data structure, because inserting the same item more than once would most * likely result in a loop in one of the lists. That's a sure-fire recipe for * an infinite loop in the code. */ typedef struct xfs_mru_cache_elem { struct list_head list_node; unsigned long key; void *value; } xfs_mru_cache_elem_t; static kmem_zone_t *xfs_mru_elem_zone; static struct workqueue_struct *xfs_mru_reap_wq; /* * When inserting, destroying or reaping, it's first necessary to update the * lists relative to a particular time. In the case of destroying, that time * will be well in the future to ensure that all items are moved to the reap * list. In all other cases though, the time will be the current time. * * This function enters a loop, moving the contents of the LRU list to the reap * list again and again until either a) the lists are all empty, or b) time zero * has been advanced sufficiently to be within the immediate element lifetime. * * Case a) above is detected by counting how many groups are migrated and * stopping when they've all been moved. Case b) is detected by monitoring the * time_zero field, which is updated as each group is migrated. * * The return value is the earliest time that more migration could be needed, or * zero if there's no need to schedule more work because the lists are empty. */ STATIC unsigned long _xfs_mru_cache_migrate( xfs_mru_cache_t *mru, unsigned long now) { unsigned int grp; unsigned int migrated = 0; struct list_head *lru_list; /* Nothing to do if the data store is empty. */ if (!mru->time_zero) return 0; /* While time zero is older than the time spanned by all the lists. */ while (mru->time_zero <= now - mru->grp_count * mru->grp_time) { /* * If the LRU list isn't empty, migrate its elements to the tail * of the reap list. */ lru_list = mru->lists + mru->lru_grp; if (!list_empty(lru_list)) list_splice_init(lru_list, mru->reap_list.prev); /* * Advance the LRU group number, freeing the old LRU list to * become the new MRU list; advance time zero accordingly. */ mru->lru_grp = (mru->lru_grp + 1) % mru->grp_count; mru->time_zero += mru->grp_time; /* * If reaping is so far behind that all the elements on all the * lists have been migrated to the reap list, it's now empty. */ if (++migrated == mru->grp_count) { mru->lru_grp = 0; mru->time_zero = 0; return 0; } } /* Find the first non-empty list from the LRU end. */ for (grp = 0; grp < mru->grp_count; grp++) { /* Check the grp'th list from the LRU end. */ lru_list = mru->lists + ((mru->lru_grp + grp) % mru->grp_count); if (!list_empty(lru_list)) return mru->time_zero + (mru->grp_count + grp) * mru->grp_time; } /* All the lists must be empty. */ mru->lru_grp = 0; mru->time_zero = 0; return 0; } /* * When inserting or doing a lookup, an element needs to be inserted into the * MRU list. The lists must be migrated first to ensure that they're * up-to-date, otherwise the new element could be given a shorter lifetime in * the cache than it should. */ STATIC void _xfs_mru_cache_list_insert( xfs_mru_cache_t *mru, xfs_mru_cache_elem_t *elem) { unsigned int grp = 0; unsigned long now = jiffies; /* * If the data store is empty, initialise time zero, leave grp set to * zero and start the work queue timer if necessary. Otherwise, set grp * to the number of group times that have elapsed since time zero. */ if (!_xfs_mru_cache_migrate(mru, now)) { mru->time_zero = now; if (!mru->queued) { mru->queued = 1; queue_delayed_work(xfs_mru_reap_wq, &mru->work, mru->grp_count * mru->grp_time); } } else { grp = (now - mru->time_zero) / mru->grp_time; grp = (mru->lru_grp + grp) % mru->grp_count; } /* Insert the element at the tail of the corresponding list. */ list_add_tail(&elem->list_node, mru->lists + grp); } /* * When destroying or reaping, all the elements that were migrated to the reap * list need to be deleted. For each element this involves removing it from the * data store, removing it from the reap list, calling the client's free * function and deleting the element from the element zone. * * We get called holding the mru->lock, which we drop and then reacquire. * Sparse need special help with this to tell it we know what we are doing. */ STATIC void _xfs_mru_cache_clear_reap_list( xfs_mru_cache_t *mru) __releases(mru->lock) __acquires(mru->lock) { xfs_mru_cache_elem_t *elem, *next; struct list_head tmp; INIT_LIST_HEAD(&tmp); list_for_each_entry_safe(elem, next, &mru->reap_list, list_node) { /* Remove the element from the data store. */ radix_tree_delete(&mru->store, elem->key); /* * remove to temp list so it can be freed without * needing to hold the lock */ list_move(&elem->list_node, &tmp); } spin_unlock(&mru->lock); list_for_each_entry_safe(elem, next, &tmp, list_node) { /* Remove the element from the reap list. */ list_del_init(&elem->list_node); /* Call the client's free function with the key and value pointer. */ mru->free_func(elem->key, elem->value); /* Free the element structure. */ kmem_zone_free(xfs_mru_elem_zone, elem); } spin_lock(&mru->lock); } /* * We fire the reap timer every group expiry interval so * we always have a reaper ready to run. This makes shutdown * and flushing of the reaper easy to do. Hence we need to * keep when the next reap must occur so we can determine * at each interval whether there is anything we need to do. */ STATIC void _xfs_mru_cache_reap( struct work_struct *work) { xfs_mru_cache_t *mru = container_of(work, xfs_mru_cache_t, work.work); unsigned long now, next; ASSERT(mru && mru->lists); if (!mru || !mru->lists) return; spin_lock(&mru->lock); next = _xfs_mru_cache_migrate(mru, jiffies); _xfs_mru_cache_clear_reap_list(mru); mru->queued = next; if ((mru->queued > 0)) { now = jiffies; if (next <= now) next = 0; else next -= now; queue_delayed_work(xfs_mru_reap_wq, &mru->work, next); } spin_unlock(&mru->lock); } int xfs_mru_cache_init(void) { xfs_mru_elem_zone = kmem_zone_init(sizeof(xfs_mru_cache_elem_t), "xfs_mru_cache_elem"); if (!xfs_mru_elem_zone) goto out; xfs_mru_reap_wq = create_singlethread_workqueue("xfs_mru_cache"); if (!xfs_mru_reap_wq) goto out_destroy_mru_elem_zone; return 0; out_destroy_mru_elem_zone: kmem_zone_destroy(xfs_mru_elem_zone); out: return -ENOMEM; } void xfs_mru_cache_uninit(void) { destroy_workqueue(xfs_mru_reap_wq); kmem_zone_destroy(xfs_mru_elem_zone); } /* * To initialise a struct xfs_mru_cache pointer, call xfs_mru_cache_create() * with the address of the pointer, a lifetime value in milliseconds, a group * count and a free function to use when deleting elements. This function * returns 0 if the initialisation was successful. */ int xfs_mru_cache_create( xfs_mru_cache_t **mrup, unsigned int lifetime_ms, unsigned int grp_count, xfs_mru_cache_free_func_t free_func) { xfs_mru_cache_t *mru = NULL; int err = 0, grp; unsigned int grp_time; if (mrup) *mrup = NULL; if (!mrup || !grp_count || !lifetime_ms || !free_func) return EINVAL; if (!(grp_time = msecs_to_jiffies(lifetime_ms) / grp_count)) return EINVAL; if (!(mru = kmem_zalloc(sizeof(*mru), KM_SLEEP))) return ENOMEM; /* An extra list is needed to avoid reaping up to a grp_time early. */ mru->grp_count = grp_count + 1; mru->lists = kmem_zalloc(mru->grp_count * sizeof(*mru->lists), KM_SLEEP); if (!mru->lists) { err = ENOMEM; goto exit; } for (grp = 0; grp < mru->grp_count; grp++) INIT_LIST_HEAD(mru->lists + grp); /* * We use GFP_KERNEL radix tree preload and do inserts under a * spinlock so GFP_ATOMIC is appropriate for the radix tree itself. */ INIT_RADIX_TREE(&mru->store, GFP_ATOMIC); INIT_LIST_HEAD(&mru->reap_list); spin_lock_init(&mru->lock); INIT_DELAYED_WORK(&mru->work, _xfs_mru_cache_reap); mru->grp_time = grp_time; mru->free_func = free_func; *mrup = mru; exit: if (err && mru && mru->lists) kmem_free(mru->lists); if (err && mru) kmem_free(mru); return err; } /* * Call xfs_mru_cache_flush() to flush out all cached entries, calling their * free functions as they're deleted. When this function returns, the caller is * guaranteed that all the free functions for all the elements have finished * executing and the reaper is not running. */ void xfs_mru_cache_flush( xfs_mru_cache_t *mru) { if (!mru || !mru->lists) return; spin_lock(&mru->lock); if (mru->queued) { spin_unlock(&mru->lock); cancel_rearming_delayed_workqueue(xfs_mru_reap_wq, &mru->work); spin_lock(&mru->lock); } _xfs_mru_cache_migrate(mru, jiffies + mru->grp_count * mru->grp_time); _xfs_mru_cache_clear_reap_list(mru); spin_unlock(&mru->lock); } void xfs_mru_cache_destroy( xfs_mru_cache_t *mru) { if (!mru || !mru->lists) return; xfs_mru_cache_flush(mru); kmem_free(mru->lists); kmem_free(mru); } /* * To insert an element, call xfs_mru_cache_insert() with the data store, the * element's key and the client data pointer. This function returns 0 on * success or ENOMEM if memory for the data element couldn't be allocated. */ int xfs_mru_cache_insert( xfs_mru_cache_t *mru, unsigned long key, void *value) { xfs_mru_cache_elem_t *elem; ASSERT(mru && mru->lists); if (!mru || !mru->lists) return EINVAL; elem = kmem_zone_zalloc(xfs_mru_elem_zone, KM_SLEEP); if (!elem) return ENOMEM; if (radix_tree_preload(GFP_KERNEL)) { kmem_zone_free(xfs_mru_elem_zone, elem); return ENOMEM; } INIT_LIST_HEAD(&elem->list_node); elem->key = key; elem->value = value; spin_lock(&mru->lock); radix_tree_insert(&mru->store, key, elem); radix_tree_preload_end(); _xfs_mru_cache_list_insert(mru, elem); spin_unlock(&mru->lock); return 0; } /* * To remove an element without calling the free function, call * xfs_mru_cache_remove() with the data store and the element's key. On success * the client data pointer for the removed element is returned, otherwise this * function will return a NULL pointer. */ void * xfs_mru_cache_remove( xfs_mru_cache_t *mru, unsigned long key) { xfs_mru_cache_elem_t *elem; void *value = NULL; ASSERT(mru && mru->lists); if (!mru || !mru->lists) return NULL; spin_lock(&mru->lock); elem = radix_tree_delete(&mru->store, key); if (elem) { value = elem->value; list_del(&elem->list_node); } spin_unlock(&mru->lock); if (elem) kmem_zone_free(xfs_mru_elem_zone, elem); return value; } /* * To remove and element and call the free function, call xfs_mru_cache_delete() * with the data store and the element's key. */ void xfs_mru_cache_delete( xfs_mru_cache_t *mru, unsigned long key) { void *value = xfs_mru_cache_remove(mru, key); if (value) mru->free_func(key, value); } /* * To look up an element using its key, call xfs_mru_cache_lookup() with the * data store and the element's key. If found, the element will be moved to the * head of the MRU list to indicate that it's been touched. * * The internal data structures are protected by a spinlock that is STILL HELD * when this function returns. Call xfs_mru_cache_done() to release it. Note * that it is not safe to call any function that might sleep in the interim. * * The implementation could have used reference counting to avoid this * restriction, but since most clients simply want to get, set or test a member * of the returned data structure, the extra per-element memory isn't warranted. * * If the element isn't found, this function returns NULL and the spinlock is * released. xfs_mru_cache_done() should NOT be called when this occurs. * * Because sparse isn't smart enough to know about conditional lock return * status, we need to help it get it right by annotating the path that does * not release the lock. */ void * xfs_mru_cache_lookup( xfs_mru_cache_t *mru, unsigned long key) { xfs_mru_cache_elem_t *elem; ASSERT(mru && mru->lists); if (!mru || !mru->lists) return NULL; spin_lock(&mru->lock); elem = radix_tree_lookup(&mru->store, key); if (elem) { list_del(&elem->list_node); _xfs_mru_cache_list_insert(mru, elem); __release(mru_lock); /* help sparse not be stupid */ } else spin_unlock(&mru->lock); return elem ? elem->value : NULL; } /* * To release the internal data structure spinlock after having performed an * xfs_mru_cache_lookup() or an xfs_mru_cache_peek(), call xfs_mru_cache_done() * with the data store pointer. */ void xfs_mru_cache_done( xfs_mru_cache_t *mru) __releases(mru->lock) { spin_unlock(&mru->lock); }
{ "pile_set_name": "Github" }
// Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs defs_linux.go package ipv4 const ( sysIP_TOS = 0x1 sysIP_TTL = 0x2 sysIP_HDRINCL = 0x3 sysIP_OPTIONS = 0x4 sysIP_ROUTER_ALERT = 0x5 sysIP_RECVOPTS = 0x6 sysIP_RETOPTS = 0x7 sysIP_PKTINFO = 0x8 sysIP_PKTOPTIONS = 0x9 sysIP_MTU_DISCOVER = 0xa sysIP_RECVERR = 0xb sysIP_RECVTTL = 0xc sysIP_RECVTOS = 0xd sysIP_MTU = 0xe sysIP_FREEBIND = 0xf sysIP_TRANSPARENT = 0x13 sysIP_RECVRETOPTS = 0x7 sysIP_ORIGDSTADDR = 0x14 sysIP_RECVORIGDSTADDR = 0x14 sysIP_MINTTL = 0x15 sysIP_NODEFRAG = 0x16 sysIP_UNICAST_IF = 0x32 sysIP_MULTICAST_IF = 0x20 sysIP_MULTICAST_TTL = 0x21 sysIP_MULTICAST_LOOP = 0x22 sysIP_ADD_MEMBERSHIP = 0x23 sysIP_DROP_MEMBERSHIP = 0x24 sysIP_UNBLOCK_SOURCE = 0x25 sysIP_BLOCK_SOURCE = 0x26 sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 sysIP_MSFILTER = 0x29 sysMCAST_JOIN_GROUP = 0x2a sysMCAST_LEAVE_GROUP = 0x2d sysMCAST_JOIN_SOURCE_GROUP = 0x2e sysMCAST_LEAVE_SOURCE_GROUP = 0x2f sysMCAST_BLOCK_SOURCE = 0x2b sysMCAST_UNBLOCK_SOURCE = 0x2c sysMCAST_MSFILTER = 0x30 sysIP_MULTICAST_ALL = 0x31 sysICMP_FILTER = 0x1 sysSO_EE_ORIGIN_NONE = 0x0 sysSO_EE_ORIGIN_LOCAL = 0x1 sysSO_EE_ORIGIN_ICMP = 0x2 sysSO_EE_ORIGIN_ICMP6 = 0x3 sysSO_EE_ORIGIN_TXSTATUS = 0x4 sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 sizeofKernelSockaddrStorage = 0x80 sizeofSockaddrInet = 0x10 sizeofInetPktinfo = 0xc sizeofSockExtendedErr = 0x10 sizeofIPMreq = 0x8 sizeofIPMreqn = 0xc sizeofIPMreqSource = 0xc sizeofGroupReq = 0x88 sizeofGroupSourceReq = 0x108 sizeofICMPFilter = 0x4 ) type kernelSockaddrStorage struct { Family uint16 X__data [126]int8 } type sockaddrInet struct { Family uint16 Port uint16 Addr [4]byte /* in_addr */ X__pad [8]uint8 } type inetPktinfo struct { Ifindex int32 Spec_dst [4]byte /* in_addr */ Addr [4]byte /* in_addr */ } type sockExtendedErr struct { Errno uint32 Origin uint8 Type uint8 Code uint8 Pad uint8 Info uint32 Data uint32 } type ipMreq struct { Multiaddr [4]byte /* in_addr */ Interface [4]byte /* in_addr */ } type ipMreqn struct { Multiaddr [4]byte /* in_addr */ Address [4]byte /* in_addr */ Ifindex int32 } type ipMreqSource struct { Multiaddr uint32 Interface uint32 Sourceaddr uint32 } type groupReq struct { Interface uint32 Pad_cgo_0 [4]byte Group kernelSockaddrStorage } type groupSourceReq struct { Interface uint32 Pad_cgo_0 [4]byte Group kernelSockaddrStorage Source kernelSockaddrStorage } type icmpFilter struct { Data uint32 }
{ "pile_set_name": "Github" }
<proxy xmlns="http://ws.apache.org/ns/synapse" name="enrichAddPropertyAsChildTestProxy" transports="https http" startOnLoad="true" trace="disable"> <description/> <target> <inSequence> <log level="full"/> <property xmlns:ax21="http://www.bea.com/2003/05/xmlbean/ltgfmt" xmlns:xs="http://ws.apache.org/axis2" xmlns:p="http://ws.apache.org/axis2" name="test" expression="//p:getQuote" scope="default"/> <log level="full"/> <send> <endpoint> <address uri="http://localhost:9000/services/SimpleStockQuoteService"/> </endpoint> </send> </inSequence> <outSequence> <enrich> <source type="inline" clone="true"> <ax21:test xmlns:ax21="http://services.samples/xsd">test</ax21:test> </source> <target type="property" property="test"/> </enrich> <enrich> <source type="property" property="test"/> <target xmlns:ax21="http://services.samples/xsd" xmlns:ns="http://services.samples" action="child" xpath="//ns:getQuoteResponse/ns:return"/> </enrich> <log level="full"/> <send/> </outSequence> </target> </proxy>
{ "pile_set_name": "Github" }
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1995 -- All Rights Reserved PROJECT: MODULE: FILE: outboxControlMessageList.asm AUTHOR: Adam de Boor, Mar 22, 1995 ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 3/22/95 Initial revision DESCRIPTION: Class to display messages in the MailboxOutboxControl $Id: outboxControlMessageList.asm,v 1.1 97/04/05 01:21:18 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MailboxClassStructures segment resource if _RESPONDER_OUTBOX_CONTROL OutboxControlHeaderViewClass OutboxControlHeaderGlyphClass endif ; _RESPONDER_OUTBOX_CONTROL OutboxControlMessageListClass MailboxClassStructures ends OutboxUICode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLMlGetScanRoutines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fetch the routines to call for building the list (RESPONDER ONLY) CALLED BY: MSG_ML_GET_SCAN_ROUTINES PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance cx:dx = MLScanRoutines to fill in RETURN: MLScanRoutines filled in DESTROYED: ax, cx, dx SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLMlGetScanRoutines method dynamic OutboxControlMessageListClass, MSG_ML_GET_SCAN_ROUTINES .enter movdw esdi, cxdx mov es:[di].MLSR_select.offset, offset OCMLSelect mov es:[di].MLSR_select.segment, vseg OCMLSelect mov es:[di].MLSR_compare.offset, offset OCMLCompare mov es:[di].MLSR_compare.segment, segment OCMLCompare .leave ret OCMLMlGetScanRoutines endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLSelect %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if this message should be displayed CALLED BY: (EXTERNAL) MessageList::ML_RESCAN PASS: dxax = MailboxMessage to check bx = admin file *ds:si = OutboxControlMessageList object RETURN: nothing DESTROYED: nothing SIDE EFFECTS: message+address(es) may be added to the list PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLSelect proc far msg local MailboxMessage push dx, ax listObj local dword push ds, si ForceRef msg ; used by address callback uses bx, di, cx class OutboxControlMessageListClass .enter ; ; Enumerate all the addresses, adding each one to the list if it hasn't ; been sent to yet. ; clr cx ; cx <- address # mov bx, vseg OCMLSelectCallback mov di, offset OCMLSelectCallback call MessageAddrEnum lds si, ss:[listObj] .leave ret OCMLSelect endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLSelectCallback %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: If the address hasn't been sent to yet, add it to the list. (RESPONDER ONLY) CALLED BY: (INTERNAL) OCMLSelect via MessageAddrEnum PASS: ds:di = MailboxInternalTransAddr *ds:si = address array *ds:bx = MailboxMessageDesc ss:bp = inherited frame cx = address # RETURN: carry set to stop enumerating (always clear) cx incremented DESTROYED: ax, bx, dx, si, di all allowed SIDE EFFECTS: message added to message list PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLSelectCallback proc far class OutboxControlMessageListClass uses ds .enter inherit OCMLSelect CheckHack <MAS_SENT eq 0> test ds:[di].MITA_flags, mask MTF_STATE jz done ; ; Tell the list object to add this message + address, since it's not ; been sent yet. ; mov bx, ds:[bx] ; ds:bx = MMD push cx, bp mov dx, cx ; dx = address # StructPushBegin MLMessage mov al, ds:[di].MITA_flags CheckHack <offset MTF_STATE + width MTF_STATE eq 8> mov cl, offset MTF_STATE shr al, cl ; al = MailboxAddressState StructPushField MLM_state, ax ; MLM_state + MLM_priority (we ; don't use MLM_priority for ; comparison so we are pushing ; trash here StructPushField MLM_registered, \ <ds:[bx].MMD_registered.FDAT_time, \ ds:[bx].MMD_registered.FDAT_date> StructPushField MLM_autoRetryTime, \ <ds:[bx].MMD_autoRetryTime.FDAT_time, \ ds:[bx].MMD_autoRetryTime.FDAT_date> StructPushField MLM_medium, ds:[di].MITA_medium StructPushField MLM_transport, \ <ds:[bx].MMD_transport.MT_manuf, \ ds:[bx].MMD_transport.MT_id> StructPushField MLM_address, dx StructPushField MLM_message, <ss:[msg].high, ss:[msg].low> StructPushEnd call MailboxGetAdminFile ; bx <- admin file lds si, ss:[listObj] mov bp, sp ; ss:bp = MLMessage call MessageListAddMessage add sp, size MLMessage pop cx, bp ; ; Record fixed-up object segment ; mov ss:[listObj].segment, ds done: inc cx ; advance address # for next ; callback clc ; CF <- keep going .leave ret OCMLSelectCallback endp endif ; _RESPONDER_OUTBOX_CONTROL Resident segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompare %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare two message entries for sorting purposes. (RESPONDER ONLY) CALLED BY: (EXTERNAL) MessageList::ML_RESCAN PASS: ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so caller can jl, je, or jg according as ds:si is less than, equal to, or greater than es:di DESTROYED: ax, bx, cx, dx, di, si SIDE EFFECTS: PSEUDO CODE/STRATEGY: sorting fields are (in order of precedence): GMTID_SM before anything else MTF_SENDING before anything else MTF_QUEUED before anything else numeric order of medium tokens (very arbitrary, but groups messages using same medium even if using different transports) closer open-window time address # REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompare proc far .enter call OCMLCompareTransports jne done call OCMLCompareMedia jne done call OCMLCompareState jne done call OCMLCompareRetry jne done call OCMLCompareAddressNumbers jne done call OCMLCompareRegistrationTime done: .leave ret OCMLCompare endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompareTransports %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare the transports of the two messages to determine if one should be before the other CALLED BY: (INTERNAL) OCMLCompare ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so jl, je, or jg will take according as message #1 should come before, equivalent to, or after message #2 DESTROYED: ax SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompareTransports proc near .enter clr ax ; assume both or neither is SMS CmpTok ds:[si].MLM_transport, \ MANUFACTURER_ID_GEOWORKS, \ GMTID_SM, \ checkSecondMessage dec ax ; set so JL will take if second not SMS checkSecondMessage: CmpTok ds:[di].MLM_transport, \ MANUFACTURER_ID_GEOWORKS, \ GMTID_SM, \ checkResult inc ax ; set so JG will take if first not SMS, ; or JE will take if first was SMS checkResult: tst ax .leave ret OCMLCompareTransports endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompareState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare the MTF_STATE flag of the two addresses to determine if one should be before the other CALLED BY: (INTERNAL) OCMLCompare ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so jl, je, or jg will take according as message #1 should come before, equivalent to, or after message #2 DESTROYED: ax SIDE EFFECTS: none PSEUDO CODE/STRATEGY: if the MTF_STATE flag of one address is numerically larger than the other, that address should come first REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompareState proc near .enter mov al, ds:[si].MLM_state cmp ds:[di].MLM_state, al ; order is purposedly inverted ; because ordering is inverse ; from ordering of state ; values .leave ret OCMLCompareState endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompareMedia %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare the media tokens of the two addresses to determine if one should be before the other CALLED BY: (INTERNAL) OCMLCompare ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so jl, je, or jg will take according as message #1 should come before, equivalent to, or after message #2 DESTROYED: ax SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompareMedia proc near .enter mov ax, ds:[si].MLM_medium cmp ax, ds:[di].MLM_medium .leave ret OCMLCompareMedia endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompareRetry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare the autoRetryType stamp of the two messages to determine if one should be before the other CALLED BY: (INTERNAL) OCMLCompare ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so jl, je, or jg will take according as message #1 should come before, equivalent to, or after message #2 DESTROYED: ax, cx SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompareRetry proc near .enter clr ax ; assume equal mov cx, ds:[si].MLM_autoRetryTime.FDAT_date cmp cx, ds:[di].MLM_autoRetryTime.FDAT_date jne setFlags ; => set flags from date ; difference mov cx, ds:[si].MLM_autoRetryTime.FDAT_time cmp cx, ds:[di].MLM_autoRetryTime.FDAT_time setFlags: je checkResult ; => leave ax alone dec ax ; assume < (doesn't change CF) jb checkResult neg ax checkResult: tst ax .leave ret OCMLCompareRetry endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompareAddressNumbers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare the indices of the two addresses to determine if one should be before the other CALLED BY: (INTERNAL) OCMLCompare ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so jl, je, or jg will take according as message #1 should come before, equivalent to, or after message #2 DESTROYED: ax SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompareAddressNumbers proc near .enter ; ; We do our own double comparison instead of using "cmpdw", because ; all we care is whether they are equal or not. This way we can avoid ; jumping twice if the first match fails. And we can compare the low ; word first (which is more likely to differ than the high word). ; mov ax, ds:[si].MLM_message.low cmp ax, ds:[di].MLM_message.low jne equivalent mov ax, ds:[si].MLM_message.high cmp ax, ds:[di].MLM_message.high jne equivalent mov ax, ds:[si].MLM_address cmp ax, ds:[di].MLM_address done: .leave ret equivalent: cmp ax, ax ; indicate we can't use this to decide ; by returning so JE will take jmp done OCMLCompareAddressNumbers endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCompareRegistrationTime %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare the registration stamp of the two messages to determine if one should be before the other CALLED BY: (INTERNAL) OCMLCompare ds:si = MLMessage #1 es:di = MLMessage #2 (ds = es) RETURN: flags set so jl, je, or jg will take according as message #1 should come before, equivalent to, or after message #2 DESTROYED: ax, cx SIDE EFFECTS: none PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLCompareRegistrationTime proc near .enter clr ax ; assume equal mov cx, ds:[si].MLM_registered.FDAT_date cmp cx, ds:[di].MLM_registered.FDAT_date jne setFlags ; => set flags from date ; difference mov cx, ds:[si].MLM_registered.FDAT_time cmp cx, ds:[di].MLM_registered.FDAT_time setFlags: je checkResult ; => leave ax alone dec ax ; assume < (doesn't change CF) jb checkResult neg ax checkResult: tst ax .leave ret OCMLCompareRegistrationTime endp endif ; _RESPONDER_OUTBOX_CONTROL Resident ends COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLDeleteMessage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete the currently-selected message. CALLED BY: MSG_OCML_DELETE_MESSAGE PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/22/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLDeleteMessage method dynamic OutboxControlMessageListClass, MSG_OCML_DELETE_MESSAGE .enter ; ; Make sure the user wants to delete the message. ; mov bp, ds:[LMBH_handle] push bp push si mov si, offset uiConfirmDeleteStr call UtilDoConfirmation pop si call MemDerefStackDS cmp ax, IC_YES jne done call OCMLCancelSend ; CF set if msg gone jc done CheckHack <MAS_SENT eq 0> BitClr ds:[bx].MITA_flags, MTF_STATE ; MTF_STATE = MAS_SENT call notifyApp if _DUPS_ALWAYS_TOGETHER push di, cx mov cx, ds:[bx].MITA_next CheckHack <MITA_NIL eq -1> inc cx jz dupsDone mov si, ds:[di] mov si, ds:[si].MMD_transAddrs dupLoop: dec cx call notifyApp push ax mov_tr ax, cx call ChunkArrayElementToPtr pop ax CheckHack <MAS_SENT eq 0> BitClr ds:[di].MITA_flags, MTF_STATE ; MTF_STATE = MAS_SENT mov cx, ds:[di].MITA_next CheckHack <MITA_NIL eq -1> inc cx jnz dupLoop dupsDone: pop di, cx endif ; _DUPS_ALWAYS_TOGETHER call UtilVMDirtyDS call UtilVMUnlockDS call MainThreadUnlock call OUDeleteMessageIfNothingUnsent if _RESPONDER_OUTBOX_CONTROL ; ; Disable Delete trigger so that the user can't delete the same message ; twice. It will be re-enabled (if appropriate) when rescan happens. ; mov bx, bp ; ^hbx = msg list blk mov si, offset MOCDeleteTrigger mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_DELAYED_VIA_APP_QUEUE mov di, mask MF_CALL call ObjMessage endif ; _RESPONDER_OUTBOX_CONTROL done: .leave ret ;-------------------- ;Let everyone know this address has been deleted for the message. ; ;Pass: ; dxax = MailboxMessage ; cx = address # ;Return: ; nothing ;Destroyed: ; nothing notifyApp: push bp, ax, cx, di, dx Assert bitClear, cx, <not mask MABC_ADDRESS> ornf cx, mask MABC_OUTBOX or \ (MACT_REMOVED shl offset MABC_TYPE) mov bp, cx MovMsg cxdx, dxax mov ax, MSG_MA_BOX_CHANGED clr di call UtilForceQueueMailboxApp pop bp, ax, cx, di, dx retn OCMLDeleteMessage endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLStopMessage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Stop transmission of the selected message CALLED BY: MSG_OCML_STOP_MESSAGE PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLStopMessage method dynamic OutboxControlMessageListClass, MSG_OCML_STOP_MESSAGE .enter call OCMLCancelSend ; CF set if message gone jc done call UtilVMUnlockDS call MainThreadUnlock done: .leave ret OCMLStopMessage endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLSendMessage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Submit the selected message for transmission CALLED BY: MSG_OCML_SEND_MESSAGE PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLSendMessage method dynamic OutboxControlMessageListClass, MSG_OCML_SEND_MESSAGE .enter call OCMLGetMessage segmov es, ds MovMsg dxax, cxdx call MessageLock mov di, ds:[di] if _AUTO_RETRY_AFTER_TEMP_FAILURE ; ; If message is in Upon Request mode, we want to find all other messages ; in Upon Request mode going to the same place and transmit them. ; mov cx, ds:[di].MMD_autoRetryTime.FDAT_date and cx, ds:[di].MMD_autoRetryTime.FDAT_time cmp cx, -1 jne checkMediumAvailable call OCMLSendUponRequestMessages jmp done checkMediumAvailable: endif ; _AUTO_RETRY_AFTER_TEMP_FAILURE push ax push di mov si, ds:[di].MMD_transAddrs mov ax, bp call ChunkArrayElementToPtr ; ; Make sure the message hasn't already changed state. ; mov al, ds:[di].MITA_flags andnf al, mask MTF_STATE cmp al, MAS_EXISTS shl offset MTF_STATE mov ax, ds:[di].MITA_medium ; ; Clear phone blacklist, if necessary ; pop di je checkAvailable pop ax call UtilVMUnlockDS jmp done checkAvailable: ; ; It hasn't. Make sure the medium for transmitting it exists. ; call OMCheckMediumAvailable jc transMessage ; ; Medium doesn't exist. Shift message to Waiting state and let user ; know why. ; if _AUTO_RETRY_AFTER_TEMP_FAILURE movdw ds:[di].MMD_autoRetryTime, MAILBOX_NOW call UtilVMDirtyDS mov_tr bx, ax pop ax call OCMLNotifyOfSwitchToWaitingState mov_tr ax, bx else pop ax endif ; _AUTO_RETRY_AFTER_TEMP_FAILURE movdw bxcx, ds:[di].MMD_transport mov dx, ds:[di].MMD_transOption call UtilVMUnlockDS ; release message before ; notifying the user, to ; avoid blocking transmission ; of other messages call OCMLTellWhyCantTransmit jmp done transMessage: pop ax call UtilVMUnlockDS mov cx, bp ornf cx, mask TID_ADDR_INDEX call OutboxTransmitMessage done: .leave ret OCMLSendMessage endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLTellWhyCantTransmit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Let the user know why the medium's not available CALLED BY: (INTERNAL) OCMLSendMessage OCMLSendUponRequestMessages PASS: es = OCML object block ax = OutboxMedia token for medium bxcx = MailboxTransport dx = MailboxTransportOption RETURN: nothing DESTROYED: ds, if same as es SIDE EFFECTS: thread blocks until user acknowledges the dialog. PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 11/14/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLTellWhyCantTransmit proc near uses ds, ax, si, bx .enter ; ; Use common code to find the reason. ; call ORGetMediumNotAvailReason ; ^lax:si <- reason mov_tr bx, ax ; ; Put up the error box. ; ; ^lbx:si = reason medium's not available. ; push es:[LMBH_handle] ; save for fixup clr ax ; ax <- 0 for initializing ; most fields StructPushBegin StandardDialogOptrParams StructPushField SDOP_helpContext, <ax, ax> StructPushField SDOP_customTriggers, <ax, ax> StructPushField SDOP_stringArg2, <ax, ax> StructPushField SDOP_stringArg1, <bx, si> mov ax, handle ROStrings mov si, offset uiCannotStartString StructPushField SDOP_customString, <ax, si> mov ax, CustomDialogBoxFlags <0, CDT_ERROR, GIT_NOTIFICATION, 0> StructPushField SDOP_customFlags, <ax> StructPushEnd call UserStandardDialogOptr call MemDerefStackES ; ; Free the reason string block, if we allocated one. ; cmp bx, handle ROStrings je done call MemFree done: .leave ret OCMLTellWhyCantTransmit endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLSendUponRequestMessages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find all existing Upon Request messages going to the same place as this one and queue them all for transmission. CALLED BY: (INTERNAL) OCMLSendMessage PASS: ds:di = MailboxMessageDesc of message to be sent dxax = MailboxMessage of same bp = address # to be sent to es = OCML block RETURN: nothing DESTROYED: ax, bx, cx, dx, si, di, ds SIDE EFFECTS: message block is unlocked PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 11/14/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _AUTO_RETRY_AFTER_TEMP_FAILURE OCMLSendUponRequestMessages proc near addrNum local word push bp ;;msg local MailboxMessage push dx, ax medium local word transQ local word addrBlock local hptr transport local MailboxTransport transOption local MailboxTransportOption addrSize local word talID local TalID .enter ; ; Initialize state variables. ; clr si mov ss:[transQ], si mov ss:[addrBlock], si ; ; Point to the selected address ; mov si, ds:[di].MMD_transAddrs push di mov ax, ss:[addrNum] call ChunkArrayElementToPtr mov ax, ds:[di].MITA_medium mov ss:[medium], ax mov si, di pop di push cx ; save address size ; ; Clear phone blacklist, if necessary ; ; ; Find the number of bytes that are significant. ; movdw cxdx, ds:[di].MMD_transport mov bx, ds:[di].MMD_transOption movdw ss:[transport], cxdx mov ss:[transOption], bx call OMGetSigAddrBytes mov ss:[addrSize], ax ; ; Allocate a block to hold the entire address. ; pop ax push ax mov cx, ALLOC_FIXED call MemAlloc pop cx jc allocErr ; ; Copy the address in. ; push es mov es, ax mov ss:[addrBlock], bx clr di rep movsb ; ; If the medium's available, allocate a queue on which to place ; the messages that match, and a TalID with which to mark them. ; mov ax, ss:[medium] call OMCheckMediumAvailable call UtilVMUnlockDS jnc doEnum call OTCreateQueue mov ss:[transQ], ax call AdminAllocTALID mov ss:[talID], ax doEnum: ; ; Run through the outbox finding Upon Request messages that match. ; call AdminGetOutbox mov cx, SEGMENT_CS mov dx, offset messageCallback call DBQEnum pop es ; ; If we put them on a queue, transmit them. ; mov di, ss:[transQ] tst di jz notifyUser mov cx, ss:[talID] call OutboxTransmitMessageQueue jnc freeStuff call OutboxCleanupFailedTransmitQueue freeStuff: ; ; Free up the address block. ; mov bx, ss:[addrBlock] call MemFree done: .leave ret allocErr: ; ; Couldn't allocate a block to hold the address. Release the message ; and bail out. ; XXX: TELL THE USER. ; call UtilVMUnlockDS jmp done notifyUser: ; ; Tell the user why we couldn't actually transmit the things. ; mov ax, ss:[medium] movdw bxcx, ss:[transport] mov dx, ss:[transOption] call OCMLTellWhyCantTransmit jmp freeStuff ;-------------------- ; See if the addresses of the message are the same as that the user ; selected for transmission and, if creating a queue, mark them ; as such as put the message in the queue. ; ; If not forming a queue (medium not available), just switch the ; message to Waiting. ; ; Pass: ; sidi = MailboxMessage ; bx = admin file ; ss:bp = inherited frame: ; transQ = DBQ to which to add the message if should ; transmit ; = 0 if should switch to Waiting ; talID = id with which to mark matching addresses ; if should transmit ; addrSize = # of significant bytes ; transport = transport of selected message ; transOption = transport option of selected message ; es = address to match messageCallback: push ds movdw dxax, sidi call MessageLock mov di, ds:[di] ; ; See if the message is in the Upon Request state. ; CheckHack <MAILBOX_ETERNITY eq -1> mov cx, ds:[di].MMD_autoRetryTime.FDAT_date and cx, ds:[di].MMD_autoRetryTime.FDAT_time cmp cx, -1 jne messageCallbackDone ; => not Upon Request ; ; It is. See if it's going via the same transport. ; cmpdw ds:[di].MMD_transport, ss:[transport], cx jne messageCallbackDone mov cx, ds:[di].MMD_transOption cmp ss:[transOption], cx jne messageCallbackDone ; ; It is. Go find any addresses that are the same as the selected one. ; clr cx ; cx <- none matched mov bx, SEGMENT_CS mov di, offset addrCallback call MessageAddrEnum jcxz messageCallbackDone ; ; At least one address matched. Queue the message if we're doing that ; sort of thing. ; mov di, ss:[transQ] tst di jz notifyOfSwitch call MailboxGetAdminFile call DBQAdd notifyOfSwitch: call OCMLNotifyOfSwitchToWaitingState messageCallbackDone: call UtilVMUnlockDS pop ds clc retf ;-------------------- ; Examine a single address to see if it matches and put it in the ; queue or into Waiting if it does. ; ; Pass: ds:di = MITA to check ; *ds:bx = MMD ; ss:bp = frame ; es:0 = MITA to compare with ; Return: ; carry set to stop enumerating (always clear) ; cx = non-z if address marked ; Destroyed: ; bx, si, di allowed addrCallback: mov ax, ds:[di].MITA_medium cmp ss:[medium], ax jne addrCallbackDone mov si, di clr di push bp mov bp, ss:[addrSize] call OUCompareAddresses pop bp jne addrCallbackDone EC < mov di, si ; for warning print-out Tcl code> EC < tst ds:[si].MITA_addrList > EC < WARNING_NZ OVERWRITING_EXISTING_ADDRESS_MARK > mov ax, ss:[talID] mov ds:[si].MITA_addrList, ax mov si, ds:[bx] CheckHack <MAILBOX_NOW eq 0> clr cx movdw ds:[si].MMD_autoRetryTime, cxcx if _OUTBOX_SEND_WITHOUT_QUERY ; ; Can now set this silly thing. ; ornf ds:[si].MMD_flags, mask MMF_SEND_WITHOUT_QUERY endif ; _OUTBOX_SEND_WITHOUT_QUERY dec cx ; cx <- non-z to indicate marked call UtilVMDirtyDS addrCallbackDone: clc retf OCMLSendUponRequestMessages endp endif ; _AUTO_RETRY_AFTER_TEMP_FAILURE COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLNotifyOfSwitchToWaitingState %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Let everyone know that the passed message has switched from Upon Request or Retry state to Waiting CALLED BY: (INTERNAL) OCMLSendUponRequestMessages OCMLSendMessage PASS: dxax = message affected RETURN: nothing DESTROYED: nothing SIDE EFFECTS: notification queued to mailbox app PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 11/15/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _AUTO_RETRY_AFTER_TEMP_FAILURE OCMLNotifyOfSwitchToWaitingState proc near uses ax, cx, dx, bp, di .enter MovMsg cxdx, dxax mov bp, mask MABC_OUTBOX or \ (MACT_EXISTS shl offset MABC_TYPE) or \ (MABC_ALL shl offset MABC_ADDRESS) mov ax, MSG_MA_BOX_CHANGED clr di call UtilForceQueueMailboxApp ; ; Reevaluate when the next timer should go off, since retry time no ; longer enters into the picture for this message. ; mov ax, MSG_MA_RECALC_NEXT_EVENT_TIMER clr di call UtilForceQueueMailboxApp .leave ret OCMLNotifyOfSwitchToWaitingState endp endif ; _AUTO_RETRY_AFTER_TEMP_FAILURE COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLGetMessage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fetch the MailboxMessage and address # of the selected message CALLED BY: (INTERNAL) OCMLStartMessage, OCMLCancelSend PASS: *ds:si = OutboxControlMessageList RETURN: cxdx = MailboxMessage bp = address # DESTROYED: ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLGetMessage proc near class OutboxControlMessageListClass .enter mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock ; ax <- message # mov_tr cx, ax mov ax, MSG_ML_GET_MESSAGE call ObjCallInstanceNoLock .leave ret OCMLGetMessage endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLCancelSend %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Cancel transmission of the currently selected message, if it's queued or undergoing transmission. CALLED BY: (INTERNAL) OCLMDeleteMessage, OCMLStopMessage PASS: *ds:si = OutboxControlMessageList RETURN: carry clear if message exists *ds:di = MailboxMessageDesc ds:bx = MailboxInternalTransAddr dxax = MailboxMessage cx = address # MainThreads block locked; caller must call MainThreadUnlock carry set otherwise ax, cx, dx, ds, di destroyed DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: fetch the selected message & address extract the transport, trans opt, and medium token from it find the transmit thread, if any, so we can be sure the message can't be queued up while we or our caller mess with it lock the message address again if queued, change address marks by index to 0 if sending, MainThreadCancel(); this will adjust the address marks for the message once the cancel takes effect XXX: MAY NEED TO EXTEND DEADLINE HERE REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLCancelSend proc near class OutboxControlMessageListClass uses bp .enter ; ; Fetch the MailboxMessage and address number. ; call OCMLGetMessage push cx, dx, bp ; save msg info for later ; ; Obtain the transport, transOpt and medium token so we can find any ; transmission thread. ; call MessageLockCXDX ; *ds:di <- MMD jnc msgFound ; ; Message is gone. Return carry set. ; pop ax, ax, ax ; discard msg & addr #, carry preserved jmp exit msgFound: mov si, ds:[di] mov_tr ax, bp ; ax <- addr # movdw bpdx, ds:[si].MMD_transport mov bx, ds:[si].MMD_transOption mov si, ds:[si].MMD_transAddrs call ChunkArrayElementToPtr ; (cx <- addr size) mov ax, ds:[di].MITA_medium call UtilVMUnlockDS mov cx, bp ; cxdx <- transport ; ; Locate the thread. We don't need to worry about the CF return because ; we can base our actions on the QUEUED and SENDING flags... ; call OTFindThread pop dx, ax, cx ; dxax <- msg, cx <- addr # EC < pushf > push ds, di ; for MainThreadCancel ; ; Point to the address again. ; call MessageLock push di, ax mov_tr ax, cx mov si, ds:[di] mov si, ds:[si].MMD_transAddrs call ChunkArrayElementToPtr mov_tr cx, ax ; cx <- addr # mov bx, di ; ds:bx <- MITA ; ; See if the message is queued and needs to be removed from the queue. ; mov al, ds:[bx].MITA_flags andnf al, mask MTF_STATE cmp al, MAS_QUEUED shl offset MTF_STATE je checkQueuedRes cmp al, MAS_READY shl offset MTF_STATE checkQueuedRes: pop di, ax ; dxax <- msg, *ds:di <- MMD jne checkSending ; ; It does. We accomplish this by setting the address marks for the ; thing to 0, which will cause it to be ignored when the transmit thread ; goes to look for the next thing to process. ; ; XXX: There might be a race condition during the callback for ; preparing or sending a message in the transmit thread, between when ; an address is found and when it gets processed, as I don't believe ; that uses the MainThreads block for synchronization. ; if _AUTO_RETRY_AFTER_TEMP_FAILURE ; ; Switch the message into Upon Request mode first, as we assume if ; the user stopped its transmission, she doesn't want it to go until ; she says it should. Seems like a reasonable assumption. In the ; case of _OUTBOX_SEND_WITHOUT_QUERY being set, this also prevents ; us from having to cope with having to do something intelligent ; if there's a TRANS_WIN_OPEN message sent to the application, ; as will happen during the next outbox event handling if we leave the ; retry time as the MAILBOX_NOW it is now. -- ardeb 11/16/95 ; mov si, ds:[di] movdw ds:[si].MMD_autoRetryTime, MAILBOX_ETERNITY call UtilVMDirtyDS endif ; _AUTO_RETRY_AFTER_TEMP_FAILURE push bx, cx mov bx, cx ; bx <- MABoxChange ornf bx, (MACT_EXISTS shl offset MABC_TYPE) or \ mask MABC_OUTBOX ornf cx, mask TID_ADDR_INDEX ; cx <- TalID to mark clr si ; si <- new address mark call OTQChangeAddressMarks pop bx, cx jmp done checkSending: ; ; Not queued. Perhaps it's being sent? ; push ax mov al, ds:[bx].MITA_flags andnf al, mask MTF_STATE cmp al, MAS_SENDING shl offset MTF_STATE je checkSendingRes cmp al, MAS_PREPARING shl offset MTF_STATE checkSendingRes: pop ax jne done ; ; It is -- cancel the thing. ; push ds, di mov bp, sp lds di, ss:[bp+4] ; ds:di <- OutboxThreadData EC < push ss:[bp+8] > EC < popf > EC < ERROR_NC TRANSMISSION_THREAD_MISSING > push ax, cx, dx, bp mov ax, MCA_CANCEL_MESSAGE ; ax <- cancel extent clr dx, bp, cx ; dx:bp, cx <- no ACK needed call MainThreadCancel pop ax, cx, dx, bp pop ds, di ; *ds:di <- MMD done: EC < add sp, 6 ; discard thread data & flags > NEC < add sp, 4 ; discard OutboxThreadData pointer> ; ; Return carry clear (cleared by "add" above). ; exit: .leave ret OCMLCancelSend endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLGenItemGroupSetNoneSelected %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Let MailboxOutboxControl know nothing can be done. CALLED BY: MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance dx = non-z if indeterminate RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLGenItemGroupSetNoneSelected method dynamic OutboxControlMessageListClass, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED clr bx call OCMLNotifyController mov ax, MSG_OCML_ENSURE_SELECTION mov bx, ds:[LMBH_handle] mov di, mask MF_FORCE_QUEUE GOTO ObjMessage OCMLGenItemGroupSetNoneSelected endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLEnsureSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: If nothing currently selected, select the first item in the list. CALLED BY: MSG_OCML_ENSURE_SELECTION PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/ 9/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLEnsureSelection method dynamic OutboxControlMessageListClass, MSG_OCML_ENSURE_SELECTION .enter mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock jnc done ; => have selection mov ax, MSG_GEN_DYNAMIC_LIST_GET_NUM_ITEMS call ObjCallInstanceNoLock jcxz done ; => nothing to select clr cx, dx ; cx <- sel #, dx <- not indet. mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION call ObjCallInstanceNoLock done: .leave ret OCMLEnsureSelection endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLGenItemGroupSetSingleSelection %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Examine the selection to decide what features the controller should have enabled CALLED BY: MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance cx = identifier (list entry #) dx = non-z if indeterminate RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: lock address & message if sending/queued enable cancel, disable send RESP: if sending & SMS, disable delete & cancel release message REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLGenItemGroupSetSingleSelection method dynamic OutboxControlMessageListClass, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION uses ax, cx, dx, bp, si .enter mov bx, mask MOCFeatures ; assume all enabled mov ax, MSG_ML_GET_MESSAGE call ObjCallInstanceNoLock push ds call MessageLockCXDX mov di, ds:[di] mov si, ds:[di].MMD_transAddrs push di mov_tr ax, bp call ChunkArrayElementToPtr mov al, ds:[di].MITA_flags pop di mov ah, not mask MOCF_STOP_SENDING ; assume not sending, so ; can't stop andnf al, mask MTF_STATE CheckHack <MAS_SENDING gt MAS_PREPARING> CheckHack <MAS_READY gt MAS_PREPARING> CheckHack <MailboxAddressState eq MAS_SENDING+1> cmp al, MAS_PREPARING shl offset MTF_STATE jae cantStartSending cmp al, MAS_QUEUED shl offset MTF_STATE jne tweakFlags cantStartSending: mov ah, not mask MOCF_START_SENDING ; is sending, so can't ; start if _RESPONDER_OUTBOX_CONTROL ; ; Can't do anything to a message being transmitted via SMS if it's ; actively being transmitted ; CmpTok ds:[di].MMD_transport, \ MANUFACTURER_ID_GEOWORKS, \ GMTID_SM, \ tweakFlags mov ah, not (mask MOCF_START_SENDING or \ mask MOCF_STOP_SENDING or \ mask MOCF_DELETE_MESSAGE) endif ; _RESPONDER_OUTBOX_CONTROL tweakFlags: and bl, ah call UtilVMUnlockDS pop ds .leave FALL_THRU OCMLNotifyController OCMLGenItemGroupSetSingleSelection endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLNotifyController %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Tell the MailboxOutboxControl what to do with its features before we call our superclass CALLED BY: (INTERNAL) OCMLGenItemGroupSetSingleSelection, OCMLGenItemGroupSetNoneSelected PASS: *ds:si = OutboxControlMessageList ax, cx, dx, bp = message info to pass to superclass bx = MOCFeatures to be enabled. RETURN: DESTROYED: SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/23/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLNotifyController proc far uses ax, cx, dx, bp, si .enter mov cx, bx clr dx mov ax, MSG_MAILBOX_OUTBOX_CONTROL_ENABLE_FEATURES call ObjBlockGetOutput mov di, mask MF_FIXUP_DS call ObjMessage .leave mov di, offset OutboxControlMessageListClass GOTO ObjCallSuperNoLock OCMLNotifyController endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLMlRescan %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set default selection after rebuilding the list. CALLED BY: MSG_ML_RESCAN PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: carry set if list is empty DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/24/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLMlRescan method dynamic OutboxControlMessageListClass, MSG_ML_RESCAN .enter mov di, offset OutboxControlMessageListClass call ObjCallSuperNoLock ; ; If empty, tell us that nothing's selected... ; mov ax, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED jc setSelection ; ; Else select first one. ; clr cx mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION setSelection: pushf clr dx ; dx <- not indeterminate call ObjCallInstanceNoLock popf .leave ret OCMLMlRescan endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLMlCheckBeforeRemoval %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if the message should be removed from the list. CALLED BY: MSG_ML_CHECK_BEFORE_REMOVAL PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance cxdx = MailboxMessage bp = MABoxChange holding address #affected RETURN: carry set to keep message: bp = address number to display for entry carry clear to remove message: bp = destroyed DESTROYED: ax SIDE EFFECTS: none PSEUDO CODE/STRATEGY: Under Responder, messages remain in the list even when they've been queued or are being sent. Only allow removal if MACT_REMOVED is the change type. REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 3/24/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ OCMLMlCheckBeforeRemoval method dynamic OutboxControlMessageListClass, MSG_ML_CHECK_BEFORE_REMOVAL .enter CheckHack <MACT_REMOVED eq 0> test bp, mask MABC_TYPE jz done andnf bp, mask MABC_ADDRESS stc done: .leave ret OCMLMlCheckBeforeRemoval endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLMlGenerateMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Generate the moniker for the passed message. CALLED BY: MSG_ML_GENERATE_MONIKER PASS: cxdx = MailboxMessage for which to create moniker bp = address # for which to create moniker RETURN: ax = lptr of gstring moniker in object block DESTROYED: cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AY 4/17/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLMlGenerateMoniker method dynamic OutboxControlMessageListClass, MSG_ML_GENERATE_MONIKER MovMsg dxax, cxdx mov cx, bp ; cx < addr # Assert bitClear, cx, <not mask TID_NUMBER> ornf cx, mask TID_ADDR_INDEX ; cx <- TalID call MessageCreateOutboxControlMoniker ; *ds:ax = moniker ret OCMLMlGenerateMoniker endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLMlGetInitialMinimumSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fetch the initial minimum size for the list CALLED BY: MSG_ML_GET_INITIAL_MINIMUM_SIZE PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: cx = default width dx = default height DESTROYED: ax SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 4/28/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLMlGetInitialMinimumSize method dynamic OutboxControlMessageListClass, MSG_ML_GET_INITIAL_MINIMUM_SIZE .enter call MessageEnsureSizes mov dx, bx ; dx <- height segmov ds, dgroup, ax mov cx, ds:[mmAddrStateRightBorder] add cx, OUTBOX_RIGHT_GUTTER .leave ret OCMLMlGetInitialMinimumSize endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCHVVisRecalcSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make sure we are of the size of one message item. CALLED BY: MSG_VIS_RECALC_SIZE PASS: *ds:si = OutboxControlHeaderViewClass object es = segment of OutboxControlHeaderViewClass ax = message # cx = RecalcSizeArgs -- suggested width for object dx = RecalcSizeArgs -- suggested height RETURN: cx = width of one message item dx = height of one message item DESTROYED: ax, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AY 1/31/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCHVVisRecalcSize method dynamic OutboxControlHeaderViewClass, MSG_VIS_RECALC_SIZE mov di, offset OutboxControlHeaderViewClass GOTO_ECN OCHSetHeaderSize OCHVVisRecalcSize endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCHGVisRecalcSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make sure we are of the size of one message item. CALLED BY: MSG_VIS_RECALC_SIZE PASS: *ds:si = OutboxControlHeaderGlyphClass object es = segment of OutboxControlHeaderGlyphClass ax = message # cx = RecalcSizeArgs -- suggested width for object dx = RecalcSizeArgs -- suggested height RETURN: cx = width of one message item dx = height of one message item DESTROYED: ax, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AY 1/31/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCHGVisRecalcSize method dynamic OutboxControlHeaderGlyphClass, MSG_VIS_RECALC_SIZE mov di, offset OutboxControlHeaderGlyphClass FALL_THRU_ECN OCHSetHeaderSize OCHGVisRecalcSize endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCHSetHeaderSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make sure the passed Vis object is of the size of one message item by returning the width and the height to MSG_VIS_RECALC_SIZE CALLED BY: OCHVVisRecalcSize, OCHGVisRecalcSize PASS: *ds:si = any Vis object es:di = actual class of passed object ax = MSG_VIS_RECALC_SIZE cx = RecalcSizeArgs -- suggested width for object dx = RecalcSizeArgs -- suggested height RETURN: cx = width of one message item dx = height of one message item ds fixed up DESTROYED: ax, bx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AY 1/31/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCHSetHeaderSize proc ecnear ; ; Call superclass even though we are returning our own values, or ; else we die with ; UI_CANT_DO_CUSTOM_RECALC_SIZE_AND_DO_SPECIAL_JUSTIFICATION ; call ObjCallSuperNoLock call MessageEnsureSizes ; ax = width, bx = height mov_tr cx, ax ; cx = width mov dx, bx ; dx = height ret OCHSetHeaderSize endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLBypassSpui %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Bypass annoying behaviour in OLCtrl to get it from VisComp, which obeys our requests for margins. CALLED BY: MSG_VIS_RECALC_SIZE PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance random args RETURN: random results DESTROYED: random things SIDE EFFECTS: ditto PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/11/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLBypassSpui method dynamic OutboxControlMessageListClass, MSG_VIS_RECALC_SIZE segmov es, <segment VisCompClass>, di mov di, offset VisCompClass call ObjCallClassNoLock ; ; Make sure we have a non-zero height when the superclass thinks we ; should have zero height, or else we eventually end up with zero ; height somehow. ; tst dx jnz done inc dx done: ret OCMLBypassSpui endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCHGVisDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Redraw the title of the list CALLED BY: MSG_VIS_DRAW PASS: *ds:si = OutboxControlHeaderGlyph object ds:di = OutboxControlHeaderGlyphInstance cl = DrawFlags bp = gstate for drawing RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/10/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCHGVisDraw method dynamic OutboxControlHeaderGlyphClass, MSG_VIS_DRAW .enter ; ; Let superclass handle the bulk of the work. ; push bp mov di, offset OutboxControlHeaderGlyphClass call ObjCallSuperNoLock pop di ; ; Set font for outbox ; call GrSaveState mov cx, OUTBOX_TITLE_FONT mov dx, OUTBOX_TITLE_FONT_SIZE clr ah call GrSetFont mov ax, C_BLACK call GrSetLineColor call GrSetTextColor mov ax, mask TS_BOLD or \ ((not mask TS_BOLD and mask TextStyle) shl 8) call GrSetTextStyle segmov es, dgroup, ax mov bx, offset uiRespSubjTitle mov ax, es:[mmSubjectRightBorder] call OCHGDrawTitle mov bx, offset uiRespDestTitle mov ax, es:[mmDestinationRightBorder] call OCHGDrawTitle mov bx, offset uiRespTransTitle mov ax, es:[mmTransMediumAbbrevRightBorder] call OCHGDrawTitle mov bx, offset uiRespStateTitle mov ax, es:[mmAddrStateRightBorder] call OCHGDrawTitle call GrRestoreState .leave ret OCHGVisDraw endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCHGDrawTitle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw part of the title of the list, with the funky line going the entire height of the header CALLED BY: (INTERNAL) OCHGVisDraw PASS: *ds:si = OutboxControlHeaderGlyph object ax = right edge of field bx = chunk handle of title string in ROStrings di = gstate to use for drawing RETURN: nothing DESTROYED: ax, bx, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/10/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCHGDrawTitle proc near uses si .enter ; ; Find the bounds of the object, for translating coordinates and ; figuring how tall a line to draw at the right edge of the field. ; push ax, bx mov ax, MSG_VIS_GET_BOUNDS call ObjCallInstanceNoLock pop cx, si ; ; Find the width of the string we want to draw for the title. ; add ax, cx ; ax <- actual right edge coord, in ; parent window ; bp = actual top edge coord ; dx = bottom edge push ds push ax mov bx, handle ROStrings call MemLock mov ds, ax pop ax ; ax <- right edge mov si, ds:[si] clr cx ; cx <- null-terminated push dx call GrTextWidth ; dx <- width pop bx ; bx <- bottom edge ; ; Draw the text that far from the left edge of the edge marker, ; with reasonable separation between the text and the marker. ; push ax sub ax, OUTBOX_TITLE_SEPARATION + OUTBOX_TITLE_CORNER_LEN sub ax, dx xchg bx, bp ; bx <- top edge, bp <- bottom call GrDrawText ; ; Draw the horizontal part of the field edge marker. We use swapped ; X coords drawing this part so we can reuse what's in AX for drawing ; the vertical part. ; push dx, si mov si, GFMI_STRIKE_POS or GFMI_ROUNDED call GrFontMetrics add bx, dx ; start corner at strike-through ; pos for font. pop dx, si pop ax ; ax <- right edge of field ; inc ax ; inc ax ; cope with two-pixel inset of list ; item monikers (sigh) mov cx, ax sub cx, OUTBOX_TITLE_CORNER_LEN call GrDrawHLine ; ; Now draw the vertical part from the top of the object to the bottom ; mov dx, bp ; dx <- bottom edge call GrDrawVLine call UtilUnlockDS pop ds .leave ret OCHGDrawTitle endp endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLSpecBuild %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Hack to tweak some Vis data to reflect how we draw, once our superclass has finished setting it wrong. CALLED BY: MSG_SPEC_BUILD PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/11/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLSpecBuild method dynamic OutboxControlMessageListClass, MSG_SPEC_BUILD .enter mov di, offset OutboxControlMessageListClass call ObjCallSuperNoLock DerefDI VisComp andnf ds:[di].VCI_geoAttrs, not mask VCGA_ONLY_DRAWS_IN_MARGINS .leave ret OCMLSpecBuild endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLSpecScanGeometryHints %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Hack to tweak some Vis data to reflect how we draw, once our superclass has finished setting it wrong. CALLED BY: MSG_SPEC_SCAN_GEOMETRY_HINTS PASS: *ds:si = OutboxControlMessageList object ds:di = OutboxControlMessageListInstance RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 5/12/95 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLSpecScanGeometryHints method dynamic OutboxControlMessageListClass, MSG_SPEC_SCAN_GEOMETRY_HINTS .enter mov di, offset OutboxControlMessageListClass call ObjCallSuperNoLock DerefDI VisComp ornf ds:[di].VCI_geoDimensionAttrs, mask VCGDA_EXPAND_WIDTH_TO_FIT_PARENT or \ mask VCGDA_EXPAND_HEIGHT_TO_FIT_PARENT .leave ret OCMLSpecScanGeometryHints endm endif ; _RESPONDER_OUTBOX_CONTROL COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OCMLVisDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw the edge markers (the funky vertical lines) thru our message items. CALLED BY: MSG_VIS_DRAW PASS: *ds:si = OutboxControlMessageListClass object ds:di = OutboxControlMessageListClass instance data ds:bx = OutboxControlMessageListClass object (same as *ds:si) es = segment of OutboxControlMessageListClass ax = message # cl = DrawFlags bp = GState handle RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- AY 2/ 2/96 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if _RESPONDER_OUTBOX_CONTROL OCMLVisDraw method dynamic OutboxControlMessageListClass, MSG_VIS_DRAW ; ; Let superclass handle the bulk of the work. ; push bp mov di, offset OutboxControlMessageListClass call ObjCallSuperNoLock pop di ; ; Get the top and bottom bounds of the object. ; mov ax, MSG_VIS_GET_BOUNDS call ObjCallInstanceNoLock ; (ax, bp), (cx, dx) mov bx, bp ; bx = top mov ax, C_BLACK call GrSetLineColor ; ; Draw the vertical lines. ; segmov ds, dgroup, ax mov ax, ds:[mmSubjectRightBorder] call GrDrawVLine mov ax, ds:[mmDestinationRightBorder] call GrDrawVLine mov ax, ds:[mmTransMediumAbbrevRightBorder] call GrDrawVLine mov ax, ds:[mmAddrStateRightBorder] GOTO GrDrawVLine OCMLVisDraw endm endif ; _RESPONDER_OUTBOX_CONTROL OutboxUICode ends
{ "pile_set_name": "Github" }
/* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. This file is part of Quake III Arena source code. Quake III Arena source code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Quake III Arena source code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Quake III Arena source code; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ // /* ============================================================================= SINGLE PLAYER SKILL MENU ============================================================================= */ #include "ui_local.h" #define ART_FRAME "menu/art/cut_frame" #define ART_BACK "menu/art/back_0.tga" #define ART_BACK_FOCUS "menu/art/back_1.tga" #define ART_FIGHT "menu/art/fight_0" #define ART_FIGHT_FOCUS "menu/art/fight_1" #define ART_MAP_COMPLETE1 "menu/art/level_complete1" #define ART_MAP_COMPLETE2 "menu/art/level_complete2" #define ART_MAP_COMPLETE3 "menu/art/level_complete3" #define ART_MAP_COMPLETE4 "menu/art/level_complete4" #define ART_MAP_COMPLETE5 "menu/art/level_complete5" #define ID_BABY 10 #define ID_EASY 11 #define ID_MEDIUM 12 #define ID_HARD 13 #define ID_NIGHTMARE 14 #define ID_BACK 15 #define ID_FIGHT 16 typedef struct { menuframework_s menu; menubitmap_s art_frame; menutext_s art_banner; menutext_s item_baby; menutext_s item_easy; menutext_s item_medium; menutext_s item_hard; menutext_s item_nightmare; menubitmap_s art_skillPic; menubitmap_s item_back; menubitmap_s item_fight; const char *arenaInfo; qhandle_t skillpics[5]; sfxHandle_t nightmareSound; sfxHandle_t silenceSound; } skillMenuInfo_t; static skillMenuInfo_t skillMenuInfo; static void SetSkillColor( int skill, vec4_t color ) { switch( skill ) { case 1: skillMenuInfo.item_baby.color = color; break; case 2: skillMenuInfo.item_easy.color = color; break; case 3: skillMenuInfo.item_medium.color = color; break; case 4: skillMenuInfo.item_hard.color = color; break; case 5: skillMenuInfo.item_nightmare.color = color; break; default: break; } } /* ================= UI_SPSkillMenu_SkillEvent ================= */ static void UI_SPSkillMenu_SkillEvent( void *ptr, int notification ) { int id; int skill; if (notification != QM_ACTIVATED) return; SetSkillColor( (int)trap_Cvar_VariableValue( "g_spSkill" ), color_red ); id = ((menucommon_s*)ptr)->id; skill = id - ID_BABY + 1; trap_Cvar_SetValue( "g_spSkill", skill ); SetSkillColor( skill, color_white ); skillMenuInfo.art_skillPic.shader = skillMenuInfo.skillpics[skill - 1]; if( id == ID_NIGHTMARE ) { trap_S_StartLocalSound( skillMenuInfo.nightmareSound, CHAN_ANNOUNCER ); } else { trap_S_StartLocalSound( skillMenuInfo.silenceSound, CHAN_ANNOUNCER ); } } /* ================= UI_SPSkillMenu_FightEvent ================= */ static void UI_SPSkillMenu_FightEvent( void *ptr, int notification ) { if (notification != QM_ACTIVATED) return; UI_SPArena_Start( skillMenuInfo.arenaInfo ); } /* ================= UI_SPSkillMenu_BackEvent ================= */ static void UI_SPSkillMenu_BackEvent( void* ptr, int notification ) { if (notification != QM_ACTIVATED) { return; } trap_S_StartLocalSound( skillMenuInfo.silenceSound, CHAN_ANNOUNCER ); UI_PopMenu(); } /* ================= UI_SPSkillMenu_Key ================= */ static sfxHandle_t UI_SPSkillMenu_Key( int key ) { if( key == K_MOUSE2 || key == K_ESCAPE ) { trap_S_StartLocalSound( skillMenuInfo.silenceSound, CHAN_ANNOUNCER ); } return Menu_DefaultKey( &skillMenuInfo.menu, key ); } /* ================= UI_SPSkillMenu_Cache ================= */ void UI_SPSkillMenu_Cache( void ) { trap_R_RegisterShaderNoMip( ART_FRAME ); trap_R_RegisterShaderNoMip( ART_BACK ); trap_R_RegisterShaderNoMip( ART_BACK_FOCUS ); trap_R_RegisterShaderNoMip( ART_FIGHT ); trap_R_RegisterShaderNoMip( ART_FIGHT_FOCUS ); skillMenuInfo.skillpics[0] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE1 ); skillMenuInfo.skillpics[1] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE2 ); skillMenuInfo.skillpics[2] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE3 ); skillMenuInfo.skillpics[3] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE4 ); skillMenuInfo.skillpics[4] = trap_R_RegisterShaderNoMip( ART_MAP_COMPLETE5 ); skillMenuInfo.nightmareSound = trap_S_RegisterSound( "sound/misc/nightmare.wav", qfalse ); skillMenuInfo.silenceSound = trap_S_RegisterSound( "sound/misc/silence.wav", qfalse ); } /* ================= UI_SPSkillMenu_Init ================= */ static void UI_SPSkillMenu_Init( void ) { int skill; memset( &skillMenuInfo, 0, sizeof(skillMenuInfo) ); skillMenuInfo.menu.fullscreen = qtrue; skillMenuInfo.menu.key = UI_SPSkillMenu_Key; UI_SPSkillMenu_Cache(); skillMenuInfo.art_frame.generic.type = MTYPE_BITMAP; skillMenuInfo.art_frame.generic.name = ART_FRAME; skillMenuInfo.art_frame.generic.flags = QMF_LEFT_JUSTIFY|QMF_INACTIVE; skillMenuInfo.art_frame.generic.x = 142; skillMenuInfo.art_frame.generic.y = 118; skillMenuInfo.art_frame.width = 359; skillMenuInfo.art_frame.height = 256; skillMenuInfo.art_banner.generic.type = MTYPE_BTEXT; skillMenuInfo.art_banner.generic.flags = QMF_CENTER_JUSTIFY; skillMenuInfo.art_banner.generic.x = 320; skillMenuInfo.art_banner.generic.y = 16; skillMenuInfo.art_banner.string = "DIFFICULTY"; skillMenuInfo.art_banner.color = color_white; skillMenuInfo.art_banner.style = UI_CENTER; skillMenuInfo.item_baby.generic.type = MTYPE_PTEXT; skillMenuInfo.item_baby.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_baby.generic.x = 320; skillMenuInfo.item_baby.generic.y = 170; skillMenuInfo.item_baby.generic.callback = UI_SPSkillMenu_SkillEvent; skillMenuInfo.item_baby.generic.id = ID_BABY; skillMenuInfo.item_baby.string = "I Can Win"; skillMenuInfo.item_baby.color = color_red; skillMenuInfo.item_baby.style = UI_CENTER; skillMenuInfo.item_easy.generic.type = MTYPE_PTEXT; skillMenuInfo.item_easy.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_easy.generic.x = 320; skillMenuInfo.item_easy.generic.y = 198; skillMenuInfo.item_easy.generic.callback = UI_SPSkillMenu_SkillEvent; skillMenuInfo.item_easy.generic.id = ID_EASY; skillMenuInfo.item_easy.string = "Bring It On"; skillMenuInfo.item_easy.color = color_red; skillMenuInfo.item_easy.style = UI_CENTER; skillMenuInfo.item_medium.generic.type = MTYPE_PTEXT; skillMenuInfo.item_medium.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_medium.generic.x = 320; skillMenuInfo.item_medium.generic.y = 227; skillMenuInfo.item_medium.generic.callback = UI_SPSkillMenu_SkillEvent; skillMenuInfo.item_medium.generic.id = ID_MEDIUM; skillMenuInfo.item_medium.string = "Hurt Me Plenty"; skillMenuInfo.item_medium.color = color_red; skillMenuInfo.item_medium.style = UI_CENTER; skillMenuInfo.item_hard.generic.type = MTYPE_PTEXT; skillMenuInfo.item_hard.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_hard.generic.x = 320; skillMenuInfo.item_hard.generic.y = 255; skillMenuInfo.item_hard.generic.callback = UI_SPSkillMenu_SkillEvent; skillMenuInfo.item_hard.generic.id = ID_HARD; skillMenuInfo.item_hard.string = "Hardcore"; skillMenuInfo.item_hard.color = color_red; skillMenuInfo.item_hard.style = UI_CENTER; skillMenuInfo.item_nightmare.generic.type = MTYPE_PTEXT; skillMenuInfo.item_nightmare.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_nightmare.generic.x = 320; skillMenuInfo.item_nightmare.generic.y = 283; skillMenuInfo.item_nightmare.generic.callback = UI_SPSkillMenu_SkillEvent; skillMenuInfo.item_nightmare.generic.id = ID_NIGHTMARE; skillMenuInfo.item_nightmare.string = "NIGHTMARE!"; skillMenuInfo.item_nightmare.color = color_red; skillMenuInfo.item_nightmare.style = UI_CENTER; skillMenuInfo.item_back.generic.type = MTYPE_BITMAP; skillMenuInfo.item_back.generic.name = ART_BACK; skillMenuInfo.item_back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_back.generic.x = 0; skillMenuInfo.item_back.generic.y = 480-64; skillMenuInfo.item_back.generic.callback = UI_SPSkillMenu_BackEvent; skillMenuInfo.item_back.generic.id = ID_BACK; skillMenuInfo.item_back.width = 128; skillMenuInfo.item_back.height = 64; skillMenuInfo.item_back.focuspic = ART_BACK_FOCUS; skillMenuInfo.art_skillPic.generic.type = MTYPE_BITMAP; skillMenuInfo.art_skillPic.generic.flags = QMF_LEFT_JUSTIFY|QMF_INACTIVE; skillMenuInfo.art_skillPic.generic.x = 320-64; skillMenuInfo.art_skillPic.generic.y = 368; skillMenuInfo.art_skillPic.width = 128; skillMenuInfo.art_skillPic.height = 96; skillMenuInfo.item_fight.generic.type = MTYPE_BITMAP; skillMenuInfo.item_fight.generic.name = ART_FIGHT; skillMenuInfo.item_fight.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS; skillMenuInfo.item_fight.generic.callback = UI_SPSkillMenu_FightEvent; skillMenuInfo.item_fight.generic.id = ID_FIGHT; skillMenuInfo.item_fight.generic.x = 640; skillMenuInfo.item_fight.generic.y = 480-64; skillMenuInfo.item_fight.width = 128; skillMenuInfo.item_fight.height = 64; skillMenuInfo.item_fight.focuspic = ART_FIGHT_FOCUS; Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.art_frame ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.art_banner ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_baby ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_easy ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_medium ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_hard ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_nightmare ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.art_skillPic ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_back ); Menu_AddItem( &skillMenuInfo.menu, ( void * )&skillMenuInfo.item_fight ); skill = (int)Com_Clamp( 1, 5, trap_Cvar_VariableValue( "g_spSkill" ) ); SetSkillColor( skill, color_white ); skillMenuInfo.art_skillPic.shader = skillMenuInfo.skillpics[skill - 1]; if( skill == 5 ) { trap_S_StartLocalSound( skillMenuInfo.nightmareSound, CHAN_ANNOUNCER ); } } void UI_SPSkillMenu( const char *arenaInfo ) { UI_SPSkillMenu_Init(); skillMenuInfo.arenaInfo = arenaInfo; UI_PushMenu( &skillMenuInfo.menu ); Menu_SetCursorToItem( &skillMenuInfo.menu, &skillMenuInfo.item_fight ); }
{ "pile_set_name": "Github" }
/*! @file Forward declares `boost::hana::tag_of` and `boost::hana::tag_of_t`. @copyright Louis Dionne 2013-2016 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_FWD_CORE_TAG_OF_HPP #define BOOST_HANA_FWD_CORE_TAG_OF_HPP #include <boost/hana/config.hpp> BOOST_HANA_NAMESPACE_BEGIN //! @ingroup group-core //! %Metafunction returning the tag associated to `T`. //! //! There are several ways to specify the tag of a C++ type. If it's a //! user-defined type, one can define a nested `hana_tag` alias: //! @code //! struct MyUserDefinedType { //! using hana_tag = MyTag; //! }; //! @endcode //! //! Sometimes, however, the C++ type can't be modified (if it's in a //! foreign library) or simply can't have nested types (if it's not a //! struct or class). In those cases, using a nested alias is impossible //! and so ad-hoc customization is also supported by specializing //! `tag_of` in the `boost::hana` namespace: //! @code //! struct i_cant_modify_this; //! //! namespace boost { namespace hana { //! template <> //! struct tag_of<i_cant_modify_this> { //! using type = MyTag; //! }; //! }} //! @endcode //! //! `tag_of` can also be specialized for all C++ types satisfying some //! boolean condition using `when`. `when` accepts a single compile-time //! boolean and enables the specialization of `tag_of` if and only if //! that boolean is `true`. This is similar to the well known C++ idiom //! of using a dummy template parameter with `std::enable_if` and relying //! on SFINAE. For example, we could specify the tag of all //! `fusion::vector`s by doing: //! @code //! struct BoostFusionVector; //! //! namespace boost { namespace hana { //! template <typename T> //! struct tag_of<T, when< //! std::is_same< //! typename fusion::traits::tag_of<T>::type, //! fusion::traits::tag_of<fusion::vector<>>::type //! >{} //! >> { //! using type = BoostFusionVector; //! }; //! }} //! @endcode //! //! Also, when it is not specialized and when the given C++ type does not //! have a nested `hana_tag` alias, `tag_of<T>` returns `T` itself. This //! makes tags a simple extension of normal C++ types. This is _super_ //! useful, mainly for two reasons. First, this allows Hana to adopt a //! reasonable default behavior for some operations involving types that //! have no notion of tags. For example, Hana allows comparing with `equal` //! any two objects for which a valid `operator==` is defined, and that //! without any work on the user side. Second, it also means that you can //! ignore tags completely if you don't need their functionality; just use //! the normal C++ type of your objects and everything will "just work". //! //! Finally, also note that `tag_of<T>` is always equivalent to `tag_of<U>`, //! where `U` is the type `T` after being stripped of all references and //! cv-qualifiers. This makes it unnecessary to specialize `tag_of` for //! all reference and cv combinations, which would be a real pain. Also, //! `tag_of` is required to be idempotent. In other words, it must always //! be the case that `tag_of<tag_of<T>::%type>::%type` is equivalent to //! `tag_of<T>::%type`. //! //! > __Tip 1__\n //! > If compile-time performance is a serious concern, consider //! > specializing the `tag_of` metafunction in Hana's namespace. //! > When unspecialized, the metafunction has to use SFINAE, which //! > tends to incur a larger compile-time overhead. For heavily used //! > templated types, this can potentially make a difference. //! //! > __Tip 2__\n //! > Consider using `tag_of_t` alias instead of `tag_of`, which //! > reduces the amount of typing in dependent contexts. //! //! //! Example //! ------- //! @include example/core/tag_of.cpp #ifdef BOOST_HANA_DOXYGEN_INVOKED template <typename T, optional when-based enabler> struct tag_of { unspecified }; #else template <typename T, typename = void> struct tag_of; #endif //! @ingroup group-core //! Alias to `tag_of<T>::%type`, provided for convenience. //! //! //! Example //! ------- //! @include example/core/tag_of_t.cpp template <typename T> using tag_of_t = typename hana::tag_of<T>::type; BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_FWD_CORE_TAG_OF_HPP
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <doc> <assembly> <name>System.Web.WebPages.Razor</name> </assembly> <members> <member name="T:System.Web.WebPages.Razor.CompilingPathEventArgs"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.CompilingPathEventArgs.#ctor(System.String,System.Web.WebPages.Razor.WebPageRazorHost)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.CompilingPathEventArgs.Host"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.CompilingPathEventArgs.VirtualPath"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="T:System.Web.WebPages.Razor.PreApplicationStartCode"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.PreApplicationStartCode.Start"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="T:System.Web.WebPages.Razor.RazorBuildProvider"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.#ctor"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.AddVirtualPathDependency(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.RazorBuildProvider.AssemblyBuilder"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.RazorBuildProvider.CodeCompilerType"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="E:System.Web.WebPages.Razor.RazorBuildProvider.CodeGenerationCompleted"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="E:System.Web.WebPages.Razor.RazorBuildProvider.CodeGenerationStarted"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="E:System.Web.WebPages.Razor.RazorBuildProvider.CompilingPath"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.CreateHost"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.GenerateCode(System.Web.Compilation.AssemblyBuilder)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.GetGeneratedType(System.CodeDom.Compiler.CompilerResults)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.GetHostFromConfig"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.InternalOpenReader"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.RazorBuildProvider.OnBeforeCompilePath(System.Web.WebPages.Razor.CompilingPathEventArgs)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.RazorBuildProvider.VirtualPath"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.RazorBuildProvider.VirtualPathDependencies"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="T:System.Web.WebPages.Razor.WebCodeRazorHost"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebCodeRazorHost.#ctor(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebCodeRazorHost.#ctor(System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebCodeRazorHost.GetClassName(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebCodeRazorHost.PostProcessGeneratedCode(System.Web.Razor.Generator.CodeGeneratorContext)"></member> <member name="T:System.Web.WebPages.Razor.WebPageRazorHost"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.#ctor(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.#ctor(System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.AddGlobalImport(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.CodeLanguage"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.CreateMarkupParser"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.DefaultBaseClass"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.DefaultClassName"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.DefaultDebugCompilation"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.DefaultPageBaseClass"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.GetClassName(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.GetCodeLanguage"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.GetGlobalImports"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.InstrumentedSourceFilePath"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.IsSpecialPage"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.PhysicalPath"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.PostProcessGeneratedCode(System.Web.Razor.Generator.CodeGeneratorContext)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.RegisterSpecialFile(System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebPageRazorHost.RegisterSpecialFile(System.String,System.Type)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="P:System.Web.WebPages.Razor.WebPageRazorHost.VirtualPath"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="T:System.Web.WebPages.Razor.WebRazorHostFactory"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.#ctor"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.ApplyConfigurationToHost(System.Web.WebPages.Razor.Configuration.RazorPagesSection,System.Web.WebPages.Razor.WebPageRazorHost)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateDefaultHost(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateDefaultHost(System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateHost(System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="M:System.Web.WebPages.Razor.WebRazorHostFactory.CreateHostFromConfig(System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup,System.String,System.String)"> <summary>此类型/成员支持 .NET Framework 基础结构,不能在代码中直接使用。</summary> </member> <member name="T:System.Web.WebPages.Razor.Configuration.HostSection"> <summary>为 host 配置部分提供配置系统支持。</summary> </member> <member name="M:System.Web.WebPages.Razor.Configuration.HostSection.#ctor"> <summary>初始化 <see cref="T:System.Web.WebPages.Razor.Configuration.HostSection" /> 类的新实例。</summary> </member> <member name="P:System.Web.WebPages.Razor.Configuration.HostSection.FactoryType"> <summary>获取或设置宿主工厂。</summary> <returns>宿主工厂。</returns> </member> <member name="F:System.Web.WebPages.Razor.Configuration.HostSection.SectionName"> <summary>表示 Razor 宿主环境的配置部分的名称。</summary> </member> <member name="T:System.Web.WebPages.Razor.Configuration.RazorPagesSection"> <summary>为 pages 配置部分提供配置系统支持。</summary> </member> <member name="M:System.Web.WebPages.Razor.Configuration.RazorPagesSection.#ctor"> <summary>初始化 <see cref="T:System.Web.WebPages.Razor.Configuration.RazorPagesSection" /> 类的新实例。</summary> </member> <member name="P:System.Web.WebPages.Razor.Configuration.RazorPagesSection.Namespaces"> <summary>获取或设置要添加到当前应用程序的 Web Pages 页的命名空间的集合。</summary> <returns>命名空间的集合。</returns> </member> <member name="P:System.Web.WebPages.Razor.Configuration.RazorPagesSection.PageBaseType"> <summary>获取或设置页基类型类的名称。</summary> <returns>页基类型类的名称。</returns> </member> <member name="F:System.Web.WebPages.Razor.Configuration.RazorPagesSection.SectionName"> <summary>表示 Razor 页配置部分的名称。</summary> </member> <member name="T:System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup"> <summary>为 system.web.webPages.razor 配置部分提供配置系统支持。</summary> </member> <member name="M:System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup.#ctor"> <summary>初始化 <see cref="T:System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup" /> 类的新实例。</summary> </member> <member name="F:System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup.GroupName"> <summary>表示 Razor Web 部分的配置部分的名称。包含静态的只读字符串“system.web.webPages.razor”。</summary> </member> <member name="P:System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup.Host"> <summary>获取或设置 system.web.webPages.razor 部分组的 host 值。</summary> <returns>主机值。</returns> </member> <member name="P:System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup.Pages"> <summary>获取或设置 system.web.webPages.razor 部分的 pages 元素的值。</summary> <returns>pages 元素的值。</returns> </member> </members> </doc>
{ "pile_set_name": "Github" }
/** \defgroup Slicer_QtModules_Cameras Cameras \ingroup Slicer_QtModules This module manages 3D views and cameras nodes. */
{ "pile_set_name": "Github" }
{ "private": true, "name": "@antv/x6-app-draw", "version": "0.10.71", "scripts": { "start": "umi dev", "build": "umi build", "lint": "yarn lint:ts", "lint:ts": "tslint -c tslint.json -p tsconfig.json --fix", "precommit": "lint-staged" }, "dependencies": { "@antv/x6": "^0.10.71", "antd": "^4.4.2", "react": "^16.8.6", "react-dom": "^16.8.6" }, "devDependencies": { "@types/jest": "^25.2.1", "@types/react": "^16.7.18", "@types/react-dom": "^16.0.11", "@types/react-test-renderer": "^16.0.3", "babel-eslint": "^10.1.0", "babel-plugin-import": "^1.13.0", "eslint": "^6.8.0", "eslint-config-umi": "^1.4.0", "eslint-plugin-flowtype": "^4.7.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-react": "^7.11.1", "lint-staged": "^10.2.2", "react-test-renderer": "^16.7.0", "tslint": "^6.1.2", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^5.0.0", "umi": "^2.9.0", "umi-plugin-react": "^1.8.0", "umi-types": "^0.3.0" }, "lint-staged": { "src/**/*.{ts,tsx}": [ "tslint -c tslint.json -p ./tsconfig.json --fix" ], "*.{js,jsx}": [ "eslint --fix" ] }, "engines": { "node": ">=8.0.0" } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <EffekseerProject> <Root> <Name>Root</Name> <Children> <Node> <LocationValues> <Type>1</Type> <PVA> <Location> <X> <Center>2</Center> <Max>2</Max> <Min>2</Min> </X> <Y> <Center>3</Center> <Max>3</Max> <Min>3</Min> </Y> <Z> <Center>2</Center> <Max>2</Max> <Min>2</Min> </Z> </Location> <Velocity> <X> <Center>-4</Center> <Max>-4</Max> <Min>-4</Min> </X> </Velocity> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Y> <Center>195</Center> <Max>195</Max> <Min>195</Min> </Y> </Rotation> <Velocity> <Y> <Center>-30</Center> <Max>-30</Max> <Min>-30</Min> </Y> </Velocity> </PVA> </RotationValues> <DrawingValues> <Type>0</Type> </DrawingValues> <Name>HolySandstorm</Name> <Children> <Node> <CommonValues> <MaxGeneration> <Value>2</Value> </MaxGeneration> <LocationEffectType>1</LocationEffectType> <RotationEffectType>1</RotationEffectType> <ScaleEffectType>1</ScaleEffectType> <Life> <Center>180</Center> <Max>180</Max> <Min>180</Min> </Life> </CommonValues> <LocationValues> <Type>1</Type> </LocationValues> <RotationValues> <Type>1</Type> </RotationValues> <DrawingValues> <Type>0</Type> </DrawingValues> <Name>StormGenerator</Name> <Children> <Node> <CommonValues> <MaxGeneration> <Value>240</Value> </MaxGeneration> <LocationEffectType>1</LocationEffectType> <RotationEffectType>1</RotationEffectType> <ScaleEffectType>1</ScaleEffectType> <Life> <Center>90</Center> <Max>90</Max> <Min>90</Min> </Life> <GenerationTime> <Center>1.000005</Center> <Max>2</Max> <Min>1E-05</Min> </GenerationTime> <GenerationTimeOffset> <Center>75</Center> <Max>75</Max> <Min>75</Min> </GenerationTimeOffset> </CommonValues> <LocationValues> <Type>1</Type> <PVA> <Location> <X> <Max>0.2</Max> <Min>-0.2</Min> </X> <Y> <Max>0.2</Max> <Min>-0.2</Min> </Y> <Z> <Center>1</Center> <Max>1.2</Max> <Min>0.8000002</Min> </Z> </Location> <Velocity> <Z> <Center>-0.02</Center> <Max>-0.01</Max> <Min>-0.03</Min> </Z> </Velocity> <Acceleration> <Z> <Center>-0.015</Center> <Max>-0.01</Max> <Min>-0.02</Min> </Z> </Acceleration> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Velocity> <Z> <Max>30</Max> <Min>-30</Min> </Z> </Velocity> <Acceleration> <Z> <Max>0.025</Max> <Min>-0.025</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <PVA> <Scale> <X> <Center>5</Center> <Max>5</Max> <Min>5</Min> </X> <Y> <Center>5</Center> <Max>5</Max> <Min>5</Min> </Y> <Z> <Center>5</Center> <Max>5</Max> <Min>5</Min> </Z> </Scale> <Velocity> <X> <Center>0.05</Center> <Max>0.05</Max> <Min>0.05</Min> </X> <Y> <Center>0.05</Center> <Max>0.05</Max> <Min>0.05</Min> </Y> <Z> <Center>0.05</Center> <Max>0.05</Max> <Min>0.05</Min> </Z> </Velocity> </PVA> </ScalingValues> <RendererCommonValues> <FadeIn> <Frame>5</Frame> </FadeIn> <FadeOut> <Frame>40</Frame> <EndSpeed>-10</EndSpeed> </FadeOut> </RendererCommonValues> <DrawingValues> <Type>0</Type> <Sprite> <Billboard>2</Billboard> </Sprite> </DrawingValues> <Name>Main</Name> <Children> <Node> <CommonValues> <LocationEffectType>1</LocationEffectType> <RotationEffectType>1</RotationEffectType> <ScaleEffectType>1</ScaleEffectType> <Life> <Center>60</Center> <Max>60</Max> <Min>60</Min> </Life> </CommonValues> <LocationValues> <Type>1</Type> <Fixed> <Location> <X>2</X> </Location> </Fixed> <PVA> <Location> <X> <Center>1</Center> <Max>2</Max> </X> </Location> <Velocity> <X> <Center>0.36</Center> <Max>0.36</Max> <Min>0.36</Min> </X> <Z> <Center>-0.2</Center> <Max>-0.2</Max> <Min>-0.2</Min> </Z> </Velocity> <Acceleration> <X> <Center>-0.008</Center> <Max>-0.007</Max> <Min>-0.009000001</Min> </X> <Z> <Center>-0.02</Center> <Max>-0.02</Max> <Min>-0.02</Min> </Z> </Acceleration> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Velocity> <Z> <Max>5</Max> <Min>-5</Min> </Z> </Velocity> </PVA> </RotationValues> <ScalingValues> <Type>1</Type> <Fixed> <Scale> <X>5</X> <Y>5</Y> <Z>5</Z> </Scale> </Fixed> <PVA> <Scale> <X> <Center>5</Center> <Max>5</Max> <Min>5</Min> </X> <Y> <Center>5</Center> <Max>5</Max> <Min>5</Min> </Y> <Z> <Center>5</Center> <Max>5</Max> <Min>5</Min> </Z> </Scale> <Velocity> <X> <Center>0.1</Center> <Max>0.1</Max> <Min>0.1</Min> </X> <Y> <Center>0.1</Center> <Max>0.1</Max> <Min>0.1</Min> </Y> <Z> <Center>0.1</Center> <Max>0.1</Max> <Min>0.1</Min> </Z> </Velocity> </PVA> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Smoke.png</ColorTexture> <AlphaBlend>2</AlphaBlend> <FadeInType>1</FadeInType> <FadeIn> <Frame>32</Frame> <StartSpeed>-30</StartSpeed> </FadeIn> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>15</Frame> <EndSpeed>-10</EndSpeed> </FadeOut> <UV>1</UV> <UVFixed> <Start> <Y>256</Y> </Start> <Size> <X>256</X> <Y>256</Y> </Size> </UVFixed> <UVAnimation> <Size> <X>256</X> <Y>256</Y> </Size> <FrameLength> <Value>8</Value> </FrameLength> <FrameCountX>4</FrameCountX> <FrameCountY>4</FrameCountY> </UVAnimation> </RendererCommonValues> <DrawingValues> <Sprite> <Billboard>3</Billboard> <ColorAll_Fixed> <R>192</R> <G>176</G> <B>128</B> <A>64</A> </ColorAll_Fixed> </Sprite> </DrawingValues> <Name>Smoke</Name> <Children /> </Node> <Node> <CommonValues> <ScaleEffectType>1</ScaleEffectType> <RemoveWhenParentIsRemoved>True</RemoveWhenParentIsRemoved> <Life> <Center>90</Center> <Min>80</Min> </Life> </CommonValues> <LocationValues> <PVA> <Location> <X> <Max>1</Max> <Min>-1</Min> </X> <Y> <Max>1</Max> <Min>-1</Min> </Y> <Z> <Max>1</Max> <Min>-1</Min> </Z> </Location> <Velocity> <Z> <Center>-0.45</Center> <Max>-0.3</Max> <Min>-0.6</Min> </Z> </Velocity> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Velocity> <Z> <Max>30</Max> <Min>-30</Min> </Z> </Velocity> <Acceleration> <Z> <Max>0.5</Max> <Min>-0.5</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <Easing> <End> <X> <Max>2</Max> <Min>0</Min> </X> <Y> <Max>2</Max> <Min>0</Min> </Y> <Z> <Max>2</Max> <Min>0</Min> </Z> </End> </Easing> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Fire_Single.png</ColorTexture> <FadeInType>1</FadeInType> <FadeIn> <Frame>5</Frame> </FadeIn> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>70</Frame> <EndSpeed>10</EndSpeed> </FadeOut> <UV>1</UV> <UVFixed> <Size> <X>256</X> <Y>256</Y> </Size> </UVFixed> </RendererCommonValues> <DrawingValues> <Type>4</Type> <Ring> <VertexCount>9</VertexCount> <ViewingAngle_Random> <Center>0</Center> <Max>0</Max> <Min>0</Min> <DrawnAs>0</DrawnAs> </ViewingAngle_Random> <Outer>2</Outer> <Outer_Easing> <Start> <X> <Center>1</Center> <Max>2</Max> </X> </Start> <End> <X> <Center>12</Center> <Max>14</Max> <Min>10</Min> </X> </End> <StartSpeed>-20</StartSpeed> <EndSpeed>10</EndSpeed> </Outer_Easing> <Inner>2</Inner> <Inner_Fixed> <Location> <X>2</X> <Y>1</Y> </Location> </Inner_Fixed> <Inner_Easing> <Start> <X> <Center>1</Center> <Max>2</Max> </X> </Start> <End> <X> <Center>12</Center> <Max>14</Max> <Min>10</Min> </X> <Y> <Center>8</Center> <Max>10</Max> <Min>6</Min> </Y> </End> <StartSpeed>-20</StartSpeed> <EndSpeed>10</EndSpeed> </Inner_Easing> <OuterColor_Fixed> <R>192</R> <G>176</G> <B>128</B> <A>255</A> </OuterColor_Fixed> <CenterColor_Fixed> <R>192</R> <G>176</G> <B>128</B> </CenterColor_Fixed> <InnerColor_Fixed> <R>192</R> <G>176</G> <B>128</B> <A>255</A> </InnerColor_Fixed> </Ring> </DrawingValues> <Name>Wind_Ring</Name> <Children /> </Node> <Node> <CommonValues> <RemoveWhenParentIsRemoved>True</RemoveWhenParentIsRemoved> <Life> <Center>90</Center> <Min>80</Min> </Life> </CommonValues> <LocationValues> <Type>1</Type> <Fixed> <Location> <Z>4</Z> </Location> </Fixed> <PVA> <Location> <X> <Max>1</Max> <Min>-1</Min> </X> <Y> <Max>1</Max> <Min>-1</Min> </Y> <Z> <Max>1</Max> <Min>-1</Min> </Z> </Location> <Velocity> <Z> <Center>0.04</Center> <Max>0.04</Max> <Min>0.04</Min> </Z> </Velocity> </PVA> </LocationValues> <RotationValues> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Velocity> <Z> <Max>30</Max> <Min>-30</Min> </Z> </Velocity> <Acceleration> <Z> <Max>0.3</Max> <Min>-0.3</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <Type>1</Type> <Fixed> <Scale> <X>5</X> <Y>5</Y> <Z>5</Z> </Scale> </Fixed> <PVA> <Scale> <X> <Center>2</Center> <Max>2</Max> <Min>2</Min> </X> <Y> <Center>2</Center> <Max>2</Max> <Min>2</Min> </Y> <Z> <Center>2</Center> <Max>2</Max> <Min>2</Min> </Z> </Scale> <Velocity> <X> <Center>0.3</Center> <Max>0.35</Max> <Min>0.25</Min> </X> <Y> <Center>0.3</Center> <Max>0.35</Max> <Min>0.25</Min> </Y> <Z> <Center>0.3</Center> <Max>0.35</Max> <Min>0.25</Min> </Z> </Velocity> </PVA> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Wind.png</ColorTexture> <FadeInType>1</FadeInType> <FadeIn> <Frame>5</Frame> </FadeIn> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>70</Frame> </FadeOut> </RendererCommonValues> <DrawingValues> <Sprite> <Billboard>2</Billboard> <ColorAll_Fixed> <R>192</R> <G>176</G> <B>128</B> </ColorAll_Fixed> </Sprite> </DrawingValues> <Name>Wind_Sprite</Name> <Children /> </Node> <Node> <CommonValues> <Life> <Center>80</Center> <Min>60</Min> </Life> <GenerationTime> <Center>8</Center> <Max>12</Max> <Min>4</Min> </GenerationTime> </CommonValues> <LocationValues> <Type>1</Type> <Fixed> <Location> <X>1</X> </Location> </Fixed> <PVA> <Location> <X> <Center>6</Center> <Max>10</Max> <Min>2</Min> </X> </Location> <Velocity> <X> <Max>0.45</Max> <Min>-0.45</Min> </X> </Velocity> <Acceleration> <X> <Max>0.001</Max> <Min>-0.001</Min> </X> </Acceleration> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Velocity> <Z> <Max>30</Max> <Min>-30</Min> </Z> </Velocity> <Acceleration> <Z> <Max>0.05</Max> <Min>-0.05</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <Type>1</Type> <Fixed> <Scale> <X>0.25</X> <Y>0.25</Y> <Z>0.25</Z> </Scale> </Fixed> <PVA> <Scale> <X> <Center>0.2</Center> <Max>0.31</Max> <Min>0.08999999</Min> </X> <Y> <Center>0.2</Center> <Max>0.31</Max> <Min>0.08999999</Min> </Y> <Z> <Center>0.2</Center> <Max>0.31</Max> <Min>0.08999999</Min> </Z> </Scale> </PVA> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Particle_Hard.png</ColorTexture> <AlphaBlend>2</AlphaBlend> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>40</Frame> </FadeOut> </RendererCommonValues> <DrawingValues> <Sprite> <ColorAll_Fixed> <R>192</R> <G>176</G> <B>128</B> </ColorAll_Fixed> </Sprite> </DrawingValues> <Name>Particle</Name> <Children /> </Node> </Children> </Node> <Node> <DrawingValues> <Type>0</Type> </DrawingValues> <Name>Initial</Name> <Children> <Node> <CommonValues> <MaxGeneration> <Value>10</Value> </MaxGeneration> <GenerationTime> <Center>12</Center> <Max>12</Max> <Min>12</Min> </GenerationTime> </CommonValues> <LocationValues> <Type>1</Type> <PVA> <Location> <Z> <Center>-0.01</Center> <Max>-0.01</Max> <Min>-0.01</Min> </Z> </Location> <Velocity> <Z> <Center>-0.02</Center> <Min>-0.04</Min> </Z> </Velocity> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>180</Max> <Min>-180</Min> </Z> </Rotation> <Velocity> <Z> <Center>2</Center> <Max>2</Max> <Min>2</Min> </Z> </Velocity> <Acceleration> <Z> <Center>0.2</Center> <Max>0.2</Max> <Min>0.2</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <Type>1</Type> <PVA> <Scale> <X> <Center>0.02</Center> <Max>0.02</Max> <Min>0.02</Min> </X> <Y> <Center>0.02</Center> <Max>0.02</Max> <Min>0.02</Min> </Y> <Z> <Center>0.02</Center> <Max>0.02</Max> <Min>0.02</Min> </Z> </Scale> <Velocity> <X> <Center>0.05</Center> <Max>0.052</Max> <Min>0.048</Min> </X> <Y> <Center>0.05</Center> <Max>0.052</Max> <Min>0.048</Min> </Y> <Z> <Center>0.02</Center> <Max>0.0225</Max> <Min>0.0175</Min> </Z> </Velocity> <Acceleration> <X> <Center>-0.0003</Center> <Max>-0.0003</Max> <Min>-0.0003</Min> </X> <Y> <Center>-0.0003</Center> <Max>-0.0003</Max> <Min>-0.0003</Min> </Y> <Z> <Center>0.0003</Center> <Max>0.0003</Max> <Min>0.0003</Min> </Z> </Acceleration> </PVA> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Fire.png</ColorTexture> <FadeInType>1</FadeInType> <FadeIn> <Frame>20</Frame> </FadeIn> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>60</Frame> </FadeOut> <UV>1</UV> <UVFixed> <Size> <X>256</X> <Y>256</Y> </Size> </UVFixed> <Distortion>True</Distortion> <DistortionIntensity>0.8</DistortionIntensity> </RendererCommonValues> <DrawingValues> <Type>4</Type> <Ring> <VertexCount>9</VertexCount> <Outer_Fixed> <Location> <X>1</X> </Location> </Outer_Fixed> <Inner_Fixed> <Location> <Y>2</Y> </Location> </Inner_Fixed> </Ring> </DrawingValues> <Name>Distortion</Name> <Children /> </Node> <Node> <CommonValues> <MaxGeneration> <Value>15</Value> </MaxGeneration> <RotationEffectType>1</RotationEffectType> <Life> <Center>90</Center> <Max>90</Max> <Min>90</Min> </Life> <GenerationTime> <Center>3</Center> <Max>3</Max> <Min>3</Min> </GenerationTime> <GenerationTimeOffset> <Center>2</Center> <Max>2</Max> <Min>2</Min> </GenerationTimeOffset> </CommonValues> <LocationValues> <Type>1</Type> <PVA> <Location> <X> <Max>0.25</Max> <Min>-0.25</Min> </X> <Y> <Max>0.25</Max> <Min>-0.25</Min> </Y> <Z> <Max>1</Max> <Min>-1</Min> </Z> </Location> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Acceleration> <Z> <Max>2</Max> <Min>-2</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <Type>1</Type> <PVA> <Scale> <X> <Center>2.5</Center> <Max>3</Max> <Min>2</Min> </X> <Y> <Center>2.5</Center> <Max>3</Max> <Min>2</Min> </Y> <Z> <Center>2.5</Center> <Max>3</Max> <Min>2</Min> </Z> </Scale> <Velocity> <X> <Center>-0.08</Center> <Max>-0.08</Max> <Min>-0.08</Min> </X> <Y> <Center>-0.08</Center> <Max>-0.08</Max> <Min>-0.08</Min> </Y> <Z> <Center>-0.08</Center> <Max>-0.08</Max> <Min>-0.08</Min> </Z> </Velocity> <Acceleration> <X> <Center>0.001</Center> <Max>0.001</Max> <Min>0.001</Min> </X> <Y> <Center>0.001</Center> <Max>0.001</Max> <Min>0.001</Min> </Y> <Z> <Center>0.001</Center> <Max>0.001</Max> <Min>0.001</Min> </Z> </Acceleration> </PVA> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Fire_Single.png</ColorTexture> <FadeInType>1</FadeInType> <FadeIn> <Frame>20</Frame> </FadeIn> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>60</Frame> </FadeOut> <UV>1</UV> <UVFixed> <Size> <X>256</X> <Y>256</Y> </Size> </UVFixed> </RendererCommonValues> <DrawingValues> <Type>4</Type> <Ring> <VertexCount>9</VertexCount> <Outer>2</Outer> <Outer_Fixed> <Location> <X>1</X> </Location> </Outer_Fixed> <Outer_Easing> <Start> <X> <Center>1</Center> <Max>1.2</Max> <Min>0.8</Min> </X> <Y> <Center>1</Center> <Max>1</Max> <Min>1</Min> </Y> </Start> <End> <X> <Center>1</Center> <Max>1.2</Max> <Min>0.8</Min> </X> <Y> <Center>3</Center> <Max>4</Max> <Min>2</Min> </Y> </End> <StartSpeed>-20</StartSpeed> <EndSpeed>20</EndSpeed> </Outer_Easing> <Inner>2</Inner> <Inner_Fixed> <Location> <Y>2</Y> </Location> </Inner_Fixed> <Inner_Easing> <Start> <X> <Center>1</Center> <Max>1.2</Max> <Min>0.8</Min> </X> </Start> <End> <X> <Center>1</Center> <Max>1.2</Max> <Min>0.8</Min> </X> </End> <StartSpeed>-10</StartSpeed> <EndSpeed>10</EndSpeed> </Inner_Easing> <OuterColor_Fixed> <R>224</R> <G>208</G> <B>176</B> <A>64</A> </OuterColor_Fixed> <CenterColor_Fixed> <R>224</R> <G>208</G> <B>176</B> <A>64</A> </CenterColor_Fixed> <InnerColor_Fixed> <R>224</R> <G>208</G> <B>176</B> <A>64</A> </InnerColor_Fixed> </Ring> </DrawingValues> <Name>Wind_Ring</Name> <Children /> </Node> <Node> <CommonValues> <MaxGeneration> <Value>20</Value> </MaxGeneration> <RotationEffectType>1</RotationEffectType> <Life> <Center>90</Center> <Max>90</Max> <Min>90</Min> </Life> <GenerationTime> <Center>2</Center> <Max>3</Max> </GenerationTime> </CommonValues> <LocationValues> <Type>1</Type> <PVA> <Location> <Z> <Center>0.8</Center> <Max>1.6</Max> </Z> </Location> <Velocity> <Z> <Center>-0.005000003</Center> <Max>0.007000026</Max> <Min>-0.01700003</Min> </Z> </Velocity> </PVA> </LocationValues> <RotationValues> <Type>1</Type> <PVA> <Rotation> <Z> <Max>360</Max> <Min>-360</Min> </Z> </Rotation> <Acceleration> <Z> <Max>2</Max> <Min>-2</Min> </Z> </Acceleration> </PVA> </RotationValues> <ScalingValues> <Type>1</Type> <Fixed> <Scale> <X>2</X> <Y>2</Y> <Z>2</Z> </Scale> </Fixed> <PVA> <Scale> <X> <Center>8</Center> <Max>8.5</Max> <Min>7.5</Min> </X> <Y> <Center>8</Center> <Max>8.5</Max> <Min>7.5</Min> </Y> <Z> <Center>8</Center> <Max>8.5</Max> <Min>7.5</Min> </Z> </Scale> <Velocity> <X> <Center>-0.2</Center> <Max>-0.2</Max> <Min>-0.2</Min> </X> <Y> <Center>-0.2</Center> <Max>-0.2</Max> <Min>-0.2</Min> </Y> <Z> <Center>-0.2</Center> <Max>-0.2</Max> <Min>-0.2</Min> </Z> </Velocity> <Acceleration> <X> <Center>0.003</Center> <Max>0.0031</Max> <Min>0.0029</Min> </X> <Y> <Center>0.003</Center> <Max>0.0031</Max> <Min>0.0029</Min> </Y> <Z> <Center>0.003</Center> <Max>0.0031</Max> <Min>0.0029</Min> </Z> </Acceleration> </PVA> </ScalingValues> <RendererCommonValues> <ColorTexture>Texture/Wind.png</ColorTexture> <FadeInType>1</FadeInType> <FadeIn> <Frame>80</Frame> </FadeIn> <FadeOutType>1</FadeOutType> <FadeOut> <Frame>30</Frame> </FadeOut> </RendererCommonValues> <DrawingValues> <Sprite> <Billboard>2</Billboard> <ColorAll_Fixed> <R>224</R> <G>208</G> <B>176</B> </ColorAll_Fixed> </Sprite> </DrawingValues> <Name>Wind_Sprite</Name> <Children /> </Node> </Children> </Node> </Children> </Node> </Children> </Node> </Children> </Root> <ToolVersion>1.30</ToolVersion> <Version>3</Version> <StartFrame>0</StartFrame> <EndFrame>300</EndFrame> <IsLoop>True</IsLoop> </EffekseerProject>
{ "pile_set_name": "Github" }
<h1>User Profile</h1> <p> <b>Name:</b> <%= @user.name %> </p> <p> <b>Admin:</b> <%= @user.admin? ? "Yes" : "No" %> </p> <p><%= link_to "Edit Profile", edit_user_path(@user) %></p> <h3><%= pluralize @user.projects.size, "Project" %></h3> <ul> <% @user.projects.each do |project| %> <li><%= project.name %></li> <% end %> </ul> <%= link_to "New Project", new_project_path %>
{ "pile_set_name": "Github" }
// Copyright (C) 1999-2000 Id Software, Inc. // // cg_syscalls.c -- this file is only included when building a dll // cg_syscalls.asm is included instead when building a qvm #include "cg_local.h" static int (QDECL *syscall)( int arg, ... ) = (int (QDECL *)( int, ...))-1; #include "../namespace_begin.h" void dllEntry( int (QDECL *syscallptr)( int arg,... ) ) { syscall = syscallptr; } int PASSFLOAT( float x ) { float floatTemp; floatTemp = x; return *(int *)&floatTemp; } void trap_Print( const char *fmt ) { syscall( CG_PRINT, fmt ); } void trap_Error( const char *fmt ) { syscall( CG_ERROR, fmt ); } int trap_Milliseconds( void ) { return syscall( CG_MILLISECONDS ); } //rww - precision timer funcs... -ALWAYS- call end after start with supplied ptr, or you'll get a nasty memory leak. //not that you should be using these outside of debug anyway.. because you shouldn't be. So don't. //Start should be suppled with a pointer to an empty pointer (e.g. void *blah; trap_PrecisionTimer_Start(&blah);), //the empty pointer will be filled with an exe address to our timer (this address means nothing in vm land however). //You must pass this pointer back unmodified to the timer end func. void trap_PrecisionTimer_Start(void **theNewTimer) { syscall(CG_PRECISIONTIMER_START, theNewTimer); } //If you're using the above example, the appropriate call for this is int result = trap_PrecisionTimer_End(blah); int trap_PrecisionTimer_End(void *theTimer) { return syscall(CG_PRECISIONTIMER_END, theTimer); } void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags ) { syscall( CG_CVAR_REGISTER, vmCvar, varName, defaultValue, flags ); } void trap_Cvar_Update( vmCvar_t *vmCvar ) { syscall( CG_CVAR_UPDATE, vmCvar ); } void trap_Cvar_Set( const char *var_name, const char *value ) { syscall( CG_CVAR_SET, var_name, value ); } void trap_Cvar_VariableStringBuffer( const char *var_name, char *buffer, int bufsize ) { syscall( CG_CVAR_VARIABLESTRINGBUFFER, var_name, buffer, bufsize ); } int trap_Cvar_GetHiddenVarValue(const char *name) { return syscall(CG_CVAR_GETHIDDENVALUE, name); } int trap_Argc( void ) { return syscall( CG_ARGC ); } void trap_Argv( int n, char *buffer, int bufferLength ) { syscall( CG_ARGV, n, buffer, bufferLength ); } void trap_Args( char *buffer, int bufferLength ) { syscall( CG_ARGS, buffer, bufferLength ); } int trap_FS_FOpenFile( const char *qpath, fileHandle_t *f, fsMode_t mode ) { return syscall( CG_FS_FOPENFILE, qpath, f, mode ); } void trap_FS_Read( void *buffer, int len, fileHandle_t f ) { syscall( CG_FS_READ, buffer, len, f ); } void trap_FS_Write( const void *buffer, int len, fileHandle_t f ) { syscall( CG_FS_WRITE, buffer, len, f ); } void trap_FS_FCloseFile( fileHandle_t f ) { syscall( CG_FS_FCLOSEFILE, f ); } int trap_FS_GetFileList( const char *path, const char *extension, char *listbuf, int bufsize ) { return syscall( CG_FS_GETFILELIST, path, extension, listbuf, bufsize ); } void trap_SendConsoleCommand( const char *text ) { syscall( CG_SENDCONSOLECOMMAND, text ); } void trap_AddCommand( const char *cmdName ) { syscall( CG_ADDCOMMAND, cmdName ); } void trap_RemoveCommand( const char *cmdName ) { syscall( CG_REMOVECOMMAND, cmdName ); } void trap_SendClientCommand( const char *s ) { syscall( CG_SENDCLIENTCOMMAND, s ); } void trap_UpdateScreen( void ) { syscall( CG_UPDATESCREEN ); } void trap_CM_LoadMap( const char *mapname, qboolean SubBSP ) { syscall( CG_CM_LOADMAP, mapname, SubBSP ); } int trap_CM_NumInlineModels( void ) { return syscall( CG_CM_NUMINLINEMODELS ); } clipHandle_t trap_CM_InlineModel( int index ) { return syscall( CG_CM_INLINEMODEL, index ); } clipHandle_t trap_CM_TempBoxModel( const vec3_t mins, const vec3_t maxs ) { return syscall( CG_CM_TEMPBOXMODEL, mins, maxs ); } clipHandle_t trap_CM_TempCapsuleModel( const vec3_t mins, const vec3_t maxs ) { return syscall( CG_CM_TEMPCAPSULEMODEL, mins, maxs ); } int trap_CM_PointContents( const vec3_t p, clipHandle_t model ) { return syscall( CG_CM_POINTCONTENTS, p, model ); } int trap_CM_TransformedPointContents( const vec3_t p, clipHandle_t model, const vec3_t origin, const vec3_t angles ) { return syscall( CG_CM_TRANSFORMEDPOINTCONTENTS, p, model, origin, angles ); } void trap_CM_BoxTrace( trace_t *results, const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, clipHandle_t model, int brushmask ) { syscall( CG_CM_BOXTRACE, results, start, end, mins, maxs, model, brushmask ); } void trap_CM_CapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, clipHandle_t model, int brushmask ) { syscall( CG_CM_CAPSULETRACE, results, start, end, mins, maxs, model, brushmask ); } void trap_CM_TransformedBoxTrace( trace_t *results, const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, clipHandle_t model, int brushmask, const vec3_t origin, const vec3_t angles ) { syscall( CG_CM_TRANSFORMEDBOXTRACE, results, start, end, mins, maxs, model, brushmask, origin, angles ); } void trap_CM_TransformedCapsuleTrace( trace_t *results, const vec3_t start, const vec3_t end, const vec3_t mins, const vec3_t maxs, clipHandle_t model, int brushmask, const vec3_t origin, const vec3_t angles ) { syscall( CG_CM_TRANSFORMEDCAPSULETRACE, results, start, end, mins, maxs, model, brushmask, origin, angles ); } int trap_CM_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projection, int maxPoints, vec3_t pointBuffer, int maxFragments, markFragment_t *fragmentBuffer ) { return syscall( CG_CM_MARKFRAGMENTS, numPoints, points, projection, maxPoints, pointBuffer, maxFragments, fragmentBuffer ); } int trap_S_GetVoiceVolume( int entityNum ) { return syscall( CG_S_GETVOICEVOLUME, entityNum ); } void trap_S_MuteSound( int entityNum, int entchannel ) { syscall( CG_S_MUTESOUND, entityNum, entchannel ); } void trap_S_StartSound( vec3_t origin, int entityNum, int entchannel, sfxHandle_t sfx ) { syscall( CG_S_STARTSOUND, origin, entityNum, entchannel, sfx ); } void trap_S_StartLocalSound( sfxHandle_t sfx, int channelNum ) { syscall( CG_S_STARTLOCALSOUND, sfx, channelNum ); } void trap_S_ClearLoopingSounds(void) { syscall( CG_S_CLEARLOOPINGSOUNDS ); } void trap_S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ) { syscall( CG_S_ADDLOOPINGSOUND, entityNum, origin, velocity, sfx ); } void trap_S_UpdateEntityPosition( int entityNum, const vec3_t origin ) { syscall( CG_S_UPDATEENTITYPOSITION, entityNum, origin ); } void trap_S_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx ) { syscall( CG_S_ADDREALLOOPINGSOUND, entityNum, origin, velocity, sfx ); } void trap_S_StopLoopingSound( int entityNum ) { syscall( CG_S_STOPLOOPINGSOUND, entityNum ); } void trap_S_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int inwater ) { syscall( CG_S_RESPATIALIZE, entityNum, origin, axis, inwater ); } void trap_S_ShutUp(qboolean shutUpFactor) { syscall(CG_S_SHUTUP, shutUpFactor); } sfxHandle_t trap_S_RegisterSound( const char *sample ) { return syscall( CG_S_REGISTERSOUND, sample ); } void trap_S_StartBackgroundTrack( const char *intro, const char *loop, qboolean bReturnWithoutStarting ) { syscall( CG_S_STARTBACKGROUNDTRACK, intro, loop, bReturnWithoutStarting ); } void trap_S_UpdateAmbientSet( const char *name, vec3_t origin ) { syscall(CG_S_UPDATEAMBIENTSET, name, origin); } void trap_AS_ParseSets( void ) { syscall(CG_AS_PARSESETS); } void trap_AS_AddPrecacheEntry( const char *name ) { syscall(CG_AS_ADDPRECACHEENTRY, name); } int trap_S_AddLocalSet( const char *name, vec3_t listener_origin, vec3_t origin, int entID, int time ) { return syscall(CG_S_ADDLOCALSET, name, listener_origin, origin, entID, time); } sfxHandle_t trap_AS_GetBModelSound( const char *name, int stage ) { return syscall(CG_AS_GETBMODELSOUND, name, stage); } void trap_R_LoadWorldMap( const char *mapname ) { syscall( CG_R_LOADWORLDMAP, mapname ); } qhandle_t trap_R_RegisterModel( const char *name ) { return syscall( CG_R_REGISTERMODEL, name ); } qhandle_t trap_R_RegisterSkin( const char *name ) { return syscall( CG_R_REGISTERSKIN, name ); } qhandle_t trap_R_RegisterShader( const char *name ) { return syscall( CG_R_REGISTERSHADER, name ); } qhandle_t trap_R_RegisterShaderNoMip( const char *name ) { return syscall( CG_R_REGISTERSHADERNOMIP, name ); } qhandle_t trap_R_RegisterFont( const char *fontName ) { return syscall( CG_R_REGISTERFONT, fontName); } int trap_R_Font_StrLenPixels(const char *text, const int iFontIndex, const float scale) { return syscall( CG_R_FONT_STRLENPIXELS, text, iFontIndex, PASSFLOAT(scale)); } int trap_R_Font_StrLenChars(const char *text) { return syscall( CG_R_FONT_STRLENCHARS, text); } int trap_R_Font_HeightPixels(const int iFontIndex, const float scale) { return syscall( CG_R_FONT_STRHEIGHTPIXELS, iFontIndex, PASSFLOAT(scale)); } void trap_R_Font_DrawString(int ox, int oy, const char *text, const float *rgba, const int setIndex, int iCharLimit, const float scale) { syscall( CG_R_FONT_DRAWSTRING, ox, oy, text, rgba, setIndex, iCharLimit, PASSFLOAT(scale)); } qboolean trap_Language_IsAsian(void) { return syscall( CG_LANGUAGE_ISASIAN ); } qboolean trap_Language_UsesSpaces(void) { return syscall( CG_LANGUAGE_USESSPACES ); } unsigned int trap_AnyLanguage_ReadCharFromString( const char *psText, int *piAdvanceCount, qboolean *pbIsTrailingPunctuation/* = NULL*/ ) { return syscall( CG_ANYLANGUAGE_READCHARFROMSTRING, psText, piAdvanceCount, pbIsTrailingPunctuation); } void trap_R_ClearScene( void ) { syscall( CG_R_CLEARSCENE ); } void trap_R_ClearDecals ( void ) { syscall ( CG_R_CLEARDECALS ); } void trap_R_AddRefEntityToScene( const refEntity_t *re ) { syscall( CG_R_ADDREFENTITYTOSCENE, re ); } void trap_R_AddPolyToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts ) { syscall( CG_R_ADDPOLYTOSCENE, hShader, numVerts, verts ); } void trap_R_AddPolysToScene( qhandle_t hShader , int numVerts, const polyVert_t *verts, int num ) { syscall( CG_R_ADDPOLYSTOSCENE, hShader, numVerts, verts, num ); } void trap_R_AddDecalToScene ( qhandle_t shader, const vec3_t origin, const vec3_t dir, float orientation, float r, float g, float b, float a, qboolean alphaFade, float radius, qboolean temporary ) { syscall( CG_R_ADDDECALTOSCENE, shader, origin, dir, PASSFLOAT(orientation), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b), PASSFLOAT(a), alphaFade, PASSFLOAT(radius), temporary ); } int trap_R_LightForPoint( vec3_t point, vec3_t ambientLight, vec3_t directedLight, vec3_t lightDir ) { return syscall( CG_R_LIGHTFORPOINT, point, ambientLight, directedLight, lightDir ); } void trap_R_AddLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { syscall( CG_R_ADDLIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); } void trap_R_AddAdditiveLightToScene( const vec3_t org, float intensity, float r, float g, float b ) { syscall( CG_R_ADDADDITIVELIGHTTOSCENE, org, PASSFLOAT(intensity), PASSFLOAT(r), PASSFLOAT(g), PASSFLOAT(b) ); } void trap_R_RenderScene( const refdef_t *fd ) { syscall( CG_R_RENDERSCENE, fd ); } void trap_R_SetColor( const float *rgba ) { syscall( CG_R_SETCOLOR, rgba ); } void trap_R_DrawStretchPic( float x, float y, float w, float h, float s1, float t1, float s2, float t2, qhandle_t hShader ) { syscall( CG_R_DRAWSTRETCHPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), hShader ); } void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs ) { syscall( CG_R_MODELBOUNDS, model, mins, maxs ); } int trap_R_LerpTag( orientation_t *tag, clipHandle_t mod, int startFrame, int endFrame, float frac, const char *tagName ) { return syscall( CG_R_LERPTAG, tag, mod, startFrame, endFrame, PASSFLOAT(frac), tagName ); } void trap_R_DrawRotatePic( float x, float y, float w, float h, float s1, float t1, float s2, float t2,float a, qhandle_t hShader ) { syscall( CG_R_DRAWROTATEPIC, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), PASSFLOAT(a), hShader ); } void trap_R_DrawRotatePic2( float x, float y, float w, float h, float s1, float t1, float s2, float t2,float a, qhandle_t hShader ) { syscall( CG_R_DRAWROTATEPIC2, PASSFLOAT(x), PASSFLOAT(y), PASSFLOAT(w), PASSFLOAT(h), PASSFLOAT(s1), PASSFLOAT(t1), PASSFLOAT(s2), PASSFLOAT(t2), PASSFLOAT(a), hShader ); } //linear fogging, with settable range -rww void trap_R_SetRangeFog(float range) { syscall(CG_R_SETRANGEFOG, PASSFLOAT(range)); } //set some properties for the draw layer for my refractive effect (here primarily for mod authors) -rww void trap_R_SetRefractProp(float alpha, float stretch, qboolean prepost, qboolean negate) { syscall(CG_R_SETREFRACTIONPROP, PASSFLOAT(alpha), PASSFLOAT(stretch), prepost, negate); } void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset ) { syscall( CG_R_REMAP_SHADER, oldShader, newShader, timeOffset ); } void trap_R_GetLightStyle(int style, color4ub_t color) { syscall( CG_R_GET_LIGHT_STYLE, style, color ); } void trap_R_SetLightStyle(int style, int color) { syscall( CG_R_SET_LIGHT_STYLE, style, color ); } void trap_R_GetBModelVerts(int bmodelIndex, vec3_t *verts, vec3_t normal ) { syscall( CG_R_GET_BMODEL_VERTS, bmodelIndex, verts, normal ); } void trap_R_GetDistanceCull(float *f) { syscall(CG_R_GETDISTANCECULL, f); } //get screen resolution -rww void trap_R_GetRealRes(int *w, int *h) { syscall( CG_R_GETREALRES, w, h ); } //automap elevation setting -rww void trap_R_AutomapElevAdj(float newHeight) { syscall( CG_R_AUTOMAPELEVADJ, PASSFLOAT(newHeight) ); } //initialize automap -rww qboolean trap_R_InitWireframeAutomap(void) { return syscall( CG_R_INITWIREFRAMEAUTO ); } void trap_FX_AddLine( const vec3_t start, const vec3_t end, float size1, float size2, float sizeParm, float alpha1, float alpha2, float alphaParm, const vec3_t sRGB, const vec3_t eRGB, float rgbParm, int killTime, qhandle_t shader, int flags) { syscall( CG_FX_ADDLINE, start, end, PASSFLOAT(size1), PASSFLOAT(size2), PASSFLOAT(sizeParm), PASSFLOAT(alpha1), PASSFLOAT(alpha2), PASSFLOAT(alphaParm), sRGB, eRGB, PASSFLOAT(rgbParm), killTime, shader, flags); } void trap_GetGlconfig( glconfig_t *glconfig ) { syscall( CG_GETGLCONFIG, glconfig ); } void trap_GetGameState( gameState_t *gamestate ) { syscall( CG_GETGAMESTATE, gamestate ); } void trap_GetCurrentSnapshotNumber( int *snapshotNumber, int *serverTime ) { syscall( CG_GETCURRENTSNAPSHOTNUMBER, snapshotNumber, serverTime ); } qboolean trap_GetSnapshot( int snapshotNumber, snapshot_t *snapshot ) { return syscall( CG_GETSNAPSHOT, snapshotNumber, snapshot ); } qboolean trap_GetDefaultState(int entityIndex, entityState_t *state ) { //rwwRMG - added [NEWTRAP] return syscall( CG_GETDEFAULTSTATE, entityIndex, state ); } qboolean trap_GetServerCommand( int serverCommandNumber ) { return syscall( CG_GETSERVERCOMMAND, serverCommandNumber ); } int trap_GetCurrentCmdNumber( void ) { return syscall( CG_GETCURRENTCMDNUMBER ); } qboolean trap_GetUserCmd( int cmdNumber, usercmd_t *ucmd ) { return syscall( CG_GETUSERCMD, cmdNumber, ucmd ); } void trap_SetUserCmdValue( int stateValue, float sensitivityScale, float mPitchOverride, float mYawOverride, float mSensitivityOverride, int fpSel, int invenSel, qboolean fighterControls ) { syscall( CG_SETUSERCMDVALUE, stateValue, PASSFLOAT(sensitivityScale), PASSFLOAT(mPitchOverride), PASSFLOAT(mYawOverride), PASSFLOAT(mSensitivityOverride), fpSel, invenSel, fighterControls ); } void trap_SetClientForceAngle(int time, vec3_t angle) { syscall( CG_SETCLIENTFORCEANGLE, time, angle ); } void trap_SetClientTurnExtent(float turnAdd, float turnSub, int turnTime) { syscall( CG_SETCLIENTTURNEXTENT, PASSFLOAT(turnAdd), PASSFLOAT(turnSub), turnTime ); } void trap_OpenUIMenu(int menuID) { syscall( CG_OPENUIMENU, menuID ); } void testPrintInt( char *string, int i ) { syscall( CG_TESTPRINTINT, string, i ); } void testPrintFloat( char *string, float f ) { syscall( CG_TESTPRINTFLOAT, string, PASSFLOAT(f) ); } int trap_MemoryRemaining( void ) { return syscall( CG_MEMORY_REMAINING ); } qboolean trap_Key_IsDown( int keynum ) { return syscall( CG_KEY_ISDOWN, keynum ); } int trap_Key_GetCatcher( void ) { return syscall( CG_KEY_GETCATCHER ); } void trap_Key_SetCatcher( int catcher ) { syscall( CG_KEY_SETCATCHER, catcher ); } int trap_Key_GetKey( const char *binding ) { return syscall( CG_KEY_GETKEY, binding ); } int trap_PC_AddGlobalDefine( char *define ) { return syscall( CG_PC_ADD_GLOBAL_DEFINE, define ); } int trap_PC_LoadSource( const char *filename ) { return syscall( CG_PC_LOAD_SOURCE, filename ); } int trap_PC_FreeSource( int handle ) { return syscall( CG_PC_FREE_SOURCE, handle ); } int trap_PC_ReadToken( int handle, pc_token_t *pc_token ) { return syscall( CG_PC_READ_TOKEN, handle, pc_token ); } int trap_PC_SourceFileAndLine( int handle, char *filename, int *line ) { return syscall( CG_PC_SOURCE_FILE_AND_LINE, handle, filename, line ); } int trap_PC_LoadGlobalDefines ( const char* filename ) { return syscall ( CG_PC_LOAD_GLOBAL_DEFINES, filename ); } void trap_PC_RemoveAllGlobalDefines ( void ) { syscall ( CG_PC_REMOVE_ALL_GLOBAL_DEFINES ); } void trap_S_StopBackgroundTrack( void ) { syscall( CG_S_STOPBACKGROUNDTRACK ); } int trap_RealTime(qtime_t *qtime) { return syscall( CG_REAL_TIME, qtime ); } void trap_SnapVector( float *v ) { syscall( CG_SNAPVECTOR, v ); } // this returns a handle. arg0 is the name in the format "idlogo.roq", set arg1 to NULL, alteredstates to qfalse (do not alter gamestate) int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits) { return syscall(CG_CIN_PLAYCINEMATIC, arg0, xpos, ypos, width, height, bits); } // stops playing the cinematic and ends it. should always return FMV_EOF // cinematics must be stopped in reverse order of when they are started e_status trap_CIN_StopCinematic(int handle) { return syscall(CG_CIN_STOPCINEMATIC, handle); } // will run a frame of the cinematic but will not draw it. Will return FMV_EOF if the end of the cinematic has been reached. e_status trap_CIN_RunCinematic (int handle) { return syscall(CG_CIN_RUNCINEMATIC, handle); } // draws the current frame void trap_CIN_DrawCinematic (int handle) { syscall(CG_CIN_DRAWCINEMATIC, handle); } // allows you to resize the animation dynamically void trap_CIN_SetExtents (int handle, int x, int y, int w, int h) { syscall(CG_CIN_SETEXTENTS, handle, x, y, w, h); } qboolean trap_GetEntityToken( char *buffer, int bufferSize ) { return syscall( CG_GET_ENTITY_TOKEN, buffer, bufferSize ); } qboolean trap_R_inPVS( const vec3_t p1, const vec3_t p2, byte *mask ) { return syscall( CG_R_INPVS, p1, p2, mask ); } int trap_FX_RegisterEffect(const char *file) { return syscall( CG_FX_REGISTER_EFFECT, file); } void trap_FX_PlayEffect( const char *file, vec3_t org, vec3_t fwd, int vol, int rad ) { syscall( CG_FX_PLAY_EFFECT, file, org, fwd, vol, rad); } void trap_FX_PlayEntityEffect( const char *file, vec3_t org, vec3_t axis[3], const int boltInfo, const int entNum, int vol, int rad ) { syscall( CG_FX_PLAY_ENTITY_EFFECT, file, org, axis, boltInfo, entNum, vol, rad ); } void trap_FX_PlayEffectID( int id, vec3_t org, vec3_t fwd, int vol, int rad ) { syscall( CG_FX_PLAY_EFFECT_ID, id, org, fwd, vol, rad ); } void trap_FX_PlayPortalEffectID( int id, vec3_t org, vec3_t fwd, int vol, int rad ) { syscall( CG_FX_PLAY_PORTAL_EFFECT_ID, id, org, fwd); } void trap_FX_PlayEntityEffectID( int id, vec3_t org, vec3_t axis[3], const int boltInfo, const int entNum, int vol, int rad ) { syscall( CG_FX_PLAY_ENTITY_EFFECT_ID, id, org, axis, boltInfo, entNum, vol, rad ); } void trap_FX_PlayBoltedEffectID( int id, vec3_t org, void *ghoul2, const int boltNum, const int entNum, const int modelNum, int iLooptime, qboolean isRelative ) { syscall( CG_FX_PLAY_BOLTED_EFFECT_ID, id, org, ghoul2, boltNum, entNum, modelNum, iLooptime, isRelative ); } void trap_FX_AddScheduledEffects( qboolean skyPortal ) { syscall( CG_FX_ADD_SCHEDULED_EFFECTS, skyPortal ); } void trap_FX_Draw2DEffects ( float screenXScale, float screenYScale ) { syscall( CG_FX_DRAW_2D_EFFECTS, PASSFLOAT(screenXScale), PASSFLOAT(screenYScale) ); } int trap_FX_InitSystem( refdef_t* refdef ) { return syscall( CG_FX_INIT_SYSTEM, refdef ); } void trap_FX_SetRefDef( refdef_t* refdef ) { syscall( CG_FX_SET_REFDEF, refdef ); } qboolean trap_FX_FreeSystem( void ) { return syscall( CG_FX_FREE_SYSTEM ); } void trap_FX_Reset ( void ) { syscall ( CG_FX_RESET ); } void trap_FX_AdjustTime( int time ) { syscall( CG_FX_ADJUST_TIME, time ); } void trap_FX_AddPoly( addpolyArgStruct_t *p ) { syscall( CG_FX_ADDPOLY, p ); } void trap_FX_AddBezier( addbezierArgStruct_t *p ) { syscall( CG_FX_ADDBEZIER, p ); } void trap_FX_AddPrimitive( effectTrailArgStruct_t *p ) { syscall( CG_FX_ADDPRIMITIVE, p ); } void trap_FX_AddSprite( addspriteArgStruct_t *p ) { syscall( CG_FX_ADDSPRITE, p ); } void trap_FX_AddElectricity( addElectricityArgStruct_t *p ) { syscall( CG_FX_ADDELECTRICITY, p ); } //void trap_SP_Print(const unsigned ID, byte *Data) //{ // syscall( CG_SP_PRINT, ID, Data); //} int trap_SP_GetStringTextString(const char *text, char *buffer, int bufferLength) { return syscall( CG_SP_GETSTRINGTEXTSTRING, text, buffer, bufferLength ); } qboolean trap_ROFF_Clean( void ) { return syscall( CG_ROFF_CLEAN ); } void trap_ROFF_UpdateEntities( void ) { syscall( CG_ROFF_UPDATE_ENTITIES ); } int trap_ROFF_Cache( char *file ) { return syscall( CG_ROFF_CACHE, file ); } qboolean trap_ROFF_Play( int entID, int roffID, qboolean doTranslation ) { return syscall( CG_ROFF_PLAY, entID, roffID, doTranslation ); } qboolean trap_ROFF_Purge_Ent( int entID ) { return syscall( CG_ROFF_PURGE_ENT, entID ); } //rww - dynamic vm memory allocation! void trap_TrueMalloc(void **ptr, int size) { syscall(CG_TRUEMALLOC, ptr, size); } void trap_TrueFree(void **ptr) { syscall(CG_TRUEFREE, ptr); } /* Ghoul2 Insert Start */ // CG Specific API calls void trap_G2_ListModelSurfaces(void *ghlInfo) { syscall( CG_G2_LISTSURFACES, ghlInfo); } void trap_G2_ListModelBones(void *ghlInfo, int frame) { syscall( CG_G2_LISTBONES, ghlInfo, frame); } void trap_G2_SetGhoul2ModelIndexes(void *ghoul2, qhandle_t *modelList, qhandle_t *skinList) { syscall( CG_G2_SETMODELS, ghoul2, modelList, skinList); } qboolean trap_G2_HaveWeGhoul2Models(void *ghoul2) { return (qboolean)(syscall(CG_G2_HAVEWEGHOULMODELS, ghoul2)); } qboolean trap_G2API_GetBoltMatrix(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) { return (qboolean)(syscall(CG_G2_GETBOLT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); } qboolean trap_G2API_GetBoltMatrix_NoReconstruct(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) { //Same as above but force it to not reconstruct the skeleton before getting the bolt position return (qboolean)(syscall(CG_G2_GETBOLT_NOREC, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); } qboolean trap_G2API_GetBoltMatrix_NoRecNoRot(void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) { //Same as above but force it to not reconstruct the skeleton before getting the bolt position return (qboolean)(syscall(CG_G2_GETBOLT_NOREC_NOROT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale)); } int trap_G2API_InitGhoul2Model(void **ghoul2Ptr, const char *fileName, int modelIndex, qhandle_t customSkin, qhandle_t customShader, int modelFlags, int lodBias) { return syscall(CG_G2_INITGHOUL2MODEL, ghoul2Ptr, fileName, modelIndex, customSkin, customShader, modelFlags, lodBias); } qboolean trap_G2API_SetSkin(void *ghoul2, int modelIndex, qhandle_t customSkin, qhandle_t renderSkin) { return syscall(CG_G2_SETSKIN, ghoul2, modelIndex, customSkin, renderSkin); } void trap_G2API_CollisionDetect ( CollisionRecord_t *collRecMap, void* ghoul2, const vec3_t angles, const vec3_t position, int frameNumber, int entNum, const vec3_t rayStart, const vec3_t rayEnd, const vec3_t scale, int traceFlags, int useLod, float fRadius ) { syscall ( CG_G2_COLLISIONDETECT, collRecMap, ghoul2, angles, position, frameNumber, entNum, rayStart, rayEnd, scale, traceFlags, useLod, PASSFLOAT(fRadius) ); } void trap_G2API_CollisionDetectCache ( CollisionRecord_t *collRecMap, void* ghoul2, const vec3_t angles, const vec3_t position, int frameNumber, int entNum, const vec3_t rayStart, const vec3_t rayEnd, const vec3_t scale, int traceFlags, int useLod, float fRadius ) { syscall ( CG_G2_COLLISIONDETECTCACHE, collRecMap, ghoul2, angles, position, frameNumber, entNum, rayStart, rayEnd, scale, traceFlags, useLod, PASSFLOAT(fRadius) ); } void trap_G2API_CleanGhoul2Models(void **ghoul2Ptr) { syscall(CG_G2_CLEANMODELS, ghoul2Ptr); } qboolean trap_G2API_SetBoneAngles(void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, const int up, const int right, const int forward, qhandle_t *modelList, int blendTime , int currentTime ) { return (syscall(CG_G2_ANGLEOVERRIDE, ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, blendTime, currentTime)); } qboolean trap_G2API_SetBoneAnim(void *ghoul2, const int modelIndex, const char *boneName, const int startFrame, const int endFrame, const int flags, const float animSpeed, const int currentTime, const float setFrame , const int blendTime ) { return syscall(CG_G2_PLAYANIM, ghoul2, modelIndex, boneName, startFrame, endFrame, flags, PASSFLOAT(animSpeed), currentTime, PASSFLOAT(setFrame), blendTime); } qboolean trap_G2API_GetBoneAnim(void *ghoul2, const char *boneName, const int currentTime, float *currentFrame, int *startFrame, int *endFrame, int *flags, float *animSpeed, int *modelList, const int modelIndex) { return syscall(CG_G2_GETBONEANIM, ghoul2, boneName, currentTime, currentFrame, startFrame, endFrame, flags, animSpeed, modelList, modelIndex); } qboolean trap_G2API_GetBoneFrame(void *ghoul2, const char *boneName, const int currentTime, float *currentFrame, int *modelList, const int modelIndex) { return syscall(CG_G2_GETBONEFRAME, ghoul2, boneName, currentTime, currentFrame, modelList, modelIndex); } void trap_G2API_GetGLAName(void *ghoul2, int modelIndex, char *fillBuf) { syscall(CG_G2_GETGLANAME, ghoul2, modelIndex, fillBuf); } int trap_G2API_CopyGhoul2Instance(void *g2From, void *g2To, int modelIndex) { return syscall(CG_G2_COPYGHOUL2INSTANCE, g2From, g2To, modelIndex); } void trap_G2API_CopySpecificGhoul2Model(void *g2From, int modelFrom, void *g2To, int modelTo) { syscall(CG_G2_COPYSPECIFICGHOUL2MODEL, g2From, modelFrom, g2To, modelTo); } void trap_G2API_DuplicateGhoul2Instance(void *g2From, void **g2To) { syscall(CG_G2_DUPLICATEGHOUL2INSTANCE, g2From, g2To); } qboolean trap_G2API_HasGhoul2ModelOnIndex(void *ghlInfo, int modelIndex) { return syscall(CG_G2_HASGHOUL2MODELONINDEX, ghlInfo, modelIndex); } qboolean trap_G2API_RemoveGhoul2Model(void *ghlInfo, int modelIndex) { return syscall(CG_G2_REMOVEGHOUL2MODEL, ghlInfo, modelIndex); } qboolean trap_G2API_SkinlessModel(void *ghlInfo, int modelIndex) { return syscall(CG_G2_SKINLESSMODEL, ghlInfo, modelIndex); } int trap_G2API_GetNumGoreMarks(void *ghlInfo, int modelIndex) { return syscall(CG_G2_GETNUMGOREMARKS, ghlInfo, modelIndex); } void trap_G2API_AddSkinGore(void *ghlInfo,SSkinGoreData *gore) { syscall(CG_G2_ADDSKINGORE, ghlInfo, gore); } void trap_G2API_ClearSkinGore ( void* ghlInfo ) { syscall(CG_G2_CLEARSKINGORE, ghlInfo ); } int trap_G2API_Ghoul2Size ( void* ghlInfo ) { return syscall(CG_G2_SIZE, ghlInfo ); } int trap_G2API_AddBolt(void *ghoul2, int modelIndex, const char *boneName) { return syscall(CG_G2_ADDBOLT, ghoul2, modelIndex, boneName); } qboolean trap_G2API_AttachEnt(int *boltInfo, void *ghlInfoTo, int toBoltIndex, int entNum, int toModelNum) { return syscall(CG_G2_ATTACHENT, boltInfo, ghlInfoTo, toBoltIndex, entNum, toModelNum); } void trap_G2API_SetBoltInfo(void *ghoul2, int modelIndex, int boltInfo) { syscall(CG_G2_SETBOLTON, ghoul2, modelIndex, boltInfo); } qboolean trap_G2API_SetRootSurface(void *ghoul2, const int modelIndex, const char *surfaceName) { return syscall(CG_G2_SETROOTSURFACE, ghoul2, modelIndex, surfaceName); } qboolean trap_G2API_SetSurfaceOnOff(void *ghoul2, const char *surfaceName, const int flags) { return syscall(CG_G2_SETSURFACEONOFF, ghoul2, surfaceName, flags); } qboolean trap_G2API_SetNewOrigin(void *ghoul2, const int boltIndex) { return syscall(CG_G2_SETNEWORIGIN, ghoul2, boltIndex); } //check if a bone exists on skeleton without actually adding to the bone list -rww qboolean trap_G2API_DoesBoneExist(void *ghoul2, int modelIndex, const char *boneName) { return syscall(CG_G2_DOESBONEEXIST, ghoul2, modelIndex, boneName); } int trap_G2API_GetSurfaceRenderStatus(void *ghoul2, const int modelIndex, const char *surfaceName) { return syscall(CG_G2_GETSURFACERENDERSTATUS, ghoul2, modelIndex, surfaceName); } int trap_G2API_GetTime(void) { return syscall(CG_G2_GETTIME); } void trap_G2API_SetTime(int time, int clock) { syscall(CG_G2_SETTIME, time, clock); } //hack for smoothing during ugly situations. forgive me. void trap_G2API_AbsurdSmoothing(void *ghoul2, qboolean status) { syscall(CG_G2_ABSURDSMOOTHING, ghoul2, status); } //rww - RAGDOLL_BEGIN void trap_G2API_SetRagDoll(void *ghoul2, sharedRagDollParams_t *params) { syscall(CG_G2_SETRAGDOLL, ghoul2, params); } void trap_G2API_AnimateG2Models(void *ghoul2, int time, sharedRagDollUpdateParams_t *params) { syscall(CG_G2_ANIMATEG2MODELS, ghoul2, time, params); } //rww - RAGDOLL_END //additional ragdoll options -rww qboolean trap_G2API_RagPCJConstraint(void *ghoul2, const char *boneName, vec3_t min, vec3_t max) //override default pcj bonee constraints { return syscall(CG_G2_RAGPCJCONSTRAINT, ghoul2, boneName, min, max); } qboolean trap_G2API_RagPCJGradientSpeed(void *ghoul2, const char *boneName, const float speed) //override the default gradient movespeed for a pcj bone { return syscall(CG_G2_RAGPCJGRADIENTSPEED, ghoul2, boneName, PASSFLOAT(speed)); } qboolean trap_G2API_RagEffectorGoal(void *ghoul2, const char *boneName, vec3_t pos) //override an effector bone's goal position (world coordinates) { return syscall(CG_G2_RAGEFFECTORGOAL, ghoul2, boneName, pos); } qboolean trap_G2API_GetRagBonePos(void *ghoul2, const char *boneName, vec3_t pos, vec3_t entAngles, vec3_t entPos, vec3_t entScale) //current position of said bone is put into pos (world coordinates) { return syscall(CG_G2_GETRAGBONEPOS, ghoul2, boneName, pos, entAngles, entPos, entScale); } qboolean trap_G2API_RagEffectorKick(void *ghoul2, const char *boneName, vec3_t velocity) //add velocity to a rag bone { return syscall(CG_G2_RAGEFFECTORKICK, ghoul2, boneName, velocity); } qboolean trap_G2API_RagForceSolve(void *ghoul2, qboolean force) //make sure we are actively performing solve/settle routines, if desired { return syscall(CG_G2_RAGFORCESOLVE, ghoul2, force); } qboolean trap_G2API_SetBoneIKState(void *ghoul2, int time, const char *boneName, int ikState, sharedSetBoneIKStateParams_t *params) { return syscall(CG_G2_SETBONEIKSTATE, ghoul2, time, boneName, ikState, params); } qboolean trap_G2API_IKMove(void *ghoul2, int time, sharedIKMoveParams_t *params) { return syscall(CG_G2_IKMOVE, ghoul2, time, params); } qboolean trap_G2API_RemoveBone(void *ghoul2, const char *boneName, int modelIndex) { return syscall(CG_G2_REMOVEBONE, ghoul2, boneName, modelIndex); } //rww - Stuff to allow association of ghoul2 instances to entity numbers. //This way, on listen servers when both the client and server are doing //ghoul2 operations, we can copy relevant data off the client instance //directly onto the server instance and slash the transforms and whatnot //right in half. void trap_G2API_AttachInstanceToEntNum(void *ghoul2, int entityNum, qboolean server) { syscall(CG_G2_ATTACHINSTANCETOENTNUM, ghoul2, entityNum, server); } void trap_G2API_ClearAttachedInstance(int entityNum) { syscall(CG_G2_CLEARATTACHEDINSTANCE, entityNum); } void trap_G2API_CleanEntAttachments(void) { syscall(CG_G2_CLEANENTATTACHMENTS); } qboolean trap_G2API_OverrideServer(void *serverInstance) { return syscall(CG_G2_OVERRIDESERVER, serverInstance); } void trap_G2API_GetSurfaceName(void *ghoul2, int surfNumber, int modelIndex, char *fillBuf) { syscall(CG_G2_GETSURFACENAME, ghoul2, surfNumber, modelIndex, fillBuf); } void trap_CG_RegisterSharedMemory(char *memory) { syscall(CG_SET_SHARED_BUFFER, memory); } int trap_CM_RegisterTerrain(const char *config) { //rwwRMG - added [NEWTRAP] return syscall(CG_CM_REGISTER_TERRAIN, config); } void trap_RMG_Init(int terrainID, const char *terrainInfo) { //rwwRMG - added [NEWTRAP] syscall(CG_RMG_INIT, terrainID, terrainInfo); } void trap_RE_InitRendererTerrain( const char *info ) { //rwwRMG - added [NEWTRAP] syscall(CG_RE_INIT_RENDERER_TERRAIN, info); } void trap_R_WeatherContentsOverride( int contents ) { //rwwRMG - added [NEWTRAP] syscall(CG_R_WEATHER_CONTENTS_OVERRIDE, contents); } void trap_R_WorldEffectCommand(const char *cmd) { syscall(CG_R_WORLDEFFECTCOMMAND, cmd); } void trap_WE_AddWeatherZone( const vec3_t mins, const vec3_t maxs ) { syscall( CG_WE_ADDWEATHERZONE, mins, maxs ); } /* Ghoul2 Insert End */ #include "../namespace_end.h"
{ "pile_set_name": "Github" }
{ "images": [ { "filename": "ic_enhanced_encryption.png", "idiom": "universal", "scale": "1x" }, { "filename": "ic_enhanced_encryption_2x.png", "idiom": "universal", "scale": "2x" }, { "filename": "ic_enhanced_encryption_3x.png", "idiom": "universal", "scale": "3x" } ], "info": { "author": "xcode", "version": 1 } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012, Michael Lehn * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1) Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2) Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3) Neither the name of the FLENS development group nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Based on * SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) * * -- LAPACK driver routine (version 3.2) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * November 2006 */ #ifndef FLENS_LAPACK_GE_SV_TCC #define FLENS_LAPACK_GE_SV_TCC 1 #include <flens/blas/blas.h> #include <flens/lapack/lapack.h> namespace flens { namespace lapack { //== generic lapack implementation ============================================= namespace generic { //-- (ge)sv [real and compelx variant] ----------------------------------------- template <typename MA, typename VPIV, typename MB> typename GeMatrix<MA>::IndexType sv_impl(GeMatrix<MA> &A, DenseVector<VPIV> &piv, GeMatrix<MB> &B) { typedef typename GeMatrix<MA>::IndexType IndexType; IndexType info = 0; // // Compute the LU factorization of A. // info = trf(A, piv); if (info==0) { // // Solve the system A*X = B, overwriting B with X. // trs(NoTrans, A, piv, B); } return info; } } // namespace generic //== interface for native lapack =============================================== #ifdef USE_CXXLAPACK namespace external { //-- (ge)sv [real and complex variant] ----------------------------------------- template <typename MA, typename VPIV, typename MB> typename GeMatrix<MA>::IndexType sv_impl(GeMatrix<MA> &A, DenseVector<VPIV> &piv, GeMatrix<MB> &B) { typedef typename GeMatrix<MA>::IndexType IndexType; IndexType info = cxxlapack::gesv<IndexType>(A.numRows(), B.numCols(), A.data(), A.leadingDimension(), piv.data(), B.data(), B.leadingDimension()); ASSERT(info>=0); return info; } } // namespace external #endif // USE_CXXLAPACK //== public interface ========================================================== //-- (ge)sv [real and complex variant] ----------------------------------------- template <typename MA, typename VPIV, typename MB> typename RestrictTo<IsGeMatrix<MA>::value && IsIntegerDenseVector<VPIV>::value && IsGeMatrix<MB>::value, typename RemoveRef<MA>::Type::IndexType>::Type sv(MA &&A, VPIV &&piv, MB &&B) { LAPACK_DEBUG_OUT("(ge)sv [real/complex]"); // // Remove references from rvalue types // typedef typename RemoveRef<MA>::Type MatrixA; typedef typename MatrixA::IndexType IndexType; # ifdef CHECK_CXXLAPACK typedef typename RemoveRef<VPIV>::Type VectorPiv; typedef typename RemoveRef<MB>::Type MatrixB; # endif // // Test the input parameters // # ifndef NDEBUG ASSERT(A.firstRow()==1); ASSERT(A.firstCol()==1); ASSERT(A.numRows()==A.numCols()); ASSERT((piv.inc()>0 && piv.firstIndex()==1) || (piv.inc()<0 && piv.firstIndex()==A.numRows())); ASSERT(B.firstRow()==1); ASSERT(B.firstCol()==1); ASSERT(B.numRows()==A.numRows()); # endif // // Resize output arguments if they are empty // if (piv.length()==0) { piv.resize(A.numRows(), 1); } ASSERT(piv.length()==A.numRows()); # ifdef CHECK_CXXLAPACK // // Make copies of output arguments // typename MatrixA::NoView A_org = A; typename VectorPiv::NoView piv_org = piv; typename MatrixB::NoView B_org = B; # endif // // Call implementation // IndexType info = LAPACK_SELECT::sv_impl(A, piv, B); # ifdef CHECK_CXXLAPACK // // Compare results // typename MatrixA::NoView A_generic = A; typename VectorPiv::NoView piv_generic = piv; typename MatrixB::NoView B_generic = B; A = A_org; piv = piv_org; B = B_org; IndexType info_ = external::sv_impl(A, piv, B); bool failed = false; if (! isIdentical(A_generic, A, "A_generic", "A")) { std::cerr << "A_org = " << A_org << std::endl; std::cerr << "CXXLAPACK: A_generic = " << A_generic << std::endl; std::cerr << "F77LAPACK: A = " << A << std::endl; failed = true; } if (! isIdentical(piv_generic, piv, "piv_generic", "piv")) { std::cerr << "piv_org = " << piv_org << std::endl; std::cerr << "CXXLAPACK: piv_generic = " << piv_generic << std::endl; std::cerr << "F77LAPACK: piv = " << piv << std::endl; failed = true; } if (! isIdentical(B_generic, B, "B_generic", "B")) { std::cerr << "B_org = " << B_org << std::endl; std::cerr << "CXXLAPACK: B_generic = " << B_generic << std::endl; std::cerr << "F77LAPACK: B = " << B << std::endl; failed = true; } if (! isIdentical(info, info_, " info", "info_")) { std::cerr << "CXXLAPACK: info = " << info << std::endl; std::cerr << "F77LAPACK: info_ = " << info_ << std::endl; failed = true; } if (failed) { ASSERT(0); } # endif return info; } //-- (ge)sv [variant if rhs is vector] ----------------------------------------- template <typename MA, typename VPIV, typename VB> typename RestrictTo<IsGeMatrix<MA>::value && IsIntegerDenseVector<VPIV>::value && IsDenseVector<VB>::value, typename RemoveRef<MA>::Type::IndexType>::Type sv(MA &&A, VPIV &&piv, VB &&b) { // // Remove references from rvalue types // typedef typename RemoveRef<MA>::Type MatrixA; typedef typename RemoveRef<VB>::Type VectorB; typedef typename VectorB::ElementType ElementType; typedef typename VectorB::IndexType IndexType; const IndexType n = b.length(); const StorageOrder order = MatrixA::Engine::order; GeMatrix<FullStorageView<ElementType, order> > B(n, 1, b, n); return sv(A, piv, B); } } } // namespace lapack, flens #endif // FLENS_LAPACK_GE_SV_TCC
{ "pile_set_name": "Github" }
/* eslint camelcase: 0 */ import axios from "axios"; const tokenConfig = token => ({ headers: { Authorization: token // eslint-disable-line quote-props } }); export function validate_token(token) { return axios.post("/api/is_token_valid", { token }); } export function create_user(first_name, last_name, email, password) { return axios.post("/api/create_user", { first_name, last_name, email, password }); } export function get_token(email, password) { return axios.post("/api/get_token", { email, password }); } export function data_about_user(token) { return axios.get("/api/user", tokenConfig(token)); } export function store_task(token, user_id, task, status) { return axios.post("/api/submit_task", { task, user_id, status }, tokenConfig(token)); } export function delete_task(token, task_id) { return axios.post("/api/delete_task", { task_id }, tokenConfig(token)); } export function edit_task(token, task_id, task, status) { return axios.post("/api/edit_task", { task_id, task, status }, tokenConfig(token)); }
{ "pile_set_name": "Github" }
--- - !ruby/object:MIME::Type content-type: text/1d-interleaved-parityfec encoding: quoted-printable xrefs: rfc: - rfc6015 template: - text/1d-interleaved-parityfec registered: true - !ruby/object:MIME::Type content-type: text/cache-manifest encoding: quoted-printable extensions: - appcache - manifest xrefs: person: - Robin_Berjon - W3C template: - text/cache-manifest registered: true - !ruby/object:MIME::Type content-type: text/calendar friendly: en: iCalendar encoding: quoted-printable extensions: - ics - ifb xrefs: rfc: - rfc5545 template: - text/calendar registered: true - !ruby/object:MIME::Type content-type: text/comma-separated-values encoding: 8bit extensions: - csv obsolete: true use-instead: text/csv registered: false - !ruby/object:MIME::Type content-type: text/css friendly: en: Cascading Style Sheets (CSS) encoding: 8bit extensions: - css xrefs: rfc: - rfc2318 template: - text/css registered: true - !ruby/object:MIME::Type content-type: text/csv friendly: en: Comma-Separated Values encoding: 8bit extensions: - csv xrefs: rfc: - rfc4180 - rfc7111 template: - text/csv registered: true - !ruby/object:MIME::Type content-type: text/csv-schema encoding: quoted-printable xrefs: person: - David_Underdown - National_Archives_UK template: - text/csv-schema registered: true - !ruby/object:MIME::Type content-type: text/directory encoding: quoted-printable obsolete: true xrefs: rfc: - rfc2425 - rfc6350 template: - text/directory notes: - "- DEPRECATED by RFC6350" registered: true - !ruby/object:MIME::Type content-type: text/dns encoding: quoted-printable xrefs: rfc: - rfc4027 template: - text/dns registered: true - !ruby/object:MIME::Type content-type: text/ecmascript encoding: quoted-printable extensions: - es - ecma obsolete: true use-instead: application/ecmascript xrefs: rfc: - rfc4329 template: - text/ecmascript notes: - "- OBSOLETED in favor of application/ecmascript" registered: true - !ruby/object:MIME::Type content-type: text/encaprtp encoding: quoted-printable xrefs: rfc: - rfc6849 template: - text/encaprtp registered: true - !ruby/object:MIME::Type content-type: text/enriched encoding: quoted-printable xrefs: rfc: - rfc1896 registered: true - !ruby/object:MIME::Type content-type: text/example encoding: quoted-printable xrefs: rfc: - rfc4735 template: - text/example registered: true - !ruby/object:MIME::Type content-type: text/flexfec encoding: quoted-printable xrefs: rfc: - rfc8627 template: - text/flexfec registered: true - !ruby/object:MIME::Type content-type: text/fwdred encoding: quoted-printable xrefs: rfc: - rfc6354 template: - text/fwdred registered: true - !ruby/object:MIME::Type content-type: text/grammar-ref-list encoding: quoted-printable xrefs: rfc: - rfc6787 template: - text/grammar-ref-list registered: true - !ruby/object:MIME::Type content-type: text/html friendly: en: HyperText Markup Language (HTML) encoding: 8bit extensions: - html - htm - htmlx - shtml - htx xrefs: person: - Robin_Berjon - W3C template: - text/html registered: true - !ruby/object:MIME::Type content-type: text/javascript encoding: quoted-printable extensions: - js - mjs obsolete: true use-instead: application/javascript xrefs: rfc: - rfc4329 template: - text/javascript notes: - "- OBSOLETED in favor of application/javascript" registered: true - !ruby/object:MIME::Type content-type: text/jcr-cnd encoding: quoted-printable xrefs: person: - Peeter_Piegaze template: - text/jcr-cnd registered: true - !ruby/object:MIME::Type content-type: text/markdown encoding: quoted-printable extensions: - markdown - md - mkd xrefs: rfc: - rfc7763 template: - text/markdown registered: true - !ruby/object:MIME::Type content-type: text/mizar encoding: quoted-printable xrefs: person: - Jesse_Alama template: - text/mizar registered: true - !ruby/object:MIME::Type content-type: text/n3 friendly: en: Notation3 encoding: quoted-printable extensions: - n3 xrefs: person: - Eric_Prudhommeaux - W3C template: - text/n3 registered: true - !ruby/object:MIME::Type content-type: text/parameters encoding: quoted-printable xrefs: rfc: - rfc7826 template: - text/parameters registered: true - !ruby/object:MIME::Type content-type: text/parityfec encoding: quoted-printable xrefs: rfc: - rfc5109 registered: true - !ruby/object:MIME::Type content-type: text/plain friendly: en: Text File encoding: quoted-printable extensions: - txt - asc - c - cc - h - hh - cpp - hpp - dat - hlp - conf - def - doc - in - list - log - rst - text - textile xrefs: rfc: - rfc2046 - rfc3676 - rfc5147 registered: true - !ruby/object:MIME::Type content-type: text/provenance-notation encoding: quoted-printable xrefs: person: - Ivan_Herman - W3C template: - text/provenance-notation registered: true - !ruby/object:MIME::Type content-type: text/prs.fallenstein.rst encoding: quoted-printable extensions: - rst xrefs: person: - Benja_Fallenstein template: - text/prs.fallenstein.rst registered: true - !ruby/object:MIME::Type content-type: text/prs.lines.tag friendly: en: PRS Lines Tag encoding: quoted-printable extensions: - dsc xrefs: person: - John_Lines template: - text/prs.lines.tag registered: true - !ruby/object:MIME::Type content-type: text/prs.prop.logic encoding: quoted-printable xrefs: person: - Hans-Dieter_A._Hiep template: - text/prs.prop.logic registered: true - !ruby/object:MIME::Type content-type: text/raptorfec encoding: quoted-printable xrefs: rfc: - rfc6682 template: - text/raptorfec registered: true - !ruby/object:MIME::Type content-type: text/RED encoding: quoted-printable xrefs: rfc: - rfc4102 template: - text/RED registered: true - !ruby/object:MIME::Type content-type: text/rfc822-headers encoding: quoted-printable xrefs: rfc: - rfc6522 template: - text/rfc822-headers registered: true - !ruby/object:MIME::Type content-type: text/richtext friendly: en: Rich Text Format (RTF) encoding: 8bit extensions: - rtx xrefs: rfc: - rfc2045 - rfc2046 registered: true - !ruby/object:MIME::Type content-type: text/rtf encoding: 8bit extensions: - rtf xrefs: person: - Paul_Lindner template: - text/rtf registered: true - !ruby/object:MIME::Type content-type: text/rtp-enc-aescm128 encoding: quoted-printable xrefs: person: - _3GPP template: - text/rtp-enc-aescm128 registered: true - !ruby/object:MIME::Type content-type: text/rtploopback encoding: quoted-printable xrefs: rfc: - rfc6849 template: - text/rtploopback registered: true - !ruby/object:MIME::Type content-type: text/rtx encoding: quoted-printable xrefs: rfc: - rfc4588 template: - text/rtx registered: true - !ruby/object:MIME::Type content-type: text/sgml friendly: en: Standard Generalized Markup Language (SGML) encoding: quoted-printable extensions: - sgml - sgm xrefs: rfc: - rfc1874 template: - text/SGML registered: true - !ruby/object:MIME::Type content-type: text/spdx encoding: quoted-printable xrefs: person: - Linux_Foundation - Rose_Judge template: - text/spdx registered: true - !ruby/object:MIME::Type content-type: text/strings encoding: quoted-printable xrefs: person: - IEEE-ISTO-PWG-PPP template: - text/strings registered: true - !ruby/object:MIME::Type content-type: text/t140 encoding: quoted-printable xrefs: rfc: - rfc4103 template: - text/t140 registered: true - !ruby/object:MIME::Type content-type: text/tab-separated-values friendly: en: Tab Separated Values encoding: quoted-printable extensions: - tsv xrefs: person: - Paul_Lindner template: - text/tab-separated-values registered: true - !ruby/object:MIME::Type content-type: text/troff friendly: en: troff encoding: 8bit extensions: - t - tr - roff - troff - man - me - ms xrefs: rfc: - rfc4263 template: - text/troff registered: true - !ruby/object:MIME::Type content-type: text/turtle friendly: en: Turtle (Terse RDF Triple Language) encoding: quoted-printable extensions: - ttl xrefs: person: - Eric_Prudhommeaux - W3C template: - text/turtle registered: true - !ruby/object:MIME::Type content-type: text/ulpfec encoding: quoted-printable xrefs: rfc: - rfc5109 template: - text/ulpfec registered: true - !ruby/object:MIME::Type content-type: text/uri-list friendly: en: URI Resolution Services encoding: quoted-printable extensions: - uri - uris - urls xrefs: rfc: - rfc2483 template: - text/uri-list registered: true - !ruby/object:MIME::Type content-type: text/vcard encoding: quoted-printable extensions: - vcard xrefs: rfc: - rfc6350 template: - text/vcard registered: true signature: true - !ruby/object:MIME::Type content-type: text/vnd.a encoding: quoted-printable xrefs: person: - Regis_Dehoux template: - text/vnd.a registered: true - !ruby/object:MIME::Type content-type: text/vnd.abc encoding: quoted-printable xrefs: person: - Steve_Allen template: - text/vnd.abc registered: true - !ruby/object:MIME::Type content-type: text/vnd.ascii-art encoding: quoted-printable xrefs: person: - Kim_Scarborough template: - text/vnd.ascii-art registered: true - !ruby/object:MIME::Type content-type: text/vnd.curl friendly: en: Curl - Applet encoding: quoted-printable extensions: - curl xrefs: person: - Robert_Byrnes template: - text/vnd.curl registered: true - !ruby/object:MIME::Type content-type: text/vnd.curl.dcurl friendly: en: Curl - Detached Applet encoding: quoted-printable extensions: - dcurl registered: false - !ruby/object:MIME::Type content-type: text/vnd.curl.mcurl friendly: en: Curl - Manifest File encoding: quoted-printable extensions: - mcurl registered: false - !ruby/object:MIME::Type content-type: text/vnd.curl.scurl friendly: en: Curl - Source Code encoding: quoted-printable extensions: - scurl registered: false - !ruby/object:MIME::Type content-type: text/vnd.debian.copyright encoding: quoted-printable xrefs: person: - Charles_Plessy template: - text/vnd.debian.copyright registered: true - !ruby/object:MIME::Type content-type: text/vnd.DMClientScript encoding: quoted-printable xrefs: person: - Dan_Bradley template: - text/vnd.DMClientScript registered: true - !ruby/object:MIME::Type content-type: text/vnd.dvb.subtitle encoding: quoted-printable extensions: - sub xrefs: person: - Michael_Lagally - Peter_Siebert template: - text/vnd.dvb.subtitle registered: true - !ruby/object:MIME::Type content-type: text/vnd.esmertec.theme-descriptor encoding: quoted-printable xrefs: person: - Stefan_Eilemann template: - text/vnd.esmertec.theme-descriptor registered: true - !ruby/object:MIME::Type content-type: text/vnd.ficlab.flt encoding: quoted-printable xrefs: person: - Steve_Gilberd template: - text/vnd.ficlab.flt registered: true - !ruby/object:MIME::Type content-type: text/vnd.flatland.3dml encoding: quoted-printable obsolete: true use-instead: model/vnd.flatland.3dml registered: false - !ruby/object:MIME::Type content-type: text/vnd.fly friendly: en: mod_fly / fly.cgi encoding: quoted-printable extensions: - fly xrefs: person: - John-Mark_Gurney template: - text/vnd.fly registered: true - !ruby/object:MIME::Type content-type: text/vnd.fmi.flexstor friendly: en: FLEXSTOR encoding: quoted-printable extensions: - flx xrefs: person: - Kari_E._Hurtta template: - text/vnd.fmi.flexstor registered: true - !ruby/object:MIME::Type content-type: text/vnd.gml encoding: quoted-printable xrefs: person: - Mi_Tar template: - text/vnd.gml registered: true - !ruby/object:MIME::Type content-type: text/vnd.graphviz friendly: en: Graphviz encoding: quoted-printable extensions: - gv xrefs: person: - John_Ellson template: - text/vnd.graphviz registered: true - !ruby/object:MIME::Type content-type: text/vnd.hgl encoding: quoted-printable xrefs: person: - Heungsub_Lee template: - text/vnd.hgl registered: true - !ruby/object:MIME::Type content-type: text/vnd.in3d.3dml friendly: en: In3D - 3DML encoding: quoted-printable extensions: - 3dml xrefs: person: - Michael_Powers template: - text/vnd.in3d.3dml registered: true - !ruby/object:MIME::Type content-type: text/vnd.in3d.spot friendly: en: In3D - 3DML encoding: quoted-printable extensions: - spot xrefs: person: - Michael_Powers template: - text/vnd.in3d.spot registered: true - !ruby/object:MIME::Type content-type: text/vnd.IPTC.NewsML encoding: quoted-printable xrefs: person: - IPTC template: - text/vnd.IPTC.NewsML registered: true - !ruby/object:MIME::Type content-type: text/vnd.IPTC.NITF encoding: quoted-printable xrefs: person: - IPTC template: - text/vnd.IPTC.NITF registered: true - !ruby/object:MIME::Type content-type: text/vnd.latex-z encoding: quoted-printable xrefs: person: - Mikusiak_Lubos template: - text/vnd.latex-z registered: true - !ruby/object:MIME::Type content-type: text/vnd.motorola.reflex encoding: quoted-printable xrefs: person: - Mark_Patton template: - text/vnd.motorola.reflex registered: true - !ruby/object:MIME::Type content-type: text/vnd.ms-mediapackage encoding: quoted-printable xrefs: person: - Jan_Nelson template: - text/vnd.ms-mediapackage registered: true - !ruby/object:MIME::Type content-type: text/vnd.net2phone.commcenter.command encoding: quoted-printable extensions: - ccc xrefs: person: - Feiyu_Xie template: - text/vnd.net2phone.commcenter.command registered: true - !ruby/object:MIME::Type content-type: text/vnd.radisys.msml-basic-layout encoding: quoted-printable xrefs: rfc: - rfc5707 template: - text/vnd.radisys.msml-basic-layout registered: true - !ruby/object:MIME::Type content-type: text/vnd.senx.warpscript encoding: quoted-printable xrefs: person: - Pierre_Papin template: - text/vnd.senx.warpscript registered: true - !ruby/object:MIME::Type content-type: text/vnd.si.uricatalogue encoding: quoted-printable obsolete: true xrefs: person: - Nicholas_Parks_Young template: - text/vnd.si.uricatalogue notes: - "- OBSOLETED by request" registered: true - !ruby/object:MIME::Type content-type: text/vnd.sosi encoding: quoted-printable xrefs: person: - Petter_Reinholdtsen template: - text/vnd.sosi registered: true - !ruby/object:MIME::Type content-type: text/vnd.sun.j2me.app-descriptor friendly: en: J2ME App Descriptor encoding: 8bit extensions: - jad xrefs: person: - Gary_Adams template: - text/vnd.sun.j2me.app-descriptor registered: true - !ruby/object:MIME::Type content-type: text/vnd.trolltech.linguist encoding: quoted-printable xrefs: person: - David_Lee_Lambert template: - text/vnd.trolltech.linguist registered: true - !ruby/object:MIME::Type content-type: text/vnd.wap.si encoding: quoted-printable extensions: - si xrefs: person: - WAP-Forum template: - text/vnd.wap.si registered: true - !ruby/object:MIME::Type content-type: text/vnd.wap.sl encoding: quoted-printable extensions: - sl xrefs: person: - WAP-Forum template: - text/vnd.wap.sl registered: true - !ruby/object:MIME::Type content-type: text/vnd.wap.wml friendly: en: Wireless Markup Language (WML) encoding: quoted-printable extensions: - wml xrefs: person: - Peter_Stark template: - text/vnd.wap.wml registered: true - !ruby/object:MIME::Type content-type: text/vnd.wap.wmlscript friendly: en: Wireless Markup Language Script (WMLScript) encoding: quoted-printable extensions: - wmls xrefs: person: - Peter_Stark template: - text/vnd.wap.wmlscript registered: true - !ruby/object:MIME::Type content-type: text/vtt encoding: quoted-printable xrefs: person: - Silvia_Pfeiffer - W3C template: - text/vtt registered: true - !ruby/object:MIME::Type content-type: text/x-asm friendly: en: Assembler Source File encoding: quoted-printable extensions: - asm - s registered: false - !ruby/object:MIME::Type content-type: text/x-c friendly: en: C Source File encoding: quoted-printable extensions: - c - cc - cpp - cxx - dic - h - hh registered: false - !ruby/object:MIME::Type content-type: text/x-coffescript encoding: 8bit extensions: - coffee registered: false - !ruby/object:MIME::Type content-type: text/x-component encoding: 8bit extensions: - htc registered: false - !ruby/object:MIME::Type content-type: text/x-fortran friendly: en: Fortran Source File encoding: quoted-printable extensions: - f - f77 - f90 - for registered: false - !ruby/object:MIME::Type content-type: text/x-java-source friendly: en: Java Source File encoding: quoted-printable extensions: - java registered: false - !ruby/object:MIME::Type content-type: text/x-nfo encoding: quoted-printable extensions: - nfo registered: false - !ruby/object:MIME::Type content-type: text/x-opml encoding: quoted-printable extensions: - opml registered: false - !ruby/object:MIME::Type content-type: text/x-pascal friendly: en: Pascal Source File encoding: quoted-printable extensions: - p - pas registered: false - !ruby/object:MIME::Type content-type: text/x-rtf encoding: 8bit extensions: - rtf obsolete: true use-instead: text/rtf registered: false - !ruby/object:MIME::Type content-type: text/x-setext friendly: en: Setext encoding: quoted-printable extensions: - etx registered: false - !ruby/object:MIME::Type content-type: text/x-sfv encoding: quoted-printable extensions: - sfv registered: false - !ruby/object:MIME::Type content-type: text/x-uuencode friendly: en: UUEncode encoding: quoted-printable extensions: - uu registered: false - !ruby/object:MIME::Type content-type: text/x-vcalendar friendly: en: vCalendar encoding: 8bit extensions: - vcs registered: false - !ruby/object:MIME::Type content-type: text/x-vcard friendly: en: vCard encoding: 8bit extensions: - vcf registered: false signature: true - !ruby/object:MIME::Type content-type: text/x-vnd.flatland.3dml encoding: quoted-printable obsolete: true use-instead: model/vnd.flatland.3dml registered: false - !ruby/object:MIME::Type content-type: text/x-yaml encoding: 8bit extensions: - yaml - yml registered: false - !ruby/object:MIME::Type content-type: text/xml encoding: 8bit extensions: - xml - dtd - xsd xrefs: rfc: - rfc7303 template: - text/xml registered: true - !ruby/object:MIME::Type content-type: text/xml-external-parsed-entity encoding: quoted-printable xrefs: rfc: - rfc7303 template: - text/xml-external-parsed-entity registered: true
{ "pile_set_name": "Github" }
/* * -------------------------------------------------------------------------- * BLISLAB * -------------------------------------------------------------------------- * Copyright (C) 2016, The University of Texas at Austin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - Neither the name of The University of Texas nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * bl_dgemm.h * * * Purpose: * this header file contains all function prototypes. * * Todo: * * * Modification: * * * */ #ifndef BLISLAB_DGEMM_H #define BLISLAB_DGEMM_H // Allow C++ users to include this header file in their source code. However, // we make the extern "C" conditional on whether we're using a C++ compiler, // since regular C compilers don't understand the extern "C" construct. #ifdef __cplusplus extern "C" { #endif #include <math.h> #include <stdio.h> #include <stdlib.h> // Determine the target operating system #if defined(_WIN32) || defined(__CYGWIN__) #define BL_OS_WINDOWS 1 #elif defined(__APPLE__) || defined(__MACH__) #define BL_OS_OSX 1 #elif defined(__ANDROID__) #define BL_OS_ANDROID 1 #elif defined(__linux__) #define BL_OS_LINUX 1 #elif defined(__bgq__) #define BL_OS_BGQ 1 #elif defined(__bg__) #define BL_OS_BGP 1 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ defined(__bsdi__) || defined(__DragonFly__) #define BL_OS_BSD 1 #else #error "Cannot determine operating system" #endif // gettimeofday() needs this. #if BL_OS_WINDOWS #include <time.h> #elif BL_OS_OSX #include <mach/mach_time.h> #else #include <sys/time.h> #include <time.h> #endif #include "bl_config.h" #define min( i, j ) ( (i)<(j) ? (i): (j) ) #define A( i, j ) A[ (j)*lda + (i) ] #define B( i, j ) B[ (j)*ldb + (i) ] #define C( i, j ) C[ (j)*ldc + (i) ] #define C_ref( i, j ) C_ref[ (j)*ldc_ref + (i) ] struct aux_s { double *b_next; float *b_next_s; int ldr; char *flag; int pc; int m; int n; }; typedef struct aux_s aux_t; void bl_dgemm( int m, int n, int k, double *A, int lda, double *B, int ldb, double *C, int ldc ); double *bl_malloc_aligned( int m, int n, int size ); void bl_printmatrix( double *A, int lda, int m, int n ); double bl_clock( void ); double bl_clock_helper(); void bl_dgemm_ref( int m, int n, int k, double *XA, int lda, double *XB, int ldb, double *XC, int ldc ); // End extern "C" construct block. #ifdef __cplusplus } #endif #endif
{ "pile_set_name": "Github" }
{ "solution": { "path": "All.sln", "projects": [ "AutoFixture\\AutoFixture.csproj", "AutoFixtureUnitTest\\AutoFixtureUnitTest.csproj", "AutoFixture.SeedExtensions\\AutoFixture.SeedExtensions.csproj", "AutoFixture.SeedExtensions.UnitTest\\AutoFixture.SeedExtensions.UnitTest.csproj", "AutoFixtureDocumentationTest\\AutoFixtureDocumentationTest.csproj", "TestTypeFoundation\\TestTypeFoundation.csproj" ] } }
{ "pile_set_name": "Github" }
--- license: > Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. title: File --- [File](fileobj/fileobj.html) ========== > This API is based on the W3C [File API](http://www.w3.org/TR/FileAPI). An API to read, write and navigate file system hierarchies. Objects ------- - [DirectoryEntry](directoryentry/directoryentry.html) - [DirectoryReader](directoryreader/directoryreader.html) - [File](fileobj/fileobj.html) - [FileEntry](fileentry/fileentry.html) - [FileError](fileerror/fileerror.html) - [FileReader](filereader/filereader.html) - [FileSystem](filesystem/filesystem.html) - [FileTransfer](filetransfer/filetransfer.html) - [FileTransferError](filetransfererror/filetransfererror.html) - [FileUploadOptions](fileuploadoptions/fileuploadoptions.html) - [FileUploadResult](fileuploadresult/fileuploadresult.html) - [FileWriter](filewriter/filewriter.html) - [Flags](flags/flags.html) - [LocalFileSystem](localfilesystem/localfilesystem.html) - [Metadata](metadata/metadata.html) Permissions ----------- ### Android #### app/res/xml/config.xml <plugin name="File" value="org.apache.cordova.FileUtils" /> <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer" /> #### app/AndroidManifest.xml <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> ### Bada No permissions are required. ### BlackBerry WebWorks #### www/plugins.xml <plugin name="File" value="org.apache.cordova.file.FileManager" /> <plugin name="FileTransfer" value="org.apache.cordova.http.FileTransfer" /> #### www/config.xml <feature id="blackberry.io.file" required="true" version="1.0.0.0" /> <feature id="blackberry.utils" required="true" version="1.0.0.0" /> <feature id="blackberry.io.dir" required="true" version="1.0.0.0" /> <rim:permissions> <rim:permit>access_shared</rim:permit> </rim:permissions> ### iOS #### config.xml <plugin name="File" value="CDVFile" /> <plugin name="FileTransfer" value="CDVFileTransfer" /> ### webOS No permissions are required. ### Windows Phone No permissions are required.
{ "pile_set_name": "Github" }
#ifndef LIST_H_ #define LIST_H_ #include <string> const int MAX = 10; struct people { std::string name; int age; }; typedef struct people Item; class List { private: Item items[MAX]; int count; public: List(); bool isempty() const; bool isfull() const; int itemcount() const; bool additem(const Item & item); void visit(void (*pf)(Item &)); }; #endif
{ "pile_set_name": "Github" }
using GameObjects; using GameObjects.Conditions; using System; using System.Runtime.Serialization;namespace GameObjects.Conditions.ConditionKindPack { [DataContract]public class ConditionKind1350 : ConditionKind { private int number = 0; public override bool CheckConditionKind(Troop troop) { return ((int) troop.Army.Kind.Type != this.number); } public override void InitializeParameter(string parameter) { try { this.number = int.Parse(parameter); } catch { } } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03"> <data> <int key="IBDocument.SystemTarget">768</int> <string key="IBDocument.SystemVersion">10K549</string> <string key="IBDocument.InterfaceBuilderVersion">677</string> <string key="IBDocument.AppKitVersion">1038.36</string> <string key="IBDocument.HIToolboxVersion">461.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> <integer value="6"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys" id="0"> <bool key="EncodedWithXMLCoder">YES</bool> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBProxyObject" id="372490531"> <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> </object> <object class="IBProxyObject" id="843779117"> <string key="IBProxiedObjectIdentifier">IBFirstResponder</string> </object> <object class="IBUIView" id="774585933"> <reference key="NSNextResponder"/> <int key="NSvFlags">274</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBUIButton" id="263702904"> <reference key="NSNextResponder" ref="774585933"/> <int key="NSvFlags">292</int> <string key="NSFrame">{{72, 71}, {162, 37}}</string> <reference key="NSSuperview" ref="774585933"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClearsContextBeforeDrawing">NO</bool> <int key="IBUIContentHorizontalAlignment">0</int> <int key="IBUIContentVerticalAlignment">0</int> <object class="NSFont" key="IBUIFont" id="705531725"> <string key="NSName">Helvetica-Bold</string> <double key="NSSize">1.500000e+01</double> <int key="NSfFlags">16</int> </object> <int key="IBUIButtonType">1</int> <string key="IBUINormalTitle">Insert</string> <object class="NSColor" key="IBUIHighlightedTitleColor" id="325340037"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MQA</bytes> </object> <object class="NSColor" key="IBUINormalTitleColor"> <int key="NSColorSpace">1</int> <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes> </object> <object class="NSColor" key="IBUINormalTitleShadowColor" id="920308978"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MC41AA</bytes> </object> </object> <object class="IBUIButton" id="422288824"> <reference key="NSNextResponder" ref="774585933"/> <int key="NSvFlags">292</int> <string key="NSFrame">{{77, 145}, {157, 37}}</string> <reference key="NSSuperview" ref="774585933"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClearsContextBeforeDrawing">NO</bool> <int key="IBUIContentHorizontalAlignment">0</int> <int key="IBUIContentVerticalAlignment">0</int> <reference key="IBUIFont" ref="705531725"/> <int key="IBUIButtonType">1</int> <string key="IBUINormalTitle">Delete</string> <reference key="IBUIHighlightedTitleColor" ref="325340037"/> <object class="NSColor" key="IBUINormalTitleColor"> <int key="NSColorSpace">1</int> <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes> </object> <reference key="IBUINormalTitleShadowColor" ref="920308978"/> </object> <object class="IBUIButton" id="301219321"> <reference key="NSNextResponder" ref="774585933"/> <int key="NSvFlags">292</int> <string key="NSFrame">{{77, 222}, {157, 37}}</string> <reference key="NSSuperview" ref="774585933"/> <bool key="IBUIOpaque">NO</bool> <bool key="IBUIClearsContextBeforeDrawing">NO</bool> <int key="IBUIContentHorizontalAlignment">0</int> <int key="IBUIContentVerticalAlignment">0</int> <reference key="IBUIFont" ref="705531725"/> <int key="IBUIButtonType">1</int> <string key="IBUINormalTitle">Select</string> <reference key="IBUIHighlightedTitleColor" ref="325340037"/> <object class="NSColor" key="IBUINormalTitleColor"> <int key="NSColorSpace">1</int> <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes> </object> <reference key="IBUINormalTitleShadowColor" ref="920308978"/> </object> </object> <string key="NSFrameSize">{320, 460}</string> <reference key="NSSuperview"/> <object class="NSColor" key="IBUIBackgroundColor"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MC43NQA</bytes> <object class="NSColorSpace" key="NSCustomColorSpace"> <int key="NSID">2</int> </object> </object> <bool key="IBUIClearsContextBeforeDrawing">NO</bool> <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> </object> </object> <object class="IBObjectContainer" key="IBDocument.Objects"> <object class="NSMutableArray" key="connectionRecords"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> <string key="label">view</string> <reference key="source" ref="372490531"/> <reference key="destination" ref="774585933"/> </object> <int key="connectionID">7</int> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> <string key="label">mDeleteButton</string> <reference key="source" ref="372490531"/> <reference key="destination" ref="422288824"/> </object> <int key="connectionID">11</int> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> <string key="label">mInsertButton</string> <reference key="source" ref="372490531"/> <reference key="destination" ref="263702904"/> </object> <int key="connectionID">12</int> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchOutletConnection" key="connection"> <string key="label">mSelectButton</string> <reference key="source" ref="372490531"/> <reference key="destination" ref="301219321"/> </object> <int key="connectionID">13</int> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchEventConnection" key="connection"> <string key="label">deleteButtonPressed:</string> <reference key="source" ref="422288824"/> <reference key="destination" ref="372490531"/> <int key="IBEventType">7</int> </object> <int key="connectionID">14</int> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchEventConnection" key="connection"> <string key="label">selectButtonPressed:</string> <reference key="source" ref="301219321"/> <reference key="destination" ref="372490531"/> <int key="IBEventType">7</int> </object> <int key="connectionID">16</int> </object> <object class="IBConnectionRecord"> <object class="IBCocoaTouchEventConnection" key="connection"> <string key="label">insertButtonPressed:</string> <reference key="source" ref="263702904"/> <reference key="destination" ref="372490531"/> <int key="IBEventType">7</int> </object> <int key="connectionID">17</int> </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBObjectRecord"> <int key="objectID">0</int> <reference key="object" ref="0"/> <reference key="children" ref="1000"/> <nil key="parent"/> </object> <object class="IBObjectRecord"> <int key="objectID">-1</int> <reference key="object" ref="372490531"/> <reference key="parent" ref="0"/> <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string> </object> <object class="IBObjectRecord"> <int key="objectID">-2</int> <reference key="object" ref="843779117"/> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> <int key="objectID">6</int> <reference key="object" ref="774585933"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="263702904"/> <reference ref="422288824"/> <reference ref="301219321"/> </object> <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> <int key="objectID">8</int> <reference key="object" ref="263702904"/> <reference key="parent" ref="774585933"/> </object> <object class="IBObjectRecord"> <int key="objectID">9</int> <reference key="object" ref="422288824"/> <reference key="parent" ref="774585933"/> </object> <object class="IBObjectRecord"> <int key="objectID">10</int> <reference key="object" ref="301219321"/> <reference key="parent" ref="774585933"/> </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>-1.CustomClassName</string> <string>-2.CustomClassName</string> <string>10.IBPluginDependency</string> <string>6.IBEditorWindowLastContentRect</string> <string>6.IBPluginDependency</string> <string>8.IBPluginDependency</string> <string>9.IBPluginDependency</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>TestAppViewController</string> <string>UIResponder</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>{{627, 252}, {320, 480}}</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> <reference key="dict.sortedKeys" ref="0"/> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <nil key="activeLocalization"/> <object class="NSMutableDictionary" key="localizations"> <bool key="EncodedWithXMLCoder">YES</bool> <reference key="dict.sortedKeys" ref="0"/> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <nil key="sourceID"/> <int key="maxID">17</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBPartialClassDescription"> <string key="className">TestAppViewController</string> <string key="superclassName">UIViewController</string> <object class="NSMutableDictionary" key="actions"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>deleteButtonPressed:</string> <string>insertButtonPressed:</string> <string>selectButtonPressed:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>id</string> <string>id</string> <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>mDeleteButton</string> <string>mInsertButton</string> <string>mSelectButton</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>UIButton</string> <string>UIButton</string> <string>UIButton</string> </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> <string key="minorKey">Classes/TestAppViewController.h</string> </object> </object> </object> </object> <int key="IBDocument.localizationMode">0</int> <string key="IBDocument.LastKnownRelativeProjectPath">TestApp.xcodeproj</string> <int key="IBDocument.defaultPropertyAccessControl">3</int> <string key="IBCocoaTouchPluginVersion">3.0</string> </data> </archive>
{ "pile_set_name": "Github" }
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import uuid\n", "from rpy2.robjects.packages import importr \n", "from IPython.core.display import Image\n", "import rpy2.robjects.lib.ggplot2 as ggplot2\n", "import pandas as pd\n", "import pandas.rpy.common as com\n", "\n", "# IPython notebooks do not directly support in-line R plots. This function below is a workaround...\n", "grdevices = importr('grDevices')\n", "def ggplot_notebook(gg, width = 800, height = 600):\n", " fn = '{uuid}.png'.format(uuid = uuid.uuid4())\n", " grdevices.png(fn, width = width, height = height)\n", " gg.plot()\n", " grdevices.dev_off()\n", " return Image(filename=fn)\n", "\n", "df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6], 'C':[7,8,9]},index=[\"one\", \"two\", \"three\"])\n", "\n", "r_dataframe = com.convert_to_r_dataframe(df)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Don't know how to automatically pick scale for object of type AsIs. Defaulting to continuous\n", "\n", "Don't know how to automatically pick scale for object of type AsIs. Defaulting to continuous\n", "\n" ] }, { "data": { "image/png": [ "iVBORw0KGgoAAAANSUhEUgAAAfQAAAGQCAMAAABvbWL0AAACfFBMVEUAAAABAQECAgIDAwMEBAQF\n", "BQUGBgYHBwcICAgJCQkLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBga\n", "GhobGxscHBweHh4fHx8hISEiIiIjIyMmJiYnJycoKCgpKSkqKiorKystLS0uLi4vLy8wMDAxMTEz\n", "MzM2NjY3Nzc5OTk6Ojo7Ozs9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhKSkpL\n", "S0tMTExNTU1OTk5PT09RUVFSUlJTU1NVVVVXV1dZWVlaWlpeXl5fX19gYGBjY2NmZmZnZ2doaGhp\n", "aWlra2tubm5vb29ycnJ0dHR6enp7e3t8fHx+fn5/f3+AgICBgYGCgoKEhISFhYWGhoaHh4eIiIiJ\n", "iYmLi4uMjIyOjo6Pj4+QkJCSkpKTk5OUlJSVlZWWlpaXl5eYmJiZmZmampqbm5ucnJydnZ2enp6f\n", "n5+goKChoaGioqKjo6OkpKSlpaWmpqanp6eoqKiqqqqrq6uurq6vr6+wsLCxsbGysrKzs7O0tLS1\n", "tbW2tra3t7e4uLi5ubm6urq7u7u8vLy9vb2+vr6/v7/AwMDBwcHCwsLDw8PExMTFxcXGxsbHx8fI\n", "yMjJycnKysrLy8vMzMzNzc3Ozs7Pz8/Q0NDR0dHS0tLT09PU1NTV1dXW1tbX19fY2NjZ2dna2trc\n", "3Nzd3d3e3t7f39/g4ODh4eHi4uLj4+Pk5OTl5eXm5ubn5+fo6Ojp6enq6urr6+vs7Ozt7e3u7u7v\n", "7+/w8PDx8fHy8vLz8/P09PT19fX29vb39/f4+Pj5+fn6+vr7+/v8/Pz9/f3+/v7///+fTqXjAAAP\n", "IUlEQVR4nO3d/WMT9R3A8YNOZAo+gfiED9t0U5kbbDodzIdt4rPTOXVs0TFxTBlsrUAL1NrKgyIW\n", "lAeBItWCgAORKa0WaGmgLbRNBErz/Yd2d8mFtL203w/JN71w7/cPueTIN59eXuTaShstRaHLGukP\n", "gAof6CEM9BAGeggDPYSBHsJAD2GghzDQQxjoIQz0EAZ6CAM9hIEewkAPYaCHMNBDWPGh/86yrFE3\n", "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\n", "Yevz9WNqAAAAAElFTkSuQmCC\n" ], "text/plain": [ "<IPython.core.display.Image object>" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p = ggplot2.ggplot(r_dataframe) + \\\n", " ggplot2.aes_string(x='A', y='B') + \\\n", " ggplot2.ggtitle(\"Plot of a Pandas Dataframe\") + \\\n", " ggplot2.geom_point()\n", "\n", "ggplot_notebook(p, width=500, height=400)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": [ "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\n", "xo0bJ3Y54nC73V988cWCBQvELkQ0CoVi2rRpq1atGjFixPbt28UuB/qBnnv/OI7bs2ePwWBYvnx5\n", "UlKS2OWIoLOzUyKR3HbbbVVVVVu3br3rrrvErkgEhw8fzsvLi+SZ/unp6fxGTk7OF198IW4x0C/0\n", "3Pt3+vRpk8lUVFQUmclOCNm/f/+JEycIISzLirtolIgaGhpOnz797rvvms3mjRs3il2OCA4ePFhW\n", "VkYIqa2tTUhIELsc6AcuYurff//734sXL8rlckJIdHT07bffLnZFgWaxWD766COHw+F2u5ctW5ac\n", "nCx2RWJ66aWXHn74YbGrEEFHR8cnn3zS0dHBsuwNN9wQExMjdkXQF4Q7AEAYwrAMAEAYQrgDAIQh\n", "hDuEGJZlcS8egH4h3AEAwhDCHYLOxIkT+Wtk/vCHP0ilUrvdTggpLCx85513Fi5c6HK5srKybDab\n", "2GUCBDWEOwSdwsLCgwcPEkJKS0tlMtnRo0cdDsfhw4fnzZv32WefMQxz4cKFSL6YCMAbCHcIOny4\n", "cxx35MiRoqKiL7/88sSJExkZGRG4HifAgGH5AQg6M2bMOH78+Pnz5+Pj4xcuXPjWW29JpdL58+eL\n", "XRdAKEHPHYKOUqkcO3bsSy+9NGXKlGnTppWUlBw6dAjhDuAThDsEo8LCwjfeeGPKlClxcXE6nW7X\n", "rl2zZ8/2/KvVahWxNoCQgHCHYFRYWGiz2aZMmUIImTFjxsiRIz2rh99yyy0ZGRmYLQPQN6wtAwAQ\n", "htBzBwAIQwh3AIAwhHAHAAhDCHcAgDCEcAcACEMIdwCAMIRwBwAIQwh3AIAwhHAHAAhDCHcAgDD0\n", "/wE1jGXLdMlV6gAAAABJRU5ErkJggg==\n" ], "text/plain": [ "<IPython.core.display.Image object>" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "datasets = importr('datasets')\n", "\n", "mtcars = datasets.__rdata__.fetch('mtcars')['mtcars']\n", "\n", "p = ggplot2.ggplot(mtcars) + \\\n", " ggplot2.ggtitle(\"Plotting a Built-In R Data Set\") + \\\n", " ggplot2.aes_string(x='wt', y='mpg', col='factor(cyl)') + \\\n", " ggplot2.geom_point() + \\\n", " ggplot2.geom_smooth(ggplot2.aes_string(group = 'cyl'),\n", " method = 'lm')\n", "\n", "ggplot_notebook(p, width=500, height=400)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.2" } }, "nbformat": 4, "nbformat_minor": 0 }
{ "pile_set_name": "Github" }
好奇心原文链接:[白金唱片这个词说的不再是唱片了,你会有点伤感吗?_娱乐_好奇心日报-韩方航 ](https://www.qdaily.com/articles/21725.html) WebArchive归档链接:[白金唱片这个词说的不再是唱片了,你会有点伤感吗?_娱乐_好奇心日报-韩方航 ](http://web.archive.org/web/20190623165436/https://www.qdaily.com/articles/21725.html) ![image](http://ww3.sinaimg.cn/large/007d5XDply1g3w9667be4j30u03chb29)
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" ?> <template> <t t-name="web.ribbon"> <div class="ribbon ribbon-top-right"> <span t-att-class="widget.bgColor ? widget.bgColor : 'bg-success'"><t t-esc="widget.text"/></span> </div> </t> </template>
{ "pile_set_name": "Github" }
#!/bin/bash python training/prepare_experiments.py training/experiments/sample.json
{ "pile_set_name": "Github" }
#!/bin/sh . scripts/functions /bin/cp -f ${rscripts}/bareos-dir.conf ${conf}/bareos-dir.conf /bin/cp -f ${rscripts}/bareos-sd.conf ${conf}/bareos-sd.conf /bin/cp -f ${rscripts}/bareos-fd.conf ${conf}/bareos-fd.conf /bin/cp -f ${rscripts}/bconsole.conf ${conf}/bconsole.conf /bin/cp -f ${rscripts}/bconsole.conf ${conf}/bat.conf ${rscripts}/set_tape_options
{ "pile_set_name": "Github" }
{ "parent": "refinedstorage:block/cube_north_cutout", "textures": { "particle": "refinedstorage:block/disk_manipulator/right", "east": "refinedstorage:block/disk_manipulator/right", "south": "refinedstorage:block/disk_manipulator/back", "west": "refinedstorage:block/disk_manipulator/left", "up": "refinedstorage:block/disk_manipulator/top", "down": "refinedstorage:block/bottom", "north": "refinedstorage:block/disk_manipulator/front", "cutout": "refinedstorage:block/disk_manipulator/cutouts/cyan" } }
{ "pile_set_name": "Github" }
<?php /** * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later * */ namespace Piwik\AssetManager; abstract class UIAssetMerger { /** * @var UIAssetFetcher */ private $assetFetcher; /** * @var UIAsset */ private $mergedAsset; /** * @var string */ protected $mergedContent; /** * @var UIAssetCacheBuster */ protected $cacheBuster; /** * @param UIAsset $mergedAsset * @param UIAssetFetcher $assetFetcher * @param UIAssetCacheBuster $cacheBuster */ public function __construct($mergedAsset, $assetFetcher, $cacheBuster) { $this->mergedAsset = $mergedAsset; $this->assetFetcher = $assetFetcher; $this->cacheBuster = $cacheBuster; } public function generateFile() { if (!$this->shouldGenerate()) { return; } $this->mergedContent = $this->getMergedAssets(); $this->postEvent($this->mergedContent); $this->adjustPaths(); $this->addPreamble(); $this->writeContentToFile(); } /** * @return string */ abstract protected function getMergedAssets(); /** * @return string */ abstract protected function generateCacheBuster(); /** * @return string */ abstract protected function getPreamble(); /** * @return string */ abstract protected function getFileSeparator(); /** * @param UIAsset $uiAsset * @return string */ abstract protected function processFileContent($uiAsset); /** * @param string $mergedContent */ abstract protected function postEvent(&$mergedContent); protected function getConcatenatedAssets() { if (empty($this->mergedContent)) { $this->concatenateAssets(); } return $this->mergedContent; } protected function concatenateAssets() { $mergedContent = ''; foreach ($this->getAssetCatalog()->getAssets() as $uiAsset) { $uiAsset->validateFile(); $content = $this->processFileContent($uiAsset); $mergedContent .= $this->getFileSeparator() . $content; } $this->mergedContent = $mergedContent; } /** * @return string[] */ protected function getPlugins() { return $this->assetFetcher->getPlugins(); } /** * @return UIAssetCatalog */ protected function getAssetCatalog() { return $this->assetFetcher->getCatalog(); } /** * @return boolean */ private function shouldGenerate() { if (!$this->mergedAsset->exists()) { return true; } return !$this->isFileUpToDate(); } /** * @return boolean */ private function isFileUpToDate() { $f = fopen($this->mergedAsset->getAbsoluteLocation(), 'r'); $firstLine = fgets($f); fclose($f); if (!empty($firstLine) && trim($firstLine) == trim($this->getCacheBusterValue())) { return true; } // Some CSS file in the merge, has changed since last merged asset was generated // Note: we do not detect changes in @import'ed LESS files return false; } private function adjustPaths() { $theme = $this->assetFetcher->getTheme(); // During installation theme is not yet ready if ($theme) { $this->mergedContent = $this->assetFetcher->getTheme()->rewriteAssetsPathToTheme($this->mergedContent); } } private function writeContentToFile() { $this->mergedAsset->writeContent($this->mergedContent); } /** * @return string */ protected function getCacheBusterValue() { if (empty($this->cacheBusterValue)) { $this->cacheBusterValue = $this->generateCacheBuster(); } return $this->cacheBusterValue; } private function addPreamble() { $this->mergedContent = $this->getPreamble() . $this->mergedContent; } }
{ "pile_set_name": "Github" }
# Event 1216 - DocPerf_Task_PrintProcGetCaps ###### Version: 0 ## Description None ## Data Dictionary |Standard Name|Field Name|Type|Description|Sample Value| |---|---|---|---|---| |TBD|Module|UnicodeString|None|`None`| ## Tags * etw_level_Informational * etw_keywords_DocPerf * etw_opcode_Start * etw_task_DocPerf_Task_PrintProcGetCaps
{ "pile_set_name": "Github" }
# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])])
{ "pile_set_name": "Github" }
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-tasks/cldr/extract.js const u = undefined; export default [];
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="ConnectionServiceConnectErrorNullParams" xml:space="preserve"> <value>Параметры подключения должны быть указаны, значение не может быть неопределенным (null)</value> </data> <data name="ConnectionServiceListDbErrorNullOwnerUri" xml:space="preserve"> <value>OwnerUri не может быть неопределенным или пустым</value> </data> <data name="ConnectionServiceListDbErrorNotConnected" xml:space="preserve"> <value>SpecifiedUri «{0}» не имеет существующего подключения</value> </data> <data name="ConnectionServiceConnStringInvalidAuthType" xml:space="preserve"> <value>Значение «{0}» недопустимо для AuthenticationType. Ожидается значение «Integrated» или «SqlLogin».</value> </data> <data name="ConnectionServiceConnStringInvalidIntent" xml:space="preserve"> <value>Значение «{0}» недопустимо для ApplicationIntent. Ожидается значение «ReadWrite» или «ReadOnly».</value> </data> <data name="ConnectionServiceConnectionCanceled" xml:space="preserve"> <value>Подключение к серверу отменено.</value> </data> <data name="ConnectionParamsValidateNullOwnerUri" xml:space="preserve"> <value>OwnerUri не может быть неопределенным или пустым</value> </data> <data name="ConnectionParamsValidateNullConnection" xml:space="preserve"> <value>Параметры подключения не могут быть неопределенными</value> </data> <data name="ConnectionParamsValidateNullServerName" xml:space="preserve"> <value>Имя сервера не может быть неопределенным или пустым</value> </data> <data name="ConnectionParamsValidateNullSqlAuth" xml:space="preserve"> <value>{0} не может быть неопределенным или пустым при использовании проверки подлинности SqlLogin</value> </data> <data name="QueryServiceCancelAlreadyCompleted" xml:space="preserve"> <value>Запрос уже был выполнен, отмена невозможна</value> </data> <data name="QueryServiceCancelDisposeFailed" xml:space="preserve"> <value>Запрос успешно отменен, но удалить запрос не удалось. Владелец URI не найден.</value> </data> <data name="QueryServiceQueryCancelled" xml:space="preserve"> <value>Выполнение запроса отменено пользователем</value> </data> <data name="QueryServiceSubsetBatchNotCompleted" xml:space="preserve"> <value>Пакет еще не завершен</value> </data> <data name="QueryServiceSubsetBatchOutOfRange" xml:space="preserve"> <value>Индекс пакета не может быть меньше нуля или больше числа пакетов</value> </data> <data name="QueryServiceSubsetResultSetOutOfRange" xml:space="preserve"> <value>Индекс не может быть меньше нуля или больше количества записей в наборе</value> </data> <data name="QueryServiceDataReaderByteCountInvalid" xml:space="preserve"> <value>Максимальное количество возвращаемых байтов должно быть больше нуля</value> </data> <data name="QueryServiceDataReaderCharCountInvalid" xml:space="preserve"> <value>Максимальное количество возвращаемых символов должно быть больше нуля</value> </data> <data name="QueryServiceDataReaderXmlCountInvalid" xml:space="preserve"> <value>Максимальное количество возвращаемых из XML байтов должно быть больше нуля</value> </data> <data name="QueryServiceFileWrapperWriteOnly" xml:space="preserve"> <value>Метод доступа не может быть только для записи.</value> </data> <data name="QueryServiceFileWrapperNotInitialized" xml:space="preserve"> <value>FileStreamWrapper должен быть инициализирован перед выполнением операций</value> </data> <data name="QueryServiceFileWrapperReadOnly" xml:space="preserve"> <value>Этот экземпляр FileStreamWrapper не может быть использован для записи</value> </data> <data name="QueryServiceAffectedOneRow" xml:space="preserve"> <value>(одна строка затронута)</value> </data> <data name="QueryServiceAffectedRows" xml:space="preserve"> <value>({0} строк затронуто)</value> </data> <data name="QueryServiceCompletedSuccessfully" xml:space="preserve"> <value>Выполнение команд успешно завершено.</value> </data> <data name="QueryServiceErrorFormat" xml:space="preserve"> <value>Сообщение {0}, Уровень {1}, Состояние {2}, Строка {3}{4}{5}</value> </data> <data name="QueryServiceQueryFailed" xml:space="preserve"> <value>Не удалось выполнить запрос: {0}</value> </data> <data name="QueryServiceColumnNull" xml:space="preserve"> <value>(Нет имени столбца)</value> </data> <data name="QueryServiceRequestsNoQuery" xml:space="preserve"> <value>Указанный запрос не найден</value> </data> <data name="QueryServiceQueryInvalidOwnerUri" xml:space="preserve"> <value>Этот редактор не подключен к базе данных</value> </data> <data name="QueryServiceQueryInProgress" xml:space="preserve"> <value>Запрос уже выполняется для данного сеанса редактора. Отмените запрос или дождитесь завершения его выполнения.</value> </data> <data name="QueryServiceMessageSenderNotSql" xml:space="preserve"> <value>В качестве отправителя (sender) для события OnInfoMessage ожидается экземпляр SqlConnection</value> </data> <data name="QueryServiceSaveAsResultSetNotComplete" xml:space="preserve"> <value>Результат не может быть сохранен до завершения выполнения запроса</value> </data> <data name="QueryServiceSaveAsMiscStartingError" xml:space="preserve"> <value>При запуске задачи сохранения произошла внутренняя ошибка</value> </data> <data name="QueryServiceSaveAsInProgress" xml:space="preserve"> <value>По указанному пути уже выполняется сохранение результатов</value> </data> <data name="QueryServiceSaveAsFail" xml:space="preserve"> <value>Не удалось сохранить {0}: {1}</value> </data> <data name="QueryServiceResultSetNotRead" xml:space="preserve"> <value>Невозможно прочитать подмножество, поскольку результаты еще не были получены с сервера</value> </data> <data name="QueryServiceResultSetStartRowOutOfRange" xml:space="preserve"> <value>Индекс начальной строки не может быть меньше нуля или больше количества строк, находящихся в результирующем наборе</value> </data> <data name="QueryServiceResultSetRowCountOutOfRange" xml:space="preserve"> <value>Число строк должно быть положительным целым числом</value> </data> <data name="QueryServiceResultSetNoColumnSchema" xml:space="preserve"> <value>Не удалось получить столбец схемы для результирующего набора</value> </data> <data name="QueryServiceExecutionPlanNotFound" xml:space="preserve"> <value>Не удалось получить план выполнения из результирующего набора</value> </data> <data name="PeekDefinitionAzureError" xml:space="preserve"> <value>В настоящее время эта функция не поддерживается Azure SQL DB и Data Warehouse: {0}</value> </data> <data name="PeekDefinitionError" xml:space="preserve"> <value>Произошла непредвиденная ошибка во время выполнения Peek Definition: {0}</value> </data> <data name="PeekDefinitionNoResultsError" xml:space="preserve"> <value>Результаты не найдены.</value> </data> <data name="PeekDefinitionDatabaseError" xml:space="preserve"> <value>Объект базы данных не был получен.</value> </data> <data name="PeekDefinitionNotConnectedError" xml:space="preserve"> <value>Подключитесь к серверу.</value> </data> <data name="PeekDefinitionTimedoutError" xml:space="preserve"> <value>Истекло время ожидания операции.</value> </data> <data name="PeekDefinitionTypeNotSupportedError" xml:space="preserve"> <value>В настоящее время этот тип объекта не поддерживается этим средством.</value> </data> <data name="WorkspaceServicePositionLineOutOfRange" xml:space="preserve"> <value>Позиция выходит за пределы диапазона строк файла</value> </data> <data name="WorkspaceServicePositionColumnOutOfRange" xml:space="preserve"> <value>Позиция выходит за пределы диапазона столбцов строки {0}</value> </data> <data name="WorkspaceServiceBufferPositionOutOfOrder" xml:space="preserve"> <value>Начальная позиция ({0}, {1}) должна быть меньше либо равна конечной ({2}, {3})</value> </data> <data name="EE_BatchSqlMessageNoProcedureInfo" xml:space="preserve"> <value>Сообщение {0}, уровень {1}, состояние {2}, строка {3}</value> </data> <data name="EE_BatchSqlMessageWithProcedureInfo" xml:space="preserve"> <value>Сообщение {0}, уровень {1}, состояние {2}, процедура {3}, строка {4}</value> </data> <data name="EE_BatchSqlMessageNoLineInfo" xml:space="preserve"> <value>Сообщение {0}, уровень {1}, состояние {2}</value> </data> <data name="EE_BatchError_Exception" xml:space="preserve"> <value>При обработке пакета произошла ошибка: {0}</value> </data> <data name="EE_BatchExecutionInfo_RowsAffected" xml:space="preserve"> <value>({0} строк затронуто)</value> </data> <data name="EE_ExecutionNotYetCompleteError" xml:space="preserve"> <value>Предыдущее выполнение еще не завершено.</value> </data> <data name="EE_ScriptError_Error" xml:space="preserve"> <value>Произошла ошибка сценария.</value> </data> <data name="EE_ScriptError_ParsingSyntax" xml:space="preserve"> <value>Обнаружен неправильный синтаксис при обработке {0}.</value> </data> <data name="EE_ScriptError_FatalError" xml:space="preserve"> <value>Произошла неустранимая ошибка.</value> </data> <data name="EE_ExecutionInfo_FinalizingLoop" xml:space="preserve"> <value>Выполнение завершено такое количество раз: {0}...</value> </data> <data name="EE_ExecutionInfo_QueryCancelledbyUser" xml:space="preserve"> <value>Пользователь отменил запрос.</value> </data> <data name="EE_BatchExecutionError_Halting" xml:space="preserve"> <value>При выполнении пакета произошла ошибка.</value> </data> <data name="EE_BatchExecutionError_Ignoring" xml:space="preserve"> <value>В процессе выполнения пакета произошла ошибка, но она была проигнорирована.</value> </data> <data name="EE_ExecutionInfo_InitializingLoop" xml:space="preserve"> <value>Beginning execution loop</value> </data> <data name="EE_ExecutionError_CommandNotSupported" xml:space="preserve"> <value>Команда {0} не поддерживается.</value> </data> <data name="EE_ExecutionError_VariableNotFound" xml:space="preserve"> <value>Переменная {0} не найдена.</value> </data> <data name="BatchParserWrapperExecutionEngineError" xml:space="preserve"> <value>Ошибка выполнения SQL: {0}</value> </data> <data name="BatchParserWrapperExecutionError" xml:space="preserve"> <value>BatchParserWrapper: {0} найдено; строка {1}: {2}; описание: {3}</value> </data> <data name="BatchParserWrapperExecutionEngineBatchMessage" xml:space="preserve"> <value>BatchParserWrapper получено сообщение: {0}. Детали: {1}</value> </data> <data name="BatchParserWrapperExecutionEngineBatchResultSetProcessing" xml:space="preserve"> <value>BatchParserWrapper выполнение пакетной обработки ResultSet. DataReader.FieldCount: {0} DataReader.RecordsAffected: {1}</value> </data> <data name="BatchParserWrapperExecutionEngineBatchResultSetFinished" xml:space="preserve"> <value>BatchParserWrapper: обработка завершена.</value> </data> <data name="BatchParserWrapperExecutionEngineBatchCancelling" xml:space="preserve"> <value>BatchParserWrapper: выполнение пакета отменено.</value> </data> <data name="EE_ScriptError_Warning" xml:space="preserve"> <value>Сценарий содержит предупреждения.</value> </data> <data name="TroubleshootingAssistanceMessage" xml:space="preserve"> <value>Для получения дополнительной информации об этой ошибке, обратитесь к разделам по устранению неполадок в документации по продукту.</value> </data> <data name="BatchParser_CircularReference" xml:space="preserve"> <value>Обнаружена рекурсивная ссылка на файл «{0}».</value> </data> <data name="BatchParser_CommentNotTerminated" xml:space="preserve"> <value>Отсутствует обозначение конца комментария - «*/».</value> </data> <data name="BatchParser_StringNotTerminated" xml:space="preserve"> <value>Незакрытые кавычки в конце символьной строки.</value> </data> <data name="BatchParser_IncorrectSyntax" xml:space="preserve"> <value>При разборе «{0}» обнаружен неправильный синтаксис.</value> </data> <data name="BatchParser_VariableNotDefined" xml:space="preserve"> <value>Переменная {0} не определена.</value> </data> <data name="TestLocalizationConstant" xml:space="preserve"> <value>тест</value> </data> <data name="ErrorEmptyStringReplacement" xml:space="preserve"> <value>Замена пустой строки на пустую строку.</value> </data> <data name="EditDataSessionNotFound" xml:space="preserve"> <value>Сеанс не найден.</value> </data> <data name="EditDataQueryNotCompleted" xml:space="preserve"> <value>Выполнение запроса не завершено</value> </data> <data name="EditDataQueryImproperResultSets" xml:space="preserve"> <value>Запрос должен содержать только один набор результатов</value> </data> <data name="EditDataFailedAddRow" xml:space="preserve"> <value>Не удалось добавить новую строку в кэш обновлений</value> </data> <data name="EditDataRowOutOfRange" xml:space="preserve"> <value>Указанный идентификатор строки находится за пределами диапазона строк в кэше редактирования</value> </data> <data name="EditDataUpdatePending" xml:space="preserve"> <value>Обновление уже отправлено для этой строки и должно быть отменено первым</value> </data> <data name="EditDataUpdateNotPending" xml:space="preserve"> <value>Для указанной строки нет обновлений в очереди</value> </data> <data name="EditDataObjectMetadataNotFound" xml:space="preserve"> <value>Не удалось найти метаданные таблицы или представления</value> </data> <data name="EditDataInvalidFormatBinary" xml:space="preserve"> <value>Недопустимый формат данных для двоичного столбца</value> </data> <data name="EditDataInvalidFormatBoolean" xml:space="preserve"> <value>Логические столбцы должны содержать число 1 или 0, либо строку true или false</value> </data> <data name="EditDataCreateScriptMissingValue" xml:space="preserve"> <value>Недопустимое значение ячейки</value> </data> <data name="EditDataDeleteSetCell" xml:space="preserve"> <value>Обновление ячейки не может быть применено, поскольку для данной строки ожидается удаление.</value> </data> <data name="EditDataColumnIdOutOfRange" xml:space="preserve"> <value>Идентификатор столбца должен находиться в диапазоне столбцов запроса</value> </data> <data name="EditDataColumnCannotBeEdited" xml:space="preserve"> <value>Столбец не может быть изменен</value> </data> <data name="EditDataColumnNoKeyColumns" xml:space="preserve"> <value>Ключевые поля не найдены</value> </data> <data name="EditDataScriptFilePathNull" xml:space="preserve"> <value>Должно быть указано имя выходного файла</value> </data> <data name="EditDataUnsupportedObjectType" xml:space="preserve"> <value>Объект базы данных {0} не может использоваться для редактирования.</value> </data> <data name="ConnectionServiceDbErrorDefaultNotConnected" xml:space="preserve"> <value>Указанный URI '{0}' не имеет соединения по умолчанию</value> </data> <data name="EditDataCommitInProgress" xml:space="preserve"> <value>Выполняется фиксация. Пожалуйста, дождитесь завершения.</value> </data> <data name="SqlScriptFormatterDecimalMissingPrecision" xml:space="preserve"> <value>В десятичном столбце отсутствует числовая точность или масштаб</value> </data> <data name="EditDataComputedColumnPlaceholder" xml:space="preserve"> <value>&lt;TBD&gt;</value> </data> <data name="QueryServiceResultSetAddNoRows" xml:space="preserve"> <value>Невозможно добавить строку в файл буфера, поток не содержит строк</value> </data> <data name="EditDataTimeOver24Hrs" xml:space="preserve"> <value>Значение столбца TIME должно находиться в диапазоне между 00:00:00.0000000 и 23:59:59.9999999</value> </data> <data name="EditDataNullNotAllowed" xml:space="preserve"> <value>Значение NULL недопустимо в этом столбце.</value> </data> <data name="EditDataSessionAlreadyExists" xml:space="preserve"> <value>Сеанс редактирования уже существует.</value> </data> <data name="EditDataSessionNotInitialized" xml:space="preserve"> <value>Сеанс редактирования не был инициализирован.</value> </data> <data name="EditDataSessionAlreadyInitialized" xml:space="preserve"> <value>Сеанс редактирования уже был инициализирован.</value> </data> <data name="EditDataSessionAlreadyInitializing" xml:space="preserve"> <value>Сеанс редактирования уже был инициализирован или находится в процессе инициализации</value> </data> <data name="EditDataQueryFailed" xml:space="preserve"> <value>Не удалось выполнить запрос, см. сообщения для получения подробностей</value> </data> <data name="EditDataFilteringNegativeLimit" xml:space="preserve"> <value>Значение, определяющее ограничение числа записей, не может быть отрицательным</value> </data> <data name="QueryServiceCellNull" xml:space="preserve"> <value>NULL</value> </data> <data name="EditDataMetadataObjectNameRequired" xml:space="preserve"> <value>Должно быть указано имя объекта</value> </data> <data name="EditDataMetadataTooManyIdentifiers" xml:space="preserve"> <value>Явное указание сервера или базы данных не поддерживается</value> </data> <data name="EditDataMetadataNotExtended" xml:space="preserve"> <value>Метаданные таблицы не имеют расширенных свойств</value> </data> <data name="EditDataObjectNotFound" xml:space="preserve"> <value>Запрошенная таблица или представление не найдены.</value> </data> <data name="TreeNodeError" xml:space="preserve"> <value>Ошибка при расширении: {0}</value> </data> <data name="ServerNodeConnectionError" xml:space="preserve"> <value>Ошибка при подключении к {0}</value> </data> <data name="SchemaHierarchy_Aggregates" xml:space="preserve"> <value>Статистические выражения</value> </data> <data name="SchemaHierarchy_ServerRoles" xml:space="preserve"> <value>Роли сервера</value> </data> <data name="SchemaHierarchy_ApplicationRoles" xml:space="preserve"> <value>Роли приложения</value> </data> <data name="SchemaHierarchy_Assemblies" xml:space="preserve"> <value>Сборки</value> </data> <data name="SchemaHierarchy_AssemblyFiles" xml:space="preserve"> <value>Файлы сборки</value> </data> <data name="SchemaHierarchy_AsymmetricKeys" xml:space="preserve"> <value>Асимметричные ключи</value> </data> <data name="SchemaHierarchy_DatabaseAsymmetricKeys" xml:space="preserve"> <value>Асимметричные ключи</value> </data> <data name="SchemaHierarchy_DataCompressionOptions" xml:space="preserve"> <value>Параметры сжатия данных</value> </data> <data name="SchemaHierarchy_Certificates" xml:space="preserve"> <value>Сертификаты</value> </data> <data name="SchemaHierarchy_FileTables" xml:space="preserve"> <value>Объекты FileTable</value> </data> <data name="SchemaHierarchy_DatabaseCertificates" xml:space="preserve"> <value>Сертификаты</value> </data> <data name="SchemaHierarchy_CheckConstraints" xml:space="preserve"> <value>Проверочные ограничения</value> </data> <data name="SchemaHierarchy_Columns" xml:space="preserve"> <value>Столбцы</value> </data> <data name="SchemaHierarchy_Constraints" xml:space="preserve"> <value>Ограничения</value> </data> <data name="SchemaHierarchy_Contracts" xml:space="preserve"> <value>Контракты</value> </data> <data name="SchemaHierarchy_Credentials" xml:space="preserve"> <value>Учетные данные</value> </data> <data name="SchemaHierarchy_ErrorMessages" xml:space="preserve"> <value>Сообщения об ошибках</value> </data> <data name="SchemaHierarchy_ServerRoleMembership" xml:space="preserve"> <value>Участие в роли сервера</value> </data> <data name="SchemaHierarchy_DatabaseOptions" xml:space="preserve"> <value>Параметры базы данных</value> </data> <data name="SchemaHierarchy_DatabaseRoles" xml:space="preserve"> <value>Роли базы данных</value> </data> <data name="SchemaHierarchy_RoleMemberships" xml:space="preserve"> <value>Членства в роли</value> </data> <data name="SchemaHierarchy_DatabaseTriggers" xml:space="preserve"> <value>Триггеры базы данных</value> </data> <data name="SchemaHierarchy_DefaultConstraints" xml:space="preserve"> <value>Ограничения по умолчанию</value> </data> <data name="SchemaHierarchy_Defaults" xml:space="preserve"> <value>Значения по умолчанию</value> </data> <data name="SchemaHierarchy_Sequences" xml:space="preserve"> <value>Последовательности</value> </data> <data name="SchemaHierarchy_Endpoints" xml:space="preserve"> <value>Конечные точки</value> </data> <data name="SchemaHierarchy_EventNotifications" xml:space="preserve"> <value>Уведомления о событиях</value> </data> <data name="SchemaHierarchy_ServerEventNotifications" xml:space="preserve"> <value>Уведомления о событиях сервера</value> </data> <data name="SchemaHierarchy_ExtendedProperties" xml:space="preserve"> <value>Расширенные свойства</value> </data> <data name="SchemaHierarchy_FileGroups" xml:space="preserve"> <value>Файловые группы</value> </data> <data name="SchemaHierarchy_ForeignKeys" xml:space="preserve"> <value>Внешние ключи</value> </data> <data name="SchemaHierarchy_FullTextCatalogs" xml:space="preserve"> <value>Полнотекстовые каталоги</value> </data> <data name="SchemaHierarchy_FullTextIndexes" xml:space="preserve"> <value>Полнотекстовые индексы</value> </data> <data name="SchemaHierarchy_Functions" xml:space="preserve"> <value>Функции</value> </data> <data name="SchemaHierarchy_Indexes" xml:space="preserve"> <value>Индексы</value> </data> <data name="SchemaHierarchy_InlineFunctions" xml:space="preserve"> <value>Встроенная функции</value> </data> <data name="SchemaHierarchy_Keys" xml:space="preserve"> <value>Ключи</value> </data> <data name="SchemaHierarchy_LinkedServers" xml:space="preserve"> <value>Связанные серверы</value> </data> <data name="SchemaHierarchy_LinkedServerLogins" xml:space="preserve"> <value>Имена входа на связанный сервер</value> </data> <data name="SchemaHierarchy_Logins" xml:space="preserve"> <value>Имена входа</value> </data> <data name="SchemaHierarchy_MasterKey" xml:space="preserve"> <value>Главный ключ</value> </data> <data name="SchemaHierarchy_MasterKeys" xml:space="preserve"> <value>Главные ключи</value> </data> <data name="SchemaHierarchy_MessageTypes" xml:space="preserve"> <value>Типы сообщений</value> </data> <data name="SchemaHierarchy_MultiSelectFunctions" xml:space="preserve"> <value>Функция с табличным значением</value> </data> <data name="SchemaHierarchy_Parameters" xml:space="preserve"> <value>Параметры</value> </data> <data name="SchemaHierarchy_PartitionFunctions" xml:space="preserve"> <value>Функции секционирования</value> </data> <data name="SchemaHierarchy_PartitionSchemes" xml:space="preserve"> <value>Схемы секционирования</value> </data> <data name="SchemaHierarchy_Permissions" xml:space="preserve"> <value>Разрешения</value> </data> <data name="SchemaHierarchy_PrimaryKeys" xml:space="preserve"> <value>Первичные ключи</value> </data> <data name="SchemaHierarchy_Programmability" xml:space="preserve"> <value>Программируемость</value> </data> <data name="SchemaHierarchy_Queues" xml:space="preserve"> <value>Списки ожидания</value> </data> <data name="SchemaHierarchy_RemoteServiceBindings" xml:space="preserve"> <value>Привязки удаленных служб</value> </data> <data name="SchemaHierarchy_ReturnedColumns" xml:space="preserve"> <value>Возвращенные столбцы</value> </data> <data name="SchemaHierarchy_Roles" xml:space="preserve"> <value>Роли</value> </data> <data name="SchemaHierarchy_Routes" xml:space="preserve"> <value>Маршруты</value> </data> <data name="SchemaHierarchy_Rules" xml:space="preserve"> <value>Правила</value> </data> <data name="SchemaHierarchy_Schemas" xml:space="preserve"> <value>Схемы</value> </data> <data name="SchemaHierarchy_Security" xml:space="preserve"> <value>Безопасность</value> </data> <data name="SchemaHierarchy_ServerObjects" xml:space="preserve"> <value>Объекты сервера</value> </data> <data name="SchemaHierarchy_Management" xml:space="preserve"> <value>Управление</value> </data> <data name="SchemaHierarchy_ServerTriggers" xml:space="preserve"> <value>Триггеры</value> </data> <data name="SchemaHierarchy_ServiceBroker" xml:space="preserve"> <value>Компонент Service Broker</value> </data> <data name="SchemaHierarchy_Services" xml:space="preserve"> <value>Службы</value> </data> <data name="SchemaHierarchy_Signatures" xml:space="preserve"> <value>Сигнатуры</value> </data> <data name="SchemaHierarchy_LogFiles" xml:space="preserve"> <value>Файлы журнала</value> </data> <data name="SchemaHierarchy_Statistics" xml:space="preserve"> <value>Статистика</value> </data> <data name="SchemaHierarchy_Storage" xml:space="preserve"> <value>Хранилище</value> </data> <data name="SchemaHierarchy_StoredProcedures" xml:space="preserve"> <value>Хранимые процедуры</value> </data> <data name="SchemaHierarchy_SymmetricKeys" xml:space="preserve"> <value>Симметричные ключи</value> </data> <data name="SchemaHierarchy_Synonyms" xml:space="preserve"> <value>Синонимы</value> </data> <data name="SchemaHierarchy_Tables" xml:space="preserve"> <value>Таблицы</value> </data> <data name="SchemaHierarchy_Triggers" xml:space="preserve"> <value>Триггеры</value> </data> <data name="SchemaHierarchy_Types" xml:space="preserve"> <value>Типы</value> </data> <data name="SchemaHierarchy_UniqueKeys" xml:space="preserve"> <value>Уникальные ключи</value> </data> <data name="SchemaHierarchy_UserDefinedDataTypes" xml:space="preserve"> <value>Определяемые пользователем типы данных</value> </data> <data name="SchemaHierarchy_UserDefinedTypes" xml:space="preserve"> <value>Определяемые пользователем типы (CLR)</value> </data> <data name="SchemaHierarchy_Users" xml:space="preserve"> <value>Пользователи</value> </data> <data name="SchemaHierarchy_Views" xml:space="preserve"> <value>Представления</value> </data> <data name="SchemaHierarchy_XmlIndexes" xml:space="preserve"> <value>XML-индексы</value> </data> <data name="SchemaHierarchy_XMLSchemaCollections" xml:space="preserve"> <value>Коллекция схем XML</value> </data> <data name="SchemaHierarchy_UserDefinedTableTypes" xml:space="preserve"> <value>Определяемые пользователем типы таблиц</value> </data> <data name="SchemaHierarchy_FilegroupFiles" xml:space="preserve"> <value>Файлы</value> </data> <data name="MissingCaption" xml:space="preserve"> <value>Отсутствует заголовок</value> </data> <data name="SchemaHierarchy_BrokerPriorities" xml:space="preserve"> <value>Приоритеты брокера</value> </data> <data name="SchemaHierarchy_CryptographicProviders" xml:space="preserve"> <value>Поставщики служб шифрования</value> </data> <data name="SchemaHierarchy_DatabaseAuditSpecifications" xml:space="preserve"> <value>Спецификации аудита базы данных</value> </data> <data name="SchemaHierarchy_DatabaseEncryptionKeys" xml:space="preserve"> <value>Ключи шифрования базы данных</value> </data> <data name="SchemaHierarchy_EventSessions" xml:space="preserve"> <value>Сеансы событий</value> </data> <data name="SchemaHierarchy_FullTextStopLists" xml:space="preserve"> <value>Полнотекстовые списки стоп-слов</value> </data> <data name="SchemaHierarchy_ResourcePools" xml:space="preserve"> <value>Пулы ресурсов</value> </data> <data name="SchemaHierarchy_ServerAudits" xml:space="preserve"> <value>Аудит</value> </data> <data name="SchemaHierarchy_ServerAuditSpecifications" xml:space="preserve"> <value>Спецификации аудита сервера</value> </data> <data name="SchemaHierarchy_SpatialIndexes" xml:space="preserve"> <value>Пространственные индексы</value> </data> <data name="SchemaHierarchy_WorkloadGroups" xml:space="preserve"> <value>Группы рабочей нагрузки</value> </data> <data name="SchemaHierarchy_SqlFiles" xml:space="preserve"> <value>Файлы SQL</value> </data> <data name="SchemaHierarchy_ServerFunctions" xml:space="preserve"> <value>Функции сервера</value> </data> <data name="SchemaHierarchy_SqlType" xml:space="preserve"> <value>Тип SQL</value> </data> <data name="SchemaHierarchy_ServerOptions" xml:space="preserve"> <value>Параметры сервера</value> </data> <data name="SchemaHierarchy_DatabaseDiagrams" xml:space="preserve"> <value>Диаграммы базы данных</value> </data> <data name="SchemaHierarchy_SystemTables" xml:space="preserve"> <value>Системные таблицы</value> </data> <data name="SchemaHierarchy_Databases" xml:space="preserve"> <value>Базы данных</value> </data> <data name="SchemaHierarchy_SystemContracts" xml:space="preserve"> <value>Системные контракты</value> </data> <data name="SchemaHierarchy_SystemDatabases" xml:space="preserve"> <value>Системные базы данных</value> </data> <data name="SchemaHierarchy_SystemMessageTypes" xml:space="preserve"> <value>Системные типы сообщений</value> </data> <data name="SchemaHierarchy_SystemQueues" xml:space="preserve"> <value>Системные очереди</value> </data> <data name="SchemaHierarchy_SystemServices" xml:space="preserve"> <value>Системные службы</value> </data> <data name="SchemaHierarchy_SystemStoredProcedures" xml:space="preserve"> <value>Системные хранимые процедуры</value> </data> <data name="SchemaHierarchy_SystemViews" xml:space="preserve"> <value>Системные представления</value> </data> <data name="SchemaHierarchy_DataTierApplications" xml:space="preserve"> <value>Приложения уровня данных</value> </data> <data name="SchemaHierarchy_ExtendedStoredProcedures" xml:space="preserve"> <value>Расширенные хранимые процедуры</value> </data> <data name="SchemaHierarchy_SystemAggregateFunctions" xml:space="preserve"> <value>Агрегатные функции</value> </data> <data name="SchemaHierarchy_SystemApproximateNumerics" xml:space="preserve"> <value>Приблизительные числовые значения</value> </data> <data name="SchemaHierarchy_SystemBinaryStrings" xml:space="preserve"> <value>Двоичные строки</value> </data> <data name="SchemaHierarchy_SystemCharacterStrings" xml:space="preserve"> <value>Символьные строки</value> </data> <data name="SchemaHierarchy_SystemCLRDataTypes" xml:space="preserve"> <value>Типы данных CLR</value> </data> <data name="SchemaHierarchy_SystemConfigurationFunctions" xml:space="preserve"> <value>Функции конфигурации</value> </data> <data name="SchemaHierarchy_SystemCursorFunctions" xml:space="preserve"> <value>Функции работы с курсорами</value> </data> <data name="SchemaHierarchy_SystemDataTypes" xml:space="preserve"> <value>Системные типы данных</value> </data> <data name="SchemaHierarchy_SystemDateAndTime" xml:space="preserve"> <value>Дата и время</value> </data> <data name="SchemaHierarchy_SystemDateAndTimeFunctions" xml:space="preserve"> <value>Функции даты и времени</value> </data> <data name="SchemaHierarchy_SystemExactNumerics" xml:space="preserve"> <value>Точные числовые значения</value> </data> <data name="SchemaHierarchy_SystemFunctions" xml:space="preserve"> <value>Системные функции</value> </data> <data name="SchemaHierarchy_SystemHierarchyIdFunctions" xml:space="preserve"> <value>Функции идентификаторов иерархии</value> </data> <data name="SchemaHierarchy_SystemMathematicalFunctions" xml:space="preserve"> <value>Математические функции</value> </data> <data name="SchemaHierarchy_SystemMetadataFunctions" xml:space="preserve"> <value>Функции метаданных</value> </data> <data name="SchemaHierarchy_SystemOtherDataTypes" xml:space="preserve"> <value>Другие типы данных</value> </data> <data name="SchemaHierarchy_SystemOtherFunctions" xml:space="preserve"> <value>Другие функции</value> </data> <data name="SchemaHierarchy_SystemRowsetFunctions" xml:space="preserve"> <value>Функции набора строк</value> </data> <data name="SchemaHierarchy_SystemSecurityFunctions" xml:space="preserve"> <value>Функции безопасности</value> </data> <data name="SchemaHierarchy_SystemSpatialDataTypes" xml:space="preserve"> <value>Пространственные типы данных</value> </data> <data name="SchemaHierarchy_SystemStringFunctions" xml:space="preserve"> <value>Строковые функции</value> </data> <data name="SchemaHierarchy_SystemSystemStatisticalFunctions" xml:space="preserve"> <value>Системные статистические функции</value> </data> <data name="SchemaHierarchy_SystemTextAndImageFunctions" xml:space="preserve"> <value>Функции для работы с изображениями и текстом</value> </data> <data name="SchemaHierarchy_SystemUnicodeCharacterStrings" xml:space="preserve"> <value>Строки символов в Юникоде</value> </data> <data name="SchemaHierarchy_AggregateFunctions" xml:space="preserve"> <value>Агрегатные функции</value> </data> <data name="SchemaHierarchy_ScalarValuedFunctions" xml:space="preserve"> <value>Скалярные функции</value> </data> <data name="SchemaHierarchy_TableValuedFunctions" xml:space="preserve"> <value>Функции с табличным значением</value> </data> <data name="SchemaHierarchy_SystemExtendedStoredProcedures" xml:space="preserve"> <value>Системные расширенные хранимые процедуры</value> </data> <data name="SchemaHierarchy_BuiltInType" xml:space="preserve"> <value>Встроенные типы</value> </data> <data name="SchemaHierarchy_BuiltInServerRole" xml:space="preserve"> <value>Встроенные роли сервера</value> </data> <data name="SchemaHierarchy_UserWithPassword" xml:space="preserve"> <value>Пользователь с паролем</value> </data> <data name="SchemaHierarchy_SearchPropertyList" xml:space="preserve"> <value>Список свойств поиска</value> </data> <data name="SchemaHierarchy_SecurityPolicies" xml:space="preserve"> <value>Политики безопасности</value> </data> <data name="SchemaHierarchy_SecurityPredicates" xml:space="preserve"> <value>Предикаты безопасности</value> </data> <data name="SchemaHierarchy_ServerRole" xml:space="preserve"> <value>Роль сервера</value> </data> <data name="SchemaHierarchy_SearchPropertyLists" xml:space="preserve"> <value>Списки свойств поиска</value> </data> <data name="SchemaHierarchy_ColumnStoreIndexes" xml:space="preserve"> <value>Индексы хранилища столбцов</value> </data> <data name="SchemaHierarchy_TableTypeIndexes" xml:space="preserve"> <value>Индексы типов таблиц</value> </data> <data name="SchemaHierarchy_SelectiveXmlIndexes" xml:space="preserve"> <value>Селективные XML-индексы</value> </data> <data name="SchemaHierarchy_XmlNamespaces" xml:space="preserve"> <value>Пространства имен XML</value> </data> <data name="SchemaHierarchy_XmlTypedPromotedPaths" xml:space="preserve"> <value>Типизированные повышенные пути XML</value> </data> <data name="SchemaHierarchy_SqlTypedPromotedPaths" xml:space="preserve"> <value>Типизированные повышенные пути T-SQL</value> </data> <data name="SchemaHierarchy_DatabaseScopedCredentials" xml:space="preserve"> <value>Учетные данные для базы данных</value> </data> <data name="SchemaHierarchy_ExternalDataSources" xml:space="preserve"> <value>Внешние источники данных</value> </data> <data name="SchemaHierarchy_ExternalFileFormats" xml:space="preserve"> <value>Внешние форматы файлов</value> </data> <data name="SchemaHierarchy_ExternalResources" xml:space="preserve"> <value>Внешние ресурсы</value> </data> <data name="SchemaHierarchy_ExternalTables" xml:space="preserve"> <value>Внешние таблицы</value> </data> <data name="SchemaHierarchy_AlwaysEncryptedKeys" xml:space="preserve"> <value>Ключи Always Encrypted</value> </data> <data name="SchemaHierarchy_ColumnMasterKeys" xml:space="preserve"> <value>Главные ключи столбца</value> </data> <data name="SchemaHierarchy_ColumnEncryptionKeys" xml:space="preserve"> <value>Ключи шифрования столбца</value> </data> <data name="SchemaHierarchy_Server" xml:space="preserve"> <value>Сервер</value> </data> <data name="ScriptingParams_ConnectionString_Property_Invalid" xml:space="preserve"> <value>Ошибка при анализе свойства ScriptingParams.ConnectionString.</value> </data> <data name="ScriptingParams_FilePath_Property_Invalid" xml:space="preserve"> <value>Недопустимый каталог указан в свойстве ScriptingParams.FilePath.</value> </data> <data name="ScriptingListObjectsCompleteParams_ConnectionString_Property_Invalid" xml:space="preserve"> <value>Ошибка при анализе свойства ScriptingListObjectsCompleteParams.ConnectionString.</value> </data> <data name="SchemaHierarchy_SubroutineParameterLabelFormatString" xml:space="preserve"> <value>{0} ({1}, {2}, {3})</value> </data> <data name="SchemaHierarchy_SubroutineParameterNoDefaultLabel" xml:space="preserve"> <value>Нет значения по умолчанию</value> </data> <data name="SchemaHierarchy_SubroutineParameterInputLabel" xml:space="preserve"> <value>Входной</value> </data> <data name="SchemaHierarchy_SubroutineParameterInputOutputLabel" xml:space="preserve"> <value>Входной/выходной</value> </data> <data name="SchemaHierarchy_SubroutineParameterInputReadOnlyLabel" xml:space="preserve"> <value>Входной/только для чтения</value> </data> <data name="SchemaHierarchy_SubroutineParameterInputOutputReadOnlyLabel" xml:space="preserve"> <value>Входной/выходной/только для чтения</value> </data> <data name="SchemaHierarchy_SubroutineParameterDefaultLabel" xml:space="preserve"> <value>Значение по умолчанию</value> </data> <data name="SchemaHierarchy_NullColumn_Label" xml:space="preserve"> <value>null</value> </data> <data name="SchemaHierarchy_NotNullColumn_Label" xml:space="preserve"> <value>not null</value> </data> <data name="SchemaHierarchy_UDDTLabelWithType" xml:space="preserve"> <value>{0} ({1}, {2})</value> </data> <data name="SchemaHierarchy_UDDTLabelWithoutType" xml:space="preserve"> <value>{0} ({1})</value> </data> <data name="SchemaHierarchy_ComputedColumnLabelWithType" xml:space="preserve"> <value>{0} (вычислено {1}, {2}, {3})</value> </data> <data name="SchemaHierarchy_ComputedColumnLabelWithoutType" xml:space="preserve"> <value>{0} (вычислено {1})</value> </data> <data name="SchemaHierarchy_ColumnSetLabelWithoutType" xml:space="preserve"> <value>{0} (набор столбцов, {1})</value> </data> <data name="SchemaHierarchy_ColumnSetLabelWithType" xml:space="preserve"> <value>{0} (набор столбцов, {1}{2}, {3})</value> </data> <data name="SchemaHierarchy_ColumnSetLabelWithTypeAndKeyString" xml:space="preserve"> <value>{0} (набор столбцов, {1}, {2}, {3})</value> </data> <data name="UniqueIndex_LabelPart" xml:space="preserve"> <value>UNIQUE</value> </data> <data name="NonUniqueIndex_LabelPart" xml:space="preserve"> <value>Неуникальный</value> </data> <data name="ClusteredIndex_LabelPart" xml:space="preserve"> <value>Кластеризованный</value> </data> <data name="NonClusteredIndex_LabelPart" xml:space="preserve"> <value>Некластеризованный</value> </data> <data name="History_LabelPart" xml:space="preserve"> <value>Журнал</value> </data> <data name="SystemVersioned_LabelPart" xml:space="preserve"> <value>Системно-версионный</value> </data> <data name="unavailable" xml:space="preserve"> <value>Недоступно</value> </data> <data name="filegroup_dialog_defaultFilegroup" xml:space="preserve"> <value>Текущая файловая группа по умолчанию: {0}</value> </data> <data name="filegroup_dialog_title" xml:space="preserve"> <value>Создание файловой группы для {0}</value> </data> <data name="filegroups_default" xml:space="preserve"> <value>Значение по умолчанию</value> </data> <data name="filegroups_files" xml:space="preserve"> <value>Файлы</value> </data> <data name="filegroups_name" xml:space="preserve"> <value>Имя</value> </data> <data name="filegroups_readonly" xml:space="preserve"> <value>Только для чтения</value> </data> <data name="general_autogrowth" xml:space="preserve"> <value>Автоувеличение/максимальный размер</value> </data> <data name="general_builderText" xml:space="preserve"> <value>...</value> </data> <data name="general_default" xml:space="preserve"> <value>&lt;по умолчанию&gt;</value> </data> <data name="general_fileGroup" xml:space="preserve"> <value>Группа файлов</value> </data> <data name="general_fileName" xml:space="preserve"> <value>Логическое имя</value> </data> <data name="general_fileType" xml:space="preserve"> <value>Тип файла</value> </data> <data name="general_initialSize" xml:space="preserve"> <value>Начальный размер (МБ)</value> </data> <data name="general_newFilegroup" xml:space="preserve"> <value>&lt;создать файловую группу&gt;</value> </data> <data name="general_path" xml:space="preserve"> <value>Путь</value> </data> <data name="general_physicalFileName" xml:space="preserve"> <value>Имя файла</value> </data> <data name="general_rawDevice" xml:space="preserve"> <value>&lt;неформатированный носитель&gt;</value> </data> <data name="general_recoveryModel_bulkLogged" xml:space="preserve"> <value>С неполным протоколированием</value> </data> <data name="general_recoveryModel_full" xml:space="preserve"> <value>Полная</value> </data> <data name="general_recoveryModel_simple" xml:space="preserve"> <value>Простая</value> </data> <data name="general_titleSearchOwner" xml:space="preserve"> <value>Выбор владельца базы данных</value> </data> <data name="prototype_autogrowth_disabled" xml:space="preserve"> <value>Нет</value> </data> <data name="prototype_autogrowth_restrictedGrowthByMB" xml:space="preserve"> <value>С шагом по {0} МБ до {1} МБ</value> </data> <data name="prototype_autogrowth_restrictedGrowthByPercent" xml:space="preserve"> <value>С шагом по {0}% до {1} МБ </value> </data> <data name="prototype_autogrowth_unrestrictedGrowthByMB" xml:space="preserve"> <value>С шагом по {0} МБ, без ограничений</value> </data> <data name="prototype_autogrowth_unrestrictedGrowthByPercent" xml:space="preserve"> <value>С шагом по {0} %, без ограничений</value> </data> <data name="prototype_autogrowth_unlimitedfilestream" xml:space="preserve"> <value>Без ограничений</value> </data> <data name="prototype_autogrowth_limitedfilestream" xml:space="preserve"> <value>Ограничено {0} МБ</value> </data> <data name="prototype_db_category_automatic" xml:space="preserve"> <value>Автоматически</value> </data> <data name="prototype_db_category_servicebroker" xml:space="preserve"> <value>Service Broker</value> </data> <data name="prototype_db_category_collation" xml:space="preserve"> <value>Параметры сортировки</value> </data> <data name="prototype_db_category_cursor" xml:space="preserve"> <value>Курсор</value> </data> <data name="prototype_db_category_misc" xml:space="preserve"> <value>Прочее</value> </data> <data name="prototype_db_category_recovery" xml:space="preserve"> <value>Восстановление</value> </data> <data name="prototype_db_category_state" xml:space="preserve"> <value>Состояние</value> </data> <data name="prototype_db_prop_ansiNullDefault" xml:space="preserve"> <value>По умолчанию ANSI NULL</value> </data> <data name="prototype_db_prop_ansiNulls" xml:space="preserve"> <value>Значения ANSI NULLS включены</value> </data> <data name="prototype_db_prop_ansiPadding" xml:space="preserve"> <value>Включено заполнение ANSI </value> </data> <data name="prototype_db_prop_ansiWarnings" xml:space="preserve"> <value>Включены предупреждения ANSI</value> </data> <data name="prototype_db_prop_arithabort" xml:space="preserve"> <value>Включено прерывание при делении на ноль </value> </data> <data name="prototype_db_prop_autoClose" xml:space="preserve"> <value>Auto Close</value> </data> <data name="prototype_db_prop_autoCreateStatistics" xml:space="preserve"> <value>Автоматическое создание статистики</value> </data> <data name="prototype_db_prop_autoShrink" xml:space="preserve"> <value>Автоматическое сжатие</value> </data> <data name="prototype_db_prop_autoUpdateStatistics" xml:space="preserve"> <value>Автоматическое обновление статистики </value> </data> <data name="prototype_db_prop_autoUpdateStatisticsAsync" xml:space="preserve"> <value>Асинхронное автообновление статистики</value> </data> <data name="prototype_db_prop_caseSensitive" xml:space="preserve"> <value>Case Sensitive</value> </data> <data name="prototype_db_prop_closeCursorOnCommit" xml:space="preserve"> <value>Закрывать курсор при разрешении фиксации </value> </data> <data name="prototype_db_prop_collation" xml:space="preserve"> <value>Параметры сортировки</value> </data> <data name="prototype_db_prop_concatNullYieldsNull" xml:space="preserve"> <value>Объединение со значением NULL дает NULL </value> </data> <data name="prototype_db_prop_databaseCompatibilityLevel" xml:space="preserve"> <value>Уровень совместимости базы данных</value> </data> <data name="prototype_db_prop_databaseState" xml:space="preserve"> <value>Состояние базы данных </value> </data> <data name="prototype_db_prop_defaultCursor" xml:space="preserve"> <value>Курсор по умолчанию</value> </data> <data name="prototype_db_prop_fullTextIndexing" xml:space="preserve"> <value>Полнотекстовое индексирование включено </value> </data> <data name="prototype_db_prop_numericRoundAbort" xml:space="preserve"> <value>Автоокругление чисел </value> </data> <data name="prototype_db_prop_pageVerify" xml:space="preserve"> <value>Проверка страниц </value> </data> <data name="prototype_db_prop_quotedIdentifier" xml:space="preserve"> <value>Включены заключенные в кавычки идентификаторы</value> </data> <data name="prototype_db_prop_readOnly" xml:space="preserve"> <value>База данных только для чтения</value> </data> <data name="prototype_db_prop_recursiveTriggers" xml:space="preserve"> <value>Включены рекурсивные триггеры </value> </data> <data name="prototype_db_prop_restrictAccess" xml:space="preserve"> <value>Ограничение доступа</value> </data> <data name="prototype_db_prop_selectIntoBulkCopy" xml:space="preserve"> <value>Выбор/Массовое копирование </value> </data> <data name="prototype_db_prop_honorBrokerPriority" xml:space="preserve"> <value>Учитывать приоритет компонента Honor Broker</value> </data> <data name="prototype_db_prop_serviceBrokerGuid" xml:space="preserve"> <value>Идентификатор компонента Service Broker</value> </data> <data name="prototype_db_prop_brokerEnabled" xml:space="preserve"> <value>Включен компонент Broker</value> </data> <data name="prototype_db_prop_truncateLogOnCheckpoint" xml:space="preserve"> <value>Усечение журнала на контрольной точке </value> </data> <data name="prototype_db_prop_dbChaining" xml:space="preserve"> <value>Межбазовые цепочки владения включены</value> </data> <data name="prototype_db_prop_trustworthy" xml:space="preserve"> <value>Заслуживает доверия</value> </data> <data name="prototype_db_prop_dateCorrelationOptimization" xml:space="preserve"> <value>Date Correlation Optimization Enabledprototype_db_prop_parameterization = Parameterization</value> </data> <data name="prototype_db_prop_parameterization_value_forced" xml:space="preserve"> <value>Принудительное</value> </data> <data name="prototype_db_prop_parameterization_value_simple" xml:space="preserve"> <value>Простая</value> </data> <data name="prototype_file_dataFile" xml:space="preserve"> <value>Данные СТРОК</value> </data> <data name="prototype_file_logFile" xml:space="preserve"> <value>ЖУРНАЛ</value> </data> <data name="prototype_file_filestreamFile" xml:space="preserve"> <value>Данные FILESTREAM</value> </data> <data name="prototype_file_noFileGroup" xml:space="preserve"> <value>Неприменимо</value> </data> <data name="prototype_file_defaultpathstring" xml:space="preserve"> <value>&lt;default path&gt;</value> </data> <data name="title_openConnectionsMustBeClosed" xml:space="preserve"> <value>Открытые соединения</value> </data> <data name="warning_openConnectionsMustBeClosed" xml:space="preserve"> <value>Чтобы изменить свойства базы данных, SQL Server должен закрыть все остальные соединения с этой базой данных. Изменить свойства и закрыть остальные соединения?</value> </data> <data name="prototype_db_prop_databaseState_value_autoClosed" xml:space="preserve"> <value>AUTO_CLOSED</value> </data> <data name="prototype_db_prop_databaseState_value_emergency" xml:space="preserve"> <value>EMERGENCY</value> </data> <data name="prototype_db_prop_databaseState_value_inaccessible" xml:space="preserve"> <value>INACCESSIBLE</value> </data> <data name="prototype_db_prop_databaseState_value_normal" xml:space="preserve"> <value>NORMAL</value> </data> <data name="prototype_db_prop_databaseState_value_offline" xml:space="preserve"> <value>OFFLINE</value> </data> <data name="prototype_db_prop_databaseState_value_recovering" xml:space="preserve"> <value>RECOVERING</value> </data> <data name="prototype_db_prop_databaseState_value_recoveryPending" xml:space="preserve"> <value>RECOVERY PENDING</value> </data> <data name="prototype_db_prop_databaseState_value_restoring" xml:space="preserve"> <value>RESTORING</value> </data> <data name="prototype_db_prop_databaseState_value_shutdown" xml:space="preserve"> <value>SHUTDOWN</value> </data> <data name="prototype_db_prop_databaseState_value_standby" xml:space="preserve"> <value>STANDBY</value> </data> <data name="prototype_db_prop_databaseState_value_suspect" xml:space="preserve"> <value>SUSPECT</value> </data> <data name="prototype_db_prop_defaultCursor_value_global" xml:space="preserve"> <value>GLOBAL</value> </data> <data name="prototype_db_prop_defaultCursor_value_local" xml:space="preserve"> <value>LOCAL</value> </data> <data name="prototype_db_prop_restrictAccess_value_multiple" xml:space="preserve"> <value>MULTI_USER</value> </data> <data name="prototype_db_prop_restrictAccess_value_restricted" xml:space="preserve"> <value>RESTRICTED_USER</value> </data> <data name="prototype_db_prop_restrictAccess_value_single" xml:space="preserve"> <value>SINGLE_USER</value> </data> <data name="prototype_db_prop_pageVerify_value_checksum" xml:space="preserve"> <value>CHECKSUM</value> </data> <data name="prototype_db_prop_pageVerify_value_none" xml:space="preserve"> <value>Нет</value> </data> <data name="prototype_db_prop_pageVerify_value_tornPageDetection" xml:space="preserve"> <value>TORN_PAGE_DETECTION</value> </data> <data name="prototype_db_prop_varDecimalEnabled" xml:space="preserve"> <value>Включен формат хранения VarDecimal</value> </data> <data name="compatibilityLevel_katmai" xml:space="preserve"> <value>SQL Server 2008 (100)</value> </data> <data name="prototype_db_prop_encryptionEnabled" xml:space="preserve"> <value>Шифрование включено</value> </data> <data name="prototype_db_prop_databasescopedconfig_value_off" xml:space="preserve"> <value>ОТКЛ.</value> </data> <data name="prototype_db_prop_databasescopedconfig_value_on" xml:space="preserve"> <value>ВКЛ.</value> </data> <data name="prototype_db_prop_databasescopedconfig_value_primary" xml:space="preserve"> <value>ПЕРВИЧНЫЙ</value> </data> <data name="error_db_prop_invalidleadingColumns" xml:space="preserve"> <value>Для политики распространения HASH количество начальных хэш-столбцов указывать не обязательно. Оно может составлять от 1 до 16 столбцов</value> </data> <data name="compatibilityLevel_denali" xml:space="preserve"> <value>SQL Server 2012 (110)</value> </data> <data name="compatibilityLevel_sql14" xml:space="preserve"> <value>SQL Server 2014 (120)</value> </data> <data name="compatibilityLevel_sql15" xml:space="preserve"> <value>SQL Server 2016 (130)</value> </data> <data name="compatibilityLevel_sqlvNext" xml:space="preserve"> <value>SQL Server vNext (140)</value> </data> <data name="general_containmentType_None" xml:space="preserve"> <value>Нет</value> </data> <data name="general_containmentType_Partial" xml:space="preserve"> <value>Частично</value> </data> <data name="filegroups_filestreamFiles" xml:space="preserve"> <value>Файлы FILESTREAM</value> </data> <data name="prototype_file_noApplicableFileGroup" xml:space="preserve"> <value>Применимая файловая группа отсутствует</value> </data> <data name="DatabaseNotAccessible" xml:space="preserve"> <value>База данных {0} недоступна.</value> </data> <data name="QueryServiceResultSetHasNoResults" xml:space="preserve"> <value>запрос не имеет результатов</value> </data> <data name="QueryServiceResultSetTooLarge" xml:space="preserve"> <value>Pезультатов слишком много строк для безопасной загрузки</value> </data> <data name="prototype_db_prop_parameterization" xml:space="preserve"> <value>Параметризация</value> </data> <data name="ConflictWithNoRecovery" xml:space="preserve"> <value>Не разрешается указывать этот параметр при восстановлении резервной копии с параметром NORECOVERY.</value> </data> <data name="InvalidPathForDatabaseFile" xml:space="preserve"> <value>Недопустимый путь к файлу базы данных: {0}""""</value> </data> <data name="Log" xml:space="preserve"> <value>Журнал</value> </data> <data name="RestorePlanFailed" xml:space="preserve"> <value>Не удалось создать план восстановления </value> </data> <data name="RestoreNotSupported" xml:space="preserve"> <value>Восстановление базы данных не поддерживается</value> </data> <data name="RestoreTaskName" xml:space="preserve"> <value>Восстановление базы данных</value> </data> <data name="RestoreCopyOnly" xml:space="preserve"> <value>(Копировать только)</value> </data> <data name="RestoreBackupSetComponent" xml:space="preserve"> <value>Тип копии</value> </data> <data name="RestoreBackupSetType" xml:space="preserve"> <value>Тип</value> </data> <data name="RestoreBackupSetServer" xml:space="preserve"> <value>Сервер</value> </data> <data name="RestoreBackupSetDatabase" xml:space="preserve"> <value>База данных</value> </data> <data name="RestoreBackupSetPosition" xml:space="preserve"> <value>Положение</value> </data> <data name="RestoreBackupSetFirstLsn" xml:space="preserve"> <value>Первый номер LSN</value> </data> <data name="RestoreBackupSetLastLsn" xml:space="preserve"> <value>Последний номер LSN</value> </data> <data name="RestoreBackupSetCheckpointLsn" xml:space="preserve"> <value>Номер LSN для контрольной точки</value> </data> <data name="RestoreBackupSetFullLsn" xml:space="preserve"> <value>Полный номер LSN</value> </data> <data name="RestoreBackupSetStartDate" xml:space="preserve"> <value>Дата начала</value> </data> <data name="RestoreBackupSetFinishDate" xml:space="preserve"> <value>Дата завершения</value> </data> <data name="RestoreBackupSetSize" xml:space="preserve"> <value>Размер</value> </data> <data name="RestoreBackupSetUserName" xml:space="preserve"> <value>Имя пользователя</value> </data> <data name="RestoreBackupSetExpiration" xml:space="preserve"> <value>Истечение срока</value> </data> <data name="RestoreBackupSetName" xml:space="preserve"> <value>Имя</value> </data> <data name="TheLastBackupTaken" xml:space="preserve"> <value>Последняя созданная резервная копия ({0})</value> </data> <data name="BackupTaskName" xml:space="preserve"> <value>Создание резервной копии базы данных</value> </data> <data name="TaskInProgress" xml:space="preserve"> <value>Выполняется</value> </data> <data name="TaskCompleted" xml:space="preserve"> <value>Завершен</value> </data> <data name="ScriptTaskName" xml:space="preserve"> <value>Скрипты</value> </data> <data name="ProfilerConnectionNotFound" xml:space="preserve"> <value>Соединение не найдено</value> </data> <data name="BackupPathIsFolderError" xml:space="preserve"> <value>Указанное имя файла является также именем каталога: {0}</value> </data> <data name="InvalidBackupPathError" xml:space="preserve"> <value>Невозможно проверить существование расположения файла резервной копии: {0}</value> </data> <data name="InvalidPathError" xml:space="preserve"> <value>Указанный путь на сервере недоступен: {0}</value> </data> <data name="NoBackupsetsToRestore" xml:space="preserve"> <value>Для восстановления не выбран резервный набор данных</value> </data> <data name="NeverBackedUp" xml:space="preserve"> <value>Никогда </value> </data> </root>
{ "pile_set_name": "Github" }
/// <reference path="fourslash.ts" /> // @Filename: /a.ts ////export const a = 'a'; // @Filename: /b.ts ////import "./anything.json"; //// ////a/**/ goTo.file("/b.ts"); verify.importFixAtPosition([`import { a } from "./a"; import "./anything.json"; a`]);
{ "pile_set_name": "Github" }
#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable kernel void _atom_add(global ulong *data) { atom_add(data, (ulong)UINT_MAX); }
{ "pile_set_name": "Github" }
package chipmunk import ( //"container/list" "github.com/vova616/chipmunk/vect" //"log" "time" ) var VoidQueryFunc = func(a, b Indexable) {} type HashSet map[HashValue]*Node func (set HashSet) Each(fnc HashSetIterator) { for _, node := range set { fnc(node) } } type BBTree struct { SpatialIndexClass SpatialIndex *SpatialIndex leaves HashSet root *Node pairBuffer []*Pair nodeBuffer []*Node stamp time.Duration } type Children struct { A, B *Node } type Leaf struct { stamp time.Duration pairs *Pair } type node struct { Children Leaf } type Node struct { obj Indexable bb AABB parent *Node node } func (node *Node) IsLeaf() bool { return node.obj != nil } func (node *Node) NodeSetA(value *Node) { node.A = value value.parent = node } func (node *Node) NodeSetB(value *Node) { node.B = value value.parent = node } func (node *Node) NodeOther(child *Node) *Node { if node.A == child { return node.B } return node.A } type Thread struct { prev *Pair leaf *Node next *Pair } type Pair struct { a, b Thread } func NewBBTree(staticIndex *SpatialIndex) *SpatialIndex { tree := &BBTree{} tree.leaves = make(map[HashValue]*Node) tree.SpatialIndex = NewSpartialIndex(tree, staticIndex) tree.pairBuffer = make([]*Pair, 0) tree.nodeBuffer = make([]*Node, 0) return tree.SpatialIndex } func (tree *BBTree) Count() int { return len(tree.leaves) } func (tree *BBTree) NewLeaf(obj Indexable) *Node { node := tree.NodeFromPool() node.obj = obj node.bb = tree.GetBB(obj) return node } func (tree *BBTree) NodeNew(a, b *Node) *Node { node := tree.NodeFromPool() node.bb = CombinePtr(&a.bb, &b.bb) node.NodeSetA(a) node.NodeSetB(b) return node } func (tree *BBTree) GetBB(obj Indexable) AABB { v, ok := obj.Velocity() if ok { bb := obj.AABB() coef := vect.Float(0.1) l := bb.Lower.X b := bb.Lower.Y r := bb.Upper.X t := bb.Upper.Y x := (r - l) * coef y := (t - b) * coef v = vect.Mult(v, 0.1) return NewAABB(l+vect.FMin(-x, v.X), b+vect.FMin(-y, v.Y), r+vect.FMax(x, v.X), t+vect.FMax(y, v.Y)) } return obj.AABB() } func (tree *BBTree) SubtreeInsert(subtree, leaf *Node) *Node { if subtree == nil { return leaf } else if subtree.IsLeaf() { return tree.NodeNew(leaf, subtree) } cost_a := subtree.B.bb.Area() + MergedAreaPtr(&subtree.A.bb, &leaf.bb) cost_b := subtree.A.bb.Area() + MergedAreaPtr(&subtree.B.bb, &leaf.bb) if cost_a == cost_b { cost_a = ProximityPtr(&subtree.A.bb, &leaf.bb) cost_b = ProximityPtr(&subtree.B.bb, &leaf.bb) } if cost_b < cost_a { subtree.NodeSetB(tree.SubtreeInsert(subtree.B, leaf)) } else { subtree.NodeSetA(tree.SubtreeInsert(subtree.A, leaf)) } subtree.bb = CombinePtr(&subtree.bb, &leaf.bb) return subtree } func GetTree(index SpatialIndexClass) *BBTree { if index != nil { tree, _ := index.(*BBTree) return tree } return nil } func (tree *BBTree) GetMasterTree() SpatialIndexClass { dynamicTree := tree.SpatialIndex.dynamicIndex if dynamicTree != nil { return dynamicTree } return tree } func (tree *BBTree) GetMasterTreeStamp() time.Duration { dynamicTree := tree.SpatialIndex.dynamicIndex if dynamicTree != nil { return dynamicTree.Stamp() } return tree.stamp } func (tree *BBTree) Stamp() time.Duration { return tree.stamp } func GetRootIfTree(index SpatialIndexClass) *Node { if index != nil { tree, ok := index.(*BBTree) if ok { return tree.root } } return nil } func (tree *BBTree) LeafAddPairs(leaf *Node) { dynamicIndex := tree.SpatialIndex.dynamicIndex if dynamicIndex != nil { dynamicRoot := GetRootIfTree(dynamicIndex) if dynamicRoot != nil { dynamicTree := GetTree(dynamicIndex) context := MarkContext{dynamicTree, nil, nil} context.MarkLeafQuery(dynamicRoot, leaf, true) } } else { staticRoot := GetRootIfTree(tree.SpatialIndex.staticIndex) context := MarkContext{tree, staticRoot, VoidQueryFunc} context.MarkLeaf(leaf) } } func (tree *BBTree) IncrementStamp() { dynamicTree := GetTree(tree.SpatialIndex.dynamicIndex) if dynamicTree != nil { dynamicTree.stamp++ } else { tree.stamp++ } } func (tree *BBTree) Insert(obj Indexable) { leaf := tree.NewLeaf(obj) tree.leaves[obj.Hash()] = leaf root := tree.root tree.root = tree.SubtreeInsert(root, leaf) leaf.stamp = tree.GetMasterTree().Stamp() tree.LeafAddPairs(leaf) tree.IncrementStamp() } func (tree *BBTree) PairInsert(a, b *Node) { nextA := a.pairs nextB := b.pairs pair := tree.PairFromPool() b.pairs = pair a.pairs = pair *pair = Pair{Thread{nil, a, nextA}, Thread{nil, b, nextB}} if nextA != nil { if nextA.a.leaf == a { nextA.a.prev = pair } else { nextA.b.prev = pair } } if nextB != nil { if nextB.a.leaf == b { nextB.a.prev = pair } else { nextB.b.prev = pair } } } func (tree *BBTree) NodeRecycle(node *Node) { *node = Node{} tree.nodeBuffer = append(tree.nodeBuffer, node) } func (tree *BBTree) NodeFromPool() *Node { var node *Node if len(tree.nodeBuffer) > 0 { node, tree.nodeBuffer = tree.nodeBuffer[len(tree.nodeBuffer)-1], tree.nodeBuffer[:len(tree.nodeBuffer)-1] } else { buff := make([]*Node, 100) //log.Println("New node buff") for i, _ := range buff { buff[i] = &Node{} } tree.nodeBuffer = append(tree.nodeBuffer, buff...) node, tree.nodeBuffer = tree.nodeBuffer[len(tree.nodeBuffer)-1], tree.nodeBuffer[:len(tree.nodeBuffer)-1] } return node } func (tree *BBTree) PairRecycle(pair *Pair) { *pair = Pair{} tree.pairBuffer = append(tree.pairBuffer, pair) } func (tree *BBTree) PairFromPool() *Pair { var pair *Pair if len(tree.pairBuffer) > 0 { pair, tree.pairBuffer = tree.pairBuffer[len(tree.pairBuffer)-1], tree.pairBuffer[:len(tree.pairBuffer)-1] } else { buff := make([]*Pair, 100) //log.Println("New pair buff") for i, _ := range buff { buff[i] = &Pair{} } tree.pairBuffer = append(tree.pairBuffer, buff...) pair, tree.pairBuffer = tree.pairBuffer[len(tree.pairBuffer)-1], tree.pairBuffer[:len(tree.pairBuffer)-1] } return pair } func (tree *BBTree) NodeReplaceChild(parent, child, value *Node) { if parent.IsLeaf() { panic("Internal Error: Cannot replace child of a leaf.") } if (child == parent.A || child == parent.B) == false { panic("Internal Error: Node is not a child of parent.") } if parent.A == child { tree.NodeRecycle(parent.A) parent.NodeSetA(value) } else { tree.NodeRecycle(parent.B) parent.NodeSetB(value) } for node := parent; node != nil; node = node.parent { node.bb = CombinePtr(&node.A.bb, &node.B.bb) } } func (tree *BBTree) Remove(obj Indexable) { leaf := tree.leaves[obj.Hash()] delete(tree.leaves, obj.Hash()) if leaf == nil { return } tree.root = tree.SubtreeRemove(tree.root, leaf) tree.PairsClear(leaf) tree.NodeRecycle(leaf) } func (tree *BBTree) SubtreeRemove(subtree, leaf *Node) *Node { if leaf == subtree { return nil } parent := leaf.parent if parent == subtree { other := subtree.NodeOther(leaf) other.parent = subtree.parent tree.NodeRecycle(subtree) return other } tree.NodeReplaceChild(parent.parent, parent, parent.NodeOther(leaf)) return subtree } func ThreadUnlink(thread Thread) { next := thread.next prev := thread.prev if next != nil { if next.a.leaf == thread.leaf { next.a.prev = prev } else { next.b.prev = prev } } if prev != nil { if prev.a.leaf == thread.leaf { prev.a.next = next } else { prev.b.next = next } } else { thread.leaf.pairs = next } } func (tree *BBTree) PairsClear(leaf *Node) { pair := leaf.pairs leaf.pairs = nil for pair != nil { if pair.a.leaf == leaf { next := pair.a.next ThreadUnlink(pair.b) tree.PairRecycle(pair) pair = next } else { next := pair.b.next ThreadUnlink(pair.a) tree.PairRecycle(pair) pair = next } } } func LeafUpdate(leaf *Node, tree *BBTree) bool { root := tree.root if !leaf.bb.Contains(leaf.obj.AABB()) { leaf.bb = tree.GetBB(leaf.obj) root = tree.SubtreeRemove(root, leaf) tree.root = tree.SubtreeInsert(root, leaf) tree.PairsClear(leaf) leaf.stamp = tree.GetMasterTree().Stamp() return true } return false } func (tree *BBTree) Each(fnc HashSetIterator) { tree.leaves.Each(fnc) } func (tree *BBTree) ReindexQuery(fnc SpatialIndexQueryFunc) { if tree.root == nil { return } // LeafUpdate() may modify tree->root. Don't cache it. for _, node := range tree.leaves { LeafUpdate(node, tree) } staticIndex := GetTree(tree.SpatialIndex.staticIndex) var staticRoot *Node = nil if staticIndex != nil { staticRoot = staticIndex.root } context := MarkContext{tree, staticRoot, fnc} context.MarkSubtree(tree.root) if staticIndex != nil && staticRoot == nil { SpatialIndexCollideStatic(tree.SpatialIndex, staticIndex.SpatialIndex, fnc) } tree.IncrementStamp() } func (tree *BBTree) Query(obj Indexable, aabb AABB, fnc SpatialIndexQueryFunc) { if tree.root != nil { SubtreeQuery(tree.root, obj, aabb, fnc) } } func SubtreeQuery(subtree *Node, obj Indexable, bb AABB, fnc SpatialIndexQueryFunc) { if TestOverlap(subtree.bb, bb) { if subtree.IsLeaf() { fnc(obj, subtree.obj) } else { SubtreeQuery(subtree.A, obj, bb, fnc) SubtreeQuery(subtree.B, obj, bb, fnc) } } } type MarkContext struct { tree *BBTree staticRoot *Node fnc SpatialIndexQueryFunc } func (context *MarkContext) MarkSubtree(subtree *Node) { if subtree.IsLeaf() { context.MarkLeaf(subtree) } else { context.MarkSubtree(subtree.A) context.MarkSubtree(subtree.B) } } func (context *MarkContext) MarkLeafQuery(subtree, leaf *Node, left bool) { if TestOverlapPtr(&leaf.bb, &subtree.bb) { if subtree.IsLeaf() { if left { context.tree.PairInsert(leaf, subtree) } else { if subtree.stamp < leaf.stamp { context.tree.PairInsert(subtree, leaf) } context.fnc(leaf.obj, subtree.obj) } } else { context.MarkLeafQuery(subtree.A, leaf, left) context.MarkLeafQuery(subtree.B, leaf, left) } } } func (context *MarkContext) MarkLeaf(leaf *Node) { tree := context.tree if leaf.stamp == tree.GetMasterTreeStamp() { staticRoot := context.staticRoot if staticRoot != nil { context.MarkLeafQuery(staticRoot, leaf, false) } for node := leaf; node.parent != nil; node = node.parent { if node == node.parent.A { context.MarkLeafQuery(node.parent.B, leaf, true) } else { context.MarkLeafQuery(node.parent.A, leaf, false) } } } else { pair := leaf.pairs i := 0 for pair != nil { if leaf == pair.b.leaf { context.fnc(pair.a.leaf.obj, leaf.obj) pair = pair.b.next } else { pair = pair.a.next } i++ } //fmt.Println(i) } }
{ "pile_set_name": "Github" }
// // INPersonHandleLabel.h // Intents // // Copyright (c) 2016-2020 Apple Inc. All rights reserved. // #import <Foundation/Foundation.h> #import <Intents/IntentsDefines.h> typedef NSString *INPersonHandleLabel NS_TYPED_EXTENSIBLE_ENUM; INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelHome NS_SWIFT_NAME(INPersonHandleLabel.home) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelWork NS_SWIFT_NAME(INPersonHandleLabel.work) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabeliPhone NS_SWIFT_NAME(INPersonHandleLabel.iPhone) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelMobile NS_SWIFT_NAME(INPersonHandleLabel.mobile) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelMain NS_SWIFT_NAME(INPersonHandleLabel.main) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelHomeFax NS_SWIFT_NAME(INPersonHandleLabel.homeFax) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelWorkFax NS_SWIFT_NAME(INPersonHandleLabel.workFax) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelPager NS_SWIFT_NAME(INPersonHandleLabel.pager) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos); INTENTS_EXTERN INPersonHandleLabel const INPersonHandleLabelOther NS_SWIFT_NAME(INPersonHandleLabel.other) API_AVAILABLE(ios(10.2), watchos(3.2)) API_UNAVAILABLE(macos, tvos);
{ "pile_set_name": "Github" }
// Copyright 2014 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package expfmt import ( "bufio" "bytes" "fmt" "io" "math" "strconv" "strings" dto "github.com/prometheus/client_model/go" "github.com/golang/protobuf/proto" "github.com/prometheus/common/model" ) // A stateFn is a function that represents a state in a state machine. By // executing it, the state is progressed to the next state. The stateFn returns // another stateFn, which represents the new state. The end state is represented // by nil. type stateFn func() stateFn // ParseError signals errors while parsing the simple and flat text-based // exchange format. type ParseError struct { Line int Msg string } // Error implements the error interface. func (e ParseError) Error() string { return fmt.Sprintf("text format parsing error in line %d: %s", e.Line, e.Msg) } // TextParser is used to parse the simple and flat text-based exchange format. Its // zero value is ready to use. type TextParser struct { metricFamiliesByName map[string]*dto.MetricFamily buf *bufio.Reader // Where the parsed input is read through. err error // Most recent error. lineCount int // Tracks the line count for error messages. currentByte byte // The most recent byte read. currentToken bytes.Buffer // Re-used each time a token has to be gathered from multiple bytes. currentMF *dto.MetricFamily currentMetric *dto.Metric currentLabelPair *dto.LabelPair // The remaining member variables are only used for summaries/histograms. currentLabels map[string]string // All labels including '__name__' but excluding 'quantile'/'le' // Summary specific. summaries map[uint64]*dto.Metric // Key is created with LabelsToSignature. currentQuantile float64 // Histogram specific. histograms map[uint64]*dto.Metric // Key is created with LabelsToSignature. currentBucket float64 // These tell us if the currently processed line ends on '_count' or // '_sum' respectively and belong to a summary/histogram, representing the sample // count and sum of that summary/histogram. currentIsSummaryCount, currentIsSummarySum bool currentIsHistogramCount, currentIsHistogramSum bool } // TextToMetricFamilies reads 'in' as the simple and flat text-based exchange // format and creates MetricFamily proto messages. It returns the MetricFamily // proto messages in a map where the metric names are the keys, along with any // error encountered. // // If the input contains duplicate metrics (i.e. lines with the same metric name // and exactly the same label set), the resulting MetricFamily will contain // duplicate Metric proto messages. Similar is true for duplicate label // names. Checks for duplicates have to be performed separately, if required. // Also note that neither the metrics within each MetricFamily are sorted nor // the label pairs within each Metric. Sorting is not required for the most // frequent use of this method, which is sample ingestion in the Prometheus // server. However, for presentation purposes, you might want to sort the // metrics, and in some cases, you must sort the labels, e.g. for consumption by // the metric family injection hook of the Prometheus registry. // // Summaries and histograms are rather special beasts. You would probably not // use them in the simple text format anyway. This method can deal with // summaries and histograms if they are presented in exactly the way the // text.Create function creates them. // // This method must not be called concurrently. If you want to parse different // input concurrently, instantiate a separate Parser for each goroutine. func (p *TextParser) TextToMetricFamilies(in io.Reader) (map[string]*dto.MetricFamily, error) { p.reset(in) for nextState := p.startOfLine; nextState != nil; nextState = nextState() { // Magic happens here... } // Get rid of empty metric families. for k, mf := range p.metricFamiliesByName { if len(mf.GetMetric()) == 0 { delete(p.metricFamiliesByName, k) } } // If p.err is io.EOF now, we have run into a premature end of the input // stream. Turn this error into something nicer and more // meaningful. (io.EOF is often used as a signal for the legitimate end // of an input stream.) if p.err == io.EOF { p.parseError("unexpected end of input stream") } return p.metricFamiliesByName, p.err } func (p *TextParser) reset(in io.Reader) { p.metricFamiliesByName = map[string]*dto.MetricFamily{} if p.buf == nil { p.buf = bufio.NewReader(in) } else { p.buf.Reset(in) } p.err = nil p.lineCount = 0 if p.summaries == nil || len(p.summaries) > 0 { p.summaries = map[uint64]*dto.Metric{} } if p.histograms == nil || len(p.histograms) > 0 { p.histograms = map[uint64]*dto.Metric{} } p.currentQuantile = math.NaN() p.currentBucket = math.NaN() } // startOfLine represents the state where the next byte read from p.buf is the // start of a line (or whitespace leading up to it). func (p *TextParser) startOfLine() stateFn { p.lineCount++ if p.skipBlankTab(); p.err != nil { // End of input reached. This is the only case where // that is not an error but a signal that we are done. p.err = nil return nil } switch p.currentByte { case '#': return p.startComment case '\n': return p.startOfLine // Empty line, start the next one. } return p.readingMetricName } // startComment represents the state where the next byte read from p.buf is the // start of a comment (or whitespace leading up to it). func (p *TextParser) startComment() stateFn { if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.currentByte == '\n' { return p.startOfLine } if p.readTokenUntilWhitespace(); p.err != nil { return nil // Unexpected end of input. } // If we have hit the end of line already, there is nothing left // to do. This is not considered a syntax error. if p.currentByte == '\n' { return p.startOfLine } keyword := p.currentToken.String() if keyword != "HELP" && keyword != "TYPE" { // Generic comment, ignore by fast forwarding to end of line. for p.currentByte != '\n' { if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { return nil // Unexpected end of input. } } return p.startOfLine } // There is something. Next has to be a metric name. if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.readTokenAsMetricName(); p.err != nil { return nil // Unexpected end of input. } if p.currentByte == '\n' { // At the end of the line already. // Again, this is not considered a syntax error. return p.startOfLine } if !isBlankOrTab(p.currentByte) { p.parseError("invalid metric name in comment") return nil } p.setOrCreateCurrentMF() if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.currentByte == '\n' { // At the end of the line already. // Again, this is not considered a syntax error. return p.startOfLine } switch keyword { case "HELP": return p.readingHelp case "TYPE": return p.readingType } panic(fmt.Sprintf("code error: unexpected keyword %q", keyword)) } // readingMetricName represents the state where the last byte read (now in // p.currentByte) is the first byte of a metric name. func (p *TextParser) readingMetricName() stateFn { if p.readTokenAsMetricName(); p.err != nil { return nil } if p.currentToken.Len() == 0 { p.parseError("invalid metric name") return nil } p.setOrCreateCurrentMF() // Now is the time to fix the type if it hasn't happened yet. if p.currentMF.Type == nil { p.currentMF.Type = dto.MetricType_UNTYPED.Enum() } p.currentMetric = &dto.Metric{} // Do not append the newly created currentMetric to // currentMF.Metric right now. First wait if this is a summary, // and the metric exists already, which we can only know after // having read all the labels. if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { return nil // Unexpected end of input. } return p.readingLabels } // readingLabels represents the state where the last byte read (now in // p.currentByte) is either the first byte of the label set (i.e. a '{'), or the // first byte of the value (otherwise). func (p *TextParser) readingLabels() stateFn { // Summaries/histograms are special. We have to reset the // currentLabels map, currentQuantile and currentBucket before starting to // read labels. if p.currentMF.GetType() == dto.MetricType_SUMMARY || p.currentMF.GetType() == dto.MetricType_HISTOGRAM { p.currentLabels = map[string]string{} p.currentLabels[string(model.MetricNameLabel)] = p.currentMF.GetName() p.currentQuantile = math.NaN() p.currentBucket = math.NaN() } if p.currentByte != '{' { return p.readingValue } return p.startLabelName } // startLabelName represents the state where the next byte read from p.buf is // the start of a label name (or whitespace leading up to it). func (p *TextParser) startLabelName() stateFn { if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.currentByte == '}' { if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } return p.readingValue } if p.readTokenAsLabelName(); p.err != nil { return nil // Unexpected end of input. } if p.currentToken.Len() == 0 { p.parseError(fmt.Sprintf("invalid label name for metric %q", p.currentMF.GetName())) return nil } p.currentLabelPair = &dto.LabelPair{Name: proto.String(p.currentToken.String())} if p.currentLabelPair.GetName() == string(model.MetricNameLabel) { p.parseError(fmt.Sprintf("label name %q is reserved", model.MetricNameLabel)) return nil } // Special summary/histogram treatment. Don't add 'quantile' and 'le' // labels to 'real' labels. if !(p.currentMF.GetType() == dto.MetricType_SUMMARY && p.currentLabelPair.GetName() == model.QuantileLabel) && !(p.currentMF.GetType() == dto.MetricType_HISTOGRAM && p.currentLabelPair.GetName() == model.BucketLabel) { p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPair) } if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.currentByte != '=' { p.parseError(fmt.Sprintf("expected '=' after label name, found %q", p.currentByte)) return nil } return p.startLabelValue } // startLabelValue represents the state where the next byte read from p.buf is // the start of a (quoted) label value (or whitespace leading up to it). func (p *TextParser) startLabelValue() stateFn { if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.currentByte != '"' { p.parseError(fmt.Sprintf("expected '\"' at start of label value, found %q", p.currentByte)) return nil } if p.readTokenAsLabelValue(); p.err != nil { return nil } if !model.LabelValue(p.currentToken.String()).IsValid() { p.parseError(fmt.Sprintf("invalid label value %q", p.currentToken.String())) return nil } p.currentLabelPair.Value = proto.String(p.currentToken.String()) // Special treatment of summaries: // - Quantile labels are special, will result in dto.Quantile later. // - Other labels have to be added to currentLabels for signature calculation. if p.currentMF.GetType() == dto.MetricType_SUMMARY { if p.currentLabelPair.GetName() == model.QuantileLabel { if p.currentQuantile, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) return nil } } else { p.currentLabels[p.currentLabelPair.GetName()] = p.currentLabelPair.GetValue() } } // Similar special treatment of histograms. if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { if p.currentLabelPair.GetName() == model.BucketLabel { if p.currentBucket, p.err = strconv.ParseFloat(p.currentLabelPair.GetValue(), 64); p.err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue())) return nil } } else { p.currentLabels[p.currentLabelPair.GetName()] = p.currentLabelPair.GetValue() } } if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } switch p.currentByte { case ',': return p.startLabelName case '}': if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } return p.readingValue default: p.parseError(fmt.Sprintf("unexpected end of label value %q", p.currentLabelPair.Value)) return nil } } // readingValue represents the state where the last byte read (now in // p.currentByte) is the first byte of the sample value (i.e. a float). func (p *TextParser) readingValue() stateFn { // When we are here, we have read all the labels, so for the // special case of a summary/histogram, we can finally find out // if the metric already exists. if p.currentMF.GetType() == dto.MetricType_SUMMARY { signature := model.LabelsToSignature(p.currentLabels) if summary := p.summaries[signature]; summary != nil { p.currentMetric = summary } else { p.summaries[signature] = p.currentMetric p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) } } else if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { signature := model.LabelsToSignature(p.currentLabels) if histogram := p.histograms[signature]; histogram != nil { p.currentMetric = histogram } else { p.histograms[signature] = p.currentMetric p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) } } else { p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) } if p.readTokenUntilWhitespace(); p.err != nil { return nil // Unexpected end of input. } value, err := strconv.ParseFloat(p.currentToken.String(), 64) if err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String())) return nil } switch p.currentMF.GetType() { case dto.MetricType_COUNTER: p.currentMetric.Counter = &dto.Counter{Value: proto.Float64(value)} case dto.MetricType_GAUGE: p.currentMetric.Gauge = &dto.Gauge{Value: proto.Float64(value)} case dto.MetricType_UNTYPED: p.currentMetric.Untyped = &dto.Untyped{Value: proto.Float64(value)} case dto.MetricType_SUMMARY: // *sigh* if p.currentMetric.Summary == nil { p.currentMetric.Summary = &dto.Summary{} } switch { case p.currentIsSummaryCount: p.currentMetric.Summary.SampleCount = proto.Uint64(uint64(value)) case p.currentIsSummarySum: p.currentMetric.Summary.SampleSum = proto.Float64(value) case !math.IsNaN(p.currentQuantile): p.currentMetric.Summary.Quantile = append( p.currentMetric.Summary.Quantile, &dto.Quantile{ Quantile: proto.Float64(p.currentQuantile), Value: proto.Float64(value), }, ) } case dto.MetricType_HISTOGRAM: // *sigh* if p.currentMetric.Histogram == nil { p.currentMetric.Histogram = &dto.Histogram{} } switch { case p.currentIsHistogramCount: p.currentMetric.Histogram.SampleCount = proto.Uint64(uint64(value)) case p.currentIsHistogramSum: p.currentMetric.Histogram.SampleSum = proto.Float64(value) case !math.IsNaN(p.currentBucket): p.currentMetric.Histogram.Bucket = append( p.currentMetric.Histogram.Bucket, &dto.Bucket{ UpperBound: proto.Float64(p.currentBucket), CumulativeCount: proto.Uint64(uint64(value)), }, ) } default: p.err = fmt.Errorf("unexpected type for metric name %q", p.currentMF.GetName()) } if p.currentByte == '\n' { return p.startOfLine } return p.startTimestamp } // startTimestamp represents the state where the next byte read from p.buf is // the start of the timestamp (or whitespace leading up to it). func (p *TextParser) startTimestamp() stateFn { if p.skipBlankTab(); p.err != nil { return nil // Unexpected end of input. } if p.readTokenUntilWhitespace(); p.err != nil { return nil // Unexpected end of input. } timestamp, err := strconv.ParseInt(p.currentToken.String(), 10, 64) if err != nil { // Create a more helpful error message. p.parseError(fmt.Sprintf("expected integer as timestamp, got %q", p.currentToken.String())) return nil } p.currentMetric.TimestampMs = proto.Int64(timestamp) if p.readTokenUntilNewline(false); p.err != nil { return nil // Unexpected end of input. } if p.currentToken.Len() > 0 { p.parseError(fmt.Sprintf("spurious string after timestamp: %q", p.currentToken.String())) return nil } return p.startOfLine } // readingHelp represents the state where the last byte read (now in // p.currentByte) is the first byte of the docstring after 'HELP'. func (p *TextParser) readingHelp() stateFn { if p.currentMF.Help != nil { p.parseError(fmt.Sprintf("second HELP line for metric name %q", p.currentMF.GetName())) return nil } // Rest of line is the docstring. if p.readTokenUntilNewline(true); p.err != nil { return nil // Unexpected end of input. } p.currentMF.Help = proto.String(p.currentToken.String()) return p.startOfLine } // readingType represents the state where the last byte read (now in // p.currentByte) is the first byte of the type hint after 'HELP'. func (p *TextParser) readingType() stateFn { if p.currentMF.Type != nil { p.parseError(fmt.Sprintf("second TYPE line for metric name %q, or TYPE reported after samples", p.currentMF.GetName())) return nil } // Rest of line is the type. if p.readTokenUntilNewline(false); p.err != nil { return nil // Unexpected end of input. } metricType, ok := dto.MetricType_value[strings.ToUpper(p.currentToken.String())] if !ok { p.parseError(fmt.Sprintf("unknown metric type %q", p.currentToken.String())) return nil } p.currentMF.Type = dto.MetricType(metricType).Enum() return p.startOfLine } // parseError sets p.err to a ParseError at the current line with the given // message. func (p *TextParser) parseError(msg string) { p.err = ParseError{ Line: p.lineCount, Msg: msg, } } // skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte // that is neither ' ' nor '\t'. That byte is left in p.currentByte. func (p *TextParser) skipBlankTab() { for { if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil || !isBlankOrTab(p.currentByte) { return } } } // skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do // anything if p.currentByte is neither ' ' nor '\t'. func (p *TextParser) skipBlankTabIfCurrentBlankTab() { if isBlankOrTab(p.currentByte) { p.skipBlankTab() } } // readTokenUntilWhitespace copies bytes from p.buf into p.currentToken. The // first byte considered is the byte already read (now in p.currentByte). The // first whitespace byte encountered is still copied into p.currentByte, but not // into p.currentToken. func (p *TextParser) readTokenUntilWhitespace() { p.currentToken.Reset() for p.err == nil && !isBlankOrTab(p.currentByte) && p.currentByte != '\n' { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() } } // readTokenUntilNewline copies bytes from p.buf into p.currentToken. The first // byte considered is the byte already read (now in p.currentByte). The first // newline byte encountered is still copied into p.currentByte, but not into // p.currentToken. If recognizeEscapeSequence is true, two escape sequences are // recognized: '\\' translates into '\', and '\n' into a line-feed character. // All other escape sequences are invalid and cause an error. func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) { p.currentToken.Reset() escaped := false for p.err == nil { if recognizeEscapeSequence && escaped { switch p.currentByte { case '\\': p.currentToken.WriteByte(p.currentByte) case 'n': p.currentToken.WriteByte('\n') default: p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) return } escaped = false } else { switch p.currentByte { case '\n': return case '\\': escaped = true default: p.currentToken.WriteByte(p.currentByte) } } p.currentByte, p.err = p.buf.ReadByte() } } // readTokenAsMetricName copies a metric name from p.buf into p.currentToken. // The first byte considered is the byte already read (now in p.currentByte). // The first byte not part of a metric name is still copied into p.currentByte, // but not into p.currentToken. func (p *TextParser) readTokenAsMetricName() { p.currentToken.Reset() if !isValidMetricNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidMetricNameContinuation(p.currentByte) { return } } } // readTokenAsLabelName copies a label name from p.buf into p.currentToken. // The first byte considered is the byte already read (now in p.currentByte). // The first byte not part of a label name is still copied into p.currentByte, // but not into p.currentToken. func (p *TextParser) readTokenAsLabelName() { p.currentToken.Reset() if !isValidLabelNameStart(p.currentByte) { return } for { p.currentToken.WriteByte(p.currentByte) p.currentByte, p.err = p.buf.ReadByte() if p.err != nil || !isValidLabelNameContinuation(p.currentByte) { return } } } // readTokenAsLabelValue copies a label value from p.buf into p.currentToken. // In contrast to the other 'readTokenAs...' functions, which start with the // last read byte in p.currentByte, this method ignores p.currentByte and starts // with reading a new byte from p.buf. The first byte not part of a label value // is still copied into p.currentByte, but not into p.currentToken. func (p *TextParser) readTokenAsLabelValue() { p.currentToken.Reset() escaped := false for { if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { return } if escaped { switch p.currentByte { case '"', '\\': p.currentToken.WriteByte(p.currentByte) case 'n': p.currentToken.WriteByte('\n') default: p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) return } escaped = false continue } switch p.currentByte { case '"': return case '\n': p.parseError(fmt.Sprintf("label value %q contains unescaped new-line", p.currentToken.String())) return case '\\': escaped = true default: p.currentToken.WriteByte(p.currentByte) } } } func (p *TextParser) setOrCreateCurrentMF() { p.currentIsSummaryCount = false p.currentIsSummarySum = false p.currentIsHistogramCount = false p.currentIsHistogramSum = false name := p.currentToken.String() if p.currentMF = p.metricFamiliesByName[name]; p.currentMF != nil { return } // Try out if this is a _sum or _count for a summary/histogram. summaryName := summaryMetricName(name) if p.currentMF = p.metricFamiliesByName[summaryName]; p.currentMF != nil { if p.currentMF.GetType() == dto.MetricType_SUMMARY { if isCount(name) { p.currentIsSummaryCount = true } if isSum(name) { p.currentIsSummarySum = true } return } } histogramName := histogramMetricName(name) if p.currentMF = p.metricFamiliesByName[histogramName]; p.currentMF != nil { if p.currentMF.GetType() == dto.MetricType_HISTOGRAM { if isCount(name) { p.currentIsHistogramCount = true } if isSum(name) { p.currentIsHistogramSum = true } return } } p.currentMF = &dto.MetricFamily{Name: proto.String(name)} p.metricFamiliesByName[name] = p.currentMF } func isValidLabelNameStart(b byte) bool { return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' } func isValidLabelNameContinuation(b byte) bool { return isValidLabelNameStart(b) || (b >= '0' && b <= '9') } func isValidMetricNameStart(b byte) bool { return isValidLabelNameStart(b) || b == ':' } func isValidMetricNameContinuation(b byte) bool { return isValidLabelNameContinuation(b) || b == ':' } func isBlankOrTab(b byte) bool { return b == ' ' || b == '\t' } func isCount(name string) bool { return len(name) > 6 && name[len(name)-6:] == "_count" } func isSum(name string) bool { return len(name) > 4 && name[len(name)-4:] == "_sum" } func isBucket(name string) bool { return len(name) > 7 && name[len(name)-7:] == "_bucket" } func summaryMetricName(name string) string { switch { case isCount(name): return name[:len(name)-6] case isSum(name): return name[:len(name)-4] default: return name } } func histogramMetricName(name string) string { switch { case isCount(name): return name[:len(name)-6] case isSum(name): return name[:len(name)-4] case isBucket(name): return name[:len(name)-7] default: return name } }
{ "pile_set_name": "Github" }
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ios/chrome/browser/passwords/password_manager_internals_service_factory.h" #include <memory> #include <utility> #include "base/memory/singleton.h" #include "components/keyed_service/ios/browser_state_dependency_manager.h" #include "components/password_manager/core/browser/password_manager_internals_service.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" namespace ios { // static password_manager::PasswordManagerInternalsService* PasswordManagerInternalsServiceFactory::GetForBrowserState( ios::ChromeBrowserState* browser_state) { return static_cast<password_manager::PasswordManagerInternalsService*>( GetInstance()->GetServiceForBrowserState(browser_state, true)); } // static PasswordManagerInternalsServiceFactory* PasswordManagerInternalsServiceFactory::GetInstance() { return base::Singleton<PasswordManagerInternalsServiceFactory>::get(); } PasswordManagerInternalsServiceFactory::PasswordManagerInternalsServiceFactory() : BrowserStateKeyedServiceFactory( "PasswordManagerInternalsService", BrowserStateDependencyManager::GetInstance()) {} PasswordManagerInternalsServiceFactory:: ~PasswordManagerInternalsServiceFactory() {} std::unique_ptr<KeyedService> PasswordManagerInternalsServiceFactory::BuildServiceInstanceFor( web::BrowserState* context) const { return std::make_unique<password_manager::PasswordManagerInternalsService>(); } } // namespace ios
{ "pile_set_name": "Github" }
/* * Copyright (C) 2010-2101 Alibaba Group Holding Limited. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.otter.shared.communication.app; import com.alibaba.otter.shared.communication.app.event.AppCreateEvent; import com.alibaba.otter.shared.communication.app.event.AppDeleteEvent; import com.alibaba.otter.shared.communication.app.event.AppUpdateEvent; import com.alibaba.otter.shared.communication.core.model.Event; /** * @author jianghang 2011-9-13 下午08:30:48 */ public interface CommunicationAppService { public boolean onCreate(AppCreateEvent event); public boolean onUpdate(AppUpdateEvent event); public boolean onDelete(AppDeleteEvent event); public Event handleEvent(Event event); }
{ "pile_set_name": "Github" }
using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using WCell.Util; namespace WCell.Terrain.GUI.Renderers { public abstract class RendererBase : DrawableGameComponent { /// <summary> /// Boolean variable representing if all the rendering data has been cached. /// </summary> protected bool _renderCached; protected VertexBuffer vertBuffer; protected IndexBuffer idxBuffer; protected VertexPositionNormalColored[] _cachedVertices; protected int[] _cachedIndices; protected VertexDeclaration _vertexDeclaration; protected RendererBase(Game game) : base(game) { EnabledChanged += EnabledToggled; Disposed += (sender, args) => ClearBuffers(); } public TerrainViewer Viewer { get { return (TerrainViewer)Game; } } public VertexPositionNormalColored[] RenderingVerticies { get { if (!_renderCached) { DoBuildVerticesAndIndices(); } return _cachedVertices; } } public int[] RenderingIndices { get { return _cachedIndices; } } public override void Initialize() { base.Initialize(); _vertexDeclaration = new VertexDeclaration(VertexPositionNormalColored.VertexElements); } public override void Draw(GameTime gameTime) { if (!Enabled) return; if (!_renderCached) { DoBuildVerticesAndIndices(); } //if (_cachedVertices.IsNullOrEmpty()) return; //if (_cachedIndices.IsNullOrEmpty()) return; //GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.TriangleList, // _cachedVertices, 0, _cachedVertices.Length, // _cachedIndices, 0, _cachedIndices.Length/3); var vertices = vertBuffer; var indices = idxBuffer; if (vertices == null || vertices.VertexCount == 0) return; if (indices == null || indices.IndexCount == 0) return; GraphicsDevice.Indices = idxBuffer; GraphicsDevice.SetVertexBuffer(vertBuffer); GraphicsDevice.DrawIndexedPrimitives( PrimitiveType.TriangleList, 0, // the index of the base vertex, minVertexIndex and baseIndex are all relative to this 0, // the first vertex position drawn vertices.VertexCount, // number of vertices to draw 0, // first index element to read indices.IndexCount / 3); // the number of primitives to draw base.Draw(gameTime); } public virtual void Clear() { _renderCached = false; } void DoBuildVerticesAndIndices() { BuildVerticiesAndIndicies(); if (_cachedIndices.IsNullOrEmpty()) return; // interpolate normals for (var i = 0; i < _cachedIndices.Length; ) { var index1 = _cachedIndices[i++]; var index2 = _cachedIndices[i++]; var index3 = _cachedIndices[i++]; var vertex1 = _cachedVertices[index1]; var vertex2 = _cachedVertices[index2]; var vertex3 = _cachedVertices[index3]; var edge1 = vertex2.Position - vertex1.Position; var edge2 = vertex3.Position - vertex1.Position; var normal = Vector3.Cross(edge2, edge1); if (normal.Y < 0.0f) { // normal = -normal; } //var normal = Vector3.Up; _cachedVertices[index1].Normal += normal; _cachedVertices[index2].Normal += normal; _cachedVertices[index3].Normal += normal; } for (var i = 0; i < _cachedVertices.Length; i++) { _cachedVertices[i].Normal.Normalize(); } RebuildBuffers(); } void EnabledToggled(object sender, EventArgs e) { if (Enabled) BuildBuffers(); else ClearBuffers(); } protected void RebuildBuffers() { ClearBuffers(); BuildBuffers(); } protected void ClearBuffers() { if (vertBuffer != null) vertBuffer.Dispose(); if (idxBuffer != null) idxBuffer.Dispose(); } protected void BuildBuffers() { if (_cachedVertices.IsNullOrEmpty()) return; if (_cachedIndices.IsNullOrEmpty()) return; vertBuffer = new VertexBuffer(GraphicsDevice, _vertexDeclaration, _cachedVertices.Length, BufferUsage.WriteOnly); idxBuffer = new IndexBuffer(GraphicsDevice, typeof(int), _cachedIndices.Length, BufferUsage.WriteOnly); vertBuffer.SetData(_cachedVertices); idxBuffer.SetData(_cachedIndices); } protected abstract void BuildVerticiesAndIndicies(); } }
{ "pile_set_name": "Github" }
""" 包括生成树,二叉搜索树的前后中遍历。 二叉搜索树在比较优质的情况下搜索和插入时间都是 O(logn) 的。在极端情况下会退化为链表 O(n)。 将无序的链表塞进二叉搜索树里,按左根右中序遍历出来就是排序好的有序链表。 """ # 生成树操作。 class TreeNode(object): def __init__(self , val, left=None, right=None): self.val = val self.left = left self.right = right class binarySearchTree(object): """ 二叉搜索树, 它的性质是左边节点都小于根节点,右边的都大于根节点。 而且一般来说它是不存在重复元素的。 """ def __init__(self, root): if isinstance(root, TreeNode): print(1) self.root = root else: self.root = TreeNode(root) def add(self, value): # 从顶点开始遍历,找寻其合适的位置。 root = self.root while 1: if root.val < value: if root.right is None: if self.search(value): break root.right = TreeNode(value) break else: root = root.right continue if root.val > value: if root.left is None: if self.search(value): break root.left = TreeNode(value) break else: root = root.left continue if root.val == value: break def search(self, value): # 查找一个值是否存在于这颗树中。 return self._search(self.root, value) def _search(self, root, value): if root.val == value: return True if root.right: if root.val < value: return self._search(root.right, value) if root.left: if root.val > value: return self._search(root.left, value) return False def delete(self): pass def prevPrint(self): # 根左右 nodes = [self.root] result = [] while 1: if not nodes: return result node = nodes.pop() result.append(node.val) if node.right: nodes.append(node.right) if node.left: nodes.append(node.left) def _middlePrint(self, root, result): if root.left: self._middlePrint(root.left, result) result.append(root.val) if root.right: self._middlePrint(root.right,result) def middlePrint(self): # 左根右 result = [] self._middlePrint(self.root, result) return result def _suffPrint(self, root, result): if root.left: self._suffPrint(root.left, result) if root.right: self._suffPrint(root.right,result) result.append(root.val) def suffPrint(self): # 左右根 result = [] self._suffPrint(self.root, result) return result oneTree = binarySearchTree(5) for i in range(-5, 10): oneTree.add(i) print(oneTree.middlePrint()) print(oneTree.suffPrint())
{ "pile_set_name": "Github" }
// // NSString+MJExtension.m // MJExtensionExample // // Created by MJ Lee on 15/6/7. // Copyright (c) 2015年 小码哥. All rights reserved. // #import "NSString+MJExtension.h" @implementation NSString (MJExtension) - (NSString *)mj_underlineFromCamel { if (self.length == 0) return self; NSMutableString *string = [NSMutableString string]; for (NSUInteger i = 0; i<self.length; i++) { unichar c = [self characterAtIndex:i]; NSString *cString = [NSString stringWithFormat:@"%c", c]; NSString *cStringLower = [cString lowercaseString]; if ([cString isEqualToString:cStringLower]) { [string appendString:cStringLower]; } else { [string appendString:@"_"]; [string appendString:cStringLower]; } } return string; } - (NSString *)mj_camelFromUnderline { if (self.length == 0) return self; NSMutableString *string = [NSMutableString string]; NSArray *cmps = [self componentsSeparatedByString:@"_"]; for (NSUInteger i = 0; i<cmps.count; i++) { NSString *cmp = cmps[i]; if (i && cmp.length) { [string appendString:[NSString stringWithFormat:@"%c", [cmp characterAtIndex:0]].uppercaseString]; if (cmp.length >= 2) [string appendString:[cmp substringFromIndex:1]]; } else { [string appendString:cmp]; } } return string; } - (NSString *)mj_firstCharLower { if (self.length == 0) return self; NSMutableString *string = [NSMutableString string]; [string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].lowercaseString]; if (self.length >= 2) [string appendString:[self substringFromIndex:1]]; return string; } - (NSString *)mj_firstCharUpper { if (self.length == 0) return self; NSMutableString *string = [NSMutableString string]; [string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].uppercaseString]; if (self.length >= 2) [string appendString:[self substringFromIndex:1]]; return string; } - (BOOL)mj_isPureInt { NSScanner *scan = [NSScanner scannerWithString:self]; int val; return [scan scanInt:&val] && [scan isAtEnd]; } - (NSURL *)mj_url { // [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"!$&'()*+,-./:;=?@_~%#[]"]]; #pragma clang diagnostic push #pragma clang diagnostic ignored"-Wdeprecated-declarations" return [NSURL URLWithString:(NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self, (CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL,kCFStringEncodingUTF8))]; #pragma clang diagnostic pop } @end
{ "pile_set_name": "Github" }
using System; using ProtoBuf; namespace Disa.Framework { [ProtoContract] public class DisaQuotedTitle { [ProtoMember(1)] public string Address { get; set; } [ProtoMember(2)] public string Title { get; set; } } }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2014 Emmanuel Durand * * This file is part of Splash. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Splash is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Splash. If not, see <http://www.gnu.org/licenses/>. */ /* * @scope_guard.h * ScopeGuard, to use RAII to clean things up in a scope */ #ifndef SPLASH_SCOPE_GUARD_H #define SPLASH_SCOPE_GUARD_H #include <utility> namespace Splash { /*************/ //! OnScopeExit, taken from Switcher (https://github.com/nicobou/switcher) template <typename F> class ScopeGuard { public: explicit ScopeGuard(F&& f) : f_(std::move(f)) { } ~ScopeGuard() { f_(); } private: F f_; }; enum class ScopeGuardOnExit { }; template <typename F> ScopeGuard<F> operator+(ScopeGuardOnExit, F&& f) { return ScopeGuard<F>(std::forward<F>(f)); } #define CONCATENATE_IMPL(s1, s2) s1##s2 #define CONCATENATE(s1, s2) CONCATENATE_IMPL(s1, s2) #define OnScopeExit auto CONCATENATE(on_scope_exit_var, __LINE__) = ScopeGuardOnExit() + [&]() } // namespace Splash #endif // SPLASH_SCOPE_GUARD_H
{ "pile_set_name": "Github" }
#include <core/ui_manager.h> #include <control/ui_viewport.h> void InitViewportCallback(LongUI::UIViewport& v) noexcept; void InitStyleSheet() noexcept; int main() { if (UIManager.Initialize()) { ::InitStyleSheet(); LongUI::UIViewport viewport; { using namespace LongUI; if (viewport.SetXulFromFile(u8"xul/main.xul"_sv)) ::InitViewportCallback(viewport); } viewport.RefWindow().ShowWindow(); viewport.RefWindow().Exec(); } UIManager.Uninitialize(); return 0; } static const char s_test[] = R"css( textbox { font-family: KaiTi } )css"; void InitStyleSheet() noexcept { //UIManager.AddGlobalCssString(LongUI::U8View::FromCStyle(s_test)); }
{ "pile_set_name": "Github" }
import { IMutationsWave } from "automutate"; /** * Creates a provider that will run exactly once. * * @param provider Provider to wrap around. * @returns Single-use equivalent of the provider. */ export const createSingleUseProvider = (provider: () => Promise<IMutationsWave>) => { let provided = false; return async (): Promise<IMutationsWave> => { if (provided) { return { fileMutations: undefined, }; } provided = true; return provider(); }; };
{ "pile_set_name": "Github" }
polygon 1 1.472349E+01 4.927190E+01 1.472330E+01 4.927172E+01 1.472328E+01 4.927170E+01 1.472309E+01 4.927154E+01 1.472338E+01 4.927140E+01 1.472381E+01 4.927114E+01 1.472400E+01 4.927102E+01 1.472504E+01 4.927038E+01 1.472516E+01 4.927033E+01 1.472575E+01 4.926999E+01 1.472576E+01 4.926999E+01 1.472578E+01 4.926964E+01 1.472584E+01 4.926955E+01 1.472609E+01 4.926935E+01 1.472632E+01 4.926914E+01 1.472659E+01 4.926877E+01 1.472665E+01 4.926870E+01 1.472692E+01 4.926842E+01 1.472720E+01 4.926817E+01 1.472731E+01 4.926804E+01 1.472722E+01 4.926817E+01 1.472693E+01 4.926843E+01 1.472740E+01 4.926847E+01 1.472757E+01 4.926850E+01 1.472769E+01 4.926851E+01 1.472781E+01 4.926853E+01 1.472788E+01 4.926854E+01 1.472792E+01 4.926855E+01 1.472804E+01 4.926856E+01 1.472818E+01 4.926858E+01 1.472822E+01 4.926858E+01 1.472828E+01 4.926859E+01 1.472848E+01 4.926855E+01 1.472875E+01 4.926849E+01 1.472889E+01 4.926846E+01 1.472894E+01 4.926845E+01 1.472901E+01 4.926844E+01 1.472915E+01 4.926841E+01 1.472947E+01 4.926834E+01 1.472933E+01 4.926815E+01 1.472928E+01 4.926807E+01 1.472923E+01 4.926803E+01 1.472917E+01 4.926794E+01 1.472930E+01 4.926790E+01 1.472903E+01 4.926733E+01 1.472866E+01 4.926656E+01 1.472904E+01 4.926649E+01 1.472885E+01 4.926611E+01 1.472883E+01 4.926612E+01 1.472881E+01 4.926608E+01 1.472883E+01 4.926607E+01 1.472878E+01 4.926597E+01 1.472869E+01 4.926578E+01 1.472865E+01 4.926579E+01 1.472864E+01 4.926576E+01 1.472868E+01 4.926575E+01 1.472854E+01 4.926546E+01 1.472847E+01 4.926529E+01 1.472837E+01 4.926512E+01 1.472835E+01 4.926496E+01 1.472835E+01 4.926494E+01 1.472786E+01 4.926466E+01 1.472786E+01 4.926376E+01 1.472802E+01 4.926378E+01 1.472810E+01 4.926377E+01 1.472814E+01 4.926376E+01 1.472818E+01 4.926377E+01 1.472822E+01 4.926380E+01 1.472826E+01 4.926379E+01 1.472829E+01 4.926377E+01 1.472835E+01 4.926375E+01 1.472847E+01 4.926373E+01 1.472854E+01 4.926372E+01 1.472862E+01 4.926370E+01 1.472883E+01 4.926370E+01 1.472903E+01 4.926368E+01 1.472914E+01 4.926368E+01 1.472953E+01 4.926365E+01 1.473006E+01 4.926359E+01 1.473027E+01 4.926357E+01 1.473036E+01 4.926358E+01 1.473050E+01 4.926355E+01 1.473054E+01 4.926355E+01 1.473058E+01 4.926359E+01 1.473065E+01 4.926359E+01 1.473066E+01 4.926362E+01 1.473070E+01 4.926366E+01 1.473077E+01 4.926367E+01 1.473085E+01 4.926371E+01 1.473096E+01 4.926371E+01 1.473105E+01 4.926370E+01 1.473109E+01 4.926370E+01 1.473115E+01 4.926372E+01 1.473129E+01 4.926374E+01 1.473134E+01 4.926371E+01 1.473151E+01 4.926371E+01 1.473162E+01 4.926372E+01 1.473174E+01 4.926371E+01 1.473183E+01 4.926373E+01 1.473194E+01 4.926369E+01 1.473201E+01 4.926367E+01 1.473250E+01 4.926363E+01 1.473281E+01 4.926360E+01 1.473291E+01 4.926360E+01 1.473305E+01 4.926358E+01 1.473343E+01 4.926358E+01 1.473369E+01 4.926355E+01 1.473381E+01 4.926354E+01 1.473406E+01 4.926350E+01 1.473429E+01 4.926348E+01 1.473437E+01 4.926345E+01 1.473446E+01 4.926343E+01 1.473458E+01 4.926344E+01 1.473481E+01 4.926345E+01 1.473522E+01 4.926333E+01 1.473567E+01 4.926336E+01 1.473571E+01 4.926341E+01 1.473575E+01 4.926347E+01 1.473582E+01 4.926346E+01 1.473592E+01 4.926345E+01 1.473602E+01 4.926344E+01 1.473690E+01 4.926335E+01 1.473694E+01 4.926335E+01 1.473753E+01 4.926325E+01 1.473824E+01 4.926314E+01 1.473827E+01 4.926317E+01 1.473840E+01 4.926356E+01 1.473858E+01 4.926352E+01 1.473861E+01 4.926346E+01 1.473878E+01 4.926343E+01 1.473925E+01 4.926336E+01 1.473995E+01 4.926329E+01 1.474093E+01 4.926323E+01 1.474134E+01 4.926324E+01 1.474130E+01 4.926308E+01 1.474146E+01 4.926304E+01 1.474145E+01 4.926299E+01 1.474167E+01 4.926292E+01 1.474166E+01 4.926289E+01 1.474236E+01 4.926268E+01 1.474249E+01 4.926264E+01 1.474273E+01 4.926263E+01 1.474315E+01 4.926266E+01 1.474338E+01 4.926262E+01 1.474357E+01 4.926297E+01 1.474372E+01 4.926340E+01 1.474395E+01 4.926344E+01 1.474404E+01 4.926363E+01 1.474412E+01 4.926427E+01 1.474455E+01 4.926446E+01 1.474470E+01 4.926447E+01 1.474520E+01 4.926446E+01 1.474562E+01 4.926439E+01 1.474602E+01 4.926425E+01 1.474573E+01 4.926356E+01 1.474553E+01 4.926302E+01 1.474557E+01 4.926294E+01 1.474574E+01 4.926287E+01 1.474678E+01 4.926265E+01 1.474676E+01 4.926240E+01 1.474727E+01 4.926227E+01 1.474784E+01 4.926212E+01 1.474872E+01 4.926186E+01 1.474931E+01 4.926172E+01 1.474966E+01 4.926166E+01 1.475001E+01 4.926161E+01 1.475007E+01 4.926195E+01 1.475066E+01 4.926211E+01 1.475112E+01 4.926223E+01 1.475159E+01 4.926246E+01 1.475176E+01 4.926251E+01 1.475177E+01 4.926248E+01 1.475201E+01 4.926215E+01 1.475219E+01 4.926202E+01 1.475234E+01 4.926206E+01 1.475336E+01 4.926246E+01 1.475340E+01 4.926247E+01 1.475466E+01 4.926293E+01 1.475592E+01 4.926356E+01 1.475658E+01 4.926379E+01 1.475734E+01 4.926392E+01 1.475937E+01 4.926452E+01 1.475976E+01 4.926463E+01 1.476044E+01 4.926478E+01 1.476084E+01 4.926493E+01 1.476110E+01 4.926509E+01 1.476145E+01 4.926518E+01 1.476405E+01 4.926646E+01 1.476430E+01 4.926676E+01 1.476504E+01 4.926658E+01 1.476566E+01 4.926657E+01 1.476607E+01 4.926652E+01 1.476656E+01 4.926644E+01 1.476702E+01 4.926634E+01 1.476727E+01 4.926628E+01 1.476727E+01 4.926631E+01 1.476799E+01 4.926669E+01 1.476906E+01 4.926733E+01 1.477005E+01 4.926798E+01 1.477021E+01 4.926813E+01 1.477095E+01 4.926880E+01 1.477196E+01 4.926958E+01 1.477210E+01 4.926986E+01 1.477230E+01 4.927016E+01 1.477250E+01 4.927056E+01 1.477265E+01 4.927070E+01 1.477299E+01 4.927095E+01 1.477309E+01 4.927101E+01 1.477332E+01 4.927113E+01 1.477355E+01 4.927126E+01 1.477363E+01 4.927129E+01 1.477374E+01 4.927131E+01 1.477402E+01 4.927132E+01 1.477418E+01 4.927132E+01 1.477430E+01 4.927131E+01 1.477477E+01 4.927124E+01 1.477510E+01 4.927115E+01 1.477536E+01 4.927111E+01 1.477594E+01 4.927106E+01 1.477610E+01 4.927107E+01 1.477626E+01 4.927110E+01 1.477669E+01 4.927105E+01 1.477685E+01 4.927104E+01 1.477737E+01 4.927101E+01 1.477776E+01 4.927111E+01 1.477771E+01 4.927198E+01 1.477770E+01 4.927207E+01 1.477843E+01 4.927322E+01 1.477849E+01 4.927328E+01 1.477837E+01 4.927356E+01 1.477832E+01 4.927367E+01 1.477818E+01 4.927383E+01 1.477800E+01 4.927403E+01 1.477774E+01 4.927434E+01 1.477765E+01 4.927442E+01 1.477746E+01 4.927495E+01 1.477741E+01 4.927515E+01 1.477732E+01 4.927565E+01 1.477723E+01 4.927588E+01 1.477704E+01 4.927610E+01 1.477667E+01 4.927647E+01 1.477641E+01 4.927665E+01 1.477609E+01 4.927696E+01 1.477575E+01 4.927720E+01 1.477563E+01 4.927729E+01 1.477536E+01 4.927744E+01 1.477510E+01 4.927757E+01 1.477484E+01 4.927772E+01 1.477451E+01 4.927796E+01 1.477432E+01 4.927811E+01 1.477414E+01 4.927821E+01 1.477392E+01 4.927834E+01 1.477366E+01 4.927843E+01 1.477287E+01 4.927867E+01 1.477285E+01 4.927863E+01 1.477236E+01 4.927878E+01 1.477184E+01 4.927893E+01 1.477139E+01 4.927908E+01 1.477114E+01 4.927917E+01 1.477114E+01 4.927926E+01 1.477074E+01 4.927940E+01 1.477077E+01 4.927943E+01 1.477019E+01 4.927987E+01 1.476972E+01 4.928031E+01 1.476940E+01 4.928049E+01 1.476923E+01 4.928050E+01 1.476912E+01 4.928057E+01 1.476891E+01 4.928069E+01 1.476867E+01 4.928076E+01 1.476851E+01 4.928087E+01 1.476829E+01 4.928095E+01 1.476806E+01 4.928097E+01 1.476787E+01 4.928095E+01 1.476788E+01 4.928087E+01 1.476794E+01 4.928075E+01 1.476805E+01 4.928058E+01 1.476801E+01 4.928046E+01 1.476762E+01 4.928038E+01 1.476757E+01 4.928040E+01 1.476752E+01 4.928055E+01 1.476745E+01 4.928061E+01 1.476748E+01 4.928072E+01 1.476758E+01 4.928083E+01 1.476764E+01 4.928091E+01 1.476775E+01 4.928098E+01 1.476775E+01 4.928107E+01 1.476770E+01 4.928115E+01 1.476761E+01 4.928116E+01 1.476745E+01 4.928114E+01 1.476729E+01 4.928105E+01 1.476721E+01 4.928098E+01 1.476707E+01 4.928101E+01 1.476692E+01 4.928110E+01 1.476665E+01 4.928099E+01 1.476654E+01 4.928087E+01 1.476609E+01 4.928064E+01 1.476587E+01 4.928042E+01 1.476580E+01 4.928029E+01 1.476578E+01 4.928011E+01 1.476589E+01 4.928006E+01 1.476606E+01 4.928009E+01 1.476623E+01 4.928004E+01 1.476622E+01 4.927998E+01 1.476601E+01 4.927995E+01 1.476557E+01 4.927995E+01 1.476550E+01 4.928006E+01 1.476542E+01 4.928017E+01 1.476527E+01 4.928014E+01 1.476521E+01 4.928007E+01 1.476522E+01 4.927996E+01 1.476486E+01 4.927985E+01 1.476477E+01 4.927987E+01 1.476450E+01 4.927997E+01 1.476419E+01 4.928014E+01 1.476399E+01 4.928015E+01 1.476369E+01 4.928005E+01 1.476343E+01 4.928006E+01 1.476322E+01 4.928012E+01 1.476296E+01 4.928021E+01 1.476282E+01 4.928018E+01 1.476272E+01 4.928011E+01 1.476261E+01 4.928008E+01 1.476256E+01 4.928015E+01 1.476202E+01 4.928035E+01 1.476184E+01 4.928048E+01 1.476162E+01 4.928053E+01 1.476141E+01 4.928050E+01 1.476138E+01 4.928035E+01 1.476141E+01 4.928030E+01 1.476141E+01 4.928026E+01 1.476113E+01 4.928038E+01 1.476100E+01 4.928050E+01 1.476082E+01 4.928078E+01 1.476068E+01 4.928082E+01 1.476058E+01 4.928091E+01 1.476044E+01 4.928117E+01 1.476049E+01 4.928147E+01 1.476074E+01 4.928174E+01 1.476100E+01 4.928204E+01 1.476109E+01 4.928211E+01 1.476123E+01 4.928214E+01 1.476143E+01 4.928226E+01 1.476150E+01 4.928229E+01 1.476159E+01 4.928230E+01 1.476159E+01 4.928255E+01 1.476142E+01 4.928282E+01 1.476126E+01 4.928291E+01 1.476094E+01 4.928305E+01 1.476069E+01 4.928308E+01 1.476014E+01 4.928318E+01 1.475970E+01 4.928313E+01 1.475945E+01 4.928317E+01 1.475905E+01 4.928314E+01 1.475881E+01 4.928308E+01 1.475845E+01 4.928287E+01 1.475844E+01 4.928278E+01 1.475848E+01 4.928271E+01 1.475849E+01 4.928257E+01 1.475840E+01 4.928233E+01 1.475832E+01 4.928231E+01 1.475809E+01 4.928231E+01 1.475795E+01 4.928248E+01 1.475782E+01 4.928249E+01 1.475769E+01 4.928248E+01 1.475754E+01 4.928242E+01 1.475739E+01 4.928228E+01 1.475730E+01 4.928228E+01 1.475690E+01 4.928234E+01 1.475678E+01 4.928242E+01 1.475641E+01 4.928243E+01 1.475612E+01 4.928253E+01 1.475605E+01 4.928258E+01 1.475595E+01 4.928274E+01 1.475587E+01 4.928278E+01 1.475561E+01 4.928280E+01 1.475498E+01 4.928281E+01 1.475461E+01 4.928278E+01 1.475438E+01 4.928277E+01 1.475408E+01 4.928265E+01 1.475391E+01 4.928263E+01 1.475367E+01 4.928264E+01 1.475351E+01 4.928262E+01 1.475311E+01 4.928237E+01 1.475286E+01 4.928210E+01 1.475282E+01 4.928192E+01 1.475282E+01 4.928177E+01 1.475303E+01 4.928141E+01 1.475351E+01 4.928081E+01 1.475386E+01 4.928049E+01 1.475417E+01 4.928034E+01 1.475429E+01 4.928017E+01 1.475421E+01 4.927988E+01 1.475423E+01 4.927962E+01 1.475424E+01 4.927927E+01 1.475421E+01 4.927914E+01 1.475416E+01 4.927908E+01 1.475377E+01 4.927903E+01 1.475322E+01 4.927901E+01 1.475271E+01 4.927909E+01 1.475211E+01 4.927932E+01 1.475228E+01 4.927952E+01 1.475211E+01 4.927969E+01 1.475194E+01 4.927959E+01 1.475180E+01 4.927966E+01 1.475185E+01 4.927972E+01 1.475206E+01 4.927986E+01 1.475206E+01 4.927996E+01 1.475181E+01 4.928014E+01 1.475152E+01 4.928032E+01 1.475138E+01 4.928038E+01 1.475109E+01 4.928053E+01 1.475089E+01 4.928061E+01 1.475052E+01 4.928090E+01 1.475007E+01 4.928119E+01 1.474969E+01 4.928132E+01 1.474938E+01 4.928150E+01 1.474870E+01 4.928163E+01 1.474862E+01 4.928167E+01 1.474846E+01 4.928149E+01 1.474822E+01 4.928162E+01 1.474812E+01 4.928175E+01 1.474829E+01 4.928195E+01 1.474778E+01 4.928223E+01 1.474748E+01 4.928230E+01 1.474733E+01 4.928232E+01 1.474724E+01 4.928229E+01 1.474717E+01 4.928207E+01 1.474711E+01 4.928193E+01 1.474721E+01 4.928185E+01 1.474741E+01 4.928180E+01 1.474754E+01 4.928191E+01 1.474766E+01 4.928195E+01 1.474783E+01 4.928178E+01 1.474764E+01 4.928176E+01 1.474734E+01 4.928166E+01 1.474704E+01 4.928177E+01 1.474685E+01 4.928175E+01 1.474653E+01 4.928181E+01 1.474623E+01 4.928192E+01 1.474614E+01 4.928199E+01 1.474617E+01 4.928210E+01 1.474632E+01 4.928218E+01 1.474640E+01 4.928219E+01 1.474660E+01 4.928214E+01 1.474675E+01 4.928210E+01 1.474662E+01 4.928222E+01 1.474640E+01 4.928228E+01 1.474612E+01 4.928244E+01 1.474559E+01 4.928216E+01 1.474549E+01 4.928202E+01 1.474540E+01 4.928182E+01 1.474531E+01 4.928175E+01 1.474503E+01 4.928167E+01 1.474461E+01 4.928146E+01 1.474448E+01 4.928136E+01 1.474433E+01 4.928113E+01 1.474429E+01 4.928095E+01 1.474430E+01 4.928080E+01 1.474441E+01 4.928059E+01 1.474443E+01 4.928043E+01 1.474454E+01 4.928042E+01 1.474456E+01 4.928028E+01 1.474452E+01 4.928018E+01 1.474447E+01 4.928012E+01 1.474436E+01 4.928013E+01 1.474416E+01 4.928014E+01 1.474396E+01 4.928023E+01 1.474393E+01 4.928032E+01 1.474400E+01 4.928035E+01 1.474401E+01 4.928045E+01 1.474399E+01 4.928051E+01 1.474388E+01 4.928051E+01 1.474388E+01 4.928020E+01 1.474371E+01 4.928014E+01 1.474350E+01 4.928015E+01 1.474336E+01 4.928003E+01 1.474331E+01 4.927988E+01 1.474311E+01 4.927976E+01 1.474298E+01 4.927950E+01 1.474223E+01 4.927943E+01 1.474221E+01 4.927934E+01 1.474218E+01 4.927921E+01 1.474216E+01 4.927918E+01 1.474215E+01 4.927918E+01 1.474204E+01 4.927919E+01 1.474181E+01 4.927915E+01 1.474148E+01 4.927914E+01 1.474128E+01 4.927919E+01 1.474097E+01 4.927939E+01 1.474099E+01 4.927949E+01 1.474107E+01 4.927951E+01 1.474126E+01 4.927944E+01 1.474142E+01 4.927947E+01 1.474114E+01 4.927982E+01 1.474104E+01 4.927970E+01 1.474072E+01 4.927960E+01 1.474045E+01 4.927959E+01 1.474030E+01 4.927963E+01 1.474024E+01 4.927960E+01 1.474024E+01 4.927946E+01 1.474015E+01 4.927941E+01 1.474001E+01 4.927941E+01 1.473988E+01 4.927944E+01 1.473951E+01 4.927947E+01 1.473945E+01 4.927943E+01 1.473956E+01 4.927922E+01 1.473974E+01 4.927907E+01 1.473947E+01 4.927895E+01 1.473924E+01 4.927885E+01 1.473921E+01 4.927884E+01 1.473916E+01 4.927898E+01 1.473904E+01 4.927906E+01 1.473912E+01 4.927918E+01 1.473906E+01 4.927928E+01 1.473884E+01 4.927940E+01 1.473878E+01 4.927949E+01 1.473864E+01 4.927955E+01 1.473822E+01 4.927966E+01 1.473818E+01 4.927954E+01 1.473845E+01 4.927950E+01 1.473868E+01 4.927945E+01 1.473867E+01 4.927933E+01 1.473867E+01 4.927923E+01 1.473870E+01 4.927915E+01 1.473880E+01 4.927906E+01 1.473860E+01 4.927899E+01 1.473850E+01 4.927898E+01 1.473857E+01 4.927887E+01 1.473848E+01 4.927882E+01 1.473837E+01 4.927884E+01 1.473833E+01 4.927877E+01 1.473801E+01 4.927874E+01 1.473791E+01 4.927881E+01 1.473782E+01 4.927880E+01 1.473778E+01 4.927860E+01 1.473781E+01 4.927855E+01 1.473796E+01 4.927852E+01 1.473821E+01 4.927856E+01 1.473877E+01 4.927874E+01 1.473894E+01 4.927870E+01 1.473899E+01 4.927860E+01 1.473886E+01 4.927838E+01 1.473875E+01 4.927838E+01 1.473848E+01 4.927846E+01 1.473824E+01 4.927838E+01 1.473807E+01 4.927830E+01 1.473817E+01 4.927810E+01 1.473832E+01 4.927806E+01 1.473852E+01 4.927825E+01 1.473875E+01 4.927826E+01 1.473883E+01 4.927824E+01 1.473875E+01 4.927803E+01 1.473867E+01 4.927783E+01 1.473861E+01 4.927768E+01 1.473839E+01 4.927751E+01 1.473807E+01 4.927735E+01 1.473796E+01 4.927742E+01 1.473796E+01 4.927761E+01 1.473792E+01 4.927763E+01 1.473784E+01 4.927767E+01 1.473767E+01 4.927773E+01 1.473748E+01 4.927779E+01 1.473688E+01 4.927794E+01 1.473684E+01 4.927792E+01 1.473686E+01 4.927774E+01 1.473658E+01 4.927763E+01 1.473640E+01 4.927771E+01 1.473637E+01 4.927780E+01 1.473601E+01 4.927851E+01 1.473595E+01 4.927877E+01 1.473581E+01 4.927898E+01 1.473576E+01 4.927903E+01 1.473567E+01 4.927909E+01 1.473553E+01 4.928004E+01 1.473534E+01 4.928034E+01 1.473518E+01 4.928083E+01 1.473515E+01 4.928113E+01 1.473517E+01 4.928157E+01 1.473479E+01 4.928161E+01 1.473453E+01 4.928160E+01 1.473425E+01 4.928156E+01 1.473376E+01 4.928144E+01 1.473339E+01 4.928135E+01 1.473313E+01 4.928132E+01 1.473289E+01 4.928133E+01 1.473284E+01 4.928131E+01 1.473265E+01 4.928137E+01 1.473207E+01 4.928153E+01 1.473174E+01 4.928158E+01 1.473143E+01 4.928157E+01 1.473097E+01 4.928155E+01 1.473058E+01 4.928155E+01 1.473039E+01 4.928143E+01 1.472993E+01 4.928120E+01 1.472949E+01 4.928099E+01 1.472912E+01 4.928075E+01 1.472847E+01 4.928034E+01 1.472815E+01 4.928014E+01 1.472779E+01 4.927994E+01 1.472672E+01 4.927931E+01 1.472616E+01 4.927888E+01 1.472584E+01 4.927858E+01 1.472558E+01 4.927841E+01 1.472478E+01 4.927806E+01 1.472445E+01 4.927794E+01 1.472400E+01 4.927776E+01 1.472392E+01 4.927771E+01 1.472385E+01 4.927768E+01 1.472368E+01 4.927757E+01 1.472344E+01 4.927746E+01 1.472254E+01 4.927712E+01 1.472443E+01 4.927691E+01 1.472656E+01 4.927677E+01 1.472757E+01 4.927665E+01 1.472791E+01 4.927671E+01 1.472824E+01 4.927690E+01 1.472848E+01 4.927702E+01 1.472866E+01 4.927709E+01 1.472902E+01 4.927726E+01 1.472918E+01 4.927726E+01 1.472930E+01 4.927727E+01 1.472945E+01 4.927725E+01 1.472950E+01 4.927662E+01 1.472943E+01 4.927645E+01 1.472876E+01 4.927613E+01 1.472821E+01 4.927560E+01 1.472805E+01 4.927574E+01 1.472795E+01 4.927576E+01 1.472783E+01 4.927574E+01 1.472773E+01 4.927566E+01 1.472770E+01 4.927551E+01 1.472757E+01 4.927543E+01 1.472749E+01 4.927546E+01 1.472737E+01 4.927553E+01 1.472728E+01 4.927553E+01 1.472716E+01 4.927545E+01 1.472698E+01 4.927528E+01 1.472666E+01 4.927514E+01 1.472653E+01 4.927500E+01 1.472651E+01 4.927492E+01 1.472663E+01 4.927484E+01 1.472693E+01 4.927481E+01 1.472700E+01 4.927475E+01 1.472693E+01 4.927466E+01 1.472679E+01 4.927461E+01 1.472658E+01 4.927449E+01 1.472633E+01 4.927441E+01 1.472627E+01 4.927429E+01 1.472635E+01 4.927418E+01 1.472627E+01 4.927408E+01 1.472623E+01 4.927404E+01 1.472600E+01 4.927426E+01 1.472593E+01 4.927419E+01 1.472607E+01 4.927406E+01 1.472578E+01 4.927387E+01 1.472564E+01 4.927405E+01 1.472549E+01 4.927413E+01 1.472528E+01 4.927411E+01 1.472517E+01 4.927398E+01 1.472545E+01 4.927380E+01 1.472563E+01 4.927381E+01 1.472553E+01 4.927365E+01 1.472533E+01 4.927352E+01 1.472526E+01 4.927351E+01 1.472513E+01 4.927353E+01 1.472493E+01 4.927355E+01 1.472478E+01 4.927358E+01 1.472468E+01 4.927346E+01 1.472481E+01 4.927332E+01 1.472479E+01 4.927318E+01 1.472487E+01 4.927299E+01 1.472488E+01 4.927288E+01 1.472484E+01 4.927283E+01 1.472473E+01 4.927280E+01 1.472462E+01 4.927281E+01 1.472446E+01 4.927296E+01 1.472426E+01 4.927284E+01 1.472424E+01 4.927269E+01 1.472408E+01 4.927256E+01 1.472385E+01 4.927250E+01 1.472374E+01 4.927240E+01 1.472369E+01 4.927222E+01 1.472362E+01 4.927208E+01 1.472349E+01 4.927190E+01 END END
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>IDEDidComputeMac32BitWarning</key> <true/> </dict> </plist>
{ "pile_set_name": "Github" }
{ "sdivNonConst_d0g0v0" : { "blocks" : [ { "blockHeaderPremine" : { "difficulty" : "0x020000", "gasLimit" : "0x0f4240", "timestamp" : "0x03e8", "updatePoW" : "1" }, "transactions" : [ { "data" : "0x", "gasLimit" : "0x061a80", "gasPrice" : "0x01", "nonce" : "0x00", "r" : "0xc1760cf96cfbbc2756850ffd2ff8078543d42da5fd0327619c642b2c8055d5a6", "s" : "0x66715427a6eca6698235668ae3ee160dbe4f96df97ce96f2d1193a112a15ebb6", "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", "v" : "0x1c", "value" : "0x00" } ], "uncleHeaders" : [ ] } ], "expect" : [ { "network" : "Byzantium", "result" : { "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "storage" : { } } } }, { "network" : "Constantinople", "result" : { "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "storage" : { } } } }, { "network" : "ConstantinopleFix", "result" : { "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "storage" : { } } } } ], "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "difficulty" : "131072", "extraData" : "0x42", "gasLimit" : "0x0f4240", "gasUsed" : "0", "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "nonce" : "0x0102030405060708", "number" : "0", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", "timestamp" : "0x03b6", "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, "pre" : { "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "0x00", "code" : "0x73095e7baea6a6c7c4c2dfeb977efac326af552d873173095e7baea6a6c7c4c2dfeb977efac326af552d873105600055", "nonce" : "0x00", "storage" : { } }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "0x0de0b6b3a7640000", "code" : "", "nonce" : "0x00", "storage" : { } } }, "sealEngine" : "NoProof" } }
{ "pile_set_name": "Github" }
// Stream status #define INIT_STATE 42 #define BUSY_STATE 113 #define FINISH_STATE 666 #define HASH_BITS 15 #define HASH_SIZE (1 << HASH_BITS) #define HASH_MASK (HASH_SIZE - 1) // Size of match buffer for literals/lengths. There are 4 reasons for // limiting lit_bufsize to 64K: // - frequencies can be kept in 16 bit counters // - if compression is not successful for the first block, all input // data is still in the window so we can still emit a stored block even // when input comes from standard input. (This can also be done for // all blocks if lit_bufsize is not greater than 32K.) // - if compression is not successful for a file smaller than 64K, we can // even emit a stored file instead of a stored block (saving 5 bytes). // This is applicable only for zip (not gzip or zlib). // - creating new Huffman trees less frequently may not provide fast // adaptation to changes in the input data statistics. (Take for // example a binary file with poorly compressible code followed by // a highly compressible string table.) Smaller buffer sizes give // fast adaptation but have of course the overhead of transmitting // trees more frequently. // - I can't count above 4 #define LIT_BUFSIZE (1 << 14) #define MAX_BLOCK_SIZE 0xffff // Number of bits by which ins_h must be shifted at each input // step. It must be such that after MIN_MATCH steps, the oldest // byte no longer takes part in the hash key. #define HASH_SHIFT ((HASH_BITS + MIN_MATCH - 1) / MIN_MATCH) // Matches of length 3 are discarded if their distance exceeds TOO_FAR #define TOO_FAR 32767 // Number of length codes, not counting the special END_BLOCK code #define LENGTH_CODES 29 // Number of codes used to transfer the bit lengths #define BL_CODES 19 // Number of literal bytes 0..255 #define LITERALS 256 // Number of Literal or Length codes, including the END_BLOCK code #define L_CODES (LITERALS + 1 + LENGTH_CODES) // See definition of array dist_code below #define DIST_CODE_LEN 512 // Maximum heap size #define HEAP_SIZE (2 * L_CODES + 1) // Index within the heap array of least frequent node in the Huffman tree #define SMALLEST 1 // Bit length codes must not exceed MAX_BL_BITS bits #define MAX_BL_BITS 7 // End of block literal code #define END_BLOCK 256 // Repeat previous bit length 3-6 times (2 bits of repeat count) #define REP_3_6 16 // Repeat a zero length 3-10 times (3 bits of repeat count) #define REPZ_3_10 17 // Repeat a zero length 11-138 times (7 bits of repeat count) #define REPZ_11_138 18 // Number of bits used within bi_buf. (bi_buf might be implemented on // more than 16 bits on some systems.) #define BUF_SIZE (8 * 2) // Minimum amount of lookahead, except at the end of the input file. // See deflate.c for comments about the MIN_MATCH+1. #define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1) typedef enum { NEED_MORE, // block not completed, need more input or more output BLOCK_DONE, // block flush performed FINISH_STARTED, // finish started, need only more output at next deflate FINISH_DONE // finish done, accept no more input or output } block_state; // Data structure describing a single value and its code string. typedef struct ct_data_s { union { word freq; // frequency count word code; // bit string } fc; union { word dad; // father node in Huffman tree word len; // length of bit string } dl; } ct_data; typedef struct static_tree_desc_s { const ct_data *static_tree; // static tree or NULL const ulong *extra_bits; // extra bits for each code or NULL ulong extra_base; // base index for extra_bits ulong elems; // max number of elements in the tree ulong max_length; // max bit length for the codes } static_tree_desc; typedef struct tree_desc_s { ct_data *dyn_tree; // the dynamic tree ulong max_code; // largest code with non zero frequency static_tree_desc *stat_desc; // the corresponding static tree } tree_desc; // Main structure which the deflate algorithm works from typedef struct deflate_state_s { z_stream *z; // pointer back to this zlib stream ulong status; // as the name implies EFlush last_flush; // value of flush param for previous deflate call int noheader; // suppress zlib header and adler32 byte pending_buf[MAX_BLOCK_SIZE + 5];// output still pending byte *pending_out; // next pending byte to output to the stream ulong pending; // nb of bytes in the pending buffer // Sliding window. Input bytes are read into the second half of the window, // and move to the first half later to keep a dictionary of at least wSize // bytes. With this organization, matches are limited to a distance of // wSize-MAX_MATCH bytes, but this ensures that IO is always // performed with a length multiple of the block size. Also, it limits // the window size to 64K, which is quite useful on MSDOS. // To do: use the user input buffer as sliding window. byte window[WINDOW_SIZE * 2]; // Link to older string with same hash index. To limit the size of this // array to 64K, this link is maintained only for the last 32K strings. // An index in this array is thus a window index modulo 32K. word prev[WINDOW_SIZE]; word head[HASH_SIZE]; // Heads of the hash chains or NULL. ulong ins_h; // hash index of string to be inserted // Window position at the beginning of the current output block. Gets // negative when the window is moved backwards. int block_start; ulong match_length; // length of best match ulong prev_match; // previous match ulong match_available; // set if previous match exists ulong strstart; // start of string to insert ulong match_start; // start of matching string ulong lookahead; // number of valid bytes ahead in window // Length of the best match at previous step. Matches not greater than this // are discarded. This is used in the lazy match evaluation. ulong prev_length; // Attempt to find a better match only when the current match is strictly // smaller than this value. This mechanism is used only for compression levels >= 4. ulong max_lazy_match; ulong good_match; // Use a faster search when the previous match is longer than this ulong nice_match; // Stop searching when current match exceeds this // To speed up deflation, hash chains are never searched beyond this // length. A higher limit improves compression ratio but degrades the speed. ulong max_chain_length; ELevel level; // compression level (0..9) ct_data dyn_ltree[HEAP_SIZE]; // literal and length tree ct_data dyn_dtree[(2 * D_CODES) + 1]; // distance tree ct_data bl_tree[(2 * BL_CODES) + 1]; // Huffman tree for bit lengths tree_desc l_desc; // desc. for literal tree tree_desc d_desc; // desc. for distance tree tree_desc bl_desc; // desc. for bit length tree word bl_count[MAX_WBITS + 1]; // number of codes at each bit length for an optimal tree // The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. // The same heap array is used to build all trees. ulong heap[(2 * L_CODES) + 1]; // heap used to build the Huffman trees ulong heap_len; // number of elements in the heap ulong heap_max; // element of largest frequency byte depth[(2 * L_CODES) + 1]; // Depth of each subtree used as tie breaker for trees of equal frequency byte l_buf[LIT_BUFSIZE]; // buffer for literals or lengths ulong last_lit; // running index in l_buf // Buffer for distances. To simplify the code, d_buf and l_buf have // the same number of elements. To use different lengths, an extra flag // array would be necessary. word d_buf[LIT_BUFSIZE]; ulong opt_len; // bit length of current block with optimal trees ulong static_len; // bit length of current block with static trees ulong matches; // number of string matches in current block ulong last_eob_len; // bit length of EOB code for last block word bi_buf; // Output buffer. bits are inserted starting at the bottom (least significant bits). ulong bi_valid; // Number of valid bits in bi_buf. All bits above the last valid bit are always zero. ulong adler; } deflate_state; // Compression function. Returns the block state after the call. typedef block_state (*compress_func) (deflate_state *s, EFlush flush); typedef struct config_s { word good_length; // reduce lazy search above this match length word max_lazy; // do not perform lazy search above this match length word nice_length; // quit search above this match length word max_chain; compress_func func; } config; // end
{ "pile_set_name": "Github" }
import torch.optim.optimizer from ..tensor import ManifoldParameter, ManifoldTensor from .mixin import OptimMixin, SparseMixin from ..utils import copy_or_set_ __all__ = ["SparseRiemannianSGD"] class SparseRiemannianSGD(OptimMixin, SparseMixin, torch.optim.Optimizer): r""" Implements lazy version of SGD algorithm suitable for sparse gradients. In this variant, only moments that show up in the gradient get updated, and only those portions of the gradient get applied to the parameters. Parameters ---------- params : iterable iterable of parameters to optimize or dicts defining parameter groups lr : float learning rate momentum : float (optional) momentum factor (default: 0) dampening : float (optional) dampening for momentum (default: 0) nesterov : bool (optional) enables Nesterov momentum (default: False) Other Parameters ---------------- stabilize : int Stabilize parameters if they are off-manifold due to numerical reasons every ``stabilize`` steps (default: ``None`` -- no stabilize) """ def __init__( self, params, lr, momentum=0, dampening=0, nesterov=False, stabilize=None, ): if lr < 0.0: raise ValueError("Invalid learning rate: {}".format(lr)) if momentum < 0.0: raise ValueError("Invalid momentum value: {}".format(momentum)) defaults = dict( lr=lr, momentum=momentum, dampening=dampening, nesterov=nesterov, ) if nesterov and (momentum <= 0 or dampening != 0): raise ValueError("Nesterov momentum requires a momentum and zero dampening") super().__init__(params, defaults, stabilize=stabilize) def step(self, closure=None): loss = None if closure is not None: loss = closure() with torch.no_grad(): for group in self.param_groups: if "step" not in group: group["step"] = 0 momentum = group["momentum"] dampening = group["dampening"] nesterov = group["nesterov"] learning_rate = group["lr"] for point in group["params"]: grad = point.grad if grad is None: continue if not grad.is_sparse: raise RuntimeError( "SparseRiemannianAdam does not support sparse gradients, use RiemannianAdam instead" ) # select rows that contain gradient rows = grad.coalesce().indices()[0].unique() state = self.state[point] # State initialization if len(state) == 0: if momentum > 0: state["momentum_buffer"] = grad.to_dense().clone() if isinstance(point, (ManifoldParameter, ManifoldTensor)): manifold = point.manifold else: manifold = self._default_manifold full_point = point # only nonzero rows are required to make an update grad = grad.index_select(0, rows).to_dense() point = point[rows] grad = manifold.egrad2rgrad(point, grad) if momentum > 0: momentum_buffer = state["momentum_buffer"][rows] momentum_buffer.mul_(momentum).add_(1 - dampening, grad) if nesterov: grad = grad.add_(momentum, momentum_buffer) else: grad = momentum_buffer # we have all the things projected new_point, new_momentum_buffer = manifold.retr_transp( point, -learning_rate * grad, momentum_buffer ) # use copy only for user facing point state["momentum_buffer"][rows] = new_momentum_buffer full_point[rows] = new_point else: new_point = manifold.retr(point, -learning_rate * grad) full_point[rows] = new_point group["step"] += 1 if self._stabilize is not None and group["step"] % self._stabilize == 0: self.stabilize_group(group) return loss @torch.no_grad() def stabilize_group(self, group): for p in group["params"]: if not isinstance(p, (ManifoldParameter, ManifoldTensor)): continue manifold = p.manifold momentum = group["momentum"] copy_or_set_(p, manifold.projx(p)) if momentum > 0: param_state = self.state[p] if not param_state: # due to None grads continue if "momentum_buffer" in param_state: buf = param_state["momentum_buffer"] buf.set_(manifold.proju(p, buf))
{ "pile_set_name": "Github" }
application: learning-1130 version: 1 runtime: go api_version: go1 handlers: - url: /.* script: _go_app
{ "pile_set_name": "Github" }
using System.Collections.Generic; using System.Runtime.Serialization; namespace RestFiles.ServiceModel.Types { [DataContract] public class FolderResult { public FolderResult() { Folders = new List<Folder>(); Files = new List<File>(); } [DataMember] public List<Folder> Folders { get; set; } [DataMember] public List<File> Files { get; set; } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" ?> <parameter-file instrument="POLDI" valid-from="2013-01-01 00:00:00"> <component-link name="chopper"> <parameter name="t0" type="number"> <value val="0.00050" /> </parameter> <parameter name="t0_const" type="number"> <value val="-0.60" /> </parameter> </component-link> <component-link name="detector"> <parameter name="two_theta" type="number"> <value val="90.41" /> </parameter> <parameter name="x"> <value val="-0.93147" /> </parameter> <parameter name="y"> <value val="-0.860" /> </parameter> </component-link> <!-- dead wires !--> <component-link name="detector/element0"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element1"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element2"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element3"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element4"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element5"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element394"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element395"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element396"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element397"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element398"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> <component-link name="detector/element399"> <parameter name="masked" type="bool"> <value val="true" /> </parameter> </component-link> </parameter-file>
{ "pile_set_name": "Github" }
/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ * $Id$ * * Copyright (C) 2002 Björn Stenberg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ****************************************************************************/ #include "config.h" #include <stdbool.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <timefuncs.h> #include <ctype.h> #include <stdarg.h> #include "string-extra.h" #include "load_code.h" #include "debug.h" #include "button.h" #include "dir.h" #include "file.h" #include "kernel.h" #include "screens.h" #include "misc.h" #include "codecs.h" #include "lang.h" #include "keyboard.h" #include "buffering.h" #include "backlight.h" #include "storage.h" #include "talk.h" #include "mp3data.h" #include "powermgmt.h" #include "system.h" #include "sound.h" #include "splash.h" #include "general.h" #include "rbpaths.h" #define LOGF_ENABLE #include "logf.h" #if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) #define PREFIX(_x_) sim_ ## _x_ #else #define PREFIX(_x_) _x_ #endif #if (CONFIG_PLATFORM & PLATFORM_HOSTED) /* For PLATFORM_HOSTED this buffer must be define here. */ static unsigned char codecbuf[CODEC_SIZE]; #else /* For PLATFORM_NATIVE this buffer is defined in *.lds files. */ extern unsigned char codecbuf[]; #endif static size_t codec_size; struct codec_api ci = { 0, /* filesize */ 0, /* curpos */ NULL, /* id3 */ ERR_HANDLE_NOT_FOUND, /* audio_hid */ NULL, /* struct dsp_config *dsp */ NULL, /* codec_get_buffer */ NULL, /* pcmbuf_insert */ NULL, /* set_elapsed */ NULL, /* read_filebuf */ NULL, /* request_buffer */ NULL, /* advance_buffer */ NULL, /* seek_buffer */ NULL, /* seek_complete */ NULL, /* set_offset */ NULL, /* configure */ NULL, /* get_command */ NULL, /* loop_track */ /* kernel/ system */ #if defined(CPU_ARM) && CONFIG_PLATFORM & PLATFORM_NATIVE __div0, #endif sleep, yield, #if NUM_CORES > 1 create_thread, thread_thaw, thread_wait, semaphore_init, semaphore_wait, semaphore_release, #endif commit_dcache, commit_discard_dcache, commit_discard_idcache, /* strings and memory */ strcpy, strlen, strcmp, strcat, memset, memcpy, memmove, memcmp, memchr, #if defined(DEBUG) || defined(SIMULATOR) debugf, #endif #ifdef ROCKBOX_HAS_LOGF logf, #endif (void *)qsort, #ifdef RB_PROFILE profile_thread, profstop, __cyg_profile_func_enter, __cyg_profile_func_exit, #endif #ifdef HAVE_RECORDING NULL, /* enc_pcmbuf_read */ NULL, /* enc_pcmbuf_advance */ NULL, /* enc_encbuf_get_buffer */ NULL, /* enc_encbuf_finish_buffer */ NULL, /* enc_stream_read */ NULL, /* enc_stream_lseek */ NULL, /* enc_stream_write */ round_value_to_list32, #endif /* HAVE_RECORDING */ /* new stuff at the end, sort into place next time the API gets incompatible */ }; void codec_get_full_path(char *path, const char *codec_root_fn) { snprintf(path, MAX_PATH-1, CODECS_DIR "/" CODEC_PREFIX "%s." CODEC_EXTENSION, codec_root_fn); } /* Returns pointer to and size of free codec RAM. Aligns to CACHEALIGN_SIZE. */ void *codec_get_buffer_callback(size_t *size) { void *buf = &codecbuf[codec_size]; ssize_t s = CODEC_SIZE - codec_size; if (s <= 0) return NULL; *size = s; ALIGN_BUFFER(buf, *size, CACHEALIGN_SIZE); return buf; } /** codec loading and call interface **/ static void *curr_handle = NULL; static struct codec_header *c_hdr = NULL; static int codec_load_ram(struct codec_api *api) { struct lc_header *hdr; c_hdr = lc_get_header(curr_handle); hdr = c_hdr ? &c_hdr->lc_hdr : NULL; if (hdr == NULL || (hdr->magic != CODEC_MAGIC #ifdef HAVE_RECORDING && hdr->magic != CODEC_ENC_MAGIC #endif ) || hdr->target_id != TARGET_ID #if (CONFIG_PLATFORM & PLATFORM_NATIVE) || hdr->load_addr != codecbuf || hdr->end_addr > codecbuf + CODEC_SIZE #endif ) { logf("codec header error"); lc_close(curr_handle); curr_handle = NULL; return CODEC_ERROR; } if (hdr->api_version > CODEC_API_VERSION || hdr->api_version < CODEC_MIN_API_VERSION) { logf("codec api version error"); lc_close(curr_handle); curr_handle = NULL; return CODEC_ERROR; } #if (CONFIG_PLATFORM & PLATFORM_NATIVE) codec_size = hdr->end_addr - codecbuf; #else codec_size = 0; #endif *(c_hdr->api) = api; logf("Codec: calling entrypoint"); return c_hdr->entry_point(CODEC_LOAD); } int codec_load_buf(int hid, struct codec_api *api) { int rc = bufread(hid, CODEC_SIZE, codecbuf); if (rc < 0) { logf("Codec: cannot read buf handle"); return CODEC_ERROR; } curr_handle = lc_open_from_mem(codecbuf, rc); if (curr_handle == NULL) { logf("Codec: load error"); return CODEC_ERROR; } return codec_load_ram(api); } int codec_load_file(const char *plugin, struct codec_api *api) { char path[MAX_PATH]; codec_get_full_path(path, plugin); curr_handle = lc_open(path, codecbuf, CODEC_SIZE); if (curr_handle == NULL) { logf("Codec: cannot read file"); return CODEC_ERROR; } return codec_load_ram(api); } int codec_run_proc(void) { if (curr_handle == NULL) { logf("Codec: no codec to run"); return CODEC_ERROR; } logf("Codec: entering run state"); return c_hdr->run_proc(); } int codec_close(void) { int status = CODEC_OK; if (curr_handle != NULL) { logf("Codec: cleaning up"); status = c_hdr->entry_point(CODEC_UNLOAD); lc_close(curr_handle); curr_handle = NULL; } return status; } #ifdef HAVE_RECORDING enc_callback_t codec_get_enc_callback(void) { if (curr_handle == NULL || c_hdr->lc_hdr.magic != CODEC_ENC_MAGIC) { logf("Codec: not an encoder"); return NULL; } return c_hdr->rec_extension[0]; } #endif /* HAVE_RECORDING */
{ "pile_set_name": "Github" }
if JAVASCRIPT_IO_MODULE == 'xmlhttprequest' require 'asciidoctor/js/asciidoctor_ext/browser/abstract_node' require 'asciidoctor/js/asciidoctor_ext/browser/open_uri' require 'asciidoctor/js/asciidoctor_ext/browser/path_resolver' require 'asciidoctor/js/asciidoctor_ext/browser/reader' end
{ "pile_set_name": "Github" }
{ "PlaceholderDesc_LangKey": "Funktion generiert einen Sprachschlüssel für einen Wert. Hier kann beispielsweise der Name eines Objekts übergeben werden. Kann nicht per pipe verwendet werden." }
{ "pile_set_name": "Github" }
Extension { #name : #ExternalType } { #category : #'*UnifiedFFI' } ExternalType >> atomicSelector [ ^ AtomicSelectors at: self atomicType ] { #category : #'*UnifiedFFI' } ExternalType >> offsetReadFieldAt: offsetVariableName [ "Answer a string defining the accessor to an entity of the receiver type starting at the given byte offset. Private. Used for field definition only. NOTE: This is used on UFFI to define field accessors that depends on a class variable (this works like this to allow mapping 32bits and 64bits structures)" self isPointerType ifTrue: [| accessor | accessor := self pointerSize caseOf: { [nil] -> [#pointerAt:]. [4] -> [#shortPointerAt:]. [8] -> [#longPointerAt:] }. ^String streamContents: [:s| referentClass ifNil: [s nextPutAll: '^ExternalData fromHandle: (handle ', accessor, ' '; nextPutAll: offsetVariableName; nextPutAll: ') type: ExternalType '; nextPutAll: (AtomicTypeNames at: self atomicType); nextPutAll: ' asPointerType'] ifNotNil: [s nextPutAll: '^'; print: referentClass; nextPutAll: ' fromHandle: (handle ', accessor, ' '; nextPutAll: offsetVariableName; nextPut: $)]]]. self isAtomic ifFalse: "structure type" [^ self offsetReadStructFieldAt: offsetVariableName ]. "Atomic non-pointer types" ^String streamContents: [:s| s nextPutAll:'^handle '; nextPutAll: (AtomicSelectors at: self atomicType); space; nextPutAll: offsetVariableName]. ] { #category : #'*UnifiedFFI' } ExternalType >> offsetReadStructFieldAt: offsetVariableName [ ^ '^ {1} fromHandle: (handle structAt: {2} length: {1} byteSize)' format: { referentClass name. offsetVariableName } ] { #category : #'*UnifiedFFI' } ExternalType >> offsetWriteFieldAt: offsetVariableName with: valueName [ "Answer a string defining the accessor to an entity of the receiver type starting at the given byte offset. Private. Used for field definition only." self isPointerType ifTrue: [| accessor | accessor := self pointerSize caseOf: { [nil] -> [#pointerAt:]. [4] -> [#shortPointerAt:]. [8] -> [#longPointerAt:] }. ^String streamContents: [:s| s nextPutAll:'handle ', accessor, ' '; nextPutAll: offsetVariableName; nextPutAll:' put: '; nextPutAll: valueName; nextPutAll:' getHandle.']]. self isAtomic ifFalse:[ ^ self offsetWriteStructFieldAt: offsetVariableName with: valueName ]. ^String streamContents:[:s| s nextPutAll:'handle '; nextPutAll: (AtomicSelectors at: self atomicType); space; nextPutAll: offsetVariableName; nextPutAll:' put: '; nextPutAll: valueName]. ] { #category : #'*UnifiedFFI' } ExternalType >> offsetWriteStructFieldAt: offsetVariableName with: valueName [ ^ 'handle structAt: {1} put: {2} getHandle length: {3} byteSize' format: { offsetVariableName. valueName. referentClass name } ] { #category : #'*UnifiedFFI' } ExternalType >> withPointerArity: aNumber [ self flag: #pharoTodo. "FFI does not understand arity>1 (for now), so I will ignore it and return the #referencedType in case I want a pointer... this needs to be fixed." ^ aNumber > 0 ifTrue: [ self asPointerType ] ifFalse: [ self ] ]
{ "pile_set_name": "Github" }
#!/usr/bin/env python # Martin Kersner, [email protected] # 2016/03/17 from __future__ import print_function import os import sys import glob from PIL import Image as PILImage from utils import mat2png_hariharan def main(): input_path, output_path = process_arguments(sys.argv) if os.path.isdir(input_path) and os.path.isdir(output_path): mat_files = glob.glob(os.path.join(input_path, '*.mat')) convert_mat2png(mat_files, output_path) else: help('Input or output path does not exist!\n') def process_arguments(argv): num_args = len(argv) input_path = None output_path = None if num_args == 3: input_path = argv[1] output_path = argv[2] else: help() return input_path, output_path def convert_mat2png(mat_files, output_path): if not mat_files: help('Input directory does not contain any Matlab files!\n') for mat in mat_files: numpy_img = mat2png_hariharan(mat) pil_img = PILImage.fromarray(numpy_img) pil_img.save(os.path.join(output_path, modify_image_name(mat, 'png'))) # Extract name of image from given path, replace its extension with specified one # and return new name only, not path. def modify_image_name(path, ext): return os.path.basename(path).split('.')[0] + '.' + ext def help(msg=''): print(msg + 'Usage: python mat2png.py INPUT_PATH OUTPUT_PATH\n' 'INPUT_PATH denotes path containing Matlab files for conversion.\n' 'OUTPUT_PATH denotes path where converted Png files ar going to be saved.' , file=sys.stderr) exit() if __name__ == '__main__': main()
{ "pile_set_name": "Github" }
using System; using System.IO; using System.Linq; using System.Windows.Forms; using pk3DS.Core; using pk3DS.Core.Structures; namespace pk3DS { public partial class ItemEditor6 : Form { public ItemEditor6(byte[][] infiles) { files = infiles; itemlist[0] = ""; InitializeComponent(); Setup(); } private readonly byte[][] files; private readonly string[] itemlist = Main.Config.getText(TextName.ItemNames); private readonly string[] itemflavor = Main.Config.getText(TextName.ItemFlavor); private void Setup() { foreach (string s in itemlist) CB_Item.Items.Add(s); CB_Item.SelectedIndex = 1; } private int entry = -1; private void ChangeEntry(object sender, EventArgs e) { SetEntry(); entry = CB_Item.SelectedIndex; L_Index.Text = "Index: " + entry.ToString("000"); GetEntry(); } private void GetEntry() { if (entry < 1) return; Grid.SelectedObject = new Item(files[entry]); RTB.Text = itemflavor[entry].Replace("\\n", Environment.NewLine); } private void SetEntry() { if (entry < 1) return; files[entry] = ((Item)Grid.SelectedObject).Write(); } private void IsFormClosing(object sender, FormClosingEventArgs e) { SetEntry(); } private int GetItemMapOffset() { if (Main.ExeFSPath == null) { WinFormsUtil.Alert("No exeFS code to load."); return -1; } string[] exefsFiles = Directory.GetFiles(Main.ExeFSPath); if (!File.Exists(exefsFiles[0]) || !Path.GetFileNameWithoutExtension(exefsFiles[0]).Contains("code")) { WinFormsUtil.Alert("No .code.bin detected."); return -1; } byte[] data = File.ReadAllBytes(exefsFiles[0]); byte[] reference = Main.Config.ORAS ? new byte[] { 0x92, 0x0A, 0x06, 0x3F, 0x75, 0x02 } // ORAS (vanilla @ 47C640) : new byte[] { 0x92, 0x0A, 0x06, 0x3F, 0x41, 0x02 }; // XY (vanilla @ 43DB74) int ptr = Util.IndexOfBytes(data, reference, 0x400000, 0) - 2 + reference.Length; return ptr; } private void B_Table_Click(object sender, EventArgs e) { var items = files.Select(z => new Item(z)); Clipboard.SetText(TableUtil.GetTable(items, itemlist)); System.Media.SystemSounds.Asterisk.Play(); } } }
{ "pile_set_name": "Github" }
/****************************************************************************** * * Module Name: exmutex - ASL Mutex Acquire/Release functions * *****************************************************************************/ /* * Copyright (C) 2000 - 2008, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions, and the following disclaimer, * without modification. * 2. Redistributions in binary form must reproduce at minimum a disclaimer * substantially similar to the "NO WARRANTY" disclaimer below * ("Disclaimer") and any redistribution must be conditioned upon * including a substantially similar Disclaimer requirement for further * binary redistribution. * 3. Neither the names of the above-listed copyright holders nor the names * of any contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * NO WARRANTY * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */ #include <acpi/acpi.h> #include "accommon.h" #include "acinterp.h" #include "acevents.h" #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exmutex") /* Local prototypes */ static void acpi_ex_link_mutex(union acpi_operand_object *obj_desc, struct acpi_thread_state *thread); /******************************************************************************* * * FUNCTION: acpi_ex_unlink_mutex * * PARAMETERS: obj_desc - The mutex to be unlinked * * RETURN: None * * DESCRIPTION: Remove a mutex from the "AcquiredMutex" list * ******************************************************************************/ void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc) { struct acpi_thread_state *thread = obj_desc->mutex.owner_thread; if (!thread) { return; } /* Doubly linked list */ if (obj_desc->mutex.next) { (obj_desc->mutex.next)->mutex.prev = obj_desc->mutex.prev; } if (obj_desc->mutex.prev) { (obj_desc->mutex.prev)->mutex.next = obj_desc->mutex.next; /* * Migrate the previous sync level associated with this mutex to the * previous mutex on the list so that it may be preserved. This handles * the case where several mutexes have been acquired at the same level, * but are not released in opposite order. */ (obj_desc->mutex.prev)->mutex.original_sync_level = obj_desc->mutex.original_sync_level; } else { thread->acquired_mutex_list = obj_desc->mutex.next; } } /******************************************************************************* * * FUNCTION: acpi_ex_link_mutex * * PARAMETERS: obj_desc - The mutex to be linked * Thread - Current executing thread object * * RETURN: None * * DESCRIPTION: Add a mutex to the "AcquiredMutex" list for this walk * ******************************************************************************/ static void acpi_ex_link_mutex(union acpi_operand_object *obj_desc, struct acpi_thread_state *thread) { union acpi_operand_object *list_head; list_head = thread->acquired_mutex_list; /* This object will be the first object in the list */ obj_desc->mutex.prev = NULL; obj_desc->mutex.next = list_head; /* Update old first object to point back to this object */ if (list_head) { list_head->mutex.prev = obj_desc; } /* Update list head */ thread->acquired_mutex_list = obj_desc; } /******************************************************************************* * * FUNCTION: acpi_ex_acquire_mutex_object * * PARAMETERS: time_desc - Timeout in milliseconds * obj_desc - Mutex object * Thread - Current thread state * * RETURN: Status * * DESCRIPTION: Acquire an AML mutex, low-level interface. Provides a common * path that supports multiple acquires by the same thread. * * MUTEX: Interpreter must be locked * * NOTE: This interface is called from three places: * 1) From acpi_ex_acquire_mutex, via an AML Acquire() operator * 2) From acpi_ex_acquire_global_lock when an AML Field access requires the * global lock * 3) From the external interface, acpi_acquire_global_lock * ******************************************************************************/ acpi_status acpi_ex_acquire_mutex_object(u16 timeout, union acpi_operand_object *obj_desc, acpi_thread_id thread_id) { acpi_status status; ACPI_FUNCTION_TRACE_PTR(ex_acquire_mutex_object, obj_desc); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Support for multiple acquires by the owning thread */ if (obj_desc->mutex.thread_id == thread_id) { /* * The mutex is already owned by this thread, just increment the * acquisition depth */ obj_desc->mutex.acquisition_depth++; return_ACPI_STATUS(AE_OK); } /* Acquire the mutex, wait if necessary. Special case for Global Lock */ if (obj_desc == acpi_gbl_global_lock_mutex) { status = acpi_ev_acquire_global_lock(timeout); } else { status = acpi_ex_system_wait_mutex(obj_desc->mutex.os_mutex, timeout); } if (ACPI_FAILURE(status)) { /* Includes failure from a timeout on time_desc */ return_ACPI_STATUS(status); } /* Acquired the mutex: update mutex object */ obj_desc->mutex.thread_id = thread_id; obj_desc->mutex.acquisition_depth = 1; obj_desc->mutex.original_sync_level = 0; obj_desc->mutex.owner_thread = NULL; /* Used only for AML Acquire() */ return_ACPI_STATUS(AE_OK); } /******************************************************************************* * * FUNCTION: acpi_ex_acquire_mutex * * PARAMETERS: time_desc - Timeout integer * obj_desc - Mutex object * walk_state - Current method execution state * * RETURN: Status * * DESCRIPTION: Acquire an AML mutex * ******************************************************************************/ acpi_status acpi_ex_acquire_mutex(union acpi_operand_object *time_desc, union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state) { acpi_status status; ACPI_FUNCTION_TRACE_PTR(ex_acquire_mutex, obj_desc); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* Must have a valid thread ID */ if (!walk_state->thread) { ACPI_ERROR((AE_INFO, "Cannot acquire Mutex [%4.4s], null thread info", acpi_ut_get_node_name(obj_desc->mutex.node))); return_ACPI_STATUS(AE_AML_INTERNAL); } /* * Current sync level must be less than or equal to the sync level of the * mutex. This mechanism provides some deadlock prevention */ if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { ACPI_ERROR((AE_INFO, "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%d)", acpi_ut_get_node_name(obj_desc->mutex.node), walk_state->thread->current_sync_level)); return_ACPI_STATUS(AE_AML_MUTEX_ORDER); } status = acpi_ex_acquire_mutex_object((u16) time_desc->integer.value, obj_desc, walk_state->thread->thread_id); if (ACPI_SUCCESS(status) && obj_desc->mutex.acquisition_depth == 1) { /* Save Thread object, original/current sync levels */ obj_desc->mutex.owner_thread = walk_state->thread; obj_desc->mutex.original_sync_level = walk_state->thread->current_sync_level; walk_state->thread->current_sync_level = obj_desc->mutex.sync_level; /* Link the mutex to the current thread for force-unlock at method exit */ acpi_ex_link_mutex(obj_desc, walk_state->thread); } return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ex_release_mutex_object * * PARAMETERS: obj_desc - The object descriptor for this op * * RETURN: Status * * DESCRIPTION: Release a previously acquired Mutex, low level interface. * Provides a common path that supports multiple releases (after * previous multiple acquires) by the same thread. * * MUTEX: Interpreter must be locked * * NOTE: This interface is called from three places: * 1) From acpi_ex_release_mutex, via an AML Acquire() operator * 2) From acpi_ex_release_global_lock when an AML Field access requires the * global lock * 3) From the external interface, acpi_release_global_lock * ******************************************************************************/ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc) { acpi_status status = AE_OK; ACPI_FUNCTION_TRACE(ex_release_mutex_object); if (obj_desc->mutex.acquisition_depth == 0) { return (AE_NOT_ACQUIRED); } /* Match multiple Acquires with multiple Releases */ obj_desc->mutex.acquisition_depth--; if (obj_desc->mutex.acquisition_depth != 0) { /* Just decrement the depth and return */ return_ACPI_STATUS(AE_OK); } if (obj_desc->mutex.owner_thread) { /* Unlink the mutex from the owner's list */ acpi_ex_unlink_mutex(obj_desc); obj_desc->mutex.owner_thread = NULL; } /* Release the mutex, special case for Global Lock */ if (obj_desc == acpi_gbl_global_lock_mutex) { status = acpi_ev_release_global_lock(); } else { acpi_os_release_mutex(obj_desc->mutex.os_mutex); } /* Clear mutex info */ obj_desc->mutex.thread_id = NULL; return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ex_release_mutex * * PARAMETERS: obj_desc - The object descriptor for this op * walk_state - Current method execution state * * RETURN: Status * * DESCRIPTION: Release a previously acquired Mutex. * ******************************************************************************/ acpi_status acpi_ex_release_mutex(union acpi_operand_object *obj_desc, struct acpi_walk_state *walk_state) { acpi_status status = AE_OK; u8 previous_sync_level; ACPI_FUNCTION_TRACE(ex_release_mutex); if (!obj_desc) { return_ACPI_STATUS(AE_BAD_PARAMETER); } /* The mutex must have been previously acquired in order to release it */ if (!obj_desc->mutex.owner_thread) { ACPI_ERROR((AE_INFO, "Cannot release Mutex [%4.4s], not acquired", acpi_ut_get_node_name(obj_desc->mutex.node))); return_ACPI_STATUS(AE_AML_MUTEX_NOT_ACQUIRED); } /* * The Mutex is owned, but this thread must be the owner. * Special case for Global Lock, any thread can release */ if ((obj_desc->mutex.owner_thread->thread_id != walk_state->thread->thread_id) && (obj_desc != acpi_gbl_global_lock_mutex)) { ACPI_ERROR((AE_INFO, "Thread %p cannot release Mutex [%4.4s] acquired by thread %p", ACPI_CAST_PTR(void, walk_state->thread->thread_id), acpi_ut_get_node_name(obj_desc->mutex.node), ACPI_CAST_PTR(void, obj_desc->mutex.owner_thread-> thread_id))); return_ACPI_STATUS(AE_AML_NOT_OWNER); } /* Must have a valid thread ID */ if (!walk_state->thread) { ACPI_ERROR((AE_INFO, "Cannot release Mutex [%4.4s], null thread info", acpi_ut_get_node_name(obj_desc->mutex.node))); return_ACPI_STATUS(AE_AML_INTERNAL); } /* * The sync level of the mutex must be equal to the current sync level. In * other words, the current level means that at least one mutex at that * level is currently being held. Attempting to release a mutex of a * different level can only mean that the mutex ordering rule is being * violated. This behavior is clarified in ACPI 4.0 specification. */ if (obj_desc->mutex.sync_level != walk_state->thread->current_sync_level) { ACPI_ERROR((AE_INFO, "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %d current %d", acpi_ut_get_node_name(obj_desc->mutex.node), obj_desc->mutex.sync_level, walk_state->thread->current_sync_level)); return_ACPI_STATUS(AE_AML_MUTEX_ORDER); } /* * Get the previous sync_level from the head of the acquired mutex list. * This handles the case where several mutexes at the same level have been * acquired, but are not released in reverse order. */ previous_sync_level = walk_state->thread->acquired_mutex_list->mutex.original_sync_level; status = acpi_ex_release_mutex_object(obj_desc); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } if (obj_desc->mutex.acquisition_depth == 0) { /* Restore the previous sync_level */ walk_state->thread->current_sync_level = previous_sync_level; } return_ACPI_STATUS(status); } /******************************************************************************* * * FUNCTION: acpi_ex_release_all_mutexes * * PARAMETERS: Thread - Current executing thread object * * RETURN: Status * * DESCRIPTION: Release all mutexes held by this thread * * NOTE: This function is called as the thread is exiting the interpreter. * Mutexes are not released when an individual control method is exited, but * only when the parent thread actually exits the interpreter. This allows one * method to acquire a mutex, and a different method to release it, as long as * this is performed underneath a single parent control method. * ******************************************************************************/ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread) { union acpi_operand_object *next = thread->acquired_mutex_list; union acpi_operand_object *obj_desc; ACPI_FUNCTION_ENTRY(); /* Traverse the list of owned mutexes, releasing each one */ while (next) { obj_desc = next; next = obj_desc->mutex.next; obj_desc->mutex.prev = NULL; obj_desc->mutex.next = NULL; obj_desc->mutex.acquisition_depth = 0; /* Release the mutex, special case for Global Lock */ if (obj_desc == acpi_gbl_global_lock_mutex) { /* Ignore errors */ (void)acpi_ev_release_global_lock(); } else { acpi_os_release_mutex(obj_desc->mutex.os_mutex); } /* Mark mutex unowned */ obj_desc->mutex.owner_thread = NULL; obj_desc->mutex.thread_id = NULL; /* Update Thread sync_level (Last mutex is the important one) */ thread->current_sync_level = obj_desc->mutex.original_sync_level; } }
{ "pile_set_name": "Github" }
# {{ ansible_managed }} {% for name,value in veda_pipeline_worker_environment.items() -%} {%- if value -%} export {{ name }}="{{ value }}" {% endif %} {%- endfor %}
{ "pile_set_name": "Github" }
var Hash = require('./_Hash'), ListCache = require('./_ListCache'), Map = require('./_Map'); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear;
{ "pile_set_name": "Github" }
/* * Copyright © 2012, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * All rights reserved. * * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed * under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ /** * @file tgDataLogger.cpp * @brief Contains the definition of interface class tgDataLogger. * @author Brian Tietz * $Id$ */ #include "tgDataLogger.h" #include "util/tgBaseCPGNode.h" #include "core/tgSpringCableActuator.h" #include "core/tgRod.h" #include "core/abstractMarker.h" #include "LinearMath/btVector3.h" #include <iostream> #include <fstream> tgDataLogger::tgDataLogger(std::string fileName) : m_fileName(fileName) {} /** Virtual base classes must have a virtual destructor. */ tgDataLogger::~tgDataLogger() { } void tgDataLogger::render(const tgRod& rod) const { std::ofstream tgOutput; tgOutput.open(m_fileName.c_str(), std::ios::app); btVector3 com = rod.centerOfMass(); tgOutput << com[0] << "," << com[1] << "," << com[2] << "," << rod.mass() << ","; tgOutput.close(); } void tgDataLogger::render(const tgSpringCableActuator& mSCA) const { std::ofstream tgOutput; tgOutput.open(m_fileName.c_str(), std::ios::app); tgOutput << mSCA.getRestLength() << "," << mSCA.getCurrentLength() << "," << mSCA.getTension() << ","; tgOutput.close(); } void tgDataLogger::render(const tgModel& model) const { const std::vector<abstractMarker>& markers = model.getMarkers(); const std::size_t n = 0; for (std::size_t i = 0; i < n; i++) { std::ofstream tgOutput; tgOutput.open(m_fileName.c_str(), std::ios::app); btVector3 worldPos = markers[i].getWorldPosition(); tgOutput << worldPos[0] << "," << worldPos[1] << "," << worldPos[2] << ","; tgOutput.close(); } }
{ "pile_set_name": "Github" }
CLASS net/minecraft/class_2300 net/minecraft/command/EntitySelector FIELD field_10820 basePredicate Ljava/util/function/Predicate; FIELD field_10821 uuid Ljava/util/UUID; FIELD field_10822 limit I FIELD field_10823 positionOffset Ljava/util/function/Function; FIELD field_10824 box Lnet/minecraft/class_238; FIELD field_10825 distance Lnet/minecraft/class_2096$class_2099; FIELD field_10826 sorter Ljava/util/function/BiConsumer; FIELD field_10827 usesAt Z FIELD field_10828 senderOnly Z FIELD field_10829 localWorldOnly Z FIELD field_10830 includesNonPlayers Z FIELD field_10831 playerName Ljava/lang/String; FIELD field_10832 type Lnet/minecraft/class_1299; METHOD <init> (IZZLjava/util/function/Predicate;Lnet/minecraft/class_2096$class_2099;Ljava/util/function/Function;Lnet/minecraft/class_238;Ljava/util/function/BiConsumer;ZLjava/lang/String;Ljava/util/UUID;Lnet/minecraft/class_1299;Z)V ARG 1 count ARG 2 includesNonPlayers ARG 3 localWorldOnly ARG 4 basePredicate ARG 5 distance ARG 6 positionOffset ARG 7 box ARG 8 sorter ARG 9 senderOnly ARG 10 playerName ARG 11 uuid ARG 12 type ARG 13 usesAt METHOD method_9809 getEntity (Lnet/minecraft/class_2168;)Lnet/minecraft/class_1297; METHOD method_9811 getPlayer (Lnet/minecraft/class_2168;)Lnet/minecraft/class_3222; METHOD method_9813 getPlayers (Lnet/minecraft/class_2168;)Ljava/util/List; METHOD method_9814 getEntities (Lnet/minecraft/class_243;Ljava/util/List;)Ljava/util/List; METHOD method_9815 getLimit ()I METHOD method_9816 getEntities (Lnet/minecraft/class_2168;)Ljava/util/List; METHOD method_9817 getPositionPredicate (Lnet/minecraft/class_243;)Ljava/util/function/Predicate; METHOD method_9818 checkSourcePermission (Lnet/minecraft/class_2168;)V METHOD method_9819 includesNonPlayers ()Z METHOD method_9820 isSenderOnly ()Z METHOD method_9821 isLocalWorldOnly ()Z METHOD method_9822 getNames (Ljava/util/List;)Lnet/minecraft/class_5250; METHOD method_9823 appendEntitiesFromWorld (Ljava/util/List;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Ljava/util/function/Predicate;)V
{ "pile_set_name": "Github" }
/* * Implement any scheme to find the optimal solution for the * Traveling Salesperson problem and then solve the same problem * instance using any approximation algorithm and determine * the error in the approximation. */ #include <stdio.h> int a[10][10], visited[10], no, cost, sum, vs[10]; int least(int c) { int i, nc = 999, min = 999, kmin; for(i = 1; i <= no; i++) { if((a[c][i] != 0) && (visited[i] == 0)) if(a[c][i] < min) { min = a[i][1] + a[c][i]; kmin = a[c][i]; nc = i; } } if(min != 999) cost += kmin; return nc; } void tsp(int city) { int ncity; visited[city] = 1; printf("%d ->",city); ncity = least(city); if(ncity == 999) { cost += a[city][1]; printf("1\n"); return; } tsp(ncity); } void nearest_n(int city) { int min, j, i, u; vs[city] = 1; printf("%d -> ", city); u = city; for(j = 1; j <= no; j++) { min = 999; for (i = 0; i <= no; ++i) if((vs[i] == 0) && (a[city][i] != 0)) if(a[city][i] < min) { min = a[city][i]; u = i; } vs[u] = 1; if(min != 999) { sum += min; printf("%d -> ", u); } city = u; } printf("1\n"); sum += a[u][1]; } int main() { int i, j; printf("Enter the No of Cities\n"); scanf("%d", &no); printf("\nEnter the Adjacency Matrix\n"); for(i = 1; i <= no; i++) for(j = 1; j <=no; j++) scanf("%d", &a[i][j]); printf("Using Dynamic Prog\n"); tsp(1); printf("Cost is %d\n", cost); printf("Using approx method\n"); nearest_n(1); printf("Cost is %d\n", sum); printf ("\nRatio is %f\n", (float)sum/cost); return 0; }
{ "pile_set_name": "Github" }
java -cp target/kafka-examples-producer-1.0-SNAPSHOT.jar -Dlog4j.configuration=file:src/main/resources/log4j.properties kafka.examples.producer.TransactionalProducerExample "$@"
{ "pile_set_name": "Github" }
export PATH="/usr/local/bin:/usr/bin:/bin"
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in D:\android-sdk-windows/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #}
{ "pile_set_name": "Github" }
require('./angular-locale_prg-001'); module.exports = 'ngLocale';
{ "pile_set_name": "Github" }
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.tencent.wstt.gt.util"> <application android:allowBackup="true" android:label="@string/app_name" android:supportsRtl="true"> </application> </manifest>
{ "pile_set_name": "Github" }
<loading hidden="{{hidden}}" bindchange="loadingChange"> 保存中... </loading> <!--修改订单状态--> <view class="container"> <view class="order-detail"> <view class="order-con"> <text class="text1">订单状态</text> <picker class="text2" bindchange="bindPickerChange" range-key="name" value="{{index}}" range="{{stateName}}"> <view class="picker"> {{stateName[index].name}} <image class="see-icon" src="{{imageCtx}}dealer/s_change.png"></image> </view> </picker> </view> <view class="order-con" wx:if="{{reasonShow}}"> <text class="text1">原因:</text> <input class="logistics-num" type="text" placeholder="请说明原因" maxlength="30" bindinput="reason"/> </view> </view> <button class="save-btn" bindtap="updateState">保存</button> </view>
{ "pile_set_name": "Github" }
"DOTAAbilities" { //================================================================================================================= // Phoenix: Sun Ray //================================================================================================================= "phoenix_sun_ray" { // General //------------------------------------------------------------------------------------------------------------- "ID" "5626" // unique ID number for this ability. Do not change this once established or it will invalidate collected stats. "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_POINT" "AbilityUnitDamageType" "DAMAGE_TYPE_MAGICAL" "SpellImmunityType" "SPELL_IMMUNITY_ENEMIES_NO" "SpellDispellableType" "SPELL_DISPELLABLE_NO" "FightRecapLevel" "1" "MaxLevel" "6" // Casting //------------------------------------------------------------------------------------------------------------- "AbilityCastRange" "1300" "AbilityCastPoint" "0.01" // Time //------------------------------------------------------------------------------------------------------------- "AbilityCooldown" "30" "AbilityDuration" "6.0" // Cost //------------------------------------------------------------------------------------------------------------- "AbilityManaCost" "100" // Special //------------------------------------------------------------------------------------------------------------- "AbilitySpecial" { "01" { "var_type" "FIELD_INTEGER" "hp_cost_perc_per_second" "6" } "02" { "var_type" "FIELD_INTEGER" "base_damage" "14 20 26 32 62 92" } "03" { "var_type" "FIELD_FLOAT" "hp_perc_damage" "1.5 3.25 5.0 6.75 6.75 6.75" "LinkedSpecialBonus" "special_bonus_unique_phoenix_5" } "04" { "var_type" "FIELD_INTEGER" "base_heal" "7 10 13 16 32 50" } "05" { "var_type" "FIELD_FLOAT" "hp_perc_heal" "0.625 1.25 1.875 2.5 3.125 3.75" } "06" { "var_type" "FIELD_INTEGER" "radius" "130" } "07" { "var_type" "FIELD_FLOAT" "tick_interval" "0.2" } "08" { "var_type" "FIELD_FLOAT" "forward_move_speed" "250" } "09" { "var_type" "FIELD_FLOAT" "turn_rate_initial" "250" } "10" { "var_type" "FIELD_FLOAT" "turn_rate" "25" } } } }
{ "pile_set_name": "Github" }
package org.fbk.cit.hlt.dirha; public interface Token { String getToken( ); String getPos( ); String getLemma( ); String getFrame( ); String getRole( ); void setToken( String token ); void setPos( String pos ); void setLemma( String lemma ); void setFrame( String frame ); void setRole( String role ); }
{ "pile_set_name": "Github" }
<map id="rlinifile.h" name="rlinifile.h"> <area shape="rect" id="node2" href="$rlcanopentypes_8h.html" title="rlcanopentypes.h" alt="" coords="285,80,408,107"/> <area shape="rect" id="node3" href="$rlcannode_8h.html" title="rlcannode.h" alt="" coords="135,155,227,181"/> <area shape="rect" id="node12" href="$rlinifile_8cpp.html" title="rlinifile.cpp" alt="" coords="471,80,553,107"/> <area shape="rect" id="node13" href="$rllib_8h.html" title="rllib.h" alt="" coords="561,155,613,181"/> <area shape="rect" id="node14" href="$rlsvganimator_8h.html" title="rlsvganimator.h" alt="" coords="638,80,751,107"/> <area shape="rect" id="node15" href="$rlsubset_8h.html" title="rlsubset.h" alt="" coords="787,155,866,181"/> <area shape="rect" id="node17" href="$rlreport_8h.html" title="rlreport.h" alt="" coords="874,80,947,107"/> <area shape="rect" id="node9" href="$rlcanopenclient_8h.html" title="rlcanopenclient.h" alt="" coords="252,155,375,181"/> <area shape="rect" id="node11" href="$rlcanopentypes_8cpp.html" title="rlcanopentypes.cpp" alt="" coords="399,155,537,181"/> <area shape="rect" id="node4" href="$rlcannode_8cpp.html" title="rlcannode.cpp" alt="" coords="5,229,112,256"/> <area shape="rect" id="node5" href="$rlcanopen_8h.html" title="rlcanopen.h" alt="" coords="136,229,227,256"/> <area shape="rect" id="node6" href="$rlcanopen_8cpp.html" title="rlcanopen.cpp" alt="" coords="55,304,161,331"/> <area shape="rect" id="node7" href="$rlcanopendaemon_8h.html" title="rlcanopendaemon.h" alt="" coords="185,304,327,331"/> <area shape="rect" id="node8" href="$rlcanopendaemon_8cpp.html" title="rlcanopendaemon.cpp" alt="" coords="179,379,333,405"/> <area shape="rect" id="node10" href="$rlcanopenclient_8cpp.html" title="rlcanopenclient.cpp" alt="" coords="251,229,387,256"/> <area shape="rect" id="node16" href="$rlsvganimator_8cpp.html" title="rlsvganimator.cpp" alt="" coords="637,155,763,181"/> <area shape="rect" id="node18" href="$rlreport_8cpp.html" title="rlreport.cpp" alt="" coords="890,155,977,181"/> </map>
{ "pile_set_name": "Github" }
""" Interface for CANtact devices from Linklayer Labs """ import time import logging from unittest.mock import Mock from can import BusABC, Message logger = logging.getLogger(__name__) try: import cantact except ImportError: logger.warning( "The CANtact module is not installed. Install it using `python3 -m pip install cantact`" ) class CantactBus(BusABC): """CANtact interface""" @staticmethod def _detect_available_configs(): try: interface = cantact.Interface() except NameError: # couldn't import cantact, so no configurations are available return [] channels = [] for i in range(0, interface.channel_count()): channels.append({"interface": "cantact", "channel": "ch:%d" % i}) return channels def __init__( self, channel, bitrate=500000, poll_interval=0.01, monitor=False, bit_timing=None, _testing=False, **kwargs ): """ :param int channel: Channel number (zero indexed, labeled on multi-channel devices) :param int bitrate: Bitrate in bits/s :param bool monitor: If true, operate in listen-only monitoring mode :param BitTiming bit_timing Optional BitTiming to use for custom bit timing setting. Overrides bitrate if not None. """ if _testing: self.interface = MockInterface() else: self.interface = cantact.Interface() self.channel = int(channel) self.channel_info = "CANtact: ch:%s" % channel # configure the interface if bit_timing is None: # use bitrate self.interface.set_bitrate(int(channel), int(bitrate)) else: # use custom bit timing self.interface.set_bit_timing( int(channel), int(bit_timing.brp), int(bit_timing.tseg1), int(bit_timing.tseg2), int(bit_timing.sjw), ) self.interface.set_enabled(int(channel), True) self.interface.set_monitor(int(channel), monitor) self.interface.start() super().__init__( channel=channel, bitrate=bitrate, poll_interval=poll_interval, **kwargs ) def _recv_internal(self, timeout): frame = self.interface.recv(int(timeout * 1000)) if frame is None: # timeout occured return None, False msg = Message( arbitration_id=frame["id"], is_extended_id=frame["extended"], timestamp=frame["timestamp"], is_remote_frame=frame["rtr"], dlc=frame["dlc"], data=frame["data"][: frame["dlc"]], channel=frame["channel"], is_rx=(not frame["loopback"]), # received if not loopback frame ) return msg, False def send(self, msg, timeout=None): self.interface.send( self.channel, msg.arbitration_id, bool(msg.is_extended_id), bool(msg.is_remote_frame), msg.dlc, msg.data, ) def shutdown(self): self.interface.stop() def mock_recv(timeout): if timeout > 0: frame = {} frame["id"] = 0x123 frame["extended"] = False frame["timestamp"] = time.time() frame["loopback"] = False frame["rtr"] = False frame["dlc"] = 8 frame["data"] = [1, 2, 3, 4, 5, 6, 7, 8] frame["channel"] = 0 return frame else: # simulate timeout when timeout = 0 return None class MockInterface: """ Mock interface to replace real interface when testing. This allows for tests to run without actual hardware. """ start = Mock() set_bitrate = Mock() set_bit_timing = Mock() set_enabled = Mock() set_monitor = Mock() start = Mock() stop = Mock() send = Mock() channel_count = Mock(return_value=1) recv = Mock(side_effect=mock_recv)
{ "pile_set_name": "Github" }
<?xml version="1.0" standalone="no" ?> <!DOCTYPE pov SYSTEM "/usr/share/cgc-docs/replay.dtd"><pov> <cbid>CROMU_00011</cbid> <replay> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>Q5jpnU = |"q","3fNxI","bQCUK","mVqmb9","fADAhlK"|~|"Y","Zp"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>jzIrG2 = Q5jpnU ~ Q5jpnU\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>K2ECD = |"9iw","tmLvdH","PE","bBoQ8","VELKk","JOjrs"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>Gh9mke = |"9iw","tmLvdH"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>Gh9mke@K2ECD\n</data></write> <read echo="ascii"><delim>\n</delim><match><data>TRUE\n</data></match></read> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>KqcOcx = Gh9mke + K2ECD\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>DAa5cB = |"E","NcY8Lc","YcbG7ki","TUPs2","FgR","yD2Q","rK"|~|"xod"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>FZJQN = K2ECD ~ KqcOcx\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>RXZMIXP = |"g","C2c6zE","F"|~|"A5Nz2","5i","GnSqL","uYBYW","PhP","8i7pF0z","C2c6zE"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>ExW3zy6fiS = Gh9mke ^ RXZMIXP\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>2AgYslC = |"e","AUBZG2O","1NQbdYp","RY","drl","J7cOL","uA"|-|"drl","XkxqjNS","Oi0YF"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>VJBPv = |"0sPdX","XNvGAj","YHb","GCqVU","1fVq","89M0Z6"|^|"aKqn","iNXSKBs","6ojrU","Om9Kq","xB2QcS","YHb","cLnNUJ"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>ueel7 = |"pRiih","z2T","YLTIYTw","WGmJR","IW","I6F"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>vwMqDS = |"WGmJR","pRiih"|\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>vwMqDS@ueel7\n</data></write> <read echo="ascii"><delim>\n</delim><match><data>TRUE\n</data></match></read> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>nNTmNe = ueel7 + vwMqDS\n</data></write> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>.p\n</data></write> <read echo="ascii"><delim>\n</delim><match><data>Q5jpnU = |"q","3fNxI","bQCUK","mVqmb9","fADAhlK","Y","Zp"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>jzIrG2 = ||\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>K2ECD = |"9iw","tmLvdH","PE","bBoQ8","VELKk","JOjrs"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>Gh9mke = |"9iw","tmLvdH"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>KqcOcx = |"9iw","tmLvdH","PE","bBoQ8","VELKk","JOjrs"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>DAa5cB = |"E","NcY8Lc","YcbG7ki","TUPs2","FgR","yD2Q","rK","xod"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>FZJQN = ||\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>RXZMIXP = |"g","F","A5Nz2","5i","GnSqL","uYBYW","PhP","8i7pF0z"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>ExW3zy6fiS = ||\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>2AgYslC = |"e","AUBZG2O","1NQbdYp","RY","J7cOL","uA"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>VJBPv = |"YHb"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>ueel7 = |"pRiih","z2T","YLTIYTw","WGmJR","IW","I6F"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>vwMqDS = |"WGmJR","pRiih"|\n</data></match></read> <read echo="ascii"><delim>\n</delim><match><data>nNTmNe = |"pRiih","z2T","YLTIYTw","WGmJR","IW","I6F"|\n</data></match></read> <read echo="ascii"><delim> </delim><match><data>\x3E </data></match></read> <write echo="ascii"><data>.l\n</data></write> </replay> </pov>
{ "pile_set_name": "Github" }
// *********************************************************************** // Assembly : XLabs.Forms // Author : XLabs Team // Created : 12-27-2015 // // Last Modified By : XLabs Team // Last Modified On : 01-04-2016 // *********************************************************************** // <copyright file="ValidateEmailAddress.cs" company="XLabs Team"> // Copyright (c) XLabs Team. All rights reserved. // </copyright> // <summary> // This project is licensed under the Apache 2.0 license // https://github.com/XLabs/Xamarin-Forms-Labs/blob/master/LICENSE // // XLabs is a open source project that aims to provide a powerfull and cross // platform set of controls tailored to work with Xamarin Forms. // </summary> // *********************************************************************** // using System; using System.Diagnostics; using System.Text.RegularExpressions; namespace XLabs.Forms.Validation { /// <summary> /// Class ValidateEmailAddress. /// </summary> internal class ValidateEmailAddress : ValidatorPredicate { #region Static Fields /// <summary> /// The email address /// </summary> private static readonly Regex EmailAddress = new Regex( @"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" + @"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$"); #endregion #region Constructors and Destructors /// <summary> /// Initializes a new instance of the <see cref="ValidateEmailAddress"/> class. /// </summary> public ValidateEmailAddress() : base(Validators.Email, PredicatePriority.Low, IsEmailAddress) { } #endregion #region Methods /// <summary> /// Determines whether [is email address] [the specified rule]. /// </summary> /// <param name="rule">The rule.</param> /// <param name="value">The value.</param> /// <returns><c>true</c> if [is email address] [the specified rule]; otherwise, <c>false</c>.</returns> private static bool IsEmailAddress(Rule rule, string value) { try { return string.IsNullOrEmpty(value) || EmailAddress.IsMatch(value); } catch (Exception ex) { Debug.WriteLine(ex.Message); throw; } } #endregion } }
{ "pile_set_name": "Github" }