text stringlengths 3.08k 10.5k |
|---|
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "command.h"
// return 1 if the token is a command separator
// return 0 otherwise
// author: <NAME>, from week 9 lab
int separator(char *token)
{
int i=0;
char *commandSeparators[] = {pipeSep, conSep, seqSep, NULL};
while (commandSepara... |
#include "audio_singlecore.h"
int writeToI2C(char* addrC,char* dataC) {
int addr = 0;
int data = 0;
//Convert binary String of address to int
for(int i = 0; i < 7; i++) {
addr *= 2;
if (*addrC++ == '1') addr += 1;
}
//Convert binary String of data to int
for(int i = 0; i < 9; i++) {
data *=... |
/* interpolation_modifier.c - interpolation modifiers (FLAT,
NOPERSPECTIVE, and CENTROID) */
/* This example renders the same triangle into four different viewport.
Each viewport uses a different technique that passes through the an
interpolated texture coordinate set as the fragme... |
#include <damage.h>
damage_object *damage_list = NULL;
TTF_Font *damage_font[damage_frames];
static const SDL_Color damage_font_color = {255, 255, 0};
static const SDL_Color damage_font_success_color = {0, 255, 255};
static const SDL_Color damage_font_reflect_color = {127, 0, 127};
static const SDL_Color damage_font_b... |
#include <stdio.h>
#include <stdlib.h>
#include "assigment.h"
#include "linkedlist.h"
#include "tree.h"
#include <time.h>
#include "puzzle.h"
void random_char_array_filler(char puzzle[MAX_LENGTH][MAX_LENGTH]);
void print_char_array(char puzzle[MAX_LENGTH][MAX_LENGTH]);
void puzzle_word_finder(char puzzle[MAX_LENGTH][M... |
/**
* @file main.c
*
* main.c provides a function, 'cmain', to initialise the
* kernel and begin executing user processes, after the
* boot-loader and entry assembly have prepared the
* hardware to execute bare-metal C code.
*
* main.c also contains several miscellaneous functions which
* support cmain()'s ini... |
//c library
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <os_kernel.h>
#include <os_dbg_ext.h>
#include <sensors/sensor.h>
#include "onenet_mqtts.h"
static int pack(char* result,char * key[],int key_num,int r_size)
{
int i;
memset(result,0,r_size);
strcat(result,"{"
"... |
/* Copyright (c) 2017, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
*
* All rights reserved.
*
* The Astrobee platform is licensed under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with t... |
/*
*
* This source file is part of ELINA (ETH LIbrary for Numerical Analysis).
* ELINA is Copyright © 2019 Department of Computer Science, ETH Zurich
* This software is distributed under GNU Lesser General Public License Version 3.0.
* For more information, see the ELINA project website at:
* http://elina.et... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "utils.h"
#include <pthread.h>
#define NUM_THREADS 10
void sequentiel();
int load_data();
void *parallelGd(void *threadmess);
int parallel();
struct thread_param {
int k ;
double *x ;
double *y ;
double *theta;
};
struct thread_param t_thread_param [ N... |
/*****************************************************************************
Copyright (c) 2014, 2015, Oracle and/or its affiliates. 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
Founda... |
#include "amd_comgr.h"
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void metadataTest1(void);
typedef struct test_meta_data_s {
char *Buf;
amd_comgr_data_t Data;
amd_comgr_metadata_node_t Root;
} test_meta_data_t;
void read_metadata(test_meta_data_t *MetaData, const char *Fil... |
/*
* Copyright (C) 2009-2012 the libgit2 contributors
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#include "git2/common.h"
#include "git2/object.h"
#include "git2/repository.h"
#include "common.h"
#include "blob.h... |
/* NIST Secure Hash Algorithm */
/* heavily modified by <NAME> <EMAIL> */
/* from <NAME>'s implementation as found in */
/* Applied Cryptography by <NAME> */
/* NIST's proposed modification to SHA of 7/11/94 may be */
/* activated by defining USE_MODIFIED_SHA */
#include "sha.h"
#include <stdio.h>
#include <stdlib.h... |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... |
/* System definitions for code taken from the GNU C Library
Copyright 2017-2018 Free Software Foundation, Inc.
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 3 of the ... |
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include "../include/clim_base.h"
#include "../include/clim_img.h"
#include "../include/clim_logger.h"
#include "../include/clim_utils.h"
#include "../include/clim_args_parser.h"
#include "../include/clim_banner.h"
#ifdef CLIM_OS_WIN
#include "../include/cli... |
/*
* sydbox/toolong.c
*
* Path (longer than PATH_MAX) handling
*
* Copyright (c) 2013 <NAME> <<EMAIL>>
* Based in part upon zsh/Src/compat.c which is:
* Copyright (c) 1992-1997 <NAME>
* All rights reserved.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to... |
/*******************************************************************************
Main Source File
Company:
Microchip Technology Inc.
File Name:
main.c
Summary:
This file contains the "main" function for a project.
Description:
This file contains the "main" function for a proje... |
#include <sys/mmu.h>
enum {
// The GPIO registers base address.
GPIO_BASE_OFF = 0x00200000,
// The offsets for reach register.
// Controls actuation of pull up/down to ALL GPIO pins.
GPPUD = (GPIO_BASE_OFF + 0x94),
// Controls actuation of pull up/down for specific GPIO pin.
GPPUDCLK0 = (GPIO_BASE_OFF + 0x9... |
#include "gff/gff.h"
#include "hope/hope.h"
#define REP0(X)
#define REP1(X) X
#define REP2(X) REP1(X) X
#define REP3(X) REP2(X) X
#define REP4(X) REP3(X) X
#define REP5(X) REP4(X) X
#define REP6(X) REP5(X) X
#define REP7(X) REP6(X) X
#define REP8(X) REP7(X) X
#define REP9(X) REP8(X) X
#define REP10(X) REP9(X) X
#defi... |
/* ESPRESSIF MIT License
*
* Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
*
* Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case,
* it is free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal... |
/*
* Each file must start with this include.
* File containes global settings.
*/
#include "settings.h"
/*
* Main includes here.
*/
#include "MDR32F9Qx_config.h"
#include "usb.h"
/*
* Other includes here.
*/
#include "MDR32F9Qx_interrupt.h"
#include "MDR32F9Qx_usb_handlers.h"
#include "MDR32F9... |
/*-
* Copyright (c) 2005-2007, <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
* notice, this list of condit... |
/******************************************************************************
*
* Copyright (C) 2001 - 2014 Xilinx, Inc. All rights reserved.
*
* 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 Softw... |
/*
* Copyright 1996-2019 Cyberbotics 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 applicable law or ... |
/* $Id: manpage.c,v 1.13 2015/11/07 17:58:55 schwarze Exp $ */
/*
* Copyright (c) 2012 <NAME> <<EMAIL>>
* Copyright (c) 2013 <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 "wwvb_utils.h"
void phaseEncTime(time_enc d_out, time_t time_in) {
struct tm *time_in_struct;
time_in_struct = gmtime(&time_in);
}
static inline void phaseSyncWordInsert(time_enc d_out) {
d_out[0] = 0;
d_out[1] = 0;
d_out[2] = 1;
d_out[3] = 1;
d_out[4] = 1;
d_out[5] = 0;
d... |
/*
*
* Copyright (C) 2011, 2015 Cisco Systems, Inc.
* Copyright (C) 2015 CBA research group, Technical University of Catalonia.
*
* 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:
*
* ... |
// Copyright 2010 The Go 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 "runtime.h"
#include "defs_GOOS_GOARCH.h"
#include "os_GOOS.h"
#include "signals_GOOS.h"
void
runtime·dumpregs(Ureg *u)
{
runtime·printf("ax %X\n",... |
/*
* Copyright (C) 2017 C-SKY Microsystems Co., Ltd. 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 ... |
// imgflo - Flowhub.io Image-processing runtime
// (c) 2014 The Grid
// imgflo may be freely distributed under the MIT license
struct _Network;
void net_node_added(Graph *graph, const gchar *name, GeglNode *node, Processor *proc, gpointer user_data);
typedef void (* NetworkProcessorInvalidatedCallback)
... |
/*
* shell_help.c
*/
#include "private.h"
#include "clish/types.h"
#include "lub/string.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
/*--------------------------------------------------------- */
/*
* Provide a detailed list of the possible command completions
*/
static void available_commands(cli... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include "portability.h"
#ifdef _WIN32
#define dlclose FreeLibrary
#define dlsym GetProcAddress
#define dlerror() "Failed"
#define dlopen(lib,ig) LoadLibrary(lib)
#else
#include... |
#include "ccv.h"
#include "ccv_internal.h"
#include "3rdparty/dsfmt/dSFMT.h"
ccv_ferns_t* ccv_ferns_new(int structs, int features, int scales, ccv_size_t* sizes)
{
assert(structs > 0 && features > 0 && scales > 0);
int posteriors = 1 << features;
ccv_ferns_t* ferns = (ccv_ferns_t*)ccmalloc(sizeof(ccv_ferns_t) + siz... |
#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... |
/*
FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the... |
// functions to operate the ST7789 on the PIC32
// adapted from https://github.com/sumotoy/TFT_ST7789
// and https://github.com/adafruit/Adafruit-ST7789-Library
// pin connections:
// GND - GND
// VCC - 3.3V
// SCL - B14
// SDA - B13
// RES - B15
// DC - B12
// BLK - NC
#include <xc.h>
#include <string.h>
#include "S... |
/*
The MIT License (MIT)
Copyright (c) 2015 silverx
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, publi... |
/***
SerenityAudio
This sound service, written to work with PulseAudio,
is an HTTP driven service which will response to REST / HTTP
commands from an interactive sculpture and will drive a set of speakers.
It is written intending to be run on a Raaspberry Pi.
Based on a PulseAudio example file by <NAME> a... |
/*****************************************************************************/
/* AT25LCxx (SPI) EEPROM driver */
/* */
/* Copyright (C) 2016 <NAME> */
/* All... |
// This library provides the high-level functions needed to use the I2C
// serial interface supported by the hardware of several AVR processors.
#include <avr/io.h>
#include <avr/interrupt.h>
#include "types.h"
#include "defs.h"
// TWSR values (not bits)
// (taken from avr-libc twi.h - thank you <NAME>)
// Master... |
/* List and enable/disable service configurations
*
* Copyright (c) 2017-2020 <NAME> <<EMAIL>>
*
* 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 ... |
/* NetBSD/arm a.out version.
Copyright (C) 1993, 1994, 1997, 1998, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by <NAME> (<EMAIL>)
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <ctype.h>
#include "custom_types.h"
#include "board.h"
#include "game_play.h"
#include "input_validation.h"
/* This file contains the functions that lead the player to play the game, and show game result. */
/* This function gets the tile and the ac... |
#pragma config(Hubs, S2, HTServo, none, none, none)
#pragma config(Hubs, S3, HTMotor, HTMotor, HTMotor, HTMotor)
#pragma config(Sensor, S2, , sensorI2CMuxController)
#pragma config(Sensor, S3, , sensorI2CMuxController)
#pragma config(Sensor, S4, HTSMUX, sens... |
/*
* Copyright (c) 2019-2020 <NAME> (KTOWN)
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "zsl/matrices.h"
#include "zsl/vectors.h"
#define EPSILON 1e-4
int svd_test()
{
size_t q = 18;
size_t p = 3;
zsl_real_t vi[3 * 18] = { 3.2, 5.0, -4.2, -3.1... |
//#include <sys/types.h>
//#include <stdint.h>
//#include <stdio.h>
//#include <stdlib.h>
//#include <string.h>
#include "vgm_drv.h"
#include "vgm_client.h"
#include "genesis.h"
typedef union Address_t {
struct {
u8 l;
u8 h;
};
u16 w;
} Address;
volatile unsigned int *addr_z80 = (unsigne... |
/*
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/licens... |
// Copyright 2019 The Wuffs Authors.
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed... |
/*
Copyright (C) 1997-2022 <NAME> <<EMAIL>>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commer... |
#include "header.h"
extern volatile int logger;
extern char *environ[];
extern volatile sig_atomic_t atomic_fggpid;
/*
* unix_error - unix-style error routine
*/
void unix_error(char *msg)
{
fprintf(stdout, "%s: %s\n", msg, strerror(errno));
exit(1);
}
/*
* app_error - application-style error routine
*/
... |
/*
* Copyright (c) University of British Columbia, 1984
* Copyright (c) 1990, 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Laboratory for Computation Vision and the Computer Science Department
* of the Univ... |
/* ccl - routines for character classes */
/* Copyright (c) 1990 The Regents of the University of California. */
/* All rights reserved. */
/* This code is derived from software contributed to Berkeley by */
/* <NAME>. */
/* The United States Government has rights in this work pursuant */
/* to contract no. DE... |
/*
Example to present:
- profiling;
- substitution of an algorithm in order to accelerate the application
From:
MicroBlaze System Performance Tuning
By: <NAME> and <NAME>
Xilinx, White Paper: EDK
WP348 (v1.1) August 30, 2008
*/
#include <math.h>
#include <stdio.h>
#define NUMBER_OF_TRIANGLES 10 //300
unsigned int ... |
/*-
* Copyright (c) 2012 <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
* notice, this list of conditions an... |
/* This program continuously reads the status of a PS2
controller pad. It display the pad status on the LCD
display (you need to include display.c in your project).
It is not optimized in any way - just a proof of concept
which may be useful for other projects. Perhaps one of
the serial interfaces on t... |
#pragma once
// maximum size for xpub. TODO: we can make this 112 bytes, based on:
// https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#serialization-format
#define XPUB_SIZE 128
#ifdef BTC_MAINNET
// This defines the gateway address used for transferring out of cold storage
#define GATEWAY \
"<K... |
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2019 Intel Corporation.
*/
#include "rte_strings.h"
#define SIZE_OF_PORTLIST (sizeof(portlist_t) * 8)
char *
rte_strtrimset(char *str, const char *set)
{
if (!str || !*str || !set || (strlen(set) != 2))
return NULL;
/* Find the beginning set charac... |
/* $OpenBSD$ */
/*
* Copyright (c) 2009 <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 this permission notice appear in all copies.
*
... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// IMPORTANT: Please read and understand serializer limitations and alternatives as
// described ../../readme.md before beginning to use the serializer.
/... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* scene_too_many_problems.c :+: :+: :+: ... |
/*
* This file is part of Jehanne.
*
* Copyright (C) 2017 <NAME> <<EMAIL>>
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* Jehanne is distributed in the h... |
/*
* Copyright 2014-2016, Intel Corporation
*
* 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 list of conditions and ... |
//////////////////////////////////////////////////////////////////////////////
//
// Description:
// This module contains the main entrypoint for the disassembler and
// the initializing of structures etc.
//
// Version:
// v0.31 22-Nov-2001 JiK
// v0.34 29-Dec-2001 JiK
// v0.35 30-Mar-2002 JiK
// v0.36 30-Apr-... |
/**
* @file
* @brief functions for FreeRTOS-Debug library
*
* @author @htmlonly © @endhtmlonly 2020 <NAME>
*
* @date 20 September 2020
*/
#include "FreeRTOS-Debug.h"
#include <libopencm3/cm3/nvic.h>
#include "queue.h"
/*----------------------------- Global Variables -----------------------------*/
/** ... |
#include "stddef.h"
#include "stdio.h"
typedef int type;
typedef struct AVL_NODE_SIMPLE {
type key;
int height;
struct AVL_NODE_SIMPLE* left;
struct AVL_NODE_SIMPLE* right;
} NODE;
#define MAX(x, y) (x > y ? x : y)
#define HEIGHT(n) (n ? n->height : 0)
#define UPDATE_HEIGHT(n) (1 + (MAX(HEIGHT(n->left), HEIGHT(n... |
/* Split MAF file based on positions in a bed file */
/* Copyright (C) 2011 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "portable.h"
#include "hash.h"
#include "options.h"
#include "sqlNum.h"
#include "maf.h"
#includ... |
/* ====================================================================
*
*
* BSD LICENSE
*
* Copyright(c) 2016-2021 Intel Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
*... |
/* $NiH: io.c,v 1.3 2003/05/14 09:45:11 wiz Exp $ */
/*-
* Copyright (c) 2003 <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 a... |
/*
* AcpiPatcher: Patches FADT table to enable S0ix on supported platforms.
*
* Copyright 2018, <NAME>. All rights reserved. <BR>
* Portions copyright 2014-2018 <NAME> <<EMAIL>>. <BR>
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BS... |
/*
* Copyright (c) 2016, Juniper Networks, Inc.
* All rights reserved.
*/
#include "thread_pool.h"
/*
* Thread function that will wait for work and execute callbacks from callback
* queue when notified
*/
static void
gc_thread_func (void *arg)
{
grpc_c_thread_pool_t *pool;
struct grpc_c_thread_t *gcthr... |
/*
mdport.h - Machine Dependent Code for Porting Unix/Curses games
Copyright (C) 2007 <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 co... |
/* This file is part of clQMC.
*
* Copyright 2015-2016 <NAME>, Universite de Montreal and Advanced Micro Devices, 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://... |
#include "drawing.h" //contain all drawing functions and macro
#include "types.h" //contain custom types
#include "objLoader.h" //contain object loader function (old non-rewrite header file)
#include "settings.h" //contain some global vars
#include <SDL2/SDL.h> //drawing library
//macro for clearing rende... |
/* control.c - User control command processing */
/* Written 1998 by <NAME>, EPFL ICA */
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <atm.h>
#include <atmd.h>
#include "fab.h"
#include "dispatch.h"
#include "swc.h"
#define COMPONENT "COMMAND"
... |
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MIT
*
* Portions created by VMware are Copyright (c) 2007-2012 VMware, Inc.
* All Rights Reserved.
*
* Portions created by <NAME> are Copyright (c) 2009-2010
* VMware, Inc. and <NAME>. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any... |
#include <stdio.h>
#include <math.h>
#include <cpodes/cpodes.h>
#include <cpodes/cpodes_dense.h>
#include <nvector/nvector_serial.h>
#define Ith(v,i) NV_Ith_S(v,i-1)
#define RTOL RCONST(1.0e-8)
#define ATOL RCONST(1.0e-8)
static int f(realtype t, N_Vector y, N_Vector ydot, void *f_data);
static int g(realtype t, ... |
/*
modified version of GMRT_hdr_to_inf from PRESTO by <NAME>.
*/
#include "dsp/infodata.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
static int need_byteswap_st = 0;
static int sb_flag;
static int bitshift = 2;
static char badch[100];
int GMRT_hdr_to_inf(char *datfilenm, infodata * idata)
/* Con... |
#include "demo.h"
#include <unictype.h>
// ¡PROBLEMATIC!
static int
problematic_unicode(char32_t wc){
// surrogates are meaningful only for UTF-16
if(wc >= 0xd800 && wc <= 0xdfff){
return 1;
}
return 0;
}
// planes as of unicode 13.0:
// 0: BMP
// 1: SMP
// 2: SIP
// 3: TIP
// 14: SSPP
// 15: SPUAP
//... |
/* $NetBSD: linux_socketcall.c,v 1.19 1999/03/25 04:26:45 sommerfe Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> and <NAME>.
*
* Redistribution and use in source and binary forms,... |
/**
Copyright (C) 2005 <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, copy,
modify, me... |
#include "resolv.h"
#include "../include/crux/hub.h"
#include "../include/crux/err.h"
#include "../include/crux/def.h"
#include "../include/crux/net.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include <assert.h>
int
xresolv_new(struct xresolv **rp, const struct xresolv_config *cf... |
#include "driver/gpio.h"
#include "esp_err.h"
#include "error.h"
#include "lcd.h"
#include "lcd_driver.h"
static const char *TAG = "lcd_direct";
static uint16_t data_mask_clear = 0;
static uint16_t data_mask_set[256] = {0};
static uint16_t lcd_driver_read_id(const lcd_dev_t *dev);
static esp_err_t lcd_driver_set_d... |
/*++
Copyright (c) 1995 Microsoft Corporation
Module Name:
Nds.h
Abstract:
This defines the necessary NDS data structures and
symbolic constants for both kernel and user mode
components.
Author:
<NAME> [CoryWest] 08-Jan-1996
Revision History:
--*/
//
// NDS Ac... |
#pragma once
#include "memory.h"
#include "display.h"
#include "types.h"
#include "common.h"
#include "arg_defs.h"
#include "events.h"
#include "cmdline.h"
#define CPU_CLOCK_SPEED (1 << 22) //4194304
#define CPU_CLOCKS_PER_MS (CPU_CLOCK_SPEED / 1000.0f)
#define CPU_CLOCKS_PER_LINE (DISPLAY_MS_PER_LINE * CPU_CLOC... |
/*
* Author: <NAME>.
* Fecha/Date: 28 de Septiembre de 2010/September 28th 2010.
* Redes de Computadora / Computer networks.
* Description: This application contains the server functionality
* to send/receive files through C-like sockets by using
* TCP/UDP packages.
*/
#include <sys/types.h>
#include <sys/socket.... |
/*
* check_events.c - show event encoding
*
* Copyright (c) 2009 Google, Inc
* Contributed by <NAME> <<EMAIL>>
*
* 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, i... |
/* SPDX-License-Identifier: MIT */
/*
* Description: basic madvise test
*/
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
#include "liburing.h"
#define FILE_SIZE (128 * 1024)
#de... |
#include <stdint.h>
#include <stdio.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <xtables.h>
#include <linux/netfilter/xt_tcpudp.h>
enum {
O_SOURCE_PORT = 0,
O_DEST_PORT,
};
static void udp_help(void)
{
printf(
"udp match options:\n"
"[!] --source-port port[:port]\n"
" --sport ...\n"
" match source por... |
/*
cdecode.c - c source to an rcnb encoding algorithm
This is part of the librcnb project, and has been placed in the public domain.
For details, see https://github.com/rikakomoe/librcnb
*/
#include <rcnb/cdecode.h>
#include <rcnb/rcnb.h>
int find(const wchar_t* const arr, const unsigned length, const wchar_t target... |
//
// Created by YangYongbao on 2017/3/18.
//
#include "uart_log.h"
#include "stm32f10x.h"
#include "stm32f10x_conf.h"
void uart_log_init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
USART_InitTypeDef USART_InitStructure;
RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOB, ENABLE);
RCC_APB1PeriphClockCmd( ... |
/*
Copyright (c) 2010 <NAME> <<EMAIL>>
Copyright (c) 2010 Center for Bioinformatics, University of Hamburg
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 cop... |
#include <net/dns.h>
#include <arpa/inet.h>
#include <inttypes.h>
#include <net/logging.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
static uint16_t dns_id = 1;
int dns_lookup(net_interface_t* interface, const char* domain, uint8_t ip[4])
{
memset(ip, 0, 4);
dns_header_... |
/*!
* \file
* \brief Spectrometer Click example
*
* # Description
* This Click is an 11-channel spectrometer for spectral identification and color matching. The
* spectral response is defined in the wavelengths from approximately 350nm to 1000nm. 8 optical
* channels cover the visible spectrum, one channel c... |
// SPDX-License-Identifier: GPL-2.0-only
/*
* Qualcomm Wireless Connectivity Subsystem Iris driver
*
* Copyright (C) 2016 Linaro Ltd
* Copyright (C) 2014 Sony Mobile Communications AB
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*/
#include <linux/clk.h>
#include <linux/kernel.h>
#includ... |
#include <stdio.h>
#include <stdlib.h>
#include "seduce.h"
//#define S_TRANSLATION_UTIL
//#define S_TRANSLATION_TEST
typedef struct{
char *text;
uint checksum;
}SeduceLine;
SeduceLine *seduce_translate_data_base = NULL;
uint seduce_translate_data_base_count = 0;
uint seduce_translate_data_base_allocated = 0;
ch... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct FrequencyInfoT
{
short base,max,bus;
} FrequencyInfo;
typedef struct FeatureInfoT
{
unsigned int part1,part2;
unsigned int familyModelStepping;
unsigned ProcCNT;
} FeatureInfo;
typedef enum FeatureNameT
{SSE3=0,PCLMULQDQ,DTES64,MONITOR,D... |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include "hal/soc/soc.h"
#include "ringbuf.h"
#include "rtos_pub.h"
#include "error.h"
#include "drv_model_pub.h"
#include "uart_pub.h"
#define MAX_UART_NUM 2
#define UART_FIFO_SIZE 256
enum _uart_status_e
{
_UART_STATUS_CLOSED = 0,
_UART_STATU... |
/*
* in this bench we do the following:
* for each word1 in the huge word list:
* generate a random sentence formed by: word_1 as a prefix, and concatenate two random words
* word2, word3, seperated by white space
* for each word_1 in the huge word list:
* find the sentence of the word:
* ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.