source string | code_lang string | content string | idx int64 |
|---|---|---|---|
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
int main(int argc, char* argv[]) {
char *sorted;
int len, tmp;
if (argc < 2) {
return 1;
} else {
sorted = argv[1];
len = strlen(sorted);
}
for (int i = 1; i < len ; i++) {
int tmp = sorted[i];
int j = i - 1;
while ((j >= 0) && (tmp < sorted[j])) {
sorted[j ... | 1,329,400 |
the-stack-v2-dedup | C | #include <stdio.h>
int api_demo_1(void)
{
#if defined(__X86_BUILD__)
printf("X86 build\n");
#elif defined(__ARM_BUILD__)
printf("ARM build\n");
#endif
return 0;
}
int api_demo_2(void)
{
printf("r u kidding me?\n");
return 0;
}
| 1,329,401 |
the-stack-v2-dedup | C | /* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "@(#)valloc.c 1.5 92/07/14 SMI" /* SVr4.0 1.2 */
#ifdef __STDC__
#pragma we... | 1,329,402 |
the-stack-v2-dedup | C |
#ifndef KEYIRQ_H
#define KEYIRQ_H
extern void keyboard_wrapper();
#endif
| 1,329,403 |
the-stack-v2-dedup | C | /* @(#)globals.h ( vax ) ver 1.4 created at 8/16/86 */
#ifndef GLOBALS_H
#define GLOBALS_H
#ifndef _DEFINES_H
#include "defines.h"
#endif
#ifndef STRUCTS_H
#include "structs.h"
#endif
#ifndef __MACIO_H
#include "macio.h"
#endif
/*************************************************************************... | 1,329,404 |
the-stack-v2-dedup | C | /**
* Copyright (C) 2011-2012 Juho Vähä-Herttua
*
* This library 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 version.
... | 1,329,405 |
the-stack-v2-dedup | C | #include "../sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c"
| 1,329,406 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: ... | 1,329,407 |
the-stack-v2-dedup | C | #include "DHTModules.h"
#include <event2/event.h>
/**
* @param base the libevent context.
* @param socket an open bound nonblocking reusable socket.
* @param addressLength since DHT only knows IPv4 from IPv6 by the number of
* bytes for address and port, this module will handle
* ... | 1,329,408 |
the-stack-v2-dedup | C | #include "elib.h"
static char *name = NULL; /* program name */
char *estrdup(char *s){
char *t;
t = malloc(strlen(s)+1);
if(t == NULL)
eprintf("estrdup(\"%.20s\") failed:", s);
strcpy(t, s);
return t;
}
void eprintf(char *fmt, ...){
va_list args;
fflush(stdout);
if(prog_na... | 1,329,409 |
the-stack-v2-dedup | C | #include <tros/hal/io.h>
unsigned char pio_inb(unsigned short port)
{
unsigned char ret;
__asm("inb %1, %0" : "=a"(ret) : "Nd"(port));
return ret;
}
void pio_outb(unsigned short port, unsigned char value)
{
__asm("outb %0, %1" : : "a"(value), "Nd"(port));
}
unsigned short pio_inw(unsigned short port... | 1,329,410 |
the-stack-v2-dedup | C | /* Copyright 2018 Canaan 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 agreed to in ... | 1,329,411 |
the-stack-v2-dedup | C | // x is rows
// y is columns
#ifndef BOARD_H
#define BOARD_H
#define X_SIZE 8
#define Y_SIZE 8
#define NUM_SQUARE_CLASSES 10
#include <stdbool.h>
typedef struct othello_bd {
char board[X_SIZE][Y_SIZE];
char turn;
char just_passed; // the last player passed
} othello_bd;
othello_bd *new_othello_bd (void);
void ... | 1,329,412 |
the-stack-v2-dedup | C |
//! module name string
//! NOTE that module number starts from APP_MOD_MIN_PID
char mod_pid_name[][256] = {
"Default APP ID0 ", // 128
"Default APP ID1 ", // 129
"Default APP ID2 ", // 130
"Default APP ID3 ", // 131
"Magsensor driver ", // 132
"Neigh... | 1,329,413 |
the-stack-v2-dedup | C | /* The contents of this file was automatically generated by
* dump_mode_arm_ne10.c with arguments: 48000 960
* It contains static definitions for some pre-defined modes. */
#include <NE10_types.h>
#ifndef NE10_FFT_PARAMS48000_960
#define NE10_FFT_PARAMS48000_960
static const ne10_int32_t ne10_factors_480[64] = {
4, ... | 1,329,414 |
the-stack-v2-dedup | C | #define _ASM_CRIS_ARCH_USER_H
struct user_regs_struct ;
| 1,329,415 |
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,416 |
the-stack-v2-dedup | C | enum
{
IDS_MANUFAC = 1001,
IDS_LUMCAT = 1002,
IDS_LUMINAIRE = 1003,
IDS_LAMPCAT = 1004,
IDS_LAMP = 1005,
IDS_FOUND_IES = 1006,
IDS_FOUND_LIGHTS = 1007,
IDS_IES_META_CREATED = 1008,
IDS_IES_HEADER = 1009,
// End of symbol definition
_DUMMY_ELEMENT_
};
| 1,329,417 |
the-stack-v2-dedup | C | int ft_strcmp(char *s1, char *s2)
{
int i;
i = 0;
if (s1[0] == '\0' || s2[0] == '\0')
return 0;
while (s1[i] == s2[i] && s1[i] && s2[i])
{
i++;
return (s1[i] - s2[i]);
}
}
| 1,329,418 |
the-stack-v2-dedup | C | /*
LKT4302A
*/
/**
* @file DEF_Macro.h
*
* $Revision$
* $Date$
* $Author$
*/
/*** Header define ************************************************************/
#ifndef __DEF_MACRO_H__
#define __DEF_MACRO_H__
/*** SFR access ***************************************************************/
#define BIT(bit) ... | 1,329,419 |
the-stack-v2-dedup | C | #include<stdio.h>
int cnt[1000001];
int a[1000001];
int max;
void sieve(){
long i,j;
for(i=2;i<max;i++){
if(cnt[i]!=0){
for(j=2;i*j<=max;j++){
a[i*j]=a[i*j]+cnt[i];
}
}
}
}
int main()
{
int n,i,j,k,count;
int ele[100001];
scanf("%d",&n);
max=-1;
for(i=0;i<n;i++){
scanf("%d",&ele[i]);
if(max<e... | 1,329,420 |
the-stack-v2-dedup | C | /*
** EPITECH PROJECT, 2020
** cpp_rush1_2019
** File description:
** char
*/
#include <stdio.h>
#include "char.h"
#include "new.h"
typedef struct
{
Class base;
char c;
} CharClass;
static void Char_ctor(CharClass *this, va_list *args)
{
this->c = va_arg(*args, int);
va_end(*args);
}
static void... | 1,329,421 |
the-stack-v2-dedup | C | /*
* OpenHMD - Free and Open Source API and drivers for immersive technology.
* Copyright (C) 2017 Joey Ferwerda.
* Distributed under the Boost 1.0 licence, see LICENSE for full text.
*/
/* NOLO VR - Internal Interface */
#ifndef NOLODRIVER_H
#define NOLODRIVER_H
#include "../openhmdi.h"
#include <hidapi.h>
#de... | 1,329,422 |
the-stack-v2-dedup | C | #ifndef GPROF_H
#define GPROF_H
/* Initialize profiler */
void gprof_init(void);
/* Add a program counter sample (called on timer interrupt) */
void gprof_add_sample(unsigned pc);
/* Print the profiler results */
void gprof_dump(void);
#endif
| 1,329,423 |
the-stack-v2-dedup | C | #pragma once
#define ARG_ERR 1
#define FILE_OPEN_ERR 2
#define FILE_CLOSE_ERR 3
#define FIFO_OPEN_ERR 4
#define FIFO_READ_ERR 5
#define FIFO_WRITE_ERR 6
#define MKFIFO_ERR 7
#define UNLINK_ERR 8
#define ACC_CREATE_ERR 9
#define PIPE_OPEN_ERR 10
#define FORK_ERR 11
#define FIFO_CLOSE_ERR 12
#define INVALID_INPUT_ERR 13... | 1,329,424 |
the-stack-v2-dedup | C | /*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.3.0
* Git version: 30dccd7
* Options: (none)
* Seed: 1994508056
*/
#include "csmith.h"
static long __undefined;
/* --- Struct/Union Declarations --- */
struct S0 {
volatile uint8_t f0;
volatile int16_t f1;
const uint64_t f2... | 1,329,425 |
the-stack-v2-dedup | C | // ==============================================================
// File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2012.2
// Copyright (C) 2012 Xilinx Inc. All rights reserved.
//
// ==============================================================
// 0x00 : Control signals
... | 1,329,426 |
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,427 |
the-stack-v2-dedup | C | #include <stdio.h> /*************************************/
#include <stdlib.h> /* */
#include <string.h> /* licra */
#include <math.h> /* version 3.1 */
#include <gsl/gsl_math.h> /* ... | 1,329,428 |
the-stack-v2-dedup | C | /*************************************************************************
Atari G42 hardware
*************************************************************************/
/*----------- defined in machine/asic65.c -----------*/
void asic65_reset(int state);
READ16_HANDLER( asic65_io_r );
READ16_HANDLER( asic65_r ... | 1,329,429 |
the-stack-v2-dedup | C | #include "builtin.h"
int cd_home()
{
int exit = 0;
const char* const home = getenv("HOME");
if (home)
if (chdir(home) == -1)
{
warn("cd: %s", home);
exit = 1;
}
return exit;
}
int my_cd(char *path)
{
int exit = 0;
if (strcmp(path, "~") == 0)
... | 1,329,430 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<string.h>
#include<time.h>
void checkRoomRecordFile(); // first time system
void createNewRoomFile();
struct HotelRoomData getRoomData();
void writeNewRoomFile();
void printRoom();
void bookingRoom(); //booking room
void roomMenuList();
void writeBookingRecordFile();
void writeRe... | 1,329,431 |
the-stack-v2-dedup | C | //==============================================
// Name: Jungjoo Kim
// Student Number: 162 641 195
// Email: jkim594@myseneca.ca
// Section: NNN
// Workshop: 3 (at-home)
//==============================================
#define _CRT_SECURE_NO_WARNINGS
// Put your code below:
#include ... | 1,329,432 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sastantua.c :+: :+: :+: ... | 1,329,433 |
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,434 |
the-stack-v2-dedup | C | #ifndef APP_QIWO_AG_H
#define APP_QIWO_AG_H
#include "bsa_api.h"
#include "app_disc.h"
typedef struct
{
unsigned short num;
tBSA_DISC_REMOTE_DEV device[APP_DISC_NB_DEVICES];
} tAPP_QIWO_AG_SCAN_RSP;
typedef struct
{
BOOLEAN is_need_disconnect;
BD_ADDR curr_conn_addr;
BD_ADDR c... | 1,329,435 |
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,436 |
the-stack-v2-dedup | C | #include <glib.h>
#include <ctype.h>
#include <stdlib.h>
#include "log_format.h"
#define I(x) g_intern_static_string(x)
static struct format_token * create_format_token_ch (char ch) {
struct format_token *token = malloc (sizeof *token);
if (token) {
token->type = T_CHARACTER;
token->data.ch = ch;
token->next... | 1,329,437 |
the-stack-v2-dedup | C | /*
* System.h
*
* Created on: Aug 12, 2020
* Author: martin
*/
#ifndef SYSTEM_H_
#define SYSTEM_H_
#define SYS_DEVICE_BRDUINO_NANO 4
#define SYS_DEVICE_NAME "BRDUINO_NANO"
#define SYS_SW_VERSION "V0.00.001"
#define SYS_LAST_CHANGE "2020-12-01"
#... | 1,329,438 |
the-stack-v2-dedup | C | /**
* Copyright (c) 2014,2015,2016 Enzien Audio Ltd.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND T... | 1,329,439 |
the-stack-v2-dedup | C | #pragma once
#include "xPrerequisites.h"
struct xConstantBuffer::Impl
{
ID3D11Buffer* mBuffer;
}; | 1,329,440 |
the-stack-v2-dedup | C | /* DO NOT EDIT: This file is automatically generated by Cabal */
/* package base-4.3.1.0 */
#define VERSION_base "4.3.1.0"
#define MIN_VERSION_base(major1,major2,minor) (\
(major1) < 4 || \
(major1) == 4 && (major2) < 3 || \
(major1) == 4 && (major2) == 3 && (minor) <= 1)
/* package network-2.3.0.2 */
#define... | 1,329,441 |
the-stack-v2-dedup | C | #include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
int main(void)
{
int res=mkfifo("hehe",0777);
if(res==0)printf("FIFO created\n");
exit(EXIT_SUCCESS);
}
| 1,329,442 |
the-stack-v2-dedup | C | /*******************************************************************
*
* Copyright (c) 1998-1999 Microsoft Corporation
*
* DESCRIPTION: THREAD.C - Thread handling routines, for NT
* Also implements work items.
*
* AUTHOR: Stan Adermann (StanA)
*
* DATE:10/20/1998
*
***************************... | 1,329,443 |
the-stack-v2-dedup | C | /*
* athera-assignment5.c
*
* Armoni Atherton
* TCSS 333 - Winter 2018
* Instructor: David Schuessler
* Assignment 5
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/********************--Constants--********************/
#define NAM_LEN 30
#define STUFF_NAM_LEN 30
#define MAX_CUSTOMERS 20
#defin... | 1,329,444 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <fuse.h>
#include <sys/stat.h>
#include <google/protobuf-c/protobuf-c-rpc.h>
#include <rpc_layer.pb-c.h>
#include <log.h>
ProtobufCService *service = NULL;
t_log *log = NULL;
static int fuse_ext2_getattr(const... | 1,329,445 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <stdint.h>
unsigned int BitReversal(unsigned int x)
{
unsigned int NOOFBITS=sizeof(x)*8;
unsigned int reversenum=0;
for(int i=0;i<NOOFBITS;i++)
{
if(x&(1<<i))
{
reversenum|=1<<((NOOFBITS-1)-i);
}
}
return reversenum;
}
int main(void)
... | 1,329,446 |
the-stack-v2-dedup | C | {
TCanvas *c = new TCanvas();
c->SaveAs("(test).pdf");
}
| 1,329,447 |
the-stack-v2-dedup | C | /* #pragma ident "@(#)edtreg.h 1.163 05/26/05 EDT" */
#ifndef EDTREG_H
#define EDTREG_H
/*
* Bit definitions
*/
#define P11W_ID 0x0000
#define P16D_ID 0x0001
#define PDV_ID 0x0010
#define PCD20_ID 0x0011
#define PCD40_ID 0x0012
#define PCD60_ID 0x0013
#define PDVK_ID 0x0014
#define PDV44_ID 0x0015
#defi... | 1,329,448 |
the-stack-v2-dedup | C | #include
main() {
printf("Halo Dunia");
} | 1,329,449 |
the-stack-v2-dedup | C | #pragma once
#include <malloc.h>
#include <stdint.h>
#include "../error/CTL_error.h"
#define CTL_LIST(type) \
/*声明*/ \
... | 1,329,450 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* LE - / */
/* / */
/* display_icons.c .:: .:/ . .:: ... | 1,329,451 |
the-stack-v2-dedup | C | /*
* Program: Multitherm - A multiple DS18x20 thermometer control and logging device
* File Name: crc.c
* Purpose: Computes the DOW CRC8 or CRC16 value of a byte array
*
* Description:
* A CRC-8/16 (DOW) implementation optimized for small code size.
* If the actual CRC value is appended to the data, the return... | 1,329,452 |
the-stack-v2-dedup | C | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
* Linux Socket Filter Data Structures
*/
#ifndef __LINUX_FILTER_H__
#define __LINUX_FILTER_H__
#include <linux/types.h>
#include <linux/bpf_common.h>
/*
* Current version of the filter code architecture.
*/
#define BPF_MAJOR_VERSION 1
#define BPF... | 1,329,453 |
the-stack-v2-dedup | C | /**
*@file MAT.c
*@brief this header file will contain all required
*definitions and basic utilities functions.
*
*@author Radhika
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <time.h>
/// structure for the nodes in QuadTree
struct qnode {
//pointer to north-west quadr... | 1,329,454 |
the-stack-v2-dedup | C | /* libbone - A library for working with the BeagleBone in C
* Copyright (c) 2012-2013 Clayton G. Hobbs
*
* 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 wi... | 1,329,455 |
the-stack-v2-dedup | C | /*============================================================================
PROJECT...............: Wireless Headset
FILE..................: audio.c
INITIAL AUTHOR........: Fly.Zeng GoerTek
INITIAL DATE..........: 18.10.2007
COMPILER..............: Keil uVision3
Description : Functions for initialization and intera... | 1,329,456 |
the-stack-v2-dedup | C | #pragma once
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
struct PointLight
{
glm::vec3 position;
// spectral power (aka flux) in W
// radiometric value (ie. linear physical value), not photometric (based on human eye sensitivity)
// TODO does this make sense? shouldn't this be photometric
glm:... | 1,329,457 |
the-stack-v2-dedup | C | // getvlc.h : interface of MPEG-2/1 Video picture, slice,
// macroblock block layer decoder;
//
// This class provides a set of MPEG basic decode functions
//
//*****************************************************************************
//
// MPEG Developing Classes
//
// Copyright ... | 1,329,458 |
the-stack-v2-dedup | C | #include <stdio.h> // Any other headers we need here
#include <malloc.h> // We bring in the old malloc function
#include <pthread.h> // for mutex
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#define NUM_PROC sysconf(_SC_NPROCESSORS_ONLN)
#define PROCS 32 // since ccis machines has 32 cores
typede... | 1,329,459 |
the-stack-v2-dedup | C | version https://git-lfs.github.com/spec/v1
oid sha256:258cc51c4756c7a195452073baa08aaaa80831d880d6d66f5933ee899966df53
size 2359
| 1,329,460 |
the-stack-v2-dedup | C | #include <avr/io.h>
#include <ctype.h>
#include <SPI.h>
#include <SD.h>
#define F_OSC 16000000
#define BAUD 9600
//baud rate calculation
#define X ((F_OSC /16 / BAUD) - 1)
#define DELAY_MS 100
void usart_init(){
UBRR0H = (X >> 8);//get first 8 bits
UBRR0L = X; //get last 8 bits
//used asynchrono... | 1,329,461 |
the-stack-v2-dedup | C | #include "common.h"
#include "cblas.h"
#ifndef DISABLE_OPENMP
#include "threads.h"
#endif
int dense_op_s(const int n_1,
const int d_1,
const double * const X,
const int n_2,
const int k,
const double * const Z,
const int * cons... | 1,329,462 |
the-stack-v2-dedup | C | #include<stdio.h>
int quicksort(int a[],int low,int up)
{
if (low>=up)
return -1;
int pivloc;
pivloc=pivotlocation(a,low,up);
quicksort(a,low,pivloc-1);
quicksort(a,pivloc+1,up);
}
int pivotlocation(int a[],int low,int up)
{
int i,j,temp;
i=low-1;
for(j=low;j<=up-1;j++)
{
if (a[j]<=a[up])
{
i=i+1;
... | 1,329,463 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdarg.h>
#include "tree.h"
#include "stack.h"
void printstack(node *stack)
{
printf("stack: ");
while (!isempty(stack))
{
printf("%p ", stack->top->data);
}
printf("\n");
}
void inorder(tree *root)
{
node *stack = NULL;
while (1)
{
if (root)
{
push(root... | 1,329,464 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
//最长公共子序列
int main(int argc, char const *argv[])
{
char first_string[500] = "advantage", second_string[500] = "didactical"; //定义两个用于比较的字符串
int solution_space[500][500] = { 0 } ;
// int n, m; // n代表第一个字符串的长度 m代表第二个字符串的长度
// printf("%ld\n", strlen(first_string));
// printf("%l... | 1,329,465 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <sys/errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <dirent.h>
#include "archivos.h"
#include "juego.h"
/*
un main de prueba para realizar testear las funciones r... | 1,329,466 |
the-stack-v2-dedup | C | #include "testing.h"
void adc_test(void)
{
cpu_state_t state;
int *test;
int tests[][8] =
{
{0xe1, 0x0f, 0x1, 0xf1, 0x0, 0x1, 0x0, 0x0},
{0xe1, 0x3b, 0x1, 0x1d, 0x0, 0x0, 0x0, 0x1},
{0xe1, 0x1e, 0x1, 0x00, 0x1, 0x1, 0x0, 0x1},
};
for(uint32_t i = 0; i < sizeof(tests) / sizeof(*tests); i++)
{
test = test... | 1,329,467 |
the-stack-v2-dedup | C | #ifndef __ARDUINOLIB_H
//#define DBG_TO_SERIAL
//#define USE_IR_REMOTE
#endif //__ARDUINOLIB_H
| 1,329,468 |
the-stack-v2-dedup | C | /*
* TimeCounter_7seg.c
*
* Created: 06/10/2014 22:47:49
* Author: Miguel Catalan Baņuls
* Team: Baltic Racing
*/
#define F_CPU 4000000UL //TODO: Check this
#include <avr/io.h>
#include <avr/delay.h>
#include "Display.h"
#include "Memory.h"
#include "Time.h"
#define SegmentDataPort PORTA
#define SegmentDataPin P... | 1,329,469 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libvector4.c :+: :+: :+: ... | 1,329,470 |
the-stack-v2-dedup | C | #pragma once
//#define DOCTEST_CONFIG_DISABLE // uncomment to remove unit-tests from released build
#include "doctest.h" | 1,329,471 |
the-stack-v2-dedup | C |
//--------------- File Include ---------------------------------------------
//--------------------------------------------------------------------------
#include <ny8.h>
#include "ny8_constant.h"
typedef unsigned char u8t;
typedef unsigned short u16t;
u8t intCount = 0;
u8t IntFlag = 0;
void isr(void) __interrupt... | 1,329,472 |
the-stack-v2-dedup | C | #include<stdio.h>
#define V1
#if defined(V1)
int a = 0;
#else
printf("New 2\n");
#endif
#undef V1 | 1,329,473 |
the-stack-v2-dedup | C | /*
** EPITECH PROJECT, 2019
** CPE_getnextline_2019
** File description:
** Header file for get_next_line
*/
#ifndef GET_NEXT_LINE_H_
#define GET_NEXT_LINE_H_
#ifndef READ_SIZE
#define READ_SIZE (42)
#endif
typedef struct buffer {
char *buf;
unsigned int offset;
_Boo... | 1,329,474 |
the-stack-v2-dedup | C | /* $NetBSD: msg_275.c,v 1.6 2023/07/07 19:45:22 rillig Exp $ */
# 3 "msg_275.c"
// Test for message: cast discards 'const' from type '%s' [275]
/* lint1-extra-flags: -h -X 351 */
char *
unconst_string(const char *s)
{
/* expect+1: warning: cast discards 'const' from type 'pointer to const char' [275] */
return (ch... | 1,329,475 |
the-stack-v2-dedup | C | /*******************************************************************************
* $FILE: main.c
* Atmel Corporation: http://www.atmel.com \n
* Support email: www.atmel.com/design-support/
******************************************************************************/
/* License
* Copyright (c) 2010, Atmel... | 1,329,476 |
the-stack-v2-dedup | C | /*
* Header file that defines various functions and structs for reading the
* lang.txt file that defines the programming language to be compiled.
*/
#ifndef _LANG_H
#define _LANG_H
#define SCANNER_TAG ("SCANNER")
#define PARSER_TAG ("PARSER")
#define CFG_TAG ("CFG")
#define ILCGEN_TAG ("ILCGEN")
#define CGEN_TA... | 1,329,477 |
the-stack-v2-dedup | C | #include "HC89F0650.h"
#include "Uart.h"
#include "RTC.h"
/***************************************************************************************
* @说明 RTC中断服务函数
* @参数 无
* @返回值 无
* @注 无
***************************************************************************************/
void Rtc_Irt()interrupt RTC_VEC... | 1,329,478 |
the-stack-v2-dedup | C | /**
* ./run data/movielens/movielens_2c 1 -0.8 -0.75 0.2
* ./run data/netflix/netflix_2c 1 -0.7 -0.75 0.2
*
*/
//#define NDEBUG //for assert
#include <stdio.h>
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include "inc/linefile/iilinefile.h"
#include "inc/linefile/iidlinefile.h"
#include "inc/compac... | 1,329,479 |
the-stack-v2-dedup | C | int ft_numlen(long long n)
{
int i;
i = 0;
if (n == 0)
return (1);
if (n < 0)
{
i++;
n = -n;
}
while (n > 0)
{
n = n / 10;
i++;
}
return (i);
}
| 1,329,480 |
the-stack-v2-dedup | C | /*
* librdkafka - Apache Kafka C library
*
* Copyright (c) 2012, Magnus Edenhill
* 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 abov... | 1,329,481 |
the-stack-v2-dedup | C | /**
******************************************************************************
* @file bluetooth.h
* @author Yefan Liu
* @version V1.0
* @date 2015-07-18
* @brief 蓝牙模块
******************************************************************************
* @attention
*****************************... | 1,329,482 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "../var/var.hidden"
#include "../my_defines.h"
#include "./flow_grafica.h"
#include "../flow/flow.h"
int flow_grafica_stampagrigliaecontorno()
{
int i=-riga_flow,j;
/* i parte da -base perchè pgrid punta alla prima cella lib... | 1,329,483 |
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,484 |
the-stack-v2-dedup | C | #include <errno.h>
#include <arpa/inet.h> //close
#include <netinet/in.h>
#include <sys/time.h> //FD_SET, FD_ISSET, FD_ZERO macros
#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#inclu... | 1,329,485 |
the-stack-v2-dedup | C | #include <jni.h>
#include <string.h>
#include "mongoose.h"
#include <android/log.h>
int server_loop = 0;
void Java_vladimir_fileserver_MainActivity_startNativeServer(JNIEnv* env, jclass clazz, jstring path) {
const char *path_utf8 = (*env)->GetStringUTFChars(env, path, NULL);
server_loop = 1;
struct mg_server *ser... | 1,329,486 |
the-stack-v2-dedup | C | /*
* DataSkill.h
*
* Created on: 2016年1月22日
* Author: Administrator
*/
#ifndef _DATA_SKILL_H_
#define _DATA_SKILL_H_
#include "Kernel.h"
#include "AsyncDBInterface.h"
struct DataSkill
{
uint32_t uid;
uint16_t skillId;
uint16_t level;
uint32_t lastUpTime;
uint32_t count;
byte status;
DataSkill():ui... | 1,329,487 |
the-stack-v2-dedup | C | /*
******************************************************************
* ADPCMod - MOD ADPCM library by RGR *
* Decompresses ADPCM compressed MOD samples (MODPlug's ADPCM) *
* *
* (C) 2001 by Ricardo Ramalho - No modificat... | 1,329,488 |
the-stack-v2-dedup | C | /*============================================================================*/
/* GERADOR DE CASOS DE TESTE PARA O PROBLEMA DO CLASSIFICADOR DE VEÍCULOS */
/*----------------------------------------------------------------------------*/
/* Autor: Bogdan T. Nassu - nassu@dainf.ct.utfpr.edu.br ... | 1,329,489 |
the-stack-v2-dedup | C | // -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; st-rulers: [132] -*-
// vim: ts=4 sw=4 ft=c++ et
#ifndef LIBDECAF_NIF_HASH_H
#define LIBDECAF_NIF_HASH_H
#include "libdecaf_nif.h"
#include <decaf/sha512.h>
#include <decaf/shake.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct libdecaf_nif_hash_table_... | 1,329,490 |
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,329,491 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define precision 1.0e-5
//#define segments 100
double f(double x);
double find_root(double a, double step);
int c1, c2, c3, segments;
int main()
{
int k, count=0;
double a,b, step;
printf("\nEnter coef c1*x^2+c2*x+c3 ");
scanf("%i %i %i", &c1, &c2, &c3);
... | 1,329,492 |
the-stack-v2-dedup | C | ../../../../../LocalPods/DPKit/DPKit/shared/NSArray+DateUtils.h | 1,329,493 |
the-stack-v2-dedup | C | //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by VBA.rc
//
#define IDS_UNSUPPORTED_VBA_SGM 1
#define IDS_CANNOT_LOAD_SGM 2
#define IDS_SAVE_GAME_NOT_USING_BIOS 3
#define IDC_DEFAULTS 3
#define IDS_SAVE_GAME_USING_BIOS 4
#define IDS_UNSUPPO... | 1,329,494 |
the-stack-v2-dedup | C | #ifndef CPE_UTILS_SERVICE_H
#define CPE_UTILS_SERVICE_H
#include "cpe/utils/error.h"
#ifdef __cplusplus
extern "C" {
#endif
void cpe_daemonize(error_monitor_t em);
int cpe_check_and_write_pid(const char * pidfile, error_monitor_t em);
int cpe_check_and_remove_pid(const char * pidfile, error_monitor_t em);
int cpe... | 1,329,495 |
the-stack-v2-dedup | C | #include "CustomerStrategy.h"
#include <stdio.h>
double bronzePriceStrategy(double amount, double shipping)
{
return (amount + shipping);
}
double silverPriceStrategy(double amount, double shipping)
{
return (amount * 0.90 + shipping);
}
double goldPriceStrategy(double amount, double shipping)
{
return (a... | 1,329,496 |
the-stack-v2-dedup | C | #include "mto.h"
/************MTO相关***************/
/* MTO初始化存储块 */
MTO MTO_MEM[MAX_MTO_SIZE] = {0};
MCB mcb = {0};
/* 初始化MTO */
int mto_init(MCB* p_mcb)
{
static u8 access = 0;
u8 i;
MTO* p_mto;
if(p_mcb==NULL) return NULL_PTR;
if(access==1)//单例,防止多次调用
{
return REPEATED_ACCESS;
}
access = 1;
/* 初始化空闲链表 *... | 1,329,497 |
the-stack-v2-dedup | C | /*---------------------------------------------------------------------------------------------
* Copyright (c) Peter Bjorklund. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*-------------------------------------------------------------------------... | 1,329,498 |
the-stack-v2-dedup | C | /**
* description:
* Simple genetic algorithm for finding equation that equals target number
* example for number 27 has many results:
* - 7+29-8-1
* - 15+28-16
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#define POPSIZE ... | 1,329,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.