text
stringlengths
3.08k
10.5k
#include <stdio.h> #include <string.h> #include <molerat/thread.h> #include <molerat/tasklet.h> #include <molerat/socket.h> #include <molerat/application.h> #include <molerat/http_server.h> struct exchange { struct http_server_exchange *server_exchange; struct http_reader *reader; struct http_writer *writer; str...
/* this file is also included by usb/disk and cdfs */ typedef struct Umsc Umsc; #pragma incomplete Umsc enum { /* fundamental constants/defaults */ NTargetID = 8, /* number of target IDs */ CtlrID = 7, /* default controller target ID */ MaxDirData = 255, /* max. direct data returned */ LBsize = 512, /* d...
#include <ctype.h> #include <errno.h> #include <error.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include "spa.h" #define TAI_LESS_UTC ((double)37.0) // Defined in set7.dat #define TIME_CONSTANT ((double)32.184) // Not sure where this comes from. #define DELTA_...
/************************************************************************************************ * FilterTools/wave_settings_form.c * * Author : <NAME> * Created : 16/1/2021 * * Description : Ncurses form layout and access functions for wave settings * * Revision History: * Date Author Rev ...
#if defined(_WIN32) && defined(_MSC_VER) #define _CRT_SECURE_NO_WARNINGS //for fopen...not sure if this is only needed in vs #pragma message("Run in windows vs!") #endif #if defined(__linux__) #pragma message("Run in Linux!") #endif #include "kywav.h" #include "string.h" int wavsolver_open(wavsolver* wavso...
#include <stdlib.h> #include <string.h> #include <stdio.h> #include <unistd.h> #include "serial.h" #include "buspirate.h" //#ifndef WIN32 #define TRUE 1 #define FALSE 0 //#define Sleep(x) usleep(x) #define usleep(x) Sleep(x) //#endif const char *modes[]={ "BBIO", "SPI", "I2C", "ART",...
#include "allocate.h" #include "collect.h" #include "inline.h" #include <string.h> static void inc_clause(kissat *solver, bool original, bool redundant) { if (redundant) { INC(clauses_redundant); } else { INC(clauses_irredundant); } INC(clauses_added); if (original) { INC(clauses_original); } ...
#include <stdio.h> #include <pcap.h> #include "pcaplib.h" #include "EtherCATlib.h" #include "EtherCAT_API.h" void packet_handler(u_char* param, const struct pcap_pkthdr* header, const u_char* pkt_data); void main() { printf("HELLO\n"); //pcap_if_t* alldevs; pcap_if_t* d; int inum; int i = 0;...
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "vmm.h" #include <libboot/log/log.h> #include <libboot/mem/malloc.h> #include <libboot/mem/mem.h> #i...
/* Copyright (C) 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, merge, publish, distri...
#include "moves.h" // gets the attack set in directions NW, N, NE, E U64 get_positive_ray_attacks(SquareCode square, Dir dir, U64 occupied) { U64 attacks = rayAttacksArray[dir][square]; U64 blocker = attacks & occupied; if ( blocker ) { square = bitscan_forward(blocker); attacks = attack...
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <wiringPi.h> #include <softPwm.h> #include <wiringPiSPI.h> #include <mcp3004.h> #define BASE 100 #define SPI_CHAN 0 #define RANGE 100 #define PIN0 0 #define PIN1 1 #define PIN_GP2_izq 101 #define PIN_GP2_dr 100 #define cerr...
#pragma once #include <json.h> #define STGASEPRITE_SET(src, func) {\ json_object_object_get_ex(json, #src, &prop); \ parent.src = func(prop); \ } #define STGASEPRITE_FOREACH(src, func, type) {\ json_object_object_get_ex(json, #src, &prop); \ size_t length = json_object_array_length(prop); \ paren...
#include <proc/mtask.h> #include <proc/exec.h> #include <err/error.h> #include <mm/alloc.h> #include <proc/elf.h> #include <string.h> #include <video.h> int elf_find_section(const Elf32_Ehdr *elf, Elf32_Shdr **section, const char *section_name) { Elf32_Shdr *sections = (Elf32_Shdr *)((uintptr_t)elf + elf->e...
/* * * Studente: <NAME> 0522500473 * */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <mpi.h> /** * Funzione che esegue il prodotto matrice vettore */ void prod_mat_vett(double w[], double *a, int rows, int cols, double v[]) { int i, j; for(i=0;i<rows;i++) { w[i]=0; for(j=...
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * * Libmemcached library * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * Copyright (C) 2006-2009 <NAME> All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted prov...
#include "config_manager.h" #include "json.h" #include <string.h> #include <stdio.h> #include "poll.h" #include "memory_helper.h" struct config{ json_value json; }; static char tempbuf_[16]; //加载文件 static char* load_file(const char* file, size_t* psz) { char* buf = NULL; long sz; FILE...
/* SPDX-License-Identifier: BSD-2-Clause * Copyright(c) HCL TECHNOLOGIES LTD * Submitted on behalf of a third-party: Intel Corporation, a * Delaware corporation, having its principal place of business * at 2200 Mission College Boulevard, * Santa Clara, California 95052, USA */ #include "vr_dpdk_n3k_offload_hold....
/* * 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 n...
/** * \file * * \brief megaAVR Timer/Counter (TC) Timeout Driver Example 2 * * Copyright (c) 2014 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following ...
/* CMSIS-DAP Interface Firmware * Copyright (c) 2009-2013 ARM Limited * * 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 re...
/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/types.h> #include <sys/time.h> #include <time.h> #define POLLING 32 #define COMMANDINPUTSIZE 300 //buffer size of the input line #define MAX_NAME 31 //30 char max username #defin...
/* ISC license. */ #include <sys/types.h> #include <errno.h> #include <signal.h> #include <skalibs/bytestr.h> #include <skalibs/sgetopt.h> #include <skalibs/uint.h> #include <skalibs/nsig.h> #include <skalibs/sig.h> #include <skalibs/strerr2.h> #include <skalibs/tai.h> #include <skalibs/iopause.h> #include <skalibs/se...
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include <math.h> #include <limits.h> #include "itoa.h" #include "cvisualise.h" #include "morton.h" #include "quadtree.h" #define KEYSIZE 16u #define NAMESIZE 10u #define LABELSIZE 10u #define FILENAMETEMPLATE "data/graphs/out-%.3lu.png" #define FILENAM...
/* $Log: mload.c,v $ Revision 1.2 2006/08/01 13:06:50 rjongbloed Added a raft of unvalidated audio codecs from OpenH323 tree Revision 1.1.2.1 2006/07/22 14:03:18 rjongbloed Added more plug ins Revision 1.1.2.1 2006/05/08 13:49:57 rjongbloed Imported all the audio codec plug ins from OpenH323 Revision 1.1 200...
/* * ch14/stack_test.c *************************************************************** * This program is part of the source code released for the book * "Hands-on System Programming with Linux" * (c) Author: <NAME> * Publisher: Packt * * From: Ch 14 : Multithreading Part I - The Essentials ***************...
/* * * Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com * * The contents of this file are provided under the Software License * Agreement that you accepted before downloading this file. * * This source forms part of the Software and can be used for educational, * training, and demonstration purpos...
/* Copyright (C) Contrast Security, Inc. */ #include "ngx_http_contrast_connector_common.h" #include "ngx_http_contrast_connector_socket.h" #include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> #include <stdio.h> /* We only supported 32/64bit intel x86 currently */ #if !defined(__i386__) && !defined(_...
#include "gorilla/ga.h" #include "gorilla/ga_internal.h" #include <string.h> #include <pulse/pulseaudio.h> #include <pulse/error.h> struct GaXDeviceImpl { pa_mainloop *mainloop; pa_context *context; pa_stream *stream; bool looped; }; #define ptcheck(e) do { if (!(e)) goto fail; } while (0) #define pacheck(e) d...
/****************************************************************************/ /* FreeRTOS functions includes. */ #include "FreeRTOS_util.h" /* Demo utlities includes. */ #include "stdio.h" #include "stdlib.h" #include "string.h" /****************************************************************************/ /* Test ...
#include "ibm.h" #include "io.h" #include "mem.h" #include "vl82c480.h" static struct { int cfg_index; uint8_t cfg_regs[256]; uint8_t port_92; } vl82c480; #define CFG_ID 0x00 #define CFG_AAXS 0x0d #define CFG_BAXS 0x0e #define CFG_CAXS 0x0f #define CFG_DAXS 0x10 ...
#include <time.h> #include <stdlib.h> #include <locale.h> #include <string.h> #include <math.h> #include "game.h" int main() { setlocale(LC_ALL, ""); srand(time(NULL)); if (initscr() == NULL) { fprintf(stderr, "Error initialising ncurses."); exit(EXIT_FAILURE); } cbreak(); noe...
#include "shell.h" #include "calculator.h" #include "getChar.h" #define SCREEN_LIMIT 160 #define CHANGE_WINDOW -2 int screen_width; int screen_height; char buffer[SCREEN_LIMIT] = {'\0'}; int buffer_size = 0; extern void start_VM_Driver(int screenId); int strcmp(); char getChar(); void putChar(...
/* * Copyright (c) 2017-2019 <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 condi...
#include "mixer.h" #include <poll.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <errno.h> #include <time.h> #include <X11/Xlib.h> #define MAXLEN 20 #define BAR_FULL "█" #define BAR_EMPTY " " #define VOLUME_PREFIX " ♬ " #define VOLUME...
// Copyright 2015 Silicon Laboratories, Inc. #include PLATFORM_HEADER #include CONFIGURATION_HEADER #include EMBER_AF_API_STACK #include EMBER_AF_API_EVENT_QUEUE #include EMBER_AF_API_HAL #include "thread-bookkeeping.h" // If serial functionality is enabled, we will initialize the serial ports during // startup. Thi...
/* * This program checks if a given number is sparse or not. A number is * sparse if no consecutive bits in the number are set. For more * information on the problem, please refer to the following link:- * http://www.geeksforgeeks.org/check-if-a-given-number-is-sparse-or-not/ */ #include<stdio.h> #include<assert.h...
// Standard headers #include <stdio.h> // Internal headers #include "direction.h" #include "position.h" #include "spy.h" // Main header #include "attacker.h" // New headers #include <stdlib.h> #include <time.h> // Macros #define UNUSED(x) (void)(x) // Auxiliary to avoid error of unused parameter // Private Variabl...
/* * Copyright (c) 2010, <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 ...
/* * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (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/lice...
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "OCSP" * found in "asn1/rfc2560-OCSP.asn1" * `asn1c -S /home/fotisl/Projects/revlintsynt/asn1c/skeletons -pdu=all -fwide-types -fcompound-names` */ #include "ResponseData.h" static int asn_DFL_2_cmp_0(const void *sptr) { const OCSP_...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* otool_handle_32.c :+: :+: :+: ...
/* Copyright (C) 1997, <NAME> */ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <pwd.h> #include <dirent.h> #include "chep_crt.h" #include "files.h" char * outputDir = ""; char pathtocalchep[STRSIZ]; char * unixPath(char *name) { static struct passwd *passwdPrt; char *...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/mman.h> void print_help(); typedef struct paren { char *start; struct paren *prev; struct paren *next; } paren; char* hello_instrctions = "++++++++++[>+++++++>++++++++++>+++<<<-]>++.>+.+++++++..+++.>++.<<++++++++...
# include <stdio.h> # include <string.h> # include "estreak.h" /* G_FILENAMES -- Routines that handle file names. These are highly * instrument-dependent, since it is basically by * manipulating file names that instrument-dependent * I/O is removed from the...
/* * Copyright (c) 2011 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of ...
/* * $Id: node_composite_diffMatte.c 40390 2011-09-20 08:48:48Z campbellbarton $ * * ***** BEGIN GPL LICENSE BLOCK ***** * * 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...
/* * Copyright (c) 1994, 1995 <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 cond...
/* -*- c-basic-offset: 8 -*- rdesktop: A Remote Desktop Protocol client. Copyright (C) <NAME> <<EMAIL>> 1999-2008 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 3 of th...
/* Copyright 2013-present Barefoot Networks, Inc. Copyright(c) 2021 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required...
/** ****************************************************************************** * File Name : freertos.c * Description : Code for freertos applications ****************************************************************************** * This notice applies to any and all portions of this file ...
/****************************************************************************** While snooping around the local network of EBHQ, you compile a list of IP addresses (they're IPv7, of course; IPv6 is much too limited). You'd like to figure out which IPs support TLS (transport-layer snooping). An IP supports TLS if it...
/* FileHandler - General-purpose file handling library for Niotso spr.c - Copyright (c) 2012 Niotso Project <http://niotso.org/> Author(s): Fatbag <<EMAIL>> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the abov...
/* $NetBSD: env.c,v 1.9 2013/02/07 13:20:51 apb Exp $ */ /*- * Copyright (c) 2008 <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 th...
/* * Copyright (C) 2019-2020 BiiLabs Co., Ltd. and Contributors * All Rights Reserved. * This is free software; you can redistribute it and/or modify it under the * terms of the MIT license. A copy of the license can be found in the file * "LICENSE" at the root of this distribution. */ #include <stdint.h> #inclu...
/* sparse_avx.c (not very well) AVX-optimised csc matrix operations. This code is experimental, and error-handling is primitive. */ /* Copyright 2013, NICTA. See COPYRIGHT for license details. */ #include <assert.h> #include <immintrin.h> #include "sparse.h" #define likely(x) __builtin_expect((x),1)...
#include <stdarg.h> // va_arg, va_start, va_end, va_list #include "List_private.h" #define MIN_CAPACITY 10 #define RESIZE_FACTOR 2 #define PTR_SIZE sizeof(Ptr) ListVtable List = { // Construction/destruction .new = &new_List, .init = &init_List, .del = &del_List, // Nume...
/* * Copyright 2012 Red Hat Inc. * * 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, d...
/** * Functions to replace an x coordinate with the path length of a given * function of that x coordinate. * * Sample usage: * trace_func *f; * gsl_vector *data; * * abscissa_to_pathlength(f, data); * * So, this is a little trivial... * */ #include "spce_pathlength.h" /** transforms a list o...
/*! * @file parameters_default.c * @brief This file was generated from ./cfg/MergedParam.xml(Modif. : 2022-02-10 16:30:42.008812000 +0100). * ***************************************************************************** * @copyright 2020, GRDF, Inc. All rights reserved. * * Redistribution and use in sou...
/* * (C) Copyright 2014 CompuLab, Ltd. <www.compulab.co.il> * * Authors: <NAME> <<EMAIL>> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <nand.h> #include <errno.h> #include <splash.h> #include <spi_flash.h> #include <spi.h> #include <bmp_layout.h> DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_...
#include <errno.h> #include <stdlib.h> #include <string.h> #include "mydef.h" #include "try.h" // Node Functions int getnodebypath(const char *path, struct myinode *parent, struct myinode *child) { if(!S_ISDIR(parent->st_mode)) { errno = ENOTDIR; return 0; } if(path[1] == '\0') { memcpy(child, pa...
#include <omp.h> #include <stdio.h> #include <math.h> #define XMIN 0. #define XMAX 3. #define YMIN 0. #define YMAX 3. #define TOPZ00 0. #define TOPZ10 1. #define TOPZ20 0. #define TOPZ30 0. #define TOPZ01 1. #define TOPZ11 6. #define TOPZ21 1. #define TOPZ31 0. #define TOPZ02 0. #define TOPZ12 1. #def...
/*** This file is part of systemd. Copyright 2003-2004 <NAME> <<EMAIL>> Copyright 2004-2012 <NAME> <<EMAIL>> systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
/**************************************************************************//** * @file hal_flash.c * @brief FMC driver implementation. * * @note * SPDX-License-Identifier: Apache-2.0 * Copyright (C) 2020 Nuvoton Technology Corp. All rights reserved. *******************************************************...
#include <stdio.h> #include <assert.h> #include <unistd.h> #include <getopt.h> #include <stdlib.h> #include <string.h> #include "sim.h" #include "pagetable.h" // Define global variables declared in sim.h int memsize = 0; int debug = 0; char *physmem = NULL; struct frame *coremap = NULL; char *tracefile =...
/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2011 Wind River Systems, * written by <NAME> <<EMAIL>> */ #include <linux/compiler.h> #include <linux/errno.h> #include ...
/*- * Copyright (c) 2008-2009, <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 condit...
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <stdint.h> #include <stdio.h> #include <string.h> #include "http2_upload_api.h" #include "wrappers.h" #define HTTP2_ONLINE_SERVER_URL "a1IgnOND7vI.iot-as-http2.cn-shanghai.aliyuncs.com" #define HTTP2_ONLINE_SERVER_PORT 443 #define HT...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zgeadd.c, normal z -> s, Fri Sep 28 17:38:18 2018 * **/ #include <plasma_core_blas.h> #include "pla...
#include "basics.h" #include <SDL.h> #include <SDL_ttf.h> #include "SDL2_gfx/SDL2_gfxPrimitives.h" #include "SDL2_gfx/SDL2_framerate.h" #ifdef WIN32 #define _WIN32_WINNT 0x0500 #include <windows.h> #endif #include "fluid.h" Uint32 time_passed = 0; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~O~~~~~~~~~~| M A I N ...
/*- * 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the f...
/* * Copyright (C) 2006-2009 Freescale Semiconductor, Inc. * * 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 Software Foundation; ei...
/* * Copyright (C) sunlei */ #include "ngx_rtmp_quic_chromium.h" #include "ngx_rtmp_quic_module.h" // ? struct ngx_udp_connection_s { ngx_rbtree_node_t node; ngx_connection_t *connection; ngx_buf_t *buffer; }; static void ngx_rtmp_process_rtmp_data(void *module_context, ...
/* * * Copyright 2016, Google 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: * * * Redistributions of source code must retain the above copyright * notice, this list of condi...
#include "all.h" #define DEBUG if(1||cons.flags&Fip)print typedef struct Rock Rock; typedef struct Frag Frag; struct Frag { int start; int end; }; struct Rock { uchar src[Pasize]; uchar dst[Pasize]; int id; /* src,dst,id are address of the rock */ Msgbuf* mb; /* reassembly. if 0, the rock is empty */ ulong...
/*============================================================================ Copyright (c) German Cancer Research Center (DKFZ) 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 ...
// porres 2017 #include "m_pd.h" #include <math.h> #define LOG001 log(0.001) typedef struct _asr{ t_object x_obj; t_inlet *x_inlet_attack; t_inlet *x_inlet_sustain; t_inlet *x_inlet_release; t_float x_f_gate; t_int x_status; t_float x_last; t_float x_target; t_float x_sr...
/* This file is part of SFFT. Copyright (c) 2012, <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 l...
/* * Copyright (c) 2016-2018 Intel Corporation. * Copyright (c) 2018 Nordic Semiconductor ASA * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <init.h> #include <usb/usb_device.h> #include <usb/class/usb_hid.h> #define LOG_LEVEL LOG_LEVEL_DBG LOG_MODULE_REGISTER(main); #define REPORT_ID_...
/* * Copyright (C) 2007 Nokia Corporation. * * 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 the hope that it will be useful, but * WITHOUT A...
#include "io/ata.h" #include "io/port.h" #include "io/pci.h" #include "mm/kmem.h" #include "irq/pic.h" #include "util/string.h" #include "util/log.h" static uint16_t identBuf[ATAIdentLength]; ata_device_t *ataDevices[ATADeviceLength]; static int ataCount; static ata_device_t *ataDetectDevice(ata_channel_t *channel, u...
#include <math.h> #include <stdlib.h> #include <stdio.h> // Based on 1d FFT code (c) <NAME> // University of Illinois at Urbana-Champaign // January 19, 1992. Creative Commons "Attribution" license. void fft ( int n // length of vector. , int m // log2 of length of vector. , double x[] // real values. , doubl...
#include "tinn.h" #include <stdio.h> #include <time.h> #include <string.h> #include <stdlib.h> // Data object. typedef struct { // 2D floating point array of input. float** in; // 2D floating point array of target. float** tg; // Number of inputs to neural network. int nips; // Number of ou...
/******************************************************************************* * Copyright (c) 2018-2021 Cadence Design Systems, Inc. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to use this Software with Cad...
/* * Copyright (C) 2019. Huawei Technologies Co.,Ltd.All rights reserved. * * Description: This file provides the implemenation for the KAE engine async task queue * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob...
/* * according to https://create.stephan-brumme.com/crc32/#git1 * I managed to build a version used for CRC32-MPEG. * The code can only be used in little-endian systems. * using both slice-by-8 and slice-by-4. * I also managed to find a more generic version in Linux src. * People who want other version of CRC32 m...
/* Dynamic pointer array implementation for use in AMX extension modules * * Copyright (c) <NAME>, 2018-2022 * * 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...
#include "effect.h" #include "session.h" #include "util.h" #include "window.h" #include <basedir.h> #include <confuse.h> #include <stdio.h> #include <string.h> static int validate_unsigned_int(cfg_t *cfg, cfg_opt_t *opt) { int value = cfg_opt_getnint(opt, cfg_opt_size(opt) - 1); if (value < 0) { cfg_er...
#include "ai.h" #include <stdlib.h> #include <stdio.h> #include <string.h> const static int dx[] = {0, 1, 0, -1}; const static int dy[] = {1, 0, -1, 0}; #define N 100 #define M 100000 int dfs(int **graph, int startx, int starty, int endx, int endy) { if(startx == endx && starty == endy) return 1; for(int i = 0; i ...
/* Copyright(c) 2010-2017 Intel Corporation. Copyright(c) 2016-2018 Viosoft Corporation. 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 ...
/******************************************************************************* * Copyright 2019 UChicago Argonne, LLC. * (c.f. AUTHORS, LICENSE) * * This file is part of the AML project. * For more info, see https://github.com/anlsys/aml * * SPDX-License-Identifier: BSD-3-Clause ******************************...
#include "nosdk8266.h" #include <eagle_soc.h> #include <esp8266_rom.h> #include <ets_sys.h> #include <uart_dev.h> extern UartDevice UartDev; void uart_div_modify( int uart, int divisor ); #define sys_const_crystal_26m_en 48 // soc_param0: 0: 40MHz, 1: 26MHz, 2: 24MHz volatile uint32_t *DPORT_BASEADDR = (volatile ui...
// 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 //...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* neighbors_heap.c :+: :+: :+: ...
/* * LEDFire.c * This program is targeted towards the ATTINY13A and is designed * to simulate a flickering flame using four LEDs, two 5mm RED * and two 3mm Orange. This code was taken from * http://fangletronics.blogspot.com/ with the random number * generator orginating from http://forums.adafruit.com/viewtopic...
#include "mmt_core.h" #include "plugin_defs.h" #include "extraction_lib.h" #include "../mmt_common_internal_include.h" /////////////// PROTOCOL INTERNAL CODE GOES HERE /////////////////// static MMT_PROTOCOL_BITMASK detection_bitmask; static MMT_PROTOCOL_BITMASK excluded_protocol_bitmask; static MMT_SELECTION_BITMASK...
/*********************************************************************** * mexinprod.c : C mex file to compute inner product of 2 vectors, * * Ax = mexinprod(blk,Avec,x,k,p); * where Ax = Avec{p}(:,1:k)'*x * * SDPT3: version 3.0 * Copyright (c) 1997 by * <NAME>, <NAME>, <NAME> * Last Modified: 2 Feb 01 ...
/* * ctx_window.c * This file is part of sgui * * Copyright (C) 2012 - <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 * th...