text stringlengths 3.08k 10.5k |
|---|
/* $Id: element.c,v 1.2 2006/09/30 12:34:21 fredette Exp $ */
/* libtme/element.c - element management: */
/*
* Copyright (c) 2003 <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:
... |
/* --COPYRIGHT--,BSD
* Copyright (c) 2017, Texas Instruments Incorporated
* 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 ab... |
// FILE HEADER SECTION (MAIN) //
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "file.h"
#include "../ui.h"
// Basic Functions //
int id_creator(void)
{
char check_id[32] = "data/", *temp_id;
FILE *randTest;
while(1)
{
int rndm_id = 10000000 + rand() %1... |
// MIT License
// Copyright (c) 2020 <NAME> @nesbox // <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, cop... |
// ================================================================
// A C-program for MT19937, with initialization improved 2002/1/26.
// Coded by <NAME> and <NAME>.
//
// Before using, initialize the state by using mtrand_init(seed)
// or mtrand_init_from_array(init_key, key_length).
//
// Copyright (C) 1997 - 2002, ... |
/****************************************************************************/
/* */
/* This file is part of CONCORDE */
/* */
/* ... |
/*
* Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope... |
/*
* Title: Crackme Jenny
* Author: <NAME>, 2016
* License: MIT (https://opensource.org/licenses/MIT)
* Compiled with gcc version 4.9.2 (Debian 4.9.2-19):
* gcc -std=c11 -lm -ggdb3 -c crackme_jenny.c
* References:
* GCC Asm Ref: https://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
* Idea From: ht... |
#include <espressif/esp_common.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <lwip/tcp.h>
#include "tcp.h"
#include "crypto/crypto.h"
session_keys_t session_keys;
static struct {
uint8_t encrypting;
uint8_t havekeys;
} session_state;
const char *HTTP_HEADER = {
"HTTP/1.1 200 OK\r\n"... |
#include <stdio.h>
#include <stdlib.h>
typedef struct node {
int data;
struct node *left, *right;
} Node;
typedef struct tree {
Node *root;
} Tree;
// Helper functions
Node *create_node(int);
Tree *initialise_tree(void);
void destroy_tree(Tree *);
void destroy_leaves(Node *);
void insert(Tree *, int);
v... |
/**
\file timer3.c
\brief implementation of TIM3 functions/macros
supported hardware:
- Sduino
implementation of functions for PWM generation via TIM3
*/
/*----------------------------------------------------------
INCLUDE FILES
---------------------------------------------------... |
#include <ctype.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "h.h"
static bool
overflow15(uint32_t a, uint32_t b)
{
return (a + b > 0x7FFF);
}
static char *
mnsnc(const char *s)
{
static char buf[3];
uint16_... |
#include "i2c.h"
#include "job.h"
#include <avr/interrupt.h>
#include <util/atomic.h>
#include <util/twi.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
struct i2c_tx {
i2c_msg *msgs;
size_t len;
void (*callback) (i2c_result*, void*);
void *userdata;
size_t msg_idx;
size_t data_idx;
st... |
#include <stdlib.h>
#include <errno.h>
#include <signal.h>
#include <getopt.h>
#include <omp.h>
#include <event2/event.h>
#include <event2/thread.h>
#include <event2/listener.h>
#include "version.h"
#include "util.h"
#include "log.h"
#include "ed2k_proto.h"
#include "server.h"
#include "db.h"
struct server_instance ... |
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "../include/picnic.h"
#include "../include/picnic_opt_hash.h"
#include "../include/sha3.h"
void calcSalt_opt(uint8_t* out, picnic_sk_t* sk, uint8_t* msg, uint16_t msg_len,
picnic_params_t* params) {
//change this, it's inefficien... |
/*
* vectors_m0_sub.c
* Copyright (C) 2021 xent
* Project is distributed under the terms of the MIT License
*/
void defaultHandler(void) __attribute__((weak));
static void emptyHandler(void);
/*----------------------------------------------------------------------------*/
/* Core Cortex-M0 IRQ handlers */
void RES... |
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/gpio.h>
#include "bsp.h"
#include "cs.h"
#include "pwm.h"
#include "tick.h"
#include "hsi48trim.h"
#define TICK_PERIOD_MS 10
#define CS_SAMP_T_MS 5 /* Must be smaller than tick interval */
#define OVP_MA 1000
#define F_NOM 950000
#de... |
#include <odometry.h>
static virtual_timer_t odom_update_vt;
/*============================================================================*/
/* Variable CONFIGURATION */
/*============================================================================*/
odometrySpee... |
/*
* 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 notice, this list
* of condit... |
//
// numeric_extensions_test.c
// CWPack
//
// Created by <NAME> on 2017-01-17.
// Copyright © 2017 <NAME>. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cwpack.h"
#include "cwpack_defines.h"
#include "numeric_extensions.h"
cw_pack_context pack_ctx;
cw_unpack_co... |
#include "cfg_warng_devices.h"
#include "FreeRTOS.h"
#include "FreeRTOSConfig.h"
#include "queue.h"
#include "task.h"
#include "semphr.h"
#include "uart.h"
#include "commons.h"
#include "event.h"
#include "soniforo.h"
#include "uart_task.h"
extern module_t * configurationModule;
void sendString(uint8_t * byte, uint8_... |
/* arm-none-linux-gnueabi-gcc -mfloat-abi=soft application_test.c -lrt -o soft.bin
* arm-none-linux-gnueabi-gcc -mfloat-abi=softfp application_test.c -lrt -o softfp.bin
* arm-none-linux-gnueabi-gcc -mfloat-abi=hard application_test.c -lrt fail!!
*/
#include<stdio.h>
#include<time.h>
#include<math.h>
#include<string... |
/* $NetBSD: md5crypt.c,v 1.14 2013/08/28 17:47:07 riastradh Exp $ */
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <<EMAIL>> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet ... |
/******************************************************************************
* Copyright (c) 2019 Texas Instruments Incorporated - http://www.ti.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
... |
#include "include/lock.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
void lock_free(Lock * l) {
int canFree = 0;
if (l == NULL) { return; }
pthread_mutex_lock(&(l->mutex));
l->on--;
canFree = l->on;
pthread_mutex_unlock(&(l->mutex));
if (canFree < 0) {
... |
#include "tp1.h"
//A funcao imprimeRegistro imprime uma mensagem de que o registro pesquisado foi encontrado, bem como todos os
//dados do registro
void imprimeRegistro(Registro r){
printf("===== DADOS DO REGISTRO =====\n");
printf("Chave: %d\n",r.chave);
printf("Dado 1: %ld\n",r.dado1);
printf("Dado 2... |
/*
* Copyright (C) 2014-2015 <NAME> <<EMAIL>>
* Copyright (C) 2006-2012 SplinterGU (Fenix/Bennugd)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 <NAME> (Fenix)
*
* This file is part of PixTudio
*
* This software is provided 'as-is', without any express or implied
* warranty. In ... |
//---------------------------------------------------------------------------------------
// Smile Programming Language Interpreter
// Copyright 2004-2019 <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 obta... |
//////////////////////////////////////////////////////////////////////////////
// Author: <NAME>
// License: MIT
//////////////////////////////////////////////////////////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL.h>
#include <lua.h>
#include <lualib.h>
#include <la... |
/* Computer Graphics assignment, Triangle Rasterization
* Filename ........ trirast.c
* Description ..... Implements triangle rasterization
* Created by ...... <NAME>
*
* Student name <NAME> & <NAME>
* Student email <EMAIL>, <EMAIL>
* Collegekaart 10468498, 10447822
* Date 4-2-2016
* Comments ........
*
*
*... |
/*
p0f-sendsyn - SYN sender
------------------------
This trivial utility sends 8 SYN packets to open ports on destination hosts,
and lets you capture SYN+ACK signatures. The problem with SYN+ACK
fingerprinting is that on some systems, the response varies depending on the
use of window scaling, times... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_solve_equation_4.c :+: :+: :+: ... |
/* *****************************************************************************
* The MIT License
*
* Copyright (c) 2010 LeafLabs LLC.
*
* 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 Softwar... |
#include "btshas_multi.c"
char *testbuf=
".section .text\n"
"test1:\n"
"mov r1, r2\n"
"mov #4, r3\n"
"__ashrsi3_r0:\n"
" mov.l r4, @-sp\n"
" not r0, r0\n"
" and #31,r0\n"
" shal r0\n"
" mov r0, r4\n"
" mova shar_list, r0\n"
" add r0, r4\n"
" mov.l @sp+, r0\n"
" jmp @r4\n"
" nop\n"
".align 2\n"
"shar_list:\n"
" shar r... |
/*
* chiTCP - A simple, testable TCP stack
*
* Logging functions
*
* see chitcp/log.h for descriptions of functions, parameters, and return values.
*
*/
/*
* Copyright (c) 2013-2014, The University of Chicago
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifdef WIN64 // For the definition of _O_BINARY in _setmode
#include <io.h>
#include <fcntl.h>
#endif
#include "definiti... |
/*
* Copyright 2007-2008 <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, di... |
/*
* Copyright (c) 2019, Sensirion AG
* 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 conditio... |
#define _GNU_SOURCE
#include "chat.h"
#include "messages.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <time.h>
GtkWidget *chatWindow;
GtkWidget *sendEntry, *sendButton;
GtkWidget *statusLabel;
GtkWidget *messagesTreeView;
GtkAdjustment *vAdjust;
GtkScrolledWindow *scroll... |
#include <stdlib.h>
#include <time.h>
#include <limits.h>
#include <signal.h>
#include <libdstr/libdstr.h>
#include <libimap/libimap.h>
#include "test_utils.h"
static derr_t test_dgetenv(void){
derr_t e = E_OK;
bool found;
// variable does not exist
dstr_t dummy = dgetenv(DSTR_LIT("DUMMY"), &found);... |
/*
This file will contain methods for extracting
the informations from strings, and verify if
it has any errors and display acording with the
error_handling.c file.
If any error ocurr the function will return -1,
and it will change the variable error.
*/
#include "content_sanitizer.h"
#include ... |
/*
* Copyright 2019-present Open Networking Foundation
* Copyright (c) 2003-2018, Great Software Laboratory Pvt. Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include "mme_app.h"
#include "ue_table.h"
#include "err_codes.h"
#inclu... |
/* Get RefSeq peptides using ra and pep.fa files */
/* Copyright (C) 2007 The Regents of the University of California
* See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
#include "common.h"
#include "hash.h"
#include "pepData.h"
#include "dystring.h"
#include "gbIndex.h"
#include "gbD... |
#define _GNU_SOURCE
#include <fcntl.h>
#include <sys/uio.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netdb.h>
#include <ne... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>
#define MAX_CLIENTS 5
#define MAX_CLIENTS 5
//the thread function
void *new_connection_handler(void *);
int parseInput(char *);
char **get_tokens(char... |
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. 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 copyr... |
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
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 versi... |
/********************************************************************
*
* Copyright (c) GeoWorks 1991 -- All Rights Reserved
*
* PROJECT: GEOS Tools
* MODULE:
* FILE: findlbdr.c
*
* AUTHOR: <NAME>
*
* REVISION HISTORY... |
/******************************************************
* This program provides support for MarkUs
* authentication against the Linux PAM modules stack.
* It expects username and password passed in on stdin
* separated by a line feed ('\n'). See README for
* installation instructions.
*
* See also:
* http://www... |
/*----------------------------------------------------------------------------*/
/* Hobbit RRD handler module. */
/* */
/* Copyright (C) 2004-2005 <NAME> <<EMAIL>> */
/* ... |
/*
* Copyright (c) 2003+ <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 ... |
/*
* Copyright (c) 2017 <NAME> <<EMAIL>>
* Contributors: 2018 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT sifive_plic_1_0_0
/**
* @brief Platform Level Interrupt Controller (PLIC) driver
* for RISC-V processors
*/
#include <kernel.h>
#include <arch/cpu.... |
/* Copyright (c) 2001 <NAME>.
* Copyright (c) 2001-2004, <NAME>.
* Copyright (c) 2004-2006, <NAME>, <NAME>.
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file buffers_tls.c
* \brief Read and write data on a tor_tls_t connection from a buf_t object.
**/
#d... |
/**
* @file mprPlatform.c
* @brief Cross platform routines
* @overview This module provides low level cross platform routines.
* @remarks Most routines in this file are not thread-safe. It is the callers
* responsibility to perform all thread synchronization.
*/
/*
* @copy default
*
* Copyright (c) Mbedt... |
/*
* Copyright © 2008 <NAME>
* Copyright © 2009 <NAME>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and this pe... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2018, hathach (tinyusb.org)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the... |
/*
* arch/alpha/boot/main.c
*
* Copyright (C) 1994, 1995 <NAME>
*
* This file is the bootloader for the Linux/AXP kernel
*/
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/utsrelease.h>
#include <linux/mm.h>
#include <asm/system.h>
#include <asm/console.h>
#include <asm/hwrpb.h>
#include <asm... |
#include <stdio.h> /* logw printf(), fscanf(), fopen(), fclose() */
#include <stdlib.h> /* logw exit() */
struct passenger
{
char passengerName[40];
unsigned short int passengerPhone[10];
unsigned int passengerSeat;
};
int main()
{
FILE* f_in, *f_out; /* metablites-deiktes se ar... |
#include <stdio.h>
#include "ad_types.h"
#include "math.h"
#include "stdlib.h"
void head (double *outv, double *invec,double *vel, int n);
void ad_head(DERIV_TYPE *outv,DERIV_TYPE *invec,DERIV_TYPE *vel,int n);
#ifdef DEBUG
void an_head (double *outv, double *inv,double *vel, double *outv_b, double *inv_b,double *ve... |
/*
* Copyright (C) 2017 GreenWaves Technologies
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*
*/
/* PMSIS includes. */
#include "pmsis.h"
/* Autotiler includes. */
#include "Gap.h"
#include "MnistKernels.h"
#i... |
/*
* Copyright (c) 2015 <NAME>
* Copyright (c) 2008 Google, Inc.
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <dev/udc.h>
#include "udc-co... |
/*
* Copyright © 2011 <NAME>
* Copyright © 2011 <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, mo... |
/*-
* Copyright (C) 2010 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
/*
Using the part of the sample code for optical feedback.
*/
#include "SPI.h"
// this pin assignment is for the arduino nano every
#define PIN_SS 10
#define PIN_MISO 12
#define PIN_MOSI 11
#define PIN_SCK 13
#define PIN_MOUSECAM_RESET 8
#define PIN_MOUSECAM_CS 7
#define ADNS308... |
/*
* $Id: dgtsv.c,v 1.1 2005-09-18 22:04:48 dhmunro Exp $
* LAPACK routine to solve a tridiagonal matrix.
*/
/* Copyright (c) 2005, The Regents of the University of California.
* All rights reserved.
* This file is part of yorick (http://yorick.sourceforge.net).
* Read the accompanying LICENSE file for details.
... |
/*
* Copyright 1996-2021 Cyberbotics Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... |
/*C**********************************************************************
* FILENAME : cosim_traversing.c
*
* DESCRIPTION :
* Traversing functions
* needed for co-simulation between CLaSH and a Verilog simulator
*
*
* AUTHOR : <NAME> DATE : August 14, 2016
*
*
*C*/
/*... |
/*
* This file contains resampling functions between 48 kHz and nb/wb.
* The description header can be found in resample_library.h
*
*/
#include "resample_library.h"
#include <platform/platform_stdlib.h>
/**
* @brief 48K -> 16K resampler.
* @param in: input, short in[len]
* @param len: input length
* @p... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* File....: blkmem.c */
/* Name....: Block Memory Functions */
... |
#include <fudge.h>
#include <kernel.h>
#include <modules/base/base.h>
#include <modules/system/system.h>
#include <modules/block/block.h>
#include <modules/arch/x86/pic/pic.h>
#include <modules/arch/x86/io/io.h>
#include <modules/arch/x86/pci/pci.h>
#include "virtio.h"
static struct base_driver driver;
static struct b... |
#include <inttypes.h>
#include "context.h"
#include "rect.h"
//================| Context Class Implementation |================//
//Constructor for our context
Context* Context_new(uint16_t width, uint16_t height, uint32_t* buffer) {
//Attempt to allocate
Context* context;
if(!(context = (Context*)mallo... |
/*
* Copyright 2005-2018 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an int... |
/*-
* Copyright 2005,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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condit... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define MAXITER 10
/* adding commands to print ('?') top element of the stack
without popping it, duplicate it ('>'), swap two last elements ('<')
and clear the stack ('!') */
#define MAXOP 100 // max size of operands
#define NUMBER '0' /... |
#include "coroutine.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <stdint.h>
#if defined(_MSC_VER)
#include <windows.h>
#elif __APPLE__ && __MACH__
#include <sys/ucontext.h>
#else
#include <ucontext.h>
#endif
#define STACK_SIZE (1024*1024)
#define D... |
/*
3APA3A simpliest proxy server
(c) 2002-2008 by ZARAZA <<EMAIL>>
please read License Agreement
*/
#include "libs/md5.h"
#include "libs/md4.h"
#include <string.h>
#define MD5_SIZE 16
#ifdef _WIN32
#pragma warning (disable : 4996)
#endif
void tohex(unsigned char *in, unsigned char *out, int len);
static... |
/* $Id$ */
/*
* Copyright (c) 2007, 2008
* <NAME> <<EMAIL>>
* <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 al... |
/*
* Copyright (c) 1994, 1999, 2000
* Kansai University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following coditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notic... |
/**
*
* HX711 library
* Inspired by HX711 library for Arduino
* https://github.com/bogde/HX711
*
**/
#include <HX711.h>
#define MSBFIRST 1
#define LSBFIRST 0
void delayMicroseconds(int timeus) {
volatile int useless = 0;
for (int x = 0; x < timeus; x++) {
for (int i = 0; i < 6; i++) {
... |
/*****************************************************************************
* (c) 2020 Ledger SAS.
*
* 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.or... |
/* SPDX-License-Identifier: BSD-3-Clause */
#include <apc.h>
const char *apc_is_names[] = {
"Down", "Loopback", "Waiting", "PtP", "DROther", "Backup", "DR"
};
const char *apc_ism_names[] = {
"InterfaceUp", "WaitTimer", "BackupSeen", "NeighborChange",
"LoopInd", "UnloopInd", "InterfaceDown"
};
char * IfName = "br-... |
/* utrFa - Get UTRs as fasta files. */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "options.h"
#include "dnaseq.h"
#include "fa.h"
#include "jksql.h"
#include "nib.h"
#include "genePred.h"
#include "hdb.h"
static char const rcsid[] = "$Id: utrFa.c,v 1.2 2008/09/03 19:21:18 markd Exp $";
int m... |
/*
* Copyright (c) 2014, Texas Instruments Incorporated - http://www.ti.com/
* 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 copy... |
#include "uart.h"
int set_interface_attribs(int fd, int speed)
{
struct termios tty;
if (tcgetattr(fd, &tty) < 0) {
printf("Error from tcgetattr: %s\n", strerror(errno));
return -1;
}
cfsetospeed(&tty, (speed_t)speed);
cfsetispeed(&tty, (speed_t)speed);
tty.c_cflag |= (CLOCAL... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
typedef struct {
int from;
int read;
int to;
int write;
int dir;
} transition;
typedef struct node {
struct node *next;
transition trans;
} node;
typedef struct {
int size;
struct node **buckets;
} Map;
typedef struct {
int type;
Map transitions... |
/*
* this file implements a bloch simulator in C, using the hard-pulse
* approximation. this is called by bloch.m (if the mex file is available),
* which formats the arguments, including setting default values for the
* optional ones, and passes them to here.
*
* M = blochm(rf, g, p, dt, gam, m0, t1, t2, b0, b1)
... |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* lib/krb5/krb/ser_princ.c
*
* Copyright 1995 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.... |
#include "include/TPAD.h"
TIM_HandleTypeDef TIM3_Handler;
volatile u16 tpad_default_val = 0;
void TIM3_CH3_Cap_Init(u32 arr, u16 psc)
{
TIM_IC_InitTypeDef TIM3_CH3Config;
TIM3_Handler.Instance = TIM3;
TIM3_Handler.Init.Prescaler = psc;
TIM3_Handler.Init.CounterMode = TIM_COUNTERMODE_UP;
TIM3_Hand... |
/* $Id: client.h,v 1.2 2001/03/04 11:26:09 jaredd Exp $
*
* dhcpcd - DHCP client daemon -
* Copyright (C) 1996 - 1997 <NAME> <<EMAIL>>
*
* dhcpcd is an RFC2131 and RFC1541 compliant DHCP client daemon.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Publi... |
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 <NAME> / <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as ... |
#include "main.h"
int main (int argc, char **argv) {
char *end, *search_string = "", *path = "";
pthread_t searcher, minions[50];
int i;
/*Invalid parameter count.*/
if(argc < 4) {
printf("Usage: ./main <number of minions> <size of file buffer (# of elements)> <search string> <search path> \n");
return 0;
... |
/*
Evin kesal dengan sherloc kudo karena sering memberikan test, ia pun ingin membalas sherloc kudo!
ia memeberikan soal kepada sherloc kudo sebagai berikut:
kamu adalah seorang raja, sebagai raja kamu hanya bisa melihat kondisi peperangan hanya melalui laporan
Karena semasa menjadi pangeran kamu pernah belajar codi... |
#include "syscall.h"
#include "types.h"
#include "memory.h"
#include "proc.h"
#include "fs.h"
#include "string.h"
#include "io.h"
#include "util.h"
#include "sys_proc.h"
#include "asm.h"
extern struct task_struct *scheduler_task;
int sys_fork(struct int_regs *frame) {
struct task_struct *tp = alloc_task();
... |
/*
* mehstation - Splashscreen.
*
* Copyright © 2015 <NAME>
*/
#include <glib-2.0/glib.h>
#include "system/app.h"
#include "system/consts.h"
#include "system/message.h"
#include "view/image.h"
#include "view/screen.h"
#include "view/widget_rect.h"
#include "view/screen/fade.h"
#include "view/screen/starting.h"
#in... |
/*
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
*/
#include <k_api.h>
#include <aos/aos.h>
#include "soc_init.h"
#include "isd9160.h"
#define VERSION_REC_PB "v1.01"
#define VERSION_VR "v2.01"
#define AUDIO_FILE_SDCARD "audio.data"
#define FIRMWARE_FILE_SDCARD "isd9160_fw.bi... |
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
/*
The following is rather crude demonstration code to read
uncompressed and compressed TGA files of 16, 24, or 32 bit
TGA.
Hope it is helpful.
*/
typedef struct {
char idlength;
char colourmaptype;
char datatypecode;
short int col... |
//*****************************************************************************
//
// Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// R... |
/**
* @file hardware_init.c
*
*/
/* Copyright (C) 2018-2021 by <NAME> mailto:<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... |
#include "test.h"
#include "alloc.h"
#include "config.h"
TEST(test_config_bind) {
char n[] = "bind";
ASSERT(config_add(n, "123456") == -1);
ASSERT(config_add(n, "123asf") == -1);
ASSERT(config_add(n, "-1243") == -1);
ASSERT(config_add(n, "") == -1);
ASSERT(config_add(n, "abc") == -1);
ASSE... |
/*
* 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.