blob_id
large_string
language
large_string
repo_name
large_string
path
large_string
src_encoding
large_string
length_bytes
int64
score
float64
int_score
int64
detected_licenses
large list
license_type
large_string
text
string
download_success
bool
a31cfe4f49e9a27b5916aacf3931ab0badab1f92
C
NanthinideviBalachander/zoho-traning
/skillrack training/lcm of two numbres.c
UTF-8
408
2.609375
3
[]
no_license
call(unsigned long long int a,unsigned long long int b) { /* if(a!=0) call(b%a,a); else{ return b; }or*/ return a==0?b:call(b%a,a); } main() { unsigned long long int a,b; int n,pro; scanf("%d",&n); scanf("%llu%llu",&a,&b); // int pro=call(a,b); for(int i=2;i<n;i++) { ...
true
38a11c5fc471c3a5200ba8cd340a90b593686fa8
C
Ishan2OO1/c-basics
/cmarks.c
UTF-8
1,212
3.078125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { int a,b,c,d,t,x; float per; printf("Enter the marks of four subjects out of 100 "); scanf("%d %d %d %d",&a,&b,&c,&d); t=a+b+c+d; per=t/4; if((a>b) && (a>c) && (a>d)) { if ((b>c) && (b>d)) printf("%f %d",per,b); else if ((c>b) ...
true
e98fa705dc78baf95bdef7d47671506b335d1af8
C
NtiyisoN/OpenWorld-1
/API/test_time.c
UTF-8
827
3.375
3
[]
no_license
#include "time.c" #include <stdio.h> int main() { Calendar *random_calendar = makeRandomCalendar(); //should be 0000-00-00 char *date_time = getDateTime(random_calendar, "YYYY-MM-DD"); puts(date_time); setDateTimeRandomly(random_calendar); TIME_COUNT date_time_counter = getDateTimeAsCounter(random_calendar...
true
1ac3a61ebd45674c426bdd5d9d6bad093228198f
C
Icelandjack/queue
/tester.c
UTF-8
1,192
3.375
3
[]
no_license
#include "concurrent_queue_2locks.c" /* #include "queue.c" */ #include <pthread.h> void spawnThreads(int n, int x); void *dummy_function(void *arg); #define foo 100000 int main(int argc, char *argv[]) { int n = 6; int x = 100000; srand(time(NULL)); initialize_queue(); for (int i = 0; i < 100; i++) { ...
true
8e4d23e323d366ddfcfa830db415678fb8f07456
C
RobertH1993/AVRLightcontrol
/RF433_SF500.c
UTF-8
1,641
2.59375
3
[]
no_license
/* * RFSwitch433.c * * Created on: Jun 30, 2018 * Author: robert */ #include <avr/io.h> #include <util/delay.h> #include "RF433_SF500.h" //Kudos to the Arduino NewRFSwitch library for the timings and parts of the code //Private, send the stoppulse void send_stoppulse(){ PORTD |= (1<<PD4); _delay_us(PERI...
true
bf84c22cdfef8a88a6abca370b7540d06eda090e
C
noahkurz/SigKillLab
/CLab.C
UTF-8
1,474
3.1875
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <signal.h> #include <time.h> int child_pids[1000]; int parent_hp = 0; int MAX_CHILDREN = 10; int numChildren = 0; void sig_handler_parent(int signum) { printf("\nParent: Inside handler function\n"); for(int i = 0; i < numChildren; i ++) { k...
true
1c79fdf7bc019aedd682787c5c19565ad65b9311
C
sokhyg9016/Set_String_separated_by_comma
/test_move.c
UTF-8
318
3.234375
3
[]
no_license
#include<stdio.h> #include<string.h> int main() { int size = 0; int i = 0; char str[50]; char* p_str = NULL; scanf("%s", str); size = strlen(str); p_str = str; for(i = size; i > 0;) { printf("%c", *p_str++); i--; if(i%3 == 0 && i > 0) { printf(","); } } puts(""); return 0; }
true
0fca768fba22111d1b14d782c639810ee225b3f6
C
arup-baral/DSA_LAB-SEM---4-
/circular_queue.c
UTF-8
3,323
4.4375
4
[ "Apache-2.0" ]
permissive
/** * * Implementing Circular Queue * **/ #include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; }; struct CircularQueue { struct Node *front; struct Node *rear; int size; }; struct CircularQueue* createCircularQueue(){ struct CircularQue...
true
3fe5d74c5ad79bc9213354ac5a18201b72268075
C
LacErnest/College-Courses
/code/a4.c
UTF-8
139
3.03125
3
[]
no_license
#include<stdio.h> void main() { char x,y,z; x='A'; y=x+7; printf("the value of x is %c\n",x); printf("the value of y is %c\n",y); }
true
51bba95cf703ee48ff9be6c67d6663028a812a59
C
arazi47/university-projects
/1st year/2nd semester/OS/week11_threads_practice/main3.c
UTF-8
2,098
3.84375
4
[]
no_license
// // lock_3.c - Using a mutex (mutual exclusion lock) // // pthread_mutex_lock() - acquire a lock on the specified mutex variable. If the mutex is already locked by another thread, // this call will block the calling thread until the mutex is unlocked. // // pthread_mutex_unlock() - unlock a...
true
c520d2540cd4ed74fb3d781ae53766dad62309ed
C
Meg531/Lab3
/dicegame.h
UTF-8
326
2.59375
3
[]
no_license
#ifndef DICEGAME_H #define DICEGAME_H typedef enum GuessType { REGULAR, BONUS, ELIMINATION } GuessType; typedef struct Guess { int points; int die1; int die2; GuessType type; } Guess; void printGuess( Guess g ); void getDice( int* d1, int* d2 ); void fillGuesses( Guess* guesses, int length ) ; ...
true
8d071d1ba0c89e63021cfba4c0f36575bab138ee
C
hckrtst/cs-refresh
/problems/P6/p6.c
UTF-8
424
3.625
4
[]
no_license
#include <stdio.h> #include <assert.h> #include <string.h> int _strlen(const char *s) { if (s == NULL) return 0; register const char* c = s; while (*c) { c++; } return (c - s); } int main(int argc, char ** argv) { const char *test = "this is a test"; printf("my strlen is %d\n", _strlen(test));...
true
cedca6fb99819c5db9e7160aeb954ff3a20ecda7
C
erwan-simon/malloc
/malloc.c
UTF-8
1,642
3.078125
3
[ "MIT" ]
permissive
/* ** malloc.c for malloc in /home/erwan/Code/teck/PSU_2016_malloc ** ** Made by erwan ** Login <erwan.simon@epitech.eu> ** ** Started on Thu Jan 26 14:08:12 2017 erwan ** Last update Sat Feb 11 16:09:33 2017 Antoine */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <sys/mman.h> #include <pth...
true
948b6c8b65584810357377616f8de8fbbf7e10cb
C
95ulisse/simplylock
/src/auth.h
UTF-8
265
2.53125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
#ifndef __AUTH_H__ #define __AUTH_H__ /** * Uses PAM to authenticate the given user. * * @param user User to authenticate. * @return `0` if the user successfully authenticated, `-1` otherwise. */ int auth_authenticate_user(char* user); #endif
true
4d98f111b18c01574353a6e9661dd1dc88460654
C
munnellg/Rosalind
/6_mendels_first_law/src/main.c
UTF-8
1,813
3.484375
3
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> #define NUM_ORGANISMS 3 #define DIMINISHING 0.25 int main(int argc, char* argv[]) { int organisms[NUM_ORGANISMS]; float pr1[NUM_ORGANISMS] = {0}; float pr2[NUM_ORGANISMS * NUM_ORGANISMS] = {0}; float pr_dom, dim; int t, i, j; t = 0; pr_dom = 0; dim = 1; /* Start by ge...
true
265dfb810f26f33b27d5719afa56346831534edb
C
maciek-slon/AES_CTR
/src/main_mpi.c
UTF-8
9,721
2.953125
3
[]
no_license
/* This program sums all rows in an array using MPI parallelism. * The root process acts as a master and sends a portion of the * array to each child process. Master and child processes then * all calculate a partial sum of the portion of the array assigned * to them, and the child processes send their partial sums...
true
fc07c2a2c0cf56fc9cdad208157716c940ae0fd6
C
mikechen66/C-Programming
/C-Standard-Library/C-Standard-Library-v1/stdlib/atexit.c
UTF-8
332
2.984375
3
[]
no_license
/* atexit function */ #include <stdlib.h> /* external declarations */ extern void (*_Atfuns[])(void); extern size_t _Atcount; int (atexit)(void (*func)(void)) { /* function to call at exit */ if (_Atcount == 0) return (-1); /* list is full */ _Atfuns[--_Atcount] = func; retu...
true
de0d496e6927b8dcaa2a85b07cd0e105bfa741f0
C
NaiveSolution/OperatingSystems
/ass2/file.c
UTF-8
17,317
2.5625
3
[]
no_license
#include <types.h> #include <kern/errno.h> #include <kern/fcntl.h> #include <kern/limits.h> #include <kern/stat.h> #include <kern/seek.h> #include <lib.h> #include <uio.h> #include <thread.h> #include <current.h> #include <synch.h> #include <vfs.h> #include <vnode.h> #include <file.h> #include <syscall.h> #include <cop...
true
9403cee52cb42481fe8f7eaa6a209a8aa72df420
C
raduady/Problems
/Data Structures/C/Queue/QueueArray/queue_array.h
UTF-8
494
2.84375
3
[]
no_license
#ifndef __QUEUE_ARRAY_H__ #define __QUEUE_ARRAY_H__ #include <stdio.h> // FIFO Queue using circular arrays typedef struct QueueArray { void** q; int first; int last; int cap; int dim; } QueueArray; // initialize the queue void init_queue_array (QueueArray*, int); // enqueue the queue void enqueue_array (Queue...
true
8e6fc8d76ef0c9d6e5092e3a1e0b8dfe5d9ceeb2
C
lxf2git/quectel_work
/C/C/homework/huangganggui/8_ball.c
UTF-8
257
3.40625
3
[]
no_license
#include<stdio.h> int main() { int times=10; float high=100,lenght=0,temp=0; while(times) { lenght+=2*high; high/=2; times--; } lenght-=100; printf("10th's height is %f\n",high); printf("10th's lenght is %f\n",lenght); return 0; }
true
1e7a158fa9ece7b267024a58d366fa73baa3a5b0
C
ParfenovIgor/OS
/week5/ex1b.c
UTF-8
860
3.8125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #define N 10 #define NULL_PTHREAD 0 pthread_t tid[N];//Array of threads' id void* thread_do(void *arg){ pthread_t id=pthread_self(); int i; for(i=0;i<N;i++){//Try to find myself in array of threads' id if(pthread_equal(id,tid[i])){ printf("Hello, I'm...
true
8ca85272667525a9426a43b025857cf462d356ce
C
mldelibero/roboCooler
/code/tests/mockFiles/stdlib/stm32f4xx_hal_gpio.h
UTF-8
3,987
2.578125
3
[]
no_license
/* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_HAL_GPIO_H #define __STM32F4xx_HAL_GPIO_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32f4xx_hal_def.h" #include "stm32f4xx_hal...
true
f1ba41c5d20c7957b1a8fe2c5890010d88ed5bb1
C
axl411/SimpleDatabase
/SimpleDatabase/Node.c
UTF-8
3,504
2.953125
3
[]
no_license
// // Node.c // SimpleDatabase // // Created by 顾超 on 2020/05/09. // Copyright © 2020 Chao Gu. All rights reserved. // #include <stdlib.h> #include <string.h> #include "Node.h" #include "Row.h" #include "Table.h" #include "Cursor.h" #include "Pager.h" typedef enum NodeType { NODE_INTERNAL, NODE_LEAF } No...
true
c96bc93a66f68194f93cb7c11e124d6e40169e4a
C
SylTi/school
/school/first_year/c/42sh/srcs/rm_good_env.c
UTF-8
577
2.953125
3
[]
no_license
/* ** rm_good_env.c for rm_good_env in /u/epitech_2012/jaspar_y/cu/rendu/c/minishell/v1 ** ** Made by yoann jaspar ** Login <jaspar_y@epitech.net> ** ** Started on Thu Feb 28 15:56:29 2008 yoann jaspar ** Last update Tue Jun 3 17:55:49 2008 yoann jaspar */ #include "sh.h" char **rm_good_env(char **environ, int re...
true
9acfc5efd8e13b9225d84cff7c4b59a7e8f5466e
C
MA806P/ComputerScienceNotes
/AlgorithmDataStructure/LeetCode/69-MySqrt/sqrt.c
UTF-8
1,386
3.984375
4
[ "Apache-2.0" ]
permissive
#include <stdio.h> #include <math.h> //方法一,只要求是整数 int mySqrt0(int x){ if (x < 2) { return x; } int i = 1; while (i*i <= x) { //超过int最大值溢出了为负的 if (i*i <= 0) { break; } i++; } return --i; } //方法二,公式 int mySqrt1(int x){ if (x < 2) { return x; } //sqrt(x) = ...
true
16ec4d534eea8b55d6333386c815144758b85019
C
manojkalambe/C_codes
/array/arr1.c
UTF-8
426
3.3125
3
[]
no_license
#include<stdio.h> int main() { int i; int key; int arr[5]={10,20,30,40,50}; //arr dec //return type array_name[size]; printf("Entered elements that you want to search : \n"); scanf("%d",&key); for(i=0;i<5;i++) { if(arr[i]==key) { printf("fo...
true
6e707ce8ea3bc37755a88707d8b5945f97e80bf0
C
SequinYF/TTMS_C
/1.3/structure/TTMS对照/Persistence/Account_Persist.c
UTF-8
1,581
2.8125
3
[]
no_license
/* * Account_Persist.c * * Created on: 2015年5月8日 * Author: Administrator */ #include "Account_Persist.h" #include "../Service/Account.h" #include "../Common/list.h" #include <stdlib.h> #include <stdio.h> #include<unistd.h> #include <assert.h> #include <string.h> static const char ACCOUNT_DA...
true
267fdbde4bd51f652ed1f2179f20c6eb27039371
C
Hide4ki/course_work
/format.c
UTF-8
2,858
3.09375
3
[]
no_license
#include <stdio.h> #include "format.h" #include "def.h" void strCopyN(char *s1,char *s2, int num); extern int formatFlag; extern int numEnd; extern int numBegin; extern int cntCharacter; void format(char *finalyLine, char *line) { switch(formatFlag) { case 0: strCopyN(finalyLine,line,numEnd-numB...
true
2fdd590c2d2c96b956ff45000fd0cca79d0d2d2e
C
xiexuchao/TraceAnalyzerBackup
/config.c
UTF-8
9,033
2.53125
3
[]
no_license
#include "pool.h" #include "detector.h" void load_parameters(struct pool_info *pool,char *config) { int name,value; char buf[SIZE_BUFFER]; char *ptr; memset(buf,0,sizeof(char)*SIZE_BUFFER); strcpy(pool->filename_config,config); pool->file_config=fopen(pool->filename_config,"r"); ...
true
a0bfd73bcc7164346d1850ea7b9c805489c0de2d
C
ahmedazhar10/shell_os
/ram.c
UTF-8
764
3.15625
3
[]
no_license
#include<stdio.h> #include<string.h> int nextFreeCell = 0; char *ram[1000] = { NULL }; void removeFromRam (int start, int end){ for (int i = start; i <= end; i++) { ram[i] = NULL; } } void addToRAM (FILE *p, int *start, int *end){ *start = nextFreeCell; int i = *start; ...
true
7abbafe3b1afe5bd11a80ec15e8afdb294d98a4b
C
Tbeaumont79/BTS-SNIR
/devel/typd/ascii.c
UTF-8
345
3.546875
4
[]
no_license
#include <stdio.h> int main() { int ligne,colonne; for (ligne = 0; ligne < 16; ++ligne) { for (colonne = 0; colonne < 6; colonne++) { char c = 0x20+(0x10*colonne)+ligne; if (c < 127) printf("%c %d (%02x)\t", c,c,c); } putchar('\n'); ...
true
e4f48c99c023181ddb20c9730ccf83e51270b159
C
hatingthefruit/cs3843
/Lab2/lab2b.c
UTF-8
1,190
3.953125
4
[]
no_license
/* Author: Andrew DiCarlo Assignment Number: Lab 2 File Name: lab2b.c Course/Section: CS 3843 Section 003 Due Date: 02 Mar 2020 Instructor: Dr. Ku Contains the modified code to complete the requirements of lab 2 */ #include <stdio.h> #include <string.h> #define MAX 10 int readArray(int [], int); void printArray(int...
true
4ff0d89ab02fafae2083fdd45255d81555e0ed80
C
edenbarby/metr4810-team5-project
/atmega328/edens_drivers/twi.c
UTF-8
8,615
3.1875
3
[]
no_license
/* * twi.c * * Created: 25/09/2013 6:05:40 PM * Author: Eden Barby */ /* INCLUDES *****************************************************************/ #include <avr/io.h> #include <stdint.h> #include <stdio.h> /* PRIVATE TYPEDEFS *********************************************************/ /* PRIVATE DEFINES ****...
true
155a58f5a72f6942633cdf503f0a76dee9f38757
C
tarfao/Faculdade
/2ano/afn/ConversaoAFN_AFD/testeAfnAfd.c
UTF-8
21,626
3.21875
3
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdio_ext.h> #define true 1 #define false 0 #define vazio -1 typedef struct estado { char Nest[20][5];/*contem os estados*/ int cont; /*conta os estados*/ }Estados; typedef struct NState {/*tem o objetivo de obter os movimentos de um estado (seja...
true
b6563963e38841ed3b52fe6596ec07b5ecd28e72
C
jdelgadoalfonso/efence-example
/my_application/main.c
UTF-8
140
2.890625
3
[]
no_license
#include <stdlib.h> int main(void) { char *buf = malloc(20); int i = 0; buf[-1] = '0'; for (i = 0; i <=20; i++) { buf[i] = '0'; } }
true
f4ddcd5cc86c2f3d50177b6882ade9c2a3c4827e
C
csu-anzai/GeneticLOGIC
/sgac_93a/sga-c/generate.c
UTF-8
1,193
2.90625
3
[]
no_license
/******************************************************************************/ /* generate.c - create a new generation of individuals */ /******************************************************************************/ #include "external.h" generation () { int mate1, mate2, jcross, j = 0;...
true
95b05159e3d452d39da6a61fd5f322f4150a79ff
C
max197616/zerod
/src/speed_meter.c
UTF-8
2,345
3.171875
3
[ "BSD-3-Clause" ]
permissive
#include "speed_meter.h" #include "util.h" /** * Initialize speed meter. * @param[in] speed */ void spdm_init(struct speed_meter *speed) { atomic_init(&speed->i, 0); atomic_init(&speed->speed_aux, 0); atomic_init(&speed->last_update, 0); for (size_t i = 0; i < ARRAYSIZE(speed->backlog); i++) { ...
true
1bc442609122057cb3cd173e7af86d363e5bd899
C
pmodels/mpich
/test/mpi/rma/rget_testall.c
UTF-8
2,085
2.796875
3
[ "mpich2" ]
permissive
/* * Copyright (C) by Argonne National Laboratory * See COPYRIGHT in top-level directory */ #include <stdio.h> #include <mpi.h> #include "mpitest.h" /* This test checks request-based get with MPI_Testall. Both the return value of * MPI_Testall and status.MPI_ERROR should be correctly set. * * Thanks for Jos...
true
848b483e40636b4c726a621079c9d77441f80707
C
fread/pptut-code
/dienstag/10/a3.c
UTF-8
1,560
2.828125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "mpi.h" /* int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, */ /* int tag, MPI_Comm comm); */ /* int MPI_Recv(void *buf, int count, MPI_Datatype datatype, */ /* int source, int tag, MPI_Comm comm, MPI_Status ...
true
5b8476d5e261740ab257d2adac62b00e11397af2
C
abphilip-vit/College1
/T6/S6.c
UTF-8
3,772
3.75
4
[ "MIT" ]
permissive
#include<stdio.h> struct polynode { int coef; int exp; struct polynode *next; }; typedef struct polynode *polyptr; polyptr createPoly() { polyptr p, tmp, start = NULL; int ch=1; while(ch) { p = (polyptr)malloc(sizeof(struct polynode)); p...
true
e857f709237bcbfac7abef2fb6e84950ecb099b2
C
mark-huynh/Data-Structures
/Assignment5_skeleton_files_W19/spellChecker.c
UTF-8
4,873
3.65625
4
[ "Zlib" ]
permissive
#include "hashMap.h" #include <assert.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> /** * Allocates a string for the next word in the file and returns it. This string * is null terminated. Returns NULL after reaching the end of the file. * @param file * @return ...
true
3ddffa15627a737015e4725ac305f7ab055f3f65
C
libanesd/ListaRevisaoA2
/Ex07.c
UTF-8
2,738
3.875
4
[]
no_license
/** Utilizando uma estrutura de pilha, Implemente uma calculadora pós-fixada, contendo as operações básicas (+, -, *, /) **/ #include <stdio.h> #include <stdlib.h> #define MAX 10 #define BASE 0 int TOPO=0, OPERACAO=0; float VETOR[MAX], VALOR=0, N1=0, N2=0, RESULTADO=0; void EMPILHAR(float VALOR) { ...
true
edbdecae9a5405202ddeec949cddab8b58bb9ef9
C
mxie33/CS2200_spring16
/micro-project2/gdb_example2.c
UTF-8
554
3.546875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFFERSIZE 100 void setint(int* ip, int i) { *ip = i; } void write_message(char *message) { char buffer[BUFFERSIZE]; memset(buffer, '\0', BUFFERSIZE); strcpy(buffer, message); printf("%s\n", buffer); } int main() { char mes...
true
06909e5ebc0b5ce021d35f4ff3bd9803afa06095
C
patriziocannoni/WaterProject
/WaterSensors/Tasks/TaskRS485Slave.c
UTF-8
2,642
2.734375
3
[]
no_license
/* * TaskRS485.c * * Created on: 10/09/2015 * Author: patrizio */ #include <FreeRTOS.h> #include <queue.h> #include <task.h> #include <rs485.h> #include <TaskRS485Slave.h> // Estado do processo. static unsigned char processState; static xQueueHandle commandQueue; static xQueueHandle responseQueue; enum {...
true
4583741a8edc303a56218790ccdb92cdaeafaceb
C
Ventupath/tolve
/chat-server.c
UTF-8
1,250
2.90625
3
[]
no_license
#include "utils.h" int go = 1; void Server(char* userFile, char* logFile){ printf("server pid: %d\n", getpid()); int sock, newSocket; struct sockaddr_in my_addr; bzero(&my_addr,sizeof(struct sockaddr_in)); sock = socket(AF_INET, SOCK_STREAM, 0); my_addr.sin_family = AF_INET; my_addr.sin_port = htons(5001); my...
true
f9791b3478392e0dedd1814f08b10de95ab21a12
C
akapust1n/SMTP
/client/src/client-run.c
UTF-8
10,698
2.609375
3
[]
no_license
/** \file client-run.c * \brief Основные функции. * * В этом файле описана главная функция программы. */ #include <client-worker-commands.h> #include <time.h> #include "client-run.h" #include "client-logger.h" #include "client-worker.h" #include "smtp_sockets.h" #include "hashtable.h" int scan_dir_for_new_mail(...
true
6563cfc85092ac9888e37d2df0103f327625cc0e
C
Carnagiul/lemin
/lemin/set_file.c
UTF-8
2,438
2.59375
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* set_file.c :+: :+: :+: ...
true
954527313fca17889f758dfad8addf292feef86a
C
Tobias-Schoch/BSYS-HTWG
/Chap_14/vector.c
UTF-8
920
3.671875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { struct vec { int arrSize; int arr[]; }; struct vec *vecArr; vecArr = malloc(sizeof(struct vec)); if (vecArr == NULL) { perror("Error "); return EXIT_FAILURE; } if (argc != 2) { ...
true
01bb4e78736a4d7f820409cde39aa0d372beb27f
C
Kofemolka/TelitAPI
/uart.c
UTF-8
4,378
2.703125
3
[]
no_license
#include <Windows.h> #include <stdio.h> #include <string.h> #include "common.h" #define buffSize 1000 HANDLE hComm; // Handle to the Serial port OVERLAPPED o; void openComPort() { BOOL Status; // Status of the various operations char ComPortName[] = "\\\\.\...
true
c1568e3bf25e52d5d03a01898b0f38514fd86e14
C
sikey647/NetworkAction
/base/c/tcp_client.c
UTF-8
2,017
3.265625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <strings.h> #define BUFFER_SIZE 1024 int main(int argc, char **argv) { if (argc != 3) { fprintf(stderr, "u...
true
fdb1428fde09a97ca7b18fe5b25a1198b31c3d74
C
little0brother/C-C-Study
/CLanaugeAdvanced/day08/day08/01_递归的使用.c
GB18030
584
4.125
4
[]
no_license
#include <stdio.h> void fun(int a) { if (a == 1) { printf("a == %d\n", a); return; // жϺҪ } fun(a - 1); printf("a = %d\n", a); } // ݹۼ int add(int n) { if (n < 1) { return n; } return n + add(n - 1); } int add2(int n) { if (n == 100) { return n; } return n + add2(n + 1); } int main() { //...
true
bcb9c0767ed6d9827bd9875d44385e634c5a45b9
C
jmoussu/FDF
/srcs/ligne_img.c
UTF-8
2,637
2.828125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ligne_img.c :+: :+: :+: ...
true
fe2ada09c874fa51dcaeeacc87f432a42b5f3c78
C
kah-g/CComp_Repository
/Programacao_2/Trabalho/GeraSemente.c
UTF-8
2,640
3.859375
4
[]
no_license
#include "GeraSemente.h" int SementeMain (char *senha) { int semente=0; if ((senha[0] >= 'A') && (senha[0] <= 'Z')) { //converte com os valores de letra maiuscula semente = ConverteMaiuscula (senha); } else if ((senha[0] >= 'a') && (senha[0] <= 'z')) { //converte com os valores de letra minuscula ...
true
5e613ffa3d624dfa14af24e1a9c379d659cde6b6
C
szabolor/branch-prediction
/test/branch_test.c
UTF-8
2,297
2.9375
3
[]
no_license
#include <stdint.h> #include <unistd.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #define WITH_PRINT ( 0 ) /* Lorant SZABO Build with: `gcc -Wall -Wextra -pedantic -O0 -ggdb -o branch_test branch_test.c' Inspect assembly code for the critical section (e.g. compiler doesn't optimized ...
true
62f5d7df80ee1a96fbdf0473a6519c0f0eacad8f
C
IDiAlex/Osnovy
/laba10/main_1.c
UTF-8
1,264
3.171875
3
[]
no_license
#include <stdio.h> #include <string.h> #include <malloc.h> #include <stdlib.h> int main(){ char **line=NULL, c; int linenum=0, letternum=0, nword=0, j, i=0; FILE *fpin, *fpout; fpin=fopen("file.txt", "rt"); if(fpin==NULL) return; fpout=fopen("result.txt", "wt"); if(fpout==NULL) ...
true
589e163d618ecaf0b780e8d722a07f069b7c34e6
C
Mekanikles/smuglang
/source/ir/irutils.h
UTF-8
900
2.796875
3
[ "MIT" ]
permissive
#pragma once #include "core.h" #include "ir/ir.h" i64 convertLiteralToInt64(IR::Literal& literal) { auto& primitive = literal.getType()->getPrimitive(); assert(primitive.isConcrete() && primitive.isInteger()); if (primitive.Signed) { switch (primitive.size) { case 8: return literal.readValue<i8>(); ca...
true
1535479f4c427e00ea482dac7b0bba7c6d5bef7b
C
nobodyzxc/OnlineJudge
/zj/a021.c
UTF-8
4,227
2.859375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<memory.h> int numlen(int al[]); void plus(void); int minus(void); void mutiply(void); void divise(void); void stvnum(int num[]); void rm0(int num[]); void rm1(int num[]); int num1[501]={-1}; int num2[501]={-1}; char non[501]={0}; int main(void){ int ch; ...
true
26e5bb801d8e35efdf99ef5fda607950cdcf5352
C
randipsbh/kandr
/chapter01/exercise1-13.c
UTF-8
703
4
4
[]
no_license
#include <stdio.h> /* prints a histogram of the lengths of words */ main() { int c, i, j; int count = 0; int words[10]; for (i = 0; i < 10; ++i) words[i] = 0; while ((c = getchar()) != EOF) { if (c != ' ' && c != '\n' && c != '\t' && c != '.') { ++count; } else { if (count != 0) ...
true
ed8e70f48dc46fb40c3262a47365c164bfcc5fce
C
pjavier98/P1
/Huxley/295_distancia_entre_dois_pontos.c
UTF-8
213
3.53125
4
[]
no_license
#include <stdio.h> #include <math.h> int main() { int x1, y1, x2, y2; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); double distancia = sqrt(pow((x2 - x1),2) + pow((y2 - y1),2)); printf("%.4lf\n", distancia); }
true
348fd18baaf1bff1d71574fb546d7acba0e2d269
C
admiralu/learn_geek
/dz9/dz9v1.c
UTF-8
717
3.59375
4
[]
no_license
#include <stdio.h> #include <string.h> #include <stdlib.h> void str_sum_digits(const char *cs); int main() { const char cs[100] = { 0 }; printf("enter string with digits\n"); scanf("%[0-9]", &cs); printf("cs %s\n", cs); str_sum_digits(cs); //*cs=getchar(); //printf("Hello World!"); return 0; } void str_sum_...
true
8c6a6d7fb48eb4f85f9a852c63ae3d424862fb05
C
Qvasov/lem-in
/libft/ft_printf/src/ft_formstr_s.c
UTF-8
1,650
2.78125
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_formstr_s.c :+: :+: :+: ...
true
6c344a475f21117ce249aa1ffa2c0c4e188ccb76
C
glambertucci/Allegria
/Pi_Led/R_pin.h
UTF-8
884
2.75
3
[]
no_license
#ifndef R_PIN_H #define R_PIN_H #include <stdio.h> #include "struct.h" #define LED_1 ("4") //Pines GPIO #define LED_2 ("17") #define LED_3 ("27") #define LED_4 ("22") #define LED_5 ("18") #define LED_6 ("23") #define LED_7 ("24") //Las siguientes funciones son para el manejo de pines en el RASPBERRY PI // Esta fu...
true
41665eeff2ba30e990e8d7a24a9d0201af37b739
C
nareshpothula/Project1
/Vector/sortings/bin1.c
UTF-8
577
3.171875
3
[]
no_license
#include<stdio.h> main() { int mid,n,a[10],i,ele,j; ele=sizeof(a)/sizeof (a[0]); for(i=0;i<ele;i++) { printf("enter a number...\n"); scanf("%d",&a[i]); } for(i=0;i<ele;i++) printf("%d\t",a[i]); printf("\n"); int sum=0,k=0,l=0,b[6],c[6]; for(i=0;i<(ele/2+1);i++) { if((ele-i)>=5) { sum=0; for...
true
68ac1ab01eb0500e3acfc7ac5d6326413e92ca13
C
lakshay-malik-183/Programming
/Data structure/2d_Array/Sum_of_minor_diagonal_elements.c
UTF-8
480
3.3125
3
[]
no_license
#include<stdio.h> #include<conio.h> void main() { int size,i,j,sum=0;; printf("enter size of matrix:-\n "); scanf("%d",&size); int arr[size][size]; printf("enter elements in matrix:- \n"); for(i=0;i<size;i++) { for(j=0;j<size;j++) { scanf("%d",&arr[i][j]); } } ...
true
006b0e5a4d4762e7656b07dffc950af7214ecc7f
C
tobybell/c-vector
/vector.c
UTF-8
5,012
3.984375
4
[ "MIT" ]
permissive
#include "vector.h" #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <assert.h> /** * Struct: Vector * * Implements the storage for the vector type defined in `vector.h`. The vector * struct uses three members: * `elems` Array of pointers; stores the vector's contents. * `capacity` Max...
true
1b227df47c18823d0bf1169a50bf3fb14584a689
C
Nickheythatsme/DataStructures
/C_Cpp/single_thread/sorting/sorting_functions/insertion.c
UTF-8
1,447
4.25
4
[]
no_license
#include <stdio.h> #include <stdlib.h> struct value { int v; struct value *next; }; /* * Inserts a new value into the LLL. Creates a new node as well */ int insert_LLL(struct value **head, int new_value) { struct value *new_node; /* If head doesn't exist we need to make it */ if(!*head) { ...
true
209e160dc1aa85f678ec3eb6af395916b55269b7
C
lzufalcon/mcube
/lib/mm.c
UTF-8
914
2.984375
3
[ "BSD-2-Clause" ]
permissive
/** * @file lib/mm.c * * @author Hiroyuki Chishiro */ #include <mcube/mcube.h> unsigned long LOW_MEMORY; unsigned long HIGH_MEMORY; unsigned short *mem_map; #if 0 unsigned long get_free_page(void) { size_t i; for (i = 0; i < PAGING_PAGES; i++) { if (mem_map[i] == 0) { mem_map[i] = 1; return L...
true
c2017e42ede8c8004196d309c1a8c9cdfcabadf4
C
ocochard/C
/KNKing/c7/p13/project.c
UTF-8
441
4.3125
4
[]
no_license
#include <stdio.h> #include <ctype.h> int main(void) { int i=0,c=0,w=0; printf("Enter a sentence: "); do { i=getchar(); /* If it's a space, new word * But if no space, count char */ if (i == ' ') { w++; } else { c++; } } while (i != '\n'); /* Need to add the last word */ w++; printf("Your s...
true
380e90c5502cb549f237b3c9a4087d5d34ead816
C
manoharmukku/projecteuler
/PE003.c
UTF-8
652
3.75
4
[]
no_license
/* Author : Manohar Mukku * Date : 27.11.2014 * References : Wikipedia - Primality test * Answer : 6857*/ #include <stdio.h> #include <stdbool.h> #define N 600851475143 bool isPrime(unsigned long n) { unsigned short i; if (n<=3) return n>1; else if (n%2==0 || n%3==0) return false; ...
true
4c613153fa97150b86da2e50884e69fa838bc8b1
C
MJ-McMillen/ExercisesInC
/exercises/ex01/cards.c
UTF-8
1,112
3.859375
4
[ "MIT" ]
permissive
#include <stdio.h> #include <stdlib.h> int plus_or_minus (int val) /* this function decides whether or not the card should be added or subtracted from the total.*/ { if ((val > 2)&& (val < 7)) { return 1; } else if (val == 10) { return -1; } else { return 0; } ...
true
a683ea1afe9d9bfd2c3d98453bb45e245fff1f82
C
zhenxinqin/basic_data_structrue
/dostack.c
UTF-8
1,136
3.15625
3
[]
no_license
#include <iostream> #include <stack> #include <queue> using namespace std; int n,i,j; int res; stack <int> s; queue <int> in,out; void clear(stack <int> &s){ while(!s.empty()) s.pop(); } void clear(queue <int> &s){ while(!s.empty()) s.pop(); } void print(queue <int> i){ while(!i.empty()){ cout<<i.front(); ...
true
4e6b4994134c17a93a53c9d98cb83e9551c5ac11
C
mamengchen/pthread_pool
/pthread_pool/threadpool.c
UTF-8
11,949
3.375
3
[]
no_license
#include "threadpool.h" #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <signal.h> #include <assert.h> #include <string.h> #include <errno.h> #define default_time 1 /*默认10s*/ #define min_wait_task_num 10 /*当任务数超过了它,就该添加新线程了*/ #define default_thread_num 10 /*每次创建或销毁的线程个数*/ #define true 1 #define f...
true
cb55b1928d91f7b35cb2330bbcb86eeb4281e4b5
C
milanjovanovic/clcomp
/runtime/hash.c
UTF-8
3,858
3.359375
3
[]
no_license
#include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <assert.h> #include "hash.h" long str_hash_code(char *str) { int h = 0; int size = strlen(str); if (strlen(str) > 0) { for (int i = 0; i < size; i++) { h = 31 * h + str[i]; } } return abs(h); } struct...
true
42b8af88e5db4cbb14169a05d6a375957ef93171
C
prandien/ARITK
/ARTIK 050/example/uart/uart.c
UTF-8
1,694
2.953125
3
[]
no_license
#include "wiced.h" #define RX_BUFFER_SIZE 64 #define TEST_STR "\r\nType something! Keystrokes are echoed to the terminal ...\r\n> " wiced_uart_config_t uart_config = { .baud_rate = 115200, .data_width = DATA_WIDTH_8BIT, .parity = NO_PARITY, .stop_bits = STOP_BITS_1, .flow_...
true
c98f4779cfac9ca4156b600b3d542e1d24100ff3
C
rodriguescarina/URI
/URI - C/1015 - Distância Entre Dois Pontos.c
UTF-8
291
3.140625
3
[ "MIT" ]
permissive
#include <stdio.h> #include <math.h> int main(void) { double x1, x2, y1, y2, total, distancia; scanf ("%lf %lf", &x1, &y1); scanf ("%lf %lf", &x2, &y2); total = pow(x2-x1,2) + pow(y2-y1,2); distancia = sqrt(total); printf ("%.4lf\n", distancia); return 0; }
true
2100264a18dd2240d599bf96e5403f79c4267380
C
jenny075/MMT_HW5
/hw5/New folder/main3.C
UTF-8
2,880
2.546875
3
[]
no_license
#include "FastDeliveryCompany.H" #include "ProfessionalDeliveryCompany.H" #include "DeliveryCompany.H" #include "DeliveryVehicle.H" #include "FastDeliveryVehicle.H" #include "ProfessionalDeliveryVehicle.H" #include "Parcel.H" #include <string.h> #include <cstdio> #include <math.h> #include <iostream> #define _CRT_SECUR...
true
c4128306891d48888d8ad75e335c5fb7f26a55d5
C
sharynneazhar/coursework
/eecs665/lab08/source/test.c
UTF-8
1,063
3.15625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> extern int tstconst(); extern void tstcall(); extern int tstadd(int,int); extern int tstsub(int,int); extern int tstmul(int,int); extern int tstdiv(int,int); extern int tstmod(int,int); extern int tstshl(int,int); extern int tstshr(int,int); int main( int argc, const char *argv...
true
b198bfaf7c93de35f4e19fc2762b6ee8e4eafc8e
C
szczygielskipatryk/strukturalne
/babelkowe.c
UTF-8
683
3.40625
3
[ "MIT" ]
permissive
#include <stdio.h> void bobelkowe(int tab[],int n); int main() { int n,i,tab[100]; printf("ile liczb:\n"); scanf("%d",&n); printf("Podaj liczby\n"); for(i=0;i<n;i++) { scanf("%d",&tab[i]); } bobelkowe(tab,n); printf("Po sortowaniu:\n"); for(i=0;i<n;i++) ...
true
da5406b09aea18a2e3ef480cac34fdb3e450e295
C
mmomtchev/node-gdal-async
/deps/libnetcdf/netcdf/examples/C/simple_nc4_rd.c
UTF-8
2,758
2.828125
3
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
/* Copyright 2019 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for conditions of use. */ /** * @file * Read a simple file, with some of the features of netCDF-4. * * This is a very simple example which demonstrates some of the new * features of netCDF-4.0. * * This example read...
true
84469df9341e74d5119ac4a7f83a63a16c01f043
C
kimwalisch/PixSpx
/presieve30.h
WINDOWS-1252
1,442
2.5625
3
[]
no_license
#ifndef presieve_h #define presieve_h #include"int64.h" #define WITH_COUNTERS 1 /************************************************************************** INVERSION MODULO PK ***************************************************************************/ #define K 3 // Precrible par p1 = 2 , p2 = 3, et p3 = 5 #d...
true
2bd2aae3c023a9a2509f7c3f7e3304008a1bfa92
C
GastonDeS/Lightweight-OS
/TESTEOS/Sem/semV3.c
UTF-8
3,647
3
3
[]
no_license
#include <sem.h> typedef struct elem{ int value; int numProcess; char *name; listADT* blockedProcesses; }elem; elem* semVec = NULL; int semVecSize = 0; //cantidad de elemntos int signalCheck = 0; //private: int findFreeSpace(); int sleepProcess(listADT blockedProcesses); int wakeUpProcess(listADT bl...
true
00e37b83d9a00daad65976504f46fb5c9d9dbe54
C
LucaLanziani/pubsub
/ps_types.c
UTF-8
953
2.765625
3
[ "MIT" ]
permissive
#include "ps_types.h" PSErrors ps_data_new(PSData_p* d_p) { if (d_p==NULL) return params_error; *d_p=(PSData_p)calloc(1,sizeof(PSData_t)); return StatusOK; }; PSErrors ps_data_init(PSData_p d) { if (d==NULL) return params_error; d->data=NULL; return StatusOK; }; PSErrors ps_data_new_init_and...
true
08a7f9e0196079b7facd98b8ea1f994f025032c0
C
chinaglia-rafa/hacker-wars
/libs/Player.h
UTF-8
5,017
3.8125
4
[]
no_license
/** ** Sigla: plr ** Lib responsavel por gerenciar as informacoes de cada jogador ** */ #include <stdlib.h> struct Card_in_hand { struct Card card; struct Card_in_hand* next; struct Card_in_hand* prev; }; struct Player { struct Card_in_hand* hand; int score; char player_name[50]; }; /** ** Cria uma n...
true
4522f79ea330e9e7d96a1293c1adf9cfd0ee5ee2
C
rsaber/cs2521-18x1
/prac1-prep/inorderSucc.c
UTF-8
1,772
4.21875
4
[]
no_license
#include <stdio.h> #include <stdlib.h> /* * I got lazy and didnt write any tests * or the struct * or actually anything at all lol good luck */ typedef struct _tree{ int value; struct _tree * left; struct _tree * right; }*Treelink; Treelink minValue(Treelink root){ if(!root) return NULL; Tree...
true
b69b8604cee08799a6d76a8aa4c2ea8d2d437197
C
icoderharshit/UCA_Assignments
/Assignment-8(Algorithm)/fibonacci_even.c
UTF-8
713
4.1875
4
[]
no_license
/* * Program to print n fibonacci numbers that are even * @Harshit Sharma , 1910990073 * @date 20/08/2021 */ #include<stdio.h> void fib_even(int n) { int first = 0; int second = 2; if(n == 1) { printf("0"); } else if(n == 2) { printf("0 2"); } else { ...
true
5111114249e03c3d3794e93eb9fa90d186463038
C
Brihat9/C_Programming
/math.c
UTF-8
2,437
3.6875
4
[]
no_license
#include<stdio.h> int main() { int x=1; while(x!=0) { float a,b; int c,d,q; char opr; system("cls"); printf("\n\t\t\t* * * * Simple Calculator * * * *\n\n\n\n"); printf("\tEnter 1st number : "); scanf("%f",&a); ...
true
eca2fedfe5836104a337eb54e7a6413da566beb4
C
uniqueimaginate/C_learning
/for/for_2.c
UTF-8
203
3.640625
4
[]
no_license
#include <stdio.h> int main() { int i = 1, num; printf("let's make n factorial! Give me a number n : "); scanf("%d", &num); for ( i = num-1 ; i > 1 ; i--) { num = num*i; } printf("%d", num); }
true
2c87e6e7ee7b15cf14fd343a3c927fe37000bde6
C
greeneley/STI2020
/3ASTI/programmation C/TD1/devoirs/main.c
UTF-8
733
3.0625
3
[]
no_license
// // main.c // DINH THANH HAI // 20/09/2017 devoir programmation C // #include <stdlib.h> #include <stdio.h> #include "root.h" #define ZERO 1e-100 #define EPSILON 1e-10 #include<math.h> int main(void) { test_moyenne(); char s1[100],s2[50]; printf("Entrez la chaine s1 (sans d'espace) "); scanf("%s",&s1); p...
true
8681c600c889efc6822862bcce90eac92766329f
C
gabirel1/CPE_matchstick_2019
/src/error2.c
UTF-8
535
3.15625
3
[]
no_license
/* ** EPITECH PROJECT, 2020 ** error2.c ** File description: ** error2.c */ #include "../include/main.h" int my_error(char *nb1, char *nb2, board_t *board) { board->matches = my_getnbr(nb1); board->nb_max = my_getnbr(nb2); if (board->matches <= 1 || board->nb_max <= 1 || board->matches > 99) { wri...
true
76984800eda1d6e4f1a4e22692522d64bbfa11e3
C
Akash3106/C-C-projects
/4/lab3.5.c
UTF-8
2,391
3.71875
4
[]
no_license
//--------------------------------------------------------------------------------------------- //AUTHOR: Peter //FILENAME: Lab3.5.cpp //SPECIFICATION : Priority Scheduling #include<stdio.h> /* --------------------------------------------------------------------------------------- NAM...
true
4dce404b54dbb512b097693a2504515e4fa4ac61
C
shdnx/dangless-malloc
/sources/testapps/hello-world/hello-world.c
UTF-8
1,196
3.125
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#include <stdio.h> #include <stdlib.h> #include <string.h> // dangless/printf_nomalloc.h extern void fprintf_nomalloc(FILE *os, const char *restrict format, ...); #define LOG(...) fprintf_nomalloc(stdout, __VA_ARGS__) // dangless/virtmem.h static inline int in_kernel_mode(void) { unsigned short cs; asm("mov %%cs,...
true
7234e2601b1557ae2a92c51fcffc3925af1b450e
C
Aadesh-Shigavan/Python_Daily_Flash
/Day 4/04-DailyFlash_Solutions/17_Jan_Solutions_One/C/ascii.c
UTF-8
268
3.78125
4
[]
no_license
/* Program 5: Write a program to ASCII values of input character. Input: A Output: ASCII Value of A is 65 */ #include<stdio.h> void main(){ char input; printf("Enter the character\n"); scanf("%c",&input); printf("Ascii value of %c is %d",input,input); }
true
82037692281a04c2ce2491a15dd5d100ec7c72e9
C
pookieofdoom/school
/cpe101/project2p2/moonlander.c
UTF-8
1,508
2.75
3
[]
no_license
/* Project 2 * * Name(s): Anthony Dinh * Instructor: Hatalsky */ #include "landerFuncs.h" #include <stdio.h> #define GRAVITY 1.62 int main() { int fuelAmount, fuelRate, i; double velocity = 0.0, accel=0.0, alt=0.0; showWelcome(); alt = getAltitude(); fuelAmount = getFuel(); printf("\nLM state at re...
true
df09bcaf367fe3792a38fa22bd0bfcf00967d6b9
C
chengleee/Algorithm-exercises
/c/并集/并集/binji.c
GB18030
2,834
3.484375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #define OK 1 #define ERROR 0 #define OVERFLOW -1 #define LISTINCREMENT 2 #define LIST_INIT_SIZE 10 #define TRUE 1 #define FALSE 0 typedef int Status; typedef int ElemType; typedef struct { ElemType *elem; int length; int listsize; }Sq; //˳ Status Init(Sq *L) { (*L).elem=(ElemT...
true
582aac9ddf1f7cd6b225f3492248e7efb21f26e1
C
sunjiangbo/3730
/framework_1209/test/test_cap.c
UTF-8
446
2.578125
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int capture_fd; capture_fd = open("/dev/video0", O_RDWR | O_NONBLOCK); if (capture_fd <= 0 ) { printf("open device /dev/video0 failed.\r\n"); return -1; } printf("open success.\r\n"); input = TVP5146_AMUX_COMPOSITE; if ( ioctl(phandl...
true
850123322aef98a228652494874d5c52657b9744
C
DanAurea/Tactics-Arena
/include/game/pathList.h
UTF-8
1,276
3.203125
3
[]
no_license
/** @file pathList.h @brief En-tête listes des chemins @author Cousin Brandon Chaudemanche Ewen Biardeau Tristan @version v1.00 @date 18/12/2015 */ void initPath(int); /**< Initialise le chemin */ void initPaths(); /**< Initialise les chemins */ int emptyPath(int n); /**< Vérifie si chemin vide */ int outPath(in...
true
4c7d1974a8882d374f2116c34fcda178a79bc483
C
thinkpath/C
/src/servo_query_angle.c
UTF-8
1,344
2.625
3
[]
no_license
/* * 舵机角度回读 * 用手掰动舵机, 角度回读并将角度读数通过SPI发送 * -------------------------- */ /*#include <SoftwareSerial.h>*/ #include "FashionStar_UartServoProtocal.h" #include "FashionStar_UartServo.h" // Fashion Star串口总线舵机的依赖 // 软串口的配置 #define SOFT_SERIAL_RX 6 #define SOFT_SERIAL_TX 7 #define SOFT_SERIAL_BAUDRATE 4800 ...
true
d91e63fab8e0804f48d5d864f8de80ca31253c51
C
capraanamaria/clrs
/6.5-6.c
UTF-8
353
3.046875
3
[]
no_license
/*clrs 6.5-6*/ void heapincreasekey(int *a,int i,int key,int *parent) { int temp=0; if(key<*(a+i)) printf("key is smaller\n"); *(a+i)=key; for(i=heapsize-1;((i>0)&&(*(a+*(parent+i))<key));) { //temp=*(a+i); *(a+i)=*(a+*(parent+i)); //*(a+*(parent+i))=temp; i=*(par...
true
8101055fe01172a9aab5c22285c26bd010471fba
C
galatia/lame
/c/algorithms/selectsort.c
UTF-8
811
3.984375
4
[]
no_license
#include <stdio.h> #include <limits.h> // since sorting ints, need the biggest possible one to compare for smallest // for every element in the list // loop through to find the smallest in the unsorted portion // and then switch it with the first in the unsorted portion void selectsort(int* lst, int lst_n) { int...
true
f8d333ebed323e30013a9a0a04d95e463cf57452
C
GeovaneMachado/estrutura_dados
/lista1_uri/salario.c
UTF-8
285
2.765625
3
[]
no_license
#include<stdio.h> int main() { double venda_mes, salario, bonus; char nome[10]; scanf("%s", &nome); scanf("%lf", &salario); scanf("%lf", &venda_mes); bonus = venda_mes * 0.15; salario = salario + bonus; printf("TOTAL = %.2lf", salario); return 0; }
true