text stringlengths 9 5.83M |
|---|
//***********************************************************************************
// Include files
//***********************************************************************************
#include "gpio.h"
#include "native_gecko.h"
/* GATT database */
#include "gatt_db.h"
#include "infrastructure.h"
#include "... |
#pragma once
#include "resource.h"
//End code - add one more empty line:
|
#include <stdio.h>
void del_digit(char str[])
{
for(int i=0;i<100;i++){//とりあえず上限の100文字まで
if(str[i]=='\0')break;//ナル文字でループ抜ける
if(str[i]>='0'&&str[i]<='9'){//もし数字だった時
for(int j=i;j<100;j++){//残り全てを詰める
str[j]=str[j+1];
}
}
}
}
int main(voi... |
/**
@file
@ingroup st
@brief Symbol table package.
@details The st library provides functions to create, maintain,
and query symbol tables.
@copyright@parblock
Copyright (c) 1994-1998 The Regents of the Univ. of California.
All rights reserved.
Permission is hereby granted, without written agree... |
#ifndef jparse_h
#define jparse_h
#include "json.h"
struct YYLTYPE;
typedef struct JP_Parse_Context
{
void *scanner;
JSON *out_json;
}
JP_Parse_Context;
#define JP_SCANNER ctx->scanner
void jperror(struct YYLTYPE *yylloc, JP_Parse_Context *ctx, char const *s);
#endif
|
/*******************************************************************************
* Copyright (C) 2004-2006 Intel Corp. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of... |
/*
* Copyright (C) 2018 ETH Zurich, University of Bologna
*
* 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 ap... |
//#define ENABLE_PWM
|
/*
Napisz program, który wczyta znak z klawiatury i wyświetli na ekranie wczytany
znak oraz jego kod ASCII w postaci dziesiętnej, szesnastkowej i ósemkowej.
*/
#include<stdio.h>
main()
{
char c;
printf("\nPodaj znak: ");
scanf("%c", &c);
printf("\nZnak [%c] w kodzie ASCII to\n dziesietna: %d\n szesnast... |
#ifndef TGDXTexture_h__
#define TGDXTexture_h__
#include "TGBaseTexture.h"
#include <d3dx9.h>
struct TGDXTexture : public TGBaseTexture
{
public:
TGDXTexture(PTGBaseTextureDescriptor& descr);
~TGDXTexture();
virtual void SetTextureData32(QSize size, DWORD pitch, BYTE* data);
public:
IDirect3DTextur... |
#include <stdio.h>
#include <stdlib.h>
typedef node {
int data;
node *next;
} node;
node* ReverseOrderOfList(node *root);
void main() {
node root = malloc(sizeof(node));
node middle = malloc(sizeof(node));
node last = malloc(sizeof(node));
root->data = 1;
middle->data = 2;
last->data=3;
root->nex... |
// DSPIC33EV256GM102 Configuration Bit Settings
// 'C' source line config statements
// FSEC
#pragma config BWRP = OFF // Boot Segment Write-Protect Bit (Boot Segment may be written)
#pragma config BSS = DISABLED // Boot Segment Code-Protect Level bits (No Protection (other than BWRP))
#pragm... |
#include "../h/rt.h"
#include "../h/record.h"
#define randval (RSCALE*(k_random=(RANDA*k_random+RANDC)&MAXLONG))
/*
* ?x - produce a randomly selected element of x.
*/
random(nargs, arg1v, arg1, arg0)
int nargs;
struct descrip arg1v, arg1, arg0;
{
register int val, i, j;
register union block *bp;
long l... |
int multiply(int a, int b) //Умножение
{
int result;
result = a * b;
return result;
}
|
#define _OZ000100000200045dP_H_
#define OZClassPart0001000002fffffd_0_in_000100000200045c 1
#define OZClassPart0001000002fffffe_0_in_000100000200045c 1
#define OZClassPart000100000200045c_0_in_000100000200045c 0
#define OZClassPart0000000000000000_0_in_0000000000000000 999
typedef struct OZ000100000200045dPart_Rec {... |
#include "..\inc\cfg_items.h"
//Конфигурация
#ifdef NEWSGOLD
#define DEFAULT_DISK "4"
#else
#define DEFAULT_DISK "0"
#endif
__root const CFG_HDR cfghdr0={CFG_UINT,"UIN",0,0xFFFFFFFF};
__root const unsigned int UIN=0;
__root const CFG_HDR cfghdr1={CFG_STR_PASS,"Password",0,8};
__root const char PASS[9]="... |
#include <std.h>
inherit OBJECT;
string type;
void set_type(string str);
string query_type();
string check_skills();
void init() {
add_action("eat", "eat");
}
void create() {
::create();
set_short("A strange herb");
set_name("herb");
set_long((: check_skills :));
set_weight(2);
set_value(0);
set... |
#include "key.h"
#define KEY_PRESS_RELEASE_CHECK_COUNT 1000
void Key_Poll_Init(void)
{
Macro_Set_Bit(rRCC_APB2ENR,2);
Macro_Write_Block(rGPIOA_CRH,0xfff,0x444,20);
}
void Key_EXTI_Init(void)
{
Macro_Set_Bit(rRCC_APB2ENR,2); // PortA clk enable
Macro_Set_Bit(rRCC_APB2ENR,0); // Alt... |
#ifndef _QUERY_H_
#define _QUERY_H_
// DATA STRUCTURE
/*
Since WORDNODEs and DOCUMENTNODEs have exactly what is needed
for ranking the urls, the QHOLDER is a structure that holds
WORDNODES for only the words from the query, and they point to
DOCUMENTNODES for each word
The list of DOCUMENTNODES is the results li... |
/*
* led.c
*
* Created on: 31 ago. 2020
* Author: MAGT
*/
#include "../headers/led.h"
/*******************************************************************************
* GLOBAL VARIABLES WITH LOCAL SCOPE
******************************************************************************/
static led_t LEDS[16]... |
// The MIT License (MIT)
//
// Copyright (c) 2019-2021 A. Orlenko
//
// 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,... |
/*********************************************************************************************************
**
** 中国软件开源组织
**
** 嵌入式实时操作系统
**
** SylixOS(TM) LW : long wing
**
** Copyright Al... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void printarr(char str[]){
int len = strlen(str);
for(int i=0;i<len;i++){
printf("%c",str[i]);
}
printf("\n");
}
void reset(char str[]){
//memset(str, 0, sizeof(str));
int len = strlen(str);
for(int i=0;i<len;i++){
s... |
#ifndef LCD2004_I2C_H
#define LCD2004_I2C_H
//----------------------------------------------------------
#include <avr_cmsis.h>
#include <driver_h\i2c.h> // TWI драйвер
#include <util/delay.h>
#include <avr/pgmspace.h>
//---------------------------------------------------------------
//******************************... |
#include <sys/types.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
unsigned int MakeSocket(void);
int ConnectToServer(struct sockaddr_in* server_address, char* _ip, unsigned int _port, int _socketFD);
void Dat... |
/*
* Ex2_Factorial_Recursion.c
*
* Created on: Jul 14, 2021
* Author: Arsany
*/
#include "stdio.h"
int findFactorial(int x);
void main()
{
int a;
printf("Enter an positive integer: ");
fflush(stdin);
fflush(stdout);
scanf("%d",&a);
printf("Factorial of %d = %d",a,findFactorial(a));
}
int findFactori... |
//LCD_Operate.c
#include <iom128v.h>
#include <macros.h>
#include "LCD_Operate.h"
#include "USART_Operate.h"
//LCD测忙
unsigned char LCD_Busy(void)
{
if(lcd_busy)
return 1;
else
return 0;
}
//LCD用color颜色清屏
void LCD_Clear_Screen(unsigned char *color)
{
GpuSend("CLS(");
GpuSend(color);
GpuSend(");\r\n");
}
//L... |
#include<stdio.h>
#include "main.h"
Student record;
void insert_data(){
int n;
printf("Enter the Number of student of student data you would like to enter: ");
scanf("%d",&n);
for(int i=0;i<n;i++){
printf("\nname: ");
scanf("%[^\n]s",&record.name[i]);
printf("\nemail: ");
scanf("%[^\n]s... |
#include <jos/x86.h>
#include <jos/mmu.h>
#include <jos/error.h>
#include <jos/string.h>
#include <jos/assert.h>
#include <jos/elf.h>
#include <jos/env.h>
#include <jos/pmap.h>
#define RELOC(x) ((x)-KERNBASE)
#define ENVGENSHIFT 12
#include <jos/env.h>
#include "x86/cpu.h"
#include "list.h"
#include "system.h"
#include... |
/**
* Created by Freddie Rice
* Main file for the parallel practice
*/
/* Includes */
#include "config.h"
int main()
{
return 0;
}
|
/*++
Copyright (C) Microsoft. All rights reserved.
Module Name:
memutils.c
Abstract:
Implementation of the Boot Environment Library's memory management APIs
for the initialization and destruction of the library's memory manager.
Environment:
Boot
--*/
// ---------------------... |
#include <assert.h>
#include <lightning/types.h>
#include <samplerate.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "mem.h"
#include "src.h"
struct SRC {
SRC_STATE *state;
};
SRC
SRC_init() {
SRC src;
NEW(src);
/* initialize SRC_STATE */
int error;
src->state = src_ne... |
/*
** verbose.h for raytracer in /home/le-mai_s/recode/TP/raytracer1/Raytracer/include
**
** Made by sebastien le-maire
** Login <le-mai_s@epitech.net>
**
** Started on Fri Oct 23 11:41:43 2015 sebastien le-maire
** Last update Sun Oct 25 00:01:08 2015 sebastien le-maire
*/
#ifndef VERBOSE_H_
# define VERBOSE_H_
/... |
#ifndef lint
static char sccsid[] = "@(#)eritio.c 1.9 (ULTRIX) 12/16/86";
#endif lint
/*
* .TITLE ERITIO - I/O for Event Record Input Transformer
* .IDENT /1-001/
*
* COPYRIGHT (C) 1985 DIGITAL EQUIPMENT CORP.,
* CSSE SOFTWARE ENGINEERING
* MARLBOROUGH, MASSACHUSETTS
*
* THIS SOFTWARE IS FURNISHED UNDER A LICE... |
/*
Author : Xitiz Basnet
Subject : Programming Fundamentals
Lab Sheet NO : 24
Program :WAP to add 3X3 array
Date: January 30 , 2017
*/
#include<stdio.h>
#include<conio.h>
int main()
{
int i,j;
int m1[3][3]={{1,2,5},{2,3,5},{1,3,4}};
int m2[3][3]={{5,5,5},{2,6,3},{1,5,7}};
for(i=0;i<3;i++... |
/*
* This program contains the implementation of single linkedlist.
* Using basic push and pop operations.
*/
#include<stdio.h>
#include<stdlib.h>
/* Definition of the Linked list */
struct node {
int index;
struct node *prev;
struct node *next;
};
void printList(struct node *head){
while(head!=NULL){
... |
#include <stdio.h>
#include <stdlib.h>
int main(){
int a;
printf("podaj wysokosc: ");
scanf("%i", &a);
printf("\n");
for (int i=0; i<=a;i++){
printf("\t");
for(int b=0; b<a-i; b++){
printf(" ");
}
for(int d=0; d<i; d++){
printf("... |
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applic... |
/// Rooms for Tirun's Barrier reef
/// written by Ironman
#include <std.h>
#include <waterworld.h>
inherit ROOM;
void create() {
::create();
set_properties((["water":1,"light":3,"night light":3]));
set_long("There seems to be an overabundance of sea grass on the reef here."
" The sea grass comes in ... |
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <time.h>
typedef struct _Numbers{
int numbers[100];
int numere_adaugate;
int max_numbers;
int index;
} Numbers;
pthread_mutex_t m;
pthread_cond_t c;
void* bear(void* a) {
Numbers *nrs;
nrs=(Numbers *) a;
... |
#ifndef K_IRONWING_H
#define K_IRONWING_H
#define QUESTION 0
#define ANSWER 1
///// Most information for this game was researched using the following ;
//
// encyclopedia wikipedia ---- en.wikipedia.org
// oceans online ---- www.oceansonline.com
// sea and sky ---- www.s... |
#include <stdio.h>
int main(void)
{
int i = 500000000000;
long long j = 500000000000;
printf("i = %d\n", i);
printf("j = %lld\n", j);
return 0;
} |
/*******************************************************************************
MPLAB Harmony Application Splash Screen Source File
Company:
Microchip Technology Inc.
File Name:
screen_FPSCMotion.c
Summary:
This file contains the source code for the demo FPS motion screen.
Description:
... |
$NetBSD: patch-libretro-common_features_features__cpu.c,v 1.1 2019/05/20 12:42:40 nia Exp $
Use clock_gettime on BSD.
--- libretro-common/features/features_cpu.c.orig 2019-05-08 06:06:23.000000000 +0000
+++ libretro-common/features/features_cpu.c
@@ -26,6 +26,7 @@
#if defined(_WIN32)
#include <direct.h>
#else
+#de... |
/*
***************************************************************
*Author:ua_long
*Function:translate the is to os file to print to the screen .
*Date: date
****************************************************************
*/
#include<stdio.h>
int main(void)
{
char n ;
while ((n=getc(stdin)) != EOF)
{
if ((put... |
/*
** EPITECH PROJECT, 2020
** rpg
** File description:
** init.c
*/
#include "init.h"
#include "particule.h"
void init(main_t *main_struct)
{
for (int i = 0; init_funcs[i].ptr != NULL; i++)
init_funcs[i].ptr(main_struct);
main_struct->part1 = create_particle((V2I){76, 76}, sfWhite);
main_struct-... |
#include<stdio.h>
#include<math.h>
struct node{
struct node *right;
struct node *left;
struct node *parent;
int key;
};
typedef struct node * Node;
#define NIL NULL
Node root;
Node treeMinimum(Node x){
while(x->left!=NIL){
x=x->left;
}
return x;
//ok
}
Node treeMaximum(Node x){
while(x->right!... |
#include<stdlib.h>
#include<stdio.h>
#include"grille.h"
int main() {
init_grid_ncurses();
/*add_cell(&g, 20, 20);
add_cell(&g, 20, 21);
add_cell(&g, 20, 22);
add_cell(&g, 20, 26);
add_cell(&g, 20, 27);
add_cell(&g, 20, 28);
add_cell(&g, 18, 24);
add_cell(&g, 17, 24);
add_cell(... |
#include<stdio.h>
int i;
int Linear_search(int arr[],int x,int n)
{
for (i=0;i<n;i++)
{
if(arr[i]==x)
printf("array index arr[%d]=%d",i,arr[i]);
if(i==n)
printf("not found");
}
/*i=0;
while(i<n&&arr[i]!=x)
{
i++;
}
if(i==n)
printf... |
*/
/* inherited classes
#ifndef _OZ000100000200044bP_H_
#define _OZ000100000200044bP_H_
#define OZClassPart0001000002fffffd_0_in_000100000200044b 1
#define OZClassPart0001000002fffffe_0_in_000100000200044b 1
#define OZClassPart000100000200044b_0_in_000100000200044b 0
#endif _OZ000100000200044bP_H_
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* print_helpers.c :+: :+: :+: ... |
/* PMSIS includes */
#include "pmsis.h"
#include "omp.h"
#define ARRAY_SIZE 512
uint32_t a[ARRAY_SIZE] = {0};
uint32_t b[ARRAY_SIZE] = {0};
uint32_t c[ARRAY_SIZE] = {0};
uint32_t errors = 0;
/* Cluster main entry, executed by core 0. */
void cluster_delegate(void *arg)
{
printf("Cluster master core entry\n");
... |
#ifndef _BLOOM_H
#define _BLOOM_H
#include <stdlib.h>
#include <stdint.h>
typedef struct {
size_t asize;
unsigned char *a;
} BLOOM;
BLOOM *bloom_create(size_t size);
int bloom_destroy(BLOOM *bloom);
int bloom_setbit(BLOOM *bloom, int n, ...);
int bloom_check(BLOOM *bloom, int n, ...);
#endif
|
/*
Fast Artificial Neural Network Library (fann)
Copyright (C) 2003-2012 Steffen Nissen (sn@leenissen.dk)
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... |
/* AUTOGEN File: rtdb_sizeof_tmp.c */
#include <stdio.h>
#include <stdint.h>
#include "Sim2Turtle.h"
int main(void)
{
FILE* f;
f= fopen("rtdb_size.tmp", "w");
fprintf(f, "%lu\n", sizeof(Sim2Turtle));
fclose(f);
return 0;
}
/* EOF: rtdb_sizeof_tmp.c */
|
/*
* Copyright (c) 2015-~ lkwywhy
*
* This source code is released for free distribution under the terms of the
* GNU General Public License
*
* Author: lkwywhy<lkwywhy@163.com>
* Created Time: Mon 06 Jul 2015 03:06:04 PM CST
* File Name: ./log.h
*
* Description:
*/
#ifndef _LOG_H
#define _LOG_H
... |
#include <stdio.h>
void print()
{
printf("this is print\n");
}
|
/* THIS FILE HAS BEEN GENERATED, DO NOT MODIFY IT.
*/
/*
* Copyright (C) 2018 ETH Zurich, University of Bologna
* and GreenWaves Technologies
*
* 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 Lic... |
/*++
Copyright (C) Microsoft. All rights reserved.
Module Name:
privdefs.h
Abstract:
This header file contains prototypes for routines that call into kernel
exports or use definitions that are not exposed to regular drivers via WDM
headers.
Environment:
Kernel mode
--*/
... |
#include<stdio.h>
# define max 20
void freq(int [],int);
int main()
{
int n,i,a[max];
printf("Enter the Size of Array:\t");
scanf("%d",&n);
printf("Enter %d integers:\t",n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
freq(a,n);
return 0;
}
void freq(int a[],int n)
{
int i,j,k,c=0,num;
for(i=0;i<n;i++)
{
nu... |
#include "genresult.cuh"
#include <sys/time.h>
/* Put your own kernel(s) here*/
__device__ float segmented_scan_design(const int lane,const int* rows, float* ptrs){
if(lane>=1 && rows[threadIdx.x] == rows[threadIdx.x-1])
ptrs[threadIdx.x]+=ptrs[threadIdx.x-1];
if(lane>=2 && rows[threadIdx.x] == ro... |
#include "petiga.h"
#include "petigagrid.h"
#include <petscblaslapack.h>
#include <petsc/private/pcimpl.h>
typedef struct {
PetscInt dim,dof;
PetscInt overlap[3];
PetscInt ghost_start[3];
PetscInt ghost_width[3];
LGMap lgmap;
Mat mat;
} PC_BBB;
static inline
PetscInt Index3D(const PetscInt start[3... |
#include "server.h"
// static char* mx_delete_slesh_n(char *str) {
// *(str + mx_strlen(str) - 1) = '\0';
// return str;
// }
static void mx_add_last_message(int chat_id, char *message, char *time, char *sender, char* msg_type) {
char *message_error;
int check;
int message_id = mx_get_last_... |
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
struct _func_para
{
int32_t x;
int32_t y;
int32_t z;
void (*toString)(struct _func_para *this )
};
struct _func_res
{
bool isRun;
};
int main(void)
{
return 0;
} |
// SD -- square dance caller's helper.
//
// Copyright (C) 1990-2004 William B. Ackerman.
//
// This file is part of "Sd".
//
// Sd 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; eit... |
/*
********************************************************
* Tabela Para Debug (?) *
********************************************************
*/
#define N_SLINE 1
#define N_PSYM 2
#define N_LSYM 3
#define N_GSYM 4
#define N_STSYM 5
#define N_RSYM 6
#define N_SYM 7
#define N_LENG 8
#define N_SOL 9
#define N_LBR... |
/*
* 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 ma... |
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <malloc.h>
#include <string.h>
#include <fcntl.h>
struct treasure_map
{
int a;
int b;
};
int test_calloc(){
int *x,*y;
y = calloc(50,sizeof(int));
if(!y){
perror("calloc");
... |
#include <stdint.h>
int spin_workload(void* input) {
unsigned count = (unsigned)(uintptr_t)input, i = 0;
for (i = 0; i < count; i++) {
__asm__ __volatile__ ("");
}
return (int)i;
}
int empty_workload(void* nonce) {
return 0;
}
int add_workload(void* input) {
unsigned i = 0, sum = 0, max = (unsigned)(... |
/**
* @file cmp_icu.c
* @author Dominik Loidolt (dominik.loidolt@univie.ac.at)
* @date 2020
*
* @copyright GPLv2
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Founda... |
// repeated.cpp : Defines the entry point for the console application.
//
#include<malloc.h>
#include "stdafx.h"
char* readinput1();
int _tmain(int argc, _TCHAR* argv[])
{
char* s;
int a[62]={0},i=0,j=0;
s=readinput1();
while(*s){ //just considered alpha numeric values.
if(*s>='a' && *s<=... |
/**
* Simple viewer for RLE images using mmap() and then memory buffer.
*
* Note that this is super-simple and omit some required checks, resulting
* in buffer overflow! Don't use this for untrusted data!
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#... |
/******************************************************************************
版权所有 (C), 2015-2025, 网络科技有限公司
******************************************************************************
文 件 名 : rct_epr.h
版 本 号 : 初稿
作 者 : jimk
生成日期 : 2016年5月26日
最近修改 :
功能描述 :
函数列表 :... |
#include<stdio.h>
#include<stdbool.h>
#include<ctype.h>
#define Num 5
//count from 0
int rool_dice(void);
bool play_game(void);
int main(void)
{
bool flag;
int win=0;
int lose=0;
char c;
flag = play_game();
if(flag)
{
win++;
printf("\nYou win!");
}
else{
lose++;
printf("... |
#include "main.h"
// ----------------------
// Tokenizer
// ----------------------
//represent Inputed Token type
typedef enum {
tk_reserved, // symbol
tk_num, //integer number
tk_eof, //end of token
} TokenKind;
typedef struct Token Token;
char *user_input;
// declare Token practical used
Token *toke... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
// Funcion auxiliar para obtener el nombre del
// fichero incluido en un path.
char *get_file_from_path(char *path)
{
for (size_t i = strlen(path) - 1; i; i--)
{
if (path[i] == '/')
{
... |
#include <stdio.h>
#include <limits.h>
unsigned srl(unsigned x, int k) {
/* Perform shift arithmetically */
unsigned xsra = (int) x >> k;
return(xsra & (MAX_INT >> (k-1)));
}
int sra(int x, int k) {
/* Perform shift logically */
int xsrl = (unsigned) x >> k;
return(xsrl | ~(MAX_INT >> (k-1)));... |
// 示例:5.7.4.2
string s2 = "我在示例 5.7.4.2 中!";
void test2()
{
cecho(s2);
}
|
#ifndef __KERN_MM_DEFAULT_PMM_H__
#define __KERN_MM_DEFAULT_PMM_H__
#include "mm/pmm.h"
#include "mm/memlayout.h"
extern const struct pmm_manager default_pmm_manager;
#endif /* ! __KERN_MM_DEFAULT_PMM_H__ */
|
#ifndef _TINYLIBC_UNISTD_H
#define _TINYLIBC_UNISTD_H
#include <bits/tlibc_config.h>
#include <sys/types.h>
char **environ;
#define STDERR_FILENO 2
#define STDOUT_FILENO 1
#define STDIN_FILENO 0
#define PROT_READ 0x1 /* page can be read */
#define PROT_WRITE 0x2 /* page can be wri... |
#include "header.h"
/*pontlista kezelo fuggvenyek*/
int pont_beolvas(FILE *f,char *nev,int *p)
{
char s[50];
int c,i;
c=fgetc(f);
if(c==EOF || c=='\n')return 0;
for(i=0;c!=EOF && c!='\n' && i<=48;i++)
{
s[i]=c;
c=fgetc(f);
}s[i]='\0';
for(i=i-1;i>=0 && (s[i]>'9' || s... |
#include <std.h>
inherit ROOM;
void create() {
::create();
set_name("Drow Camp");
set_items((["snow" : "A deep white snow",
"dirt" : "A dark brown mixture"]));
set_properties((["light":2, "night light":3]));
set_short("camp");
set_long("This is the drow encampment, where the drows are waiting to "
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#define INPUT_FILE1 "input1.dat"
#define INPUT_FILE2 "input2.dat"
#define OUTPUT_FILE "output.dat"
#define MAX_NR_LENGTH 10
typedef struct st_BTree BTree;
struct st_BTree
{
BTree* left;
BTree* right;
//Max depth of subtrees
... |
#ifndef LIB_COS_AUTH_H
#define LIB_COS_AUTH_H
#include "aos_util.h"
#include "aos_string.h"
#include "aos_http_io.h"
#include "cos_define.h"
COS_CPP_START
/**
* @brief sign cos headers
**/
void cos_sign_headers(aos_pool_t *p,
const aos_string_t *signstr,
const aos_st... |
#include "lista_enc.h"
#include <stdio.h>
#include <stdlib.h>
#include "no.h"
#define FALSE 0
#define TRUE 1
//#define DEBUG
struct listas_enc {
no_t *cabeca; /*!< Referência da cabeça da lista encadeada: primeiro elemento. */
no_t *cauda; /*!< Referência da cauda da lista encadeada: último elemento. ... |
#include <stdio.h>
int main()
{
/* vars */
int n, i, j;
printf("\tPASCAL'S TRIANGLE\n");
/* input */
printf("Insert a number N: ");
scanf("%d", &n);
int m[n][n];
/* initializing matrix */
for (i = 0; i < n; i++) {
for (j = 0; j < n; j++) {
m[i][j] = 0;
... |
#ifndef DIRECCION_H_INCLUDED
#define DIRECCION_H_INCLUDED
#endif // DIRECCION_H_INCLUDED
|
/*
* Copyright (c) 2014-2015 André Erdmann <dywi@mailerd.de>
*
* Distributed under the terms of the MIT license.
* (See LICENSE.MIT or http://opensource.org/licenses/MIT)
*/
#ifndef _ZRAM_DEVFS_H_
#define _ZRAM_DEVFS_H_
#include "data_types.h"
int zram_mknod ( const struct zram_dev_info* const p_dev );
int zra... |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
long thread_count,n=800,flag=0;
double sum=0;
void* suma_thread(void* rank);
int main(int argc, char* argv[])
{
long thread;
pthread_t* thread_handles;
thread_count = strtol(argv[1],NULL,10);
thread_handles = malloc(thread_count*sizeof(pthread_t));... |
#ifndef HOME_H
#define HOME_H
STATE homeMode(Nunchuk input, LiquidCrystal lcd);
#endif |
/**CFile**********************************************************************
FileName [dddmpNodeBdd.c]
PackageName [dddmp]
Synopsis [Functions to handle BDD node infos and numbering]
Description [Functions to handle BDD node infos and numbering.
]
Author [Gianpiero Cabodi and Stefan... |
/* THIS FILE HAS BEEN GENERATED, DO NOT MODIFY IT.
*/
/*
* Copyright (C) 2019 GreenWaves Technologies
*
* 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/l... |
#include <std.h>
inherit MONSTER;
void create()
{
::create();
set_name("patron");
set("short", "A cheerful patron");
set("long", "This friendly and cheerful patron in habits the Mad Cow Inn.");
set("id", ({"patron", "monster"})
);
... |
/**
* This is template for main module created by MCUXpresso Project Generator. Enjoy!
**/
#include <string.h>
#include "board.h"
#include "pin_mux.h"
#include "clock_config.h"
/*#include "fsl_debug_console.h"*/
#include "fsl_gpio.h"
/* FreeRTOS kernel includes. */
#include "FreeRTOS.h"
#include "ta... |
#ifndef __SYS_H
#define __SYS_H
/* Includes ------------------------------------------------------------------*/
#include "stm32f0xx.h"
#include "stdlib.h"
#include <stdio.h>
#include "deca_types.h"
#include "deca_regs.h"
#include "deca_device_api.h"
#include "list.h"
typedef unsigned long long uint64;
/* Default ant... |
#include"BinarySearchTree.h"
//int allocation(BST **x, int key, BST *parent);
void inorder_tree_walk(BST *x)
{
if(x != NULL)
{
inorder_tree_walk(x->left);
printf("%d ",x->key);
inorder_tree_walk(x->right);
}
}
//程序能用,但是用了递归,且代码量也大。
//int allocation(BST **x, int key, BST *parent)
//... |
#define _BSD_SOURCE
#define _XOPEN_SOURCE
#include<unistd.h>
#include<limits.h>
#include<pwd.h>
#include<shadow.h>
#include"tlpi_hdr.h"
//判断是否存在这个用户名
//判断是否存在shadow密码文件并且是否拥有访问权
//判断输入的密码是否一致
int main(int argc, char *argv[]){
char *username, *password, *encrypted, *p;
struct passwd *pwd;
struct spwd *spwd;
Boolea... |
#include <windows.h>
#include <stdio.h>
#include "../libs/handles.h"
void main() {
// переменная для записи
char buffer[100] = "It was readed . . .";
// переменная для записи колличества записанных байт
DWORD actlen;
// HANDLE пременные для инициализации не буфферезиванного ввода выво... |
//refer from: https://www.cnblogs.com/ningci/p/5425771.html
#include <reg52.h>
#include <intrins.h>
#include <string.h>
#include "uart.h"
#include "delay.h"
#include "IR.h"
#include "eeprom.h"
IR_CODE read_ir_code(unsigned char);
void save_block_ir_code();
void save_ir_code(IR_CODE ir_code,unsigned int addr);
//全局接... |
$NetBSD: patch-libyara_re.c,v 1.1 2019/12/14 10:46:08 khorben Exp $
Ensure we adhere to valid value domain for isxxxx() function/macro.
--- libyara/re.c.orig 2019-10-10 11:10:50.000000000 +0000
+++ libyara/re.c
@@ -2063,14 +2063,14 @@ int yr_re_exec(
case RE_OPCODE_DIGIT:
prolog;
- matc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.