text stringlengths 9 5.83M |
|---|
#include <ctype.h>
#include <dirent.h>
#include <limits.h>
#include <pthread.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
char listFile[2048][PATH_MAX];
bool isExistAndRegFile();
void *pindahFile();
int listFilesFromDirectory();
int main... |
#include "vm.h"
#define UFETCH1(where,ptr,inc) { \
where = *((unsigned char*)(ptr)); \
if (inc) (ptr) = (int)(ptr) + 1; \
}
#define UFETCH2(where,ptr,inc) { \
ptr = (((int)ptr + 1) & ~0x1); \
where = (*((unsigned short*)ptr)); \
if (inc) (ptr) = (int)(ptr) + 2; \
where = ntohs(where); \
}
#define UFETCH4(w... |
// usb-teensy.h should only be needed by the host
// (linux kernel) side.
#include <linux/fs.h>
ssize_t teensy_read(struct file *filp, char __user *buf, size_t count,
loff_t *pos);
ssize_t teensy_write(struct file *filp, const char __user *buf, size_t count,
loff_t *pos);
int... |
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
bool isPerfectSquare(int x)
{
int s = sqrt(x);
return (s*s == x);
}
// Returns true if n is a Fibinacci Number, else false
bool isFibonacci(int n)
{
// n is Fibinacci if one of 5*n*n + 4 or 5*n*n - 4 or both
// is a perferct square
return i... |
#include <stdio.h>
int BSearch(int ar[], int len, int target){
int first = 0; // 시작 인덱스
int last = len - 1;
int mid;
while(first <= last){
mid = (first + last) / 2; // 탐색 대상의 중앙 인덱스
if(target == ar[mid]){ // 중앙의 값이 타겟값이라면
return mid; // 인덱스 값 리턴하고 탐색 종료!
}
... |
#include "soundpipe.h"
#include "md5.h"
#include "tap.h"
#include "test.h"
typedef struct {
sp_voc *voc;
sp_osc *osc;
sp_ftbl *ft;
} UserData;
int t_voc(sp_test *tst, sp_data *sp, const char *hash)
{
uint32_t n;
UserData ud;
int fail = 0;
SPFLOAT osc, voc;
sp_voc_create(&ud.voc);
... |
/*
Floki Bootstrap Compiler
Copyright (c) 2016 Joshua Hawcroft
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, mod... |
#include "ruby.h"
#include "ruby/intern.h"
#include "ruby/defines.h"
#include "ruby/encoding.h"
static ID idDiv;
static ID idMul;
static VALUE
apply_actions(VALUE field, VALUE actions)
{
long j, actions_len = RARRAY_LEN(actions);
long beg, len;
VALUE num = 0, modi = 0;
for (j = 0; j < actions_len; j++... |
// ************************
// spi.c - The SPI protocol
// ************************
// SPI overview:
//
// Pins: serial clock, serial data out, serial data in, chip select. It's a shift register: 8 bits go out, 8 bits come in, during each I/O. Operation:
//
// 1. Assert CS: ``_LATxy = 0;``.
// 2. Read and write data: `... |
#include <std.h>
inherit SONG;
void create() {
::create();
set_verses(({
"Mist and twilight, cloud and shade,",
"Soon perhapse, all may fade!",
"Lying in pools deep with blood so red,",
"That the 'morrow's light should find me dead!"
}));
set_type("good");
set_song_name("song of fates"... |
#ifndef __WATCH_H__
#define __WATCH_H__
#include "../key/key_ink_screen.h"
#include "../time/watch_time.h"
#include "../screen/screen.h"
#include <taptic_engine.h>
#include <at_server.h>
#include <ink_screen_display.h>
#include "../time/watch_time.h"
#include "../key/raspberry_gpio_alps.h"
//include "../app/lark/w... |
/*
* Common private data for Silicon Labs WFX drivers
*
* Copyright (c) 2017, Silicon Laboratories, Inc.
* Copyright (c) 2010, ST-Ericsson
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
* Copyright 2004-2006 Jean-Baptiste Note <jbnote@gmail.com>, et al.
*
* This program is free software; you can red... |
void fit_mjj_Full_Dijet2016ScanbgCSV0b100()
{
//=========Macro generated from canvas: c/c
//========= (Thu Jul 26 12:51:02 2018) by ROOT version6.02/05
TCanvas *c = new TCanvas("c", "c",0,0,600,700);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c->SetHighLightColor(2);
c->Range(0,0,1,1);
c->SetFill... |
/********************************************************************
Software License Agreement:
The software supplied herewith by Microchip Technology Incorporated
(the "Company") for its PIC(R) Microcontroller is intended and
supplied to you, the Company's customer, for use solely and
exclusively on Micr... |
// CITS2002 Project 1 2021
// Name(s): Alexandria 'Texas' Bennett , Jackie Shan
// Student number(s): 22969368 , 22710446
// compile with: cc -std=c11 -Wall -Werror -o runcool runcool.c
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <un... |
/*
Crie um programa em C para ler um conjunto de 20 números reais e informe:
• quantos números lidos são iguais a 30
• quantos são maior que a média
• quantos são iguais a média
*/
#include <stdio.h>
int igualtrinta;
eIgualaTrinta(int num){
if(num==30){
return 1;
}
}
maiorqueMedia(int vet[20]){
... |
void fit_mjj_Full_Dijet2017bble1deepScan580()
{
//=========Macro generated from canvas: c/c
//========= (Thu Jun 28 11:13:13 2018) by ROOT version6.02/05
TCanvas *c = new TCanvas("c", "c",0,0,600,700);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c->SetHighLightColor(2);
c->Range(0,0,1,1);
c->SetFi... |
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
void die(const char *message)
{
if(errno) {
perror(message);
} else {
printf("ERROR: %s\n", message);
}
exit(1);
}
typedef int (*compare_cb)(int a, int b);
typedef int *(*sort_cb)(int *numbers, int count, co... |
/*
*
* Nom: Joan Guillem Castell Ros-Zanet login:ls23841
* Nom: Arnau Perramon login:ls26027
*
* File: client.c
* Codi del client.
*
*/
/*Includes*/
#include "lib.h"
int socketFD;
// RSI: Rutina de interrupció
void RSI(){
writeMsg("\nInterrupcio per CTRL+C.\n");
close(socketFD);
exit(-1);
}
// login: funció on d... |
//
// mode.h
//
// Created by たいにゃん on 12/06/21.
//
//
#ifndef SAMPLEPROJECT_MODE_H
#define SAMPLEPROJECT_MODE_H
#define TITLE_MODE 1
#define PLAY_MODE 2
#endif
|
#include <std.h>
#include <sindarii.h>
inherit ROOM;
void create() {
object ob;
::create();
set_property("light", 2);
set_property("indoors", 1);
set("short", "The Mudlib Room");
set("long",
"In this room you can see the status of work being done on "
"bugs in the game by the m... |
#include <stdio.h>
#include "student.h"
pstudent_t create_student(int student_num, char* first_name) {
pstudent_t student = (pstudent_t)malloc(sizeof(student_t));
if (student == NULL) {
return NULL;
}
else {
student->student_ = student_no;
student->f_name = strdup(f_name);
return student;
}
}
int get_stu... |
void L1_MergLP_VBF_WW_SR()
{
//=========Macro generated from canvas: c2/c2
//========= (Fri Nov 8 18:35:17 2019) by ROOT version 6.14/04
TCanvas *c2 = new TCanvas("c2", "c2",0,0,800,1000);
gStyle->SetOptStat(0);
gStyle->SetOptTitle(0);
c2->Range(0,0,1,1);
c2->SetFillColor(0);
c2->SetBorderMode(0);
... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... |
/* Copyright (C) 2017-2018 Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted for any purpose (including commercial purposes)
* provided that the following conditions are met:
*
* 1. Redistributions of source code must ret... |
#include "EdpKit.h"
#include <string.h>
#include <stdlib.h>
void assert(int ecp)
{
;
}
/*---------------------------------------------------------------------------*/
Buffer* NewBuffer(void)
{
Buffer* buf = (Buffer*)malloc(sizeof(Buffer));
buf->_data = (char*)malloc(sizeof(u8) * BUFFER_SIZE);
buf->_... |
#include <std.h>
inherit ARMOUR;
void create() {
::create();
set_name("crown");
set_id(({ "crown" }));
set_short("%^MAGENTA%^A%^RESET%^ %^BOLD%^%^YELLOW%^Royal %^RESET%^%^CYAN%^Crown%^RESET%^");
set_long("A crown made from the most beautiful specimens of %^MAGENTA%^Coral%^RESET%^ and hardest deposit... |
#include "gdt.h"
#include "string.h"
// 全局描述符表长度
#define GDT_LENGTH 5
// 全局描述符表定义
gdt_entry_t gdts[GDT_LENGTH];
// GDTR
gdt_ptr_t gdtr;
static void gdt_set_gate(int32_t num, uint32_t base, uint32_t limit,
uint8_t access, uint8_t gran);
// 声明内核栈地址
extern uint32_t stack;
// 初始化全局描述符表
void i... |
/*
** EPITECH PROJECT, 2018
** handle_resources.c
** File description:
** handle map resources
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <sys/errno.h>
#include "resources.h"
#include "csv.h"
#include "operations.h"
resource_t *parse_resources(const char *filename)
{
... |
inherit MONSTER;
object tp;
void create() {
::create();
set_name("Jimmy Hendrix");
set_short("Jimmy Hendrix");
set_id(({"jimmy hendrix", "jimmy", "guard"}));
set_long("This is one of the faithfull guards of the Darksoul guild.");
set_level(25);
set_gender("male");
set("race", "human");
set_body_type("human");
}
|
/*
mp3UserInterface.c
MP3 Player User Interfacing implementation.
This is the implementation of the mp3UserInterface.h driver interface exposed to applications.
Developed for University of Washington embedded systems programming certificate
2021/3 Abhilash Sahoo wrote it
*/
#include "mp3UserI... |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* SPDX-FileCopyrightText: Copyright (c) 2013, 2014 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_push_swap.c :+: :+: :+: ... |
/*
** EPITECH PROJECT, 2017
** printf
** File description:
** printf
*/
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include "include/my.h"
#include <unistd.h>
void my_putchar(char c);
void my_put_nbr(long long unsigned int nb)
{
if (nb < 0) {
nb *= -1;
my_putchar('-');
}
if (nb > 9)
my_put_n... |
#pragma once
long get_digits_from_input(const char * msg); |
// Helper functions for OpenGL objects //
#ifndef utility_h
#define utility_h
// Required Header Files
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "math.h"
// OpenGL with prototypes for glext
#define GL_GLEXT_PROTOTYPES
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endi... |
#include <struct.h>
#include<HEADER.h>
///產生五乘五矩陣的畫面
void print_array(int *Parray,int updown)
{
int f=2;
double Do=32;
double Re=32*pow(1.0595, 2);
double Mi=32*pow(1.0595, 4);
int UpDownRL;
int x1=0;
int y1=0;
int *Hold;
char control;
///不斷產生圖片
while(1)
{
if (kbhit())
{
///跳的xy值... |
/* threads.c
*
* This is a very simple threaded program.
*
* usage: ./threads
*/
#include <pthread.h>
#include <stdio.h>
void *func1(void *param)
{
static retvalue = 42;
chdir("/bin");
usleep(300000);
return &retvalue;
}
void *func23(void *param)
{
usleep(1000000);
return NULL;
}
void ... |
{
//=========Macro generated from canvas: c1/Stack plot
//========= (Thu Feb 17 22:52:21 2011) by ROOT version5.22/00d
TCanvas *c1 = new TCanvas("c1", "Stack plot",0,0,479,510);
gStyle->SetOptFit(1);
gStyle->SetOptStat(0);
c1->Range(50.48781,-308.0079,123.6585,2062.053);
c1->SetFillColor(0);
c1->SetB... |
#include<stdio.h>
#include<process.h>
#include<time.h>
#include<stdlib.h>
double time_spent = 0.0;
int partition(int a[],int low, int high){
int i,j,temp,pivot;
pivot=a[low];
i=low+1;
j=high;
while(i<=j){
while(a[i]<=pivot)
i++;
while(a[j]>pivot)
j--;
if(i<j){
temp=a[i];
a[i]=... |
#include "bsp_GeneralTim.h"
extern u16 Left_Forward;
extern u16 Left_Backward;
extern u16 Right_Forward;
extern u16 Right_Backward;
static void GENERAL_TIM_GPIO_Config(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
// 输出比较通道1 GPIO 初始化
RCC_APB2PeriphClockCmd(GENERAL_TIM_CH1_GPIO_CLK, ENABLE);
GPIO_InitStructu... |
#include <stdio.h>
#include <stdlib.h>
#define tailleMax 1
void Inverser(int *nb1, int *nb2) {
*nb1+=*nb2;
*nb2=*nb1-*nb2;
*nb1=*nb1-*nb2;
}
void AfficheTab(int tab[tailleMax],int nbE){
printf("\n");
for (int i = 0; i < nbE; i++) {
printf("[%d]",tab[i]);
}
printf("\n");
}
// Permet de vider le buf... |
#include<stdio.h>
int main()
{
unsigned int k= -10;
printf("%d",k);
}
|
#include <stdio.h>
int main()
{
unsigned char b;
b=(unsigned long)~0==(long)~0u;
printf("(unsigned long)~0:%ld, (long)~0u:%ld\n",(unsigned long)~0, (long)~0u);
printf("%d\n",b);
b=(unsigned short)~0==(short)~0;//为什么不成立?
printf("(unsigned short)~0:%d, (short)~0:%d\n",(unsigned short)~0, (short)~... |
#include "aes_gcm_test_suite.h"
#include "aes_gcm.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int AES_gcm_suite_add_tests(CU_pSuite suite){
if(NULL == CU_add_test(suite, "Test AES/GCM encryption/decryption.", test_gcm_encrypt_decrypt)){
return 1;
}
if(NULL == CU_add_test(suite, "Test AES/GC... |
#include <pcap/pcap.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
static char errbuf[PCAP_ERRBUF_SIZE];
void print_all_devs()
{
pcap_if_t *devs, *ff;
if (pcap_findalldevs(&devs, errbuf) == -1) {
fprintf(stderr, "Well, fuck.\n");
exit(EXIT_FAILURE);
}
ff ... |
/*
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ARCH_X86_MULTIBOOT_H_
#define ZEPHYR_INCLUDE_ARCH_X86_MULTIBOOT_H_
#ifndef _ASMLANGUAGE
/*
* Multiboot (version 1) boot information structure.
*
* Only fields/values of interest to Zephyr are enumerated... |
/*****************************************************************************/
/* SSCANF.C v15.12.3 */
/* */
/* Copyright (c) 1995-2016 Texas Instruments Incorporated */
... |
/*
* asr.h
* Functions for handling asr connections
*
* Copyright (c) 2010 Joshua Hill. All Rights Reserved.
*
* 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.... |
/*
+--------------------------------------------------------------------+
| libmemcached-awesome - C/C++ Client Library for memcached |
+--------------------------------------------------------------------+
| Redistribution and use in source and binary forms, with or without |
| modificatio... |
/**********************************************************************/
/* ____ ____ */
/* / /\/ / */
/* /___/ \ / */
/* \ \ \/ ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <omp.h>
#include <math.h>
#include <assert.h>
#define RNG_MOD 0x80000000
int seed;
int main(int argc, char *argv[]){
long long int n;
int i;
int count = 0;
double x;
double y;
if(argc<2) {
exit(1);
... |
#include <GL/glew.h>
#include "engine/bitmap.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
char bitmap_error [512] = "";
typedef struct __bitmap_header {
uint8_t header_field [2];
uint32_t file_size;
uint16_t reserved [2];
uint32_t pixel_array_offset;
... |
#include <stdio.h>
#include <stdlib.h>
//Version 2 of grades but utilizing the file reading function
//./a.out /Users/alyssadelacruz/Documents/DSU_Alyssa/SPRING2018/CSC250/A3b-smallgrades.txt
void printStudents(int n, char studentName[n][20]);
void printGrades(int m, int n, int grades[m][n]);
void calcGrades(int m, ... |
#include<stdio.h>
#include<stdlib.h>
#include<omp.h>
#include<gd.h>
int main()
{
int combined,x,y,color,r,g,b;
char *inputf="a1.png";
char *outputf="a2.png";
FILE *fp;
fp=fopen(inputf,"r");
gdImagePtr img=gdImageCreateFromPng(fp);
int width=gdImageSX(img);
int height=gdImageSY(img);
#pragma omp parallel for private(y,... |
#include <std.h>
#include <aziraphale.h>
inherit ROOM;
void create() {
object oi;
::create();
set_properties((["light": 2, "night light" : 2, "town" : 1, "no attack" :1, "no magic" : 1, "no steal" : 1, "no bump" : 1]));
set_name("Rhondale South");
set_short("Rhondale Square");
set_day_long(... |
//
// mbc_inner_loop.h
//
// Copyright © 2016 Brian Swift. All rights reserved.
//
#include <stdint.h>
#ifndef mbc_inner_loop_h
#define mbc_inner_loop_h
unsigned int mbc_inner_loop(double c1r,double c1i,int idpt);
uint64_t mbc_inner_loop_x4(double c1r,double c1i,double delta,int idpt);
#endif /* mbc_inner_loop_h ... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_args_types.c :+: :+: :+: ... |
// James Upchurch
// ja389873
// COP 3502C
// Set of functions to calculate Fibonacci values greater than the limitations of data types
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <limits.h>
#include "Fibonacci.h"
//-------------------------------------------------
// Alloca... |
#define rMenuBar 128 /* application's menu bar */
#define rAboutAlert 128 /* The About dialog */
#define mApple 128 /* Apple menu */
#define iAbout 1
#define mFile 129 /* File menu */
#define iNew 1
#define iOpen 2
#define iClose 4
#define iSave 5
#define iSaveAs 6
#define iRev... |
#include <stdio.h>
int main(void)
{
int nums[10] = {50, 40, 10, 100, 30, 20, 60, 70, 80, 90};
for (int i = 0; i < 10-1; ++i) {
for (int j = i+1; j < 10; ++j) {
if (nums[i] > nums[j]) {
int temp = nums[i];
nums[i] = nums[j];
nums[j] = temp;
}
}
}
for (int i = 0; i < 10; ++i)
printf("%d ", ... |
#include <std.h>
inherit ARMOUR;
void create() {
:: create();
set_name("robes");
set_short("%^BOLD%^%^BLUE%^M%^WHITE%^a%^BLUE%^ge R%^WHITE%^o%^BLUE%^bes%^RESET%^");
set_long("These robes are filled with magic, and are probably much better than they look.");
set_id(({"robes", "mage robes"}));
s... |
#include <std.h>
inherit ARMOUR;
void create() {
::create();
set_name("choker");
set("id", ({"choker", "satanic choker"}) );
set_short("%^BOLD%^RED%^S%^RESET%^RED%^ata%^RESET%^BOLD%^RED%^n%^RESET%^"
"%^RED%^i%^RESET%^BOLD%^RED%^c%^RESET%^ %^BOLD%^RED%^C%^RESET%^RED%^ho%^RESET%^"
"%^BOLD%^R... |
#include<stdio.h>
void chline(char, int, int);
int main(void)
{
int x, y;
char ch;
printf("input a char:");
scanf("%c", &ch);
printf("input column and row:");
scanf("%d%d", &x, &y);
chline(ch, x, y);
return 0;
}
void chline(char ch, int column, int row)
{
int x, y;
... |
/*
** opts2.c for da in /home/thomas/TEK2/PSU/parser
**
** Made by Thomas
** Login <thomas@epitech.net>
**
** Started on Mon Jun 26 17:54:55 2017 Thomas
** Last update Sun Jul 2 12:26:14 2017 King
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "parser.h"
#include "server.h"
int opt_n(t_z... |
#include <detpic32.h>
static unsigned char display7Scodes[] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x77, 0x7C, 0x39, 0x5E, 0x79, 0x71};
volatile int cont = 0;
void delay(int c){
while(c != 0){
resetCoreTimer();
while(readCoreTimer() < 20000);
c--;
}
}
void toDi... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "rubiks.h"
void print_tab(int **table)
{
int i;
i = 0;
printf("-----------------\n");//17 tirets, impression de la premiere ligne
while (i < 4) //boucle d'impression du reste du tableau
{
printf("| %d | %d | %d | %d |\n", table[i][0... |
// Copyright (c) 2016 Dominik Zeromski <dzeromsk@gmail.com>
//
// 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,... |
/*
* File: stereo_output.c
*
* The output interfaces of stereo data streaming.
* INPUT: Timestamp, IMU, SatGPS
* OUTPUT: Timestamp, IMU, SatGPS, Stereo
* Note: SaGPS: Satellite GPS coordinates
*
*/
int stereo_output_init()
{
// To be implemented
return 0;
}
|
/*
Copyright(c) 1994-1997 Information-technology Promotion Agency, Japan
All rights reserved. No guarantee.
This technology is a result of the Open Fundamental Software Technology
Project of Information-technology Promotion Agency, Japan (IPA).
*/
#ifndef _ENCODE_SUBS_H_
#define _ENCODE_SUBS_H_
typedef stru... |
extern void aTest(void);
|
void classifier_MMM2(int (*p1), int (*K1), int (*n1), double *x1, double *alpha, double *Pi1, double *gamma1, int *id, int (*missingStates), int (*lenMissing1)){
int i, j, r, p, K, n, lenMissing;
double ***x; //, **nj;
double **gamma, ***MM, ***MM_rowOrder;
p = (*p1);
K = (*K1);
n = (*n1);
lenMissing = (... |
//
// version.h
// adv770
//
// Created by Brian Ball on 1/14/15.
// Copyright (c) 2015 Brian. All rights reserved.
//
#ifndef adv770_version_h
#define adv770_version_h
char * adv_version = "_START_HTML_adv770";
#endif
|
#include "../inc/swilib.h"
#include "lang.h"
#include "main.h"
#include "mainmenu.h"
#include "conf_loader.h"
#include "mediafiles_base.h"
#include "libr.h"
extern long timelength[256];
extern const char playerfolder[128];
const RECT Canvas_pl={0,0,239,319};
int GUI_pl;
extern IMGHDR *fonn;
void OnRed... |
// SPDX-License-Identifier: GPL-2.0
// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/module.h>
#include <linux/irqdomain.h>
#include <linux/irqchip.h>
#include <linux/irq.h>
#include <linux/in... |
#ifndef DERIVATIVE_H
#define DERIVATIVE_H
#include <stdlib.h> //for malloc & free use
#include <math.h> //for pow use
#include <stdio.h>
#define DER_DEFAULT_PRECISION_I 5
#define DER_DEFAULT_PRECISION_J 5
#define DER_DEFAULT_H 0.03125 //2^-5
double derivative(double (*f)(double), double x);
#endif /... |
#include "libs/headers.h"
void drawCone(GLdouble R,GLdouble H,GLuint rdiv,GLuint hdiv,GLuint texture)
{
if(hdiv < 1 || rdiv < 1) return;
GLuint i,j;
GLfloat delta, r_, r__, delta_h, H_, theta, theta_, H__;
delta = (2 * M_PI) /(GLfloat) rdiv;
delta_h = H/(GLfloat)hdiv;
glEnable(GL_TEXTURE_2D);
glBindTextu... |
#pragma once
#include <glm/glm.hpp>
/// Represents the material properties of an entity. For now it only contains color, but it should
/// probably be extended to allow more options.
struct Material {
Material(): Material({0, 0, 0}, {0, 0, 0}, {0, 0, 0},
0.0, 0.0, 0.0, 1.0, 0.0) {}
Ma... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* saver.c :+: :+: :+: ... |
./../rcauchy.c |
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/debug.h"
#include "driverlib/pwm.h"
#include "driverlib/pin_map.h"
#include "inc/hw_gpio.h"
#include "driverlib/rom.h"
#include "driverli... |
/*Основная программа сервера*/
/*Серверая программа ожидает только сообщение от клиента, автоматически
обрабатывает его и отсылает назад, ожидая следующее.*/
/*Общение сервера с клиентом возможно и на разных узлах, а не только в пределах
одной машины. Для этого стоит поменять адрес сервера в defs.h на реальный
се... |
#include<string.h>
#include<stdio.h>
#include "hhd32f1xx.h"
#include "hhd_sys.h"
#include "hhd_can.h"
#include "system_user.h"
#include "USART_user.h"
void CAN_IRQHandler()
{
int i;
//CAN_DisableInt(0xff);
if((CAN->RXFIFO[3].all ==0)&(CAN->RXFIFO[4].all ==1)&(CAN->RXFIFO[5].all ==2)&(CAN->RXFIFO[6].all... |
#include <std.h>
#include <lodos.h>
inherit ROOM;
void create() {
::create();
set_short("On top of the northeastern turret");
set_day_long("This is the top of the northeastern turret. Right to the "
"west, the northwestern turret can be spotted. The platform atop th... |
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fIn = fopen("lena.bmp","r"); //Input File name
FILE *fOut = fopen("lena_rotate.bmp","w+"); //Output File name
int i,j,choice;int temp,x,y;
unsigned char byte[54],colorTable[1024];
if(fIn==NULL) // check if the input file has not been ... |
/** @file main.c
* @brief Application run is contained in this file.
*
* This file contains the applications' main() function.
*
* This is the entry point for the application.
* Application name is STM32_UART_ADC_Timer_Fan.
* What the Application does? Lets user choose
* between terminal or potent... |
// 返回局部变量的地址
int* func() {
int a;
return &a; //err qt中会报错 vs不会 linux不允许返回局部变量的地址
}
// 返回全局变量的地址
// 放在{}外面定义的变量,就是全局变量,全局变量在任何地方都可以使用
// 全局变量只有在整个程序结束后,才释放
int* GlobalFunc(int *b) {
return b;
} |
#ifndef DYNARR_H
#define DYNARR_H
#include "common.h"
typedef struct DynArr {
void **buffer;
u64 size;
u64 capacity;
} DynArr;
DynArr *da_sized_init(u64 capacity) {
DynArr *da = (DynArr *)malloc(sizeof(DynArr));
da->buffer = (void **)malloc(sizeof(void *) * capacity);
da->size = 0;
da->capacity = capacity;
r... |
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "indexer.c"
#include "tokenizer.c"
#include "indexer.h"
#define KRED "\x1B[31m"
#define KNORM "\x1B[0m"
#define KGREEN "\x1B[32m"
void
printlist()
{
;
}
void wri... |
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
extern void asm_exploit(void);
extern void get_regs(void);
unsigned long user_cs;
unsigned long user_ss;
unsigned long user_flags;
#define USTACKSZ 1024
unsigned char __attribute__((aligned(16)))... |
#include <binheap.h>
#define PARENT(node) ((node-1)/2)
#define LEFT_CHILD(node) (2*(node) + 1)
#define RIGHT_CHILD(node) (2*(node + 1))
/* A node is valid whenever the number of elements in the heap is greater than the node itself*/
#define VALID_NODE(H, node) ((H)->num_of_elem>(node))
/* Returns the address of a po... |
char keywords[31][20] = {"zero", "one", "two", "three", "four", "five", "six",
"seven", "eight", "nine", "ten",
"eleven", "twelve", "thirteen", "fourteen", "fifteen",
"sixteen", "seventeen", "eighteen", "nineteen",
... |
#include <std.h>
#include <roston.h>
inherit ROOM;
void create() {
::create();
set_name("Bards House");
set_properties((["light":2,"nightlight":3]));
set_short("secret building");
set_long("%^RESET%^%^ORANGE%^The room is small and offers very little light. Picture frames line the walls allowing v... |
#include "ml_map.h"
#include "minilang.h"
#include "ml_macros.h"
#include <string.h>
#include "ml_sequence.h"
#include "ml_method.h"
#include "ml_object.h"
#undef ML_CATEGORY
#define ML_CATEGORY "map"
ML_TYPE(MLMapT, (MLSequenceT), "map"
// A map of key-value pairs.
// Keys can be of any type supporting hashing and c... |
#include <UT/UT_DSOVersion.h>
//#include <RE/RE_EGLServer.h>
#include <UT/UT_Math.h>
#include <UT/UT_Interrupt.h>
#include <GU/GU_Detail.h>
#include <GU/GU_PrimPoly.h>
#include <CH/CH_LocalVariable.h>
#include <PRM/PRM_Include.h>
#include <PRM/PRM_SpareData.h>
#include <PRM/PRM_Range.h>
#include <OP/OP_Operator.h>... |
#ifndef RESTOKENS_H
#define RESTOKENS_H 1
#endif
|
#include <detpic32.h>
#include <p32mx795f512h.h>
void delay(int ms){
while(ms != 0){
resetCoreTimer();
while(readCoreTimer() < 20000){}
ms = ms - 1;
}
}
void toDisplay(int value){
static char flip = 0;
LATB = LATB & 0x00FF;
TRISDbits.TRISD5 = 0;
TRISDbits.TRISD6 = 0;
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct nlist {
struct nlist *next;
char *name;
char *defn;
};
#define HASHSIZE 101
struct nlist *install(char *, char *);
struct nlist *lookup(char *);
unsigned hash(char *);
int main(void) {
struct nlist *... |
#include <linux/device.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c/at24.h>
MODULE_LICENSE("GPL");
static struct platform_device *my_device;
struct i2c_client *client;
struct i2c_a... |
inherit WEAPON;
int weapon_hit();
int result = 0;
int chance;
int level;
int moo;
int moo1;
int count = 0;
create()
{
::create();
set_id(({"knife", "crys knife"}));
set_name("crys knife");
set_short("%^BOLD%^C%^RESET%^r%^BLACK%^%^BOLD%^y%^RESET%^s %^BLACK%^%^BOLD%^K%^RESET%^n%^BOLD%^i%^BLACK%^%^BOLD%^f%^RESET%^e");... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.