text
stringlengths
84
499k
source
stringclasses
6 values
slice
stringclasses
1 value
est_tokens
int32
24
143k
score
float32
// Copyright 2019 - University of Strathclyde, King's College London and Schlumberger Ltd // This source code is licensed under the BSD license found in the LICENSE file in the root directory of this source tree. #include "FuncExp.h" #include "Proposition.h" #include "StateObserver.h" #include <set> using std::set; ...
code_c
code
1,444
null
<reponame>19-2-SKKU-OSS/L1 #include <stdio.h> void selection_sort(int list[], int n){ int i, j, l, tmp; for(i=0; i<n-1; i++){ l = i; for(j=i+1; j<n; j++){ if(list[j]<list[l]){ l = j; } } if(i != l){ tmp = list[i]; ...
code_c
code
218
null
/////////////////////////////////////////////////////////////////////////////// // BSD 3-Clause License // // Copyright (c) 2019, Nefelus Inc // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: //...
code_c
code
1,936
null
<filename>src/include/protocol.h #ifndef _PROTOCOL_H_ #define _PROTOCOL_H_ #include "types.h" #include "stm32f10x.h" void SendData(short Temperature, float pitch, float roll, float yaw); void ReceiveData(short Temperature, float pitch, float roll, float yaw); #endif
code_c
code
79
null
<gh_stars>0 // // GADBannerView.h // Google AdMob Ads SDK // // Copyright 2011 Google Inc. All rights reserved. // #import <UIKit/UIKit.h> #import "GADAdSize.h" #import "GADBannerViewDelegate.h" #import "GADInAppPurchaseDelegate.h" #import "GADModules.h" #import "GADRequest.h" #import "GADRequestErro...
code_c
code
1,505
null
<reponame>moneytech/skift /* Copyright © 2018-2020 <NAME>. */ /* This code is licensed under the MIT License. */ /* See: LICENSE.md */ #include <libsystem/assert.h> #include <libsystem/io/Strea...
code_c
code
214
null
<reponame>cosmos33/MMLiveMedia<filename>Frameworks/IJKMedia.framework/Headers/IJKMediaModule.h // // IJKMediaModule.h // IJKMediaPlayer // // Created by ZhangRui on 14-3-14. // Copyright (c) 2014年 bilibili. All rights reserved. // #import <Foundation/Foundation.h> @interface IJKMediaModule : NSObject + (IJKMedia...
code_c
code
152
null
<filename>src/common/deprecated/dirinfo.h<gh_stars>0 #ifndef __DIRINFO_H #define __DIRINFO_H #include "tmy.h" #include <string> #include <vector> #include "chunks.h" #include "path.h" #include "json.hpp" namespace TMY { struct DirInfoEntry { FilePath filePath; time_t modtime; std::string md5; int len; /* 保证chu...
code_c
code
161
null
/*! \file tcpserv.h Definition of tcpserv class (c) <NAME> 2003 */ #pragma once #include "wsockstream.h" #include "inaddr.h" #include "thread.h" #include "event.h" #include "critsect.h" namespace mlib { ///Connections iteration function typedef void (*conn_iter_func)(sock& conn, void *param); class tcpserver :...
code_c
code
527
null
/****************************************************************************** * * Copyright(c) 2015 - 2017 Realtek Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundat...
code_c
code
1,918
null
<filename>apps/epproxy/src/hash.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/queue.h> #include "hash.h" #include "epproxy.h" #include "util.h" /*----------------------------------------------------------------------------*/ struct backend_info* SelectNodeByHash(uint32_t hash) { struct bac...
code_c
code
576
null
#pragma once #include "il2cpp-config.h" #if !IL2CPP_TINY_WITHOUT_DEBUGGER #include <stdint.h> #include <stddef.h> #include "il2cpp-class-internals.h" #include "il2cpp-windowsruntime-types.h" #if defined(__cplusplus) extern "C" { #endif // __cplusplus // We cannot include il2cpp-api.h here because generated code con...
code_c
code
8,217
null
// // CSSalonInputCell.h // CSPP // // Created by <NAME> on 2018/3/23. // Copyright © 2018年 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> @interface CSSalonInputCell : UIViewController @end
code_c
code
59
null
// // DLWebView.h // DLWebView // // Created by famulei on 14/10/2016. // // #import <UIKit/UIKit.h> #import <WebKit/WebKit.h> NS_ASSUME_NONNULL_BEGIN typedef void(^DLWebViewScriptHandler)(id data); @protocol DLWebViewDelegate <NSObject> @optional // 跳转 // 在加载前时候继续加载 - (BOOL)webView:(WKWebView *)webView shoul...
code_c
code
848
null
<filename>frameworks/util/common/include/util.h /* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
code_c
code
674
null
// ---------------------------------------------------------------------------- // Copyright 2021 Pelion Ltd. // // SPDX-License-Identifier: Apache-2.0 // // 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 th...
code_c
code
362
null
<gh_stars>0 /* * Copyright 2014-2020 Real Logic Limited. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
code_c
code
1,739
null
/*! * @brief OSSP UUID 128-bit unsigned integer arithmetic definition * * @copyright Copyright (c) 2017-2019 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://w...
code_c
code
1,609
null
<filename>kernel/include/tty.h /* * lux OS kernel * copyright (c) 2018 by <NAME> */ #pragma once #include <boot.h> #define TTY_COUNT 7 #define rgb(r,g,b) ((r << 16) + (g << 8) + b) // Color Pallette #define BLACK rgb(0,0,0) #define RED rgb(222,56,43) #define GREEN rgb(57,181,74) #define YELLOW ...
code_c
code
477
null
<reponame>alni/MoodTracker /* Mood Tracker v1.2 https://github.com/alni/MoodTracker/ ---------------------- The MIT License (MIT) Copyright (c) 2015-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...
code_c
code
609
null
#pragma once #include "test/integration/fake_upstream.h" namespace Envoy { class AutonomousUpstream; // A stream which automatically responds when the downstream request is // completely read. By default the response is 200: OK with 10 bytes of // payload. This behavior can be overridden with custom request headers...
code_c
code
872
null
<reponame>parsegraph/c<gh_stars>0 #include "graph/Node.h" #include "graph/Graph.h" #include "graph/log.h" #include <string.h> #include <stdio.h> #include "graph/Caret.h" #include "parsegraph_math.h" parsegraph_Node* showProportionTest(parsegraph_Graph* graph, int COUNT) { parsegraph_logEnterf("Showing proportion t...
code_c
code
1,324
null
<reponame>jboero/source.codeaurora.org.external.qoriq.qoriq-components.restool /* Copyright 2014-2016 Freescale Semiconductor Inc. * Copyright 2017-2018 NXP * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redis...
code_c
code
5,780
null
<reponame>satta/genometools /* Copyright (c) 2008 <NAME> <<EMAIL>> Copyright (c) 2008 Center for Bioinformatics, University of Hamburg 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 permiss...
code_c
code
1,276
null
/* * Author: C<NAME> * Copyright: Crownstone (https://crownstone.rocks) * Date: Dec 14, 2018 * License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed) */ #pragma once #include "common/cs_Types.h" #include "events/cs_EventListener.h" #include "util/cs_Utils.h" #define CMD_ADV_NUM_SERVICES_16BIT 4 // T...
code_c
code
889
null
<filename>genericio/thirdparty/blosc/internal-complibs/zstd-0.7.4/decompress/zbuff_decompress.c<gh_stars>1-10 /* Buffered version of Zstd compression library Copyright (C) 2015-2016, <NAME>. BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) Redistribution and use in source and ...
code_c
code
3,848
null
<gh_stars>10-100 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. * * The information contained herein is property of Nordic Semiconductor ASA. * Terms and conditions of usage are described in detail in NORDIC * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. * * Licensees are granted free, non...
code_c
code
845
null
// ======================================================================== // // Copyright 2009-2019 Intel Corporation // // // // Licensed under the Apache License, Version 2.0 (the "License"); // // y...
code_c
code
1,432
null
<gh_stars>1-10 /* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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/licens...
code_c
code
2,348
null
// This file is part of byfly-wifi-auth. For the copyright and license information, please view the LICENSE file that was distributed with this source code. #include "common.h" #include "auth.h" #include "auth_conf.h" #include "dns.h" #include "https.h" #include "resolve_conf.h" #include <stdio.h> #include <stdlib.h>...
code_c
code
752
null
<reponame>ValtoGameEngines/Lumix-Engine #pragma once #include "editor/render_interface.h" #include "editor/studio_app.h" #include "renderer/gpu/gpu.h" namespace Lumix { template <typename T> struct Delegate; struct LogUI; struct Model; struct StudioApp; struct Pipeline; struct RayCastModelHit; struct Shader; stru...
code_c
code
573
null
<reponame>adigostin/edge #pragma once #include "vector.h" namespace edge { template<typename from_traits, typename to_traits> struct transform { using from_type = typename from_traits::type; using to_type = typename to_traits::type; float _11; // unit is to_type/from_type float _12; // unit...
code_c
code
1,230
null
/* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 8.00.0613 */ /* @@MIDL_FILE_HEADING( ) */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__...
code_c
code
99,377
null
<gh_stars>1-10 /* * illegal.h * * Created on: Nov 14, 2018 * Author: Benedict */ #ifndef ILLEGAL_H_ #define ILLEGAL_H_ void illegal(); #endif /* ILLEGAL_H_ */
code_c
code
49
null
<gh_stars>1-10 /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */ /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */ /* ELIGIBILITY FOR ANY PURPOSES. */ /* (C) Fujitsu Microelectronics Europe GmbH */ /*------------------------------------...
code_c
code
605
null
#ifndef RECV_RECEIVER_H_ #define RECV_RECEIVER_H_ #include <pthread.h> #include "buffer.h" #ifdef WITH_MS # include <oskar_measurement_set.h> #endif #ifdef __cplusplus extern "C" { #endif struct ThreadBarrier; struct ThreadPool; struct Timer; struct Stream; struct Buffer; /** * Receiver data structure */ stru...
code_c
code
467
null
<filename>modules/core/include/lagrange/normalize_meshes.h /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you 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.apa...
code_c
code
726
null
/*++ Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. Module Name: Dmf_String.c Abstract: Support for general string related operations. NOTE: Method Name format is: "DMF_String_[Function][Char|Wchar|Unicode]{Insensitive} Environment: ...
code_c
code
8,898
null
<gh_stars>10-100 /* * sgui_icon_view.h * This file is part of sgui * * Copyright (C) 2012 - <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 wit...
code_c
code
1,264
null
<filename>front-end/qemu-2.3/hw/i386/acpi-build.c<gh_stars>10-100 /* Support for generating ACPI tables and passing them to Guests * * Copyright (C) 2008-2010 <NAME> <<EMAIL>> * Copyright (C) 2006 <NAME> * Copyright (C) 2013 Red Hat Inc * * Author: <NAME> <<EMAIL>> * * This program is free software; you can re...
code_c
code
16,587
null
#define CONJ #define ASMNAME ztrmm_LRLN #define ASMFNAME ztrmm_LRLN_ #define NAME ztrmm_LRLN_ #define CNAME ztrmm_LRLN #define CHAR_NAME "ztrmm_LRLN_" #define CHAR_CNAME "ztrmm_LRLN" #define DOUBLE #define COMPLEX #include "/lustre/scratch3/turquoise/rvangara/RD100/distnnmfkcpp_Src/install_dependencies/xianyi-OpenBLAS-...
code_c
code
100
null
/* load.c --- loading object files into the M32C simulator. Copyright (C) 2005-2015 Free Software Foundation, Inc. Contributed by Red Hat, Inc. This file is part of the GNU simulators. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
code_c
code
949
null
/* QLogic qed NIC Driver * Copyright (c) 2015-2017 QLogic Corporation * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU * General Public License (GPL) Version 2, available from the file * COPYING in the main directory of this ...
code_c
code
2,705
null
/*********************************************************************** Vczh Library++ 3.0 Developer: <NAME>(vczh) GacUI Header Files and Common Namespaces Global Objects: vl::reflection::description:: GetGlobalTypeManager vl::presentation:: GetParserManager vl::presentation:: GetResourceResolver...
code_c
code
477
null
<filename>include/FalconEngine/Platform/Direct3D/Direct3DRendererState.h #pragma once #include <FalconEngine/Core/Macro.h> #include <unordered_map> #if defined(FALCON_ENGINE_API_DIRECT3D) #include <FalconEngine/Platform/Direct3D/Direct3DLib.h> namespace FalconEngine { class Renderer; class BlendState; class CullSta...
code_c
code
1,000
null
<reponame>aalto-cbir/PicSOM<filename>src/features/DominantColor.h<gh_stars>1-10 // -*- C++ -*- $Id: DominantColor.h,v 1.6 2010/08/17 11:25:45 vvi Exp $ /** \file DominantColor.h \brief Declarations and definitions of class DominantColor DominantColor.h contains declarations and definitions of class the D...
code_c
code
970
null
<gh_stars>1000+ /** ****************************************************************************** * @brief Header file of mbed TLS HW crypto (HASH) implementation. ****************************************************************************** * @attention * * Copyright (C) 2006-2015, ARM Limited, All Ri...
code_c
code
585
null
/* * * Copyright (c) 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, or * (at your option) any later version. * * This program...
code_c
code
2,530
null
/* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * * Copyright 1998-2017 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted only as authorized by the OpenLDAP * Public License. ...
code_c
code
704
null
<reponame>rudylee/expo // // ABI36_0_0AIRGoogleMapHeatmapManager.h // // Created by <NAME> on 29 April 2018. // #import <ABI36_0_0React/ABI36_0_0RCTViewManager.h> @interface ABI36_0_0AIRGoogleMapHeatmapManager : ABI36_0_0RCTViewManager @end
code_c
code
70
null
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #pragma once #include "IMediaTextureSample.h" /** * Implements a media texture sample for NdiMedia. */ class FNdiMediaTextureSample : public IMediaTextureSample { public: /** Default constructor. */ FNdiMediaTextureSample() : Duration(FTimespan::Z...
code_c
code
853
null
<reponame>xge/megamol<filename>vislib/include/vislib/ReferenceCounted.h /* * ReferenceCounted.h * * Copyright (C) 2006 - 2008 by Universitaet Stuttgart (VIS). * Alle Rechte vorbehalten. * Copyright (C) 2008 by <NAME>. Alle Rechte vorbehalten. */ #ifndef VISLIB_REFERENCECOUNTED_H_INCLUDED #define VISLIB_REFERENCE...
code_c
code
662
null
#ifndef _ATHRILL_EXDEV_H_ #define _ATHRILL_EXDEV_H_ #include "std_errno.h" #include "mpu_types.h" #include "std_device_ops.h" #include "comm_buffer.h" #include "tcp/tcp_client.h" #include "tcp/tcp_server.h" #include "udp/udp_comm.h" #include "athrill_mpthread.h" #include "serial_fifo.h" typedef struct { ...
code_c
code
1,118
null
//Modify this file to change what commands output to your statusbar, and recompile using the make command. static const Block blocks[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ // Spacer { "", "echo \"\"", 1000000, 0 }, // Music //  { "", "if [ \"$(playerctl metadata artist)\" ]; then ec...
code_c
code
289
null
<reponame>dumpmemory/XKCP /* Copyright (c) 2008, <NAME>, National Institute of Standards and Technology (NIST), for the original version (available at http://csrc.nist.gov/groups/ST/hash/sha-3/documents/KAT1.zip) All rights reserved. Redistribution and use in source and binary forms, with or without modification, a...
code_c
code
622
null
<reponame>waterflower124/city-tour // // TicketTypeCell.h // CityBud // // Created by <NAME> on 05/07/17. // Copyright © 2018 iGlobsyn Technologies. All rights reserved. // #import <UIKit/UIKit.h> @interface TicketTypeCell : UITableViewCell @property (strong, nonatomic) IBOutlet UILabel * TicketCategorylabel; @p...
code_c
code
194
null
/* * driver/audio/audio.c * * Copyright(c) 2007-2022 <NAME> <<EMAIL>> * Official site: http://xboot.org * Mobile phone: +86-18665388956 * QQ: 8192542 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal ...
code_c
code
2,039
null
#ifndef DIALOGCANALSETUP_H #define DIALOGCANALSETUP_H #include <QDialog> namespace Ui { class DialogCanalSetup; } class DialogCanalSetup : public QDialog { Q_OBJECT public: explicit DialogCanalSetup(QWidget *parent = 0); ~DialogCanalSetup(); private: Ui::DialogCanalSetup *ui; }; #en...
code_c
code
99
null
// <NAME> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <sys/stat.h> #include <dirent.h> int main(int argc, char *argv[]){ if(argc < 2){ perror("\nDebe introducirse un directorio argumento"); exit(-1); ...
code_c
code
497
null
<filename>FROTATAX.c /* Resolucao: Calcula qual combustivel e mais economico */ #include <stdio.h> int main() { float a, g, ka, kg; scanf("%f %f %f %f", &a, &g, &ka, &kg); if (a / ka >= g / kg) printf("G"); else if (g / kg > a / ka) printf("A"); return 0; }
code_c
code
90
null
#pragma ident "$Id: wbh.c,v 1.4 2012/02/14 21:45:40 dechavez Exp $" /*====================================================================== * * Write a binary SAC header * *====================================================================*/ #include <string.h> #include "sacio.h" int sacio_wbh(fp, hdr) FILE *f...
code_c
code
3,781
null
<reponame>travis-ci/libgit2<filename>tests/repo/config.c #include "clar_libgit2.h" #include "fileops.h" #include <ctype.h> static git_buf path = GIT_BUF_INIT; void test_repo_config__initialize(void) { cl_fixture_sandbox("empty_standard_repo"); cl_git_pass(cl_rename("empty_standard_repo/.gitted", "empty_standard_rep...
code_c
code
1,871
null
<gh_stars>1-10 /***************************************************************************** * Test cases for libxlsxwriter. * * Test to compare output against Excel files. * * Copyright 2014-2019, <NAME>, <EMAIL> * */ #include "xlsxwriter.h" int main() { lxw_workbook *workbook = new_workbook("test_cha...
code_c
code
936
null
<reponame>galudino/gof-designpatterns-cpp<filename>src/1_structural_patterns/adapter/models/text_manipulator.h #ifndef TEXT_MANIPULATOR_H #define TEXT_MANIPULATOR_H #include "manipulator.h" class text_shape; class text_manipulator : public manipulator { public: text_manipulator(const text_shape *s) : manipulator...
code_c
code
146
null
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
code_c
code
7,384
null
/**************************************************************************//** * $Id:: $ * * @file system_LPC11xx.h * @brief CMSIS Cortex-M0 Device Peripheral Access Layer Header File * for the NXP LPC11xx Device Series * @ve...
code_c
code
1,982
null
#ifndef HELPSCENE_H_ #define HELPSCENE_H_ #include "Scene.h" class HelpScene: public Scene { public: HelpScene(); virtual ~HelpScene(); bool render(std::shared_ptr<GameModel> gameModelPtr, std::shared_ptr<GameController> gameControllerPtr); }; #endif /* HELPSCENE_H_ */
code_c
code
83
null
class qpComet : public qpPattern { private: byte length; bool bounce; int pos = 0; int dir = 1; bool _inBounds(int pos) { return ((pos >= 0) && (pos < _numLeds)); } public: qpComet(byte length, bool bounce = false, byte dir = 1) : length(length), bounce(bounce...
code_c
code
278
null
#ifndef COLOR_LIST_H # define COLOR_LIST_H # include "rt_cl_include.h" # include "rt_float.h" # define COLOR_WHITE (RT_F4_API){.99, .99, .99, 1.} # define COLOR_BLACK (RT_F4_API){0., 0., 0., 1.} # define COLOR_RED (RT_F4_API){.99, 0., 0., 1.} # define COLOR_GREEN (RT_F4_API){0., .99, 0., 1.} #endif
code_c
code
86
null
<reponame>pahihu/mumps // File: mumps/include/symbol.h // // module MUMPS header file - includes for symbol module /* Copyright (c) 1999 - 2014 * <NAME>. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following ...
code_c
code
1,656
null
<filename>x11.h<gh_stars>1-10 #include "martrix.h" int x11_init(config_t* cfg); void x11_cleanup(config_t* cfg); int x11_handle(config_t* cfg); int x11_render(config_t* cfg);
code_c
code
50
null
// Copyright (c) 2019 PaddlePaddle 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/LICENSE-2.0 // // Unless required...
code_c
code
3,609
null
<reponame>chopikus/ll-rb-tree<gh_stars>0 #include <iostream> #include <stddef.h> #include <initializer_list> template<class ValueType> class Set { private: using Color = bool; static const Color BLACK = false; static const Color RED = true; class Node { Node* left = nu...
code_c
code
3,690
null
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include "ABI43_0_0YGValue.h" #include "ABI43_0_0YGMacros.h" #include <cmath> #include <cstdint> #include <limits> s...
code_c
code
1,636
null
<filename>iraf.v2161/vendor/x11iraf/cdl/cdlzscale.c #include <stdio.h> #include <stdlib.h> #include <math.h> #define CDL_LIBRARY_SOURCE #include "cdl.h" /* * ZSCALE -- Compute the optimal Z1, Z2 (range of greyscale values to be * displayed) of an image. For efficiency a statistical subsample of an image * is use...
code_c
code
5,905
null
<reponame>nsivov/wpf // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. //------------------------------------------------------------------------------ // // //----...
code_c
code
4,315
null
<filename>src/common.h<gh_stars>0 /** * Declarations common to all sources. * * Copyright © 2019,2020 <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 restric...
code_c
code
822
null
#include <stdint.h> #include "malloc.h" #include "log.h" #include "chunk.h" #define dl_assert(x)\ {\ if(!(x))\ abort();\ } void inspector(void *start, void *end, size_t used_bytes, void *callback_arg) { (void) callback_arg; // unused dl_printf( "start=0x%016lX end=0x%016lX size=%6lu...
code_c
code
1,232
null
<gh_stars>1-10 // // Copyright (C) 2004 <NAME> // // This program 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 (at your option) any later version. // // This ...
code_c
code
1,494
null
<gh_stars>0 #include "libft.h" char *ft_strnew(size_t size) { char *str; str = (char *)malloc(sizeof(char) * size + 1); if (!str) return (NULL); str[size] = '\0'; while (size--) str[size] = '\0'; return (str); }
code_c
code
76
null
<gh_stars>0 #IFNDEF RAWRLAB_COMMON_GLOBALS #DEFINE RAWRLAB_COMMON_GLOBALS 1 Global int possible_players; int players; struct p[100]; int control; end struct ops; string lang="en"; end int ancho_pantalla; int alto_pantalla; int global_resolution=1; End #ENDIF
code_c
code
79
null
<gh_stars>100-1000 // // Authors: // <NAME> <EMAIL> // <NAME> <EMAIL> // #if !defined(KRATOS_EXPLICIT_SOLVER_STRATEGY) #define KRATOS_EXPLICIT_SOLVER_STRATEGY // Project includes #include "utilities/timer.h" #include "custom_elements/Particle_Contact_Element.h" #include "includes/variables.h" #include "includes/dep...
code_c
code
4,401
null
<filename>source/blender/depsgraph/intern/depsgraph_tag.h /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * T...
code_c
code
422
null
/** * Copyright (c) 2010-2012 Broadcom. 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 conditi...
code_c
code
4,683
null
<reponame>emacslisp/emacs<filename>emacs-24.5/lwlib/lwlib-Xlw.c /* The lwlib interface to "xlwmenu" menus. Copyright (C) 1992 Lucid, Inc. Copyright (C) 1994, 2000-2015 Free Software Foundation, Inc. This file is part of the Lucid Widget Library. The Lucid Widget Library is free software; you can redistribute it and/...
code_c
code
2,082
null
<gh_stars>1-10 // Generating random data #pragma once #include <algorithm> #include <cstdint> #include <functional> #include <random> #include <stdexcept> #include <vector> template <class RNG = ::std::random_device> ::std::vector<::std::uint64_t> GenerateRandom64(::std::size_t count) { ::std::vector<::std::uint64...
code_c
code
1,547
null
<filename>case/src/hardware_dep/shared/ctrl_plane/handlers.c // 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...
code_c
code
1,222
null
<reponame>Saruul-Ulzii/sscalendar // // SSCalendarMonthlyLayout.h // Pods // // Created by <NAME> on 7/23/13. // Copyright (c) 2013 Stellar16. All rights reserved. // @interface SSCalendarMonthlyLayout : UICollectionViewFlowLayout - (void)updateLayoutForBounds:(CGRect)bounds; @end
code_c
code
82
null
/* * Copyright 2013 The Android Open Source Project * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions an...
code_c
code
5,420
null
<reponame>gillesdegottex/poco // // Base64Encoder.h // // Library: Foundation // Package: Streams // Module: Base64 // // Definition of class Base64Encoder. // // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #ifndef Foundation_...
code_c
code
949
null
<reponame>bh1xdx/libhdfs3 /******************************************************************** * Copyright (c) 2013 - 2014, Pivotal Inc. * All rights reserved. * * Author: <NAME> ********************************************************************/ /****************************************************************...
code_c
code
836
null
#pragma once #include "esphome/core/component.h" #include "esphome/core/helpers.h" #include "esphome/core/automation.h" namespace esphome { namespace deep_sleep { #ifdef ARDUINO_ARCH_ESP32 /** The values of this enum define what should be done if deep sleep is set up with a wakeup pin on the ESP32 * and the scenar...
code_c
code
959
null
// SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) STMicroelectronics SA 2014 * Authors: <NAME> <<EMAIL>> for STMicroelectronics. */ #include <linux/delay.h> #include "bdisp.h" #include "bdisp-filter.h" #include "bdisp-reg.h" /* Max width of the source frame in a single node */ #define MAX_SRC_WIDTH ...
code_c
code
7,971
null
// // JWTagView.h // JWTagView // // Created by wangjun on 16/9/11. // Copyright © 2016年 wangjun. All rights reserved. // #import <UIKit/UIKit.h> @interface JWTagView : UIView /** * Tag总高度 */ @property (nonatomic, assign, readonly) CGFloat tagAllHeight; /** * Tag点击回调的Block */ @property (nonatomic, copy) v...
code_c
code
928
null
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
code_c
code
489
null
#pragma once #include "ISerializable.h" #include <unordered_map> #include <vector> namespace PR { /* Speed up for trivial types. * Some container have boolean specializations (std::vector<bool>). * We can not use direct access there. */ template <typename T> using is_trivial_serializable = std::integral_constant< ...
code_c
code
1,201
null
<gh_stars>0 // // LinksInfo.h // coreTextDemo // // Created by LDY on 17/3/23. // Copyright © 2017年 LDY. All rights reserved. // #import <Foundation/Foundation.h> @interface LinksInfo : NSObject @end
code_c
code
59
null
<gh_stars>1-10 /* Copyright (C) 2010-2019, The Regents of The University of Michigan. All rights reserved. This software was developed as part of the The Vulcan project in the Intelligent Robotics Lab under the direction of <NAME>, <EMAIL>. Use of this code is governed by an MIT-style License that can be found at ...
code_c
code
2,051
null
<filename>php_phpiredis_struct.h #include "hiredis/hiredis.h" typedef struct _phpiredis_connection { redisContext *c; char* ip; int port; zend_bool is_persistent; void* error_callback; } phpiredis_connection; typedef struct _phpiredis_reader { void *reader; void *bufferedReply; char* e...
code_c
code
150
null
<reponame>N0t-A-G3n1us/SimpleFS-for-OS #pragma once #include "bitmap.h" #include "inode.h" #include "disk_driver.h" #include <stdio.h> #include <stdlib.h> /*these are structures stored on disk*/ // header, occupies the first portion of each block in the disk // represents a chained list of blocks typedef struct { in...
code_c
code
1,656
null