source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> typedef unsigned long long int ll; int reverse (int n) { int i,rev,digits = (int) log10f(n)+1; char *s1 = (char*) malloc(digits); char *s2 = (char*) malloc(digits); sprintf (s1,"%llu",n); for (i=0; i<strlen(s1); i++) s2[i] = s1[str...
1,329,800
the-stack-v2-dedup
C
#include <assert.h> #include <math.h> #include <stdbool.h> #include "polygon.h" #include "test_util.h" /** * Returns the vector located at ptr. * * @param ptr a void * pointer that points to a vector on the heap. */ Vector void_to_vec(void *ptr) { return *((Vector *) ptr); } // Make square at (+/-1, +/-1) Lis...
1,329,801
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<string.h> char buff[40]; char M[300][4]; char IR[4]; char R[4]; int PTR,IC,SI,PI,TI; int ranum[30] ; int C; struct PCB{ int TLL; int TTL; int LLC; int TTC; int JID; }; FILE *inputfile,*outputfile; struct PCB *pcb; void INIT_PCB() { printf("inside IN...
1,329,802
the-stack-v2-dedup
C
#ifndef __WRT_NTP_H__ #define __WRT_NTP_H__ #define int8 char #define uint8 unsigned char #define uint32 unsigned int #define ulong32 unsigned long #define long32 long #define int32 int #define long64 long long #define u_int32 unsigned long #define NTP_PORT (123) /* NTP port number */...
1,329,803
the-stack-v2-dedup
C
#ifndef _GUI_APP_H #define _GUI_APP_H #include "lvgl.h" #include "lv_port_disp.h" #include "lv_port_indev.h" void lv_gui_init(void); void tab2_name_set(char *name); void tab2_dev_add(char num,int mode); uint16_t get_tab_act(void); //获取当前活动标签 void update_time(void); //时间日期更新 void updata_thfg(float T,float H,uint32_t...
1,329,804
the-stack-v2-dedup
C
#include <Python.h> static PyObject* any_pointer(PyObject* self, PyObject* args) { char* from; int fromlen, i; long addr0, start, end, intervallen; if (!PyArg_ParseTuple(args, "ls#ll", &addr0, &from, &fromlen, &start, &end)) return NULL; intervallen = end-start; for (i=0; i<=fromlen-4; i++) { ...
1,329,805
the-stack-v2-dedup
C
//Made by Ihor Paprotskyi, FI-2, SE, Group 1 struct Matrix2x2 { int _11, _12, _21, _22; }; struct Vector2 { int _1, _2; }; int fibonacci(size_t n);
1,329,806
the-stack-v2-dedup
C
#include "lists.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /** * get_nodeint_at_index - return the nth node of a list * @head: list * @index: index to return the node of * Return: nth node */ listint_t *get_nodeint_at_index(listint_t *head, unsigned int index) { unsigned int counter = 0; whi...
1,329,807
the-stack-v2-dedup
C
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <signal.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "request.h" #include "module.h" #include "cJSON.h" #define KEPINFO_GET_CONFIG "https://www.simicloud.com/api/re...
1,329,808
the-stack-v2-dedup
C
/* Partner 1 Name & E-mail: Abraham Kuruvila akuru003@ucr.edu * Partner 2 Name & E-mail: Rogelio Vazquez rvazq002@ucr.edu * Lab Section: 22 * Assignment: Lab # Exercise #: Lab 10 Exercise 2 * * I acknowledge all content contained herein, excluding template or example * code, is my own original work. */ /// ...
1,329,809
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <jrb.h> #define clean while (getchar() != '\n'); void menu() { printf("\n1. load data from file\n"); printf("2. run pagerank algorithm one time\n"); printf("3. run pagerank algorithm m time\n"); printf("4. show server url and spam bot...
1,329,810
the-stack-v2-dedup
C
#include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/linkage.h> #include <linux/moduleloader.h> #include <linux/slab.h> #include <linux/uaccess.h> #include <linux/delay.h> #include "dummy_struct.h" asmlinkage extern long (*sysptr_stack_sched)(void *arg); asmlinkage long stack_sc...
1,329,811
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include "graph.h" #include "topologies.h" #include "defs.h" #include "errors.h" graph_t * graph_create (void) { graph_t *g = (graph_t *) malloc(sizeof(graph_t)); if (!g) return NULL; g->n_nodes = 0; g->cap_nodes = GRAPH_BLK_SIZE; ...
1,329,812
the-stack-v2-dedup
C
/*************************************************************************************************/ /* Copyright: QingDao Eastsoft Communication Technology Co.,Ltd. File Name: sdk.h Description: The general interface for high layer. Author: eastsoft Version: v1.0 Date: 2016/01/25 History: */ /*******************...
1,329,813
the-stack-v2-dedup
C
#ifndef _I2C_SIM_H_ #define _I2C_SIM_H_ sbit I2C_SDA = P1^5; sbit I2C_SCL = P1^4; #define I2C_SDA_HIGH I2C_SDA=1 #define I2C_SDA_LOW I2C_SDA=0 #define I2C_SCL_HIGH I2C_SCL=1 #define I2C_SCL_LOW I2C_SCL=0 #define I2C_SDA_SET_INPUT XBYTE[0xB102] &= ~0x20 #define I2C_SDA_SET_OUTPUT XBYTE...
1,329,814
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstfree.c :+: :+: :+: ...
1,329,815
the-stack-v2-dedup
C
#pragma once #include "MemoryFilter.h" #include "MemoryStorage.h" #include "Mitigations.h" extern MemoryStorage VMStorage; NTSTATUS NTAPI PreNtAllocateVirtualMemory( OUT PBOOL SkipOriginalCall, IN HANDLE ProcessHandle, IN OUT PVOID* BaseAddress, IN ULONG_PTR ZeroBits, IN OUT PSIZE_T Region...
1,329,816
the-stack-v2-dedup
C
/** * @file * * @date Jul 12, 2014 * @author Anton Bondarev */ #include <unistd.h> #include <kernel/panic.h> #include <kernel/task.h> #include <kernel/task/resource/task_vfork.h> #include <kernel/sched/sched_lock.h> #include <hal/vfork.h> #include <hal/ptrace.h> #include <compiler.h> static void *vfork_body_ex...
1,329,817
the-stack-v2-dedup
C
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <assert.h> #include <exception> // NSubstitute.Core.CallRouterFactory struct CallRouterFactory_t421141002; // NSubstitute.Core.ICallRouter struct ICallRouter_t1036440279; // ...
1,329,818
the-stack-v2-dedup
C
/* * INT0_private.h * * Created on: Mar 30, 2016 * Author: Lenovo */ #ifndef INT0_PRIVATE_H_ #define INT0_PRIVATE_H_ #define MCUCR *((volatile u8*)(0x55)) #define MCUCSR *((volatile u8*)(0x54)) #define GICR *((volatile u8*)(0x5B)) #define GIFR *((volatile u8*)(0x5A)) #endif /* INT0_PRIV...
1,329,819
the-stack-v2-dedup
C
#include <stdio.h> void ocorrenciasX(int x, int *a) { int i,cont = 0; for(i=0;i<sizeof(a);i++){ if(x == a[i]){cont++;} } } int main() { int a[10] = {0,1,2,3,4,5,6,7,8,9}, x; printf("\nDigite o número inteiro x a ser determinada quantas ocorrências tiveram neste vetor A: "); scan...
1,329,820
the-stack-v2-dedup
C
/* -*- C -*- */ /* * Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates * * 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...
1,329,821
the-stack-v2-dedup
C
/************************************************************************** * file: hw9_1.c * author: Yufan Xu * assignment: homework 9_1 * description: this program simulates the action of bash * arguments * date created: 10/23/2018 * date last ...
1,329,822
the-stack-v2-dedup
C
/********************************************************************* * SEGGER MICROCONTROLLER SYSTEME GmbH * * Solutions for real time microcontroller applications * * www.segger.com * ************************************...
1,329,823
the-stack-v2-dedup
C
#include<stdio.h> #include<ctype.h> #include<string.h> int mystrlen(char *string) { int i = 0; while (string[i] != '\0') i++; return i; } char *mystrcpy(char *string1, char *string2) { int i = 0; while (string2[i] != '\0') { string1[i] = string2[i]; i++; } string1[i] = '\0'; return string1; } int mystrc...
1,329,824
the-stack-v2-dedup
C
#ifndef INCL_DCM_H040257C9_7F0D_49D6_879A_6382BCEA8F4F #define INCL_DCM_H040257C9_7F0D_49D6_879A_6382BCEA8F4F #define REPO_NS repo #define REPO_NS_BEGIN namespace REPO_NS { #define REPO_NS_END } #define USING_REPO_NS using namespace REPO_NS; #endif
1,329,825
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { system("cls"); //INPUT - @STUDENT:ADD YOUR CODE FOR INPUT HERE: int m,n; printf("Enter m="); scanf("%d",&m); printf("Enter n="); scanf("%d",&n); int x=m ; int y= n; int r; while (y != 0 ) { r= x%y; x= ...
1,329,826
the-stack-v2-dedup
C
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "DSRC" * found in "J2735_201603_ASN_CC.asn" * `asn1c -gen-PER -fcompound-names -fincludes-quoted` */ #ifndef _VType_H_ #define _VType_H_ #include "asn_application.h" /* Including external dependencies */ #include "NativeEnumerated....
1,329,827
the-stack-v2-dedup
C
#pragma once; #include "device_launch_parameters.h" #include <stdio.h> #include "cuda_runtime.h" #include "ExtensionStructure.h" #include "Embedding.h" extern "C" inline __global__ void kernelPrintEmbedding(struct_Embedding *d_Embedding,int noElem_Embedding); extern "C" inline cudaError_t printEmbedding(struct_Embeddi...
1,329,828
the-stack-v2-dedup
C
// // LyMapEnum.m // LyBaiduMapProtocol // // Created by 张杰 on 2017/6/19. // Copyright © 2017年 张杰. All rights reserved. // typedef enum { LyUserTrackingModeNone = 0, /// 普通定位模式 LyUserTrackingModeHeading, /// 定位方向模式 LyUserTrackingModeFollow, /// 定位跟随模式 LyUserTr...
1,329,829
the-stack-v2-dedup
C
// // linktable.h // menu // // Created by wyy on 2017/10/16. // Copyright © 2017年 wyy. All rights reserved. // #ifndef _LINK_TABLE_H_ #define _LINK_TABLE_H_ #define SUCCESS 0 #define FAILURE (-1) typedef struct LinkTableNode { struct LinkTableNode *pNext; } tLinkTableNode; typedef struct LinkTable { tLi...
1,329,830
the-stack-v2-dedup
C
#ifndef TASK_H #define TASK_H #include <stdint.h> enum taskstate { TASK_STATE_FREE = 0, TASK_STATE_READY = 1, TASK_STATE_RUNNING = 2, TASK_STATE_PAUSE = 3, TASK_STATE_EXIT = 4 }; typedef struct { uint32_t spsr,lr,r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14; } __attribute__((PACKED)) task_pcb_t; ...
1,329,831
the-stack-v2-dedup
C
/* * Copyright (C) 2015 Martin Schröder <mkschreder.uk@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 2.1 * as published by the Free Software Foundation * * This program is distributed in the hope that it ...
1,329,832
the-stack-v2-dedup
C
// WidgetBlueprintGeneratedClass CF_SetCharacterFlag.CF_SetCharacterFlag_C // Size: 0x310 (Inherited: 0x308) struct UCF_SetCharacterFlag_C : UCF_BaseComboBoolExec_C { struct FPointerToUberGraphFrame UberGraphFrame; // 0x308(0x08) void GetAllCharacterFlagRowHandles(struct TArray<struct FCharacterFlagsRowHandle> Rows)...
1,329,833
the-stack-v2-dedup
C
// // ManAdDefine.h // ManAdDefine // // Created by MezzoMedia on 13. 2. 1.. // Copyright (c) 2013년 MezzoMedia. All rights reserved. // #ifndef ManAdDefine_h #define ManAdDefine_h #define MAN_BANNER_AD_HEIGHT 50.0f /* 광고 수신 에러 */ typedef enum { ManAdSuccess = 0, // 성공 ManAdN...
1,329,834
the-stack-v2-dedup
C
/* * Copyright (c) 2013 Sandia National Laboratories. All rights reserved. * * $COPYRIGHT$ * * Additional copyrights may follow * * $HEADER$ * */ #ifndef MCA_OMPI_RTE_PMI_INTERNAL_H #define MCA_OMPI_RTE_PMI_INTERNAL_H BEGIN_C_DECLS extern int ompi_rte_pmi_name_init(void); extern int ompi_rte_pmi_name...
1,329,835
the-stack-v2-dedup
C
#include <stdio.h> int main() { int good_price = 223; int guess_price; int guess_count=0; for(;;) { printf("请输入你猜测的商品价格:\n"); scanf("%d",&guess_price); if(guess_price==good_price) { printf("你猜的价格就是商品实际价格,恭喜你才对了!!!\n"); guess_count++; ...
1,329,836
the-stack-v2-dedup
C
#include "c-smart-pointers.h" struct meta { void (*dtor)(void *); void *ptr; }; static struct meta *get_meta(void *ptr) { return ptr - sizeof (struct meta); } //__attribute__((malloc)) void *smalloc(size_t size, void (*dtor)(void *)) { struct meta *meta = malloc(sizeof (struct meta) + size); *met...
1,329,837
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,329,838
the-stack-v2-dedup
C
#include <stdio.h> int main(void){printf("%d", 53744203);return 0;}
1,329,839
the-stack-v2-dedup
C
#pragma once #include <stdint.h> // System.Collections.Generic.List`1<Games.Fellow.Fellow> struct List_1_t1633; // Games.Fellow.Fellow struct Fellow_t1174; // System.ValueType #include "mscorlib_System_ValueType.h" // System.Collections.Generic.List`1/Enumerator<Games.Fellow.Fellow> struct Enumerator_t17077 { // Sys...
1,329,840
the-stack-v2-dedup
C
#pragma PRQA_MESSAGES_OFF 1057,1307,3625 #ifndef _INTTYPES_H #define _INTTYPES_H #include <stdint.h> /* Decimal */ #define PRId8 "d" #define PRId16 "d" #define PRId32 "d" #define PRId64 "lld" #define PRIdLEAST8 "d" #define PRIdLEAST16 "d" #define PRIdLEAST32 "d" #define PRIdLEAST64 "lld" #define PRIdFAST8 "d...
1,329,841
the-stack-v2-dedup
C
// pig_latin.c #include <stdio.h> #include <ctype.h> #include <string.h> #define LENGTH 80 void convert(char [],int,char []); int main(void) { char str[LENGTH],conv[LENGTH] = {'\0'}; int len; printf("Enter sentence: "); fgets(str,LENGTH + 1,stdin); len = strlen(str); if (str[len - 1] == '\n') { str[len -...
1,329,842
the-stack-v2-dedup
C
/* ============================================================================ Name : Lecture8-1.c Author : Chanse Meyer Version : Copyright : Property of Chanse Meyer. Do Not Copy. Description : Hello World in C, Ansi-style =====================================================================...
1,329,843
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strjoin.c :+: :+: :+: ...
1,329,844
the-stack-v2-dedup
C
/****************************************************************************** 版权所有 (C), 2015-2025, 网络科技有限公司 ****************************************************************************** 文 件 名 : rct_epr.h 版 本 号 : 初稿 作 者 : jimk 生成日期 : 2016年5月26日 最近修改 : 功能描述 : 函数列表 :...
1,329,845
the-stack-v2-dedup
C
/********************** BEGIN LICENSE BLOCK ************************************ * * JZ4750 mobile_tv Project V1.0.0 * INGENIC CONFIDENTIAL--NOT FOR DISTRIBUTION IN SOURCE CODE FORM * Copyright (c) Ingenic Semiconductor Co. Ltd 2005. All rights reserved. * * This file, and the files included with this file, i...
1,329,846
the-stack-v2-dedup
C
#include <stdio.h> #include <string.h> #define ERR_INVALID_TUPLE 0x10 typedef struct { unsigned long long startTimestamp; unsigned long long endTimestamp; int result; unsigned long long count; double sum; } MeanState; static int parseArgs(MeanState *state, int argc, char *argv[]); static void mean(MeanState *st...
1,329,847
the-stack-v2-dedup
C
// unit_tests.h // Larry Kiser October 30, 2015 // the main unit test extern int test( void ) ; // boolean assert function for unit testing extern int assert( int testresult, char error_message[], ... ) ;
1,329,848
the-stack-v2-dedup
C
Always 記得: 字串後的空字元 02.06.Modifying arrays 01_03-array1 #include <stdio.h> int main() { int values[10]; int x; for(x=0;x<10;x++) printf("%d\n",values[x]); return(0); } 01_03-copy1 #include <stdio.h> int main() { int original[5] = { 45, 50, 88, 100, 213 }; int duplicate[5]; int x; ...
1,329,849
the-stack-v2-dedup
C
/* * Copyright (C) Lyq root#lyq.me * File Name : pixelTag.h * Creation Time : 2015-5-25 * Environment : Windows8.1-64bit VS2013 OpenCV2.4.9 * Homepage : http://www.lyq.me */ #ifndef PIXEL_TAG #define PIXEL_TAG #include "baseFunction.h" void calcPixelTag( vector<Mat> &frames, vector<int> &pixelTag, int &...
1,329,850
the-stack-v2-dedup
C
/* Characteristics of floating types */ #define DBL_RADIX 2 /* radix of exponent for a double */ #define DBL_ROUNDS 1 /* doubles round when converted to int */ #define FLT_RADIX 2 /* radix of float exponent */ #define FLT_ROUNDS 1 /* float also rounds to int */ #if defined(i8096) || defined(m6800) || defined(m680...
1,329,851
the-stack-v2-dedup
C
unsigned char test_bmp[] = { 0x42, 0x4d, 0x36, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0xc3, 0x0e, 0x00, 0x00, 0x00, 0...
1,329,852
the-stack-v2-dedup
C
// SPDX-License-Identifier: GPL-2.0-only /* drivers/media/platform/s5p-cec/exynos_hdmi_cecctrl.c * * Copyright (c) 2009, 2014 Samsung Electronics * http://www.samsung.com/ * * cec ftn file for Samsung TVOUT driver */ #include <linux/io.h> #include <linux/device.h> #include "exynos_hdmi_cec.h" #include "regs-ce...
1,329,853
the-stack-v2-dedup
C
// Copyright (c) 2017 The Bitcoin developers #ifndef CONFIG_H #define CONFIG_H #define HAVE_ENDIAN_H 1 /* #undef HAVE_SYS_ENDIAN_H */ #define HAVE_DECL_HTOLE16 1 #define HAVE_DECL_HTOBE16 1 #define HAVE_DECL_BE16TOH 1 #define HAVE_DECL_LE16TOH 1 #define HAVE_DECL_HTOBE32 1 #define HAVE_DECL_HTOLE32 1 #define HAVE_D...
1,329,854
the-stack-v2-dedup
C
#ifndef SPI_H #define SPI_H #include <avr/io.h> #include <avr/common.h> #include <stdio.h> #define DDR_SPI DDRB #define DD_MISO PB6 #define DD_MOSI PB5 #define CAN_CS PB4 #define DD_SCK PB7 void SPI_MasterInit(void); void SPI_write(char cData); void SPI_SlaveInit(void); char SPI_read(void); void SPI_Init(); #endif
1,329,855
the-stack-v2-dedup
C
You are given a pointer/reference to a node to be deleted in a linked list. The task is to delete the node. Pointer/reference to head node is not given. You may assume that the node to be deleted is not the last node. Input: You have to complete a method which takes one argument: pointer/reference to a node to be ...
1,329,856
the-stack-v2-dedup
C
/** * Written by: Mehdi Sotoodeh * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS OR CONTRIBUTORS BE...
1,329,857
the-stack-v2-dedup
C
#include <math.h> void main() { long i, x, y, z; for(i=1; i<100000; i++) { x = sqrt(i+100); /*x为加上100后开方后的结果*/ y = sqrt(i+268); /*y为再加上168后开方后的结果*/ if(x*x==i+100 && y*y==i+268) /*如果一个数的平方根的平方等于该数,这说明此数是完全平方数*/ { printf("\n%ld\n",i); } ...
1,329,858
the-stack-v2-dedup
C
#include<stdio.h> #include "link.h" #include<stdlib.h> int main() { int choice; while(1){ printf("\n 1.Create"); printf("\n 2.Display"); printf("\n 3.Insert at the beginning "); printf("\n 4.Insert at the end"); printf...
1,329,859
the-stack-v2-dedup
C
#ifndef HAMSI_H #define HAMSI_H unsigned int rotate_right(unsigned int value, int shift); unsigned char* get_sha256(char* message); unsigned char* get_sha256_len(char* in, int len); #endif
1,329,860
the-stack-v2-dedup
C
/* * Author: SMRAZA KEEN * Date:2016/6/29 * IDE :wiringPi * Address:www.amazon.com/shops/smraza * Function: relay_test * Compiling : gcc -Wall -o relay relay.c -lwiringPi * */ #include <wiringPi.h> #include <stdio.h> #define relay 0 char key; int main(void) { printf( "Welcome to Smraza\n"); ...
1,329,861
the-stack-v2-dedup
C
#include <stdio.h> #include <stdbool.h> void reverseWords(char *s) { int i = 0, j = 0; while (s[i] != '\0') { while (s[i] == ' ') { i++; } if (s[i] == '\0') { break; } while (s[i] != '\0' && s[i] != ' ') { s[j++] = s[i++]; } ...
1,329,862
the-stack-v2-dedup
C
#include "/Library/Ruby/Gems/2.6.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h" int dec_to_oct(int decimalNumber) { int octalNumber = 0, i = 1; while (decimalNumber != 0) { octalNumber += (decimalNumber % 8) * i; decimalNumber /= 8; i *= 10; } return octalN...
1,329,863
the-stack-v2-dedup
C
#include <stdio.h> #include <time.h> #ifndef PGN_H #define PGN_H #include "types.h" #include "main.h" #include "fen.h" #define PGNHEADERSIZE 80 typedef struct { char event[PGNHEADERSIZE]; char site[PGNHEADERSIZE]; char date[PGNHEADERSIZE]; char round[PGNHEADERSIZE]; char white[PGNHEADERSIZE]; char black[PGNHE...
1,329,864
the-stack-v2-dedup
C
/* * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)c_dfe.c 5.2 7/30/85 */ /* * direct formatted external i/o - common read/write routines */ #include "fio.h" c_dfe(a,...
1,329,865
the-stack-v2-dedup
C
/* * Copyright (c) 1994, by Sun Microsystems, Inc. */ #pragma ident "@(#)ecvt.c 1.9 96/06/03 SMI" /* * ecvt converts to decimal * the number of digits is specified by ndigit * decpt is set to the position of the decimal point * sign is set to 0 for positive, 1 for negative * */ #ifndef DSHLIB #ifdef __STDC__ ...
1,329,866
the-stack-v2-dedup
C
const float MAX_THRESHOLD = 18.0; const float VARIANT_THRESHOLD = 1.0; const float TIMER_WAIT = 200.0; const int FLUSH_VALUE = 6; const float FT_MILE = 5280.0; const float SEC_HOUR = 3600.0; const float MILLI_SEC = 1000.0; const float MAX_SPEED = 16.0;
1,329,867
the-stack-v2-dedup
C
/* * assembler.h * * Created on: Jan 24, 2014 * Author: avi */ #ifndef ASSEMBLER_H_ #define ASSEMBLER_H_ #include <stdio.h> #include <stdlib.h> #include "file.h" #endif /* ASSEMBLER_H_ */
1,329,868
the-stack-v2-dedup
C
#include <stdio.h> char toUpperCase(char c) { if (c >= 'a' && c <= 'z') // c è una lettera minuscola /* 'a' (97) -> 'A' (65) 'b' (98) -> 'B' (66) ... 'z' (122) -> 'Z' (90) */ return c - ('a' - 'A'); else return c; } int main() { char ch; do { scanf("%c", ...
1,329,869
the-stack-v2-dedup
C
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <assert.h> #include <exception> // System.Security.Cryptography.X509Certificates.X509Certificate2Enumerator struct X509Certificate2Enumerator_t_1079037160_0; // System.Securi...
1,329,870
the-stack-v2-dedup
C
// Power of Two // Given an integer, write a function to determine if it is a power of two. bool isPowerOfTwo(int n) { if (n <= 0) return false; while ((n % 2 == 0) && (n >0)) { n = n/2; } if (n == 1) { return true; } else { return false; } }
1,329,871
the-stack-v2-dedup
C
#include <unistd.h> #include <errno.h> #include <fcntl.h> #include <sys/syscall.h> extern long int syscall (long int __sysno, ...) __THROW; int pipe2(int fd[2], int flag) { if (!flag) return pipe(fd); int ret = syscall(SYS_pipe2, fd, flag); if (ret != -ENOSYS) return -ret; ret = pipe(fd); if (ret) return ret; i...
1,329,872
the-stack-v2-dedup
C
void printBoard(int board[N][N]); bool isVaild(int board[N][N], int row, int col);
1,329,873
the-stack-v2-dedup
C
#include "angband.h" #include "z-doc.h" #include <assert.h> /* The Message Queue */ static int _msg_max = 500; static int _msg_count = 0; static msg_ptr *_msgs = NULL; static int _msg_head = 0; static bool _msg_append = FALSE; /* The Message "Line" */ static rect_t _msg_line_rect; static ...
1,329,874
the-stack-v2-dedup
C
/* Don't forget that you are not alone. In the most difficult moments, God is next to you. - Omar Khayyam In the name of the Lord of both wisdom and mind, To nothing sublimer can thought be applied, The Lord of whatever is named or assigned A place, the Sustainer of all and the G...
1,329,875
the-stack-v2-dedup
C
#ifndef LIBKLIB_FS_H #define LIBKLIB_FS_H /* depending on tux3 */ #include <libklib/lockdebug.h> #include <libklib/uidgid.h> struct nameidata { }; /* Generic inode */ struct inode { struct sb *i_sb; struct mutex i_mutex; unsigned long i_state; atomic_t i_count; umode_t i_mode; kuid_t i_uid; kgid_t ...
1,329,876
the-stack-v2-dedup
C
/* * File: covar014_lab2b_main_v001.c * Author: daniellecovarrubias * * Created on February 5, 2017, 4:29 PM */ #include "covar014_lab2b_asmlib_v001.h" #include "xc.h" #include <p24Fxxxx.h> #include "stdint.h" #define FRAME_PER 10 //Period (1/FrameRate) in milliseconds //CW1: FLASH CONFIGURATION WORD 1 (see P...
1,329,877
the-stack-v2-dedup
C
cocci_test_suite() { struct elf32_shdr cocci_id/* drivers/remoteproc/remoteproc_elf_loader.c 70 */; struct elf32_hdr cocci_id/* drivers/remoteproc/remoteproc_elf_loader.c 46 */; char cocci_id/* drivers/remoteproc/remoteproc_elf_loader.c 39 */; const struct firmware *cocci_id/* drivers/remoteproc/remoteproc_elf_load...
1,329,878
the-stack-v2-dedup
C
#include "bit.h" #include "mystring.h" #include "number.h" #include <stdio.h> int main() { int prime_no=23,palindrome_no=34143,fact=6,num=6,k=1; char strin[]="Welcome!"; printf("Length : %d\n ",mystrlen(strin)); if(isPrime(prime_no)) { printf("Prime\n"); } if(ispalindrome(palindrome_no)) ...
1,329,879
the-stack-v2-dedup
C
/* * DLog.h * NetHack * * Created by Dirk Zimmermann on 11/15/10. * Copyright (c) Dirk Zimmermann. All rights reserved. * */ /* * NetHack * Copyright (C) 2012 Dirk Zimmermann (me AT dirkz DOT com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU ...
1,329,880
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> typedef struct node { int info; struct node *next; }; struct node *insert_beginning(struct node *head, int item); struct node *insert_end(struct node *head, int item); int numberOfListElements(struct node *head); void displayElementsList(struct node *head); int main(...
1,329,881
the-stack-v2-dedup
C
#ifndef HALIDE__generated_function14721_schedule_8_h #define HALIDE__generated_function14721_schedule_8_h #include <tiramisu/utils.h> #ifdef __cplusplus extern "C" { #endif int function14721_schedule_8(halide_buffer_t *buf00, halide_buffer_t *buf01, halide_buffer_t *buf02, halide_buffer_t *buf03, halide_buffer_t *bu...
1,329,882
the-stack-v2-dedup
C
/* ufs_subr.c 6.1 83/07/29 */ #ifdef KERNEL #include "../h/param.h" #include "../h/systm.h" #include "../h/mount.h" #include "../h/fs.h" #include "../h/conf.h" #include "../h/buf.h" #include "../h/inode.h" #include "../h/dir.h" #include "../h/user.h" #include "../h/quota.h" #include "../h/kernel.h" #else #include <sys...
1,329,883
the-stack-v2-dedup
C
#include<stdio.h> #include<math.h> #include<stdlib.h> printsim(char sim[3][3]){ int i ; for(i=0;i<3;i++) printf("%c | %c | %c\n",sim[i][0],sim[i][1],sim[i][2]); } int checkwin(char sim[3][3]) { if (sim[0][1] == sim[0][0] && sim[0][1] == sim[0][2]){ if(sim[0][0]=='X') printf("Player X won the...
1,329,884
the-stack-v2-dedup
C
/****************************************************************************** Copyright (C), 2017, Hisilicon Tech. Co., Ltd. ****************************************************************************** File Name : vedu_init.c Version : Initial Draft Author : Hisilicon multimedia software...
1,329,885
the-stack-v2-dedup
C
#include <libwidget/widgets/Panel.h> Widget *panel_create(Widget *parent, Rectangle bound) { Panel *panel = __create(Panel); WIDGET(panel)->destroy = NULL; widget_initialize(WIDGET(panel), "Panel", parent, bound); return WIDGET(panel); }
1,329,886
the-stack-v2-dedup
C
// ROOT Headers #include "TString.h" #include "TPaveText.h" #include "TTree.h" #include "TDirectory.h" // RapidFit Utils Header #include "String_Processing.h" // RapidFit Headers #include "StringProcessing.h" // System Headers #include <string> #include <vector> #include <iostream> using namespace::std; vector<TStrin...
1,329,887
the-stack-v2-dedup
C
/* $NetBSD: cpufunc.c,v 1.2 2018/07/17 00:30:34 christos Exp $ */ /* * Copyright (c) 2017 Ryo Shimizu <ryo@nerv.org> * 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 ...
1,329,888
the-stack-v2-dedup
C
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include <stdlib.h> #include "azure_c_shared_utility/gballoc.h" #include "azure_hub_modules/dps_transport_mqtt_client.h" #include "azure_hub_modules/dps_transport_mqtt_...
1,329,889
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strlen.c :+: :+: :+: ...
1,329,890
the-stack-v2-dedup
C
#include <stdio.h> /** * main - entry point * Return: always 0 (success) */ int main(void) { int b; while (b < 10) /*while int is less than 10*/ { printf("%d", b); /*print an integer to stdout*/ b++; /*increment this operation by one until reaching 10*/ } putchar ('\n'); /*add new line at the end*/ return (0); }
1,329,891
the-stack-v2-dedup
C
//halleluyah __ just to test how to commit changes to repo #ifndef B_TREE_ADT_H_INCLUDED #define B_TREE_ADT_H_INCLUDED #define ORDER 5 #include<stdlib.h> #include<stdbool.h> const int MIN_ENTRIES = ( ( (ORDER+1)/2)-1 ); // STRUCTURES struct node; typedef struct { void* dataPtr; struct node* rightPtr; } EN...
1,329,892
the-stack-v2-dedup
C
/** Ah Quicksort in good ol' C, possibly the QuickSort. This is a very simple recursive implementation of quicksort. It is using the Hoare method for partitioning. The algorithim is very simple and this implementation will serve as my benchmark */ #include<stdio.h> #include<stdlib.h> int partition(int items[], int l...
1,329,893
the-stack-v2-dedup
C
/* * Copyright (C) 2018 STMicroelectronics * * 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 ...
1,329,894
the-stack-v2-dedup
C
/* ** EPITECH PROJECT, 2020 ** cipher.c ** File description: ** function_principale */ #include <stdio.h> #include <stdlib.h> #include "../lib/my.h" int calcul_2(int *phrase, int *code, int n) { int a = 0; int b = 0; int c = 0; int i = 0; int x = 0; for (int size = 0; size != n; size++) { ...
1,329,895
the-stack-v2-dedup
C
#ifndef SERVER_SHERK_ENGINE_MODULE_EXECUTOR_H #define SERVER_SHERK_ENGINE_MODULE_EXECUTOR_H extern char *executor_handle_command_login(char *name, char *password); extern void executor_handle_sql_show_databases(); extern int executor_handle_sql_show_tables(); extern void executor_handle_sql_use_database(char *data...
1,329,896
the-stack-v2-dedup
C
#define __CVMX_WQE_H__ #define OCT_TAG_TYPE_STRING(x) \ (((x) == CVMX_POW_TAG_TYPE_ORDERED) ? "ORDERED" : \ (((x) == CVMX_POW_TAG_TYPE_ATOMIC) ? "ATOMIC" : \ (((x) == CVMX_POW_TAG_TYPE_NULL) ? "NULL" : \ "NULL_NULL"))) typedef union cvmx_pip_wqe_word2; typedef struct CVMX_CACHE_LINE_ALIGNED cvmx_wqe_t;
1,329,897
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_recursive_factorial.c :+: :+: :+: ...
1,329,898
the-stack-v2-dedup
C
/********************************************************* * This code was written in the context of the Lightkone * European project. * Code is of the authorship of NOVA (NOVA LINCS @ DI FCT * NOVA University of Lisbon) * Author: * André Rosa (af.rosa@campus.fct.unl.pt * Under the guidance of: * Pedro Ákos Cos...
1,329,899