text stringlengths 3.08k 10.5k |
|---|
/*!
https://www.geeksforgeeks.org/socket-programming-cc/
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/epoll.h>
#include <pthread.h>
#include <time.h>
#define MAX_CLIENT_THREAD 10000
const char request_string[] = "GET ... |
//
// devINA219.c
//
//
// Created by <NAME> on 17/11/2020.
//
#include <stdlib.h>
#include "fsl_misc_utilities.h"
#include "fsl_device_registers.h"
#include "fsl_i2c_master_driver.h"
#include "fsl_spi_master_driver.h"
#include "fsl_rtc_driver.h"
#include "fsl_clock_manager.h"
#include "fsl_power_manager.h"
#incl... |
/* $OpenBSD: text.c,v 1.2 2015/04/24 16:45:32 nicm Exp $ */
/*
* Copyright (c) 2015 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include "structures.h"
int index_acte()
{
int index;
FILE* fichier=fopen("Index", "r");
if(fichier==NULL)index=1;
else {
fscanf(fichier,"%d",&index);
index+=1;
}
fichier=fopen("Index", "w+");
fprintf(fi... |
/*
Face recognition demo
Copyright (C) 2013 <NAME> <<EMAIL>>
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 th... |
/**
******************************************************************************
* @file usart.c
* @author Lichangchun
* @version
* @date 13-April-2017
* @brief
******************************************************************************
*/
/* Includes -------------------------------------... |
#include <stdio.h>
#include <stdlib.h>
#include "plumber.h"
typedef struct {
SPFLOAT amp, freq, ifreq;
SPFLOAT sicps;
int32_t phs256, npts, maxpts;
SPFLOAT *buf;
unsigned char init;
} sp_pluck;
int sp_pluck_create(sp_pluck **p);
int sp_pluck_destroy(sp_pluck **p);
int sp_pluck_init(sp_data *sp, sp... |
#include "interrupt.h"
#include "lcd.h"
uint64_t next_update_time(gb_state *state)
{
/* tima-register 0xff05 */
int clock[] = {256, 4, 16, 64};
int cl = clock[state->mem->mem[0xff07] & 0x03];
int stat_mode = state->mem->mem[0xff41] & 0x03;
uint64_t time = state->ly_count + 114;
if (time > sta... |
#include "../common/exceptions.h"
#include "../common/messages.h"
#include "control.h"
#include "screen.h"
#include "shortcuts.h"
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xutil.h>
#include <xcb/xcb_keysyms.h>
static xcb_connection_t *display;
static xcb_screen_t *screen;
static xcb_w... |
/*
* 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... |
/* Amavect! */
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <thread.h>
#include <mouse.h>
#include <keyboard.h>
#include "elementile.h"
/*
* Calculate minimum size by the minimum sizes of the children,
* the division type, and the division width.
*/
Point
guipartinit(Elementile *e)
{
Guipart *gp;
P... |
GLuint computeProgramID;
GLuint displayProgramID;
GLuint writeFramebufferID;
GLuint readFramebufferID;
GLuint writeTextureID;
GLuint readTextureID;
void checkForErrors(char* where){
GLenum err = glGetError();
while (err != GL_NO_ERROR){
printf ("at %s, GL error code %d\n", where, err);
err = glGetError();
}
}
... |
/* adjacency tool for assoicated objects */
/* Copyright 2007 United States Government as represented by the
* Administrator of the National Aeronautics and Space
* Administration. No copyright is claimed in the United States under
* Title 17, U.S. Code. All Other Rights Reserved.
*
* The knife platform is lice... |
//////////////////////////////////////////////////////////////////////////////////////
// Mail: <EMAIL>
// About the details of license, please read LICENSE
//////////////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include "lasev.h"
#include <malloc.h>
#include <signal.... |
#define _GNU_SOURCE
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#if 0
#include <sys/syscall.h>
extern char* program_invocation_short_name;
#define __HEAD(head, ...) head
#define __TAIL(head, ...) __VA_ARGS__
#define LOG(...) fprintf(stderr, "fakeudev: [%.50s][%d:%ld] " __HEAD(__... |
/**
* @file i2c_drv.c
* @brief I2C driver
* @version 1.0
* @date 15 Jun. 2017
*
**/
#include "drivers/i2c_drv.h"
#include "devices/timer_dev.h"
void I2C0_Init(void);
static int check_status(void) {
int status = I2C0_GET_STATUS;
switch(status) {
case ACK_OK:
case CONTROLLER_IDLE:
case SLAW_OK... |
/*
* Copyright (c) 2010-2016 SURFnet bv
* Copyright (c) 2016 <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
*... |
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include "exc.h"
#include "strbuf.h"
#include "vmops.h"
#include "object.h"
#include "strobject.h"
#include "tupleobject.h"
#define INDEX_CHECK(index, count) \
if ((index) < 0 || ((size_t)(index)) >= (count)) { \
return RHO_INDEX_EXC("tuple index out of ra... |
#include <assert.h>
#include "arch/common.h"
#include "arch/smiv/common.h"
#include "arch/smiv/dispatch_utils.h"
#include "core/nnet_fwd_defs.h"
#include "core/smiv/params.h"
#include "core/smiv/smiv.h"
#include "utility/compression.h"
#include "utility/utility.h"
#ifdef DMA_MODE
#include "gem5_harness.h"
#endif
// D... |
#include <stdio.h>
#include <stdlib.h>
#include <mex.h>
#include <math.h>
#include <time.h>
#define YES 1
#define NO 0
#define X(ix,iy) (ix)*iNy+ (iy)
#define X2(ix,iy) (ix)*im+ (iy)
#define X3(ix,iy) (ix)*iw+ (iy)
#define X4(ix,iy,i) (i)*iNyNx+ (iy)*iNx+ (ix)
#define X5(iX,i) (i)*iNyNx+ iX
#define Xb(ix,iy) (iy)*... |
#include <assert.h>
#include <string.h>
#include <sys/types.h>
#include "numdefs.h"
#include "stringworks.h"
/* A Boyer-Moore attempt */
/*
Returns the index of given substring within s, assuming that the first character of the
substring is in fact a not-char, as in the first matching character simply must *no... |
#define NDEBUG
#define __YAX__
#include <string.h>
#include <codas/ref.h>
#include <yax/mountflags.h>
#include <yax/openflags.h>
#include "fs/fds.h"
#include "fs/name.h"
#include "mem/malloc.h"
#include "multitask.h"
#include "printk.h"
static void mfree(const RefCounted *rc)
{
MountTab *mt = (MountTab *) rc;
Mount ... |
/*
* Copyright (C) 2015-2019 Envision Digital Limited
*/
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <winsock.h>
#include "infra_defs.h"
#include "infra_config.h"
#include "wrappers_defs.h"
#include "wrappers_os.h"
#ifdef _MSC_BUILD
#include <Winbase.h>
#pragma comment(lib,"ws2_32")... |
/* SWILL Mandelbrot example */
#include "swill.h"
#include "gd.h"
/* Structure containing plot data */
typedef struct {
double Xmin;
double Xmax;
double Ymin;
double Ymax;
int Tolerance;
gdImagePtr im;
} MandelData;
/* Handler function that draws an image */
void mandel(FILE *f, MandelData *m) ... |
/* $OpenBSD: bootp.h,v 1.5 2003/08/11 06:23:09 deraadt Exp $ */
/* $NetBSD: bootp.h,v 1.3 1996/09/26 23:22:01 cgd Exp $ */
/*
* Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
*
* This file specifies the "implementation-independent" BOOTP protocol
* information which is common to both client and server.
*
* Cop... |
/*
* hi6421_pwrkey.c - Hisilicon Hi6421 PMIC ONKEY driver
*
* Copyright (C) 2013 Hisilicon Ltd.
* Copyright (C) 2013 Linaro Ltd.
* Author: <NAME> <<EMAIL>>
*
* 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 fo... |
/*
* System includes.
*/
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
/*
* Local includes.
*/
#include "client.h"
#include "logger.h"
#include "strings.h"
#include "json.h"
#include "debug.h" // always last
typedef enum { success, failure } status_t;
static status_t
check_key(jobj_t * jobj, cons... |
/* Copyright (c) 2017 Arrow Electronics, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License 2.0
* which accompanies this distribution, and is available at
* http://apache.org/licenses/LICENSE-2.0
* Contributors: Arrow Electronics, Inc.... |
#include <memory.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/mman.h>
#include "../ptedit_header.h"
#define COLOR_RED "\x1b[31m"
#define COLOR_GREEN "\x1b[32m"
#define COLOR_YELLOW "\x1b[33m"
#define COLOR_RESET "\x1b[0m"
#define TAG_OK COLOR_GREEN "[+]" COLOR_RESET " "
#define TAG_FAIL COLOR_RED "[-]" CO... |
/*
Copyright (C) 1995-2001 Activision, Inc.
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.1 of the License, or (at your option) any later version.
This library is distribu... |
#include "utils.h"
#include "algorithm.h"
/**
This sorts regions of SA with the same current_rank by their next_rank-
the value a distance 2^h away. It outputs runs of (curr, next, count)
**/
//create RunRecord triplet and sort
void sort_and_output_group(int * sa_buffer, long * next_ranks_buffer, long current... |
/* Copyright (c) 2015 The University of Edinburgh. */
/*
* This software was developed as part of the
* EC FP7 funded project Adept (Project ID: 610490)
* www.adept-project.eu
*/
/* Licensed under the Apache License, Version 2.0 (the... |
#include <N76E003.h>
#include <iap.h>
#include <i2c.h>
#include <tick.h>
#include <event.h>
/* compile with "-DUSE_UART=1" to select UART1 instead of the default UART0 */
#include <uart.h>
#include <terminal.h>
#include <pinterrupt.h>
#include <dht.h>
#include <bv4618.h>
#include <pcf8574.h>
#include "main.h"
#inclu... |
/*
* Copyright (c) 2018-2021 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
#include <bearssl.h>
#include "fido.h"
#include "fido/es256.h"
static int
hkdf_sha256(uint8_t *key, const char *info, const fido_blob_t *secret)
{
... |
/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... |
/*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2011-2014 Intel Corporation
* Copyright (C) 2004-2010 <NAME> <<EMAIL>>
*
*
* 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... |
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdarg.h>
#include <errno.h>
#include <linux/limits.h>
#include <linux/usb/ch9.h>
#include <linux/usbdevice_fs.h>
#include <asm/byteorder.h>
#include <sys/ioctl.h>
#inclu... |
/*-
* Copyright (c) 2018 <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 co... |
/**
* Copyright 2013 Yahoo! Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may
* obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, sof... |
//*****************************************************************************
//! @file usb_suspend.c
//! @brief USB library suspend and wakeup functionality.
//!
//! Revised $Date: 2013-04-08 13:14:23 +0200 (Mon, 08 Apr 2013) $
//! Revision $Revision: 9658 $
//
// Copyright (C) 2013 Texas Instrume... |
#include <mpi.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#define N 1600
int calcularMaximo(int A[], int tam);
int main(int argc, char *argv[])
{
int size, rank;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &size);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if (size != 12)
... |
#include <stdarg.h>
#include <stdio.h> /* vsnprintf */
#include <stdlib.h>
#include <string.h>
#include "IIV.h"
#include "IIV_t.h" /* print_string */
#include <sgx_tcrypto.h>
#include <ctype.h>
#include <sgx_tseal.h>
#include "sgx_tprotected_fs.h"
#include <stdbool.h>
#define INITIAL_ALLOC 512 //Max number of c... |
/*
* File: nnsim.c
* ==============
* Subroutines in this program perform the symbolic factorization
* and set up the data structure and memory allocation
* for the generalized profile matrix solver
*
* Altered to avoid eliminate the realloc calls in setting up pplnz
* March 8 1990
* Originally written by:... |
#include "mathconvert.h"
#include "asmcommands.h"
#include "error.h"
#include "functioncall.h"
#include "pemdas.h"
#include "srccompile.h"
#include "strmanip.h"
#include <string.h>
#include <stdlib.h>
void pemdas(FILE* execfile, char* calc, int nbytes) {
if(!(*calc)) {
//Fills the address with 0 if the ... |
/*
* sound fft.c
*
* Created: 4/24/2020 2:10:02 PM
* Author : Vitve
*/
#define F_CPU 16000000UL
#define F_SCL 100000UL
#define FHT_N 64
#define LOG_OUT 1
#define NOISE_ADD 3
#include <avr/io.h>
#include "user_ADC.h"
#include "FHT.h"
#include "user_UART.h"
#include "spi.h"
#include "user_I2... |
#include "generic_devices.h"
#include "devices.h"
#include <timing.h>
#include <stdint.h>
#include <graphics.h>
#include <SVG_colors.h>
#include <interrupts.h>
#include <touchscreen.h>
#include <drv_pwmx.h>
#include <stdio.h>
#include <drv_vga_ili9320.h>
typedef struct moving_ball
{
int32_t x, y, x_change, y_chang... |
/*****************************************************************************
* RUN EMBEDDED CODE-STRINGS
* handles debugging, module (re)loading, namespaces, output conversions;
* pbd.runeval returns a value: "eval(expr + '\n', globals, locals)";
* pdb.run is just a statement: "exec cmd + '\n' in globals, lo... |
/**
* Perilous Pointers Lab
* CS 241 - Spring 2019
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
* Checks to see if the input parameter is a passing grade and prints out
* if the grade is passing using the provided format specifiers. Note that
* 'grade' is a char pointer pointing to the beg... |
/*
* Copyright 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 agreed to... |
/* portpester - pesters a TCP port with lots of connections */
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <err.h>
#ifdef SYSDIG
#include <fcntl.h>
#endif
#include <getopt.h>
#include <netdb.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#inclu... |
/*
* Copyright (c) 2018-2022 <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, merg... |
#include <ruby.h>
#include <sys/resource.h>
#include <sys/wait.h>
#include <sys/utsname.h>
static VALUE S_PROC_STATS = Qnil;
static VALUE S_SYS_INFO = Qnil;
// signatures
void Init_procinfo(void);
static VALUE sysinfo_uname(void);
static VALUE _to_sysinfo_struct(const struct utsname *);
static VALUE _to_proc_stats... |
/*****************************************************************
Copyright 2001 <NAME>
University of Udine
ITALY
<EMAIL>
www.montessoro.it
This file is part of a freeware open source software package.
It can be freely used (as it is or modified) as long as this
copyright note is not remove... |
/* $OpenBSD: dhcpd.h,v 1.12 2009/09/03 11:56:49 reyk Exp $ */
/*
* Copyright (c) 2004 <NAME> <<EMAIL>>
* Copyright (c) 1995, 1996, 1997, 1998, 1999
* The Internet Software Consortium. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted prov... |
/* <NAME> (a2gs)
* <EMAIL>
*
* Lib calcDate
*
* MIT License
*
*/
/* libAddSubDate.c
* Lib do add/subtract date.
*
* Who | When | What
* --------+------------+----------------------------
* a2gs | 03/03/2019 | Creation
* | |
*/
/* *** INCLUDES ***********************... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
#include "inc.h"
#include "tcpcrypt_ctl.h"
#include "tcpcrypt.h"
#include "tcpcryptd.h"
#include "crypto.h"
#include "profile.h"
#include "divert.h"
#include "test.h"
static struct state {
int s_dlen;
int s_drop_packe... |
/*
* Week 6 Interprocess communication
*
* gcc -o IPCTest IPCTest.c
*/
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/types.h>
#define NUM_SEMAPHORES 2
#define NUM_ITERATIONS 5
#define SHM_SIZE sizeof(int)
#define IPCKEYFILE "/dev/null"
#define IPCPROJID 12345
// dow... |
#include "common.h"
#include "test.h"
int test_bytes_to_hex() {
unsigned char buf[1024];
unsigned char single0[1] = { 0 };
unsigned char singleFF[1] = { 255 };
unsigned char bytes[4] = { 10, 10, 10, 10 };
unsigned char bytes2[4] = { 255, 0, 255, 0 };
ciron_bytes_to_hex(bytes, 4, buf);
EXPECT_BYTE_EQUAL((unsi... |
//
// Advent of Code 2021
//
// Day 11
//
// Author: <NAME>
//
// Thought process:
// Once an octopus flashed set its value to -9999, then after the step,
// all negative entries are set to 0
// Part 2: count flashes in a cycle and when it is == EDGE*EDGE stop
//
#include <stdio.h>
#include <stdlib.h>
#include <string... |
/*+
* Copyright 2018 Two Pore Guys, Inc.
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of con... |
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#if (OS_TARGET != OS_BSD)
#include <malloc.h>
#endif
#include "test_extras.h"
#include "../SIDH.h"
#include "../SISig.h"
#define MSGSIZE 1024
struct Signature
{
unsigned char *com[NUM_ROUNDS][2]; //2*NUM_ROUND... |
#include <config.h>
#include <sys/types.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dnscrypt.h"
#include "alt_arc4random.h"
#include "randombytes.h"
size_t
dnscrypt_response_header_size(void... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2020, <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... |
/*
* PlayerViewer
* Copyright (C) <NAME> 2002
*
* 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... |
/* --------------------------------------------------------------------------
Restart Silgy app if dead
<NAME>
-------------------------------------------------------------------------- */
#include "silgy.h"
#define BUFSIZE 8196
#define REASON_CONNECT 1
#define REASON_WRITE 2
#define... |
/*
Copyright (C) 2006-2007 <NAME>
This program 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 3 of the License, or
(at your option) any later version.
This program is distributed i... |
/* Language Includes */
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
/* Standard System Include */
#include <unistd.h>
#include <time.h>
#ifndef F_OK
#define F_OK 0
#endif
/* SDL Library */
#include <SDL.h>
/* Local Includes */
#include "types.h"
#include "wrappers.h"
#include "obj... |
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef struct {
int xmin;
int xmax;
int ymin;
int ymax;
int zmin;
int zmax;
} cube;
void cube_from_array(cube *c, int arr[6]) {
c->... |
#include <pebble.h>
#include "win_menu_day.h"
#include "../app.h"
#define NUM_MENU_SECTIONS 2
#define NUM_WHOLE_WEEK_SECTION_ITEMS 1
extern int DAY_OF_WEEK;
static Window *s_menu_day_window;
static MenuLayer *s_menu_layer;
static void window_load(Window* window);
static void window_unload(Window* window);
static ui... |
#include <stdint.h>
#include <string.h>
#include <cx/cx.h>
#include <cx/platform/base.h>
#include <cxmem/xalloc/xalloc.h>
#include "cstrutil.h"
// Why does this file exist? Because Microsoft is stupid and renamed strdup,
// since it's technically "non-standard". As it's not part of ISO and
// compatibility is a pain, ... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// SIZE precisa ser em Potencia de 2
#define SIZE 1024
/** Union usada para vetorizacao
* vec - usado para instrucoes SIMD
* elem - elementos do vetor
*/
typedef union{
int __attribute__((vector_size(SIZE*sizeof(int)))) vec;
int elem[SIZE... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct persona{
//int ID = 0
char nombre[20];
int edad;
char ciudad[20];
}persona[20];
int i, numRegistros = 0, numBuscar;
//void AgregarPersona(persona.nombre, persona.edad, persona.ciudad );
void AgregarPersona(int numRegistros);
void MostrarR... |
/*
* File: sphere.c
*
* This file holds the data structures and functions that manipulate spheres.
*
*/
/*
*
* MIT License
*
* 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"... |
/*
* Nuvoton NPCM7xx Random Number Generator.
*
* Copyright 2020 Google LLC
*
* 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... |
/*
----------------------------------------------------------------------------
Test a perfect hash.
By <NAME>. Public Domain.
----------------------------------------------------------------------------
*/
#include "recycle.h"
#include "test_hash.h"
#include "inttypes.h" /* for PRI/SCN format specifiers */
#include ... |
/*
* Copyright (c) 2018 Qualcomm Technologies, Inc.
* Copyright (c) 2004-2006 Atheros Communications Inc.
* All Rights Reserved.
*/
// Copyright (c) 2018 Qualcomm Technologies, Inc.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted (subject to t... |
#include <lib.h>
#include <ns.h>
#include <jif/jif.h>
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/mem.h"
#include "lwip/pbuf.h"
#include "lwip/sys.h"
#include <lwip/stats.h>
#include <netif/etharp.h>
#define PKTMAP 0x10000000
struct jif {
struct eth_addr *ethaddr;
envid_t envid;
};
static void
l... |
#include <unistd.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/alloc.h>
#include <caml/fail.h>
#include <caml/callback.h>
// ----- sd-journal libsystemd bindings
#include <systemd/sd-journal.h>
sd_journal *mlj;
char mlj_field_count... |
// verify-demo.c
// Minimalist CSF verifier demo using https://github.com/laurencelundblade/QCBOR
#include <qcbor/qcbor_decode.h>
#include <qcbor/qcbor_spiffy_decode.h>
#include "print-buffer.h"
#include "csf-verifier.h"
/*
{
1: "Hello signed CBOR world!",
2: [2.0, true],
3: {
1: -8,
... |
/*
* ex17_07: main.c
* Write a program that opens and reads a text file and records how many times
* each word occurs in the file. Use a binary search tree modified to store
* both a word and the number of times it occurs. After the program has read
* the file, it should offer a menu with three choices:
* ... |
//
// breakout.c
//
// Computer Science 50
// Problem Set 4
//
// standard libraries
#define _XOPEN_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// Stanford Portable Library
#include "gevents.h"
#include "gobjects.h"
#include "gwindow.h"
// height and width of game's window in ... |
/*
*
* Copyright (c) 2014, Yelp 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 conditi... |
/*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include "token.h"
#include "scanner.h"
#include "errors.h"
#include "memory.h"
#include "strings.h"
// Scanner data structure is private.
typedef struct _scanner {
const char* fname;
int line_no;
int c... |
#include "img.h"
#include <fcntl.h>
#include <esp_vfs.h>
#define SIGNATURE_SIZE 4
#define HEADER_SIZE 8
#define PALETTE_OFFSET (SIGNATURE_SIZE + HEADER_SIZE)
#define PALETTE_SIZE(img) ((img->header.flags & G_IMG_FLAG_INDEXED) ? (sizeof(g_color_t) * (img->header.palette_size + 1)) : 0)
const char* colormode2str(g_img... |
#include <pigpio.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include <wiringPi.h>
#include <string.h>
// Add TFTGL library
#include <tftgl.h>
// Add NANOVG library
#include <nanovg.h>
#define NANOVG_GLES2_IMPLEMENTATION // Use GLES 2 implementation.
#include <nanovg_gl.h>
#include <bcm2835.h>
st... |
#include "NetStorageClient.h"
#include <sp/ScopeLock.h>
enum kNetPacket {
kNetPacket_Open,
// kNetPacket_OpenResponse,
kNetPacket_Read,
// kNetPacket_ReadResponse,
};
typedef struct {
// Includes the length of this header
u32 packet_len;
// Values of kNetPacket
u32 packet_type;
s32... |
/*
This file is part of Tracy.
Tracy 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.
Tracy is distributed in the ho... |
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/silicon_creator/lib/otbn_util.h"
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include "sw/device/lib/base/bitfield.h"
#include "sw/... |
/** \file main.c
\brief Button tutorial application for Adafruit FeatherM0 (Atmel ATSAMD21G18A) using ASF
\license
MIT: The MIT License (https://opensource.org/licenses/MIT)
.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation f... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... |
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "pipe/p_state.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/u_format.h"
#include "util/u_format_s3tc.h"
#include "util/u_string.h"
#include "os/os_time.h"
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <li... |
/*
* Copyright (c) 2009 Intel Corp., Inc.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source tree, or the
*... |
/*++
Copyright (c) 1990 Microsoft Corporation
Module Name:
DATA.C
Abstract:
This file contains all the global data elements of the eventlog service.
Author:
<NAME> (rajens) 10-Jul-1991
[Environment:]
User Mode - Win32, except for NTSTATUS returned by some functions.
Re... |
/*==========================================================
* config file utils for polymorph
*==========================================================*/
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <dirent.h>
#include "polymorph_types.h"
#include "rcfile.h"
/* xternal g... |
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy o... |
/*
* Copyright 2019, Data61
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
* ABN 41 687 119 230.
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(DATA... |
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include "grb2.h"
#include "wgrib2.h"
#include "fnlist.h"
/*
* 8/2013 Public Domain by <NAME>
*
* grid values can be saved in one of two different styles.
*
* ECMWF-style:
* all variables use N-bits of precision t... |
/** klib - Kernel Based-Library, Provides a few functions */
#include <klib/kmath.h>
#include <klib/string.h>
void* memcpy(void* s1, void* s2, size_t n)
{
char *dst = s1;
const char *src = s2;
while (n-- != 0)
*dst++ = *src++;
return s1;
}
size_t strlen(const char * str)
{
const char *s... |
#include "refuge.h"
#include "menu.h"
MenuItem* menu_item_create(int distance, char* name, int name_len) {
MenuItem* this = malloc(sizeof(MenuItem));
this->distance = distance;
this->name = malloc(name_len);
memcpy(this->name, name, name_len);
this->subtitle = malloc(16);
snprintf(this->subtitle, 16, "%... |
#include "copyright.h"
/* Prototypes for externs not defined elsewhere */
#include "db.h"
/* From create.c */
extern void do_open (dbref player, const char *direction, const char *linkto);
extern void do_link (dbref player, const char *name, const char *room_name);
extern void do_dig (dbref player, const char *name);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.