text stringlengths 3.12k 18.7k |
|---|
// MPI tool
#define _GNU_SOURCE
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "dccs_utils.h"
#define REPEAT 10
uint64_t clock_rate = 0; // Clock ticks per second
void wait_for_gdb(int rank) {
if (rank != 0)
return;
int i = 0;
char ho... |
/*
* Copyright (c) 2011-2013 <NAME>
*
* 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, modify, merge, publish... |
#include "wyhash.h"
#include <sys/mman.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#include <assert.h>
static uint64_t clock_gettime_nsec(clockid_t);
#define MEM_SIZE ((uint64_t)1024*1024*1024*1 / siz... |
/* ---------------------------------------------------------------- */
/* (C)Copyright IBM Corp. 2007, 2008 */
/* ---------------------------------------------------------------- */
/**
* \file ad_bgl_open.c
* \brief ???
*/
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright ... |
/*
* File: Fixed point_test_BRL4.c
* Author: <NAME>
* For use with Sean Carroll's Big Board
* Adapted from:
* main.c by
* Author: <NAME>
* Target PIC: PIC32MX250F128B
*/
////////////////////////////////////
// clock AND protoThreads configure!
// You MUST check this file!
#includ... |
/*
* Copyright 2020 Makani Technologies LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
#include "SceneLoader.h"
#include "Memory.h"
#include "FrostParser.h"
#include "toolbox/tb_file.h"
#include "toolbox/tb_ini.h"
static IgnisTexture2D* SceneLoadTexture2D(char* ini, char* name, Resources* res)
{
tb_ini_element texture;
tb_ini_query(ini, name, NULL, &texture);
if (texture.error != TB_INI_O... |
/* $title: 'CASH.C ===== Print cash flow from input file =====' */
/* $subtitle: 'Elipse Ltd. [jms] Revised: 1995 Dec 27' */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
typedef struct statistics
{
short month;
short day;
short num_ent;
double b... |
/*---------------------------------------------------------------------------
svm2_mex.c: MEX-file for binary SVM with L2-soft margin solver.
Compile:
mex svm2_mex.c gnppsolver.c kernel_fun.c
Synopsis:
[Alpha,bias,exitflag,kercnt,access,trnerr,t,UB,LB,History] =
svm2_mex(data,labels,ker,arg,C,so... |
/* $Id$ */
/*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* 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 notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE A... |
/*
**************************************************************************************************
*
* Interface between Serial chip emulator device simulator backends
*
* State: working
*
* Copyright 2006 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without ... |
/*
* $Id: pwin.c,v 1.3 2007-06-24 20:32:49 dhmunro Exp $
* routines to create graphics devices for MS Windows
*/
/* Copyright (c) 2005, The Regents of the University of California.
* All rights reserved.
* This file is part of yorick (http://yorick.sourceforge.net).
* Read the accompanying LICENSE file for detail... |
#include <assert.h>
#include "game/camera.h"
#include "game/entity.h"
#include "game/difficulty.h"
#include "game/state.h"
#include "game/entity/player.h"
#include "hw/display.h"
#include "hw/input.h"
#include "hw/timer.h"
/* From level.c */
extern Level current_level;
USE_IMAGE(player);
USE_IMAGE(icons);
/* 0.12 ... |
/*
Copyright (C) 1994-2016 Lawrence Livermore National Security, LLC.
LLNL-CODE-425250.
All rights reserved.
This file is part of Silo. For details, see silo.llnl.gov.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* R... |
/* $NetBSD: iomdkbc.c,v 1.1 2004/03/13 17:52:02 bjh21 Exp $ */
/*-
* Copyright (c) 2004 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must re... |
/* This is the ``Mersenne Twister'' random number generator MT19937, which
generates pseudorandom integers uniformly distributed in 0..(2^32 - 1)
starting from any odd seed in 0..(2^32 - 1). This version is a recode by
<NAME> (<EMAIL>) on March 8, 1998 of a version by
<NAME> (who had suggestions from <NAME> and <NAME>... |
#include "caller_queue.h"
CallerQueue *cq_new(){
size_t sz = sizeof (CallerQueue);
printd("cq_new: "); printd(sz); printdln(" bytes allocated");
CallerQueue *out = (CallerQueue *) malloc(sz);
if(out == NULL){ printdln("cq_new: failed");}
return out;
}
int cq_extend(CallerQueue *queue) ;
int cq_begin(CallerQueue... |
/*
* Copyright (C) 2009-2021 <NAME>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... |
/*
history.c -- primitive history mechanism
<NAME> & <NAME>, July 1991.
This program mimics the att v8 = and == history programs.
The edit() algorithm was adapted from a similar program
that <NAME> wrote, but otherwise all the code has
been written from scratch.
edit() was subsequently redone by <NAME> in ord... |
/**
******************************************************************************
* @progect LZY Wire Cube Tester
* @file wt_task_wiretest.c
* @author <NAME>
* @version V1.0.0
* @date 2014-8-5
* @brief This file provides the wire test functions
**************************************************... |
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
#define N 10
#define M 3
#define NON_ZERO 30
#define TMAX 100
#define EPS (1.0e-6)
#define EPS_D (2.0e-6)
#define OMEGA 1.5
#define LEVEL_END_FLAG = -1
// CRS方式
typedef double crsdata[NON_ZERO];
typedef int crscol[NON_ZERO];
typedef int crs... |
/*
** Private data structurs for FTT internals
*/
/* device information structure */
typedef struct {
char *device_name; /* pathname for device */
char density; /* density code */
char mode; /* compression, etc. */
char hwdens; /* hardware density code for (density,mode) */
char rewind; /* rewind on ... |
#include "dsdp5.h"
/*!
\file dsdpprintout.c
\brief Print iteration statistics.
*/
static int dsdpprintlevel=0;
static int dsdpprintlevel2=0;
#undef __FUNCT__
#define __FUNCT__ "DSDPPrintStats"
int DSDPPrintStatsFile(DSDP dsdp, void *dummy){
double ppobj,ddobj,pstp,dstp,mu,res,pinfeas,pnorm;
int iter,info... |
/*
* Copyright (c) 2003-2004, <NAME>
* Copyright (c) 1999,2000, <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
... |
/*-
* BSD LICENSE
*
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* 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 source cod... |
#include "transitions.h"
#include "my_lib01.h"
#include "Map_Intro.h"
#include "Map_Room1.h"
#include "Map_BigRoom1.h"
#include "graphics.h"
//#include <gb/rand.h>
#include <stdlib.h>
//memory of what time of room was the previous one. Default is 0 (fixed rooms)
UINT8 mLastMapId=0;
#define MAX(A,B) ((A) > (B)?... |
// Monte Carlo simulation of stock price to determine optimal buy/sell strategies.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <pthread.h>
#include "main.h"
const unsigned int NUM_OF_THREADS = 5;
// Generates pseudo random int between the specified bounds sk... |
#include <keyboard.h>
#define BUFFER_SIZE 256
#define KEYBOARD_STATUS_ARRAY_SIZE 256
#define DATA_PORT 0x60
#define CONTROL_PORT 0x64
#define STATUS_PS2_BUFFER_NO_EMPTY 0x1D
#define SCANCODE_PREFIX_SPECIAL1 0xE0
#define SCANCODE_PREFIX_SPECIAL2 0xE1
#define SCANCODE_PRIFIX_REALEASE 0x80
#define NO_PRESSED_KEY 0
#d... |
/* Creates a pty and connects it to the process tty.
* As an optional argument it takes a filename and symlinks /dev/pts/N. */
/* Pretend to be a Flexowriter of sorts */
#define _XOPEN_SOURCE 600 /* for ptys */
#define _DEFAULT_SOURCE /* for cfmakeraw */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
... |
/*
* Implementation of x86-64-specific value getters/setters and virtual stack
* unwinding.
*
* Author: <NAME> <<EMAIL>>
* Date: 11/12/2015
*/
#include "definitions.h"
#include "arch/x86_64/regs.h"
///////////////////////////////////////////////////////////////////////////////
// File-local APIs & definitions
/... |
#include "str.h"
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
# include <windows.h>
# include <tchar.h>
#endif
#include "log.h"
#include "strbuf.h"
size_t
sc_strncpy(char *dest, const char *src, size_t n) {
size_t i;
for (i = 0; i < n - 1 &... |
/*
* ISC License
*
* Copyright (C) 1984-2018 by
* <NAME>
* <NAME>
* <NAME>
* Delft University of Technology
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appea... |
/*
* Author: <NAME>
* Email: <EMAIL>
* Website: viniciusarruda.github.io
* Professor: <NAME>
* Subject: Computer Graphics
* Assignment: Implementation of a gameplay.
*
*/
#include "../util/util.h"
#include "../util/math/math.h"
#include "../util/global/global.h"
#include "window.h"
#include "../object/charac... |
// Program Name:
// Author(s):
// Description:
/* Keep these headers */
#include <tice.h>
/* Standard headers - it's recommended to leave them included */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <debug.h>
/* Other available headers */
// including stdarg.h, setjmp.h, asse... |
/*
* Copyright (C) 2012-2016 WIDE Project.
* 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 source code must retain the above copyright
* notice, this li... |
#include "Enumerations.h"
/* Enumeration string lists */
/* ANCHOR ENUMERATIONS */
char *HTLinkResults[] =
{
"HT_LINK_INVALID",
"HT_LINK_NONE",
"HT_LINK_ERROR",
"HT_LINK_OK",
NULL
};
/* REQUEST ENUMERATIONS */
char *reload_names[] =
{
"HT_ANY_VERSION",
"HT_MEM_REFRESH",
"HT_CACHE_REFRESH",
"HT_FORCE_RELO... |
// SPDX-License-Identifier: GPL-2.0
#include <test_progs.h>
#include <sys/mman.h>
struct map_data {
__u64 val[512 * 4];
};
struct bss_data {
__u64 in_val;
__u64 out_val;
};
static size_t roundup_page(size_t sz)
{
long page_size = sysconf(_SC_PAGE_SIZE);
return (sz + page_size - 1) / page_size * page_size;
}
vo... |
/*
* Copyright(c) 2019-2021 Qualcomm Innovation Center, Inc. All Rights Reserved.
*
* 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 your opti... |
#include "raylib.h"
#include "raymath.h"
#define GRAVITY 1100.0f
#define ACCELERATION 900.0f
#define FRICTION 1400.0f
#define JUMP_SPEED 550.0f
#define FALL_SPEED 1000.0f
#define SLIDE_SPEED 50.0f
#define MAX_SPEED 300.0f
#define MAX_FALL_SPEED 900.0f
#define MAP_LENGTH 25
#define MAP_HEIGHT 13
#define PLAYER_SIZE... |
//===========================================================================
//
// Code written for ESP32 DEVKIT V1
//
// CRYSTALFONTZ CFAF240240A1-013T 240X240 SPI COLOR 1.3" TFT
// ref: https://www.crystalfontz.com/product/cfaf240240a1013t
//
// This code uses 4-wire SPI mode.
//
// The controller is a Sitronix ... |
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/*************************************************************************
* Copyright (c) 2011 AT&T Intellectual Property
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.... |
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
*
* Ethernet driver for native posix board. This is meant for network
* connectivity between host and Zephyr.
*/
#define SYS_LOG_DOMAIN "eth-posix"
#define SYS_LOG_LEVEL CONFIG_SYS_LOG_ETHERNET_LEVEL
#include <l... |
#include "Huffman.h"
struct lista{
ListaNo* first;
int elementos;
};
struct listaNo{
HeapNo* no;
ListaNo* prox;
};
struct heapNo{
byte simbolo;
int freq;
HeapNo *esq,*dir;
};
Lista* createLista(){
Lista* nova = malloc(sizeof(Lista));
nova->first = NULL;
n... |
/******************************************************************************
* The MIT License
*
* Copyright (c) 2013 OpenMusicKontrollers.
*
* 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 ... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* File Name : freertos.c
* Description : Code for freertos applications
******************************************************************************
* @attention
*
* <h2><cente... |
/*
* Copyright (c) 2014 Freescale Semiconductor, Inc.
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "aes128_key_wrap_unwrap.h"
#include "aes_security.h"
////////////////////////////////////////////////////////////////////////////////
// Definitions
//////////////////////////////////... |
/**
* Copyright 2018 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
/*!
* \file ngx_http_zmq_module.c
* \author <NAME>
* \brief definition of the zmq upstream module for nginx
*/
#define DEBUG 1
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <zmq.h>
#include <time.h>
#include "conn_pool.h"
static char* ngx_http_zmq(ngx_conf_t *cf, ngx_command_t *cmd... |
/*
* Emulator initialisation code
*
* Copyright 2000 <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... |
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <time.h>
#define M 6
#define NB_SITE 10
//************ TAGS
#define ID_MSG 0
#define FINGER_MSG 1
#define FINGERRANK_MSG 2
#define LOOKUP_MSG 3
#define STEP_LOOKING 0
#define STEP_FOUND ... |
#include <stdio.h>
#include <stdlib.h>
#include <ruby.h>
#if PYGMENTS_PYTHON_VERSION == 24
#include <python2.4/Python.h>
#elif PYGMENTS_PYTHON_VERSION == 25
#include <python2.5/Python.h>
#elif PYGMENTS_PYTHON_VERSION == 26
#include <python2.6/Python.h>
#elif PYGMENTS_PYTHON_VERSION == 27
#include <python2.7/Python.h>... |
/*
** EPITECH PROJECT, 2017
** breakout.c
** File description:
** Classic Breakout Game in C
*/
#include <SFML/Graphics.h>
#include <SFML/System/Sleep.h>
#include <stdlib.h>
#include <stdio.h>
//TO Do:
// Change ball to a cercle (add cercle collision)
// Fix Performance Issue
// Fix bugs (Score and Segfault)
//Global
... |
#include "test.h"
bool test_samplers() {
bool flag = true;
double inital_propensities[] = {.1, .1, .8, .1, .4, .1, .0};
Solve *p = new_solve(linear, 42, 7, inital_propensities);
Solve *q = new_solve(tree, 42, 7, inital_propensities);
double dt = 0;
bool result = true;
for (int i = 0; i < 1000; i++) {
... |
/*********************************************************************
* SEGGER Microcontroller GmbH & Co. KG *
* Solutions for real time microcontroller applications *
**********************************************************************
* ... |
#include <string.h>
#include <stdio.h>
#include "BLAKE-512.h"
#define U8TO32(p) \
(((u32)((p)[0]) << 24) | ((u32)((p)[1]) << 16) | \
((u32)((p)[2]) << 8) | ((u32)((p)[3]) ))
#define U8TO64(p) \
(((u64)U8TO32(p) << 32) | (u64)U8TO32((p) + 4))
#define U32TO8(p, v) \
(p)[0] = (u8)((v) >> 24); (p)[1] = (u... |
/* qmini.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static doublereal c_b2 = -1.;
static doublereal c_b3 = 1.;
/* $Procedure QMINI ( Quaternion linear interpolation ) */
... |
#pragma once
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <stdio.h>
GLFWwindow *zero_open(char *title, int w, int h, int d, int s);
int zero_update(void *fb, void *pal);
void zero_close() {};
typedef void(*Zero_Handler_Func)(int type, int param1, int param2);
void zero_events(Zero_Handler... |
#include "ps_setup.h"
#include "ps_lib.h"
/*
* usage(FILE *file) -> void
*
* print the usage of this program to the file stream file
*/
void usage(FILE *file) {
if (file == NULL) {
file = stdout;
}
fprintf(file,
"./portScanner [option1, ..., optionN]\n"
" --help ... |
/*
* ds1307.c
*
* Created: 4/27/2019 6:04:19 PM
* Author: Connor
*/
#include <asf.h>
#include "util.h"
#define SLAVE_ADDRESS 0x12
#define SADDR 0xD0
#define DS1307_ADDRESS 0x68
#define DS1307_CONTROL 0x07
#define DS1307_NVRAM 0x08
#define I2C_TIMEOUT 1000
void i2c_write_complete_callback(struct i2c_mast... |
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <hi_comm_vi.h>
#include "../tools.h"
enum ConfigError find_sections(struct IniConfig *ini) {
for (unsigned int i = 0; i < MAX_SECTIONS; ++i) ini->sections[i].pos = -1;
regex_t re... |
/*-
* Copyright (c) 2002-2018 The UbixOS Project.
* All rights reserved.
*
* This was developed by <NAME> for the UbixOS Project.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* 1) Redistributions of source... |
/*-
* Copyright (c) 2014-2015 Sandvine Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of ... |
/*
* linux/include/asm-arm/arch-pxa/irqs.h
*
* Author: <NAME>
* Created: Jun 15, 2001
* Copyright: MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundatio... |
/* (c) <NAME> <<EMAIL>>, license GNU GPL v2 */
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include "omxd.h"
/* Count from 1, like vi line numbers, -1 invalid, 0 empty list */
static int i_list = -1;
static int size = 0;
static char file_playing[LINE_LENGTH] = { 0, };
static char next... |
/*
* corrupt_mpeg2.c
* Copyright (C) 2000-2002 <NAME> <<EMAIL>>
* Copyright (C) 1999-2000 <NAME> <<EMAIL>>
*
* This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
* See http://libmpeg2.sourceforge.net/ for updates.
*
* mpeg2dec is free software; you can redistribute it and/or modify
* it under t... |
#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... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 <NAME> for Adafruit Industries
*
* 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... |
/*
* Copyright (c) 2015-2016 Red Hat, Inc.
*
* All rights reserved.
*
* Author: <NAME> (<EMAIL>)
*
* This software licensed under BSD license, the text of which follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
/**
Analytics CPU (RV64IM) part of TINN on UltraSoC Taygete system.
Display results produced by SCPU.
MIT License
Copyright (c) 2019 <NAME>
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 witho... |
/*
* The functions in this file are responsible for most of the special
* functionality of the purr/meow utilities, which is encrypted pastes
* that the server can't access. They can be configured with the RANDOMIZE_IV,
* ENCODE_BASE_64 and DECODE_BASE_64 macros from purr.h.
*
* RANDOMIZE_IV: IV used for AES encr... |
/*****************************************************************************
*
* multi_poly_init.c
*
* Produce a file of polymers information suitable for reading into
* the main code.
*
* Polymer positions are initialised at random. Multiple polymers can
* be generated. This code is suitable for dilute... |
// Lid-driven Cavity with explicit, central difference Artificial
// Compressibility method. See Ferziger Computational Methods for Fluid
// Dynamics, section 7.4.3. <NAME>.
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
// Simulation Parameters
#define N 50 // Number of points in X... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <memory.h>
#include <stddef.h>
#include <lz4frame.h>
#include <sys/mman.h>
#include "tfstructs.h"
void printHex(unsigned char* fbuf, size_t start, size_t len) {
char *s = malloc(3 * len + 1);
for (size_t i = 0; i < len; i++) {
unsign... |
#include <expat.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
typedef struct {
XML_Parser parser;
XML_Char* (*decoder)(const XML_Char*);
int locations;
} MyParser;
typedef struct {
size_t offset;
size_t capacity;
uint8_t* block;
MyParser* mp;
} Block;
/*!
* Allocate the ... |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* src/lib/krb5/krb/ai_authdata.c - auth-indicator authdata module */
/*
* Copyright (C) 2016 by Red Hat, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... |
/** @file
* @brief Source file with main function
*/
/**
* @mainpage
*
* ### INTRODUCTION
*
* This is simple realisation of the music player for Cypress PSOC4S MCU
* It contains also very simple and primitive MIDI sequencer.
* Files is played from SD card, maybe BLE support will be added in the future.
* (... |
//based on Code from https://github.com/eehusky/Stellaris-GCC.git
#include "stellariscommon.h"
void ResetISR(void);
static void NmiSR(void);
static void FaultISR(void);
static void IntDefaultHandler(void);
extern void SysTickHandler(void);
//extern void UART1IntHandler(void);
extern void SSI2IntHandler(vo... |
// Copyright (C) 2015 University of Oregon
// You may distribute under the terms of either the GNU General Public
// License or the Apache License, as specified in the LICENSE file.
// For more information, see the LICENSE file.
/*STD_ES 1D STD Saturation Transfer Difference experiment with
DPFGSE sculpted solvent s... |
// SPDX-License-Identifier: MIT
/*
* Copyright 2019 HabanaLabs, Ltd.
* All Rights Reserved.
*/
#include "hlthunk.h"
#include "hlthunk_tests.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <limits.h>
#include <cmocka.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
/**
* This... |
/* This file contains:
BlevDrift fit to virtual overscan
DriftEval evaluate the fit for a given line number
DriftMean return the mean value for the drift
and the following local functions:
VMedianY take median in a column, to reject outliers
DriftInit zero sums for a new fit
DriftAccum increment sums for... |
#include "plsa-est-inf.h"
int LAG = 5;
/*
* perform inference for a document
*/
double doc_inference(plsa_model* model, document doc, double *aa)
{ //keeping the topics, infer the document representation.
double likelihood, likelihood_old, sum, *topicD, *aa_temp, converge;
int k, j, t;
top... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define MAX_NUMBER_OF_MEMBERS 1000
#define MAX_NUMBER_OF_TRIBES 10
typedef struct
{
char Name[40];
char Tribe[20];
char Function[20];
float PowerWhenRains;
float PowerWhenIsSunny;
} TribeMember;
typedef struct
{
c... |
/**
* Test the x86 implementation
*/
#include "arch_x86_32.h"
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
/* Compile-time check that asm_instr_ctx_xmm_addr_const, if defined, is asm_instr_ctx_xmm_addr
* If the macro is not defined, define it as asm_instr_ctx_xmm_addr_const to com... |
/**
* Get meaning or explain of macros in std c library headers, eg:
* int n = ENOMEM;
* printf("error `%s` means %s!\n", errno_itoa(n, 0), errno_itoa(n, 1));
* This will output:
* "error `ENOMEM` means Cannot allocate memory!"
*/
#include <stddef.h>
#include "stdm2a.h"
const char* signal_itoa(int sign... |
#include <ctype.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/in.h>
#include <unistd.h>
struct rawargs {
int show_usage;
char* multicast_groups;
char* intervals;
char* error;
};
struct rawargs* parse_ar... |
/*
* ifdfake - Create an Intel Firmware Descriptor with just a section layout
*
* Copyright (C) 2013 secunet Security Networks AG
*
* 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; version... |
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
#include <json-c/json.h>
#define URL0 "https://tt.chadsoft.co.uk/leaderboard/"
#define URL1 ".json?limit=1&vehicle="
#define VEHICLE_COUNT 36
static const char *const vehicle_names[] = {
"Standard Kart S",
"Standard Kart M",
"St... |
/* --------------------------------------------------------------------------
* Name: imageobwin.c
* Purpose: Image observer window
* ----------------------------------------------------------------------- */
#include <stdio.h>
#include <stdlib.h>
#include "fortify/fortify.h"
#include "oslib/colourtrans.h"
#in... |
#include "output.h"
/* IMPORTS */
#include "options.h"
#include "memory.h"
#include "word.h"
#include "lists.h"
#include "term.h"
#include "syserr.h"
#include "dictionary.h"
#include "current.h"
#include "msg.h"
#include "readline.h"
#include "instance.h"
#include "converter.h"
#ifdef HAVE_GLK
#include "glkio.h"
#en... |
#ifndef lint
static char rcsid[] = "$Id: dial.c,v 0.2 2005/08/23 14:55:34 epi Exp $";
/* Author= <NAME> <<EMAIL>> - verify.c, v0.2 2005/10/18 10:02:04 */
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "tlibrary.h"
#include "kvlist.h"
#include "convert.h"
#include... |
/*-
* Copyright (c) 1989, 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software developed by the Computer Systems
* Engineering group at Lawrence Berkeley Laboratory under DARPA contract
* BG 91-66 and contributed to Berkeley.
*
* Redistribution a... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/* This is script-generated code (for the most part). */
/* See dataObjRead.h for a description of this API call.*/
#include "dataObjRead.h"
#include "rodsLog... |
/*
* Aget, Multithreaded Download Accelerator
*
* (c) 2002 <NAME> <murat at enderunix dot org>
* See COPYING for copyright information
*
* $Id: Misc.c,v 1.23 2004/06/01 06:57:02 murat Exp $
*
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <string... |
/*s: linkers/8l/l.h */
#include <u.h>
#include <libc.h>
#include <bio.h>
#include <common.out.h>
#include <8.out.h>
#include "elf.h"
/*s: macro [[DBG]] */
#define DBG if(debug['v']) mylog
/*e: macro [[DBG]] */
/*s: constant [[P]] */
#define P ((Prog*)nil)
/*e: constant [[P]] */
/*s: constant [[S]] */
#define S... |
/*
* Copyright (c) 2009, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include <s... |
/*
* <NAME>, <EMAIL>
* Copyright (C) 1999, 2000 MIPS Technologies, Inc. All rights reserved.
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
*
* This program is distribu... |
//
// Created by <NAME> on 2020/5/29.
//
#include <dns/parse.h>
uint16_t get_dns_id(char *msg) {
return ntohs(*(unsigned short *) msg);
}
void set_dns_id(char *msg, uint16_t dns_id) {
*(uint16_t *) msg = htons(dns_id);
}
char *parse_header(char *msg, dns_msg_header_t *header) {
// parse id
header->i... |
/* Copyright © 2005-2019 <NAME> <<EMAIL>>
* SPDX-License-Identifier: MIT
*/
#include <assert.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <poll.h>
#include <regex.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <curses.h>
#in... |
/*
Copyright (c) 2012, <NAME> <<EMAIL>>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRAN... |
/*
* ISC License
*
* Copyright (C) 1986-2018 by
* <NAME>
* <NAME>
* <NAME>
* <NAME>
* Delft University of Technology
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.