text
stringlengths
3.08k
10.5k
/* Explanation: This file works for downloading the data missing --> manual input Compile using: * mpicc -g -o CURATE CURATE.c * mpiexec -f hosts -n 18 ./CURATE */ #include <stdlib.h> #include <string.h> #include <stdio.h> #include <time.h> #define DATA_MSG 0 #define NEWDATA_MSG 1 int nnodes; int me; int re...
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <aos/aos.h> #include <k_api.h> #include <mbmaster_api.h> #define TEST_CONFIG_STACK_SIZE 256 static ktask_t g_task; static cpu_stack_t stack_buf[TEST_CONFIG_STACK_SIZE]; #define READCOILS_TEST 0 #define ZZ_S_TH_C 0 #de...
//***************************************************************************** // //! @file hello_world.c //! //! @brief A simple "Hello World" example. //! //! This example prints a "Hello World" message with some device info //! over SWO at 1M baud. To see the output of this program, run AMFlash, //! and configure t...
/* illuminaLookup2 - validate illumina SNP arrays. */ /* report if SNP missing */ /* report unexpected position */ /* check strand */ /* check observed */ /* report if class != single */ /* report if locType != exact */ /* Copyright (C) 2013 The Regents of the University of California * See README in this or parent ...
#include "gb.h" static int noise_seed = 0; /* This is not a complete emulation of the camera chip. Only the features used by the GameBoy Camera ROMs are supported. We also do not emulate the timing of the real cart, as it might be actually faster than the webcam. */ static uint8_t generate_noise(uint8_t x, uint8...
// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell //...
/* Copyright (c) 2016, MariaDB Corp. 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; version 2 of the License. This program is distributed in the hope that it will b...
#include "config.h" #include "common.h" #include <pcre.h> #include <stdlib.h> #include <string.h> struct config *config; void free_config() { int i=0; while (config->ops[i]) free(config->ops[i++]); i=0; while (config->channels[i]) free(config->channels[i++]); free(config->nick); free(config->user); free(conf...
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for * * details. If they are missing then this copy is in violation of * * the copyright conditions. */ /* ** lib_options.c ** ** The routines to handle option setting. ** */ #include <stdlib.h> #include "ter...
#include "noizu_trie.h" TRIE_TOKEN noizu_trie__next_char(struct noizu_trie_state* state, struct noizu_trie_definition* definition, uint8_t* out_c) { if (state->skip_next) { if ((state->req_position + state->skip_next) < state->req->buffer_size) { state->req_position += state->skip_next; state->skip_nex...
#include <stdio.h> #include <stdlib.h> //definizione di un nodo come struttura struct node{ int info; struct node *next; }; //definizione con typedef per usare Node al posto di "struct node" typedef struct node *Node; //prototipi funzioni per gestione liste (L06) void list_delete(int n, Node l); Node list_sea...
#include "hw/azure_sphere_learning_path.h" #include "dx_azure_iot.h" #include "dx_config.h" #include "dx_exit_codes.h" #include "dx_terminate.h" #include "dx_timer.h" #include "buzzer_alert.h" #include "co2_manager.h" #include "connected_status.h" #include "hvac_status.h" #include "location_from_ip.h" #include "app...
/* * 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...
/* ** mrbtest - Test for Embeddable Ruby ** ** This program runs Ruby test programs in test/t directory ** against the current mruby implementation. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <mruby.h> #include <mruby/proc.h> #include <mruby/data.h> #include <mruby/compile.h> #include <mr...
/* ucg_dev_tft_240x320_ili9341.c ILI9341 with 4-Wire SPI (SCK, SDI, CS, D/C and optional reset) Universal uC Color Graphics Library Copyright (c) 2014, <EMAIL> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the fo...
/* Implementations for whio gzip support. Author: <NAME> (http://wanderinghorse.net/home/stephan/) License: Public Domain */ #include <wh/whio/whio_zlib.h> #include <wh/whio/whio_config.h> #if WHIO_ENABLE_ZLIB #include <zlib.h> #endif /* WHIO_ENABLE_ZLIB */ int whio_stream_gzip( whio_stream * src, whio_stream...
/* package: libsdl2-dev libsdl2-ttf-dev gcc sdl_rect.c -o sdl_rect -lSDL2 -lSDL2_ttf 'fleches' : déplacement 'RGB': active RGB channel 'rgb': désactive RGB channel */ #include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> #define D_WINDOW_WIDTH (800) #define D_WINDOW_HEIGHT (600) /* déplacement step */ int speed= 20; ...
/* * Copyright 2021-present MongoDB, 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 ag...
// NOTE : we need root permissions to run this program #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> #include <errno.h> #define NUM_OF_PRINTS 25 pthread_t childThreadA; pthread_t childThreadB; void checkPthreadSupport() { printf("Support %d\n", _POSIX_THREAD_PRIORITY_SCHEDULING); ...
#include "renderer.h" #define WHITE_COLOR (vec4){1.0f, 1.0f, 1.0f, 1.0f} uint32_t quadCount = 0; const uint32_t quadSize = sizeof(Vertex) * 4; const uint32_t maxQuadCount = 1000; const uint32_t maxVertexCount = maxQuadCount * 4; const uint32_t maxIndexCount = maxQuadCount * 6; const uint32_t maxTextures = 32; unsign...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
/* * This file is part of the coreboot project. * * Copyright (C) 2008 <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distributed in th...
#include <stdio.h> #include <stddef.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <errno.h> #include <stdbool.h> #include <math.h> #include <time.h> #include <omp.h> #include "countmin.h" #include "prng.h" #define DEFAULT_SIGMA_SIZE 26 #define ADJUST_SEQ_SIZE ...
/** */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "pico/stdlib.h" #include "pico/bootrom.h" #include "hardware/pio.h" #include "hardware/clocks.h" #include "hardware/structs/pwm.h" #include "hardware/pwm.h" #include "econet_ll.h" // Hardware configuration to pass to the low level drivers st...
#include <allocator.h> #include <hash_table.h> #include <math.h> #include <objects/object.h> #include <stdlib.h> #include <string.h> #define HASH_TABLE_INITIAL_SIZE (7) #define HASH_TABLE_RESIZE_TOP_THRESHOLD (70) #define HASH_TABLE_RESIZE_DOWN_THRESHOLD (20) #define HASH_CONST_1 (37) #define HASH_CONST_2 (53) stati...
/* ========================================================================= ** ** ____ ** ** ____ _________ _/ __/_______ ** ** / __ \/ ___/ __ `/ /_/ ___/ _ \ ** ...
/* * Copyright (c) 2018, Sensirion AG * 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 conditio...
// Slowly show a single sample, frame by frame. Used for exporting to movie. #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> #include <string.h> #include "easypng.h" int SAMPLES_STEP = 100; const int IQ_RESOLUTION = 256; const int SIZE_MULTIPLIER = 4; const int IMAGE_...
/*- * Copyright (c) 2011-2013 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
/* * Copyright (c) 1983, 1988 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that this notice is preserved and that due credit is given * to the University of California at Berkeley. The name of the University * may n...
/* Copyright (c) 2010-2013 <NAME> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and ...
/** * Copyright (c) <NAME> <andreas[dot]fitzek[at]gmail[dot]com> * All rights reserved. * * Redistribution and use in source and binary forms, * with or without modification, are permitted provided * that the following conditions are met: * Redistributions of source code must retain the above * copyright no...
#include <string.h> #include <stdio.h> #include <unistd.h> #include <stddef.h> #include <gui/console/console.h> #include <gui/console/cursor.h> #include <gui/console/clipboard.h> #include <gui/mouse.h> #include <gui/screen.h> #include <xbook/kmalloc.h> clipboard_t clipboard; int init_clipboard() { clipboard.cli...
#include "fitz-internal.h" /* TODO: error checking */ enum { MIN_BITS = 9, MAX_BITS = 12, NUM_CODES = (1 << MAX_BITS), LZW_CLEAR = 256, LZW_EOD = 257, LZW_FIRST = 258, MAX_LENGTH = 4097 }; typedef struct lzw_code_s lzw_code; struct lzw_code_s { int prev; /* prev code (in string) */ unsigned short length;...
#include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <string.h> #include <assert.h> // Converts a byte array to an uint32_t #define into_u32(bytes) (uint32_t)((bytes[0] << 24) + (bytes[1] << 16) \ + (bytes[2] << 8) + bytes[3]) /* Table of CRCs of all 8-bit messages. */ uint32_t crc_table[256]...
// kmlib (kbz_8 memory library) project is a mini project for fun. // // AUTHOR: kbz_8 // CREATED: 01/09/2021 // UPDATED: 05/09/2021 #include "kmlib.h" static block* head = NULL; static block* tail = NULL; static unsigned long long gc_leaks_bytes = 0; static bool is_gc_init = false; static bool is_cleanup_activated ...
/* * $Id: math_sincos.c,v 1.0 2022-03-11 12:04:23 clib2devs Exp $ */ #ifndef _MATH_HEADERS_H #include "math_headers.h" #endif /* _MATH_HEADERS_H */ /* Constants used in polynomial approximation of sin/cos */ static const double one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ ...
#include <assert.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <lame/lame.h> #include <hi_comm_adec.h> #include <mpi_audio.h> #include <mpi_sys.h> #include "errors.h" static void hip_debug(const char *format, va_list ap) { printf(format, ap); } static void hip_error(const char *format, va...
///////////////////////////////////////////////////////////////////////////////////////////// // Copyright 2017 Intel Corporation // // 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 // /...
#include <../../nrnconf.h> /* The following routines support the concept of a list. That is, one can insert at the head of a list or append to the tail of a list with linsert<type>() and lappend<type>(). In addition, one can insert an item before a known item and it will be placed in the proper list. Items point to ...
/* <one line to give the program's name and a brief idea of what it does.> * Copyright (C) 2007 University of Rostock * * 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 ...
#include <inttypes.h> #include <sxpd.h> #include <config.h> #include <debug.h> #include <radix.h> #include <util.h> #include <../src/sxpd_internal.h> #define TEST_SUCCESS 0 #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" static bool bits_match(const uint8...
#include <u.h> #include <libc.h> #include <bio.h> #include "../zc/z.out.h" typedef struct Adr Adr; typedef struct Prog Prog; typedef struct Sym Sym; typedef struct Optab Optab; typedef struct Auto Auto; #define P ((Prog*)0) #define S ((Sym*)0) #define TNAME (curtext?curtext->from.sym->name:noname) #define nelem(x)...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* print_header.c :+: :+: :+: ...
#include <stdio.h> #include <omp.h> #include <limits.h> #include <stdlib.h> #include <string.h> #include "ompdist/tree_gen.h" #include "ompdist/utils.h" #include "config.h" int ROOT; typedef struct { int color; int recv; int again; int parent; } payload; /** * num_digits - Number of digits (in bin...
// Copyright 2016 <NAME> <<EMAIL>>. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "run68.h" #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #define fprintf(...) extern void jsrt_dos...
/** This file is in the public domain. * * * @homepage http://github.com/pabigot/bsp430 * */ #include <bsp430/platform.h> #include <bsp430/clock.h> #include <bsp430/utility/uptime.h> #include <bsp430/utility/console.h> #include <bsp430/periph/timer.h> #include <bsp430/periph/port.h> #include <bsp430/utility/led.h...
/* * $Id: ip_util.c,v 1.14 2010/03/17 18:57:01 aland Exp $ * * Copyright (C) 1995,1996,1997 <NAME> * * Copyright 1992 Livingston Enterprises, Inc. * * Copyright 1992,1993, 1994,1995 The Regents of the University of Michigan * and Merit Network, Inc. All Rights Reserved * * See the file COPYRIGHT for the respe...
#include <errno.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <sys/shm.h> #include <sys/mman.h> #include "frida-gumjs.h" #include "config.h" #include "debug.h" #include "util.h" #include "stats.h" #define MICRO_TO_SEC 1000000 stats_data_header_t *stats_data = NULL; static int stats_parent_...
// jbwm - Minimalist Window Manager for X // Copyright 2008-2019, <NAME> <<EMAIL>> // Copyright 1999-2015, <NAME> <<EMAIL>> // See README for license and other details. //#undef DEBUG #include "jbwm.h" #include "config.h" #include "ewmh.h" #include "font.h" #include "atom.h" #include "JBWMScreen.h" #include "keys.h" #i...
#include <execinfo.h> #include <stdio.h> #include <signal.h> #include <assert.h> #include <signal.h> #include <stdlib.h> #include <stdint.h> #include <err.h> #include "string.h" void cause_segfault(); void cause_crash(); static char _program_name[128]; #define MAX_STACK_FRAMES 64 static void *stack_traces[MAX_S...
// SPDX-License-Identifier: Apache-2.0 // Copyright (C) 2018,2019 IBM Corp. #include "array.h" #include "log.h" #include "rev.h" #include <assert.h> #include <errno.h> #include <inttypes.h> #include <stdint.h> struct bmc_silicon_rev { uint32_t rev; const char *name; }; static const struct bmc_silicon_rev as...
/* $OpenBSD: if_vether.c,v 1.27 2016/04/13 11:41:15 mpi Exp $ */ /* * Copyright (c) 2009 <NAME> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * ...
/* * cdrom_id - determines the capabilities of cdrom drives * * Copyright (C) 2005 <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 version 2 of the License. * */ #ifn...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * o...
#include "fs.h" #include "lib.h" #include "syscall.h" #define SUCC 0 #define FAIL -1 file_op_tbl_ptr_t file_op_tbl = {file_open, file_read, file_write, file_close}; file_op_tbl_ptr_t dir_op_tbl = {file_open, dir_read, dir_write, file_close}; /** variable that keep track of the location and param of fs */ uint32_t fs...
#include <errno.h> #include <stdlib.h> #include <arpa/inet.h> #include <unistd.h> #include <netdb.h> #include <android/log.h> #include "server.h" #define TAG "ServerDEBUG" /** * Name: setEnv * Description: Saves the environment. * * @param env1 Java environment */ void setEnv(JNIE...
#include "sys.h" char hello[] = "Hello World!"; char err_unknown[] = "Unknown Command!"; char err_argmiss[] = "Argument Missing Exception!"; char err_argill[] = "Illegal Argument Exception!"; char help_info[] = "hello\nfib n\ntime\nwhoami\necho str\nclear\nbcd n\nled on n\nled off n\nexpr str"; char success[] = "Set S...
/* file: erfill.mex.c ** description: Extremal Regions filling ** author: <NAME> **/ /* AUTORIGHTS Copyright (C) 2006 Regents of the University of California All rights reserved Written by <NAME> (UCLA VisionLab). Redistribution and use in source and binary forms, with or without modification, are permit...
/* creates a gaussian filter. * * 02/01/14 * - from gaussian.c */ /* This file is part of VIPS. VIPS 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 of the Licen...
#include "post.h" extern char *globNuDir; void pl_add_post(post_list *in, post *postAdd) { /* set up the new post_list_elem to add */ post_list_elem *toAdd = malloc(sizeof(post_list_elem)); toAdd->me = postAdd; toAdd->next = NULL; /* check if this is the first post_list_elem in the dictionary */ if (i...
/** @file * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved. * SPDX-License-Identifier : Apache-2.0 * * 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://...
/* Copyright (c) 1991-1999 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
/*==================================================================================== EVS Codec 3GPP TS26.443 Oct 20, 2015. Version 12.4.0 ====================================================================================*/ #include <math.h> #include "options.h" #include "cnst.h" #include "prot.h" #include "r...
/* * Copyright (c) 1998 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions an...
//%2005//////////////////////////////////////////////////////////////////////// // // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; // IBM Corp.; EMC Cor...
#include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <inttypes.h> #include "mp_msg.h" #include "img_format.h" #include "mp_image.h" #include "vf.h" //===========================================================================// static unsigned int bgr_list[]={ IMGFMT_Y800, ...
/* Copyright 2006 <NAME>, released under the new BSD license. * Version 2, from http://www.zentus.com/c/hash.html */ /* Changed from just "hash" to "hive_hash" to reduce collisions when linked * in with erlang * * <NAME> (<EMAIL>) 12/08 */ #include <assert.h> #include <stdlib.h> #include <string.h> #include <mat...
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ /* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2005 The University of Tennessee a...
// Copyright 2017 The Australian National University // // 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 appli...
// // Created by Jonas on 03.02.2021. // #include "enigma.h" void enigma_gui() { //Hello Promt printf("Enigma I:\n"); int c; //Char for Input //Read Input for en-/decryption char *input_str = NULL; //String for Data to be encrypted do { //Loop until valid Input //Read if Encry...
/* $NetBSD: clock.c,v 1.1 2001/10/16 15:38:53 uch Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, 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 so...
/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> bwt.c Ver 1.0 14-oct-02 compute the bwt using the ds_ssort routines The output file has the following format: (bwt) N bytes + (eof position, LSB first) 4 bytes Copyright (C) 2002 <NAME> (<EMAIL>) This program is free software...
/* * Copyright (c) 2018 <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 THE AUTHOR DISCL...
#include <assert.h> #include <string.h> #include <time.h> #include <errno.h> #include "tcpmgr.h" #include "tcpmgr_private.h" #include "debug.h" #define CLEAN_ROUTINE 3 // Second void tcpmgr_mutex_unlock(void* arg) { pthread_mutex_unlock(arg); } void* tcpmgr_client_thread(void* arg) { struct TCPMGR_LIST* listPtr =...
#include <FreeRTOS.h> #include <cJSON.h> #include <esp8266.h> #include <esplibs/libmain.h> #include <espressif/esp_system.h> #include <event_groups.h> #include <http-parser/http_parser.h> #include <stdio.h> #include <stdlib.h> #include <task.h> #include "homekit_callback.h" #include "homekit_config.h" #include "http_...
/* * Copyright (c) 2021, suncloudsmoon and the Freeze OS contributors. * * 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 * t...
/** * Copyright 2019 <NAME> <<EMAIL>> * * This file is part of Matrix Market Suite. * * Matrix Market Suite 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 ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <getopt.h> #include <unistd.h> #include "share.h" #include "bst.h" #pragma pack(push) #pragma pack(1) typedef struct _sFileItem { char *name; } sFileItem; #pragma pack(pop) sFileItem* sFileItem_create(char *name) { sFileI...
/* * optionroms.c: Option ROM loading support. * * <NAME>, <EMAIL> * Copyright (c) 2005, International Business Machines Corporation. * * Copyright (c) 2006, <NAME>, XenSource Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Pu...
// smp.c -- A test to demonstrate the SMP hthreads system. // // by <NAME>, 2009 #include <stdio.h> #include <stdarg.h> #include <hthread.h> #include <arch/arch.h> #include <arch/htime.h> #include <arch/arch.h> // Various test runs void create_test(void); void preempt_test(void); void problem_test(void); void preem...
/******************************************************************************* * - FILE: dom_def.c * - DESC: DOMAIN_DEF object. *******************************************************************************/ /* imports */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <stdbool.h> #...
#include <ctype.h> #include <stdbool.h> #include <string.h> #include "util.h" #include "lexer.h" #include "stretchy_buffer.h" static void ResetLexeme(Tiny_Lexer* l) { if(l->lexeme) stb__sbn(l->lexeme) = 0; } static int GetChar(Tiny_Lexer* l) { if(l->src[l->pos]) return l->src[l->pos++]; return 0; } inli...
/* # This file is part of libkd. # Licensed under a 3-clause BSD style license - see LICENSE */ #include <string.h> #include <math.h> #include <stdlib.h> #include <assert.h> #include "os-features.h" #include "dualtree_nearestneighbour.h" #include "dualtree.h" #include "mathutil.h" struct rs_params { kdtree_t*...
/** * Copyright (C) 2005, 2006, 2007, 2008 <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. * ...
/* $Id$ */ /*--------------------------------------------------------------------*/ /*; Copyright (C) 2010-2021 */ /*; Associated Universities, Inc. Washington DC, USA. */ /*; This program is free software; you can redistribute it and/or */ /*; modify it un...
#include "io.h" #include "sys.h" #include "irq.h" #include "mm.h" #include "sched.h" #include "task.h" extern Task *current_task, *tasks[TASK_SIZE]; char sys_read(){ uart_read_enqueue(current_task); unsigned long elr, sp_el0, spsr_el1; __asm__ volatile("mrs %0, elr_el1" : "=r"(elr)); __asm__ volatile("mrs %0...
/* chainStats - Stitch psls into chains. */ /* Copyright (C) 2006 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "psl.h" #include "chain.h" #include "dystring....
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> // f(x) = ax^2 + bx + c typedef struct _QF { float a; float b; float c; } quadratic_function; int get_numbers_of_roots(quadratic_function f) { float r = sqrt((f.b * f.b) - (4 * f.a * f.c)); if (r > 0) return 2...
/* *APSC 1299: Introduction to Microcontrollers *Final Robot Project *April 6th, 2020 * * This program is designed to work with the PIC18F4525 microcontroller and * will guide a line following robot through a variety of different track * challenges including gaps, turns, dead ends, and crossroads. * * <NAM...
/************************************************************************* * test-hyster-pnm.c - example program of hystersis thresholding * * $Id: test-hyster-pnm.c,v 1.6 2006/04/14 08:38:55 greg Exp $ * * LICENSE: * GPL v3.0 (see gpl-3.0.txt for details) * * DESCRIPTION: * * Input must be of PBM/PGM/PPM ra...
/* proc_countfilter.c - probabilistic counting filter - the more frequent events occur on a key the less likely they will be emitted Copyright 2020 <NAME> THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF YOU MAY OBTAIN A COPY OF THE LICENSE AT https://www.apache.org/licenses/LICENSE-2.0. THIS SOFTWARE IS LICEN...
/* * (C) Copyright 2000-2003 * <NAME>, DENX Software Engineering, <EMAIL>. * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Softwa...
/* * The MIT License * * Copyright 2018 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, ...
#include "message.h" #include "utils.h" #include "error.h" #include "slice_data.h" #include "byte_stream.h" #include "contract.h" #define ADDRESS_CELL_INDEX 0 #define AMOUNT_CELL_INDEX 1 void deserialize_array(uint8_t* in, uint8_t in_size, uint16_t offset, uint8_t* out, uint8_t out_size) { uint8_t shift = offset ...
/* termview: terminal viewing utility for Meddly trace data. Copyright (C) 2015, Iowa State University Research Foundation, Inc. This library 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, ...
//Those values are taken from http://www.gmarts.org/html/axefx_ultra_sysex_1005.html It's no official documentation, but was extracted from AxeEdit. const unsigned char IVol = 10; const unsigned char Out1 = 11; const unsigned char Out2 = 12; const unsigned char Bypa = 13; const unsigned char Temp = 14; const unsig...
/* * correlation.c * */ #include<stdio.h> #include<stdlib.h> #include<math.h> int xo,yo,lb; int checkeven(int res[], int k) { int j=0; while(j<=k) { if(res[j] != res[k]) return 0; j++; k--; } return 1; } int checkodd(int res[], int p, int k) { int i=p,j=0; while(j<k) ...
#include"pch.h" #include"hash_table.h" static unsigned int hashcode(char *key) { unsigned int hash = 0; while (*key) { hash = hash * 33 + *key; key++; } return hash; } static int strcmp_default(const void *k, const void *key) { return !strcmp(k, key); } hash_table *new_hash_table(...
/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* -----------------------------...