source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
#pragma once #define ENABLE_DEBUG_FILE 0 #define ENABLE_LICENSING 0
1,327,800
the-stack-v2-dedup
C
/* * File: P1/SymbolEntry.h * Desc: This defines the SymbolEntry structure to be used by the SymbolTable * class. * Author: Jasjeet Dhaliwal * Date: 1/10/2016 * */ #ifndef SYMBOLENTRY_H #define SYMBOLENTRY_H #include <stdlib.h> #include "Token.h" typedef struct SymbolEntry { Token * token; ...
1,327,801
the-stack-v2-dedup
C
/*************************************************************************** * Copyright (c) 2003-2006, Cryptic Studios * All Rights Reserved * Confidential Property of Cryptic Studios ***************************************************************************/ #ifndef LOAD_DEF_H__ #define LOAD_DEF_H__ ...
1,327,802
the-stack-v2-dedup
C
#include "result_set.h" #include "common.h" #include <stdlib.h> #include <stdio.h> #include <string.h> void delete_result_set(ResultSet* r) { free(r->data); free(r); } ResultSet* create_result_set(int initial_size) { ResultSet* res; res = malloc(sizeof(ResultSet)); res->data = malloc(initial_size * sizeof(...
1,327,803
the-stack-v2-dedup
C
//deletesp.c -- 문자열에서 스페이스 모두 지우기. #include <stdio.h> #include <string.h> #define MAX 64 void DelSpace(char *); int main(void) { char str[MAX] = {0}; while(fgets(str, MAX, stdin) != NULL && str[0] != '\n') { DelSpace(str); fputs(str, stdout); } return 0; } //이 함수 만드는게 이렇게 어려운 줄 몰랐다. //결국 임시 저장소(배열)을 만들고...
1,327,804
the-stack-v2-dedup
C
/* Copyright (c) 2018 Griefer@Work * * * * This software is provided 'as-is', without any express or implied * * warranty. In no event will the authors be held liable for any damages * ...
1,327,805
the-stack-v2-dedup
C
#ifndef SRC_MAIN_H_ #define SRC_MAIN_H_ #include <Arduino.h> #define BOT_ID 1 #endif /* SRC_MAIN_H_ */
1,327,806
the-stack-v2-dedup
C
#include "geminc.h" #include "gemprm.h" #define METACHARS "*?[]" int IsMetaChar ( const char ch ) /************************************************************************ * IsMetaChar * * * * This function finds Metacharacters. * * * * int IsMetaChar ( ch ) * * * * I...
1,327,807
the-stack-v2-dedup
C
#include "extcode.h" #pragma pack(push) #pragma pack(1) #ifdef __cplusplus extern "C" { #endif typedef struct { int32_t dimSize; LStrHandle value[1]; } LStrHandleArrayBase; typedef LStrHandleArrayBase **LStrHandleArray; typedef struct { uint32_t InCAN; uint32_t CarCAN; uint32_t ChgCAN; LStrHandle configfile; LS...
1,327,808
the-stack-v2-dedup
C
/* SPDX-License-Identifier: BSD-3-Clause * Copyright 2016 6WIND S.A. * Copyright 2020 Mellanox Technologies, Ltd */ #include <stddef.h> #include <rte_eal_memconfig.h> #include <rte_eal_paging.h> #include <rte_errno.h> #include <rte_mempool.h> #include <rte_malloc.h> #include <rte_rwlock.h> #include "mlx5_glue.h" #...
1,327,809
the-stack-v2-dedup
C
#include <stdio.h> #include <signal.h> #include <sys/types.h> typedef void(*signal_handler)(int); // only this file exist funciton // signal handle static void sig_handle(int signo){ if(SIGSTOP == signo){ printf("receive stop signal.\n"); } else if(SIGKILL == signo){ printf("receive kill signal.\n"); } else...
1,327,810
the-stack-v2-dedup
C
/** \file * \ingroup halftone * * $HopeName: COREhalftone!export:htrender.h(EBDSDK_P.1) $ * * Copyright (C) 2006-2014 Global Graphics Software Ltd. All rights reserved. * Global Graphics Software Ltd. Confidential Information. * * \brief * Halftone operations for rendering. */ #ifndef __HTRENDER_H__ #define ...
1,327,811
the-stack-v2-dedup
C
/* * main.c * * This program is a simple piece of code to test the Watchdog Timer. * * The watchdog will be reset any time a button is pressed. * * The value of the watchdog timer is displayed on the red LEDs. * * Created on: 13 Jan 2018 * Author: Doug from Up. * Notes: Squirrel! */ #include "HP...
1,327,812
the-stack-v2-dedup
C
/* Name - Aryan Agarwal Roll Number - 19CS30005 Machine Number - 23 */ #include <stdio.h> #include <math.h> float tri_area(float xa,float ya,float xb,float yb,float xc,float yc){ float a,b,c,s; //a,b,c are lengths of sides of triangle and s is the semi perimeter //a,b,c are calculated using the distance formula ...
1,327,813
the-stack-v2-dedup
C
/* ---------------------------------------------------------------------------- * Copyright (c) 2019 Semiconductor Components Industries, LLC (d/b/a * ON Semiconductor), All Rights Reserved * * This code is the property of ON Semiconductor and may not be redistributed * in any form without prior written permission...
1,327,814
the-stack-v2-dedup
C
#ifndef _LJB_VMON_H_ #define _LJB_VMON_H_ #pragma warning(disable:4127) #include <windows.h> #include <winioctl.h> #include <strsafe.h> #include <setupapi.h> #include <stdio.h> #include <stdlib.h> #include "ljb_vmon_ioctl.h" #include "ljb_vmon_guid.h" /* Forward declaration */ typedef struct _LJB_VMON_DEV_CTX ...
1,327,815
the-stack-v2-dedup
C
// // main.c // Tarea3DynamicArrayInC // // Created by Daniel Hernández on 1/28/19. // Copyright © 2019 Daniel Hernández. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "commonFunctions.h" #include "Stack.h" Stack stack; int main(){ stackInit(&stack); for (int i = -5; i<100...
1,327,816
the-stack-v2-dedup
C
#include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <unistd.h> #include <time.h> #define NUM_PHILS 5 #define SCALE_FACTOR 1000000 /** * Sleep for a random amount of time * * @param t longest possible time (in seconds) to sleep for */ int napping(int t) { int unique; // use for unique seed value ...
1,327,817
the-stack-v2-dedup
C
/************************ *Calculando o valor de e *************************/ #include <stdio.h> #include <locale.h> int main(void){ setlocale(LC_ALL, "Portuguese"); int n; float e = 1.0; float mult = 1.0; printf("Digite um número: "); scanf("%d", &n); for (int i=1; i<=n; i++){ ...
1,327,818
the-stack-v2-dedup
C
//Practica 2, uso del if-else y switch-case #include <stdio.h> int numero; int main(){ printf("ingrese un numero para saber el mes: \n"); scanf("%d", &numero); if((numero<=0) || (numero>=13)){ printf("Ingrese un numero comprendido entre 1 y 12.\n"); }else{ switch(numero){ case 1: printf("El mes es en...
1,327,819
the-stack-v2-dedup
C
#ifndef ADMIN_COMMANDS_HEADER #define ADMIN_COMMANDS_HEADER #include <stdio.h> #include <stdarg.h> #include <sys/socket.h> #include <netinet/in.h> #include <unistd.h> #include "../../memory/memory.h" #include "../../utils/string.h" #include "../../config/config.h" #include "../../utils/functions.h" #include "../admin....
1,327,820
the-stack-v2-dedup
C
/* UNIVERSIDADE FEDERAL DO CEARÁ CAMPUS SOBRAL ENGENHARIA DA COMPUTAÇÃO ALGORITMOS EM GRAFOS 2017.1 Abner Sousa Nascimento 374864 */ #ifndef GRAFO_H_ #define GRAFO_H_ typedef struct aresta Aresta; typedef struct listaAdj ListaAdj; typedef struct grafo Grafo; /* Estrutura para Aresta do gra...
1,327,821
the-stack-v2-dedup
C
#ifndef __PID_H #define __PID_H #include "stm32f4xx.h" /********************************************* PID 结构体********************************************/ struct PID { float P; //比例调节输出 float I; //积分调节输出 float D; //微分调节输出 float Kp; //比例系数 float Ki; //积分系数 float Kd; //微分系数 float Cu...
1,327,822
the-stack-v2-dedup
C
#include <stdio.h> int main(){ int arr[6] = {1,1,1,2,2,3}; int newSize = removeDuplicates(arr, 6); printf("%d\n", newSize); return 0; } int removeDuplicates(int* nums, int numsSize) { int index; int lastElement = nums[numsSize - 1]; int replaceAt; if(numsSize == 0) replaceAt = 0; else replaceAt = 1; for...
1,327,823
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,327,824
the-stack-v2-dedup
C
/* problem link = "https://www.hackerrank.com/challenges/two-strings/problem"*/ ---------------------------------CODE---------------------------------------------------- #include <assert.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <st...
1,327,825
the-stack-v2-dedup
C
/** @file list.c * @brief Implements linked lists * Repository: https://github.com/luizsol/MAC0122 * @author Luiz Sol (luizedusol@gmail.com) * @date 2016/05/16 */ #include "list.h" /** @brief Initializes a cell * * @return a pointer to the cell */ Celula *inicializa(){ Celula *cell = (Cel...
1,327,826
the-stack-v2-dedup
C
// // str.h // pebble_time_zway // // Created by Vadim Balashov on 26.01.16. // // #pragma once char *strdup(char *src);
1,327,827
the-stack-v2-dedup
C
#include <kernel/panic.h> #include <elf.h> #include <macros.h> #include <stdio.h> #include <types.h> #define MAX_STACK_FRAME 10000 /* * Walk up the stack and print the locations of each stack frame base. */ void bt(void) { u32 *ebp, *eip; unsigned int sf = 0; /* Start form the current stack base */ asm volati...
1,327,828
the-stack-v2-dedup
C
//webServer.h #include "esp_http_server.h" // typedef struct rest_server_context { // // char base_path[ESP_VFS_PATH_MAX + 1]; // char wwwroot[30]; // //char scratch[SCRATCH_BUFSIZE]; // } rest_server_context_t; char *getWWWroot(); esp_err_t set_content_type_from_file(httpd_req_t *req, const char *filename...
1,327,829
the-stack-v2-dedup
C
/* Getitnowmarketing This was taken and modified from Koush's extendedcommands.c http://github.com/koush/android_bootable_recovery To handle formatting non yaffs2 partitions like the ext3 /data & /cache on Incredible */ #include <assert.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <stdio.h> #i...
1,327,830
the-stack-v2-dedup
C
/* Url : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=996 author : cbsheng */ #include <stdio.h> int main() { long int own, opponent; while (scanf("%ld %ld", &own, &opponent) == 2) printf("%ld\n", own > opponent ? (own - opponent) : (opponent - own)); ...
1,327,831
the-stack-v2-dedup
C
#include "mesfonctions.h" #include<stdio.h> /* int main() { direAgeSuivant(21); return 0; } */ /* void plusGrandEntier () { int a = 0, b= 0; printf("saisir entier a:\n"); scanf( "%d",&a); printf("saisir entier b:\n"); scanf( "%d",&b); if (a<b) { printf("entier plus grand es...
1,327,832
the-stack-v2-dedup
C
/* yarpgen version 2.0 (build 7edd86d on 2021:04:18) Seed: 2897003325 Invocation: ./build/yarpgen -n test1 */ #ifndef _PKT_COUNT_C_ #define _PKT_COUNT_C_ #include <nfp.h> #include <stdint.h> #include "config.h" #include <net/csum.h> #include <net/eth.h> #include <net/hdr_ext.h> #include <net/ip.h> #include <net/tcp.h...
1,327,833
the-stack-v2-dedup
C
// detach.c #include <ansi.h> inherit F_CLEAN_UP; int main(object me, string arg) { object ob, old_app; if (me->is_busy()) return notify_fail("你现在正忙着呢。\n"); if (!arg) return notify_fail("指令格式:detach|tuoli [cancel]|<对象>\n"); if (arg == "cancel") { old_app = me->query_tem...
1,327,834
the-stack-v2-dedup
C
/* * Copyright 2013 by Texas Instruments Incorporated. * */ /* * Copyright (c) 2013, Texas Instruments Incorporated * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistribu...
1,327,835
the-stack-v2-dedup
C
/* * DataRelations_test.h * * Created on: Jul 2, 2014 * Author: vineet */ #ifndef DATARELATIONS_TEST_H_ #define DATARELATIONS_TEST_H_ #include "DataRelations.h" void test_voxel_vertices(relative_vertex_coordinate_vector v, int* vi); void test_num_set_adj_voxels(voxel_and_vertex_vector vox_ver...
1,327,836
the-stack-v2-dedup
C
#ifndef _XYGRDEFINE_H_ #define _XYGRDEFINE_H_ #include "xygext2.h" // request (from game clients) #define GR_GET_VERSION (GAME_REQ_BASE_EX + 1001) // 获取版本信息 #define GR_CHECK_NETWORK (GAME_REQ_BASE_EX + 1002) // 检查网络状况 #define GR_USER_ACTION (GAME_REQ_BASE_EX + 1010) // 玩家发送请求 #define GR_GAME_PULSE ...
1,327,837
the-stack-v2-dedup
C
/* * mm-naive.c - The fastest, least memory-efficient malloc package. * * In this naive approach, a block is allocated by simply incrementing * the brk pointer. A block is pure payload. There are no headers or * footers. Blocks are never coalesced or reused. Realloc is * implemented directly using mm_malloc an...
1,327,838
the-stack-v2-dedup
C
/* * Copyright (c) 2018-2019 Analog Devices, Inc. All rights reserved. * * See .c file for documentation. */ #ifndef _OSCILLATORS_H #define _OSCILLATORS_H #include "audio_elements_common.h" float oscillator_sine(float t); float oscillator_square(float t); float oscillator_triangle(float t); float oscillator_pul...
1,327,839
the-stack-v2-dedup
C
/* $Id$ */ /* * Copyright(C) Caldera International Inc. 2001-2002. 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 and documentation must retain the above...
1,327,840
the-stack-v2-dedup
C
#include "../slist.h" #include "../byte.h" #include "../alloc.h" int slist_unshiftb(slink** list, const void* x, size_t len) { slink* n; if((n = (slink*)alloc(sizeof(slink*) + len)) == NULL) return 0; n->next = *list; *list = n; byte_copy(((const char**)&n[1]), len, x); return 1; }
1,327,841
the-stack-v2-dedup
C
#include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX_NAME_LENGTH 100 struct udphdr { unsigned short fileSize; // file size unsigned char fileType[10]; // file type unsigned short fileNameLength; // file name length char fileName[MAX_NAME_LENGTH]; //file ...
1,327,842
the-stack-v2-dedup
C
/* * Class CODE_VALIDITY_CHECKER */ #include "eif_macros.h" #ifdef __cplusplus extern "C" { #endif static const EIF_TYPE_INDEX egt_0_970 [] = {0xFF01,222,0xFFFF}; static const EIF_TYPE_INDEX egt_1_970 [] = {0xFF01,239,969,0xFFFF}; static const EIF_TYPE_INDEX egt_2_970 [] = {0xFF01,969,0xFFFF}; static const EIF_TY...
1,327,843
the-stack-v2-dedup
C
#include"Bubble_sort.h" int main() { int p[5] = {6,5,9,1, 2}; bubble_sort(p, 5); for (int i = 0;i<5;i++) { printf("%d ", p[i]); } }
1,327,844
the-stack-v2-dedup
C
#include "libFlashingLetter/FlashingLetter.h"
1,327,845
the-stack-v2-dedup
C
/* * @Descripttion: 单链表数据结构 * @Version: V1.0 * @Author: YURI * @Email: 1700695611@qq.com * @Website: www.heredifferent.com.cn * @Date: 2021-08-31 21:25:22 * @LastEditors: YURI * @LastEditTime: 2021-09-01 12:52:18 */ #ifndef DSSINGLELIST_H #define DSSINGLELIST_H #include "ds.h" typedef struct __DSSingleLink...
1,327,846
the-stack-v2-dedup
C
#include <stdio.h> #include "../include/uncl.h" #include "utest.h" int main() { const int max_msg_size = num_transfers; uncl_socket_t usock; uncl_msg_t msg; char *data; int i; /* Open a port to the sever. */ if (-1 == uncl_client(&usock, host, port)) { perror("uncl_server"); ...
1,327,847
the-stack-v2-dedup
C
version https://git-lfs.github.com/spec/v1 oid sha256:27fc613bde47aa35af206e1fc072f05b8c2bcc748985caf7de4bf0630fdf585a size 215
1,327,848
the-stack-v2-dedup
C
#include <string.h> #include <ert/ert.h> #include <ert/priority_queue.h> static PriorityQueueItem* _GetItemByIndex(PriorityQueue* pq, size_t index); static RESULT PriorityQueue_InternalDequeue(PriorityQueue* pq, void* dest, int isPeek); /** * 从索引获取元素 */ inline static PriorityQueueItem* _GetItemByIndex(PriorityQue...
1,327,849
the-stack-v2-dedup
C
/* * Copyright (c) 2006-2008 * Author: Weiming Zhou * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permissi...
1,327,850
the-stack-v2-dedup
C
#define _DEFAULT_SOURCE #include <stdlib.h> #include <ctype.h> #include <string.h> typedef struct Bucket{ struct Bucket *next; char * value; char * key; } Bucket; typedef struct HashMap{ Bucket** listOfBucket; size_t size; } HashMap; HashMap* create_hashmap(int key_space); unsigned int hash(cons...
1,327,851
the-stack-v2-dedup
C
/* * @author maggarwa@usc.edu */ #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/time.h> #include "my402list.h" int My402ListLength(My402List* list){ return list->num_members; } int My402ListEmpty(My402List* list){ return list->num_members==0; } int My402ListAppend(My4...
1,327,852
the-stack-v2-dedup
C
#include <stdio.h> #include "file.h" bytes_buffer_t *read_file_bytes(const char *filename) { if (filename == NULL) return NULL; FILE *file = fopen(filename, "rb"); if (file == NULL) return NULL; fseek(file, 0L, SEEK_END); size_t buf_size = ftell(file); fseek(file, 0L, SEEK_SET); bytes_buffer_t *buffer; ...
1,327,853
the-stack-v2-dedup
C
/* * Copyright (c) 2016, Juniper Networks, Inc. * All rights reserved. */ #ifndef GRPC_C_GRPC_C_H #define GRPC_C_GRPC_C_H #include <sys/queue.h> #include <string.h> #include <protobuf-c/protobuf-c.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> #include <grpc/support/alloc.h> #include <grpc/support/log...
1,327,854
the-stack-v2-dedup
C
{ //=========Macro generated from canvas: c1/c1 //========= (Thu Mar 3 09:57:19 2016) by ROOT version5.34/34 TCanvas *c1 = new TCanvas("c1", "c1",66,22,700,500); c1->Range(4872.5,6131.25,5147.5,6318.75); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetGridx(); c1->SetGridy...
1,327,855
the-stack-v2-dedup
C
#ifndef C_POOL_H #define C_POOL_H #include "common.h" #define UTF8 1 #define INT 3 #define FLOAT 4 #define LONG 5 #define DOUBLE 6 #define CLASS 7 #define STRING 8 #define FIELDREF 9 #define METHODREF 10 #define IMETHODREF 11 #define NAMEANDTYPE 12 #define MHANDLE ...
1,327,856
the-stack-v2-dedup
C
#ifndef PATHFINDING_H #define PATHFINDING_H #include <stdlib.h> #include <stdio.h> #include <string.h> #include <limits.h> #include <string.h> #include <math.h> #include "queues.h" #include "graphs.h" #define RIGHT {1, 0} #define BOTTOM {0, 1} #define LEFT {-1, 0} #define TOP {0, -1} #define Euclidean_dst(x1, y1, x2,...
1,327,857
the-stack-v2-dedup
C
#define _POSIX_C_SOURCE 200809L #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <rpc/rpc.h> #include "msg.h" #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/shm.h> #include <sys/stat.h> #include <sys/mman.h> #include <errno.h> #include <signal.h> #include "global.h" voi...
1,327,858
the-stack-v2-dedup
C
#pragma once #include "TextComponent.h" #include "SpriteComponent.h" #include "PillComponent.h" #include "PacmanComponent.h" #include "GhostComponent.h" #include "GhostManagerComponent.h" #include "InputComponent.h" #include "PowerupComponent.h" #include "LiveManagerComponent.h" #include "EndGameComponent.h"
1,327,859
the-stack-v2-dedup
C
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <assert.h> #include <math.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> #i...
1,327,860
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> main(int argc, char **argv) { if (argc != 4) { printf("Usage: convert <basefrom> <baseto> <number>\n"); exit(1); } int bFrom = 0; int bTo = 0; long signed int n; long signed int h; long signed int nn = 0; char word[15]; int i...
1,327,861
the-stack-v2-dedup
C
#include "phi.h" unsigned long gcd_count = 0; unsigned long p; unsigned long q; inline int even(unsigned long long *x) { // equivalent to: return (1 & *x) ? 0 : 1; return !(1 & *x); } // calculates a mod b more efficiently on some architectures inline unsigned long long mod(unsigned long long *a, unsigned long l...
1,327,862
the-stack-v2-dedup
C
#include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> int main (int argc, string argv[]) { while (argc<2 || argc>2) { printf("Incorrect argument\n"); return 1; } int keylen = strlen(argv[1]); char argkey[keylen]; for (int z=0; z<keylen; z++) ...
1,327,863
the-stack-v2-dedup
C
/* ** get_next_line.c for g_n_l.c in /home/cheval_8/rendu/CPE_2014_get_next_line ** ** Made by Nicolas Chevalier ** Login <cheval_8@epitech.net> ** ** Started on Tue Nov 18 19:52:00 2014 Nicolas Chevalier ** Last update Wed May 18 22:01:26 2016 Nicolas Chevalier */ #include "gnl.h" int read_gnl(int fd, int *len, ...
1,327,864
the-stack-v2-dedup
C
/************************************************************************* * Copyright (c) 2015, Synopsys, Inc. * * All rights reserved. * * * * Redistribution and...
1,327,865
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putstr.c :+: :+: :+: ...
1,327,866
the-stack-v2-dedup
C
#include "contiki.h" #include <stdlib.h> #include <string.h> #include "coap-engine.h" #include "time.h" #include "sys/log.h" #define LOG_MODULE "Presence Sensor" #define LOG_LEVEL LOG_LEVEL_DBG #include "../devices/presence-sensor.h" static void res_get_handler(coap_message_t *request, coap_message_t *response, uint8...
1,327,867
the-stack-v2-dedup
C
/******************************************************************************* All Copyright(c) 2018-2019 Receive By Guangzhou Shiyuan Electronics CO.Ltd. * @file bsp_uart0.h * @author HuangYong(huangyong6295@cvte.com) * @version V0.0.1 * @Company CVTE * @date 2019-7-10 * @brief * ...
1,327,868
the-stack-v2-dedup
C
//============================================================================== // // Title: Collison_Module.h // Purpose: Collison interface for projectile . // // Created on: 8/22/2020 at 3:09:46 PM by Alex Bordeaux. // Copyright: Student. All Rights Reserved. // //=================================================...
1,327,869
the-stack-v2-dedup
C
/* Copyright (C) StrawberryHacker */ #ifndef GPIO_H #define GPIO_H #include "types.h" #include "hardware.h" enum gpio_func { GPIO_FUNC_A, GPIO_FUNC_B, GPIO_FUNC_C, GPIO_FUNC_D, GPIO_FUNC_OFF }; enum gpio_dir { GPIO_INPUT, GPIO_OUTPUT }; enum gpio_pull { GPIO_PU...
1,327,870
the-stack-v2-dedup
C
#include <stdio.h> #include <stdint.h> #include <inttypes.h> #include <ctype.h> #include <unistd.h> #include <math.h> #include "aprilsam/aprilsam.h" #include "aprilsam/common/getopt.h" /** AprilSAM evaluation: ./aprilsam_tutorial */ typedef struct state state_t; struct state { april_graph_t *graph; struct...
1,327,871
the-stack-v2-dedup
C
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ // $Id: final.h 667905 2015-05-18 19:07:55Z wsfreund $ #ifndef RINGERSELECTORTOOLS_TOOLS_CXX_FINAL_H #define RINGERSELECTORTOOLS_TOOLS_CXX_FINAL_H #include "RingerUseNewCppFeatures.h" #undef ATH_RINGER_FINAL //CxxUtils for final #if RIN...
1,327,872
the-stack-v2-dedup
C
// // Created by kx3418 on 13/06/19. // #include "menus.h" #include "utilities.h" bool update_leaderboard(game_t *game) { while (SDL_PollEvent(&game->event)) { if (game->event.type == SDL_QUIT){ game->is_running = false; return true; } if (game->event.type == SDL_KE...
1,327,873
the-stack-v2-dedup
C
void S12_edmFit_thetaY_750_1000_trackReco_WORLD_250MeV_BQ.0_1() { //=========Macro generated from canvas: c/c //========= (Wed Feb 2 11:32:00 2022) by ROOT version 6.24/06 TCanvas *c = new TCanvas("c", "c",0,0,800,600); c->SetHighLightColor(2); c->Range(-0.5418271,-1.280244,4.876443,1.219756); c->SetFillC...
1,327,874
the-stack-v2-dedup
C
#include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <string.h> #include <unistd.h> #include <semaphore.h> #define BUFER_SIZE 1024 char **array; int read_pointer, write_pointer, elements_number, array_size; pthread_t *producers; pthread_t *consumers; int verbose; int writer_end;...
1,327,875
the-stack-v2-dedup
C
/* * File: sensor.c * Author: Andres * * Created on April 13, 2016, 2:23 PM */ #include "sensor.h" #include "lcd.h" #include <xc.h> #include <math.h> int scanLineSensors(int result, int display){ int ADC_V1 = 0, ADC_V2 = 0, ADC_V3 = 0; int SR1 = 0, SR2 = 0, SR3 = 0; float v_k1 = 0, v_k2 = 0, ...
1,327,876
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #include"print.h" #include"calc.h" #define max 500 #define inf 10000000 int main(){ int i, j, cnt=0, abs_A, judge=0, check1=0, check2=0; double s, t, x, y; //stxyは交差地点計算用 double weight=0; int mat[4][2] = {}; //Xp1, Yp1, ... double C[max][2] = {}...
1,327,877
the-stack-v2-dedup
C
#include <stdio.h> void fatal(char *mess) { fprintf(stderr,"Error: %s :-(\n",mess); exit(1); }
1,327,878
the-stack-v2-dedup
C
/* $**************** KCG Version 6.4 (build i21) **************** ** Command: kcg64.exe -config D:/Github/modeling/model/Scade/System/OBU_PreIntegrations/openETCS_EVC/KCG_GreenField/config.txt ** Generation date: 2015-11-05T08:54:04 *************************************************************$ */ #include "kcg_consts...
1,327,879
the-stack-v2-dedup
C
// // Created by ligand on 2019-05-03. // #include "../csapp.h" int main(int argc, char **argv) { int clientfd; char *host, *port; size_t ccount = MAXLINE; char *buf = (char *) malloc(ccount * sizeof(char)); rio_t rio; if (argc != 3) { fprintf(stderr, "usage: %s <host> <port>\n", argv[0]); exit(0...
1,327,880
the-stack-v2-dedup
C
#include "../../include/minishell.h" static void inclvl(t_config *cnf) { t_env *tmp; int actlvl; tmp = cnf->envl; while (tmp) { if (!(ft_strcmp(tmp->key, "SHLVL"))) break ; tmp = tmp->next; } actlvl = ft_atoi(tmp->value); actlvl++; free(tmp->value); tmp->value = ft_itoa(actlvl); } static void cl(t...
1,327,881
the-stack-v2-dedup
C
/** * @file hi_recordmng.h * @brief record manager module struct and interface declaration * * Copyright (c) 2012 Huawei Tech.Co.,Ltd * * @author HiMobileCam Reference Develop Team * @date 2017/12/13 * @version 1.0 */ #ifndef __HI_RECORDMNG_H__ #define __HI_RECORDMNG_H__ /** head file o...
1,327,882
the-stack-v2-dedup
C
/*Задача 5*. Напишете програма, която генерира “случайна разходка” из елементите на двумерен масив от тип char с размер 10 х 10. Преди разходката всички елементи на масива съдържат символа ‘.’ и след като елемента е посетен в него се записва поредната буква от латинската азбука т.е. на първия посетен елемент се зап...
1,327,883
the-stack-v2-dedup
C
#include <assert.h> #include <stdlib.h> #include "replicator_population.h" #include "replicator_game.h" strategyprofiles_t * StrategyProfiles_create(int players, int *types, cache_mask cache){ assert(types != NULL); if (types == NULL){ exit(EXIT_FAILURE); } strategyprofiles_t *sprofs =...
1,327,884
the-stack-v2-dedup
C
/* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Rick Adams. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following cond...
1,327,885
the-stack-v2-dedup
C
/* Includes the functions used in ps_1.c */ #include <stdio.h> #include<stdlib.h> void print_arr(int Arr[][], int i); int even_nos(int Arr[][], int i); void per_sq(int Arr[][], int i); void indl_prime(int Arr[][], int i); void max_min(int Arr[][], int i); void print_arr(int Arr[][],int i){ int k,j =0; for (...
1,327,886
the-stack-v2-dedup
C
/**********************************************************************/ /* ____ ____ */ /* / /\/ / */ /* /___/ \ / */ /* \ \ \/ ...
1,327,887
the-stack-v2-dedup
C
// Author: Eric Schneider (xbony2) // Licensed under MIT, 2014 // This is coded in Nano C; download the app to run it (for iOS, dunno about android). void main(){ int operation = get("Operation: 1: add, 2: subtract, 3: multiply, 4: divide, 5: remainder, 6: absolute value, 7: ACOS, 8: ASIN, 9: ATAN"); switch(operati...
1,327,888
the-stack-v2-dedup
C
// // main.c // 131Lab1 // // Created by Aditya Iyer on 2/1/17. // Copyright © 2017 Aditya Iyer. All rights reserved. // // This program is Multi-threaded Dining Philosopher's solution #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #define COURSES 3; struct philosopher { //in...
1,327,889
the-stack-v2-dedup
C
#include <stdio.h> #include <time.h> int main(void) { int i,j,aux,m,ver1,ver2,per; int matriz [100][100]; per=0; ver1=0; printf("Entre com quantas linhas tera(maximo 100) a matriz quadrada: "); scanf("%d",&m); for(i=0;i<m;i++) { for(j=0;j<m;j++) { printf("Entre com a posicao %d.%d: ",...
1,327,890
the-stack-v2-dedup
C
#include <scrtl.h> #include <errno.h> #include <stdlib.h> #include <mt.h> void __pascal __set_errno (int an_errno) { #if defined(_MT) struct THREAD *my_thread = _getthreaddata (); /* If getthreaddata fails, then we really cannot set anything */ if (!my_thread) { return; }...
1,327,891
the-stack-v2-dedup
C
#include <stdio.h> #include <io.h> #include <stdlib.h> #include <pthread.h> #include <assert.h> #define NNG_STATIC_LIB #include <nng/nng.h> #include <nng/protocol/reqrep0/req.h> #include <nng/supplemental/util/platform.h> #include <csc_debug.h> #include <csc_debug_nng.h> #include "comdetective.h" #define USERINPUT_L...
1,327,892
the-stack-v2-dedup
C
../submodels/BubbleGrowth/DispersionModel/NoDispersion/NoDispersion.H
1,327,893
the-stack-v2-dedup
C
/* SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "devshell.h" void create_test_file(const char *path, int n); int remove_test_file(const char *path, int n); void remove_test_file_expecting_success(const char *path, int n); int test_sig(void (*child_func)(void), int expected_sig, int expected_code); b...
1,327,894
the-stack-v2-dedup
C
/* #undef AC_APPLE_UNIVERSAL_BUILD */ #define ASSUME_RAM 128 /* #undef ENABLE_NLS */ #define HAVE_BSWAP_16 1 #define HAVE_BSWAP_32 1 #define HAVE_BSWAP_64 1 #define HAVE_BYTESWAP_H 1 /* #undef HAVE_CAPSICUM */ /* #undef HAVE_CC_SHA256_CTX */ /* #undef HAVE_CC_SHA256_INIT */ /* #undef HAVE_CFLOCALECOPYCURRENT */ /* #und...
1,327,895
the-stack-v2-dedup
C
#include <stdlib.h> void* glp_malloc(int size) { void* header = malloc(size + 10); return (void*)((char*)header + 10); }
1,327,896
the-stack-v2-dedup
C
#ifndef __REGISTRS_H #define __REGISTRS_H #include "stm32f1xx_hal.h" void ReadRegs(SPI_HandleTypeDef *hspi); #endif //__REGISTRS_H
1,327,897
the-stack-v2-dedup
C
! WrapMenu - GWindows menu with line-wrapping ! ! ! Usage: Use a WrapMenu as you would a GMenu. ! ! If more than one WrapMenu can be active at the same time, they must ! declare a 'wrapper proxy': ! ! ww_contents my_proxy; ! ! WrapMenu wmen ! with ! ... ! wrapper my_proxy; ! ! Any Wr...
1,327,898
the-stack-v2-dedup
C
#include <pthread.h> #include <stdbool.h> #define USAGE "<# requester> <# resolver> <requester log> <resolver log> [ <data file> ...]" #define MINARGS 6 #define SBUFSIZE 1025 #define INPUTFS "%1024s" #define MAX_INPUT_FILES 10 #define MAX_RESOLVE_THREADS 10 #define MAX_REQUEST_THREADS 5 #define MAX_NAME_LENGTHS 1025 #...
1,327,899