text
stringlengths
3.08k
10.5k
#include <stdio.h> #include <stdlib.h> typedef struct node { long long ver; long long len; }city; long long tot=0; long long count=0,deg[100005]; long long size=0,vis[100005]={0}; city arr[500005]; city *c[100005]; void heapify(long long i) { long long leftl = arr[2*i].len; city left=arr[2*i],right=arr[2*i+1],root...
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include "ConfigFiles.h" int RecordColor(FILE *fp, struct HSVColors colors) { /* * Save the HSV values of one color to the file. * The file will look like this: * 0,2,red * xxx,xxx,xxx * xxx,xxx,xxx * 2,1,blue * xxx,xxx,xxx * ... */ int i;...
/* $Id$ */ /* Copyright (c) 2011-2020 <NAME> <<EMAIL>> */ /* This file is part of DeforaOS Desktop Phone */ /* 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 abov...
int nhost = 4; struct outputTask { char **outputSlaveTid; char **outputSlaveTardiness; char **outputSlaveNonDelay; }; struct outputTask arrOutputTask[501]; char **getDariSlave(int nhost, char **hostname, int jmlRand){ int cc, dd, ee, ff, *tid, i, j, sisa, slice, bound; arrOutputTask->outputSlaveTid = malloc((t...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "common.h" #define P3 "P3" // the constant P3 of every ppm image // reads a file and returns a ppm struct struct PPM *getPPM(FILE *f) { struct PPM *ppm = (struct PPM *) malloc(sizeof(struct PPM)); // allocate space of ppm struct...
/* * 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...
/*============================================================================= GNU UnRTF, a command-line program to convert RTF documents to other formats. Copyright (C) 2000,2001,2004 by <NAME> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Publ...
/* ------------------------------------------------------------- -- ~ 2009.01.07 -- | -- Module : Data.Trie.ByteStringInternal.indexOfDifference -- Copyright : Copyright (c) 2008--2011 <NAME> -- License : BSD3 -- Maintainer : <EMAIL> -- Stability : bet...
/* + *************************************************************************** + Program Name: hips2imP.c Date: Aug, 1989. Purpose: To print an hips image on an imagen printer using, imPress code. Intro: First, a set of (up to 64) gray-level glyphs are downloaded to the Image...
#include <wayland-client.h> #include <wayland-egl.h> #include <poll.h> #include <errno.h> #include <string.h> #include "eglutint.h" struct display { struct wl_display *display; struct wl_compositor *compositor; struct wl_shell *shell; uint32_t mask; }; struct window { struct wl_surface *surface;...
//Implementation of the geometric shapes example from raylib using rayfork #define RF_AUDIO_IMPL #define RF_RENDERER_IMPL #define RF_GRAPHICS_API_OPENGL_33 #include "glad/glad.h" #include "../../rayfork_audio/include/rayfork_audio.h" #include "old_rayfork.h" #include "sokol_app.h" #include <math.h> #include <stdio.h>...
#include "rootdir.h" #include "fat16.h" #include "partition.h" #include "sd_raw.h" #include <stdio.h> #include "rprintf.h" struct fat16_dir_entry_struct dir_entry; struct fat16_fs_struct* fs; struct partition_struct* partition; struct fat16_dir_struct* dd; struct fat16_file_struct * fd; int openroot(void) { /* o...
/*****************************************************************************/ /* */ /* R P C H E E S E */ /* */ ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include "sort.h" #define RED "\x1B[31m" #define GREEN "\x1B[32m" #define NORM "\x1B[0m" typedef enum { false, true } bool; typedef struct test_data { int *unsorted; // Data for testing int *sorted; // Data for correctness test ...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <stdbool.h> #include <stdarg.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <sys/mman.h> #include <sys/stat.h> void error (const char* format, ...) { va_list args; va_start(args, format); vprintf(format, args); ...
/** ****************************************************************************** * File Name : mailbox_hsem_if.c * Description : This file provides code for the configuration * of the mailbox based on hardware semaphore. **************************************************...
#include "kvm/rtc.h" #include "kvm/ioport.h" #include "kvm/kvm.h" #include <time.h> /* * MC146818 RTC registers */ #define RTC_SECONDS 0x00 #define RTC_SECONDS_ALARM 0x01 #define RTC_MINUTES 0x02 #define RTC_MINUTES_ALARM 0x03 #define RTC_HOURS 0x04 #define RTC_HOURS_ALARM 0x05 #define RTC_DAY_OF_WEEK ...
// easily snoop all file open() calls // <NAME> <<EMAIL>> #define _GNU_SOURCE #include <string.h> #include <dlfcn.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #define NUM_NODESET_NODES 128 static void destructor() __attribute__((destructor)); typedef int (*orig_open_fn)(const char *pathname, int f...
/*************************************************************************//** * @file main.c * @version V1.00 * @brief Demonstrate how to PDMA and trigger DAC by Timer. * * @copyright (C) 2017 Nuvoton Technology Corp. All rights reserved. * ***************************************************************...
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause /* * Copyright (C) 2018, STMicroelectronics - All Rights Reserved */ #include <config.h> #include <common.h> #include <led.h> #include <clk.h> #include <dm.h> #include <generic-phy.h> #include <phy.h> #include <reset.h> #include <usb.h> #include <asm/arch/stm32.h> ...
/* Copyright (c) Centre National de la Recherche Scientifique (CNRS, France). 2010. Copyright (c) Members of the EGEE Collaboration. 2008-2010. See http://www.eu-egee.org/partners/ for details on the copyright holders. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file excep...
/* * Copyright © 2010 <NAME> * ALL RIGHTS RESERVED * [This program is licensed under the "3-clause ('new') BSD License"] * Please see the file COPYING in the source * distribution of this software for license terms. */ #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "pseuf...
/* Copyright (c) 2003 krzYszcz and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* This is Pd's lop~ with signal-controlled cutoff. */ /* CHECKED scalar case: input preserved (not coefs) after changing mode */...
/* Copyright (c) 1999-2000 Microsoft Corporation */ ///====================================================================== // // Perf.c // // This file contains the performance counter initialization // and dump routines. The only part of this file you // must modify is the performance counter name table. Ma...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include "map.h" #include "chest.h" #include "monster.h" #include "util.h" #include "custom_effects.h" #include "player.h" /* initialises the map */ void load_map(map_t *map, monster_t mons_arr[], chest_t chest_arr[], int boss_array[TOTAL_...
/******************************************************************************* Raiders5 (c) 1985 Taito / UPL Video hardware driver by Uki 02/Jun/2001 - *******************************************************************************/ #include "vidhrdw/generic.h" UINT8 *raiders5_fgram; size_t raiders5_fgram_size...
#include "bcm2835.h" #include "bcm2835_dma.h" static unsigned int dma_channels_alloced = 0; //Bitmask of dma channels in use /* Allocate a DMA channel * * lite: if != 0, signal that this may be a lite channel * TODO: use the lite flag. Currently only returns full channels * * returns: 0 if failure (no channel a...
#include "head.h" //Fonction principale pour lancer une commande, elle va s'occuper le tableau de chaine de caractère découpé int lancerfoncappart(char** mot, char** dirs, int *save, int *file, int child){ int test, i, tmp; char pathname[MaxPathLength]; test=lancerfonc(mot,dirs,save,file,child); //Fin du prog...
/* * Copyright 2017 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
// --- // sayhellolib.c // --- #include <SWI-Prolog.h> #include <stdio.h> #include <assert.h> #include <stdbool.h> #include <string.h> // numeric ids for the "encoding" // // All of these values can be distingusihed from FALSE (and also from TRUE) // so a function can return either these or FALSE. /* * This works i...
//////////////////////////////////////////////////// // Copyright (c) 2012 ICRL // See the file LICENSE.txt for copying permission. // // Original Author: <NAME> // Date: 7/10/2012 // Contact: <EMAIL> //////////////////////////////////////////////////// #include "GameStateManager.h" #include "GameStateLis...
#define LIBANT_DEBUG #include "quadtree.h" #include "node.h" #include <grid.h> #include <string.h> #include <stdio.h> #include <assert.h> #define t(a) assert( a ) #ifndef _WIN32 #include <mcheck.h> void no_op(enum mcheck_status status) { } void probe(qt_node_t * node) { printf(DEBUG("Probing node @ (%lld, %lld)...
// SPDX-License-Identifier: GPL-2.0-only /* * GPIO driver for the MikroTik RouterBoard 4xx series * * Copyright (C) 2008-2011 <NAME> <<EMAIL>> * Copyright (C) 2008 <NAME> <<EMAIL>> * Copyright (C) 2015 <NAME> <<EMAIL>> * Copyright (C) 2020 <NAME> <<EMAIL>> * * This file was based on the driver for Linux 2.6.22 ...
// Copyright (c) 2016 <NAME> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed ...
#include <stdio.h> #include <malloc.h> #include <windows.h> #include "list.h" void UpdateHighLighted ( int dlen, int end ) { int i; long l; ScrLock (1); if (vHighLen + dlen == 0 && vHighLen) { i = vAttrHigh; vAttrHigh = vAttrList; vHLB...
/* nph-redirect - simple redirection CGI program ** ** Copyright (C) 1995 by <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...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <sys/types.h> #include <dirent.h> #include <string.h> #include <errno.h> #define oklidBoyutu 3 #define LINESIZE 100000 #define OZELLIK_SAYISI 17 typedef struct { double ozellik[OZELLIK_SAYISI]; } OZELLIK_MIN; typedef struct { double ozelli...
/* * (C) Copyright 2009 * Marvell Semiconductor <www.marvell.com> * Written-by: <NAME> <<EMAIL>> * * Derived from drivers/spi/mpc8xxx_spi.c * * 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 ...
/* * spifi.c * SPIFI test */ #include <stdio.h> #include <string.h> #include "chip.h" #include "spifi.h" #include "xprintf.h" /* * SPIFI interface registers */ struct spifi_regs { uint32_t ctrl; uint32_t cmd; uint32_t addr; uint32_t idata; uint32_t climit; union { uint8_t data8; ...
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the program and library */ /* SCIP --- Solving Constraint Integer Programs */ ...
/* * * Copyright 2011 the mod_auth_cas team. * * 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 l...
/************************************************************************************//** * @file main.c * @version V3.00 * @brief Show the usage of GPIO external interrupt function and de-bounce function. * * SPDX-License-Identifier: Apache-2.0 * @copyright (C) 2016 Nuvoton Technology Corp. All rights re...
#include "posix_fenv_tests.h" #include "../posix/errno.h" #include "../posix/fenv.h" #include "../../ttf/ttf.h" static void test_definitions() { ASSERT_EQUALS("Checking, if FE_DIVBYZERO is defined correctly", FE_DIVBYZERO, 4); ASSERT_EQUALS("Checking, if FE_INEXACT is defined correctly", FE_INEXACT, 32); ...
#define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRING_H 1 #define HAVE_MEMORY_H 1 #define HAVE_STRINGS_H 1 #define HAVE_I...
// Copyright (c) 2021 sitec systems GmbH #include "flash.h" #include <fcntl.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <stdbool.h> #include <string.h> #include <stdint.h> #include <fcntl.h> #include <sys/stat.h> #include <unistd.h> #include <libmtd.h> #include <mtd/mtd-user.h> struct flas...
// SPDX-License-Identifier: BSD-3-Clause /* Copyright (c) 2020 <NAME> <<EMAIL>> */ #include <linux/if_link.h> #include <linux/limits.h> #include <net/if.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <stdbool.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #inc...
/* * Copyright © 2009 Intel Corporation * * 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, pub...
/* shortRepeatFind - Figure out short pieces of DNA that happen a lot in genome. * The current implementation scans the splix index. Scanning a suffix array * index is better though, so I recomment you use sufaRepeatFind instead. */ /* This file is copyright 2008 <NAME>, but license is hereby * granted for all use...
// bjw Win16 <-> Win32 compatibility macros #include <direct.h> // dwb KtoA #include <stdlib.h> // dwb KtoA #include <io.h> // dwb KtoA #include <memory.h> // dwb KtoA #include <string.h> ...
/*------------------------------------------------------------------------------ Copyright (c) 2008 The Khronos Group Inc. All Rights Reserved. This code is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. This is UNPUBLISHED PROPRIETARY SOURCE CODE that may not be disclosed i...
/* * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ /* */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #includ...
#include "dirlist.h" #include <stdio.h> const DirEntryType DT_IGNORE = '?'; const char *DT_BLK_STR = "DT_BLK"; const char *DT_CHR_STR = "DT_CHR"; const char *DT_DIR_STR = "DT_DIR"; const char *DT_FIFO_STR = "DT_FIFO"; const char *DT_LNK_STR = "DT_LNK"; const char *DT_REG_STR = "DT_REG"; const char *DT_SOCK_STR = "DT_...
/* * Copyright (c) 2017 Intel Corporation. All rights reserved. * This software is available to you under the BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redi...
/* ** ################################################################### ** Processors: MKE18F256VLH16 ** MKE18F256VLL16 ** MKE18F512VLH16 ** MKE18F512VLL16 ** ** Compilers: Keil ARM C/C++ Compiler ** ...
#include <stdio.h> #include <stdlib.h> #ifdef __APPLE__ #include <OpenCL/cl.h> #else #include <CL/cl.h> #endif //OpenCL kernel as a string const char *matMulKernel = "__kernel \n" "void matMul_Kernel(__global int *A, \n" " ...
/* * The MIT License (MIT) * * Copyright (c) 2019 <NAME> (tinyusb.org) * * 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 *...
#include "fonction.h" void smartmove(t_move* move, t_move** actions, int E1, Position pos1, Position pos2, Position tresor, char* labData, int size_x, int size_y){ //Joue avec une stratégie pour gagner ! if(astarCompare(pos1,pos2,tresor,labData,size_x,size_y)<1 && E1>=5){ smartRotate(move,E1,pos1,pos2,tre...
#include <stdio.h> #include <stdint.h> #include <wiringPi.h> #include <wiringPiI2C.h> #include <unistd.h> // for close //Sensor Type Indentifiers #define SENSORTYPE_AS7261 61 #define SENSORTYPE_AS72651 65 #define AS72XX_SLAVE_TX_VALID 0x02 #define AS72XX_SLAVE_RX_VALID 0x01 #define AS72XX_SLAVE_STATUS_REG 0x00 #defi...
/* The MIT License (MIT) Copyright (c) 2015 <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...
/** * 17 - Mouse events * */ #include <SDL2/SDL.h> #include <stdio.h> #include <stdbool.h> #include "common.h" #include "LTexture.h" #include "LButton.h" #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 480 #define SETFRAME(var, arg1, arg2, arg3, arg4) \ do { \ var.x = arg1; \ var.y = arg2;...
// // Created by <NAME> on 2017-12-21. // #include <stdio.h> #include <stdint.h> #include <time.h> #include "input.h" #include "dijkstra.h" #define PRINT_FILE_INFO 0 // 0 or 1 #define PRINT_GRAPH 0 // 0 or 1 #define NAIVE_ALGORITHM 0 #define FILE_ID "_sredni3" #define MAKE_FILENAME(name) name FILE_ID ".txt" #defin...
/************************************************************************ * * Basic Interval Arithmetic Subroutines Timing Measurement Program * ---------------------------------------------------------------- * * Copyright (C) 1998 <NAME> * * This file is part of PROFIL/BIAS. * * PROFIL/BIAS is free software;...
/****************************************************************************** * * * Copyright 2020-2021 <NAME> * * * * L...
/* * 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...
/** * Copyright (c) 2017 <NAME> * * This software is released under the MIT License. * https://opensource.org/licenses/MIT */ #include <cardinal/driver_utils.h> #include <cardinal/shared_memory.h> #include <cardinal/mem/server.h> #include <pci/pci.h> #include <stdio.h> static uint64_t PCI_BAR; static uint32_t is...
#ifdef __linux__ #define _GNU_SOURCE #endif #include <stdio.h> #include <assert.h> #include <math.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> #include <sys/time.h> #include <MagickWand.h> #include <omp.h> #include "nashville.h" typedef struct piece_ { MagickWand *piece; int index; } piece...
/* * NR5G_RLC_DL_Stats */ #include "consts.h" #include "log_packet.h" #include "log_packet_helper.h" const Fmt NrRlcDlStats_Fmt [] = { {UINT, "Version", 4}, }; const Fmt NrRlcDlStats_v4 [] = { {UINT, "Num RB", 1}, {UINT, "Reason", 1}, {UINT, "Num FC Down Commands", 4}, ...
#include "message.h" #include <arpa/inet.h> #include <netinet/in.h> #include <stdio.h> #include <string.h> #include <sys/socket.h> #include "utils.h" #include "minunit.h" #define BUFSIZE 512 int tests_run = 0; static char *test_msglen() { mu_assert ("Error: msglen(ACKM) != 6", msglen(ACKM) == 6); mu_assert ("E...
/* * Developed by <NAME> * Copyright (c) 2015 Celticom * * 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 T...
/****** Implementation of a toy traffic light. timer 0: light scheduling and button debouncing timer 1: IR receive and transmit Pin assignments: PA0: IR activity indicator LED (debug) PA1: red LED PA2: yellow LED PA3: green LED PA4: ISP USCK PA5: ISP MISO PA6: ISP MOSI, IR TX PA7: IR RX PB0: XTAL1 PB...
#include "xmfract.h" #include "fractype.h" #include "macros.h" #include "helpdefs.h" #include "mpmath.h" #include "globals.h" #include "prototyp.h" #ifndef NO_IDENT #ident "$Id: ifsload.c,v 1.400 1995/06/20 15:39:23 darryl Exp $" #endif /* static variables */ static char insufficient_ifs_mem[]={"Insufficient memory ...
/*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* ** ** ** This file forms part of the Underworld geophysics modelling application. ** ** ...
/* * findmsg_test.c * * Created on: 20 mar 2018 * Author: kamil */ #include <findmsg/findmsg.h> #include <findmsg/conf/newline.h> #include <findmsg/conf/stub.h> #include <assert.h> #include <curb.h> #include <unistd.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #define TEST(expr) do{ \ if ...
//----------------------------------------------------------------------------- // Include //----------------------------------------------------------------------------- #include "draw.h" //----------------------------------------------------------------------------- // Global variable //----------------------------...
/* * Copyright (c) 2006 <NAME> * (Royal Institute of Technology, Stockholm, Sweden). * 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) 2021 <NAME> <<EMAIL>> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, pu...
// Copyright (c) 2021 WindowsCommands // Licensed under the MIT License. #include "RegMain.h" DWORD ParseRegCmdLine(PREG pReg, int argc, LPWSTR argv[]); BOOL InitializeReg(PREG pReg); int wmain(int argc, LPWSTR argv[]) { _wsetlocale(LC_ALL, L""); BOOL bResult = SUCCESS; REG Reg = { 0 }; Initializ...
/* * Low level interfacing b/t emu and OS * (ie for drawing, IO, etc.) * */ #include "io.h" #include "low.h" #include "Z80.h" #include "mem.h" #include "common.h" #include "logging.h" #include "registers.h" #include <X11/Xlib.h> #include <X11/Xutil.h> #define REAL_W (SCR_W * G_scale) #define REAL_H (...
#pragma once #include "db_error.h" #include "db_redblack.h" #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif #define MAX_segs 1000 #define MIN_segbits 17 #define MIN_segsize (1ULL << MIN_segbits) #define MAX_segsize (1ULL << (32 + 4)) // 32 bit offset and 4 bit multiplier #define MAX_path ...
#include "lcd_nokia5110.h" #include <util/delay.h> #define WIDTH 84 #define HEIGHT 48 #define SET_BIT(DST, POS, VALUE) DST = (DST & ~(1 << POS)) | (VALUE << POS) #define GET_BIT(SRC, POS) (SRC & (1 << POS)) >> POS uint8_t RST, SCE, DC, DIN, CLK; uint8_t buffer[WIDTH * 6]; //Transmit byte by SPI void SendByte(uint8_...
/* * File : watcher.c * Author : <NAME> * Date : Jan. 21, 2015 * Description : This is used to watch if the app is uninstall. * * Copyright (C) <NAME><<EMAIL>> * */ #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <...
/*++ /* NAME /* cleanup_map11 3 /* SUMMARY /* one-to-one mapping /* SYNOPSIS /* #include <cleanup.h> /* /* int cleanup_map11_external(state, addr, maps, propagate) /* CLEANUP_STATE *state; /* VSTRING *addr; /* MAPS *maps; /* int propagate; /* /* int cleanup_map11_internal(state, addr, maps, propagate) /* CLEANUP_STATE ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <sys/time.h> #include <sys/socket.h> #include <uv.h> #include "hashtable.h" #include "db.h" #include "bitcase.h" #include "cmd.h" #include "cron.h" #include "bcmem.h" /*----Helper functions--*/ /*Return the UNIX microseconds time*/...
// gcc -Wall -Wextra -Wpedantic -Werror -Wshadow -std=c11 web.c -lpthread -o web && ./web public #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <sys/socket.h> #include <arpa/inet.h> #include <sys/stat.h> #include <unistd.h> #include <pthread.h> #define BUFFER_SIZE 1024 char *...
/* <NAME> Algoritmos e programação de computadores Trabalho 2 */ #include <stdio.h> #include <math.h> int modulo(int f) { return (f < 0 ? -f : f); } float fatorialsupremo (float x) { if (x==0) return 1; else return x*fatorialsupremo (x-1); } int fatorial (int x) { if (x==0) return 1;...
#include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> #endif // Parameter 1 = number of pixels in strip // Parameter 2 = Arduino pin number (most are valid) // Parameter 3 = pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) // NEO_KHZ40...
/*=========================================================================*\ * Poll implementation * LuaSocket toolkit \*=========================================================================*/ #include "luasocket.h" #include <stdlib.h> #include <string.h> #include "socket.h" #include "poll.h" /*================...
char netcpu_procstat_id[]="\ @(#)netcpu_procstat.c (c) Copyright 2005. Version 2.4.0"; /* netcpu_procstat.c Implement the /proc/stat specific portions of netperf CPU utilization measurements. These are broken-out into a separate file to make life much nicer over in netlib.c which had become a maze of ...
#include "drally.h" #include "drally_keyboard.h" extern byte ___185ba9h[]; extern byte ___1a10cch[]; extern __DWORD__ ___1a1140h[8]; extern void * ___1a112ch__VESA101_ACTIVESCREEN_PTR; extern void * ___1a1124h__VESA101h_ScreenBufferA; extern byte ___24cc54h[]; void ___12cb8h__VESA101_PRESENTSCREEN(void); void _...
/** * @file serial.c * @author <NAME> [https://github.com/JiuSenso/Ball-Balancing-PID-System.git] * * @brief SERIAL COMMUNICATION * - open serial communication * - close serial communication * - packet encode/decode * - debug print * * @date 2019-01-11 * * @copyright Copyright (c) 2019 * */ /******************...
/* Codebase macros - Change as you might need. * Yes, Rogel, you can gloat all you want. You win, this is cleaner, though not by a whole lot. */ #ifndef __IMC2CFG_H__ #define __IMC2CFG_H__ #if !defined(IMCCIRCLE) && !defined(IMCSTANDALONE) && !defined(IMCWILEY) #define CH_IMCDATA(ch) ((ch)->pcdata->imccha...
#include <stdint.h> #include <stdio.h> #include <machine/fastmath.h> #include <math.h> #include "angles.h" #include "main.h" #include "lib/timer.h" #define SETUP_MEASUREMENTS 500 /** Data structures --------------------------------------------------------- */ typedef struct angles_axis_t { double x; double y; do...
/************************************************************************** * * \file * * \brief QTouch Controller * * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. * * \asf_license_start * * \page License * * Subject to your compliance with these terms, you may use Microchip * so...
/* * ESPRESSIF MIT License * * Copyright (c) 2018 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD> * * Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case, * it is free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to dea...
/* * IDCT.c * * Created on: Sep 11, 2009 * Author: yonga */ #include "Jpeg.h" const uint8_t SCALE = 11; uint16_t p1 = 1448; uint16_t p2 = 1448; uint16_t p3 = 2008; uint16_t p4 = 399; uint16_t p5 = 1892; uint16_t p6 = 783; uint16_t p7 = 1702; uint16_t p8 = 1137; uint16_t p9 = 2896; inline int32_t Multiply(in...
/* * Copyright (c) 2022, Intel Corporation * * 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, publis...
/* * src/bin/pg_autoctl/azure_config.c * Configuration file for azure QA/test environments * * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the PostgreSQL License. * */ #include <pwd.h> #include <stdbool.h> #include <sys/types.h> #include <unistd.h> #include "postgres_fe.h" #...
// SPDX-License-Identifier: GPL-2.0+ /* NetworkManager Connection editor -- Connection editor for NetworkManager * * <NAME> <<EMAIL>> * * Copyright 2008 - 2014 Red Hat, Inc. */ #include "nm-default.h" #include <netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <errno.h>...
#include "subprocesses.h" #include <assert.h> #include <errno.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <event2/event.h> #include "logging.h" /* This tracks state for a single subprocess. */ typedef struct child_info { /* The pid of the subprocess. */ p...
/* * GL04ModelTransform.cpp: Model Transform - Translation and Rotation * Transform primitives from their model spaces to world space. */ #include <GL/glut.h> // GLUT, include glu.h and gl.h /* Initialize OpenGL Graphics */ void initGL() { // Set "clearing" or background color glClearColor(0.0f, 0.0f, 0.0f, ...