text stringlengths 3.08k 10.5k |
|---|
/*
* aqi.c: Plugin implementing AQI queries
*/
#include <assert.h>
#include <stdlib.h>
#include <curl/curl.h>
#include <nosj.h>
#include <sc-collections.h>
#include <sc-lwt.h>
#include "cbot/cbot.h"
#include "cbot/curl.h"
struct aqi {
struct cbot_plugin *plugin;
const char *token;
int query_count;
};
struct aq... |
/*
* @brief Pin Interrupt example
*
* @note
* Copyright(C) NXP Semiconductors, 2013
* All rights reserved.
*
* @par
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* LPC products. This software is supplied "... |
#include "tstr.h"
// INT_TSTR - 字符串构建的初始化大小
#define INT_TSTR (1<<8)
//
// tstr_expand - 为当前字符串扩容, 属于低级api
// tsr : 可变字符串
// len : 扩容的长度
// return : tsr->str + tsr->len 位置的串
//
char *
tstr_expand(tstr_t tsr, size_t len) {
size_t cap = tsr->cap;
if ((len += tsr->len) > cap) {
// 走 1.5 倍内存... |
//============================================================
//
// sdldir.c - SDL core directory access functions
//
// Copyright (c) 1996-2010, <NAME> and the MAME Team.
// Visit http://mamedev.org for licensing and usage restrictions.
//
// SDLMAME by <NAME> and <NAME>
//
//============================... |
/* culfw driver
*
* Copyright (c) 2014-16 <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... |
/*
Copyright (c) 2002-04, <NAME>
Part of Radeon accelerant
DMA engine handling.
Currently, VID DMA is always used and data is always copied from
graphics memory to other memory.
*/
#include "radeon_driver.h"
#include "mmio.h"
#include "rbbm_regs.h"
#include "dma_regs.h"
#include <string.h>
// this is arbitra... |
#include <stdio.h>
#include <string.h>
#include <sys/iosupport.h>
#include "result.h"
#include "runtime/devices/console.h"
#include "display/gfx.h"
//set up the palette for color printing
static const u32 colorTable[] = {
RGBA8_MAXALPHA( 0, 0, 0), // black
RGBA8_MAXALPHA(128, 0, 0), // red
RGBA8_MAXAL... |
/*
* soccer_sightings.c
* gurobots
*
* Created by <NAME> on 10/09/2020.
* Copyright © 2020 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source cod... |
/*
* $Id: raptor_peek.c,v 1.1 2007/10/18 08:08:29 raptor Exp $
*
* raptor_peek.c - Solaris fifofs I_PEEK kernel memory leak
* Copyright (c) 2007 <NAME> <<EMAIL>>
*
* [Lame] integer signedness error in FIFO filesystems (named pipes) on Sun
* Solaris 8 through 10 allows local users to read the contents of unspeci... |
#include <string.h>
#include "telehash.h"
// direct packets based on type
void peer_send(pipe_t pipe, lob_t packet, link_t link)
{
lob_t open;
link_t router;
if(!pipe || !packet || !link) return;
if(!(router = mesh_linkid(link->mesh, pipe->arg)))
{
LOG("router link not found for %s",pipe->id);
retur... |
/**
* Copyright (c) 2021 <NAME> <u at one u x dot o r g>
*
* 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 ... |
/*
* debug routines
*
* Copyright (c) 1998 <NAME> G1TLH
*
* $Id$
*/
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "debug.h"
#define LOGDIR "./dbg"
static char opened = 0;
unsigned long dbglevel = 0;
static int... |
// os_unix
// The platform specific code for UNIX-likes.
// Mostly POSIX, but might contain some extensions.
//
// Copyright (c) 2019, Adrian "vifino" Pistol <<EMAIL>>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the abov... |
#include <idk/core/common.h>
#include <idk/core/file_system.h>
#include <idk/graphics/batch_renderer.h>
#include <idk/graphics/camera.h>
#include <idk/graphics/primitives_renderer.h>
#include <idk/graphics/sprite_renderer.h>
#include <idk/graphics/shader.h>
#include <idk/graphics/window.h>
#include <idk/tiles/tileset.h... |
// Copyright 2019, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Prober code interfacing to libusb.
* @author <NAME> <<EMAIL>>
* @ingroup st_prober
*/
#include "util/u_debug.h"
#include "util/u_misc.h"
#include "p_prober.h"
#include <stdio.h>
#include <string.h>
int
p_libusb_init(st... |
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <ev.h>
enum sf_reasons {
CLIENT_VAL,
CONNECTED,
RECEIVED,
WRITABLE,
CLOSING
};
enum sf_intances {
SERVER,
CLIENT
};
char *reasonsstr[] = { "CLIENT_VAL",
"CONNECTED",
"RECEIVED",
"WRITABLE",
... |
void match_pb_types_verilog_model_rec(t_pb_type* cur_pb_type,
int num_verilog_model,
t_spice_model* verilog_models);
int verilog_find_path_id_between_pb_rr_nodes(t_rr_node* local_rr_graph,
int src_node,
... |
/* $OpenBSD: display.c,v 1.18 2016/02/01 07:29:25 mestre Exp $ */
/* $NetBSD: display.c,v 1.3 1994/12/09 02:14:13 jtc Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, a... |
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in co... |
/* This file is part of the YAZ toolkit.
* Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
* \file
* \brief get information for abnormal terminated, crashes, etc
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <signal.h>
#include <string.h>
#include <errno.h>
#if HAVE_UNISTD_H
#in... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/*
** Copyright (c) 2009 <NAME>
*/
static const char
PROG_ID[] = "$Id: proj_dms2rad.c,v 5.1 2009/04/30 20:47:47 gie Exp gie $";
/*
** 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 withou... |
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <<EMAIL>> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me... |
/*
* vl_bench.c
*
* Created on: May 29, 2020
* Author: tonglin
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "../commons/h5bench_util.h"
#include "../commons/async_adaptor.h"
#define ERROR_RETURN ... |
#include <stdio.h>
#include <stdlib.h>
// Yatak kapasitesi.
const int KAPASITE = 10;
// Yatak veri tipi.
typedef struct yatak{
int no;
const char * isim;
struct yatak * sonraki;
} yatak;
// Fonksiyon tanımlamaları
void yatir(const char *);
void taburcuEt(const char *);
void yatakOlustur(int);
void dolula... |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <errno.h>
#include "trace_buffer.h"
#define NSTEPS (100)
#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
#define mix(a,b,c) \
{ \
a -= c; a ^= rot(c, 4); c += b; \
b -= a; b ^= rot(a, 6); a += c; \
c... |
#include <u.h>
#include <libc.h>
#include <auth.h>
#include <authsrv.h>
#include <mp.h>
#include <libsec.h>
#include <string.h>
#include <thread.h> /* only for 9p.h */
#include <fcall.h>
#include <9p.h>
#pragma varargck type "N" Attr*
enum
{
Maxname = 128,
Maxrpc = 4096,
/* common protocol phases; proto-specific ... |
/*
* Created by: EH
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <WS2tcpip.h>
struct store {
char buffer[1024];
char name[1024];
int size;
int bytesRecvd;
};
int getSize(char* filename) {
FILE* fptr;
int out = 0;
if ( (fptr = fopen(filename, "rb")) == NULL ) {
return 1;
... |
/*
* Copyright (c) 2013 Qualcomm Atheros, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source code ... |
/** Handling for cast nodes
* @file
*
* This source file is part of the Cone Programming Language C compiler
* See Copyright Notice in conec.h
*/
#include "../ir.h"
// Create a new cast node
CastNode *newCastNode(INode *exp, INode *type) {
CastNode *node;
newNode(node, CastNode, CastTag);
node->typ = ... |
#include "Machine.h"
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "Assert.h"
#include "CharVector.h"
#include "Symbols.h"
struct Machine {
char* name;
StringVector* states;
CharVector* input_alphabet;
CharVector* tape_alpha... |
#include "common.h"
#define is_digit(c) ((c) >= '0' && (c) <= '9')
static uint32_t parse_int(const char **sp)
{
const char *s = *sp;
uint32_t n = 0;
while (is_digit(*s)) {
n *= 10;
n += *s++ - '0';
}
*sp = s;
return n;
}
static const char *op_name(int op)
{
switch (op) {
case OP_COPY:
return "cop... |
/*
Copyright 2018 olmanqj
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, distribute, sublice... |
/*
* Copyright 2021 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... |
//---------------------------------------------------------------------------------
// Title : Kernel Module For PGP To PCI Bridge Card
// Project : PGP To PCI-E Bridge Card
//---------------------------------------------------------------------------------
// File : PgpCardG3.h
// Author ... |
/**
* Copyright (C) 2014-2016, RESOL - Elektronische Regelungen GmbH.
*
* 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 rig... |
/*
** Copyright (c) , 2004, <NAME>
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
**
** 1. Redistributions of source code must retain the above copyright notice,
** this list of conditi... |
/* MPQCMpqc.c */
/**********************************************************************************************************
Copyright (c) 2002-2013 <NAME>. All rights reserved
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the Gabedit)... |
#include "survive_reproject.full.generated.h"
#include <libsurvive/survive.h>
#include <libsurvive/survive_reproject.h>
#include <math.h>
#include <os_generic.h>
void gen_survive_reproject_full(FLT *out, const SurvivePose *obj_pose, const LinmathVec3d obj_pt,
const SurvivePose *lh2world, const BaseStationData ... |
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <arpa/inet.h>
#include <errno.h>
#include <ifaddrs.h>
#include <netdb.h>
#include <netinet/in.h>
#include "multicast.h"
#include "comms.h"
static struct sockaddr_in g_tx_addr;
static int g_tx_sock;
static int g_rx_sock;
static const int g_multicast... |
#include<stdio.h>
#include<stdlib.h>
typedef struct _person{
char first[20], last[20], email[20], nat[20], age[5];
}person;
void str2arr(person *new, char *buffer){
int i = 0;
for(i = 0; i < 20; i++)
if(new->first[i] != '\n' && new->first[i] != '\0')
buffer[i] = new->first[i];
for(i = 0; i < 20; i++)
if(ne... |
/*
Split a FILE* into logical line (escape newline)
*/
#include <stdio.h> // FILE*, getc, ungetc
#include <stdlib.h> // malloc, realloc, free
#include <stddef.h> // size_t
#include "../misc/log/log.h"
#include "lines.h"
#include "linesco.h"
#include "messages.cat.h"
static const char ESCAPE_CHAR = '\\';
#ifn... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <sys/types.h>
#include "core.h"
#define READ 0
#define WRITE 1
int count(char *line, char *delim)
{
int i;
int token = 0;
//find # of tokens
for (i ... |
/*
* The Games: Winter/Summer Challenge - (1991-'92) series by Accolade,
* game data extracting tool
*
* Copyright (c) 2001-2019 <NAME>
*
* 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 thi... |
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "common.h"
#define PORT 8765
/* use these strings to tell the marker what is happening */
#define FMT_ACCEPT_ERR "ECE... |
/*
* Copyright (C) TOMOTON, GmbH
* Copyright (C) <NAME>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#include "args.h"
#include "colors.h"
#include "utils.h"
struct Entity {
long length;
char* content;
};
int send_reques... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <complex.h>
#include <math.h>
#include <fftw3.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "precision.h"
#include "util.h"
/* Print the usage. */
void usage (char *name) {
fprintf (stderr, "USAGE: %s [-h] <-d d> [-r r] [input [output]]\n", n... |
#include "breakout.h"
#include "include/multicore.h"
#include "include/io.h"
#include "include/bt.h"
#include "include/fb.h"
#define MAX_MSG_LEN 50
#define MAX_READ_RUN 100
unsigned char data_buf[MAX_MSG_LEN];
unsigned int data_len;
unsigned int messages_received = 0;
unsigned int poll_state = 0;
enum {
LE_... |
/*
* Copyright © 2018, VideoLAN and dav1d authors
* Copyright © 2018, Two Orioles, LLC
* 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... |
#include "gyroscope.h"
static HAL_StatusTypeDef HAL_UART_DMAStopRx(UART_HandleTypeDef *huart);
/**
* @brief 停止 UART 的 DMA 接收. 函数由 HAL_UART_DMAStop 改写而来.
*
* @param huart UART handle
* @return HAL_StatusTypeDef 永远返回 HAL_OK
*/
static HAL_StatusTypeDef HAL_UART_DMAStopRx(UART_HandleTypeDef *huart)
{
uint32_t dmar... |
/*******************************************************************************
NAME INTERRUPTED MOLLWEIDE
PURPOSE: Transforms input Easting and Northing to longitude and
latitude for the Interrupted Mollweide projection. The
Easting and Northing must be ... |
/*-
* Copyright (c) 2003-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 conditi... |
/* bonito.c - PCI bonito interface. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* GRUB 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 v... |
/*******************************************************************************
*
* COPYRIGHT(c) 2020, China Mobile IOT
*
* 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... |
/*
* Declarations of procedures and variables shared between files
* in arch/ppc/mm/.
*
* Derived from arch/ppc/mm/init.c:
* Copyright (C) 1995-1996 <NAME> (<EMAIL>)
*
* Modifications by <NAME> (PowerMac) (<EMAIL>)
* and <NAME> (PReP) (<EMAIL>)
* Copyright (C) 1996 <NAME>
*
* Derived from "arch/i38... |
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-rtl-expand-details" } */
typedef long unsigned int size_t;
union tree_node;
typedef union tree_node *tree;
union gimple_statement_d;
typedef union gimple_statement_d *gimple;
typedef const union tree_node *const_tree;
typedef const union gimple_statement_d *const_gi... |
/***********************************************************************
Copyright (C) 2014 Vidyo
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 l... |
/*
Copyright (C) 1997-2021 <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... |
/* SPDX-License-Identifier: MIT */
#include "payload.h"
#include "assert.h"
#include "heapblock.h"
#include "kboot.h"
#include "smp.h"
#include "utils.h"
#include "libfdt/libfdt.h"
#include "minilzlib/minlzma.h"
#include "tinf/tinf.h"
// Kernels must be 2MB aligned
#define KERNEL_ALIGN (2 << 20)
const u8 gz_magic[]... |
/** \file driveoptionswidget.c
* \brief Drive options widget
*
* \author <NAME> <<EMAIL>>
*/
/*
* $VICERES IECDevice8 -vsid
* $VICERES IECDevice9 -vsid
* $VICERES IECDevice10 -vsid
* $VICERES IECDevice11 -vsid
* $VICERES AttachDevice8Readonly -vsid
* $... |
/*****************************************************************************
*
* Original Author: <NAME>
* Creation Date:
* Description:
*
* Copyright 2018 by <NAME>. All Rights Reserved.
* Unauthorized reproduction, modification, distribution, transmission,
* republication, display or performance are ... |
#include <stdio.h>
#include <unistd.h>
#include "msg.h"
#include "net/gcoap.h"
#include "net/sock.h"
#include "net/netif.h"
#include "benchmark.h"
#include "tinydtls_keys.h"
#include "net/credman.h"
#ifndef VERBOSE
#define VERBOSE 0
#endif
static ssize_t _riot_test0_handler(coap_pkt_t *pdu, uint8_t *buf, size_t le... |
/* geneCheckWidget - output HTML tables to display geneCheck or
* geneCheckDetails with browser links */
/* Copyright (C) 2014 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "geneCheckWidget.h"
#include "geneCheck.h"
#i... |
/*
* iio_jesd204_fsm_sync
*
* Copyright (C) 2020 Analog Devices, 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 2
* of the License, or (at your option) any later v... |
#define TESTAPP_GEN
/******************************************************************************
* Copyright (C) 2005 - 2021 Xilinx, Inc. All rights reserved.
* SPDX-License-Identifier: MIT
******************************************************************************/
/*******************************************... |
#include "Python.h"
#include "osdefs.h"
#include <windows.h>
/* PREFIX and EXEC_PREFIX are meaningless on Windows */
#ifndef PREFIX
#define PREFIX ""
#endif
#ifndef EXEC_PREFIX
#define EXEC_PREFIX ""
#endif
/*
This is a special Win32 version of getpath.
* There is no default path. There is nothing even remotely r... |
/*--------------------------------------------------------------------------
gsmo_mex.c: Matlab MEX interface for the Generalized SMO solver.
Synopsis:
[x,exitflag,t,access,Nabla] =
gsmo_mex(H,f,a,b,LB,UB,x0,Nabla0,tmax,tolKKT,verb)
Compile:
mex gsmo_mex.c gsmolib.c
Description:
min Q_P(x) ... |
#include <u.h>
#include <libc.h>
#include <fcall.h>
#include <auth.h>
#include "authlocal.h"
enum {
ARgiveup = 100,
};
static uchar*
gstring(uchar *p, uchar *ep, char **s)
{
uint n;
if(p == nil)
return nil;
if(p+BIT16SZ > ep)
return nil;
n = GBIT16(p);
p += BIT16SZ;
if(p+n > ep)
return nil;
*s = malloc... |
/* -*- C++ -*-
* File: halt_mt_win32.c
* Copyright 2008-2018 LibRaw LLC (<EMAIL>)
* Created: Sat Mar 8, 2008
*
* LibRaw C API mutithreaded sample: emulates call to "dcraw -h [-w] [-a] [-v]"
* Win32 version
LibRaw is free software; you can redistribute it and/or modify
it under the terms of the one of two lic... |
//
// Created by <NAME> on 2/4/18.
//
#include "PortE.h"
#include "Logging.h"
#include "tm4c123gh6pm.h"
#include "SoundArrays.h"
#include "startup.h"
#include "TimerA.h"
#include "PortB.h"
#define PORTE_PRIORITY 1
static EdgeHandler edgeTasks[6] = {{false, false, 0, 0, 0},
{false, ... |
#elif defined(__SAM3X8E__) && defined(USE_MEGA_16BIT_SHIELD) //regular CTE shield on DUE
#warning USE_MEGA_16BIT_SHIELD
// configure macros for the control pins
#define RD_PORT PIOA
#define RD_PIN 20 //D43
#define WR_PORT PIOC
#define WR_PIN 7 //D39
#define CD_PORT PIOC
#define CD_PIN 6 //D38
#define ... |
/**
* Global descriptor table (GDT) related.
*/
#include <stdint.h>
#include <stddef.h>
#include "gdt.h"
#include "../common/debug.h"
#include "../process/process.h"
/**
* The GDT table. We maintain 6 entries:
* 0. a null entry;
* 1. kernel mode code segment;
* 2. kernel mode data segment;
* 3. us... |
/* -*- mode: c; c-file-style:"stroustrup"; -*- */
/*
* Copyright (c) 2021 Mastercard
*
* 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
... |
/*********************************************************************
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
*********************************************************************/
/**
Test the Extendible Hash Implementation of ncexhash
*/
#include... |
//
// rm_threadpool.c
// rm_threadpool
//
// Created by Kevin on 2017/3/29.
// Copyright © 2017年 Kevin. All rights reserved.
//
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include "is_threadpool.h"
#include "is_priority_queue.h"
#define ERR_RETURN(x, y) \
do { perror((x)); ret... |
/*
* Copyright (C) 2012, 2013, 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, copy, mo... |
/*******************************************************************************************
*
* raylib [shaders] example - Texture Waves
*
* NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders support,
* OpenGL 1.1 does not support shaders, recompile raylib to OpenGL 3.3 version.... |
/*
* Copyright (c) 2016-2017 Nordic Semiconductor ASA
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control/nrf5_clock_control.h>
#include <system_timer.h>
#include <sys_clock.h>
#include <nrf_rtc.h>
#include <... |
/*
* main.c
*
* This is the Main IO Functions of the Drum Maschine
*
* 7Segments from Left to Right: [7][6] [5][4] [3][2][1][0]
* 7-6:
* 5-4: Bank Number
* 3-0: BPM
*
* Buttons from Left to Right: [1] [2] [3] [4]
* 1: Play/Pause
* 2: BPM up/down in Steps of 10 (Range: 60-240)
* 3: ... |
// -*- mode:c++ -*-
#include "sm-common.h"
/* This is an allocator designed specifically for managing multiple
OID sets in parallel, each identified by an FID. It also supports
checkpoint and restore of internal allocator state.
The allocator manages peristent objects, and thus must itself be
persistent. ... |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) International Business Machines Corp., 2001
* Author: <NAME>, <NAME> <<EMAIL>>, 2001
*
* Stress the VMM and C library by spawning N threads which malloc
* blocks of increasing size until malloc returns NULL.
*/
#include <stdio.h>
#include <pthread.h... |
/*
* libwebsockets - lws alloc chunk
*
* Copyright (C) 2018 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation:
* version 2.1 of the License.
*
* This librar... |
//
// Geometry.c
// Satin
//
// Created by <NAME> on 6/28/20.
//
#include <float.h>
#include "Geometry.h"
bool greaterThanZero(float a) { return a > FLT_EPSILON; }
bool isZero(float a) { return a == 0 || fabsf(a) < FLT_EPSILON; }
float area2(simd_float2 a, simd_float2 b, simd_float2 c) {
return (b.x - a.x) ... |
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2014, <NAME> <<EMAIL>>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
// protojuce/cdefs/graphics.h
// c definitions as exported by protoplug
// included by protojuce.lua
pGraphics Graphics_new(pImage imageToDrawOnto);
void Graphics_delete(pGraphics g);
void Graphics_setColour(pGraphics self, Colour newColour);
void Graphics_setOpacity(pGraphics self, float newOpacity);
void Grap... |
/*
* Funny Language - a free style programming language.
* Copyright (C) 2015 by fanguangping (<EMAIL>)
* prog.c
*/
#include <string.h>
#include "operator.h"
Cell* op_begin(Scheme *sc) {
//形式 (begin body ...)
if (!is_pair(sc->code))
return s_return_helper(sc, sc->code); //这里这样的代码可以通过(begin . 1)
if (... |
/*
* parser.c - parsing of pages
*
* Copyright (C) 2016 <NAME>
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include "tldr.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/utsname.h>
... |
/* This file implements the Lua binding to libbzip2.
*
* Copyright (c) 2008, <NAME> <<EMAIL>>
* Copyright (c) 2012, <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this pe... |
/*******************************************************************************
Uncil -- arithmetic helper
Copyright (c) 2021 <NAME> (hisahi)
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 Sof... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
#include <immintrin.h>
#include <pthread.h>
#include <stdio.h>
inline void matrix_kernel16_6(
const float * __restrict__ A,
const float * __restrict__ B,
float * C,
const int N,
const int K,
const int m,
const int n)
{
__m256 mB0;
__m256 mB1;
__m256 mA0;
__m256 mA1;
__m256 res0_0 = _mm... |
/*
* iMX boot ROM plugin: debug serial port.
*
* Author: <NAME> <<EMAIL>>
* Copyright (C) 2016 Artec Design LLC
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*
*/
#include <stdint.h>
#include <stddef.h>
#include "config.h"
#define... |
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS {
SCSI_PASS_THROUGH spt;
ULONG Filler; // realign buffers to double word boundary
UCHAR ucSenseBuf[32];
UCHAR ucDataBuf[512];
} SCSI_PASS_THROUGH_WITH_BUFFERS, *PSCSI_PASS_THROUGH_WITH_BUFFERS;
typedef st... |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 <NAME> for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to d... |
// SPDX-License-Identifier: GPL-2.0
//
// mcp251xfd - Microchip MCP251xFD Family CAN controller driver
//
// Copyright (c) 2021, 2022 Pengutronix,
// <NAME> <<EMAIL>>
//
#include <linux/ethtool.h>
#include "mcp251xfd.h"
#include "mcp251xfd-ram.h"
static void
mcp251xfd_ring_get_ringparam(struct net_devi... |
/*
* @(#)ThinkGearStreamParser.c 2.0 Mar 04, 2008
*
* Copyright (c) 2008 NeuroSky, Inc. All Rights Reserved
* NEUROSKY PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* @file ThinkGearStreamParser.c
*
* @author <NAME>
* @version 2.0 Mar 04, 2008 <NAME>
* - Renamed to ThinkGearStream... |
#include "trace.h"
#include "types.h"
#include "constants.h"
#include "classes.h"
#include "interpreter.h"
#include "platform_hooks.h"
#include "threads.h"
#include "opcodes.h"
#include "configure.h"
#include "memory.h"
#include "language.h"
#include "exceptions.h"
#include "specialclasses.h"
#include "fields.h"
#incl... |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <time.h>
#define N 10 //thread consumatori - numero totale di messaggi che i produttori producono
#define M 5 //thread produttori
#define INSERIMENTI 200000
#define TERMINAZIONE -1
struct _nodo {
int value;
struct _nodo* prev;
struct _nodo* next;... |
#include <stdio.h>
#include <stdlib.h>
typedef int object_t;
typedef int key_t;
#define MAXP 46337 /* prime, and 46337*46337 < 2147483647 */
typedef struct {
int size;
int primary_a;
int* secondary_a;
int* secondary_s;
int* secondary_o;
int* keys;
object_t* objs;
} perf_has... |
/*---------------------------------------------------------------*
* PSSM Searcher *
* *
* By: <NAME>, <NAME> and <NAME> *
* University of Copenhagen, spring 2006 *
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.