text
stringlengths
3.08k
10.5k
#include <Common.h> #include <System/SysAll.h> #include <UI/UIAll.h> /* Begin generated C code. */ #include <stdio.h> #include <errno.h> // #include <math.h> #ifndef Runtime_C_h #define Runtime_C_h /*----------------------------------------------------------------* * Declaration of constants ...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <mpi.h> #define MIN(a, b) ((a) < (b) ? (a) : (b)) int main(int argc, char *argv[]) { long count = 0; /* Local prime count */ double elapsed_time = 0; /* Parallel execution time */ long first_multiple_index = ...
/* rtd_table.c * Helper routines common to all RTD taps. * Based on srt_table.c * * Wireshark - Network traffic analyzer * By <NAME> <<EMAIL>> * Copyright 1998 <NAME> * * SPDX-License-Identifier: GPL-2.0-or-later */ #include "config.h" #include <string.h> #include "proto.h" #include "packet_info.h" #include...
/* * 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 ...
#include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <signal.h> #include <stdint.h> #include <stdlib.h> #include <unistd.h> #include "network.h" #include "noeintr.h" #include "s3_request_queue.h" #include "sock.h" #include "sock_util.h" ...
/* * Copyright (c) 2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies. * * THE SOFTWARE IS PROVI...
/* Copyright 2021 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. * * Test ec version */ #include "common.h" #include "ec_commands.h" #include "stddef.h" #include "system.h" #include "util.h" #include "test_util.h"...
#define _GNU_SOURCE /* for asprintf */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <errno.h> #include <signal.h> #include "../include/parser.h" #include "../include/debug.h" #include "../include/communicator.h...
/* * mad - MPEG audio decoder * Copyright (C) 2000-2001 <NAME> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. ...
/* * The MIT License (MIT) * * Copyright (c) 2019 <NAME> (github.com/abradianu) * * 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 ...
/* * trans.c - Matrix transpose B = A^T * * Each transpose function must have a prototype of the form: * void trans(int M, int N, int A[N][M], int B[M][N]); * * A transpose function is evaluated by counting the number of misses * on a 1KB direct mapped cache with a block size of 32 bytes. */ #include <stdio.h...
/******************************* ASA - Grupo 20 ******************************* ** <NAME> - 77906 ** <NAME> - 84711 *******************************************************************************/ /* C Libraries. Only the bare minimum, no need for clutter */ #include <stdio.h> #include <stdlib.h> /**************...
/** * Octopipes * Developed by <NAME> * * MIT License * Copyright (c) 2019-2020 <NAME> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limi...
/* Copyright (c) 2014 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...
/* * File: init_acmp.c * Author: M91406 * * Created on July 9, 2019, 11:12 AM */ #include <xc.h> #include <stdint.h> #include <stdbool.h> #include "init_acmp.h" volatile uint16_t init_acmp_module(void) { // Make sure power is turned on to comparator module #1 & #2 PMD7bits.CMP1MD = 0; // Comparato...
/*************************************************************************** * __________ __ ___. * Open \______ \ ____ ____ | | _\_ |__ _______ ___ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / * Jukebox | | ( <_> ) \___| < | \_\ ( <_> ...
// (Paylaşan: Ihsan) #include <stdio.h> #include <stdlib.h> #include <time.h> void randomValue(int arr[], int n); void copyArr(int arr[], int arr2[], int n); void insertionSort(int arr[], int n); void binaryInsertionSort(int a[], int n); void selectionSort(int arr[], int n); void bubbleSort(int arr[], int n); void q...
/* SHA1 implementation. Copyright 2021 <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 agreed to in w...
/* Copyright 2013-present Barefoot Networks, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
#include <stdio.h> #include <stdlib.h> #include "char_io.h" #include "common_settings.h" void copy_input_to_output() { /* * pseudo codice: * leggi un carattere * while (carattere non indica la fine del file) * scrivi il carattere appena letto * leggi un carattere * */ printf("copy_input_to_outp...
/** * @file image.c * @date Feb 24, 2020 * @author <NAME> | <<EMAIL>> * @copyright Copyright (c) 2020 <NAME>. * This project is released under the MIT License. * ------------------------------------------------------------------------- * BAS2IMG - The "source code to image" converte...
/* Random-number generator adapted from NumPy’s randomkit.c and randomkit.h Copyright (c) 2003-2005, <NAME> (<EMAIL>); 2017, <NAME> The rk_random and rk_seed functions algorithms and the original design of the Mersenne Twister RNG: Copyright (C) 1997 - 2002, <NAME> and <NAME>, All rights reserved. Redis...
#include <stdlib.h> #include <stdio.h> #include "ilist.h" #include "block_io.h" #include "freelist.h" #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define TRUE 1 #define FALSE 0 static block_id ILIST_HEAD; static block_id BITMAP_HEAD; static unsigned long ILIST_LENGTH; static unsigned int *INODE_BITMAP; static int INODE...
/* ************************************************************* *\ * images.c * * * * Project: NotificaThor * * Author: <NAME> (<EMAIL>) * * ...
#include "../common.h" KCMFF_LoadedMap _KCMFF_SaveMap; #define smap _KCMFF_SaveMap void KCMFF_BeginSave(char* name, uint32_t nameLen) { smap.name = name; smap.nameLen = nameLen; smap.head.magic = KCMFF_MAGIC_NUMBER; smap.head.v_major = KCMFF_VERSION_NUMBER; } void KCMFF_EndSave() { FILE* fp; int32_t err = fope...
/* ** protocol.c ** Library regrouping protocol-based functions ** ------------------------------------------ ** Made by <NAME> ** Last modified : 16/12/2019 */ #include "protocol.h" /************************************************************************/ /* I : socket from which receive data ...
/* The eXtended Keccak Code Package (XKCP) https://github.com/XKCP/XKCP Keccak, designed by <NAME>, <NAME>, <NAME> and <NAME>. Implementation by the designers, hereby denoted as "the implementer". For more information, feedback or questions, please refer to the Keccak Team website: https://keccak.team/ To the exten...
#include "function.h" #include <curses.h> #include <string.h> #include <stdio.h> #include <unistd.h> #include <time.h> #include <stdlib.h> void run(); int main(int argc,char **argv) { initscr(); //curses noecho(); //curses cbreak(); //curses keypad(stdscr,TRUE); //curses run(...
/* * Copyright (c) 2018 <NAME> */ #include <stdlib.h> #include <string.h> #include <assert.h> #include "gears_layerHud.h" #include "gears_overlay.h" #include "a3d/a3d_unit.h" #define LOG_TAG "gears" #include "a3d/a3d_log.h" /*********************************************************** * private ...
/* @(#) interface/address conversion */ #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/types.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <net/if.h> #include <stdlib.h> #include <netinet/in.h> #include <arpa/inet.h> #include <assert.h> #include <limits.h> #include "osdef.h" #i...
#include <include/mm/heap.h> #include <include/helpers.h> #include <string.h> // Idenitifies that the bitmap's entry is free to use static const uint8_t FREE = 0; void memheap_init(memheap_t *heap) { heap->head = NULL; } // The bitmap of a superblock is located directly after the superblock itself. // T...
/*- * SPDX-License-Identifier: Zlib * * Copyright (c) 2009-2018 <NAME> <<EMAIL>> * For conditions of distribution and use, see LICENSE file */ #pragma once #include <ananas/types.h> /* * Overview * -------- * * On amd64, we can use the entire 64-bit address space - however, physical * addresses are 'just' 5...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <stdint.h> #include <limits.h> #include <fcntl.h> #include <unistd.h> #include <sys/ioctl.h> #include <sys/time.h> #include <getopt.h> #include <malloc.h> #include <ring_buffer.h> #include <ring_buffer_scif.h> #include <ring_buffer_...
#pragma ident "$Id: tokens.c,v 1.4 2016/09/01 17:08:34 dechavez Exp $" /*====================================================================== * * Set or restore data port configuration * *====================================================================*/ #include "qcal.h" static UINT32 delay = 250; static i...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* tokenizer.c :+: :+: :+: ...
#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdio.h> #include <stdlib.h> void DumpKeyRecursive (HKEY hKey, LPCSTR RootName); void main (int argc, char *argv[]) { HKEY hKeyRoot, hKey; LPCSTR Arg; DWORD rc; if (argc != 2 || (argv[1][0] == '-' || argv[1][0] == '/')) { ...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <unistd.h> #include <getopt.h> #include <stdbool.h> #include "simplified_des.h" void encrypt_file(char *input_filename, char *output_filename, uint16_t key, uint8_t num_rounds); void print_usage(char *prog_name) { printf("usage...
#include "mruby.h" #include <stddef.h> #include <string.h> #include "mruby/array.h" #include "mruby/class.h" #include "mruby/data.h" #include "mruby/hash.h" #include "mruby/string.h" #include "mruby/variable.h" #if MRUBY_RELEASE_NO < 10000 #include "error.h" #else #include "mruby/error.h" #endif static mrb_value...
#define MAX_INPUT_LENGTH 163840 #define GAP 10 #define MISMATCH 1 #define OPENGAP 3 #define COMBINATIONMX 500 #define LENGTH_PER_LINE 100 /* #define BLASTALL "nice -2 /home/daddy/BLAST/blastall" #define FASTADIR "nice -2 /home/daddy/FASTA" #define BLASTDBENV "/home/daddy/dt/blast" #define NCBIENV "/bioinfnv/softw...
/** ****************************************************************************** * @file USART/HalfDuplex/main.c * @author MCU SD * @version V1.0 * @date 26-Dec-2014 * @brief The main function file. ********************************************************************...
/* * Copyright (c) 2015 Balabit * * 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, or (at your option) any later version. * * This program is distributed in the hope that it will...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <regex.h> #include "http.h" // Checks if given C-string is a valid HTTP request int http_verify(const char* raw) { // Regex will be not be freed static regex_t reg; static int compiled = 0; if(!compiled) { if(regcomp(&reg, HTTP_REGEX, REG...
//===--------------------------------------------------------------------------------------------=== // properties.h - Functions used to query basic properties of Unicode scalars // This source is part of UniC // // Created on 2019-06-29 by <NAME> <<EMAIL>> // Copyright (c) 2018 <NAME> // Licensed under the MIT License...
// SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2018-2019 Intel Corporation #include <linux/bitfield.h> #include <linux/mfd/core.h> #include <linux/mfd/intel-peci-client.h> #include <linux/module.h> #include <linux/of_device.h> #include <linux/peci.h> #define CPU_ID_MODEL_MASK GENMASK(7, 4) #define CPU_ID_FAMILY...
#include <stdlib.h> #include <string.h> #include <stdio.h> #include "memory.h" #include "object.h" #include "table.h" #include "value.h" // Double the bucket count when hash is 75% "full", disregarding the // possibility that some buckets may already have more than one entry in it #define TABLE_MAX_LOAD 0.75 void ...
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details // This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details #include "lualib.h" #include <string.h> #include <time.h> #ifdef __clang__ #pragma clang diag...
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.0.0 * svn version: exported * Options: --check-global -s 1166 * Seed: 1166 */ #include "random_runtime.h" long __undefined; /* --- Struct/Union Declarations --- */ /* --- GLOBAL VARIABLES --- */ int32_t g_3[7][4][1] = {{{-1L}, {-1L}, {...
/******************************************************************************* NAME: DSTIMG PURPOSE: Display the contents of the general DDR fields to the specified device. PROGRAM HISTORY: PROGRAMMER DATE REASON ---------- ---- ------ <NAME> Feb. 1988 original development <NAME> Ju...
/*************************************************************************/ /* udp_client.c */ /*************************************************************************/ /* Simple UDP Echo Client Example */ /* Sends a singl...
#define FB_GREEN 2 #define FB_DARK_GREY 8 #include "io.h" #define SERIAL_COM1_BASE 0x3F8 /* COM1 base port */ #define SERIAL_DATA_PORT(base) (base) #define SERIAL_FIFO_COMMAND_PORT(base) (base + 2) #define SERIAL_LINE_COMMAND_PORT(base) (base + 3) #define SERIAL_MODEM_COMMAND_PORT(b...
/*=====[motorDrive]=========================================================== * Author <NAME> <<EMAIL>> * All rights reserved. * Version: 1.0.0 * Creation Date: 2020/08/14 */ /*=====[Inclusion of own header]=============================================*/ #include "sapi.h" #include <motorDrive.h> /*=...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (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 * or http://www.opensolar...
#include <stdio.h> #include <string.h> #include <sys/socket.h> #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "esp_err.h" #include "context.h" #include "error.h" #include "syslog.h" #define SYSLOG_BUF_MAX_SIZE (4 * 1024) #define SYSLOG_SOCKET_MAX_SIZE 1024 #define SYSLOG_WAIT_TIME_MS 200...
/*- * Copyright (c) 2015 <NAME> <<EMAIL>> * Copyright (c) 2004-2010 <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 a...
/* Copyright 2012 <NAME> <<EMAIL>> This software is licensed with a Modified BSD License. All of this is supposed to be Free Software, Open Source, DFSG-free, GPL-compatible, and OK to use in both free and proprietary applications. Additions and corrections to this file are welcome. Redistribution and use in source ...
/* Simple message-passing test program for kLab simulator adapted from * OpenMPI sample program ring_c.c by <NAME>. * Later modified to be a thread based version by <NAME>. */ /* * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * University Research and Technology ...
/* * Copyright (c) 2015-2017, Texas Instruments Incorporated * 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 * n...
// <NAME> // 111601021 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <limits.h> #include <ctype.h> // queue implementation. struct queue{ int maxSize; int first; int last; int size; int *a; }; typedef struct queue* queue; queue newQueue (int max); void enQueue (queue q...
#include "isyslog.h" #include "iatom.h" #include <string.h> #include <stdio.h> #include <unistd.h> #include <time.h> #include <stdarg.h> #include <dirent.h> #include <sys/types.h> #include <sys/stat.h> #define IOCSYSLOG_LOGIDR "./oclog" #if IOCSYSLOG_SWITCH == 1 struct IOCSYSLOG { int8_i ...
/* IBEX UK LTD http://www.ibexuk.com Electronic Product Design Specialists RELEASED SOFTWARE The MIT License (MIT) Copyright (c) 2013, IBEX UK Ltd, http://ibexuk.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to d...
/* * Copyright (C) 2016 Whaley Technology Co., Ltd. * <NAME> <<EMAIL>> * * 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...
#include "HeroInfo.h" void HeroInfo_Load_ini(struct HeroInfo* info, ASHANDLE hFile) { if (info == NULL) return; info->speed = (float)ASIniGetInt(hFile, "基本信息", "出手速度", 10); info->minAttack = ASFileGetHeroInfo_ini(hFile, "最小攻击", 0); info->maxAttack = ASFileGetHeroInfo_ini(hFile, "最大攻击", 0); if (info->minA...
// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2017 Linaro * <NAME> <<EMAIL>> */ #include <dm.h> #include <common.h> #include <asm/io.h> #include <dm/platform_data/serial_pl01x.h> #include <asm/arch/hi3798cv200.h> #include <asm/arch/dwmmc.h> #include <asm/armv8/mmu.h> DECLARE_GLOBAL_DATA_PTR; static stru...
/* * Block device emulated in RAM * * Copyright (c) 2017, Arm Limited. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause */ #include "bd/lfs_rambd.h" int lfs_rambd_createcfg(const struct lfs_config *cfg, const struct lfs_rambd_config *bdcfg) { LFS_RAMBD_TRACE("lfs_rambd_createcfg(...
/* * FreeRTOS Kernel V10.2.0 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, ...
// vim:ts=4:sw=4:expandtab #include <config.h> #include <sys/socket.h> #include <sys/stat.h> #include <stdlib.h> #include <ifaddrs.h> #if defined(__OpenBSD__) || defined(__DragonFly__) #include <sys/types.h> #include <sys/sockio.h> #include <sys/ioctl.h> #include <net/if.h> #endif #if defined(__OpenBSD__) #include <net...
/* * Copyright 1995-2018 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/l...
/* Tone Genrator * It uses the functionality of ESP32's cosine waveform generator and develop a simple API to operate it. * It also uses UART0 to read integers from 0 to 65536 from the terminal to update the frequency step and, * consequently, update the generated frequency. * Lastly, timer0 interrupt enable and di...
/* mtest6.c - memory-mapped database tester/toy */ /* * Copyright 2011-2018 <NAME>, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted only as authorized by the OpenLDAP * Public License. * * A copy of this license is available...
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights...
/* See LICENSE file for copyright and license details. */ /* Constants */ #define TERMINAL "st" #define TERMCLASS "St" #define BROWSER "qutebrowser" #define EDITOR "vim" #define PDFREADER "zathura" #define FILEBROWSER "lf" /* appearance */ static unsigned int borderpx = 6; /* border pixel of windows */ static unsign...
#include "config_util.h" int get_enum_value(const char *enumstr) { fprintf(stdout, "%s\n", enumstr); return 0; } int read_table_file(void *table, FILE *fp, int *numEntries, char *specifier) { int rc; char line[256]; *numEntries = 0; // No one's going to have more than 32 columns... right? ...
// SPDX-License-Identifier: GPL-2.0-only /* * oxfw_command.c - a part of driver for OXFW970/971 based devices * * Copyright (c) 2014 <NAME> */ #include "oxfw.h" int avc_stream_set_format(struct fw_unit *unit, enum avc_general_plug_dir dir, unsigned int pid, u8 *format, unsigned int len) { u8 *buf; int err;...
/* * Multi2Sim * Copyright (C) 2012 <NAME> (<EMAIL>) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ...
/* $NetBSD: mkastosc.c,v 1.3 1997/01/09 20:22:50 tls Exp $ */ /*- * Copyright (c) 1988 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. R...
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <math.h> #include "geofence.c" #include "travel.c" #define max_cercas 5 #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define MIN(x, y) (((x) < (y)) ? (x) : (y)) typedef struct car{ char *placa; position posAtual; geofence at...
#include "arg_parser.h" #include "parallax.h" #include <assert.h> #include <btree/gc.h> #include <log.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #define KV_SIZE 1500 #define KEY_PREFIX "ts" #define NUM_KEYS num_keys #define TOTAL_KEYS 0 uint64_t num_keys = 1000000; int update_half = 0; /** * This...
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/select.h> #include <linux/kd.h> #include <termios.h> #include <string.h> #include "../include/c-serial-com.h" #include "../include/kbd.h" /* KBDUS means US Keyboard Layout. This is a scancode table * used to layout a stan...
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2020 RDK Management * * 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 ...
/* * RedSpark demuxer * Copyright (c) 2013 <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 your op...
#include"SimpleMOC_header.h" // generates a random number between 0 and 1 float urand(void) { return (float)rand() / (float)RAND_MAX; } /* generates a random number from a normal distribution of a * given mean and standard deviation (Box-Muller) */ float nrand(float mean, float sigma) { // generate two random num...
#include <stdio.h> #include <time.h> #include <string.h> #include <assert.h> #include "alg.h" // Compare two values. int compare(void* a, void* b, const size_t size, int (*deep)(void*, void*)){ if (deep != NULL) { return deep(a, b); } else { // This should probably have a more formal exit. ...
/* dosish.h * * Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999, * 2000, 2001, 2002, 2007, by <NAME> and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * */ #define ABORT() abort(); #ifndef SH_PA...
/* * 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...
/******************************************************************************************* * * raylib [textures] example - bunnymark instanced * * Based on the the existing textures_bunnymark example. * ********************************************************************************************/ #include "raylib...
/* $OpenBSD: appletalk.h,v 1.8 2007/10/07 16:41:05 deraadt Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993, 1994, 1995, 1996 * 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: (...
/* * src/rsa.c * * RSA stuff for cryptopals.com challenges. */ #include <stdlib.h> #include "compat.h" #include "rsa.h" #include "mpi.h" /* * Key generation for RSA public-key encryption, * see the Handbook of Applied Cryptography §8.1. */ int rsa_keygen(const size_t bits, struct rsa_privkey **privk_p, ...
/** * @file * * @author <EMAIL> * * Copyright (c) 2015 Battelle Memorial Institute. */ #include "config.h" #include <stdint.h> #include <stdlib.h> #include "parasail.h" #include "parasail/memory.h" #define NEG_INF_32 (INT32_MIN/2) #define MAX(a,b) ((a)>(b)?(a):(b)) #ifdef PARASAIL_TABLE #define ENAME parasail...
/* * EAP peer method: Test method for vendor specific (expanded) EAP type * Copyright (c) 2005-2006, <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. * * Alt...
/* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */ /* $Id$ */ /* D E C L A R A T I O N S P E C I F I E R C H E C K I N G */ #include "assert.h" #include "Lpars.h" #include "decspecs.h" #include "arith.h...
/* * PCIe with ECAM * * notes: * type 0 config header PCI-Express-Base-Spec-v3.0.pdf pg 595 * https://en.wikipedia.org/wiki/PCI_configuration_space * * https://stackoverflow.com/questions/19006632/how-is-a-pci-pcie-bar-size-determined * https://wiki.osdev.org/PCI * https://wiki....
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, * check out http://www.gromacs.org for more information. * Copyright (c) 2012,2013, by the GROMACS development team, l...
#include<stdio.h> #include<string.h> #define SIZE 3 #pragma pack(1) #define TRUE 1 #define FALSE 0 struct date { int dd; int mm; int yy; }; struct emp { int empno; char empname[10]; float sal; struct date doj; }; /*struct emp { int empno; char empname[10]; float sal; struct date { int dd; int mm; int ...
/* * Copyright (C) 2012 <NAME> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <asm/arch/clock.h> #include <asm/arch/funcmux.h> #include <asm/arch/pinmux.h> #include <asm/arch-tegra/ap.h> #include <asm/arch-tegra/board.h> #include <asm/arch-tegra/tegra.h> #include <asm/gpio.h> #include <asm/...
#include <stdio.h> #include <sys/select.h> #define SOCK_BUFFER_SIZE 8192 #define FILE_BUFFER_SIZE 4096 long queryResourceSize(int socket, char *path, char *host, int useWindowStyle) { long retValue = 0; char *windowsNewLine = "\r\n"; char *linuxNewLine = "\n"; char *newLine = useWindowStyle ? wind...
/* * ***** BEGIN LICENSE BLOCK ***** Copyright (C) 2009-2016 <NAME> and <NAME> Copyright (C) 2017-2019 <NAME> Copyright (C) 2020-2021 <NAME> and Rubicon Communications, LLC(Netgate) This file is part of CLIXON. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.c :+: :+: :+: ...
#include "file.h" #include <dirent.h> //katalogi #include <stdio.h> #include <string.h> #include <sys/stat.h> #include <assert.h> #include <unistd.h> //close #include <fcntl.h> //open, read #include <sys/mman.h> //mmap #include <syslog.h> FILE_TYPE get_file_type(const char* path){ struct stat st; stat(path, &...
/* ** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) ** Copyright (C) [dates of first publication] Silicon Graphics, Inc. ** All Rights Reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to dea...
/* * Copyright (c) 2016, SICS Swedish ICT AB * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of...