source string | code_lang string | content string | idx int64 |
|---|---|---|---|
the-stack-v2-dedup | C | enum armv7_perf_types ;
enum armv7_a8_perf_types ;
enum armv7_a9_perf_types ;
static const unsigned armv7_a8_perf_map[PERF_COUNT_HW_MAX] = ;
static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
[PERF_COUNT_HW_CACHE_OP_MAX]
[PERF_COUNT_HW_CACHE_RESULT_MAX] = ;
static const unsigned armv7_a9_perf_map[PE... | 1,328,200 |
the-stack-v2-dedup | C | /****************************************************************************
Copyright (c) 2004 - 2020 Qualcomm Technologies International, Ltd.
FILE NAME
hfp_sdp.h
DESCRIPTION
*/
#ifndef HFP_SDP_H_
#define HFP_SDP_H_
#define HFP_1_8_VERSION_NUMBER (0x0108)
/* The Bitfield contained hfp->hf_... | 1,328,201 |
the-stack-v2-dedup | C | {
//=========Macro generated from canvas: canvasOneMuon_775_875/Btag_Post_AlphaT_5_55_all/cannameBtag_Post_AlphaT_5_55_all
//========= (Thu May 10 12:07:14 2012) by ROOT version5.32/00
TCanvas *canvasOneMuon_775_875/Btag_Post_AlphaT_5_55_all = new TCanvas("canvasOneMuon_775_875/Btag_Post_AlphaT_5_55_all", "cannameB... | 1,328,202 |
the-stack-v2-dedup | C | #include "../../src/shared/page/SwgCuiAvatarCreation.h"
| 1,328,203 |
the-stack-v2-dedup | C | //实例47:用定时器T1中断控制两个LED以不同周期闪烁
#include<reg51.h> // 包含51单片机寄存器定义的头文件
sbit D1=P2^0; //将D1位定义为P2.0引脚
sbit D2=P2^1; //将D2位定义为P2.1引脚
unsigned char Countor1; //设置全局变量,储存定时器T1中断次数
unsigned char Countor2; //设置全局变量,储存定时器T1中断次数
/**************************************************************
函数功能:主函数
*************************... | 1,328,204 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <malloc.h>
#include <error.h>
#include <errno.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#include <math.h>
#include <netdb.h>
#include <time... | 1,328,205 |
the-stack-v2-dedup | C | #include"queue.h"
#include<stdlib.h>
#include<stdio.h>
#include<assert.h>
typedef struct IntQueue{
size_t size;
int * memory;
}IntQueue;
IntQueue * IntQueue_new() {
IntQueue *queue = (IntQueue*) malloc(sizeof(IntQueue));
if (queue == NULL) return NULL;
int *memory = malloc(sizeof(int));
if (memory == NULL) {
... | 1,328,206 |
the-stack-v2-dedup | C | ////////////////////////////////////////////////////////////////////////////////
/// @brief query errors
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance... | 1,328,207 |
the-stack-v2-dedup | C | /* TLPI, page 228
read and modify a /proc file
this example reads the
/proc/sys/kernel/pid_max file
cmdline args will update it to the specified value
must run as sudo
example:
sudo ./t_procfs_pidmax 10000
*/
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include ... | 1,328,208 |
the-stack-v2-dedup | C |
#ifndef INCLUDE_KIO_H_
#define INCLUDE_KIO_H_
// 读取一个字符
char getchar(void);
#endif // INCLUDE_KIO_H_
| 1,328,209 |
the-stack-v2-dedup | C | #include "Block.h"
#include <cstring>
namespace Dali {
// Block types:
// list
// with
// each
// if
// unless
//
Block *
Block::parse( const char *&c, const char *end )
{
int length = end - c;
if (length < 2) {
return 0;
}
if (length > 5 && strncmp("unless", c, 6) == 0) {
}
if (length > 3) {
if ... | 1,328,210 |
the-stack-v2-dedup | C | void assert_str_equals(const char *val1, const char *val2);
void assert_int_equals(const int val1, const int val2);
void assert_long_equals(long val1, const long val2);
void assert_null(void *val);
void assert_str_not_equals(const char *val1, const char *val2);
void assert_int_not_equals(const int val1, const int val2)... | 1,328,211 |
the-stack-v2-dedup | C | #ifndef __NIOS2ARDUINO_H__
#define __NIOS2ARDUINO_H__
void setup(void);
void loop(void);
int millis(void);
void delayMs(int );
void analogWrite(int ch,unsigned char value);
void digitalWrite(int port,int value);
void arduinoMain(void);
#define LOW 0
#define HIGH 1
#endif
| 1,328,212 |
the-stack-v2-dedup | C | /* Este programa tiene el propósito de recibir cantidad n de números que el usuario proporcione
* y verificar si hay duplicados, y en caso de que sí haya, informarle al usuario.
* Nombre: Alejandro Ernesto Ramírez Michel
* Fecha: 14 de octubre del 2018
*/
#include <stdio.h>
#include <stdlib.h>
//funcion para ... | 1,328,213 |
the-stack-v2-dedup | C | typedef struct _LIST_ENTRY
{
/* 0x0000 */ struct _LIST_ENTRY* Flink;
/* 0x0008 */ struct _LIST_ENTRY* Blink;
} LIST_ENTRY, *PLIST_ENTRY; /* size: 0x0010 */
typedef struct _NDIS_OBJECT_HEADER
{
/* 0x0000 */ unsigned char Type;
/* 0x0001 */ unsigned char Revision;
/* 0x0002 */ unsigned short Size;
} NDIS_OBJEC... | 1,328,214 |
the-stack-v2-dedup | C | #ifndef H_EXPLORER
#define H_EXPLORER
#include<unistd.h>
#include<stdio.h>
#include<stdlib.h>
#include<sys/wait.h>
#include<string.h>
void explorer(int debut, int fin);
#endif | 1,328,215 |
the-stack-v2-dedup | C | #ifndef SEPIA_H
#define SEPIA_H
#include "transform.h"
struct Sepia : public Transformation{
Sepia(Image *);
void render(PPM &ppm);
~Sepia();
};
#endif
| 1,328,216 |
the-stack-v2-dedup | C | #include "output.h"
void print_hamiltonian_path(struct Num_Coordinates *numbers)
{
int i;
printf(" (%2d, %2d)", numbers->coordinates[0].row, numbers->coordinates[0].col);
for (i = 1; i < numbers->count; i++)
{
printf(" -> (%2d, %2d)", numbers->coordinates[i].row, numbers->coordinates[i].col);
if ((i + 1) ... | 1,328,217 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* set_plus_and_space_to_value.c :+: :+: :+: ... | 1,328,218 |
the-stack-v2-dedup | C | /* virtio-wlan host-side driver.
*
* Copyright (c) 2012, Steve Glass <s.glass@nicta.com.au>
*
* 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 version 2 of the
* License, or (at you... | 1,328,219 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ihwang.c :+: :+: :+: ... | 1,328,220 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* :::::::: */
/* v3_new_null.c :+: :+: ... | 1,328,221 |
the-stack-v2-dedup | C | #include <xc.h>
#pragma config WDTE = OFF, FOSC = INTRC_NOCLKOUT, PWRTE = ON, MCLRE = ON
#pragma config CP = OFF, CPD = OFF, BOREN = OFF, IESO = OFF, FCMEN = OFF
#pragma config LVP = OFF, DEBUG = ON, WRT = OFF, BOR4V = BOR21V
// Fclk = 4 MHz specified in the configuration bits
// This definition is required to calibrat... | 1,328,222 |
the-stack-v2-dedup | C | #ifndef ___PILHA___
#define ___PILHA___
#include "Domino.h"
/*
A pilha é usada para guardas as pedras do APE
APE = Agrupamento de pedras embaralhado
*/
typedef struct { tPedra* V;
int topo;
} tPilha;
// ***********************************************
/*Inicializa as variáveis d... | 1,328,223 |
the-stack-v2-dedup | C | #include <sys/stat.h>
#include <stdio.h>
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char** argv) {
DIR *dir = opendir(argv[1]);
int64_t sizeLimit = strtoll(argv[2], NUL... | 1,328,224 |
the-stack-v2-dedup | C | #include <stdio.h>
void func(int x) {
int m[100000];
printf("%p\n",func);
if (x > 200) {
return;
}
func(x);
}
int main() {
func(0);
return 0;
}
| 1,328,225 |
the-stack-v2-dedup | C | /*
* INTEL CONFIDENTIAL
*
* Copyright (C) 2016 - 2016 Intel Corporation.
* All Rights Reserved.
*
* The source code contained or described herein and all documents
* related to the source code ("Material") are owned by Intel Corporation
* or licensors. Title to the Material remains with Intel
* Corporation or its licen... | 1,328,226 |
the-stack-v2-dedup | C | #include "matrixlib/affine_transform.h"
#include "sm4.h"
#define SM4_NUM_ROUNDS 32
//operation matrix
AffineTransform P[SM4_NUM_ROUNDS+4][2];
AffineTransform E[SM4_NUM_ROUNDS+4][5][2];
AffineTransform Q[SM4_NUM_ROUNDS+4][2];
uint8_t skbox_enc[SM4_NUM_ROUNDS][4][256];
typedef struct Sm4Whitebox{
//Affine
Affin... | 1,328,227 |
the-stack-v2-dedup | C | #define MAX 10
int re_n; //资源数
int pro_m; //进程个数
typedef struct request{
char name[10];
int num[MAX];
}request;
request rqe; //请求资源的命令
typedef enum booL{
F,
T
}booL;
typedef struct process{
char nam[MAX];
int max[MAX];
int alloction[MAX];
int need[MAX];
booL finish;
booL recived;
}pr... | 1,328,228 |
the-stack-v2-dedup | C | #ifndef _MONGASYMBOLTABLE
#define _MONGASYMBOLTABLE
#include "symboltable.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
struct symbolTable
{
DecList *current;
SymbolTable *previous;
};
SymbolTable *create_symbolTable(void)
{
SymbolTable *table = (SymbolTable *) malloc(sizeof(SymbolTable));
... | 1,328,229 |
the-stack-v2-dedup | C | /******************************************************************************
*
* (c) 2020 Copyright, Real-Time Innovations, Inc. (RTI) All rights reserved.
*
* RTI grants Licensee a license to use, modify, compile, and create derivative
* works of the Software solely in combination with RTI Connext DDS. License... | 1,328,230 |
the-stack-v2-dedup | C | //logfiled.c
//Code by Lixin on 2020.01.18
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<sys/un.h>
#include<time.h>
#include<string.h>
#include<unistd.h>
#define MSGLEN 512
#define oops(m,x){perror(m);exit(x);}
#define SOCKNAME "/tmp/logfilesock"
int main(int ac,char *av[]... | 1,328,231 |
the-stack-v2-dedup | C | #include "binary_trees.h"
/**
* binary_tree_is_full - function that checks if a binary tree is full
* @tree: pointer to the root node of the tree to check
*
* Return: If tree is NULL, your function must return 0
*/
int binary_tree_is_full(const binary_tree_t *tree)
{
int h = 1;
if (!tree)
return (0);
if (tre... | 1,328,232 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<math.h>
int main()
{
int n;
double x1, x2;
scanf("%d", &n);
x1 = (n/log(n));
x2 = 1.25506*(n/log(n));
printf("%.1lf %.1lf\n", x1, x2);
return 0;
}
| 1,328,233 |
the-stack-v2-dedup | C | /*********************************************************************
* Copyright 2012, by MiloWoo.
* All right reserved.
*
* 功能:系统管理工具--停止某个服务
*
* Edit History:
*
* 2012/03/16 - MiloWoo 建立.
*************************************************************************/
#include <stdio.h>
#include <string... | 1,328,234 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdbool.h>
#include<stdlib.h>
bool isPrime(int num)
{
if(num == 2)
{
return true;
}
else if (num < 2)
{
printf("Invalid request");
exit(0);
}
for(int a=2; a<num; a++)
{
if( num%a == 0)
{
return false;
}
... | 1,328,235 |
the-stack-v2-dedup | C | inherit "guilds/guilds/guild";
inherit "room/room";
reset(arg) {
load_plaque();
if(arg) return;
short_desc = "The Archers shooting area";
long_desc = "Nods, this is da archer shooting area, and more lappaa coming.\n";
}
init() {
::init();
guild_init();
}
guild_max_level() {
return 1;
}
guild_name() {
... | 1,328,236 |
the-stack-v2-dedup | C | /**********************************************************************************************
*
* [FILE NAME] : control_ecu.c
*
* [AUTHOR(S)] : Ahmed Hassan
*
* [DATE CREATED]: Mar 11, 2021
*
* [DESCRIPTION]: This Project is to design a Door Lock Security System consists of two ECU's.The
* ... | 1,328,237 |
the-stack-v2-dedup | C | //**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2012, American Megatrends, Inc. **
//** ... | 1,328,238 |
the-stack-v2-dedup | C | // gaoshengtai.c 高升泰
#include <ansi.h>
inherit NPC;
void create()
{
set_name("高升泰", ({ "gao shengtai", "gao" }));
set("title", "大理善阐侯" );
set("long", "大理国侯爷,这是位宽袍大袖的中年男子,三缕长髯,形貌高雅。\n");
set("gender", "男性");
set("age", 33);
set("class", "officer");
set("attitude", "friendly");
set("shen_type", 1);
set("per",... | 1,328,239 |
the-stack-v2-dedup | C | #ifndef _NGX_HASH_H
#define _NGX_HASH_H
#include "ngx_config.h"
#include "ngx_core.h"
typedef struct {
void *value;
u_short len;
u_char name[1];
} ngx_hash_elt_t;
typedef struct {
ngx_hash_elt_t **buckets;
ngx_uint_t size;
} ngx_hash_t;
#... | 1,328,240 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <cs50.h>
#include <math.h>
int main(void)
{
// creat the variables
int count = 0;
float dollars = 0;
float change = 0;
// make the loop
do
{
dollars = get_float("Cash: ");
}
while (dollars <= 0);
// has to be a positive integer
int cen... | 1,328,241 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* init_proc.c :+: :+: :+: ... | 1,328,242 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
int main()
{
int num, *arr, *arr2,i;
scanf("%d", &num);
arr = (int*) malloc(num * sizeof(int));
for(i = 0; i < num; i++) {
scanf("%d", arr + i);
}
/* Write the logic to reverse the array. */
arr2 = (int*) malloc(num * sizeof(int));
f... | 1,328,243 |
the-stack-v2-dedup | C | #include <msp430.h>
#include <libos/jit.h>
#include <libos/funcs.h>
#include <libos/os.h>
#include <libos/event.h>
#include <libos/task.h>
#include <libos/timer.h>
#include <libos/config.h>
#include <libos/comp.h>
#include <libmsp/mem.h>
#include <libmsp/gpio.h>
#include <libdsp/DSPLib.h>
#include <libio/console.h>
//... | 1,328,244 |
the-stack-v2-dedup | C | /************************************************************************
* *
* File : tbSimulation.h *
* Date : 26/10/10 *
* Comments : Physic... | 1,328,245 |
the-stack-v2-dedup | C | #define _GNU_SOURCE
static char *dirname(const char *path)
struct srcfile_state *current_srcfile;
#define MAX_SRCFILE_DEPTH (100)
static int srcfile_depth;
FILE *srcfile_relative_open(const char *fname, char **fullnamep)
void srcfile_push(const char *fname)
int srcfile_pop(void)
struct srcpos srcpos_empty = ;
#defi... | 1,328,246 |
the-stack-v2-dedup | C |
#ifndef _flash_h
#define _flash_h
// #pragma once
enum{
FLASH_WRITE_CMD = 0x02,
FLASH_READ_CMD = 0x03,
FLASH_WRITE_ENABLE_CMD = 0x06,
FLASH_WRITE_DISABLE_CMD = 0x04,
FLASH_READ_STATUS_CMD = 0x05,
FLASH_SECT_ERASE_CMD = 0x20,
FLASH_BLK_ERASE_CMD = 0xD8,
FLASH_CHIP_ERASE_CMD = 0x60,
FLASH_POWER_DOWN ... | 1,328,247 |
the-stack-v2-dedup | C | /********************************************************************
* Copyright Simcom(shanghai)co. Ltd. *
*---------------------------------------------------------------------
* FileName : eat_wmmp.h
* version : 0.10
* Description : eat wmmp inter... | 1,328,248 |
the-stack-v2-dedup | C | #ifndef _GLOBALVALUE_H
#define _GLOBALVALUE_H
#include "cmsis_os.h"
#include "fatfs.h"
#include "main.h"
#include "0_GlobalDefine.h"
#include <stdint.h>
#include <stdbool.h>
extern ADC_HandleTypeDef hadc1;
extern ADC_HandleTypeDef hadc2;
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
extern SPI... | 1,328,249 |
the-stack-v2-dedup | C | #include "STC15F2K60S2.h"
/****************************************************
串口收发程序
******************************************************/
void UART_Write(unsigned char *Buf,unsigned char Num) //发送数据,数组首地址,数组数
{
unsigned char i;
for(i=0;i<Num;i++)
{
SBUF = Buf[i]; //SUB... | 1,328,250 |
the-stack-v2-dedup | C | #ifndef HIP_KERNEL_DEBUG_H
#define HIP_KERNEL_DEBUG_H
#include <linux/ipv6.h>
#include <linux/skbuff.h>
#include "misc.h"
#define CONFIG_HIP_DEBUG 1 /* Set 0 if you want to disable debug */
/* for debugging with in6_ntop */
#define INET6_ADDRSTRLEN 46
/* Informational and error messages are always logged */
#defin... | 1,328,251 |
the-stack-v2-dedup | C | #include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
#include "net.h"
#include "log.h"
#include "err.h"
/**
* Initializes the context. Allocates memory for the address struct. Returns an
* uv error code if something goes wrong.
*/
int net_tcp_context_init(
... | 1,328,252 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
void main()
{
int *a, i, n;
printf("Enter the number of elements in array\n");
scanf("%d", &n);
a = (int *)calloc(n, sizeof(int));
printf("\nEnter the elements\n");
for (i = 0; i < n; i++)
{
scanf("%d", a + i);
}
printf("\nT... | 1,328,253 |
the-stack-v2-dedup | C | #include <string.h>
#include "partitions/partition.h"
#include "hfsp/hfsp.h"
void show_parts(){
part parts[200];
uint64_t size = get_parts(parts, 200);
printf("\033[1m\033[36m\n");
printf(" MAJ | MIN | SIZE(Mb) | NAME\n");
printf("\033[0m");
printf(" --- | --- | -------- | -----\n");
for (i... | 1,328,254 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdlib.h>
#include<pthread.h>
#include<semaphore.h>
#include<unistd.h>
#include<string.h>
sem_t mutex;
int s,wG=0,wNG=0;
void BoardBridge()
{
}
void GoBridge()
{
}
void* GeekArrives(void*arg)
{
int si=0;
sem_wait(&mutex);
wG++;
if(wG>=4)
{
wG-=4;
sem_post(&mutex);
print... | 1,328,255 |
the-stack-v2-dedup | C | #include <stdio.h>
#include "file.h"
char *program_name = NULL;
int print(void *data, const char *line)
{
printf("%s%s\n", data, line);
return 0;
}
int main(int argc, char *argv[])
{
program_name = argv[0];
char *p = "prompt> ";
file_for_each_line("file.h", print, p);
print(p, argv[0]);
... | 1,328,256 |
the-stack-v2-dedup | C | #ifndef _packet
#define _packet
#define START_BYTE 255
//Tag Names
#define T_MODE 1
#define T_CONTROL 2
#define T_DATA 3
//Mode Types
#define M_SAFE 1
#define M_PANIC 2
#define M_MANUAL 3
#define M_CALIBRATION 4
#define M_YAWCONTROL 5
#define M_FULLCONTROL 6
#define M_RAWMODE 7
#define M_HEIGHTCONTROL 8
#define M_WI... | 1,328,257 |
the-stack-v2-dedup | C | /*
** EPITECH PROJECT, 2017
** where
** File description:
** where
*/
#include "header_shell.h"
#include "hash_map.h"
#include "binary.h"
int where(shell_t *shell, char **cmd)
{
hm_object_t *obj;
if (len_tab(cmd) < 2) {
fprintf(stderr, "where: Too few arguments.\n");
return (1);
}
for (unsigned int i = 1; cm... | 1,328,258 |
the-stack-v2-dedup | C | #include<stdio.h>
#include<stdlib.h>
typedef struct Node
{
int val;
struct Node *next;
} node;
int main()
{
int n;
node *head, *p;
//初始化头结点
head = (node *)malloc(sizeof(node));
head->val = 0;
head->next = NULL;
for(int i=0; i<20; i++)
{
p = (node *)malloc(sizeof(node))... | 1,328,259 |
the-stack-v2-dedup | C | /*++
Copyright (c) 1991-1992 Microsoft Corporation
Module Name:
Share.c
Abstract:
This module contains support for the Share catagory of APIs for the
NT server service.
Author:
David Treadwell (davidtr) 10-Jan-1991
Revision History:
--*/
#include "srvsvcp.h"
#include "... | 1,328,260 |
the-stack-v2-dedup | C | #include "i2c_module.h"
static const char *TAG = "i2c-example";
/**
* @brief i2c master initialization
*/
esp_err_t i2c_master_init()
{
int i2c_master_port = I2C_MASTER_NUM;
i2c_config_t conf;
conf.mode = I2C_MODE_MASTER;
conf.sda_io_num = I2C_MASTER_SDA_IO;
conf.sda_pullup_en = GPIO_PULLUP_ENAB... | 1,328,261 |
the-stack-v2-dedup | C | // SPDX-License-Identifier: MIT
/* Minimal AVL-tree helper functions test
*
* SPDX-FileCopyrightText: Sven Eckelmann <sven@narfation.org>
*/
#include <assert.h>
#include "../avltree.h"
int main(void)
{
DEFINE_AVLROOT(testtree);
assert(avl_empty(&testtree));
return 0;
}
| 1,328,262 |
the-stack-v2-dedup | C | /*
TITLE Wilson Theorem Chapter1PrimeWilson.c
COMMENT
Objective: Write a code that finds prime number
using Wilson's Theorem.
Input: -
Output: -
Author: Chris B. Kirov
Date: 02.09.2016
*/
#define MAX 1000
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <stdin... | 1,328,263 |
the-stack-v2-dedup | C | #include<stdio.h>
int main()
{
int j,twodigitnumber,firstno,secondno,i,final;
aa:
printf("enter a twodigit number\n");
i=0;
scanf("%d",&twodigitnumber);
j=twodigitnumber;
while(j!=0){
i++;
j=j/10;
}
if(i!=2)
{printf("enter a valid number which is twodigit from 10-99\n");
goto aa;
}
els... | 1,328,264 |
the-stack-v2-dedup | C | /*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* 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 F... | 1,328,265 |
the-stack-v2-dedup | C | /*
* Timer.c
*
* Created: 22/04/2018 22:03:38
* Author : Dima
*/
#include <avr/io.h>
#include "timer.h"
#include "keyboard.h"
int main(void)
{
DDRA = 0xff;
DDRB = 0;
int val=-1;
int temp;
timer_t timer = timer_create(0);
keyboard_t keyboard = keyboard_create(&PINB);
display_t display = display_c... | 1,328,266 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <unistd.h>
#include <malloc.h>
#include <string.h>
struct msgpack {
int type;
int id;
char str[256];
};
int main()
{
int usercount = 0;
int msgcount = 0;
int i, j, userexist;
char **users = malloc(0);
key_t key = ftok("shmchat.c", 'A');
k... | 1,328,267 |
the-stack-v2-dedup | C | /*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <stdio.h>
#include <stdlib.h>
#include <aos/aos.h>
#include <aos/kernel.h>
#include <hal/soc/soc.h>
#include <yunit.h>
#include <yts.h>
#include <hal/base.h>
#include <hal/wifi.h>
static void test_timer_cb(void *arg)
{
int *pc = arg;
... | 1,328,268 |
the-stack-v2-dedup | C | #include "shadersUtil.h"
#include "filesUtil.h"
static unsigned CreateShader(const char *source, GLenum shader_type)
{
printf("Creating shader\n");
unsigned int shader;
shader = glCreateShader(shader_type);
glShaderSource(shader, 1, &source, NULL);
glCompileShader(shader);
int success;
char info_log[512];
g... | 1,328,269 |
the-stack-v2-dedup | C | # include <stdio.h>
# include <stdlib.h>
# include <iostream.h>
# include <fstream.h>
# include <string.h>
# include <conio.h>
# include <ctype.h>
# define size 80
typedef struct node
{
char S[80];
int count;
struct node *link;
}NODE;
void display(NODE *H)
{
while(H!=NULL){
cout<<H->S<<" "<<H... | 1,328,270 |
the-stack-v2-dedup | C | #include <linux/unistd.h>
int main(void){
int fd = open("test.txt");
char word[1024];
while(read(fd,word,1024)!=0);
close(fd);
return 0;
}
| 1,328,271 |
the-stack-v2-dedup | C | //
// WSTypeDefines.h
// UDan
//
// Created by lilingang on 8/12/16.
// Copyright © 2016 LiLingang. All rights reserved.
//
#ifndef WSTypeDefines_h
#define WSTypeDefines_h
typedef NSString WSHTTPHeaderKey;
static WSHTTPHeaderKey * const WSHTTPHeaderKey_AcceptLanguage = @"Accept-Language";
static WSHTTPHeaderKey ... | 1,328,272 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main_colors.c :+: :+: :+: ... | 1,328,273 |
the-stack-v2-dedup | C | ../../third-party/cpython/Include/parsetok.h | 1,328,274 |
the-stack-v2-dedup | C | #include <stdio.h>
int main()
{
int A[2][3];
A[0][0] = 2;
A[0][1] = 3;
A[0][2] = 6;
A[1][0] = 7;
A[1][1] = 9;
A[1][2] = 1;
int (*p)[3];
p = A;
printf("A = %p...*A = %p... **A = %d....(A+1) = %p....*(A+1) = %p\n", A, *A, **A, (A+1), *(A+1));
printf("p = %p....(p+1)...%p\... | 1,328,275 |
the-stack-v2-dedup | C | #include "apue.h"
int main(void)
{
printf("The process ID is %d\n",getpid());
return 0;
}
| 1,328,276 |
the-stack-v2-dedup | C | #ifndef LIBNECTAR_25519_SC_H
#define LIBNECTAR_25519_SC_H
#include "include/nectar.h"
/* Namespacing. */
#define sc_muladd nectar__25519_sc_muladd
#define sc_reduce nectar__25519_sc_reduce
/* Functions. */
void sc_muladd(uint8_t * s, const uint8_t * a, const uint8_t * b, const uint8_t * c);
void sc_reduce(uint8_... | 1,328,277 |
the-stack-v2-dedup | C | /*
* Copyright 2008-2013 Freescale Semiconductor, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdio.h>
#include "flib/rta.h"
#include "test_common.h"
enum rta_sec_era rta_sec_era;
/*
* Example AES-CBC encrypt blockcipher-using-sequence pointer
*/
int test_blkcipher_seq(uint32_t *buff)
{
struct... | 1,328,278 |
the-stack-v2-dedup | C | /*
* The mrouted program is covered by the license in the accompanying file
* named "LICENSE". Use of the mrouted program represents acceptance of
* the terms and conditions listed in that file.
*
* The mrouted program is COPYRIGHT 1989 by The Board of Trustees of
* Leland Stanford Junior University.
*/
#includ... | 1,328,279 |
the-stack-v2-dedup | C |
/*-------------------------------------------------------------*/
#define NETWIB_IPS_LEN 17
#define NETWIB_PORT_LEN 2
#define NETWIB_IP4_LEN 4
/*-------------------------------------------------------------*/
typedef enum {
NETWIB_PRIV_RANGES_INITTYPE_SORTUNIQ = 1,
NETWIB_PRIV_RANGES_INITTYPE_NOTSORTUNIQ = 2,
N... | 1,328,280 |
the-stack-v2-dedup | C | /*****************************************************************************
* Copyright (c) 2019 FrontISTR Commons
* This software is released under the MIT License, see LICENSE.txt
*****************************************************************************/
#ifndef HECMW_ABLEX_INCLUDED
#define HECMW_ABLEX_INC... | 1,328,281 |
the-stack-v2-dedup | C | /*
* 1806ict: workshop 4 question 10
* -------------------------------
* duncan kirkland
* 20/03/2017
*
*/
#include <stdio.h>
#include <math.h>
void printBits(int);
int main()
{
int number;
printf("enter a base 10 number: ");
scanf("%d", &number);
printBits(number);
return 0;
}
void printB... | 1,328,282 |
the-stack-v2-dedup | C | #ifndef STRUCTURES_H
#define STRUCTURES_H
#ifndef __CUDACC__
struct double3 { double x, y, z; };
#else
// nvcc will pull in '/usr/include/vector_types.h' which
// contains an identical definition of 'double3' (above).
#endif
struct edge { double a, b; };
struct edge_neighbour { int a, b; double x, y, z; };
#e... | 1,328,283 |
the-stack-v2-dedup | C | int
clip_GETCLIPBOARDDATA(ClipMachine * ClipMachineMemory)
{
int len;
char *data = (char *) from_clipboard(_clip_parni(ClipMachineMemory, 1), &len);
_clip_retcn_m(ClipMachineMemory, data, len);
return 0;
}
| 1,328,284 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* line_editor.h :+: :+: :+: ... | 1,328,285 |
the-stack-v2-dedup | C | #include "variadic_functions.h"
/**
* print_all - prints any kind of arguemnts being passed on
* @format: list of arguement types
*/
void print_all(const char * const format, ...)
{
int i = 0;
char *s, *separator = "";
va_list ap;
va_start(ap, format);
if (format != NULL)
{
while (format[i] != '\0')
{
... | 1,328,286 |
the-stack-v2-dedup | C | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isupper.c :+: :+: :+: ... | 1,328,287 |
the-stack-v2-dedup | C | #include "common.h"
#include "syslib.h"
#include "util.h"
unsigned int task2_timer;
void _start(void)
{
yield();
task2_timer = get_timer();
yield();
task2_timer = get_timer () - task2_timer;
print_location(1, 3);
printstr("Process to process time (ms):");
printint(34,3,((unsigned int) task2_timer)/MHZ);
while... | 1,328,288 |
the-stack-v2-dedup | C | /*
This file was autogenerated by raw2c.
Visit http://www.devkitpro.org
*/
const unsigned char gray_animation0004[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a,
... | 1,328,289 |
the-stack-v2-dedup | C |
struct MuchBitfield {
char m0 : 1;
char m1 : 1;
char m2 : 1;
char m3 : 1;
char m4 : 1;
char m5 : 1;
char m6 : 1;
char m7 : 1;
char m8 : 1;
char m9 : 1;
char m10 : 1;
char m11 : 1;
char m12 : 1;
char m13 : 1;
char m14 : 1;
char m15 : 1;
char m16 : 1;
char m17 : 1;
char m18 : 1;
c... | 1,328,290 |
the-stack-v2-dedup | C | /*
* BCPL compiler rewritten to C.
* Based on work of Robert Nordier, www.nordier.com.
*
* Copyright (C) 2013 Serge Vakulenko
*
* It is free software; you can redistribute it and/or modify it
* under the terms of the "Artistic License".
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <set... | 1,328,291 |
the-stack-v2-dedup | C | #include <stdio.h>
#include <stdlib.h>
#include "cdrafter.h"
int main(int argc, char const *argv[])
{
const char* source = "# My API\n## GET /message\n + Response 200 (text/plain)\n\n Hello World\n";
char *result = NULL;
int ret = drafter_c_parse(source, 0, &result);
printf("Result: %s\n", ret == 0 ? "OK" ... | 1,328,292 |
the-stack-v2-dedup | C | /***
CS362 Assignment 3: Card Test 1
Name: Robert Ottolia
Unit Testing: Dominion Card Effect - Smithy
-Should give player +3 cards and discard a card
***/
#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "rngs.h"
#include "math... | 1,328,293 |
the-stack-v2-dedup | C | /* GStreamer
* Copyright (C) 2009 Axis Communications <dev-gstreamer at axis dot com>
* @author Jonas Holmberg <jonas dot holmberg at axis dot com>
*
* gstbufferlist.h: Header for GstBufferList object
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library... | 1,328,294 |
the-stack-v2-dedup | C | // CmpInitGlobalQuotaAllowed
void *CmpInitGlobalQuotaAllowed()
{
void *result; // r0
unsigned int v1; // r1
unsigned int v2; // r3
int v3; // r3
CmpSizeOfPagedPoolInBytes = MmSizeOfPagedPoolInBytes;
result = &CmRegistrySizeLimitType;
if ( CmRegistrySizeLimitLength == 4 )
return (void *)sub_96FBC4(... | 1,328,295 |
the-stack-v2-dedup | C | /*
From:ITC
6
Pointer related defects
6.1
Bad cast of a function pointer
6.1.9
return type function union * and function pointer: union
*/
int rand(void);
typedef union {
int a;
int b;
} func_pointer_009_u_001;
func_pointer_009_u_001 * func_pointer_009_func_001 (void)
{
int flag = rand();
flag ... | 1,328,296 |
the-stack-v2-dedup | C | /* $OpenBSD: mvtemp.c,v 1.5 2023/04/18 08:35:02 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission not... | 1,328,297 |
the-stack-v2-dedup | C | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 1,328,298 |
the-stack-v2-dedup | C | extern void __VERIFIER_error() __attribute__((noreturn));
void assert (int cond) { if (!cond) __VERIFIER_error (); }
struct state_elements_main{
unsigned char b[8];
unsigned char freg;
unsigned char treg;
};
struct state_elements_main smain;
void initial_main(){
smain.treg = 0;
smain.freg = 0;
}
void four_... | 1,328,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.