text
stringlengths
3.12k
18.7k
/* * Test suite for the server ACL checking. * * Written by <NAME> <<EMAIL>> * Copyright 2015-2016, 2018 <NAME> <<EMAIL>> * Copyright 2016 Dropbox, Inc. * Copyright 2007-2010, 2012, 2014 * The Board of Trustees of the Leland Stanford Junior University * Copyright 2008 Carnegie Mellon University * * SPDX-L...
/* * (C) Copyright 1996-2015 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an in...
/*-----------------------------------------------------------------------------------*/ /* * Copyright (c) 2001-2003 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following cond...
#include "lzwc.h" #include <string.h> #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <rscheme.h> #define DEBUG_TRACE (0) void SOP_write( obj port, const char *src, UINT_32 len ); static void lzw_reset( LZWStream *s ); typedef struct _LZWHashEntry { UINT_32 key; UINT_16 ...
/* * psp2rela * Copyright (C) 2021, <NAME> */ #include <stdlib.h> #include <stdint.h> #include <string.h> #include "data_register.h" #include "module_relocation_types.h" #define RELA_DATA_REGISTER_POOL_SIZE (0x4000) #define RELA_DATA_REGISTER_POOL_ALIGN(length) ((length + (RELA_DATA_REGISTER_POOL_SIZE - 1)) & ~(RE...
// RCT = Remote Control Transmitter void turnPowerSocketON(String socket_id) { ohoco.println("433S >> turnPowerSocketON => " + socket_id); if (socket_id == "socket1") { myRCSendSwitch.sendTriState("FFFF00FFFF0F"); } else if (socket_id == "socket2") { myRCSendSwitch.sendTriState("FFFF0F0FFF0F"); } else if...
/* cddtypes.h: Header file for cddlib.c written by <NAME>, <EMAIL> Version 0.94h, April 30, 2015 */ /* cddlib.c : C-Implementation of the double description method for computing all vertices and extreme rays of the polyhedron P= {x : b - A x >= 0}. Please read COPYING (GNU General Public Licence) a...
#include <rlang.h> #include "nse-inject.h" #include "utils.h" #include "decl/arg-decl.h" // Capture ---------------------------------------------------------------- static r_obj* capture(r_obj* sym, r_obj* frame, r_obj** arg_env) { static r_obj* capture_call = NULL; if (!capture_call) { r_obj* args = KEEP(r...
#include <stdlib.h> #include <string.h> #include <stdint.h> #include "hash.h" #include "hash_address.h" #include "params.h" #include "randombytes.h" #include "wots.h" #include "utils.h" #include "xmss_commons.h" #include "xmss_core.h" /** * For a given leaf index, computes the authentication path and the resulting ...
#include "THGeneral.h" #include "THRandom.h" #ifndef _WIN32 #include <fcntl.h> #include <unistd.h> #endif /* Code for the Mersenne Twister random generator.... */ #define n _MERSENNE_STATE_N #define m _MERSENNE_STATE_M /* Creates (unseeded) new generator*/ static THGenerator* THGenerator_newUnseeded() { THGenerato...
/****************************************************************************** * Copyright (C) 2010 - 2020 Xilinx, Inc. All rights reserved. * SPDX-License-Identifier: MIT ******************************************************************************/ /****************************************************************...
/* * Copyright (C) <NAME> (<EMAIL>). */ #include "ngx_trie.h" ngx_trie_t * ngx_trie_create(ngx_pool_t *pool) { ngx_trie_t *trie; trie = ngx_pcalloc(pool, sizeof(ngx_trie_t)); if (trie == NULL) return NULL; trie->pool = pool; if (ngx_array_init(&trie->data, pool, 1000, sizeof(ngx_key...
/* * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this lis...
/* Yubico OTP implementation for the Ledger Nano S (nanos-app-yubico-otp) (c) 2017 <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/...
/* Narcissus * © 2015 <NAME> * This file is redistributable under the terms of the two-clause BSD license; * see COPYING in the distribution root for the full text. */ #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <stdbool.h> #include <stdarg.h> #include <string.h> #include <poll.h> #include ...
/** ****************************************************************************** * @file FwUpdateAgent.c * @author MCD Application Team * @brief Firmware Update module. * This file provides set of firmware functions to manage Firmware * Update functionalities. ************...
/* * Copyright 2003 PMC-Sierra * Author: <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 vers...
#include "test/test.h" #include "src/components/user.c" #include "src/utils/utils.c" static void test_user_list(void) { /* Test add/del/get/rpl users */ struct user *u1, *u2, *u3, *u4; struct user_list ulist; memset(&ulist, 0, sizeof(ulist)); /* Test adding users to list */ assert_eq(user_list_add(&ulist, CAS...
#include <stdio.h> #define QUIT 0 #define ARRAYSIZE 100 #define STRING 100 void menu();/* Menu function*/ int gcd_finder(int firstnum,int secondnum);/*1-part*/ void mergeANDsort(int unsort_ar[],int f_elem, int l_elem);/*2-part*/ void merge(int *unsort_ar,int f_elem,int m_elem,int l_elem); void di_foo(int input);/*3-p...
/* Materia: Algoritmos y Estructura de Datos II - 2020 FAMAF <<<<< EJERCICIO ENTREGABLE 1 >>>>> Alumna: - Vispo, <NAME> Link de descarga: https://wiki.cs.famaf.unc.edu.ar/lib/exe/fetch.php?media=algo2:main:ejercicio_entregable_1.zip Teórico: https://wiki.cs.famaf.unc.edu.ar/lib/exe/fetch.php?media=algo2:ma...
/* CMPT 332 -- Fall 2017 * Assignment 2 * <NAME> dmp450 11050915 * <NAME> dom258 11184543 */ #include <stdio.h> #include <stdlib.h> #include <list.h> #include <rtthreads.h> #include <RttCommon.h> #include <limits.h> #include <string.h> #define MAX_MESSAGE_SIZE 512 /* TODO: currently, a thread may use these be...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2018 Institute of Computing Technology, CAS * Author : <NAME> (email : <EMAIL>) * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #include "md5.h" #include "error_reporting.h" #include "eventSend.h" #include "user_db.h" #define MD5LEN 32+1 #define BUF_SIZE 500 #define CHECK_BUFFER_OVERFLOW(size) if (size >= BUF_SIZE) { LOG_PRINT_ERROR("SQL query buffer overflow"...
// SPDX-License-Identifier: BSD-3-Clause /****************************************************************************** * Copyright (c) 2020, STMicroelectronics - All Rights Reserved This file is part of VL53LX Protected and is dual licensed, either 'STMicroelectronics Proprietary license' or 'BSD 3-clause "New"...
#include <inttypes.h> #include <stddef.h> #include <stdio.h> #include <string.h> #ifdef SSE41 #include <multfly_sse41.h> #else #include <multfly_ref.h> #endif int check_number32(char *title, uint32_t result, uint32_t expected) { puts(title); if (result == expected) { puts("ok"); return 0; } else { printf("Re...
#include <semaphore.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/mman.h> #include <sys/stat.h> #include <errno.h> #include <fcntl.h> #include "filereader/sharedmemreader.h" #include "traceevents.h" sem_t* setup_sem(char* path, int initalval)...
/******************************************************************** * BenchIT - Performance Measurement for Scientific Applications * Contact: <EMAIL> * * $Id: kernel_main.c 1 2009-09-11 12:26:19Z william $ * $URL: svn+ssh://<EMAIL>/svn-base/benchit-root/BenchITv6/kernel/database/select/perl/0/mysql/strides/kern...
/* Extended Module Player * Copyright (C) 1996-2010 <NAME> and <NAME> * * This file is part of the Extended Module Player and is distributed * under the terms of the GNU General Public License. See doc/COPYING * for more information. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "load....
/******************************************************************************/ /* */ /* Copyright (c) 1990-2016, KAIST */ /* All rights reserved. ...
/** * * @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_ztsqrt.c, normal z -> c, Fri Sep 28 17:38:24 2018 * **/ #include <plasma_core_blas.h> #include "pla...
/* $Id$ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-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 ...
/* * SPDX-License-Identifier: MIT * * Copyright (c) 2019, <NAME>. */ #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <getopt.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <ctype.h> #include <endian.h> #include <sys/types.h> #include <openssl/aes.h> #include "app/keystor...
/* main.c : menu of the game where mode of the parking simulator is chosen randomly CREATION DATE : 30/10/2019 MODIFICATION DATE: 06/12/2019 AUTHORS : <NAME> and <NAME>*/ #include <stdio.h> #include <stdlib.h> #include <SDL/SDL.h> #include <SDL/SDL_image.h> #include <SDL/SDL_ttf.h> #include <time.h> #include "game.h"...
/* Copyright (c) 2009-2013, 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 lis...
/* * $QNXLicenseC: * Copyright 2009, QNX Software Systems. * * Licensed under the Apache License, Version 2.0 (the "License"). You * may not reproduce, modify or distribute this software except in * compliance with the License. You may obtain a copy of the License * at: http://www.apache.org/licenses/LICENS...
#include "..\debug.h" #include <limits.h> #include <memory.h> #include <string.h> #include <windows.h> #include "manager.h" #define MINIMAL_SIZE 12 #define USER_MEM_OFFSET 4 #define CELLSIZE(ptr) (*((int*)(ptr))) #define CELLPREVIOUS(ptr) (char*)(*((unsigned int*)((char*)ptr + CELLSIZE(ptr) - 2*siz...
/** * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 <NAME> / <NAME> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h> #include <signal.h> #define MAX_LINE 80 #define MAX_ARGS (MAX_LINE/2 + 1) #define REDIRECT_OUT_OP '>' #define REDIRECT_IN_OP '<' #define PIPE_OP '|' #defi...
/* Copyright (c) 2010 - 2020, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * l...
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/os2/os2_video.c,v 3.15 2002/05/31 18:46:02 dawes Exp $ */ /* * (c) Copyright 1994,1999 by <NAME> * <<EMAIL>> * Modified 1996 by <NAME> <<EMAIL>> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associa...
/* SPDX-License-Identifier: BSD-3-Clause * Copyright 2020 Mellanox Technologies, Ltd */ #include <unistd.h> #include <string.h> #include <stdio.h> #ifdef RTE_IBVERBS_LINK_DLOPEN #include <dlfcn.h> #endif #include <dirent.h> #include <net/if.h> #include <rte_errno.h> #include <rte_string_fns.h> #include "mlx5_commo...
#include "core.h" #include "str.h" #include "log.h" #include "error.h" #include "server.h" #include "client.h" #include "protocol.h" #include "config.h" #include "generators.h" #include "heartbeat.h" #include "platform.h" #include "event.h" #include "plugin.h" #include "lang.h" #include "timer.h" #include "consoleio.h"...
/* * Copyright © 2014-2015 Broadcom * * 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...
#include <stdio.h> #include <string.h> #include "parser.h" extern int edslineno; extern YYSTYPE edslval; extern char *edstext; const char *parsed_file; extern FILE *edsin; int edslex_destroy(void); t_config config; void edserror(char const *s) { printf("Config parser: %s in file %s, line %d near '%s'.\n", s,...
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * 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 applica...
/* * Author: <NAME>, <EMAIL> * Course: CSE 1001, Section 01 Fall 2019 * Filename: war.c * CPU vs Player war through CLI */ #include <stdio.h> #include <time.h> #include <math.h> #include <stdlib.h> const int TOTAL_NUM_CARDS = 52; /* Function Prototypes */ void shuffle(int *in_deck, int n); int check_hand(int hand_si...
/* * M_APM - mapm_rnd.c * * Copyright (C) 1999 - 2002 <NAME> * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or without fee is hereby granted, * provided that the above copyright notice appear in all copies and * that both that copyright notice...
/* Copyright 2004,2007,2014 IPB, Universite de Bordeaux, INRIA & CNRS ** ** This file is part of the Scotch software package for static mapping, ** graph partitioning and sparse matrix ordering. ** ** This software is governed by the CeCILL-C license under French law ** and abiding by the rules of distribution of free ...
#include "minilang.h" #include "stringmap.h" #include "ml_compiler.h" #include "ml_file.h" #include "ml_macros.h" #include <string.h> #include <gc/gc.h> #include "ml_object.h" #include "ml_sequence.h" static stringmap_t Globals[1] = {STRINGMAP_INIT}; typedef struct ml_preprocessor_input_t ml_preprocessor_input_t; typ...
/*s: portdat_files.h */ /*s: enum [[blockflag]] */ /* flag values */ enum BlockFlags { BINTR = (1<<0), BFREE = (1<<1), Bipck = (1<<2), /* ip checksum */ Budpck = (1<<3), /* udp checksum */ Btcpck = (1<<4), /* tcp checksum */ Bpktck = (1<<5), /* packet checksum */ }; /*e: enum [[blockflag]] */ /...
#include <wiringPiI2C.h> #include <wiringPi.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <sys/time.h> #include <string.h> #include <signal.h> // PID parameters double Kp = 4.0; //8.0 double Ki = 15; // 1.2/4.0 doubl...
#include <stdio.h> #include <string.h> #include "sensor.h" #include "hal_i2c.h" #include "pmbus.h" #define REG_PWR_MT_CFG 0xD4 #define ADM1278_EIN_ROLLOVER_CNT_MAX 0x10000 #define ADM1278_EIN_SAMPLE_CNT_MAX 0x1000000 #define ADM1278_EIN_ENERGY_CNT_MAX 0x800000 int adm1278_read_ein_ext(float rsense, float *val, uint8...
#include "include.h" static struct view view; static struct db_applist applist; static struct db_app *apps[8]; static void onbutton(unsigned int button) { if (button == BUTTON_A) { if (view_isactive(&view, "area0")) { main_configview("app", "id", apps[0]->id); main_l...
#include <math.h> #include <stdlib.h> // #define NNBRS 23 // const int Nbrs[NNBRS][2] = { // { 1, 1 }, // { 1, 2 }, // { 2, 1 }, // { 2, 3 }, // { 3, 2 }, // { 1, 3 }, // { 3, 1 }, // { 1, 4 }, // { 3, 4 }, // { 4, 3 }, // { 4, 1 }, // { 1, 5 }, // { 2, 5 }, // { 3, 5 }, // { 4, 5 }...
/* mtest.c - memory-mapped database tester/toy */ /* * Copyright 2011-2016 <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 ...
// Generate unicode table files and grapheme break tests from the data files: // www.unicode.org/Public/12.0.0/ucd/UnicodeData.txt // www.unicode.org/Public/12.0.0/ucd/auxiliary/GraphemeBreakProperty.txt // www.unicode.org/Public/emoji/12.0/emoji-data.txt // www.unicode.org/Public/12.0.0/ucd/auxiliary/GraphemeBreakTest...
#include <GLES2/gl2.h> #include "../../support/support.h" typedef struct { // レンダリング用シェーダープログラム GLuint shader_program; // 位置情報属性 GLint attr_pos; // UV情報属性 GLint attr_uv; // テクスチャのUniform GLint unif_texture; // 読み込んだテクスチャ GLuint texture_id; } Extension_TextureOpMipmapLML_ex;...
/* * Copyright 2013, 2014, 2015 <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 agr...
/* * Copyright 2017 Advanced Micro Devices, 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, m...
// Data for program float v_data[] = { // positions // normals // texture coords -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, 0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f, 0.5f, 0.5...
#include "core/log.h" #include "pipe/graph.h" #include "pipe/graph-io.h" #include "pipe/graph-print.h" #include "pipe/graph-export.h" #include "pipe/modules/api.h" #include <libgen.h> // export convenience functions, see cli/main.c // fine grained interface: // replace given display node instance by export module. ...
/* * Copyright 2020 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/licens...
// TODO: mlir-clang %s %stdinclude -S | FileCheck %s // RUN: clang %s -O3 %stdinclude %polyverify -o %s.exec1 && %s.exec1 &> %s.out1 // RUN: mlir-clang %s %polyverify %stdinclude -O3 -o %s.execm && %s.execm &> %s.out2 // RUN: rm -f %s.exec1 %s.execm // RUN: diff %s.out1 %s.out2 // RUN: rm -f %s.out1 %s.out2 // RUN: mli...
// Copyright 2016 Silicon Laboratories, Inc. #include PLATFORM_HEADER #include CONFIGURATION_HEADER #include EMBER_AF_API_STACK #include EMBER_AF_API_HAL #include "zcl-core.h" #include "zcl-core-well-known.h" // TODO: Use an appropriate timeout. #define EZ_MODE_TIMEOUT_MS (60 * MILLISECOND_TICKS_PER_SECOND) EmberEve...
/* * Copyright lizhirui * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2021-06-02 lizhirui the first version * 2021-07-06 lizhirui fix a slub_page_init bug that page -> object_total_nr is wrong */ // @formatter:off #include <dreamos.h> //该数组每个成员...
#include "ch.h" #include "hal.h" #include "common.h" #include "crc/crc32.h" #include "xflash.h" #include <stdio.h> #include <stdlib.h> #define NO_ADDR 0xFFFFFFFF // Read Commands #define CMD_READ 0x03 #define CMD_FAST_READ 0x0B #define CMD_DOR 0x3B #define CMD_QOR 0x6B #defin...
/* Copyright 2010-2013 SourceGear, 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 or agreed to in writing, softwar...
/* * 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 as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is d...
// This file includes selected Linux header files, and supplementary // definitions, needed for general-purpose code. #include "support.h" // Selected Linux headers. #include <linux/auxvec.h> #include <linux/eventpoll.h> #include <linux/fadvise.h> #include <linux/falloc.h> #include <linux/fcntl.h> #include <linux/fs...
#define _GNU_SOURCE #include <netinet/in.h> #include <arpa/inet.h> #include <sys/socket.h> #include <sys/types.h> #include <pthread.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <signal.h> #include <dlfcn.h> #include <errno.h> #include <stdio.h> #include <poll.h> #include "logging.h" #defin...
#include <stdio.h> #include <stdlib.h> #include <time.h> void tri_bulle(int *tab, int taille) { int tmp,i,j; for (i = 0; i < taille-1; i++) for (j = 0; j < taille-i-1; j++) if (tab[j] > tab[j+1]) { tmp = tab[j]; tab[j] = tab[j+1]; ...
#include "A_skiplist.h" #include <stdlib.h> #include "zmalloc.h" #include <stdio.h> #define AZSKIPLIST_MAXLEVEL 64 /* Should be enough for 2^64 elements */ #define AZSKIPLIST_P 0.5 /* Skiplist P = 1/2 */ AzskiplistNode *AzslCreateNode(int level, double score, sds ele) { AzskiplistNode *zn = ...
/* Copyright (c) 2002-2017 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "array.h" #include "mail-cache.h" #include "mail-index-modseq.h" #include "index-storage.h" static void get_last_cached_seq(struct mailbox *box, uint32_t *last_cached_seq_r) { const struct mail_index_header *hdr; ...
#include <curses.h> #define MAX_X 80 #define MIN_X 0 #define MAX_Y 25 #define MIN_Y 0 void populate(int cell[MAX_Y][MAX_X]); int setState(int cell[MAX_Y][MAX_X]); void render(int cell[MAX_Y][MAX_X]); void game_start(void); void game_settings(void); void game_end(void); void copy_matrix(int original[MAX_Y][MAX_X], int...
/* A multithreaded sudoku puzzle solution checker. */ #include <stdio.h> #include <assert.h> #include <pthread.h> #define NUM_THREADS (1 + 1 + 9) // 1 row checker, 1 column checker, 9 sub-grid checkers = 11 threads. #define PUZ_SIZE 9 // A puzzle is a 9x9 grid. #define PUZ_MIN_ENTRY 1 #define PUZ_MAX_ENTRY 9 #def...
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <gtk/gtk.h> #include "graph.h" //Number of subcells a.k.a sudoku squares. #define SUBCELL_N 81 #define SUBCELLS_PER_CELL 9 #define SUBCELLS_PER_ROW 9 #define SUBCELLS_PER_COL 9 /* Macros for index helping index var */ #define M_FROM(F) ((int)(((int)(...
/* * @f util/ccn-lite-ccnb2xml.c * @b pretty print CCNB content to XML * * Copyright (C) 2013, <NAME>, University of Basel * * 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 ...
/** * gcc -o server server.c -lswoole */ #include "Server.h" int my_onReceive(swFactory *factory, swEventData *req); char* rtrim(char *str, int len); double microtime(void); void my_onStart(swServer *serv); void my_onShutdown(swServer *serv); void my_onConnect(swServer *serv, int fd, int from_id); void my_onClose(swS...
/* * Copyright (c) 2020 <NAME> a.k.a. <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...
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
/* KallistiOS ##version## examples/dreamcast/pvr/cheap_shadow/shadow.c Copyright (C) 2014 <NAME> This example shows off how to use the PVR's "Cheap Shadow" feature to create shadows. */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <dc/pvr.h> #include <dc/maple.h> #include <dc/maple/...
/* questao2.c */ //Dados corretos (p2) #include <stdio.h> #include <stdlib.h> #include <math.h> struct carta { char figura; char naipe; }; /* Retorna um inteiro entre 0 e n-1 */ size_t sorteia(size_t n); int imprime_carta(const struct carta *carta, FILE *stream) { /* IMPLEMENTAR */ char *naipe; char *figur...
/* dc120.c * * Copyright (C) <NAME> * * This library 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 License, or (at your option) any later version. * * This library i...
/* Copyright (C) 2010 Ion Torrent Systems, Inc. All Rights Reserved */ #include <ctype.h> #include <string.h> #include <stdlib.h> #include "../util/tmap_error.h" #include "../util/tmap_alloc.h" #include "../seq/tmap_fq.h" #include "tmap_file.h" #include "tmap_fq_io.h" /* The MIT License Copyright (c) 2008, by <NA...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <math.h> #include "eph_manager.h" #include "novas.h" #include "julian.h" #define R2D (180.0e0/M_PI) #define D2R (M_PI/180.0e0) typedef struct SUNPOS { double jday; double az, zn; } SUNPOS; int main (int argc, char *argv[]); d...
/* * Copyright (C) 2008 <NAME> * Copyright (C) 2009 <NAME> * * This file is part of wasp, some code taken from paparazzi (GPL) * * wasp 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,...
#include "agenda.h" #include "contato.h" #include "telefones.h" #include <ctype.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // Le os dados de um contato (uma linha) do arquivo csv, extraindo as // informações relevantes e cria um novo contato void parse_line(Agenda *agenda, FILE *...
/*- * 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 ...
/** * @file video_capture/screen_x11.c * @author <NAME> <<EMAIL>> */ /* * Copyright (c) 2012-2013 CESNET, z.s.p.o. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, is permitted provided that the following conditions * are met: * * 1. Redistri...
#include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <sys/stat.h> #include <sys/file.h> #include <sys/shm.h> #include <sys/sem.h> #include <signal.h> const int BUFFER_SIZE = 5; typedef short bool; #define true 1 #defin...
#include "msd.h" #include "usb_trace.h" #include "usb_msd_lun.h" #include "usb_msd_sbc.h" #include "byteorder.h" #include <string.h> /* Maximum number of LUNs. The bigger the number the more memory chewed up. */ #ifndef USB_MSD_LUN_NUM #define USB_MSD_LUN_NUM 1 #endif #ifndef USB_MSD_VENDOR_STRING #e...
/** * Merkle tree implementation for cryptographic applications. * * The main function build_tree() builds a Merkle tree of given text list. * The size of text list (LEAF_COUNT) must be the powers of 2. * The LEAF_COUNT (also NODE_COUNT and PATH_SIZE) can be updated from constant definitions. * * * FIPS202 SHAK...
/* * This file is part of the OpenSupaplex distribution (https://github.com/sergiou87/open-supaplex). * Copyright (c) 2020 <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, version 3. * *...
/* * Copyright (c) 2012 ASMlover. 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 ofconditions ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include "bf2any.h" #include "bf2const.h" #include "ov_int.h" /* * Simple constant folding. * * This routine takes the stream of tokens from the BF peephole optimisation * and re-sorts the tokens between loops merging both the stand...
/* * ObjectivelyMVC: Object oriented MVC framework for OpenGL, SDL2 and GNU C. * Copyright (C) 2014 <NAME> <<EMAIL>> * * 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. * * Permissi...
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2012 * Altera Corporation <www.altera.com> */ #include <common.h> #include <asm-generic/io.h> #include <clk.h> #include <dm.h> #include <fdtdec.h> #include <malloc.h> #include <spi.h> #include <spi-mem.h> #include <linux/errno.h> #include "cadence_qspi.h" #de...
/******************************Module*Header*******************************\ * Module Name: misc.c * * Miscellaneous common routines. * * Copyright (c) 1992-1995 Microsoft Corporation * \**************************************************************************/ #include "precomp.h" /**********************...
/* * This file implement the TI RPRC file format */ #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <stdio.h> #include <libelf.h> #include <errno.h> #include <inttypes.h> #include <gelf.h> #if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ #error Unsopport for big endian archs. #endif static int xwr...
/* * Copyright (c) 2019-2020, Xim * * SPDX-License-Identifier: Apache-2.0 * */ /* RISC-V kernel boot stage vm init */ #include <pgtable.h> #include <string.h> /********* setup memory mapping ***********/ #define PGDIR_PA (0x90200000UL + 24 * 1024 * 1024) // 4MB above heap top uint64_t page_table = PGDIR_PA; sta...