text stringlengths 3.08k 10.5k |
|---|
#include "calc.h"
/* "mode" conversions. this is based on code in config.c */
typedef struct {
const char *name;
long type;
} nametype2;
static nametype2 modes[] = {
{"fraction", MODE_FRAC},
{"frac", MODE_FRAC},
{"integer", MODE_INT},
{"int", MODE_INT},
{"real", MODE_REAL},
{"float",... |
/*
* Copyright © 2009 Intel Corporation
*
* 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... |
#include "fs.h"
#include <assert.h>
#include <minix/callnr.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <minix/dmap.h>
#include <minix/endpoint.h>
#include <minix/vfsif.h>
#include "buf.h"
#include "inode.h"
/* Declare some local functions. */
static void get_work(message *m_in);
static voi... |
#include <stdint.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include "omp.h"
double ** getGaussian(int width, int height, double sigma)
{
double sum=0.0;
double ** kernel = (double **) malloc (height * sizeof(double *));
in... |
/**
* @file test/account.c Tests for account
*
* Copyright (C) 2010 - 2017 <NAME>
*/
#include <string.h>
#include <re.h>
#include <baresip.h>
#include "test.h"
#define DEBUG_MODULE "account"
#define DEBUG_LEVEL 5
#include <re_dbg.h>
static const char str[] =
"\"Mr User\" <sip:<EMAIL>>"
";answermode=auto"
";... |
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::Network:Service
* Copyright (c) 2004-2015 ARM Germany GmbH. All rights reserved.
*------------------------------------------------------------------------------
* Name: HTTP_Server_CGI.c
* Purpose: HT... |
/*
* finddev.c -- this routine attempts to find a particular device in
* /dev
*
* Copyright (C) 2000 <NAME>.
*
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Public
* License.
* %End-Header%
*/
#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif... |
/* bkerndev - Bran's Kernel Development Tutorial
* By: <NAME>. (<EMAIL>)
* Desc: Interrupt Request management
*
* Notes: No warranty expressed or implied. Use at own risk.
Strayex Kernel Interrupt Request
THIS IS NOT MY CODE!
This file was a little rewritten only, by me,
this is why I included above c... |
/*
* Copyright 2018, Decawave Limited, All Rights Reserved
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you u... |
/*
* Copyright 2017, <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, distri... |
// 0x0700FBA8 - 0x0700FBE8
static const Vtx bitfs_seg7_vertex_0700FBA8[] = {
{{{ 307, 307, -306}, 0, { 2420, 990}, {0x70, 0x7f, 0x60, 0xff}}},
{{{ -306, 307, 307}, 0, { 0, 990}, {0x70, 0x7f, 0x60, 0xff}}},
{{{ 307, 307, 307}, 0, { 1194, -236}, {0x70, 0x7f, 0x60, 0xff}}},
... |
#include "xmame.h"
#include "driver.h"
#include "profiler.h"
#include "sysdep/misc.h"
static int frameskip_counter = 0;
int dos_skip_next_frame()
{
static const int skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS] =
{
{ 0,0,0,0,0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,0,0,0,0,0,1 },
{ 0,0,0,0,0,1,0,0,0,0,0,1 },
{ 0,0,... |
/*
*Description: How to setup serial port in atmel studio and atmega328p-pu micro controller.
*Special thanks:
thanks https://www.youtube.com/watch?v=3_omxGIL0kw for the tutorial.
I made the comments to be as clear as possible. Make sure you always check my previous examples on
gitlab. https://gitlab.com/Basilisvirus... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "timing.h"
#include "vad_process.h"
//采用https://github.com/mackron/dr_libs/blob/master/dr_wav.h 解码
#define DR_WAV_IMPLEMENTATION
#include "dr_wav.h"
#include "vad.h"
#ifndef nullptr
#def... |
/****************************************************************************
*
* 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 at... |
#pragma once
#include "../IRenderer.h"
/* Utility functions to cache commands so that we can execute them when client
* calls on queueSubmit.
* TODO: create a script to autogenerate this file
*/
enum CmdType
{
CMD_TYPE_cmdBindRenderTargets,
CMD_TYPE_cmdSetViewport,
CMD_TYPE_cmdSetScissor,
CMD_TYPE_cmdBindPipe... |
/*
FreeRTOS V6.0.5 - Copyright (C) 2009 Real Time Engineers Ltd.
This file is part of the FreeRTOS distribution.
FreeRTOS 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 AND MODIFI... |
/*
* Copyright 2008-2017 <NAME>
*
* See LICENCE for the full copyright terms.
*/
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include "libfsm/internal.h" /* XXX: up here for bitmap.h */
#include <print/esc.h>
#include <adt/set.h>
#include <adt/bitmap.h>
#in... |
#include "precomp.h"
#ifdef UNICODE
#include <wchar.h>
#else
#include <string.h>
#endif
/************************************************************************/
/* */
/* Windows Cardfile - Written by <NAME> */
/... |
/***************************************************************************
Atari Sprint 4 video emulation
***************************************************************************/
#include "driver.h"
#include "audio/sprint4.h"
static tilemap* playfield;
static mame_bitmap* helper;
int sprint4_collision[4];
... |
/**
* gcc -o event-reader event-reader.c `pkg-config --cflags --libs libinput libudev` -lm
*
* https://wayland.freedesktop.org/libinput/doc/latest/api/
* to get button codes:
* libinput debug-events
* see MOUSE_GESTURE_BTN_CODE constant below
**/
/*
/etc/X11/xorg.conf.d/M590-button-map.conf:
Section "InputClas... |
/*
* File: main.c
* ----------------------------
* Author: <NAME>
* Date: 2020-03-05
* ----------------------------
* Startup aller Module
*/
/*
Module:
- Sensors
- BNO
- Ultrschall
- GPS
- Remote
- Smartphone
- Website
- Konfiguration
... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define NMAX 20
/************************************************************/
/****************DICHIARAZIONE DI FUNZIONI*******************/
/*tipo nome_funzione (TIPI DEI VALORI IN IN INPUT);*/
void PrintInitMessage(void);
int getN(void);
int... |
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
static int err = 0;
static int childpid;
void set_fd_nonblock( int );
int bread( int, void *, int );
#if !defined(EAGAIN)
#define EAGAIN EWOULDBLOCK
#endif
int main( int argc,... |
/*
* Copyright (c) 2013-2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC)
* 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 r... |
/* ----------------------------- MNI Header -----------------------------------
@NAME : frameint.c (CMEX)
@INPUT :
@OUTPUT :
@RETURNS :
@DESCRIPTION:
@METHOD :
@GLOBALS : NaN (NaN in double format)
@CALLS :
@CREATED : August 9, 1993
@MODIFIED :
@VERSION : $Id: nf... |
/* Copyright (c) 2007 <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, distr... |
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <uv.h>
#include "nvim/os/input.h"
#include "nvim/os/event.h"
#include "nvim/os/signal.h"
#include "nvim/os/rstream_defs.h"
#include "nvim/os/rstream.h"
#include "nvim/ascii.h"
#include "nvim/vim.h"
#include "nvim/ui.h"
#include "nvim/fileio.h"
#inc... |
/*****************************************************************************\
dusty.c
\*****************************************************************************/
#include "genomikon.h"
static double entropy(int a, int c, int g, int t) {
int total = a + c + g + t;
if (total == 0) return 0;
double pa = a / (... |
/*
* This code contains changes by
* <NAME>, Freiburg i. Br., Germany, 2002. All rights reserved.
*
* Conditions 1, 2, and 4 and the no-warranty notice below apply
* to these changes.
*
*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution ... |
// Link with -pthread.
#define _DEFAULT_SOURCE
#include <pthread.h>
#include <semaphore.h>
#include <stdio.h>
#include <inttypes.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#define RING_SIZE 6
#define SLEEP_MICROS (250*1000 + (rand() % (2 * 1000 * 1000)))
#define STATE_PROD_CALC (1<<0)
#define STATE_... |
#include <sys/socket.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/un.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include <netdb.h>
struct NTPPacket
{
char Leap_Ver_Mode; //2_3... |
// Distributed under the MIT software license, see the accompanying
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
// Based on the public domain XMSS reference implementation
// by <NAME> and <NAME>
/*
wots.c version 20160722
<NAME>
<NAME>
Public domain.
*/
#include <cmath>
#include <cstdint>
#... |
/*
* Copyright (c) 2007-2010 <NAME> (<EMAIL>)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form 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)
... |
/*
*
* Copyright (c) International Business Machines Corp., 2001
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any l... |
/* sha256.c
The sha256 hash function.
See http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
Copyright (C) 2001 <NAME>
This file is part of GNU Nettle.
GNU Nettle is free software: you can redistribute it and/or
modify it under the terms of either:
* the GNU Lesser General Public... |
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <netdb.h>
#include "dyn_seeds_provider.h"
#include "dyn_core.h"
#include "dyn_string.h"
#define USERAGENT "HTMLGET 1.0"
#define REQ_HEADER "GET /%s HTTP/1.0\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n"
#define IP "127.0.0.1"
#de... |
/**
******************************************************************************
* @file TIM/OCInactive/main.c
* @author MCD Application Team
* @version V3.1.2
* @date 09/28/2009
* @brief Main program body
******************************************************************************
* ... |
/*
* The following symbols are defined if your operating system supports
* functions by that name. All Unixes I know of support them, thus they
* are not checked by the configuration script, but are directly defined
* here.
*/
/* HAS_IOCTL:
* This symbol, if defined, indicates that the ioctl() routine is
* ava... |
#include "euler_tour_tree.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// create the Euler Tour representation of a set of n disconnected nodes
EulerTourTree* make_euler_tour_tree(s_t n) {
EulerTourTree* tree = malloc(sizeof(EulerTourTree));
tree->n = n;
// visits is a length-2n... |
/*
** client.c
*/
#include <stdio.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <time.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include "common.h"
int client_id = 0xffff, efd, sockfd;
struct epoll_event event;
int process_function(int *done, int event, int fd);
int submit_job();
voi... |
/*
扫雷算法
1. 命令行输入要生成的数组大小以及雷的数量
2.随机产生一个位置用来放置一个雷
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#define MINE 'X'
#define EMPT '0'
#define OPEN 'K'
#define BLOCK '*'
void print_array(int sz, char (*a)[sz], char (*b)[sz], const char * title) {
puts(title);
for ... |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* plugins/authdata/greet_server/greet_auth.c */
/*
* Copyright 2009 by the Massachusetts Institute of Technology.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* ... |
/* Copyright (c) 2014, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of condition... |
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <errno.h>
#include <libgen.h>
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
#include <ctype.h>
#include "m2i.h"
#include "bundle.h"
#include "cart.h"
uint8_t flash_memory[MAX_BANKS * 0x4000];
struct dir_entry {
char name[16];
uin... |
/* $NetBSD: copy.c,v 1.1.1.2 2014/04/24 12:45:26 pettai Exp $ */
/*
* Copyright (c) 1997-2004 <NAME>
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
/******************************************************************************
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* GPL LICENSE SUMMARY
*
* Copyright(c) 2007-2021 Intel Corporation. All rights reserve... |
#include "storage.h"
#include <stdlib.h>
#include "list.h"
#include "register.h"
#define AREA "STORAGE"
// maximum usable ram = blksiz * maxblks
// maximum allocation = blksiz * (maxblks * 2)
// maximum usable pairs = blksiz * maxblks / sizeof(pair)
// e.g. If blksiz = (1 << 20), MAXBLKS = 1024 & sizeof(pair) = 32
/... |
#include <stdint.h>
/*
* config.h needs to come first
*/
#include "config.h"
#include "fsl_spi_master_driver.h"
#include "fsl_port_hal.h"
#include "SEGGER_RTT.h"
#include "gpio_pins.h"
#include "warp.h"
#include "devSSD1331.h"
volatile uint8_t inBuffer[1];
volatile uint8_t payloadBytes[1];
/*
* Override Warp f... |
#include <bitfield/bitfield.h>
#include <stddef.h>
#include <limits.h>
#include <string.h>
#define PREPARE_FIRST_COPY() \
do { \
if (bit_count >= (CHAR_BIT - destination_offset_modulo)) { \
*desti... |
#include <stasis/transactional.h>
#include <stasis/truncation.h>
#include <stasis/bufferManager.h>
#include <stdio.h>
#include <assert.h>
struct stasis_truncation_t {
char initialized;
char automaticallyTruncating;
pthread_t truncationThread;
pthread_mutex_t shutdown_mutex;
pthread_cond_t shutdown_cond;
st... |
/* time.c
*
* Copyright (C) 2006-2016 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL 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) ... |
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "request.h"
#include "util.h"
static STSStatus compose_uri(char* buffer, int bufferSize, const CommonRequestContext* commonContext)
{
int len = 0;
#define uri_append(fmt, ...) \
do { ... |
/*
* Copyright (C) 2008-2014, Marvell International Ltd.
* All Rights Reserved.
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <secure_boot2.h>
#include <secure_boot.h>
#include <cyassl/ctaocrypt/rsa.h>
#include <cyassl/ctaocrypt/aes.h>
#include <cyassl/ctaocrypt/sha256.h>
#include <boot2.h>... |
/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public Li... |
#include <oto/oto.h>
static void error_lexer(errorcode_t err, char *src, int64_t idx, Status *status) {
print_error(err, status);
int64_t line = get_current_line(src, idx);
printf("line %I64d : ", line);
print_line(src, line);
int64_t l = 1;
int64_t i = 0;
while (l != line) {
... |
#include "arm7tdmi/arm7tdmi.h"
#include "arm/arm.h"
#include "thumb/thumb.h"
#include "internal.h"
#include "util/bit.h"
// #include "arm7tdmi/arm/encoding_types.h"
// #include "arm7tdmi/arm/instruction_table.h"
// #include "arm7tdmi/arm/opcode_hash.h"
// #include "arm7tdmi/thumb/instruction_table.h"
// #include "arm... |
#define _GNU_SOURCE
#include <ctype.h>
#include <dirent.h>
#include <fcntl.h>
#include <ftw.h>
#include <libgen.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <utime.h>
#inc... |
/***************************************************************************
*
* _config-msvcrt.h - Microsoft Visual C++ run-time library
* configuration definitions
*
* This is an internal header file used to implement the C++ Standard
* Library. It should never be #included directly by a prog... |
/*
* Copyright (C) 2017 Red Hat, Inc.
*
* Author: <NAME>
*
* This file is part of GnuTLS.
*
* GnuTLS is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your opt... |
/** object_handler
*
* Main object handler:
* Controlls and loops through every object in the game
* Lets you add new gameobjects that get added to the loop
*
*/
#include "object_handler.h"
#include "client_handler.h"
#include "input_handler.h"
#include "player.h"
#include "bullet.h... |
/*
* This test runs a fairly exhaustive test on the key loading functionality
*
* It runs 3000 parallel working keys of the same private key; working key i
* will be loaded at step i, and then generate signatures from that point;
* for example, at step 3, we'll have three working keys; one which was loaded
* at i... |
/*
* Copyright 2016 <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... |
// © 2013, <NAME>, CIGI, University of Illinois at Urbana-Champaign. All rights reserved.
#include "hdr.h"
// Get a unique ID
int globalid;
#define GETID ++globalid
#define SETID(id) globalid=id;
// Delete a sugar agent
int sugdel(agentstruct *a) {
xplstruct *m;
m=(xplstruct *)a->a;
m->g.id=-1;
... |
/**
* (C) Copyright 2021-2022 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
/**
* Unit testing for dfuse and Interception library. This code does not interact with dfuse
* directly, however makes filesystem calls into libc and checks the results are as expected.
*
* It is also called w... |
/* make_bad_sector.c v3.03 by <NAME> */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <linux/fs.h>
#include <scsi/scsi.h>
#include <scsi/sg.h>
#include "hdparm.h"
#include... |
#include "required.h"
#include "helpers.h"
int StartsWith(char* haystack, const char* needle) {
return strstr(haystack, needle) == haystack ? 1 : 0;
}
int ByteCompare(unsigned char* haystack, unsigned char* needle, int length) {
int i;
for (i = 0; i < length; i++) {
if (haystack[i] != needle[i]) {
... |
/*
Copyright (C) 1998-2004 <NAME>
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 progra... |
/* $NetBSD: scireg.h,v 1.3 1994/10/26 02:04:46 cgd Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME> of Lawrence Berkeley Laboratory.
*
* Redistribution and use in source and binary form... |
/* $NetBSD: timerreg.h,v 1.6 1996/10/28 00:20:32 abrown Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This software was developed by the Computer Systems Engineering group
* at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
* contr... |
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <math.h>
#include <mpg123.h>
#include <time.h>
#include "util.h"
#include <switch.h>
#define BUF_COUNT 2
static size_t buffSize;
static mpg123_handle *mh = NULL;
static uint32_t rate;
static uint8_t channels;
bool Continue... |
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
#in... |
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <string.h>
#include <fcntl.h>
#include "../include/alias.h"
#include "../include/process_handler.h"
#define IFEXIT(CONDITION, MSG, CODE) do { if ((CONDITION)) { perror((MSG)); exit((CODE)); } } while (0)
#def... |
/*
* This software is Copyright (c) 2016 <NAME>
* [denis_burykin yahoo com], [denis-burykin2014 yandex ru]
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
*/
#include <stdio.... |
// BranchingFunctionsDelays.c Lab 6
// Runs on LM4F120/TM4C123
// Use simple programming structures in C to
// toggle an LED while a button is pressed and
// turn the LED on when the button is released.
// This lab will use the hardware already built into the LaunchPad.
// <NAME>, <NAME>
// January 15, 2016
... |
/*****************************************************************************/
/* _ _ _ */
/* | | (_) | | */
/* _ __ _ _ | | __ _ _ __ _ __| | */
... |
#include "uni_log.h"
#include "uni_uart.h"
#include "uni_communication.h"
#include "uni_channel.h"
#include "uni_asr_business.h"
#include "uni_event_list.h"
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#define TAG "main"
st... |
#include "julia_common.h"
void mx_to_jl_array(jl_array_t ** array_ptr, const mxArray * m)
{
jl_value_t * array_type;
jl_datatype_t * data_type;
jl_tuple_t * dims;
const mwSize * mdims;
size_t ndims;
size_t byte_size;
JL_GC_PUSH3(&array_type, &data_type, &dims);
data_type = mx_to_jl_type(mxGetClassID(m));
i... |
#include "image.h"
#include "inklog.h"
#define INKLOG_MODULE "cpuimage"
#include "image-libjpeg.h"
#include "image-giflib.h"
#include "image-libpng.h"
#include "image-sdl_image.h"
#include "image-pnm.h"
#include "archive.h"
#include "filetype.h"
#include "timing.h"
#include <stdio.h>
#include <stdlib.h>
#include <st... |
#include <litc.h>
static char lmss[1ul << 11];
static int mss(int s)
{
printf("MSS sends\n");
int fd = open("/redis.conf", O_RDONLY);
if (fd == -1)
err(-1, "open");
ssize_t r;
if ((r = read(fd, lmss, sizeof(lmss))) == -1)
err(-1, "read");
else if (r != sizeof(lmss))
errx(-1, "short read?");
char *p = ... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/* $NetBSD: mace.c,v 1.4 2002/03/13 13:12:26 simonb Exp $ */
/*
* Copyright (c) 2000 <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 retai... |
/* ---------------------------------------------------------------------------- */
/* Atmel Microcontroller Software Support */
/* SAM Software Package License */
/* --------------------------------------------------------------------... |
#include "types.h"
#include "defs.h"
#include "param.h"
#include "memlayout.h"
#include "mmu.h"
#include "spinlock.h"
#include "slab.h"
#include "stdbool.h"
struct {
struct spinlock lock;
struct slab slab[NSLAB]; // 0 ~ 8
} stable;
void slabinit(){
struct slab *tmp_slab;
int slab_size = 8;
initlock(&stable.lock,... |
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
*/
#define import_spp
#define import_libc
#define import_stdio
#include <iraf.h>
#include "operand.h"
#include "construct.h"
#include "param.h"
#include "task.h"
#include "eparam.h"
int parse_state; /* What are we parsing? */
int p... |
/*
* THEC64 Mini
* Copyright (C) 2017 <NAME>
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This ... |
/*
does not use built-in detection functionality
alert tcp $EXTERNAL_NET $HTTP_PORTS -> $HOME_NET any (msg:"WEB-CLIENT Malicious PICT file download"; flow:established,to_client; content:"|00 11 02 FF 0C 00|"; reference:cve,2008-3018; reference:url ,technet.microsoft.com/en-us/security/bulletin/ms08-044; metadata:servi... |
/* gcc -g -Wall -O2 -o dialog-test dialog-test.c `pkg-config --cflags --libs gtk+-3.0` */
#include <gtk/gtk.h>
static GtkWidget *window;
static GtkWidget *width_chars_spin;
static GtkWidget *max_width_chars_spin;
static GtkWidget *default_width_spin;
static GtkWidget *default_height_spin;
static GtkWidget *resizable_... |
/******************************************************************************
* @file main.c
* @version V3.00
* @brief Implement a code and execute in SRAM to program embedded Flash.
* (Support KEIL MDK Only)
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2016 Nuvoton Technology Cor... |
#include "Usart2.h"
uint8_t my_rxbuff[MY_RXBUFF_SIZE];
void initUsart2(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
USART_InitTypeDef USART_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
RCC_APB1PeriphClockCmd(MY_RCC_USART, ENABLE);
RCC_APB2PeriphClockCmd(MY_RCC_GPIO, ENABLE);
USART_DeI... |
#include <stdio.h>
#include "hacking-network.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <arpa/inet.h>
#include "hacking.h"
#include "server.h"
#define WEBROOT "./webr... |
/***************************************************************************
Name : MODEMINT.H
Comment :
Functions: (see Prototypes just below)
Copyright (c) Microsoft Corp. 1991, 1992, 1993
Revision Log
Date Name Description
-------- ----- ----------------------------... |
/* cf_config.h. Generated from cf_config.h.in by configure. */
/* cf_config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. Thi... |
/*
# <<BEGIN-copyright>>
# Copyright 2019, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
# <<END-copyright>>
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <nf... |
/********************************
Author: <NAME>
********************************/
#include "stitch.h"
#include <math.h>
#define min(a,b) (a<b)?a:b
F2D* extractFeatures(I2D* I, F2D* x, F2D* y)
{
int n, i, j, k;
F2D* I1;
F2D *Iconv;
F2D *Isub;
int nr, nc;
F2D *w, *wt, *vecF;
I2D *Xsub, *Ys... |
/*
* $Id: hdr2tex.c,v 1.1.1.1 2004/01/06 13:57:17 syoyo Exp $
*
* HDRI(raw float format) to texture converter.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
static int swapflag = 0;
static int flipflag = 0;
static int is_little_... |
#include <gtk/gtk.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "images/colors.h"
#include "images/conversions.h"
#include "images/image.h"
#include "images/transformations.h"
#include "nn/neural_network.h"
#include "nn/training.h"
#include "utils/error.h"
#include "utils/matri... |
//------------------------------------------------------------------------------
// Project: arrayfunc
// Module: arrayparams_compress.c
// Purpose: Parameter parsing for dropwhile, takewhile, afilter.
// Language: C
// Date: 28-Nov-2017
//
//---------------------------------------------------------------------... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <semaphore.h>
#include <pthread.h>
#include <ctype.h>
#include <stdint.h>
int museum_ds[500];
pthread_t museum_threads[500];
int is_open[500];
int museum_threads_coun... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dataset.h"
#include "compiler.h"
#include "random.h"
#include "util.h"
#define DATASET_DEFAULT_SIZE 10000000
#define MAX_KEY_SIZE 256
#define RAND_VAR_MAX_SIZE 16
int random_dataset_read_key(dataset_t* dataset, blob_t* buf) {
int key_len = (uintpt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.