text stringlengths 3.12k 18.7k |
|---|
#include "c4.h"
// #include "../rv/riscv.h"
/*
1. 由於指令代碼可能來自 ct 與 rv,兩者都有可能有 ADD, SUB,但由大小小仍可以區分:
ct: ADD, SUB, MUL, DIV, MOD, ....
rv: Add, Sub, Mul, Div, Rem, ....
2. printf 之類的指令,使用 ecall 的方式實踐。
_start: addi a0, x0, 1 # 1 = StdOut
la a1, helloworld # load address of helloworld
addi a2, x... |
#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... |
/*
*******************************************************************************
* BOLOS TEE Samples
* (c) 2016 Ledger
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ... |
#include "message.h"
#define PUBLISH "PUBLISH"
#define ASK "GET_MESSAGES"
#define SERVER_TEST 1
static uint_fast16_t _size_to_alloc = RESPONSE_SIZE;
static char *_response_buffer = NULL;
static bool _test_server = false, _last_test_server = false, _testing_with_results = true;
int check_message_validity(char * msg)... |
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <assert.h>
#include <sys/wait.h>
#include <sys/types.h>
#include "proc-common.h"
#include "queue.h"
#include "request.h"
static void sigalrm_handler(int);
static void sigchld_h... |
/*
* Copyright (c) 2021 Linaro
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <ztest.h>
#include <step/step.h>
#include <step/filter.h>
#include <step/measurement/measurement.h>
#include <step/node.h>
#include "data.h"
/* Track callback entry statistics. */
struct step_test_data_procnode_cb_stats step_test_d... |
/******************************************************************************
* File Name: tickless_idle.c
*
* Version: 1.00
*
* Description: This file contains functions and RTOS hooks used for
* Tickless idle mode
*
* Related Document: CE220331_BLE_UI_RTOS.pdf
*
* Hardware Dependency: CY8CKIT... |
#include <stdio.h>
#include <stdlib.h>
#include <libpq-fe.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <query/query.h>
#include "events/context_arg.h"
#include <main.h>
void oracle_get_databases(context_arg *carg)
{
}
void oracle_query_run(char *metrics, size_t size... |
#pragma once
#include <pthread.h>
#include "switch/result.h"
#include "switch/services/ncm_types.h"
/// Default port.
#define DELIVERY_PORT_DEFAULT 55556
/// Magicnum for request messages.
#define DELIVERY_MESSAGE_MAGICNUM_REQUEST 0x7152444c
/// Magicnum for reply messages.
#define DELIVERY_MESSAGE_MAGICNUM_REPLY 0... |
/**
*
*
*/
#include <hal_gpio.h>
#include <memory.h>
#include "bl.h"
#define FK_BUTTON_LEFT GPIO(GPIO_PORTA, 23)
#define FK_FAILSAFE_HOLD_TIME 1000 * 10
extern enum reset_reason _get_reset_reason(void);
extern uint32_t __cm_app_vectors_ptr;
uint32_t serial_number_get(uint32_t *sn) {
sn[0] =... |
/* $OpenBSD: x509_info.c,v 1.2 2020/09/18 14:41:04 tb Exp $ */
/*
* Copyright (c) 2020 <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 notice and this permission notice appear in all copi... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <ctype.h>
#include <sys/ipc.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <termios.h>
#include <fcntl.h>
#include <unistd.h>
/*
a
f b
g
e c
d dp
*/
#define DRIVER_NAME "/dev/cnfnd"
... |
// count_cycle_types.c
// see header file for details
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <math.h>
#include <pthread.h>
#include "count_cycle_types.h"
// data for the threads spawned in num_cycle_types
typedef struct {
int n;
int modulus;
int remainder;
cycle_types c;
mpz_t **choo... |
#include "block_device.h"
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "util.h"
static struct block_device_info *alloc_blkdev()
{
struct block_d... |
// Copyright 2007-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 in ... |
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <ctype.h>
#include "client.h"
#include "des.h"
/* Make a socket connection... |
//------------------------------------------------------------------------------
// inject-wgpu.c
//
// Demonstrates injection of native WebGPU buffers and textures into sokol-gfx.
//------------------------------------------------------------------------------
#define HANDMADE_MATH_IMPLEMENTATION
#define HANDMADE_MA... |
/*-
* Copyright (c) 2017-2018 Razor, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include "sender_congestion_controller.h"
#include "razor_log.h"
#define k_max_queue_ms 250
#define k_min_bitrate_bps 10000
#define k_max_feedback_size 1472
static void sender_cc_on_... |
/* Scanning of rtl byte level scanning for dataflow analysis.
Copyright (C) 2008 Free Software Foundation, Inc.
Contributed by <NAME> (<EMAIL>).
This file is part of GCC.
GCC 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
So... |
#include "filter.h"
/*
This program filters the input CV, so that only appropiate parts are included, and the parts
that are included are shortened if some parts are unnecessary.
The output of this file will be used in the format.c file.
*/
//removes all personal pronouns of the start of every sentence of the... |
#define UNW_LOCAL_ONLY
#include <stdlib.h>
#include <stdio.h>
#include "sheap.h"
#include "util.h"
#include "pool_hash_table.h"
#include "sizetable.h"
#include "flist.h"
#include <libunwind.h>
#include <pthread.h>
pthread_mutex_t alloc_mutex;//to protect alignment of metadata to data
// Load & define global ptr
void*... |
#include <stdlib.h>
#include <string.h>
#include "sclog4c/sclog4c.h"
#include "leg_control/toml_utils.h"
int toml_vector_float(toml_array_t *a, float dest[3])
{
for(int oi=0;oi<3;oi++)
{
toml_raw_t tomlr = toml_raw_at(a, oi);
if(tomlr == 0)
return -1;
double tmp;
i... |
/*
* string.c
*/
#include "private.h"
#include <stdlib.h>
#include <string.h>
#include "lub/ctype.h"
const char *lub_string_esc_default = "`|$<>&()#;\\\"!";
const char *lub_string_esc_regex = "^$.*+[](){}";
const char *lub_string_esc_quoted = "\\\"";
/*--------------------------------------------------------- */
... |
/* Copyright ©2007-2009 <NAME> <<EMAIL>>
* See LICENSE file for license details.
*/
#define Window XWindow
#define Font XFont
#define Screen XScreen
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xft/Xft.h>
#include <X11/extensions/Xrender.h>
#ifdef _X11_VISIBLE
# include <X11/Xatom.h>
# include <X11/ex... |
// arbitrary list error
#define LIST_ERROR -1
// Data entry type
typedef size_t BP_DATA_ENTRY_TYPE;
// this enum describes all
// data types supported by the
// DATA_LIST structure.
typedef enum {
BP_DATA_ENTRY_TYPE_UNSET,
BP_DATA_ENTRY_TYPE_INT8,
BP_DATA_ENTRY_TYPE_INT16,
BP_DATA_ENTRY_TYPE_INT32,
BP_DATA_EN... |
// SPDX-License-Identifier: GPL-2.0
/*
* FB driver for the NHD-1.69-160128UGC3 (Newhaven Display International, Inc.)
* using the SEPS525 (Syncoam) LCD Controller
*
* Copyright (C) 2016 Analog Devices Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Ge... |
/*
* break_plaintext.c
*
* Plain text analysis stuff for cryptopals.com challenges.
*/
#include "break_plaintext.h"
/*
* Provide the character frequency match in the given bytes struct using
* `freq_ref' as reference.
*
* `freq_ref' is an array used to represent characters frequency using only the
* letters ... |
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
#include "decl.h"
double rtclock()
{
stru... |
/* namcoic.h
Custom Chips: Final Lap Assault LuckyWld System21 NA1/2 NB1/2
C45 Land Generator * *
C65 I/O Controller * *
C68 * *
C7... |
/*
* Copyright (C) 2009 The Android Open Source Project
*
* 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 app... |
/*
* Copyright (c) <2018>, <<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 ... |
/* Computational Geometry for Arcs */
#include "geom-arc.h"
#include "geom-line.h"
#ifndef M_PI
#define M_PI 3.14159265358979
#endif
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
double radians(double degree) { return (double)(degree*M_PI/180.0); }
double degrees(double radian) { return (double)(radian*180... |
/* $Id: gtkjj.c,v 1.4 2008/09/27 02:06:02 laffer1 Exp $ */
/*-
Copyright (C) 2008, 2016 <NAME>. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above cop... |
#include "vga.h"
#include <string.h>
byte *VGA = (byte *) 0xA0000;
byte p[5] = {0,2,4,6,8};
byte pix;
void vga_set_mode(byte mode){
union REGS regs;
// tell the BIOS to initialize the given mode
regs.h.ah = 0x00;
regs.h.al = mode;
int386(0x10, ®s, ®s);
}
void vga_init_modex()
{
// initialize m... |
/*******************************************************************
*
*
* DESCRIPTION : roman numeral calculator functions to be used for:
* [1] Roman Numeral Addition/Subtraction
* [2] Roman Numeral to Decimal Conversion and Comparison
* [3] Decimal to Roman... |
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <EGL/egl.h>
#include <GLES2/gl2.h>
#include <sys/time.h>
#include <sys/stat.h>
static EGLDisplay display;
static EGLSurface surface;
static void render_target_init(EGLNativeWindowType nativeW... |
#include "cryptorserver.h"
#include "socket.h"
#include "error.h"
#include "stringbuf.h"
#include "files.h"
#include "logging.h"
#include "protocol.h"
#include "encrypt.h"
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
static void... |
/*
Part of the Raspberry-Pi Bare Metal Tutorials
https://www.valvers.com/rpi/bare-metal/
Copyright (c) 2020, <NAME>
This software is licensed under the MIT License.
Please see the LICENSE file included with this software.
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "gi... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2012 secunet Security Networks AG
*
* 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.
*
* Th... |
/*
* Copyright (c) 2008-2021 <NAME> <troglobit()gmail!com>
*
* 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... |
/*
*CSVG - SVG Parser
*Copyright © 2016 <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, modi... |
#include "includes.h"
/******************************************************/
/* Code for generating char variables etc; mostly
language independent */
/******************************************************/
/*
Matching strings to char variables, attributes, and vlen
constants is challenging because it is desira... |
/**************************************************************************/
/* */
/* This subroutin computes next values in subdomain of current process me */
/* within the domain */
/* ... |
// Copyright <NAME> 2014-2014.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
/** IAPWS-IF97 Region 1 Equations
* VALIDITY 273.15 K <= T <= 623.15 K Psat <= p <= 100 MPa
* Exce... |
/*
* Copyright (C) 2006-2018 <NAME> <<EMAIL>>
* Copyright (C) 2006-2009 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at ... |
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file main.c
* @brief Main program body
* @version 2.0
******************************************************************************
* Modified :
* Created : 15-aout-2020
*****... |
/* Copyright (c) 2018-2019, The Linux Foundation. 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 version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the... |
/*
# ------------------------------------------------------------
# Compilation: gcc -o mrefgen mrefgen.c -lm
#
# Usage: mrefgen -m memsize -l [0-9] -f [0-9] -w <0-1> -n numref
#
# Remark: To see the generated 32-bit binary words as 4 hex digits
# per line using 'od', use
# "od -Ad -w4 -x -v fil... |
/*
* Runs the equivalent of mcarlo-sim on the current machine instead of
* in simulation. Requires root.
*
* Prints the equivalent of --print_cgroup_stats
* --print_average_imbalance --print_sched_stats
*
* Requires the arguments -c to specify a cpu list to run the tests
* on, and -m to specify the cpus to moni... |
#include "othermenu.h"
#include "render.h"
#include "menu.h"
#include "utility.h"
#include "font8x8_basic.h"
#include "inputs.h"
#include "logic.h"
#include "debug.h"
#include "utility.h"
#include "actor.h"
#include "mainmenu.h"
#include "menu.h"
#define CHEATS_LEN 26
char *cheat_names[CHEATS_LEN];
u8 cheat_num = 0;
u... |
/*
* Copyright 2012-2016 <NAME>
*
* This file is part of Project Ubertooth.
*
* 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, or (at your option)
* any later version.
... |
static char *rcsid="$Id: glhls.c,v 1.1 2000/06/28 08:46:39 fuhrmann Exp $";
#include <math.h>
#include "GL/gl.h"
#include "glhls.h"
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX3(a,b,c) MAX(MAX(a,b),c)
#define MIN3(a,b,c) MIN(MIN(a,b),c)
#define PI 3.141592683
#define TWOPI 2.0*PI
... |
/*
Copyright (c) 2012, Broadcom Europe 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:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... |
//**********************************************************************;
// Copyright (c) 2015, Intel Corporation
// 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 s... |
/* Lists/Words
* #Keywords: GtkListView, GtkFilterListModel
*
* This demo shows filtering a long list - of words.
*
* You should have the file `/usr/share/dict/words` installed for
* this demo to work.
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
static GtkWidget *progress;
const char *factory_tex... |
/* $NetBSD: reloc.c,v 1.107 2014/08/25 20:40:52 joerg Exp $ */
/*
* Copyright 1996 <NAME>.
* Copyright 1996 <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. Redist... |
/**
princev2.c
Implementation for PRINCEv2 cipher
**/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "princev2.h"
#include "block.h"
/*
each of the values below store the binary values along the diagonal of
matrix M0, M1, M2, and M3. We only use the last 4 bits of the integer
for inst... |
#include "atlas.h"
#include <flowi_core/error.h>
#include "allocator.h"
#include "internal.h"
#include "render.h"
#include "types.h"
#define PRE_ALLOC_COUNT 256
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Original code base on <NAME> fonts... |
#include "blackbox_fielddefs.h"
#include <stdlib.h>
/*
* Please leave the INAV HEADER: comments intact
* Please add new INAV HEADER: commeants for any new INAV items
* The contents of section may then be regenerated from the
* "tools/rcmodes.rb" (sic) script
*/
// Legacy, Cleanflight
const char * const FLIGHT_LO... |
// Server side C/C++ program to demonstrate Socket programming
#define _GNU_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <sched.h>
#include <sys/socket.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/resource.h>
#include <netinet/in.h>
#include <string.h>
#include "tsc.h"
#include <errno.h>
#include... |
/*
Copyright (c) 2014, <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 the following disclai... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <wchar.h>
#include "windows.h"
#include "winreg.h"
#define TEST_STRING "Test String"
#define TEST_STRING_W L"Test String"
BOOLEAN
AdjustPrivilege(
PSTR SecurityNameString
)
{
HANDLE ... |
/*
CF3
Copyright (c) 2015 ishiura-lab.
Released under the MIT license.
https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md
*/
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
#include"test1.h"
static volatile int32_t t2 = 127;
uint32_t x913 = 263605666U;
uint8_t x948 = 3U;
int8_t x1106 = -1;
static int... |
inline void display_init(void)
{
// enable timer0 for display update cycle
// we want at least 100Hz update rate on the display
// to redraw all segments at a rate of 100 Hz we need a 100 Hz * 7 segments * 4 digits = 2.8 kHz timer clock
// with the chip running at 4 MHz this is 1/1428 of the clock, so we want a c... |
/**********************************************************************************************************
* AC - OpenMP -- PARALELA *
* Compilar con el modulo fun_p.c y la opcion -lm ... |
/**
* @file fuse.c
* @author <NAME> (<EMAIL>)
* @brief A high-level FUSE file system
* @version 0.1
* @date 2021-11-06
*
* @copyright Copyright (c) <NAME> 2021
*
*/
#include "fs.h"
#include "utils/logger.h"
#include "utils/guards.h"
#include "utils/error.h"
#include <fuse3/fuse.h>
#include <dirent.h>
#incl... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include "STACK.h"
#define DOT "."
#define DOTDOT ".."
#define BUFSIZE 1024
void recursiveCopy(ST stack, char *src_folder, char *ds... |
#include "tape_csw.h"
#include "log.h"
#include "tape.h"
#include "util.h"
#include "util_compress.h"
#include <assert.h>
#include <inttypes.h>
#include <math.h>
#include <string.h>
struct tape_csw_thresholds {
uint32_t lo_bit;
uint32_t hi_bit;
};
static int
tape_csw_is_1200(struct tape_csw_thresholds* p_thres,... |
/***************************************************************************
video.c
Functions to emulate the video hardware of the machine.
Convention: "sl" stands for "searchlight"
***************************************************************************/
#include "driver.h"
UINT8 *dday_bgvideoram;
UIN... |
#include "atmosphere.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "photon.h"
#include "linalg.h"
#define NORM_R(r) if ((r>1) || (r<0)) r = 1./fabs(r);
Photon* process_photon(Box* b, Photon* p)
{
Vec3D scat_pos;
Vec3D scat_dir;
Vec3D helper;
Mat3D* rot1, *rot2;
// double beta_scat_tot ... |
/*****************************************************************************\
** **
** FILE: uucplocks.c **
** AUTHORS: Alexios (based on uugetty 2.1) **
**... |
#define _POSIX_C_SOURCE 200809L
#include <getopt.h>
#include <pango/pangocairo.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/un.h>
#include <unistd.h>
#include <wlr/util/log.h>
#incl... |
//Définition des valeurs du capteur pédale analogique et codage
//Le pousse-tire est effectué par un bouton
const int No_PinVolume = A7; //Analogique pour volume
const int No_PinPousseTire = A8; //Analogique pour pousse-tire
int Etat_Capteur[2]; //Pas de valeur initiale, la pédale va de 0 à n, 0 étant volume 0
... |
//
// SpeechProcessing.c
// SPP RF+SB
//
// Created by <NAME> on 10/4/17.
// Copyright (c) 2017 UT Dallas. All rights reserved.
//
#include "SpeechProcessing.h"
#include <unistd.h>
#include <android/log.h>
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define DECIMATION_FACTOR 3
... |
/*
* Phoenix-RTOS
*
* ext2
*
* dir.c
*
* Copyright 2017 Phoenix Systems
* Author: <NAME>
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/threads.h>
#include <errno.h>
#include "ext2.h"
#include "block.h"
#include "file.h"
... |
#include <linux/mm.h>
#include <linux/file.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/miscdevice.h>
#include <linux/pt_area.h>
#include <asm/sbi.h>
#include "penglai-enclave-driver.h"
#include "penglai-enclave-ioctl.h"
#include "penglai-schrodinger.h"
#include "riscv64.h"
MODULE_LICENS... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "solver_io.h"
#include "solver.h"
void solve_sudoku(sudoku_t **s) {
if(!is_valid_sudoku(*s)) {
(*s)->res = INVALID;
return;
} else if((*s)->no_virts == 0) {
(*s)->res = COMPLETE;
return;
}
if((*s)->depth ==... |
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <inttypes.h>
#include <linux/types.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <errno.h>
//#include "../client/ioctl.h"
#include <linux/ioctl.h>
#define CEPH_IOCTL_MAGIC 0x97
... |
#include "../Header/tree_learnng.h"
int findBestSplit(Dataset *dataset, int cols_to_avoid[], int nb_cols)
{
int rows = dataset->rows, cols = dataset->cols;
double table_inf_gain[cols];
//obtention de l'entropy general du dataset
double hx = entropy_by_dataset(dataset);
for (int col_index = 0; col_i... |
/**
* Author: <NAME> (<EMAIL>)
*/
#include <stdio.h>
#include <ctype.h>
#include "output.h"
#include "utils.h"
static
void print_block (FILE *out, struct basicblock *block, int identsize, int reversecond)
{
element opel;
int options = 0;
if (reversecond) options |= OPTS_REVERSECOND;
opel = list_head (blo... |
#include <stdio>
#include <setjmp>
#include <ctype>
#include <rmsdef>
#define capitalch toupper
#define TEMPWITHFILE "SYS$SCRATCH:ZED.TMP"
#define INPUT 0
#define OUTPUT 1
#define MAXINT 2147483647 /* 2**31 - 1 */
#define ENDSTREAMCH EOF
#define BYTESPERWORD 4
#define MAXSTRLENGTH 604 ... |
//
// Created by zdavid on 27/12/18.
//
#include "../headers/showinstructions.h"
#include "../headers/createmenuitem.h"
#include <string.h>
#include <stdio.h>
#include "../headers/renderview.h"
MENUITEM *renderInstructions(int step) {
char pagination[VIEW_WIDTH] = " ... |
/*
* CGlib
*
* A Low-Level GPU Graphics and Utilities API
*
* Copyright (C) 2009,2010,2011 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... |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
/*
* Small pages:
* L1: 12-bit index -> 4096 descriptors -> 16Kb
* L2: 8-bit index -> 256 descriptors -> 1Kb
* Each L2 descriptor has access permissions for 4 1Kb sub-pages.
*
* TTB + L1Tx gives address of L1 descriptor... |
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include "builtins.h"
/*======================= Pt =======================*/
/* Typedefs Required for Separation of class and object structs */
struct class_Pt_struct;
typedef struct class_Pt_struct* class_Pt;
typedef struct obj_Pt_struct {
class_Pt clazz;
... |
/*
* Written in 2011 by <NAME> <<EMAIL>>
*
* To the extent possible under law, the author(s) have dedicated
* all copyright and related and neighboring rights to this software
* to the public domain worldwide.
*
* This software is distributed without any warranty.
*
* You should have received a copy of the CC... |
/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <vm.h>
#include <per_cpu.h>
#include <vacpi.h>
#include <pgtable.h>
#include <platform_acpi_info.h>
/* ACPI tables for pre-launched VM and SOS */
static struct acpi_table_info acpi_table_template[... |
/* preemptdns.c
* Preemptive name resolution feature.
*
* Ziproxy - the HTTP acceleration proxy
* This code is under the following conditions:
*
* ---------------------------------------------------------------------
* Copyright (c)2005-2014 <NAME>
*
* This program is free software; you can redistribute it and... |
/**
* collectd - src/lpar.c
* Copyright (C) 2010 <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; only version 2 of the License is applicable.
*
* This program is distributed in... |
/*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* loadsF1.c
*
* Code generation for function 'loadsF1'
*
*/
/* Include files */
#include <string.h>
#include... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <math.h>
#include <sys/select.h>
#include <sys/time.h>
#include <pthread.h>
#include <lcm/lcm.h>
#include "lcmtypes/dynamixel_command_list_t.h"
#include "lcmtypes/dynamixel_command_t.h"
#include "lcmtypes/dynami... |
#include "server.h"
#include <math.h>
int zslLexValueGteMin(sds value, zlexrangespec *spec);
int zslLexValueLteMax(sds value, zlexrangespec *spec);
/*创建跳跃表节点*/
zskiplistNode *zslCreateNode(int level, double score, sds ele) {
//分配内存
zskiplistNode *zn=zmalloc(sizeof(*zn)+level*sizeof(struct zskiplistLevel));
zn-... |
/**
* @brief win32 tool for generating bitmap fonts
* @author <NAME> (tatwood.net)
* @date 2011
* @copyright unlicense / public domain
****************************************************************************/
#if !defined(NDEBUG) && defined(_MSC_FULL_VER)
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.... |
/*
* BIN to TRS 80 file conversion
*
* <NAME>, April 2008
*
* CAS format ( <NAME>, Jul 2014 )
* To load machine code programs from tape, first type 'SYSTEM' to exit BASIC
* then at the '*?' prompt enter the program name (or its first letter) and press PLAY
* When the ... |
/***************************************************************************
Copyright (c) 2013-2016, The OpenBLAS 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:
1. Redistributions of source code... |
#include "cache.h"
#include "refs.h"
#include "object.h"
#include "commit.h"
#include "tag.h"
/* refs */
static FILE *info_ref_fp;
static int add_info_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
{
struct object *o = parse_object(sha1);
if (!o)
return -1;
fprintf(info_ref_fp, "%s %s... |
/* (C) Copyright 1993,1994 by Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyri... |
/* This file is part of SAIL (https://github.com/smoked-herring/sail)
Copyright (c) 2020 <NAME>
The MIT License
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 restr... |
/* Copyright (C) 2013 Quantum ESPRESSO group
* This file is distributed under the terms of the
* GNU General Public License. See the file `License'
* in the root directory of the present distribution,
* or http://www.gnu.org/copyleft/gpl.txt . */
/* Toplevel wrapper code to launch QM/MM calculations via MPI */
#i... |
/* Dia -- an diagram creation/manipulation program
* Copyright (C) 1998 <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) any ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.