text stringlengths 3.12k 18.7k |
|---|
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "cJSON.h"
#include "esp_err.h"
#include "config.h"
#include "context.h"
#include "error.h"
#include "storage.h"
#include "tuya.h"
#include "tuya_io.h"
#include "utils.h"
#define MAX_RETRIES ... |
/* Copyright 2015 IBM Corp.
*
* 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 writi... |
/*
* Utility for displaying a.out object file information.
*
* Copyright (C) 2011 <NAME>, <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software
* and its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear in all
* copies and t... |
/*=========================================================
* utdu_slv.c
* example for illustrating how to use LAPACK within a C
* MEX-file on Windows or Linux. This differs from the
* other platforms in that the LAPACK symbols are not
* exported with underscores e.g., dsysvx instead of dsysvx_
*
* UTDU_SLV Sol... |
/*
* This file is part of Espruino, a JavaScript interpreter for Microcontrollers
*
* Copyright (C) 2013 <NAME> <<EMAIL>>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/... |
#include <assert.h>
#include "config.h"
#include "classMethod.h"
#include "CallSiteInfo.h"
#include "SPARC_instr.h"
#include "method_inlining.h"
#include "TypeChecker.h"
#include "translator_driver.h"
#ifdef CUSTOMIZATION
#include "SpecializedMethod.h"
#endif
//////////////////////////////////////////////////////////... |
/* stable/stable_dist.c
*
* Main Libstable source file. Definition of the StableDist structures
* and auxiliary functions to manage alpha-stable distributions.
*
* Copyright (C) 2013. <NAME>
* <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the t... |
/*
* lights.c
* avr_pump_board
*
* In normal operation, 20 lights are connected via 20 N-Channel MOSFETs to
* 20 GPIOs of our MCU:
*
* Lights L01 - L06: PC0 - PC5
* Lights L07 - L12: PD0 - PD5
* Lights L13 - L18: PE0 - PE5
* Lights L19 - L20: PF0 - PF1
*
* Additionally, three GPIOs (also with MOSFETs) are r... |
/*
* Copyright (c) 2017, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of c... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
#define SL_TEST
#include "cgi.c"
static SLVAL
cgi_test_get_hashbang_length(sl_vm_t* vm, SLVAL CgiTest, SLVAL str)
{
sl_string_t* strobj = sl_get_string(vm, str);
size_t hblen = get_hashbang_length(strobj->buff, strobj->buff_len);
return sl_make_int(vm, (long)hblen);
}
typedef struct slash_api_test {
... |
/*****************************************************************************
* sdp.c : SDP creation helpers
*****************************************************************************
* Copyright © 2007 <NAME>
* $Id: ab43de02086af009d8fc666814598d2fb1f5c0d6 $
*
* This program is free software; you can redistr... |
/***************************************************************************//**
* # License
* <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of th... |
/*
* File: fat.c
*
* Copyright (c) 2017-2018 <NAME>, <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, ... |
#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... |
/*
* Copyright (c) 2013, 2014 Jonas 'Sortie' Termansen.
*
* 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 T... |
/**
* This is an audio visualisation specifically written for a 80x8 pixel RGB led banner.
* It reads raw audio frames from a shared-memory mmap'ed file and writes raw RGB frames to stdout.
*
* Features:
* - shows a linear spectrum
* - optionally shows history, as a kind of 3d-spectrogram
**/
#include <string.h... |
for (int i = 0; i < 3; ++i)
printf("0x%x ", serial_mouse_output_buf[i]);
printf("\n");
// printf("%d 0x%x 0x%x\n", serial_y, serial_mouse_output_buf[0], serial_mouse_output_buf[2]);
// if(serial_y >= -1)
// serial_y = 0;
// printf("%d\n", serial_y);
// printf("%d 0x%x\n", serial_y, serial_y);
uint... |
/*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* 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 requir... |
/*
* File:
* mod_ab.c
* Author(s):
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* Description:
* Module for gathering statistics about atomic blocks.
*
* Copyright (c) 2007-2012.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
... |
/*
* Copyright (c) 2018 SignalWire, Inc
*
* 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, pub... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include "hashtable.h"
#include "debug.h"
/*
----------Hashtable Functions----------------
Although the data can handle any data type,
it can only handle int* and char*. To
handle other data types more data type specific
function... |
#pragma once
#include "struct.h"
#include "strerr.h"
#include <time.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#ifdef _WIN32
#include <ws2tcpip.h>
typedef SOCKET socket_t;
typedef int socklen_t;
#undef errno
#define errno WSAGetLastError()
#undef EINTR
#def... |
/*---------------------------------------------------------------------------------
small grame from coder <NAME> : Diamond Dash
-- alekmaul
---------------------------------------------------------------------------------*/
#include "dash.h"
#include "gfxs.h" // to add definition of graphics
#include ... |
/**
File: hwkeyboard.c
Project: DCPU-16 Tools
Component: LibDCPU-vm
Authors: <NAME>
Description: Implements the keyboard specification.
**/
#include <GL/glfw3.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <debug.h>
#include... |
///////////////////////////////////////////////////////
// STM32 Pong Project - <NAME> && <NAME>
// ####
// Script to read joystick data with an STM32 car.
// script by <NAME> - 17/03/2022
// ####
///////////////////////////////////////////////////////
#include "main.h"
#include "usb_host.h"
#include <stdio.h>
#includ... |
// SPDX-License-Identifier: MIT
#include <linux/perf_event.h>
#include <linux/kernel.h>
//#include <linux/bitops.h>
#include <ring_buffer_shm.h>
#include "kdks_i.h"
#define perf_output_put_prb(prb, p, d) copy_data_to_prb(prb, p, &(d), sizeof(d))
/************************************************************
how to c... |
/* $OpenBSD: rsautl.c,v 1.18 2019/07/14 03:30:46 guenther Exp $ */
/* Written by Dr <NAME> (<EMAIL>) for the OpenSSL
* project 2000.
*/
/* ====================================================================
* Copyright (c) 2000 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and bi... |
/* Fig. 11.16: fig11_16.c
This program reads a random access file sequentially, updates data
already written to the file, creates new data to be placed in the
file, and deletes data previously in the file. */
#include <stdio.h>
/* clientData structure definition */
struct clientData {
int acctNum; /* acco... |
/* $Copyright: $
* Copyright (c) 1996 - 2018 by <NAME> (<EMAIL>)
* 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 opt... |
/*
* Copyright (c) 2016 Nordic Semiconductor ASA
* Copyright (c) 2016 <NAME>
*
* SPDX-License-Identifier: Apache-2.0
*/
enum llcp {
LLCP_NONE,
LLCP_CONNECTION_UPDATE,
LLCP_CHAN_MAP,
LLCP_ENCRYPTION,
LLCP_FEATURE_EXCHANGE,
LLCP_VERSION_EXCHANGE,
/* LLCP_TERMINATE, */
#if defined(CONFIG_BLUETOOTH_CONTROLLER... |
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.0.0
* svn version: exported
* Options: --check-global -s 1450
* Seed: 1450
*/
#include "random_runtime.h"
long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
volatile int32_t g_2 = 0L;/* VOLATILE G... |
////////////////////////////////////////////////////////////////////////////////
//
// CHIPS-2.0 TCP/IP SERVER
//
// :Author: <NAME>
// :Date: 17/10/2013
// :email: <EMAIL>
// :license: MIT
// :Copyright: Copyright (C) <NAME> 2013
//
// Administer the transmission side of the IP layer. Processes ARP requests.
//... |
/*
** Do not change these include commands.
** All necessary header files are included in "geminc.h".
** All macros and constants are in "gemprm.h" and "bridge.h".
*/
#include "geminc.h"
#include "gemprm.h"
#include "bridge.h"
void shn_dcod ( char *curtim, char *shefpm, char *sheftb, char *bufrtb, char *gemfil,
... |
/*
* code parts from httpd/modules/core/mod_macro.c
*/
#include "httpd.h"
#include "http_config.h"
#include "http_log.h"
#include "apr.h"
#include "apr_strings.h"
#include "apr_hash.h"
#include "apr_dbd.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "mod_dbd.h"
#define EXEC_SQL "ExecuteSQL"
#define DB_... |
/*
Copyright 2015 Google Inc. All rights reserved.
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 wri... |
#include "par_grid_hash.h"
int main(int argc, char* argv[]){
char* input_name; /**< Input data file name */
int generations = 0; /**< Number of generations to proccess */
int cube_size = 0; /**< Size of the 3D space */
GraphNode*** graph; /**< Graph representatio... |
/* core.c
<NAME> (<EMAIL>), 15 Nov 2020
FreeBSD-style copyright and disclaimer apply
*/
#include "core.h"
#include "render/font.h"
#include "render/ui.h"
#include "game/tape.h"
#include "game/coord.h"
#include "game/gen.h"
#include "game/tape.h"
#include "game/proxy.h"
#include "items/config.h"
#include "vm/mod.... |
/**************************************************************************//**
* @file main.c
* @version V1.10
* $Revision: 10 $
* $Date: 15/11/19 10:11a $
* @brief Show Crypto IP ECC CDH secret Z generation.
*
* @note
* Copyright (C) 2016 Nuvoton Technology Corp. All rights reserved.
*****************... |
#ifndef KERNEL
#error must be in kernel build
#endif
#define KERNEL_LIMIT 0xfffffffffffff000ull
#define KERNEL_BASE 0xffffffff80000000ull
#define DEVICE_BASE 0xffffffff00000000ull
#define KERNEL_PHYS 0x80200000ull /* must match linker script - XXX extern? */
#include <kernel_platform.h>
#define LINEAR... |
/**
* (C) Copyright 2017 Intel Corporation.
*
* 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... |
/*
* rasonly.c -
* Demonstrates the use of OpenGL for rasterization-only, with
* perspective-correct texture mapping.
*
* <NAME> <<EMAIL>>
* Silicon Graphics Computer Systems, May 1997
*
* Since current low-end 3D accelerators support only rasterization in
* hardware, a number of developers have expr... |
/*******************************************************************************
Main Source File
File Name:
main.c
Summary:
This file contains the "main" function for a project.
URL : Project URL: https://github.com/gavinlyonsrepo/pic_32_projects
*****************************************************... |
#include "types.h"
#include "stat.h"
#include "defs.h"
#include "param.h"
#include "traps.h"
#include "spinlock.h"
#include "fs.h"
#include "file.h"
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"
#include "x86.h"
#define NINODES 200
#define CMD_LINE 2000
#define FD_INFO 4000
#define STATUS 6000
void pushDi... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
/*
* arch/arm/mach-smdkc100/s5pc100-irom.c
*
* this file used by start.s assembler code, and the linker script
* must make sure this file is linked within the first 8kB. DO NOT
* use any .bss segment and .data segment, just use irom's small
* stack. it's just a small c routline.
*
* NOTE:
* please do not u... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "parser.h"
#include "types.h"
#include "env.h"
#include "exec.h"
#include "insts.h"
#include "memory.h"
#include "primitives/number.h"
#include "primitives/compiler.h"
#include "safestd.h"
#include "string.h"
#include "unicode/unicode.h"
#define INIT... |
#include <assert.h>
#include <getopt.h>
#include <math.h>
#include <mkl.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include "util.h"
typedef struct ScatterGatherInfo
{
MPI_Datatype MPI_BLOCK;
int blockSize;
int gridSize;
int *counts;
int *displs;
} S... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
double komi = 6.5;
#define B_SIZE 9
#define WIDTH (B_SIZE + 2)
#define BOARD_MAX (WIDTH * WIDTH)
int board[BOARD_MAX] = {
3,3,3,3,3,3,3,3,3,3,3,
3,0,0,0,0,0,0,0,0,0,3,
3,0,0,0,0,0,0,0,0,0,3,
3,0,0,0,0,0,0,0,0,0,3,
3,0,0,0,0,0,0,0,0,0,3,
3... |
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#include <ctype.h>
#define splitVrstica " ,()"
struct array
{
int velikost;
void** array;
};
struct vagon
{
int VagonID;
int tezaVagona;
};
struct vlak
{
int VlakID;
struct array prikljuceni;
};
struct ukaz
{
int VagonID;
int VlakID;
int tezaVagona;... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct node {
struct node *next;
int data;
};
int count(int value, struct node *list);
struct node *get_nth(int n, struct node *head);
struct node *insert_nth(int n, struct node *new_node, struct node *head);
struct node *d... |
/***************************************************************************
*
* BSD LICENSE
*
* Copyright(c) 2007-2021 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... |
/*!
* \file robbus.c
* \brief Robbus command processing state machine
*
* \author <NAME>
* URL: http://robotika.cz/
*
* Revision: 1.0
* Date: 2009/10/30
*/
#include <avr/io.h>
#include <avr/eeprom.h>
#include <avr/interrupt.h>
#include <string.h>
#include "robbus.h"
// packet start definitions
#define SERVICE_... |
/*
* Copyright (c) 2016, Sensirion AG
* Author: <NAME> <<EMAIL>>
* 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... |
/*
* Copyright 2018 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* The command line tool to invoke firmware updater.
*/
#include <assert.h>
#include <stdio.h>
#include <getopt.h>
#include "futility.h"
#inclu... |
/**
* c-easy library implementation
*/
#include "easy.h"
int str_compare(char * str1, char * str2){
if(str1 == NULL && str2 == NULL) return 1;
if(str1!=NULL && str2!=NULL){
return strcmp(str1,str2)==0;
}
return 0;
}
int str_index(char * str, char * substr){
if(str!=NULL && substr!=NULL){
c... |
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <fcgiapp.h>
#include <lua5.1/lua.h>
#include <lua5.1/lauxlib.h>
#include "lua.h"
#include "lfuncs.h"
// replacement print function, outputs to FCGI stream
static int LF_pprint(lua_State *l, int cr)
{
int args = lua_gettop(l);
// Fetch the resp... |
#include <math.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <time.h>
#include <unistd.h>
#include <sys/mman.h>
#define disable_buffering(_fd) setvbuf(_fd, NULL, _IONBF, 0)
/* Note: It's important that these are prime numbers, otherwise it might be
* ... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdbool.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/wait.h>
#include "socket.h"
struct server_sock
{
int sock_fd;
... |
////////////////////////////////////////////////////////////////////////////////
// __ _ _ _ //
// / _(_) | | | | //
// __ _ _ _ ___ ___ _ __ | |_ _ ___| | __| | ... |
/* $NetBSD: atppc_acpi.c,v 1.1 2004/01/25 11:46:49 jdolecek Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME>.
*
* Redistribution and use in source and binary forms, with or without
* modi... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <setjmp.h>
#include <limits.h>
#include <sys/mman.h>
#include <errno.h>
#include "../range.h"
#include "list.h"
#include "alloc.h"
#include "io.h"
struct list *list_new(void *d)
{
struct list *l = umalloc(sizeof(*l));
l->data ... |
#include <GLXW/glxw.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <assimp/cimport.h>
#include <assimp/postprocess.h>
#include <assimp/scene.h>
#include "utils/models.h"
// 3 per position + 3 per normal + UV
#define FLOATS_PER_VERTEX (3 + 3 + 2)
// real case: 1.0f and 0.999969f should be con... |
/*
Autor: <NAME>
Compilador: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Compilado: gcc ExamenFinal.c -o ExamenFinal
Fecha: Thu May 13 10:13:53 CST 2021
Librerías: stdio (u otras)
Resumen: Examen final que modela tres cohetes
Entradas:
Salidas:
*/
//Librerías
#include <stdio.h>
#include <math.h>
//Definiendo constan... |
/*
Copyright (c) 1994 - 2001
<NAME>
Connectivity, Inc.
All rights reserved.
Copyright (C) 2001 <NAME>
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 opt... |
/*
* $Id: in.c,v 1.17 2008-12-28 13:31:01 haley Exp $
*/
/************************************************************************
* *
* The use of this Software is governed by a License Agreement. *
* ... |
// ----------------------------------------------------------------------------
// ATMEL Microcontroller Software Support - Colorado Springs, CO -
// ----------------------------------------------------------------------------
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
// IM... |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <fftw3.h> //if in your compiler search path
//#include "../../../FFTW3/fftw-3.3.5-dll32/fftw3.h" //or path to libfftw3 header
#include "biquad.h" //IIR Filters
// FFT output parameters
#define ROWS 10000 //Number of FFT points
#define COLS 1... |
/*! @file GPMF_demo.c
*
* @brief Demo to extract GPMF from an MP4
*
* @version 1.5.0
*
* (C) Copyright 2017 GoPro Inc (http://gopro.com/).
*
* Licensed under either:
* - Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
* - MIT license, http://opensource.org/licenses/MIT
* at ... |
/*
* control.c
* gunavigation
*
* Created by <NAME> on 09/10/2020.
* Copyright © 2020 <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 mus... |
/*! \file shr_lmem_mgr.c
*
* Local memory manager.
*/
/*
* Copyright: (c) 2018 Broadcom. All Rights Reserved. "Broadcom" refers to
* Broadcom Limited and/or its subsidiaries.
*
* Broadcom Switch Software License
*
* This license governs the use of the accompanying Broadcom software. Your
* use of the soft... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <ctype.h>
#define PRINT_NUM(token) printf(#token " is |%d|\n", token)
#define PRINT_STR(token, order) printf(#token " -%d- is |%s|\n", order, token)
unsigned long int processed_dir_cnt;
unsigned long int processed_file_cnt;
unsi... |
#include "simint/boys/boys_split.h"
#include "simint/eri/eri.h"
#include "simint/eri/general_eri.h"
#include <math.h>
#include <alloca.h>
#include <string.h>
int eri_sharedwork_X_s_s_s(struct simint_multi_shellpair const P,
struct simint_multi_shellpair const Q,
d... |
/*-
* Copyright (c) 2009-2010 <NAME> <<EMAIL>>
* Copyright (c) 2016 <NAME> <<EMAIL>>
* 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 a... |
/******************************************************************************
* @section DESCRIPTION
*
* Classic driver of the VIC model
*****************************************************************************/
#include <vic_driver_classic.h>
// global variables
int flag;
size_t ... |
#include <string.h>
#include <curl/curl.h>
#define OBXC_USE_OBX_ALIASES
#include "error_manager.h"
#include "http_utils.h"
//----------------------------------------------
// Utilities
//----------------------------------------------
// create a new curl handle and allocate memory for the result
obx_err init_curl(C... |
#include <assert.h>
#include "sum.h"
#define VEC_LEN 1024000 //use a fixed number for now
/* zero out the entire vector */
REAL sum(long n, REAL *x, REAL *y) {
long i;
REAL result = 0.0;
for (i = 0; i < n; ++i) {
result += y[i] * x[i];
//printf("host: x[%d]: %f, y[%d]: %f\n", i, x[i], i, y[i]);
... |
/*
* Copyright (C) 2009-2011 Texas Instruments, Inc.
*
* 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 applicabl... |
/*******************************************************************
* (c) Copyright 2011-2012 Discretix Technologies Ltd. *
* This software is protected by copyright, international *
* treaties and patents. *
* Use of this Software as part of or with ... |
/*
(c) Copyright 2013 Hewlett-Packard Development Company, L.P.
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 agre... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "defs.h"
#include "externs.h"
#include "protos.h"
int mopt;
int in_macro;
int expand_macro;
char marg[8][10][80];
int midx;
int mcounter, mcntmax;
int mcntstack[8];
struct t_line *mstack[8];
struct t_line *ml... |
/* smx_perf_pub.c - measure one-way latency under load (publisher). */
/*
Copyright (c) 2021 Informatica Corporation
Permission is granted to licensees to use or alter this software for any
purpose, including commercial applications, according to the terms laid
out in the Software License Agreement.
This sou... |
/* $OpenBSD: if_pair.c,v 1.7 2016/04/13 11:41:15 mpi Exp $ */
/*
* Copyright (c) 2015 <NAME> <<EMAIL>>
* Copyright (c) 2009 <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 th... |
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
/*
* The purpose of this program is to generate the tables required to convert text into morse code and from morse code into text.
* These tables are called "morse_table" and something not yet specified in the source.
... |
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dirwrap.h" // MAX_PATH
#include "gen_defs.h"
/****************************************************************************/
/* Converts an ASCII Hex string into an ulong */
/* by <NAME> (<NAME>) ... |
#include "students.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#define ITEMS_COUNT_POSITION sizeof(char) + sizeof(int)
#define AUTO_INCREMENT_POSITION sizeof(char)
#define READFILE_CAP 10
const char *g_sStudent_file_name = "st... |
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <systemd/sd-bus.h>
// gcc -Wall -O2 sd_simple.c -o sd_simple `pkg-config --cflags --libs libsystemd`
struct object {
const char *name;
const char *uuid;
uint32_t some_count;
uint64_t u64_0;
... |
#include "asf_baseline.h"
// Prototypes
void init_baseline_shape(char *inFile, int sensor_count);
void open_baseline_shape(char *inFile, DBFHandle *dbase, SHPHandle *shape);
void close_baseline_shape(DBFHandle dbase, SHPHandle shape);
void pack_single_shape_file(char *name)
{
char cmd[255];
sprintf(cmd, "tar c... |
/*
*
* wmSun (C) 1999 <NAME> (<EMAIL>)
*
* - Shows Sun Rise/Set Times....
*
*
*
*
*
* 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, or (at your option)
* ... |
// Options: --no-argc --no-arrays --no-bitfields --checksum --concise --no-consts --no-float --no-inline-function --max-array-dim 3 --max-array-len-per-dim 10 --max-block-depth 5 --max-block-size 4 --max-expr-complexity 2 --max-funcs 1 --max-pointer-depth 2 --no-pointers --no-structs --no-unions --no-volatiles --no-b... |
// SPDX-License-Identifier: MIT
// Copyright (C) 2021 <NAME>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "exchg/exchg.h"
#include "fake-net.h"
#include "fake-bitstamp.h"
#include "util.h"
struct bitstamp_websocket {
int conn_id_sent;
struct bitstamp_channel {
bool dif... |
#include <stdio.h>
// bb
#include "bb.h"
// -----------------------------------------------------------------------------
// Helper Prototype.
// -----------------------------------------------------------------------------
#include "../../mlvm/cmd/mnist/mnist.h"
static error_t prepareData(f32_t *x_data, size_t x_s... |
/* This file performs the following test: start, stop and timer
functionality for 2 slave pthreads
- It attempts to use the following two counters. It may use less
depending on hardware counter resource limitations. These are counted
in the default counting domain and default granularity, depending on
the platform.... |
/*
* file: kintobor.c
* created: 20160902
* author(s): mr-augustine
*
* The kintobor implementation file defines all of the robot's higher-order
* functions.
*
* This implementation uses the zeroized-whole-degree method in an effort to
* generate more precise navigation-related values. This mod hopes to addres... |
// Copyright 2015 The Weave Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/auth_request.h"
#include "src/counters.h"
#include "src/log.h"
#include "src/macaroon.h"
#include "src/privet_defines.h"
#include "src/privet_... |
/* $XFree86: xc/programs/lbxproxy/di/init.c,v 1.8 2005/10/14 15:17:30 tsi Exp $ */
/*
Copyright 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies an... |
#include "hstore_add.h"
void adeven_add_init_array( Array *a, size_t initial_size )
{
int i;
a->keys = ( char ** )palloc0( initial_size * sizeof( char * ) );
a->vstr = ( char ** )palloc0( initial_size * sizeof( char * ) );
a->vals = ( long * )palloc0( initial_size * sizeof( long * ) );
a->sizes... |
/**
******************************************************************************
* File Name : main.c
* Description : Main program body
******************************************************************************
** This notice applies to any and all portions of this file
* that are not ... |
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <spawn.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <unistd.h>
#include "get_environ.h"
#include "c... |
/*-
* Copyright (c) 2005-2011 <NAME> <<EMAIL>>
* 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.