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
83ffc2b09252e2f4d4987a2d38170932c65e7a81
C
isabella232/zscilib
/src/matrices.c
UTF-8
44,192
2.765625
3
[ "Apache-2.0" ]
permissive
/* * Copyright (c) 2019 Kevin Townsend (KTOWN) * * SPDX-License-Identifier: Apache-2.0 */ #include <errno.h> #include <stdio.h> #include <stdbool.h> #include <string.h> #include <zsl/zsl.h> #include <zsl/matrices.h> /* * WARNING: Work in progress! * * The code in this module is very 'naive' in the sense that n...
true
1250f4874c814db9043897b12632e186d7741b98
C
wangfuli217/ld_note
/cheatsheet/ops_doc-master/Service/cfaq/C修真之旅/simplec/simplec/module/schead/scurl.c
UTF-8
2,071
3.109375
3
[]
no_license
#include <scurl.h> #include <struct.h> // // url_encode - url 编码, 需要自己free // s : url串 // len : url串长度 // nlen : 返回编码后串长度 // return : 返回编码后串的首地址 // char * url_encode(const char * s, int len, int * nlen) { register uint8_t c; uint8_t * to, * st; const uint8_t * from, * end; DEBUG_CODE({ if (!s || !*s || len...
true
20a6e24b3c4d851f18367c99256ee5f3d212e56b
C
devnull-cz/c-prog-lang
/src/strsepc.c
UTF-8
944
3.828125
4
[]
no_license
/* * Implement strsep() but only use a single delimiter. * * char *strsepc(char **stringp, int c); */ #include <stdio.h> #include <assert.h> char * strsepc(char **stringp, int c) { char *orig = *stringp; char *s = *stringp; if (s == NULL) return (NULL); while (*s != '\0' && *s != c) { #if 0 printf("%c\n"...
true
e0fefa56a2a3bda2b0a42ebbf5cc671c170c9e6f
C
GayathriPrabha/REVERSE
/rev.c
UTF-8
170
3.015625
3
[]
no_license
#include<stdio.h> #include<string.h> int main() { char a[10],b[10]; printf("Enter the string"); scanf("%s",&a[10]); b[10]=strrev(a); printf("The reverse is %s",b[10]); }
true
3d630c48ef937151d74d6872e101a6d90ae3689f
C
AdamRLukaitis/fleet
/libc/src/stdlib/div.c
UTF-8
420
2.578125
3
[]
no_license
// Copyright (C) 2015 Mars Saxman. All rights reserved. // Permission is granted to use at your own risk and distribute this software // in source and binary forms provided all source code distributions retain // this paragraph and the above copyright notice. THIS SOFTWARE IS PROVIDED "AS // IS" WITH NO EXPRESS OR IMPL...
true
74f5f786fd49f24ddc821555bc9988f1e0f97527
C
nigelzor/advent-of-code
/2018/day5.c
UTF-8
865
3.28125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> int react(char skip) { struct stat sb; int fd = open("day5.txt", O_RDONLY); fstat(fd, &sb); char *buf = mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, fd, 0); int pos = -...
true
f59a2942d29615e5b54eea96f0f5cca45f4e7024
C
iamsubhranil/Alang
/main.c
UTF-8
1,338
2.796875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include "scanner.h" #include "parser.h" #include "display.h" #include "stmt.h" #include "allocator.h" #include "interpreter.h" #include "preprocessor.h" static void p(const char* name, size_t size){ printf("\n%s : %lu bytes", name, size); } static void printSize(){ p("...
true
2ecfa38f18ba368ddb8ca16fce927e0db1a708ab
C
ryanYtan/code_collections
/c_kr_book/ex1/ex1-06/eof.c
UTF-8
180
3.46875
3
[]
no_license
/** * Exercise 1-6 * * Verify that the expression * getchar() != EOF * is 0 to 1. */ #include <stdio.h> int main() { int c; printf("%d\n", getchar() != EOF); }
true
b0ef14e3e0ae6ad210830cec53c0c6b7488c3658
C
leelianglong/leetcode
/题目解答/interview_17.c
UTF-8
1,404
3.15625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> int* shortestSeq(int* big, int bigSize, int* small, int smallSize, int* returnSize){ if (big == NULL || small == NULL) { *returnSize = 0; return NULL; } int* res = (int*)malloc(sizeof(int) * 2); memset(res, 0, sizeof(int) * 2);...
true
fb83ca977d9c154411eb9203cac6e54280ecd7c7
C
mfodel1/Cipher-Challenges
/Final-Solutions/Ch-3/JPEGS.c
UTF-8
2,482
2.59375
3
[]
no_license
// challenge 3 #include "KDB-Files.c" #include "md5.c" int main(int argc, const char *argv[]){ unsigned char jpgBuf[4], temp[2], magicStart[4]; unsigned char standard[4] = {0xFF, 0xD8, 0xFF, 0xe0}; unsigned char jpegEnd[2] = {0xFF, 0xD9}; long offset, inputSize; int fileSize = 0, endCheck = 0; ...
true
b73113b6f74d3dff9cc49813d4afc185cf138391
C
wmanley/pulsevideo
/gst/fault.h
UTF-8
2,896
2.859375
3
[]
no_license
/* * Copyright (C) 2021 William Manley <will@stb-tester.com> * * Fault injection system * ====================== * * This allows us to inject faults into pulsevideo to deterministically create * failures at various points in the system. It's controlled by environment * variables. So if I set: * * fdpay_...
true
693d866fe1879d8a7ccfcb6e058a69299a42ba25
C
cherisegege/Notebook
/Linux Notebook/Basic Knowledge/apue/signal/kill.c
UTF-8
581
2.90625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <signal.h> static void sighandler(int s) { kill(0, SIGQUIT); } static void sighandler2(int s) { printf("bye-bye\n"); exit(1); } int main(void) { pid_t pid; int i; signal(SIGALRM, sighandler); signal(SIGQUIT, sighandler2); for (i = 0...
true
74d4e71870331a1d2eacabf89989becd05f4260b
C
pimkanoksapm/myproject
/function1.c
UTF-8
2,509
2.96875
3
[]
no_license
#include <stdio.h> void function1() { printf("Hello from function1\n"); } int function2(int id,float score) { if(score > 50) { printf("ID = %d -> Pass\n",id); } printf("Hello from function2\n"); return(score); } char function3(char name[], int score, char sex) { char grade; if(score > 79) ...
true
a9126c7b1adbd55ad046a04b8e0fe6ab1133283a
C
nashmathur/CSN361_Assignment_2
/client.c
UTF-8
1,184
3.109375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <arpa/inet.h> #define PORT 6969 int main(int argc, char const *argv[]) { int sock = 0, readvalue; struct sockaddr_in serv_addr; char *msg = "Leave one Client alive and the Server are never safe. (Message from ...
true
598d44732881e64b4d83e52db9377b95b3a4d116
C
eugene-eeo/ichi
/utils.c
UTF-8
698
2.703125
3
[ "CC0-1.0" ]
permissive
#include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <sys/random.h> #include <errno.h> #include "monocypher/monocypher.h" void _free(void* buf, int bufsize) { if (buf != NULL) { crypto_wipe(buf, bufsize); free(buf); } } int _fclose(FILE **fp) { int rv = fclose(*fp); *fp ...
true
c6bd7cf4984fcb72c567eeca0dd9eaeb7c5bd5c6
C
Hixie/dart-home-automation-tools
/utilities/leak-sensor-monitor.c
UTF-8
2,133
2.875
3
[ "MIT" ]
permissive
// gcc -o leak-sensor-monitor leak-sensor-monitor.c -l bcm2835 // sudo chown root ./leak-sensor-monitor; sudo chmod +s ./leak-sensor-monitor // ./leak-sensor-monitor // to install bcm2835 see http://www.airspayce.com/mikem/bcm2835/ // you have to download the tarball and compile it locally // Inspired by a sample by ...
true
775a5fd84b1096b8c941397e0a9b6ce8a728c9ef
C
ptwd/cygwin
/save.c
UTF-8
16,810
3
3
[]
no_license
void *real2(void *sth) { pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); int sit, a, b; while (!stop) // rand()함수는 실제로 랜덤하지 않으므로 시간있으면 다른함수로 { sit = rand() % 4; //case가 0이면 -- 1이면 -+ 2면 +- 3이면 ++ a = rand() % 10 + 1; ...
true
2f06516aad4e6ab9a94d10d16234d94f6fa51ae0
C
ericyao2013/TLV-libtlv
/libtlv.c
UTF-8
27,996
2.65625
3
[ "MIT" ]
permissive
#include <stdlib.h> #include <stdint.h> #include <string.h> #include <errno.h> #include "libtlv.h" /** * 4BVARL uses simple 7-bit VARQ encoding of 28-bit data * where bit7 means more data following (28-bit = 4-byte) * to avoid 0xff as padding, 0x80 byte can be prepended * * DIG | HEX | SHORTEST | ...
true
752a57f59996f92312f70b887edc08148dff1a20
C
rwe0214/Machine-Learning
/Naive Bayes classifier/mnist.c
UTF-8
6,115
2.765625
3
[]
no_license
#include "mnist.h" #include <errno.h> #include <fcntl.h> #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int mnist_train_label_info[LEN_LABEL_INFO]; int mnist_train_image_info[LEN_IMAGE_INFO]; int mnist_test_label_info[LEN_LABEL_INFO]; int mnist_test_image_info[LEN_IMA...
true
b705e99c8b873ee681fa48d3c334f5df3c614764
C
Shigeppon/roswell
/c/tcp/server.c
UTF-8
1,227
3.34375
3
[]
no_license
#include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> int main(){ int sock0; struct sockaddr_in addr; struct sockaddr_in client; socklen_t len; int sock1,sock2; /* ソケットの作成 */ sock0 = socket(AF_INET, SOCK_STREAM, 0); /* ソケットの設定 */ addr.sin_fami...
true
4d140b2a90a90e29f03a590b1dbe15c930e34e43
C
pubkraal/Advent
/2020/day03/c/day3.c
UTF-8
1,232
3.390625
3
[ "MIT" ]
permissive
#include <stdio.h> #include <string.h> #define BUFHEIGHT 350 #define BUFWIDTH 50 #define ARRLENGTH(x) (sizeof(x)/sizeof((x)[0])) int num_trees(char chart[][BUFWIDTH], int h, int w, int vector[2]) { int x = 0; int y = 0; int trees = 0; for (int y = 0; y < h; y+=vector[1]) { char pos = chart[y...
true
2849e47def0d45a9e9219c56eb998dc82b5b9672
C
EdmundSirius/Cmm-Compiler-1
/Code/genasm.c
UTF-8
27,188
2.671875
3
[]
no_license
#include"common.h" #include"genasm.h" void common_output(FILE* des) { fprintf(des , ".data\n"); vt_process(des); fprintf(des , "_prompt: .asciiz \"Enter an integer:\"\n"); fprintf(des , "_ret: .asciiz \"\\n\"\n"); fprintf(des , ".globl main\n"); fprintf(des , ".text\n"); fprintf(des , "read:\n"); fprintf(des ,...
true
15ebd3336ccc4764b853711f5c940815ecd5bc40
C
metacore/spin
/spin/kernel/spincore/src/machine/ALPHA_SPIN/Log.c
UTF-8
1,390
2.65625
3
[]
no_license
/* * Copyright 1994, 1995 University of Washington * All rights reserved. * See COPYRIGHT file for a full description * * HISTORY * 26-Mar-96 Przemek Pardyak (pardy) at the University of Washington * Added unlock_unlocked. * * 10-Dec-94 Emin Gun Sirer (egs) at the University of Washington * Created. Log fun...
true
f6fa7cc8ca65e18de0b5f1756e23b0d13dc5742b
C
cindy9325/histry-code
/c files/10848.c
UTF-8
818
3.1875
3
[]
no_license
#include <stdio.h> #include "function.h" void flooding(int R, int C, int pr, int pc){ //initial if(pr == 0) Map[pr][pc] = 'W'; //left if(pc != 0){ if(Map[pr][pc - 1] == 'H'){ Map[pr][pc - 1] = 'W'; flooding(R, C, pr, pc - 1); } } //rig...
true
d925d8a3736749642b67d298c28eb5a2200d8508
C
luluferraco/INF1608_AnaliseNumerica
/LAB4/main.c
UTF-8
1,299
3.71875
4
[]
no_license
#include <stdio.h> #include <math.h> #include "sistlinear.h" Matriz criaA(); Matriz criaB(); void teste(); int main(int argc, const char * argv[]) { double b1[3] = {3, 3, -6}, b2[6] = {2.5, 1.5, 1, 1, 1.5, 2.5}; Matriz A, B; printf("Teste Matriz A:\n"); A = criaA(); teste(3, A, b1); printf("Teste Matriz B:\...
true
49ce8e6f0f735b8b0492f956cab9324c3979f59b
C
daisanwang/orion
/Singleton.h
UTF-8
728
2.75
3
[]
no_license
#ifndef ORION_SINGLETON_H #define ORION_SINGLETON_H // singleton #define SINGLETON(className)\ private:\ className() {}\ ~className() {}\ public:\ static className& Instance() {\ static className instance;\ return instance;\ }\ className(className&&) = delete; \ className(className const&) = delete; \ clas...
true
5efc0a3a90ba9d40ea33a2b7487d4549e5bd2ac9
C
elieLeE/projectEuler
/p96/shared/grille.c
UTF-8
3,443
3.171875
3
[]
no_license
#include "grille.h" void visuGrille(char grille[NBRE_LIGNE][NBRE_COL]){ char i = 0, j =0, k = 0, l = 0; for(i=0; i<NBRE_LIGNE; i = i+3){ for(j=0; j<NBRE_LIGNE/3; j++){ for(k=0; k<NBRE_COL/3; k++){ for(l=0; l<NBRE_COL/3; l++){ printf("%d ", grille[i+j][k*3+l]); } printf(" "); } prin...
true
ad22b9db36daa7fd15da3414816b4e25fc673e71
C
7956968/HI3559v200
/middleware/sample/fstool/mkfs/hi_mkfs_vfat.c
UTF-8
1,570
2.5625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "hi_fstool.h" void ShowHelp() { #ifdef __HuaweiLite__ printf("mkfs usage:sample clusterSize(KB) mode partition\n" "\n" "description\n" "clusterSize(KB) : 64 \n" "mode : -a(advanced) or -d(di...
true
49675bee82642ece8e46fef6754578242e2e7a7d
C
kyroskoh/leafstorm
/test/samplein.c
UTF-8
561
3.140625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int test(char **, char*); int main(int argc, char **argv) { if (argc == 2) { printf("%s\n", ++*argv); } int i; for (i=0; i < 10; i++) { printf("%d:%d\t", i, i % 2); } printf("\n"); /* int j; for (j=0; j < 50; j++) { p...
true
9778fc242c6ad47a05288c5deb691f4c2d6f0724
C
VadymBerezdetskyi/algorithms
/src/Sorting/countingSort.h
UTF-8
654
3.40625
3
[]
no_license
#ifndef ALGORITHMS_COUNTINGSORT_H #define ALGORITHMS_COUNTINGSORT_H void countingSort (int *a, int n) { int max = a[n - 1], min = a[0]; for (int i = 0; i < n; i++) { if (a[i] > max) max = a[i]; if (a[i] < min) min = a[i]; } int *c = new int[max + 1 - min]; for (int i = 0; i < max...
true
ac71b140f80b3db76158ceac07f721b5e9ac9e92
C
ulinka/tbcnn-attention
/github_code/selection-sort/cpp/39.c
UTF-8
513
3
3
[]
no_license
#include <exception> using namespace std; #include "SelectionSort.h" SelectionSort::SelectionSort() { } SelectionSort::~SelectionSort() { } void SelectionSort::SortData(int *data, size_t count) { for (int i = 0 ; i<count; i++) { int min = i; for (int j=i+1; j< count; j++...
true
8253d996190123a1974ef32c5cff7755f7271ba9
C
mgsanusi/blame-dodger
/modified_vars/alsoba_Standing_Ovation.c
UTF-8
844
3.09375
3
[]
no_license
#include <stdio.h> #include <stdlib.h> FILE *Fin; FILE *Fout; int smax; void clear() { char jj; int i; int full = 0; int sol = 0; fscanf(Fin, "%d", &smax); fscanf(Fin, "%c", &jj); for (i = 0; i < (smax + 1); i++) { fscanf(Fin, "%c", &jj); if (full < i) { sol = (sol + i) - full; f...
true
eb4febb5291ae2295e5eeba00b644f2a36d15e32
C
Viditjn/Ds-Codes
/assg5/avl2.c
UTF-8
6,105
3.421875
3
[]
no_license
#include<stdio.h> #include<stdlib.h> typedef struct node { int data; int height; int lc; int rc; struct node* left; struct node* right; }node; int height(struct node *N) { if (N == NULL) return 0; return N->height; } int max(node* a,node* b) { if(a!=NULL && b!=NULL) return (a->height)>(b->he...
true
a65fd1f8caeed7a5a51086345ea5ec914f48d91e
C
fzf/qmk_toolbox
/tmk_core/common/avr/sleep_led.c
UTF-8
3,220
2.6875
3
[ "GPL-2.0-only", "LicenseRef-scancode-other-copyleft", "BSD-3-Clause", "GPL-3.0-or-later", "LGPL-2.0-or-later", "LGPL-2.1-or-later", "LicenseRef-scancode-warranty-disclaimer", "GPL-1.0-or-later", "GPL-3.0-only", "GPL-2.0-or-later" ]
permissive
#include <stdint.h> #include <avr/io.h> #include <avr/interrupt.h> #include <avr/pgmspace.h> #include "led.h" #include "sleep_led.h" #ifndef SLEEP_LED_TIMER # define SLEEP_LED_TIMER 1 #endif #if SLEEP_LED_TIMER == 1 # define TCCRxB TCCR1B # define TIMERx_COMPA_vect TIMER1_COMPA_vect # if defined(__AVR_ATm...
true
7897eabfa569a8700f1b90e8c09dc4ca10416f2a
C
shefali12-ab/C-programs
/Assignment 4/ques3assign11.c
UTF-8
327
3.34375
3
[]
no_license
main() { int a[10],sum1=0,sum2=0,i; printf("enter ten numbers"); for(i=0;i<=9;i++) { scanf("%d",&a[i]); if(a[i]%2==0) { sum1=sum1+a[i]; } else { sum2=sum2+a[i]; } } printf("sum of even number is %d and sum of odd number is %d",sum1,sum2); getc...
true
43a2a37741423b30c2e0cdcca95da86173bf3d60
C
toddsharpe/MetalOS
/src/lib/core_crt/wchar.c
UTF-8
11,156
3.046875
3
[]
no_license
#include <stdint.h> #include <stdarg.h> #include <string.h> #include <wchar.h> int wcscmp(const wchar_t* str1, const wchar_t* str2) { while ((*str1) && (*str1 == *str2)) { str1++; str2++; } return *(uint16_t*)str1 - *(uint16_t*)str2; } size_t wcslen(const wchar_t* str) { size_t length = 0; while (*str != L'...
true
f88d894020e89359aa23bb9a0d9eb9b061684205
C
bramp/threadnetperf
/client.c
UTF-8
3,053
2.875
3
[]
no_license
#include "client.h" #include "global.h" #include <assert.h> #include <stdlib.h> #include <stdio.h> // Array of all the client requests struct client_request *creq = NULL; size_t creq_size = 0; int prepare_clients(const struct settings * settings, void *data) { unsigned int clientthreads = 0; unsigned int i; ass...
true
db32260dc18d2a09ace87a023fcf062b6604d157
C
karimstm/ft_ls
/ft_printf/src/ft_printf.c
UTF-8
2,561
2.796875
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_printf.c :+: :+: :+: ...
true
bac034d3102e8590728438bbb590b8a62c3ccd88
C
Pchenrique/URI-Problems
/Iniciante/linguagem C/Intervalo 2/problema1072.c
UTF-8
295
3.25
3
[ "MIT" ]
permissive
#include <stdio.h> int main(){ int n,i,valor,cont=0,fora=0; scanf("%d", &n); for(i=1;i<=n;i++){ scanf("%d", &valor); if((valor >= 10)&&(valor <= 20)){ cont++; }else{ fora++; } } printf("%d in\n", cont); printf("%d out\n", fora); return 0; }
true
ed23fc97d3692468751bf96618b2ba1050a2f8af
C
ZhongRuoyu/ntu-cz1103-c
/lab-test/character_strings/q11.c
UTF-8
932
3.796875
4
[ "MIT" ]
permissive
#include <stdio.h> #include <string.h> #define INIT_VALUE 999 int findSubstring(char *str, char *substr); int main() { char str[40], substr[40], *p; int result = INIT_VALUE; printf("Enter the string: \n"); fgets(str, 80, stdin); if (p = strchr(str, '\n')) *p = '\0'; printf("Enter the substring: ...
true
f2bb55a909f0a3efc5163621be28f08f102c4e82
C
j8takagi/YACASL2
/test/unit/nh2word/cmd.c
UTF-8
709
2.609375
3
[ "MIT" ]
permissive
#include <stdio.h> #include "assemble.h" #include "cerr.h" #include "word.h" int main(){ int i; WORD r; char *str[] = { "#32768", "#-1", "#G", "#FFFF", "#0", "#1", "#ab", "#AB", "#20" "0", "01", "1a", "-5G", "123", "32767", "32768", "32769", "-1", "-2345", "-32768", "-32769", "-3277...
true
36db3de78e5872dcee1ec189d937d435f7f49082
C
SibiSM/C-Programs
/Strings/mem.c
UTF-8
192
2.640625
3
[]
no_license
#include<stdio.h> #include<string.h> void main() { char a[20]="hello",b[20]="world",des[20]; memcpy(des,a,5); memcpy(a,b,5); memcpy(b,des,5); printf("%s %s %s",des,a,b); }
true
a8444b6601169a496d2bd1539270ecf253470966
C
wehard/codewars
/7kyu_simple_fun/reverse_letter.c
UTF-8
671
3.0625
3
[]
no_license
int count_alpha(const char *str) { int c; int i; c = 0; i = 0; while (str[i] != '\0') { if ((str[i] >= 65 && str[i] <= 90) || (str[i] >= 97 && str[i] <= 122)) { c++; } i++; } return (c); } char *reverse_letter(const char *str) { char *rev; int i; int j; int...
true
6866a358f3275b509aefa1eff5b1c8b70e93f467
C
godofchina/CPraticeCode
/process/exit_handle.c
UTF-8
860
3.03125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <unistd.h> static void my_exit0(int, void *); static void my_exit1(void); static void my_exit2(void); char str[9] = "for test"; int main(void) { if (atexit(my_exit2) != 0) { perror("can't register my_exit2"); exit(-1); } if (atexit(my_e...
true
2d4810b44486dc6b8f19f266f2f1b9521054d341
C
bluekds/C_Programming_Lv2
/Lec6/IDBook/IDBook.c
UTF-8
571
3.09375
3
[ "MIT" ]
permissive
#include <stdio.h> #include <string.h> #define NUM_STUDENT 4 #define NAME 0 #define ID 1 int main(int argc, char* argv[]) { char IdBook[NUM_STUDENT][2][10] = { {"KDS", "20201234"}, {"KYW", "20192535"}, {"LJH", "20187854"}, {"HPC", "20180301"} }; char buf[255] = { 0 }; printf("Enter the student name: "); ...
true
f5dc1281380955a6104cce9dc336e6dfc6e6798c
C
tectronics/stuyfissionfusiondevelopment
/310/2011_2012/SeasonCode/test.c
UTF-8
5,174
2.5625
3
[]
no_license
#pragma config(Hubs, S1, HTMotor, HTMotor, HTMotor, HTMotor) #pragma config(Sensor, S1, , sensorI2CMuxController) #pragma config(Motor, motorA, , tmotorNormal, openLoop) #pragma config(Motor, motorB, , tmotorNormal, openLoop) #pragma config(Motor, ...
true
f6f025d3d11740c5e19d477ce00fc8aa37c7aa1c
C
OlyCow/FTC_2013-2014
/RobotC/Drivers/gyro.h
UTF-8
3,974
2.625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
// This header provides an API for the HiTechnic gyro sensor. // Version 0.4, made by Xander Soldaat. #ifndef __HTGYRO_H__ #define __HTGYRO_H__ #pragma systemFile #ifndef __COMMON_H__ #include "common.h" #endif // __COMMON_H__ float HTGYROreadRot(tSensors link); float HTGYROstartCal(tSensors link); float HTGYROreadC...
true
64775b78c502dcef82f9e4bf3323eec984f63744
C
SunnyAH/Basics_of_HPC
/MPI/Preeti/lec1/3.parsum.c
UTF-8
1,062
3
3
[ "Apache-2.0" ]
permissive
// Parallel sum of array #include <stdio.h> #include <stdlib.h> #include <time.h> #include "mpi.h" #define N 900000000 int main(int argc, char *argv[]) { int numtasks, rank, len, rc, i, sidx; double etime, stime, a[N], value, localsum; char hostname[MPI_MAX_PROCESSOR_NAME]; // initialize MPI MPI_Init (&a...
true
ac12ecd08c3428c0299d9709ffafde63dc261870
C
GabeOchieng/ggnn.tensorflow
/program_data/PKU_raw/57/1303.c
UTF-8
473
2.65625
3
[]
no_license
int main() { int n,i,j; char a[50][33]; cin >> n; cin.ignore (); for(i=0 ; i< n ; i++) cin >> a[i]; for(i=0 ; i< n ; i++) { j = strlen(a[i]); if(a[i][j-2] == 'e') { if(a[i][j-1] == 'r') a[i][j-2] = '\0'; } if(a[i][j-2] == 'l') { if(a[i][j-1] == 'y') a[i][j-2] = '\0'...
true
af2e72886fa6399044d09bb295660d409187d578
C
uN4sh/IN-L1G
/IN100/TD6/exo40.c
UTF-8
952
3.140625
3
[]
no_license
#include "uvsqgraphics.h" int main() { init_graphics(600,400); // Debut du code POINT bg, hd; int min, max, imin, imax; int T[20]; int i; imin = 0; imax = 0; min = 100; max = 0; bg.y = 50; for (i=0 ; i<20 ; i=i+1) { T[i] = alea_int(100); bg.x = 100 + (20*i); hd.x = 100 + 20*i + 19; hd.y = 5...
true
111cee1bf9d085154891a279e06ba52bf56d1bd2
C
gaurav594/programs
/div.c
UTF-8
193
2.71875
3
[]
no_license
#include<stdio.h> int main() { int t,n,sum,k,p; scanf("%d",&t); while(t--) { sum=0; scanf("%d",&n); p=n; while(p>0) { k=p%10; if(n%k==0) { sum=sum+1; } p=p/10; } printf("%d",sum); } return 0; }
true
b4e80ef20c77af41602d542f471d7ea01892cd93
C
ndw25/SDAkron_RocketTelemetry
/LCDDisplay.c
UTF-8
3,125
2.75
3
[]
no_license
/* * File: LCDDisplay.c * Author: dd69 * * Created on February 7, 2019, 5:10 PM */ #include <xc.h> #include "LCDDisplay.h" #include "spiConfiguration.h" void InitPMP(void) { // PMP initialization. See my notes in Sec 13 PMP of Fam. Ref. Manual PMCON = 0x8303; // Following Fig. 13-34. Text sa...
true
8c8a172de8eccb801c1a3971dc26e43c78833f88
C
bryanbuiles/simple_shell
/functions.c
UTF-8
2,177
3.734375
4
[]
no_license
#include "shell.h" /* holaaa */ /** * _strlen - calculates the length of the string pointed to * @str: First string to be compare *Return: the number of characters of the string pointed to */ int _strlen(const char *str) { int len; for (len = 0; str[len]; len++) { } return (len); } /** * _strcat - concatenat...
true
092b25425c5ef42310919a837134141797ec07d3
C
alexandraolivotto/IOCLA
/lab-01-tasks/4-hex/hex.c
UTF-8
144
2.5625
3
[]
no_license
#include<stdio.h> int main() { char string[] = {"\x48\x45\x58\x20\x52\x6f\x63\x6b\x73\x21\x0a"}; printf("%s", string); return 0; }
true
2d4311e92542b2e8a98c7a6aa50204fb7f86daf6
C
liqiangYang/tluac
/src/tluac-thread/tluac-thread.c
UTF-8
2,429
2.59375
3
[]
no_license
#include "tluac-thread.h" #include "../tluac-epoll/tluac-epoll.h" #include "../util/produce-consume.h" int listenFd; void thread_new() { memset(&buffer, 0, sizeof(buffer) ); thread_create(); thread_wait(); } struct context ctxs[THREADS + 1]; void thread_create(void) { int temp; memset(&thread, ...
true
f92f018db66405f61870b3c51292416e137682f4
C
MaximilianoLenzuen/EntregaDeParcial
/ParcialLaboratorio1/ParcialLaboratorio1/adds.c
UTF-8
786
2.75
3
[]
no_license
#include "adds.h" void validarOperacion(char mensaje [],char mensajeError[], int devolucion){ if(devolucion == 1){ printf("%s",mensaje); }else{ printf("%s",mensajeError); } } int getInt(char mensaje[],char mensajeError[],int piso, int techo){ int entero; ...
true
6059d213e3a80452019ab391e1c49a10466bec4b
C
Obnoxious713/sastantua
/test2.c
UTF-8
1,268
3.171875
3
[]
no_license
void ft_putchar(char c) { write(1, &c, 1); } void ft_putstr(char *str) { while (*str != '\0') { ft_putchar(str); str++; } } void sastantua(int size) { int i; int space; int rows; int k; i = 1; space = 1; rows = 0; k = 0; while (i <= rows) { while (space ...
true
31bc73c2401caa7225a5da9b271731bd644f5631
C
flecktarn121/OS_SImulator
/V0/Buses.c
UTF-8
1,351
3.171875
3
[]
no_license
#include "Buses.h" #include "Processor.h" #include "MainMemory.h" #include <string.h> #include <stdlib.h> // Function that simulates the delivery of an address by means of the address bus // from a hardware component register to another hardware component register int Buses_write_AddressBus_From_To(int fromRegister,...
true
5304d92e60cef7f070d95d9876c919cb5161d01b
C
kingJHome/simpleSort
/simpleSort.h
UTF-8
1,165
2.59375
3
[ "MIT" ]
permissive
#ifndef _MY_SIMPLE_SORT #define _MY_SIMPLE_SORT #include <stdlib.h> #include <string.h> #define LT(a,b) ((a) < (b)) #define LQ(a,b) ((a) <= (b)) #define GT(a,b) ((a) > (b)) #define GQ(a,b) ((a) >= (b)) typedef void (*visitSqList)(int a); typedef void (*setArrayData)(void *target,char *data,int pos); typedef struct{...
true
10caf74fcd8ba01be713ca554d1c906822f87106
C
maphew/infolib
/misc/getuser.c
UTF-8
883
2.765625
3
[ "LicenseRef-scancode-public-domain" ]
permissive
/* getuser.c A function in misclib. ------------------------------------------------------------------------ char *getuser(str) char *str; Returns the user's login name in str. The value is determined simply by looking up the current value of the environmental variable USER. Re...
true
8f370a260e67168e58332b12a3cbef823f5a6752
C
Agamand/grep
/grep.h
UTF-8
1,191
2.6875
3
[]
no_license
#ifndef GREP_H #define GREP_H #include <stdio.h> #include <stdlib.h> #include <string.h> #include "linkedList.h" /* -- Arguments (structure) Structure of arguments : options, pattern and files Cf. getArgs() */ typedef struct Arguments { Maillon* options; char* pattern; Maillon* files; } Argum...
true
9772a10140cd633e8e68e9f53ed1d56d353b1c0b
C
lightb0x/simulate_int8_bnn
/bitcount.c
UTF-8
1,967
2.71875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "arm_neon.h" #define NUM_RANDOM 524288 // pow(2, 19) // NUM_RANDOM * 32 MACs #define NUM_REPEAT 256 // XNOR -> bitcount using ARMv7-A NEON intrinsics int main() { int * weight = (int *)malloc(sizeof(int) * NUM_RANDOM); int * inputs = (int *...
true
a3cfab72d26893a4eebba9e3e8b43d05807b253f
C
suyangzhu/Practice
/2404.c
UTF-8
5,467
4.25
4
[]
no_license
#include <stdio.h> #include <stdlib.h> typedef struct Node { int val; struct Node* left; struct Node* right; } Node_t; void insert(int key, Node_t** root) { if ((*root) == NULL) { (*root) = (Node_t*) malloc (sizeof(Node_t)); (*root)->val = key; (*root)->left = NULL; (*root)->right = NULL; } else { if (...
true
38e816269533c867ee20ecc1f106b080804bd609
C
RU09342-F18/lab-1-gpio-gaffneyd3
/Simple Blink/SimpleBlinkFR2311.c
UTF-8
335
2.609375
3
[]
no_license
#include <msp430.h> /** * main.c */ int main(void) { WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer PM5CTL0 &= ~LOCKLPM5; //unlocks the gpio pins P1DIR |= BIT0; //sets direction while(1){ P1OUT ^= BIT0; //toggles led __delay_cycles(1000000); //delays so we can see the led blink } r...
true
3f14148f86f8af59fc752c5e2c80351ed6e1cf0b
C
Manaragabriel/Exercicio-C
/exercicio14/main.c
UTF-8
346
3.40625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main() { int i; int tamanho; char nome[50]; printf("Digite o nome\n"); scanf("%s",&nome); for(i=1; i<=50;i++){ if(*(nome+i)== NULL){ tamanho= i; break; } } for(i=0;i<tamanho;i++){ printf("\n%s",nom...
true
b76cd499da4459aa08185ce2d9a73abc394ac96b
C
vyhuholl/42_fillit
/input_output.c
UTF-8
2,526
2.96875
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* output.c :+: :+: :+: ...
true
7be4557b049564d6b7065b2a5a67de533649abad
C
zabcdefghijklmnopqrstuvwxy/sai
/c/LeeCode/topic2/main.c
UTF-8
2,632
3.359375
3
[]
no_license
#include<stdio.h> struct ListNode { int val; struct ListNode *next; }; struct ListNode* addTwoNumbers(struct ListNode* l1, struct ListNode* l2) { int nSum = 0,nL1 = 0,nL2 = 0; int nNodeCnt = 0; struct ListNode *result = NULL; struct _STACK { int val; struct _STACK *...
true
b95758d9ed927101a4f13daa0c8b31a9fa109971
C
neklaf/unizar
/eupla/ssoo2/ssoo/est.c
UTF-8
6,451
3.21875
3
[]
no_license
/*Hay q hacerlo con valores conocidos para comprobarlo!!*/ /*Contemplar la posibilidad de q la muestra sea vacia * de q la muestra unicamente tenga un valor.... * Y demas situaciones q puedan ser problematicas*/ #include <stdio.h> #include <math.h> #include <unistd.h> #include <stdlib.h> /*0 es fals...
true
06aa335926f2bfe27c44c851f24a3a36d8d06f13
C
RohitKumarSinha/C
/data struture in c by reema thareja/exercise 3/exercise3_5.c
UTF-8
753
4.09375
4
[]
no_license
// write a program to compute the sum and mean of the elements of a two-dimensional array #include <stdio.h> int main() { int num[5][5], sum[5] = {0, 0, 0, 0, 0}; float mean[5] = {0.0, 0.0, 0.0, 0.0, 0.0}; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { printf("num[%d][...
true
84dbf61835d0cb579625042fbb0385a3510a571d
C
eduu98/ft_printf
/Libft/ft_lstmap.c
UTF-8
1,676
3.140625
3
[]
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstmap.c :+: :+: :+: ...
true
dd413465b86aff848ce8624345fe19146aef64c8
C
softwaregremlin/Jetman3D
/alienDeformations.c
UTF-8
4,073
2.546875
3
[]
no_license
#define ALIEN_DEFORMATION_MAX_VERTICES 16 enum { AlienDeformDirectionForward, AlienDeformDirectionBackwards}; typedef struct { unsigned int Frame, Frames, Direction; float OriginalPosition[3], DeformedPosition[3]; } structAlienDeformationPoint; typedef struct { unsigned int VerticeIndexes[ALIEN_DEFOR...
true
e0cf90701bab0cd2aa2000c3553e5b20d4d595ac
C
WJTung/CN
/2/sender.c
UTF-8
5,809
2.609375
3
[]
no_license
#include <stdio.h> #include <string.h> #include <unistd.h> #include <netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <time.h> #include <sys/time.h> #include <stdlib.h> #include <sys/select.h> #include "protocol.h" #define TIMEOUT_INTERVAL 1E5 #define EMPTY 0 #define WAITI...
true
552f2d553b01b30caea195f05d821969b222984c
C
bscsf1533/suleman001
/sys.c
UTF-8
352
2.859375
3
[]
no_license
#include<stdio.h> #include<unistd.h> #include<sys/types.h> #include<stdlib.h> void main() { printf("pid : %d!\n" , getpid()) ; printf("uid : %d!\n" , getuid()) ; printf("groupid : %d\n" , getgid()) ; printf("groupid : %d\n" , gettid()) ; printf("groupid : %d\n" , getppid()) ; printf("environment variable(U...
true
4c3bb2299d0f71e5e86591818659666d4ed4dc89
C
Abdulmoomeeny/holbertonschool-low_level_programming-1
/0x05-pointers_arrays_strings/8-print_array.c
UTF-8
339
3.84375
4
[]
no_license
#include <stdio.h> #include "holberton.h" /** * print_array - print a elements of an array. * @a: the array in a parameter * @n: Is the length of the array * */ void print_array(int *a, int n) { int i; for (i = 0; i < n; i++) { if (i != n - 1) { printf("%d, ", a[i]); } else printf("%d", a[i]); ...
true
39e4b7741f3067e0e46335e28d41a207cf15db22
C
rgm3/bonepeg
/playground/hex2pal.c
UTF-8
1,075
3.171875
3
[]
no_license
// Changes some entries in the palette, starting at index color_index /* e.g. "TERM=xterm-256color ./test_colors 3366FF FF0000 3a4682" */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <ncurses.h> #include <unistd.h> int main(int argc, char* argv[]) { int i; initscr(); start_color(); if (!c...
true
04482fbf06fd30cc7a3e738c3a21b425c367ad4a
C
ValveSoftware/GameNetworkingSockets
/src/external/ed25519-donna/fuzz/fuzz-ed25519.c
UTF-8
5,412
2.796875
3
[ "LicenseRef-scancode-public-domain", "BSD-3-Clause" ]
permissive
#if defined(_WIN32) #include <windows.h> #include <wincrypt.h> typedef unsigned int uint32_t; #else #include <stdint.h> #endif #include <string.h> #include <stdio.h> #include "ed25519-donna.h" #include "ed25519-ref10.h" static void print_diff(const char *desc, const unsigned char *a, const unsigned char *b, size...
true
8cf59b510b81a626b5d73d0be5ac55cfe46cec2e
C
nailbiter/for
/formasha/programming/1102/1102_enum_structure.masha.c
UTF-8
547
3.390625
3
[]
no_license
#include <stdio.h> #include <ctype.h> int main(){ int index=0; char target; char new; scanf ("%c", &target); if (isdigit(target)) { index=target-48; scanf ("%c",&target); scanf ("%c",&target); } scanf ("%c",&new); //printf ("index %d, target %c\n", index,target); ...
true
d55541122d628d7668c47f4d1914cf367c7cacbb
C
shenxinli/c_demo
/areabyside.c
UTF-8
330
3.421875
3
[]
no_license
/*输入三角形的三边长求三角形的面积 * 参数:double a,b,c * */ #include <stdio.h> #include <math.h> int main() { double a,b,c,s,area; printf("input three wigth:"); scanf("%lf%lf%lf",&a,&b,&c); s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("%f\t%f\t%f,area=%f\n",a,b,c,area); return getchar(); }
true
e4f66c9bd7423ce2e8bc8e8af4ff3e07d84a9fc0
C
jacklia/16.35-Pset-0
/q3.c
UTF-8
1,431
3.71875
4
[]
no_license
// // main.c // q3.c // // Created by Jacqueline Liao on 3/2/19. // Copyright © 2019 Jacqueline Liao. All rights reserved. // #include <stdio.h> #include <string.h> int main(int argc, const char * argv[]) { int phrase_length = 0; for (int i = 1; i < argc; ++i) { phrase_length += strlen(argv[i]); ...
true
07d16a7623ad9f833ba85cc7baca04474c687413
C
Lucian-N/CS50
/pset3/fifteen/test.c
UTF-8
707
2.8125
3
[]
no_license
#include <cs50.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { int d = get_int(); int board[d][d], vmax =(d*d)-1 ; for (int i =0; i<d; i++) { for (int j=0; j<d; j++) { board[i][j] = vmax; vmax--; } } if (d%2 == 0) { ...
true
22bb2148ea09b46f0ff8106c80a7b1057c2dd69d
C
liyenjun/C-_CPP
/Sample codes/ch06/Prog6-14.c
BIG5
392
3.78125
4
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(void) { int i; /* e n pܼ */ double dtotal, dx; int n; /* ϥΪ̿J n */ printf("Jn[`: "); scanf("%d", &n); for (dtotal=0, dx=1, i=1; i <= n; i++, dx *= 2.0) { dtotal += 1.0/dx; /* [` 1/(2^i) */ printf("e %2d `M = %f\n", i,dtotal); } system("pause"); return(0); }
true
7f882e1ce18e4c46243c366a92c8b59beefe9acf
C
alifahfff/SDAA
/stack.c
UTF-8
2,072
3.625
4
[]
no_license
#include "stack.h" void initStack(Stack **p) { (*p) = NULL; } int EmptyStack(Stack* p) { if ( p == NULL) return 1; else return 0; } Elm top(Stack* p) { if (!EmptyStack(p)) return p->info; else printf("Eror: Stack Kosong! "); } void push(Stack** p, Elm e) { Stack* q; q = (Stack*)malloc(sizeof(Stack));...
true
cf733ce262351001838727c3032c3425241de2b6
C
Rapteon/modernC-examples
/enums.c
UTF-8
2,558
4.46875
4
[]
no_license
#include<stdio.h> #include<stdlib.h> /* * This is an enum. Also called an enumerable set. * By default, they are assigned values starting with 0, * unless custom values are specified. * If we assign the value 3 to mon, and no other values * for the consecutive constants, the values 4, 5 6 and so on * will be as...
true
c335fdde71e8b02bbf663a8941e85b1d9dd4ccb3
C
bhagavansprasad/students
/paidi/string_book/array_us_strlen.c
UTF-8
432
3.234375
3
[]
no_license
#include <string.h> #include <stdio.h> int my_strlen(char str[]); main() { char str[20]="paidikumar"; int i; i = my_strlen(str); printf("strlen--->=%d\n",i); } int my_strlen(char str[]) { int i=0; while(str[i]!='\0') i++; return i; } /*#include <string.h> #include <stdio.h> main() {...
true
f5b64bcd246c4de313634370645973b4f6d8abe4
C
Plantkisser/UNIX-POSIX-learning
/transferViaSignals/segf.c
UTF-8
82
2.53125
3
[]
no_license
#include <stdio.h> int main() { int * a = NULL; printf("%d", *a); return 0; }
true
f3c6fdce8449aaa93d0094102a6c08b6555661f5
C
sc17zy/library-system
/borrowreturn.c
UTF-8
4,052
3.109375
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> #include<unistd.h>  #include "book.h" #include "account.h" #include "borrowreturn.h" #include "menu.h" void borrow(){ char pa[10],pa1[10]; char us[10],bn[10]; char i; int f=0; FILE *fp; account *p; book *p1,*head; p=loadaccount(); prin...
true
b475c7ff1182eb18e576375a2a4245101ec139e5
C
wpower12/CIS2107
/ControlFlow/rpn.c
UTF-8
833
3.40625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> #define MAXLINE 1000 #define MAXOP 100 #define NUMBER '0' int getop(char[]); void push(double); double pop(void); void main( void ){ int type; double op2; char s[MAXOP]; while( (type = getop(s)) != EOF){ switch(type){ case NUMBER: push( atof(s) ...
true
20d32eec12322caa0d2d3fa3e179e68f71b92f46
C
Cloudxtreme/filesystem
/src/common/communication/mpi_communication.c
UTF-8
2,450
2.734375
3
[]
no_license
/* * mpi_communication.c * * Created on: 2015年7月7日 * Author: ron */ #include <stdio.h> #include <assert.h> #include <mpi.h> #include <stdlib.h> #include "../structure_tool/log.h" #include "mpi_communication.h" static void printf_msg_status(mpi_status_t* status) { assert(status != NULL); char s[512]; int ...
true
5b08b4221b1d1c4a6af8b770fe3f5efe011d3ace
C
AngusLkc/shadowvpn
/src/args.c
UTF-8
6,435
2.546875
3
[]
no_license
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include "shadowvpn.h" #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> static const char *help_message = "usage: shadowvpn -c config_file [-s start/stop/restart] [-v]\n" "\n" " -h, --help show this help ...
true
539d45bcfbcb652c13c7450aa2adb93735104c41
C
TruongLX8993/TCopter2
/droneStm/libs/middleware/communication/uart/New folder/UartReceiver.c
UTF-8
2,409
2.53125
3
[]
no_license
#include "UartReceiver.h" #include "UartFinder.h" #include "string.h" #include "TcTime.h" u8 _readByteViaUart(USART_TypeDef *uart){ u8 res; while(USART_GetFlagStatus(uart, USART_FLAG_RXNE) == 0); res=USART_ReceiveData(uart); USART_ClearFlag(uart, USART_FLAG_RXNE); return res; } int _readBytesViaUart(USART_Typ...
true
30cf5db132955e5d92cef53e1103f8902db67cb7
C
shumin215/misc
/algorithm/generic-hash/hash_1.c
UTF-8
1,894
3.078125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) #define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member));}) #define GOLDEN_RATIO_PRIME_32 0x9E370001UL...
true
e983289786981a2dfefac91b3362600ba9e73adc
C
SamboVisal/C-Program-KIT
/Assignment/8/89.count number of word.c
UTF-8
229
3.28125
3
[]
no_license
#include<stdio.h> main(){ char name[100]; int c=0,i; char *pointer; pointer=name; printf("enter string : "); gets(name); for(i=0;name[i]!='\0';i++){ if(name[i]==' ') c++; } printf("the amount of word is %d",c); }
true
25b4770900e24ba1299dadd9b9b7b5ed80f07250
C
anton-tchekov/avr-stepper
/main.c
UTF-8
203
2.515625
3
[ "MIT" ]
permissive
#include "stepper.h" #include <avr/io.h> int main(void) { uint8_t step, state = STEPPER_INIT; for(;;) { step = next_step(&state, FULL_STEP | FWD); PORTB &= 0xF0; PORTB |= step; } return 0; }
true
ffae791d4a4f51ffd4bddcc4254ba33dc62fda6e
C
elixircist23/Radix-Sort
/radix.c
UTF-8
1,646
3.09375
3
[]
no_license
void int_radix_sort(int *lst, int *dst, int n){ int group = 8; int buckets = 1 << group; int mask = buckets - 1; int cnt[buckets]; int map[buckets]; for(int k = 0; k < 32; k += 8){ memset(cnt, 0, sizeof(cnt)); memset(map, 0, sizeof(map)); for(int i = 0; i < n; i++){ cnt[(lst[i] >> k) & ...
true
6a7f20a4fa20608ea4997c4241b204bc0a05320d
C
af-orozcog/competitiveProgramming
/Competitive/String/DP/1207.c
UTF-8
562
2.890625
3
[]
no_license
#include<stdio.h> #define min(x,y)(x < y? x:y) char a[200],b[200]; int as,bs; int main(){ while(scanf(" %d %s %d %s",&as,a,&bs,b) == 4){ int dp[as+1][bs+1]; for(int i = 0; i <= as;++i) dp[i][0] = i; for(int i = 0; i <= bs;++i) dp[0][i] = i; for(int i = 1;i <= as;++i){ f...
true
419899b66bd862a6366ea152806a14c4d90e3a33
C
LCgaga/LCinSZ
/l_linux/0711/server/child.c
UTF-8
850
2.53125
3
[]
no_license
#include "func.h" void sig_handle(int sig) { printf("sig comes\n"); } void makeprocess(int num,int* pairs) { int i,fd; int ret; for(i=0;i<num;i++) {//父进程 ret=socketpair(AF_LOCAL,SOCK_STREAM,0,pairs+2*i); if(-1==ret) { perror("socketpair"); return ; } } for(i=0;i<num;i++) { if(fork()) {//父进程 ...
true
3f0a6739ee8453092ee949a270b08d297a4cf7a9
C
larboleda/Parcial1_computacion_cientifica_avanzada
/functions.c
UTF-8
13,824
3.078125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <gsl/gsl_sort.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_spline.h> #include "allvars.c" /*routine to read the file with the particle coordinates.*/ int readfile(char *filename, int Nparticles) { int i; FILE *pf = NULL; pf = fopen(filename,"r...
true
45bdc63cc1e186dee61950f865781a1f55ddd1ce
C
myvoltron/AdvancedCLang
/1학년2학기 고급C플밍/과제2-10장 문자열/2-3.c
UHC
1,719
3.96875
4
[]
no_license
#pragma warning(disable:4996) #include <stdio.h> #include <string.h> #include <stdlib.h> int main() { char str1[100]; //Է¹ 迭 char word[10][100]; //и ܾ ߹迭 char firstword[100] = ""; // ܾ 迭 char* p1; // int len1; //Է¹ ڿ int i, j; int cnt = 0; //ܾ //ڿ Է, ڿ gets(str1); l...
true
3c47c227c37a5b189f70972e45d040780bcfc432
C
harshika18/xv6-assignment
/test.c
UTF-8
536
2.6875
3
[ "MIT" ]
permissive
#include "types.h" #include "stat.h" #include "user.h" #include "fcntl.h" void ff(int f) { if(f<1) return; ff(f-1); ff(f-2); return; } int main() { sleep(10); int pid = fork(); if(pid == 0) { sleep (10); int ppid = fork(); if(ppid == 0) { ff(33); printf(1,"P1\n"); ...
true
fa76c44a8a508b69e2a957fc98cd3f6905a35889
C
famaf/Algoritmos_2_2014
/Proyecto_02/Parte_02/Diccionario_Estrella_01/dict.c
UTF-8
3,081
3.21875
3
[]
no_license
#include <stdlib.h> #include <assert.h> #include <stdbool.h> #include "dict.h" #include "list.h" #include "pair.h" #include "index.h" #include "data.h" struct _dict_t { list_t lista; unsigned int size; }; unsigned int size = 0; unsigned int dict_length(dict_t diccionario) { assert(diccionario != NULL);...
true