text stringlengths 3.12k 18.7k |
|---|
#include "prices.h"
#include <time.h>
#include <unistd.h>
#ifdef BUILD_GAMESCC
#include "../rogue/cursesd.h"
#else
#include <curses.h>
#endif
#define SATOSHIDEN ((uint64_t)100000000L)
#define issue_curl(cmdstr) bitcoind_RPC(0,(char *)"prices",cmdstr,0,0,0)
extern int64_t Net_change,Betsize;
int random_tetromino(stru... |
/*********************************************************************************************
___ _ ___ _____ ___
| _`\ ( ) ( _`\(_ _)( _`\
| (_) ) _ ___ | |/') | (_(_) | | | (_(_)
| , / /'_`\ /'___)| , < | _)_ | | `\__ \
| |\ \ ( (_) )( (___ | |\... |
/***************************************************************************
* Project : shakti devt board
* Name of the file : weatherstation.c
* Brief Description of file : A sample project to demonstrate
integration of temperature sensor
... |
/*
This code simulates a site percolation model on a (bounded) square
lattice using an algorithm proposed in a paper by Newman and Ziff[1].
The algorithm can also be used for bond percolation, but this code
is for site percolation.
There are essentially three steps to the algorithm:
1) For every site in the model, f... |
/* Copyright 2018 Canaan 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 applicable law or agreed to in ... |
/*
* Copyright 2016 Google 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 applicable law or agreed to... |
#include "impi_host.h"
#include "impi_common.h"
#include "impi_tcp.h"
#include "impi_client.h"
#include "impi_router.h"
#undef IMPI_MODULE_NAME
#define IMPI_MODULE_NAME "Host"
int IMPI_Export_packets(IMPI_Conn conn)
{
IMPI_Packet impi_packet;
// IMPI_Packet impi_ackpkt;
int src_comm_lrank;
int dest_grank... |
/*
Copyright (c) 2012-2013, The Saffire Group
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 list of conditi... |
/*
* Copyright (c) 2012 The Native Client 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 <stdio.h>
#include <stdlib.h>
#include "native_client/src/include/portability.h"
#include "native_client/src/shared/platform/na... |
/***************************************************************************//**
* @file
* @brief MVP add kernel driver.
*******************************************************************************
* # License
* <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
************************************... |
/*
MPL115A1 SPI Digital Barometer Test Code
Created on: April 20, 2010
By: <NAME> - jim at sparkfun.com
This is a simple test program for the MPL115A1 Pressure Sensor (SPI version).
UBRR0 is set to 51 and U2X0 is not set, so the baud rate will be 9600@8MHz and 19200@16MHz.
Press the spacebar to get the p... |
/*
* Routines used in calculating least squares solutions in a
* nonlinear model in nls library for R.
*
* Copyright 1999-2001 <NAME>
* <NAME>
*
* Copyright 2005--2016 The R Core Team
* Copyright 2006 The R Foundation
*
* This program is free software; you can redistribute it and... |
/*! \page License
* Copyright (C) 2009, H&D Wireless AB 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 li... |
/*
FreeRTOS.org V5.3.0 - Copyright (C) 2003-2009 <NAME>.
This file is part of the FreeRTOS.org distribution.
FreeRTOS.org 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 Foundation and modified by th... |
#include <stdio.h>
#include <string.h>
#include "papi.h"
#include "do_loops.h"
#include "papi_test.h"
static int total = 0; /* total overflows */
static long long values[2];
static long long rapl_values[2];
static long long old_rapl_values[2] = {0,0};
static int rapl_backward = 0;
static long long before_time, af... |
/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is property of Nordic Semiconductor ASA.
* Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
*
* Licensees are granted free, non-transferable use... |
/*
* Test srcdest table for correctness.
*
* Copyright (C) 2017 by <NAME> & <NAME>,
* Open Source Routing / NetDEF Inc.
*
* This file is part of FRRouting (FRR)
*
* FRR is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as publis... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdbool.h>
#include "hash_table.h"
#include "prime.h"
#define HT_PRIME_1 151
#define HT_PRIME_2 157
#define HT_INTIAL_BASE_SIZE 50
static ht_pair HT_DELETED_PAIR = {NULL, NULL};
static dll DL_EMPTY_LIST = {NULL, NULL};
static voi... |
/**
* Copyright (c) 2017, Infineon Technologies AG ("contributors")
*
* 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... |
/**
* @file vhd.c
* @author <NAME>
* @copyright MIT License. See Copyright Notice in LICENSE.txt
*/
#include "vhd.h"
#include <stdlib.h>
uint32_t vinil_checksum_vhd_footer(VinilVHDFooter* vhd_footer) {
unsigned char* buffer;
buffer = (unsigned char*)vhd_footer;
uint32_t temp_checksum = vh... |
/* ==== MLWORKS EMACS SERVER ====
*
* Copyright 2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
* 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... |
#include "sis_modules.h"
#include "worker.h"
#include "server.h"
#include "sis_method.h"
#include "sisdb_rsdb.h"
#include "sisdb.h"
#include "sisdb_server.h"
#include "sisdb_collect.h"
///////////////////////////////////////////////////
// *** s_sis_modules sis_modules_[dir name] *** //
//////////////////... |
/*****************************************************************************
* Product: User Interface with State-Local Storage Example
* Last Updated for Version: 4.5.00
* Date of the Last Update: May 18, 2012
*
* Q u a n t u m L e a P s
* ---------------------------
* ... |
/*!
* \file
* \brief Verifysig example implementation.
*/
/* system header files */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* epida common files */
#include "epid/common/file_parser.h"
#include "epid/verifier/api.h"
#include "epida_verifysig.h"
#include "util/buffutil.h"
#include "util/convutil... |
/* $NetBSD: wsdisplayvar.h,v 1.25.4.2 2004/06/07 09:47:19 tron Exp $ */
/*
* Copyright (c) 1996, 1997 <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... |
/**
******************************************************************************
* @file system_MDR1986VE3.c
* @author <NAME>
* @version V1.4.0
* @date 27/02/2013
* @brief CMSIS Cortex-M1 Device Peripheral Access Layer System Source File.
********************************************************... |
#include <stdio.h>
#include <cs50.h>
#include <math.h>
// Prototypes
long GetUserInput(void);
bool isValid(long ccnum);
string CheckCardType(long ccnum);
int main(void)
{
// get card number from user input
long cardNumber = GetUserInput();
// Check card validity and type
if (isValid(cardNumber))
... |
/*-
* Copyright (c) 2017 <NAME> <<EMAIL>>
* All rights reserved.
*
* Development sponsored by Microsemi, Inc.
*
* 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 th... |
/* -*- c -*- *****************************************************************
** Copyright (C) 2014 Sandia Corporation
** Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
** the U.S. Government retains certain rights in this software.
**
** This source code is released under the New BSD License.
... |
#include <FreeRTOS.h>
#include <math.h>
#include "gyverLamp.h"
#include "globals.h"
#include "libraries/scale8.h"
#include "libraries/power_mgt.h"
// установка макссимальной яркости
void setMaxBrightness(uint8_t globalBrightness) {
uint8_t recommendedBrightness = calculate_max_brightness_for_power_mW(pixels, LEDS_C... |
int bitAnd(int, int);
int test_bitAnd(int, int);
int getByte(int, int);
int test_getByte(int, int);
int logicalShift(int, int);
int test_logicalShift(int, int);
int bitCount(int);
int test_bitCount(int);
int bang(int);
int test_bang(int);
int tmin();
int test_tmin();
int fitsBits(int, int);
int test_fitsBits(int, int);... |
#include<stdio.h>
#include<stdlib.h>
#include<strings.h>
#include<string.h>
#include<errno.h>
#include<math.h>
#include "parse_time.h"
void errExit(const char* s) {
perror(s);
exit(EXIT_FAILURE);
}
int Max(int x,int y) {
return x >= y ? x : y;
}
int Min(int x,int y) {
return x < y ? x : y;
}
void DumpSoFa... |
/*
* Copyright (C) 2021 Huawei Device Co., 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 ... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the terms found in... |
/*
* Copyright (c) 2008 Stanford University.
* 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 list of c... |
#include "engine.h"
#include "graphe.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
/*
Retourne la position d'un noeud dans le graphe.
Retourne -1 s'il n'y appartient pas.
Un noeud est identifié par ses coordonnées.
*/
int rechercheNoeud(graphe_t * g, int x... |
/**
* \brief Attribute
*
* The file is part of CTX Fryer C target language libraries.
*
* \date 2012/06/29
*
* \author <NAME> <<EMAIL>>
*
* Legal notices
*
* Copyright 2012 <NAME>
*
* CTX Fryer C library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Les... |
/*
* Copyright (C) 2021 <NAME> <<EMAIL>>
*
* license: MIT license
*/
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <sys/sysinfo.h>
#include <netin... |
/*==== Not-a-code ====*/
#define x 0x00
/*==== Control codes ====*/
#define NBSP 0x01
#define SHY 0x02
/*==== Russian cyrillics ====*/
#define CapA 0x10
#define CapB 0x11
#define CapV 0x12
#define CapG 0x13
#define CapD 0x14
#define CapE ... |
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2021 Western Digital Corporation or its affiliates.
* Copyright (c) 2022 Ventana Micro Systems Inc.
*
* Authors:
* <NAME> <<EMAIL>>
*/
#include <sbi/riscv_asm.h>
#include <sbi/riscv_io.h>
#include <sbi/riscv_encoding.h>
#include <sbi/sbi_console.h>... |
#include <m3conf/m3conf_tokenizer.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
enum state_t {
ST_INIT,
ST_ID,
ST_STRCONT,
ST_STRESC,
ST_STR,
ST_NEG,
ST_INT,
ST_WS,
ST_COM
};
const char* const ALPHA = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const char* const NUM = "0123456... |
/*
------------------------------------------------------------------
** Top contributors:
** <NAME> and <NAME>
** This file is part of the ReluVal project.
** Copyright (c) 2018-2019 by the authors listed in the file LICENSE
** and their institutional affiliations.
** All rights reserved.
-------------------... |
#include "main.h"
#include "math.h"
// Team Pororo Robot Operator Control Code
// Copyright (c) <NAME>, 2018
// motor ports
#define L_DRIVE 2
#define R_DRIVE 3
#define INTAKE 4
#define PUNCHER 5
#define ARM 1
// sensor ports
#define ARMPOT 1
// arm constants
#define ARM_MIN 700 // minimum safe posi... |
/*++
/* NAME
/* master 3h
/* SUMMARY
/* Postfix master - data structures and prototypes
/* SYNOPSIS
/* #include "master.h"
/* DESCRIPTION
/* .nf
/*
* Server processes that provide the same service share a common "listen"
* socket to accept connection requests, and share a common pipe to the
* master process to ... |
/*
TODO: 解析表达式 计算表达式的值
*/
#include "expr_parse.h"
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include "dataframe.h"
#include "header.h"
#define STDCAL(type) _cdecl type
#define STACKSIZE 200
typedef enum __exprBool
{
exprFalse,
exprTrue,
}exprBool;
typedef struct __TRstack
{
char stack[STACKSIZE];
... |
/* Dia -- an diagram creation/manipulation program
* Copyright (C) 1999 <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 option) any ... |
#include <stdio.h>
#include <stdlib.h>
#include "Formigas.h"
FILE *Arq;
void AbrirArquivo(){
Arq = fopen ( "out.txt", "wt" );
if ( !Arq )
printf( "Erro ao abrir o arquivo texto\n" );
}
void DecidirPegarLargar(){
int n, i, j;
double evento;
for ( n = 0; n < FormigasVivas; n++ ){
i = VetFo... |
#include "battery_bar.h"
#include "battery.h"
#include "clay_settings.h"
#include "battery_listener.h"
#include "theme.h"
static ClaySettings *s_settings;
// battery bar layer
static Layer *s_battery_bar_layer;
// temporary variable used for animation
static int s_current_battery_level;
// battery charging animatio... |
/***************************************************************************
Gaelco CG-1V/GAE1 based games
Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
I/O ports)
***************************************************************************/
#include "driver.h"
#include "mach... |
/*************************************************************************
* si_drv_scaler.c
*************************************************************************/
//#define SII_DEBUG
//#include <math.h>
#include "si_datatypes.h"
#include "si_drv_tpg_api.h"
#include "si_lib_obj_api.h"
#include "si_lib_seq_api.h"
... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2017 <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 limitation the rights
* to ... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <pthread.h>
#include <sys/time.h>
#include "read_ppm.h"
pthread_mutex_t mutex;
pthread_barrier_t barrier;
// step 1
void *determine_membership(void* args);
// step 2
void *co... |
/*
* ising_sequential.c
*
* Created on: Dec 14, 2019
* Author: <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 512
// This function will be turned into a cuda kernel.
void spin(int *G, double *w, int *newG, int n) {
// To calculate every new Atomic Spin va... |
/* This is a parser and evaluator for a simple language used to describe the
* mapping loaded into a five input lookup table. The language is a simple
* operator precedence grammar with the following operations:
*
* variables = "A" | "B" | "C" | "D" | "E"
* constants = "0" | "1"
* unary-ops = "~"
* bi... |
/*
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2013 Semtech
Description: Ping-Pong implementation
License: Revised BSD License,... |
/*
* Copyright 2011, <NAME> <<EMAIL>>
*
* 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 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but... |
/******************************************************************************
* system includes
*****************************************************************************/
#include <assert.h>
/******************************************************************************
* libmonitor
**********************... |
/*
* PSVita GUID Tester
* Copyright (C) 2021, <NAME>
*/
#include <psp2kern/kernel/modulemgr.h>
#include <psp2kern/kernel/sysmem.h>
#include <taihen.h>
#define GetExport(modname, libnid, funcnid, func) module_get_export_func(0x10005, modname, libnid, funcnid, (uintptr_t *)func)
int module_get_export_func(SceUID pi... |
/*
* Purpose: Initialize and call mtclim42 routines to estimate meteorological
* variables
* Usage :
* Author : <NAME>
* E-mail : <EMAIL>
* Created:
* Last Changed: Fri Apr 25 11:51:24 2003 by <NAME> <<EMAIL>>
* Notes : Acts as interface between mtclim42 and vic
* Disclaimer: Feel free to use or ad... |
/*! \file netserve.c
*
* netserve: proxy server for stdio.
*
* This daemon connects a network socket to stdio of a local
* application through a pseudo TTY, thus enabling access to the
* application from a telnet client.
*
* Terminating the telnet session does not terminate the application,
* i.e. it is possib... |
/*
* 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... |
/** \mainpage
*
* \tableofcontents
*
* \section LTLSIM
* `ltlsim` is a command line tool for the interactive simulation of
* linear temporal logic (LTL) formulas against time traces. Formulas are
* expressions consisting of boolean operators, temporal operators and
* atomic propositions (called atomics in ... |
#include "kernel/types.h"
#include "kernel/net.h"
#include "kernel/stat.h"
#include "user/user.h"
#define BUFSZ 10240
char buf[BUFSZ];
#define isascii(x) ((x >= 0x00) && (x <= 0x7f))
#define isprint(x) ((x >= 0x20) && (x <= 0x7e))
void
hexdump (void *data, uint size) {
int offset, index;
unsigned... |
/*
* BLAKE2 (RFC 7693) implementation for PuTTY.
*
* The BLAKE2 hash family includes BLAKE2s, in which the hash state is
* operated on as a collection of 32-bit integers, and BLAKE2b, based
* on 64-bit integers. At present this code implements BLAKE2b only.
*/
#include <assert.h>
#include "ssh.h"
sta... |
/*-
* Copyright (c) 2012-2014 <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... |
/*
* wcswrapper.c -- enscripten wrapper functions
*
* <NAME> 10/11/2013 (during the Great Government Shutdown)
*
* The main reasons for writing this module are:
* 1. I couldn't figure out how to call subroutines and fill in indirect args
* 2. I didn't seem to be able to return the wcs struct to javascript
* 3. ... |
//
// Copyright © 2018 PubNative. 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 Software without restriction, including without limitation the rights
// to use, copy,... |
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#define DEBUG 0
#define MAX_LEN 100051
int n;
char first_char;
char com_str[MAX_LEN];
int remain[MAX_LEN];
int k[500];
char * output[500];
int old_pos[500];
void insert_sort(int s[], int len) {
int pos = 0;
while (pos... |
/*
* sexhead1.h
*
* Keyword list for FITS_1.0 catalogue headers.
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
* This file part of: SExtractor
*
* Copyright: (C) 1996-2011 <NAME> -- IAP/CNRS/UPMC
*
* License: GNU General Public License
*
* SExtractor is free software: you can r... |
/* ----------------------------------------------------------------------- *
*
* Copyright 2007-2009 <NAME> - All Rights Reserved
* Copyright 2009 Intel Corporation; author: <NAME>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentat... |
/* $NetBSD: split.c,v 1.1 2011/01/08 18:10:31 pgoyette Exp $ */
/*-
* Copyright (c) 1993 The NetBSD Foundation, 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 ... |
/*
* XDD - a data movement and benchmarking toolkit
*
* Copyright (C) 1992-2013 I/O Performance, Inc.
* Copyright (C) 2009-2013 UT-Battelle, LLC
*
* This 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
... |
//
// Intel Edison Playground
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>... |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "benchmark.pb-c.h"
static void fill_message_message1(Benchmark__Message *message_p,
Benchmark__Message1 *message1_p,
Benchmark__SubMessage *sub_message_p,
... |
/**
* Test the telnet functions.
*
* Perform a test using the telnet functions.
* This code exports two new global functions:
*
* void telnet_listenForClients(void (*callback)(uint8_t *buffer, size_t size))
* void telnet_sendData(uint8_t *buffer, size_t size)
*
* For additional details and documentation see:
... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
typedef struct server {
int listen_fd;
int local_listen_fd;
} server_t;
typedef struct buffer {
void *remote_to_local_buffer;
int rem... |
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
/*
Copyright (c) 2019-2020 <NAME> and <NAME>
See LICENSE file for license details.
*/
// binary gcd; assumes x and y non-zero
static uint32_t gcd(uint32_t x,uint32_t y) {
int k,l;
k = __builtin_ctz(x); x >>= k;
l = __... |
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* wizard:/space/4.3reno/usr/src/lib/libc/stdlib/malloc.c
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use i... |
#include "delta.h"
struct carOffset {
wchar_t* id;
int offset;
};
// tie car IDs to their brake bias offset
struct carOffset carOffsets[] = {
{L"amr_v12_vantage_gt3", -7},
{L"audi_r8_lms", -14},
{L"bentley_continental_gt3_2016", -7},
{L"bentley_continental_gt3_2018", -7},
{L"bmw_m6_gt3", -15},
{L"jaguar_g3", ... |
/*
* Copyright © 2016 Broadcom
*
* 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, dis... |
/* Extended Module Player
* Copyright (C) 1996-2010 <NAME> and <NAME>
*
* This file is part of the Extended Module Player and is distributed
* under the terms of the GNU General Public License. See doc/COPYING
* for more information.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "load.... |
/* Source code for Sopwith
Copyright (c) 1984-2000 <NAME>
Copyright (c) 1999-2001 <NAME>
All rights reserved except as specified in the file license.txt.
Distribution of this file without the license.txt file accompanying is
prohibited.
*/
#define MAX_X 3000 /* Maximum X coordinate ... |
/* $Id$ */
/*
* Copyright (c) 2004-2011 <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, th... |
#include "string.h"
#include <stdio.h>
#include <stdint.h>
#include "gc.h"
#include <stdio.h>
// ........................................................... [v] stringNew
void stringNew_ ( string_t* ID , size_t N )
{
ID->data = (char*) gcRealloc ( ID->data , N * sizeof(char) ) ;
ID->size = 0; ... |
/*****************************************************************************\
** **
** FILE: utils.c **
** AUTHORS: Alexios **
**... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) ... |
/*
* Adapted from iceprog:
* iceprog -- simple programming tool for FTDI-based Lattice iCE programmers
*
* Copyright (C) 2015 <NAME> <<EMAIL>>
* Copyright (C) 2019 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby grante... |
//
// Copyright (c) 2013-2015, <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 limitation the rights
// to use, copy, modify, mer... |
//#include "includes.h"
#include <stdbool.h>
#include <stdint.h>
#include "includes.h"
void BuildRotationMatrix(int x, int y, int z);
float dpsGyroArray[3] = {0.0f, 0.0f, 0.0f};
float geeForceAccArray[3] = {0.0f, 0.0f, 0.0f};
static int32_t gyroSum[3] = {0, 0, 0};
volatile uint32_t gyroCalibrationCycles = GYRO_CAL... |
/*
* GStreamer
* Copyright (C) 2019 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*... |
/**
* @file canola_tests.c
* @author <NAME>
* @date January 23, 2020
* @brief Test modes in Zynq tes firmware for Canola CAN controller
*/
#include "canola_tests.h"
#include "canola_axi_slave.h"
#include "canola.h"
#include "interrupt.h"
#include "gpio.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdi... |
/* -- translated by f2c (version 20100827).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of the com... |
#define _POSIX_C_SOURCE 200809L
#include <getopt.h>
#include <pango/pangocairo.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/un.h>
#include <unistd.h>
#include <wl... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define INFINITY 20
//typedef 别名
//会用到哪些结构体,
//1. 点(x,y,index,bool enable)
//2. 边(start,end,length)
//3. 图(int[n][n]) n -> 点的个数
typedef struct _Vertex { //顶点的数据结构,用 Vertex 代替 struct _vertex
int x;
int y;
int id; //从 0 开始
int available; //是否可用,1... |
/* Copyright (c) 2016 Nicira, 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 applicable law or agreed ... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: RCSL 1.0/RPSL 1.0
*
* Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved.
*
* The contents of this file, and the files included with this file, are
* subject to the current version of the RealNetworks Public Source License
* V... |
#include "debugger/commands.h"
#include "debugger/debugger.h"
#include "disassembler/disassemble.h"
#include "log/log.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
int debugger_list_commands(debugger_state_t *state, int argc, char **argv) {
if (argc != 1) {
... |
// SPDX-License-Identifier: MIT
/* Copyright (C) 2006-2017 Oracle Corporation */
#include <linux/vbox_err.h>
#include "vbox_drv.h"
#include "vboxvideo_guest.h"
#include "hgsmi_channels.h"
/*
* There is a hardware ring buffer in the graphics device video RAM, formerly
* in the VBox VMMDev PCI memory space.
* All gr... |
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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 option) any later version.
*
* This program is d... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "io.h"
#include "ureg.h"
#include "../port/error.h"
#include "../port/netif.h"
#include "etherif.h"
static Ether *etherxx[MaxEther];
void ethermediumlink(void);
Chan*
etherattach(char* spec)
{
ulong ctlrno;
char *p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.