source string | code_lang string | content string | idx int64 |
|---|---|---|---|
the-stack-v2-dedup | C | #include <stdio.h>
#include <string.h>
#include "system.h"
#include "command_receiver.h"
#include "motor_api.h"
int command_receiver() {
char buffer[9999] = { 0 };
FILE* fp;
fp = fopen("/dev/uart_wifi", "r");
if (!fp) {
printf("Can't access WiFi UART!\n");
return -1;
}
char left_duty_cycle[3];
char righ... | 1,330,400 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../cGrammar.h"
void init_declarator__declarator()
{
}
void init_declarator__declarator__EQ__initializer()
{
}
| 1,330,401 |
the-stack-v2-dedup | C | ../../../XLsn0wKit_objc/XLsn0wKit/XLsn0wComponents/XLsn0wCityChooser/View/XLsn0wCityTableViewCell.h | 1,330,402 |
the-stack-v2-dedup | C |
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <limits.h>
#include <float.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include "ft_printf.h"
int main()
{
int k;
printf("%s\n", "---Simple Conversion Management---");
k = prin... | 1,330,403 |
the-stack-v2-dedup | C | /*****************************************************************************
* hqdn3d.c : high-quality denoise 3D ported from MPlayer
*****************************************************************************
* Copyright (C) 2011 VLC authors and VideoLAN
* $Id: a78d66f72d108c864cfac057228c1e02dcbd2dbc $
*
* ... | 1,330,404 |
the-stack-v2-dedup | C | #ifndef NTP_CONFIG_H
#define NTP_CONFIG_H
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOURCE_H */
#include "ntp_machine.h"
#include "ntpsim.h"
/*
* Configuration file name
*/
#ifndef CONFIG_FILE
# ifndef SYS_WINNT
# define CONFIG_FILE "/etc/ntp.conf"
# else /* SYS_WINNT */
# defin... | 1,330,405 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* LE - / */
/* / */
/* striter.c .:: .:/ . .:: ... | 1,330,406 |
the-stack-v2-dedup | C | /* Copyright 2014 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __CROS_EC_USB_GPIO_H
#define __CROS_EC_USB_GPIO_H
/* STM32 USB GPIO driver for Chrome EC */
#include "compile_time_macros.h"
#include "usb... | 1,330,407 |
the-stack-v2-dedup | C | // Find outputs
#include <stdio.h>
main()
{
int i , j;
for(i = 1 ; i <= 3 ; i++) // m times
{
for(j = 1 ; j <= 4 ; j++) // n times
printf("%d \t %d \n" , i , j); //
printf("Hello\n");
}
printf("Bye\n");
}
/*
1) for loop in for loop is called nested for... | 1,330,408 |
the-stack-v2-dedup | C | /*
* A simple Word sorting program using Linked Lists
*==@luke==
* E/15/142
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct node{
char *word;
int length;
struct node *next;
} Node;
static int ite = 0;
void bubbleSort(Node *head);
void addWord(Node *head, int to, char *text);
void swa... | 1,330,409 |
the-stack-v2-dedup | C | #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/fs.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#define DNWBULK_MAJOR 102
#define DNWBULK_MINOR 0
#define BULKOUT_BUFFER_SIZE 1024
#define DRIVER_NAME "dnwbulk"
struct dnwbulk_dev
{
struct ... | 1,330,410 |
the-stack-v2-dedup | C | ../../../FirebaseDatabase/FirebaseDatabase/Sources/Utilities/Tuples/FTupleTransaction.h | 1,330,411 |
the-stack-v2-dedup | C | #include <stdio.h>
int main(void)
{
int a=5,b=5,diff;
diff=a-b;
if(diff%2==0)
printf("even");
else
printf("no");
return 0;
}
| 1,330,412 |
the-stack-v2-dedup | C | #ifndef DRIVERS_TTY_H
#define DRIVERS_TTY_H
#include "common.h"
// 4 tty
#define TTY_NUMBER 4
// Every tty has 50 lines to buffer
#define TTY_BUFFER_SIZE (80 * 50 * 2)
struct tty {
u32 offset;
u8 cursor_x;
u8 cursor_y;
volatile u16 *buffer;
};
extern struct tty *tty_cur;
extern struct tty tty[T... | 1,330,413 |
the-stack-v2-dedup | C | #pragma once
#ifndef MAXLENGTH
#define MAXLENGTH 100
#endif
#define VERSION "1.0.0"
#define SNACKCMD "./../garfield-snack/garfield-snack"
#define USERCMD "./../garfield-user/garfield-user"
int main(int args, char* argv[]);
void printHelp();
| 1,330,414 |
the-stack-v2-dedup | C | #include "common.h"
// Calculate ball angle
float CalcAngle(float paddle_y, float ball_y, float paddle_h) {
float relative_y = (paddle_y + (paddle_h / 2)) - ball_y;
float normalized_rel_y = (relative_y / (paddle_h / 2));
float bounce_angle = normalized_rel_y * MAXANGLE;
return bounce_angle;
}
// Set speed... | 1,330,415 |
the-stack-v2-dedup | C | #include <stdio.h>
int getlineAndSize(char s[], int limit) {
int idx,ch;
for (idx = 0; idx < limit-1 && (ch = getchar()) != EOF; ++idx) {
s[idx] = ch;
}
s[idx] = '\0';
return idx;
}
/*
return position of rightmost occurence of string t in string s, else return -1
*/
int strIndex(char s[], char t[]) {... | 1,330,416 |
the-stack-v2-dedup | C | #include "MemoryAPI.h"
void discovery_memory()
{
uint8_t send_buffer[1];
send_buffer[0] = DISCOVERY_ID;
// Ask for memory list
csp_iface_t * iface = init_udp(DIFFERENT_MEMORYS*sizeof(Memory));
send_to_server(iface, send_buffer, sizeof(send_buffer));
// UDP Receive memory_list
csp_packet_t * packet = receiv... | 1,330,417 |
the-stack-v2-dedup | C | /*
** bmp_calloc.c for wolf3d in /home/lombar_e/rendu/Infographie/wolf
**
** Made by Thomas Lombard
** Login <lombar_e@epitech.net>
**
** Started on Mon 19 19:53:37 2016 Thomas Lombard
** Last update Wed Jan 04 09:42:40 2017 Thomas Lombard
*/
#include "bmp_core.h"
/*
** bmp_calloc -> Fonctionnement identique à ca... | 1,330,418 |
the-stack-v2-dedup | C | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
int resu;
char s1[100];
char s2[100];
printf("input string1:");
gets(s1);
printf("\ninput string2:");
gets(s2);
i = 0;
while ((s1[i] == s2[i]) && (s1[i] != '\0'))
i++;
if (s1[i] == '\0'&&s2[i] == '\0')
resu = 0;
... | 1,330,419 |
the-stack-v2-dedup | C | /*
* MIT License
*
* Copyright (c) 2020 Nicholas Fraser
*
* 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 use, copy, ... | 1,330,420 |
the-stack-v2-dedup | C | /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
Copyright (C) 2007-2014 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team.
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
... | 1,330,421 |
the-stack-v2-dedup | C | /*
* Protocoale de comunicatii:
* Laborator 6: UDP
* mini-server de backup fisiere
*/
#include <fcntl.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <string.h>
#include "helpers.h"
void usage(char*file)
{
fprintf(s... | 1,330,422 |
the-stack-v2-dedup | C | ../../../SmartDeviceLink/SmartDeviceLink/NSMutableDictionary+Store.h | 1,330,423 |
the-stack-v2-dedup | C | #include <stdio.h>
#define H_IN_M 60
int main(void)
{
int time, hours, mins;
printf("Please enter a time in minutes:\n");
scanf("%d", &time);
while (time > 0)
{
hours = time / H_IN_M;
mins = time % H_IN_M;
printf("Your time of %d is %d hours and %d minutes\n", time, hours, mins);
printf("Ente... | 1,330,424 |
the-stack-v2-dedup | C | #ifndef _EXECUTE_H
#define _EXECUTE_H
#include "structures/structures.h"
struct Value reduce(huo_ast * ast, hash_table *defined, struct Scopes * scopes);
struct Value execute(struct Execution_bundle * exec_bundle);
#endif
| 1,330,425 |
the-stack-v2-dedup | C | //Name: Brock Corbett
//Date: April 1, 2016
//Email: corbe009@cougars.csusm.edu
//Program Description: This program performs various functions revolving around a dictionary
#include "dictionary.h"
#include <iomanip>
#include <iostream>
#include <vector>
int main()
{
Dictionary DictForCS211;
DictForCS211.ProcessT... | 1,330,426 |
the-stack-v2-dedup | C | /*************************************************************************
*
* Bac Son Technologies
* __________________
*
* [2019] Bac Son Technologies LLC
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Bac Son Technologies LLC and its suppliers,... | 1,330,427 |
the-stack-v2-dedup | C | /*=============================================================
// 函 数 名:bsl3
// 功能描述:求解变型第一类整数阶贝塞尔函数的值
// 输入参数:x 自变量x的值。
// n 贝塞尔函数的阶数
// 返 回 值:变型第一类整数阶贝塞尔函数的值
//==============================================================*/
#include "math.h"
#include "stdio.h"
#define ENUMB 30.0 /* 逆向... | 1,330,428 |
the-stack-v2-dedup | C | // generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em
// with input from usv_msgs:msg/RangeBearing.idl
// generated code does not contain a copyright notice
#ifndef USV_MSGS__MSG__DETAIL__RANGE_BEARING__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_
#define USV_MSGS__MSG__DE... | 1,330,429 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: ... | 1,330,430 |
the-stack-v2-dedup | C | /*
* sp5KV5_tkGprs_ask_ip.c
*
* Created on: 27 de abr. de 2017
* Author: pablo
*/
#include "sp5KV5_tkGprs.h"
static void pv_read_ip_assigned(void);
// La tarea no puede demorar mas de 180s.
#define WDG_GPRS_TO_IP 180
//------------------------------------------------------------------------------------
b... | 1,330,431 |
the-stack-v2-dedup | C | /*
参考链接:https://www.cnblogs.com/lsdb/p/9391979.html
执行命令:./client 127.0.0.1 7838 client.crt client.key ca.crt
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/socket.h>
#include <resolv.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#incl... | 1,330,432 |
the-stack-v2-dedup | C | #include <Python.h>
#include <rules.h>
static PyObject *RulesError;
#define PRINT_ARGS(args) do { \
PyObject* or = PyObject_Repr(args); \
const char* s = PyString_AsString(or); \
printf("args %s\n", s); \
} while(0)
static PyObject *pyCreateRuleset(PyObject *self, PyObject *args) {
char *name;
ch... | 1,330,433 |
the-stack-v2-dedup | C |
/**************************************************************************************************
Filename: nwk_frame.c
Revised: $Date: 2008-03-20 12:01:59 -0700 (Thu, 20 Mar 2008) $
Revision: $Revision: 16617 $
Author $Author: lfriedman $
Description: This file supports the Si... | 1,330,434 |
the-stack-v2-dedup | C | #include<stdio.h>
int main()
{
char arr[]="abc";
char *arr1="abc";
printf("%s %s",&arr,arr1);
}
| 1,330,435 |
the-stack-v2-dedup | C | #pragma once
#include<cmath>
extern int answer;
double Add(double a, double b)
{
answer = a + b;
return answer;
}
double Subtract(double a, double b)
{
answer = a - b;
return answer;
}
double Divide(double a, double b)
{
answer = a / b;
return answer;
}
double Multiply(double a, double b)
{
answer = a * b;
retu... | 1,330,436 |
the-stack-v2-dedup | C | /*************************************************************************************
* 文件: start.c
*
* 说明: 演示
*
* 作者: Jun
*
* 时间: 2010-12-17
*************************************************************************************/
#define FAMES_DEMO_START_C
#include <includes.h>
#include "common.h"
/*lint -esy... | 1,330,437 |
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,438 |
the-stack-v2-dedup | C | #include <stdio.h>
#include<math.h>
int main()
{
int i,mul=1,n,a;
scanf("%d",&n);
while(n>0)
{
a=n%10;
n=n/10;
mul=mul*a;
}
printf("%d",mul);
return 0;
}
| 1,330,439 |
the-stack-v2-dedup | C | ../../../XYCommonKit/XYCommonKit/NSString+XYNetRequest.h | 1,330,440 |
the-stack-v2-dedup | C |
/*
* Menu inicial,direciona o aluno ou professor para os menus respectivos
*/
void menu(void);
/*
* Possui as opcoes cadastro,modificação,remoção,consulta simples e consulta avançada
* Unica funçao que possui acesso as funcoes cadastroAluno,consultaAlunoSim,consultaAlunoAvan
* modificarAluno e removerAluno.
* Nao po... | 1,330,441 |
the-stack-v2-dedup | C | #pragma once
#include <pebble.h>
void start_studying_window_push();
| 1,330,442 |
the-stack-v2-dedup | C | // Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
#ifndef _OE_SAFECRT_H
#define _OE_SAFECRT_H
#include <openenclave/bits/defs.h>
#include <openenclave/bits/result.h>
#include <openenclave/bits/types.h>
OE_EXTERNC_BEGIN
oe_result_t oe_memcpy_s(
void* dst,
size_t dst_size,
... | 1,330,443 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include "game.h"
#include "board.h"
#include "player.h"
#include "ai.h"
int Game(int Board[MAXBOARD][MAXBOARD][NOFPOS]){
int MatchResult = 0;
int NumberofMoves = 0;
int NofPlydNbrs = 0;
int Moves[MAXBOARD*MAXBOARD];
int PlayedNumbers[MAXBOARD*MAXBOARD];
int ConvertedNumbe... | 1,330,444 |
the-stack-v2-dedup | C | struct Persona* desencolar(){
if(numElementos==0){
return NULL;
}else{
if(k!=MAX){
arr[k]=-1;
k++;
}else{k=0;}
struct Persona *aux;
aux=head;
head=(*head).sucesor;
if(numElementos==1){
tail=(*head).sucesor;
}
numElementos--;
return aux;
}
}
| 1,330,445 |
the-stack-v2-dedup | C | /************************************************************************
* Copyright (C) 2020 Nercita
*
* 文件名称: app.c
* 文件标识:
* 内容摘要: ledtask相关函数定义
* 其它说明:
* 当前版本:
* 作 者: woody
* 完成日期: 2020.09.07
*
* 修改记录1:
* 修改日期:
* 版 本 号:
* 修 改 人:
* 修改内容:
* 修改记录2:…
*****************************************************... | 1,330,446 |
the-stack-v2-dedup | C | /* umaddr.c - universal message API - address functions */
#include <stdlib.h>
#include <stdio.h>
#include "typesize.h"
#include "umapi.h"
char *umAddr2Str(tUmAddr addr)
{
char *addrstr;
if ((addr.domain != NULL) && (*addr.domain != 0))
{
addrstr = malloc(strlen(addr.domain) + 25);
if (addr.point != 0... | 1,330,447 |
the-stack-v2-dedup | C | /*
* Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/licens... | 1,330,448 |
the-stack-v2-dedup | C | #include <string.h>
#include "estr.h"
#include "etest.h"
int estr_split_str_test()
{
char* s; int i;
esplt split1 = esplt_new(12, 0, 0); // cnt, keep, trim
esplt split2 = esplt_new(12, 1, 0);
esplt split3 = esplt_new(12, 0, 1);
esplt split4 = esplt_new(12, 1, 1);
esplt split;
/// ------... | 1,330,449 |
the-stack-v2-dedup | C | /** @file ota.h
* @brief OTA Image R/W and Verification
* @author Mark Solters <msolters@gmail.com>
*/
#ifndef OTA_H
#define OTA_H
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
/**
* OTA Image Memory Map
*/
// Internal Flash
#define CURRENT_FIRMWARE (0x4 + 0x8000) // Address ... | 1,330,450 |
the-stack-v2-dedup | C | // { dg-do assemble }
// { dg-options "-O2 -fdump-tree-fre1-details -std=c++11 -Wno-return-type" }
typedef unsigned a;
enum b : a;
class c {
public:
virtual a d();
};
using e = int;
class f;
class h {
public:
f *operator->();
};
class i {
public:
~i() { j->d(); }
c *j;
};
template <class g> class k : i {
public... | 1,330,451 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_part_fraction.c :+: :+: :+: ... | 1,330,452 |
the-stack-v2-dedup | C | ../../../../../Pod/Classes/CrossStoryboardSegue.h | 1,330,453 |
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>
// Cardboard
struct Cardboard_t1761541558;
// Cardboard/StereoScreenChangeDelegate
struct StereoScreenChangeDelegate_t4234461465;
// System.Ac... | 1,330,454 |
the-stack-v2-dedup | C | /* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class HelloWorld */
#ifndef _Included_HelloWorld
#define _Included_HelloWorld
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: HelloWorld
* Method: print
* Signature: (ILjava/lang/String;[I)V
*/
JNIEXPORT void JNICALL Jav... | 1,330,455 |
the-stack-v2-dedup | C |
#ifndef CHECKBOARD_H
#define CHECKBOARD_H
#include "BOARD.h"
int isFull(board**, int);
int isTerminal(board**, int);
#endif
| 1,330,456 |
the-stack-v2-dedup | C | /*
* Copyright (c) 2017-2018, Arm Limited.
* SPDX-License-Identifier: MIT
*/
#ifndef _POWF_DATA_H
#define _POWF_DATA_H
#include "libm.h"
#include "exp2f_data.h"
#define POWF_LOG2_TABLE_BITS 4
#define POWF_LOG2_POLY_ORDER 5
#if TOINT_INTRINSICS
#define POWF_SCALE_BITS EXP2F_TABLE_BITS
#else
#define POWF_SCALE_BITS ... | 1,330,457 |
the-stack-v2-dedup | C | #include "Financas.h"
char menuEstoque(void);
void adicionarEstoque(void);
void removerEstoque(void);
void exibirEstoque(void);
int abrirArquivoest(void);
struct estoque {
char status;
char item[30];
char quantidade[5];
char preco[10];
char medida[16];
struct estoque* prox;
};
typedef struct estoque Estoq... | 1,330,458 |
the-stack-v2-dedup | C | #ifndef __APPHEADERFILE_midiKeyboard__
#define __APPHEADERFILE_midiKeyboard__
#include "AppConfig.h"
#include "juce_amalgamated.h"
#endif
| 1,330,459 |
the-stack-v2-dedup | C | /*
ID:john1991
TASK:crypt1
LANG:C
*/
#include <stdio.h>
int contain(int num,int d,int *number,int n);
int main()
{
FILE *fin = fopen("crypt1.in","r");
FILE *fout = fopen("crypt1.out","w");
int n,number[9];
int i,j,k,s=0,p=-1;
int hund[1000],p3[1000][11],l=0,rec[1000][10][2];
int sum=0,tmp;
... | 1,330,460 |
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,461 |
the-stack-v2-dedup | C | /*
* asl.c
*
* Created on: 20/gen/2012
* Author: Marco Di Nicola
*
* Abstract: Questo modulo contiene le funzioni atte a operare su liste di oggetti di tipo semd_t: i descrittori dei semafori
* utilizzati per gestire la concorrenza dei processi nel sistema operativo pkaya2012.
* Questi sararanno organizzat... | 1,330,462 |
the-stack-v2-dedup | C | /*** m6800: Portable 6800 class emulator *************************************/
#pragma once
#ifndef __M6800_H__
#define __M6800_H__
typedef struct _m6801_interface m6801_interface;
struct _m6801_interface
{
devcb_write_line out_sc2_func;
};
#define M6801_INTERFACE(name) const m6801_interface (name) ... | 1,330,463 |
the-stack-v2-dedup | C | #include <stdio.h>
int main(int argc, char const *argv[])
{
double n, n2, n3, n4, aux;
scanf("%lf %lf %lf %lf", &n, &n2, &n3, &n4);
if (n>n2)
{
aux = n;
n=n2;
n2=aux;
}
if (n>n3)
{
aux = n;
n= n3;
n3= aux;
}
if (n>n4)
{
aux=n;
n=n4;
n4=aux;
}
if (n2>n3)
{
aux ... | 1,330,464 |
the-stack-v2-dedup | C | #include "__cf_PWM_controller.h"
#ifndef RTW_HEADER_rtmodel_h_
#define RTW_HEADER_rtmodel_h_
#include "PWM_controller.h"
#define GRTINTERFACE 1
#endif
| 1,330,465 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BLOCK 2
typedef struct CONTACT
{
char ten[15];
char sdt[15];
} CONTACT;
void read(char *file){
FILE *fpin = fopen(file,"rb");
if(fpin==NULL) {
printf("Can't open file %s\n",file);
}
else {
int num;
CONTACT *db;
db = malloc(BLOCK*siz... | 1,330,466 |
the-stack-v2-dedup | C | //**********************************************************************;
// Copyright (c) 2018, Intel Corporation
// 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 s... | 1,330,467 |
the-stack-v2-dedup | C | #include <linux/limits.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include <stdio.h>
enum mode_t {kill_m, sigqueue_m, sigrt_m};
pid_t pid;
mode_t mode = kill_m;
int catched = 0;
int n = 0;
void send(void){
... | 1,330,468 |
the-stack-v2-dedup | C | /* This program was made for the purpose of asking the user for the amount of rows and columns he wants on a matrix,
* based on this information, the program will then asks the user to input one by one the numbers they want on each of
* the two matrix. At the end, the program will display the sum of the 2 matrixes
*... | 1,330,469 |
the-stack-v2-dedup | C | #include <stdio.h>
int GCD(int x, int y){
if (y==0) return x;
return GCD(y, x % y);
}
int main(void) {
printf("%d", GCD(12, 3));
return 0;
}
| 1,330,470 |
the-stack-v2-dedup | C | /*
* betaRadio.h
*
*
* Created on: Nov 4, 2016
* Author: annik
*/
#ifndef RADIOSEND_H_
#define RADIOSEND_H_
#include <radioProtocol.h>
enum NodeRadioOperationStatus {
NodeRadioStatus_Success,
NodeRadioStatus_Failed,
NodeRadioStatus_FailedNotConnected,
};
/* Initializes the NodeRadioTask and ... | 1,330,471 |
the-stack-v2-dedup | C | // Room: /d/suzhou/road1.c
// Design By 蝴蝶君(Robert) Email:robert@cnmuds.com
inherit ROOM;
void create()
{
set("short", "青石官道");
set("long", @LONG
你走在一条青石大道上,人来人往非常繁忙,不时地有人骑着马匆匆
而过。大道两旁有一些小货摊,似乎是一处集市。南面就是苏州城了。
LONG
);
set("outdoors", "suzhou");
... | 1,330,472 |
the-stack-v2-dedup | C | #ifndef KEYBOARD_H
#define KEYBOARD_H
#define KEYBOARD_MAX_ASCII 83
unsigned char keyboard_read_scan_code(void);
unsigned char keyboard_scan_code_to_ascii(unsigned char);
#endif /* INCLUDE_KEYBOARD_H */ | 1,330,473 |
the-stack-v2-dedup | C | /*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.3.0
* Git version: 30dccd7
* Options: -o /home/x/obfuscator/data/programs/2001.c
* Seed: 3282607054
*/
#include "csmith.h"
static long __undefined;
/* --- Struct/Union Declarations --- */
union U0 {
volatile uint8_t f0;
};
union U... | 1,330,474 |
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,475 |
the-stack-v2-dedup | C | #include "../ntt_red_interval.h"
#include "ntt_red1024_tables.h"
#define Q 12289
/*
* forward NTT, GS, rev2std
*
* static inline void ntt_red1024_gs_rev2std(int32_t *a) {
* ntt_red_gs_rev2std(a, 1024, ntt_red1024_omega_powers_rev);
* }
*/
int main(void) {
interval_t *a[1024];
uint32_t i;
for (i=0; i<1... | 1,330,476 |
the-stack-v2-dedup | C | /*
* Can402Object.c
*
* Created on: Dec 11, 2016
* Author: gianluca
*/
#include "cpu.h"
#include "Settings.h"
#include "CanDic.h"
#include "CanObjects.h"
#include "Can402Objects.h"
#include "Drive.h"
#include "Slave.h"
#include "Encoder.h"
#include "Ramp.h"
td_subIndex Index6040[] =
{
{d... | 1,330,477 |
the-stack-v2-dedup | C | /******************************************************************************
Copyright (c) 2016 Qualcomm Technologies International, Ltd.
All Rights Reserved.
Qualcomm Technologies International, Ltd. Confidential and Proprietary.
REVISION: $Revision: #1 $
****************************************************... | 1,330,478 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#define BUFFER_LEN 256
int main() {
char sendMsg[BUFFER_LEN];
char receiveMsg[BUFFER_LEN];
printf("Attempting to open device\n");
//Attempt to open the device
int device = open("/dev/char_driver... | 1,330,479 |
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,480 |
the-stack-v2-dedup | C | #ifndef ORB_INSTR_HH
#define ORB_INSTR_HH
// clang-format off
#include <stdint.h>
/* REGISTERS */
// General Purpose Registers
#define REG0 0x0
#define REG1 0x1
#define REG2 0x2
#define REG3 0x3
// Get first and second register from instruction
#define GET_R1(instr) ((instr >> 6) & 0x3)
#define GET_R2(instr... | 1,330,481 |
the-stack-v2-dedup | C | #include "SX1276.h"
#include "SPI.h"
static uint8_t sx1276_read_one_byte(uint8_t addr)
{
uint8_t byte;
sx1276_cs = 0;
spi2_read_write_byte(addr);
byte = spi2_read_write_byte(0xFF);
sx1276_cs = 1;
return(byte);
}
static void sx1276_write_one_byte(uint8_t addr,uint8_t dat)
{
sx1276_cs = 0;
spi2_read_write_b... | 1,330,482 |
the-stack-v2-dedup | C | /*Declare a union containing 5 string variables each with a length of C_SIZE . Then, read and display the address of a
person using a variable of the union*/
#include <stdio.h>
#include <string.h>
#define C_SIZE 50
union Address
{
char name[C_SIZE];
char housename[C_SIZE];
char cityname[C_SIZ... | 1,330,483 |
the-stack-v2-dedup | C | #pragma once
#include <stdint.h>
// UnityEngine.Texture
#include "UnityEngine_UnityEngine_Texture.h"
// UnityEngine.RenderTexture
struct RenderTexture_t4700 : public Texture_t802
{
};
| 1,330,484 |
the-stack-v2-dedup | C | ../../../../../ALLFoundation/ALLFoundation/Classes/Third/extobjc/EXTSafeCategory.h | 1,330,485 |
the-stack-v2-dedup | C | /*
* Filename : example2.c
*
* Created : 18.11.2016
*
* Modified : mar 18 abr 2017 12:55:12 CEST
*
* Author : jatorre
*
* Purpose : Test correlation. Creates a sinusoidal matrix
*
* Compile : gcc -lm example2.c -o example2
*
*/
#include <stdio.h>
#include <math.h>
#define NSteps 1000
... | 1,330,486 |
the-stack-v2-dedup | C | #include "Component.h"
#include "Rectangle.h"
struct RectangleComponent : public Component {
Rectangle entityRectangles[Constants::MaxEntities_]; // Saved by ID rather than index
};
void RectangleComponent_Add(RectangleComponent* rectangleComponent, uint32 id, int x, int y, int w, int h); | 1,330,487 |
the-stack-v2-dedup | C | #ifndef _HEADER__H__
#define _HEADER__H__
#define MAX 100
#include <stdio.h>
#include <stdlib.h>
int StrSpn (const char *str, const char *accept);
#endif
/*
#ifndef _HEADER__H__
#define _HEADER__H__
#define MAX 100
#include <stdio.h>
char insert (char * , char c);
char delete (char *, char c);
#endif
*/
| 1,330,488 |
the-stack-v2-dedup | C | #include <mpi.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#define SEED 35791246
#define TYPE_BASIC 0
#define TYPE_SCALING 1
#define TRUE 1
#define FALSE 0
double piValue = 3.141592653589793238462643;
double myPI, myPIfragment;
int type = 0;
F... | 1,330,489 |
the-stack-v2-dedup | C | #include <wiringPi.h>
#include <softPwm.h>
#include <stdio.h>
typedef unsigned char uchar;
#define LedPin 16
int main(void)
{
int i;
if(wiringPiSetup() == -1)
{
printf("setup wiringPi failed !");
return -1;
}
pinMode(LedPin, OUTPUT);
while(1)
{
digitalWrite(LedPin, HIGH);
}
return 0;
}
| 1,330,490 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define SIZE 20
long str2long(char *str)
{
long ret = 0;
for(int i=0;i<strlen(str);i++)
{
if(str[i]>='0' && str[i]<='9')
{
ret = ret * 10 + str[i]-'0';
}
}
return str[0]=='-' ? -ret : ret;
}
int main()
{
char A[SIZE], B[SIZE];
long a, ... | 1,330,491 |
the-stack-v2-dedup | C | #define RXD BIT1 //P1.1 UART MSP_RXD
#define TXD BIT2 //P1.2 UART MSP_TXD
void UART_init (void);
void putChar(unsigned char byte);
static void hex2uart(unsigned char n);
void UART_init(void)
{
UCA0CTL1 = UCSWRST;
BCSCTL1 = CALBC1_1MHZ; // Set DCO
DCOCTL = CALDCO_1MHZ;
P1SEL |= RXD + TXD; ... | 1,330,492 |
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,493 |
the-stack-v2-dedup | C | #include <stdint.h>
#include <stddef.h>
#include <stdio.h>
#include "mod.h"
#include "twiddle.h"
void ntt_forward(uint64_t *data, size_t len) {
// Determined using nttgen
const uint64_t p = 4179340454199820289;
if(len == 1) {
return;
}
uint64_t *twiddle = twiddles[intlog2(len)];
for(size_t i=0;i... | 1,330,494 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
//Génère un nombre aléatoire entre min et max
int nbAleatoire(int min, int max)
{
return rand()%(max-min+1)+min;
}
int testCouleur(int resultatRoulette)
{
if (resultatRoulette==0)
{
return 0; // 0
}
else if (resultatRoulette%2!=0)
... | 1,330,495 |
the-stack-v2-dedup | C | /* modified code from http://www.tenouk.com/Module43a.html */
//---cat rawtcp.c---
// Run as root or SUID 0, just datagram no data/payload
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <openssl/ssl.h>
#i... | 1,330,496 |
the-stack-v2-dedup | C | //Librería que contiene las funciones scanf y printf
#include <omp.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
//Definimos las constantes del programa
#define ORDEN 100
double wallclock(void);
//Función principal del programa
int main (int argc, char *argv[]... | 1,330,497 |
the-stack-v2-dedup | C | /*------------------------------------------------------------------------------
* switnav.c : Swift Navigation Binary Protocol decoder
*
* Copyright (C) 2017
*
* reference :
* [1]
*
* version : $Revision: 1.0 $ $Date: 2017/01/30 09:00:00 $
*
* history : 2017/01/30 1.0 begin writing
*--------... | 1,330,498 |
the-stack-v2-dedup | C | #include <lib.h>
PUBLIC int getpid()
{
return(callm1(MM, GETPID, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR));
}
| 1,330,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.