text stringlengths 3.08k 10.5k |
|---|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "memory.h"
#include "cpu.h"
#include "dict.h"
unsigned char memory[MAX_MEM]; // 32K bytes
void memory_store(int address, unsigned char value) {
memory[address] = value;
}
void memory_store_word(int address, unsigned int value) {
memory[addre... |
/*
* librd - Rapid Development C library
*
* Copyright (c) 2012-2013, <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... |
/*-*****************************************************************************
MMBasic for Linux (MMB4L)
cmd_poke.c
Copyright 2021-2022 <NAME>, <NAME> and <NAME>.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redi... |
/*
* (C) Copyright 2002
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* <NAME> <<EMAIL>>
*
* (C) Copyright 2002
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* <NAME> <<EMAIL>>
*
* (C) Copyright 2002
* <NAME>, DENX Software Engineering, <<EMAIL>>
*
* (C) Copyright 2009
* <NAME>, Emcraft Systems L... |
/*
* Copyright 2016, Intel Corporation
*
* 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 the f... |
/******************************************************************************
* Copyright (c) Huawei Technologies Co., Ltd. 2019. All rights reserved.
* iSulad licensed under the Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v... |
#include "ceot.h"
#ifndef CEOT_H_
#define CEOT_H_
#define R2D 57.295779513082320876798154814105
#define D2R 0.017453292519943295769236907684886
#define M2PI M_PI * 2
/* Arcseconds to radians */
#define DAS2R (4.848136811095359935899141e-6)
/* Seconds of time to radians */
#define DS2R (7.272205216643039903848712e-5)
... |
/*
*
* Copyright (c) 2017 <NAME>, Inc.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
/*
No copyright is claimed in the United States under Title 17, U.S. Code.
All Other 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 limitat... |
/*
* MIT License
*
* Copyright (c) 2020 <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, pu... |
#include <xc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "lcd.h"
#include "util.h"
struct DateTime
{
unsigned char seconds;
unsigned char minutes;
unsigned char hours;
unsigned char weekday;
unsigned char day;
unsigned char month;
unsigned char year;
}dt;
void rtc... |
/*----------------------------------------------------------------------------
* Copyright (c) <2016-2019>, <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... |
#include "clar_libgit2.h"
#include "posix.h"
#include "reset_helpers.h"
#include "path.h"
static git_repository *_repo;
static git_object *_target;
static git_strarray _pathspecs;
static git_index *_index;
static void initialize(const char *repo_name)
{
_repo = cl_git_sandbox_init(repo_name);
cl_git_pass(git_reposi... |
/*
* Author: <NAME> <<EMAIL>>
*
* Copyright (c) 2014 Kaprica Security, Inc.
*
* 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 righ... |
/*
* Copyright (C) 2011 <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... |
/*
* Copyright (c) 1999 <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 and ... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/*
* stretchboardPeripherals.c
*
* Created on: 10.11.2018
* Author: jonathan
*/
#include "stretchboardPeripherals.h"
int8_t bassIntensity;
int8_t intensityOffset;
float intensitySlope;
// LED PWM configuration variables
static ledc_timer_config_t ledc_timer =
{
.duty_resolution = LEDC_TIMER_RESOLUTION... |
/* Copyright 2015 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 la... |
// Created by cgo -cdefs - DO NOT EDIT
// cgo -cdefs defs2.go
enum {
PROT_NONE = 0x0,
PROT_READ = 0x1,
PROT_WRITE = 0x2,
PROT_EXEC = 0x4,
MAP_ANON = 0x20,
MAP_PRIVATE = 0x2,
MAP_FIXED = 0x10,
MADV_DONTNEED = 0x4,
SA_RESTART = 0x10000000,
SA_ONSTACK = 0x8000000,
SA_RESTORER = 0x4000000,
SA_SIGINFO = 0x4... |
/**
******************************************************************************
* @file spi.c
* @brief This file provides code for the configuration
* of the SPI instances.
******************************************************************************
* @attention
*
* <h2><center>©... |
/* =============================================================================
* Copyright (c) Texas Instruments Incorporated 2014
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions o... |
/*
* ngtcp2
*
* Copyright (c) 2017 ngtcp2 contributors
*
* 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... |
// <NAME>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void roots_of_equation(double, double, double);
void pseudo_sort(double, double, double);
void prime(int);
int eukleides(int, int);
int main(int argc, char *argv[])
{
int option;
double a, b, c; // Do [1] oraz [2]
int... |
#include "sys/alt_stdio.h"
#include "altera_avalon_fifo_regs.h"
#include "altera_avalon_fifo_util.h"
#include "sys/alt_irq.h"
#include <stdio.h>
#include <stdint.h>
#include "packet_transaction_util.h"
#include <unistd.h>
#define ALMOST_EMPTY 2
#define ALMOST_FULL 11
volatile int input_fifo_wrclk_irq_event;... |
/* tv.c: draw vertical lines */
# include "t.h"
void
drawvert(int start, int end, int c, int lwid)
{
char *exb = 0, *ext = 0;
int tp = 0, sl, ln, pos, epb, ept, vm;
end++;
vm = 'v';
/* note: nr 35 has value of 1m outside of linesize */
while (instead[end])
end++;
for (ln = 0; ln < lwid; ln++) {
epb = e... |
#include <special_includes/sys/types.h>
#include <special_includes/sys/param.h>
#include <special_includes/sys/mbuf.h>
#include <special_includes/sys/malloc.h>
#include <special_includes/sys/sockio.h>
#include <lib/libkern/libkern.h>
#include <netbsd/net/if.h>
#include <netbsd/net/if_arp.h>
#include <netbsd/net/bpf.h>
... |
/*
* 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 use... |
/* this test is used to test refill and flush with multiple threads.
* The idea is that each thread starts from "id" to issue req_cnt
* requests.
*/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include "ncac-interface.h"
#include "internal.h"
#include "trove.h"
#include "trove-init.c"
TROVE_coll... |
/*++
Copyright (c) 1998 Microsoft Corporation
Module Name:
ndis.c - DbgExtension Structure information specific to NDIS.SYS
Abstract:
Revision History:
Who When What
-------- -------- ----------------------------------------------
josephj 04-26-98 Created
Notes:... |
/**
* \file
*
* \brief Graphic service settings for the LCD panel using the ILI93XX
* display controller
*
* This files includes the correct header files for the graphics service
*
* Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
*
* \asf_license_start
*
* \page License
*
* Subjec... |
/*
* 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... |
/*
Copyright (c) 2005-2008, <NAME>
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 DISCLAIMS ALL
WARRANTIES... |
/*-
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include "wt_internal.h"
/*
* __sweep --
* Close unused dhandles on the connection dhandle list.
*/
static int
__sweep(WT_SESSION_IMPL *session)
{
WT_CONNECTION_IMPL *conn;
WT_DA... |
//booksave.c -- Save the contents of the structure in the file
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define MAXTITL 40
#define MAXAUTL 40
#define MAXBKS 10 //maximum number of books
typedef struct book { //set up book template
char title[MAXTITL], author[MAXAUTL];
float v... |
/*
** $Id: timeedit.c 492 2008-02-15 08:24:04Z zhounuohua $
**
** timeedit.c: A time editor, use SpinBox and Edit controls.
**
** Copyright (C) 2003 ~ 2007 Feynman Software.
**
** Create date: 2001/11/01
*/
/*
** This source is free software; you can redistribute it and/or
** modify it under the terms of the GNU Gen... |
// By izanbf1803 - http://izanbf.es/
#define TITLE "Conway's game of life - izanbf.es"
#include <stdio.h>
#include <string.h>
#include <SDL2/SDL.h>
#include "screen.h"
void update(screen_t* screen)
{
#pragma omp parallel for
for (int x = 0; x < screen->W; x++) {
for (int y = 0; y < screen->H; y++) {
in... |
/*
* Copyright (c) 2013-2017 Intel Corporation. All rights reserved.
* Copyright (c) 2014-2016 Cisco Systems, 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 ... |
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include "m_map.h"
m_granule* make_granule(){
m_granule* mem = malloc( sizeof( *mem) );
if(mem==NULL){
printf(" failed make_granule\n");
exit(0);
}
mem ->next = NULL;
mem ->previous = NULL;
return mem;
}
m_granule* alloc_granule(m_map... |
/*
* The Clear BSD License
* Copyright 2019-2020 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted (subject to the limitations in the disclaimer below) provided
* that the following conditions are met:
*
* o Redistributions of source... |
/*
* Copyright (c) 2018-2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include <inttypes.h>
#include "tfm_arch.h"
#include "tfm_thread.h"
#include "utilities.h"
#include "svc_num.h"
#include "tfm_memory_utils.h"
#include "tfm_core_utils.h"
/* Force ZERO in case ZI(bss) cle... |
/////////////////////////////////////
///// <NAME>, 905510040 /////
///// ECE 2534 LAB 4 /////
///// main.c /////
///// 12/10/2012 /////
/////////////////////////////////////
#include <plib.h>
#include "PmodOLED.h"
#include "OledChar.h"
#include "OledGrph.h"
#include "... |
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2022, Intel Corporation */
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "libminiasync.h"
#include "core/os.h"
#include "test_helpers.h"
int
test_thread_memmove_single(size_t str_len)
{
int ret = 0;
unsigned seed = (unsigned)time(NULL);
fpr... |
/*
*
* PRU Debug Program
* (c) Copyright 2011 by Arctica Technologies
* Written by <NAME>
*
*/
#include <stdio.h>
#include "prudbg.h"
void printhelp()
{
printf("Command help\n\n");
printf(" Commands are case insensitive\n");
printf(" Address and numeric values can be dec (ex 12), hex (ex 0... |
/*-
* Copyright (c) 2016 The DragonFly Project
* Copyright (c) 2005 <NAME>
* Copyright (c) 2014 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by <NAME> under sponsorship
* from the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modi... |
/*
* Copyright (c) 2009-2012 Oak Ridge National Laboratory. All rights reserved.
* Copyright (c) 2009-2012 Mellanox Technologies. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/mman.h>
#... |
/*
* gc-profiler.c - A heap profiler
*
* Author:
* <NAME> <<EMAIL>>
*
*/
#include <string.h>
#include <glib.h>
#include <mono/io-layer/io-layer.h>
#include <mono/metadata/class.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/object.h>
#include <mono/metadata/profiler.h>
#include <mono/meta... |
//
// Created by mustafa on 2020-06-28.
//
#include "vm.h"
#include "geom.h"
#ifdef __APPLE__
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#elif __ANDROID__
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
typedef struct Shader {
int gpu, pos, color, uv, projection, model, texture;
} Shade... |
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <pthread.h>
#include "../sensors/adc/adc.h"
#include "../run/run.h"
#include "../util/error.h"
#include "error.h"
#include "display.h"
#define CENTER_AND_DISPLAY(VAL, FMT) \
snprintf(formatted, colw+19,... |
/* Test iscanonical and canonicalizel for ldbl-96.
Copyright (C) 2016-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C 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... |
/*
==============================================================================
This file is part of the ObjectiveMax Library and Framework
An Objective-C API for writing Max external objects
Copyright 2007 by Electrotap, LLC.
------------------------------------------------------------------------------
Obj... |
/*
* Author: <NAME>
* Date: 16/3/20
*
* Pre-Condition: Takes in the inputs of task instances.
*
* Post-Condition: Calculates which frames the jobs will have to execute in.
* And if required, it also slices jobs to fit them into the frames using the INF algorithm.
*
*/
#include <stdio.h>
#include <stdlib.h... |
#if HAVE_CONFIG_H
# include <config.h>
#endif
#ifndef PATHNAME_SEPARATOR
# define PATHNAME_SEPARATOR '/'
#endif
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
int is_static = 1;
int is_const = 1;
static void *
fmalloc(int size)
{
void *p = malloc(size);
if (!p) {
... |
#include "graph.h"
#include "bitset.h"
/**
* Compute the integer power
* Based off the implementation given at
* https://stackoverflow.com/a/101613/5092307
* @param a the number to compute a power of
* @param e the exponent to put the number too
* @return a^e (int)
*/
u32 ipow(u32 a, u32 e) {
u32 r = 1;
... |
#include"include/functions.h"
void printHelp(int help)
{
if (help)
{
printf("This is search version 1.0.0\n");
// Synopsis
printf("Synopsis:\n");
printf("\tsearch [directory][-a][-d][-h][-m][-n][-p][-s][-t][-v] pattern\n");
// Description
printf("Descri... |
/*s: generators/lex/globals.c */
#include "ldefs.h"
/*s: global fout */
Biobuf fout;
/*e: global fout */
/*s: global foutopen */
int foutopen;
/*e: global foutopen */
/*s: global errorf */
int errorf = 1;
/*e: global errorf */
/*s: global sect */
int sect = DEFSECTION;
/*e: global sect */
/*s: global prev */
int prev ... |
/* $OpenBSD: boot.c,v 1.23 2014/02/19 22:02:14 miod Exp $ */
/* $NetBSD: boot.c,v 1.10 1997/01/18 01:58:33 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME>.
*
* Redistributio... |
//
// DockPaint.c
//
// www.catch22.net
//
// Copyright (C) 2012 <NAME>
// Please refer to the file LICENCE.TXT for copying permission
//
#define _WIN32_WINNT 0x501
#include <windows.h>
#include <tchar.h>
#include <uxtheme.h>
#include "trace.h"
#include "docklib.h"
#include "dockwnd.h"
extern ATOM g_DockWndAtom;
... |
#include "demo.h"
extern int verbose;
typedef struct {
int help_flag;
char *client_address;
char *client_port;
} CMD_OPT;
void print_help(char **argv);
int parse_options(CMD_OPT *opts, int argc, char **argv);
int dummy(char *client_address, char *client_port);
int main(int argc, char **argv) {
int ret = 0;
CM... |
/**
* CVE-2019-18634 sudo pwfeedback: buffer overflow exploit LPE
*
* Target: sudo 1.8.25 on Ubuntu 20.04
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <error.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <termios.h>
#include <limits.h>
#define l... |
#include <stdlib.h>
#include <signal.h>
#include "uv.h"
__attribute__ ((visibility ("default")))
int sunglass_UV_E2BIG() { return UV_E2BIG; }
int sunglass_UV_EACCES() { return UV_EACCES; }
int sunglass_UV_EADDRINUSE() { return UV_EADDRINUSE; }
int sunglass_UV_EADDRNOTAVAIL() { return UV_EADDRNOTAVAIL; }
int sunglass_... |
#include "keyboard.h"
#include "fifo.h"
#include "global.h"
#include "interrupt.h"
#include "io.h"
#include "memory.h"
#include "print.h"
#include "stdint.h"
static char buf[64];
struct FIFO keybuf;
static bool ctrl_status;
static bool shift_status;
static bool alt_status;
static bool casplock_status;
static bool ext... |
#include "cl_config.h"
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "nf-util.h"
#include "nf-log.h"
const uint16_t DEFAULT_LAN = 1;
const uint16_t DEFAULT_WAN = 0;
const uint32_t DEFAULT_MAX_FLOWS = 65536;
const uint32_t DEFAULT_SKETCH_CAPACITY = 65536;
const uint16_t DEFAU... |
/*
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
*
* 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 ... |
#include "main.h"
void menuDebugCheatHP_draw(const MenuItem *self, int x, int y, bool selected) {
char str[64];
sprintf(str, self->name, (debugCheats & DBGCHT_INF_HP) ? "On" : "Off");
gameTextShowStr(str, MENU_TEXTBOX_ID, x, y);
}
void menuDebugCheatHP_select(const MenuItem *self, int amount) {
debugC... |
#include <myy/helpers/fonts/packed_fonts_parser.h>
#include <myy/helpers/opengl/loaders.h>
#include <myy/current/opengl.h>
#include <myy/helpers/file.h>
#include <myy/helpers/log.h>
#include <myy/helpers/strings.h>
#include <myy/helpers/memory.h>
#include <myy/helpers/c_types.h>
#include <string.h>
#include <stdint.... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/*
TEST_HEADER
id = $Id$
summary = MVFF low-memory test; failover of CBS to freelist
language = c
link = testlib.o
OUTPUT_SPEC
assert = true
limit < 160000
END_HEADER
*/
/* Purpose:
*
* This tests that the MVFF can continue to return blocks to the arena
* even if its CBS can no longer allocate control blocks... |
/* $OpenBSD: qlw_sbus.c,v 1.1 2014/03/15 21:49:47 kettenis Exp $ */
/*
* Copyright (c) 2014 <NAME>
*
* Permission to use, copy, modify, and 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.
... |
/* specfunc/bessel_Y1.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) an... |
/*******************************************************************************
* - FILE: work_maintenance.h
* - DESC: Pipelines Workflow Subroutines.
* Computes optimal accuracy and traceback alignment.
*******************************************************************************/
/* impo... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void array_addition(float *destiny,
float *summand_a, float *summand_b, int size);
void matrix_multiplication(float **destiny,
float **multiplicand, float **multiplier,
int rows_multiplica... |
/*
* 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.
*/
#ifdef _ERR_MSG_MODULE_NAME
#error "_ERR_MSG_MODULE_NAME redefined"
#endif
/* Defines */
#define _ERR_MSG_MODUL... |
/*
Copyright (c) 2016 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicens... |
/*
* Copyright (c) 2018 Qualcomm Technologies, Inc.
* Copyright (c) 2004-2006 Atheros Communications Inc.
* All Rights Reserved.
*/
// Copyright (c) 2018 Qualcomm Technologies, Inc.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted (subject to t... |
#include <ccore/window.h>
#include <ccore/display.h>
#include <ccore/opengl.h>
#include <stdio.h>
#include <gl/GL.h>
#include <lodepng/lodepng.h>
#include <convexHull/convexHull.h>
#define TITLE "Convex Hull test case\n"
#define IMAGEDIR "test/source.png"
#define NODECOUNT_DEFAULT 16
#define PRECISION_DEFAULT 16.0f
... |
/**
******************************************************************************
* @file EXTI/EXTI_Example/main.c
* @author MCD Application Team
* @version V1.2.0
* @date 13-April-2012
* @brief Main program body
***************************************************************************... |
////////////////////////////////////////
// rgbLEDrpmsg.pru0
// Uses rpmsg accept messages to /dev/rpmsg_pru30 by the ARM
// Usage: echo green > /dev/rpmsg_pru30 to set the TechLab RGB LED green
// Wiring: PocketBeagle + TechLab
// Setup: tested with 4.14.108-ti-r124 kernel
// See:
// PRU: pru0
//////////////////////... |
/*
* File: summary.c
*
* Description:
* This is where you implement your project 3 support.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* LLVM Header Files */
#include "llvm-c/Core.h"
#include "dominance.h"
#include "valmap.h"
/* Header file global to this project */
#include "summary.h"
t... |
/*
MPSL - Minimum Profit Scripting Language
Debugging functions
ttcdt <<EMAIL>> et al.
This software is released into the public domain.
NO WARRANTY. See file LICENSE for details.
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include <stdlib.h>
#include "mp... |
#include <fudge.h>
#include <kernel.h>
#include <kernel/x86/cpu.h>
#include <kernel/x86/gdt.h>
#include <kernel/x86/idt.h>
#include <kernel/x86/tss.h>
#include <kernel/x86/arch.h>
#include <modules/base/base.h>
#include <modules/system/system.h>
#include <modules/video/video.h>
#include <modules/arch/x86/io/io.h>
#incl... |
/*####################################################################
#
# GETFTIMES - Get Timestamps of Each File
#
# USAGE : getftimes [options] file [file ...]
# Options : -l ... Prints the timestamps in ISO8601 format
# -u ... Prints the timestamps in UNIX time
# -- ... Finishes parsing argume... |
/*
* Copyright (c) 2016, JANET(UK)
* 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 condit... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <assert.h>
#include "core_allvars.h"
#include "model_starformation_and_feedback.h"
#include "model_misc.h"
#include "model_disk_instability.h"
void starformation_and_feedback(const int p, const int centralgal, con... |
#include <stdlib.h>
#include "hsm.h"
#include "log_proof.h"
#include "uECC.h"
uint8_t logPk[COMPRESSED_PT_SZ];
int groupSize;
uint8_t root[SHA256_DIGEST_LEN];
uint8_t chunkRoot[SHA256_DIGEST_LEN];
uint8_t oldChunkHead[SHA256_DIGEST_LEN];
uint8_t newChunkHead[SHA256_DIGEST_LEN];
int queries[2*NUM_CHUNKS];
int ctr;
int... |
/* Copyright (C) 2017 <NAME> */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/soundcard.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <math.h>
#include <strings.h>
#include <errno.h>
#include <sys/mman.h>
#include "eng... |
/*
Created by <NAME>
9/16/16
PPM Converter
This program is used to convert between the ascii and binary versions of the
.ppm image file format.
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#define SIZE 256
void writeP3 (FILE *inFile, FILE *outFile);
void ... |
#include <time.h>
#include <curses.h>
#include <unistd.h>
#include <string.h>
typedef struct {
char* day;
int hour;
int min;
int sec;
} ti;
// seven-segment display
// |a|b|c|d|e|f|g|
// 0 |1|1|1|1|1|1|0|
// 1 |0|1|1|0|0|0|0|
// 2 |1|1|0|1|1|0|1|
// 3 |1|1|1|1|0|0|1|
// 4 |0|1|1|0|0|1|1|
// 5 |1|0|1|1|0|1|1|
//... |
/*
* This software is copyrighted as noted below. It may be freely copied,
* modified, and redistributed, provided that the copyright notice is
* preserved on all copies.
*
* There is no warranty or other guarantee of fitness for this software,
* it is provided solely "as is". Bug reports or fixes may be sent
... |
#include <SDL2/SDL.h>
#include <errno.h>
#include <stdbool.h>
#include "world.h"
#include "log.h"
#include "sdl.h"
static SDL_Window *window = NULL;
static SDL_Renderer *renderer = NULL;
static int width, height;
int sdlInit(int w, int h, bool fullscreen) {
Uint32 flags = 0;
if (fullscreen) {
if ((w == 0) && (h =... |
/* crypto/pkcs7/pkcs7err.c */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. 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 <string.h>
#include "wins.h"
#include "winsmsc.h"
#include "nmfilter.h"
// local defines
#define SET_BIT(Mask, Key) (Mask)[(Key)>>3] |= 1<<((Key)&7)
#define CLR_BIT(Mask, Key) (Mask)[(Key)>>3] &= ~(1<<((Key)&7))
#define IS_SET(Mask, Key) ((Mask)[(Key)>>3] & (1<<((Key)&7)))
// the root ... |
/**
* \file
*
* \brief Unit tests for SDRAMC driver.
*
* Copyright (c) 2012-2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are me... |
/**
* @file normalize.c
* ナンプレの標準形を求める
*
* なお、かなりの手抜きなので本来の意味の標準形ではない。
*/
#include "numpl.h"
#include "convert.h"
#include "inline_functions.h"
#include "normalize.h"
#include "analyze.h"
#include "common.h"
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
#include <... |
/*
* Copyright 2003, 2004, 2005 PathScale, Inc. All Rights Reserved.
*/
/*
Copyright (C) 2000, 2001, Silicon Graphics, Inc. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it
under the terms of version 2.1 of the GNU Lesser General Public License
as published by... |
/*******************************************************************************
*
* University of Illinois/NCSA
* Open Source License
*
* Copyright (c) 2018 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and ... |
/*
* Copyright 2017 <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... |
/*
** mrb_discount - markdown class for mruby using discount
**
** Copyright (c) mod_mruby developers 2012-
**
** 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... |
//
// Created by karl_ on 2020-5-3.
//
#include <stdlib.h>
#include <math.h>
#include <cblas.h>
#include <core/color-space.h>
#include <imgproc/histogram-equalization.h>
#include "color-convert.h"
// ref: https://www.math.uci.edu/icamp/courses/math77c/demos/hist_eq.pdf
static void
histeq(double const *... |
/*
* Astar search main program.
*
* <EMAIL>
*
*/
#include <stdio.h>
#include <stdlib.h>
#include "astar.h"
int grid[Y_MAX][X_MAX]= {
{ '+','-','-','-','-','-','-','-','-','-','-','-','-','-','+'},
{ '|',' ',' ',' ',' ','-','+','-',' ',' ',' ','-','+','-','|'},
{ '|',' ',' ','|',' ',' ','|',' ',' ','|',' ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.