text stringlengths 3.12k 18.7k |
|---|
/*******************************************************************************
Copyright (c) 2015-2019 NVIDIA 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 ... |
#include <stdint.h>
#include <ft2build.h>
#include <freetype.h>
#include <ftglyph.h>
#include <stdio.h>
#define LOGD printf
#define LOGE LOGD
#define NO_ERROR 0
#define NO_MEMORY 2
#define SUCCEED(rc) ((rc) == NO_ERROR)
#define ISNULL(ptr) ((ptr) == NULL)
#define FONT_PIXEL_SIZE 50
#define MAX_LINE... |
/*
mailsnarf.c
Sniff mail on a network, saving messages in Berkeley mbox format.
Copyright (c) 1999 <NAME> <<EMAIL>>
$Id: mailsnarf.c,v 1.37 2000/11/19 19:39:41 dugsong Exp $
*/
#include "config.h"
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#incl... |
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define ERROR(fmt, ...) fprintf(stderr, \
"ERROR: %s():%d: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
#... |
/*
* Copyright (c) 2018, UNISOC Incorporated
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <logging/log.h>
#define LOG_MODULE_NAME wifi_uwp
#define LOG_LEVEL CONFIG_WIFI_LOG_LEVEL
LOG_MODULE_DECLARE(LOG_MODULE_NAME);
#include <zephyr.h>
#include <string.h>
#include <sipc.h>
#include <sblock.h>
#include <net... |
/* 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 ... |
/*****************************************************************************
*
* \file
*
* \brief Accelerometer example driver for AVR32 UC3.
*
* This file provides an example for the ADC + Accelerometer on AVR32 UC3 devices.
*
* Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
*
* \a... |
// PA5 connected to DC motor interface
#include "PLL.h"
#define SYSCTL_RCGC2_R (*((volatile unsigned long *)0x400FE108))
#define GPIO_PORTF_LOCK_R (*((volatile unsigned long *)0x40025520))
#define GPIO_LOCK_KEY 0x4C4F434B // Unlocks the GPIO_CR register
#define GPIO_PORTA_DATA_R (*((vo... |
// A simple shell for doing bit-oriented operations
// COMP1521 17s2 Week 02 Lab
// Written by <NAME>, July 2017
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include "Bits.h"
#define DEFAULT_NBITS 64
#define MAX_LINE 500
#define bad2Args(a,b,c,d) ((c = o... |
#pragma once
#include <errno.h>
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "../math/tinymt/tinymt32.h"
// TEMPORARY HACK!!
struct p_dev
{
int property[32];
};
struct p_team
{
p_dev_t *dev; // pointer to the associated device structure
int size; // number of member nodes... |
#include "EM.h"
#include "bam_write.h"
#include "argument.h"
#include "log.h"
void directory_exist(const char* sFilePath)
{
struct stat oBuffer;
if (stat(sFilePath, &oBuffer) == 0)
if (oBuffer.st_mode & S_IFDIR)
return;
if (mkdir(sFilePath, 0755) == -1)
_error("Cannot create output directory: %s", sFilePat... |
#include <efi.h>
#include <efilib.h>
#include <string.h>
#include <stdint.h>
#include "tpm.h"
extern UINT8 in_protocol;
#define perror(fmt, ...) ({ \
UINTN __perror_ret = 0; \
if (!in_protocol) \
_... |
#include <linux/fscrypt.h>
#include <sys/random.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
int get_key_status(int fd, const unsigned char *identifier)
{
... |
#include "ArbreQuat.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "commun.h"
// Permet de rechercher le minimum et le maximum des x et des y
void chaine_coord_min_max(Chaines *C, double *xmin, double *ymin, double *xmax, double *ymax) {
// Teste si la memoire est bien allouer avant l'appel... |
#include "includes.h"
#include "usart.h"
#define TASK_START_PRIO 2u
#define TASK_START_STK_SIZE 128u
#define TASK_FLOAT_CALC_PRIO 4u
#define TASK_FLOAT_CALC_STK_SIZE 512u
#define TASK_LED0_PRIO 5u
#define TASK_LED0_STK_SIZE 128u
#define TASK_LED1_PRIO 6u
#define TASK_LED1_STK_SIZE 128u
#define TASK_KEY_PRIO 10u
#defi... |
/**
* FanController
* MSE 352 Fall 2018 Course Project
* TM4C123GH6PM
* License in LICENSE
* JK.EE
*/
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_gpio.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_ints.h"
#include "driverlib/sysctl.h"
#include "driverlib/debug.h"
#include ... |
/*
*
* Embedded Linux library
*
* Copyright (C) 2011-2014 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of... |
/********************************************************************************
* ___ _ _ _
* / _ \ _ __ ___| |_| |__ (_)_ __ __ __
* | | | | '_ \ / _ \ __| '_ \| | '_ \\ \/ /
* | |_| | | | | __/ |_| | | | | | | |> <
* \___/|_| |_|\___|\__|_| |_|_|_| |_/_/\_\
*
*************... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include"kiwi_decrypt_dex.h"
unsigned char *ptr_write_position = NULL;
const int MOD_ADLER = 65521;
unsigned char digest[kSHA1DigestLen];
int main()
{
FILE *dex_file = fopen("classes.dex", "rb");
fseek(dex_file, 0, 2);
size_t original_dex_length ... |
//BSD 3-Clause License
//
//Copyright (c) 2018, jadeblaquiere
//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
//... |
/**
******************************************************************************
* @file leds.c
* @author <EMAIL>
* @brief LED driver module for left or right LEDS
* Define symbol LEDS_R to compile Right LEDS and LEDS_L to compile
* for left LEDS
***************************... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with San... |
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include <osbind.h>
#include "const.h"
#include "linea.h"
#include "video.h"
#include "matrix.h"
#include "utils.h"
#include "trigo.h"
// Define constant =================================================================================
#define GRID_SIZE 1... |
/*
* minimal_kex_oqs.c
*
* Minimal example of a Diffie-Hellman post-quantum key exchange method
* implemented in liboqs.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oqs/oqs.h>
/* Cleaning up memory etc */
void cleanup(uint8_t *alice_msg, size_t alice_msg_len, uint8_t *alice_key,
... |
#include "sd.h"
#include "mm.h"
#include "uart.h"
#include "error.h"
#include "vfs.h"
typedef struct{
unsigned int partition_beg;
unsigned int sector_num, sector_size;
unsigned int table_beg, table_num, table_size;
unsigned int data_beg;
unsigned int* table;
unsigned int* dirty;
}MetaData;
typedef struct{
unsi... |
/** @file roman_binsearch.c
* Main source file
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libintl.h>
#include <locale.h>
/*! \def _(STRING)
\brief A macro to translate programm output.
*/
#define _(STRING) gettext(STRING)
/*! \def N_(msgid)
\brief A macro to translate --help... |
/****************************************************************************
* hn70ap/apps/update/update_serial.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 ... |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//This function takes six values of (both I & Q of early, prompt, and late) tracking correlator outputs and
//provide NCO updates (Carrier freq & phase, three code delays) for the next iteration for the s... |
#include <math.h>
#include <assert.h>
#include <stdio.h>
#include <mpi.h>
#include <time.h>
#include "../include/Logic.h"
static const int QUANTITY_OF_HALF_TURN = 2;
static const double K = 1;
#define MAX_QUANTITY_OF_STEPS 1000000
#define LENGTH 6 // Length of string which is contain number of file, including '\0'
d... |
#include "pointer.c"
#include "key_definitions.c"
#include "options.c"
int hsquare = 0;
int vsquare = 0;
int click_flag = 0;
int click_scroll_flag = 0;
void match_key (GdkEventKey * event){
int hoffset = hstep/2;
int voffset = vstep/2;
int hrelative = hstep/COLUMNS;
int vrelative = vstep/ROWS;
int hrel_off... |
/*
* Copyright 2017-2019 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "board.h"
#include "fsl_capt.h"
#include "fsl_acomp.h"
#include "fsl_debug_console.h"
#include "pin_mux.h"
#include <stdbool.h>
#include "fsl_power.h"
#include "fsl_gpio.h"
/*********************************... |
/*
* Copyright 2018-2019 OneCube
*
* 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) 1998 - 2008 <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 retain the above copyright
* notice, this lis... |
/*
This program was written for a book by <NAME> called HAPPY:/ACRO.
There is a delightful retro 1996 style website that was made in 2017 to
promote the book: http://www.happyacro.com.
Documentation for this program is available here:
https://github.com/happyacro/happyacro-dos
Copyright (c) 2017, Coder Cowboy, L... |
/* -*- mode: C -*- */
/*
IGraph library.
Copyright (C) 2006-2012 <NAME> <<EMAIL>>
334 Harvard street, Cambridge, MA 02139 USA
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; e... |
/*
* Author: <NAME>, Trebon, Czech Republic, <EMAIL>
* 07/2020
*/
#include "ds18b20.h"
struct T{
uint8_t number; //1-255
uint8_t *device_address;//=rom =is 64bit sensor address
uint8_t devaddr[6];
uint8_t crc;
char char_address[64]; //address of device in hexa chars //only 6 device-specific bytes
bool... |
//
// -----------------------------------------------------------------------------
// frontend-server.c
// -----------------------------------------------------------------------------
//
// <NAME> © 2020
//
#include <stdio.h> // printf, sscanf
#include <stdlib.h> // EXIT_FAILURE
#include <stri... |
/* Solution to Compulsory Assignment 2
* Parallel and Distributed Programming
* Spring 2017
* Authors: <NAME> and <NAME>
* Based on supplied reference
*/
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>
#include <sys/time.h>
//#define WRITE_TO_FILE
... |
/*
* constructors.c : Constructors for various data structures.
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional... |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <unistd.h>
#include <dirent.h>
#include <getopt.h>
#include <sys/stat.h>
#include <ebookinfo/ebookinfo.h>
#include "kmslogging.h"
#include "kobo.h"
#define FLAG_SHOW_METADATA 0x0001
typedef BOOL (*FileFunc) (co... |
#include "vce.h"
#include "vcecommon.h"
#include "osdep.h"
#include "util.h"
static void * (*vce_internal_malloc_func)(size_t) = malloc;
static void * (*vce_internal_realloc_func)(void*,size_t) = realloc;
void (*vce_internal_free_func)(void*) = free;
static int getbinhex( int c ) {
switch(c){
case '0': retur... |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ZMQ input plugin for Fluent Bit
* ===============================
* Copyright (C) 2019 The Fluent Bit Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complia... |
#include <stdio.h>
#include <aos/aos.h>
#include <aos/aos_rpc.h>
#include <aos/urpc/server.h>
#include <aos/urpc/default_opcodes.h>
#include <omap44xx_map.h>
#include <netutil/user_serial.h>
#include <aos/inthandler.h>
#include "slip_parser.h"
#include "icmp.h"
#include "udp_parser.h"
#include "lrpc_server.h"
#include ... |
/*
* Generated 06/05/2017 21:57:10
*/
// All code under test must be linked into the Unit Test bundle
// Test Macros:
// TINYTEST_ASSERT(condition)
// TINYTEST_ASSERT_MSG(condition,msg)
// TINYTEST_EQUAL(expected, actual)
// TINYTEST_EQUAL_MSG(expected, actual, msg)
// TINY... |
/*
* "$Id$"
*
* Common PCL functions for CUPS.
*
* Copyright 2007 by Apple Inc.
* Copyright 1993-2005 by Easy Software Products
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
* law. Distribution and use right... |
/* file: am_sevensegment.c */
#include "am_sevensegment.h"
#define PIN(X) (1ul << X)
void sevensegment_init(struct SevenSegment* ss,
bool a, bool b, bool c, bool d,
bool e, bool f, bool g, bool h)
{
ss->a = a;
ss->b = b;
ss->c = c;
ss->d = d;
ss->e = e;
ss->f = f;
ss->g = g;
ss->h = h;
}
... |
/*! \file bcma_testcase_reg_reset.c
*
* Test case for register reset.
*/
/*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
*
* Copyright 2007-2020 Broadcom Inc. All rights reserved.
*/
#include <bsl/bsl.h>
#include <shr/shr_... |
/*******************************************************************
*
* Copyright 2006
* Broadcom Corporation
* 16215 Al<NAME>way
* PO Box 57013
* Irvine CA 92619-7013
*
* Broadcom provides the current code only to licensees who
* may have the non-exclusive right to use or modify this
* code according to the... |
/* see LICENSE for license details */
#include "ui.h"
void nc_init (void)
{
/* start ncurses window */
initscr();
/* do not buffer characters until newline */
cbreak();
/* do not echo input to the console */
noecho();
/* save the tty settings so they can be restored */
savetty();... |
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/epoll.h>
#include "uws_memory.h"
#include "uws_config.h"
#include "uws_router.h"
#include "uws_header.h"
#include "uws_utils.h"
#include "uws_datatype.h"
#include "uws_status.h"
extern int errno;
int read_data(pConnInfo conn_info)
{
... |
/*
* @(#)xti.h 4.1 7/2/90 XTI.H
*
*
*/
/*
* History:
*
* 03/07/88 mcmenemy Update to Revision 2 (24-feb-88) at GRENOBLE
* 04/12/88 mcmenemy Update for BL2
* 08/25/88 mcmenemy Update to Final Draft for XPG 3
* 12/02/88 mcmenemy Fix error name
* 07/14/89 mcmenemy Fix typo in iso struct... |
/* del_win.c */
void tw_del_win(win_t **win);
/* init_double.c */
void tw_init_double(tw_panel_t *panel, int line, int col, double min, double max, char *prompt, char *help, double *double_ptr);
/* init_enum.c */
void tw_init_enum(tw_panel_t *panel, int line, int col, int len, char *list[], char *prompt, char *help, ch... |
/*
* Copyright (c) 2021, AT&T Intellectual Property. All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-only
*/
#include <values.h>
#include <string.h>
#include "util.h"
#include "npf/cgnat/alg/alg_rc.h"
#include "npf/cgnat/alg/sip/csip_parse_utils.h"
#include "npf/bstr.h"
/*
* This file contains a set... |
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2012 CaH4e3
* Copyright (C) 2002 Xodnizel
*
* 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 Foundati... |
#include "device/device_secrets"
#include "constants.h"
#include <stdio.h>
#include <stdlib.h>
#include <monocypher.h>
#include <string.h>
#define CHUNK_SIZE 4096
struct metadata {
uint8_t sharedInfo[MAX_USERS][48]; // [64-Bytes of Users to share] [32 byte key + room for 16 byte MAC]
uint8_t owner_id; // 1-Byte
ui... |
/*
* Brief: Manages all the interrupts into the system from external pins
* i.e. all signals from RC radio and hall effect sensors. Outputs
* to motor drivers (ESCs) and servo
*
* Decodes PPM signals from RC radio with TIM2 and EXTI0, 1, 6, 7
* Hall effect sensors used are the AH3761.
*
* ... |
/*
Conundrum 64: Commodore 64 Emulator
MIT License
Copyright (c) 2017
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,... |
// File: vssim_config_manager.c
// Date: 2014. 12. 03.
// Author: <NAME> (<EMAIL>)
// Copyright(c)2014
// Hanyang University, Seoul, Korea
// Embedded Software Systems Laboratory. All right reserved
#include "common.h"
static void parse_ssd_params(struct ssdconf *sc, FILE *cf)
{
int r;
char *curli... |
//<NAME>
#include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
#include "image.h"
void init();
void draw(void);
GLuint load_GLtextures();
void update(int value);
void handle_resize(int width, int height);
void handle_keypress(unsigned char key, int x, int y);
GLuint texture_id;
float _angle = 30;
float _camera_... |
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.0.0
* svn version: exported
* Options: --check-global -s 1226
* Seed: 1226
*/
#include "random_runtime.h"
long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
volatile int32_t g_2 = 0L;/* VOLATILE G... |
/* tphilo.c
* <NAME>
*
* CS360 - <NAME>, Ph.D.
* Dining philosophers problem solved using pthreads
* using globals instead of shared memory, with no semaphores for this problem
* instead solved with pthread_t and pthread_mutex_t.
*/
/* includes */
#define _GNU_SOURCE /* for sys/ipc.h */
#include <sys/types.h>... |
#include <bcm2835.h>
#include "spi_RFID.h"
#include <stdio.h>
void RFID_init(){
//SPI
bcm2835_spi_begin();
bcm2835_spi_setBitOrder(BCM2835_SPI_BIT_ORDER_MSBFIRST);
bcm2835_spi_setDataMode(BCM2835_SPI_MODE0);
bcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_65536);
bcm2835_spi_chipSelect(BCM2835_... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <slalib.h>
#include <sofa.h>
#include "actpol/astro.h"
#include "actpol/constants.h"
#include "actpol/iers_bulletin_a.h"
#include "actpol/math.h"
#include "actpol/util.h"
#include "actpol/vec3.h"
void
actpol_aberration(const double u[3], const doub... |
/****************************************************************************/
/* */
/* This file is part of CONCORDE */
/* */
/* ... |
/**
* @file textfilecontent.c
* @brief textfilecontent probe
* @author "<NAME>" <<EMAIL>>
*
* 2010/06/13 <EMAIL>
* This probe is able to process a textfilecontent_object as defined in OVAL 5.4 and 5.5.
*
*/
/*
* Copyright 2010 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* This librar... |
/**
****************************************************************************************
*
* @file main.c
*
* @brief Battery level example for DA14580/581 SDK
*
* Copyright (C) 2012. Dialog Semiconductor Ltd, unpublished work. This computer
* program includes Confidential, Proprietary Information and is a ... |
// Copyright 2014-2015 <NAME>
// MIT licensed (see LICENSE for details)
#include <assert.h>
#include <openssl/sha.h>
#include "../deps/smhasher/MurmurHash3.h"
#include "util/pass.h"
#include "StrongLink.h"
#include "SLNDB.h"
#define SEARCH_DIST 16
#define EXPIRE_TIMEOUT (1000 * 60 * 4)
#define SWEEP_DELAY (1000 * 60... |
// Copyright (c) 2018
// Author: <NAME>
#include "ngx_http_ndg_thread_module.h"
typedef struct {
ngx_buf_t *buf;
ngx_int_t rc;
ngx_http_request_t *r;
ngx_thread_task_t *task;
} ngx_http_ndg_thread_task_ctx_t;
static void *ngx_http_ndg_thread_create_loc_conf(ngx_conf_t* cf);
... |
/*
* $Id: readblenentry.c 40641 2011-09-28 05:53:40Z campbellbarton $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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 ... |
/* Copyright (c) 2017-2021, <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... |
/**
* Copyright (c) 2016 - 2019, Nordic Semiconductor ASA
*
* 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 no... |
/*
* SCSI functions used by both the initiator and the target code.
*/
#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <asm/unaligned.h>
#include <scsi/scsi_common.h>
/* NB: These are exposed through /proc/scsi/scsi and form part of the ABI.
* You may no... |
/**************************************************************************
*
* Copyright 2007 VMware, Inc.
* 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 w... |
#include "encoder.h"
void handle_destroy_state(UnifexEnv *env, State *state) {
UNIFEX_UNUSED(env);
if (state->codec_ctx != NULL) {
avcodec_free_context(&state->codec_ctx);
}
}
UNIFEX_TERM create(UnifexEnv *env, int width, int height, char *pix_fmt,
char *preset, char *profile, int framer... |
/*
* Copyright (C) 2009-2012 the libgit2 contributors
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#include "common.h"
#include "commit.h"
#include "tag.h"
#include "config.h"
#include "refspec.h"
#include "git2/br... |
/*
*
* LINEAR SUPPORT VECTOR MACHINE WITH SEQUENTIAL MINIMAL OPTIMIZATION
*
* Reference:
*
* https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-034-artificial-intelligence-fall-2010/tutorials/MIT6_034F10_tutor05.pdf
* https://youtu.be/_PwhiWxHK... |
//------------------------------------------------------------------------------
//
// PROGRAM: Matrix Multiplication driver
//
// PURPOSE: This is a driver program to test various ways of computing
// the product:
//
// C = A * B
//
// A and B are set to constant matrices so we
//... |
/* getsta.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__14 = 14;
static integer c__6 = 6;
/* $Procedure GETSTA ( Compute/not-compute states ) */
/* Subro... |
/*
* Copyright (C) <NAME> <<EMAIL>>
*
* Based on sun4i_layer.h, which is:
* Copyright (C) 2015 Free Electrons
* Copyright (C) 2015 NextThing Co
*
* <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
* publi... |
#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... |
/* -----------------------------------------------------------------
* Programmer(s): <NAME> @ LLNL
* -----------------------------------------------------------------
* Example problem:
*
* The following is a simple example problem, with the coding
* needed for its solution by the accelerated fixed point solver... |
//Airline reservation system
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdbool.h>
//declaring some global variables
int day1,month1,year1,day,month,year;
int monthdays[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int start,des;
char s[100]="bruh";
char d[100]="b... |
/**
* @file tetris.c
* @author <NAME> (<EMAIL>)
* @author <NAME> (<EMAIL>)
* @date 2016
* @copyright For copyright and licensing, see file COPYING
*
* The area of the tetris play-field is 10x16 squares in the original game.
* We will use the same width in our version but the height will be double.
* Each x and ... |
/*====================================================================*
- Copyright (C) 2001 Leptonica. 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 c... |
/*
* Copyright (c) 2018-2022 <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, merg... |
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be us... |
#include <stdlib.h>
#include <stdio.h>
#include <sys/io.h>
#include <stdint.h>
#define CMOS_PORT_ADDRESS 0x74
#define CMOS_PORT_DATA 0x75
#define CONFADD 0xCF8
#define CONFDATA 0xCFC
void print_bin(uint32_t val);
uint8_t read_cmos_reg(uint8_t val) {
outb(val, CMOS_PORT_ADDRESS);
return inb(CMOS_PORT_D... |
#include <math.h>
#include <mpi.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
/* ************************************************************************ */
/* helper function: freeMatrix: frees memory of the matrix */
/* **************************... |
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 2001
* <NAME> <<EMAIL>>. All rights reserved.
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> of the Numerical Aerospace S... |
#include <stdint.h>
#include <stdio.h>
#include <memory.h>
#define SHA256_BLOCK_SIZE 64
struct sha256_ctx
{
uint32_t sz;
uint8_t buf[128];
uint32_t h[8];
};
#define SHA256_DIGEST_SIZE 32
#define SHA256_CTX_SIZE sizeof(struct sha256_ctx)
void cryptonite_sha256_init(struct sha256_ctx *ctx);
void cryptonite_sha25... |
#include "rng.h"
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h> // void srand(unsigned int seed); int rand(void); RAND_MAX
#include <string.h> // void *memset(void *s, int c, size_t n);
#include <time.h> // struct timespec; clock_gettime(...); CLOCK_REALTIME
#include "aes256.h"
#include "qc_ldpc_paramete... |
/*
* md2.c : MD2 hash algorithm.
*
* Part of the Python Cryptography Toolkit
*
* Originally written by: <NAME>
*
* ===================================================================
* The contents of this file are dedicated to the public domain. To
* the extent that dedication to the public domain is not a... |
/*
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file ... |
/*
* Copyright (c) 1989, 1990, 1991, 1993, 1994, 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 ... |
/*******************************************************************************
* Copyright (C) Marvell International Ltd. and its affiliates
*
* This software file (the "File") is owned and distributed by Marvell
* International Ltd. and/or its affiliates ("Marvell") under the following
* alternative licensing t... |
/*------------------------------------------------------------------------
ADUC824.H
Header file for Analog Devices ADuC824 controller.
Rev. 3.0 02nd July 2007
Copyright (c) 1999 - 2007 Keil - An ARM Company
All rights reserved.
------------------------------------------------------------------------*/
/* BYTE ... |
#include <inttypes.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
//#include <avr/wdt.h>
#include <avr/sleep.h>
#include "thermistor.h"
#include "twi.h"
#define FIRMWARE_VERSION 0x25 //2.5
#define LED_K PA1
#define LED_A PA0
#define LED_DDR DDRA
#define LED_PORT PORT... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2021, <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... |
/* glpnet05.c (Goldfarb's maximum flow problem generator) */
/***********************************************************************
* This code is part of GLPK (GNU Linear Programming Kit).
*
* This code is a modified version of the program RMFGEN, a maxflow
* problem generator developed by D.Goldfarb and M.Grigo... |
#include "qvk/qvk.h"
#include "pipe/graph.h"
#include "pipe/graph-io.h"
#include "pipe/global.h"
#include "pipe/modules/api.h"
#include "db/thumbnails.h"
#include "core/log.h"
#include "core/signal.h"
#include "core/version.h"
#include "gui/gui.h"
#include "gui/render.h"
#include "gui/view.h"
#include "db/db.h"
#defi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.