text stringlengths 3.12k 18.7k |
|---|
/*
* Mimic integer (mpz) part of GMP using int128 macros, for speed.
*
* This software is Copyright (c) 2015 magnum
* and is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* WARNING: Currently... |
/*****************************************************************************
オーダー : DRAM制御
CPU : H8 3069F
コンパイラ : h8300-elf-gcc version 3.4.6
ファイル名 : dram.h
接頭辞 : dram
作成日時 : 2014-06-12
*****************************************************************************/
/*
改訂履歴
*/
/*******************************... |
/*
* Copyright 2012-15 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... |
/*
* Timing and Organization details of the Elpida parts used in OMAP5
* EVM
*
* (C) Copyright 2010
* Texas Instruments, <www.ti.com>
*
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it... |
/*
* 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>
#include <string.... |
/*! \file bcma_ha.c
*
* HA file I/O.
*/
/*
* Copyright: (c) 2018 Broadcom. All Rights Reserved. "Broadcom" refers to
* Broadcom Limited and/or its subsidiaries.
*
* Broadcom Switch Software License
*
* This license governs the use of the accompanying Broadcom software. Your
* use of the software indicates... |
/*
* Copyright (c) 2016 <NAME> <<EMAIL>>
* Author: <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
*... |
/*
* Copyright (C) 2005-2006 Micronas USA Inc.
*
* 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 WIT... |
/*****************************************************************************************
* *
* *
* *
* ... |
/**
* Sistemas Operativos.
* Autor: <NAME>
* Descripcion: Este programa recibe un comando con pipes y lo divide en subcomandos: subomando0 | subcomando1 | subcomando2. Para esto primero descompone el comando por espacios.
* Bug:
* 06/06/2020 - Metiendo el comando "ls -a | sort -n | wc > archivo.txt" le quita .tx... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c)... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#define BASE 10
#define LINE_SIZE 1000
#define BINOM(x) ( (x) * ((x) - 1) / 2 )
// Function prototypes
int pairDiffs(int, int, int*, char**, int*);
int addToBin(int, int*, int*);
int growMatrix(int, unsigned int, char**);
char **allocMatri... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
Lock kmaplock;
KMap ktlb[KTLBSIZE];
KMap * kmapfree;
void
kmapinit(void)
{
KMap *k, *klast;
lock(&kmaplock);
kmapfree = ktlb;
klast = &ktlb[KTLBSIZE-1];
for(k=ktlb; k<klast; k++)
k->next = k+1;
k->next = 0;
unlock(&... |
/*
* Copyright (c) 2020 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Helper file for VNIC main application.
* This contains the following functions:
* net_arp_dev_init() -- Initialize ARP context with driver data
* if_get_addr() -- Get IPv4 address for the interface provid... |
/* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2017 - <NAME>
* Copyright (C) 2015-2018 - <NAME>
* Copyright (C) 2018-2020 - natinusala
*
* RetroArch 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 ... |
/*
* MIT License
*
* Copyright (c) 2011-2018 <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, ... |
#include "papi.h"
#include "caches.h"
#include "prepareArray.h"
#include "timing_kernels.h"
#include "dcache.h"
typedef struct {
int *values;
double **rslts;
double **counter;
char *event_name;
int detect_size;
int readwrite;
} data_t;
extern int _papi_eventset;
int global_max_iter, global_line_size_in_b... |
/* GStreamer command line device monitor testing utility
* Copyright (C) 2014 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, ... |
/* Copyright 2020 IBM Corp.
*
* 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 writi... |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "mpi.h"
#include "scf_decompose.h"
typedef struct {
double dTime;
unsigned nBodies;
unsigned nDim;
unsigned nSph;
unsigned nDark;
unsigned nStar;
unsigned nPad;
} tipsyHdr;
typedef struct {
FILE *fp;
int bEncoding;... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2008-2009 coresystems GmbH
* Copyright (C) 2010 <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; versi... |
/*+-----------------------------------------------------------------**
** OpenScop Library **
**-----------------------------------------------------------------**
** test.c **
**--------------------------------... |
/*
* File: timers.c
* Author: mdunne
*
* Created on November 15, 2011, 9:53 AM
*/
#include <xc.h>
#include <BOARD.h>
#include <peripheral/timer.h>
#include "timers.h"
/*******************************************************************************
* PRIVATE #DEFINES ... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
#include"my_recv.h"
#include"zzy_server.h"
#include"mysql.h"
//选择函数
void *choices(void *recv_pack){
pack *recv_pack_t = (pack*)recv_pack;
printf("\nthe choice is %d\n",recv_pack_t->type);
switch(recv_pack_t->type){
case LOGIN:
login_server(recv_pack_t);
break;
ca... |
/* Copyright 2018 <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.
*
* This program is distribu... |
/* This is a very simple editor by "Freder".
* There are some bugs, and some features are not implemented.
*
* ------------------------------------------------------------
* It's my account as a freshman for college.
* --- February 3, 2018
*/
#include "editbox.h"
struct W... |
/*
Functions to allocate and deallocate structures and structure data
By <NAME> 1989.09.29, <NAME> 2006.03.25.
See COPYRIGHT file for copyright information.
*/
#include <assert.h>
#include "pm_c_util.h"
#include "mallocvar.h"
#include "nstring.h"
#include "pam.h"
#include "image.h"
/* this table is us... |
/** In the DSL the user has the option to specify the
* root in a phase. This is done by saying root = <node name>.
* This then takes a sub-tree from the full AST and do
* actions only on the sub-tree. However, we do not take
* one sub tree, we take all sub-trees that have, as their
* root, the specified root. The... |
/*
* Copyright (c) 2007-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:
* * Redistributions of source code must retain the above copyright
* notice, this list of con... |
#include "pathfinding.h"
static Bool is_in_queue(int const max_array, Coord queue[max_array], Coord const coord)
{
for (int i=0;i<max_array;i++)
if (is_same_coord(queue[i], coord))
return TRUE;
return FALSE;
}
static void set_in_queue(int const max_array, Coord queue[max_array], Coord con... |
/*
* Copyright 2020 u-blox
*
* 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 writi... |
/* packet-lge_monitor.c
* Routines for LGE Monitor packet dissection
* Copyright 2006, <NAME> <<EMAIL>>
*
* Wireshark - Network traffic analyzer
* By <NAME> <<EMAIL>>
* Copyright 1998 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public ... |
/*------------------------------------------------------------
* Copyright 1994 Digital Equipment Corporation and <NAME>
* All Rights Reserved
*
* Permission to use, copy, and modify this software and its documentation is
* hereby granted only under the following terms and conditions. Bot... |
///////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT NOTICE
//
// The following open source license statement does not apply to any
// entity in the Exception List published by FMSoft.
//
// For more information, please visit:
//
// https://www.fmsoft.... |
/**
* Copyright (c) 2014 Redpine Signals Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTH... |
/*
* In this lesson, you will add an additional wall for an extra challenge.
*
* To make this work, you will duplicate the original wall and add checks to
* ensure the program works correctly for both obstacles
*/
#include "MakerScreenXVI.h"
MakerScreenXVI lcd;
byte run0[8] = { //legs in partial stride
0b00... |
/***** spin: pangen4.c *****/
/* Copyright (c) 1991,1995 by AT&T Corporation. All Rights Reserved. */
/* This software is for educational purposes only. */
/* Permission is given to distribute this code provided that this intro- */
/* ductory message is not removed and no monies are exchan... |
/*
* FreeRTOS+UDP V1.0.4 (C) 2014 Real Time Engineers ltd.
* All rights reserved
*
* This file is part of the FreeRTOS+UDP distribution. The FreeRTOS+UDP license
* terms are different to the FreeRTOS license terms.
*
* FreeRTOS+UDP uses a dual license model that allows the software to be used
* under a... |
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
#in... |
#include <stddef.h>
#include <descriptor_table.h>
#include <gdt.h>
#include <idt.h>
#include <io.h>
#define SEGMENT_BASE 0 // Use Flat addressing
#define SEGMENT_LIMIT 0xFFFFFFFF // Allow it to access all of 4GB memory
#define GDT_ENTRIES 5
#define IDT_ENTRIES 256
gdt_entry_t gdt_entries[GDT_ENTR... |
/*
* Implementation of the ICE encryption algorithm.
*
* Written by <NAME> - July 1996
*/
#include "ice.h"
#include <stdio.h>
#include <stdlib.h>
/* Structure of a single round subkey */
typedef unsigned long ICE_SUBKEY[3];
/* Internal structure of the ICE_KEY structure */
struct ice_key_struct {
int ik_si... |
/*
*
* Copyright (c) International Business Machines Corp., 2001
*
* 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 l... |
/*
Author: <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 conditions and ... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2007 Advanced Micro Devices, Inc.
*
* 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 distr... |
//
// Created by root on 3/20/16.
//
#include <string.h>
#include <assert.h>
#include "handle_read.h"
typedef enum {
PARSE_SUCCESS = 1 << 1, /* Parse the Reading Success, set the event to Write Event */
PARSE_BAD_SYNTAX = 1 << 2, /* Parse the Reading Fail, for the Wrong Syntax */
PARSE_BAD_REQUT = 1 <... |
//programador: <NAME>
//professor: <NAME>
//instituicao de ensino: escola superior politecnica uninter
//disciplina: linguagem de programacao
//ide: visual studio community 2019
//exercicio: algoritmo para resolver a torre de hanoi de 3 a 9 discos
#include <stdio.h>
#include <stdlib.h>
int torrea[9];
int torreb[9];... |
/* We lean on the fact that POLL{IN,OUT,ERR,HUP} correspond with their
* EPOLL* counterparts. We use the POLL* variants in this file because that
* is what libuv uses elsewhere and it avoids a dependency on <sys/epoll.h>.
*/
#include "uv.h"
#include "internal.h"
#include <stdint.h>
#include <stdio.h>
#include <s... |
/*
******************************************************************************
* @file read_data_polling.c
* @author MEMS Software Solution Team
* @brief This file shows how to extract data from the sensor in
* polling mode.
*
*******************************************************************... |
// gcc -Wall -o test_support test_support.c && ./test_support && rm ./test_support
#include <stdio.h>
// NOTE: This file is intended to be compiled and run on a host processor,
// and the resulting output copied into mu_printf_test.c
/*
* MAKE_MU_PRINTF_TEST is a macro that generates unit tests. It is intended
* t... |
#include <stdio.h>
typedef const unsigned int UINT32;
extern UINT32 LOADER_INTERP_start;
extern UINT32 LOADER_INTERP_stop;
extern UINT32 LOADER_HASH_start;
extern UINT32 LOADER_HASH_stop;
extern UINT32 LOADER_DYNSYM_start;
extern UINT32 LOADER_DYNSYM_stop;
extern UINT32 LOADER_DYNSTR_start;
extern UINT32 LOADER... |
/* $Id: local.c,v 1.34 2011/06/23 13:41:25 ragge Exp $ */
/*
* Copyright (c) 2008 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copi... |
/**************************************************************************//**
* @file main.c
* @version 1.0.0
* @brief A secure firmware updater. The updater connects to the Host(PC)
* SecureISP tool via an UART or USB connection. It receive commands
* from Host to update secure boot ... |
/*
Copyright (c) 2014 NicoHood
See the readme for credit to other people.
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,... |
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#ifdef __MSVCRT__
#define fseeko fseeko64
#define ftello ftello64
#define off_t off64_t
#endif
/*
* lafs 0.1
* a simple AFS extractor, by hcs
*
* Written specifically for <NAME> N... |
#include <LiquidCrystal.h>
// Utiliza LEDs para sinalizar a condição de funcionamento do ESP8266
const int PINO_LED_ERRO = 13; // Sinaliza erro na comunicação
const int PINO_LED_OK = 12; // Sinaliza que o ESP8266 está operacional
// Quais pino estão ligados ao Display LCD
const int PINO_LCD_RS = 2;
const int PINO... |
/*****************************************************************************\
** **
** FILE: register_non_megistos.c **
** AUTHORS: Alexios **
**... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int **constructTruthTable(){
//mallocate the 4*2 matrix to store the output qubits
int row = 4;
int column = 2;
int **TruthTable = NULL;
TruthTable = (int **)malloc(sizeof(int *) * row);
for (int i = 0; i < row;i++){
TruthTable... |
#include "mex.h"
#include <math.h>
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
void mexFunction(int nlhs, mxArray *plhs[], int nrhs,
const mxArray *prhs[])
{
int i, j, j0, k, ik, l, N, Nbatch, Nfree, Nmax, ind, L, lx, dx, Nmaps;
int ix, iy, iz, ix2, iy2, xr, yr, zr, iW, iW... |
/* RISCOS module implementation */
#include "h.osfscontrol"
#include "h.osgbpb"
#include "h.os"
#include "h.osfile"
#include "Python.h"
#include <errno.h>
static os_error *e;
static PyObject *RiscosError; /* Exception riscos.error */
static PyObject *riscos_oserror(void)
{ PyErr_SetString(RiscosError,e->errmess);... |
/**
* \file db_lite.c
* \brief EasySDL: Database management for esave.c
* \author <NAME>
* \version 0.1
* \date 08-02-2015
*
* EasySDL est une extension de la librairie SDL standard
* Utilise SQLite3
* Fortement inspiré de https://www.sqlite.org/cvstrac/wiki?p=BlobExample
*
*/
#include <stdio.h>
#include <... |
#include "api.h"
// must be called before CAN can be used
// Sample call: initCAN(NODE_speedometer);
int initCAN(uint8_t nodeID) {
sei(); // enable global interrupts
CANGCON = _BV(SWRES); //Software reset
CANTCON = 0x00; //CAN timing prescaler set to 0;
// Set baud rate to 1000kb (assuming 8Mhz I... |
#include <stdio.h>
#include <ncurses.h>
#include <unistd.h>
#include <string.h>
#define THUMB0 " ,voZ5#V4J#VV$#z)-"
#define THUMB1 " .T91+ ?TI#Y:"
#define THUM... |
/******
program ples
! Parallel Linear Equation solver
! Array A = ( MP*MLA x NP*NLA )
! Proc. grid is MP x NP
! Local mat. (al) MLA x NLA
! array A(ig,jg) = 0.1*ig + 0.001*jg (ig not= jg)
! = ig (ig = jg)
! Solve Ax=b, b=1
******/
#i... |
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#define MAX 100
#define MAX2 15
int comparaStrings(char nomeUm[], char nomeDois[]){
int i = 0;
while(nomeUm[i] == nomeDois[i] && nomeUm[i] != '\0' && nomeDois[i] != '\0'){
i++;
}
if(nomeUm[i]== '\0' && nomeDois[i]== '\0'){
re... |
#include "BlueSetupWifi.h"
#include <esp_check.h>
#include <esp_log.h>
#include <nvs_flash.h>
#include <esp_nimble_hci.h>
#include <nimble/nimble_port.h>
#include <nimble/nimble_port_freertos.h>
#include <host/ble_hs.h>
#include "GAP_NimBLE.h"
#include "GATT_NimBLE.h"
static const char c_szTAG[] = "BlueSetu... |
/*
* pulp_nn_depthwise_3x3_s1.c
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Copyright (C) 2020 University of Bologna
*
* 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://ww... |
/*
* Copyright (c) 2016, Cray 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 source code must retain the above copyright notice,
* this list of conditions ... |
/*
* Copyright (c) 2016 Dynamic Weather Solutions, Inc. Distributed under the
* terms of the MIT license.
*
* 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, includin... |
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "lice... |
#include "sq.h"
#include <Carbon/Carbon.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/serial/IOSerialKeys.h>
#include <IOKit/IOBSD.h>
#define MAXPATHLEN 256
extern struct VirtualMachine *interpreterProxy;
static kern_return_t FindModems(io_iterator_t *matchingServices);
static void GetModemPath(io_iterator_t serial... |
/**
*****************************************************************
* Bus Matrix
*****************************************************************
*/
#include <stdint.h>
#include "sglib.h"
#include "sgstring.h"
#include "bus.h"
#include "at91_matrix.h"
#define MATRIX_MCFG0(base) ((base) + 0)
#define MATRIX_MCFG... |
/*
Copyright (c) 2002-2004, <NAME>
Part of Radeon accelerant
Multi-monitor management
*/
#include "radeon_accelerant.h"
#include "generic.h"
#include "GlobalData.h"
// transform official mode to internal, multi-screen mode enhanced mode
void Radeon_DetectMultiMode( virtual_card *vc, display_mode *mode )
{
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <sys/time.h>
#include <sys/stat.h>
#if SILKIE_OFFSCREEN
#include <GL/osmesa.h>
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#else
#include <GLFW/glfw3.h>
#endif
#if SILKIE_OFFSCREEN
type... |
/*
* Copyright 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, merge, publish, distribute... |
#include <math.h>
#include <string.h>
#include "half_type.h"
/* Utility function */
uint32_T getBitfieldFromFloat(real32_T a)
{
uint32_T bitfield;
memcpy(&bitfield, &a, sizeof(real32_T));
return bitfield;
}
real32_T getFloatFromBitfield(uint32_T a)
{
real32_T value;
memcpy(&value, &a, sizeof(real32_T));
r... |
#include "config.h"
#include "debug.h"
#include "magic.h"
#include "util.h"
#define M_3GPP_FTYP 0x0000001466747970
#define M_MP4_FTYP 0x0000001866747970
#define M_3GPP2_FTYP 0x0000002066747970
#define M_ICO 0x00000100
#define M_VAX_COFF_EX 0x0178
#define M_TAR_ZIP_LZW 0x1F9D... |
#define stat xv6_stat // avoid clash with host struct stat
#include "types.h"
#include "fs.h"
#include "stat.h"
#include "param.h"
#include "user.h"
#include "fcntl.h"
void failure(int line);
#define assert(expression) if(expression){}else failure(__LINE__)
#define _static_assert(a, b) do { switch (0) case 0: case ... |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <dlfcn.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include ... |
#pragma once
static int parse_questions(dancers_parse *parse) {
size_t *offset = &(parse->header.offset);
size_t length = parse->header.length;
dancers_packet *packet = &(parse->header.packet);
TRACE_START();
TRACE("parsing questions (%zu)", packet->qd_count);
size_t count = packet->qd_count;
size_t mi... |
#include "ambiente.h"
#include "eventos.h"
#include "utils.h"
#include <stdio.h>
#include <time.h>
#include <math.h>
#define INCREASE_MAX 3
#define DECREASE_MAX (-3)
static int sorteia_ilha();
static void set_ilha(Node* node);
static int ME();
static int MD();
static void PreencheLinha(Node* node);
static int l... |
/*
* pmatrixmult.c - A parallel program to mulitply two matrices
*/
// compile as: gcc -DN=10000 -DGOOD -DCHECK -lpthread -lrt -o <prog>
//
// run as: ./<prog> <numthreads>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h> // for clock_gettime()
#include <errno.h> // for perror()
... |
#include<stdlib.h>
#include<string.h>
#include<semaphore.h>
#include<stdio.h>
#include <sys/mman.h>
int done[50];
int count;
struct tuples
{
char userID[5];
int action;
char topic[15];
};
struct tuples **Buffer;
int map_value(char ch);
int buf_size,num_thread;
int *in,*out,*cnt;
sem_t sem[50],Full[50],Empty[50... |
/*
* Battery driver for LEGO MINDSTORMS EV3
*
* Copyright (C) 2017 <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 "as is" WIT... |
/*
This file is part of GNUnet.
Copyright (C) 2013 GNUnet e.V.
GNUnet 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, or (at your
option) any later version.
G... |
#include "PT.h"
#include <stdio.h>
typedef enum
{
STATE_RUNNING = 1,
STATE_FULLSCREEN = 1 << 1,
STATE_MOUSE_GRABBED = 1 << 2
} State;
static int SetupProgram(GLuint* dst)
{
GLuint program;
GLuint shaders[3];
if(LoadShader(shaders, GL_VERTEX_SHADER, "Noise.glsl") < 0) return -1;
if(LoadSha... |
/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of <NAME>, <EMAIL>. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use in source and bina... |
/* GStreamer
* Copyright (C) 2013 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*... |
/* sample_error.c
Run a monte-carlo simulation to approximate the distribution of capacities
expected if the given matrix had zero bandwidth. Used to generate
confidence intervals.
This code is experimental, and error-handling is primitive.
*/
/* Copyright 2013, NICTA. See COPYRIGHT for license details... |
/*
This file is part of SW2 code
2018-2020
<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
UPC - ESEIAAT - TUAREG
(c) <NAME>, <NAME> 2018-2020
LICENSED UNDER: Attribution 4.0 International
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdarg.h> // needed for crash
#include... |
#include "../libs/RSA.h"
#include <stdio.h>
#include "gmp.h"
#include "time.h"
int generateKey_RSA(mpz_t e, mpz_t d, mpz_t n) {
mpz_t p, q, temp, for_gcd, p_1, q_1, phi_n;
mpz_inits(p,q, temp, for_gcd, p_1, q_1, phi_n , NULL);
int length_RSA= 1024;
int length2 = length_RSA / 2; //length for p and q
// rand... |
// t2a.c - "byed rtsis" routines
int epch_mth_b, ical_ind_b;
extern int nyifac[];
extern int print_on, printinprog;
extern char printstring[120];
void start_print ( void );
void prin_str ( char * );
void addstrings ( char *, char * );
// Local to this file only:
int sol_cor[6];
int gzadab[6];
int ny... |
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <cuda.h>
#include <cuda_runtime_api.h>
#include "sequence.h"
#include "evaluate_cuda_kernels.h"
/* Declare global GPU pointers */
unsigned char *d_msa;
unsigned char *d_msa_transposed;
conjugrad_float_t *d_prec... |
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
#include <math.h>
/* Predefined values */
#define IMG_HEIGTH 200 // Image height
#define IMG_WIDTH 200 // Image width
#define ITERATIONS 500000 // Total number of iterations
/* Macro for minimum operations */
#define MIN(a,b) (((a)<(b))?(a):(b))
/*... |
/***************************************************************************
* @file:main.c
* @author:
* @date: 5,29,2019
* @brief: 工程总入口文件
* @attention:
***************************************************************************/
#include <stdio.h>
#include <unistd.h>
#include<sys/time.h>
#include <sys/types.h>... |
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "esp_wifi.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freerto... |
/*
* workthread.c
* Execute command, read input from a FIFO, write output to a logfile.
*
* Copyright (c) 2021, 2022 jjb
* All rights reserved.
*
* This source code is licensed under the MIT license found
* in the root directory of this source tree.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/typ... |
/*
** Copyright (C) 2001-2020 by Carnegie Mellon University.
**
** @OPENSOURCE_LICENSE_START@
** See license information in ../../LICENSE.txt
** @OPENSOURCE_LICENSE_END@
*/
/*
**
** num2doc.c
**
** <NAME>
** 7/31/2002
** "filter" to convert numeric ip to dotted ip. The default field
** delimiter is '|' in... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "mrsocket.h"
struct User{
int id;
int type;
int fd;
int snd_id;
int rcv_id;
struct mr_buffer* buffer;
int bind_fd;
};
#define kMUserNum 60
struct User* client_users[kMUserNum] = {0};
struct User* ser... |
#ifndef INSO_XML_H
#define INSO_XML_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
// Tokens.
// "next = " signifies that the next token is a char* cast to uintptr_t with additional data.
enum {
IXT_EOF = 0,
IXT_TAG_OPEN, // next = tag name
IXT_TAG_CLOSE,
IXT_PI_OPEN, // next = processing inst... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.