source string | code_lang string | content string | idx int64 |
|---|---|---|---|
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include "alloc.h"
#define AMOUNT_OF_ITEMS_MAX 10000
#define SEED 1635219128
#define LOOPS 100000
typedef struct
{
int a;
int b;
} testitem;
void print_list(int verbose)
{
printf("#####\n");
printf("Heap start: %p\n", heap);
if (!verbose)
{
prin... | 1,328,100 |
the-stack-v2-dedup | C | /** @file input.c Documented input module.
*
* Julien Lesgourgues, 27.08.2010
*/
#include "input.h"
#include <ctype.h>
static int read_words(const char *string,int nword_max,char (*words)[256])
{
int nword=0;
const char *p=string;
while(1) {
if(*p=='\0')
break;//return nword;
if(*p==' ' || *p... | 1,328,101 |
the-stack-v2-dedup | C | #ifndef GENERIC_CONFIG_MANAGER_H
#define GENERIC_CONFIG_MANAGER_H
#include "interfaces/drivers/config_manager_interface.h"
const struct config_manager_interface *generic_config_manager_get();
#endif //GENERIC_CONFIG_MANAGER_H
| 1,328,102 |
the-stack-v2-dedup | C | /*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "NGAP-PDU-Contents"
* found in "NGAP-PDU-Contents.asn"
* `asn1c -fcompound-names`
*/
#include "PDUSessionResourceModifyConfirm.h"
static asn_TYPE_member_t asn_MBR_PDUSessionResourceModifyConfirm_1[] = {
{ ATF_NOFLAGS, 0, offsetof(st... | 1,328,103 |
the-stack-v2-dedup | C | #include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
#define PORT 8090
#define BUF_LEN 20000
#de... | 1,328,104 |
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,328,105 |
the-stack-v2-dedup | C | /*
* Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved.
* Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
* Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU Gene... | 1,328,106 |
the-stack-v2-dedup | C | #ifndef LPTRANS__H
#define LPTRANS__H
#include <math.h>
#include "phy/fm_macro_def.h"
#include "ftl_lp_info.h"
#include "pbque.h"
// 論物計算・参照:
// Calc関数は計算,Get関数はテーブル参照あり
// 論物の変更はここでは提供しない
// -- セクタ <-> 論理ページ
inline uint32_t HlbaToLpn( uint64_t hlba ) { return (uint32_t)(floor( (double)hlba / FT... | 1,328,107 |
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,328,108 |
the-stack-v2-dedup | C | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : EREN AKYOL
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2020 ST... | 1,328,109 |
the-stack-v2-dedup | C | #ifndef __MY_LIGHT_H
#define __MY_LIGHT_H
#ifdef __cplusplus
extern "C" {
#endif
//亮按键灯
void key_light (u8 key_num,u8 state);
//按键周围的灯
void key_around (u8 key_num,u8 state);
//灯带环绕
void led_light (u16 num,u8 state,u8 red,u8 green,u8 blue);
//流水
void led_run (u8 *meg);
//键盘周围的灯闪烁
void light_run (u8 *ms... | 1,328,110 |
the-stack-v2-dedup | C | /*Program in C , using fucntions , to print the longest line in an input text*/
#include<stdio.h>
int grabline(char newline[]);
void copy(char from[] , char to[]);
int main(){
char currentline[200];
char longestline[200];
int current=0;
int longest=0;
char c;
printf("ENTER THY TEXT HITHER ... | 1,328,111 |
the-stack-v2-dedup | C | #include <stdio.h>
#include "mm-client.h"
// This is the name that the driver will refer to your bot as.
const char* BOT_NAME = "Cow-Noop";
// Return whether setup was successful, bot dies if 0.
int client_setup(int *argc, char ***argv)
{
return 1;
}
// This function is called when the game begins.
void game_setup... | 1,328,112 |
the-stack-v2-dedup | C | /*
* Define structure with two members (one int and other char). Also define s union with two members (one int and other char).
* Print the sizes of structure and union in number of bytes.
*
* @Author - Yuvraj Takey
*/
#include <stdio.h>
//#pragma pack(1)
typedef struct exampleStruct
{
char st_ch;
int ... | 1,328,113 |
the-stack-v2-dedup | C | #include "S32K144.h" /* include peripheral declarations S32K144 */
int x = 5;
int y = 10;
int z = 15;
int vel = 20;
int* array[]={&x,&y,&z};
unsigned char dato=0;
//int array2[]={x,y,z};
int mensaje[]={4,8,16,20,0};
//int mensaje=0b10100;
//unsigned char mensaje[]={"Hola mundo"};
unsigned char i =0;
void LPU... | 1,328,114 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strsub.c :+: :+: :+: ... | 1,328,115 |
the-stack-v2-dedup | C | // RUN: %clang %s -g -emit-llvm %O0opt -c -o %t1.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out %t1.bc 2>&1 | FileCheck %s
int main() {
int a;
if (&a != 0x12345678) {
// CHECK-DAG: KLEE: WARNING: main: Second branch reached
klee_warning("Second branch reached");
} else {
// CHEC... | 1,328,116 |
the-stack-v2-dedup | C | /* $Id$ */
/* Author : Chris Scheers */
/* dpr1.c -- version 1.8 (IMEC) last updated: 3/1/89 */
static char *SccsId = "@(#)dpr1.c 1.8 (IMEC) 89/03/01";
#include <stdio.h>
#include "sfg.h"
extern SemanticGraph SemGraph;
#define MAXDIMS 100
int OffsetInArray (DimBounds, NrDims, Indices)
int *DimBounds, NrDims, *... | 1,328,117 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <gtk/gtk.h>
#include "guimpe_callback.h"
#include "image.h"
#define TMP_STR_SIZE 256
//crée une structure image et aloue la taille mémoire spécifique au fichier lu, et recopie les données dans le buffer
image_t *charger_image_pgm(char *nom_fichier)
{
... | 1,328,118 |
the-stack-v2-dedup | C |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
#include <inttypes.h>
#include "rng.h"
#include "csidh.h"
#define OS_WIN 1
#define OS_LINUX 2
#if defined(__WINDOWS__) // Microsoft Windows OS
#define OS_TARGET OS_WIN
#else defined(__LINUX__) ... | 1,328,119 |
the-stack-v2-dedup | C | #include <mruby.h>
#include <mruby/irep.h>
extern const uint8_t mrblib_irep[];
void
mrb_init_mrblib(mrb_state *mrb)
{
mrb_load_irep(mrb, mrblib_irep);
}
/* dumped in little endian order.
use `mrbc -E` option for big endian CPU. */
#include <stdint.h>
extern const uint8_t mrblib_irep[];
const uint8_t
#if defined... | 1,328,120 |
the-stack-v2-dedup | C | #include <stdio.h>
#include "arbol.h"
/* Evalua expresiones a la lisp (numeros de un solo digito) como:
(+ 1 2)
-> 3
(* 2 3)
-> 6
(+ 1 (* 3 2) 4)
-> 11
(+12) ; es como (+ 1 2)
-> 3
*/
TREE *make_expr();
LISTA *make_l() {
TREE *t;
char c = getchar();
if(c == ')')
return NULL;... | 1,328,121 |
the-stack-v2-dedup | C | #ifndef _CONST_H_
#define _CONST_H_
#define MAX_PROG_NAME 255
typedef enum {
NOT_EXIST = -2,
NOT_COMPILE = -1,
WRONG_EXECUTION = 0,
GOOD_EXECUTION = 1
} ProgramState;
typedef struct {
int firstInt; //-1 if to add numProg if to modify -2 if to execute
int secondInt; //path length if ... | 1,328,122 |
the-stack-v2-dedup | C | //**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2005, American Megatrends, Inc. **
//** ... | 1,328,123 |
the-stack-v2-dedup | C | const int SNK_chars_hp[] = {
1000,800,700,600,700,700,
300,500,300,300,800,400,
600,500,400,200,300,1200,
1500,900,700,500,500,700,
600,400,200,400,300,400,
1000,700,600,300,600,600,
500,300,500,600,400,300,
400,500,300,700,300,500,
400,200,600,700,500,600,
400,400,600,700,100,... | 1,328,124 |
the-stack-v2-dedup | C | /***********************************************************************
*@Author: Dz_hui
*@Date: 2020-06-01 11:54:53
*@FilePath: \RT1052_test\DEMO\user\main.c
*@Drscription:
***********************************************************************/
#include "board.h"
#include "rtthread.h"
#include "main.h"
/*********... | 1,328,125 |
the-stack-v2-dedup | C | #include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "arbolbinario.h"
#include "lista.h"
#define ES_NEGRO(a) ((a) == NULL || (a)->color == COLOR_NEGRO)
#define ES_ROJO(a) ((a) != NULL && (a)->color == COLOR_ROJO)
#define ES_IZQUIERDO(a) ((a) != NULL && (a)->padre != NULL && \
... | 1,328,126 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
int main()
{
//scanf("tipo_de_variavel",&variavel_que_recebera);
//scanf("%tipo1%tipo2",&var1, &var2);
int num1,num2;
printf("Favor digite um numero:\n");
scanf("%i" , &num1);
printf("%i",num1);
printf("Favor digite um numero:\n");
... | 1,328,127 |
the-stack-v2-dedup | C | #include "huffman.h"
#include "code.h"
#include "defines.h"
#include "node.h"
#include "pq.h"
#include "stack.h"
#include <assert.h>
#include <inttypes.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
// Global variables will be modified by the encoder and decoder functions.
extern ui... | 1,328,128 |
the-stack-v2-dedup | C | // This file defines data structures that will flow through the communication module
// Those structures are used by its correspoding modules to propagate the data
#ifndef __DATA_STRUCTURES_H
#define __DATA_STRUCTURES_H
#include <avr/io.h>
// Define a structure for the data packet to be send to the control module
ty... | 1,328,129 |
the-stack-v2-dedup | C | #include "sem.h"
#include "syscall.h"
#include "software.h"
#include "sched.h"
#include "common.h"
// todo
semaphore_t io_tasks;
semaphore_t io_done;
semaphore_t free_io_tasks;
io_task_t io_task;
void sw_io_proc()
{
semaphore_init(&io_tasks, 0);
semaphore_init(&io_done, 0);
semaphore_init(&free_io_tasks... | 1,328,130 |
the-stack-v2-dedup | C | #define Max(x, y) (x) < (y) ? (y) : (x)
int longestValidParentheses(char * s){
int len = strlen(s);
int* dp = (int*)calloc(len, sizeof(int));
int cur = 1;
int max = 0;
int flag = 0;
while(cur < len){
if(s[cur] == '('){
if(s[cur - 1] == '(')
dp[cur] = 0;
else
dp[cur] = dp[cur - 1];
}
else{
... | 1,328,131 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
struct Node
{
int key;
struct Node* right;
struct Node* left;
};
struct Node* create_Node(struct Node* node,int k)
{
node=(struct Node*)malloc(sizeof(struct Node));
node->right=node->left=NULL;
node->key=k;
return node;
}
struct Node* insert_BST(stru... | 1,328,132 |
the-stack-v2-dedup | C | /* Do not remove the headers from this file! see /USAGE for more info. */
/*
** shell.c -- shell handling for the user
**
** 950707, Rust: original player shell
** 950711, Deathblade: created.
** 960129, Deathblade: moved to the user ob
*/
#include <mudlib.h>
string query_userid();
void force_me(string what);
void u... | 1,328,133 |
the-stack-v2-dedup | C | /*
XXXXX XXXXXX XXXXXXX XXX XXX XXXXXXX XXXXX
XXX XXX XXX XXX XX XXX XXX XXX XXXXXXXX XXX XXX
XXXXXXX XXX XXX XXX XXX XXX XXXXXXXX XXXXXXX
XXX XXX XXX XXX XXX XXX XXXXXXXX XXX
XXX XXX XXX XXX XXX XX XXXXX XXXXXXXX XXX XXX
XXXXX XXX XXX XXXXXXX XXX XXX XXX XXXXX
... | 1,328,134 |
the-stack-v2-dedup | C | /* This file was generated by upbc (the upb compiler) from the input
* file:
*
* udpa/core/v1/resource.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
#include "udpa/core/v1/resource.upb.h"
#include "google/protobuf/any.upb.h... | 1,328,135 |
the-stack-v2-dedup | C | #ifndef TTY_H
#define TTY_H
#include <stdint.h>
#include <stddef.h>
// I/O Ports
#define TTY_COMMAND_PORT 0x3D4
#define TTY_DATA_PORT 0x3D5
// I/O Port Commands
#define TTY_HIGH_BYTE_COMMAND 14
#define TTY_LOW_BYTE_COMMAND 15
void terminal_initialize(void);
void terminal_setcolor(uint8_t col... | 1,328,136 |
the-stack-v2-dedup | C | /*
* Class UC_UNICODE_CONSTANTS
*/
#include "eif_macros.h"
#ifdef __cplusplus
extern "C" {
#endif
static const EIF_TYPE_INDEX egt_0_1146 [] = {0xFF01,232,0xFFFF};
static const EIF_TYPE_INDEX egt_1_1146 [] = {0xFF01,245,1145,0xFFFF};
static const EIF_TYPE_INDEX egt_2_1146 [] = {0xFF01,1145,0xFFFF};
static const EI... | 1,328,137 |
the-stack-v2-dedup | C | #include "holberton.h"
/**
* condi_from - fills memory with a constant byte
* @file_from: is the size of the pointer
* Return: a int
*/
void condi_from(char *file_from)
{
dprintf(STDERR_FILENO, "Error: Can't read from file %s\n", file_from);
exit(98);
}
/**
* condi_to - fills memory with a constant byte
*... | 1,328,138 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* display.c :+: :+: :+: ... | 1,328,139 |
the-stack-v2-dedup | C | // Lean compiler output
// Module: Lean.Util.RecDepth
// Imports: Init Lean.Data.Options
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-W... | 1,328,140 |
the-stack-v2-dedup | C | #include <sys/mman.h>
#include <fcntl.h>
#ifdef __x86_64
#include <asm/unistd_64.h>
#else
#include <asm/unistd_32.h>
#endif
// framebuffer settings (width / height / components should match actual framebuffer settings)
#define FRAMEBUFFER_COMPONENTS 4
#define FRAMEBUFFER_LENGTH (WIDTH * HEIGHT * FRAMEBUFFER_CO... | 1,328,141 |
the-stack-v2-dedup | C |
/******************************************************************************
* File Name: timer.c
* Description: Timer start and stop - function definition
* Tool-Chain: avr-gcc
*
* Modification History:
* Created by: Khyathi Surendra V1.0 7/aug/19
* Description: V1.0
******************... | 1,328,142 |
the-stack-v2-dedup | C | //==============================================
// Name: Hekmat Hamidi
// Student Number: 132645169
// Email: hwhamidi@myseneca.ca
// Section: NXX
// Date:
//==============================================
// Assignment: 1
// Milestone: 4
//=================================... | 1,328,143 |
the-stack-v2-dedup | C | #include <stdio.h>
long num[8]={0},st[8]={0},use[100001]={0},r[3]={0},list[8][100001]={0},con[6][3]={{0,1,2},{0,2,1},{1,0,2},{1,2,0},{2,0,1},{2,1,0}};
char str[5]={'\0'};
long a,b,c;
long check(long v1,long v2,long v3)
{
long t;
r[0]=a;
r[1]=b;
r[2]=c;
for (st[1]=1;st[1]<=num[1]&&r[0]>1;st[... | 1,328,144 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <math.h>
#include <time.h>
#include <galib.h>
#define CHRO_LEN 8
#define CHRO_RESERVE 20
#define ITER_COUNT 1000
double fitness(GA_TYPE* chro, int chroLen, void* arg);
int ga_print_chro(struct GA_POOL* gaPoolPtr, int chroIndex)
{
int i;
// Che... | 1,328,145 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "Compression.h"
/*Creation du dictionnaire*/
void storage_letter(FILE* dico,Node* mytree,char* path){
char path_left[100];
char path_right[100];
char letter_code[100];
strcpy(path_left,path);
strcpy(path_right,p... | 1,328,146 |
the-stack-v2-dedup | C | #include "main.h"
#include <stdlib.h>
#include <time.h>
#include "player.h"
#include "position.h"
#include "render.h"
#include "wall.h"
int main(int argv, char** args) {
SDL_SetMainReady();
const double RAY_DENSITY = 1000;
const double STEP = (double)(1 / RAY_DENSITY);
struct Player player = {0, 0, 2... | 1,328,147 |
the-stack-v2-dedup | C | /*
** EPITECH PROJECT, 2019
** MUL_rpg_2019
** File description:
** shop.h
*/
#ifndef SHOP_H
#define SHOP_H
typedef enum shop_ressources_id_e {
SRSC_BUY_POTATO,
SRSC_BUY_APPLE,
SRSC_BUY_RICE,
SRSC_BUY_SOUP,
SRSC_BUY_BANDAGE,
} shop_rsc_id;
#include "rpg.h"
typedef struct shop_prefab_s {
shop... | 1,328,148 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
int main(){
int a[1000000];
int sum=0,n,j,m,i;
scanf("%d",&m);
for(i=0;i<999999;i++){
a[i]=0;
}
for(i=0;i<=999999;i++){
if(a[i]==1){
continue;
}
n=i+2;
sum++;
if(sum==m){
printf("\nWe got lucky !!! = %d \n",n);
break;
}
for(j=i;j<=999999;j=j+n){
a... | 1,328,149 |
the-stack-v2-dedup | C | #include "dog.h"
#include <stdlib.h>
char *copy(char *str);
/**
* new_dog - initializes a new struct dog
* @name: name
* @age: age
* @owner: owner
* Return: pointer
*/
dog_t *new_dog(char *name, float age, char *owner)
{
dog_t *ret;
ret = malloc(sizeof(dog_t));
if (ret)
{
ret->name = copy(name);
if (!(ret->name))... | 1,328,150 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* list2_function.c :+: :+: :+: ... | 1,328,151 |
the-stack-v2-dedup | C | #include <fstream>
#include <iostream>
#include <string>
#include "TFile.h"
void parseVersion(std::string version, std::string& v, std::string& r,
std::string& p) {
int vloc = version.find("v");
int rloc = version.find("r");
int ploc = version.find("p");
int size = version.length();
if (vl... | 1,328,152 |
the-stack-v2-dedup | C | /*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "X2AP-PDU-Contents"
* found in "../../asn_defs/asn1/x2ap-modified-15-05.asn"
* `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`
*/
#include "E-RABs-ToBeReleased-RelConfItem.h"
#include "E-RAB... | 1,328,153 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: ... | 1,328,154 |
the-stack-v2-dedup | C | #define _GNU_SOURCE
#include <stdio.h>
#include <pthread.h>
#include <time.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/timex.h>
#include <sys/unistd.h>
#include <sched.h>
#include <sys/types.h>
struct timeval t1;
pthread_mutex_t global_mutex;
#define tv_lt(s,t) (s.tv_sec < t.tv_sec || (s.tv_sec == t.tv... | 1,328,155 |
the-stack-v2-dedup | C | #ifndef __PROCESS_EVENT_H_
#define __PROCESS_EVENT_H_
#include "stm32f0xx.h"
#include "index.h"
#include "motor.h"
#define SLEEP_TIMEOUT 5000/2 /* 定时器计时周期为 2ms */
#define Beep_Null_Warm() {Hal_Beep_Blink (2, 100, 50);Hal_LED_Blink (LED_RED_ON_VALUE, 1, 200, 200);} //id空报警
#define Beep_Touch_Tone() ... | 1,328,156 |
the-stack-v2-dedup | C | #include <stdio.h>
#include "file1_1.h"
#include "file2_1.h"
#include "file2_2.h"
int main(int argc, char *argv[]) {
printf("Hello world\n");
helloFile1();
helloFile2_1();
helloFile2_2();
}
| 1,328,157 |
the-stack-v2-dedup | C | /*
* A Process Isolator based on Linux Containers
*
* (c) 2012-2013 Martin Mares <mj@ucw.cz>
* (c) 2012-2013 Bernard Blackham <bernard@blackham.com.au>
*/
#define _GNU_SOURCE
#include "autoconf.h"
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h... | 1,328,158 |
the-stack-v2-dedup | C |
#ifndef PCH_COMMON_H
#define PCH_COMMON_H
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#else
#if _WIN32_WINNT < 0x0501
#error Windows XP or later required.
#endif
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <cassert>
#... | 1,328,159 |
the-stack-v2-dedup | C | /*
Problem statment - Accept N Number from user and display all such elements which are multiply 10
input 6
elements 85 66 3 55 93 88
output 66 55 88
*/
#include<stdio.h>
#include<stdlib.h>
void Display(int [],int);
//////////////////////////////////////////////////////////////
//
// Function name : i... | 1,328,160 |
the-stack-v2-dedup | C | /* irq_test.c - Simple character device module
*
* Demonstrates interrupt driven character device. Note: Assumption
* here is some hardware will strobe a given hard coded IRQ number
* (200 in this case). This hardware is not implemented, hence reads
* will block forever, consider this a non-working exampl... | 1,328,161 |
the-stack-v2-dedup | C | #ifndef __FG_MAP_H__
#define __FG_MAP_H__
#define fg_mapLen 4096
extern const unsigned short fg_map[4096];
#endif // !__FG_MAP_H__
| 1,328,162 |
the-stack-v2-dedup | C | /*
project_Quad 32 bit Arduino Due multi_rx_sam3x8e.h
1. stabilized quadrotor
by: tinnakon kheowree
0860540582
tinnakon_za@hotmail.com
tinnakonza@gmail.com
http://quad3d-tin.lnwshop.com/
https://www.facebook.com/tinnakonza
//clock timer7 (1000 - 2000 us) = (2625 - 5250) = 2625
*/
float CH_THR = 1000.0f;
float CH_A... | 1,328,163 |
the-stack-v2-dedup | C | ../../../ZXLUpload/Framework/ZXLUpload/ZXLVideoUtils.h | 1,328,164 |
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,328,165 |
the-stack-v2-dedup | C | /*
** EPITECH PROJECT, 2020
** lemin
** File description:
** will initiale and fill the followinng variable : ant, tunnel and room-desu
*/
#include "../../include/my.h"
#include "../../include/algo.h"
tunnel_t *pre_tu_fill(input_t *info, tunnel_t *tunnel, room_t *rooms)
{
int nb_tmp_2 = 0;
tunnel_nb_finder(i... | 1,328,166 |
the-stack-v2-dedup | C | /* $NoKeywords:$ */
/**
* @file
*
* Service procedure to initialize Integrated Info Table
*
*
*
* @xrefitem bom "File Content Label" "Release Content"
* @e project: AGESA
* @e sub-project: GNB
* @e \$Revision: 67269 $ @e \$Date: 2012-03-26 02:53:08 -0500 (Mon, 26 Mar 2012) $
*
*/
/*
***... | 1,328,167 |
the-stack-v2-dedup | C | static const char help[] = "1D multiphysics prototype with analytic Jacobians to solve individual problems and a coupled problem.\n\n";
/* Solve a PDE coupled to an algebraic system in 1D
*
* PDE (U):
* -(k u_x)_x = 1 on (0,1), subject to u(0) = 0, u(1) = 1
* Algebraic (K):
* exp(k-1) + k = 1/(1/(1+u) + 1... | 1,328,168 |
the-stack-v2-dedup | C | /*
Напишите функцию
void copy_file(int in_fd, int out_fd);
Функция должна скопировать все данные из файлового дескриптора in_fd в файловый дескриптор out_fd.
Для буферизации ввода используйте локальный буфер размера 4096 байт.
Используйте POSIX API работы с файлами.
Помните, что read не обязан всегда считывать ровно то... | 1,328,169 |
the-stack-v2-dedup | C | /*
** cmd_ping.c for my_irc in /home/raphy/Epitech/Tech_2/PSU_2013_myirc/irc/server/sources/cmd
**
** Made by raphael defreitas
** Login <defrei_r@epitech.net>
**
** Started on Sat Apr 19 22:06:36 2014 raphael defreitas
** Last update Tue Apr 22 06:00:41 2014 raphael defreitas
*/
#include <string.h>
#include "ch... | 1,328,170 |
the-stack-v2-dedup | C | #pragma once
#include "Define.h"
//猜数字大小 II
//
//我们正在玩一个猜数游戏,游戏规则如下:
//
//我从 1 到 n 之间选择一个数字,你来猜我选了哪个数字。
//
//每次你猜错了,我都会告诉你,我选的数字比你的大了或者小了。
//
//然而,当你猜了数字 x 并且猜错了的时候,你需要支付金额为 x 的现金。直到你猜到我选的数字,你才算赢得了这个游戏。
//
//示例 :
//
//n = 10, 我选择了8.
//
//第一轮 : 你猜我选择的数字是5,我会告诉你,我的数字更大一些,然后你需要支付5块。
// 第二轮 : 你猜是7,我告诉你,我的数字更大一些,你支付7块。
... | 1,328,171 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
int LinkedListMake(int[],int[],int[],int[],int,int,int,int,int);
void Display(int[],int[],int);
int insert(int[],int[],int,int,int);
int main(int argc, char *argv[]) {
int i,HeadA,HeadB,HeadC,NA,NB,NC,ENO;
printf("A dizisinin eleman sayisi\n");
scanf("%d",&NA);
pr... | 1,328,172 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... | 1,328,173 |
the-stack-v2-dedup | C | /* -----------------------------------------------------
Student: Josh Hickman - hickmanjv
Student ID: 10236503
Assignment: Pre Lab 7
- A Program that takes in information from a file
and creates a binary tree of the information and
prints in different orders
-----------------------------------------------... | 1,328,174 |
the-stack-v2-dedup | C | /* ESTRUCT.H
*
* Structure and preprocessor defines
*
* written by Dave G. Conroy
* modified by Steve Wilhite, George Jones
* substantially modified by Daniel Lawrence
* modified by Petri Kutvonen
*/
#ifndef ESTRUCT_H_
#define ESTRUCT_H_
#include "utf8.h"
#define MAXCOL 600
#def... | 1,328,175 |
the-stack-v2-dedup | C | #include<sys/socket.h>
#include<unistd.h>
#include<arpa/inet.h>
#include<stdio.h>//printfを使うから必要
#define BUF_SIZE 256
#include<string.h>//strlen使うから
#include<stdlib.h>
//エラー処理用の関数定義
void DieWithError(char *erorMessage){
perror(erorMessage);
exit(1);
}
//メッセージを受信して表示するコード
void commun(int sock) {
c... | 1,328,176 |
the-stack-v2-dedup | C | #include <stdio.h>
int main(void)
{
char a, x;
int l;
l = 0;
while( (x = getchar()) != '\n' ) {
if( l == 0 )
{
l = 1;
a = x;
}
else {
l = 0;
putchar(x);
putchar(a);
}
}
return 0;
}
| 1,328,177 |
the-stack-v2-dedup | C |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <openssl/sha.h>
#include "merkle_hash.h"
int main(){
char auth[8][41];
memset(auth,'\0', sizeof(auth) );
strcpy(auth[0], "data 0");
strcpy(auth[1], "data 1");
strcpy(auth[2], "data 2");
... | 1,328,178 |
the-stack-v2-dedup | C | #include "linker.h"
int SECTION(".sbss") gLoaderState_800ABA38;
| 1,328,179 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef char *Tuple;
int main(){
Tuple a = strdup("abcdegf");
a[7] = 'Q';
printf("%c %s\n",a[7],a);
Tuple *tups=malloc(2*sizeof(Tuple));
// char **tups = malloc(2*sizeof(char*));
tups[0] = strdup("hahaha");
tups[1] = strdup("he... | 1,328,180 |
the-stack-v2-dedup | C | #include <stdio.h>
#include "areaOfTriangle.h"
int areaOf_Triangle(int h, int b){
float area;
float height = h;
float base = b;
printf("height: %.2f\n", height);
printf("base: %.2f\n", base);
area = (float)(base/2) * height;
printf("area of triangle: %.2f\n", area);
}
| 1,328,181 |
the-stack-v2-dedup | C | #include <stdio.h>
int main() {
int i, num[5], even=0, odd=0, neg=0, pos=0;
for(i=0; i<5; i++)
{
scanf("%d", &num[i]);
}
for(i=0; i<5; i++)
{
if(num[i]%2==0) even++;
if(num[i]%2!=0) odd++;
if(num[i]>0) pos++;
if(num[i]<0) neg++;
}
... | 1,328,182 |
the-stack-v2-dedup | C | /**
** VTIFF is a Vicar2 program that converts between
VICAR labeled images and TIFF format files. Partial
conversion of GeoTIFF information is included.
**
**/
#include <ctype.h>
#include "vicmain_c"
#include "defines.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "geotiffio.h"
#include "... | 1,328,183 |
the-stack-v2-dedup | C | #ifndef _QLA_Q2_COLOR_GENERIC_H
#define _QLA_Q2_COLOR_GENERIC_H
#define QLA_Q_V_eq_V QLA_Q2_V_eq_V
#define QLA_Q_V_veq_V QLA_Q2_V_veq_V
#define QLA_Q_V_xeq_V QLA_Q2_V_xeq_V
#define QLA_Q_V_veq_pV QLA_Q2_V_veq_pV
#define QLA_Q_V_xeq_pV QLA_Q2_V_xeq_pV
#define QLA_Q_H_eq_H QLA_Q2_H_eq_H
#define QLA_Q_H_veq_H QLA_Q2_H_veq... | 1,328,184 |
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,328,185 |
the-stack-v2-dedup | C | /* Copyright (c) 2012 Cheese and Bacon Games, LLC */
/* This file is licensed under the MIT License. */
/* See the file docs/LICENSE.txt for the full license text. */
#ifndef network_message_identifiers_h
#define network_message_identifiers_h
#include "raknet/Source/MessageIdentifiers.h"
enum {
ID_GAME_VERSION =... | 1,328,186 |
the-stack-v2-dedup | C | // generated from rosidl_generator_c/resource/idl__functions.h.em
// with input from sensor_msgs:msg/RelativeHumidity.idl
// generated code does not contain a copyright notice
#ifndef SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__FUNCTIONS_H_
#define SENSOR_MSGS__MSG__DETAIL__RELATIVE_HUMIDITY__FUNCTIONS_H_
#ifdef __c... | 1,328,187 |
the-stack-v2-dedup | C | /*
* The MIT License (MIT)
*
* Copyright (c) 2015 Zeng.Yajian
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... | 1,328,188 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* t_int.c :+: :+: :+: ... | 1,328,189 |
the-stack-v2-dedup | C | /* An example of how to test the memory allocation interface for this
* class. */
#ifdef MM_TEST
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include "mm_alloc.h"
#include "CUnit/Basic.h"
#define NUM_PTRS 10000
static int * ptr = NULL;
static int * ptr2 = NULL;
static int *ptrs[NU... | 1,328,190 |
the-stack-v2-dedup | C | #include <errno.h>
#include <fcntl.h>
#include <linux/i2c-dev.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include "font5x7.h"
#define DEVICE_NAME "/dev/i2c-1"
#define SLAVE_ADDRESS 0x74
#define ENABLE_ADDRESS 0x00
#define COLOR_ADD... | 1,328,191 |
the-stack-v2-dedup | C | #include <iostream>
#include <vector>
#include "TKey.h"
void make_summaryplots(){
// TFile *file = new TFile("/tmp/fblekman/DQM_R000003238__A__B__C.root");
TFile *file = new TFile("DQM_R000002445__A__B__C.root");
file->cd();
// TDirectory *dir = file->GetDirectory("DQMData/Run 3238/Pixel/Run summary");
... | 1,328,192 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "utils.h"
#include "predicates.h"
/* Filter function that returns
* 1 if the owner of the given file matches opt_uid
* 0 otherwise
*/
int pre... | 1,328,193 |
the-stack-v2-dedup | C | /*
* (c) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* 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 ... | 1,328,194 |
the-stack-v2-dedup | C | void S0_Momentum_Y_RMS_vs_p_trackReco_WORLD_250MeV_BQ.0_1()
{
//=========Macro generated from canvas: c/c
//========= (Wed Feb 2 11:31:59 2022) by ROOT version 6.24/06
TCanvas *c = new TCanvas("c", "c",0,0,800,600);
c->SetHighLightColor(2);
c->Range(-168.7171,3.047668,3409.979,28.39193);
c->SetFillColor(0... | 1,328,195 |
the-stack-v2-dedup | C | /* // */
/* // This document created by Julien JEAN */
/* // For project : creat window */
/* // */
/* // Sat Nov 17 19:42:24 CET 2018 */
/* // connect to the server */
/* // */
#include <X11/Xlib.h>
#include "modular/raise.h"
Display *display = NULL;
// connect to the Xserver
__attribute__((constructor)) static vo... | 1,328,196 |
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,328,197 |
the-stack-v2-dedup | C | #include "talkitive.h"
int talkitive_search(usbmuxd_device_info_t **list)
{
int res = usbmuxd_get_device_list(list);
if(res < 0)
{
printf("Veuillez lancer le service usbmuxd\n");
return -1;
}
printf("Appareils trouvé: %d\n", res);
return res;
}
int talkitive_get_device(usbmuxd_device_info_t *d... | 1,328,198 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memswap.c :+: :+: :+: ... | 1,328,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.