text stringlengths 3.12k 18.7k |
|---|
#include <stdio.h>
#include <math.h>
#define MIN(a, b) (((a)<=(b))?(a):(b))
#define MAX(a, b) (((a)>(b))?(a):(b))
#define ABS(a) ( (a) >= 0 ? (a) : -(a))
#define ORI_LEFT 0
#define ORI_RIGHT 1
#define ORI_UP 2
#define ORI_DOWN 3
#define EPSILON 1.0e-12
typedef struct{
double x_max;
double x_mi... |
// Time-stamp: <2009-03-11 22:46:32 cklin>
/*
mdm-master.c - Middleman System Main Controller
Copyright 2009 <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://ww... |
/**************************************************************************
*
* Copyright 2008 HPCNL-KICS, UET, Lahore, PAKISTAN.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification,are permitted provided that the following conditions
* are met:
*
* ... |
/*
HCFILE.C
contains file-management and i/o routines:
CleanUpFiles
GetLine
GetWords
OpenFiles
ReadWord
TrytoOpen
WriteCode
WriteText
WriteWord
for the Hugo Compiler
Copyright (c) 1995-2006 by <NAME>
*/
#include "hcheader.h"
long codeptr = 0; ... |
/*
* This software is copyrighted as noted below. It may be freely copied,
* modified, and redistributed, provided that the copyright notice is
* preserved on all copies.
*
* There is no warranty or other guarantee of fitness for this software,
* it is provided solely "as is". Bug reports or fixes may be sent
... |
/*
Programa: lab24_3.c
Objetivo: Algoritmo de Machine Learning para predecir,
el riesgo cardiovascular(RC).
Resultados: El resultado obtenido tendra dos partes,
Primera parte: que nos devolverá el Indice de
masa corporal(IMC), para los distintos casos
... |
/*
* Copyright (C) 2020 <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 ... |
/* GTK - The GIMP Toolkit
* Copyright (C) 1995-1997 <NAME>, <NAME> and <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 Free Software Foundation; either
* version 2 of the License, or (at your option... |
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <xmp.h>
#include "linkedlist.h"
#include "sndthr.h"
//this undefined makes loading directory slower, but it's an option
#define DISABLE_LOADCHECK
#define MEMBLOCK_SIZE 2048
// on over 2MB song, this value will ... |
/**
utilities-rand-uint64.c
Randomness utility functions.
The generation of (pseudo-)random numbers in a given range is achieved
in a randomized approach by exponentially decreasing the probability of
not finding a number bounded by 0.5^N under the assumption of generator
uniformity, where N is the ... |
// C Program to design a shell in Linux/MacOS
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/wait.h>
#include<fcntl.h>
#include<readline/readline.h>
#include<readline/history.h>
#define MAXCOM 1000 // max number of letters to be supported
#define MAXLIST 1... |
/*****************************************************************************
* Copyright © 2019-2020 <NAME> <<EMAIL>> *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this softw... |
#include "mex.h"
#include <math.h>
/*
% BS Black-Scholes option pricing model
% USAGE
% V=bs(sigma,S,K,r,delta,T,put);
% INPUTS
% sigma : volatility
% S : price of underlying asset
% K : strike price
% r : interest rate on a discount bond
% delta : dividend rate
% T : time to expiration
% ... |
// Client Solution to Lab #2 in CS 407/591, Fall 2017.
// Author: <NAME> (copyright 2017), Computer Science Dept., Southern Illinois University Carbondale.
// This material is provided for personal use by students enrolled in CS407/591 Fall 2017 only!
// Any other use represents infringement of the author's exclusive r... |
/*
* Based on crypto_scalarmult/try.c version 20090118 by <NAME>
* Public domain.
*/
#include <stdlib.h>
#include "../signatures.h"
#include "../keyexchange.h"
#include "print.h"
#include "avr.h"
#include "fail.h"
/*
static unsigned char *test;
#define testlen 800
*/
#define keylen 32
#define Qlen 32
#define ddl... |
/*
* Copyright (c) 2017, Mellanox Technologies and Contributors.
* 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, t... |
// astar.c
// file for the main AStar algorithm
#include "astar.h"
void add_element_to_list(unsigned long index_to_add, list_elem** start_of_list, AStarStatus* astar_status_list)
{
// adds an element to a list
// the list is always sorted in ascending order
// the sorting key is the fscore computed from ... |
// Welcome to my little collection of bitwise hacks!
// I've put this together because I also wanted to learn more bitwise hacks, so I created a cheat sheet in C!
// Here you will find some common but also some of the most evil and cool bitwise hacks, for integers and floats.
// These should be translateable to any pro... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <semaphore.h>
#include <time.h>
#define THREADS 3
#define ALLOC 1000000
#define ITEMS_PER_THREAD 1000000
enum HashType {MD5, SHA1};
struct WorkerArgs {
size_t id;
char **haystack;
size_t haystack_count;
char **ne... |
/**
* Generic implementation
*/
#include "cryptonight.h"
#include "oaes_lib.h"
#include "hash.h"
#include "aesb.c"
#include "int-util.h"
// Extra hash callback lookup
static void (*const extra_hashes[4])(const void *, size_t, char *) = {
hash_extra_blake, hash_extra_groestl, hash_extra_jh, hash_extra_skein
};
sta... |
/*
* Copyright (c) 2016, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Universitaetstr 6, CH-8092 Zurich. Attn: Systems Group.
*/
#include <kernel.h>
#include <... |
#include <string.h>
#include <usbdrvce.h>
#include "../lwIP/include/lwip/err.h"
#include "../lwIP/include/lwip/netif.h"
#include "../lwIP/include/lwip/etharp.h"
#include "../lwIP/include/lwip/ip4_addr.h"
#include "ecm.h"
#include "usb.h"
#include "../queue.h"
#include "../lwIP/include/lwip/snmp.h"
#include "../log.h"
... |
/*
* Magic to ops mapping
*
* Copyright (c) 2020 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "ethtool.h"
/* Device-specific operations table */
extern struct link_ops igb_ops;
extern struct link_ops ixgbe_ops;
struct table table[] = {
/* e1000e */
{ 0x105e8086, &igb_ops }, /* 82... |
// amigaps2
//
// Copyright (c) 2018 <NAME>
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the MIT license. See LICENSE for details.
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/io.h>
#include "mouse_interface.h"
#include "ps2.h"
#define MOUSE_BUT... |
#include <errno.h>
#include <signal.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <time.h>
#include <unistd.h>
/* Based on http://fabiensanglard.net/doom_fire_psx/index.html */
typedef uint8_t u8;
static unsigned short _width;
static unsigned short _... |
/*
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... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32l1xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* <h2><center>© Copyri... |
/*
* Copyright 2008 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.
*/
/*
* NaCl Server Runtime time abstraction layer.
* This is the host-OS-dependent implementation.
*/
#include <windows.h>
#include <mmsys... |
#include "server.h"
pthread_t admin_pid;
int sock_udp, msqid, admin_fd;
server_info_t shinfo;
int client_port, config_port;
socklen_t slen;
void error_msg(char *msg)
{
fprintf(stderr, "Error: %s -> %s\n", msg, strerror(errno));
exit(1);
}
void wrong_command(int fd, char *error_msg) // answer to client
{
... |
/*
FileName: main.c
Student Name: <NAME>
Student Number: 3035253876
Development Platform: MACOSX 10.14 with gcc compiler and Sublime Text(tested under Ubuntu 18.04)
Compilation: gcc timekeeper_3035253876.c -o timekeeper
Remarks:
*/
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include ... |
/*************************************************************************
* systlin.c - Resolution of linear system
*
* $Id: systlin.c,v 1.5 2001/07/12 13:29:40 greg Exp $
*
* Copyright INRIA
*
* AUTHOR:
* <NAME> (<EMAIL>)
*
* CREATION DATE:
* Wed Mar 22 11:08:39 MET 2000
*
* ADDITIONS, CHANGES
*
*
*... |
/******************************************************************************
* @Title: multi-lookup.c
*
* @author(s) <NAME>
* @date March 24, 2019
* @version 2.7
*
* Compiled using CU CS Virtual Machine Fall 2018 Linux Terminal
*
* Description:
* This file contains functions for a thread-safe multithreadin... |
/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
/**
* @file generics
*
* @version 1
*
* @date 08/10/2020
*
* @author <NAME>
*
*/
/// Include the header file for this .c:
#include "generics.h"
/// Include util libraries:
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
/// Constant definition:
#define STANRDARD_BIT 640
... |
/*
* Copyright (C) 2015 - 2018, IBEROXARXA SERVICIOS INTEGRALES, S.L.
* Copyright (C) 2015 - 2018, <NAME> (<EMAIL>)
* Copyright (c) 2019, <NAME>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ar... |
#define _XOPEN_SOURCE //for char*ptsname(int)
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <termios.h>
#include <signal.h>
#include <stdint.h>
#define GETOPT_FORMAT "Nl:s... |
/*****************************************************************************
*
*
* File USI_TWI_Master.c compiled with gcc
* Date Friday, 10/31/08 Boo!
* Updated by jkl
*
* AppNote : AVR310 - Using the USI module as a TWI Master
*
* Extensively modified to provide complet... |
/*
Nintendo Switch Fightstick - Proof-of-Concept
Based on the LUFA library's Low-Level Joystick Demo
(C) Dean Camera
Based on the HORI's Pokken Tournament Pro Pad design
(C) HORI
This project implements a modified version of HORI's Pokken Tournament Pro Pad
USB descriptors to allow for the creation of custom contro... |
#include <platform.h>
#include "tests.h"
#include "keyword.h"
#include "seen.h"
#include "prefix.h"
#include <kernel/config.h>
#include <kernel/plane.h>
#include <kernel/region.h>
#include <kernel/terrain.h>
#include <kernel/item.h>
#include <kernel/unit.h>
#include <kernel/order.h>
#include <kernel/race.h>
#include <... |
#include "easyio.h"
#define LED 33
#define KEY 0
// 任务句柄,包含创建任务的所有状态,对任务的操作都通过操作任务句柄实现
TaskHandle_t led_task_Handler = NULL;
// led_task 任务,控制LED闪烁
void led_task(void* arg)
{
// 配置LED为推挽输出,设置初始电平为0
led_init(LED, 0);
while(1) {
// LED状态闪烁
led_blink(LED);
vTaskDelay(200 / portTICK_... |
/**
******************************************************************************
* @file I2C/I2C_TwoBoards_AdvComIT/Src/main.c
* @author MCD Application Team
* @brief This sample code shows how to use STM32L4xx I2C HAL API to transmit
* and receive a data buffer with a communication process b... |
/**************************************************************************/
/* */
/* Copyright (c) Microsoft Corporation. All rights reserved. */
/* */
/* Thi... |
/* zzswfini.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__1013 = 1013;
/* $Procedure ZZSWFINI ( Private, switch frame initialization ) */
/* Subroutine */ int... |
/*
* IrDA.c
*
* Created: 06-Nov-14 0:20:48
* Author: 4a4ik
*/
/*
* connect (INT0) PD2
* to the receiver
*
* Timer0 IrDa
* Timer1 16 bit PWM
* Timer2 wait if button is pressed, when overflow stop rotating the motor
*/
#include "functions.h"
#define normal 0
#define record_command 1
#define wait_c 2
u... |
/* Test some common transformations. See:
* https://gcc.gnu.org/wiki/FloatingPointMath
*
* Note: the NaN tests may not be valid on all machines.
* Tested only on x86_64.
*/
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <math.h>
#include <fenv.h>
unsigned long int str... |
/*
* DNET.C
*
* DNET (c)Copyright 1988, <NAME>, All Rights Reserved
*
* Handles action on all active file descriptors and dispatches
* to the proper function in FILES.C
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/resource.h>
#include... |
//
// Copyright (c) 2017 The Khronos Group 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... |
/* BSD License
Copyright (c) 2015 <NAME> https://github.com/achilikin
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 c... |
/*******************************************************************************
* This file was generated by UI Builder.
* User should hand edit this file.
********************************************************************************/
#include "app_main.h"
#include "view_data.h"
#include "uib_app_manager.h"
#inclu... |
#include "error.h"
#include "dhcp.h"
#include <net/if.h>
#include <errno.h>
#include <time.h>
#include <arpa/inet.h>
struct argv
{
char **argv;
int argc;
int argerror;
char *arg0;
/* -stress NAME */
char *stress;
/* -interface IF */
char *interface;
/* -remote IP PORT */
char *remote[2];
/* -local IP PO... |
#include "win32_breakout.h"
#include "breakout.h"
#include "renderer.h"
#include <math.h>
enum {
MAIN_PLAY,
MAIN_QUIT,
MAIN_COUNT,
};
enum {
DIFFICULTY_EASY,
DIFFICULTY_NORMAL,
DIFFICULTY_HARD,
DIFFICULTY_COUNT,
};
enum {
WAIT_SERVE_SERVE,
WAIT_SERVE_COUNT,
};
enum {
PAUSE_CONTINUE,
PAUSE_RE... |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// KBot project.
//
// module: config.c
// $Revision: 34 $
// $Date: 2012-08-23 15:11:38 +0400 (Чт, 23 авг 2012) $
// description:
// Config file processing engine.
#include <Ntifs.h>
#inc... |
/**
* \file flt_stdreplacements.c
* \author <NAME>, <<EMAIL>>
*
* This plugin handles some standard text replacements
*/
/* {{{ Initial comments */
/*
* $LastChangedDate$
* $LastChangedRevision$
* $LastChangedBy$
*
*/
/* }}} */
/* {{{ Includes */
#include "cfconfig.h"
#include "defines.h"
#include <stdio.h... |
/*
%%% copyright-nrl-97
This software is Copyright 1997-1998 by <NAME>, <NAME>,
<NAME>, <NAME>, and <NAME>. All Rights Reserved. All
rights under this copyright have been assigned to the US Naval Research
Laboratory (NRL). The NRL Copyright Notice and License Agreement Version
1.1 (January 17, 1995) applies to this sof... |
//----------------------------------------------------------------------------//
//---------------------------------| U T |---------------------------------//
//----------------------------------------------------------------------------//
#pragma once
//--------------------------------------------------------------... |
/*
* Double-byte font routines for Microwindows
* Copyright (c) 2003 <NAME> <<EMAIL>>
*
* These routines allow specially-compiled-in fonts to be
* used for DBCS-encoded characters in an otherwise ASCII
* character stream. Characters not belonging to the DBCS
* fonts (ASCII < 0x0100 only) will display out of th... |
/******************************************************************************
* Copyright (C) 2018 Broadcom. The term "Broadcom" refers to Broadcom Limited
* and/or its subsidiaries.
*
* This program is the proprietary software of Broadcom and/or its licensors,
* and may only be used, duplicated, modified or... |
// gentree.c
// generate a file tree under the specified directory
#define _GNU_SOURCE
#include "rtcommon.h"
#include "readparms.h"
#include "genfile.h"
#include "gentree.h"
#include "timer.h"
void gentree(char *dirpath, int lvl, threadinfo_t *thi)
{
char path[255];
char buf[80];
char *szTaskCmd;
int d;
s... |
/*
** Copyright 1995-2095, Silicon Graphics, Inc.
** All Rights Reserved.
**
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
** the contents of this file may not be disclosed to third parties, copied or
** duplicated in any form, in whole or in part, without the prior written
** permis... |
#include <stdio.h>
#ifdef _MSC_VER
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#else
#include <strings.h>
#endif
#include <string.h>
#include <stdlib.h>
#include "flp.h"
#include "shape.h"
#include "util.h"
/* get unit index from its name */
int desc_get_blk_index(flp_desc_t *flp_desc, char *name)
... |
#include "version.h"
#include <string.h>
#include "char.h"
#include "object.h"
#include "char_base.h"
#include "npcutil.h"
#include "lssproto_serv.h"
#include "pet_skill.h"
#include "readmap.h"
#include "battle.h"
enum {
CHAR_WORK_STONESELECT = CHAR_NPCWORKINT1,
};
static void NPC_PetSkillShop_selectWindow( int mein... |
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "bmp.h"
#include "ziku.h"
/*******************************************************
功能:处理一张bmp图片---> 点阵数据
参数:
@bmpname :(入)BMP图片名称
@BMP_data:(返)点阵数据
返回:
成功:数据的长度
失败:-1
注意:使用后需要free(*BMP_data)
*********************************************... |
/**********
Copyright 1993: <NAME>, <NAME>, <NAME> and <NAME>. All rights reserved.
Author: <NAME>
**********/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"
#include "ngspice/devdefs.h"
#include "mesadefs.h"
#include "ngspice/suffix.h"
IFparm MESApTable[] = { /* parameters */
OP("off", MESA_OFF, ... |
#include <windows.h>
#include <stdio.h>
long long total, checked;
int hardways[8]; // count of total hardways won...
int card[5][5];
int nums[5];
int card_count;
int current_card;
int allcards[90000][5][5];
// 0-3 horizontal (top,down)
// 5-7 vertical (b,i,g,o)
#define BALL_B 0x001
#define BALL_... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2018 <NAME> (github.com/kanflo)
*
* 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 rig... |
/**
* (c) 2017-2018 <NAME>.
* Released under MIT license. Read LICENSE for more details.
*
* Based in previous research by: flatz.
*/
#include "pup_decrypter.h"
#include "ksdk.h"
#include "blob.h"
#include "debug.h"
/* debugging */
#define DEBUG_PUP 1
#define assert(cond) if (!(cond)) { \
dprintf("%s:%... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdint.h>
uint8_t *stringcat (uint8_t *str1, uint8_t *str2)
{
uint16_t i,k = 0;
uint8_t *res, *temp, *temp1;
uint8_t len = 25;
if(!str1)
return NULL;
if(!str2)
return NULL;
temp = strstr(str1, " ");
len = (uint8_t)((uint8_t *)temp - (ui... |
/*
* Compile this file together with the UnQLite database engine source code
* to generate the executable. For example:
* gcc -W -Wall -O6 unqlite_csr_intro.c unqlite.c -o unqlite_csr
*/
/*
* This simple program is a quick introduction on how to embed and start
* experimenting with UnQLite without having to do a... |
#include <pebble.h>
#include "GCAppUtility.h"
#define COLORS true
#define ANTIALIASING true
#define HAND_MARGIN 10
#define FINAL_RADIUS 55
#define ANIMATION_DURATION 500
#define ANIMATION_DELAY 600
typedef struct {
int hours;
int minutes;
} Time;
static Window *s_main_window;
static Layer *s_canvas_l... |
#define MICROPY_HW_BOARD_NAME "Open7XXI-C"
#define MICROPY_HW_MCU_NAME "STM32F746"
#define MICROPY_HW_HAS_SWITCH (1)
#define MICROPY_HW_HAS_FLASH (1)
#define MICROPY_HW_ENABLE_RNG (1)
#define MICROPY_HW_ENABLE_RTC (1)
#define MICROPY_HW_ENABLE_USB (1)
#define MICROPY_HW_ENA... |
/* jl2005a.c
*
* Copyright (C) 2006 <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 Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
... |
/*
* setup.h
*
* Author: <NAME>
* Team eYRC#1263-HD
* Dharmsinh Desai University, Nadiad
*
* Description:
* Contains low level hardware initialisation and utility functions
* for the various microcontroller peripherals like ADC, timers, etc
* and also Firebird V specific hardware like servos, DC motors,
... |
/*
<NAME> 12/May/2020 07:54AM https://aniket-patra.github.io/
Hello, I am writing down the details of this program here:
I used: https://www.cyberciti.biz/faq/understanding-etcshadow-file/ (For Shadow file structure) and https://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/ (For passwd file structur... |
#include "path.h"
#include "kconfig.h"
#include "string.h"
#include "syscall.h"
#include "fs.h"
struct mount {
int fs;
int dev;
char path[PATH_MAX];
};
/*
* pathserver assumes that all files are FIFOs that were registered
* with mkfifo. It also assumes a global tables of FDs shared by all
* processes... |
/**
* libpsd - Photoshop file formats (*.psd) decode library
* Copyright (C) 2004-2007 Graphest Software.
*
* libpsd is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free sof... |
/* i2c - Example
For other examples please check:
https://github.com/espressif/esp-idf/tree/master/examples
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT ... |
/*!
* \file main.c
* \brief
*
* <+DETAILED+>
*
* \author <NAME> (kh), <EMAIL>
*
* \internal
* Created: 2017년 07월 25일
* Revision: none
* Compiler: gcc
* Organization: Konkuk University
* Copyright: Copyright (c) 2017, <NAME>
*
* This source code is released for free ... |
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "helper.h"
#include "queue.h"
#include <time.h>
int capacity;
int train_count;
int passanger_count;
int n;
int ride_count = 0;
int working_train_count = 0;
int train_on_stat = 0;
int start_printed = 0;
int start_count = 0;
int sva... |
/* modifier 0 means no modifier */
static int surfuseragent = 1; /* Append Surf version to default WebKit user agent */
static char *fulluseragent = ""; /* Or override the whole user agent string */
static char *scriptfile = "~/.config/surf/script.js";
static char *styledir = "~/.config/surf/styles/";
st... |
/*
Copyright (C) 2021 The Blosc Developers <<EMAIL>>
https://blosc.org
License: BSD 3-Clause (see LICENSE.txt)
Example program demonstrating how the different compression params affects
the performance of root finding.
To compile this program:
$ gcc -O3 find_roots.c -o find_roots -lblosc2
To run:
... |
/* vi: set ts=8 sts=8 sw=8 et: */
#include "Bon.h"
#include "BonConvert.h"
#include <stdlib.h>
#ifdef _WIN32
#include <crtdbg.h>
#endif
#include <assert.h>
#include <string.h>
#include <stddef.h>
#include <stdio.h>
#include <time.h>
/*---------------------------------------------------------------------------... |
// ==========================================================================
// This software is subject to the provisions of the Zope Public License,
// Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
// WARRANTIES ARE D... |
//
// Created by Soptq on 2020/7/21.
//
#include "screen.h"
#include "../libc/mem.h"
#include "../cpu/ports.h"
#include "../libc/string.h"
void _kprint_at(char *message, int32_t col, int32_t row, int8_t attr);
int32_t print_char(char c, int32_t col, int32_t row, int8_t attr, uint8_t set_text_cursor);
int32_t ge... |
/*
*
* Common board functions for OMAP3 based boards.
*
* (C) Copyright 2004-2008
* Texas Instruments, <www.ti.com>
*
* Author :
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Derived from Beagle Board and 3430 SDP code by
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
*
* See file CREDITS for l... |
/* Copyright (C) 2002-2012 The SSI Project. 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 condition... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "ureg.h"
#include "io.h"
#include "../port/error.h"
enum /* op */
{
ABS = 5,
ADD = 0,
CVTD = 33,
CVTS = 32,
CVTW = 36,
DIV = 3,
MOV = 6,
MUL = 2,
NEG = 7,
SUB = 1,
};
static int fpunimp(ulong);
static ulong ... |
/*-
* SPDX-License-Identifier: BSD-4-Clause
*
* Copyright (c) 2001 <NAME>
* Copyright (c) 1993 <NAME>
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME>.
*
* Redistribution and use in source and ... |
/* See LICENSE file for copyright and license details. */
#define _DEFAULT_SOURCE
#include <locale.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include "draw.h"
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
void
drawr... |
// <NAME> - 311 CD
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "bmp_header.h"
#define dmax 101
int found;
/* searching for a digit in bmp_matrix */
bool valid(int i, int j, int **bmp_matrix, int Matrix[5][5])
{
int lin, col, line, column;
line = 0;
for(lin = i; lin ... |
/*
* FreeRTOS Kernel V10.3.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* 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, includ... |
/* Copyright (c) 2021 ALIF SEMICONDUCTOR
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 conditions ... |
/*
* Copyright (C) by Argonne National Laboratory
* See COPYRIGHT in top-level directory
*/
/* This is a very weak sanity test that all nonblocking collectives specified by
* MPI-3 are present in the library and take arguments as expected. This test
* does not check for progress, matching issues, or sensible... |
/* ***************************************************************************
*
* Copyright 2019 Samsung Electronics 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 a... |
/* Copyright 2018 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* High-res hardware timer
*
* SCP hardware 32bit count down timer can be configured to source clock from
* 32KHz, 26MHz, BCLK or PCLK. This ... |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* tests/threads/t_rcache.c */
/*
* Copyright (C) 2006 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 Governm... |
/* snpMoltype - tenth step in dbSNP processing.
* Hash moltype from snpFasta (by chrom, and also chrMulti).
* Serially read the chrN_snpTmp tables.
* Do lookups into snpFasta hashes for molType.
* Use UCSC chromInfo. */
/* Look in chrMulti_snpFasta if no match found in chrN_snpFasta. */
/* Write to error file if ... |
/*
* Copyright 2017 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... |
// @file main.c
// @brief Main logic for Timer++
//
// Contains the higher level logic code
//
// @author <NAME>
// @date August 27, 2015
// @bugs No known bugs
#include <pebble.h>
#include "main.h"
#include "drawing.h"
#include "timer.h"
#include "utility.h"
// Main constants
#define BUTTON_HOLD_REPEAT_MS 100
// Ma... |
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2020 <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/li... |
/*-
* Copyright (C) 1990 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* without restriction.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* F... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.