text stringlengths 3.12k 18.7k |
|---|
/***********************************************************************
*
* Copyright (c) Global PC 1998 -- All Rights Reserved
*
* GLOBAL PC CONFIDENTIAL
*
* PROJECT: Socket
* MODULE: PPP Driver
* FILE: chap_ms.c
*
* AUTHOR: <NAME>: October 6, 1998
*
* ROUTINES:
* Name Des... |
/*
* Copyright (c) 2016 <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, merge, p... |
/*
% [delta,h,alpha] = iswnbr(vSQR,thetaSQR)
% ISWNBR Checks feasibility w.r.t. wide region/neighborhood of Sturm-Zhang.
%
% SEE ALSO sedumi
% ********** INTERNAL FUNCTION OF SEDUMI **********
function [delta,h,alpha] = iswnbr(vSQR,thetaSQR)
% This file is part of SeDuMi 1.1 b... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy,... |
/*
* Copyright (c) 2017 Intel Corporation
*
* 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, p... |
/*
* Copyright 2012 <NAME>
* Copyright 2013-2015 <NAME> <<EMAIL>>
* Copyright 2015 <NAME> <<EMAIL>>
*
* This file is part of AirSpy (based on HackRF project).
*
* 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 Fr... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2015 <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, ... |
#include <string.h> /* memset */
#include "common.h"
#include "constants.h"
#include "objectMemory-objects.h"
#include "objectMemory-gc-remembered.h"
#include "objectMemory.h"
#include "objectMemory-smallIntegers.h"
// An object is represented in memory as an array of OPs/integers.
//
// The structure of an object: ... |
/*
* repos_diff_summarize.c -- The diff summarize editor for summarizing
* the differences of two repository versions
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTIC... |
/*
# _____ ___ ____ ___ ____
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License ve... |
// vim: noet sw=4 ts=4:
/*
==================================================================================
Copyright (c) 2020 Nokia
Copyright (c) 2020 AT&T Intellectual Property.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Lic... |
/*-------------- Telecommunications & Signal Processing Lab ---------------
McGill University
Routine:
AFILE *AFsetRead(FILE *fp, int Ftype, const struct AF_read *AFr,
enum AF_FIX_T Fix)
Purpose:
Set up the parameters in an audio file structure for input files
Desc... |
/*
pblhttst.c - hash table test frame
Copyright (C) 2002 - 2007 <NAME>
This file is part of PBL - The Program Base Library.
PBL is free software.
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
t... |
/* Rooms */
#include "locs.h"
#include <string.h>
Loc locs[NumLocs];
void init_locs()
{
int i = 0;
// Init exits for all locs
memset( locs, NumLocs, sizeof( Loc ) * NumLocs );
// Mar
locs[0].desc = "Buceando en el mar. Disfrutas de las paredes de roca, "
"corale... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 CNES
*
* 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,... |
/*
* Copyright © 2014 Intel Corporation
*
* 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... |
/*
* 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... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <string.h>
#include "util.h"
int main(void)
{
double gain[6], c[50], dc[50], area[50], darea[50];
double ac, dac, eg, deg, aeg, daeg, eff, w;
float deff = 0.0f, pars[10];
int meff, i, j[50], j1, j2;
int nc, iorder, ... |
#include "toolsv2.h"
#include <time.h>
#include <sys/time.h>
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FERRAMENTAS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
double wtime() {
struct timeval t;
gettimeofday(&t, NULL);
return t.tv_sec + (double) t.tv_usec / 10... |
/*
* Copyright (c) 2020 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, dis... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hmap.h"
static unsigned Coeff1 = DEFAULT_COEFF;
/******** STRUCTS AND TYPEDEFS *********/
typedef struct node_struct {
struct node_struct *next;
char *key;
VAL_TYPE val;
unsigned hval;
} NODE;
typedef struct {
NODE *members;
... |
#include <ulver.h>
/*
This is the hub, it schedules coroutines
using libuv. It is spawned when needed (on new coro creation or libuv call)
and dies when no more coroutines and events are running
Once the hub is spawned it is responsable for managing the whole
ulver thread.
*/
s... |
/* expr.c : evaluates simple arithmetic expressions */
/*
* Written in 2019 by <NAME> <<EMAIL>>
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.... |
/***************************************************************************//**
@file instr.c
@author <NAME>
@date Created Thursday, 21 January 2016
@brief Functions for reading and writing virtual machine instructions.
@copyright Copyright (c) 2016, <NAME>. Released und... |
/* um_lat_jitter.c */
/*
Copyright (c) 2021-2022 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 source code example is provided by Informatica ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <mpi.h>
#include "chains.h"
#define CVECTOR_LOGARITHMIC_GROWTH
#define HASH_LENGTH 20
#include "c-vector/cvector.h"
#define MASTER_ID 0
#define SWAP(a, b) \
{ \
typeof(a) t; \
t = a; \
a = b... |
/* Instruction printing code for the OpenRISC 1000
Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
Contributed by <NAME> <<EMAIL>>.
Modified from a29k port.
This file is part of the GNU opcodes library.
This library is free software; you can redistribute it and/or modify
it under the t... |
#include <math.h>
#include <stdio.h>
#include "util.h"
#include "token.h"
#include "database.h"
#include "postings.h"
/* 将类型inverted_index_hash/value和postings_list也用于检索 */
typedef inverted_index_hash query_token_hash;
typedef inverted_index_value query_token_value;
typedef postings_list token_positions_list;
typedef... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2007-2010 coresystems GmbH
* Copyright (C) 2011 The ChromiumOS Authors. 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 Fr... |
/*
* YDLIDAR SYSTEM
* YDLIDAR STM32F407VG
*
* Copyright 2019 Gachon University, TAKE OUT, Development Group, electric engineering, <NAME>.
*
*/
#include "YDLidar.h"
#include <math.h>
#include "main.h"
#include "stm32f4xx_hal_uart.h"
static UART_HandleTypeDef huart3;
static UART_HandleTypeDef huart6;
// ask... |
/*************************************************************************/
/* tcp_client.c */
/*************************************************************************/
/* Simple TCP Echo Client Example */
/* Sends any num... |
#define R_NO_REMAP
#include <R.h>
#include <Rversion.h>
#include <Rinternals.h>
#include "coerce.h"
#include "conditions.h"
#include "utils.h"
void copy_names(SEXP from, SEXP to) {
if (Rf_length(from) != Rf_length(to))
return;
SEXP names = Rf_getAttrib(from, R_NamesSymbol);
if (Rf_isNull(names))
return;... |
/* Copyright (c) 2013, <NAME> <bora<EMAIL> at gmail dot 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 source code must retain the above copyright notic... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
/* MN10300 Miscellaneous helper routines for kernel decompressor
*
* Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Modified by <NAME> (<EMAIL>)
* - Derived from arch/x86/boot/compressed/misc_32.c
*
* This program is free software; you can re... |
#include <stdio.h>
#include <stdlib.h>
struct process
{
int id;
int arrivalTime;
int burstTime;
int completionTime;
int turnAroundTime;
int waitingTime;
int responseTime;
int flag;
};
void showConclusions(struct process *ptr, int len);
void acceptProcessesData(struct process *ptr, int ... |
/* $OpenBSD: uuid.c,v 1.4 2010/06/27 18:19:36 martinh Exp $ */
/*
* Copyright (c) 2002, Stockholms Universitet
* (Stockholm University, Stockholm Sweden)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditio... |
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENS... |
#include <klingklang/ui/window.h>
#include <klingklang/str.h>
#include <klingklang/util.h>
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include <xcb/xcb_icccm.h>
#include <cairo.h>
#include <cairo-xcb.h>
#ifdef HAVE_XCB_ICCCM_PREFIX
# define xcb_set_wm_protocols xcb_icccm_set_wm_protocols
#endif
#define KK_WIN... |
#include <Python.h>
#include <frameobject.h>
#include <seccomp.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <ucontext.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>... |
/*
* foo-tools, a collection of utilities for glftpd users.
* Copyright (C) 2003 Tanesha FTPD Project, www.tanesha.net
*
* This file is part of foo-tools.
*
* foo-tools 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 Soft... |
#include "auxiliary.h"
#include "usb.h"
#include "usb_config.h"
#include "descriptors.h"
#include "platforms.h"
#include <stdint.h>
#include <avr/interrupt.h>
/* current USB configuration chosen by host (0 means no config chosen yet) */
static volatile uint8_t usb_current_conf = 0;
static volatile bool usb_sleeping =... |
//
// E1000 hardware definitions: registers and DMA ring format.
// from the Intel 82540EP/EM &c manual.
//
/* Registers */
#define E1000_CTL (0x0000) /* Device Control Register - RW */
#define E1000_EERD (0x0014) /* EEPROM Read - RW */
#define E1000_ICR (0x00C0) /* Interrupt Cause Read - R */
#define... |
#define __GMP_NO_ATTRIBUTE_CONST_PURE
#include <gmp.h>
#include <setjmp.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#define BIGINT_LIBRARY "GMP"
typedef mpz_t z_t;
static z_t _0, _1, _a, _b;
static FILE *_fbuf;
static gmp_randstate_t _randstate;
static inline void
zsetup(jmp_... |
/**
* @file pata_device.c
*
*/
/* PowerOS, Copyright (C) 2014. All rights reserved. */
#include "pata_private.h"
#include "ports.h"
#include "residents.h"
#include "ata.h"
#include "hw.h"
#define DEVICE_VERSION_STRING "\0$VER: pata.device 0.1 ("__DATE__")\r\n";
#define DEVICE_VERSION 0
#define DEVICE_REVISION 1
... |
// Google BSD license http://code.google.com/google_bsd_license.html
// Copyright 2012 Google Inc. <EMAIL>
//
// This "main" connects the debugger to our socket management backend.
//
#include <getopt.h>
#include <errno.h>
#include <regex.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib... |
/* **********************************************************
* Copyright (c) 2020 Google, Inc. All rights reserved.
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modifi... |
/*
* Acess2 - URI Parser and opener
* By <NAME> (thePowersGang)
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <uri.h>
// === STRUCTURES ===
struct sURIFile
{
void *Handle;
int Mode;
tURIHandler *Handler;
int CurBlockOffset;
char Buffer[];
};
// === PROTOTYPES ===
... |
/* $ReOpenLDAP$ */
/* Copyright 1999-2018 ReOpenLDAP AUTHORS: please see AUTHORS file.
* All rights reserved.
*
* This file is part of ReOpenLDAP.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
*
* A copy... |
/*- Minitar taken from libarchive examples.
* This file is in the public domain.
* Do with it as you will.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <archive.h>
#include <archive_entry.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static void c... |
/*
Copyright (c) 2016, Dust Networks. All rights reserved.
* 16-bit lptimer is on pin DP2/GPIO21
* Typical test flow is:
1) set mode, one-shot, polarity, events
2) open lptimer
3) set compare register
4) enable lptimer
5) wait for events and/or revire counter/capture regi... |
/*
* Copyright (c) 2005, 2008 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* ... |
/*
* Copyright (c) Regents of The University of Michigan
* See COPYING.
*/
#include "config.h"
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <assert.h>
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <uni... |
//STATIC_LINKED_LIST
//https://github.com/L-F-Z/ADT_Code
//Developed by UCAS ADT_Code Group
//
//!!!!!本代码可能不稳定,请等待更新!!!!!
//
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
//----------|Status|-----------
typedef int Status;
#define TRUE 1
#define FALSE 0
#define OK 1
#define E... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "init.h"
#include "utils.h"
#ifdef WIRINGPI
// #include "led.h" //NOTE: include this only if on RPi.
#endif
void init(GPS_Actions* GPSHandler, FullGPSData* gpsData, Zone_general* zone, Log_Master* logMaster, Edge** edges){
/**
* TODO: Error check... |
#include <onnc/Runtime/operatorMKLDNN/conv.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
mkldnn_engine_t engine;
mkldnn_stream_t stream;
static inline bool next_dim(int32_t ndim, int32_t * restrict dim,
const int32_t * restrict dim_max) {
do {
ndim = ndim - 1;
... |
#ifndef lint
static char SccSID[] = "@(#)peanoscan.c 1.2 7/27/88";
#endif
/*
Copyright 1988 <NAME> and <NAME>.
No part of this software may be distributed or sold without the prior
agreement of Prof. <NAME>, Dept. of Psychiatry, NYU School of
Medicine, 550 1st Ave., New York, New York, 10016.
*/
#include <stdio.h>
... |
/*
Copyright 2018 <NAME> <<EMAIL>> @jshuf
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 distributed in the h... |
/*
Copyright (c) 2008-2009, <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... |
/**
* \file
*
* \brief Main functions
*
* Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
*
* \asf_license_start
*
* \page License
*
* Subject to your compliance with these terms, you may use Microchip
* software and any derivatives exclusively with Microchip products.
* It is your ... |
/*
* Copyright (c) 2015 MediaTek Inc.
* Author: <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be u... |
#include <stdio.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <cpuid.h>
#include <perf_counter.h>
#if defined(USE_MKL)
#include <mkl_cblas.h>
#elif defined(USE_OPENBLAS)
#include <cblas.h>
#elif defined(USE_BLIS)
#include <blis/blis.h>
#else
#err... |
/*
* BSD 3-Clause License
*
* Copyright (c) 2021, Northern Mechatronics, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above c... |
/*
Copyright (c) 2016, prpl Foundation
Permission to use, copy, modify, and/or distribute this software for any purpose with or without
fee is hereby granted, provided that the above copyright notice and this permission notice appear
in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRA... |
//2011B4A7680P and 2011B4A7658P
#include <stdio.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <strings.h>
#include <pthread.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#define MAX_BUF 80
socklen_t addrlen, len;
pthread_mutex_t mlock = PTHREAD_MUTEX_INITIALIZER... |
//#importante:
//Essas coisas não pertencem ao sheel e irão
//para os lugarem que darão suporte ao terminal;(console)
#include "sh.h"
/*
***************************************************
* shellInsertNextChar:
* Coloca um char na próxima posição do buffer.
* Memória de vídeo virtual, semelhante a vg... |
/*
* Copyright (c) fG!, 2011, 2012, 2013 - <EMAIL> - http://reverse.put.as
* All rights reserved.
*
* Original code from "onyx-the-black-cat". Modified by <NAME> (@enzolovesbacon).
*
* Copyright (c) 2013, <NAME> (@enzolovesbacon)
* All rights reserved.
*
* Redistribution and use in source and binary forms, wit... |
/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... |
//===========================================================================
//
// k_tan.c
//
// Part of the standard mathematical function library
//
//===========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
/... |
/**
* @file explode.c
* @author <NAME> <<EMAIL>>
*
* @section LICENSE
*
* 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... |
#include "type.h"
#include "eeos_pipe.h"
#include "mutex.h"
#include "task.h"
#include "sem.h"
#define NR_PIPE 8
#define MIN_PIPE_NO 3
#define MAX_PIPE_NO (MIN_PIPE_NO + NR_PIPE)
#define PIPE_HANDLE(fd) ((fd-MIN_PIPE_NO)>>0x01)
#define IS_VALID(fd) (fd >= MIN_PIPE_NO && fd < MIN_PIPE_NO+(NR_PIPE<<1))
#define ... |
/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... |
/* ---------------------------------------------------------------------------
ruby_carray.c
This file is part of Ruby/CArray extension library.
Copyright (C) 2005-2020 <NAME>
---------------------------------------------------------------------------- */
#include "carray.h"
#include "version.h"
#ifdef HAVE... |
#include <stm32f4xx.h>
#include "UART.h"
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include "ADC.h"
void init_USART(void)
{
unsigned char i1,i2;
SystemCoreClockUpdate();
RCC->AHB1ENR|=RCC_AHB1ENR_GPIODEN; //usart port clock enable
USART_PORT->MODER&=~( //clear pin function bits... |
/*
* Copyright (c) 2013 - 2014, Freescale Semiconductor, 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:
*
* o Redistributions of source code must retain the above copyright notice, th... |
/*
*
* ===================================
* HARP | Host ATM Research Platform
* ===================================
*
*
* This Host ATM Research Platform ("HARP") file (the "Software") is
* made available by Network Computing Services, Inc. ("NetworkCS")
* "AS IS". NetworkCS does not provide maintenance, i... |
/*
* mpu6050.c
*
* Created on: 11 Jun 2018
* Author: PRUEK
*/
#include"mpu6050.h"
static inline unsigned short inv_row_2_scale(const signed char *row);
static inline unsigned short inv_orientation_matrix_to_scalar(const signed char *mtx);
static inline int run_self_test(void);
void mpu6050_init ()
{
sta... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "../port/error.h"
#include "io.h"
#include "devtab.h"
#include "ether.h"
enum { /* 83C584 Bus Interface Controller */
Msr = 0x00, /* Memory Select Register */
Icr = 0x01, /* Interface Configuration Register *... |
#include <sys/compiler.h>
#include <sys/cpu.h>
#include <sys/mman.h>
#include <asm/udis86.h>
#include <asm/atomic_mov64.h>
#include <asm/cache.h>
#include <asm/instr.h>
#include <mem/page.h>
#include <mach-o/dyld.h>
#include <mach/mach_init.h>
#include <mach/vm_map.h>
#include <mach/error.h>
#include <mach/mach_error... |
/* $Id$ */
/*
* Copyright (c) 2003-2009 <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... |
/* $NetBSD: ldd_elfxx.c,v 1.6 2012/07/08 00:53:44 matt Exp $ */
/*-
* Copyright (c) 1998, 2000 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
* mod... |
#include <modules/snake/snake_actor.h>
#include <modules/snake/apple_actor.h>
#include <modules/snake/background_actor.h>
#include <modules/snake/input_processor.h>
#include <modules/snake/macros.h>
#include <modules/snake/sprite.h>
#include <modules/snake/engine.h>
#include <modules/snake/actor.h>
void snake_render_h... |
/**
* Copyright (c) 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 con... |
/* sampleCodeModule.c */
#include "../lib.h"
#include <stdint.h>
#include <math.h>
typedef int (*EntryPoint)();
#define X_INC 8
#define Y_INC 16
#define LOG_W 255
#define LOG_H 100
static char * regis[17] = {"rax","rbx","rcx","rdx","rbp","rsp","rsi","rdi","r8","r9","r10","r11","r12","r13","r14","r15", "rip"};
stat... |
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (C) 2008 <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 abov... |
#include "CoreSerialUart1Dma.h"
#include "SystemUtil.h"
/*DMA结构体*/
static DMA_InitTypeDef DMA_InitStructure;
uint8_t dmaTransFirstFlag = 1;
/**初始化 */
void CoreSerialUart1DmaInit(uint32_t bpsSet)
{
//gpio初始化
GPIO_InitTypeDef GPIO_InitStructure;
//串口初始化结构体
USART_InitTypeDef USART_InitStructure;
//中... |
/* $OpenBSD: macepcimap.c,v 1.3 2004/09/09 22:11:39 pefo Exp $ */
/* $NetBSD: pci_mace.c,v 1.2 2004/01/19 10:28:28 sekiya Exp $ */
/*
* Copyright (c) 2001,2003 <NAME>
* Copyright (c) 2000 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... |
/*
* Copyright (c) 2006
* Protium Computing, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this lis... |
/*
workday.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <assert.h>
enum exit_codes {
SUCCESS = 0,
FILE_READ_FAILURE = 1,
FILE_WRITE_FAILURE = 2,
NO_MEMORY_ERROR = 3,
ILLEGAL_OPERATION = 4,
ILL... |
#include "stdio.h"
static const char *atom[] = {
"#000000",
"#fc5ef0",
"#87c38a",
"#ffd7b1",
"#85befd",
"#b9b5fc",
"#85befd",
"#dfdfdf",
"#000000",
"#fc5ef0",
"#94f936",
"#f5ffa7",
"#96cbfe",
"#b9b5fc",
"#85befd",
"#dfdfdf",
[255] = 0,
/* more colors ... |
#include "gb.h"
#include <time.h>
static inline uint8_t int_to_bcd(uint8_t i)
{
return (i % 10) + ((i / 10) << 4);
}
static inline uint8_t bcd_to_int(uint8_t i)
{
return (i & 0xF) + (i >> 4) * 10;
}
/*
Note: This peripheral was never released. This is a hacky software reimplementation of it that allows
... |
#include <stdio.h>
#include <ctype.h>
#include <sys/stat.h>
#define PNG_sRGB_PROFILE_CHECKS 1
#include <png.h>
#include <tensorflow/c/c_api.h>
typedef struct {
float *data;
int width;
int height;
int channels;
} image_t;
static void
free_tensor(void *data, size_t len, void *arg) {
free(data);
}
static voi... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include"mystring.h"
#include"atom.h"
#define BOHR 0.5291772083
#define ENERGY 0
#define OPTIMIZE 1
#define IRC 2
#define HESSIAN 3
#define SADPOINT 4
#define GRADIENT 5
#define min(x,y) x < y ? x : y
int calc;
int natom;
char *read_line(FILE... |
/*
* uuidparse.c --- Interpret uuid encoded information. This program
* violates the UUID abstraction barrier by reaching into the
* guts of a UUID.
*
* Based on libuuid/src/uuid_time.c
* Copyright (C) 1998, 1999 <NAME>.
*
* All alterations (C) 2017 <NAME>
* The 3-Clause BSD License
*
* Redistribution and u... |
#include "common.h"
unsigned int seqno;
// PKS, pthread_self() = pointer to memory
#define NETLINKID() ((getpid() << 16) | gettid())
typedef int (*netlink_cb_t)(struct nlmsghdr *nh, void *data);
/*
* Open a netlink socket. Maybe in the future we'll support another type.
*/
int netlink_socket(int type)
{
int fd ... |
/*
Firmware para PIC18F4431 do Robo Hachiko da equipe FEG-Robotica
Data da Ultima atualizacaoo 26/05/2018
Responsavel atual: <NAME>
Versao 1.0
*/
#include<18f4431.h> //Adiciona biblioteca referente ao microcontrolador adequado(PIC15F4431)
#device adc=10 //Define a resolucao do conversor A/D do microcontrolador
... |
/**
*
* [aobench]
* https://code.google.com/p/aobench/
* real world floating point benchmark
*
* $ gcc -std=gnu99 -Wall --pedantic-errors -o aobench aobench.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#define WIDTH 256
#define HEIGHT 256... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <epoxy/gl.h>
#include <epoxy/glx.h>
#include <GLFW/glfw3.h>
#include "LoadData.h"
#include "loadJsonConfig.h"
#include "ExternLinAlg.h"
int modelCount;
struct model *models;
struct font myfont;
int starCount;
float* stars;
GLuint star_buffer;
double ma... |
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "misc.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
#define TABSIZE 256
#define TABMASK (TABSIZE - 1)
#define PERM(x) perm[(x) & TABMASK]
#define INDEX(ix, iy, iz) PERM((ix) + PERM((iy) + ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.