text stringlengths 3.08k 10.5k |
|---|
/* $OpenBSD: adw_pci.c,v 1.17 2015/03/14 03:38:48 jsg Exp $ */
/* $NetBSD: adw_pci.c,v 1.7 2000/05/26 15:13:46 dante Exp $ */
/*
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Author: <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without... |
#include "include/prodCons.h"
#include "../StandardLibrary/include/mutex.h"
#include "../StandardLibrary/include/sem.h"
#include "../StandardLibrary/include/pthread.h"
#include "../StandardLibrary/include/stdio.h"
int full;
int empty;
int mutex;
int plates = 0;
pthread_t waiters[MAX_PRODCONS] = {0};
pthread_t chefs[MA... |
#include <app_timer.h>
#include <nrf51.h>
#include "rtc_timing.h"
#include "ble_setup.h"
#include "custom_board.h"
// This is a slight optimization. Our timer wakes our chip whenever the timer goes off,
// so we want to wake it as little as necessary. Thus, we want out clock timer to rarely tick, but we needs millise... |
/*
* Copyright (c) 2018, Mellanox Technologies and Contributors.
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <console.h>
#include <mmio.h>
#include <string.h>
#include <utils_def.h>
#include "bluefield_private.h"
#include "tmfifo_console.h"
#include "rsh_def.h"
/*
* This functi... |
// defines for things that do not normally need changing
#define MOTOR_BL 0
#define MOTOR_FL 1
#define MOTOR_FR 3
#define MOTOR_BR 2
#define PIDNUMBER 3
#define DEGTORAD 0.017453292f
#define RADTODEG 57.29577951f
#define AUXNUMBER 16
#define ROLL 0
#define PITCH 1
#define YAW 2
// this should be precalculated b... |
//
// The CODE[] table may include the things below, or
// ascii characters for simple operators
//
#define THE_END 0 // actually it should be infty..
#define CALL_AGAIN 256
#define IDENT_DUMMY 257
// Intermediate reserved
#define FCONSTANT 258
#define CCONSTANT 259
#define CONSTANT 300
#define STRING 301
#define... |
//#define _CRT_SECURE_NO_DEPRECATE
#pragma once
#define _UNICODE
#define UNICODE
#define _WIN32_WINNT 0x0601
#define WINVER _WIN32_WINNT
//*
//#define WIN32_LEAN_AND_MEAN
//#define STRSAFE_NO_DEPRECATE
#define VC_EXTRALEAN
#define NOMCX
#define NOKANJI
#define NOCRYPT
#define NOSCROLL
#define NOSOUND
#define NOSYSME... |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "mpi.h"
#include <string.h>
void linspace(double a, double b, int n, double p[]);
void matrix(int n, double p[],double g[]);
int iteracions (double cx, double cy,int max_it);
void checkr(int r,char *txt);
int quants();
int whoami();
int worksplit(int ... |
/* See LICENSE file for copyright and license details. */
#include <sys/wait.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <xcb/xcb.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/xproto.h>
#include <X11/keysym.h>
#define eprint(STR) (f... |
/*
* Copyright(C) 2012 <NAME>. All Rights Reserved.
*
* This file is part of the YARD-ICE.
*
* 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 3.0 of the License,... |
/*
* Copyright (c) 2017, Carnegie Mellon University.
* 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... |
/*
* Copyright (c) 2010, Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* n... |
/*
* OTA_Object_Int.c
*
* Created on: Aug 25, 2011
* Author: wlai
*/
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <OTA_Def.h>
long get_Int_value (OTA_Object* p)
{
long ret;
if (p == NULL)
return 0;
ret = p->payload.obj_int.obj_data;
return ret;
}
voi... |
/*
MIT License
Copyright (c) 2020 PCSX-Redux authors
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... |
/**
* Microcontroller specific code for CANopenNode nonvolatile variables.
*
* This file is a template for other microcontrollers.
*
* @file eeprom.h
* @ingroup CO_eeprom
* @author <NAME>
* @copyright 2004 - 2013 <NAME>
*
* This file is part of CANopenNode, an opensource CANopen Stack.
* Pr... |
/*
Pretty LAYer for ChibiOS/RT - Copyright (C) 2015 <NAME>
This file is part of PLAY for ChibiOS/RT.
PLAY 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
... |
#include <stdio.h>
#include "../inc/gkeysym.h"
struct { char *name; int ks; } keysyms[] = {
"BackSpace", GK_BackSpace,
"Tab", GK_Tab,
"Linefeed", GK_Linefeed ,
"Clear", GK_Clear,
"Return", GK_Return,
"Pause", GK_Pause,
"Scroll_Lock", GK_Scroll_Lock ,
"Sys_Req", GK_Sys_Req ,
"Escape", GK_Escape,
"Delete... |
/* $OpenBSD: rcstime.c,v 1.6 2016/08/26 09:02:54 guenther Exp $ */
/*
* Copyright (c) 2006 <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 sour... |
/*
** $Id: ldblib.c,v 1.5 1999/03/04 21:17:26 roberto Exp $
** Interface from Lua to its debug API
** See Copyright Notice in lua.h
*/
#include "windef.h"
//#include <stdlib.h>
#include <string.h>
#include "lauxlib.h"
#include "lua.h"
#include "luadebug.h"
#include "lualib.h"
static void settabss (lua_Object t, ch... |
/**
* @brief Cronus Digital Clock Datetime Functions
*
* @author <NAME> <<EMAIL>>
* @copyright MIT License
*/
#include <string.h>
#include "aespl/ds3231.h"
#include "cronus/alarm.h"
#include "cronus/main.h"
#include "driver/i2c.h"
#include "esp_err.h"
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#i... |
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <ctype.h>
#include <errno.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include "PageTable.h"
#include<time.h>
int page,frame;
page_table_point... |
/*
* Adapted this test program from
* http://developer.osdl.org/daniel/AIO/TESTS/aiodio_append.c
* Needs libaio-devel RPM installed.
* and compile as
*
*/
#define _GNU_SOURCE
#include "pvfs2-test-config.h"
#include <sys/types.h>
#include <stdlib.h>
#include <signal.h>
#include <fcntl.h>
#include <stdio.h>
#in... |
#include "dependencies.h"
#include "asprintf.h"
#include "strerror.h"
#include "string_value.h"
#include <arbiter/Requirement.h>
#include <arbiter/Types.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// not portable
#include <dirent.h>
static const int lineRead... |
/*
* Copyright 2010--2014 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* 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... |
/*
* edibis_terminal.c
*
* Handles ALL terminal I/O and does non-blocking
* reads direct from keyboard/pad.
*
* NB: This is not fully ported to all hosts.
* 8-13-2011 - RJB - Fixes for gcc4.4.4 on 64-bit linux
* 12-08-2012 - RJB - Converted to POSIX termios.h compatibility
* on LI... |
/*******************************
* interval.c
* Source for Intervals
*
* <NAME>
* <EMAIL>
* 8.02.05
******************************/
#include "interval.h"
/**
* Adds a point at the lowest level of an interval.
*
* @param i Interval to have pointed added.
* @param pt value of point
* ... |
/***************************************************************************
* Project : shakti devt board
* Name of the file : init.c
* Brief Description of file : source file for system initialization.
* Name of Author : <NAME> & <NAME>
* Email ID : <EMAIL>
... |
#include <stdio.h>
#include <stdlib.h>
#include "core.h"
#include "linalg.h"
#define WITHOUT_PIVOTING 0
#define WITH_PIVOTING 1
/*
* Cubic spline routine.
* Adapted from Numerical Recipes in C, p. 96.
* The tridiagonal system is solved with pivoting
* to avoid numerical instability.
* Assumes zero-offset a... |
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include <net-snmp/library/container.h>
#include <net-snmp/library/snmp_debug.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#incl... |
#define TEST 0
#define COPY_PASTE_CALC 0
#include <stdio.h> // para printf()
#include <stdlib.h> // para exit()
#include <sys/time.h> // para gettimeofday(), struct timeval
#if ! TEST
#define NBITS 20
#define SIZE (1<<NBITS) // tamaño suficiente para tiempo apreciable
unsigned lista[SIZE]; // unsigned-> desp... |
#include <em7180.h>
#define CROSSLOG_TAG "em7180"
#include <crosslog.h>
void em7180_print_feature_flags(uint8_t flags) {
CROSSLOGD("features:");
if (flags & EM7180_FF_BAROMETER)
CROSSLOGD("\tbarometer");
if (flags & EM7180_FF_HUMIDITY_SENSOR)
CROSSLOGD("\thumidity sensor");
if (flags ... |
/* testnumerableicon.c
* Copyright (C) 2010 Red Hat, Inc.
* Authors: <NAME>
*
* 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... |
/*
* @mindmaze_header@
*/
/* process shared data: parent program
*
* example of parent process, child is implemented in pshared-child.c.
*
* This program writes to a shared text (in shared memory) concurrently to
* other children of the parent process. Each child maps into memory a file
* descriptor (SHM_CHILD... |
#include <stdio.h>
#include <stdlib.h>
#define MAX 2500
#define INF 21474836
int d,k;
struct nodo{
int ind;
int dist;
};
//input functions
void read_param();
void read_commands();
void aggiungiGrafo();
//main functions
void min_heapify(int);
void buildMinHeap();
void max_heapifyGraph(int)... |
#include <sys/types.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <err.h>
#include <time.h> /* time() */
#include <errno.h>
#include "ringbuf.h"
#define SIP_U 1000000
char *prog_name = NULL;
/* ring buffer holder */
struct ringbu... |
//
// gasearch_knapsack_example.c
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <getopt.h>
#include "liquid.h"
#define OUTPUT_FILENAME "gasearch_knapsack_example.m"
// print usage/help message
void usage()
{
printf("Usage: gasearch_knapsack_example [options]\n");
printf(" u/h : pri... |
/*++
/* NAME
/* scan_dir 3
/* SUMMARY
/* directory scanning
/* SYNOPSIS
/* #include <scan_dir.h>
/*
/* SCAN_DIR *scan_dir_open(path)
/* const char *path;
/*
/* char *scan_dir_next(scan)
/* SCAN_DIR *scan;
/*
/* char *scan_dir_path(scan)
/* SCAN_DIR *scan;
/*
/* void scan_push(scan, entry)
/* SCAN_DIR *scan;
/* const ch... |
#define _XOPEN_SOURCE 500
#include "misc.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <dirent.h>
char*vmprintf(const char*fmt,va_list ap){
va_list ap_copy;
size_t len=16,need_len;
char*dst=malloc(sizeof(char)*len);
if(dst){
... |
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
unsigned long int ShaftCountLeft = 0; //to keep track of left position encoder
unsigned long int ShaftCountRight = 0; //to keep track of right position encoder
unsigned int Degrees; //to accept angle in degrees for turning
//Function to configure... |
/*------------------------------------------------------------------------------
*
* Copyright (c) 2011-2018, EURid vzw. All rights reserved.
* The YADIFA TM software product is provided under the BSD 3-clause license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitte... |
/*
* $QNXLicenseC:
* Copyright 2009, QNX Software Systems.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You
* may not reproduce, modify or distribute this software except in
* compliance with the License. You may obtain a copy of the License
* at: http://www.apache.org/licenses/LICENSE-2.0... |
typedef int __int32_t_t101;
typedef unsigned int __uint32_t_t102;
typedef long long __int64_t_t103;
typedef unsigned long long __uint64_t_t104;
typedef __int32_t_t101 __psint_t_t105;
typedef __uint32_t_t102 __psunsigned_t_t106;
typedef __int32_t_t101 __scint_t_t107;
typedef __uint32_t_t102 __scunsigned_t_t108;
typedef... |
#include "decl.h"
// Removes a node from the list.
void rmnode(Node *node) {
if (node->prev != NULL)
node->prev->next = node->next;
if (node->next != NULL)
node->next->prev = node->prev;
if (node->parent && node->parent->childs == node)
node->parent->childs = NULL;
if (node->childs != NULL) {
for (Node *cu... |
// MIT License
// Copyright (c) 2020 phonght32
// 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... |
/*
* Copyright (C) 2012 The Android Open Source Project
* Copyright (C) 2017 The LineageOS Project
*
* 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/licen... |
#include "zdssKeys.h"
#include "zdssMessages.h"
#include "zdssVals.h"
#include "zprogress.h"
#include "heclib.h"
/**
* Function: zcheckLinks
*
* Use: Semi-Public
*
* Description: Searchs a DSS file for all record info blocks, then walks
* the pathname bin to be sure there are addresses to that record.
* ... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* save_map_data.c :+: :+: :+: ... |
/*----------------------------------------------------------------------------
SigmaTel Inc
$Archive: /Fatfs/FileSystem/Fat32/Utility/CreateDirectoryRecord.c $
$Revision: 21 $
$Date: 9/16/03 12:23p $
Description: CreateDirectoryRecord.c
Notes:
---------------------------------------------------------------... |
#include "g_local.h"
//======================= SCRIPT_CART
//oh my this is chock full of hacky ugliness!!!!!!!!!!!
static int sound_cartdrag;
static int sound_carthit;
static int sound_cartpush;
void think_script_cart (edict_t *self)
{
if (self->count > 0)
self->count--;
if (self->count <= 0... |
/*
wm_android.h. Platform-dependent module : Android
This file is part of the SunDog engine.
Copyright (C) 2011 - 2016 <NAME> <<EMAIL>>
www.warmplace.ru
*/
#pragma once
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h> //for getenv()
#include <errno.h>
#include "various/android/sundog_br... |
//
// list.c
// gpack - https://github.com/WestleyR/gpack
//
// Created by WestleyR on Nov 28, 2019
// Source code: https://github.com/WestleyR/gpack
//
// Copyright (c) 2019-2021 WestleyR. All rights reserved.
// This software is licensed under a BSD 3-Clause Clear License.
// Consult the LICENSE file that came with... |
#include "LCD.h"
static void send_falling_edge(void);
void LCD_Init(void) {
// user must wait 15 ms to start LCD after boot, if this fn is not the first fn after boot no delay needed
// send command "33" 4-bit mode
// send command "32" 4-bit mode
// send command "28" 4-bit mode
// send command "0E... |
// dekryptize.c
// 2016-12-19 <NAME> <<EMAIL>>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <curses.h>
#include <locale.h>
#include <ctype.h>
#include <time.h>
#define MAXRNDSET 200
int rndset = 200;
int tablen = 8;
char *buf = NULL, *enc = NULL;
int *per = NULL;
int rows,... |
/**
* @copyright
* Copyright (c) 2017 <NAME>
* Licensed under the MIT License (see LICENSE)
*/
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <dfk/config.h>
#include <dfk/internal.h>
#include <dfk/context.h>
#include <dfk/log.h>
#include <dfk/error.h>
#include <dfk/fiber.h>
#include <dfk/tcp_... |
/*
* Phoenix-RTOS
*
* ext2
*
* sb.c
*
* Copyright 2017 Phoenix Systems
* Author: <NAME>
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "ext2.h"
#include "sb.h"
#include "mbr.h"
#include "block.h"
#include "pc... |
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "parse.h"
#include "opt.h"
static int islit(Node *n, vlong *v)
{
Node *l;
if (... |
/*
The MIT License
Copyright (c) 2009 UCSC Autonomous Systems Lab
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... |
#include <stdio.h>
#include <stdlib.h>
#include "adiosReader.h"
void usage()
{
printf("Options:\n");
printf("* input data file:\n");
printf(" -i <ADIOS bp data file> : ADIOS bp data file\n");
printf("* dimensions: \n");
printf(" -1 <nx> : dimension for 1D data such as data[nx]\n");
printf(" -2 <nx> <ny> : dimens... |
/*
* =====================================================================================
*
* Filename: onegin.c
*
* Description: Text file sorter source file
*
* Version: 1.0
* Created: 08/27/2017 07:53:38 PM
* Compiler: gcc
*
* Author: trexxet
*
* =============... |
#include "mpaycomet.h"
#include <sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>
#include <libgen.h>
#include <string.h>
#include <syslog.h>
#include <str/strdupa.h>
#include <str/str2num.h>
#include <str/strarray.h>
#include <stdio.h>
#include <jansson.h>
#define COPYRIGHT_LINE \
"Bug repor... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdarg.h>
#include <fcntl.h>
#include <errno.h>
#include <linux/memfd.h>
#include <sys/syscall.h>
#include <sys/mman.h>
#include <sys/types.h>
#include "queue_internal.h"
/** Convenience wrapper around memfd_create syscall, beca... |
/****************************************************************************//**
* @file main.c
* @version V1.00
* @brief Demonstrate how to use SC embedded timer
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved.
**********************************... |
/******************************************************************************/
/**
@file dbindex.c
@author <NAME>
@brief A generic relation index interface.
@see For more information, please refer to @ref dbindex.h and
@ref dbindex_types.h.
@details
@copyright Copyright 2013 <NAME>
@license Licensed under the A... |
/*
* save.c
* Luabins save code
* See copyright notice in luabins.h
*/
#include "luaheaders.h"
#include "luabins.h"
#include "saveload.h"
#include "savebuffer.h"
#include "write.h"
/* TODO: Test this with custom allocator! */
#if 0
#define SPAM(a) printf a
#else
#define SPAM(a) (void)0
#endif
static int save_v... |
/*
* A18 not use IR device on IP6103, and this driver is not full testing,
* add this driver just for future to use.
*
*/
#include <linux/err.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <l... |
/*
* 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. You may not use, modify or
* distribute this program under any other version of the GNU General
* Public License.
*
* This pr... |
#include <sys/process/process_manager.h>
extern void irq0();
struct task_struct* current_task = NULL;
void start_process(struct task_struct* task, uint64_t ustack, uint64_t binary_entry);
void save_registers(struct task_struct *p, struct task_struct *task);
//void start_process(struct task_struct* task);
/* web referen... |
//
// Project Fobu
// Copyright 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, modify, merge, ... |
#include "kshell.h"
#include <arch/io.h>
#include <keymap.h>
#include <logging.h>
#include <osinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/reboot.h>
void help(int argc, char* argv[]);
void kshell_print_prompt();
void reset_readline();
void run_command();
static char readline[READLI... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <pwd.h>
#include "include/upload_file.h"
#include <fcgi_config.h>
#include <fcgi_stdio.h>
extern char **environ;
//find 'substr' from a fixed-len... |
/*
Copyright 2015 Google Inc. 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.
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 wri... |
/**
* @file loginteractive.c
* @author <NAME> <<EMAIL>>
* @license LICENSE
*/
#define _POSIX_SOURCE
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/stat.h>
#include <sys/select.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <sy... |
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "../include/util.h"
int validarCPF(char string[], int tamCPF){
if(tamCPF != TAM_CPF && tamCPF != TAM_CPF_COMPACT)
return 0;
char cpf[TAM_CPF_COMPACT];
if(tamCPF == TAM_CPF){
char stringpy[tamCPF];
strcpy(stringpy, string);
removerChar(... |
#include "stdio.h"
#include <math.h>
#include <float.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "crossstitch_image.h"
#define NUMBER_OF_COLOURS 64
int crossstitch_image_create(char *filename) {
GdkPixbuf *pixbuf = NULL;
GError *error = NULL;
pixbuf = gdk_pixbuf_new_from_file_at_size(filename, 1000, 1000, &... |
void callee_0() {}
void callee_1() {}
void callee_2() {}
void callee_3() {}
void *CalleeAddrs[] = {callee_0, callee_1, callee_2, callee_3};
extern void lprofSetMaxValsPerSite(unsigned);
// sequences of callee ids
// In the following sequences,
// there are two targets, the dominating target is
// target 0.
int CallS... |
// Copyright 2021 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
/**
* \ingroup drivers
* @file uart.c
* @brief Implementation of basic UART functions
*/
#include <stddef.h>
#include <stdint.h>
#include <common/string.h>
#include <kernel/uart.h>
#include <kernel/mmio.h>
#include <peripherals/gpio.h>
#include <peripherals/aux.h>
void uart_init()
{
uint32_t selector;
/*
... |
/**
* @file input.c
* @brief RTP packet input
*/
/*****************************************************************************
* Copyright © 2008 <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the F... |
#include "c_func.h"
#include <time.h>
// 卷积神经网络
double
dot_sum(double * t1, double * t2, int length)
{
// 点乘
// 这里不存在内存泄漏的问题
double result = 0;
int i;
for (i = 0; i < length; i++) {
result += t1[i] * t2[i];
}
return result;
}
double *
__sample_conv(double * strided_sample, int sha... |
/***********************************************************************************************************************
* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
*******... |
/*
* Copyright (c) 2011 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* ZeroVM main
*
* Copyright (c) 2012, LiteStack, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you m... |
/*
* MIT License
*
* Copyright (c) 2020 FredericDT <<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, c... |
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdbool.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <gtk/gtk.h>
#include "libmx.h"
#include "utils.h"
#include "cJSON.h"
typedef struct client_context_s ... |
/*
* Copyright (c) 2006, 2007 <NAME>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, arepermitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list... |
// ### 说明
// 父子之间的大小:LeftChild < Parent < RightChild
// 每次执行 Splay(X, H) ,则含 X 的结点被旋转为根结点。
// zig-zag, zag-zig 的旋转的方法与 AVL Tree 相同,而 zig-zig, zag-zag 类似但不同于 AVL Tree。
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "splay_tree.h"
static inline Position splayTreeSingleRotateWithLeft(Position k2);... |
/**
* Copyright (C) 2018, ControlThings Oy Ab
* Copyright (C) 2018, <NAME>
* Copyright (C) 2018, <NAME>
* Copyright (C) 2018, <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
*... |
#include "py_utils.h"
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <libgen.h>
#include <dirent.h>
#include "log.h"
#include "py_compatibility.h"
void setupPython(const char* pythonProgramPath, const char* pythonLibs, const char* pythonHostLibs,
const char* pythonHome, const c... |
/*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* 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 requir... |
#include "bignum.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "alloc-testing.h"
#include "test_helper.h"
void test_bignum()
{
char num[100];
strcpy(num, "0000000");
assert(bignum_int_sanitize(num) == Positive);
assert(strcmp(num, "0") == 0);
strcpy(n... |
/* Copyright 2017
codigo basado en el libro Sistemas Empotrados en tiempo real
1.5 Procesamiento Secuecial (Pagina 8)
1.5.1 Ejemplo: Un Termostato digital
se muestra un ejemplo sencillo de un sistema en tiempo real implantado mediante
procesamiento secuencial. El sistema es un termostato para la calefacci... |
#include "infer.h"
ConsList *infer_constraints(TypedAst *expr, bool *error) {
ConsList *list = NULL;
collect_cons(&list, expr, error);
return list;
}
ConsList *cons_zip(TypeList *first, TypeList *second) {
if (list_length(first) != list_length(second)) {
return NULL;
}
ConsList... |
/*
Copyright (C) 2019-2020 JingWeiZhangHuai <<EMAIL>>
Licensed under the Apache License, Version 2.0; 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, software di... |
// Copyright 2015-2021 Espressif Systems (Shanghai) PTE LTD
/* SPDX-License-Identifier: GPL-2.0 OR Apache-2.0 */
/** Includes **/
#include "string.h"
#include "transport_pserial.h"
#include "platform_wrapper.h"
/** Constants/Macros **/
#define SUCCESS 0
#define FAILURE -1
#defi... |
#include "suffragetto.h"
#include "math.h"
//Retorna las coordenadas de la mejor jugada que el algoritmo saque (?)
//
#define playQuant 168
int power(int base, int exp) {
if (exp == 0)
return 1;
else if (exp % 2)
return base * power(base, exp - 1);
else {
int temp = power(base, exp /... |
//*******************************************************************
//Author: <NAME>
//Description: PRCv12 lib file
//*******************************************************************
#include "PRCv12.h"
#include "mbus.h"
//*******************************************************************
// OTHER FUNCTIONS
//*... |
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 1997-2013. 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... |
#include <stdio.h>
#include <stdlib.h>
void faces(int idx, double tr, double tg, double tb, double sr, double sg, double sb,
double cr, double cg, double cb, double fr, double fg, double fb, double z_raise,
double sf, int tid, int fac, int lt)
{
int i;
/*double tr,tg,tb;
double sr,sg,sb;
double cr,cg,cb;
double... |
/*******************************************************************************
* BSD 3-Clause License
*
* Copyright (c) 2017 <NAME> and <NAME>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are ... |
/*-
* Copyright (c) 2014-2016 MongoDB, Inc.
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include "wt_internal.h"
/* Buffer size for streamed reads/writes. */
#define WT_STREAM_BUFSIZE 8192
/*
* __fstream_close --
... |
/*
* Copyright 2014 Freescale Semiconductor, Inc.
*
* <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <command.h>
#include <netdev.h>
#include <asm/mmu.h>
#include <asm/processor.h>
#include <asm/cache.h>
#include <asm/immap_85xx.h>
#include <asm/fsl_law.h>
#include <fsl_dd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.