text stringlengths 3.08k 10.5k |
|---|
/*
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 OAI Publi... |
/* Copyright (C) 2004 <NAME> <mmj at mmj.dk>
*
* $Id$
*
* 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, mod... |
/*
Copyright (c) 2008 - <NAME>.
Permission is granted for use and modification of this file for
research, non-commercial purposes.
*/
#include "common.h"
#include "sysfunc.h"
#include "trec_eval.h"
#include "functions.h"
#include "trec_format.h"
double log2(double x);
static int
te_calc_ndcg_cut (const E... |
// ref: FreeBSD Manual Pages cpio
#include "cpio.h"
#include "uart.h"
#include "my_string.h"
#include "convert.h"
#include "property.h"
int property_qemu = 1;
char *CPIO_ADDR = 0;
void decide_cpio_addr()
{
if (property_qemu)
CPIO_ADDR = ((char*)0x8000000); // QEMU(0x8000000)
else {
// [N... |
/**
* Copyright (C) 2018, <NAME>
**/
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <pservlet.h>
#include <pstd/scope.h>
#include <pstd/mempool.h>
#include <pstd/types/array.h>
struct _pstd_array_t {
uint32_t committed:1;/*!< Indicates if this object has be... |
/* P7_ENVELOPES manages an array of "envelopes", information about
* each detected domain in a target sequence.
*
* Contents:
* 1. P7_ENVELOPE structure (one envelope)
* 2. P7_ENVELOPES object (array of envelopes)
* x. Copyright and license information
*/
#include "p7_config.h"
#include <stdlib.h>
#i... |
/* 2005.6 by yhlu
* 2006.3 yhlu add copy data from CAR to ram
*/
#include <string.h>
#include <arch/stages.h>
#include <cpu/x86/mtrr.h>
#include "cbmem.h"
#include "cpu/amd/car/disable_cache_as_ram.c"
#include "cpu/x86/mtrr/earlymtrr.c"
static inline void print_debug_pcar(const char *strval, uint32_t val)
{
printk(... |
#include "string.h"
#include "xftypedef.h"
#include "xfbgraph.h"
#include "xftextout.h"
#include "xfmalloc.h"
#include "xfunit.h"
#include "xftextlist.h"
static char *tl_get_value(XF_VIEW_TextList *tl, attr pos) {
if (XF_NULL == tl) return XF_NULL;
if (pos >= tl->countValue) return XF_NULL;
return (tl->... |
#include <ldap.h>
#include <errno.h>
/* Solaris Kerberos: errors are handled diff from MIT */
#if 0 /************** Begin IFDEF'ed OUT *******************************/
#include <kdb5_err.h>
#endif /**************** END IFDEF'ed OUT *******************************/
#include <krb5.h>
#include "ldap_err.h"
#ifndef LDAP_X... |
/*
* Xaw3dP.c
*
* Global functions that don't really belong anywhere else.
*/
/*********************************************************************
Copyright (C) 1992 <NAME>
Copyright (C) 2000, 2003 <NAME>.
All Rights Reserved
Permission to use, copy, modify, and distribute this software... |
/***************************************************************************
* Nipper - The network infrastructure parser *
* Copyright (C) 2006 - 2008 by <NAME> *
* <EMAIL> *
* ... |
#include <minios/misc.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#define ERR_LEN "Error in len != 0\n"
#define ERR_ARGC "Too few arguments\n"
#define ERR_OPEN "Error in open()\n"
#define ERR_READ "Error in read()\n"
#define ERR_WRITE "Error in write()\n"
#define ERR_PIPE "Error in pipe()\n"
#defi... |
//
// YRJDefine.h
// YRJKit
//
// Created by YURENJIE on 2018/3/7.
// Copyright © 2018年 yurenjie. All rights reserved.
//
//弱引用和强引用
#define WEAK_SELF(type) __weak __typeof(&*self)weakSelf = self
#define STRONG_SELF(type) __strong __typeof(&*self)weakSelf = self
// app名称
#define APP_NAME [[[NSBundle mainBundle]... |
/*
* This file is part of the coreboot project.
*
* Copyright 2013 Google Inc.
* Copyright (C) 2012 Samsung Electronics
*
* 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... |
#include "Talkthrough.h"
//--------------------------------------------------------------------------//
// Function: Init_EBIU //
// //
// Description: This function initializes and enables asynchronous memory //
// banks in External Bus Interface Unit so that Flash A can be //
// ... |
/*
* Copyright © 2016 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... |
/*
riffr-info.c
Copyright (c) 2021 by <NAME>
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stddef.h>
#include "riffr.h"
static int is_wave_fmt(const char *form_str,
const char *chunk_str)
{
return !strcmp(form_str, "WAVE") && !strcmp(chunk_str, "fmt ");
}
... |
#include "bf16-ctrldevice.h"
#include "miner.h"
#define MAX_TOKENS_ALLOWED 10
char *ctrl_device_name = "ctrl";
static char *d_state_on = "ON";
static char *d_state_off = "OFF";
static char* D_STATE(int state)
{
return (state == 0) ? d_state_off : d_state_on;
}
char* get_ctrl_data(int channel,... |
/* fracbm-fpt-mc (2019)
*
* This code simulates a fractional Brownian Motion with linear and non=linear drift on the interval [0,1] and finds the first passage time.
*
* Authors: <NAME> (Imperial College) , <NAME> (ENS Paris)
*
* Questions, feedback and comments are appreciated. Please contact '<EMAIL>'
*/
#... |
#include "vm.h"
int argTop = 0, localTop = 0, paramTop = 0, tempTop = 0;
int argIdx = 0, labelIdx = 0, tempIdx = 0;
int vmCodeTop = 0, vmGlobalTop = 0;
VmCode vmCodes[CODEMAX], vmGlobals[CODEMAX], *fCode = NULL;
Pair localList[CODEMAX], globalList[CODEMAX];
Map symLocal, symGlobal;
VmCode *lookup(char *name) {
VmC... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <linux/fb.h>
#include <linux/input.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "osal.h"
#include "ui.h"
typedef enum _EventType {
EVT_NOP = 0,
EVT_MOUSE_UP,
EVT_MOUSE_MOVE... |
// #include <windows.h>
// #include <GL/gl.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795
#endif
#include <pdgl.h>
#include <pdglui.h>
#include <pdgl_stub.h>
#include <lbxgl2.h>
#include <libvecmath.h>
char *ctex_files[4096];
int ctex_nfile... |
#include "arbre.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
ABR *arbre_vide(){
return NULL;
}
int est_vide(ABR *a){
return (a==NULL);
}
ABR *feuille(int val){
ABR *a = malloc(sizeof(ABR));
a->racine = val;
a->fd = NULL;
a->fg = NULL;
return a;
}
void lib_abr(ABR *a){
if(a){
if(a->fg) lib_abr(a... |
/**
* Copyright (c) 2018 - 2019, Nordic Semiconductor ASA
*
* 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 no... |
/**
* @file hahaUtils.c
* @brief stdlib for HAHA project, contains imports and defines implementation
* @author Brian
* @version
* @date 2017-03-17
*/
#include "utils/hahaUtils.h"
#include <stdio_start.h>
#include <ctype.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdlib.h>
#include "neighbor/friendlis... |
#include <stdio.h>
#include <string.h>
#include "raylib.h"
#include "screens.h"
#include "scene.h"
#include "dialog.h"
void DrawDebug(void);
void UpdateWalkingUI(float delta);
void DrawWalkingUI(void);
char *modeText;
int CurrentScene = SCENE_NULL;
int CurrentDeck = 3;
float CurrentDeckFlashTimeout = 0.25f;
int Curr... |
// Copyright (c) 2017-2018 Two Sigma Open Source, LLC.
// All Rights Reserved
//
// Distributed under the terms of the 2-clause BSD License. The full
// license is in the file LICENSE, distributed as part of this software.
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#inc... |
/*
* Pluto: An automatic parallelizer and locality optimizer
*
* Copyright (C) 2007-2012 <NAME>
*
* This software is available under the MIT license. Please see LICENSE in the
* top-level directory for details.
*
* This file is part of libpluto.
*
*/
#include <assert.h>
#include "transforms.h"
#include "con... |
/*
* blend.c
* Copyright (c) 2012 <NAME>
*
* 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 ... |
/** @file
* Display the battery state.
*
* @author <NAME>
* Licensing informations in LICENSE.md file.
*/
#include <pebble.h>
#include "layout.h"
#include "utils.h"
#include "batterylayer.h"
// ===============
// PRIVATE TYPES =
// ===============
typedef struct {
GBitmap* batt_plug;
GBitmap* batt_bor... |
/* vim: set et ts=4 sw=4 sts=4 fdm=marker syntax=c.doxygen: */
/** \file src/lib/bugs.c
* \brief BUGlist.txt handling
*
* \author <NAME> <<EMAIL>>
*/
/*
* HVSClib - a library to work with High Voltage SID Collection files
* Copyright (C) 2018 <NAME> <<EMAIL>>
*
* This program is free software; you ca... |
#include <stdio.h>
#include <stdlib.h>
void mat_in(int rows, int cols, int arr[rows][cols]){
for (int i=0; i<rows; i++){
for (int j=0; j<cols; j++){
scanf("%d", &arr[i][j]);
}
}
}
void mat_out(int rows, int cols, int arr[rows][cols]){
printf("\n");
for (int i=0; i<rows; i++... |
/*****************************************************************************/
/* */
/* symbol.c */
/* */
... |
/**
* This software is subject to the ANT+ Shared Source License
* www.thisisant.com/swlicenses
* Copyright (c) Dynastream Innovations, Inc. 2015
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* con... |
/*-
* Copyright (c) 2014 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of co... |
/*
* Copyright (C) 2007 The Android Open Source Project
*
* 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 app... |
#include "../platonic.c"
#include "world.h"
char selected_solid = 0;
unsigned short seeThrough = 0;
unsigned short scene = 0;
#define NUM_SCENES 4
//approx
#define CLOCKS_PER_SECOND 60000
static GLfloat light_position1[] = { 5.0, 5.0, 5.0, 0.0 };
static GLfloat light_position2[] = { -5.0, 5.0, -5.0, 0.0 };
static GL... |
#include "semantics.h"
Type *
coerce_type(int op, Type **_left, Type **_right, MemPool *pool) {
Type *left = *_left;
Type *right = *_right;
(void)pool;
switch (op) {
case BINOP_ADD:
case BINOP_SUB:
case BINOP_MUL:
case BINOP_DIV:
case BINOP_ASSIGN:
if (left->t != right->t) {
r... |
#include "pid_controller.h"
#include "constants.h"
#include <stdio.h>
#include <stdlib.h>
void pid_controller_init(struct PID_controller* controller)
{
controller->error_heading = 0.0;
controller->error_int_heading = 0.0;
controller->error_diff_heading = 0.0;
controller->error_position ... |
#include "c_uuidv4.h"
/**
* @brief --> It get file descriptor of /dev/urandom or /dev/random in UNIX machine
* @parmas --> void
*/
static
int random_get_fd(void)
{
int i, fd;
struct timeval tv;
gettimeofday(&tv, 0);
fd = open("/dev/urandom", O_RDONLY);
if(fd == -1)
fd = open("/dev/ra... |
/******************************************************************************
* @author <NAME>
* @copyright Copyright (c) 2020 Makers For Life
* @file telemetry.h
* @brief Implementation of the telemetry protocol
*****************************************************************************/
#pragma once
#includ... |
/*
Copyright (c) 2003-2013 uim Project http://code.google.com/p/uim/
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
n... |
#include <color.h>
#include <display.h>
#include <display_syscalls.h>
#include <keyboard.hpp>
#include <keyboard_syscalls.h>
#include <string.h>
#include <RTC_syscalls.h>
void CopySpriteNbit(const unsigned char* data, int x, int y, int width, int height, const color_t* palette, unsigned int bitwidth) {
color_t* VRA... |
#include "types.h"
#include "param.h"
#include "arch/riscv.h"
#include "defs.h"
#include "spinlock.h"
#include "net/ethernet.h"
#include "net/arptable.h"
#include "net/sock_cb.h"
extern struct arp_cache_entry arptable[ARP_DEFUALT_ENTRY_NUM];
struct arp_cache* get_arp_cache(uint32_t ip);
extern struct mbufq tx_queue;
v... |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
/*--------------------------------------------------------------------*/
/*--------------------------ESTRUTURAS--------------------------------*/
/*--------------------------------------------------------------------*/
ty... |
/*
* 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... |
/* See LICENCE file for copyright and licence details */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <errno.h>
#include <err.h>
#include <fcntl.h>
#include <kvm.h>
#include <limits.h>
#include <time.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#in... |
/*
Copyright (c) 2008-2013 uim Project https://github.com/uim/uim
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
noti... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the program */
/* GCG --- Generic Column Generation */
... |
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/apm_cursor.c,v 1.16 2005/10/14 15:16:36 tsi Exp $ */
#include <X11/X.h>
#include <X11/Xproto.h>
#include "misc.h"
#include "input.h"
#include "cursorstr.h"
#include "regionstr.h"
#include "scrnintstr.h"
#include "servermd.h"
#include "windowstr.h"
#include "mfb.... |
/**
* 最小编辑距离:求一个序列经过最少次变换(增删改)后,转化成另一个序列。应用如下:
* 1、单词拼写纠错,比如本项目就把algorithms 拼成了algorthms
* 2、两块基因序列的不一致检查
* 3、语音识别中的字错误率计算
* 4、求两个句子之间的相似度
* ...
*
* 示例:
* X: abode, Y: blog
* 需要操作4次:
* 1. delete a -> bode
* 2. insert l after b -> blode
* 3. delete d -> bloe
* 4. substitute e with g ->
*
* 本题最... |
#ifdef _WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#ifndef __APPLE__
#include <GL/gl.h>
#include <GL/glut.h>
#else
#include <OpenGL/gl.h>
#include <GLUT/glut.h>
#endif
#include "globals.h"
#include "object.h"
#include "scene.h"
double distance = 0;
int showBuildings = 0;
static void dra... |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Plantronics USB HID Driver
*
* Copyright (c) 2014 <NAME> <<EMAIL>>
* Copyright (c) 2015-2018 <NAME> <<EMAIL>>
*/
/*
*/
#include "hid-ids.h"
#include <linux/hid.h>
#include <linux/module.h>
#define PLT_HID_1_0_PAGE 0xffa00000
#define PLT_HID_2_0_PAGE 0xffa20... |
#include <math.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/rmt.h"
#include "freertos/queue.h" //TODO: is it used?
#include "nvs_flash.h"
#include "esp_wifi.h"
#include "esp_now.h"
#include "driver/mcpwm.h"
#include "esp_adc_cal.h"
#include "driver/gpio.h"
#incl... |
// Just to remove Windows annoying stuff -_-
#define _CRT_SECURE_NO_WARNINGS
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
void panic(const char *message, ...)
{
va_list args;
va_start(args, message);
fprintf(stderr, "[Error]");
vfprintf(stderr, message, args);
fflush(stderr)... |
/* Maverick ET-73x BBQ Sensor
*
* Copyright (C) 2016 gismo2004
* Credits to all users of mentioned forum below!
*
* 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 L... |
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assimp/cimport.h>
#include <assimp/config.h>
#include <assimp/postprocess.h>
#include <assimp/scene.h>
#include <assimp/version.h>
#define RMODEL_MAGIC "rmodel1"
#define WARN(...) do { \
fprintf(stderr, __VA_ARGS__); \
... |
#pragma once
#define CL_TARGET_OPENCL_VERSION 220
#include <CL/cl.h>
#include <math.h>
#include <stdio.h>
#include <utils.h>
// Benchmark `hash_elements` kernel
// https://github.com/itzmeanjan/vectorized-rescue-prime/blob/fa5ec366d5955f08f3e5734b33bde842cfd570c6/kernel.cl#L320-L376
//
// With
// https://github.com/it... |
/**
* ============================================================================
* @file basic_06_cstrings.c
* @author <NAME>
* @date 10/2020
* @brief Multiple functions related to cstrings
*
* Version :
* Copyright : MIT license
* ===========================================================================... |
#include "../../gl-utils.h"
//
// gl_info_pixel_transfer_constant
//
void gl_info_pixel_transfer_constant_print() {
gl_info_pixel_transfer_constant_write (stdout);
}
void gl_info_pixel_transfer_constant_write (FILE* file) {
fprintf (file, "gl info pixel transfer constants...\n");
if (gl_check_context()) {
/... |
/* BWT.C */
#include <stdio.h>
#include <stdlib.h>
#include "bwt.h"
#include "types.h"
#include "algo.h"
#include "bitio.h"
#include "debug.h"
#include "hufblock.h"
#include "mtf.h"
#include "rle.h"
/* Variables */
int Index;
uchar *L;
static int *Pos, *Prm, *Count;
static uchar *BH, *B2H;
static int C[2... |
/*
* Copyright (c) 2019 Elastos Foundation
*
* 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, ... |
typedef struct{
uint32 material;
uint32 material_version;
uint render_end;
uint quad_end;
uint tri_end;
uint vertex_start;
uint id;
uint16 layer;
}PMeshMaterial;
typedef struct{
uint version;
pgreal *data;
pgreal weight[3];
}PMeshLayer;
typedef enum{
PDM_NONE, /* no displacement mapping */
PDM_NORMALIZE... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "io.h"
#include "dat.h"
#include "fns.h"
#include "../port/error.h"
#include "version.h"
Mach *m = (Mach*)MACHADDR;
Proc *up = 0;
Conf conf;
extern ulong kerndate;
extern int cflag;
extern int consoleprint;
extern int redirectconsole;
extern int main_p... |
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "nr_axiom.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "util_number_converter.h"
#include "util_strings.h"
void nr_itoa(char* buf, size_t len, int x) {
char scratch[24];
... |
/**
*
* Copyright (c) 2010, <NAME> and Mongrel2 Project 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:
*
* * Redistributions of source code must retain the above co... |
/*
* Copyright 2020 Makani Technologies LLC
*
* 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 ... |
/*
* Copyright (c) 2016, <NAME> <<EMAIL>>. All rights reserved.
*
* job_submit_collect_script: Job Submit plugin to collect job script.
*
* This plugin collects the job script and workdir at submission time and store
* them into a dayly directory within the pre-defined "target_base" location.
*
* Note you will ... |
// SPDX-License-Identifier: BSD-2-Clause
/* Copyright (C) 2016 - 2021 Intel Corporation. */
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#if defined(HBWMALLOC)
#include <hbwmalloc.h>
#de... |
/*
* @XMHF_LICENSE_HEADER_START@
*
* eXtensible, Modular Hypervisor Framework (XMHF)
* Copyright (c) 2009-2012 Carnegie Mellon University
* Copyright (c) 2010-2012 VDG Inc.
* All Rights Reserved.
*
* Developed by: XMHF Team
* Carnegie Mellon University / CyLab
* VDG Inc.
* ... |
#include <string.h>
#include <stdio.h>
#include <3ds.h>
char regionids_table[7][4] = {//https://3dbrew.org/wiki/Nandrw/sys/SecureInfo_A
"JPN",
"USA",
"EUR",
"JPN", //"AUS"
"CHN",
"KOR",
"TWN"
};
Result setup_boss()
{
Result ret=0;
u32 test_NsDataId = 0x57524248;//This can be anything.
u8 region=0;
bossContext ... |
#include "docset.h"
#include <string.h>
#include <assert.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#define Attribute "Attribute"
#define Binding "Binding"
#define Builtin "Builtin"
#define Callback "Callback"
#define Category "Category"
#define Class "Class"
#define Command "Command"
#define Component "C... |
/* service.c - mDNS library - Public Domain - 2015 <NAME> / Rampant Pixels
*
* This library provides a cross-platform mDNS and DNS-SD library in C based
* on our foundation and network libraries. The implementation is based on RFC 6762
* and RFC 6763.
*
* The latest source code maintained by Rampant Pixels ... |
/*
* Copyright 1992 by <NAME> <<EMAIL>>
* Copyright 1993 by <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyrigh... |
/*
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Softwa... |
/* Copyright (c) 2015 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... |
/*--------------------------------------------------------------------*/
/*--- Branch predictor simulation cg_branchpred.c ---*/
/*--------------------------------------------------------------------*/
/*
This file is part of Cachegrind, a Valgrind tool for cache
profiling programs.
Copyrig... |
/*////////////////////////////////////////////////////////////////////////
Copyright (c) 1995 Electrotechnical Laboratry (ETL), AIST, MITI
Permission to use, copy, modify, and distribute this material for any
purpose and without fee is hereby granted, provided that the above
copyright notice and this permission notice... |
#include "globlua.h"
#include "lua_audio.h"
#include "lua_colliders.h"
#include "lua_input.h"
#include "lua_object.h"
#include "lua_renderer.h"
#include "lua_collisionpair.h"
#include "lua_scene.h"
#include "lua_vector.h"
#include "lua_box.h"
#include "lua_physics.h"
#include "lua_copy.h"
#include <stdlib.h>
#include <... |
// -- Tic-Tac-Toe by Aemilius --
// Project: https://github.com/aemiliu5/TicTacToe (MIT License)
// Compilation: gcc ttt.c -o ttt -lncursesw (Linux)
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#ifdef __linux__
#include <curses.h>
#elif _WIN32
#include <conio.h>
#endif
char playarea[3... |
#include "TerminalBar.h"
#include "Terminal.h"
//this function exists elsewhere, but we don't really want to make it available to users
void TerminalInternalConfig(const char *Config, int *ForeColor, int *BackColor, int *Flags);
void TerminalBarUpdate(TERMBAR *TB, const char *Text)
{
int rows, cols, x=0, y=0, Te... |
#include <sys/param.h>
#include <sys/stat.h>
#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <fts.h>
#include <fnmatch.h>
#include <stdio.h>
#include <unistd.h>
#include "mtree.h"
#include "extern.h"
static NODE *root;
static char path[MAXPATHLEN];
static void miss(NODE *, char *);
static int vwalk(v... |
/*
lz4 - utility to compress/decompress files using the LZ4 algorithm
See accompanying LICENSE file for licensing terms
Authors: <NAME>, <NAME>
Original lz4x code written and placed in the public domain by <NAME>
*/
#define _FILE_OFFSET_BITS 64
#if __STDC_VERSION__ >= 200112L
# define _ftelli64 ftell... |
/*
* Copyright (c) 2018, Xdevelnet (xdevelnet at xdevelnet dot org)
* 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, t... |
/**********************************************************************************************************
天穹飞控 —— 致力于打造中国最好的多旋翼开源飞控
Github: github.com/loveuav/BlueSkyFlightControl
技术讨论:bbs.loveuav.com/forum-68-1.html
* @文... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* test_buildresult.c
*
* Test BuildResult Type
*
*/
#include "testutil.h"
#include "testutil_nss.h"
stati... |
/*
*************************************************************************************************
*
* Emulation of PCF8591 I2C A/D Converter
*
* State:
* Working, but shows constant values
*
* Copyright 2004 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or witho... |
#pragma once
#include "common.h"
#include "util.h"
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cstdio>
struct zipf_gen_state {
uint64_t n; // number of items (input)
double theta; // skewness (input) in (0, 1); or, 0 = uniform, 1 = always zero
double alpha; // only depends on theta
d... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define n 3
struct Card {
int init;
char valeur[5];
char couleur[7];
int hash;
};
void play();
int checkWin(struct Card tab[]);
int valeurToInt(char *);
int addToTab(struct Card, struct Card tab[]);
void printChoice();
void cleanTab();
int isInDrop(st... |
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <sys/socket.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <pthread.h>
//multi thr... |
/* usr/src/cmd/zpool/zpool_main.c */
/*
* Print out detailed scrub status.
*/
void
print_scan_status(pool_scan_stat_t *ps)
{
time_t start, end;
uint64_t elapsed, mins_left, hours_left;
uint64_t pass_exam, examined, total;
uint_t rate;
double fraction_done;
char processed_buf[7], examined_buf[7], total_buf[7],... |
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <pthread.h>
#include <signal.h>
#include <semaphore.h>
#include <unistd.h>
#include <mqueue.h>
#include <fcntl.h>
#include <time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <limits.h>
#define Q_TIMEOUT 3
#define Q_MAX_... |
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/***
This file is part of systemd.
Copyright 2011 <NAME>
systemd 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; eith... |
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Intel Corporation. All rights reserved.
*
* Portions of this file are derived from the ipw3945 project, as well
* as portions of the ieee80211 subsystem header files.
*
* This program is free software; yo... |
/*
* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it woul... |
#include <stdio.h>
#include <stdlib.h>
#include <libnet.h>
#include <stdint.h>
#include <pthread.h>
#include <pcap.h>
#include <stdbool.h>
#include "args.h"
#include "cap.h"
#include "printer.h"
#define RESET "\033[0m"
#define BOLD "\033[1m"
static const char* VERSION = "0.1";
void printHelp(char *argv[]) {
p... |
/* Bootstrapper for BaoIP
Written by <NAME>
Adapted with permission from <NAME>'s minIP project
Compile & Usage: See README.md
*/
/* Global Includes */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <net/if.h>
#include <net/ethernet.h>
#inclu... |
/*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "S1AP-IEs"
* found in "S1AP-IEs.asn"
*/
#include "S1ap-PagingPriority.h"
int S1ap_PagingPriority_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb,
... |
/* monoscope.cpp
* Copyright (C) 2002 <NAME> <<EMAIL>>
* Copyright (C) 1998-2001 <NAME> <<EMAIL>>
* Original code by Tinic Uro
*
* This code is copied from Alsaplayer. The original code was by Tinic Uro and under
* the BSD license without a advertisig clause. <NAME> then relicensed the
* code when he used... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.