source string | code_lang string | content string | idx int64 |
|---|---|---|---|
the-stack-v2-dedup | C | /*
TiMidity -- Experimental MIDI to WAVE converter
Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi>
This program is free software; you can redistribute it and/or modify
it under the terms of the Perl Artistic License, available in COPYING.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#in... | 1,330,800 |
the-stack-v2-dedup | C | /*
* Copyright (C) 1998, 2000-2007, 2010, 2011, 2012, 2013 SINTEF ICT,
* Applied Mathematics, Norway.
*
* Contact information: E-mail: tor.dokken@sintef.no
* SINTEF ICT, Department of Applied Mathematics,
* P.O. Box 124 Blindern, ... | 1,330,801 |
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,330,802 |
the-stack-v2-dedup | C | #ifndef __PPTX_CT_A_ALPHA_BI_LEVEL_EFFECT_H__
#define __PPTX_CT_A_ALPHA_BI_LEVEL_EFFECT_H__
#ifndef __PPTX_PRIVATE_INCLUDES__
#error "Please do not include this file directly"
#endif /* __PPTX_H__ */
#include <libxml/parser.h>
#include <private/pptx-common.h>
typedef struct pptx_ct_a_alpha_bi_level_effect_s pptx_ct... | 1,330,803 |
the-stack-v2-dedup | C | // Room: /d/nanshaolin/celang1.c
// Last Modified by winder on May. 29 2001
inherit ROOM;
void create()
{
set("short", "西禅房侧廊");
set("long", @LONG
这里是禅房侧廊。彩梁画栋,连顶棚也用彩漆绘满了各种飞天的图
形,出自名家手笔,端的壮丽不凡。北望是一片槐树林,鸟语花香隐隐
传来令人心旷神怡。西面是僧人们休息用的僧舍。
LONG );
set("exits", ([
"west" : __DIR__"sengshe4",
"south" : __DIR... | 1,330,804 |
the-stack-v2-dedup | C | /*************************************************************************************************/
/*!
* \file
*
* \brief Pulse Oximeter profile collector.
*
* Copyright (c) 2016-2018 Arm Ltd.
*
* Copyright (c) 2019 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
*... | 1,330,805 |
the-stack-v2-dedup | C | // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2
// REQUIRES: riscv-registered-target
// RUN: %clang_cc1 -triple riscv64 -target-feature +v -target-feature +zfh \
// RUN: -target-feature +zvfh -disable-O0-optnone \
// RUN: -emit-llvm %s -o - | opt -S -passes=mem2r... | 1,330,806 |
the-stack-v2-dedup | C | /**********************************************************************************
Copyright (C) 2008 Investment Science Corp.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either ... | 1,330,807 |
the-stack-v2-dedup | C | /*
* File: MPU6050.c
* Author: Angel Orellana
*
* Created on 27 de febrero de 2021, 08:39 AM
*/
#include "MPU6050.h"
/**
* funcion que lee los valores medidos por el acelerometro, el orden en el que
* son devueltos es el siguiente: Aceelerometro en x, acelerometro en y ,
* acelerometro en z, temperatura,... | 1,330,808 |
the-stack-v2-dedup | C | #ifndef TEST1_H_INCLUDED
#define TEST1_H_INCLUDED
void troca (int &a,int &b);
void crescente (int &a, int &b,int &c);
void decrescente(int &a, int &b, int &c);
#endif
| 1,330,809 |
the-stack-v2-dedup | C | /***********************************************************************************************************************
* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
*******... | 1,330,810 |
the-stack-v2-dedup | C | #ifndef __MIL_VECTOR_SHORT_H__
#define __MIL_VECTOR_SHORT_H__
#define __MIL_TYPE short
#include "_vector_generic.h"
#undef ___MIL_TYPE
#endif | 1,330,811 |
the-stack-v2-dedup | C | #pragma once
struct VarType
{
enum Type
{
Int,
UInt,
Float,
Bool,
Vector2,
Vector3,
Vector4,
Matrix3,
Matrix4,
Vector4Array,
StorageStruct,
StorageStructArray
};
}; | 1,330,812 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <conio.h>
int main(void) {
char string[100], copied[100]; int i, len;
printf("Enter a string : \n");
fflush(stdin);
gets(string);
for (i=0; string[i] != '\0'; i++)
copied[i] = string[i];
copied[i] = '\0';
printf("%s", copied);
getch();
return ... | 1,330,813 |
the-stack-v2-dedup | C | #include "text.h"
#define FAILURE 0
#define SUCCESS 1
typedef struct charset_t {
Uint8 char_height;
Uint8 char_width;
Uint8 width;
Uint8 height;
SDL_Surface* characters;
SDL_Rect rects[128];
} Charset;
static Charset loaded_charset;
static SDL_Surface* surface; //TO INIT //TODO DO NOT FORGOT ... | 1,330,814 |
the-stack-v2-dedup | C | /*
* scpi_commands_misc.h
*
* Created on: Mar 14, 2020
* Author: grzegorz
*/
#ifndef INC_SCPI_MISC_H_
#define INC_SCPI_MISC_H_
#include "scpi/scpi.h"
scpi_result_t SCPI_FormatData(scpi_t * context);
scpi_result_t SCPI_FormatDataQ(scpi_t * context);
#endif /* INC_SCPI_MISC_H_ */
| 1,330,815 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parse_percent.c :+: :+: :+: ... | 1,330,816 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tab_mult.c :+: :+: :+: ... | 1,330,817 |
the-stack-v2-dedup | C | #include<stdio.h>
int fact(int n)
{
int i=1;
while(n>0)
{
i=i*n;
n--;
}
return i;
}
void main()
{
int n, r, bino;
printf("Enter n and r of binomial co-efficient: ");
scanf("%d %d", &n, &r);
if(n<r)
printf("Invalid type");
else
{
bino=fact(n)/(fact(r)*fact(n-r));
printf("Binomial coefficient = %d", ... | 1,330,818 |
the-stack-v2-dedup | C | /*
Kevin Chang
September 4, 2002
Senior Research Project
Torrence
Center for Theoretical and Computational Materials Science
National Institute of Standards and Technology
erodeNugget.C
Self-contianed erosion nugget.
*/
#include "image/image.h"
#include "common/array.h"
#include <stdio.h>
#include <iostream.h>
#i... | 1,330,819 |
the-stack-v2-dedup | C | #include <sisci_api.h>
#include <sisci_error.h>
#include "../common/sisci_errchk.h"
#include "sisci.h"
// SISCI variables
static sci_desc_t sds[NUM_IMAGE_SEGMENTS];
static unsigned int localAdapterNo;
static unsigned int localNodeId;
static unsigned int encoderNodeId;
static sci_local_segment_t localSegments[NUM_I... | 1,330,820 |
the-stack-v2-dedup | C |
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <rte_version.h>
#include <rte_ethdev.h>
#include <rte_ether.h>
#define DEBUG(s) fprintf(stderr, "[%s:%d] %s\n", __func__, __LINE__, s)
static void print_info_port(int port_id)
{
if (!rte_eth_dev_is_valid_port(port_id))
rte_exit(EXIT_FAILURE, "r... | 1,330,821 |
the-stack-v2-dedup | C | /*
* Copyright (c) 2019 Nordic Semiconductor
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __HELLO_WORLD_DRIVER_H__
#define __HELLO_WORLD_DRIVER_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <zephyr/device.h>
/*
* This 'Hello World' driver has a 'print' syscall that prints the
* famous 'Hello World!... | 1,330,822 |
the-stack-v2-dedup | C | /* $Id: ui_rom_defi_fap21v_api.h,v 1.6 Broadcom SDK $
* $Copyright: (c) 2016 Broadcom.
* Broadcom Proprietary and Confidential. All rights reserved.$
*/
#ifndef __UI_ROM_DEFI_FAP21... | 1,330,823 |
the-stack-v2-dedup | C | struct read_entire_file_result
{
char *Contents;
uint32_t FileSize;
};
internal read_entire_file_result
ReadEntireFile(char *Filename)
{
read_entire_file_result Result = {};
HANDLE File = CreateFile(Filename,
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUT... | 1,330,824 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<math.h>
int main(){
int a,b ,n;
printf("\n input a natual number : ");
scanf("\n %d", &b);
for(n =2; n<= b; n++)
{
for(a =2; a< n; a++)
{
if(n%a ==0)
break;
}
if( a== n)
printf("\n prime number is %d", n);
}
return 0;
}
| 1,330,825 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <wait.h>
#define TRUE 1
#define FALSE 0
#define N 2 //进程数
int turn; // 哪一个进程有权进入临界区
int flag[N] = {FALSE, FALSE}; // 申请进入临界区的标志
// 首先必须明确的是: 在peterson算法中,
// 被限制为两个进程在临界区和剩余区之间交替执行
void enter_region(int process);
void leave_region(int process... | 1,330,826 |
the-stack-v2-dedup | C | #include "arbol.h"
#include <stdio.h>
#include <stdlib.h>
void fborrar(tElemento e){
e = NULL;
free(e);
}
void mostrarLista(tArbol arbol, tLista l){
tPosicion pos;
int i, num;
if(l==NULL)
printf("No tiene hijos.");
else {
tNodo nodoPadre = l_recuperar(l, l_primera(l));
... | 1,330,827 |
the-stack-v2-dedup | C | #include <stdio.h>
#define _CRT_SECURE_NO_WARNINGS
int main() {
int a, b;
scanf("%d %d", &a, &b);
while (a < 1 || b > 10000 || b < 1)
scanf("%d %d", &a, &b);
printf("%d\n", a + b);
printf("%d\n", a - b);
printf("%d\n", a * b);
printf("%d\n", a / b);
printf("%d\n", a % b);
return 0;
} | 1,330,828 |
the-stack-v2-dedup | C | #include <corewar2.h>
void speaker(t_vm *machine)
{
if (!machine->gui)
{
printf("Ladies and gentlemen, welcome to the Arena!\n");
printf("Let me introduce today's players!\n");
for (int i = 0; i < machine->champions.size; i++)
{
printf("Player %d : %s (%s), weighting [%d] bytes!\n", i + 1, machine->champi... | 1,330,829 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char nachname[30];
float note;
} student;
int main(int argc, char const *argv[]){
int N;
printf("Wie viele Daten einlesen? N = ");
scanf("%i", &N);
student **studArg = malloc(sizeof(student) * N);
char name[30];
float note;
for(size... | 1,330,830 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
int main(){
freopen("in.txt","r",stdin);
freopen("out.txt","w",stdout);
char cpt[2004];
memset(cpt,0,sizeof(cpt));
while(1){
char c;
char word[12];
int s_point = 0;
int rstdin = EOF;
while(rstdin = scanf("%c",&c) && c !=... | 1,330,831 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_charcount.c :+: :+: :+: ... | 1,330,832 |
the-stack-v2-dedup | C | #include "suppl.h"
#include <stdio.h>
#include <alloca.h>
#include <string.h>
#include <stdlib.h>
#include "tagrule.h"
#include "../rdb_names.h"
#include "../at/at.h"
#include "../util/rdb_util.h"
#include "rdb_ops.h"
#include "../dyna.h"
#include "cdcs_syslog.h"
/////////////////////////////////////////////////////... | 1,330,833 |
the-stack-v2-dedup | C | #include <stdio.h>
#include "fic_wave.h"
#include <errno.h>
FILE *abre_wave(const char *ficWave, float *fm, unsigned int *confOK)
{
FILE *fpWave;
unsigned char fm_str[10], temp[10];
unsigned int fm_int, encoding, channels, bits;
if ((fpWave = fopen(ficWave, "r")) == NULL)
return NULL;... | 1,330,834 |
the-stack-v2-dedup | C | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#define MAXSTACK 100
int stack[MAXSTACK];
int top = -1;
int isPrime( int );
void push( int );
int pop();
int main(int argc, char const *argv[])
{
int input;
printf( "enter number (x > 2) : \n" );
scanf( "%d", &input );
for( int i=2; i<input; ... | 1,330,835 |
the-stack-v2-dedup | C | #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
int main() {
char s[100];
int count[25] = { 0 }, len;
printf("문자열 입력 : ");
scanf("%[^\n]s", s);
len = strlen(s);
for (int i = 0; i < len; i++) {
count[s[i] - 97]++;
}
for (int i = 0; i < 25; i++) {
printf("%c : %d\n", 'a' + i, count[i... | 1,330,836 |
the-stack-v2-dedup | C | #include "FreeRTOS.h"
#include "task.h"
#include "cmsis_os.h"
#include "uart.h"
#include "cli/cli.h"
#include "types.h"
#include "log.h"
#include "leds.h"
osThreadId defaultTaskHandle;
//extern uint32 stopModeEntrys;
void StartDefaultTask(void const *argument)
{
leds_init();
for(;;) {
led_toggle();
osDelay(... | 1,330,837 |
the-stack-v2-dedup | C | /**
* @file common_sw_timer.c
*
* @brief
*
* Copyright (c) 2013-2015 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. ... | 1,330,838 |
the-stack-v2-dedup | C | /*3. Leer un string con getchar() y contabilizar cuantas vocales tiene. */
#include<stdio.h>
int main(){
int c,cont=0;
printf("Digite una frase (y luego ctrl-z): ");
while((c=getchar())!=EOF){
switch(c){
case 'a':
case 'e':
case 'i':
case 'o':
case 'u': cont++;
}
}
printf("La frase tiene: ... | 1,330,839 |
the-stack-v2-dedup | C | // Title: Problem 6-2
// Author: Dark_scholar
// Date: 28/09/2019
/*
This program finds the sum square difference between the sum of squares and the square sum of the first 100 numbers.
The method used is the analytical functions to make the sums and the just substract the functions from each other to get the answer.
... | 1,330,840 |
the-stack-v2-dedup | C | /**********************************************************************************************
Copyright 2007-2008 Hikvision Digital Technology Co., Ltd.
FileName: Print.c
Author: Version : Date:
Description: printf the board infamation
Version: // °ζ±ΎΠΕΟ’
Function List: printBoardInfo()
H... | 1,330,841 |
the-stack-v2-dedup | C | #ifndef H_ALSAPLAY__
#define H_ALSAPLAY__
int playback_mp3(char *strpath,char *strvolume);
void alsa_set_volume(long volume);
#endif
| 1,330,842 |
the-stack-v2-dedup | C | /* plm-defs.h */
#ifndef PLM_DEFS_H
#define PLM_DEFS_H 1
#define PLM_CONFIG_DATA_LENGTH ( 38 / 2 ) /* Number of bytes, not counting the CRC. */
#endif /* PLM_DEFS_H */
| 1,330,843 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
typedef struct intList {
int number;
struct intList* next;
} intList;
void addInFront(intList** list, int location, int value);
void printList(intList*);
int main(int argc, char const *argv[])
{
intLis... | 1,330,844 |
the-stack-v2-dedup | C | /* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* arch/powerpc/boot/ugecon.h
*
* USB Gecko early bootwrapper console.
* Copyright (C) 2008-2009 The GameCube Linux Team
* Copyright (C) 2008,2009 Albert Herranz
*/
#ifndef __UGECON_H
#define __UGECON_H
extern void *ug_probe(void);
extern void ug_putc(char ch);... | 1,330,845 |
the-stack-v2-dedup | C | version https://git-lfs.github.com/spec/v1
oid sha256:b9e113bb648ca54339dfeea86fa37e7b42f83e344e28098ee479a1a0a8123dbd
size 205
| 1,330,846 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <sys/stat.h>
#include <sys/wait.h>
#define MAX 1024
#define TRUE 1
#define FALSE 0
int main (int argc, char **argv) {
char prompt[MAX], *input, *path;
char *para... | 1,330,847 |
the-stack-v2-dedup | C | #include <stdio.h>
void main()
{
char A;
scanf("%c",&A);
if(A>=65&&A<=90||A>=97&&A<=122)
{
printf("alphabet");
}
else
{
printf("no");
}}
| 1,330,848 |
the-stack-v2-dedup | C | /**
* Copyright (C) 2017 The YunOS Project. All rights reserved.
*/
#ifndef _ALI_CRYPTO_TEST_H_
#define _ALI_CRYPTO_TEST_H_
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "ali_crypto.h"
#define CRYPT_ERR(_f, _a ...) printf("E %s %d: "_f, \
__FUNCTION__, ... | 1,330,849 |
the-stack-v2-dedup | C | #include <ansi.h>
inherit NPC;
string ask_me();
void create()
{
set_name("程灵素", ({ "cheng lingsu", "cheng" }));
set("gender", "女性");
set("age", 24);
set("long", @long
她看上去双眉紧锁,不知道有什么心事,长得相貌平平,并不出众。
身材瘦小,穿着粗布衣衫。
long);
set("attitude", "peaceful");
set("str", 22);
... | 1,330,850 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *fp = fopen("cpy.txt", "r");
FILE *output = fopen("output.txt", "w");
if (!fp || !output) {
printf("ERROR opening input file orig.txt\n");
exit(0);
}
double sum = 0;
double temp;
while (fscanf(fp, "%lf\n", &temp)... | 1,330,851 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: ... | 1,330,852 |
the-stack-v2-dedup | C | //
// The MIT License (MIT)
//
// Copyright (c) 2015 Joakim Soderberg <joakim.soderberg@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without... | 1,330,853 |
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,330,854 |
the-stack-v2-dedup | C | #include "wormLogic.h"
#include <sys/socket.h>
#include <unistd.h>
#include "stdlib.h"
#include "sem.h"
#include "../shared.h"
#include "defines.h"
#include "settings.h"
#include "types.h"
void encodeMapRow(char encoded[MAP_SIZE], int map[MAP_SIZE][MAP_SIZE], int r)
{
for (int i = 0; i < MAP_SIZE; i++)
{
if ... | 1,330,855 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_atoi.c :+: :+: :+: ... | 1,330,856 |
the-stack-v2-dedup | C | #ifndef __ILDAOUT_H__
#define __ILDAOUT_H__
#define NEWTEST_FRAME_SIZE 91
int newtest_frame[NEWTEST_FRAME_SIZE][5] = {
{32000,22000,0,0,0},
{32000,22000,0,0,0},
{32000,22000,255,0,0},
{32000,22000,255,0,0},
{30000,22000,255,0,0},
{28000,22000,255,0,0},
{26000,22000,255,0,0},
{24000,22000,255,0,0},
{22000,22000,255,0,... | 1,330,857 |
the-stack-v2-dedup | C | #define TIMER_PROFILING 0
| 1,330,858 |
the-stack-v2-dedup | C | #pragma once
#include <lua/lua.h>
int luaopen_portmidi(lua_State *L);
| 1,330,859 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* short_hd.c :+: :+: :+: ... | 1,330,860 |
the-stack-v2-dedup | C | //*****************************************************************************
//
// #include
//
//*****************************************************************************
#include "myUART.h"
//*****************************************************************************
//
// variable
//
//*******************... | 1,330,861 |
the-stack-v2-dedup | C | #include <stdio.h>
int main(){
int in;
float fl;
double dob;
char ch;
in=6;
fl=7.8;
dob=5.333;
ch ='J';
printf("Integar : %i\n",in);
printf("Float : %.5f\n",fl);
printf("Double : %.5lf\n",dob);
printf("Charecter : %c\n",ch);
} | 1,330,862 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.h :+: :+: :+: ... | 1,330,863 |
the-stack-v2-dedup | C | /*
I/VDS Copy
*/
#include <stdio.h>
#include "OMprimitives.h"
#include "bserr.h"
#include "OMerrordef.h"
#include "EMSmsgdef.h"
#include "msdef.h"
#include "v_datamacros.h"
#include "v_miscmacros.h"
#include "v_geommacros.h"
#include "v_dbgmacros.h"
/*
* Includes of function prototypes.
*/
#include "bsalloccv.h"
#in... | 1,330,864 |
the-stack-v2-dedup | C |
// Bam xung PWM dieu khien toc do dong co
////Dung thach anh 11,0592 MHz
#include <regx52.h>
#include <stdio.h>
#define led1 P2_0
#define led2 P2_1
#define led3 P2_2
#define Led7seg P0
const unsigned char led7[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
// Hien thi led 7 thanh
void D... | 1,330,865 |
the-stack-v2-dedup | C | /*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "../asnFiles/36331-f60-ASNfunctions.asn"
* `asn1c -fcompound-names -findirect-choice -fincludes-quoted -fno-include-deps -gen-PER -no-gen-OER -D.`
*/
#include "UplinkPowerControlCommon-v1310.h"
/*
... | 1,330,866 |
the-stack-v2-dedup | C | #ifndef ENCODE_H
#define ENCODE_H
int encode(char *input_data, int *output_data, int size);
int get_sse(char *e, int block_size);
int get_k(int s_error);
#endif
| 1,330,867 |
the-stack-v2-dedup | C | /*
LZ4 - Fast LZ compression algorithm
Copyright (C) 2011-present, Yann Collet.
Copyright (c) 2021 - 2022, Intel Corporation. All rights reserved.<BR>
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modifica... | 1,330,868 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
#define MAX_WORD_LENGTH 30
//Counts number of occurences of a word in a file
int main() {
FILE *text = fopen("hamlet.txt", "r");
char search_word[] = "hamlet";
char current_word[MAX_WORD_LENGTH];
int count = 0;
//fscanf(stdin, "%s", current_word); /* Read... | 1,330,869 |
the-stack-v2-dedup | C |
#ifndef _LEVINSON_H_
#define _LEVINSON_H_
#define levinson_h "$Id $"
#include "typedef.h"
#include "cnst.h"
/*--------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif
/*----------------------------------------------------------------------------
; ... | 1,330,870 |
the-stack-v2-dedup | C | /**
* \file can_common_cmds.c
* \author L. BOURDEL
* \version 1.0
* \date 2020
* \brief Main function
*
* \details !!! Good Luck !!!
*/
#include "can_common_cmds.h"
void CanCommonCmdRouter(void)
{
destinataire_TX = destinataire_RX;
commande_TX = 0x1F;
carte_cible_TX = 0x00;
param_T... | 1,330,871 |
the-stack-v2-dedup | C | #include <stdio.h>
int main(void)
{
int time, point_1, point_2, goal;
scanf("%d%d%d", &time, &point_1, &point_2);
goal = (time%5==0) ? (90-time)/5 : (90-time)/5 + 1;
if(point_1+goal > point_2) printf("win");
else if(point_1+goal == point_2) printf("same");
else printf("lose");
return 0;
}
| 1,330,872 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* philo_one.c :+: :+: :+: ... | 1,330,873 |
the-stack-v2-dedup | C | struct player1 //player info, player's history(units)
{
enum chessPieces {PAWN = 1, KNIGHT, BISHOP, ROOK, QUEEN, KING}; //ChessPieces
};
struct player2 //player info, player's history(units)
{
enum chessPieces {PAWN = 11, KNIGHT, BISHOP, ROOK, QUEEN, KING}; //ChessPieces
};
enum emptySquare EMPTY;
pla... | 1,330,874 |
the-stack-v2-dedup | C | /* File Mapping */
#include<unistd.h>
#include<sys/mman.h>
#include<sys/shm.h>
#include<fcntl.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<semaphore.h>
int main()
{
int file=4096; //to multiples of 4096
int filedes,off=0;
filedes=shm_open("/shm1",O_CREAT|O_RDWR,0666);
if(filedes<0)
{
perr... | 1,330,875 |
the-stack-v2-dedup | C | /* $NetBSD: in6_print.c,v 1.1 2014/12/02 19:36:58 christos Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
* 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. Redistributi... | 1,330,876 |
the-stack-v2-dedup | C | #ifndef _TASK_H_
#define _TASK_H_
#include <cpu.h>
#include <fs.h>
#define CONTEXT_SWITCH_FN_SIZE 12
#define CONTEXT_SWITCH_FN_TSKNO_FIELD 8
struct task {
/* ランキュー・ウェイクアップキュー(時間経過待ち・イベント待ち)の
* いずれかに繋がれる(同時に複数のキューに存在することが無いよう
* 運用する) */
struct task *prev;
struct task *next;
unsigned short task_id;
struct ts... | 1,330,877 |
the-stack-v2-dedup | C | #pragma once
#include "system/angband.h"
typedef struct monster_type monster_type;
void set_friendly(monster_type *m_ptr);
void set_pet(player_type *player_ptr, monster_type *m_ptr);
void set_hostile(player_type *player_ptr, monster_type *m_ptr);
void anger_monster(player_type *player_ptr, monster_type *m_ptr);
bool... | 1,330,878 |
the-stack-v2-dedup | C | /**
***********************************************************************************
* @file fonts.h
* @brief Definitions for current setting.
* @author Robin Li
* @version V1.0.0
* @date 09/05/2018
************************************************************************************
* <h2><center>© COP... | 1,330,879 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdlib.h>
void main(int argc,char *argv[])
{
char ch;
int i=0;
FILE *fp = fopen(argv[1],"r");
while((ch = fgetc(fp))!=EOF)
i++;i++;
char *buf = (char *)malloc(i*sizeof(char));
rewind(fp);
i=0;
while((ch = fgetc(fp))!=EOF)
{
if(ch == ' ')
conti... | 1,330,880 |
the-stack-v2-dedup | C | /*************************************************************************
> File Name: 1.c
> Author:
> Mail:
> Created Time: 2020年02月13日 星期四 21时39分15秒
************************************************************************/
#include<stdio.h>
int main()
{
int a[3][4];
printf("&a=%p\t&a+1%p\n",&a,&a+1);... | 1,330,881 |
the-stack-v2-dedup | C | /*
* adl_CmdStackHandler.c
*
* Created: 4/10/2557 13:27:32
* Author: pan
*/
#include <adl_global.h>
#include <stdarg.h>
#include "../private/adl_CmdStack_Private.h"
static wm_lst_t ADL_CMDSTACK_ATList = NULL;
#define ADL_CMDSTACK_ATLIMIT_STACK 5
static uint8_t ADL_CMDSTACK_ATLimit = 0;
adl_cmdstack_at_item_t ... | 1,330,882 |
the-stack-v2-dedup | C | // WidgetBlueprintGeneratedClass WB_SeeThroughJustDodge_Cutin.WB_SeeThroughJustDodge_Cutin_C
// Size: 0x260 (Inherited: 0x248)
struct UWB_SeeThroughJustDodge_Cutin_C : UWB_CutinBase_C {
struct FPointerToUberGraphFrame UberGraphFrame; // 0x248(0x08)
struct UImage* DarkTopAndBottom; // 0x250(0x08)
struct UImage* Image... | 1,330,883 |
the-stack-v2-dedup | C | /**
******************************************************************************
* @file image.h
* @author MCD Application Team
* @version V1.0.1
* @date 11-November-2013
* @brief Test display image (Coding : 16bpp mode RGB565)
***********************************************************... | 1,330,884 |
the-stack-v2-dedup | C | #include "global_fakes.h"
#include <string.h> // for memcpy
DEFINE_FAKE_VOID_FUNC1(voidfunc1, int);
DEFINE_FAKE_VOID_FUNC2(voidfunc2, char, char);
DEFINE_FAKE_VALUE_FUNC0(long, longfunc0);
DEFINE_FAKE_VALUE_FUNC0(enum MYBOOL, enumfunc0);
DEFINE_FAKE_VALUE_FUNC0(struct MyStruct, structfunc0);
DEFINE_FAKE_VOID_FUNC3_VAR... | 1,330,885 |
the-stack-v2-dedup | C | /* SPDX-License-Identifier: GPL-2.0 */
/* Primary function overlay window definitions
* and service functions used by LPDDR chips
*/
#ifndef __LINUX_MTD_PFOW_H
#define __LINUX_MTD_PFOW_H
#include <linux/mtd/qinfo.h>
/* PFOW registers addressing */
/* Address of symbol "P" */
#define PFOW_QUERY_STRING_P 0x0000
/* ... | 1,330,886 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<string.h>
#define MAXN 8000
int main()
{
int a[MAXN], len_of_a[MAXN], n, i, j, max = 0;
while(scanf("%d", &n) == 1)
{
memset(len_of_a, 0, sizeof(len_of_a));
len_of_a[0] = 1;
for(i = 0; i < n; i++) scanf("%d", &a[i]);
for(i = 1; i < n; i++)
{
for(max = 0, j = i - 1; j >= 0; j... | 1,330,887 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <pthread.h>
#include <netinet/in.h>
void* receiveMsg(void* curSocket)
{
char buffer[1000];
memset(buffer , '\0' , sizeof(buffer));
int newsocketfd = *((int *)curSocket);
int len = ... | 1,330,888 |
the-stack-v2-dedup | C | /*
* US.h
*
* Created on: Feb 4, 2013
* Author: 8460p
*/
#ifndef US_H_
#define US_H_
#define DEVIDER 3821 // 7642 bei 50ms ov time
#define APTASTRATE 0
#define DISTANCEOFFSET 60
#include "Cpu.h"
uint32_t distanceFront;
uint32_t distanceHeck;
uint32_t distanceRechtsFront;
uint32_t d... | 1,330,889 |
the-stack-v2-dedup | C |
#include "zlog.h"
#include "heap_sort.h"
#define LEFT(i) ((i<<1)+1)
#define RIGHT(i) ((i<<1)+2)
/*
* heap sort
* stable: false
* complexity: n*lg(n)
*/
void build_heap(int *arr, size_t len);
void heapify(int *arr, int top, int len);
void heap_to_sort(int *arr, size_t len);
static inline void swap(int *a1, int ... | 1,330,890 |
the-stack-v2-dedup | C | #pragma once
#include "common.h"
typedef struct room_tree {
int x1, y1, x2, y2;
int S;
int len_x, len_y;
int door_x[2], door_y[2];
} room_tree_t;
typedef struct vector_room {
struct tree_room_t ** data;
size_t len;
size_t max_len;
} vector_room_t;
typedef struct tree_room_t {
struct tree_room_t *left, *right, *... | 1,330,891 |
the-stack-v2-dedup | C | #include <hdf5.h>
#ifdef __cplusplus
extern "C" {
#endif
// For H5Dchunk_iter() callback
typedef struct {
size_t itemsize;
size_t chunkshape;
haddr_t *addrs;
} chunk_iter_op;
int fill_chunk_addrs(hid_t dataset_id, hsize_t nchunks, chunk_iter_op *chunk_op);
int clean_chunk_addrs(chunk_iter_op *chunk_op);
hid_... | 1,330,892 |
the-stack-v2-dedup | C | // cmake will use this template (config.h.in) to generate config.h
/* #undef HAVE_PTHREAD_SPINLOCKS */
#define HAVE_DARWIN_SPINLOCKS
#define HAVE_UNFAIR_LOCKS
| 1,330,893 |
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,330,894 |
the-stack-v2-dedup | C | #ifndef INITSERIAL_H
#define INITSERIAL_H
#include "serial.h"
void initSerial(int argc, char **argv, serial::Serial *serial);
#endif // INITSERIAL_H
| 1,330,895 |
the-stack-v2-dedup | C | #include "../../Gui.h"
#include "../GUI_lcd_driver.h"
subord_mem_t* GUI_edit_mem_req( void );
#if GUI_LISTVIEW_EN>0
static uint16_t m_GUI_listview_Bgcor = 0x841F;
static uint16_t m_GUI_listview_Fgcor = C_GUI_BlACK;
typedef struct
{
Bsize_t id;
char title[20];
}listview_member_t;
#define MAX_LIST_SIZE ... | 1,330,896 |
the-stack-v2-dedup | C | // диалог по городам
void ProcessCommonDialogEvent(ref NPChar, aref Link, aref NextDiag)
{
switch(Dialog.CurrentNode)
{
case "quests":
dialog.text = "Speak, I am listening";
link.l1 = "I was mistaken. Farewell.";
link.l1.go = "Exit";
//Португалец
if (CheckAttribute(pchar, "questTemp.P... | 1,330,897 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: ... | 1,330,898 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* move_move.c :+: :+: :+: ... | 1,330,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.