text stringlengths 3.12k 18.7k |
|---|
/*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <assert.h>
#include <inttypes.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/m... |
/* Copyright (C) 2012 <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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WI... |
/*
* Copyright (c) 2019, <NAME>
* All rights reserved.
*
* Driver for the SHT31 Temperature/Humidity sensor
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "McuSHT31config.h"
#include "McuSHT31.h"
#include "McuGenericI2C.h"
#include "McuUtility.h"
#include <stddef.h> /* for NULL */
#define SHT31_MEAS_HIG... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdbool.h>
#include <dirent.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <errno.h>
#include "../serveur_file/da... |
/* GStreamer
* Copyright (C) 2005 <NAME> <<EMAIL>>
* Copyright (C) 2010 <NAME> <tim centricular net>
* Copyright (C) 2012 Collabora Ltd. <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Sof... |
/**
******************************************************************************
* @file FatFs/FatFs_USBDisk/Src/main.c
* @author MCD Application Team
* @version V1.2.1
* @date 13-March-2015
* @brief Main program body
* This sample code shows how to use FatFs with USB disk driv... |
/*
* vkrunner
*
* Copyright (C) 2018 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, m... |
/* dasrdi.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__3 = 3;
static integer c__1 = 1;
/* $Procedure DASRDI ( DAS, read data, integer ) */
/* Subroutine... |
/*
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* Copyright (c) 2020
* <NAME>. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* The Mach Operating System project at Carnegie-Mellon University.
*
* Redistribution and u... |
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2002 CaH4e3
*
* 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 Licen... |
/* This represents the root of the serialization data; everything hangs
* off this. In read mode, we don't do much besides populate and then
* read this. In write mode, however, the tables and data chunks will be
* filled out and grown as needed. */
struct MVMSerializationRoot {
/* The version of the serializati... |
/*
* Copyright (c) 2007 Diginext/C-S
*
* All rights reserved.
*
* Author: <NAME> (<EMAIL>)
*
* This software licensed under BSD license, the text of which follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are m... |
#include "Matrix.h"
#include "Base_Math.h"
#include "Misc_Math.h"
#include "Vector.h"
MATRIX4 Matrix4Identity()
{
MATRIX4 m;
m.r[0] = (VECTOR) {{{1.0f, 0.0f, 0.0f, 0.0f}}};
m.r[1] = (VECTOR) {{{0.0f, 1.0f, 0.0f, 0.0f}}};
m.r[2] = (VECTOR) {{{0.0f, 0.0f, 1.0f, 0.0f}}};
m.r[3] = (VECTOR) {{{... |
/** Copyright (c) 2009 <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and... |
/**************************************************************************
*
* Copyright 2008 HPCNL-KICS, UET, Lahore, PAKISTAN.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification,are permitted provided that the following conditions
* are met:
*
* ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#include <math.h>
#define CHUNK_SIZE 1024
#define BUFSIZE 256
/* Color defines */
#define RED "\x1B[31m"
#define GRN "\x1B[32m"
#define YEL "\x1B[33m"
#define BLU "\x1B[34m"
#define MAG "\x1B[35m"
#define CYN ... |
/**
******************************************************************************
* @file usart.c
* @brief This file provides code for the configuration
* of the USART instances.
******************************************************************************
* @attention
*
* <h2><center>© Cop... |
#include <Python.h> /* make sure Python.h is first */
#include <dirent.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ferret.h"
#include "FerMem.h"
#include "grdel.h"
/* Environment variable giving the directories containing symbol definitions */
#define SYMDIRS_ENVVAR "FER_... |
/*
Unofficial driver for Vive Trackers and up to two lighthouses, with an
emphasis on pulling tracker and lighthouse calibration data from devices.
Adapted from: https://github.com/cnlohr/libsurvive
Which was based off: https://github.com/collabora/OSVR-Vive-Libre
Originally Copyright 2016 <NAME>
... |
/*
* Copyright (c) 2015-2018 Nexenta Systems, inc.
*
* This file is part of EdgeFS Project
* (see https://github.com/Nexenta/edgefs).
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional informat... |
/* Copyright (C) 2010 Ion Torrent Systems, Inc. All Rights Reserved */
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/shm.h>
#include <time.h>
#include <getopt.h>
#include "../util/tmap_error.h"
#include "../util/tmap_alloc.h"
#include "../util/tmap_progress.h"
#include "../util/tmap_rand.h"... |
/*
* $Id: MemPool.c,v 1.20.4.2 2000/02/09 23:29:52 wessels Exp $
*
* DEBUG: section 63 Low Level Memory Pool Management
* AUTHOR: <NAME>
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
* ----------------------------------------------------------
*
* Squid is the result of efforts by numerou... |
/******************************************************************
***** *****
***** Name: cs8900.c *****
***** Ver.: 1.0 *****
***** Date: 07/05/2001 ... |
#include "hardware.h"
#include "cli.h"
#include "radio_uart.h"
#include "util.h"
#include "gui.h"
#include <stdio.h>
#include <string.h>
// TURN THIS ON TO ENABLE TESTING OF SHELLCODE
// #define DEBUG_TEST_SHELLCODE 1
#define CLI_LINE_NONE 0 // no line to process
#define CLI_LINE_READY 1 // line to process
#define... |
/*
* disk/albedo.c
*
* Custom format as used on Albedo by Myriad/Loriciels.
*
* Written in 2014 by <NAME>
*
* RAW TRACK LAYOUT:
* Sector 1:
* u16 0x448a,0x4aa2,0x5555 :: Sync
* u8 even[0x58e] :: Even
* u8 odd[0x58e] :: Odd
* Sector 2:
* u16 0x8945,0x4a25,0x2555 :: Sync
* u8 even[0x378] :: Even
* ... |
#include "stm32f10x.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_tim.h"
#include "delay.h"
#define RCC_GPIO_ROW RCC_APB2Periph_GPIOA
#define RCC_GPIO_COL RCC_APB2Periph_GPIOB
#define GPIO_ROW GPIOA
#define GPIO_COL GPIOB
#define GPIO_PIN_ROW_0 GPIO_Pin_7
#define GPIO_PIN_ROW_1 ... |
/* #define BSEARCH_DEBUG 1 */
/* pwnedCheck.c */
/* V 0.1.0 - <NAME> */
/* Pleae see pwned.h for license */
/* ... |
#include "png_decoder.h"
#include "dbg.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <stdarg.h>
#include <zlib.h>
static const int32_t buffer_size = 52428800;
static const int8_t png_sign_length = 8;
static const int8_t length_field_length = 4;
stati... |
/*
* Copyright (c) 2004 <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 an... |
/* Copyright (C) 2001-2021 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license ... |
//----------------------------------------------------------------------------
// photonmap.cpp
// An example implementation of the photon map data structure
//
// <NAME> - February 2001
//----------------------------------------------------------------------------
#include "PhotonMap.h"
#define swap(ph,a,b) { Photon... |
/* $NetBSD: linux_machdep.c,v 1.8 2002/05/20 06:26:46 jdolecek Exp $ */
/*-
* Copyright (c) 1995, 2000 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 withou... |
// This is a personal academic project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <interrupts.h>
#include <keyboardDriver.h>
#include <lib.h>
#include <memoryManager.h>
#include <stddef.h>
#include <stringLib.h>
#include <taskManager.h... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
/*D***********************************************************
* Header: MPnewlev.h
* NEWLEVEL definition for GUI and DBI
* this is the resolution key for XXXXchoose
* and XXXXselect functions
*
* Copyright: yafra.org, Basel, Switzerland
*****************... |
/*
* prob_oscillator.c
*
* Includes the stoichiometries and propensities for the problem.
* Chemical Oscillator example
* 9 chemical species
* 16 chemical reactions
* 16 rate parameters
* Original reference:
* <NAME> and Liebler, "Mechanisms of noise-resistance
* in genetic oscillators." PN... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file TIM/TIM_DMABurst/Src/main.c
* @author MCD Application Team
* @brief This sample code shows how to use DMA with TIM2 Update request to
* transfer Data from memory to TIM2 Captu... |
#include <stdlib.h>
extern void *xmalloc(size_t);
extern double mymin(double, double);
extern double mymax(double, double);
/* LEVEL 1 BLAS */
extern double dnrm2_(int *, double *, int *);
/* LEVEL 2 BLAS */
extern int dsymv_(char *, int *, double *, double *, int *, double *, int *, double *, double *, int *);
extern... |
#include "lx.h"
void info_refresh() {
lxedit_layout *l = lx->layout;
wclear(l->tree);
int row = 0;
exe *exe = lx->executables[lx->layout->active_exe];
mvwprintw(l->tree, row++, 0, "%s", exe->name);
mvwprintw(l->tree, row, 0, "%6x - %6x", 0, sizeof(exe->mz));
mvwprintw(l->tree, row++, 16, "M... |
#include <arch.h>
#include <driver/vga.h>
#include <zjunix/bootmm.h>
#include <zjunix/utils.h>
struct bootmm bmm;
unsigned char bootmmmap[MACHINE_MMSIZE >> PAGE_SHIFT];
unsigned int firstusercode_start;
unsigned int firstusercode_len;
char *memType[] = { "Kernel use", "Mm Bitmap", "Vga Buffer", "Kernel page directory"... |
/*
* Copyright 2015 <NAME>
* All rights reserved.
* MIT Licensed - see http://opensource.org/licenses/MIT for details.
*
*/
#include <stdio.h>
#include <stdlib.h>
/*
Union to use for the conversion.
This post pointed me in the right direction:
https://stackoverflow.com/questions/
1568... |
/** \file settings_printer.c
* \brief Widget to control printer settings
*
* \author <NAME> <<EMAIL>>
*/
/* FIXME: Some of the resources mentioned here are actually controlled by
* widgets in other files:
*
* $VICERES IECDevice4 -vsid
* $VICERES IECDevice5 -vsi... |
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <getopt.h>
#include <ctype.h>
#include <sys/stat.h>
#include "obj.h"
static char *symbols;
static int numsyms;
static struct objhdr hdr;
static int bigendian;
static char bogus[19] = { "\0OU... |
/**
* API retrieve host from a hostfile.
*
* "$Id: nccf_def_host_from_file.c 869 2011-11-29 20:12:54Z pletzer $"
*/
#include "nccf_host.h"
#include <stdio.h>
#include <string.h>
#include <libgen.h>
#include <netcdf.h>
#include "nccf_global.h"
#include "nccf_varObj.h"
#include "nccf_errors.h"
/* Some methods used... |
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "../include/editor.h"
#include "../include/highlight.h"
extern struct editorConfig E;
#define HL_HIGHLIGHT_NUMBERS (1 << 0)
#define HL_HIGHLIGHT_STRINGS (1 << 1)
char *C_HL_extensions[] = { ".c", ".h", ".cpp", NULL };
char *C_HL_keywords[] =
{
"sw... |
//
// debugger.c
// m68ksim
//
// Created by <NAME> on 28/12/14.
// Copyright (c) 2014 <NAME>.
//
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include "m68ksim.h"
#include "debugger.h"
#include "breakpoints.h"
#include "musashi/m68k.h"
#include "error.h"
#inclu... |
/**
* Copyright © 2016 IBM Corporation
*
* 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 agr... |
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include "psrgeom.h"
struct opts
{
double al_deg; // alpha angle in deg
double ze_deg; // zeta angle in deg
double ph_deg; // phase angle in deg
double P_sec; // period, in sec
int ... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* printf_double_utils.c :+: :+: :+: ... |
/* $NetBSD: kvm86.c,v 1.7 2003/06/23 11:01:18 martin Exp $ */
/*
* Copyright (c) 2002
* <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 r... |
#include "vm.h"
#include "windows.h"
typedef int (*FARG0)(void);
typedef int (*FARG1)(int);
typedef int (*FARG2)(int,int);
typedef int (*FARG3)(int,int,int);
typedef int (*FARG4)(int,int,int,int);
typedef int (*FARG5)(int,int,int,int,int);
typedef int (*FARG6)(int,int,int,int,int,int);
typedef int (*FARG7)(int,int,int... |
//
// Copyright 2011-2015 <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 ... |
/* help.c: Displaying online help.
*
* Copyright (C) 2001-2006 by <NAME>, under the GNU General Public
* License. No warranty. See COPYING for details.
*/
#include <stdlib.h>
#include "defs.h"
#include "err.h"
#include "state.h"
#include "oshw.h"
#include "ver.h"
//#include "comptime.h"
#include "help.h"
#define ... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <poll.h>
#include <string.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <errno.h>
/**
* This C utility will forward Qualcomm Diag data over TCP to /dev/diag, running
* on an Android host.
*
* B... |
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Compu... |
// Button Swap taiHEN plugin
// Copyright (c) 2016 Scorp
#include <psp2/kernel/modulemgr.h>
#include <psp2/display.h>
#include <psp2/ctrl.h>
#include <psp2/power.h>
#include <taihen.h>
#include "blit.h"
#define LEFT_LABEL_X CENTER(24)
#define RIGHT_LABEL_X CENTER(0)
static SceUID g_hooks[9];
int showMenu = 0;
int mo... |
#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... |
/*
* Floating point AAN IDCT
* Copyright (c) 2008 <NAME> <<EMAIL>>
*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License,... |
/* Copyright (C) 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT AN... |
/**
* \file
* \brief Elver - Intermediary stage bootloader
*
* Elver is used to switch the system into 64-bit long-mode and load
* the kernel, which is a relocatable ELF64 image. Unfortunately, GRUB
* is not able to this without a patch. This is purely for
* backwards-compatibility. As soon as bootloaders suppor... |
/**
* @file utils.c
* @brief
*
* Copyright (C) 2009-2016 Gummi Developers
* 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, includin... |
/* This file is the part of the STM32 secure bootloader
*
* Copyright ©2016 <NAME> <dmitrystu[at]gmail[dot]com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.or... |
/* Copyright -2004 The Apache Software Foundation
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 ag... |
/*** For more information please refer to files in the COPYRIGHT directory ***/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <assert.h>
#include "irodsFs.h"
#include "iFuseLib.h"
#include "iFuseOper.h"
#include "hashtable.h"
#include "list.h"
#include "iFuseLib.Lock.h"
fileCache... |
/*
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 <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include "debug.h"
#ifdef __WIN32
static int win32_getseed... |
/****************************************************************************
*
* ftccmap.c
*
* FreeType CharMap cache (body)
*
* Copyright (C) 2000-2021 by
* <NAME>, <NAME>, and <NAME>.
*
* This file is part of the FreeType project, and may only be used,
* modified, and distributed under the terms of the F... |
/*
* Copyright (c) 2004, <NAME>.. All rights reserved.
* Created by: <NAME>
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that... |
/*
* Copyright 2017 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
product: Pins v4.0
processor: MIMX8MQ6xxxJZ
package_id: MIMX8MQ6DVAJZ
mcu_data: ksdk2_0
processor_version: 0.0.0
* BE CAREFU... |
#include <p32xxxx.h>
#include <system.h> // System setup
#include <const.h> // MIPS32
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
#include <newlib.h>
#include <errno.h>
// Config bits
#include <configBits.h>
// Drivers for HW
#include <GPIODrv.h>
#include <UARTDrv.h>
#in... |
/*-
* Copyright (c) 1993, <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 ... |
/*
* Based on AVR446 application note code
*/
#include "speed_cntr.h"
#include <stdlib.h>
#include "hw_timer.h"
#include "common/cs_dbg.h"
/*
* T_FREQ Frequency of timer in [Hz].
* User must define with current frequency.
*/
#ifndef T_FREQ
#error T_FREQ not defined!
#endif
// Maths constants. To simplify maths ... |
/*
* Copyright (c) 2011-2021, <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 conditi... |
/****************************************************************************
* tools/convert-comments.c
*
* Copyright (C) 2018 <NAME>. All rights reserved.
* Author: <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the follow... |
#include "manifest.h"
#include <errno.h>
#include "algorithm.h"
#include "common.h"
#include "log.h"
#include "thread_var.h"
#include "asn1/decode.h"
#include "asn1/oid.h"
#include "asn1/asn1c/GeneralizedTime.h"
#include "asn1/asn1c/Manifest.h"
#include "crypto/hash.h"
#include "object/certificate.h"
#include "object... |
/*
* Authors: <NAME> <<EMAIL>>
*
* $Id: http_head.c,v 1.3 2006/12/19 08:33:16 hochstenbach Exp $
*
*/
#include "http_head.h"
/* This function returns a pointer to a struct head_struct or
* NULL on error.
*/
HS *init_header(void) {
HS *hs;
hs = (struct head_struct *) malloc(sizeof(HS));
if (hs == NULL) {... |
#include <assimp/cimport.h> // Plain-C interface
#include <assimp/scene.h> // Output data structure
#include <assimp/postprocess.h> // Post processing flags
#include "ap_utils.h"
#include "ap_mesh.h"
#include "ap_shader.h"
#include "ap_texture.h"
#include "ap_vertex.h"
/**
* private, setup mesh, g... |
/**
* Core operations codes of the virtual machine
* (distinct from the methods of built-in classes in builtins.c)
*/
#include "vm_ops.h"
#include "vm_state.h"
#include "builtins.h" // For literals lit_true, lit_false, nothing
#include "logger.h"
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
/* Push ... |
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-11-04 Chris.Zhong the first version
*/
#include <rtthread.h>
#include <rtdevice.h>
#include <string.h>
#include <stdlib.h>
#include "hal_... |
/// MentOS, The Mentoring Operating system project
/// @file hashmap.c
/// @brief
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "klib/hashmap.h"
#include "assert.h"
#include "string.h"
#include "mem/slab.h"
/// @brief Stores inform... |
// ///////////// //
// Dos + Harness //
// ///////////// //
void dos_enable_can_transceiver(uint8_t transceiver, bool enabled) {
switch (transceiver){
case 1U:
set_gpio_output(GPIOC, 1, !enabled);
break;
case 2U:
set_gpio_output(GPIOC, 13, !enabled);
break;
case 3U:
set_gpio... |
/*
* Copyright (C) 2013-2020 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
* Copyright (C) 2010-2013 Sourcefire, Inc.
*
* Authors: aCaB <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* ... |
/**
******************************************************************************
* @file Examples_LL/DMA/DMA_CopyFromFlashToMemory_Init/Src/main.c
* @author MCD Application Team
* @brief This example describes how to use a DMA channel to transfer
* a word data buffer from FLASH memory to embe... |
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2012, <NAME> <<EMAIL>>
*
* Based on flea3.c and mx35pdk.c
*/
#include <common.h>
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/iomux-mx35.h>
#include <... |
/* $Id: rtunes.c,v 1.12 2008/02/10 11:51:02 mbalmer Exp $ */
/*
* Copyright (c) 2006-2008 <NAME> <<EMAIL>>
* Copyright (c) 2006-2008 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright noti... |
/*
* Loan payment optimization via genetic algorithms
*
* Assumptions:
* - You have > 1 loan to pay off (not useful for one loan)
* - You want to optimize the total amount paid over the course of the loan
* - Montly payments are a fixed amount
*
* <NAME> <<EMAIL>>
*
*/
#include <stdio.h>
#include <stdli... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <strings.h>
/*Load a file into RAM
* should be zero terminated
*/
int load_file(const char *fn, uint8_t **data)
{
if (fn==NULL) return -1;
FILE *f=fopen(fn, "r");
if (f==NULL) return -1;
fseek(f, 0L, SEEK_END);
long fs = ft... |
/* Copyright (c) 2003-2004, <NAME>
* Copyright (c) 2004-2006, <NAME>, <NAME>.
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file restrict.c
* \brief Drop privileges from the current process.
**/
#include "orconfig.h"
#include "lib/process/restrict.h"
#incl... |
/*
Copyright (c) 2008-2013
<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, modify, merge, publish, dist... |
/*
* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
* 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.
*
* This program is distributed in the hope that it woul... |
/*
* Copyright (c) 2006-2007 Chelsio, Inc. All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the GNU
* General Public License (GPL) Version 2, available from the file
* COPYING in the main directory of this source ... |
#include <math.h>
#include "stm32f10x.h"
#include "bit.h"
#include "mpu6050.h"
#include "motor.h"
#define Kp 100.0f //比例增益支配率(常量)
#define Ki 0.002f //积分增益支配率
#define halfT 0.001f //采样周期的一半
float q0 = 1, q1 = 0, q2 = 0, q3 = 0; //Quaternion
float exInt = 0, eyInt = 0, ezInt = 0;
float Ya... |
/*
flash_io.c - low level flash routines for Palm III
(modified version for osflash)
This code is free. Written for use with gcc/pilrc. It is not optimized
for speed, but for readability.
BE VERY, VERY, VERY CAREFUL WITH THIS. YOU MIGHT ERASE THE OPERATING SYSTEM
OF YOUR PALM CAUSING IT TO B... |
/**
* Copyright 2020 Huawei Technologies 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 law... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#include <stdio.h>
#include "quantized_utils.h"
// All values generated from Seedot on Wider Regression dataset.
// By default, all tests run without using bit-shifting operations.
// Function for matching the predicted an... |
//
// es20_chapter00_sample00.c
// OpenGL_ES_20
//
// Created by <NAME> on 2013/02/04.
// Copyright (c) 2013年 <NAME>. All rights reserved.
//
#include <GLES2/gl2.h>
#include "../../support/support.h"
typedef struct {
// レンダリング用シェーダープログラム
GLuint shader_program;
// 位置情報属性
GLint attr_pos;
// UV... |
/*
Copyright (c) 2009-2010 <NAME> (kometbomb)
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, publi... |
/*
* Copyright (C) 2015 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <i2c.h>
#include <miiphy.h>
#include <netdev.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include "../drivers/ddr/marvell/a38x/ddr3_a38x_topology.h"
#include <../serdes/a38... |
/* $OpenBSD: if_fpa.c,v 1.22 2003/12/29 23:06:55 brad Exp $ */
/* $NetBSD: if_fpa.c,v 1.15 1996/10/21 22:56:40 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1996 <NAME> <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that ... |
/* handle.c
Functions for maintaining handles on objects. */
/*
* Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distr... |
/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996
* 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: (1) source code distributions
* retain the above copyright notice and this paragr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.