text stringlengths 3.12k 18.7k |
|---|
/**************************************************************************//**
* @file i2s.c
* @version V3.0
* $Revision: 2 $
* $Date: 15/05/04 3:27p $
* @brief I2S driver source file
*
* @note
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (C) 2014 Nuvoton Technology Corp. All rights ... |
/*
* The MIT License (MIT)
*
* Copyright © 2016 Franklin "Snaipe" Mathieu <http://snai.pe/>
*
* 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 lim... |
/* D B C P . C
* BRL-CAD
*
* Copyright (c) 2004-2014 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as pu... |
/*
* (C) Copyright 2002-2006
* <NAME>, DENX Software Engineering, <EMAIL>.
*
* (C) Copyright 2002
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* <NAME> <<EMAIL>>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
... |
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1992 - 1997, 2000,2002-2007 Silicon Graphics, Inc. All rights reserved.
*/
#include <linux/types.h>
#include <linux/interr... |
/* GccFindHit V1.2.1, 07/12/96
*
* The same than FindHit by <NAME>, but for GCC users
* Usage: GccFindHit <executable file> <list of offsets in hexadecimal>
* The file should have been linked with the '-g' flag passed to gcc
* to turn on debugging information (the 'stabs')
*
* GccFindHit outputs the line numbers m... |
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* pkix_pl_ocsprequest.c
*
*/
#include "pkix_pl_ocsprequest.h"
/* --Private-OcspRequest-Functions-----------... |
/*
* Copyright (C) 2013 <NAME> <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is d... |
/**
* Copyright (C) 2009-2011 Texas Instruments, 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 applicab... |
/*----------------------------------------------------------------------------
* Copyright (c) <2016-2018>, <Huawei Technologies Co., Ltd>
* 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. R... |
/**
******************************************************************************
* @file main.c
* @author MMY Application Team
* @version $Revision: 1633 $
* @date $Date: 2016-02-10 16:31:14 +0100 (Wed, 10 Feb 2016) $
* @brief This file describe the main program.
*******************************... |
#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(c) 2019-2021 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#include "ocf/ocf.h"
#include "../ocf_cache_priv.h"
#include "cache_engine.h"
#include "engine_common.h"
#include "engine_rd.h"
#include "engine_pt.h"
#include "../metadata/metadata.h"
#include "../utils/utils_io.h"
#incl... |
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <e820.h>
#include <mmu.h>
#include <vm.h>
#include <reloc.h>
#include <vacpi.h>
#include <logmsg.h>
#include <ptcm.h>
#define ENTRY_HPA1_LOW_PART1 2U
#define ENTRY_HPA1_LOW_PART2 4U
#define ENTRY_... |
//
// PVRTC_Compress.c
// GLTC
//
// Created by <NAME> on 16.03.12.
// Copyright (c) 2014 <NAME>. All rights reserved.
// This content is released under the MIT License.
//
#include "PVRTC_Compress.h"
#include "../lib.h"
#include "../simplePNG.h"
#include <assert.h>
#include <iso646.h>
#include <stdbool.h>
#inc... |
#include "segevict.h"
#include "seg.h"
/* I think this does not need to be a parameter */
#define UPDATE_INTERVAL 1
static bool segevict_initialized;
struct seg_evict_info evict_info;
extern seg_metrics_st *seg_metrics;
extern seg_perttl_metrics_st perttl[MAX_N_TTL_BUCKET];
char *eviction_policy_names[] = ... |
/**************************************************************************
*
* tPNG:
* 2021, <NAME>
*
*
* TINFL:
* Copyright 2013-2014 RAD Game Tools and Valve Software
* Copyright 2010-2014 <NAME> and Tenacious Software LLC
* All Rights Reserved.
*
* Permission is hereby granted, free of charge,... |
#include <Python.h>
#include "levenshtein.h"
void convertArgs(PyObject *, long**, unsigned int*, long**, unsigned int*, MatrixMap**);
long* convertPySequenceToCArray(PyObject*, unsigned int);
MatrixMap* convertPyDictToMatrixMap(PyObject*, PyObject*, unsigned int, PyObject*, unsigned int);
void splitKey(PyObject*, lon... |
#include "ar_io.h"
int min(int a, int b) {
return a > b ? b : a;
}
int max(int a, int b) {
return a > b ? a : b;
}
int randint(int range) {
return range * (rand() / ((double)RAND_MAX + 1));
//return RandomInt(0, range);
}
double randdouble(double range) {
return range * drand48();
//return R... |
/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... |
#include "stm32l0xx.h"
#include "utilities.h"
#include "gpio.h"
#include "adc.h"
#include "spi.h"
#include "i2c.h"
#include "uart.h"
#include "timer.h"
#include "sysIrqHandlers.h"
#include "board-config.h"
#include "lpm-board.h"
#include "rtc-board.h"
#if defined( SX1261MBXBAS ) || defined( SX1262MBXCAS ) || defined( ... |
/*
* Copyright (C) by Argonne National Laboratory
* See COPYRIGHT in top-level directory
*/
#include "adio.h"
/* Generic version of a "collective open". Assumes a "real" underlying
* file system (meaning no wonky consistency semantics like NFS).
*
* optimization: by having just one process create a file, c... |
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "acpi.h"
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <xefi.h>
#include <zircon/boot/driver-config.h>
#include <zircon/boo... |
/***************************************************************************//**
* @file
* @brief This plugin provides support for registering a Unix file descriptor with
* a callback. This allows this code to call select() on a set of file
* descriptors with knowledge of exactly what functions to call when
* the... |
/*
* (C) Copyright 2013 ADVANSEE
* <NAME> <<EMAIL>>
*
* Based on Dirk Behme's
* https://github.com/dirkbehme/u-boot-imx6/blob/28b17e9/drivers/misc/imx_otp.c,
* which is based on Freescale's
* http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/drivers/misc/imx_otp.c?h=imx_v2009.08_1.1.0&id=9aa74e6,
* w... |
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Authors: <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Copyright (c) 2018, Arm Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
... |
/* $NetBSD: puffs_node.c,v 1.36 2014/11/10 18:46:33 maxv Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 <NAME>. All Rights Reserved.
*
* Development of this software was supported by the
* Google Summer of Code program, the Ulla Tuominen Foundation
* and the Finnish Cultural Foundation.
*
* Redistribution and u... |
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "linear.h"
const int sum_pro = 945;
int print_null(const char *s,...) {return 0;}
static int (*info)(const char *fmt,...) = &printf;
struct feature_node *x;
int max_nr_attr = 64;
struct model* model_[sum_pro];
... |
#include "identity.h"
#define REQUEST "GET_SERVERS"
static char REG_MESSAGE[RESPONSE_SIZE];
struct addrinfo *id_server = NULL;
int init_tcp(server host) {
int master_fd;
struct sockaddr_in tcpaddr = {0, .sin_port = 0};
struct timeval tv = {.tv_sec = 30, .tv_usec= 0};
void (*old_handler)(int); //inte... |
#include "common.h"
#include <pthread.h>
#include <sys/epoll.h>
#define N 100
#define PING_SLEEP 5
struct Client{
int fd;
char name[MSG_BUF];
int pong;
};
int port;
char *filename;
int local_sock;
int web_sock;
int epoll_fd;
struct epoll_event event;
struct Client clients[N];
int client_number = 0;
pthr... |
/* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2016 INRIA.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*... |
#include <stdio.h>
#include <math.h>
#include <stdbool.h>
double SQR(double a);
double SIGN(double a, double b);
double MAX(double a, double b);
double MIN(double a, double b);
double rc(double x, double y);
double rf(double x, double y, double z);
double rd(double x, double y, double z);
double snippet (double x, doub... |
/** wifi-captive-portal-esp-idf-component
Copyright (c) 2021 <NAME> <<EMAIL>>
This code is released under the license terms contained in the
file named LICENSE, which is found in the top-level folder in
this project. You must agree to follow those license terms,
otherwise you aren't allowed to copy, distrib... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 <NAME> (<EMAIL>),
* <NAME> (tinyusb.org)
* <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, i... |
/*
* Copyright (C) 2014 BlueKitchen GmbH
*
* 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 follo... |
/****************************************************************************
* crypto/rsa.c
*
* Copyright (C) 2020 FishSemi 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:
*
* 1. ... |
/*-
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copy... |
/*----------------------------------------------------------------------
This source distribution is placed in the public domain by its author,
<NAME>. You may use it for any purpose, free of charge,
without having to notify anyone. I disclaim any responsibility for any
errors.
Optionally, please be nice and tel... |
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2012 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must reta... |
// ------------------------------------------------------------------------------------------------
/* Purdue CS536 - Computer Networks - Fall 2015
** Final Project: IP Diamond
** <NAME> (ispo)
**
** ___________ ______ _ _
** |_ _| ___ \ | _ (_) ... |
/*****************************************************************************
* Copyright (c) 2019 FrontISTR Commons
* This software is released under the MIT License, see LICENSE.txt
*****************************************************************************/
#include "hecmw_visualizer.h"
#include <stdio.h>
#i... |
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2016 Intel Corporation. All rights reserved.
//
// Author: <NAME> <<EMAIL>>
// <NAME> <<EMAIL>>
#include <sof/audio/buffer.h>
#include <sof/audio/component_ext.h>
#include <sof/audio/pipeline.h>
#include <sof/list.h>
#include <sof/spinlock.h>
#include... |
/*
Copyright 2018 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writi... |
/*******************************************************************************
MPLAB Harmony Exceptions Source File
File Name:
system_exceptions.c
Summary:
This file contains a function which overrides the deafult _weak_ exception
handler provided by the XC32 compiler.
Description:
This fi... |
/* amcss.c: POOL CLASS AMC STRESS TEST
*
* $Id$
* Copyright (c) 2001-2020 Ravenbrook Limited. See end of file for license.
* Portions copyright (C) 2002 Global Graphics Software.
*/
#include "fmtdy.h"
#include "fmtdytst.h"
#include "testlib.h"
#include "mpm.h"
#include "mpslib.h"
#include "mpscamc.h"
#include "m... |
/*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <drivers/flash.h>
#include <fs/nvs.h>
#include <logging/log.h>
#include <storage/flash_map.h>
#include <string.h>
#include <zephyr.h>
#define MAX_RING_SIZE 11
#define NVS_ID_SENSOR_A 0
#define NVS_ID_NET_RESP... |
#include "cetris.h"
void ai_init(struct ai_brain_t *ai_brain)
{
#ifdef AI_SPY_MODE
ai_brain->enable = true;
#else
ai_brain->enable = false;
#endif
ai_brain->high_speed = false;
}
void toggle_ai(struct game_t *game)
{
if (!game->in_game || game->ended) {
return;
}
strcpy(game->display.login, "JAR... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team,
* check out http://www.gromacs.org for more information.
* Copyright (c) 2012,2013, by the GROMACS development team, l... |
/* Software License Agreement (Apache License)
*
* Copyright 2013 Open Source Robotics Foundation
* Author: <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
*
* htt... |
/*
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
typedef struct {
int8_t year, month, day, hour, minute;
} Time;
// generate random number:
int8_t get_number(int min,int max)
{
float rf=(float)rand() / (float)RAND_MAX * (float)(max+1);
int8... |
/* Copyright (C) 2014 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... |
// NDBX OSC Implementation
// Can be used to receive messages from OSCulator.
#include <assert.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "nosc.h"
#include "nut.h"
... |
/*===----------------------------------------------------------------------===*\
|* *|
|* This file is part of the koala-lang project, under the MIT License. *|
|* ... |
/**
******************************************************************************
* File Name : aos_md_fe.c
* Created : 07/23/2015
* Version : 1.0
* Author : <NAME>
* Description : AOS Module Drivers - Front-end Drivers (FED).
* License : The... |
/*
* Copyright (c) 2017, CESAR.
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*
*/
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <stdb... |
/*
* broadvoice - a library for the BroadVoice 16 and 32 codecs
*
* encoder.c -
*
* Adapted by <NAME> <<EMAIL>> from code which is
* Copyright 2000-2009 Broadcom Corporation
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesse... |
/**
* @file Serialport.c
* @author <NAME>
* @date 15 January 2017
* @brief Serialport communication via RS232
*
* This library contains functions to communicate with the PC via RS232.
*
* @license creative commons license CC BY-NC 4.0 http://creativecommons.org/licenses/by-nc/4.0/
*/
#include <avr/io.h>
#incl... |
/*
* @file knn.c
* @brief KNN classifier implementation using HW for calculating distances
*
* This program runs a KNN implementation with configurable parameter K.
* The dataset must be uploaded to memory before execution.
* Hardware Acceleration is used in the calculation of squared euclidean
* distances betwe... |
/* This is a self scalability test for testing million(s) of connections and their memory consumption */
#include <libusockets.h>
int SSL;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned char web_socket_request[26] = {130, 128 | 20, 1, 2, 3, 4};
char request[] = "GET / HTTP/1.1\r\n"
... |
/***********************license start***********************************
* Copyright (C) 2018 Marvell International Ltd.
* SPDX-License-Identifier: BSD-3-Clause
* https://spdx.org/licenses
***********************license end**************************************/
/**
* @file
*
* Functions for determining which chip ... |
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc., 2016 Google Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public ... |
// Copyright (c) 2020 by <NAME>.
// All rights reserved.
//
// You can use this software under the terms of 'INDIGO Astronomy
// open-source license' (see LICENSE.md).
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHORS 'AS IS' AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIE... |
/********************************************************************************
filename : soil_carbon_balance.c
purpose : Calculate soil carbon balance
interface : - input :
# - Nnodes: number of points (vertically) at which to evaluate soil respiration
# - dZ[]: array of l... |
/**********************************************************************************
Avatar Tools
Copyright (c) 2019, National Technology and Engineering Solutions of Sandia, LLC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the foll... |
#include "vdac.h"
#include "screen.h"
#include "msg.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#ifdef GLES
#include <GLES3/gl3.h>
#define SHADER_HEADER "#version 300 es\nprecision lowp float;\n"
#else
#include "gl_core_3_3.h"
#define SHADER_HEADER "#version 330 core\n"
#endif
#define TEX_FORMAT GL... |
/*
* @brief UDA1380 Audio codec interface file
*
* @note
* Copyright(C) NXP Semiconductors, 2012
* All rights reserved.
*
* @par
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* LPC products. This software is supplie... |
/*
* Ruby9i -- a Ruby library for accessing Oracle9i through the OCI
* Copyright (C) 2003-2004 <NAME> <<EMAIL>>
*
* This file is part of the Ruby9i library. This Library is free software;
* you can redistribute it and/or modify it under the terms of the license
* contained in the file LICENCE.txt. If you did no... |
#define REG0 I.WP
#define REG1 I.WP+2
#define REG2 I.WP+4
#define REG3 I.WP+6
#define REG4 I.WP+8
#define REG5 I.WP+10
#define REG6 I.WP+12
#define REG7 I.WP+14
#define REG8 I.WP+16
#define REG9 I.WP+18
#define REG10 I.WP+20
#define REG11 I.WP+22
#define REG12 I.WP+24
#define REG13 I.WP+26
#define REG14 I.WP+... |
/**
MIT License
Copyright (c) 2022 Jesper
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 <linux/init.h>
#include <linux/module.h>
#include <linux/version.h>
#include<linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <sound/jack.h>
#include <linux/of_gpio.h>
#include "hs_auto_calib.h"
/*lint -e574*/
#define LOG_TAG "hs_auto_calib"
#define OF_KEY_VALUE_GET(np, name, value,... |
/**
RTCC Generated Driver File
@Company
Microchip Technology Inc.
@File Name
rtcc.c
@Summary
This is the generated driver implementation for the RTCC driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs
@Description
This source file provides APIs for RTCC.
Generation Informat... |
/* cdft.f -- translated by f2c (version 20190311).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of t... |
/* Copyright (C) 2017 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "bigWig.h"
#include "hdb.h"
#include "wiggle.h"
#include "trackHub.h"
// stack of arithmetic operators
struct opcodeStack
{
int depth;
int... |
/*
* Copyright (C) 2010 NXP Semiconductors
*
* 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 o... |
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#define ROW 1+10+1
#define COL 1+15+1
#define MINE 20
INPUT_RECORD rec;
DWORD dwNOER;
typedef struct {
char map[COL + 2][ROW + 2];
} Map;
enum Cell {
Edge = 9,
Mine = 8,
Empty = 0
};
enum Gui {
Close = 0,
Open,
... |
/* ffi.c -- foreign function interface
*
* Copyright (c) 2008 <NAME>
* 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, including without lim... |
/*
* Phoenix-RTOS
*
* NANDtool utility
*
* Allows to program/erase NAND flash memory
*
* Copyright 2018, 2021 Phoenix Systems
* Author: <NAME>, <NAME>
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#i... |
/*! \file baseline_control.c
* \brief baseline controller source code
*
* \details The baseline controller is a classical PI design that tracks pitch angle (theta) and roll angle (phi).
* A yaw damper and roll damper is used for the lateral axis, and a pitch damper is used for the longitudinal axis.
*
* \ingroup ... |
#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#define _DEFAULT_SOURCE
#include <stdlib.h>
#include <stdbool.h>
#include <linux/types.h>
#include <errno.h>
/* setns */
#include <sched.h>
/* read */
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
/* PATH_MAX */
#include <limits.h>
/* ... |
#include "apg_ply.h"
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
unsigned int apg_ply_write( const char* filename, apg_ply_t ply ) {
if ( !filename ) { return false; }
if ( !ply.positions_ptr || ply.n_vertices <= 0 ) { return false; }
if... |
/* $OpenBSD: kiic.c,v 1.4 2013/10/09 17:53:29 mpi Exp $ */
/* $NetBSD: kiic.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
* Copyright (c) 2001 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
... |
#include <stdio.h>
#include <stdlib.h>
#include <zip.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fnmatch.h>
#include <arpa/inet.h>
#include <libgen.h>
#include <fcntl.h>
#define _XOPEN_SOURCE 500
#define __USE_XOPEN_EXTENDED
#i... |
/*
Code taken from Rosetta Code (https://rosettacode.org/wiki/N-body_problem#C).
Simulates the interaction of several masses under gravity.
Takes as input a configuration file specifying the number of masses and their
positions, in the following format:
<Gravitational Constant> <Number of bodies(N)> <Time st... |
// ------------------------------------------------------------------
// sam_shared.c
// Copyright (C) 2020 <NAME> <<EMAIL>>
// Please see terms and conditions in the files LICENSE.non-commercial.txt and LICENSE.commercial.txt
#include "sam_private.h"
#include "strings.h"
#include "file.h"
// table of valid cig... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2015 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your o... |
/**
@file ioboard_example.c
@brief IO board example "device info".
@author <NAME>
@version 1.1
@date 26.4.2021
ioboard2 example demonstrates how an IO device can publish static device information
to controllers. This example implementation doesn't use dynamic memory allocation or
multithreadi... |
/* ---------------- rms~ - rmselope follower. ----------------- */
/* based on msp's rms~-object: outputs both linear and dBFS rms */
#include "m_pd.h"
#include "math.h"
#include <string.h>
#define MAXOVERLAP 32
#define INITVSTAKEN 64
#define LOGTEN 2.302585092994
typedef struct sigrms
{
t_object x_obj; ... |
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include <signal.h>
#include <libusb.h>
#define NDEBUG // to disable debug messages
#include "dbg.h"
// bmRequestType vendor-specific direction codes
#define CTL_WRITE LIBUSB_REQUEST_TYPE_VENDOR
#define CTL_READ (LIBUSB_REQUEST_TYPE_VENDO... |
/*
* Controller.c
*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* Code generation for model "Controller".
*
* Model version : 1.62
* Simulink ... |
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "ringbuf.h"
#include "serial.h"
#ifndef MIN
#define MIN(a,b)((a < b) ? a : b)
#endif
struct _BotRingBuf{
uint8_t * buf;
int readOffset;
int writeOffset;
int numBytes;
int maxSize;
u... |
/*
* proxy.c - ICS Web proxy
*
*
*/
#include <stdarg.h>
#include <sys/select.h>
#include "csapp.h"
#define BIGBUFFER 16392
struct http_request_t {
char method[MAXLINE];
char uri[BIGBUFFER];
char version[MAXLINE];
char header_buf[MAXLINE];
char data[BIGBUFFER];
size_t data_size;
};
struc... |
/*-
* Copyright (C) 2016 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
#include "ngx_http_lookuplibs_module.h"
#include "ngx_http_lookuplib_radix_tree.h"
#include "ngx_http_lookuplibs_lua.h"
#include "ngx_http_lookuplibs_internal.h"
static ngx_conf_enum_t ngx_http_lklb_types[ ] = {
{ ngx_string( "radix" ), NGX_HTTP_LKLB_TYPE_RADIX }
/* Add newer types here */
};
static ngx_conf_... |
/*
* Copyright (c) 2009-2019 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
*/
#include "parsec/runtime.h"
#undef NDEBUG
#include <pthread.h>
#include <stdarg.h>
#include <signal.h>
#include <stdlib.h>
#incl... |
#include <stdint.h>
#include <math.h>
#include "iitbnavic_globals.h"
#include "tracking_loop.h"
// normalize to pi.
float normalizeTo2Pi(float x)
{
float y = ((x < 0) ? -x : x);
int R = (y * (0.5/M_PI));
y = y - (2.0*M_PI*R);
y = ((x < 0) ? ((2.0*M_PI) - y)... |
/*
* Copyright 1997, Regents of the University of Minnesota
*
* initmsection.c
*
* This file contains code that performs the k-way multisection
*
* Started 6/3/97
* George
*
* $Id: initmsection.c 10361 2011-06-21 19:16:22Z karypis $
*/
#include <parmetislib.h>
#define DEBUG_IPART_
/*********************... |
/*
* Copyright (c) 2010, <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions ... |
#include <net-snmp/net-snmp-config.h>
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
#if HAVE_STRING_H
#include <string.h>
#else
#include <strings.h>
#endif
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/so... |
//@ #include "ghost_lists.gh"
#include <stdlib.h>
#include "atomics.h"
#include "clhlock.h"
struct node {
int lock;
//@ struct node *pred;
//@ real frac;
};
struct lock {
struct node *tail;
//@ int ghostListId;
//@ predicate() inv_;
};
struct lock_thread {
struct node *node;
struct n... |
/* AUTORIGHTS
Copyright (C) 2003 - 2010 <NAME>
Copyright (c) 2011 Your Filesystem Inc.
Copyright (c) 2012 Sine Nomine Associates
All rights reserved
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of sour... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.