您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ uc函数代码示例

51自学网 2021-06-03 09:05:03
  C++
这篇教程C++ uc函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中uc函数的典型用法代码示例。如果您正苦于以下问题:C++ uc函数的具体用法?C++ uc怎么用?C++ uc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了uc函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[]){  char *sensor, *beam_mode, *input_dir, *output_dir;  currArg = 1;  // Parse command line  if (argc == 1)    usage(argv[0]);  if (currArg < (argc - 5)) {    printf("Insufficient arguments./n");     usage(argv[0]);  }    sensor = (char *) MALLOC(sizeof(char)*10);  sprintf(sensor, "%s", uc(argv[currArg]));  beam_mode = (char *) MALLOC(sizeof(char)*10);  sprintf(beam_mode, "%s", uc(argv[currArg+1]));  input_dir = (char *) MALLOC(sizeof(char)*512);  strcpy(input_dir, argv[currArg+2]);  output_dir = (char *) MALLOC(sizeof(char)*512);  strcpy(output_dir, argv[currArg+3]);  asfSplashScreen (argc, argv);    // Rock and roll  filter_srfs(sensor, beam_mode, input_dir, output_dir);  // Clean up  FREE(beam_mode);  FREE(input_dir);  FREE(output_dir);    exit(0);}
开发者ID:DavinSimmons,项目名称:ASF_MapReady,代码行数:35,


示例2: main

int main(int argc, char *argv[]) {    int i;    int size = 5;    char *string;    /* Read from stdin if no command line arguments. */    if (argc == 1) {        if ((string = malloc(sizeof(char) * size)) == NULL) {            perror("Error calling malloc in main");            exit(1);        }        while (uc_getline(string, size, stdin) > 0) {            printf("%s/n", uc(string));        }        free(string);    }    /* Process each argument. */    else {        for(i = 1; i < argc; i++) {            printf("%s ", uc(argv[i]));        }        printf("/n");    }    return 0;}
开发者ID:Fiegs,项目名称:exercises,代码行数:29,


示例3: freecell_solver_u2p_suit

/* * This function converts a string containing a suit letter (that is * one of H,S,D,C) into its suit ID. * * The suit letter may come somewhat after the beginning of the string. * * */int freecell_solver_u2p_suit(const char * suit){    char c;    c = uc(*suit);    while (            (c != 'H') &&            (c != 'S') &&            (c != 'D') &&            (c != 'C') &&            (c != ' ') &&            (c != '/0'))    {        suit++;        c = uc(*suit);    }    if (c == 'H')        return 0;    else if (c == 'C')        return 1;    else if (c == 'D')        return 2;    else if (c == 'S')        return 3;    else        return 0;}
开发者ID:BackupTheBerlios,项目名称:fc-solve-svn,代码行数:35,


示例4: builds

/* s1 is source, s2 dest */void builds(const char *s1, char *s2){        int i;        char c;        for (i=0; (i<8) && (*s1) && (*s1 != '*') && (*s1 != SLASH) &&            (*s1 != '.') && (*s1 != ' '); i++)                *s2++ = uc(*s1++);        if (i == 8)                while (*s1 && (*s1 != '.') && (*s1 != SLASH))                        s1++;        c = ((*s1 == '*') ? '?' : ' ');        if (*s1 == '*')                s1++;        if (*s1 == '.')                s1++;        for (; i < 8; i++)                *s2++ = c;        for (i=0;(i<3) && (*s1) && (*s1 != '*') && (*s1 != SLASH) &&            (*s1 != '.') && (*s1 != ' '); i++)                *s2++ = uc(*s1++);        c = ((*s1 == '*') ? '?' : ' ');        for (; i < 3; i++)                *s2++ = c;}
开发者ID:ragnar76,项目名称:emutos,代码行数:34,


示例5:

void cheboksarovv::lab7(){ double* a1=new double[N];  double* a2=new double[N];  double e=0.00000001;   do{       a2=v(um(A,x),b);       a1=v(a1,umc(a2,uc(um(A,a2),a2)/uc(um(A,a2),um(A,a2))));            }while(logik(x,a1,e));}
开发者ID:NikitaZelyunko,项目名称:2016-203,代码行数:9,


示例6: xcmps

static int xcmps(char *s, char *d){        register int i;        for (i = 0; i < 11; i++)                if (uc(*s++) != uc(*d++))                        return(0);        return(1);}
开发者ID:ragnar76,项目名称:emutos,代码行数:9,


示例7: ispolygon

int ispolygon(char *inFile){    int isPolygon=0;    char *line=NULL, *s;    FILE *fp;    fp = fopen(inFile, "r");    if (!fp) {        char n[1024];        sprintf(n, "%s.csv", inFile);        fp = fopen(n, "r");    }    if (!fp) {        char *basename = get_basename(inFile);        char n[1024];        sprintf(n, "%s.csv", basename);        fp = fopen(n, "r");        FREE(basename);    }    if (fp) {        line = (char*)MALLOC(sizeof(char)*LINE_MAX);        int line_count=0;        while (fgets(line, LINE_MAX, fp)) {            line[strlen(line)-1] = '/0';            s=line;            while(isspace((int)(*s))) ++s;            if (*s == '#') {                char *tok = strtok(s,",");                if (tok) {                    s = strstr(uc(tok), "FILE");                    if (s && strncmp(uc(s), "FILE", 4) == 0) {                        tok = strtok(NULL, ",");                        if (tok) {                            s = strstr(uc(tok), "POLYGON");                            if (s && strncmp(uc(s), "POLYGON", 7) == 0) {                                isPolygon = 1;                                break;                            }                        }                    }                }            }            // avoid scanning the entire contents of a huge file            if (++line_count>100)              break;        }    }    FREE(line);    FCLOSE(fp);    return isPolygon;}
开发者ID:DavinSimmons,项目名称:ASF_MapReady,代码行数:52,


示例8: while

char *hex(void *p, int len){	if ((HEXSZ-1)/2 < len)		len = (HEXSZ-1)/2;	char *out = _xbuf;	while (len--) {		*out++ = hx[(*uc(p))>>4];		*out++ = hx[(*uc(p))&15];		(u_char*)p++;	};	*out = 0;	return _xbuf;};
开发者ID:LucaBongiorni,项目名称:bully-1,代码行数:13,


示例9: asmcheck_do_sou

voidasmcheck_do_sou(struct tdesc *tdp, struct node *np){	struct mlist *mlp;	struct child *chp;	char *format;	if (np->format != NULL) {		char *upper = uc(np->format);		printf("!	struct/union %s size 0x%x/n", upper, tdp->size);#if 0 /* { FIXME: */		{			int l;			if ((np->format2 != NULL) &&			    (l = stabs_log2(tdp->size)) != -1) {				printf("#define/t%s 0x%x/n", np->format2, l);			}		}#endif /* } */		free(upper);	}	/*	 * Run thru all the fields of a struct and print them out	 */	for (mlp = tdp->data.members.forw; mlp != NULL; mlp = mlp->next) {		/*		 * If there's a child list, only print those members.		 */		if (np->child != NULL) {			if (mlp->name == NULL)				continue;			chp = find_child(np, mlp->name);			if (chp == NULL)				continue;			format = uc(chp->format);		} else {			format = NULL;		}		if (mlp->fdesc == NULL)			continue;		switch_on_type(mlp, mlp->fdesc, format, 0);		if (format != NULL)			free(format);	}}
开发者ID:PrincetonUniversity,项目名称:piton-sw,代码行数:49,


示例10: CreateThread

HRESULT CUpdateCheckEx::Check(BOOL bRunInThread, HWND hParent, CImageList* pImages,	BOOL bUIOnlyOnUpdate){	HRESULT hRes = S_OK;	if(bRunInThread == TRUE)	{		g_ucInitStruct.hParent = hParent;		g_ucInitStruct.pImages = pImages;		g_ucInitStruct.bUIOnlyOnUpdate = bUIOnlyOnUpdate;		DWORD dwDummyID = 0; // Pointer may not be NULL on Windows 9x/Me		HANDLE h = CreateThread(NULL, 0, CfuEx_Thread, NULL, 0, &dwDummyID);		if((h != NULL) && (h != INVALID_HANDLE_VALUE)) CloseHandle(h);		else hRes = E_FAIL;	}	else	{		// CStatusDialogEx dlg(hParent, false, true);		// dlg.Show();		// std_string str = TRL("Check for Updates");		// str += _T("...");		// dlg.SetStatus(true, str.c_str());		CUpdateCheckEx uc(hParent, pImages, bUIOnlyOnUpdate);		uc._RunCheck(NULL);		// dlg.Release();	}	ASSERT(SUCCEEDED(hRes));	return hRes;}
开发者ID:xt9852,项目名称:KeePassXT,代码行数:34,


示例11: rc

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void jdlvFrame::SelectColor (QAction *act) // called from menu action{                                          //  if (act->text().startsWith("random")) {    elRecolorator rc(act->text().indexOf("Bi") > 0 ? "%%%%%%%" : "*******");    primeWorld->changeTheWorld(rc);         vista->updateTheWorld  (); notifyOfChange();  }  else { char cl = act->text().at(0).unicode();    switch (cl) {    case 'b': curColor = elcDefault; cl = 'o'; break; // -- "blanco"    case 'r': curColor = elcRojo;              break;    case 'v': curColor = elcVerde;             break;    case 'a': curColor = elcAzul;              break;    case 'x': curColor = elcCianico;           break;    case 'c': curColor = elcCastano;           break;    case 'z': curColor = elcMagenta;           break;    case 'U':      { elRecolorator uc("ooooooo"); // everything -> default color ("blanco")        primeWorld->changeTheWorld(uc);             vista->updateTheWorld  (); notifyOfChange(); return; }    }    setColor->setIcon (act->icon());    QRect S = vista->getSelection();    if (eM == elModeEdit && !S.isEmpty()) {   QString rule(elcMax, QChar(cl));      elRecolorator rc(rule.cStr(), S.left(), S.right(), S.top(), S.bottom());      primeWorld->changeTheWorld(rc);           vista->updateTheWorld  (); notifyOfChange();} } }
开发者ID:epiktetov,项目名称:juego-de-la-vida,代码行数:29,


示例12: uc

tempotest_UserClass::tempotest_UserClass(IdMsg *msg){  mainid = msg->id;  delete msg;  CProxy_tempotest_UserClass uc(thishandle);  uc.doSendRecv();}
开发者ID:davidheryanto,项目名称:sc14,代码行数:7,


示例13: to_upper

 std::string to_upper(const std::string &s) {     std::string uc(s);     size_t l = uc.size();     for (size_t i=0; i<l; i++)         uc[i] = static_cast<char>(std::toupper(uc[i]));     return uc; }
开发者ID:JemDay,项目名称:qpid-proton,代码行数:7,


示例14: uc

  void Bspline3DSetBase::tileOrbitals(const TinyVector<int,3>& boxdup)  {    TensorType uc(        Lattice.R(0,0)/static_cast<RealType>(boxdup[0]),        Lattice.R(0,1)/static_cast<RealType>(boxdup[0]),        Lattice.R(0,2)/static_cast<RealType>(boxdup[0]),        Lattice.R(1,0)/static_cast<RealType>(boxdup[1]),        Lattice.R(1,1)/static_cast<RealType>(boxdup[1]),        Lattice.R(1,2)/static_cast<RealType>(boxdup[1]),        Lattice.R(2,0)/static_cast<RealType>(boxdup[2]),        Lattice.R(2,1)/static_cast<RealType>(boxdup[2]),        Lattice.R(2,2)/static_cast<RealType>(boxdup[2]));    UnitLattice.set(uc);    int norb=OrbitalSetSize/(boxdup[0]*boxdup[1]*boxdup[2]);    int i=norb;    for(int ic=0; ic<boxdup[0]; ic++)      for(int jc=0; jc<boxdup[1]; jc++)        for(int kc=0; kc<boxdup[2]; kc++)        {          if(ic == 0 && jc == 0 && kc == 0) continue;          PosType c(ic,jc,kc);          PosType displ=UnitLattice.toCart(c);          for(int o=0; o<norb; o++, i++)          {            P[i]=P[o];            Centers[i]=Centers[o]+displ;            Origins[i]=Origins[o]+displ;          }        }    //for(i=0; i<OrbitalSetSize; i++)    //  app_log() << Centers[i] << endl;  }
开发者ID:digideskio,项目名称:qmcpack,代码行数:34,


示例15: while

QString MythUIVirtualKeyboard::decodeChar(QString c){    QString res;    while (c.length() > 0)    {        if (c.startsWith("0x"))        {            QString sCode = c.left(6);            bool bOK;            short nCode = sCode.toShort(&bOK, 16);            c = c.mid(6);            if (bOK)            {                QChar uc(nCode);                res += QString(uc);            }            else                LOG(VB_GENERAL, LOG_ERR, QString("bad char code (%1)")                                .arg(sCode));        }        else        {            res += c.left(1);            c = c.mid(1);        }    }    return res;}
开发者ID:Olti,项目名称:mythtv,代码行数:32,


示例16: uc

void UsageComputer::Read(Expression* x) {  if (is_write_) {    UsageComputer uc(weight_, false);    uc.Visit(x);  } else {    Visit(x);  }}
开发者ID:BlitzMaxModules,项目名称:axe.mod,代码行数:8,


示例17: uc

void About::runUpdateCheck(){	updateView->clear();	UpgradeCheckerGUI uc(updateView);	disconnect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );	uc.fetch();	connect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );}
开发者ID:Fahad-Alsaidi,项目名称:scribus,代码行数:8,


示例18: compile

	void compile(CompileOptions& opts)	{		Buffer unit_data(default_allocator());		UnitCompiler uc(opts);		uc.compile_unit(opts.source_path());		opts.write(uc.blob());	}
开发者ID:neuroradiology,项目名称:crown,代码行数:9,


示例19: match

static BOOL match(char *s1, char *s2){    register int i;    /*     **  skip VFAT long file name entries     */    if (s2[11] == FA_LFN)        return( FALSE );    /*     **  check for deleted entry.  wild cards don't match deleted entries,     **  only specific requests for deleted entries do.     */    if (*s2 == (char)0xe5)    {        if (*s1 == '?')            return( FALSE );        else if (*s1 == (char)0xe5)            return( TRUE );    }    /*     **  compare names     */    for (i=0; i < 11 ; i++, s1++, s2++)        if (*s1 != '?')            if (uc(*s1) != uc(*s2))                return( FALSE );    /*     **  check attribute match   M01.01.SCC.FS.08     ** volume labels and subdirs must be specifically asked for     */    if(  (*s1 != FA_VOL)  &&  (*s1 != FA_SUBDIR)  )        if (!(*s2))            return( TRUE );    return( *s1 & *s2 ? TRUE : FALSE ) ;}
开发者ID:ragnar76,项目名称:emutos,代码行数:44,


示例20: CfuEx_Thread

DWORD WINAPI CfuEx_Thread(LPVOID lpParameter){	UNREFERENCED_PARAMETER(lpParameter);	CUpdateCheckEx uc(g_ucInitStruct.hParent, g_ucInitStruct.pImages,		g_ucInitStruct.bUIOnlyOnUpdate);	uc._RunCheck(NULL);	return 0;}
开发者ID:xt9852,项目名称:KeePassXT,代码行数:10,


示例21: asmcheck_do_intrinsic

voidasmcheck_do_intrinsic(struct tdesc *tdp, struct node *np){	if (np->format != NULL) {		char *upper = uc(np->format);		printf("/t/* %s 0x%x *//n", upper, tdp->size);		free(upper);	}}
开发者ID:PrincetonUniversity,项目名称:piton-sw,代码行数:11,


示例22: is_absolute_path

intis_absolute_path(const ichar *name){ if (isDirSep(name[0])#ifdef __WINDOWS__      || (iswalpha(uc(name)) && name[1] == ':')#endif    )    return TRUE;  return FALSE;}
开发者ID:swi-to-yap,项目名称:packages-sgml,代码行数:11,


示例23: is_absolute_path

intis_absolute_path(const char *name){ if (isDirSep(name[0])#ifdef WIN_NT      || (isalpha(uc(name)) && name[1] == ':')#endif    )    return TRUE;  return FALSE;}
开发者ID:flavioc,项目名称:XSB,代码行数:11,


示例24: uc

void CompiledLoop::removeTagChecks() {  // Eliminate all tag checks for loop variable and upper bound  // As a side effect, this will add all arrays indexed by the loop variable to the LoopHeaderNode  UntagClosure uc(this, _loopVar);  _loopVar->forAllUsesDo(&uc);  if (_lowerBound) {    uc.theLoopPReg = _lowerBound;    _lowerBound->forAllUsesDo(&uc);  }  uc.theLoopPReg = _upperBound;  _upperBound->forAllUsesDo(&uc);}
开发者ID:sebkirche,项目名称:strongtalk,代码行数:12,


示例25: append_ext_if_needed

/* Append an extension if it's not already there. Case insensitive. */void append_ext_if_needed(char *file_name, const char *newExt,                          const char *alsoAllowedExt){  char *ext, extuc[1024];  char new1uc[1024], new2uc[1024];  ext = findExt(file_name);  if (ext) {    strcpy(extuc, uc(ext));    if (newExt) {      strcpy(new1uc,uc(newExt));      if (strcmp(extuc, new1uc)==0) {        return;      }    }    if (alsoAllowedExt) {      strcpy(new2uc,uc(alsoAllowedExt));      if (strcmp(extuc, new2uc)==0) {        return;      }    }  }  // If we haven't returned yet, we need to apply the extension  // don't append any "." if one is already there  const char *p = newExt;  if (file_name[strlen(file_name)-1] == '.')      ++p;  // if the basename doesn't end with a "." and the given extension  // doesn't have a leader ".", we will add one ourselves  if (file_name[strlen(file_name)-1] != '.' && p[0] != '.')      strcat(file_name, ".");  // now can append given extension  strcat(file_name, p);}
开发者ID:glshort,项目名称:MapReady,代码行数:39,


示例26: switch_on_type

static voidswitch_on_type(struct mlist *mlp, struct tdesc *tdp, char *format, int level){	boolean_t allocated = B_FALSE;	if (format == NULL) {		allocated = B_TRUE;		format = uc(mlp->name);	}	switch (tdp->type) {	case INTRINSIC:		print_intrinsic(mlp, tdp, format, level);		break;	case POINTER:		print_pointer(mlp, tdp, format, level);		break;	case ARRAY:		print_array(mlp, tdp, format, level);		break;	case FUNCTION:		print_function(mlp, tdp, format, level);		break;	case UNION:		print_union(mlp, tdp, format, level);		break;	case ENUM:		print_enum(mlp, tdp, format, level);		break;	case FORWARD:		print_forward(mlp, tdp, format, level);		break;	case TYPEOF:		print_typeof(mlp, tdp, format, level);		break;	case STRUCT:		print_struct(mlp, tdp, format, level);		break;	case VOLATILE:		print_volatile(mlp, tdp, format, level);		break;	default:		fprintf(stderr, "Switch to Unknown type/n");		error = B_TRUE;		break;	}	if (allocated)		free(format);}
开发者ID:PrincetonUniversity,项目名称:piton-sw,代码行数:49,


示例27: kprintf

static DND *dcrack(const char **np){    register const char *n;    DND *p;    register int d;    LONG l;                                             /* M01.01.1212.01 */#if DBGFSDIR    kprintf("/n dcrack(%p -> '%s')", np, *np);#endif    /*     **  get drive spec (or default) and make sure drive is logged in     */    n = *np;                    /*  get ptr to name             */    if (n[1] == ':')            /*  if we start with drive spec */    {        d = uc(n[0]) - 'A';     /*    compute drive number      */        n += 2;                 /*    bump past drive number    */    }    else                                /*  otherwise                   */        d = run->p_curdrv;      /*    assume default            */    /* M01.01.1212.01 */    if ((l = ckdrv(d)) < 0)     /*  check for valid drive & log */        return((DND*) l );              /*    in.  abort if error       */    /*     **  if the pathspec begins with SLASH, then the first element is     **  the root.  Otherwise, it is the current default directory.     Get     **  the proper DND for this element     */    if (*n == SLASH)    {   /* [D:]/path */        p = drvtbl[d]->m_dtl;   /*  get root dir for log drive  */        n++;                    /*  skip over slash             */    }    else        p = dirtbl[(int)(run->p_curdir[d])];    /*  else use curr dir   */    /* whew ! */ /*  <= thankyou, Jason, for that wonderful comment */    *np = n;    return( (DND*)p );}
开发者ID:ragnar76,项目名称:emutos,代码行数:47,


示例28: freecell_solver_u2p_card_number

/* * This function converts a card number from its user representation * (e.g: "A", "K", "9") to its card number that can be used by * the program. * */int freecell_solver_u2p_card_number(const char * string){    char rest;    while (1)    {        rest = uc(*string);        if ((rest == '/0') || (rest == ' ') || (rest == '/t'))        {            return 0;        }        if (rest == 'A')        {            return 1;        }        else if (rest =='J')        {            return 11;        }        else if (rest == 'Q')        {            return 12;        }        else if (rest == 'K')        {            return 13;        }        else if (rest == '1')        {            return (*(string+1) == '0')?10:1;        }        else if ((rest == '0') || (rest == 'T'))        {            return 10;        }        else if ((rest >= '2') && (rest <= '9'))        {            return (rest-'0');        }        else        {            string++;        }    }}
开发者ID:BackupTheBerlios,项目名称:fc-solve-svn,代码行数:51,



注:本文中的uc函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ uc_emu_start函数代码示例
C++ ubrk_next函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。