text stringlengths 3.08k 10.5k |
|---|
/*
* Copyright (C) 2002, <NAME>
*/
/*
* Backgrounding added. [PM] Ajout d'une rustine nécessaire : lignes 153 et 293 commentées
*/
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include <string.h>
#include "readcmd.h"
static void memory_error(void)
{
errno... |
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "kernels.h"
static inline int max_int(int a, int b)
{
if (a > b)
return a;
return b;
}
/**
* @brief Efficient kernel change point detection
*
* @param signal shape (n_samples*n_dims,)
* @param n_samples number of samples
* @param ... |
/* spToProteins- Create tab delimited data file for proteinsxxxx database */
/* CURRENTLY UNUSED because it's horribly slow perhaps.... */
/* Copyright (C) 2013 The Regents of the University of California
* See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
#include "common.h"
#includ... |
#include <stdlib.h>
#include <string.h>
#include "math.h"
#include "window.h"
#include "hankaku.h" // debug
#define WINDOW_TOP_ORDER 200
#define WINDOW_MAX_NUM 128
typedef struct WindowManager {
window_t *focused;
window_t pool[WINDOW_MAX_NUM];
} window_manager_t;
static sprite_t* _cursor;
static window... |
#include <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <pthread.h>
#if defined(USE_SDL_CONFIG)
#include "SDL.h"
#else
#include <SDL2/SDL.h>
#en... |
/*
* MIT License
*
* Copyright (c) 2019 <NAME>, <NAME>, <NAME> (INESC-ID)
*
* 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... |
/*-
* Copyright (c) 1998 <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 list of co... |
/* CAN Self Test Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
/*
* The followin... |
#ifndef IS_BIT_ON_RX_SET
#error IS_BIT_ON_RX_SET is not set
#endif
#ifndef START_UART_TIMER
#error START_UART_TIMER is not set
#endif
#ifndef STOP_UART_TIMER
#error STOP_UART_TIMER is not set
#endif
#ifndef START_LISTEN_RX_CHANGE
#error START_LISTEN_RX_CHANGE is not set
#endif
#ifndef STOP_LISTEN_RX_CHANGE
#e... |
#include "application_functions.h"
/* ### This function is the one that is started at the time of initial loading, this does the following actions
- Adds dates entires to the DATES table if not already present
- Adds train entries to the TRAIN tabel using the DEFAULT set of tables as template and also generates its s... |
/* Sniffinrox
* Kernel Space Sniffer
*
* Coded by Evil && Shen139
* shen139 (at) eviltime [dot] com
* webmaster (at) eviltime [dot] com
*
* Compile with: gcc -I/usr/src/linux/include/ -O6 -c sniffinrox.c
*/
#define __KERNEL__
#define MODULE
#include <linux/kernel.h>
#include <linux/version.h>
#include ... |
/*
* Copyright (c) 2015, Texas Instruments Incorporated
* 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... |
#include <stdio.h>
#include "twm.h"
#include "screen.h"
#include <X11/Xos.h>
#include <X11/Xatom.h>
#include <X11/Xmu/CharSet.h>
#include <X11/Xresource.h>
#define PROTOCOLS_COUNT 5
Atom _XA_WIN_WORKSPACE;
Atom _XA_WIN_STATE;
static Atom _XA_WIN_CLIENT_LIST;
void InitGnome (void) {
long curws = 0;
virtualScreen... |
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (c) 2017, Intel Corporation
* All rights reserved.
*/
#include <glib.h>
#include <errno.h>
#include <error.h>
#include <gio/gunixinputstream.h>
#include <gio/gunixoutputstream.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h... |
/*************************************************************************
* Little Smalltalk, Version 1
*
* The source code for the Little Smalltalk system may be freely copied
* provided that the source of all files is acknowledged and that this
* condition is copied with each file.
*
* The Little Smalltalk sy... |
/****************************************************************
*
* Copyright 2013, Big Switch Networks, Inc.
*
* Licensed under the Eclipse Public License, Version 1.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* ... |
/*
* binyo - Fast binary IO for Ruby
*
* Copyright (c) 2012-2013
* <NAME> <<EMAIL>>
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, incl... |
/* $Xorg: ValTree.c,v 1.3 2000/08/17 19:48:06 cpqbld Exp $ */
/*
(c) Copyright 1996 Hewlett-Packard Company
(c) Copyright 1996 International Business Machines Corp.
(c) Copyright 1996 Sun Microsystems, Inc.
(c) Copyright 1996 Novell, Inc.
(c) Copyright 1996 Digital Equipment Corp.
(c) Copyright 1996 Fujitsu Limited
(c)... |
/* SPDX-License-Identifier: BSD-2-Clause */
/*******************************************************************************
* Copyright 2020, acafons
* All rights reserved.
*******************************************************************************/
#include <tlib/tlib.h>
#include <setjmp.h>
#include <stdarg.h... |
/* *********************************************************************
* Broadcom Common Firmware Environment (CFE)
*
* SOC Display functions File: ui_soccmds.c
*
* UI functions for examining SOC registers
*
* Author: <NAME> (<EMAIL>)
*
*****************************... |
#include "../ga.h"
#include "ga_openal.h"
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
const char* gaX_openAlErrorToString(ALuint error)
{
const char* errMsg = 0;
switch(error)
{
case AL_NO_ERROR: errMsg = "OpenAL error - None"; break;
case AL_I... |
/*
* Copyright 1993-2002 <NAME> and Perforce Software, Inc.
*
* This file is part of Jam - see jam.c for Copyright information.
*/
/* This file is ALSO:
* Copyright 2001-2004 <NAME>.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or http://www.... |
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
struct box{
int onDre;
};
struct box bbox[3];
int x = 0;
int y = 0;
int score = 100;
int standDre = 0;
int moveNum = 0;
void printMap(int **mapArr,int lineNum,int lieNum);
int move(int mx,int my,int ** mapArr);
... |
/**
* Set up the GL Rendering
*/
#include <stdio.h>
#include <stdlib.h>
#include "../Desktop.h"
#include "GL_Render.h"
const uint8_t shaderCount = 1;
const char* Vertex_Shader_Name = "GLSL_Vertex.glsl";
const char* Fragment_Shader_Name = "GLSL_Fragment.glsl";
GLuint renderProgram = 0;
/*Define the forward declare... |
#include <stdint.h>
#include <string.h>
#include "chacha20.h"
static inline void u32t8le(uint32_t v, uint8_t p[4]) {
p[0] = v & 0xff;
p[1] = (v >> 8) & 0xff;
p[2] = (v >> 16) & 0xff;
p[3] = (v >> 24) & 0xff;
}
static inline uint32_t u8t32le(uint8_t p[4]) {
uint32_t value = p[3];
... |
/* $NetBSD: if_lereg.h,v 1.2 2001/05/27 05:31:58 gmcgarry Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are me... |
/**********************************************************
* Copyright 2022 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 without
* restriction, ... |
/*******************************************************************************
Copyright (c) 2018 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 restr... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
/* $OpenBSD: gscpm.c,v 1.9 2012/08/16 18:42:04 tedu Exp $ */
/*
* Copyright (c) 2004 <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 copies... |
/*
* This file is part of the Nautilus AeroKernel developed
* by the Hobbes and V3VEE Projects with funding from the
* United States National Science Foundation and the Department of Energy.
*
* The V3VEE Project is a joint project between Northwestern University
* and the University of New Mexico. The Hobb... |
/*
* Copyright © 2014 Broadcom
*
* 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, dis... |
/*
* THE FOLLOWING FIRMWARE IS PROVIDED: (1) "AS IS" WITH NO WARRANTY; AND
* (2)TO ENABLE ACCESS TO CODING INFORMATION TO GUIDE AND FACILITATE CUSTOMER.
* CONSEQUENTLY, SEMTECH SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR
* CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
* O... |
/*******************************************************************************
* Copyright (c) 2017 SKT Corp.
*******************************************************************************/
#include "MQTTS7G2.h"
#include "nx_api.h"
#include "common_data.h"
#include "nx_dns.h"
static unsigned long MilliTimer = 0;
u... |
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
* All rights reserved.
*
* This code is derived from software donated to Berkeley by
* <NAME>.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... |
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
/************************************************
rbgtkobject.c -
$Author: ggc $
$Date: 2007/07/13 14:27:10 $
Copyright (C) 2002-2004 Ruby-GNOME2 Project Team
Copyright (C) 1998-2000 <NAME>,
<NAME>,
... |
/*
* px5g - Embedded x509 key and certificate generator based on PolarSSL
*
* Copyright (C) 2009 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License, version 2.1 as published by the Free Software Foundation... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2010 coresystems GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is d... |
/*
* Copyright (c) 2008 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "libgccjit.h"
#include "harness.h"
void
create_code (gcc_jit_context *ctxt, void *user_data)
{
/* Let's try to inject the equivalent of:
double
test_nested_loops (int n, double *a, double *b)
{
double result = 0.;
for (int i = 0; i < n; ... |
/*
* Copyright (C) 2018 "IoT.bzh"
* Author <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 a... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "globals.h"
// Get the price of the booking at the passed index
double CalculatePrice(int index);
// Get the age of the main booker
int EligibleForConcessionDiscount(int index);
void CheckOut() {
printf("\n\nCHECK OUT\n");
print... |
#include "fd_hal_processor.h"
#include "fd_hal_reset.h"
#include "fd_hal_rtc.h"
#include <em_cmu.h>
#include <em_rmu.h>
#include <em_timer.h>
#include <em_wdog.h>
#include <string.h>
#define MAGIC 0xa610efcc
fd_hal_reset_state_t fd_hal_reset_last;
fd_hal_reset_retained_t fd_hal_reset_retained_at_initialize;
static... |
/*****************************************************************************\
** **
** FILE: lock.c **
** AUTHORS: Alexios **
**... |
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <inttypes.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#define WIDTH (1920 / 2)
#define HEIGHT (1080 / 2)
struct image {
SDL_Texture *texture;
char *filename;
};
struct data {
SDL_Window *window;
... |
// SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause
/* Ethtool support for Mellanox Gigabit Ethernet driver
*
* Copyright (C) 2020-2021 NVIDIA CORPORATION & AFFILIATES
*/
#include <linux/phy.h>
#include "mlxbf_gige.h"
#include "mlxbf_gige_regs.h"
/* Start of struct ethtool_ops functions */
static int mlxbf_... |
#define F_CPU 14745600UL
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdio.h>
#include <inttypes.h>
#include "USART2560.h"
#include "USART2560.c"
#include "lcd.c"
#include "init.h"
#include "functions.h"
volatile int8_t usart_data = 0,stall_flag = 0;
/*------------... |
// #define Py_LIMITED_API 0x03050000
#include <Python.h>
#include "stdlib.h"
#define MONO_VERSION "v4.0.30319.1"
#define MONO_DOMAIN "Python"
#include <mono/jit/jit.h>
#include <mono/metadata/environment.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/assemb... |
/**************************************************************************//**
* @file
* @brief Hardware initialization functions.
* @author Silicon Laboratories
* @version 1.0.0 (DM: July 14, 2014)
*
*******************************************************************************
* @section License
* (C) Co... |
/* $OpenBSD: xform.c,v 1.16 2001/08/28 12:20:43 ben Exp $ */
/*-
* The authors of this code are <NAME> (<EMAIL>),
* <NAME> (<EMAIL>),
* <NAME> (<EMAIL>) and
* <NAME> (<EMAIL>).
*
* This code was written by <NAME> for BSD/OS in Athens, Greece,
* in November 1995.
*
* Ported to OpenBSD and NetBSD, with additiona... |
#include "opengl.h"
void glBegin(char name[]){
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Prototype of the Function void glBegin(char name[])
%% Example of the function: glBegin(GL_LINES);
%% This function prepare the program in order to receive points
%% that will be transformed in ... |
/*
* taken from the Bluez Source - http://www.bluez.org/
* hacked into an include by <NAME> - ol at uncon dot org
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
#include <syslog.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <sys/time... |
#include "plic_driver.h"
#include <stddef.h>
// #include "utils.h"
plic_fptr_t isr_table[PLIC_MAX_INTERRUPT_SRC];
interrupt_data_t hart0_interrupt_matrix[PLIC_MAX_INTERRUPT_SRC];
unsigned long read_word(uint32_t *addr)
{
return *addr;
}
/** @fn void write_word(int *addr, unsigned long val)
* @brief writes a val... |
#include "i2c.h"
void i2c_init()
{
// Initialization struct
I2C_InitTypeDef I2C_InitStruct;
GPIO_InitTypeDef GPIO_InitStruct;
// Step 1: Initialize I2C
RCC_APB1PeriphClockCmd(I2Cx_RCC, ENABLE);
I2C_InitStruct.I2C_ClockSpeed = 100000;
I2C_InitStruct.I2C_Mode = I2C_Mode_SMBusHost;
I2C_InitStruct.I2... |
// Grumble mutter fucking POSIX versions... see man feature_test_macros
#define _POSIX_C_SOURCE 200112L
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include "debug.h"
#include "cpu.h"
void mHelp(void) {
printf("m address [length]\n");
printf("\tDump memory\n");
}
void rHelp(void) {
printf("r\... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* output.c :+: :+: :+: ... |
/* SPDX-License-Identifier: MIT */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include "pe.h"
#define ALIGN_UP(val, align) ((val + align - 1) & ~(align - 1))
const size_t ALIGN = 0x1000;
const size_t STRSIZE = 1024;
unsigned long long off... |
/*
* Copyright (c) 2014-2016 Cesanta Software Limited
* All rights reserved
*
*
* This example sets up a simple HTTP server using the Mongoose multi-protocol
* networking library.
*
* It assumes TivaWare is installed under
* ${TI_PRODUCTS_DIR}/TivaWare_C_Series-2.1.3.156. ${TI_PRODUCTS_DIR} is usually... |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim:set expandtab ts=4 shiftwidth=4: */
/*
* Copyright (c) 2008, 2010 Oracle and/or its affiliates, Inc. All rights
* reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU ... |
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
#include <tos/input.h>
#include <tos/signal.h>
#include <tos/stdlib.h>
#include <tos/thread.h>
#include <tos/video.h>
#define STR_(X) #X
#define STR(X) STR_(X)
#define F(x) {if (x == -1) fault(__FILE__ " " STR(__LINE__) ": " #x " == -1");}
#define US_PER_... |
/*
* STM32 - ćwiczenie 5, I2C
* projekt ,,Python w Elektronicznej Sieci''
* <NAME> <<EMAIL>>
*
* opis działania I2C (znaczenie ACK, NACK, START, STOP, ...)
* dla dociekliwych: https://www.ti.com/lit/an/slva704/slva704.pdf
*/
#include <libopencm3/cm3/common.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm... |
/*
* Copyright 2016-2019 NXP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and th... |
/* Line Scan Camera Test Program
* 10/16/2016 : <NAME> (first code)
* 02/01/2017 : <NAME> (refactor)
* 03/03/2017 : TN (displayed camera images to LCD with sampling, commented codes for auto-exposure for fast speed)
*
* Note:
* - The TSL1401-DB contains a TAOS TSL1401R 128-pixel grayscale line scan camera
* ... |
/**
* |----------------------------------------------------------------------
* | 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 restrict... |
/*------------------------------------------------------------------------------
*
* Copyright (c) 2011-2021, EURid vzw. All rights reserved.
* The YADIFA TM software product is provided under the BSD 3-clause license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are perm... |
/* standard library */
#include <assert.h> /* assert */
#include <stdlib.h> /* malloc, atoi */
#include <string.h> /* memset */
#include <stdio.h> /* printf */
#include <time.h> /* nanosleep */
/* external libraries */
#include <pthread.h>
#define MIN(x, y) (x) < (y) ? (x) : (y)
typedef int data_type;
struct ring_b... |
/* kernel/fs/fat.c - kernel FAT driver */
#include <kernel/block.h>
#include <kernel/cdefs.h>
#include <kernel/debug.h>
#include <kernel/endian.h>
#include <kernel/heap.h>
#include <kernel/queue.h>
#include <kernel/thread.h>
#include <kernel/utils.h>
#include <kernel/vfs.h>
#include <kernel/fs/fat_types.h>
#include <ke... |
#include "socketcan.h"
#include <stdio.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <string.h>
int16_t socketcanOpen(CanardSocketInstance *ins, const char *const can_iface_name, const bool can_fd)
{
struct sockaddr_can addr;
struct ifreq ifr;
ins->can_fd = can_fd;
/* open socket */
if ((ins->s = sock... |
#if defined(__APPLE__)
# if defined(NANOVG_GL3_IMPLEMENTATION)
# include <OpenGL/gl3.h>
# else
# include <OpenGL/gl.h>
# endif
#elif defined(_WIN32)
# define WIN32_LEAN_AND_MEAN
# include "windows.h"
# include <GL/gl.h>
# include <GL/glext.h>
#endif
#if defined(_WIN32)
PFNGLACTIVETEXTUREPROC glActiveText... |
/* Project headers */
#include "safe.h"
#include "sargv.h"
#include "rwall.h"
#include "rht-suite.h"
#include "rspeed.h"
/*
* Run a single test.
*
* Iterate to run 'loops' times the same test and evaluate min/avg/max time elapsed
*/
static relapsed_t * run_single_test (rhtsuite_t * test, sw_t * sw,
unsig... |
#include "sys.h"
#include "fontupd.h"
#include "w25qxx.h"
#include "lcd.h"
#include "text.h"
#include "string.h"
#include "usart.h"
//////////////////////////////////////////////////////////////////////////////////
//本程序只供学习使用,未经作者许可,不得用于其它任何用途
//ALIENTEK STM32F103开发板
//汉字显示 驱动代码
//正点原子@ALIENTEK
//技术论坛:www.openedv.com
... |
/*
* Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <stdio.h>
#include <math.h>
#include "pico/stdlib.h"
#include "pico/pdm_microphone.h"
#include "pico/st7789.h"
#include "arm_math.h"
#include "color_map.h"
// constants
#define SA... |
#include "mex.h" /* Always include this */
#include <math.h>
#include "matrix.h"
int findmax(double *A, int L) {
int pos = 0;
int i;
for(i=0;i<L;i++) {
if (A[pos]<A[i])
pos = i;
}
return pos;
}
/*This function uses the symmetric property and computes the agl in one direction*/
vo... |
/*
kmem.c : Static memory allocation.
(C)2012-2013 <NAME>, UnSX Team.
Part of AliceOS, the Alice Operating System.
Released under the MIT License.
*/
#include <sys/types.h>
#include <sys/paging.h>
#include <kdmem.h>
#include <printk.h>
#include <berp.h>
/* in sys/paging.c */
extern pdir_t *kernel_directory;
/* in s... |
//
// Created by xshx on 2021/9/29.
//
#include "uart8.h"
#include "middle/uart8_middle.h"
#include "middle/commen_middle.h"
#define MAX_MSG_LINES 20
#define MAX_MSG_LEN_OF_LINE 256
//extern xQueueHandle Uart5MsgQueue;
static const char *logtag ="[UART8]-";
#define MQTT_CWJAP "+CWJAP:"
#define MQTT_... |
#include <stdio.h>
#include <zmq.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
char *parse(int keer, char *ParseString)
{
char *String,*ParsedString;
String = strdup(ParseString);
for (int i = 0; i < keer; i++)
{
ParsedString = strsep(&String, ">");
}
return ParsedString;
}... |
/*
* Licensed Materials - Property of IBM
*
* trousers - An open source TCG Software Stack
*
* (C) Copyright International Business Machines Corp. 2004
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "trousers/tss.h"
#include "trousers_types.h"
#include "tcs_tsp.h... |
// -*-Mode: C++;-*- // technically C99
// * BeginRiceCopyright *****************************************************
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research and development of
// HPCT... |
/***************************************************************************
begin : Wed Jan 29 2003
copyright : (C) 2003 - 2014 by <NAME>
email : <EMAIL>
***************************************************************************/
/********************************... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "core.h"
/*
* # simple.cfg
* # comment
* k1 v1
* k2 v2 # comment
*/
#define CFG_KEY_COUNT 7
#define C_HTTP_PROXY "http_proxy"
#define C_SOCKS_PROXY "socks_proxy"
#define C_PROXY_ENGINE ... |
/**
* Copyright (c) 2012 the Massachusetts Institute of Technology
*
* 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 us... |
#include<stdio.h>
#include<stdlib.h>
#include<ctype.h>
#include "dll.h"
void performUserSelection(DoublyLinkedList* list, unsigned int option);
void printOptions();
int get_int(unsigned int *px);
int key_match_proton(void* element, void* key);
void print_proton(void* protonItem);
void print_integer(void* intItem);... |
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include "values.h"
#include "gc.h"
#define Null ((value)1)
inline static value cons1(struct thread_info *ti, unsigned char c, value a1) {
value *p;
p=ti->alloc;
ti->alloc=p+2;
p[0] = ((1<<10)|c);
p[1] = a1;
return (value) (p+1... |
#include "free_later.h"
#include "hashmap.h"
// used for testing CAS-retries in tests
volatile uint32_t hashmap_put_retries = 0;
volatile uint32_t hashmap_put_replace_fail = 0;
volatile uint32_t hashmap_put_head_fail = 0;
volatile uint32_t hashmap_del_fail = 0;
volatile uint32_t hashmap_del_fail_new_head = 0;
hashma... |
/* File:
* ex5.16_omp_tokenize_r.c
*
* Purpose:
* Use threads to tokenize text input. This version fixes problems
* with the original tokenize program by replacing str_tok with
* a handwritten threadsafe function.
*
* Compile:
* gcc -g -Wall -fopenmp -o ex5.16_omp_tokenize_r ex5.16_omp_token... |
// =============================================================================
// Company : Unversity of Glasgow, Comuting Science
// Author: <NAME>
//
// Create Date : 2019.06.19
// Project Name : TyTra
//
// Dependencies :
//
// Revision :
// Revision 0.01. File Created
//
// Conventions :
//... |
/* Copyright (c) 2021 <NAME> */
/************************************************************************
SACBUTTER - SAC Butterworth high-pass and/or low-pass filter
*************************************************************************
Author: <NAME>,
RISSC, University of Naples, Italy, September 2009
Versi... |
/*
* Copyright 2006 Sandia Corporation. Under the terms of Contract
* DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
* retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditio... |
// All Copyrights reseved <NAME> 2020
// Project Name : Lib Managemant Sys
// AU1940316
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<windows.h>
void See_Books_List()
{
// defining Variables
FILE *Book_list;
char ch;
int i=0;
int No_of_Books =... |
/*
* Copyright (c) 2002 - 2006, Netherlands Forensic Institute
*
* 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
* ... |
/*
* Copyright (c) 2019-2020, University of Southampton and Contributors.
* All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/* ------ Includes ----------------------------------------------------------*/
#include <stdbool.h>
#include <stdint.h>
#include <support.h>
#include "bme280.h"
#include "st... |
/*
** Zabbix
** Copyright (C) 2001-2021 Zabbix SIA
**
** 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.
**
**... |
/*
* Copyright (C) 2020 Southern Storm Software, Pty Ltd.
*
* 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, ... |
// Meridian 59, Copyright 1994-2012 <NAME> and <NAME>.
// All rights reserved.
//
// This software is distributed under a license that is described in
// the LICENSE file that accompanies it.
//
// Meridian is a registered trademark.
/*
* draw.c: Draw bitmaps.
*
* You must call DrawInit before drawing any bitmaps, ... |
/**
* Copyright (C) Mellanox Technologies Ltd. 2021. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#include "tl_cuda_topo.h"
static ucc_status_t ucc_tl_cuda_topo_init_matrix(ucc_tl_cuda_team_t *team,
ucc_tl_cuda_topo_t *cuda_topo)
{
ucc_rank_t size =... |
/* 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 ... |
/*
* Copyright (c) 2008 <NAME> (snavely (at) cs.washington.edu)
* and the University of Washington
*
* 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 Licens... |
/*
* Copyright 2017~2018 Advanced Micro Devices, 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 rights to use, copy, modi... |
/* kakapo-session - a BGP traffic source and sink */
#define _GNU_SOURCE
#include "stats.h"
#include "kakapo.h"
#include "libutil.h"
#include <assert.h>
#include <pthread.h>
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#define _1e6 (1000000L)
static slp_t statsbase = NULL;
void closelogrecord(slp_t s... |
// #include "pong_networking.h"
// #include "pong_server.h"
// #include "pong_networking.h"
#include "../src/game/pong_game.h"
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <math.h>
#define PACKET_SEPARATOR "--"
typedef unsigned char *byte_pointer;
void... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.