repo stringlengths 4 140 | commit_id stringlengths 7 7 | rel_path stringlengths 1 3.5k | language stringclasses 37
values | url stringlengths 37 3.56k | raw_url stringlengths 54 3.58k | key stringlengths 20 3.54k | ok bool 1
class | status int64 200 200 | bytes int64 48 425k | content stringlengths 40 425k | worker_id int64 0 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|
jterweeme/examples | 37d9b22 | gl/3dsplayer/atmosphere.h | C | www.github.com/jterweeme/examples/tree/main/gl/3dsplayer/atmosphere.h | https://raw.githubusercontent.com/jterweeme/examples/37d9b22/gl/3dsplayer/atmosphere.h | jterweeme/examples 37d9b22 gl/3dsplayer/atmosphere.h | true | 200 | 1,569 | #ifndef INCLUDED_LIB3DS_ATMOSPHERE_H
#define INCLUDED_LIB3DS_ATMOSPHERE_H
#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif
/*!
* Fog atmosphere settings
* \ingroup atmosphere
*/
typedef struct _Lib3dsFog {
Lib3dsBool use;
Lib3dsRgb col;
Lib3dsBool fog_background;
Lib3dsFloat near_plane;
... | 6 |
pedrofvgomes/feup-rcom | 3b5e22f | proj2/src/download.c | C | www.github.com/pedrofvgomes/feup-rcom/tree/main/proj2/src/download.c | https://raw.githubusercontent.com/pedrofvgomes/feup-rcom/3b5e22f/proj2/src/download.c | pedrofvgomes/feup-rcom 3b5e22f proj2/src/download.c | true | 200 | 1,978 | #include "../include/download.h"
void print_url_info(const struct Url* url) {
printf("User: %s\nPassword: %s\nFile: %s\n", url->user, url->password, url->file);
}
void handle_error(const char* message) {
fprintf(stderr, "%s", message);
exit(-1);
}
void download_FTP_file(const char* url_name) {... | 0 |
rajub77/adapg7.c | a0a9919 | adapg7.c | C | www.github.com/rajub77/adapg7.c/tree/main/adapg7.c | https://raw.githubusercontent.com/rajub77/adapg7.c/a0a9919/adapg7.c | rajub77/adapg7.c a0a9919 adapg7.c | true | 200 | 1,924 | #include <stdio.h>
#define MAX 50
int p[MAX], w[MAX], x[MAX];
double maxprofit;
int n, m, i;
void greedyKnapsack(int n, int w[], int p[], int m) {
double ratio[MAX];
// Calculate the ratio of profit to weight for each item
for (i = 0; i < n; i++) {
ratio[i] = (double)p[i] / w[i];
}
// S... | 4 |
AndyMalgonne/GnL | 191c248 | get_next_line_bonus.c | C | www.github.com/AndyMalgonne/GnL/tree/main/get_next_line_bonus.c | https://raw.githubusercontent.com/AndyMalgonne/GnL/191c248/get_next_line_bonus.c | AndyMalgonne/GnL 191c248 get_next_line_bonus.c | true | 200 | 1,931 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.c :+: :+: :+: ... | 6 |
ludmilastemp/DrawSphere | c5f300f | GrLib/GrLib.h | C | www.github.com/ludmilastemp/DrawSphere/tree/main/GrLib/GrLib.h | https://raw.githubusercontent.com/ludmilastemp/DrawSphere/c5f300f/GrLib/GrLib.h | ludmilastemp/DrawSphere c5f300f GrLib/GrLib.h | true | 200 | 559 | #ifndef STL_GrLib
#define STL_GrLib
#include <SFML/Graphics.hpp>
#include "GrLibCtx.h"
#include "../objects/button.h"
#include "../vectors/vector.h"
#include "../color.h"
const int kWidthWindow = 500;
const int kHeightWindow = 300;
// const int kArrowLength = 25;
const int kHandCoeff = 7;
void DrawVector (Vector& ... | 7 |
pretzelogical/holbertonschool-simple_shell | 2ff0a9c | string2.c | C | www.github.com/pretzelogical/holbertonschool-simple_shell/tree/main/string2.c | https://raw.githubusercontent.com/pretzelogical/holbertonschool-simple_shell/2ff0a9c/string2.c | pretzelogical/holbertonschool-simple_shell 2ff0a9c string2.c | true | 200 | 1,496 | #include "main.h"
/**
* _strdup - strdup C function
* @str: String to duplicate
*
* Return: A new copy of the given string
*/
char *_strdup(const char *str)
{
int i, n = 0;
char *strcopy;
if (str == NULL)
return (NULL);
do {
n++;
} while (str[n - 1]);
strcopy = malloc(sizeof(char) * n);
if (strcopy ==... | 0 |
RobinCamarasa/Advent-of-code | 6fbca7a | 2015/day01/Robin/floor/floor.c | C | www.github.com/RobinCamarasa/Advent-of-code/tree/main/2015/day01/Robin/floor/floor.c | https://raw.githubusercontent.com/RobinCamarasa/Advent-of-code/6fbca7a/2015/day01/Robin/floor/floor.c | RobinCamarasa/Advent-of-code 6fbca7a 2015/day01/Robin/floor/floor.c | true | 200 | 707 | #include <stdio.h>
#include <stdlib.h>
int get_floor(char *path){
char ch;
int i=0;
FILE *file;
file = fopen(path, "r");
while ((ch = fgetc(file)) != EOF) {
if (ch == ')'){
i--;
} else if (ch == '(') {
i++;
}
}
fclose(file);
return i;
}
... | 4 |
ARM-software/avh-api | c7a6b1f | c/api/model/image.c | C | www.github.com/ARM-software/avh-api/tree/main/c/api/model/image.c | https://raw.githubusercontent.com/ARM-software/avh-api/c7a6b1f/c/api/model/image.c | ARM-software/avh-api c7a6b1f c/api/model/image.c | true | 200 | 8,352 | #include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "image.h"
char* typeimage_ToString(arm_api_image_TYPE_e type) {
char* typeArray[] = { "NULL", "fwbinary", "kernel", "devicetree", "ramdisk", "loaderfile", "sepfw", "seprom", "bootrom", "llb", "iboot", "ibootdata", "fwpackage", "partition" };
re... | 6 |
Favouridowu02/alx-higher_level_programming | 89a4538 | 0x01-python-if_else_loops_functions/practice/13-insert_number.c | C | www.github.com/Favouridowu02/alx-higher_level_programming/tree/main/0x01-python-if_else_loops_functions/practice/13-insert_number.c | https://raw.githubusercontent.com/Favouridowu02/alx-higher_level_programming/89a4538/0x01-python-if_else_loops_functions/practice/13-insert_number.c | Favouridowu02/alx-higher_level_programming 89a4538 0x01-python-if_else_loops_functions/practice/13-insert_number.c | true | 200 | 449 | #include "lists.h"
listint_t *insert_node(listint_t **head, int number)
{
listint_t *new, *current;
new = malloc(sizeof(listint_t));
if (new == NULL)
return (NULL);
new->n = number;
new->next = NULL;
current = *head;
while (current != NULL)
{
if (current->n < number && current->next->n >= number)
{
... | 7 |
Winnienasimiyu/PROGRAMMING-C | 5d89ae6 | two dimension.c | C | www.github.com/Winnienasimiyu/PROGRAMMING-C/tree/main/two dimension.c | https://raw.githubusercontent.com/Winnienasimiyu/PROGRAMMING-C/5d89ae6/two%20dimension.c | Winnienasimiyu/PROGRAMMING-C 5d89ae6 two dimension.c | true | 200 | 219 | //array in c two dimension
#include<stdio.h>
int main(){
int i,j;
int marks [2] [3] = {{20,40,60},{80,30,10}};
for (i=0;i<2;i++){
for (j=0;j<3;j++){
printf("marks[%d][%d] = %d \n ",i,j,marks[i][j]);
}
}
return 0;
} | 0 |
kd1410739/clang2024 | ea3a02d | Func/ex082.c | C | www.github.com/kd1410739/clang2024/tree/main/Func/ex082.c | https://raw.githubusercontent.com/kd1410739/clang2024/ea3a02d/Func/ex082.c | kd1410739/clang2024 ea3a02d Func/ex082.c | true | 200 | 914 | #include <stdio.h>
#include <string.h>
void sort(int* data, int size, int order);
main()
{
int data[8] = { 6,10,8,2,9,5,1,7 };
int i;
char str[256];
printf("�\�[�g���������:");
gets(str);
if (strcmp(str, "����") == 0)
{
sort(data, 8, 0);
}
if (strcmp(str, "�~��") == 0)
{
sort(data, 8, 1);
}
for (i = 0;... | 4 |
pablo-2k03/Ejercicios-de-practicas-de-Programacion-I | f593c86 | Ejercicios Random/NumsPrimos.c | C | www.github.com/pablo-2k03/Ejercicios-de-practicas-de-Programacion-I/tree/main/Ejercicios Random/NumsPrimos.c | https://raw.githubusercontent.com/pablo-2k03/Ejercicios-de-practicas-de-Programacion-I/f593c86/Ejercicios%20Random/NumsPrimos.c | pablo-2k03/Ejercicios-de-practicas-de-Programacion-I f593c86 Ejercicios Random/NumsPrimos.c | true | 200 | 390 | #include <stdio.h>
#include <stdlib.h>
#include <locale.h>
/*
Programa que calcula los n�meros primos.
*/
main(void){
setlocale(LC_ALL,"");
int a,resto,cont;
cont=2;
printf("Num: ");
scanf("%d",&a);
while(cont<=a){;
resto=a%cont;
cont+=1;
if(resto==0){
printf("El n�mero %d no es primo.",a);
break;
... | 6 |
Walkerigno/pcto | 3d3a716 | ex19.c | C | www.github.com/Walkerigno/pcto/tree/main/ex19.c | https://raw.githubusercontent.com/Walkerigno/pcto/3d3a716/ex19.c | Walkerigno/pcto 3d3a716 ex19.c | true | 200 | 360 | #include <stdio.h>
int main()
{
int a;
printf(" Dammi un numero qualsiasi ");
scanf(" %d" ,&a);
int b = a - 1;
int c = 0;
while( b > 1)
{
if(a % b == 0)
{
c = c + 1;
}
b--;
}
if (c==0)
{
printf(" il numero é primo");
}
else
... | 7 |
kpatsakis/primevul8 | 48df1b0 | 159629.c | C | www.github.com/kpatsakis/primevul8/tree/main/159629.c | https://raw.githubusercontent.com/kpatsakis/primevul8/48df1b0/159629.c | kpatsakis/primevul8 48df1b0 159629.c | true | 200 | 737 | static int snd_timer_user_info(struct file *file,
struct snd_timer_info __user *_info)
{
struct snd_timer_user *tu;
struct snd_timer_info *info;
struct snd_timer *t;
int err = 0;
tu = file->private_data;
if (!tu->timeri)
return -EBADFD;
t = tu->timeri->timer;
if (!t)
return -EBADFD;
info = kzal... | 4 |
erdc/adhv8_kraken | 8ddbb4d | src/NEW_ADH/bc/read_bc_AWRITE.c | C | www.github.com/erdc/adhv8_kraken/tree/main/src/NEW_ADH/bc/read_bc_AWRITE.c | https://raw.githubusercontent.com/erdc/adhv8_kraken/8ddbb4d/src/NEW_ADH/bc/read_bc_AWRITE.c | erdc/adhv8_kraken 8ddbb4d src/NEW_ADH/bc/read_bc_AWRITE.c | true | 200 | 6,000 | /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*! \file read_bc_AWRITE This file collects methods to read an AdH SuperModel boundary condition input file */
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*++++++++++... | 0 |
igatecomputereducation/cbatch44 | e817748 | prog62.c | C | www.github.com/igatecomputereducation/cbatch44/tree/main/prog62.c | https://raw.githubusercontent.com/igatecomputereducation/cbatch44/e817748/prog62.c | igatecomputereducation/cbatch44 e817748 prog62.c | true | 200 | 312 | #include<stdio.h>
int main()
{
int n,fi,se,th,sum,temp;
printf("Enter any 3 digit natural number:");
scanf("%i",&n);
temp=n;
th=n%10;
n=n/10;
se=n%10;
n=n/10;
fi=n%10;
sum=fi*fi*fi+se*se*se+th*th*th;
if(sum==temp)
printf("Armstrong number");
else
printf("Not an armstrong number");
return 0;
}
| 6 |
KennethOng02/NTNU-Numerical-Method | 4a5859b | wk6-nonlinear.c | C | www.github.com/KennethOng02/NTNU-Numerical-Method/tree/main/wk6-nonlinear.c | https://raw.githubusercontent.com/KennethOng02/NTNU-Numerical-Method/4a5859b/wk6-nonlinear.c | KennethOng02/NTNU-Numerical-Method 4a5859b wk6-nonlinear.c | true | 200 | 2,947 | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "matrix.h"
typedef struct {
double h;
double k;
double r;
}jacobian_matrix;
double **getdmatrix1(jacobian_matrix x) {
double **result = malloc(3 * sizeof(double));
for(int i = 0; i < 3; i++)
result[i] = malloc(3 * sizeof(double));
resul... | 7 |
Jim-tech/AlexaConnectKitWithEFR32 | 8c5a1e5 | ACKOnEFR32/ack/ack_core_cookingtimecontroller.c | C | www.github.com/Jim-tech/AlexaConnectKitWithEFR32/tree/main/ACKOnEFR32/ack/ack_core_cookingtimecontroller.c | https://raw.githubusercontent.com/Jim-tech/AlexaConnectKitWithEFR32/8c5a1e5/ACKOnEFR32/ack/ack_core_cookingtimecontroller.c | Jim-tech/AlexaConnectKitWithEFR32 8c5a1e5 ACKOnEFR32/ack/ack_core_cookingtimecontroller.c | true | 200 | 5,295 | /*
* Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* You may not use this file except in compliance with the terms and conditions set forth in the
* accompanying LICENSE.TXT file. THESE MATERIALS ARE PROVIDED ON AN "AS IS" BASIS. AMAZON SPECIFICALLY
* DISCLAIMS, WITH RESPECT TO TH... | 4 |
llalal521/uxlock | b6558b1 | litl/src/uxshfl.c | C | www.github.com/llalal521/uxlock/tree/main/litl/src/uxshfl.c | https://raw.githubusercontent.com/llalal521/uxlock/b6558b1/litl/src/uxshfl.c | llalal521/uxlock b6558b1 litl/src/uxshfl.c | true | 200 | 15,517 | #include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
#include <pthread.h>
#include <assert.h>
#include <uxshfl.h>
#include <papi.h>
#include "waiting_policy.h"
#include "interpose.h"
#include "utils.h"
#include <assert.h>
// #define BLOCKING_FAIRNESS... | 0 |
shivamjha1/Problem-Solving | 627ac90 | fun2.c | C | www.github.com/shivamjha1/Problem-Solving/tree/main/fun2.c | https://raw.githubusercontent.com/shivamjha1/Problem-Solving/627ac90/fun2.c | shivamjha1/Problem-Solving 627ac90 fun2.c | true | 200 | 239 | #include<stdio.h>
int mea(int n1,int n2,int n3,int n4,int n5)
{
float mean; int median;
mean=(n1+n2+n3+n4+n5)/5.0;
printf("%f ",mean);
median=n3;
printf("%d",median);
}
void main()
{
mea(1,2,3,4,11);
}
| 6 |
ArteryTek/AT32M412_416_Firmware_Library | ccded1f | libraries/drivers/inc/at32m412_416_tmr.h | C | www.github.com/ArteryTek/AT32M412_416_Firmware_Library/tree/main/libraries/drivers/inc/at32m412_416_tmr.h | https://raw.githubusercontent.com/ArteryTek/AT32M412_416_Firmware_Library/ccded1f/libraries/drivers/inc/at32m412_416_tmr.h | ArteryTek/AT32M412_416_Firmware_Library ccded1f libraries/drivers/inc/at32m412_416_tmr.h | true | 200 | 62,634 | /**
**************************************************************************
* @file at32m412_416_tmr.h
* @brief at32m412_416 tmr header file
**************************************************************************
* Copyright notice & Disclaimer
*
* The software Bo... | 4 |
fatmasoly/alx-low_level_programming | 1211ad7 | 0x0E-structures_typedef/2-print_dog.c | C | www.github.com/fatmasoly/alx-low_level_programming/tree/main/0x0E-structures_typedef/2-print_dog.c | https://raw.githubusercontent.com/fatmasoly/alx-low_level_programming/1211ad7/0x0E-structures_typedef/2-print_dog.c | fatmasoly/alx-low_level_programming 1211ad7 0x0E-structures_typedef/2-print_dog.c | true | 200 | 536 | #include "dog.h"
#include <stdio.h>
/**
* print_dog - Prints the details of a struct dog.
* @d: Pointer to the struct dog variable to print.
*
* Description:
* This function prints the name, age, and owner of a struct dog variable.
* If any element of the struct is NULL, it prints "(nil)" instead.
* If @d is NUL... | 7 |
racheyShindelus/Sorting-Game | 1e5b844 | level3.c | C | www.github.com/racheyShindelus/Sorting-Game/tree/main/level3.c | https://raw.githubusercontent.com/racheyShindelus/Sorting-Game/1e5b844/level3.c | racheyShindelus/Sorting-Game 1e5b844 level3.c | true | 200 | 1,715 | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
bool isSorted(int numArr[], int boardSize)
{
for(int i = 0; i < boardSize - 1; i++)
{
if(numArr[i] > numArr[i + 1])
{
return false;
}
}
return true; // else
}
void reverseArr(int numArr[], i... | 0 |
user110laolemon/OS | 9519b11 | experiments/实验一/find.c | C | www.github.com/user110laolemon/OS/tree/main/experiments/实验一/find.c | https://raw.githubusercontent.com/user110laolemon/OS/9519b11/experiments/%E5%AE%9E%E9%AA%8C%E4%B8%80/find.c | user110laolemon/OS 9519b11 experiments/实验一/find.c | true | 200 | 2,488 | // find.c
#include "kernel/types.h"
#include "kernel/stat.h"
#include "user/user.h"
#include "kernel/fs.h"
void find(char *path, char *filename)
{
char buf[128], *p; //store path
int fd, fd1; //now&next fd
struct dirent de; //dirent
struct stat st, st1; //now&next status of fd
//... | 5 |
SunboAZ/hk32l08x-sdk-2024-12-02-V1.0.4 | 86865b9 | Projects/Board_HK32L0xx_EVAL_Examples/AES/AES_TwoBoards/src/hk32l0xx_it.c | C | www.github.com/SunboAZ/hk32l08x-sdk-2024-12-02-V1.0.4/tree/main/Projects/Board_HK32L0xx_EVAL_Examples/AES/AES_TwoBoards/src/hk32l0xx_it.c | https://raw.githubusercontent.com/SunboAZ/hk32l08x-sdk-2024-12-02-V1.0.4/86865b9/Projects/Board_HK32L0xx_EVAL_Examples/AES/AES_TwoBoards/src/hk32l0xx_it.c | SunboAZ/hk32l08x-sdk-2024-12-02-V1.0.4 86865b9 Projects/Board_HK32L0xx_EVAL_Examples/AES/AES_TwoBoards/src/hk32l0xx_it.c | true | 200 | 5,822 | /*******************************************************************************
* @copyright: Shenzhen Hangshun Chip Technology R&D Co., Ltd
* @filename: hk32l0xx_it.c
* @brief: Interrupt Service Routines
* @author: AE Team
* @version: V1.0.0/2024-01-04
* 1.Initial version
* @log:
***************... | 6 |
MKardes/42_Philosophers | 6c51468 | old/loop.c | C | www.github.com/MKardes/42_Philosophers/tree/main/old/loop.c | https://raw.githubusercontent.com/MKardes/42_Philosophers/6c51468/old/loop.c | MKardes/42_Philosophers 6c51468 old/loop.c | true | 200 | 2,831 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* loop.c :+: :+: :+: ... | 3 |
alumpish/OS-Lab-Projects | c238554 | xv6-public-master/sysproc.c | C | www.github.com/alumpish/OS-Lab-Projects/tree/main/xv6-public-master/sysproc.c | https://raw.githubusercontent.com/alumpish/OS-Lab-Projects/c238554/xv6-public-master/sysproc.c | alumpish/OS-Lab-Projects c238554 xv6-public-master/sysproc.c | true | 200 | 3,034 | #include "types.h"
#include "x86.h"
#include "defs.h"
#include "date.h"
#include "param.h"
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"
int my_variable;
int sys_fork(void)
{
return fork();
}
int sys_exit(void)
{
exit();
return 0; // not reached
}
int sys_wait(void)
{
return wait();
}
int sys_k... | 1 |
Smoke666D/DASH | 7864c23 | User/main.h | C | www.github.com/Smoke666D/DASH/tree/main/User/main.h | https://raw.githubusercontent.com/Smoke666D/DASH/7864c23/User/main.h | Smoke666D/DASH 7864c23 User/main.h | true | 200 | 2,640 | /*
* main.h
*
* Created on: Feb 16, 2024
* Author: i.dymov
*/
#ifndef USER_MAIN_H_
#define USER_MAIN_H_
#include <inputs.h>
#include "string.h"
#include "debug.h"
#include "FreeRTOS.h"
#include "task.h"
#include "event_groups.h"
#include "dash_draw.h"
#include "semphr.h"
#include "CO_driver_ST32F103.h"
#i... | 7 |
Lionel-hub1/alx-low_level_programming | 020595b | 0x07-pointers_arrays_strings/7-print_chessboard.c | C | www.github.com/Lionel-hub1/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/7-print_chessboard.c | https://raw.githubusercontent.com/Lionel-hub1/alx-low_level_programming/020595b/0x07-pointers_arrays_strings/7-print_chessboard.c | Lionel-hub1/alx-low_level_programming 020595b 0x07-pointers_arrays_strings/7-print_chessboard.c | true | 200 | 314 | #include "main.h"
/**
* print_chessboard - This function prints the chess board from array
* @a: The array of borad characters
* Return: void
*/
void print_chessboard(char (*a)[8])
{
int i = 0, j;
while (i < 8)
{
j = 0;
while (j < 8)
{
_putchar(a[i][j]);
j++;
}
_putchar('\n');
i++;
}
}
| 4 |
GSOliveira1/TP2-AEDS3 | 81fd777 | estrategia1.c | C | www.github.com/GSOliveira1/TP2-AEDS3/tree/main/estrategia1.c | https://raw.githubusercontent.com/GSOliveira1/TP2-AEDS3/81fd777/estrategia1.c | GSOliveira1/TP2-AEDS3 81fd777 estrategia1.c | true | 200 | 2,837 | #include "estrategia1.h"
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <sys/time.h>
#include <sys/resource.h>
int main(int argc, char **argv) {
struct timeval start, end;
struct rusage usage;
gettimeofday(&start, NULL);
getrusage(RUSAGE_SELF, &usage);
char *input = NULL... | 2 |
DeviousCardi/BTP | 720b738 | deepfix_data/prob06/erroneous/prog55963-user443.c | C | www.github.com/DeviousCardi/BTP/tree/main/deepfix_data/prob06/erroneous/prog55963-user443.c | https://raw.githubusercontent.com/DeviousCardi/BTP/720b738/deepfix_data/prob06/erroneous/prog55963-user443.c | DeviousCardi/BTP 720b738 deepfix_data/prob06/erroneous/prog55963-user443.c | true | 200 | 221 | #include <stdio.h>
#include <stdlib.h>
int num[5];
void swap(int i,int j)
{ int t;
t=j;
j=i;
i=j;
printf("5d %d",a,b); }
int main() {
int a,b;
a=2;
b=3;
swap(a,b);
printf("%d %d",a,b);
return 0; } | 5 |
figue0122/holbertonschool-low_level_programming | 7a8b10d | pointers_arrays_strings/3-strspn.c | C | www.github.com/figue0122/holbertonschool-low_level_programming/tree/main/pointers_arrays_strings/3-strspn.c | https://raw.githubusercontent.com/figue0122/holbertonschool-low_level_programming/7a8b10d/pointers_arrays_strings/3-strspn.c | figue0122/holbertonschool-low_level_programming 7a8b10d pointers_arrays_strings/3-strspn.c | true | 200 | 397 | #include "main.h"
/**
* _strspn - lenght of a prefix
* @s: pointer
* @accept: pointer
* Return: char
*/
unsigned int _strspn(char *s, char *accept)
{
int a = 0, b = 0, c = 0;
while (accept[b] != '\0')
{
while (accept[b] != '\0')
{
if (accept[b] == s[a])
{
c++;
a++;
b = 0;
}
else i... | 3 |
JezaahOswaldosky/Programacion_C | 37623cf | LECCION 7/PRACTICA 1/PRACTICA 1.c | C | www.github.com/JezaahOswaldosky/Programacion_C/tree/main/LECCION 7/PRACTICA 1/PRACTICA 1.c | https://raw.githubusercontent.com/JezaahOswaldosky/Programacion_C/37623cf/LECCION%207/PRACTICA%201/PRACTICA%201.c | JezaahOswaldosky/Programacion_C 37623cf LECCION 7/PRACTICA 1/PRACTICA 1.c | true | 200 | 351 | #include <stdio.h>
#include <stdlib.h>
///En esta seccion se definen formulas y demas pendejadas...
#define PI 3.1415
#define AREA(r) (PI*r*r)
///Nuestro programa...
int main(){
float radio =2;
printf("%3.2f\n",PI);
printf("El area es %5.2f\n",AREA(radio));
printf("Area con radio + 1: %5.2f\n",AREA... | 4 |
fatalistix/OPP-4th-Semester | 89273ae | Pract2/buf_mpi.c | C | www.github.com/fatalistix/OPP-4th-Semester/tree/main/Pract2/buf_mpi.c | https://raw.githubusercontent.com/fatalistix/OPP-4th-Semester/89273ae/Pract2/buf_mpi.c | fatalistix/OPP-4th-Semester 89273ae Pract2/buf_mpi.c | true | 200 | 807 | #include <stdio.h>
#include <stdlib.h>
#include "mpi.h"
int main(int argc, char * argv[])
{
int * arr = (int *) malloc(sizeof(int) * 9);
int * res = (int *) calloc(sizeof(int), 9);
int * par = (int *) malloc(sizeof(int) * 3);
int * pos = (int *) malloc(sizeof(int) * 3);
int rank;
for (int i ... | 2 |
moogloof/loofOS | ba6fb85 | kernel/arm/drivers/timer.c | C | www.github.com/moogloof/loofOS/tree/main/kernel/arm/drivers/timer.c | https://raw.githubusercontent.com/moogloof/loofOS/ba6fb85/kernel/arm/drivers/timer.c | moogloof/loofOS ba6fb85 kernel/arm/drivers/timer.c | true | 200 | 716 | #include <drivers/timer.h>
#include <drivers/uart.h>
#include <peripherals/timer.h>
#include <util.h>
#include <print.h>
#include <stdint.h>
// Timer interrupt interval
const uint32_t interval = 10;
uint32_t cmpval = 0;
// Clear timer statuses
void clear_timer(int tid) {
put32(TIMER_CS, (1 << tid));
}
// Initializ... | 7 |
Fulbe/alx-low_level_programming | 1146f6c | 0x09-static_libraries/6-abs.c | C | www.github.com/Fulbe/alx-low_level_programming/tree/main/0x09-static_libraries/6-abs.c | https://raw.githubusercontent.com/Fulbe/alx-low_level_programming/1146f6c/0x09-static_libraries/6-abs.c | Fulbe/alx-low_level_programming 1146f6c 0x09-static_libraries/6-abs.c | true | 200 | 247 | #include "main.h"
/**
* _abs - A program that gives the absolute value
* of an integer.
*
* @n: input number as an integer.
*
* Return: absolute value
*/
int _abs(int n)
{
if (n >= 0)
{
return (n);
}
else
{
return (n * -1);
}
}
| 5 |
OneOrZer0/C-projects | 8ad71c7 | C/REMv6/main.c | C | www.github.com/OneOrZer0/C-projects/tree/main/C/REMv6/main.c | https://raw.githubusercontent.com/OneOrZer0/C-projects/8ad71c7/C/REMv6/main.c | OneOrZer0/C-projects 8ad71c7 C/REMv6/main.c | true | 200 | 12,402 | #include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <math.h>
#include <conio.h>
//Wykonal Marek Snigurowicz i dodal niesamowita, oszamialajaca funkcje "sortowanie" - "polecam" *Magda Gesler*
char nazwa[] = "MarkoSoft ",wersja[] = "REMv5",dane_bazy[1000],odp,*n,napis[200];
int przejscie, istnieje, nu... | 3 |
thomcleary/learn-c | e641b52 | c-programming-a-modern-approach/08-arrays/projects/07.c | C | www.github.com/thomcleary/learn-c/tree/main/c-programming-a-modern-approach/08-arrays/projects/07.c | https://raw.githubusercontent.com/thomcleary/learn-c/e641b52/c-programming-a-modern-approach/08-arrays/projects/07.c | thomcleary/learn-c e641b52 c-programming-a-modern-approach/08-arrays/projects/07.c | true | 200 | 1,032 | /*
Write a program that reads a 5 x 5 array of integers and then prints the row sums and the column sums
*/
#include <stdio.h>
#define NUM_ROWS (int)(sizeof(matrix) / sizeof(matrix[0]))
#define NUM_COLUMNS (int)(sizeof(matrix[0]) / sizeof(matrix[0][0]))
int main(void)
{
int matrix[5][5] = {0};
for (int i = ... | 7 |
Naniking7/alx-low_level_programming | e932b11 | 0x06-pointers_arrays_strings/7-leet.c | C | www.github.com/Naniking7/alx-low_level_programming/tree/main/0x06-pointers_arrays_strings/7-leet.c | https://raw.githubusercontent.com/Naniking7/alx-low_level_programming/e932b11/0x06-pointers_arrays_strings/7-leet.c | Naniking7/alx-low_level_programming e932b11 0x06-pointers_arrays_strings/7-leet.c | true | 200 | 451 | #include "main.h"
/**
*leet - encodes a string into 1337
*@s: pointer to the string
*
*Return: s
*/
char *leet(char *s)
{
int strnumber, lnumber;
char letters[] = "aAeEoOtTlL";
char lnumber1[] = "4433007711";
strnumber = 0;
while (s[strnumber] != '\0')
{
lnumber = 0;
while (lnumber < 10)
{
if (le... | 4 |
StephenGu010/C_learn | 4705f08 | test8_11.c | C | www.github.com/StephenGu010/C_learn/tree/main/test8_11.c | https://raw.githubusercontent.com/StephenGu010/C_learn/4705f08/test8_11.c | StephenGu010/C_learn 4705f08 test8_11.c | true | 200 | 653 | #include<stdio.h>
int main()
{
int i,j,k;
int square_1[2][3];
int square_2[3][2];
int result[2][2];
printf("input square_1:\n");
for(i=0; i<2; i++)
{
for(j=0; j<3; j++)
{
scanf("%d",&square_1[i][j]);
}
}
printf("input square_2:\n");
for(i=0; i<3; i++)
{
for(j=0; j<2; j++)
{
scanf("%d",&squa... | 0 |
ja-abakah/alx-low_level_programming | d83bc3c | 0x07-pointers_arrays_strings/2-strchr.c | C | www.github.com/ja-abakah/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/2-strchr.c | https://raw.githubusercontent.com/ja-abakah/alx-low_level_programming/d83bc3c/0x07-pointers_arrays_strings/2-strchr.c | ja-abakah/alx-low_level_programming d83bc3c 0x07-pointers_arrays_strings/2-strchr.c | true | 200 | 459 | #include "main.h"
/**
* _strchr - Entry point of the program
* Description: Locates the first occurrence of a character in a string.
* @s: Pointer to the string to search.
* @c: The character to find.
*
* Return: Pointer to the first occurrence of the character @c in the
* string @s, or NULL if the character is... | 2 |
ltsnnh/C | 86202ec | 10-algorithms/1-bubble-sort-linked-list/src/main.c | C | www.github.com/ltsnnh/C/tree/main/10-algorithms/1-bubble-sort-linked-list/src/main.c | https://raw.githubusercontent.com/ltsnnh/C/86202ec/10-algorithms/1-bubble-sort-linked-list/src/main.c | ltsnnh/C 86202ec 10-algorithms/1-bubble-sort-linked-list/src/main.c | true | 200 | 665 | #include <stdio.h>
#include <stdint.h>
typedef struct ll
{
uint8_t integer;
struct ll *pNext;
} linkedList_t;
linkedList_t* pHead = NULL;
int main(void)
{
linkedList_t node[5] = {
{3, NULL}, {5, NULL}, {4, NULL}, {2, NULL}, {1, NULL}
};
int i = 0;
linkedList_t* pCurrent = NULL;
p... | 5 |
Timarrr/MSUR-AUV-2K24 | b196e76 | Core/Src/main.c | C | www.github.com/Timarrr/MSUR-AUV-2K24/tree/main/Core/Src/main.c | https://raw.githubusercontent.com/Timarrr/MSUR-AUV-2K24/b196e76/Core/Src/main.c | Timarrr/MSUR-AUV-2K24 b196e76 Core/Src/main.c | true | 200 | 12,119 | /* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* Copyright (c) 2023 STMicr... | 6 |
anasch07/GL3-STM32-Embedded-Projects | 0062e85 | manip_1-1_Disc_Led_RegAccess/main.c | C | www.github.com/anasch07/GL3-STM32-Embedded-Projects/tree/main/manip_1-1_Disc_Led_RegAccess/main.c | https://raw.githubusercontent.com/anasch07/GL3-STM32-Embedded-Projects/0062e85/manip_1-1_Disc_Led_RegAccess/main.c | anasch07/GL3-STM32-Embedded-Projects 0062e85 manip_1-1_Disc_Led_RegAccess/main.c | true | 200 | 881 | #include <stdint.h>
#define Reg_Enable_RCC (uint32_t*) 0x40021018 // adresse du registre APBxENR (pour activer les GPIOs utils�s)
#define GPIOC_CRH (uint32_t*) 0x40011004 // adresse du registre (GPIO C)
#define Reg_BSRR_Led (uint32_t*) 0x40011010 // adresses du registre permettant la mise � 1 des... | 1 |
guaguadanchaofan/network | a9cbd5f | old/ReactorHttp_c/Channel.h | C | www.github.com/guaguadanchaofan/network/tree/main/old/ReactorHttp_c/Channel.h | https://raw.githubusercontent.com/guaguadanchaofan/network/a9cbd5f/old/ReactorHttp_c/Channel.h | guaguadanchaofan/network a9cbd5f old/ReactorHttp_c/Channel.h | true | 200 | 860 | #pragma once
#include <stdlib.h>
#include <stdbool.h>
// 定义函数指针类型
typedef int (*HandelFunc)(void *arg);
//
enum FDevent
{
TimeOut = 0x01,
writevent = 0x02,
readevent = 0x04
};
// 创建channel结构体
struct Channel
{
// 文件描述符
int _fd;
// 事件
int _events;
// 读写回调函数
HandelFunc _writecallback... | 4 |
Mayuri-Chan/MTK_kernel_device_modules_6.6 | 3b31307 | drivers/mmc/host/mtk-mmc-swcqhci-core.c | C | www.github.com/Mayuri-Chan/MTK_kernel_device_modules_6.6/tree/main/drivers/mmc/host/mtk-mmc-swcqhci-core.c | https://raw.githubusercontent.com/Mayuri-Chan/MTK_kernel_device_modules_6.6/3b31307/drivers/mmc/host/mtk-mmc-swcqhci-core.c | Mayuri-Chan/MTK_kernel_device_modules_6.6 3b31307 drivers/mmc/host/mtk-mmc-swcqhci-core.c | true | 200 | 17,485 | // SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2019 MediaTek Inc.
*/
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/blk-mq.h>
#include <uapi/linux/sched/types.h>
#include <mt-plat/mtk_blocktag.h>
#include "mtk-mmc-swcqhci.h"
#include "mtk-mmc-swcqhci-crypto.... | 3 |
rnatella/so_esempi | 3bd177f | code_messaggi/prod_cons_async/procedure.c | C | www.github.com/rnatella/so_esempi/tree/main/code_messaggi/prod_cons_async/procedure.c | https://raw.githubusercontent.com/rnatella/so_esempi/3bd177f/code_messaggi/prod_cons_async/procedure.c | rnatella/so_esempi 3bd177f code_messaggi/prod_cons_async/procedure.c | true | 200 | 1,089 | /*-----IMPLEMENTAZIONE DELLE PROCEDURE-----*/
#include <stdio.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/msg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include "header.h"
#include <time.h>
void SendAsincr(int queue, char * text) {
Messaggio m;
// cos... | 7 |
safamld/alx-low_level_programming | 4a3f023 | 0x07-pointers_arrays_strings/3-strspn.c | C | www.github.com/safamld/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/3-strspn.c | https://raw.githubusercontent.com/safamld/alx-low_level_programming/4a3f023/0x07-pointers_arrays_strings/3-strspn.c | safamld/alx-low_level_programming 4a3f023 0x07-pointers_arrays_strings/3-strspn.c | true | 200 | 341 | #include "main.h"
/**
* _strspn - function gets the lenght of prefix
* @s: segment
* @accept: input
* Return: sucess
*/
unsigned int _strspn(char *s, char *accept)
{
unsigned int v = 0;
int i;
while (*s)
{
for (i = 0; accept[i]; i++)
{
if (*s == accept[i])
{
v++;
break;
}
else if (accept[i + 1] == '\0')
return (v);
}
... | 2 |
mt-abdullah/Mars-Tech-Assignment | 9bd02dd | Cyber Security/Assignment 04/Question 04/Question 04.c | C | www.github.com/mt-abdullah/Mars-Tech-Assignment/tree/main/Cyber Security/Assignment 04/Question 04/Question 04.c | https://raw.githubusercontent.com/mt-abdullah/Mars-Tech-Assignment/9bd02dd/Cyber%20Security/Assignment%2004/Question%2004/Question%2004.c | mt-abdullah/Mars-Tech-Assignment 9bd02dd Cyber Security/Assignment 04/Question 04/Question 04.c | true | 200 | 789 | #include <stdio.h>
int reverseNumber(int number) {
int reversed = 0;
while (number != 0) {
int digit = number % 10;
reversed = reversed * 10 + digit;
number /= 10;
}
return reversed;
}
int isRSRN(int num) {
int square = num * num;
int reversedNum = rever... | 0 |
bbouzagui/all-project-remove | 7dbfbfe | t/0x0C-more_malloc_free/101-mul.c | C | www.github.com/bbouzagui/all-project-remove/tree/main/t/0x0C-more_malloc_free/101-mul.c | https://raw.githubusercontent.com/bbouzagui/all-project-remove/7dbfbfe/t/0x0C-more_malloc_free/101-mul.c | bbouzagui/all-project-remove 7dbfbfe t/0x0C-more_malloc_free/101-mul.c | true | 200 | 1,127 | #include "main.h"
#include <stdio.h>
#include <stdlib.h>
/**
* is_digit - Checks if a string contains only digits
* @str: The input string to check
*
* Return: 1 if all characters are digits, 0 otherwise
*/
int is_digit(char *str)
{
while (*str)
{
if (*str < '0' || *str > '9')
return (0);
str++;
}
retu... | 5 |
KailaButt/25sp327_ButtK | b6cc3b3 | queue.c | C | www.github.com/KailaButt/25sp327_ButtK/tree/main/queue.c | https://raw.githubusercontent.com/KailaButt/25sp327_ButtK/b6cc3b3/queue.c | KailaButt/25sp327_ButtK b6cc3b3 queue.c | true | 200 | 2,364 | #include <stdbool.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include "common.h"
#include "queue.h"
typedef struct node {
void* data;
struct node* next;
} node_t;
struct queue {
node_t* front;
node_t* rear;
pthread_mutex_t* mutex;
pthread_cond_t* cond;
bool closed;
... | 6 |
Osnitz/TP2_Synthese_PILLOT_LABOURE | 6392fb8 | main.c | C | www.github.com/Osnitz/TP2_Synthese_PILLOT_LABOURE/tree/main/main.c | https://raw.githubusercontent.com/Osnitz/TP2_Synthese_PILLOT_LABOURE/6392fb8/main.c | Osnitz/TP2_Synthese_PILLOT_LABOURE 6392fb8 main.c | true | 200 | 3,852 | #include "function.h"
void error(char *msg) {
perror(msg);
exit(1);
}
void sendTFTPRequest(int sockfd, const char *filename, struct addrinfo *server_info) {
// Constructing a Read Request (RRQ) packet
char requestPacket[MAX_BUFFER_SIZE];
// Opcode for a Read Request (RRQ)
short opcode = htons... | 1 |
robpayn/rchsm | daf230e | pkg/src/Rinterface/CHSM/Holon_R.h | C | www.github.com/robpayn/rchsm/tree/main/pkg/src/Rinterface/CHSM/Holon_R.h | https://raw.githubusercontent.com/robpayn/rchsm/daf230e/pkg/src/Rinterface/CHSM/Holon_R.h | robpayn/rchsm daf230e pkg/src/Rinterface/CHSM/Holon_R.h | true | 200 | 815 | /*!
\file Holon_R.h
\brief
R interface functions for access to Holon CHSM objects
\details
See the "related symbols" documentation of the Holon class for a
description of the R interface functions.
*/
#ifndef RINTERFACE_CHSM_HOLON_R_H_
#define RINTERFACE_CHSM_HOLON_R_H_
#include <R.h>
#include <Rin... | 2 |
FrankieVexx/alx-low_level_programming | b9cabbd | 0x13-more_singly_linked_lists/10-delete_nodeint.c | C | www.github.com/FrankieVexx/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/10-delete_nodeint.c | https://raw.githubusercontent.com/FrankieVexx/alx-low_level_programming/b9cabbd/0x13-more_singly_linked_lists/10-delete_nodeint.c | FrankieVexx/alx-low_level_programming b9cabbd 0x13-more_singly_linked_lists/10-delete_nodeint.c | true | 200 | 686 | #include "lists.h"
/**
* delete_nodeint_at_index - deletes the node at a given index
* on the listint_t list
* @head: apointer to the address of the head of listint_t
* @index: the index of the node to be deleted
*
* Return: 1 on success and -1 on failure
*/
int delete_nodeint_at_index(listint_t **head, unsigne... | 4 |
s0h1s2/blaze-os | d591ac6 | Drivers/keyboard.c | C | www.github.com/s0h1s2/blaze-os/tree/main/Drivers/keyboard.c | https://raw.githubusercontent.com/s0h1s2/blaze-os/d591ac6/Drivers/keyboard.c | s0h1s2/blaze-os d591ac6 Drivers/keyboard.c | true | 200 | 523 | #include "../Include/keyboard.h"
#include "../Include/isr.h"
#define IRQ1 33
void scanCode();
void initKeyboard(){
registerInterruptHandler(IRQ1, scanCode);
}
void scanCode(registers_t *regs){
uint8_t scancode=portByteIn(0x60);
switch (scancode) {
case 0x82:
print("1");
break;
case 0x83:
print("2");... | 7 |
Motunblue/alx-low_level_programming | 59ab458 | 0x15-file_io/2-append_text_to_file.c | C | www.github.com/Motunblue/alx-low_level_programming/tree/main/0x15-file_io/2-append_text_to_file.c | https://raw.githubusercontent.com/Motunblue/alx-low_level_programming/59ab458/0x15-file_io/2-append_text_to_file.c | Motunblue/alx-low_level_programming 59ab458 0x15-file_io/2-append_text_to_file.c | true | 200 | 726 | #include "main.h"
/**
* _strlen - Count a string
* @str: string to count NULL terminated
* Return: count of string
*/
size_t _strlen(char *str)
{
size_t i = 0;
while (str[i])
i++;
return (i);
}
/**
* append_text_to_file - Appends to a file
* @filename: name of file to append to
* @text_content: Content ... | 3 |
byhow/j2w | f55eb3c | src/memory/memory.c | C | www.github.com/byhow/j2w/tree/main/src/memory/memory.c | https://raw.githubusercontent.com/byhow/j2w/f55eb3c/src/memory/memory.c | byhow/j2w f55eb3c src/memory/memory.c | true | 200 | 5,819 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define HEAPSIZE 127
#define MAXARGV 80
// save word to the memory heap (as a implicit free list)
static unsigned char heap[HEAPSIZE]={0};
// save the blocks that are either free or allocated
static unsigned char blocklist[HEAPSIZE]={0};
// current block index... | 0 |
yoonseocho/CA | db738c9 | HW4/src/cache.c | C | www.github.com/yoonseocho/CA/tree/main/HW4/src/cache.c | https://raw.githubusercontent.com/yoonseocho/CA/db738c9/HW4/src/cache.c | yoonseocho/CA db738c9 HW4/src/cache.c | true | 200 | 8,348 | #include "../header/cache.h"
#include "../header/memory.h"
#include <stdio.h>
#include <stdlib.h>
// #define CACHE
// #define MEMORY_CHECK
// #define HIT
// #define MISS
// #define DATA_MEMORY
CacheLine inst_cache[CACHE_SIZE];
CacheLine data_cache[CACHE_SIZE];
int oldest_index = 0;
void init_cache() {
for (int i ... | 5 |
KOP-sl/alx-low_level_programming | 96b218a | 0x0F-function_pointers/100-main_opcodes.c | C | www.github.com/KOP-sl/alx-low_level_programming/tree/main/0x0F-function_pointers/100-main_opcodes.c | https://raw.githubusercontent.com/KOP-sl/alx-low_level_programming/96b218a/0x0F-function_pointers/100-main_opcodes.c | KOP-sl/alx-low_level_programming 96b218a 0x0F-function_pointers/100-main_opcodes.c | true | 200 | 539 | #include <stdio.h>
#include <stdlib.h>
/**
* main - prints its own opcodes
* @argc: number of arguments
* @argv: array of arguments
*
* Return: Always 0 (Success)
*/
int main(int argc, char *argv[])
{
int bytes, i;
char *arr;
if (argc != 2)
{
printf("Error\n");
exit(1);
}
bytes = atoi(argv[1]);
if (by... | 1 |
Subuhanallah24/alx-low_level_programming | 4991cf5 | 0x10-variadic_functions/1-print_numbers.c | C | www.github.com/Subuhanallah24/alx-low_level_programming/tree/main/0x10-variadic_functions/1-print_numbers.c | https://raw.githubusercontent.com/Subuhanallah24/alx-low_level_programming/4991cf5/0x10-variadic_functions/1-print_numbers.c | Subuhanallah24/alx-low_level_programming 4991cf5 0x10-variadic_functions/1-print_numbers.c | true | 200 | 647 | #include <stdio.h>
#include <stdarg.h>
#include "variadic_functions.h"
/**
* print_numbers - Prints a variable number of integers with a separator.
*
* @separator: The string to be printed between integers.
* @n: The number of integers to print.
* @...: Variable number of integers to be printed.
*/
void print_n... | 2 |
k0d3K/minishell | 6755eb9 | unit_tester/unit_test/unit_test.c | C | www.github.com/k0d3K/minishell/tree/main/unit_tester/unit_test/unit_test.c | https://raw.githubusercontent.com/k0d3K/minishell/6755eb9/unit_tester/unit_test/unit_test.c | k0d3K/minishell 6755eb9 unit_tester/unit_test/unit_test.c | true | 200 | 4,801 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* unit_test.c :+: :+: :+: ... | 4 |
Frimpong-Emmanuel99/alx-low_level_programming | c9d98fb | 0x04-more_functions_nested_loops/1-isdigit.c | C | www.github.com/Frimpong-Emmanuel99/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/1-isdigit.c | https://raw.githubusercontent.com/Frimpong-Emmanuel99/alx-low_level_programming/c9d98fb/0x04-more_functions_nested_loops/1-isdigit.c | Frimpong-Emmanuel99/alx-low_level_programming c9d98fb 0x04-more_functions_nested_loops/1-isdigit.c | true | 200 | 217 | #include "main.h"
/**
* _isdigit - A program to check if a value is a digit
* @c: the character checker
* Return: return 1 if digit or 0 if otherwise
*/
int _isdigit(int c)
{
return (c >= '0' && c <= '9');
}
| 7 |
jparke10/CS415 | 1dd9b2c | project3/part4/bank.c | C | www.github.com/jparke10/CS415/tree/main/project3/part4/bank.c | https://raw.githubusercontent.com/jparke10/CS415/1dd9b2c/project3/part4/bank.c | jparke10/CS415 1dd9b2c project3/part4/bank.c | true | 200 | 14,987 | #include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <limits.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <unistd.h>
#include <signal.h>
#include "account.h"
#include "string_parser.h"
#define NUM_THREADS 10
#define REQUEST_THRE... | 3 |
LanaDias/Meus-c-digos-em-c | 79f8abd | pesoideal/main.c | C | www.github.com/LanaDias/Meus-c-digos-em-c/tree/main/pesoideal/main.c | https://raw.githubusercontent.com/LanaDias/Meus-c-digos-em-c/79f8abd/pesoideal/main.c | LanaDias/Meus-c-digos-em-c 79f8abd pesoideal/main.c | true | 200 | 794 | #include <stdio.h>
#include <stdlib.h>
int main()
{
int sexo;
float altura, pesoideal;
// Coleta de dados
printf("Digite sua altura (em metros):\n");
scanf("%f", &altura);
printf("Digite seu sexo (1 para feminino ou 2 para masculino):\n");
scanf("%i", &sexo);
// C�lculo ... | 6 |
4ierXform196883/OS | 6e98ba1 | lab10/mutex-cond.c | C | www.github.com/4ierXform196883/OS/tree/main/lab10/mutex-cond.c | https://raw.githubusercontent.com/4ierXform196883/OS/6e98ba1/lab10/mutex-cond.c | 4ierXform196883/OS 6e98ba1 lab10/mutex-cond.c | true | 200 | 2,154 | #include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#define ARRAY_SIZE 27
#define NUM_READERS 10
char shared_array[ARRAY_SIZE];
bool writer_finished = false;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t cond = PTHREAD_COND_INITIALIZ... | 0 |
sungwoopark95/QualExamCoding | 6bf20f0 | sungwoopark95/C/Math/FindSelfNumber.c | C | www.github.com/sungwoopark95/QualExamCoding/tree/main/sungwoopark95/C/Math/FindSelfNumber.c | https://raw.githubusercontent.com/sungwoopark95/QualExamCoding/6bf20f0/sungwoopark95/C/Math/FindSelfNumber.c | sungwoopark95/QualExamCoding 6bf20f0 sungwoopark95/C/Math/FindSelfNumber.c | true | 200 | 1,215 | /*
자연수 n에 대해서, 어떠한 자연수 k에 대해서도 k와 k의 각 자리 수를 모두 더했을 때 n으로 만들 수 없으면, n을 self number라고 한다. (https://en.wikipedia.org/wiki/Self_number)
예를 들어, 21 = 15 + 1 + 5이므로(n = 21, k = 15) 21은 self number가 아니다.
또 다른 예로, 19 = 14 + 1 + 4 이므로 (n=19, k=14) 19 역시 self number가 아니다.
반면 20은 그러한 k가 존재하지 않으므로 self number가 맞다.
자연수 n을 입력 ... | 5 |
Seger01/driverontwikkeling | 8783652 | WK1/3.9/c_application/main.c | C | www.github.com/Seger01/driverontwikkeling/tree/main/WK1/3.9/c_application/main.c | https://raw.githubusercontent.com/Seger01/driverontwikkeling/8783652/WK1/3.9/c_application/main.c | Seger01/driverontwikkeling 8783652 WK1/3.9/c_application/main.c | true | 200 | 948 | #include <stdio.h>
int main() {
// File pointer for input and output file
FILE *input_file, *output_file;
char ch;
// Open the input file in read mode
input_file = fopen("/dev/mydriver", "r");
// Check if the input file exists and opened successfully
if (input_file == NULL) {
prin... | 1 |
Code-forlife/Programs-in-C-language | d00db36 | Programs 10/Problem1.c | C | www.github.com/Code-forlife/Programs-in-C-language/tree/main/Programs 10/Problem1.c | https://raw.githubusercontent.com/Code-forlife/Programs-in-C-language/d00db36/Programs%2010/Problem1.c | Code-forlife/Programs-in-C-language d00db36 Programs 10/Problem1.c | true | 200 | 900 | #include<stdio.h>
void categorise_books(char file_b[],char file_h[],char file_p[])
{
char type,title[30],author[20];
float price;
FILE*fp1,*fp2,*fp3;
fp1=fopen(file_b,"r");//Opening the file
fp2=fopen(file_h,"w");
fp3=fopen(file_p,"w");
while(fscanf(fp1,"%c,%[^,],%[^,],%f\n",&type,title,auth... | 2 |
bonidees/IOT_Stuff | f3d741e | Sauna_Tracker_V2_ESP32_Edgent_W/Settings.h | C | www.github.com/bonidees/IOT_Stuff/tree/main/Sauna_Tracker_V2_ESP32_Edgent_W/Settings.h | https://raw.githubusercontent.com/bonidees/IOT_Stuff/f3d741e/Sauna_Tracker_V2_ESP32_Edgent_W/Settings.h | bonidees/IOT_Stuff f3d741e Sauna_Tracker_V2_ESP32_Edgent_W/Settings.h | true | 200 | 2,570 |
/*
* Board configuration (see examples below).
*/
#if defined(USE_WROVER_BOARD)
#define BOARD_BUTTON_PIN 0
#define BOARD_BUTTON_ACTIVE_LOW true
#define BOARD_LED_PIN_R 25
#define BOARD_LED_PIN_G 25
#define BOARD_LED_PIN_B 25
#define BOARD_LED_INVERSE ... | 4 |
dupe211/alx-low_level_programming | f4d7cd1 | 0x04-more_functions_nested_loops/3-print_numbers.c | C | www.github.com/dupe211/alx-low_level_programming/tree/main/0x04-more_functions_nested_loops/3-print_numbers.c | https://raw.githubusercontent.com/dupe211/alx-low_level_programming/f4d7cd1/0x04-more_functions_nested_loops/3-print_numbers.c | dupe211/alx-low_level_programming f4d7cd1 0x04-more_functions_nested_loops/3-print_numbers.c | true | 200 | 237 | #include "main.h"
/**
* print_numbers - a function that prints the numbers, from 0 to 9
*
* Return: 0-9 followed by newline
*
*/
void print_numbers(void)
{
int i;
for (i = 0; i <= 9; i++)
_putchar(i + '0');
_putchar('\n');
}
| 7 |
Miao-zeyun/PA | ee8edf3 | code/nemu/src/monitor/debug/expr.c | C | www.github.com/Miao-zeyun/PA/tree/main/code/nemu/src/monitor/debug/expr.c | https://raw.githubusercontent.com/Miao-zeyun/PA/ee8edf3/code/nemu/src/monitor/debug/expr.c | Miao-zeyun/PA ee8edf3 code/nemu/src/monitor/debug/expr.c | true | 200 | 9,124 | #include "nemu.h"
/* We use the POSIX regex functions to process regular expressions.
* Type 'man regex' for more information about POSIX regex functions.
*/
#include <sys/types.h>
#include <regex.h>
enum {
TK_NOTYPE = 256, TK_HEXNUM, TK_NUM, TK_REG, TK_LP, TK_RP,
TK_EQ, TK_NOTEQ, TK_AND, TK_OR,
TK_NEG, TK_DE... | 6 |
LennoNunes/Cartorioebac | 705ecbd | Cartorio.c | C | www.github.com/LennoNunes/Cartorioebac/tree/main/Cartorio.c | https://raw.githubusercontent.com/LennoNunes/Cartorioebac/705ecbd/Cartorio.c | LennoNunes/Cartorioebac 705ecbd Cartorio.c | true | 200 | 5,568 | #include <stdio.h> //biblioteca de comunica��o com usu�rio
#include <stdlib.h> //biblioteca de aloca��o de espa�o em memoria
#include <locale.h> //biblioteca de aloca��o de texto por regi�o
#include <string.h> //biblioteca respons�vel por cuidar das strings
int registro() //Fun��o responsavel por cadastrar no si... | 3 |
modio/modio-ue | bbd6091 | Source/Modio/Public/Types/ModioValidationError.h | C | www.github.com/modio/modio-ue/tree/main/Source/Modio/Public/Types/ModioValidationError.h | https://raw.githubusercontent.com/modio/modio-ue/bbd6091/Source/Modio/Public/Types/ModioValidationError.h | modio/modio-ue bbd6091 Source/Modio/Public/Types/ModioValidationError.h | true | 200 | 964 | /*
* Copyright (C) 2024 mod.io Pty Ltd. <https://mod.io>
*
* This file is part of the mod.io UE Plugin.
*
* Distributed under the MIT License. (See accompanying file LICENSE or
* view online at <https://github.com/modio/modio-ue/blob/main/LICENSE>)
*
*/
#pragma once
#include "Containers/UnrealStr... | 0 |
Bingo76/task-heatmap | 9682db7 | task_heatmap.c | C | www.github.com/Bingo76/task-heatmap/tree/main/task_heatmap.c | https://raw.githubusercontent.com/Bingo76/task-heatmap/9682db7/task_heatmap.c | Bingo76/task-heatmap 9682db7 task_heatmap.c | true | 200 | 14,056 | #define _XOPEN_SOURCE
#include <gtk/gtk.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <glib.h> // For g_get_home_dir
#include <sys/stat.h> // For mkdir
#define DAYS_IN_YEAR 365
#define MAX_TASKS 10
#define FILENAME ".taskheatmap/tasks.dat"
#define ACTIVITIES_FILE ".taskheatmap/activities.dat"
#... | 5 |
BrahimMengouchi98/get_next_line | 5ca3cf2 | get_next_line_bonus.c | C | www.github.com/BrahimMengouchi98/get_next_line/tree/main/get_next_line_bonus.c | https://raw.githubusercontent.com/BrahimMengouchi98/get_next_line/5ca3cf2/get_next_line_bonus.c | BrahimMengouchi98/get_next_line 5ca3cf2 get_next_line_bonus.c | true | 200 | 2,626 | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line_bonus.c :+: :+: :+: ... | 1 |
Hustcw/VulBench | 85270f5 | data/ctf/zer0pts_2020_protrude/full_context.c | C | www.github.com/Hustcw/VulBench/tree/main/data/ctf/zer0pts_2020_protrude/full_context.c | https://raw.githubusercontent.com/Hustcw/VulBench/85270f5/data/ctf/zer0pts_2020_protrude/full_context.c | Hustcw/VulBench 85270f5 data/ctf/zer0pts_2020_protrude/full_context.c | true | 200 | 1,035 | _QWORD n;
__int64 read_long()
{
char s[40]; // [rsp+10h] [rbp-30h] BYREF
unsigned __int64 v2; // [rsp+38h] [rbp-8h]
v2 = __readfsqword(0x28u);
memset(s, 0, 0x20uLL);
if ( !(unsigned int)read(0, s, 0x20uLL) )
{
puts("[ERROR] read failed");
exit(1);
}
return atol(s);
}
int __cdecl main(int argc... | 4 |
bochan7/c | 80de9de | graded_lab002/p1.c | C | www.github.com/bochan7/c/tree/main/graded_lab002/p1.c | https://raw.githubusercontent.com/bochan7/c/80de9de/graded_lab002/p1.c | bochan7/c 80de9de graded_lab002/p1.c | true | 200 | 794 | /*Question 1---
Write a C program to implement linear search and binary search on an array.
(Note: Please take a pre-sorted array as input). */
#include<stdio.h>
int main(){
int count = 0;
int z;
printf("enter the size of the array:\n");
scanf("%d",&z);
int arr[z];
int n;
printf("enter the number of element t... | 7 |
kpatsakis/primevul10 | 0e7c7c0 | 209111.c | C | www.github.com/kpatsakis/primevul10/tree/main/209111.c | https://raw.githubusercontent.com/kpatsakis/primevul10/0e7c7c0/209111.c | kpatsakis/primevul10 0e7c7c0 209111.c | true | 200 | 420 | BOOL is_logbook_in_group(LBLIST pgrp, char *logbook)
/* test if "logbook" is in group node plb */
{
int i;
if (strieq(logbook, pgrp->name))
return TRUE;
for (i = 0; i < pgrp->n_members; i++) {
if (strieq(logbook, pgrp->member[i]->name))
return TRUE;
if (pgrp->member[i]->n_members ... | 6 |
Ganesh4822/C | 3b787ed | cloud shell codes/c-codes/c-codes/odds-and-ends/accessing_address_zero.c | C | www.github.com/Ganesh4822/C/tree/main/cloud shell codes/c-codes/c-codes/odds-and-ends/accessing_address_zero.c | https://raw.githubusercontent.com/Ganesh4822/C/3b787ed/cloud%20shell%20%20codes/c-codes/c-codes/odds-and-ends/accessing_address_zero.c | Ganesh4822/C 3b787ed cloud shell codes/c-codes/c-codes/odds-and-ends/accessing_address_zero.c | true | 200 | 201 | #include<stdio.h>
int main(void)
{
int n;
n = 0;
int *p = (int*)n;
printf("before : %p\n",p);
*p = 10;
printf("value : %d at %llu\n",*p,p);
//p = (int*)tmp;
//printf("after : %llu\n", p);
}
| 2 |
cosmicruft/alx-low_level_programming | af9ad3a | 0x13-more_singly_linked_lists/8-sum_listint.c | C | www.github.com/cosmicruft/alx-low_level_programming/tree/main/0x13-more_singly_linked_lists/8-sum_listint.c | https://raw.githubusercontent.com/cosmicruft/alx-low_level_programming/af9ad3a/0x13-more_singly_linked_lists/8-sum_listint.c | cosmicruft/alx-low_level_programming af9ad3a 0x13-more_singly_linked_lists/8-sum_listint.c | true | 200 | 264 | #include "lists.h"
/**
* sum_listint - sums all elements of a list
* @head: pointer to the head of the list
* Return: sum of all elements
*/
int sum_listint(listint_t *head)
{
int sum;
for (sum = 0; head; sum += head->n, head = head->next)
;
return (sum);
}
| 3 |
junghyun21/coding-test | 70d709f | 백준/Gold/1726. 로봇/로봇.c | C | www.github.com/junghyun21/coding-test/tree/main/백준/Gold/1726. 로봇/로봇.c | https://raw.githubusercontent.com/junghyun21/coding-test/70d709f/%EB%B0%B1%EC%A4%80/Gold/1726.%E2%80%85%EB%A1%9C%EB%B4%87/%EB%A1%9C%EB%B4%87.c | junghyun21/coding-test 70d709f 백준/Gold/1726. 로봇/로봇.c | true | 200 | 7,291 | #include <stdio.h>
#include <stdlib.h>
typedef struct Node{
int r; // 행
int c; // 열
int d; // 방향
struct Node *next;
} Node;
typedef struct Queue{
Node *front;
Node *rear;
} Queue;
Queue queue;
int **map; // 공장 내 궤도맵
int ***visit; // 최소 방문 횟수
int M, N; // 세로, 가로
int sR, sC... | 0 |
arutimasu/6502Emu | 5e321ee | cpu.c | C | www.github.com/arutimasu/6502Emu/tree/main/cpu.c | https://raw.githubusercontent.com/arutimasu/6502Emu/5e321ee/cpu.c | arutimasu/6502Emu 5e321ee cpu.c | true | 200 | 2,236 | #include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <SDL.h>
#define MEMORY_SIZE 65536 // 64 KB ������ ��� 6502
extern Uint32* screenBuffer;
// ��������� ���������� 6502
typedef struct {
uint8_t A; // �����������
uint8_t X; // �������� X
uint8_t Y; ... | 5 |
madhavjd/SE-Assignments | c823f9a | Module 3/MODULE 3.2 (C Language Programing with C)/10 summation of given number.c | C | www.github.com/madhavjd/SE-Assignments/tree/main/Module 3/MODULE 3.2 (C Language Programing with C)/10 summation of given number.c | https://raw.githubusercontent.com/madhavjd/SE-Assignments/c823f9a/Module%203/MODULE%203.2%20%28C%20Language%20Programing%20with%20C%29/10%20summation%20of%20given%20number.c | madhavjd/SE-Assignments c823f9a Module 3/MODULE 3.2 (C Language Programing with C)/10 summation of given number.c | true | 200 | 245 | //10 summation of given number
#include<stdio.h>
int main()
{
int n,sum=0;
printf("Enter a number: ");
scanf("%d",&n);
while(n>0)
{
sum+=n%10;
n/=10;
}
printf("Summation of a number is: %d",sum);
return 0;
}
| 1 |
pedrozzkvic/Estrutura-de-dados | b2f1269 | filas.c | C | www.github.com/pedrozzkvic/Estrutura-de-dados/tree/main/filas.c | https://raw.githubusercontent.com/pedrozzkvic/Estrutura-de-dados/b2f1269/filas.c | pedrozzkvic/Estrutura-de-dados b2f1269 filas.c | true | 200 | 1,942 | #include <stdio.h>
#include <stdlib.h>
#define Max 10
typedef struct no{
int Dado;
struct no *Proximo;
} No;
No *Inicio = NULL, *Fim = NULL;
void Enfileirar(int Dado){
No *Novo = (No*)malloc(sizeof(No));
Novo -> Dado = Dado;
Novo -> Proximo = NULL;
if (Inicio == NULL){
Inicio = ... | 4 |
Youssef-Saad-99/alx-low_level_programming | e8c9b0a | 0x07-pointers_arrays_strings/0-memset.c | C | www.github.com/Youssef-Saad-99/alx-low_level_programming/tree/main/0x07-pointers_arrays_strings/0-memset.c | https://raw.githubusercontent.com/Youssef-Saad-99/alx-low_level_programming/e8c9b0a/0x07-pointers_arrays_strings/0-memset.c | Youssef-Saad-99/alx-low_level_programming e8c9b0a 0x07-pointers_arrays_strings/0-memset.c | true | 200 | 349 | #include "main.h"
/**
* _memset - A function that fills memory with a constant byte
*
* @s: First char input
* @b: second char input
* @n: Third integer input
*
* Return: A pointer to the memory area s
*/
char *_memset(char *s, char b, unsigned int n)
{
unsigned int it;
for (it = 0; n > 0; it++, n--)
{
s... | 7 |
rxaxn14/12-317 | 137d0a7 | 12.c | C | www.github.com/rxaxn14/12-317/tree/main/12.c | https://raw.githubusercontent.com/rxaxn14/12-317/137d0a7/12.c | rxaxn14/12-317 137d0a7 12.c | true | 200 | 627 | #include <stdio.h>
#include <omp.h>
void fibonacci(int n) {
int fib[n];
fib[0] = 0;
fib[1] = 1;
#pragma omp parallel shared(fib) private(n)
{
#pragma omp for
for (int i = 2; i < n; i++) {
fib[i] = fib[i - 1] + fib[i - 2];
}
}
printf("Ser... | 2 |
Nhlobo/alx-low_level_programming | 5d254a8 | 0x10-variadic_functions/0-sum_them_all.c | C | www.github.com/Nhlobo/alx-low_level_programming/tree/main/0x10-variadic_functions/0-sum_them_all.c | https://raw.githubusercontent.com/Nhlobo/alx-low_level_programming/5d254a8/0x10-variadic_functions/0-sum_them_all.c | Nhlobo/alx-low_level_programming 5d254a8 0x10-variadic_functions/0-sum_them_all.c | true | 200 | 375 | #include "variadic_functions.h"
#include <stdarg.h>
/**
* sum_them_all - the sum of all its parameter
* @n: number of parameter
* Return: @sum | 0(@n == 0)
*/
int sum_them_all(const unsigned int n, ...)
{
unsigned int i;
int sum = 0;
va_list op;
va_start(op, n);
if (n == 0)
return (0);
for (i = 0; ... | 6 |
SwAt1563/realtime-and-embedded-systems-tutorial | ea9db01 | Realtime Course with Docker and C Language/4. Debug Teams Project using gdb/main.c | C | www.github.com/SwAt1563/realtime-and-embedded-systems-tutorial/tree/main/Realtime Course with Docker and C Language/4. Debug Teams Project using gdb/main.c | https://raw.githubusercontent.com/SwAt1563/realtime-and-embedded-systems-tutorial/ea9db01/Realtime%20Course%20with%20Docker%20and%20C%20Language/4.%20Debug%20Teams%20Project%20using%20gdb/main.c | SwAt1563/realtime-and-embedded-systems-tutorial ea9db01 Realtime Course with Docker and C Language/4. Debug Teams Project using gdb/main.c | true | 200 | 1,673 |
#include "header.h"
#include "constants.h"
#include "functions.h"
void printParent(pid_t id){
printf("Hello i'm the main file, my id is: %d\n", id);
printf("...\n");
}
int main(int argc, char** argv){
int sleep = 1;
while (sleep);
pid_t parent_id = getpid();
printParent(parent_id);
... | 3 |
askn37/multix-zinnia-sdk-megaAVR | eeeed32 | bootloaders/boot_ax/boot_ax.h | C | www.github.com/askn37/multix-zinnia-sdk-megaAVR/tree/main/bootloaders/boot_ax/boot_ax.h | https://raw.githubusercontent.com/askn37/multix-zinnia-sdk-megaAVR/eeeed32/bootloaders/boot_ax/boot_ax.h | askn37/multix-zinnia-sdk-megaAVR eeeed32 bootloaders/boot_ax/boot_ax.h | true | 200 | 14,071 | /**
* @file boot_ax.h
* @author askn (K.Sato) multix.jp
* @brief
* @version 3.7
* @date 2023-11-30
*
* @copyright Copyright (c) 2024 askn37 at github.com
*
*/
// MIT License : https://askn37.github.io/LICENSE.html
#pragma once
/*** Default vaules ***/
#define BOOT_HW_VER '0' /* Make sure to match the NVMCTR... | 0 |
MarkYe001/test001 | d64186f | WSN001_data005/Code_user/Peripheral/usart/usart_coordinator.c | C | www.github.com/MarkYe001/test001/tree/main/WSN001_data005/Code_user/Peripheral/usart/usart_coordinator.c | https://raw.githubusercontent.com/MarkYe001/test001/d64186f/WSN001_data005/Code_user/Peripheral/usart/usart_coordinator.c | MarkYe001/test001 d64186f WSN001_data005/Code_user/Peripheral/usart/usart_coordinator.c | true | 200 | 11,191 | /***************************************************************************/
//#include "head_file.h"
#include "usart_coordinator.h"
#include "wsn_hostcmd.h"
/***************************************************************************/
//ʹ��printf��ӡ��������Ҫ�ض���fputc����
#if USARTx_PRINTF
int fputc(int ch, FILE *... | 5 |
realme-kernel-opensource/realmeQ3_Q3pro_AndroidS_vendor-source | d79c6eb | vendor/oplus/sensor/kernel/qcom/sensor/oplus_ssc_interact/oplus_ssc_interact.c | C | www.github.com/realme-kernel-opensource/realmeQ3_Q3pro_AndroidS_vendor-source/tree/main/vendor/oplus/sensor/kernel/qcom/sensor/oplus_ssc_interact/oplus_ssc_interact.c | https://raw.githubusercontent.com/realme-kernel-opensource/realmeQ3_Q3pro_AndroidS_vendor-source/d79c6eb/vendor/oplus/sensor/kernel/qcom/sensor/oplus_ssc_interact/oplus_ssc_interact.c | realme-kernel-opensource/realmeQ3_Q3pro_AndroidS_vendor-source d79c6eb vendor/oplus/sensor/kernel/qcom/sensor/oplus_ssc_interact/oplus_ssc_interact.c | true | 200 | 9,332 | /* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2018-2020 Oplus. All rights reserved.
*/
#define pr_fmt(fmt) "<ssc_interactive>" fmt
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/atom... | 1 |
tsunaley/shelter | 698484f | src/vm_manager.c | C | www.github.com/tsunaley/shelter/tree/main/src/vm_manager.c | https://raw.githubusercontent.com/tsunaley/shelter/698484f/src/vm_manager.c | tsunaley/shelter 698484f src/vm_manager.c | true | 200 | 5,369 | #include "vm_manager.h"
#include "log.h"
#include "tools.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
/*
* 函数 make_dockerfile() 用于创建 Dockerfile
* 参数:
* - const char *tag: Docker 镜像的标签
* 返回值:
* - int: 正常结束返回0
*/
int make_docker... | 4 |
OmarYasser225/C-Project | cdcb255 | School Data Base/feature.c | C | www.github.com/OmarYasser225/C-Project/tree/main/School Data Base/feature.c | https://raw.githubusercontent.com/OmarYasser225/C-Project/cdcb255/School%20Data%20Base/feature.c | OmarYasser225/C-Project cdcb255 School Data Base/feature.c | true | 200 | 619 | //
// Created by omarn on 11/2/2023.
//
#include "feature.h"
void setColor(int ForgC)
{
//We will need this handle to get the current background attribute
WORD wColor;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
//we use csbi for the wAttributes word.
CONSOLE_SCREEN_BUFFER_IN... | 7 |
Lotus-owl/practice | b471804 | c_src/src/celsius2Fahr.c | C | www.github.com/Lotus-owl/practice/tree/main/c_src/src/celsius2Fahr.c | https://raw.githubusercontent.com/Lotus-owl/practice/b471804/c_src/src/celsius2Fahr.c | Lotus-owl/practice b471804 c_src/src/celsius2Fahr.c | true | 200 | 215 | #include <stdio.h>
int main(void)
{
int celsius;
double fahr;
//celsius = 40;
scanf("%d", &celsius);
fahr = 9.0 / 5.0 * celsius + 32;
printf("celsius: %d ---> fahr: %.1f\n", celsius, fahr);
return 0;
}
| 3 |
ismaeelbashir03/BASH_ir_shell | 14e9d50 | sample_script/GOF.c | C | www.github.com/ismaeelbashir03/BASH_ir_shell/tree/main/sample_script/GOF.c | https://raw.githubusercontent.com/ismaeelbashir03/BASH_ir_shell/14e9d50/sample_script/GOF.c | ismaeelbashir03/BASH_ir_shell 14e9d50 sample_script/GOF.c | true | 200 | 1,929 | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define ROWS 20
#define COLS 40
void initialize(int grid[ROWS][COLS]) {
int glider[3][3] = {
{0, 1, 0},
{0, 0, 1},
{1, 1, 1}
};
for (int i = 0; i < ROWS; i++) {
for (int j = 0; j < COLS; j++) {
grid[i][... | 0 |
lordburaa/alx-low_level_programming | dcf1fee | 0x17-doubly_linked_lists/7-insert_dnodeint.c | C | www.github.com/lordburaa/alx-low_level_programming/tree/main/0x17-doubly_linked_lists/7-insert_dnodeint.c | https://raw.githubusercontent.com/lordburaa/alx-low_level_programming/dcf1fee/0x17-doubly_linked_lists/7-insert_dnodeint.c | lordburaa/alx-low_level_programming dcf1fee 0x17-doubly_linked_lists/7-insert_dnodeint.c | true | 200 | 938 | #include "lists.h"
/**
* insert_dnodeint_at_index - insert new node at given positon
* @h: head
* @idx: index
* @n: number
* Return: the address of the new node
*/
dlistint_t *insert_dnodeint_at_index(dlistint_t **h, unsigned int idx, int n)
{
dlistint_t *temp = *h;
dlistint_t *new = malloc(sizeof(dlistint_t))... | 6 |
nachopitt/opengl-es-training | 668ac96 | src/triangle.c | C | www.github.com/nachopitt/opengl-es-training/tree/main/src/triangle.c | https://raw.githubusercontent.com/nachopitt/opengl-es-training/668ac96/src/triangle.c | nachopitt/opengl-es-training 668ac96 src/triangle.c | true | 200 | 1,247 | #include <stdlib.h>
#include <stdio.h>
#include "esUtil.h"
#include "gl-utils.h"
// Draw a triangle using the shader pair created in Init()
void DrawTriangle(ESContext* esContext) {
GLfloat vVertices[] = {
0.0f, 0.5f, 0.0f,
-0.5f, -0.5f, 0.0f,
0.5f, -0.5f, 0.0f,
};
GLfloat vColors[... | 5 |
MikeOdhiambo/alx-low_level_programming | 29a411e | 0x0A-argc_argv/0-whatsmyname.c | C | www.github.com/MikeOdhiambo/alx-low_level_programming/tree/main/0x0A-argc_argv/0-whatsmyname.c | https://raw.githubusercontent.com/MikeOdhiambo/alx-low_level_programming/29a411e/0x0A-argc_argv/0-whatsmyname.c | MikeOdhiambo/alx-low_level_programming 29a411e 0x0A-argc_argv/0-whatsmyname.c | true | 200 | 308 | #include <stdio.h>
#include "main.h"
/**
* main - Prints the name of the program folowed by a new line
* @argc: Number of command line arguments
* @argv: Array of pointers to arguments
*
* Return: Always 0
*/
int main(int argc, char *argv[])
{
(void) argc;
printf("%s\n", argv[0]);
return (0);
}
| 1 |
jim2832/Computer-Architecture | 0291144 | HW/HW1/block_matrix_mul.c | C | www.github.com/jim2832/Computer-Architecture/tree/main/HW/HW1/block_matrix_mul.c | https://raw.githubusercontent.com/jim2832/Computer-Architecture/0291144/HW/HW1/block_matrix_mul.c | jim2832/Computer-Architecture 0291144 HW/HW1/block_matrix_mul.c | true | 200 | 1,314 | #include <stdio.h>
#include <stdlib.h>
#define N 4
#define BLOCK_SIZE 2
void show_matrix(int matrix[N][N]);
int main(void){
int A[N][N], B[N][N], C[N][N];
//init
/*
for(int i=0; i<N; i++){
for(int j=0; j<N; j++){
A[i][j] = 0;
B[i][j] = 0;
C[i][j] = 0;
... | 2 |
MarcoCiau/lvgl_tutorials | 710ce10 | lvgl_image_example/src/UI/ui.c | C | www.github.com/MarcoCiau/lvgl_tutorials/tree/main/lvgl_image_example/src/UI/ui.c | https://raw.githubusercontent.com/MarcoCiau/lvgl_tutorials/710ce10/lvgl_image_example/src/UI/ui.c | MarcoCiau/lvgl_tutorials 710ce10 lvgl_image_example/src/UI/ui.c | true | 200 | 3,066 | #include "ui.h"
#include "ui_helpers.h"
int goto_widget_flag=0;
int zero_clean=0;
int bar_flag=0;
///////////////////// VARIABLES ////////////////////
lv_obj_t * ui_BEGIN;
lv_obj_t * home_img_demo;
lv_obj_t * hello_label;
///////////////////// TEST LVGL SETTINGS ////////////////////
#if LV_COLOR_DEPTH != 16
#error... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.