text stringlengths 3.08k 10.5k |
|---|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "graph.h"
#include "funcplot.h"
int x_dim=256, y_dim=256;
double step=0.01;
/* print_usage:
* Print usage instructions for the "testfunc" program.
*/
static void print_usage()
{
printf("\n");
printf("* Usag... |
#define KL_LOG KL_DEV
#include <sys/klog.h>
#include <sys/mimiker.h>
#include <sys/bus.h>
#include <sys/devclass.h>
#include <sys/rman.h>
#include <sys/vnode.h>
#include <sys/devfs.h>
#include <sys/stat.h>
#include <sys/libkern.h>
#include <sys/ttycom.h>
#include <sys/interrupt.h>
#include <sys/ringbuf.h>
#include <sys... |
#include <clingo.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
bool print_model(clingo_model_t *model) {
bool ret = true;
clingo_symbol_t *atoms = NULL;
size_t atoms_n;
clingo_symbol_t const *it, *ie;
char *str = NULL;
size_t str_n = 0;
// determine the number of (shown) symbols in the m... |
/* Copyright (c) 2014, Nordic Semiconductor ASA
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify... |
#include "hx_drv_tflm.h"
#include "synopsys_wei_gpio.h"
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#define ARDUINO 0x12
#define X 0
#define Y 1
#define Z 2
const float kLPFBeta = 0.25;
const float kSamplingPeriod = 0.025;
const uint32_t kClkRate = 400000000;
const uint32_t kSamplingCycle = kSamplingPer... |
/* ----------------------------------------------------------------------- */
/* earthsun.c a C version of an IDL routine */
/* converted from IDL to C by j.bennett, 03feb1999 */
/* 26mar1999 - minor cleanup. */
/* 11... |
/* ----------------------------------------------------------------------
* A basic example to read/write a nifti dataset (e.g. cp command).
*
* compile example (consider -pedantic or -Wall):
*
* gcc -o clib_02_nifti2 clib_02.nifti2.c \
* -I../include -L../lib -lniftiio -lznz -lz -lm
*
* OR
*
* gcc... |
#include "http.h"
#include "lwip/api.h"
#include "esp_log.h"
#include <string.h>
static const char TAG[] = "httpd";
// static const char HTTP_STATUS_OK[] = "HTTP/1.1 200 OK\r\n";
// static const char HTTP_STATUS_FORBIDDEN[] = "HTTP/1.1 403 Forbidden\r\n";
// static const char HTTP_STATUS_NOTFOUND[] = "HTTP/1.1 40... |
#include "lmvs.h"
#include "lmvs-cond.h"
#include "lmvs-fast.h"
#include "lmvs-utils.h"
#include "lmvs-socket-api.h"
#include "lmvs-response.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <pthread.h>
#include <string.h>
#include <strings.h>
#include <netinet/in.h>
#include <a... |
/*
* Filename : watchlist.c
*
* Made by : <NAME> and <NAME>
*
* Created : 78/34/2252
*
* Description : Load watchlist and it deals with it.
*/
#include "watchlist.h"
#include "init_gui.h"
#include "get_top_10.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
// free string structure of watchlist
v... |
#include <cxcore.h>
#include <cv.h>
#include <highgui.h>
// 以图像中心为原点,调整傅立叶变换图像的四个象限区,即第一和第三象限交换
// 第二和第四象限交换
void cvShiftDFT(CvArr * src_arr, CvArr * dst_arr )
{
CvMat * tmp;
CvMat q1stub, q2stub;
CvMat q3stub, q4stub;
CvMat d1stub, d2stub;
CvMat d3stub, d4stub;
CvMat * q1, * q2, * q3, * q4;
... |
/* $NetBSD: kb.c,v 1.2 2002/03/17 19:40:45 atatat Exp $ */
/*
* Copyright (c) 2001 <NAME>.
* 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. Redistributi... |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdint.h>
#define STACK_MAX_SIZE 100
typedef struct {
int data[STACK_MAX_SIZE];
size_t size;
} Stack_t;
void push(Stack_t *stack, int value) {
if (stack->size >= STACK_MAX_SIZE)
exit(1);
stack->data[stack-... |
/*
This file contains code from SDL2 (copyright below) which was
either not exported by the copiled library, or didn't quite do
what I needed, etc.
- BAG June 2018
*/
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 <NAME> <<EMAIL>>
This software is provided 'as-is', without any express or ... |
//=====================================================================================
//Read igd region data and query data, and then find all overlaps
//by <NAME> 05/12/2018
//
//database intervals sorted by _start: 8/12/2019
//Reorg--simplify: 11/06/19
//-----------------------------------------------------------... |
#include "CCollision.h"
#include "Geometry.h"
#include <math.h>
#include <stdio.h>
// const int MAX_BOX_ELEMENTS = 6;
#define MAX_BOX_ELEMENTS 10
#define MAX_BOX_COLLISIONS 100
const int BOX_GRID_WIDTH = 20;
const int BOX_GRID_HEIGHT = 20;
// const int NUM_BOXES = BOX_GRID_WIDTH * BOX_GRID_HEIGHT;
#define NUM_BOXE... |
/*
Copyright (c) 2003-2006 by <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... |
#include "util.h"
typedef int A_pos;
typedef struct A_var_ *A_var;
typedef struct A_exp_ *A_exp;
typedef struct A_dec_ *A_dec;
typedef struct A_ty_ *A_ty;
typedef struct A_decList_ *A_decList;
typedef struct A_expList_ *A_expList;
typedef struct A_field_ *A_field;
typedef struct A_fieldList_ *A_fieldList;
typedef st... |
/*
* Copyright (c) 2003 <NAME>
* Copyright (c) 2003 Massachusetts Institute of Technology
*
* 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 ... |
/**
* Display raw RGB file.
*
* Copyright 2014 <NAME> <<EMAIL>>
*
* 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 b... |
#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... |
/*
Copyright 2019 <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, distribute,... |
/* devIai1.c */
/*
* Author: <NAME>
* Date: 02JUL1997
*
*/
/*************************************************************************
* Copyright (c) 2003 The University of Chicago, as Operator of Argonne
* National Laboratory, the Regents of the University of California, as
* Operator of Los Alamos Nat... |
/*
* Copyright (c) 2004, National ICT Australia
*/
/*
* Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder).
* All rights reserved.
*
* 1. Redistribution and use of OKL4 (Software) in source and binary
* forms, with or without modification, are permitted provided that the
* following conditions are met... |
/*
* Copyright (c) 2012, Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list... |
/* SPDX-License-Identifier: BSD-2-Clause */
#include <tilck/common/basic_defs.h>
#include <tilck/common/assert.h>
#include <tilck/common/string_util.h>
#include <tilck/boot/common.h>
#include "defs.h"
#include "utils.h"
static void
efi_boot_write_char(char c)
{
Print(L"%c", c);
}
static int
efi_boot_read_key(voi... |
/*
** $Id: propsheet.c 759 2009-09-21 05:22:47Z dongjunjie $
**
** Listing 28.1
**
** propsheet.c: Sample program for MiniGUI Programming Guide
** Usage of PORPSHEET control.
**
** Copyright (C) 2004 ~ 2007 Feynman Software.
**
** License: GPL
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#incl... |
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* ====================================================================
* Copyright (c) 1999-2010 Carnegie Mellon University. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided ... |
/* $NetBSD: ms_kbc.c,v 1.2 2002/03/17 19:40:45 atatat Exp $ */
/*-
* Copyright (c) 2001 <NAME>. All rights reserved.
* 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
* ar... |
/*
Copyright (c) 2021, <NAME>
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
*/
#include <sys/types.h>
#ifdef __WIN32
#include <winsock2.h>
#include <windows.h>
#include <ws2tcpip.h>
#else
#include <sys/socket.h>
#inc... |
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdlib.h>
#include <stdio.h>
int init_socket(char *port);
int init_file(char *path);
int read_socket(char *buf, int n);
int read_file(char *buf, int n);
void socket_error(char *msg);
enum Input_type { FILE_INPUT, S... |
/*
*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* The contents of this file are provided under the Software License
* Agreement that you accepted before downloading this file.
*
* This source forms part of the Software and can be used for educational,
* training, and demonstration purpos... |
/* SPDX-License-Identifier: MIT */
/*
* Author: <NAME> <<EMAIL>>
* Date: 2016
*/
#include <FreeRTOS.h>
#include <task.h>
#include <linux_client.h>
#include <stdio.h>
#include <vector.h>
#include <string.h>
#include <irq.h>
#include <buffer.h>
#include <os.h>
struct lc {
bool init;
struct motor *motor;
struct buf... |
/**
* Libraries.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "images_handler.h"
#include "neural_network_handler.h"
/**
* Symbolic constants.
*/
#define L_ARG_INDEX 1
#define N_ARG_INDEX 3
#define ARGS_COUNT_WITHOUT_N_VALUES 8
#define ARGS_BEFORE_N_VALUES 4
#define ARGS_BEFORE_LR 6
... |
#include "bstree.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "alloc-testing.h"
#include "test_helper.h"
typedef struct _CBValue {
void *data[100];
int index;
int length;
} CBValue;
static void bs_tree_traverse_callback(BSTreeNode *node, void *args)
{
CBValue *value = (CBValu... |
#include <asf.h>
#include "util.h"
volatile uint32_t g_ul_ms_ticks = 0;
void SysTick_Handler(void)
{
g_ul_ms_ticks++;
}
bool ledstate;
void shift_array_left(char *arr, const size_t size, const size_t bits) {
const size_t chunks = bits / (8);
if (chunks >= size) {
return;
}
if (chunks) {
memmove(arr, arr +... |
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <avr/cpufunc.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "matrixdata.h"
#define HEIGHT 16
#define WIDTH 64
#define SHIFTPORT PORTB
#define SHIFTPORTDDR DDRB
#define OUTPUTENABLE 6
#define SELA 1
#d... |
#include <stdio.h>
#include <stdbool.h>
#include <SDL.h>
#include "algorithm.h"
int saveState(int cell[verticalHeight][horizontalWidth]){
int s;
FILE *st = fopen("state.txt","w+");
if(st==NULL)
return -1;
for(int y=0; y<verticalHeight; y++){
for(int x=0; x<horizontalWidth; x++... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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
* or http://www.opensolar... |
#include "xc.h" // Microchip XC8 compiler include file
#include "stdint.h" // Include integer definitions
#include "stdbool.h" // Include Boolean (true/false) definitions
#include "UBMP4.h" // Include UBMP4 constants and functions
#include "notes.h"
// TODO Set ... |
/*
$License:
Copyright (C) 2010 InvenSense Corporation, All Rights Reserved.
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) ... |
/* rvcc C compiler - definitions */
/* code limits */
#define MAX_TOKEN_LEN 256
#define MAX_ID_LEN 64
#define MAX_LINE_LEN 256
#define MAX_VAR_LEN 64
#define MAX_TYPE_LEN 64
#define MAX_PARAMS 8
#define MAX_LOCALS 64
#define MAX_FIELDS 64
#define MAX_FUNCTIONS 1024
#ifndef __riscos
#define MAX_BLOCKS 1048576 /* Note: ... |
#include "pci.h"
#include "x86.h"
// based on my simple x86 os
// https://github.com/masami256/miko/blob/master/drivers/pci/pci.c
#define PCI_BUS_MAX 255
#define PCI_DEVICE_MAX 31
#define PCI_FUNCTION_MAX 7
// PCI CONFIG_ADDRESS
#define PCI_CONFIG_ADDRESS 0x0cf8
// Config Data register range is 0x0cfc - 0x0cff.
#de... |
/* HTTP GET Example using plain POSIX sockets
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 WARRANTIES OR
CONDITIONS OF ANY KIND, either express or impl... |
/****************************************************************************
* bfs *
* Copyright (C) 2018-2019 <NAME> <<EMAIL>> *
* *
* Permission to use, copy, modif... |
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <json-c/json.h>
#include "party.h"
#include "rating.h"
#include "state.h"
#include "main.h"
#ifndef INCLUDED_LIB
# include "party.c"
# include "rating.c"
# include "state.c"
#endif
int main(int argc, char **argv) {
size_t json_file_b... |
/****************************************************
* BCB board - iCub Facility - 2013 *
* Interrupt configuration *
* *
* Written by <NAME> *
* <<EMAIL>> *
*****... |
#include <xcb/xcb_icccm.h>
#include "connection.h"
#include "ewmh.h"
#include "window.h"
#include "../wm/custard.h"
void configure_window(xcb_window_t window_id, unsigned int value_mask,
unsigned int *values) {
xcb_configure_window(xcb_connection, window_id, value_mask, values);
log_debug("W... |
/**
* This file is part of the Detox package.
*
* Copyright (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "clean_utf_... |
/*
* thread.c
*
* Created on: Jun 2, 2020, Replacement for list.c created on Mar 24, 2020
* Author: <NAME>
*/
#include "thread.h"
volatile queue_t readyQueues[PRIORITY_LEVELS];
volatile queue_t xTimeOutList;
OSThread_t* volatile pxPrev = NULL;
OSThread_t* volatile pxRunning = NULL;
OSThread_t* volatile ... |
/**
* @file rcand.c Remote ICE Candidates
*
* Copyright (C) 2010 - 2015 Creytiv.com
*/
#include <string.h>
#include <re_types.h>
#include <re_fmt.h>
#include <re_mem.h>
#include <re_mbuf.h>
#include <re_list.h>
#include <re_tmr.h>
#include <re_sa.h>
#include <re_net.h>
#include <re_stun.h>
#include <re_ice.h>
#inc... |
/* Copyright (c) 2010-2012, <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 con... |
#define _GNU_SOURCE
// stat
#include <libgen.h>
#include <sys/stat.h>
#include <string.h>
// fopen
#include <stdio.h>
// readdir
#include <dirent.h>
// Required by all
#include <dlfcn.h>
#include <android/log.h>
#include <errno.h>
FILE *fopen(const char *path, const char *mode) {
printf("In our own fopen, openin... |
/* Copyright (c) 2004-2007 <NAME>
*
* TERMS
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the f... |
// ┌────────────────────────────────────────────────────────────────────────────┐
// | |
// | ██████╗ ██╗ ██╗██╗██████╗ ███████╗███╗ ██╗██████╗ ███████╗ |
// | ██╔═══██╗╚██╗██╔╝██║██╔══██╗██╔════╝████╗ ██║██╔══██╗██╔════╝ ... |
#include <vectorSolver/solver.h>
struct node
{
int x,y,dx,dy;
struct node * parent;
};
void init_src(struct map * map, struct node * src)
{
for(int i = 0; i<map->w;i++)
{
for(int j = 0; j<map->h; j++)
{
if(map->grid[i][j] == '*')
{
src->x = i;
src->y = j;
}
}
}
src->... |
/* $Id: analyse.c,v 1.4 2003-04-11 16:44:28 martin Exp $ */
#include <assert.h>
#include <stdio.h>
#include "chess.h"
#include "movegen.h"
#include "execute.h"
#include "logger.h"
#include "analyse.h"
#include "test.h"
#include "iterate.h"
#include "mstimer.h"
#include "input.h"
#include "chessio.h"
#include "init.h"... |
/*
* time_ex.c
*
* Created on: 25 mar 2018
* Author: kamil
*/
#define _POSIX_TIMERS
#include <time_ex.h>
#include <cdefs.h>
#include <assert.h>
#include <time.h>
#include <stdio.h>
#if _POSIX_C_SOURCE >= 199309L
__attribute__((__weak__))
time_ns_t timer_gettime_ns(timer_t timerid, time_ns_t *interval)
{... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* effector.c :+: :+: :+: ... |
/*
Copyright (C) 2019 SUSE LLC
Author: <NAME> <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modif... |
/*
* Copyright (c) 2016-2018, MIPS Tech, LLC and/or its affiliated group companies
* (“MIPS”).
*
* 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 withou... |
/*
Copyright (c) 2018 - 2019 <NAME>
Copyright (c) 2018 Algorand 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 Software without restriction, including without limitation the rights
to use, copy... |
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <math.h>
typedef struct marker_s{
unsigned char* name;
float start;
float duration;
}Marker;
typedef struct marker_tab_s{
int size;
Marke... |
/*******************************************************************************
* Copyright 2019-2021 Microchip FPGA Embedded Systems Solutions.
*
* SPDX-License-Identifier: MIT
*
* Application code
*
* FreeRTOS example project suitable for Asymmetric Multiprocessing (AMP) configuration
*
*/
/***************... |
/* Copyright 2021 IBM Corp.
*
* 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 writi... |
#pragma config(I2C_Usage, I2C1, i2cSensors)
#pragma config(Sensor, dgtl1, topGreenLED, sensorLEDtoVCC)
#pragma config(Sensor, dgtl2, bottomGreenLED, sensorLEDtoVCC)
#pragma config(Sensor, dgtl3, yellowLED, sensorLEDtoVCC)
#pragma config(Sensor, dgtl4, redLED, sensorLEDtoVCC)
#pragma config(Sensor, d... |
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include "3dsconv.h"
#include "mbedtls/aes.h"
#include "mbedtls/sha256.h"
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "data.inl"
#include "bn.h"
void fprint_hex(FILE *fd, const uint8_t *input, size_t len, int uppe... |
/**
* Keil project example for USB CDC device (Virtual COM Port) and USB HID host
* on the same USB port, with "on-the-fly" USB change mode when needed.
*
* USB HS is used for testing!
*
* Before you start, select your target, on the right of the "Load" button
*
* @author <NAME>
* @email <EMAIL>
* @we... |
// z19b UART driver, tested with ESP32.
// Authors: Djok_39
// License: MIT
#include "mgos.h"
#define UART_NO 1
// #define Z19_MA_BUFFER 5 // moving average smoothing
#define EVENT_GRP_SM MGOS_EVENT_BASE('S', 'M', '_')
#define SM_CO2_AVAILABLE (EVENT_GRP_SM + 3)
struct Z19_STATE{
bool initialised;
time_t ... |
/***************************************************************************//**
* \file sbp_device.c
*
* \brief Standalone C Driver for the Swift-Nav SBP Devices
* \author <NAME>
* \date June 23, 2017
*
* Adapted from original Swift-Nav Piksi driver authored by:
* <NAME>
* <NAME>
*
*
* This is a standalone C driver f... |
/*
* Copyright (C) 2015 Freie Universität Berlin
* 2015 FreshTemp, LLC.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup cpu_sam0_common
* @ingroup d... |
#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... |
#include <pebble.h>
#include "clock_area.h"
#include "messaging.h"
#include "settings.h"
#include "weather.h"
#include "sidebar.h"
#include "util.h"
#ifdef PBL_HEALTH
#include "health.h"
#endif
#include "time_date.h"
// windows and layers
static Window* mainWindow;
static Layer* windowLayer;
// current bluetooth stat... |
#pragma once
// NOTE: platform
#include <cstdint>
#include <assert.h>
#include <stdlib.h>
#include <memory.h>
#define PLATFORM_WINDOWS 0
#define PLATFORM_LINUX 1
#define PLATFORM_CPU_MEMORY_ALIGNMENT 256 // best for AVX
#if( defined ... |
/***************************************************************************//**
* @file
* @brief CLI for the Configuration Server plugin.
*******************************************************************************
* # License
* <b>Copyright 2018 Silicon Laboratories Inc. www.silabs.com</b>
******************... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <signal.h>
#include "mpi.h"
#include <time.h>
#include <stdlib.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb/stb_image_write.h"
typedef struct pixel_struct {
unsigned c... |
#include "audio_service.h"
#include "audio.h"
#include "ingsoc.h"
#include "FreeRTOS.h"
#include "semphr.h"
#include "queue.h"
#include "platform_api.h"
extern void audio_input_setup(void);
extern void audio_input_start(void);
extern void audio_input_stop(void);
static adpcm_enc_t enc;
uint8_t data_buffer[VOICE_BU... |
#include "board.h"
#include "ft6x36.h"
#include "qspi_flash.h"
#include "timer_utils.h"
#include "pinmux.h"
#include "pinmux_cfg.h"
#include "gpio_cfg.h"
#include "clock_config.h"
#include "fsl_port.h"
#include "fsl_gpio.h"
#include "fsl_lpuart.h"
#include "fsl_i2c.h"
#include <stdbool.h>
#define INITIALIZE_GPIO_PIN(... |
/*
* Copyright (c) 2017 Cisco and/or its affiliates.
* 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 applicabl... |
/**
* Copyright 2017 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unl... |
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/un.h>
#include <unistd.h>
#include <curl/curl.h>
#define PATH_UNIX_SOCKET "/tmp/test-libcurl-multi.sock"
static int
set_socket_timeout(int fd)
{
struct timeval tv = {
... |
/* whom.c -- report to whom a message would be sent
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include "h/mh.h"
#include "sbr/pidwait.h"
#include "distsbr.h"
#include "sbr/getargument... |
#include "infer.h"
#include "array.h"
#include "block.h"
#include "bool.h"
#include "cast.h"
#include "identifier.h"
#include "if.h"
#include "reference.h"
#include "struct.h"
#include "struct-field-decl.h"
#include "struct-decl.h"
#include "uint.h"
#include "variable.h"
#include "../utils.h"
#include "../program.h"
... |
//#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <semaphore.h>
#include <strings.h>
#include <process.h>
#define MAX 50
typedef struct arguments{
int id;
char finishThread;
}arguments;
typedef struct arguments* argumentsPointer;
argumentsPointer philosophers[MAX];
typedef enum {
Hungry = 0... |
/* $NetBSD: h_hostent.c,v 1.2 2014/01/09 02:18:10 christos Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME>.
*
* Redistribution and use in source and binary forms, with or without
* modif... |
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <wiringPi.h>
#include <stdint.h>
#define BUTTON_PIN 1
#define TEXT_BUFFER_LEN 1024
#define TEXT_LOCK 0
#define BIT_BUF_LOCK 1
#define STATE_NONE 0
#define STATE_WAITING_CONF 1
#define STATE_WAITING_FRAME 2
volatile uint32_t lastHi... |
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <sys/stat.h>
#include <errno.h>
#include "utils.h"
#pragma pack(push,1)
typedef struct { /* Header written to tape for each file */
uint32_t fsize; /* File data size */... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define LIM 100005
// void merge(int *, int, int , int);
// void msort(int *, int, int);
// int array[LIM];
struct adj
{
int vertex;
struct adj *next;
};
struct list
{
int vertex;
int d;
int f;
char color;
char col;
struct adj *next1;
};
// void ms... |
// Help ids
/* NOTE! Any changes to this file must be cleared with UE! */
//#define IDH_NO_HELP 28440 // if you don't know...
/* The following symbols are defined in core\inc\help.h, which we dup here */
#ifndef IDH_OK
#define IDH_OK 28443 /... |
/*
Copyright 2015 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
/* Create a section containing all the symbols for an object.
Copyright 2000 <NAME> <<EMAIL>> April 2000
This file is part of the Linux modutils.
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 ... |
/** @file simple_client.c
*
* @brief This simple client demonstrates the basic features of JACK
* as they would be used by many applications.
*/
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <signal.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include <jac... |
/*
* Copyright (c) 2008 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compl... |
/* Copyright (C) 2015 by <NAME> <<EMAIL>>
*
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any late... |
#include "dbar.h"
void DB_Init()
{
char alabel[MAXSTR];
int i;
// Set configuration string.
conninfo = "dbname=casasdb";
// Make a connection to the database.
conn = PQconnectdb(conninfo);
// Check to see that connection was made.
if (PQstatus(conn) != CONNECTION_OK)
{
fprintf(stde... |
/* zpipe.c: example of proper use of zlib's inflate() and deflate()
Not copyrighted -- provided to the public domain
Version 1.4 11 December 2005 <NAME> */
/* Version history:
1.0 30 Oct 2004 First version
1.1 8 Nov 2004 Add void casting for unused return values
Use switch state... |
/*
Teem: Tools to process and visualize scientific data and images
Copyright (C) 2005 <NAME>
Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
(LGPL) as... |
// simple lua socket library for client
// It's only for demo, limited feature. Don't use it in your project.
// Rewrite socket library by yourself .
#include <lua.h>
#include <lauxlib.h>
#include <string.h>
#include <stdint.h>
#include <pthread.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/types.h>
#i... |
/* roots/falsepos.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000 <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 published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option... |
/*
* Copyright (c) 2007, 2008, 2009, 2010, 2011, 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, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
*/
#include... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.