text
stringlengths
3.12k
18.7k
/* * Copyright (c) 2015-2018 Nexenta Systems, inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional informat...
//! @file //! //! Copyright (c) Memfault, Inc. //! See License.txt for details //! //! @brief //! Adds a basic set of commands for interacting with Memfault SDK #include "memfault/demo/cli.h" #include <shell/shell.h> #include "memfault/core/data_export.h" #include "memfault/core/debug_log.h" #include "memfault/core/...
// 0x0700F238 - 0x0700F278 static const Vtx bitfs_seg7_vertex_0700F238[] = { {{{ -204, 154, 205}, 0, { 650, 990}, {0xbc, 0xca, 0xbf, 0xff}}}, {{{ 205, 154, -204}, 0, { 2012, 990}, {0xbc, 0xca, 0xbf, 0xff}}}, {{{ -204, 154, -204}, 0, { 1330, 1670}, {0xbc, 0xca, 0xbf, 0xff}}}, ...
// C99 #include "diamond_square.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" #include <assert.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <math.h> #include <time.h> #define MIN( a, b ) ( ( a ) < ( b ) ? ( a ) : ( b ) ) #defi...
/* * 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 Li...
/* bridge_lua_c.h -- Any Lua<->C bridge helper funcitons */ #include "bridge_lua_c.h" #include <stdlib.h> #include <lauxlib.h> #include <lualib.h> #include "lua-alchemy.h" #include "lstack.h" /* TODO: Use some better Alchemy API */ void fatal_error(const char * msg) { sztrace("Lua Alchemy fatal error"); sztrac...
#include <stdio.h> #include <string.h> #include <stdlib.h> // libraries added #include <time.h> #include "shell.h" #include "msg.h" #include "net/emcute.h" #include "net/ipv6/addr.h" #ifndef EMCUTE_ID #define EMCUTE_ID ("gertrud") #endif #define EMCUTE_PORT (1883U) #define EMCUTE_PRIO (THREAD_PRIORITY_MAIN - 1) #def...
/* ========================================================================== */ /* === SuperWrap ============================================================ */ /* ========================================================================== */ /* The SuperWrap function is a simple wrapper around the symbolic supernodal...
/*** <NAME> 235808 lab 06 ex. 02 This is an alternative implementation of the exercise 2 of lab 6 of OS. The difference with respect to the original text is that this version actually parallelizes the file sorting. This code can be further improved by starting to collect replies from child processes onc...
/* * Copyright 2009-2012 Freescale Semiconductor, Inc * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <asm/processor.h> #include <asm/mmu.h> #include <asm/fsl_law.h> #include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_A003399_NOR_WORKAROUND void setup_ifc(void) { struct fsl_ifc *ifc...
#include "common.h" #include "memalloc.h" #include "errAbort.h" #include "dnautil.h" #include "fa.h" #include "dnaseq.h" #include "oldGff.h" #include "wormdna.h" #include "fuzzyFind.h" #include "cheapcgi.h" #include "htmshell.h" void debugListAli(struct ffAli *ali, DNA *needle, DNA *hay) /* Print out ali list for deb...
/* Flexible pipeline playback with different music This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impl...
// ~~~~~~~~~~~~~~~~~~~~~~~~~~ INCLUDES #include "mbt-srv.h" // ~~~~~~~~~~~~~~~~~~~~~~~~~~ DEFINITIONS #define STATUS_SLEEP 600 ///< This is the sleep between two check cicles. Nothing is actually done during the main cicle. // ~~~~~~~~~~~~~~~~~~~~~~~~~~ FUNCTIONS void help(){ printf( "Command: \n ./modbus-tes...
/* Shared library add-on to iptables to add policy support. */ #include <stdio.h> #include <netdb.h> #include <string.h> #include <stdlib.h> #include <syslog.h> #include <getopt.h> #include <netdb.h> #include <errno.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <iptables.h> #includ...
/* * Screen Driver using Allegro 4 Library * * adapted by <NAME> 2015 * */ //#define MWPF_RGB 0 /* pseudo, convert from packed 32 bit RGB*/ //#define MWPF_PIXELVAL 1 /* pseudo, no convert from packed PIXELVAL*/ //#define MWPF_PALETTE 2 /* pixel is packed 8 bits 1, 4 or 8 pal index*/ //#define MW...
#define NO_IMPORT_ARRAY #define NO_IMPORT_ASTROPY_WCS_API #include "cdrizzlemap.h" #include "cdrizzleutil.h" #include <assert.h> #define _USE_MATH_DEFINES /* needed for MS Windows to define M_PI */ #include <math.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /****************...
/** Copyright (c) 2020 <NAME> @ElegantSolution <<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, modi...
/* *------------------------------------------------------------------ * Copyright (c) 2017 Cisco and/or its affiliates. * 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://w...
/* * %CopyrightBegin% * * Copyright Ericsson AB 2001-2016. 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 * ...
/** * @file testHDF5_CompDecomp_SZ.c * @author <NAME> * @date April, 2019 * @brief This is an example of using compression interface * (C) 2019 by Mathematics and Computer Science (MCS), Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #include <stdio.h> #include <stdlib.h> #in...
/* american fuzzy lop++ - unicorn instrumentation ---------------------------------------------- Originally written by <NAME> <<EMAIL>> and <NAME> Adapted for afl-unicorn by <NAME> <<EMAIL>> CompareCoverage and NeverZero counters by <NAME> <<E...
/** 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: Redistributions of source code must retain the above copyright notice, this list of conditions and the following discla...
// comtrait.c - community trait structure algs #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "phylocom.h" #include "nrutil.h" #include "stats.h" //ComTraitMetric - calculate metrics of trait variation in each sample void ComTraitMetric(sample S, traits T, int SwapMethod, int XV...
#include <kernel/system.h> #include <mm/mmu.h> #include <mm/kmalloc.h> #include <kstring.h> #include <dev/kdevice.h> #include <dev/device.h> #include <kernel/proc.h> #include <dev/sd.h> #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000 #define MMC_RSP_PRESENT (1 << 0) #define MMC_RSP_136 (1 << 1) /* 136 bit response...
// Some boiler-plate code was derived from the micro-ROS examples #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #include "driver/mcpwm.h" #include "esp_log.h" #include "esp_system.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "rotary_encoder.h" ...
/* * Copied from Linux Monitor (LiMon) - Networking. * * Copyright 1994 - 2000 <NAME>. * (See License) * Copyright 2000 <NAME> * Copyright 2000 <NAME> * Copyright 2000-2002 <NAME>, <EMAIL> * SPDX-License-Identifier: GPL-2.0 */ #include <common.h> #include "arp.h" #ifndef CONFIG_ARP_TIMEOUT /* Milliseconds b...
#include <stdlib.h> #include <string.h> #include <stdbool.h> #include "keyboard.h" #include "luaapi/keyboard.h" typedef struct { SDL_Keycode keycode; char const * name; } KeyName; static const KeyName keynames[] = { {SDLK_UNKNOWN, "unknown"}, {SDLK_RETURN, "return"}, {SDLK_ESCAPE, "escape"}...
/*************************************************************************** Attack ufo sound emulation based on MOS 6560 emulator by PeT <EMAIL> ***************************************************************************/ #include <math.h> #include "driver.h" #include "streams.h" #include "sound/custom.h" #inc...
/**************************************************************************//** * @file main.c * @version V3.00 * @brief DS18B20 device driver * * SPDX-License-Identifier: Apache-2.0 * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved. **********************************************...
/* * SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2020-2021 Ericsson AB */ #include <fcntl.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <jansson.h> #include <xcm_addr.h> #include "conf.h" #include "log_domain_conf....
/* * Copyright 2010-2011 <NAME> <<EMAIL>> * * This file is part of mochad. * * mochad is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later ve...
// SoftEther VPN Source Code // Mayaqua Kernel // // SoftEther VPN Server, Client and Bridge are free software under GPLv2. // // Copyright (c) 2012-2014 <NAME>. // Copyright (c) 2012-2014 SoftEther VPN Project, University of Tsukuba, Japan. // Copyright (c) 2012-2014 SoftEther Corporation. // // All Rights...
/****************************************************************************** * FILE: control_manager_SIL.c * DESCRIPTION: * Software in the loop simulation (SILS) environment for V&V of onboard flight program (OFP). * * * University of Minnesota * Aerospace Engineering and Mechanics * Copyright 2011 Regent...
// // BREthereumamount // breadwallet-core Ethereum // // Created by <NAME> on 2/25/18. // Copyright (c) 2018 breadwallet LLC // // 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 Soft...
/* * Copyright (C) 2013 <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. */ #include <stdlib.h> #include <stdio.h> #include <assert.h> #include "ttf2woff.h" s...
/* * RTP input/output format * Copyright (c) 2002 <NAME> * * This file is part of FFmpeg. * * FFmpeg 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; either * version 2.1 of the License, or (at ...
// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "l.h" #include "lib.h" #include "../../pkg/runtime/funcdata.h" static void addvarint(Pcdata *d, uint32 val) { int32 n; uint32 v; uchar *p; n = 0...
#define PY_SSIZE_T_CLEAN #include <Python.h> #include <stdint.h> PyDoc_STRVAR(decode_doc, "Decodes a bytestring containing MUTF-8 as defined in section\n" "4.4.7 of the JVM specification.\n\n" ":param s: A byte/buffer-like to be converted.\n" ":returns: A unicode rep...
/* * (c) HPC Project - 2010-2011 - All rights reserved * */ #include "scilab_rt.h" int __lv0; int __lv1; int __lv2; int __lv3; /*----------------------------------------------------*/ /*----------------------------------------------------*/ int main(int argc, char* argv[]) { scilab_rt_init(argc, argv, COLD_...
#include <stdio.h> #include <conio.h> #define RECORDS 10000 #define NO_FILES 3 #define SIZE_2 2 // structure template struct database{ char college[11]; // changed from 4 to 11 to account for input error, if user enters a value more than 4 the terminated NULL character will be overwritten char firstname[16]; ...
/* * This file is part of the coreboot project. * * Copyright (C) 2011 Advanced Micro 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; version 2 of the License. * * This ...
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2018-2019 IBM Corporation. */ #define __SANE_USERSPACE_TYPES__ #include <sys/types.h> #include <stdint.h> #include <malloc.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <sys/prctl.h> #include "utils.h" #include "../pm...
/* * copyright (c) 2018, <NAME> * SPDX-License-Identifier: MIT */ #include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <string.h> #include <unistd.h> #include <time.h> #include <sys/un.h> #include <sys/ioctl.h> #include <linux/ioctl.h> #include <linux/spi/spidev.h> ...
// SPDX-License-Identifier: GPL-2.0 /****************************************************************************** * * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. * ******************************************************************************/ #include "odm_precomp.h" static u32 edca_sett...
/** * @file sgp40.c * * ESP-IDF driver for SGP40 Indoor Air Quality Sensor for VOC Measurements * * Copyright (C) 2020 <NAME> <<EMAIL>> * * BSD Licensed as described in the file LICENSE */ #include <esp_err.h> #include <esp_idf_lib_helpers.h> #include <esp_log.h> #include "sgp40.h" #include <math.h> #include <f...
#include "audio-writer-filter.h" #include "coreaudio-writer.h" void *coreaudio_library = NULL; #define LOAD_PROC(name) if (!(name = os_dlsym(coreaudio_library, #name))) failed = true; inline bool load_core_audio() { if (coreaudio_library) return true; if (coreaudio_library = os_dlopen("CoreAudioToolbox")) { bool...
/* Copyright (C) 2000, 2001, Silicon Graphics, Inc. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of version 2.1 of the GNU Lesser General Public License as published by the Free Software Foundation. This program is distributed in the hope th...
#include "png.h" #include <stdlib.h> #include <string.h> #include "../../uByte/uByte.h" #include <zlib.h> uint8_t detectPNG(uint8_t *buffer, uint64_t bufferSize) { if (buffer[0] != 0x89 || buffer[1] != 0x50 || buffer[2] != 0x4E || buffer[3] != 0x47 || buffer[4] != 0x0D || buffer[5] != 0x0A || buffer[6] !=...
/* $OpenBSD$ */ /* * Copyright (c) 2007 <NAME> <<EMAIL>> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND...
/* * $FreeBSD$ */ /* * Sun RPC is a product of Sun Microsystems, Inc. and is provided for * unrestricted use provided that this legend is included on all tape * media and as a part of the software program in whole or part. Users * may copy or modify Sun RPC without charge, but are not authorized * to license or...
/* ==================================================================== * Copyright (c) 1999-2004 Carnegie Mellon University. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redis...
///////////////////////////////////////////////////////////////////// // utils // // common utility functions and defines // // <NAME> // @dragonflare921 // <EMAIL> // // #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <math.h> #include <time.h> // fix some #define _PRETTY_PRI...
/* * Copyright 1997, Regents of the University of Minnesota * * compress.c * * This file contains code for compressing nodes with identical adjacency * structure and for prunning dense columns * * Started 9/17/97 * George * * $Id: compress.c,v 1.1 1998/11/27 17:59:12 karypis Exp $ */ #include "metis.h" /*...
#include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <unistd.h> #include <time.h> #define HOSTNAME "ropme-63513a97.challenges.bsidessf.net" #define PORT 1338 // These constants should match the executable #define CODE_LENGTH 0x500000 #define STACK_LENGTH 4096 ...
#include <xbook/process.h> #include <string.h> #include <xbook/pthread.h> #include <xbook/memspace.h> #include <xbook/debug.h> #include <xbook/elf32.h> #include <xbook/schedule.h> #include <arch/interrupt.h> #include <arch/task.h> #include <unistd.h> #include <sys/stat.h> #include <xbook/dir.h> #include <xb...
#include <kitchensink/kitchensink.h> #include <SDL.h> #include <stdio.h> #include <stdbool.h> /* * Note! This example does not do proper error handling etc. * It is for example use only! */ #define AUDIOBUFFER_SIZE (1024 * 64) #define ATLAS_WIDTH 4096 #define ATLAS_HEIGHT 4096 #define ATLAS_MAX 1024 void render_gui...
/* FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify it under ...
#include <stdio.h> #include "../util/mat4.h" #include "mock.h" static int err = 0; int fcmp(float *a, float *b, size_t len) { for (size_t i = 0; i < len; i++) if (a[i] - b[i] > 0.00001 || b[i] - a[i] > 0.00001) return 1; return 0; } void ftest(char *desc, float *a, float *b, size_t len) { if (fcmp(a, b, len...
/* * Copyright (c) 2015-2017 Contributors as noted in the AUTHORS file * * This file is part of ukvm, a unikernel monitor. * * 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 ...
/* GStreamer * Copyright (C) 2015 <NAME> <<EMAIL>> * * gstfacedetect_test: gstreamer facedetect plugin demo application, * part work of Outreachy 2015 project * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published ...
/* * Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2011 The University of Tennessee and The University * of Tennessee Resea...
// Copyright 2016 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #define _POSIX_C_SOURCE 200809L #define _DARWIN_C_SOURCE #define _GNU_SOURCE #include "netprotocol.h" #include <arpa/inet.h> #include <errno.h> #include ...
/* * 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...
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
/* Run: gcc bt6-mediaFormats-padCapabilities.c -o bt6 `pkg-config --cflags --libs gstreamer-1.0` Pads allow information to enter and leave an element. The caps/capabilities of a pad specify what kind of information can travel through the pad, for e.g., 30fps, or 5.1 channels, etc. Pads can support multiple caps and ca...
#include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <sys/socket.h> #include <netdb.h> #include <netinet/in.h> #include <arpa/inet.h> #include <pthread.h> #define SERVER_ADDR "fc00:db20:35b:7399::5" #define SERVER_PORT 5678 #define IP_REQ 100 #define IP_REP 101 #define DATA_SEND 102 #defi...
/* Copyright 2016 by Laboratoire d'Informatique de Paris 6 - Équipe PEQUAN Sorbonne Universités UPMC Univ Paris 06 UMR 7606, LIP6 4, place Jussieu F-75252 Paris Cedex 05 France Laboratoire d'Informatique de Paris 6, equipe PEQUAN, UPMC Universite Paris 06 - CNRS - UMR 7606 - LIP6, Paris, France C...
// SPDX-License-Identifier: GPL-2.0+ /* ap-menu-item.c - Class to represent a Wifi access point * * <NAME> <<EMAIL>> * <NAME> <<EMAIL>> * * Copyright (C) 2005 - 2010 Red Hat, Inc. */ #include "nm-default.h" #include <stdio.h> #include <string.h> #include "mb-menu-item.h" G_DEFINE_TYPE (NMMbMenuItem, nm_mb_me...
/* BSD License Copyright (c) 2005, <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: Redistributions of source code must retain the above copyright notice, this list of conditions and the followin...
/* * Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com * * 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 requir...
#include<lib.h> #include<memory.h> static struct page_list pglists[MAX_REG]; static unsigned long osalloc_base; static struct nodealloc_memory nodemem; #define pgl_bmap_set(pgl, i) do{ \ u32 lword = i >> 5;\ u32 bit = i - (lword << 5);\...
/* * @file test_set.c * @author: <NAME> <<EMAIL>> * @brief unit tests for functions from set.c * * Copyright (c) 2018 CESNET, z.s.p.o. * * This source code is licensed under BSD 3-Clause License (the "License"). * You may not use this file except in compliance with the License. * You may obtain a copy of the L...
/*- * Copyright (c) 2011 NetApp, 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 list of condit...
/* * STM32 Projects * * Copyright (c) 2017 - <NAME> - t<EMAIL> * * The MIT License * * 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...
/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* Fruitpie board configuration */ #include "adc.h" #include "adc_chip.h" #include "common.h" #include "console.h" #include "ec_version.h" #inc...
#include <Python.h> #include <errcode.h> #include "tokenizer.h" #include "pegen.h" // TOKENIZER ERRORS void _PyPegen_raise_tokenizer_init_error(PyObject *filename) { if (!(PyErr_ExceptionMatches(PyExc_LookupError) || PyErr_ExceptionMatches(PyExc_SyntaxError) || PyErr_ExceptionMatches(PyExc_Va...
#include "c-common/software_crc.h" #define CRC8_START 0x0D #define CRC32_START 0xFFFFFFFF static uint32_t Crc32Fast(uint32_t crc, uint32_t data); uint32_t calculateCRC32_software(const void* data, uint32_t length) { uint32_t crc32 = CRC32_START; const uint32_t* ptr = (const uint32_t*)data; uint32_t numEle...
/* ArdaBot by <NAME>, 2019 Автоматическая прокачка персонажей MUD-сервера arda.pp.ru ai.c - обработка стека задач */ #include "main.h" // Базовый функционал ИИ void pushTask( int ); int popTask( void ); void updatePromptData( void ); void ai( void ); // Базовые задачи ИИ bool task_defa...
/* * ESPRESSIF MIT License * * Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD> * * Permission is hereby granted for use on ESPRESSIF SYSTEMS products only, in which case, * it is free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to de...
// // Created by lujun on 19-6-28. // #include "riscv_math.h" #include <stdint.h> #include <stdlib.h> #include "array.h" #include "../common.h" #include "../HelperFunctions/math_helper.c" #include "../HelperFunctions/ref_helper.c" #include <stdio.h> #define DELTAF32 (0.05f) #define DELTAQ31 (63) #define DELTAQ15 (2)...
#include <sys/socket.h> #include <sys/epoll.h> #include <arpa/inet.h> #include <netinet/in.h> #include <fcntl.h> #include <signal.h> #include <time.h> #include "tlpi_hdr.h" #define _DEBUG #ifdef _DEBUG #define __QUOTE(x) # x #define _QUOTE(x) __QUOTE(x) #define log_debug(fmt, ...) do { ...
// // General-purpose Photovoltaic Device Model gpvdm.com - a drift diffusion // base/Shockley-Read-Hall model for 1st, 2nd and 3rd generation solarcells. // The model can simulate OLEDs, Perovskite cells, and OFETs. // // Copyright 2008-2022 <NAME> https://www.gpvdm.com // r.c.i.mackenzie at googlemail.com // // Per...
/* * UniMotion - Unified Motion detection for Apple portables. * * Copyright (c) 2006 <NAME>. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundatio...
#include "rhhm.h" #include "string.h" #include <string.h> #define DISTANCE(p, h) (p >= h ? p-h : p + (hm->data->cap - h)) static u32 djb2(u8 *key, u32 len) { u32 hash = 5381, i; for (i = 0; i < len; i++) { u32 c = key[i]; hash = ((hash << 5) + hash) + c; } return hash; } static int rhhm_is_initialized(rhhm ...
#include <assert.h> #include <ctype.h> #include <err.h> #include <stdio.h> #include <stdlib.h> #include "dnssec.h" #define LEN(a) (sizeof(a) / sizeof((a)[0])) static size_t find_string(const char *str[], size_t len, const char *s) { for (size_t i = 1; i < len; ++i) { if (str[i] && strcmp(str[i], s) == 0) return...
#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <string.h> #include <sys/socket.h> #include <netdb.h> #include <pthread.h> #define STREAM_BUFFER 262144 /* allocated in words of 4 byte each - so, times 4. */ #define PACKET_SIZE 65536 /* #define MYDEBUG 1 ...
/*- * Copyright (c) 1982, 1993 * The Regents of the University of California. 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 copy...
#include "log.h" #include "certify.h" #include "options.h" #include "util.h" #include "cadet_internal.h" #include "heap.h" #include "c2_rl.h" #include "mersenne_twister.h" #include "tests.h" #include <stdio.h> #include <stdbool.h> #include <assert.h> #include <string.h> void print_usage(const char* name) { print...
#include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <sys/types.h> #include <sys/inotify.h> #include <dirent.h> #include <unistd.h> #include <string.h> #include <curl/curl.h> #include "common.h" #include "logger.h" #include "module.h" #include "modules.h" #include "permissions.h" #include "irc.h" #include...
/* xPL_Hub.c -- Implementation of an xPL Hub using xPLLib */ /* Copyright (c) 2004, <NAME>. */ #include <stdio.h> #include <signal.h> #include <sys/types.h> #include <sys/wait.h> #include <syslog.h> #include <stdarg.h> #include "../xPL.h" #define MAX_HUB_RESTARTS 10000 static Bool daemonMode = TRUE; static Bool de...
#include <stdio.h> #include <stdint.h> #include <gmp.h> #include <stdbool.h> #include "randstate.h" #include "numtheory.h" // Computes the greatest common divisor of a and b, storing the value of the computed divisor in d. void gcd(mpz_t d, mpz_t a, mpz_t b) { mpz_t temp, a_val, b_val; mpz_inits(temp, a_val, ...
/* -*- c-basic-offset: 8; -*- */ /* mp3.c: libshout MP3 format handler * $Id: mp3.c 7259 2004-07-22 18:49:41Z brendan $ * * Copyright (C) 2002-2003 the Icecast team <<EMAIL>> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * Lice...
/* * it doesn't get more basic than this... */ #include "all.h" #include "io.h" typedef struct Ctrl Ctrl; enum { MaxCtrl = 1, NTargetID = 8, CtrlID = 7, DmaAlign = 64, /* 0x00000040 */ DmaBank = 512*1024, /* 0x00080000 */ MaxDmaIO = RBUFSIZE, }; #define ALIGNED(x, y) (((((x)|(y)) & (DmaAlign-1)) == 0...
#include "header.h" #include "hash_table.h" //------------------------------------------------------------------------------------ unsigned int get_hash_size (unsigned int size); int hash_extend (hash_table* Hash); //------------------------------------------------------------------------------------ #define HA...
/* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that...
/************************************************************************************************************************ Copyright (c) 2016, Imagination Technologies Limited and/or its affiliated group companies. All rights reserved. Redistribution and use in source and binary forms, with or without modification, ...
#include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/unistd.h> #include <sys/time.h> #include <getopt.h> #include <termios.h> #include <time.h> #include <sys/time.h> #include <math.h> #include <stdi...
#include "bpt.h" static node * delete_entry( node * root, node * n, KEY_T key, void * pointer ); /* Retrieves the index of a node's nearest neighbor * (sibling) to the left if one exists. If not (the * node is the leftmost child), returns -1 to signify * this special case. */ static KEY_T get_neighbor_index( node...
/* Copyright (c) 2012, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list ...
/* Copyright 2009, <NAME> Licenced under Academic Free License version 3.0 Review OpenUsbLd README & LICENSE files for further details. */ #include "include/opl.h" #include "include/pad.h" #include "include/ioman.h" #include <libpad.h> #include <timer.h> #include <time.h> #define MAX_PADS 4 // Cpu ticks per on...