text stringlengths 84 499k | source stringclasses 6
values | slice stringclasses 1
value | est_tokens int32 24 143k | score float32 |
|---|---|---|---|---|
<reponame>cwolsen7905/UbixOS
/* $NetBSD: longjmp.c,v 1.1 2005/09/17 11:49:39 tsutsui Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> and <NAME>.
*
* Redistribution and use in source and b... | code_c | code | 1,048 | null |
#include <Windows.h>
static PCTSTR get_pszArgv0(void)
{
PCTSTR p = GetCommandLine();
if (*p == '\"') {
for (++p; *p++ != '\"';);
}
else {
for (++p; *p++ != ' ';);
}
while (*p == ' ') ++p;
return p;
}
static BOOL tryParseToShort(PCTSTR *pp, SHORT *pVal)
{
PCTSTR p = *pp;
if (*p >= '0' && *p <= '9') {
*p... | code_c | code | 332 | null |
// Copyright 2016 Eotvos Lorand University, Budapest, Hungary
//
// 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... | code_c | code | 427 | null |
/*
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"
uint64_t x41 = UINT64_MAX;
int16_t x42 = -1;
volatile uint16_t x139 = 12U;
uint32_t x280 = 129027402U;
uint8_t... | code_c | code | 15,394 | null |
#include <math.h>
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
#include "GodHands.h"
extern LOGGER Logger;
float Cam_RotX;
float Cam_RotY;
float Cam_RotZ;
static PIXELFORMATDESCRIPTOR pfd = {
sizeof(pfd),0x01,0x25,0,0x10,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10
};
i... | code_c | code | 1,879 | null |
//
// JTEmojiPageCell.h
// JTYYTextTestDemo
//
// Created by wangjintao on 2019/4/5.
// Copyright © 2019年 wangjintao. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class JTEmojiModel;
@interface JTEmojiPageCell : UICollectionViewCell
@property (nonatomic,strong)NSArray <JTEmojiModel *... | code_c | code | 103 | null |
// generated from rosidl_generator_c/resource/idl.h.em
// with input from test_msgs:msg/Arrays.idl
// generated code does not contain a copyright notice
#ifndef TEST_MSGS__MSG__ARRAYS_H_
#define TEST_MSGS__MSG__ARRAYS_H_
#include "test_msgs/msg/detail/arrays__struct.h"
#include "test_msgs/msg/detail/arrays__functions... | code_c | code | 119 | null |
/*
* Copyright (c) 2018 - 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: BSD-5-Clause-Nordic
*/
#ifndef NRF_ERRNO_H__
#define NRF_ERRNO_H__
/**
* @file nrf_errno.h
* @defgroup nrf_errno Integer values for errno
* @ingroup ble_controller
*
* Used by system calls to indicates the latest error.
* @... | code_c | code | 425 | null |
//
// ViewController.h
// FEParallaxCell
//
// Created by keso on 16/1/22.
// Copyright © 2016年 FlyElephant. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MainViewController : UIViewController
@end
| code_c | code | 62 | null |
<gh_stars>1-10
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. ... | code_c | code | 42,131 | null |
<reponame>djeada/Od-C-do-Cpp
#include <stdio.h>
void zmien_wsk(int *wsk, int b) { wsk = &b; }
void zmien_wsk2(int **wsk, int b) { *wsk = &b; }
int main() {
int a = 10;
int *p = &a;
int **pp = &p;
printf("Wartość zmiennej a: %d\n", a);
printf("Wartość zmiennej na którą wskazuje wskaźnik p: %d\n", *p);
pr... | code_c | code | 283 | null |
Adafruit_AlphaNum4 alpha4 = Adafruit_AlphaNum4();
unsigned long lastMQTTChannelBlink = 0;
bool settingMQTTChannel = false;
void display_init()
{
alpha4.begin(DISPLAY_ADDRESS);
}
void display_print(String message)
{
//debug("Showing " + message + " in the display.");
if (message.length() > 0)
a... | code_c | code | 477 | null |
<reponame>ChristianAndersen/DJReader
//
// ADSDrawView.h
// MyDemos
//
// Created by dianju on 16/5/3.
// Copyright © 2016年 Andersen. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ADSPen.h"
@interface ADSDrawPath : NSObject
@property (nonatomic) NSMutableArray* pointStrings;
@property (nonatomic) NSMut... | code_c | code | 362 | null |
<reponame>ekmixon/AliOS-Things<filename>components/oss/src/oss_app.h
/*
* Copyright (C) 2015-2021 Alibaba Group Holding Limited
*/
#ifndef SSH_ERLANGSHEN_OSS_APP_H
#define SSH_ERLANGSHEN_OSS_APP_H
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
char* oss_upload_local_file(char *keyId, char *keySecret, c... | code_c | code | 226 | null |
#include <linux/uaccess.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/cdev.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/mm.h>
#include <lin... | code_c | code | 777 | null |
<filename>CSE_301L-Operating Systems Lab/Assignment 1/dec2bin2.c
#include<stdio.h>
int dec2bin(n){
int binary = 0;
int remainder, i;
for(i = 1; n != 0; i = i * 10)
{
remainder = n % 2;
n /= 2;
binary += remainder * i;
}
return binary;
}
int main(){
int n = 10;
printf("binary number: %d\n", dec2bin(n))... | code_c | code | 95 | null |
#include <sys/time.h>
#include <time.h>
int gettimeofday(struct timeval* restrict tv, void* restrict tz) {
struct timespec ts;
if (!tv)
return 0;
if (clock_gettime(CLOCK_REALTIME, &ts) != 0)
return -1;
tv->tv_sec = ts.tv_sec;
tv->tv_usec = (int)ts.tv_nsec / 1000;
return 0;
}
| code_c | code | 84 | null |
/*
* cl_post_image_processor.h - CL post image processor
*
* Copyright (c) 2015 Intel Corporation
*
* 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/lice... | code_c | code | 1,524 | null |
<filename>xdpoc/Classes/UIView+ShortCut.h<gh_stars>0
//
// UIView+ShortCut.h
// xdpoc
//
// Created by Wu,Xinting on 2018/5/28.
//
#import <UIKit/UIKit.h>
@interface UIView (ShortCut)
@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat top;
@prop... | code_c | code | 264 | null |
/* ************************************************************************** */
/* */
/* :::::::: */
/* parse_normal.c :+: :+: ... | code_c | code | 354 | null |
<reponame>Magtheridon96/Unfinished-RPG
#pragma once
#include "Animation.h"
#include "EntityType.h"
#include "Orientation.h"
#include "SFML/Graphics.hpp"
#include "PathMap.h"
#include "Rect.h"
#include <vector>
#include <memory>
class context;
class entity_modifier;
class entity {
private:
std::vector<std::unique_p... | code_c | code | 908 | null |
/**
* \file
*
* \brief SAM architecture specific IOPORT service implementation header file.
*
* Copyright (c) 2012-2016 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provid... | code_c | code | 2,520 | null |
<reponame>jnpr-pranav/contrail-controller
//
// Copyright (c) 2017 <NAME>, Inc. All rights reserved.
//
#ifndef AGENT_SIGNAL_H_
#define AGENT_SIGNAL_H_
#include <io/process_signal.h>
class EventManager;
class AgentSignal {
public:
AgentSignal(EventManager *evm);
~AgentSignal();
void Terminate();
v... | code_c | code | 154 | null |
<filename>libintelprov/flash_gpt/bootimage.c
/*
* Copyright 2014 Intel Corporation
*
* 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
*... | code_c | code | 1,098 | null |
/*
c176.h version $Date$
<NAME>
<NAME>
Public domain.
*/
#define VEC4_ROT(a,imm) _mm_or_si128(_mm_slli_epi32(a,imm),_mm_srli_epi32(a,(32-imm)))
/* same, but replace 2 of the shift/shift/or "rotation" by byte shuffles (8 & 16) (better) */
#define VEC4_QUARTERROUND_SHUFFLE(a,b,c,d) \
x... | code_c | code | 1,614 | null |
#ifndef GAME_OBJECT
#define GAME_OBJECT
#include <string>
#include <iostream>
using namespace std;
class GameObject
{
public:
GameObject();
GameObject(string name);
virtual ~GameObject () { }
string get_name();
void set_name(string name);
virtual void display();
private:
string name;
};
#endif
| code_c | code | 90 | null |
<filename>src/binance/binance-depth.h
#ifndef CCXS_BINANCE_DEPTH_H
#define CCXS_BINANCE_DEPTH_H
#include "cjson/cJSON.h"
#include "../depth.h"
#include "../ws/client-server-protocol.h"
OrderBookLevel2 *
binance_parse_depth_update(const char *json_string);
#endif //CCXS_BINANCE_DEPTH_H
| code_c | code | 82 | null |
<reponame>sezero/windows-sdk-headers
// C++/WinRT v2.0.190620.2
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef WINRT_Windows_System_UserProfile_H
#define WINRT_Windows_System_UserProfile_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERS... | code_c | code | 18,198 | null |
<filename>ui/app_list/cocoa/blue_label_button.h
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_APP_LIST_COCOA_BLUE_LABEL_BUTTON_H_
#define UI_APP_LIST_COCOA_BLUE_LABEL_BUTTON_H_
#import <Co... | code_c | code | 205 | null |
<reponame>pwmt/libzathura
/* See LICENSE file for license and copyright information */
#ifndef LIBZATHURA_ANNOTATION_COLOR_SPACE_H
#define LIBZATHURA_ANNOTATION_COLOR_SPACE_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Defines the different supported color spaces.
*/
typedef enum zathura_anno... | code_c | code | 287 | null |
/* Abstract Machine for the Pawn compiler, debugger support
*
* This file contains extra definitions that are convenient for debugger
* support.
*
* Copyright (c) ITB CompuPhase, 2005-2011
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance ... | code_c | code | 1,858 | null |
#include "apiorig.h"
#include "sample.h"
#include "fips202.h"
#include "randombytes.h"
#include <math.h>
#include <stdbool.h>
/*#include "CDT.h"*/
#define IFMORE64(val, gauge, expr) ((((gauge) - (val)) >> (63)) & (expr))
#define SIGMA_2 0.84932180028801904272150283410289 /**This is the same for any sigma*/
#define... | code_c | code | 3,885 | null |
#ifndef SUDOKU_EMPTY_CELL
#define SUDOKU_EMPTY_CELL
#include <set>
namespace sudoku {
struct Cell {
int row;
int col;
std::set<char> possibleValues;
Cell(int r, int c, std::set<char>& vals)
: row(r), col(c), possibleValues(vals) {}
Cell(const Cell& other)
: row(other.row),... | code_c | code | 123 | null |
/*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2004-2007 <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,... | code_c | code | 2,782 | null |
<gh_stars>1-10
#pragma once
#include <string>
class Entity
{
public:
Entity() :tag_("") {}
Entity(const char* tag) :tag_(tag) {}
const std::string& getTag() const { return tag_; }
private:
std::string tag_;
};
| code_c | code | 62 | null |
<filename>include/simppl/detail/validation.h
#ifndef SIMPPL_DETAIL_VALIDATION_H
#define SIMPPL_DETAIL_VALIDATION_H
namespace simppl
{
namespace dbus
{
namespace detail
{
struct InOutThrowOrOneway
{
template<typename T>
struct apply_
{
static_assert(is_in<T>::value || is_out<T>::value || std::i... | code_c | code | 192 | null |
#ifndef INCLUDED_CALC_ASTSTAT
#define INCLUDED_CALC_ASTSTAT
#ifndef INCLUDED_STDDEFX
#include "stddefx.h"
#define INCLUDED_STDDEFX
#endif
// Library headers.
// PCRaster library headers.
// Module headers.
#ifndef INCLUDED_CALC_ASTNODE
#include "calc_astnode.h"
#define INCLUDED_CALC_ASTNODE
#endif
#ifndef INCLUDE... | code_c | code | 971 | null |
<reponame>dchechel/sysrepo
/**
* @file system_helper.h
* @author <NAME> <<EMAIL>>, <NAME> <<EMAIL>>,
* <NAME> <<EMAIL>>
* @brief API of helper functions for interaction with the underlying system
* for testing purposes.
*
* @copyright
* Copyright 2016 Cisco Systems, Inc.
*
* Licensed under the... | code_c | code | 1,117 | null |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
int maxdepth=10;
int mode=0; // 0 .. count, 1 .. output
int skip_last=0;
long *counter;
char **lookup;
const char * pattern[] = {
"HB", "KO", "KK", "PF", "VB", "KC", "BP", "SS", "BS", "PB", "VH", "BK", "BO", "HN", "... | code_c | code | 1,003 | null |
#pragma once
#include "DisplayTask.h"
class DisplayTask_Countdown : public DisplayTask {
public:
DisplayTask_Countdown();
void loadConfig(const int16_t base);
void reset();
void pause();
void resume();
void start();
bool refresh() override;
unsigned long timeReset;
void handleButtonPress(const Button but... | code_c | code | 163 | null |
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | code_c | code | 413 | null |
#ifndef _PARSENUM_H_
#define _PARSENUM_H_
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
/* Handle compiler warnings about implicit variable conversion in PARSENUM. */
#ifdef __clang__
/* Disable clang warnings. */
#define PARSENUM_PROLOGUE ... | code_c | code | 1,796 | null |
#include "support.h"
#if 0
/* Fast random generator macros taken from
http://www.cse.yorku.ca/~oz/marsaglia-rng.html
* credits to whoever made it */
#define _MWC_ZNEW(z) (z=36969*(z&65535)+(z>>16))
#define _MWC_WNEW(w) (w=18000*(w&65535)+(w>>16))
#define _MWC(z,w) ((_MWC_ZNEW(z)<<16)+_MWC_WNEW(w)) /* <- a macro is g... | code_c | code | 231 | null |
#ifndef H2C44DF4E_FD92_4E4A_B3A8_AF95C5227B78
#define H2C44DF4E_FD92_4E4A_B3A8_AF95C5227B78
#include "adlik_serving/framework/domain/label_provider.h"
#include "adlik_serving/framework/domain/model_config.pb.h"
namespace adlik {
namespace serving {
struct ModelId;
struct ModelConfig : ModelConfigProto {
ModelConf... | code_c | code | 209 | null |
/***************************************************************************
* Copyright 1998-2018 by authors (see AUTHORS.txt) *
* *
* This file is part of LuxCoreRender. *
* ... | code_c | code | 1,275 | null |
<reponame>sc1sm3/libwired
/* $Id$ */
/*
* Copyright (c) 2008-2009 <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 c... | code_c | code | 966 | null |
<reponame>ghsecuritylab/tomato_egg<gh_stars>100-1000
/* des.h
*
* Copyright (C) 2011 Sawtooth Consulting Ltd.
*
* This file is part of CyaSSL.
*
* CyaSSL 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;... | code_c | code | 554 | null |
<gh_stars>10-100
// license:BSD-3-Clause
// copyright-holders:<NAME>
/***************************************************************************
Multi Unique FDC
8-bit floppy controller, supports 4 drives with 360k, 720k,
1.2MB or 1.44MB. It was sold under a few different names:
- Ably-Tech FDC-344
... | code_c | code | 722 | null |
#pragma once
#include "Math/vec.h"
class Engine;
class RenderDevice;
class VulkanDevice;
enum class StandardCursor
{
arrow,
appstarting,
cross,
hand,
ibeam,
no,
size_all,
size_nesw,
size_ns,
size_nwse,
size_we,
uparrow,
wait
};
enum EInputKey
{
/*00*/ IK_None, IK_LeftMouse, IK_RightMouse, IK_Cancel,
... | code_c | code | 1,197 | null |
/*
* Copyright (c) 2016-present, <NAME>, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may... | code_c | code | 2,775 | null |
//===- ASTDiffInternal.h --------------------------------------*- C++ -*- -===//
//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===------------------------... | code_c | code | 341 | null |
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <math.h> //for round()
#include <time.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include "orka-utils.h"
#include "json-scanf.h"
#include "json-actor.h"
char*
orka_load_whole_file(const char filename[], siz... | code_c | code | 1,639 | null |
<reponame>aggresss/media-server<gh_stars>1-10
#pragma once
#include "mpeg4-avc.h"
#include "mpeg4-aac.h"
#include "mpeg4-hevc.h"
#include "media-source.h"
#include "mov-reader.h"
#include <string>
#include <stdio.h>
#include <stdint.h>
class MP4FileSource : public IMediaSource
{
public:
MP4FileSource(const char *fil... | code_c | code | 692 | null |
#pragma once
#ifndef ccsplayer_h
#define ccsplayer_h
#include "SDK.h"
#include "Engine/NetvarManager/nvmngr.h"
#include "CCSWpnInfo.h"
enum MoveType_t
{
MOVETYPE_NONE = 0,
MOVETYPE_ISOMETRIC,
MOVETYPE_WALK,
MOVETYPE_STEP,
MOVETYPE_FLY,
MOVETYPE_FLYGRAVITY,
MOVETYPE_VPHYSICS,
MOVETYPE_... | code_c | code | 4,930 | null |
<reponame>indiewebconsulting/mind-tensorflow
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENS... | code_c | code | 1,810 | null |
<filename>modules/audio_coding/neteq/tools/neteq_delay_analyzer.h
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property... | code_c | code | 825 | null |
<gh_stars>1-10
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file CO... | code_c | code | 1,705 | null |
<reponame>minusjet/ANT
#ifndef __ANT_ASYNC_H__
#define __ANT_ASYNC_H__
#include "hashmap.h"
#include "ll.h"
#include "iotjs_def.h"
#include "iotjs_uv_request.h"
#include "modules/iotjs_module_buffer.h"
#include <pthread.h>
#include <stdbool.h>
#include <stdlib.h>
// ANT async handler procedure:
// 1. [External thre... | code_c | code | 1,623 | null |
#pragma once
#include<chrono>
namespace fast_io
{
template<character_output_stream output,typename T>
requires std::same_as<std::tm,std::remove_cvref_t<T>>
inline constexpr void print_define(output& out,T const& a)
{
fprint(out,"%/%/% [yday:%] (wday:%) %:%:%",a.tm_year+1900,a.tm_mon+1,a.tm_mday,a.tm_yday,a.tm_wday,a.... | code_c | code | 124 | null |
<reponame>libingting/GRichLabel
//
// NSAttributedString+GRichLabel.h
// GRichLabel
//
// Created by GIKI on 2017/10/29.
// Copyright © 2017年 GIKI. All rights reserved.
//
/**
This Class most of the code reference from YYText! Thanks!
gitHup:https://github.com/ibireme/YYText/blob/master/YYText
*/
#import <Found... | code_c | code | 4,864 | null |
// IDDN FR.001.250001.004.S.X.2019.000.00000
// ULIS is subject to copyright laws and is the legal and intellectual property of Praxinos,Inc
/*
* ULIS
*__________________
* @file DualBuffer.h
* @author <NAME>
* @brief This file provides the declaration for the DualBuffer arguments and scheduling ... | code_c | code | 3,049 | null |
/**
* @file chapter_02.h
* @brief Hacker's Delight Chapter 2 Basics
* @author m2enu
* @date 2020/12/27
* @copyright Copyright (c) 2020 m2enu
* @par License
* https://github.com/m2enu/HackersDelight/blob/main/LICENSE
*/
#ifndef CHAPTER_02_H
#define CHAPTER_02_H
#... | code_c | code | 340 | null |
//=============================================================================
//
// Copyright 2012-2019 Kitware, 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://ww... | code_c | code | 551 | null |
<gh_stars>10-100
/*
* tcp.c - support for Transmission Control Protocol (RFC 793)
*/
#include <string.h>
#include <base/stddef.h>
#include <base/hash.h>
#include <base/log.h>
#include <runtime/smalloc.h>
#include <runtime/thread.h>
#include <runtime/tcp.h>
#include <runtime/timer.h>
#include "tcp.h"
/* protects @... | code_c | code | 7,860 | null |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkPBGLRandomGraphSource.h
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distribut... | code_c | code | 1,864 | null |
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
#define CHROME_BROWSER_SIGNIN_SIGNIN_UI_UTIL_H_
#include <string>
#include <vector>
#include "base/c... | code_c | code | 1,136 | null |
/************************************************************************
* lib/math/lib_round.c
*
* This file is a part of NuttX:
*
* Copyright (C) 2012 <NAME>. All rights reserved.
* (C) 2012 <NAME> <<EMAIL>>
*
************************************************************************/
/*********... | code_c | code | 273 | null |
<reponame>vidkidz/crossbridge
/* Test diagnostics for old-style definition not matching prior
prototype are present and give correct location for that prototype
(bug 15698). Prototyped built-in function, wrong number of
arguments, with explicit prototype as well. */
/* Origin: <NAME> <<EMAIL>> */
/* { dg-do ... | code_c | code | 162 | null |
//{{BLOCK(StartersPointer)
//======================================================================
//
// StartersPointer, 32x64@4,
// + palette 12 entries, lz77 compressed
// + 32 tiles lz77 compressed
// Total size: 24 + 288 = 312
//
// Time-stamp: 2020-09-27, 15:37:17
// Exported by Cearn's GBA Image Transmogrifi... | code_c | code | 215 | null |
<reponame>ahalls/MBCalendarKit
//
// CKCalendarCalendarCellColors.h
// MBCalendarKit
//
// Created by <NAME> on 4/10/13.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
/*
Defines standard colors for MBCalendarCalendarView. These were grabbed using the
color picker in Photoshop CS6 on OS X. There's a gr... | code_c | code | 368 | null |
#ifndef C_DRAWABLE_H
#define C_DRAWABLE_H
#include "c_base.h"
#include <SFML/Graphics.hpp>
class C_Drawable : public C_Base
{
public:
C_Drawable(const Component& type) : C_Base(type) {}
virtual ~C_Drawable() {}
virtual void updatePosition(const sf::Vector2f& position) = 0;
virtual const sf::Vector2u&... | code_c | code | 118 | null |
<gh_stars>0
/* devEpidMpf.cc
Author: <NAME>
Date: 10/11/99
9-July-2004 Converted from MPF to asyn and from C++ to C
*/
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <dbAccess.h>
#include <dbDefs.h>
#include <link.h>
#include <epicsPrint.h>
#... | code_c | code | 4,906 | null |
<filename>aws-cpp-sdk-codedeploy/include/aws/codedeploy/model/MinimumHealthyHosts.h
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/codedeploy/CodeDeploy_EXPORTS.h>
#include <aws/codedeploy/model/MinimumHealthyHostsType.h... | code_c | code | 3,712 | null |
<filename>source/rrException.h
#ifndef rrExceptionH
#define rrExceptionH
#include <exception>
#include <string>
#include "rrObject.h"
using std::string;
using std::exception;
namespace rr
{
class RR_DECLSPEC Exception : public std::exception, public rrObject
{
protected:
string mMessage; //Exception me... | code_c | code | 394 | null |
//HEADER_GOES_HERE
#ifndef __MISSILES_H__
#define __MISSILES_H__
extern int missileactive[MAXMISSILES];
extern int missileavail[MAXMISSILES];
extern MissileStruct missile[MAXMISSILES];
extern int nummissiles; // idb
extern int ManashieldFlag;
extern ChainStruct chain[MAXMISSILES];
extern int MissilePreFlag; // weak
ex... | code_c | code | 2,900 | null |
<gh_stars>1-10
// dac.c
// This software configures DAC output
// Runs on LM4F120 or TM4C123
// Program written by: <NAME> - <NAME>
// Date Created: 8/25/2014
// Last Modified: 3/6/2015
// Section 1-2pm TA: <NAME>
// Lab number: 6
// Hardware connections
// TO STUDENTS "REMOVE THIS LINE AND SPECIFY YOUR HARDWARE*... | code_c | code | 354 | null |
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#include "wilddog.h"
#include <signal.h>
BOOL isExit = FALSE;
static void catch_function(int signal) {
puts("Interactive attention signal caught.");
isExit = TRUE;
}
STATIC void addObserver_callback
(
con... | code_c | code | 418 | null |
// Copyright (c) 2016 Genoil <<EMAIL>>
// Copyright (c) 2016 <NAME> <<EMAIL>>
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "libstratum/ZcashStratum.h"
#include <iostream>
#include <boost/array.hpp>
#include <boost/a... | code_c | code | 1,222 | null |
/*
* Copyright 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, including without limitation
* the rights to use, copy, modify, merge, publish, distribute... | code_c | code | 8,498 | null |
<reponame>vusec/mvarmor<filename>dune_sandbox/shmem.h
#ifndef SHMEM_H
#define SHMEM_H
#include <pthread.h>
void shmem_init();
void shmem_exec_pre(void);
void shmem_exec_post(void);
void shmem_lock();
void shmem_unlock();
void shmem_lock_proclist();
void shmem_unlock_proclist();
void shmem_barrier_init(int n);
void s... | code_c | code | 164 | null |
#include <cs50.h>
#include <stdio.h>
int main(void)
{
int h;
do
{
h = get_int("Enter a positive integer: ");
}
while (h < 1 || h > 8);
for (int i = 0; i < h; i++)
{
for (int j = 1; j < h - i; j++)
{
printf(" ");
}
for (int k = 0; k <= i; k... | code_c | code | 114 | null |
<filename>mpi-sys/src/rsmpi.c
#include "rsmpi.h"
const MPI_Datatype RSMPI_C_BOOL = MPI_C_BOOL;
const MPI_Datatype RSMPI_FLOAT = MPI_FLOAT;
const MPI_Datatype RSMPI_DOUBLE = MPI_DOUBLE;
const MPI_Datatype RSMPI_INT8_T = MPI_INT8_T;
const MPI_Datatype RSMPI_INT16_T = MPI_INT16_T;
const MPI_Datatype RSMPI_INT32_T = MPI... | code_c | code | 969 | null |
#include "server.h"
JSON_OBJECT jerr(int jerrno,const char *errmsg)
{
JSON_OBJECT ejson,ijson,sjson;
ejson=json_object_new_object();
ijson=json_object_new_int(jerrno);
json_object_object_add(ejson,"errno",ijson);
sjson=json_object_new_string(errmsg);
json_object_object_add(ejso... | code_c | code | 193 | null |
/* <NAME> `gentilkiwi`
http://blog.gentilkiwi.com
<EMAIL>
Licence : https://creativecommons.org/licenses/by/4.0/
*/
#include "kuhl_m_dpapi_wlan.h"
NTSTATUS kuhl_m_dpapi_wifi(int argc, wchar_t * argv[])
{
PBYTE pFile, hex, dataOut;
DWORD dwData, lenHex, lenDataOut;
LPWSTR dataU, dataSSID, dataF, dataAu... | code_c | code | 1,150 | null |
<gh_stars>1-10
//
// EXTMixin.h
// extobjc
//
// Created by <NAME> on 2010-11-10.
// Copyright (C) 2012 <NAME>.
// Released under the MIT license.
//
#import <objc/runtime.h>
#import <stdlib.h>
#import "EXTRuntimeExtensions.h"
/**
* "Mixes in" the class and instance methods of \a CLASS into pre-existing class
... | code_c | code | 413 | null |
<filename>firmware/src/screen.h
#pragma once
#include <stdint.h>
#include <stdbool.h>
// For "byte" typedef
#include <Arduino.h>
// #define SCREEN_WIDTH 122
// #define SCREEN_HEIGHT 32
// SG12232Cを駆動し描画するクラス
class Screen {
public:
// 横は122ドット (0-121)
static constexpr uint8_t SCREEN_WIDTH ... | code_c | code | 906 | null |
<reponame>hocki7z/wordclock_esp8266
#ifndef LEDS_H_
#define LEDS_H_
#include <NeoPixelBus.h>
#include <Ticker.h>
#include "ldr.h"
#include "settings.h"
#define LED_PIXEL_PIN 2
#define LED_PIXEL_TYP NeoGrbFeature //(NeoBrgFeature,NeoRgbFeature,NeoRbgFeature,NeoGrbFeature)
#define LED_PIXEL_METHOD NeoEsp... | code_c | code | 2,845 | null |
<gh_stars>1-10
#include <stdlib.h>
int equalSubstring(char *s, char *t, int maxCost)
{
int i = 0, j = 0, cost = 0;
for (; s[j]; ++j)
{
cost += abs(s[j] - t[j]);
if (cost > maxCost)
{
cost -= abs(s[i] - t[i]);
++i;
}
}
return j - i;
} | code_c | code | 72 | null |
#ifndef _STDINT_H
#define _STDINT_H
#include <wordsize.h>
#include <stdbool.h>
#include <limits.h>
#include <stddef.h>
typedef __UINTPTR_TYPE__ uintptr_t;
typedef __INTPTR_TYPE__ intptr_t;
typedef __INT8_TYPE__ int8_t;
typedef __INT16_TYPE__ int16_t;
typedef __INT32_TYPE__ int32_t;
typedef __INT64_TYPE__ int64_t;
ty... | code_c | code | 1,022 | null |
//self-defined graph representation, building adjacency_list using array of set
//TODO: sparse graph may fit set of set
//TODO: a map of index of labelLabel could save more memory
//TODO: unordered set?
#ifndef GRAPH_MAP_H
#define GRAPH_MAP_H
#include <assert.h>
#include <unordered_set>
#include <set>
#include <map>
#i... | code_c | code | 505 | null |
/* ----------------------------------------------------------
Z80SVG
by <NAME>
This program translates an SVG vector file
in a C source data declaration to be used
in z88dk with the "draw_profile" function.
MinGW
gcc -Wall -O2 -o z80svg z80svg.c libxml2.dll
$Id: z80svg.c,v 1.18 2015-02... | code_c | code | 9,961 | null |
/*
* Copyright (C) 2016-2021 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code is distributed in th... | code_c | code | 743 | null |
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define DIRSERV_PRIVATE
#define ROUTERPARSE_PRIVATE
#define NETWORKSTATUS_PRIVATE
#include "orconfig.h"
#include "or/or.h"
#include "or/config.h"
#include "or/dirserv.h"
#include "or/entrynodes.h"
#include "common/util.h"... | code_c | code | 4,194 | null |
<filename>iOSApp-Objective-C/Workspace/Runtime/EXLaunching.h
//
// EXLaunching.h
// App
//
// Created by 聂高涛 on 2022/3/9.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface EXLaunching : NSObject
//didFinishLaunchingWithOptions 里调用
+ (void)launching;
@end
NS_ASSUME_NONNULL_END
| code_c | code | 87 | null |
<reponame>vcsatanial/SafeHelper
//
// NSDictionary+SafeHelper.h
// Visac
//
// Created by Visac on 2018/4/21.
// Copyright © 2018年 Visac. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDictionary (SafeHelper)
@end
| code_c | code | 69 | null |
<reponame>gcjurgiel/allwpilib<filename>wpilibcExamples/src/main/cpp/examples/GyroDriveCommands/include/Constants.h
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#prag... | code_c | code | 606 | null |
<filename>0_operating_system_concepts/9_semaphores/4.c
//write a c program to set a semaphore with positive alue and seubsequenty create a child process. the child process uses the atomic operation semop to set the semaphore value zero and goes to sleep mode for a while.on the other hand parent process continousley pro... | code_c | code | 470 | null |
/*
* Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OPTEED_PRIVATE_H__
#define __OPTEED_PRIVATE_H__
#include <arch.h>
#include <context.h>
#include <interrupt_mgmt.h>
#include <platform_def.h>
#include <psci.h>
/*****************... | code_c | code | 1,762 | null |
// Copyright 2018 The Beam Team
//
// 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... | code_c | code | 4,009 | null |
<reponame>moltenguy1/deusexmachina<gh_stars>1-10
#pragma once
#ifndef __DEM_L1_RESOURCE_H__
#define __DEM_L1_RESOURCE_H__
#include <Core/RefCounted.h>
#include <Data/StringID.h>
// Resource wraps a piece of abstract data, used by other systems. It can be loaded and managed by
// resource system, so clients ne... | code_c | code | 357 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.