source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
#include <stdio.h> int main() { char tmp[100] = { 0 }; int n, k, sum = 0, max; scanf("%d %d", &n, &k); for (int i = 0; i < k; i++) { scanf("%d", tmp + i); sum += tmp[i]; } max = sum; for (int i = k; i < n; i++) { scanf("%d", tmp + i); sum += tmp[i] - tmp[i - k]; if (max < sum) max = sum; } printf("%...
1,328,400
the-stack-v2-dedup
C
/* * menu.h * * Created by William Mann */ #ifndef MAINMENU_MENU_H_ #define MAINMENU_MENU_H_ /*Libraries used*/ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <highscore.h> #include <structures.h> /***************************************************************************...
1,328,401
the-stack-v2-dedup
C
#ifndef __LIB__ACPI_H__ #define __LIB__ACPI_H__ void *get_rsdp(void); #endif
1,328,402
the-stack-v2-dedup
C
/******************************************************************************* * Author: Adam Phelps * License: Create Commons Attribution-Non-Commercial * Copyright: 2014 ******************************************************************************/ #ifndef HMTL_FIRE_CONTROL_H #define HMTL_FIRE_CONTROL_H #inc...
1,328,403
the-stack-v2-dedup
C
#include <sndfile.h> float *getSegmentFrame(int i, float *infile_float, int n_frame, int n_step, int offset);
1,328,404
the-stack-v2-dedup
C
#include "include/main.h" #define leakyRelu(x,y) ((x>y)?x:x*0.1) #define max(x,y) ((x>y)?x:y) cl_platform_id platform; cl_device_id device; cl_context context; cl_command_queue queue; cl_program program; ////////////////////////////// // Setting Data/tensor Part // ////////////////////////////// tensor* get_tensor(...
1,328,405
the-stack-v2-dedup
C
#include <stdio.h> #include <fcntl.h> /* For O_* constants */ #include <sys/stat.h> /* For mode constants */ #include <mqueue.h> int main(int argc, char** argv){ mqd_t mqd; struct mq_attr attr; if(argc!=2) perror("usage: queue_details <name>"); mqd = mq_open(argv[1], O_RDONLY ...
1,328,406
the-stack-v2-dedup
C
//使用数组精确计算M/N(0<M<N<=100)的值。假如M/N是无限循环小数,则计算并输出它的第一循环节,同时要求输出循环节的起止位置(小数位的序号)。 #include<stdio.h> int main() { int m, n, i, j; int remainder[101]={0}, quotient[101]={0}; /*remainder:存放除法的余数; quotient:依次存放商的每一位*/ printf("Please input a fraction(m/n)(<0<m<n<=100):"); scanf("%d/%d", &m, &n); /*输入被除数和除...
1,328,407
the-stack-v2-dedup
C
/* $Id:$ // lcdLibrary.c ST7565 LCD library! 8 bit parallel mode Data lines D0[0:7] connected to PORTD[0:7] Control lines connected to PORTC[0:4] 3 Normally Open Buttons Connected to PORTB */ #include <avr/io.h> #include <avr/delay.h> #include <stdlib.h> #include <avr/interrupt.h> #include "myFont.h" ...
1,328,408
the-stack-v2-dedup
C
#pragma once #include "types.h" //regs u32 pvr_sb_readreg_Pvr(u32 addr,u32 sz); void pvr_sb_writereg_Pvr(u32 addr,u32 data,u32 sz); //Init/Term , global void pvr_sb_Init(); void pvr_sb_Term(); //Reset -> Reset - Initialise void pvr_sb_Reset(bool Manual);
1,328,409
the-stack-v2-dedup
C
//------------------------------------------------------------------------------ // GrB_Vector_apply: apply a unary operator to a vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved. // http://suitesparse...
1,328,410
the-stack-v2-dedup
C
#include "std.h" THREE_EXIT("players/hagbard/castle/westp2","south" ,"players/hagbard/sub/captains","west" ,"players/hagbard/sub1/landing","down" ,"The conning tower of the Lief Erickson", "The conning tower of the sub Lief Erickson.\n",1)
1,328,411
the-stack-v2-dedup
C
//--------------------------------------------------------------------------- #ifndef tInfoH #define tInfoH //--------------------------------------------------------------------------- #endif
1,328,412
the-stack-v2-dedup
C
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class jogamp_common_os_WindowsDynamicLinkerImpl */ #ifndef _Included_jogamp_common_os_WindowsDynamicLinkerImpl #define _Included_jogamp_common_os_WindowsDynamicLinkerImpl #ifdef __cplusplus extern "C" { #endif #undef jogamp_common_os_...
1,328,413
the-stack-v2-dedup
C
/** * CS3600, Spring 2013 * Project 1 Starter Code * (c) 2013 Alan Mislove * * You should use this (very simple) starter code as a basis for * building your shell. Please see the project handout for more * details. */ /* * Completed by * Team MuffinButton * (Cody Wetherby / Edwin Cowart) * on 2014/01/30 ...
1,328,414
the-stack-v2-dedup
C
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<float.h> int main() { printf("FLT_MAX = %f\n\n", FLT_MAX); printf("DBL_MAX = %f\n\n", DBL_MAX); printf("LDBL_MAX = %lf\n\n", LDBL_MAX); printf("FLT_MIN = %f\n\n", FLT_MIN); printf("DBL_MIN = %f\n\n", DBL_MIN); printf("LDBL_MIN = %f\n\n...
1,328,415
the-stack-v2-dedup
C
#ifndef __VIRTIO_VIRTIO_H__ #define __VIRTIO_VIRTIO_H__ #include <types.h> #include <driver/dma.h> #include "../virtio_legacy.h" #include "../virtio_modern.h" // // "5 Device Types" // #define VIRTIO_DEVICE_NET 1 // // "2.1 Device Status Field" // #define VIRTIO_STATUS_ACK 1 #define VIRTIO_STATUS_DRIVE...
1,328,416
the-stack-v2-dedup
C
/* ==================================================================== * Copyright (c) 1995 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of sou...
1,328,417
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_percent_speficier.c :+: :+: :+: ...
1,328,418
the-stack-v2-dedup
C
#ifndef DEBUG_H #define DEBUG_H #define DODEBUG #ifdef DODEBUG void debug(int a, int b); void debug(TSTR str); void debug(int kprint); void debugnl(int kprint); void debug(unsigned int kprint); void debug(float kprint); void debug(double kprint); void debug(Point3 kprint); void debug(IPoint3 kprint); void debug(Matr...
1,328,419
the-stack-v2-dedup
C
#ifndef __Platform_h__ #define __Platform_h__ #include "Common.h" PROJECT_NS_BEGIN #ifdef _MMPHONE_ int InitPlatform(PVOID pContext); // create singletons of logger, cfgmgr and modulereg (in that order) #else int InitPlatform(PART_ID pContext); // create singletons of logger, cfgmgr and modulereg (in that order) ...
1,328,420
the-stack-v2-dedup
C
#ifndef __INT86_H #define __INT86_H struct regs { unsigned int eax; unsigned int ebx; unsigned int ecx; unsigned int edx; unsigned int esi; unsigned int edi; unsigned short es; unsigned short flags; }; void int86(int interrupt, struct regs *r); #endif
1,328,421
the-stack-v2-dedup
C
#include "vctrs.h" #include "utils.h" // [[ include("utils.h") ]] SEXP new_list_of(SEXP x, SEXP ptype) { if (!vec_is_list(x)) { Rf_errorcall(R_NilValue, "Internal error: `x` must be a list."); } if (vec_size(ptype) != 0) { Rf_errorcall(R_NilValue, "Internal error: `ptype` must be a prototype with size 0...
1,328,422
the-stack-v2-dedup
C
#ifdef AMS_ENCRYPT_PACKAGE -----BEGIN ENCRYPTED FILE v0.6----- 9S04Fc0roaJnwZGP6OG7EDBImvEWKQdoMQNOXjk4ZvxSsdZPLM/udO66ABq5WwwO dvMeZQHagf47XAOqVuwz+MqRk3NYrliYatelaoAvdpZsh5u83CYk3H9Shp536KWi iYx9nH1dPzVjXNduMP5tzSC2hGQROHD3cAPC1o/aGI5BZeSTWga7ZVdb+Nk8UeLU djbPADEousR+pNXxealR+VBKucRMGXYKgh85Dhq6GWhT94XjPooelWS2w...
1,328,423
the-stack-v2-dedup
C
/* UNIVERSIDAD AUTONOMA DE BAJA CALIFORNIA Asignatura: Algoritmos y estructura de datos Alumno: Diego Caudillo Sanchez Matricula: 1249199 Grupo: 551 Docente: Alma Leticia Palacios Guerrero Fecha de entrega: 08/Marzo/2019 DESCRIPCION DEL PROGRAMA Una manera de recuperar una contraseña es a través de ataque fuerza brut...
1,328,424
the-stack-v2-dedup
C
#ifndef __MMSA_APP_H__ #define __MMSA_APP_H__ #include "mmi_launcher_common.h" /// 1. Sea App, APM_Mode = APM_LAUNCH_NORMAL, Mode = MMSA_E_START_PAGESETTING typedef void (*MmsaGetDurationRspCb)(void *pvUserData, MAE_Ret nRspCode, u32 nDuration, CmnRspDataFreeCb pfnRspFreeCb); typedef struct { void *pvU...
1,328,425
the-stack-v2-dedup
C
#ifndef SENSOR_RTC_H #define SENSOR_RTC_H void init_RTC_DS3231(void); String getFilenameTimestamp(void); /* Parameters: * char sep -- CSV separator * Return: String -- value of the readings */ String read_RTC_DS3231(char sep, char date_sep, char hour_sep); #endif
1,328,426
the-stack-v2-dedup
C
#ifndef __libHello_h__ #define __libHello_h__ double fmod_wrapper(double x, double y); int hello(); #endif /* __libHello_h__ */
1,328,427
the-stack-v2-dedup
C
/* Name: 赵子豪 Date: 2017年6月6号 */ /* printName.c -- use printf() call to print my name in different way */ #include <stdio.h> int main(void) { printf("zihao zhao.\n"); printf("zihao \nzhao \n"); printf("zihao "); printf("zhao"); return 0; }
1,328,428
the-stack-v2-dedup
C
/***************************************************** Title : UART Driver Author : kingyo File : uart.c DATE : 2020/07/04 ******************************************************/ #include "uart.h" #include <avr/io.h> #include <avr/interrupt.h> #define NULL ((void*)0) // コールバック関数 static FUNC_POINTER p...
1,328,429
the-stack-v2-dedup
C
//...................... //.......GamesMan....... //...................... #include <stdio.h> #include <math.h> #include <string.h> int main(int argc, char *argv[]) { int n,i,max,min,mai,mii,dis=0; scanf("%d", &n); int a[n]; i = 0; scanf("%d", a[i]); max = a[i]; mai = i; min = a[i]; ...
1,328,430
the-stack-v2-dedup
C
#include <string.h> #include <stdio.h> void parseURL( const char *url, char *host, char* port, char *resource);
1,328,431
the-stack-v2-dedup
C
/* * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ /* hbcbcaconnhA.c Auto(Pbox)Calibrated version of hbcbcaconnh_3c_pfg1_sel_...
1,328,432
the-stack-v2-dedup
C
#include <stdio.h> #include "tictactoe.h" void printstring(char string[15],int length) //mengeprint string berupa array of char { int i=0; for(i;i<length;i++){ printf("%c",string[i]); } } void copystring(char buffer[200],matrixofstring* matrix_trans, int state) //mengopy string dari buffer dan dipindahkan ke matr...
1,328,433
the-stack-v2-dedup
C
//Author/Autor: José Joaquim de Andrade Neto //Link da questão: https://www.urionlinejudge.com.br/judge/pt/problems/view/1548 #include <stdio.h> #include <stdlib.h> void bubble(int *vet, int n) { int i, j, temp; for(i = 0; i<n; i++) //i < n for(j = 0; j<n-1; j++) // i < n-1 if(vet[j] < vet[j+1]){ temp = ve...
1,328,434
the-stack-v2-dedup
C
/*++ Copyright (c) 2006 Microsoft Corporation Module Name: theory_arith_def.h Abstract: <abstract> Author: Leonardo de Moura (leonardo) 2008-04-22. Revision History: --*/ #ifndef THEORY_ARITH_DEF_H_ #define THEORY_ARITH_DEF_H_ #include "smt/theory_arith.h" #include "smt/theory_arith_core.h" #includ...
1,328,435
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(int argc, char** argv) { int no; int count =0; int count2=0; char ch; for(int i=1;i<argc;i++) { no=strlen(argv[i]); ch=argv[i][0]; if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'||ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U') {int j=0; ...
1,328,436
the-stack-v2-dedup
C
/* ============================================================================ Name : Clase.c Author : Nicolas Letticugna - 1H Version : Copyright : Description : Hello World in C, Ansi-style ============================================================================ */ #include <stdio.h>...
1,328,437
the-stack-v2-dedup
C
#ifndef __NET_SHPZ_18_H #define __NET_SHPZ_18_H #include "Sgwork.h" #include "Nls.h" #include "DEVS.H" #define FLOOR_NUM_18 2 extern const prog_char strKPD181[] PROGMEM; // const prog_char strKPD181[] PROGMEM = "ÊÏÄ181"; extern const prog_char strKPD182[] PROGMEM; // cons...
1,328,438
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <locale.h> /* Rafael Leme */ /* "Crie um programa que receba um histórico de peso de um indivíduo contendo 20 números,ao final diga qual o maior peso, qual o menor peso e a média de peso." */ int main(int argc, char *argv[]) { setlocale(LC_ALL, "Portuguese"); int i, ...
1,328,439
the-stack-v2-dedup
C
#ifndef ERRORS_H_ # define ERRORS_H_ # define PROG "ege" # define FUNC_ERR(x) PROG": Error while using `"x"`: %m.\n" int perr(char const *, ...); #endif /* !ERRORS_H_ */
1,328,440
the-stack-v2-dedup
C
/*! plik sterujacy baza magazyn */ #include<stdio.h> #include<stdlib.h> #include<malloc.h> #include<string.h> #include<ctype.h> #include "magazyn.h" #include <sys/types.h> #include <unistd.h> struct nmag *h,*t,*t1,*w,*w1; void magsprawdz(int id_dane)//!< sprawdza plik magazyn pod katem wystepowania podanej liczby, ...
1,328,441
the-stack-v2-dedup
C
#ifndef __SX1276_HAL_ARCH_H__ #define __SX1276_HAL_ARCH_H__ #include "common/hal/hal.h" #include "common/lib/lib.h" #include "platform/platform.h" #include "stack/LoRaWAN/radio/radio.h" typedef pin_id_t Gpio_t; typedef pin_name_e PinNames; typedef pin_mode_e PinModes; typedef...
1,328,442
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* kvs_delete.c :+: :+: :+: ...
1,328,443
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include "modulo_1.h" int m1_indice(int ejercicio) { switch (ejercicio) { case 1: m1_e01(); break; case 2: m1_e02(); break; case 3: m1_e03(); break; case 4: m1...
1,328,444
the-stack-v2-dedup
C
#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include<sys/sysmacros.h> int main() { mknod("./myfifo", S_IFIFO|0644,makedev(1,2)); }
1,328,445
the-stack-v2-dedup
C
/* skipfish - main entry point --------------------------- Author: Michal Zalewski <lcamtuf@google.com> Copyright 2009, 2010, 2011 by Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
1,328,446
the-stack-v2-dedup
C
/* grim_gl.h - Single-header multi-platform OpenGL function loader ---------------------------------------------------------------------------- LICENSE ---------------------------------------------------------------------------- This software is in the public domain. Where that dedication is not ...
1,328,447
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <getopt.h> #include <limits.h> #include <libgen.h> #include <string.h> #include "CopyFile.h" # define no_argument 0 # define required_argument 1 # define optional_argument 2 # define ERROR_ARGUMENT -1 # define ARG_MATCH(Context, ...
1,328,448
the-stack-v2-dedup
C
# ifndef _GPIO_H_ # define _GPIO_H_ # define PTA(Ax) GPIO1, ((Ax)U) # define PTB(Bx) GPIO2, ((Bx)U) # define PTC(Cx) GPIO3, ((Cx)U) typedef enum { /* PTA?? */ //0~31 PTA0, PTA1, PTA2, PTA3, PTA4, PTA5, PTA6, PTA7, PTA8, PTA9, PTA10, PTA11, PTA12, PTA13, PTA14, PTA15, PTA16, PTA17, PTA18, PT...
1,328,449
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,328,450
the-stack-v2-dedup
C
#ifndef _TONY_PTHREAD_DATA_H_ #define _TONY_PTHREAD_DATA_H_ 1 #include <time.h> struct thread_data { int thread_id; int cpu_id; long long lock_interval; long long lock_times; struct timespec exe_duration; pthread_t pthread; long padding;//add a padding t...
1,328,451
the-stack-v2-dedup
C
/* ** recruitment.c for recruitment in /home/missonl/script/fdi-devc/battle_for_azeroth/misson_l/recruitment ** ** Made by MISSON-SUDRE Lucas ** Login <misson_l@etna-alternance.net> ** ** Started on Thu Oct 6 23:09:56 2016 MISSON-SUDRE Lucas ** Last update Sat Oct 8 11:52:46 2016 MISSON-SUDRE Lucas */ /* #includ...
1,328,452
the-stack-v2-dedup
C
// // Created by Matthew Kwiatkowski on 2021-02-13. // #ifndef COMMANDHANDLER_COMMAND_SENDER_H #define COMMANDHANDLER_COMMAND_SENDER_H #include "command_handler.h" /** * Enum types for outgoing messages * first 2 bytes is id, last 2 bytes is priority * (max value for priority is 0b11111 (0x1F) = LOWEST priority) ...
1,328,453
the-stack-v2-dedup
C
void OnEnvStart(); void OnEnvDestroy(); void PeerDestructor(void* data); int Crop(IplImage** pointer, char* args, char* gravity); int Resize(IplImage** pointer, char* _args, Config* config, int simple); int PrepareWatermark(Config* cfg, ngx_pool_t* pool); int Watermark(IplI...
1,328,454
the-stack-v2-dedup
C
#include "declaration.h" char* menus[MENU_MAX] = { "EASY","NORMAL","HARD","EXIT" };//메뉴 커서를 나타내는 문자열들 char* backToMenus[BACK_TO_MENU_MAX] = { "예","아니오" };//백 투 메인 메뉴 커서를 나타내는 문자열들 extern void gotoxy(int x, int y) {//입력받은 x,y좌표로 콘솔 좌표를 움직인다. COORD pos; pos.X = x; pos.Y = y; SetConsoleCursorPosition(GetStdHandle(...
1,328,455
the-stack-v2-dedup
C
#ifndef ACCOUNT_UI_H_ #define ACCOUNT_UI_H_ #include "../Service/Account.h" static const int Account_PAGE_SIZE = 5; //标识符:TTMS_SCU_Login //系统用户登录界面 int SysLogin(); //标识符:TTMS_SCU_Account_UI_MgtEnt //系统用户管理界面 void Account_UI_MgtEntry(); //标识符:TTMS_SCU_Account_UI_Add //创建新系统用户界面 int Account_UI_Add(account_list_t...
1,328,456
the-stack-v2-dedup
C
/* * Copyright (c) 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * * @(#)if_acc.c 1.2 (2.11BSD) 1997/1/19 */ #include "acc.h" #if NACC > 0 /* * ACC LH/DH ARPAnet IMP interface driver. * Def...
1,328,457
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* :::::::: */ /* Tosh-21Shell :+: :+: ...
1,328,458
the-stack-v2-dedup
C
/* C code by yosys */ /* top = 1 */ /* src = "test_mapped.v:695" */ #include "cells.h" void ace(MDTYPE clk, MDTYPE reset, MDTYPE* i_mode, MDTYPE* i_dom_sep, MDTYPE i_valid, MDTYPE* i_data, MDTYPE i_padding, MDTYPE* o_valid, MDTYPE* o_ready, MDTYPE* o_data) { MDTYPE n0000_; MDTYPE n0001_; MDTYPE n0002_; MDTYP...
1,328,459
the-stack-v2-dedup
C
#include "TDA_AdL.h" stUsuario inicUsuario () { stUsuario vacio; vacio.idUsuario = 0; vacio.nombreUsuario[0] = '\0'; vacio.pass[0] = '\0'; vacio.genero = ' '; vacio.anioNacimiento = 0; vacio.pais[0] = '\0'; vacio.nivel = -1; vacio.eliminado = 0; return vacio; } void limpiarADL ...
1,328,460
the-stack-v2-dedup
C
#include <sys/cdefs.h> #include <sys/types.h> #include <sys/resource.h> #include <sys/time.h> #include <err.h> #include <errno.h> #include <limits.h> #include <stdbool.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <sysexits.h> #include <unistd.h> /* * Counting bits set i...
1,328,461
the-stack-v2-dedup
C
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * clcDP_tmp_mexutil.h * * Code generation for function 'clcDP_tmp_mexutil' * */ #ifndef __CLCDP_TMP_MEXUTIL_...
1,328,462
the-stack-v2-dedup
C
#ifndef Node_h #define Node_h struct Node { char key; int value; bool hasValue; Node* link; Node* next; Node(char _key) : key(_key), value(0), hasValue(false), link(nullptr), next(nullptr) {} Node(const Node& source) = delete; Node& operator=(const Node& source) = delete; Node(Node&&) = delete; ...
1,328,463
the-stack-v2-dedup
C
//===--- b_queue.h ----------------------------------------------------------=== // // satoko: Satisfiability solver // // This file is distributed under the BSD 2-Clause License. // See LICENSE for details. // //===------------------------------------------------------------------------=== #ifndef ...
1,328,464
the-stack-v2-dedup
C
/*******************************************************************\ Module: Traces of GOTO Programs Author: Daniel Kroening Date: November 2005 \*******************************************************************/ #ifndef CPROVER_GOTO_SYMEX_XML_GOTO_TRACE_H #define CPROVER_GOTO_SYMEX_XML_GOTO_TRACE_H #include <...
1,328,465
the-stack-v2-dedup
C
#pragma once #ifndef WYRD_VFILE_VFILE_H #define WYRD_VFILE_VFILE_H #include "core/core.h" #include "os/file.h" typedef void* VFile_Handle; enum VFile_SeekDir { VFile_SD_Begin = 0, VFile_SD_Current, VFile_SD_End, }; enum { VFile_Type_Invalid = 0, VFile_Type_OsFile = 1, VFile_Type_Memory = 2 }; EXTERN_C ...
1,328,466
the-stack-v2-dedup
C
/** * @file filled_tlb_entry_check.c * @author your name (you@domain.com) * @brief We intercept the page fault and insert our own TLB entires. * This testcase is to tset if we successfully inserted the fake PTE into TLB buffer. * We trigger anonymous page fault on specific virtual range. * And then, let ker...
1,328,467
the-stack-v2-dedup
C
/****************************************************************************** Copyright (c) 1999 Microsoft Corporation Module Name: stdafx.h Abstract: include file for standard system include files, or project specific include files that are used frequently, but are changed infrequently ...
1,328,468
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,328,469
the-stack-v2-dedup
C
#include <kernel/tss.h> #include <kernel/gdt.h> tss_entry_t tss_entry; static void tss_write(int32_t num, uint16_t ss0, uint32_t esp0){ uint32_t base = (uint32_t)&tss_entry; uint32_t limit = base + sizeof(tss_entry); gdt_set_gate(num, base, limit, 0xE9, 0x00); // Ensure the descriptor is initial...
1,328,470
the-stack-v2-dedup
C
/** @file Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Library/BaseLib.h> #include <Library/PciLib.h> #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> #include <Library/IoLib.h> #i...
1,328,471
the-stack-v2-dedup
C
#include <src/text.h> #include <myy/helpers/opengl/quads_structures.h> void draw_character_quads (GLuint const buffer_id, GLuint const xyz_attr_id, GLuint const st_attr_id, GLuint const offset, unsigned int n_char_quads) { US_two_tris_quad_3D_draw_pixelscoords( buffer_id, xyz_attr_id, st_attr_id, offs...
1,328,472
the-stack-v2-dedup
C
/* * sw_i2c.h * * Created on: 13 апр. 2019 г. * Author: Ilya */ #ifndef SW_I2C_H_ #define SW_I2C_H_ #include "stdint.h" typedef struct I2C_State_Struct{ uint8_t sdaState : 1; uint8_t sclState : 1; uint8_t startStopState : 1; uint8_t rwState : 1; uint8_t wfa : 1; //Wait for ACK uint8_t wfa_clr...
1,328,473
the-stack-v2-dedup
C
/* * Copyright (c) 1982, 1986, 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the...
1,328,474
the-stack-v2-dedup
C
/*============================================================================= # FileName: process_manager.h # Desc: # Author: ChengYi # Email: chengyi818@foxmail.com # HomePage: # Created: 2017-03-01 14:18:50 # Version: 0.0.1 # LastChange: 2017-03-01 14:18:50 # History: #...
1,328,475
the-stack-v2-dedup
C
#include "phone_number.h" #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdio.h> char *phone_number_clean(const char input[]){ input = input; char *result = malloc(sizeof(char)*10); int index = 0; for(int i = 0; i < (int)strlen(input); i++){ if(isdigit(input[i])){ if(i...
1,328,476
the-stack-v2-dedup
C
#include<stdio.h> #include<string.h> int main(void) { int i,n,j; int cont[1000] = { 0 }; scanf_s("%d", &n); for (i = 0;i < n+1;i++) { char c[1000] = { 0 }; gets(c); for (j = 0;j<strlen(c);j++) { if (c[j] >= '0'&&c[j] <= '9') { cont[i+1]++; } } } for (i = 1;i < n+1;i++) { printf("%d\n", con...
1,328,477
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <mpi.h> #include "api.h" #define WORK_ARRAY_SIZE 10 // size of arrays in one_work /* A short program to calculate 1 + 2 + ... + 100 using a master-worker paradigm */ struct one_work { int array[WORK_ARRAY_SIZE]; }; struct one_result { int array[1]; ...
1,328,478
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <string.h> void bubble_sort_generic(char* array[1000], int counter, int num, int (*f)(char*, char*)); int compare_fn(char x[1000], char y[1000]); main() { int i; int counter = 0; int keepGoing = 1; float fvalue; char* array[1000]; char input[1000]; for (i...
1,328,479
the-stack-v2-dedup
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int insertionsort(int arr[], int n){ int j; for(int i = 0;i < n;i++){ int t = arr[i+1]; for (j = i;j >= 0 && arr[j] > t;j--){ arr[j+1] = arr[j]; } arr[j+1] = t; }} int printarray(int *arr, int n){ for (int i = 0;i < n;i++) printf("%d\t",arr[i]...
1,328,480
the-stack-v2-dedup
C
// PR c++/103049 // P0849R8 - auto(x) // { dg-do compile { target c++23 } } // Test invalid use. void f () { char x[] = "foo"; +decltype(auto){x}; // { dg-error "invalid use of .decltype\\(auto\\)." } +decltype(auto)(x); // { dg-error "invalid use of .decltype\\(auto\\)." } +auto(); // { dg-error "invalid use...
1,328,481
the-stack-v2-dedup
C
#include <stdio.h> #define PI 3.1415926 void circumference(double a); void area(double b); void volume(double c); int main(void) { void (*f[3])(double) = {circumference, area, volume}; printf("=== Circles & Spheres Menu ===\n\n"); printf("Please select from the options below:\n\n"); prin...
1,328,482
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,328,483
the-stack-v2-dedup
C
#ifndef FFM_H #define FFM_H extern "C" { #include <libavformat/avformat.h> #include <libavdevice/avdevice.h> #include <libavcodec/avcodec.h> #include <libavcodec/mediacodec.h> #include <libavutil/avutil.h> #include <libavutil/dict.h> #include "libswscale/swscale.h" } #include <ffm_util.h> void start_push_flow(); #end...
1,328,484
the-stack-v2-dedup
C
<?xml version="1.0" encoding="utf-8"?> <html> <body> <root> <title> Constants and finite unary relations in qualitative constraint reasoning. </title> <abstract> Extending qualitative CSPs with the ability of restricting selected variables to finite sets of possible values has been proposed as an in...
1,328,485
the-stack-v2-dedup
C
#include "lightmp.h" /* Malloc wrapper to check if memory is available */ void * xcalloc (size_t n, int siz) { bint *ptr; if ((ptr = calloc (n, siz)) == NULL) { perror ("calloc: Could not allocate memory\n"); exit (EXIT_FAILURE); } return ptr; } /* malloc for bints */ void * bint_alloc (const...
1,328,486
the-stack-v2-dedup
C
#include "holberton.h" /** *_isupper - Checks for upper case letter *@c: represents a letter *Return: 1 if c is uppercase, 0 if lowercase */ int _isupper(int c) { if ((c >= 'A') && (c <= 'Z')) { return (1); } else { return (0); } }
1,328,487
the-stack-v2-dedup
C
/* * Mini T-Stick Controller Firmware * * Created by Jan Anlauff <janlauff at cim dot mcgill dot ca> (C) 2011 * ADXL345 functionality based on code from Sebastian Zehe * I2C master library by Peter Fleury * * * TODO: * - finish capsense read */ #include "includes/mini-tstick.h" int main(void) { init...
1,328,488
the-stack-v2-dedup
C
#ifndef __CONFIG_H #define __CONFIG_H #define SCONFIG_LED #define SCONFIG_RTC //#define SCONFIG_AP3216C #define SCONFIG_LCD //#define SCONFIG_ICM20608 //#define SCONFIG_TOUCH //#define SCONFIG_BACKLIGHT #endif
1,328,489
the-stack-v2-dedup
C
#ifndef _GD_UTILS_H_ #define _GD_UTILS_H_ #include <time.h> #include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include <stdlib.h> #include "gd_types.h" #ifndef LOG_PREFIX #define LOG_PREFIX "[gd_sched] " #endif #ifndef LOG_LEVEL #define LOG_LEVEL 50 #endif #define LOG_LEVEL_DEBUG 100 #defi...
1,328,490
the-stack-v2-dedup
C
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include "file_utils.h" #include "policy.h" #define INT3400_THERMAL "INT3400 Thermal" #define THERMAL_ZONE_PREFIX "/sys/class/thermal/thermal_zone" #define INT3400_AVA_UUIDS "/sys/bus/platform/dev...
1,328,491
the-stack-v2-dedup
C
/****************************************************************************** * Copyright (c) 2014-2017 by Silicon Laboratories * * $Id: proslic_vmb2_posix.c 6757 2017-08-29 18:43:04Z nizajerk $ * * This file contains proprietary information. * No dissemination allowed without prior written permission from * S...
1,328,492
the-stack-v2-dedup
C
/* * Copyright (C) 2014 Steve Harris et al. (see AUTHORS) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of the * License, or (at your option) any later v...
1,328,493
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<mpi.h> #include "utils.h" #include "cptimer.h" #define REPETITIONS 100 // single element being passed void blocking_single(const int rank, const int size) { int X = rank, X2, sum = rank; double t1, t2; if(rank == 0) t1 = seconds(); // Each proc...
1,328,494
the-stack-v2-dedup
C
#include<stdio.h> int main() { //Seperating int a = 2345; int res; int num, num1; int rem; //Seperate 5 printf("%d", a%10); printf("\n**********"); //Seperate 4 num1 = a/10; printf("\n%d", num1%10); printf("\n**********"); //Backward Destruction while(a>0) { rem = a % 10; ...
1,328,495
the-stack-v2-dedup
C
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * o...
1,328,496
the-stack-v2-dedup
C
/* * File: PWM_F401RE_Nucleo.c * * Generated by STM32 Coder for Xcos with scilab-5.5.2 * C/C++ source code generated on :12-Oct-2020 * * Model version : 1.0 * * ****************************************************************************** * * attention * * * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANC...
1,328,497
the-stack-v2-dedup
C
//模拟登录系统 #include <stdio.h> #include <curses.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <time.h> #include <stdlib.h> //密码的最大长度 #define MAX_SIZE 10 //密码的最小长度 #define MIN_SIZE 6 //按键全局变量 int ch; //注册模块 int register_re(); //登录模块 int login(); //按键坐标 int x = 1; int y = 1; //系统主界面 void...
1,328,498
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct DNode{ int data; struct DNode* next; struct DNode* prev; }; typedef struct DNode Node; struct SNode{ Node* head; Node* midNode; int count; }; typedef struct SNode STNode; void Push(STNode* stack,int data){ Node* newNode=(Node*)malloc(sizeof(Node)); ...
1,328,499