text stringlengths 3.08k 10.5k |
|---|
/**
* \file
*
* Author:
* Mono Project (http://www.mono-project.com)
*
* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2009 Novell, Inc (http://www.novell.com)
* Copyright 2011 <NAME>
* Licensed under the MIT license. See LICENSE file in the project root for full license information.... |
/*
The MIT License (MIT)
Copyright (c) 2017 <NAME>, <NAME>, <NAME>, <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, co... |
/* $OpenBSD: impactreg.h,v 1.1 2012/04/18 17:28:24 miod Exp $ */
/*
* Copyright (c) 2010 <NAME>.
* Copyright (c) 2009, 2010 <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 thi... |
/*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
IN USING, DISPLAYING, A... |
/* $OpenBSD: bha_isa.c,v 1.4 2008/06/26 05:42:16 ray Exp $ */
/* $NetBSD: bha_isa.c,v 1.14 1998/08/15 10:10:51 mycroft Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME>.
*
* Redistribution ... |
/*Ncursed-tanks client, writen by patrol (<NAME>),
* licensed under the MIT license. :
* Copyright (c) 2015, <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... |
/*
* $Id: node_composite_valToRgb.c 39944 2011-09-05 22:04:30Z gsrb3d $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of th... |
//------------------------------------------------------------------------------
// GB_AxB_saxpy5: compute C+=A*B
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, <NAME>, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//------------... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
#include<stdbool.h>
//Boards that are global.
//Playerboard is the board where player guesses.
//cpuboard is the board where cpu guesses
// Legend for each Symbol
// o -- cpu tile that is not yet guessed by the player. Exist on playerboar... |
/*
*Calling sequence:
* Pt = countSketch( At, indx_map, mSmall, s )
*
* A is a mBig x N matrix and At is its transpose
* P is a mSmall x N matrix, and Pt is its transpose
* indx_map is a int64 vector of length mBig where each entry
* is an integer in [1,mSmall] (i.e., 1-based indexing, Matlab-style)
*... |
/*
The UCT IMS Client
Copyright (C) 2006 - University of Cape Town
<NAME> <<EMAIL>>
<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 3 of the License, or
... |
/*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (C) 2007-2015 RELIC Authors
*
* This file is part of RELIC. RELIC is legal property of its developers,
* whose names are not listed here. Please refer to the COPYRIGHT file
* for contact information.
*
* RELIC is free software; you can redistribute... |
#pragma ident "$Id: connect.c,v 1.1 2016/06/06 21:51:36 dechavez Exp $"
/*======================================================================
*
* Connect to a MODBUS TCP server and do the library handshake
*
*====================================================================*/
#define TS_INCLUDE_STATIC_TS_DES... |
/*----------------------------------------------------------------------------
* File: ooaofooa_S_DOM_class.c
*
* Class: Domain (S_DOM)
* Component: ooaofooa
*
* your copyright statement can go here (from te_copyright.body)
*-----------------------------------------------------------------------... |
#include <openssl/evp.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
#include <gmp.h>
typedef struct{
unsigned char value[EVP_MAX_MD_SIZE];
unsigned int len;
} KeyBlock; /* Hash output */
typedef struct{
int w, n, t, t1, t2;
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <math.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
void read_matrix(int** index, int** matrix, double scaling, int N_kw, char* input_fileName)
{
FILE *fp = fop... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "defs.h"
/* Create 1/2 a gaussian function, using the given dimension and sigma */
void createGauss(int dim, double sigma, double g[])
{
int i;
double e;
if (DEBUG)
printf("Creating gaussian (size: %d, sig: %2.4f)\n", dim, sigma);
... |
/*
TRABALHO DE IMPLEMENTACAO DE ARVORE BINARIA DE BUSCA BALANCEADA (AVL)
AUTOR: <NAME> e <NAME>
DATA CRIACAO: 11/03/2021
ARQUIVO: .c
*/
#include <string.h>
#include "ArvBinAvl.h"
/*------------------------------------------ Estrutura da info do no -----------------------------------------*/
typedef struct infoClient... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
#include "symbol.h"
#include "temp.h"
#include "tree.h"
#include "absyn.h"
#include "assem.h"
#include "frame.h"
#include "graph.h"
#include "color.h"
#include "flowgraph.h"
#include "liveness.h"
#include "regalloc.h"
#include "table.h"
stati... |
#include "kernel.h"
void init_array(data_t A[N][N])
{
int i, j;
for (i = 0; i < N; i++)
{
for (j = 0; j <= i; j++)
A[i][j] = (data_t)(-j % N) / N + 1;
for (j = i + 1; j < N; j++) {
A[i][j] = 0;
}
A[i][i] = 1;
}
/* Make the matrix positive semi-definite. */
/* not necessary for... |
#include "bip39.h"
#include "BRCrypto.h"
#include <stdio.h>
#include <assert.h>
#include "random.h"
#include "BRInt.h"
#include "words/chinese_tr.h"
#include "words/chinese_zh.h"
#include "words/english.h"
#include "words/french.h"
#include "words/italian.h"
#include "words/japanese.h"
#include "words/korean.h"
#inclu... |
/*
* Document-class: LibXML::XML::XPath
*
* The XML::XPath module is used to query XML documents. It is
* usually accessed via the XML::Document#find or
* XML::Node#find methods. For example:
*
* document.find('/foo', namespaces) -> XML::XPath::Object
*
* The optional namespaces parameter can be a s... |
/*
* Copyright (c) 1991 <NAME>
*
* Disclaimer: No guarantees of performance accompany this software,
* nor is any responsibility assumed on the part of the authors. All the
* software has been tested extensively and every effort has been made to
* insure its reliability.
*/
/*
* histo - compute grey-level hi... |
#include "./common.h"
void render_line(SDL_Renderer *renderer,
Vec2 begin, Vec2 end,
uint32_t color)
{
check_sdl_code(
SDL_SetRenderDrawColor(renderer, HEX_COLOR(color)));
check_sdl_code(
SDL_RenderDrawLine(
renderer,
(int) floorf(begin... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "digraph.h" /* Ficheiro de interface do TAD */
void EscreverMensagemErro (unsigned int, char *);
void LerVertice (unsigned int *);
void EscreverDigrafo (PtDigraph);
void PrintQueue (PtQueue, char *);
void PrintQueuePair... |
#define _XOPEN_SOURCE
#include "smallsh.h"
#include <sys/types.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
char *prompt = "Dare un comando>";
struct sigaction sigStruct;
int procline(void) /* tratta una riga di input */
{
char *arg[M... |
/* *INDENT-OFF* */
/*INDENT OFF*/
/* Description: C source code for handling file and directory paths
*/
/******************************************************************************
* This software is covered by the zlib/libpng license.
* The zlib/libpng license is a recognized open source license by
* the Open Sour... |
/*
* Copyright 2020-present MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <sys/stat.h>
#include <time.h>
uint64_t getBit(unsigned char *buf, uint64_t *boff, uint64_t gbit) {
// おおまかな動き
// 下記の例は最初の4ビットから後ろの2ビットを取り出す操作。
// - まずはtnumにサイズ上限まで突っ込む(ここでは2バイト/16bitの例)
// 1byte ... |
#include "u.h"
#include "lib.h"
#include "dat.h"
#include "fns.h"
#include "error.h"
#include <draw.h>
#include <memdraw.h>
#include "screen.h"
#define MINX 8
#define Backgnd 0xFF /* white */
Memsubfont *memdefont;
struct{
Point pos;
int bwid;
}out;
Lock screenlock;
Memimage *conscol;
Memimage *back;
exter... |
/* $NetBSD: output_cdb.c,v 1.1 2010/04/25 00:54:46 joerg Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME>.
*
* Redistribution and use in source and binary forms, with or without
* modific... |
/* head.c
HW #1 - Operating Systems - CS-GY 6233
Spring 2019 - NYU Bridge to Tandon
<NAME> and <NAME>
n.b.: Additional behaviors have been added, in emulation of Linux
functionality, that were not explicitly asked in assignment.
When no arguments are passed to 'head':
reads standard input
Wh... |
//Ultra simple http server based on
//Echoserv by <NAME>, 1999
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <arpa/inet.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
/* Global constants */
#define HTTP_PORT... |
/*
** server.c -- a stream socket server demo
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <signal.h>
#include <pthrea... |
/*
* test_set.c
*
* Test executable for the set implementation.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "unit_set.h"
/* test names */
const char* tests[UNIT_SET_NUM_TESTS] = {
"test_set_init_normal",
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
typedef struct{
char *object[3];
char *orbits[3];
} orbit;
static char *my_itoa_base_helper(char *dest, size_t size, int x, int base) {
if (size == 0) return NULL;
int digit = -(x%base);
x /= base;
if (x) {
dest = my_itoa_b... |
/*
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Publi... |
/* $OpenBSD: i2c_exec.c,v 1.2 2008/04/17 16:48:40 deraadt Exp $ */
/* $NetBSD: i2c_exec.c,v 1.3 2003/10/29 00:34:58 mycroft Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
* All rights reserved.
*
* Written by <NAME> for Wasabi Systems, Inc.
*
* Redistribution and use in source and binary forms, with or wi... |
/*
* This file is part of the SSH Library
*
* Copyright (c) 2009 by <NAME>
* Copyrihgt (c) 2018 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2... |
#include <stdio.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <fcntl.h>
#include <pcap/pcap.h>
#include <lwip/init.h>
#include <lwip/netif.h>
#include <lwip/ethip6.h>
#include <netif/etharp.h>
#include <lwip/udp.h>
#include <lwip/mld6.h>
#include <lwip/timeouts.h>
#include <ftpd.h>
#includ... |
/*
* 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 ... |
#include "u.h"
#include "lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "io.h"
#include "ureg.h"
/*
* 8253 timer
*/
enum
{
T0cntr= 0x40, /* counter ports */
T1cntr= 0x41, /* ... */
T2cntr= 0x42, /* ... */
Tmode= 0x43, /* mode port */
/* commands */
Latch0= 0x00, /* latch counter 0's ... |
#include "xgpio.h"
#include "xexception_l.h"
#include "xintc.h"
#include "warp_userio.h"
#include "xparameters.h"
//Shortcuts for constants in xparameters.h
#define INTC_DEVICE_ID XPAR_XPS_INTC_0_DEVICE_ID
#define USERIO_DEVICE_ID XPAR_USER_IO_DEVICE_ID
#define USERIO_IRPT_ID XPAR_XPS_INTC_0_USER_IO_IP2INTC_IRPT_IN... |
/*Daala video codec
Copyright (c) 2015 Daala project contributors. 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 o... |
#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdbool.h>
#include <errno.h>
#include "SysStatChecker.h"
#define REP_TIME 3
#define MAX_ITEMS 8
#define LOG_ERR 2
//private variables
sta... |
#include "ships.h"
/* ships.c */
/* ship definition file */
/* we store a lot of ship details here. */
const ship_type_t shiptable[8] = {
// max_special_ttl is used for a variety of functions, depending.
// copying from doc and will sort later.
// type_name,
// max_hp, max_dmg, max_energy, max_bullets,
... |
/*
* AES-based functions
*
* - AES Key Wrap Algorithm (128-bit KEK) (RFC3394)
* - One-Key CBC MAC (OMAC1) hash with AES-128
* - AES-128 CTR mode encryption
* - AES-128 EAX mode encryption/decryption
* - AES-128 CBC
*
* Copyright (c) 2003-2007, <NAME> <<EMAIL>>
*
* This program is free software; you can redis... |
// Copyright (c) 1980, InfoCom Computers and Communications, Cambridge MA 02142
// All rights reserved, commercial usage strictly prohibited.
// Written by <NAME>.
// Revisions Copyright (c) 2021, <NAME> (<NAME>).
#include "extern.h"
#include "common.h"
// Find exit from room
bool findxt(int dir, int rm) {
// System g... |
/**************************************************************/
/* Modul: check if Program is allowed to run */
/* */
/* Copyright: Yafra.org, Switzerland */
/**************************************************************/
#... |
/* www.GeeksBR.com */
/* Implementação de árvore binária */
#include <stdio.h>
#include <stdlib.h>
/* Cada nó armazena três informações:
nesse caso um número (num),
ponteiro para subárvore à direita (sad)
e ponteiro para subárvore à esquerda (sae).*/
typedef struct tree
{
char a;
int b;
struct tree... |
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <ctype.h>
#include <errno.h>
/*
*
... |
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or dis... |
// test_main.c
// 2020-01-23 <NAME> <<EMAIL>>
// Copyright (c) 2020, PQShield Ltd. All rights reserved.
// Minimal unit tests for AES-128/192/256 (FIPS 197) and SM4 (GM/T 0002-2012).
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "aes_wrap.h"
#include "saes32.h"
#include... |
/* usrNetPool.c - the network buffer configuration */
/*
* Copyright (c) 2001-2006 Wind River Systems, Inc.
*
* The right to copy, distribute or otherwise make use of this software
* may be licensed only pursuant to the terms of an applicable Wind River
* license agreement. No license to Wind River intelle... |
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/socket.h>
#include <resolv.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h... |
/*
These routines are just misc routines used by IO.C
*/
#include <ozinput.h>
#define HEADER
#include "arvar.c"
/* #define BENCHMARK */
/* The boards at the start of a game */
static tiny sboard[64]=
{ROOK ,KNIGHT,BISHOP,QUEEN ,KING ,BISHOP,KNIGHT,ROOK ,
PAWN ,PAWN ,PAWN ,PAWN ,PAWN ,... |
/* packet-pdcp-lte.h
*
* <NAME>
* Wireshark - Network traffic analyzer
* By <NAME> <<EMAIL>>
* Copyright 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
... |
/*
Copyright (c) 2014, <NAME>
All rights reserved.
This file is part of the hyLISP project.
http://hylisp.org
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 copyri... |
#include "con_term.h"
#include "con_parse.h"
#include "con_alloc.h"
#include "mpc.h"
#define NUM_PARSERS 9
struct con_parser_t {
mpc_parser_t* con;
mpc_parser_t* fixnum;
mpc_parser_t* flonum;
mpc_parser_t* reserved;
mpc_parser_t* operator;
mpc_parser_t* boolean;
mpc_parser_t* symbol;
... |
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-04-16 bigmagic first version
* 2021-12-28 GuEe-GUI add smp support
*/
#include <rthw.h>
#include <rtthread.h>
#include "board.h"
#... |
#include <stdbool.h>
#include <aos/aos.h>
#include <yoc/yoc.h>
#include <devices/devicelist.h>
#include <devices/drv_snd_pangu.h>
#ifdef CONFIG_CSI_V2
#include <drv/gpio_pin.h>
#include <drv/pin.h>
#else
#include "pinmux.h"
#include "pin_name.h"
#endif
#include "app_init.h"
#include "board.h"
#include "app_main.h"
c... |
/*
Copyright 2010 SourceGear, LLC
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 writing, software
dis... |
/**
* @file idio_sample2.c
* @author $Format: %an <%ae>$
* @date $Format: %ad$
* @version $Format: %h$
*
* @page usb_idio_sample2 idio_sample2.c
*
* @par Sample2
*
* sample2.c is simple program that demonstrates using
* the AIOUSB C library's Continuous mode acquisition API.
*
*
* @todo... |
/* set.c - Splay tree set
*
* Copyright 2004, 2011 <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 ... |
/* hough transform
*
* 7/3/14
* - from hist_find.c
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(... |
/*
* Copyright (c) 2016 - Qeo LLC
*
* The source code form of this Qeo Open Source Project component is subject
* to the terms of the Clear BSD license.
*
* You can redistribute it and/or modify it under the terms of the Clear BSD
* License (http://directory.fsf.org/wiki/License:ClearBSD). See LICENSE file
* fo... |
#include "pgqd.h"
#include <getopt.h>
#include <errno.h>
#include <signal.h>
#include <usual/event.h>
#include <usual/string.h>
#include <usual/alloc.h>
#include <usual/daemon.h>
#include <usual/cfparser.h>
#include <usual/time.h>
static const char *usage_str =
"usage: pgq-ticker [switches] config.file\n"
"Switches:... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define MAXCHAR 10000
// FORWARD DECLARETION
int stringNullorEmpty(char *str);
// Functions
// This function checks if string is null or is empty
// return 0 if not null or empty
// return 1 if is null or empty
int stringNullor... |
#include "counter.h"
#include "dspair.h"
#include "hashtable.h"
#include "util.h"
#undef NDEBUG
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#d... |
/*
* Copyright (c) 2017-2019 Cisco and/or its affiliates.
* 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 appl... |
/*
This is the entry point for the program it's job is to parse command line
output and spawn the relevant threads.
*/
#include <getopt.h>
#include <locale.h>
#include <unistd.h>
#include <ncurses.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <signal.h>
#include <string.h>
#include ... |
/*
* Copyright 2017 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "fsl_spi.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
#include "fsl_debug_console.h"
/*******************************************************************************
* Definitions
******... |
#include <stdio.h>
#include <stdint.h>
#include <perf.h>
#include <kperf.h>
void
create_perf_counters_tbl(struct ctrs * ctrs)
{
ctrs->setup.cycles = 0;
ctrs->setup.tot.imcR = 0;
ctrs->setup.tot.imcW = 0;
ctrs->setup.tot.edcR = 0;
ctrs->setup.tot.edcW = 0;
ctrs->timestep.cycles = 0;
ctrs->timestep.tot.i... |
#include "serializer.h"
#include "dstring.h"
#include "hashmap.h"
#include "lzf.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include <string.h>
void sdump_compress(unsigned char *data, uint64_t original_size) {
FILE *compressed = fopen("fist.db", "wb");
fwrite(&original_size, sizeof(original_... |
// pagerank.c file
// reads data from a txt file
// builds graph structure with connections between files
// adds page weight rank to each vertex of the graph using algorithm
// takes in 3 arguments:
// d - dampening factor
// diffPR - difference in page rank sum
// maxiterations - max iterations
// o... |
/*
* Copyright (c) 2011-2012,2014 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in... |
/**
* @file i2c.c
* @author Nikolay
* @license MIT
* @date 2020-07-11
* @brief File wrapper for i2c interface
*
*
*/
#include "i2c.h"
#include <stdint.h>
#include "stm32f1xx_hal.h"
#include "stm32f1xx_hal_i2c.h"
#define ST_I2C_BUS I2C1
#define ST_I2C_SPEED 400000
#define I2C_SCL_PIN ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void HTMLheader(void) {
printf("Content-Type: text/html;charset=UTF-8\n\n");
printf("<html>\n");
printf("<head>\n");
// printf("<meta http-equiv=\"refresh\" content=\"2; URL=Server.cgi?on=0\">\n\n");
printf("<link rel=\"stylesheet\" type=\"text/css\" href=... |
/* It's a special example for indoor machine with touch IC "IT7260". */
/* You will learn how I2C itp driver read/write I2C slave device. */
/* You will learn I2C read operation in _readQueryBuffer() & _readPointBuffer().*/
/* You will also learn I2C write operation in _writeCommandBuffer(). */
#include <s... |
//
// main.c
// 7.8 prog 2 tic tac win
//
// Created by <NAME> on 8/29/20.
// Copyright © 2020 <NAME>. All rights reserved.
//
/*
* From Hanley and Koffman's "Problem Solving
* and Program Design in C", 7th Ed.
* Chapter 7, section 9, Programming question #2:
*
* Write a function that determines who has won
... |
#include <stdlib.h>
#include <string.h>
#include "log.h"
#include "sys-socket.h"
#include "mod_proxy_core_address.h"
static proxy_address *proxy_address_init(void) {
proxy_address *address;
address = calloc(1, sizeof(*address));
address->name = buffer_init();
address->used = 0;
return address;
}
static void ... |
#include "d2p.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <omp.h>
void sequential_merge(int* array, int p1, int r1, int p2, int r2, int* result, int p3)
{
int offset = 0;
while(p1 <= r1 || p2 <= r2){
if(p1 > r1)
result[p3 + offset++] = array[p2++];
else ... |
/* -*- mode: C; c-basic-offset: 2; indent-tabs-mode: nil; -*- */
#include <gtk/gtk.h>
#include <math.h>
#include <string.h>
#include "frame-stats.h"
#define RADIUS 64
#define DIAMETER (2*RADIUS)
#define WIDTH 600
#define HEIGHT 600
#define WINDOW_SIZE_JITTER 200
#define CYCLE_TIME 5.
static GtkWidget *window;
stati... |
/* CODA firmware information tool
* SPDX-License-Identifier: 0BSD
*/
#include <stdint.h>
#include <stdio.h>
#include <sys/fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "reorder.h"
#define MAX_TEMPLATE_LEN 12
enum coda_product_id {
CODA_MX27_TO1 = 0xf000,
CODA_DX... |
/* USER CODE BEGIN Header */
/* SPDX-License-Identifier: ISC */
/**
* Licensing and copyright: See the file `LICENSE.txt`
*
* Hardware:
* UART RX (Input) Pin: GPIO_PIN_11 GPIOB (PB11)
* Indication LED Pin: GPIO_PIN_13 GPIOC (PC13)
* USB FS interface in device mode.
* USB Host (Personal Computer)... |
/*
* OpenSplice DDS
*
* This software and documentation are Copyright 2006 to TO_YEAR PrismTech
* Limited, its affiliated companies and licensors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complia... |
/*
* Cipher performance check
*
* Copyright (C) 2018-2019 Red Hat, Inc. All rights reserved.
* Copyright (C) 2018-2019 <NAME>
*
* This file is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either... |
#include <stdio.h>
#include <winsock2.h>
#include <Windows.h>
#define MIN_PAYLOAD_SIZE 12
int initSockets(SOCKET *sd);
int sendPacket(SOCKET *sd, SOCKADDR_IN *dest_addr, char *message, int size);
int sendLoop(SOCKET *sd, SOCKADDR_IN *dest_addr, int interval, int sendsize);
float seconds_after_midnight_utc();
int m... |
#include "mygl.h"
//
// >>> Defina aqui as funções que você implementar <<<
//
struct ponto
{
int x;
int y;
};
struct cor
{
float red;
float blue;
float green;
float alpha;
};
void PutPixel(Ponto ponto, Cor cor){
fb_ptr[4*((int)ponto.x) + 4*((int)ponto.y)*IMAGE_WIDTH + 0] = cor.red;
... |
#include "./cub3D.h"
/*****************************************
* 1.2. check_extention_argv *
******************************************
*/
void check_extention_argv(char *argv, char *cub_flag, int nb)
{
int i;
i = 0;
while (argv[i])
i++;
if ((i + 1) > (4 + nb))
while (*cub_flag && !(argv[i++ - (4 + n... |
/* Copyright (c) 2014-2016, Schmidt, Heckendorf
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 o... |
int enet_address_host_is_any_(struct _all_host_address *host) {
static char zero[sizeof(struct _all_host_address)] = {0};
struct _all_host_address *temp = (struct _all_host_address *)&zero;
return enet_address_host_equal(*temp, *host);
}
int enet_address_set_host_ip(ENetAddress *address, const char *name) {
int r... |
/*
* ========================
* ===== ===============
* ====== ================
* ====== ================
* ====== ==== ==== ==
* ====== === == = =
* ====== === = == =
* = === === = == ====
* = === === = == = =
* == ===== ==== ==
* ========================
*
* SPD... |
/**
******************************************************************************
* @file BSP/Src/audio_loopback.c
* @author MCD Application Team
* @brief This example code shows how to use the audio feature in the
* stm32f7508_discovery driver
***********************************************... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <termios.h>
#include "utf8.h"
#include "parse.h"
#include "adventure.h"
struct winsize w;
int col = 0; // cursor position
struct termios t;
enum Delimiter {
WT_NEWLINE,
WT_BLANK... |
/**
* @file setup.c
* The RTuinOS application is initialized. The DCF task starts running and each decoded
* time telegram is reported via Serial at 115200 bps. (The none standard, high rate is
* needed to not affect the task timing too much.)\n
* Additional information about the status of DCF reception and de... |
/*
* MIT License
*
* Copyright (c) 2021 Newracom, 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, m... |
#include "common.h"
#include "ABC.h"
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <signal.h>
typedef struct sThread
{
char *szUUID;
pthread_t watcher_thread;
} tThread;
#define MIN_BALANCE 10000
static bool running = true;
sta... |
/************************************************************/
/* Windows Write, Copyright 1985-1992 Microsoft Corporation */
/************************************************************/
/* This file contains the definition of the numerical indexes to the dialog
items (idi) used by Windows Memo. */
/* IDOK and... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2017 Advanced Micro Devices, Inc.
*
* 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.