source string | code_lang string | content string | idx int64 |
|---|---|---|---|
the-stack-v2-dedup | C | --- tools/irsend.c.orig 2011-03-25 22:28:18 UTC
+++ tools/irsend.c
@@ -41,6 +41,9 @@
#include <errno.h>
#include <signal.h>
#include <limits.h>
+#ifdef __FreeBSD__
+#include <netinet/in.h>
+#endif
#include <stdint.h>
| 1,329,000 |
the-stack-v2-dedup | C | /**
* This file is part of the Detox package.
*
* Copyright (c) Doug Harple <detox.dharple@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "filelist.h... | 1,329,001 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <pthread.h>
#define NTHREADS 100
void *thread_function(void *);
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
long int counter = 0;
main()
{
long int ttime1;
long int ttime2;
long int ttime;
ttime1 = time(NULL);
pthread_t thread_id[NTHREADS];
int i, j;
for(i=0; i < NTH... | 1,329,002 |
the-stack-v2-dedup | C | #include "netutils.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <net/ethernet.h>
#include <stdlib.h>
#include <errno.h>
static int interface_exists(const char* iface) {
return... | 1,329,003 |
the-stack-v2-dedup | C | #include "testlib.h"
#include "persistence.h"
#include <stdio.h>
#include <string.h>
int main()
{
test_start("You changed the pointer and copied all data.");
test_plan(3);
time_t timecode1 = 1388530800;
time_t timecode2 = 1420066800;
struct tm *time1 = gmtime(&timecode1);
struct tm *time1_pre... | 1,329,004 |
the-stack-v2-dedup | C | /*
FPGA Project: Averager
Server for setting configuration and reading data from FPGA
04.01.2020 by Frank Lee (Academia Sinica)
16.12.2016 by Anton Potocnik
Modified Pavel Demin's server.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include... | 1,329,005 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#define MAX_SINGLE_INPUT 8192
#define GENERAL_INTEGER 100
#define WREND 1
#define RDEND 0
#define CHILD 0
pthread_mutex_t mutex;
char*** threadArgvs;
int t... | 1,329,006 |
the-stack-v2-dedup | C | /*
* Drivers for CSR SiRFprimaII onboard UARTs.
*
* Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
*
* Licensed under GPLv2 or later.
*/
#include <linux/bitops.h>
/* UART Register Offset Define */
#define SIRFUART_LINE_CTRL 0x0040
#define SIRFUART_TX_RX_EN 0x004c
#define SIRFUAR... | 1,329,007 |
the-stack-v2-dedup | C | /*
* Diagrame cómo queda el Stack y el Heap al
* finalizar la ejecución.
*/
int* un_entero_en_el_heap(int numero){
int* aux = malloc(sizeof(int));
*aux = 8;
return aux;
}
int main(){
int* un_entero = un_entero_en_el_heap(8);
int a = *un_entero;
/*
* ...
*/
} | 1,329,008 |
the-stack-v2-dedup | C | const int PORT_CSI = 1000;
const int PORT_PING = 2222;
const char *GROUP_PING = "224.1.1.1";
wifi_csi_config_t configuration_csi = {
.lltf_en = 1,
.htltf_en = 1,
.stbc_htltf2_en = 1,
.ltf_merge_en = 1,
.channel_filter_en = 0,
.manu_scale = 0,
.shift = 0,
};
#define STA_WIFI_SSID "CHANGEME... | 1,329,009 |
the-stack-v2-dedup | C | /*
Author: James Nuttall (james@cromulence.co)
Copyright (c) 2014 Cromulence LLC
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 limitation the rights
to u... | 1,329,010 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_atoi.c :+: :+: :+: ... | 1,329,011 |
the-stack-v2-dedup | C | #pragma once
#include "bit-array.h"
size_t hamming_encode(bits_t *dst, bits_t *src);
size_t hamming_decode(bits_t *dst, bits_t *src);
| 1,329,012 |
the-stack-v2-dedup | C | #pragma once
#include "../WorldDefine/base_define.h"
#include "../WorldDefine/RoleDefine.h"
#include "../WorldDefine/time.h"
#include "../WorldDefine/talent_define.h"
#include "../WorldDefine/currency_define.h"
#include "../ServerDefine/clandata_define.h"
#include "../ServerDefine/strength_define.h"
#pragma pack(push,... | 1,329,013 |
the-stack-v2-dedup | C | // COPYRIGHT_BEGIN
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
//
// Copyright (C) 2008-2013, Cable Television Laboratories, Inc.
//
// This software is available under multiple licenses:
//
// (1) BSD 2-clause
// Redistribution and use in source and binary forms, with or without modi... | 1,329,014 |
the-stack-v2-dedup | C | /* This file has been generated by the Hex-Rays decompiler.
Copyright (c) 2007-2017 Hex-Rays <info@hex-rays.com>
Detected compiler: GNU C++
*/
#include <defs.h>
//-------------------------------------------------------------------------
// Function declarations
int __fastcall nna_reg_open(unsigne... | 1,329,015 |
the-stack-v2-dedup | C | #include<stdlib.h>
#include<string.h>
#include<stdio.h>
#include "history.h"
ll list;
void init_ll()
{
list.head = 0;
list.tail = -1;
list.counter = 0;
}
void add_cmd(char *cmd)
{
list.tail++;
list.tail = list.tail % MAX_CMD_SIZE;
strcpy(list.cmd_list[list.tail].cmd, cmd);
list.counter++;
list.cmd_list[lis... | 1,329,016 |
the-stack-v2-dedup | C | /*4.使用if else语句编写一个程序读取输入,读到#停止。用感叹号替换句
* 号,用两个感叹号替换原来的感叹号,最后报告进行了多少次替换。
*/
#include <stdio.h>
int main(void)
{
char ch;
int n = 0;
printf("Please enter the string:\n");
while ((ch = getchar()) != '#'){
if(ch == '.')
{ putchar('!');
n++;
}
else if(ch == '!')
{
putchar('i');
putchar('!');
... | 1,329,017 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* command.c :+: :+: :+: ... | 1,329,018 |
the-stack-v2-dedup | C | #include "double3.h"
hid_t H5VL_hxhim_create_double3_type() {
hid_t double3_id = H5Tcreate(H5T_COMPOUND, sizeof(struct double3_t));
H5Tinsert(double3_id, "subject", HOFFSET(struct double3_t, subject), H5T_NATIVE_DOUBLE);
H5Tinsert(double3_id, "predicate", HOFFSET(struct double3_t, predicate), H5T_NATIV... | 1,329,019 |
the-stack-v2-dedup | C | /* -*-C-*-
********************************************************************************
*
* File: trie.c (Formerly trie.c)
* Description: Functions to build a trie data structure.
* Author: Mark Seaman, OCR Technology
* Created: Fri Oct 16 14:37:00 1987
* Modified: Fri Jul 26 12:18:10... | 1,329,020 |
the-stack-v2-dedup | C | #include <linux/unistd.h>
#include <stdio.h>
int main(void)
{
printf("api teset\n");
syscall(366);
return 0;
}
| 1,329,021 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_list_helper.c :+: :+: :+: ... | 1,329,022 |
the-stack-v2-dedup | C |
/*
****************************
* ANDRIAMAHALEO ALEX (C) EN COLLABORATION AVEC EL-YOUSFI AYOUB
* VERSION 2.2.1 GCC V0.8
* PPM.H 2016
* UNIX UBUNTU 14.04 LTS
****************************
*/
#ifndef __PPM__
#define __PPM__
#include <stdio.h>
#include <stdlib.h>
#include "listep.h"
#include "listep_op.h"
int tab_ppm[... | 1,329,023 |
the-stack-v2-dedup | C | #ifndef _HAL_FLASH_DRIVER_H_
#define _HAL_FLASH_DRIVER_H_
#include "stm32f4xx.h" // Device header
#include "HAL_Common.h"
#ifdef __cplusplus
extern "C" {
#endif
/*****************************************************************************/
/***********************************************************... | 1,329,024 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char **argv) {
int i = 0;
/* Текущий такт конвейера */
long int tact = 1;
/* Последнее состояние tact. tact - last_tact = Время нахождения элемента в
* конвейере */
long int last_tact = tact;
/* Границы времени выполнения этап... | 1,329,025 |
the-stack-v2-dedup | C | // unions
#include <stdio.h>
/*
Only allocates the size of the largest variable not the size of both.
8 bytes for the double.
the int and the double can still be used but only one at a time
*/
union rnumbers {
int in;
double dn;
};
int main() {
// example
union rnumbers rn;
rn.in = 23;
printf("%d\n", rn.in);... | 1,329,026 |
the-stack-v2-dedup | C | /*
* project collectd_edit
* ing. Carlo Capelli
* Brescia 2015
* Copyright (c) 2015,2016 Sputnik7
* License MIT
*/
#ifndef PLUGIN_TO_STORE_H
#define PLUGIN_TO_STORE_H
#include "model.h"
#include <gtkmm/treestore.h>
/**
* @brief The plugin_to_store struct
* transfer a structured configuration block (a plugin... | 1,329,027 |
the-stack-v2-dedup | C | #ifndef _APPL_MEM_CONFIG_H_
#define _APPL_MEM_CONFIG_H_
#define REGION_ROM REGION_EXT_RAM
#define REGION_RAM REGION_EXT_RAM
#endif | 1,329,028 |
the-stack-v2-dedup | C | #include "sinyd_time.h"
#include <stdio.h>
void sinyd_reset()
{
m_time.tv_sec = 0;
m_time.tv_usec = 0;
}
bool sinyd_iszero()
{
return (m_time.tv_sec == 0) && (m_time.tv_usec == 0);
}
void sinyd_now()
{
gettimeofday(&m_time, NULL);
}
s32 get_year(void)
{
struct tm *p = localtime(&m_time.tv_sec);
... | 1,329,029 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
typedef struct nod {
int val;
struct nod* next;
} Nod;
void adauga (Nod* &l, int x)
{
Nod* aux, *nou = (Nod*) malloc (sizeof(Nod));
nou->val = x;
if (l == NULL || x <= l->val) {
nou->next = l;
l = nou;
} else {
aux = l;
while (aux->next != NULL && aux->next->val <... | 1,329,030 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<conio.h>
void main()
{
int a[100],i,j,n,flag=0;
clrscr();
printf("\n\t\t to find elments in the array are unique or not");
printf("\n enter the size of the array :");
scanf("%d",&n);
printf("\n enter the elements into the array :");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
for(j... | 1,329,031 |
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,329,032 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
char *my_strcpy(char *dest, const char *src);
int score, trials;
void test(char *x, const char *c) {
trials++;
char* r = my_strcpy(x, c);
printf("Test %d: \"%s\" [corretto: \"%s\"] - return: %p [corretto: %p]\n", trials, x, c, r, x);
score += strcmp(x,c) == 0 &&... | 1,329,033 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strtrim.c :+: :+: :+: ... | 1,329,034 |
the-stack-v2-dedup | C | /* c7p09.c
Ray Santos
September 11, 2013
C Programming: A Modern Approach, Second Edition
Chapter 7, Programming Project 9
Write a program that asks the user for a 12-hour time,
then displays the time in 24-hour form:
Enter a 12-hour time: 9:11 PM
Equivalent 24-hour time: 21:11
... | 1,329,035 |
the-stack-v2-dedup | C | const char* ssid = "Dial Up ☎";
const char* password = "glut17@sigma";
const char* host = "192.168.0.100";
| 1,329,036 |
the-stack-v2-dedup | C | #ifndef SOCKETIODATAGRAM_H
#define SOCKETIODATAGRAM_H
#include <stdint.h>
#include <stddef.h>
#include <sys/socket.h>
typedef void *SocketIODatagramEndpoint_t;
typedef void *SocketIODatagram_continue_t;
typedef void (*SocketIODatagramEndpoint_dgram_recvd_cb)(SocketIODatagramEndpoint_t endpoint, void *arg, uint8_t *d... | 1,329,037 |
the-stack-v2-dedup | C | #pragma once
bool ActionAccessPoint();
| 1,329,038 |
the-stack-v2-dedup | C | /*
* Phoenix-RTOS --- LwIP port
*
* LwIP OS mode layer - TCP/IP thread wrapper
*
* Copyright 2018 Phoenix Systems
* Author: Michał Mirosław
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "arch/cc.h"
#include "lwip/tcpip.h"
#include "filter.h"
#include "netif-driver.h"
#include <lwipopts.h>
#include <s... | 1,329,039 |
the-stack-v2-dedup | C | struct node{
char *key;
struct node **child;
int noc;
int sz;
};
typedef struct node node;
struct pathArr{
char **p;
int sz;
};
typedef struct pathArr pathArr;
void find_lca(node *root, char *p1, char *p2);
void readData(node *root, int n);
node *create_node();
| 1,329,040 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
//@ #include "lpm-dir-24-8.gh"
#define lpm_PLEN_MAX 32
#define BYTE_SIZE 8
#define INVALID 0xFFFF
#define lpm_24_FLAG_MASK 0x8000 // == 0b1000 0000 0000 0000
#define lpm_24_MAX_ENTRIES 16777216//=... | 1,329,041 |
the-stack-v2-dedup | C | /****************************************************************************
* kuil.h
* --------------------------------------------------------------------------
* interfaces
* --------------------------------------------------------------------------
* Copyright(c) 2012 NFRI. All Rights Reserved.
* -----------... | 1,329,042 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* player.c :+: :+: :+: ... | 1,329,043 |
the-stack-v2-dedup | C | /* associative array */
void assoc_init(const int hashpower_init);
item *assoc_find(const char *key, const size_t nkey, const uint32_t hv);
int assoc_insert(item *item, const uint32_t hv);
void assoc_delete(const char *key, const size_t nkey, const uint32_t hv);
void do_assoc_move_next_bucket(void);
int start_assoc_mai... | 1,329,044 |
the-stack-v2-dedup | C | /*
Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.
*/
#ifndef ENCRCTR_H
#define ENCRCTR_H
#define MVAR_Reactor_Off (0)
#endif // ENCRCTR_H
| 1,329,045 |
the-stack-v2-dedup | C | /* BLINK.C - Implements the blink stuff
*
* Copyright 1993-2015 CIX Online Ltd, 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/... | 1,329,046 |
the-stack-v2-dedup | C | #ifndef MALE_ZADANIE_DYNARRAY_H
#define MALE_ZADANIE_DYNARRAY_H
#include <stdlib.h>
//wszystkie funkcje zwiazane z tablicami dynamicznymi,
//ktore mozna zaimplementowac polimorficznie
//typ COMP_FUNC to wskaznik na funkcje, ktora przyjmuje dwa wskazniki
//i porownuje wartosci pod tymi wskaznikami,
//zwracajac cos dod... | 1,329,047 |
the-stack-v2-dedup | C |
double tt_smearing[9][2] = {
{1.5014,6.02678e-01}, //10
{1.48738e+00,5.10235e-01}, //20
{1.47556e+00,4.56686e-01}, //30
{1.46485e+00,4.18910e-01}, //40
{1.45462e+00,4.05808e-01}, //50
{1.46194e+00,3.81062e-01}, //60
{1.45906e+00,3.70850e-01}, //70
{1.45519e+00,3.60065e-01}, //80
{1.45534e... | 1,329,048 |
the-stack-v2-dedup | C | #pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <assert.h>
#include <exception>
// System.String
struct String_t;
#include "codegen/il2cpp-codegen.h"
#include "mscorlib_System_Collections_Generic_KeyValuePair_24189762890.... | 1,329,049 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
void *loop1(void *p){
asm ("tbegin. \n\t");
asm goto ("beq %l[failure] \n\t" : : : : failure);
asm ("li 3, 3\n\t");
asm ("tend. \n\t");
exit(1);
failure:
printf("Failure\n");
return NULL;
}
void *loop(void *p){
asm ("tbegin. \n\t");
... | 1,329,050 |
the-stack-v2-dedup | C | #ifndef CUTE_PARROT_TEST_H
#define CUTE_PARROT_TEST_H
#include <stdint.h>
#define CUTE_PARROT_TEST_WIDTH 528
#define CUTE_PARROT_TEST_HEIGHT 556
extern const uint8_t CuteParrotTestRgbImg[CUTE_PARROT_TEST_WIDTH * CUTE_PARROT_TEST_HEIGHT * 3 + 1];
#endif
| 1,329,051 |
the-stack-v2-dedup | C | /*++
INTEL CORPORATION PROPRIETARY INFORMATION
This software is supplied under the terms of a license
agreement or nondisclosure agreement with Intel Corporation
and may not be copied or disclosed except in accordance with
the terms of that agreement.
Copyright (c) 1992-1999 Intel Corporation... | 1,329,052 |
the-stack-v2-dedup | C | /*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stddef.h> /* For NULL declaration */
#include <stdint.h>
#include <stdbool.h>
#include "hal/misc.h"
#include "soc/lcd_cam_reg.h"
#include "soc/lcd_cam_struct.h"
#include "hal... | 1,329,053 |
the-stack-v2-dedup | C | /*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributin... | 1,329,054 |
the-stack-v2-dedup | C | #define _ASM_X86_RESUME_TRACE_H
#define TRACE_RESUME(user) \
do while (0)
| 1,329,055 |
the-stack-v2-dedup | C | #include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <errno.h>
#include <semaphore.h>
#include <unistd.h>
sem_t sem;
void *thread_func(void *arg) {
int i;
int loc_id = *(int *)arg;
sem_post(&sem);
for(i = 0; i < 5; i++) {
printf("Thread %i is running\n", loc_id);
sleep(1);
}
//sem_po... | 1,329,056 |
the-stack-v2-dedup | C | #include <stdio.h>
int isScript(char *file){
FILE *fp;
fp = fopen(file, "r");
if (fgetc(fp)==35){//#
if(fgetc(fp)==33){// !
fclose(fp);
return 1;
}
}
fclose(fp);
return 0;
}
| 1,329,057 |
the-stack-v2-dedup | C | /*
* kernel/private/drivers/ambarella/crypto/crypto_api.h
*
* History:
* 2011/05/05 - [Jian Tang] created file
* Copyright (C) 2007-2011, Ambarella, Inc.
*
* All rights reserved. No Part of this file may be reproduced, stored
* in a retrieval system, or transmitted, in any form, or by any means,
* electronic, ... | 1,329,058 |
the-stack-v2-dedup | C | /*********************************************************************
*
* Tick Manager for MPS430
*
*********************************************************************
*
*
* Author Date Comment
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Nilesh R... | 1,329,059 |
the-stack-v2-dedup | C | void main(){
int32_t a, b=97, c, d=100;
c=99;
putchar(b);
putchar(c);
putchar(d);
} | 1,329,060 |
the-stack-v2-dedup | C | /*
* =====================================================================================
*
* Filename: LinkQueue.h
*
* Description: 队列的链式存储实现
*
* Version: 1.0
* Created: 11/30/2014 12:31:46 PM
* Revision: none
* Compiler: gcc
*
* Author: 张世龙 (mn), jack_zsl... | 1,329,061 |
the-stack-v2-dedup | C | // ----------------------------------------------------------------------------
// Copyright 2016-2017 ARM Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache... | 1,329,062 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define MAXTHREADS 20
#define NMAX 1000000
void *randint(void *);
int count[MAXTHREADS], tcount;
int main(int argc, char *argv[])
{
int i, nthreads;
pthread_t tid[MAXTHREADS];
nthreads = atoi(argv[1]);
tcount = 0;
for (i=0... | 1,329,063 |
the-stack-v2-dedup | C | /*
LUFA Library
Copyright (C) Dean Camera, 2009.
dean [at] fourwalledcubicle [dot] com
www.fourwalledcubicle.com
*/
/*
Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
Permission to use, copy, modify, and distribute this software
and its do... | 1,329,064 |
the-stack-v2-dedup | C | /* 0x80406100 function: forces OBJ to use yoshi animations */
#include <n64.h>
#include <mario64.h>
struct object **Obj = (void*)M64_CURR_OBJ_PTR;
void _start (void)
{
asm volatile("la $gp, _gp");
(*Obj)->animation = SegmentedToVirtual (0x05023f34); // Yoshi walking... | 1,329,065 |
the-stack-v2-dedup | C |
#include <avr/io.h>
#ifdef _SIMULATE_
#include "simAVRHeader.h"
#endif
enum LIGHT_STATES {WAIT, LIGHT_ONE, WAIT_ONE, LIGHT_THREE, WAIT_THREE, LIGHT_FIVE, WAIT_FIVE, LIGHT_TWO, WAIT_TWO,LIGHT_FOUR, WAIT_FOUR,LIGHT_SIX, WAIT_SIX, RESET} LIGHT_STATE;
void LIGHT_SM(){
switch(LIGHT_STATE){
case WAIT:
if... | 1,329,066 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr_fd.c :+: :+: :+: ... | 1,329,067 |
the-stack-v2-dedup | C | #ifndef SUBMENUGUERREROS_H
#define SUBMENUGUERREROS_H
#include "Barco.h"
Guerrero capturarGuerrero()
{
Guerrero a;
string id;
int salud;
float fuerza;
float escudo;
string tipoguerrero;
cout << endl;
cout << "Id: ";
getline(cin, id);
a.setId(id);
cout << en... | 1,329,068 |
the-stack-v2-dedup | C | /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* NaCl Service Runtime. I/O Descriptor / Handle abstraction.
* Bound IMC descriptors.
*/
#include <stdlib.h>
#include <string.h>
#... | 1,329,069 |
the-stack-v2-dedup | C | bool trigMatch_1L2LTrig;
bool trigMatch_1L2LTrigOR;
ULong64_t EventNumber;
Int_t RunNumber;
Int_t RandomRunNumber;
Float_t Mu;
Int_t nVtx;
Float_t mll;
//Float_t MT2Top;
//Float_t MT2W;
float MET;
float MET_phi;
float MET_softTerm;
float MET_softPhi;
//Float_t truthMET;
//Float_t truthMET_Phi;
Float_t DPhi_METJetLeadin... | 1,329,070 |
the-stack-v2-dedup | C | int printf(const char *, ...);
#define out(msg, args...) printf(msg, args)
int main(void) {
out("%s", "Hello");
out("%c %s\n", ',', "World!");
return 0;
}
| 1,329,071 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
// 需要使用函数指针的函数 的形参类型 必须为 const void* 类型
int compare_scores(const void* s_a, const void* s_b){
int a=*(int*)s_a;//void* 转成 int* 再取地址中的值
int b=*(int*)s_b;
return a-b;//升序 b-a为降序排列
}
typedef struct{
int width;
int height;
} rectangle;//矩形类型 结构体 ... | 1,329,072 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
#define BUFLEN 64
int main() {
char input[BUFLEN] = "Rey, Luke, Leia: Anakin, Padme";
int i = 0;
char *token = strtok(input, "-");
printf("%d: [%p] --- %s\n", i, token, token);
// Get the first element
token = strtok(input, ",:");
printf("%d: [%p] --- %s\n", i, t... | 1,329,073 |
the-stack-v2-dedup | C | #include <stdio.h>
int absocompare();
int getabsovalue();
int main()
{
int num1, num2;
printf("두개의 정수 입력: ");
scanf("%d %d", &num1, &num2);
printf("%d와 %d중 절댓값이 큰 정수 : %d\n", num1, num2, absocompare(num1, num2));
return 0;
}
int absocompare(int num1, int num2)
{
if (getabsovalue(num1) > getab... | 1,329,074 |
the-stack-v2-dedup | C | /*
Функция selection_sort сортирует массив с помощью сортировки выбором.
Алгоритм сортировки выбором заключается в следующем (size это размер массива):
Для каждого i от 0 до size - 1 сделаем следующее:
1) Найдём индекс минимального элемента на подмассиве [i, size)
2) Поменяе... | 1,329,075 |
the-stack-v2-dedup | C | /*
** EPITECH PROJECT, 2021
** B_ASM_400_BER_4_1_asmminilibc_karl_erik_stoerzel
** File description:
** rindex.c
*/
#include "../tests.h"
int test7()
{
int ret = 0;
printf("rindex test");
char *str = strdup("testlol huhu asdf");
char *real = rindex(str, ' ');
char *my = myrindex(str, ' ');
if... | 1,329,076 |
the-stack-v2-dedup | C | ///\file
///\brief Função menu_aluguer() - menu para o aluguer
///\details Função que mostra um menu para fazer cada uma das operações: alugar, devolver, .
///\authors Nelson Fernandes N.º 15390
///\authors Rita Serra N.º 47086
///\authors Marta Santos N.º 47181
///\date Jan. 2013
///\version 1.0
///\copyrigh... | 1,329,077 |
the-stack-v2-dedup | C | /*
* serial_debug.c
*
* Created on: 27.05.2018
* Author: ole
*/
#import "serial_debug.h"
#define DBG_UART_BUFFER_LENGTH 4096
char debug_uart_buffer[DBG_UART_BUFFER_LENGTH];
volatile uint32_t nr_chars_stored = 0;
volatile char *next_input_to_buffer = &debug_uart_buffer[0];
volatile char *next_output_of_buf... | 1,329,078 |
the-stack-v2-dedup | C | /* Test file for Traces Plugin */
#include <stdio.h>
#include "tracesTest_c.h"
int main(int argc, const char * argv[]) {
printf("%s\n", "start main");
forFunc(10);
whileFunc(10);
ifFunc(10);
switchFunc(10);
printf("%s\n", "exit main");
return 0;
}
| 1,329,079 |
the-stack-v2-dedup | C | #include <stdio.h>
int main()
{
int a1 = 0, a2 = 1, sonraki = 0, n;
printf("pozitif sayi giriniz:");
scanf("%d", &n);
// ilk 2 adım 0 1
printf("Fibonacci Series: %d, %d, ", a1, a2);
sonraki = a1 + a2;
while(sonraki <= n)// girilen sayının bi kücügüne kadar fib devam eder
{
printf... | 1,329,080 |
the-stack-v2-dedup | C | //
// Created by jglrxavpok on 17/10/19.
//
#include "Arduino.h"
#include "DynamixelManager.h"
void changeID(DynamixelManager* manager); | 1,329,081 |
the-stack-v2-dedup | C | #include "video_cfg.h"
#if INCLUDE_OV7720
#include"../inc/video_cfg.h"
//#include "ftuart.h"
#include "comm.h"
#include "../video/VIN_API.h"
#include "sun_type_defs.h"
#include "VIN_SET.h"
#include "2risc_comm_protocol.h"
#include "video_api.h"
#include "iic.h"
#include "video_intr.h"
#include "... | 1,329,082 |
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,329,083 |
the-stack-v2-dedup | C | /** ============================================================================
* @file rgb2ycbcr-dsp_os.c
*
* @path $(DSPLINK)/gpp/src/samples/rgb2ycbcr-dsp/Linux/
*
* @desc OS specific implementation of functions used by the rgb2ycbcr-dsp
* application.
*
* @ver 1.65.00.03
* =========... | 1,329,084 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<math.h>
int main()
{
int yr;
long double pos,diff;
while(scanf("%d%lld",&yr,&pos)!=NULL)
{
diff=pow(2,64)-pos;
while(diff>=2)
{
int i=0;
while(pow(2,i)-pos<0)
{
i++;
}
diff=pow(2,i)-pos;
pos=diff;
}
if(diff==1&&yr%2!=0)
printf("B");
else
printf("R")... | 1,329,085 |
the-stack-v2-dedup | C | #include "analyzer/keep_alive.h"
#include <sys/time.h>
#include <stdio.h>
#include <time.h>
extern int keep_alive_timeout_ms = 10000;
struct timespec calculate_timestamp(int time_ms)
{
struct timeval tv;
struct timespec ts;
gettimeofday(&tv, NULL);
ts.tv_sec = time(NULL) + time_ms / 1000;
ts.tv_... | 1,329,086 |
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,329,087 |
the-stack-v2-dedup | C | 121 121 36
3.9629347400000001 4.1191367699999999 0.0000000000000000
5.8855842400000000 6.0954625099999999 0.0000000000000000
3.5264783300000002 6.3747426999999997 0.0000000000000000
4.9242594899999999 5.107299639999999... | 1,329,088 |
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,329,089 |
the-stack-v2-dedup | C | #include "main.h"
/*
* calculate ip checksum (first 20 bytes)
*/
unsigned short CalcIPChecksum(unsigned short *addr, unsigned int count) {
unsigned long sum = 0;
while (count > 1) {
sum += *addr++;
count -= 2;
}
/* if any bytes left, pad the bytes and add */
if(count > 0) {
sum += ((*addr) &... | 1,329,090 |
the-stack-v2-dedup | C | #ifndef _QUEQUE_H_
#define _QUEQUE_H_
#include <stdbool.h>
#define QUEUE_LEN 256
typedef int item_t;
typedef struct {
item_t array[QUEUE_LEN];
unsigned int front;
unsigned int rear;
unsigned int capacity;
unsigned int size;
} Queue;
void init(Queue *q);
void final(Queue *q);
void enqueue(Queue *q, item_t... | 1,329,091 |
the-stack-v2-dedup | C | /*
** score_tab.c for score_tab in /home/azriel/Epitech/PSU_2016_tetris/
**
** Made by Thomas Dominé
** Login <thomas.domine-@epitech.eu>
**
** Started on Wed Mar 1 15:22:30 2017 Thomas Dominé
** Last update Sat Mar 18 10:59:28 2017 Thomas Dominé
*/
#include "../include/my.h"
void print_sec(int sec, t_data *data... | 1,329,092 |
the-stack-v2-dedup | C | /* SPLIT.C
quiz #5 15-123 M09
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "getline.h"
void fatal( char * errmsg );
void printTokensArray( char **tokensArray, int tokensCnt );
void freeTokensArray( char ** tokensArray, int tokenCnt );
char ** split(char * line, int * tokenCnt);
int main( ... | 1,329,093 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlcat.c :+: :+: :+: ... | 1,329,094 |
the-stack-v2-dedup | C | /*
* lib1000.h
*
* Created on: Jul 17, 2013
* Author: paul
*/
#ifndef LIB1000_H_
#define LIB1000_H_
#include <linux/mm.h>
#include <linux/ioport.h>
typedef struct lib1000_module {
dev_t char_dev;
struct class* device_class;
} lib1000_module;
typedef struct sciaps_dev {
struct device* device;
struct r... | 1,329,095 |
the-stack-v2-dedup | C | // © Copyright 2020 Xilinx, Inc.
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... | 1,329,096 |
the-stack-v2-dedup | C | #include "jkHudCameraView.h"
#include "Win95/Windows.h"
#include "Win95/stdDisplay.h"
#include "General/stdBitmap.h"
#include "General/stdFont.h"
#include "General/stdString.h"
#include "stdPlatform.h"
#include "Cog/sithCog.h"
#include "Main/Main.h"
#include "Platform/std3D.h"
#include "jk.h"
static int jkHudCameraVi... | 1,329,097 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* Project: custom_libc :::::::: */
/* Members: dvoort, prmerku :+: :+: ... | 1,329,098 |
the-stack-v2-dedup | C | #pragma once
#include "objects/Physical.h"
inline float sqDist(const Physical* one, const Physical* two) {
return (*one->getPosition() - *two->getPosition()).LengthSquared();
}
inline float sqDist(const Vector3* one, const Vector3* two) {
return (*one - *two).LengthSquared();
}
inline float sqDist(const Vector3& o... | 1,329,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.