blob_id
stringlengths
40
40
content_id
stringlengths
40
40
repo_name
stringlengths
5
114
path
stringlengths
5
318
language
stringclasses
5 values
extension
stringclasses
12 values
length_bytes
int64
200
200k
license_type
stringclasses
2 values
content
stringlengths
143
200k
70f2b11d5d96598aaeed87817b59e432d2ffe9fe
9fcb0a91e7253aa56699030250341323f11aca43
nagrath/StakeCubeCoin
/src/rpcserver.cpp
C++
cpp
42,527
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2018-2020 StakeCubeCore developers // Distributed under the MIT software license, see the accompanying // file COPYING o...
f48a50b0c9251ec8f6154ff5a3ee90c1cac4c7b2
fad882ee5cbea7e511349fdd4610019e58ab2064
zljyw123/MFCPlaneGame
/MFCPlaneGame/Player.cpp
C++
cpp
3,451
no_license
#include"stdafx.h" #include "Player.h" #include"Resource.h" Player::Player() {} Player::~Player() {} int Player::getX() { return posX; } int Player::getY() { return posY; } int Player::getScore() { return score; } int Player::getLife() { return life; } int Player::getBomb() { return bomb; } void Player:...
9b63cdb6a620d53af88a7a81f93fadffd566a3df
3bbb8705f71d8d86836b61ed8999305062e3f914
errorcodexero/newarch
/robotsims/phoenixsim/GrabberModel.cpp
C++
cpp
2,848
no_license
#include "GrabberModel.h" #include <frc/RobotSimBase.h> using namespace frc ; namespace xero { namespace sim { namespace phoenix { GrabberModel::GrabberModel(RobotSimBase &simbase) : SubsystemModel(simbase, "grabber") { angle_ = 0.0 ; degrees_per_second_ = simba...
c9cd141390c6e82830c432f5c1f4b5e9f3c53713
0300ae3d532dc4034d12f1df5a9927ccfbbabad9
antoshkaplus/Ant
/test/graph/graph_1.cxx
C++
cxx
2,144
no_license
#include <fstream> #include <array> #include <functional> #include <iostream> #include "gtest/gtest.h" #include "ant/graph/bfs.hpp" namespace { using namespace std; using namespace ant; using namespace ant::graph; TEST(BFS, allin) { std::ifstream undir("./../data/graph/undir_0...
1b2ce714e540a396e8e301c27f037a3eb1fc22d7
965f5ad95c37cbcf73007165edd62b2228364c48
prashantgpt91/competitive-programming
/practice arranged by sites/SPOJ/MYQ1/MYQ1-6726590.cpp
C++
cpp
793
permissive
#include<iostream> //#include<conio.h> using namespace std; int main() { unsigned long long t,i,j=0,k=0,l,u,num,temp,p,q,h; char S,D,W,L,R,A,M; scanf("%lld",&t); for(i=0;i<t;i++) { k=0; scanf("%lld",&num); if(num==1) printf("poor conductor\n"); ...
0eb6950ef01c0ee42caf73e3fda2787c00955950
d449b5ec57f0e570f4b7a47255c6eab9e7b6a3a7
Krzyhau/SourceAutoRecord
/src/Utils/Math.cpp
C++
cpp
4,587
permissive
#include "Math.hpp" #include "Modules/Console.hpp" #include "SDK.hpp" #include <cmath> #include <float.h> #include <random> float Math::AngleNormalize(float angle) { angle = fmodf(angle, 360.0f); if (angle > 180) { angle -= 360; } if (angle < -180) { angle += 360; } return angle; } float Math::VectorNormal...
d40f23296b1cdfa013ace4392dbad1f8e591556e
8ef783c664cddffd1132b743629d818f65508ae5
Challestend/challestends-code-set
/NC/NC179A.cpp
C++
cpp
2,727
no_license
#include<cstdio> #define re register #define maxn 200 #define maxm 200 #define min(a,b) ((a)<=(b)?(a):(b)) namespace cltstream{ #define size 1048576 char cltin[size+1],*ih=cltin,*it=cltin; inline char gc(){ #ifdef ONLINE_JUDGE if(ih==it){ it=(ih=cltin)+fread(cltin,1,size...
3f24df2fc30b234277902ebead31821917781e49
c9ff3703b39a006870787a704d4f6fdcf4a22210
sunyinkai/ACM_ICPC
/FutherTraining/Training1_tarjan/d.cpp
C++
cpp
2,700
no_license
#include<cstdio> #include<cstring> #define min(a,b) (a<b?a:b) #define max(a,b) (a>b?a:b) #define swap(a,b) (a^=b^=a^=b) const int MAXE=2e5+7; const int MAXV=1e5+7; struct edge{ int from,to,next; bool isCut; }es[2][MAXE*2]; int head[2][MAXV],tot[2]; void init(){ memset(head,-1,sizeof(head)); memset(tot,0,sizeof(tot)...
d0fd1971f51cdcbf7738920f35c304721e4838fb
4bb8238cf545712ffcd0dd8aacc3bda578f9c1e6
mindis/cs156b
/c++/svd/SVD++fast.cpp
C++
cpp
22,327
no_license
#include <iostream> #include <string> #include <fstream> #include <vector> #include <sstream> #include <cassert> #include <stdio.h> #include <stdlib.h> #include <cmath> #include <ctime> #include <algorithm> using namespace std; // is sushkov using his mac or not? const int MAC = 0; // Filenames const char dataFileP...
75359b7262bac8a2074113e9dc5899c4b21151c9
bb4d9a704b8a89451531fd95c98cb9f5d62d9011
trantrangntt/TINC
/mtcv.cpp
C++
cpp
319
no_license
#include<stdio.h> #include<math.h> #include<string.h> int main(){ int a[100][100]; int m,n; scanf("%d%d",&m,&n); for (int i=0; i<m; i++){ for (int j=0; j<n; j++){ scanf ("%d",&a[i][j]); } } for (int j=0; j<n; j++){ for (int i=0; i<m; i++){ printf("%d ",a[i][j]); } printf ("\n"); } return 0; }
3c368c00b757d0ac133f45b7006af3196677ca1d
a76cefbf8f039da3b1418ee60dbbf8727eb92cbf
rawanshareef/snowman_b
/snowman.cpp
C++
cpp
2,649
permissive
#include <string> #include <iostream> #include <array> #include "snowman.hpp" using namespace std; const int dev = 10; const int MaxD = 8; const int maxDig = 4; const int minDig = 1; const int RA = 5; const int T = 6; const int B = 7; const int TheMin = 11111111; const int TheMax = 44444444; //check if the input true ...
579b1570ea29e3f4430fc953567d2dd41b50ab4f
3b084fe31bc71322c8e6a2ccd6b20d88839337d0
PieterBogemans/3D
/raytracer/raytracer/scripting/primitives-module.cpp
C++
cpp
1,927
no_license
#ifndef EXCLUDE_SCRIPTING #include "scripting/primitives-module.h" #include "scripting/scripting-util.h" #include "primitives/primitives.h" #include "math/functions.h" #include "animation/time-stamp.h" using namespace chaiscript; using namespace raytracer; using namespace math; namespace { Primitive make_union(...
901352ad6ec5cad9b2ddb4ed7d8f017f2e7d41ed
66271498ad3687caeb22d0c118402550078e4222
qtnc/sample
/src/common/BassPlugin.hpp
C++
hpp
303
no_license
#ifndef ____BASSPLUGINSTRUCT_1 #define ____BASSPLUGINSTRUCT_1 #include "WXWidgets.hpp" #include "bass.h" struct BassPlugin { HPLUGIN plugin; wxString name; int priority; bool enabled; BassPlugin (HPLUGIN p, const wxString& n, int pr, bool e): plugin(p), name(n), priority(pr), enabled(e) {} }; #endif
ba081fb61c2b6254965fc72abac5ac47642ec48d
d6ca8ddaeeb07369d8221f1c8e3e8acdfaac5028
maZymaZe/acm-remote
/2021-8-21/src/c.cpp
C++
cpp
2,024
no_license
#include <cstdio> #include <set> using namespace std; const int NMAX = 10002; int T, n, m, a[NMAX], t[NMAX], u[NMAX], nx[NMAX]; struct PR { int del, id; bool operator<(const PR& x) const { return (del == x.del) ? ((nx[id] == nx[x.id]) ? (id < x.id) : (nx[id] < nx[x.id])) ...
1f1a1065613dafece6fafd972c180111c663a62d
e7362561b807bd4d3c35280da8c44132ee8a3893
justforfun1323/qingyi
/qingyi/util/date_.cc
C++
cc
1,732
no_license
#include "date_.h" #include <stdio.h> namespace qingyi { namespace detail { char require_32_bit_integer_at_least[sizeof(int) >= sizeof(int32_t) ? 1 : -1]; //这里起到了一个编译时保护作用,如果int小于4字节,编译时, //会要求生成一个char[-1]数组,报错 int GetJuliandaynumber(int year, int month, int day) { (void) require_32_bit_integer_at_least; int a...
d36ae2292cbfd54588d648eb7561e2d8f4e5bff9
dc982165baaa557e2e774cc4aac9cea32d68385e
OskarKinomoto/KMS-1
/src/Atom.cpp
C++
cpp
1,149
no_license
#include "Atom.h" #include <cmath> namespace { Real EKinToP(Real E_kin, Real m) { Real res = sqrt(2 * m * E_kin); return res * (rand() & 1 ? -1 : 1); } double rand01() { return static_cast<double>(rand())/RAND_MAX; } Real TToEKin(Real T) { return -.5 * physicConstants::kB * T * log(rand01()); } } ...
f4f053f3b071ee179e43e38491f5dc1d7b817df6
b48f747db3d9fcbd0a0ad19da6af1d558c84f4d4
arvalon/AsynchronousBook
/chapter9/src/main/jni/image.cpp
C++
cpp
1,525
no_license
#include "ru_arvalon_chapter9_GrayImageLoader.h" #include <android/bitmap.h> #include <android/log.h> #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"vga",__VA_ARGS__) #ifdef __cplusplus extern "C" { #endif typedef struct { uint8_t red; uint8_t green; uint8_t blue; uint8_t alpha; } rgba; j...
fa52450b5d309a73e1001c31cdcbaed8aba35a33
19d303c32dde88656069c687bfb0730f2d197529
ryudoarya/Praktikum-strukurdata
/C1 Stack.cpp
C++
cpp
2,827
no_license
//R. Yudo Arya Kusuma// //20051397013// ///2020-A/// #include <iostream> #include <conio.h> #define maxstack 5 using namespace std; struct STACK { int top; float data[4]; }; float dta; struct STACK stackbaru; bool isfull() { if(stackbaru.top == maxstack) ...
9b15602034a222040b9886721563164fc4148468
fe9f592d38c98e1fe19e3de34d938c45712122a3
sirAgg/nebula
/code/render/coregraphics/debug/displaypagehandler.cc
C++
cc
11,740
permissive
//------------------------------------------------------------------------------ // displaypagehandler.cc // (C) 2007 Radon Labs GmbH // (C) 2013-2020 Individual contributors, see AUTHORS file //------------------------------------------------------------------------------ #include "render/stdneb.h" #include "coregr...
2ed4594cc9a8e693285629d3dc6f89825e470658
936fbad3f265eba86d967db546abf0b963015694
kaito-cpro/Attack4-old-
/attack4ai.cpp
C++
cpp
20,487
no_license
#include<iostream> #include<cstdio> #include<cmath> #include<vector> //delとかabsolute_winとかは緩いけど、queueはきちんと動いてるver. #include<list> //絞り込みアルゴリズム未搭載 #include<set> //delせずに置かな負けるよってところあり #include<map> #include<stack> #include<queue> #include<string> #include<utility> #include<algorithm> #...
ded3455bb6cb1fa1048d6493af7601063f367260
ac34cfbea20eafc7024c0ccf03c4984de0101d1b
lucky5656/C-Code
/01C++基础入门/04程序流程结构/03选择结构-多条件的if语句.cpp
C++
cpp
1,320
no_license
#include<iostream> using namespace std; int main() { //选择结构:多条件的if语句 //用户输入分数,如果分数大于600,视为考上一本大学,在屏幕上输出; //如果分数大于500,视为考上二本大学,在屏幕上输出; //如果分数大于400,视为考上三本大学,在屏幕上输出; //如果分数小于等于400,视为未考上大学,在屏幕上输出 //1.用户输入分数 int score = 0; cout << "请输入一个分数:" << endl; cin >> score; //2.打印用户输入的分数 cout << "您输入的分数...
05f7a772fc7f82e8069ba8c871213c0d94583e4e
8fabf3a20535749bdf785d0b4431c5115c36e82e
mirabitl/SDHCAL
/YDAQ/src/YDaqManager.cpp
C++
cpp
11,237
no_license
#include "YDaqManager.h" #include <fstream> #include "json/json.h" #include <stdlib.h> YDaqManager::YDaqManager(std::string nameserver,std::string configuration) : name_server(nameserver), daqconfig(configuration) { this->Parse(daqconfig); } void YDaqManager::Parse(std::string conf) { Json::Value root; Json:...
3229b2a2cf92c39e81e68824b1d4663e7579d10b
4a11b6b08654affadedd9783bc387df0dc5f57da
njoy/NJOY21
/src/njoy21/Version.hpp
C++
hpp
446
permissive
class Version{ public: static constexpr int majorVersion{1}; // Do not change // Change whenever new capability is implemented static constexpr int minorVersion{2}; // Change whenever merge to master branch is done static constexpr int patchVersion{2}; static std::string version(){ return std::to_strin...
ce99dd54322e071dc7ca6e40a993b52a683de62e
e0e65a344cac1022e6ae59affb7e8d02fff18e96
kunhuicho/crawl-tools
/codecrawler/_code/hdu4027/16212804.cpp
C++
cpp
1,804
no_license
#include <stdio.h> #include <algorithm> #include <string.h> #include <math.h> using namespace std; const int L = 100000+10; __int64 sum[L<<2],cnt[L<<2]; void add(int i) { sum[i] = sum[2*i]+sum[2*i+1]; cnt[i] = cnt[2*i]&&cnt[2*i+1]; } void init(int l,int r,int i) { if(l == r) { scanf("%I64d",&...
93b9e1823c2a0082142ca67c9f9c540fbe054711
6b161c98efb8fe4a325ebdd9217f031b8c0e3b0a
zhouzhiqian/code
/packages/peripheralsInterface/tst/testIMU.cpp
C++
cpp
889
permissive
// Copyright 2018-2019 Jan Feitsma (Falcons) // SPDX-License-Identifier: Apache-2.0 /* * testIMU.cpp * * Created on: July 7, 2018 * Author: Jan Feitsma */ #include "int/IMU/IMU.hpp" #include "FalconsRtDB2.hpp" // MAIN int main(int argc, char **argv) { auto imu = IMU(); double delta = 0.0; doubl...
406e38b8fe578e60978597f59af2cd668d3c2302
56b7e8680b7c1a8d0d1985f3804695363b781b31
joker-eph/nt2
/modules/core/predicates/cover/simd/is_not_less.cpp
C++
cpp
3,091
permissive
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
c99dcb2acdf8e6d9be29cd6d153d862689329a4f
eb3928e7a6f61c7debaf8127c0f0228812f48216
appleboyyb/RedVex-1
/core/GameServerPacketMarshal.cpp
C++
cpp
6,674
no_license
#include "GameServerPacketMarshal.h" #include "Compression.h" #include "Packet.h" #include "Globals.h" const int GameServerPacketMarshal::PacketSizes[] = { 1, 8, 1, 12, 1, 1, 1, 6, 6, 11, 6, 6, 9, 13, 12, 16, 16, 8, 26, 14, 18, 11, -1, -1, 15, 2, 2, 3, 5, 3, 4, 6, 10, 12, 12, 13, 90, 90, -1, 40, 103,97, 15, -1, 8...
067a8e7dedcd0fbd658e278c23ca7c88557b7a95
2d79009c1bf49702e01b6b6d126508f45145e534
AllisonLee0507/CPlusPlus_Language_Tutorial
/24.map multimap/24_07.map_iterator.cpp
C++
cpp
7,686
no_license
#if 0 #include <iostream> #include <map> #include <string> using namespace std; int main(void) { typedef map<string, float> StringFloatMap; StringFloatMap coll; // insert some elements into the collection coll["VAT"] = 0.15; coll["Pi"] = 3.1415; coll["an arbitrary number"] = 4983.223; coll["Null"] = 0; /* p...
e5ce28c594b963ac0492cd182ebe842f0ac3681a
fe24486131cbf77687571561f63ffbc6db8448b3
RashmiDR/Craftsmanship
/BinaryTreeCodeReadable/BinaryTree.cpp
C++
cpp
7,493
no_license
// // binaryTree.cpp // trees // // Created by Rashmi Devarahalli on 3/10/13. // Copyright (c) 2013 Rashmi Devarahalli. All rights reserved. // #include "binaryTree.h" #include <stack> #include <queue> #include <utility> using namespace std; bool BinaryTree::IsEmpty() { return (root == NULL); } void Binary...
1e87c7497d67c8cd4715eb34159483b14beed0aa
292638f6a6bd2bc44e6f0f51a563a2c5c2f57a8e
y12uc231/cocos2d-x
/tests/cpp-tests/Classes/BugsTest/Bug-350.cpp
C++
cpp
422
no_license
// // Bug-350 // http://code.google.com/p/cocos2d-iphone/issues/detail?id=350 // #include "Bug-350.h" bool Bug350Layer::init() { if (BugsTestBase::init()) { auto size = Director::getInstance()->getWinSize(); auto background = Sprite::create("Hello.png"); background->setPosition(size.w...
a06ad9e7d14c7562551e06bfed7bdc18063a7858
786bf8d8d0167cb33fd68a4490edafd34c56b401
GIacial/Pokemon
/TestPokemon/Pokemon/Interface/Graphics/Scene/learnattaquescene.cpp
C++
cpp
2,125
no_license
#include "learnattaquescene.h" LearnAttaqueScene::LearnAttaqueScene(PokemonInterface& you,QString nomAttaque, bool needEvolution, QObject *parent) : QGraphicsScene(parent),you(you) { this->setBackgroundBrush(QBrush(QColor(180,180,180))); this->setSceneRect(0,0,300,300); this->needEvolution = new bool(ne...
e12ff2820598098139a3729401ed8812284403b1
8c403470950d33e4ee16324d5093d8456c08c530
SevaCode/ClickHouse
/contrib/libpoco/Crypto/testsuite/src/CryptoTest.cpp
C++
cpp
9,209
permissive
// // CryptoTest.cpp // // $Id: //poco/1.4/Crypto/testsuite/src/CryptoTest.cpp#2 $ // // Copyright (c) 2008, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include "CryptoTest.h" #include "CppUnit/TestCaller.h" #include "CppUnit/TestSuite.h" #include "Po...
779185364d37838f2efc640f0f089d8bc8070d70
003b8205638cd3b4ded1694d208a4905d9283969
ponyatov/evalon
/cpp.cpp
C++
cpp
2,489
no_license
#include "hpp.hpp" #define YYERR "\n\n"<<yylineno<<":"<<msg<<"["<<yytext<<"]\n\n" void yyerror(string msg) { cerr<<YYERR; cout<<YYERR; exit(-1); } int main() { env_init(); return yyparse(); } void W(Sym*o) { cout << o->dump(); } void W(string s) { cout << s ; } Sym::Sym(string T,string V) { tag=T; val=V; } Sym::Sym(s...
2771abb1ce71acafd5779aa2c1125a51255820a8
d152a20320a35a76cff1a2ca7354f52f2e140993
vanbako/BubbleBobble
/BubbleBobble/NpcManager.cpp
C++
cpp
3,373
no_license
#include "pch.h" #include "NpcManager.h" #include "Npc.h" #include "NpcComponent.h" #include "NpcCtrlComponent.h" using namespace ieg; NpcManager::NpcManager() : mpGONpcs{} , mSpawnWait{} { for (int i{ 0 }; i < mNpcMax; ++i) mSpawnWait.push_back(0.f); } int NpcManager::GetNpcMax() { return mNpcMax; } GameObje...
f2af4a82902847a4ac38d674a34ee38c84d7892e
f7fb856ad1a4311511902b86f91c7c07a47f6712
freezer-glp/leetcode-submit
/src/Maximum Product Subarray My Submissions QuestionEditorial Solution.cpp
C++
cpp
942
no_license
/*Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest product = 6. Subscribe to see which companies asked this question Hide Tags Array Dynamic Programming Show Similar Prob...
447ef8241055ee3b311e6788a3ff6a2ce01e1c3b
24bd176790780a58cc3fac27bb7b047f8394d739
zgsxwsdxg/terra
/src/tcompiler.cpp
C++
cpp
112,921
no_license
/* See Copyright Notice in ../LICENSE.txt */ #include "tcompiler.h" #include "tkind.h" #include "terrastate.h" extern "C" { #include "lua.h" #include "lauxlib.h" #include "lualib.h" } #include <assert.h> #include <stdio.h> #include <inttypes.h> #ifdef _WIN32 #include <io.h> #include <time.h> #include <Windows.h> #unde...
4bd9c2af6af6e8f6ff1639fb12ea9bd9b5e98422
44eb8dfab9d6240af0094a0b051fae75d9d87735
wuhengzhi/chromium-crosswalk
/ash/default_accessibility_delegate.cc
C++
cc
4,485
permissive
// 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. #include "ash/default_accessibility_delegate.h" #include <limits> namespace ash { DefaultAccessibilityDelegate::DefaultAccessibilityDelegate() {} Defa...
9fef3d0a99359ef2328df8c70fc4557b8d7738e0
8fe1e3b6ce82da4810b020271d4340a1c03c2fbe
bgin/lrose-core
/codebase/apps/mdv_utils/src/asdi2grid/Main.cc
C++
cc
3,825
permissive
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1990 - 2016 // ** University Corporation for Atmospheric Research (UCAR) // ** National Center for Atmospheric Research (NCAR) // ** Bo...
28cc512978486d4622bb96905e54c60ed0ae4531
c57675e29609d3410fcbbea148c172b590589292
sammyjh30/CPPBootcamp
/day01/ex06/HumanB.cpp
C++
cpp
1,192
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* HumanB.cpp :+: :+: :+: ...
b4a8f3d502c3cbf6a979be4dedeffd9f72eb175c
534c307039aa79d38c45bc603b06fd2272fa97d1
chaotic-binary/CPP-42
/Module04/ex02/ISquad.hpp
C++
hpp
274
no_license
#ifndef ISQUAD_HPP # define ISQUAD_HPP # include <iostream> # include "ISpaceMarine.hpp" class ISquad { public: virtual ~ISquad() {} virtual int getCount() const = 0; virtual ISpaceMarine* getUnit(int) const = 0; virtual int push(ISpaceMarine*) = 0; }; #endif
ce21137bf2b6f390f82e89e33c942754fbee2bd7
c7cccafad099bba2396dcae54d19f6706ea2b9b8
Hconk/CP
/src/util.cpp
C++
cpp
26,187
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/bitcoin-config.h" #endif #include "u...
696f100ad506ad72aeaf9dd4e375cf8aed0b9252
74894670a6ed25a10dae20589c8c6088bb9880c4
SazzadSH/Algorithms
/C++/Memoization/Memoization.cpp
C++
cpp
644
no_license
#include <iostream> using namespace std; int fib_ara[1000], function_calls; int fibonacci(int x); int main() { for(int i = 0; i < 1000; i++) { fib_ara[i] = NULL; } int n; cout << "Nth term: "; cin >> n; cout << "Fibonacci sequence: " << fibonacci(n) << endl; cout << "Nu...
c0eaf14aa9fd63910efcfb2ef17d6aa0e4ec9a04
7d993d7faa2e15ff990f5f2271c3212ae285a693
Bia10/clrn
/projects/http/AuthPlugin/src/UserInfo.cpp
C++
cpp
3,904
no_license
/* * UserInfo.cpp * * Created on: Dec 17, 2011 * Author: root */ #include "UserInfo.h" #include "Exception.h" #include "Singletones.h" #include "Crypto.h" #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/xml_parser.hpp> #include <boost/filesystem/operations.hpp> #include <boost/algori...
f691eb7179aa8e7347537b2a1a9439623f1d9f2a
526bebdf7ac4dec720a60e01fef1400a3a7ca826
sonic59/JuceEditor
/JuceLibraryCode/modules/juce_gui_basics/buttons/juce_Button.cpp
C++
cpp
18,768
no_license
/* ============================================================================== This file is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-11 by Raw Material Software Ltd. ------------------------------------------------------------------------------ JUCE can be redistrib...
57ea7dd3213589b69274e5375fc708456cde3b57
06eb32d7170c8047c4d81dfafad497b76f94c1f7
lsinfo3/moni_qoe_monitoring_vnf
/libtins-master/src/arp.cpp
C++
cpp
5,037
permissive
/* * Copyright (c) 2017, Matias Fontanini * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of ...
7fff51dfb7155b54e31143d507e4887036ba544e
263e244685db7b6a01e8d4cc8321e6f6637a88ce
jango-blockchained/tensorflow
/tensorflow/lite/kernels/transpose.cc
C++
cc
9,193
permissive
/* 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/LICENSE-2.0 Unless required by applicable law or a...
5278aeb6ff2d9b807eb36c28c88af26abb1dfee5
d1b824b369743554bc8ad4d62af42f67eb049bfd
Lucusk115/VGP122_A3_Kelly_Lucus
/Sprite.cpp
C++
cpp
5,767
no_license
#include "Sprite.h" Sprite::Sprite(const char* filename, int facenum, int suitnum, int posX, int posY, SDL_Renderer* renderer) { this->renderer = renderer; rect.x = facenum * 75 + 9; rect.y = suitnum * 100 + 9; rect.h = 100; //image height rect.w = 75; //image width dest.x = posX * 75 + 150; dest.y = posY * 1...
72e67d74c9427e7f689fb9e198e09963f42549c4
ad0a6b1e5ea3b46e37848c64d20fd24307626903
geetharm/Algorithms
/operators.cpp
C++
cpp
1,425
no_license
/* * operators.cpp * * Created on: Sep 19, 2016 * Author: Meenakshi */ #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; class Matrix{ public: std::vector< std::vector<int> > a; friend Matrix operator+ (const Matrix& ...
ca325310118a0a990713ec1e2c64da91df41d0e6
c694d84cd28d1ec22240ff70981ea1b61bfced8e
zrzppp/v8
/test/cctest/test-feedback-vector.cc
C++
cc
24,180
permissive
// Copyright 2014 the V8 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. #include "src/v8.h" #include "test/cctest/cctest.h" #include "src/api-inl.h" #include "src/debug/debug.h" #include "src/execution.h" #include "src/glob...
5807369fcdd38729a4637a44014a3d0b3988c61a
05301e4e85f85a22bdf999ac46897e86b1aedd07
kmjp/procon
/srm/501-520/516/NetworkXMessageRecovery.cpp
C++
cpp
3,509
no_license
#include <cstdlib> #include <cstring> #include <memory> #include <cstdio> #include <fstream> #include <iostream> #include <cmath> #include <string> #include <sstream> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <algorithm> #include <numeric> using namespace...
5729cada9825d677b88e06807186364b3f8317f8
dc31c741c5a4888f7f9e2ca5fbdb5e5937d636ff
mark-grimes/cmssw_Benchmarking
/src/MemoryCounter.cc
C++
cc
15,868
no_license
#include "MarksTools/Benchmarking/interface/MemoryCounter.h" #include <DataFormats/Provenance/interface/ModuleDescription.h> #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" // The signals in ActivityRegistry changed drastically to cover threaded /...
bb34130f235a6d791f56afec95655e51e16d13fb
90ae130e019d54b7d8ad5da4c75082c964ca7bae
svarvel/browser-android-tabs
/net/third_party/quic/core/quic_packet_reader.cc
C++
cc
7,065
permissive
// Copyright 2015 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. #include "net/third_party/quic/core/quic_packet_reader.h" #include <errno.h> #ifndef __APPLE__ // This is a GNU header that is not present on Apple platf...
7661288677622e475391924c68fb3400e4df0e8a
cbd5d2761c3d7a5026dcbab01c4c0b56a27820ae
dedyAxmz/siconos
/kernel/src/utils/SiconosAlgebra/SimpleMatrixMisc.cpp
C++
cpp
7,210
permissive
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2021 INRIA. * * 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 * *...
bea54221610c99777799c4326680734fca16540b
f98920573dd593c926f5f0560c0785fc6f7a4cb5
Vaibhav026/Competitive-Coding
/A2oj Ladder/300C_better.cpp
C++
cpp
1,248
no_license
#include <bits/stdc++.h> using namespace std; long long fact[1000001]; long int mod = 1000000007; const int N = 1e6 + 100; int a,b; void initfact() { fact[0] = 1; for(int i = 1; i < N; i++) { fact[i] = (fact[i-1] * i); fact[i] %= mod; } } bool is(long int sum)...
dee2eeb86072ac2058c2a388f91b8be2463f47ed
89e28020de0c9b835117177f0d838792d047e10b
ssln2014/chromium
/services/identity/public/cpp/access_token_fetcher.cc
C++
cc
7,215
permissive
// Copyright 2018 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. #include "services/identity/public/cpp/access_token_fetcher.h" #include <utility> #include "base/logging.h" #include "services/network/public/cpp/shared...
7532910831bed2744a0e700d93205854108a8528
8ab0bfd9b239e0ac5a56a9e72b57b1a7e06f3aba
HK-FLYE/Annotated_STL_Sources
/annotatedSTL-master/6-7-1.cpp
C++
cpp
2,867
no_license
#include <algorithm> #include <vector> #include <functional> #include <iostream> using namespace std; template <class T> struct display{ void operator()(const T& x) const { cout<< x<<' ';} }; struct even { bool operator()(int x) const { return x%2? false:true;} }; class even_by_two{ public: int operator()(...
6f13742b9a357ef9509b5c3245b23d18ab0678fa
a7f6ed357a4998f78426d1fce00216fd54d5ceb6
danleaf/myVPN
/voice/main.cpp
C++
cpp
9,106
no_license
#include <stdio.h> #define EXPR 0x04C11DB7 #define EXPRH8 4 //#define LSB unsigned int map[256]; struct Reg32 { union { unsigned int r; struct { #ifndef LSB unsigned int b0 : 1; unsigned int b1 : 1; unsigned int b2 : 1; unsigned int b3 : 1; unsigned int b4 : 1; unsigned int b5 : 1; unsigne...
3b0b4ce65e43176482c93da3c4efe336b2638db7
ad1c336e23eefe9348933a9b13db0dd9396374a8
TaroTokui/AquaWall
/src/Title.cpp
C++
cpp
1,550
no_license
// // Title.cpp // AquaWall // // Created by Taro Tokui on 2014/03/23. // // #include "Title.h" Title::Title():image_offset(0){ titleImage.loadImage(TITLE_IMAGE_TEXT); ahiruImage.loadImage(TITLE_IMAGE_DUCK); parameters.setName("Title"); parameters.add(title_speed.set("title speed",0.0,0.0,20.0)); parame...
069bc89f79bd2400eb1b58a41f6757c1844b8833
2e728e3b31829f3a920c381cdf12ae1d00778e7d
simonecid/cmssw
/RecoParticleFlow/PFProducer/plugins/linkers/TrackAndECALLinker.cc
C++
cc
3,727
permissive
#include "RecoParticleFlow/PFProducer/interface/BlockElementLinkerBase.h" #include "DataFormats/ParticleFlowReco/interface/PFCluster.h" #include "DataFormats/ParticleFlowReco/interface/PFBlockElementCluster.h" #include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h" #include "RecoParticleFlow/PFClusterTo...
3fef03d010478a7d16be747d331636d8f11205fb
f058d13e226c09b4fdcfda8425e84fc0eaf0c430
yeahzdx/Leetcode
/链表-Swap Nodes In Pairs.cpp
C++
cpp
1,139
no_license
#include"head.h" /* Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can be changed. */ ListNode *swapPair...
c90a92d78b0537e10b71ba6d0fd00428343b0ec8
dda74472cd54bd5cdffb2ff55d330a114e373387
CaiHuicheng/Project
/leetcode/leetcode/剑45_吧数字排成最小的数字.cpp
C++
cpp
440
no_license
class Solution { public: string minNumber(vector<int>& nums) { // 选取使字符串组合更小的排序规则 auto compare = [](string sa, string sb){return sa+sb < sb+sa;}; vector<string> tmp; for(int n : nums){ tmp.push_back(to_string(n)); } sort(tmp.begin(), tmp.end(), compare); ...
c9704fe58a0ea27f461ab3ccc18128be849eca66
080324cb598525d785d1b341ecf4e8258bfcc496
DarkWolf71/DSA-2020
/Assignment-1/1.1(A).cpp
C++
cpp
1,036
no_license
#include <iostream> #include <math.h> using namespace std; int main(){ int m,n,x,y; cin>>m>>n; int **a; a=new int *[m]; for (int i =0; i<m; i++){ a[i]= new int [n]; } for(int i=0; i<m; i++){ for (int j=0; j<n; j++){ cin>>a[i][j]; } } cin>>x>>y; int **b; b=new int *[x]; for (int i =0; i<x...
19a81b24eadfc07b7277c421676efe0a82a9952b
d25dfb223cd67cf452360e7cfebf281ddd67cd99
pdhapke/Cplusplus-samples
/lab 11-2.cpp
C++
cpp
2,074
no_license
#include <iostream> #include <string> #include <iomanip> using namespace std; // This program demonstrates partially initialized structure variables // Peter Hapke struct taxPayer { string name; long socialSecNum; float taxRate; float income; float taxes; }; int main() { // Fill in code to initialize a struct...
705b4bcd0e41e98fde6138e281f9c4a0902dab2f
97a66136c18cd55f9230ac7d85819bde01ca4a69
roussukke/Yorozuya
/library/ATF/HHOOK__.hpp
C++
hpp
242
permissive
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> START_ATF_NAMESPACE struct HHOOK__ { int unused; }; END_ATF_NAMESPACE
3235145c6e1a172652d5dd93a6677022fa292dba
93805ae11a49f73c9ae5d0e3d3cecad04eca949b
hugogzz93/SummerDuck
/ProcedureDirectory.cpp
C++
cpp
2,254
no_license
#include "ProcedureDirectory.h" #include <stdexcept> #include <algorithm> #include <iomanip> #include <iostream> #include <unordered_map> ProcedureDirectory::ProcedureDirectory() {} void ProcedureDirectory::listDirectory(bool verbose) { printf("Function Identifiers\n"); for(auto kv : identifiers) { print...
a1b7f4f823911677bdc8034f60d9a06a899a9f62
4a76b7fb28d963dfcef9f36b8e2091c957fe2c46
andyrbeal/AudioBookConverter
/Bento4svn/Source/C++/Apps/Mp4Encrypt/Mp4Encrypt.cpp
C++
cpp
11,036
no_license
/***************************************************************** | | AP4 - MP4 Encrypter | | Copyright 2002-2008 Axiomatic Systems, LLC | | | This file is part of Bento4/AP4 (MP4 Atom Processing Library). | | Unless you have obtained Bento4 under a difference license, | this version of Bento4 is Bento4...
9e324b89ec071c5136f93950796759d0c8d66d54
060078c51f622b1229b11fd72b1d5e14521a8641
shoaib0657/Competitive-Programming-Problems-2020
/Linked List/Detect loop in a linked list.cpp
C++
cpp
526
no_license
int detectloop(Node *head) { // your code here if(head == NULL) return 0; Node* slow = head; Node* fast = head; while(true) { slow = slow->next; if(fast->next != NULL) fast = fast->next->next; else return 0; // next node null => ...
c8f5b0962f7a166c1f23001305bd4f9a35a64224
6a8be59216333b2f6fbb703ceef786cdc120cf3a
starrynights89/chapter-5-drill
/dr_23.cpp
C++
cpp
380
no_license
#include "std_lib_facilities.h" int main() try { int i=0; while (i<10) ++i; if (i) { cout << "Success!\n"; } keep_window_open(); return 0; } catch (exception& e) { cerr << "error: " << e.what() << '\n'; keep_window_open(); return 1; } catch (...) { cerr << "Oops: unk...
5d5b928a3d90803a805c625d6dd25e88f7beafc5
427e26ec2ab817e26c49a99b44427ee4cf9d79ac
kailaisi/android-29-framwork
/native/opengl/libagl/Tokenizer.cpp
C++
cpp
4,815
permissive
/* libs/opengles/Tokenizer.cpp ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LI...
a913230d2200c075ed6f62d45d4cb7215453b079
88ff22600c146b4ef6f1c68e86514e25fda0ac9c
AlexDominguez18/VOCEX---CALL-CENTER
/agentnode.cpp
C++
cpp
1,297
no_license
#include "agentnode.h" using namespace std; AgentNode::AgentNode(): dataPointer(nullptr),prev(nullptr),next(nullptr){ } AgentNode::~AgentNode(){ delete dataPointer; } AgentNode::AgentNode(const Agent& a): dataPointer(new Agent(a)),prev(nullptr),next(nullptr){ if (dataPointer == nullptr...
3817222dc9427c8057215f5decbe957124dee73c
b82b037a2ac26c6a20b8e71aba0e28b3078b5e02
andrasnemeth/cpp-erlang-term
/include/erlang/data/detail/TaggedValue.hpp
C++
hpp
1,166
no_license
#ifndef ERLANG_DATA_DETAIL_TAGGEDVALUE_HPP #define ERLANG_DATA_DETAIL_TAGGEDVALUE_HPP #include <boost/operators.hpp> //============================================================================// namespace erlang { namespace data { namespace detail { //---------------------------------------------------------------...
04cd59321a29c8f0761714454a4aa4c3a75ad875
4e87c5cb4e38b0bec67035089a94ac6e218006f6
isaponsoft/libamtrs
/include/amtrs/lang/java/.inc-jni/jni-native_method.hpp
C++
hpp
3,986
permissive
/* Copyright (c) 2019, isaponsoft (Isao Shibuya) All rights reserved. * * Use of this source code is governed by a BSD-style license that * * can be found in the LICENSE file. */ #ifndef __libamtrs__java__native_method__hpp #define __libamtrs__java__native_method__hpp AMTRS_JAVA_N...
baf3a6c4d3cb9a125ac9c14d8d082b6bacffd6ba
84e8da6db2098cf2f9ee0060da51b54eb138f943
Vishal-V/pytorch
/torch/csrc/jit/symbolic_script.cpp
C++
cpp
19,218
permissive
#include <torch/csrc/jit/symbolic_script.h> namespace torch { namespace jit { namespace { std::mutex lock; const std::vector<std::string> functions = { R"( def _dim_arange(like, dim: int): def backward(grad_output): return None, None return ...
492090b86e18676c3a53608ee1153977fe889a47
4b1d8e540df18b5907fa9e1cc76ada0d52ef61bc
printfErik/Motion_Planning
/Enemy.cpp
C++
cpp
237
no_license
#include "Enemy.h" Enemy::Enemy(int path_size) { health = 2900; isDead = false; isGoal = false; ePos = glm::vec2(-21.5f, 21.5f); eVel = glm::vec2(0.f, 0.f); dir = glm::vec2(0.f, 1.f); rotation = 0; eCurrent = path_size - 2; }
1f267f6e322796a9adc83279ff3344f07ccc42e2
b745e107860e50ac8d2487d56059704eb0906964
rjtsdl/CPlusPlus
/Interview Play CPP/a252MeetingRooms.cpp
C++
cpp
693
no_license
// // a252MeetingRooms.cpp // Interview Play CPP // // Created by jingtao ren on 1/24/20. // Copyright © 2020 Jingtao Ren. All rights reserved. // #include <stdio.h> #include <vector> #include <map> using namespace std; class Solution { public: bool canAttendMeetings(vector<vector<int>>& intervals) { ...
2a10fd9582a6c9fa19ba6f415d34522da1c6a644
a8a86bf89b31d0c6f7f34b7c616b4a9597c8f179
DeanneFlavors/Parser
/Parser/Display.cpp
C++
cpp
2,416
no_license
///////////////////////////////////////////////////////////////////// // Display.CPP - Displays results // // ver 1.0 // // Language: Visual C++ 2013 // // Platform: Dell Precision T7400,...
de510d442baf3c4e77e1b034fbfc25f0d3836176
f5649ee20bb265666ee15c9885053a1f6fe7b881
ChausV/homework03
/exercise02/Move.cpp
C++
cpp
490
no_license
#include "Move.h" #include <iostream> using std::cout; using std::endl; Move::Move(double a, double b) { this->reset(a, b); } void Move::showmove() const { cout << "x = " << x << ", y = " << y << endl; } Move Move::add(const Move & m) const { // double overflow handling is not very usefull in this class Move resu...
bb75bbcb8c26694338d16508e8f5a85d3327b190
1aeaa6203d00459685aa9bbf4ddc5e906f05d5b8
rthomas/mcollective-cpp-agents
/libamqp-cpp-src/exec.cpp
C++
cpp
405
no_license
#include <sys/types.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> int main (void) { char *cmd = "puppet apply --help 2>&1"; char buf[BUFSIZ]; FILE *ptr; int stat; if ((ptr = popen (cmd, "r")) != NULL) while (fgets (buf, BUFSIZ, ptr) != NULL) (void) printf ("%s", buf); stat = pc...
a42d87ac7e2e7e0027b209e243c4552879ce02aa
bfd4eac05887cc2b7837eb0c966b3dc732a90a0b
Tudor67/Competitive-Programming
/LeetCode/Problems/Algorithms/#1801_NumberOfOrdersInTheBacklog_sol2_two_heaps_O(NlogN)_time_O(N)_extra_space_332ms_59MB.cpp
C++
cpp
1,869
permissive
class Solution { public: int getNumberOfBacklogOrders(vector<vector<int>>& orders) { const int MODULO = 1e9 + 7; const int BUY = 0; const int SELL = 1; const int N = orders.size(); // (price, amount) using PII = pair<int, int>; priority_queu...
af3e5d7e7f34a3c1ae38a366be2fe58e7a09c36b
71ab3171129ce81d6a24290d5d64f745be68849d
fungchou/ZLMediaKit
/src/Rtp/PSEncoder.cpp
C++
cpp
1,497
permissive
/* * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). * * Use of this source code is governed by MIT license that can be found in the * LICENSE file in the root of the source tree. All contributing project authors ...
113f07c3681e735a0e82b260def276e5baf4b8ac
7d9f26c0b555376d364ed7418737d6deb16d6a29
Jasoncch/CBIR_System
/SRC/main.cpp
C++
cpp
8,207
no_license
/** * CS4185/CS5185 Multimedia Technologies and Applications * Course Assignment * Image Retrieval Project */ #include <iostream> #include<math.h> #include <stdio.h> #include <algorithm> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/nonfree/nonfree.hpp" ...
7eb4a2247bbe7893c55589438651ae7a4c4e3194
0153eef697d2e4cbfff5342b44391f313c69b8c3
ar412/Bestdeals
/directi/1.cpp
C++
cpp
2,018
no_license
/*input 5 1 2 3 1 1 */ #include <bits/stdc++.h> #define ll long long int #define mod 1000000007 using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); set<pair<int,int> > s; int n; cin>>n; std::vector<int> A(n); for (int i = 0; i < n; ++i) { cin>>A[i]...
164576cf890c5408359874ec2d1857ed352aa2e5
ec854656591f27cda89c305cd26e8034acef89f2
leonardoamurca/BSI
/AEDs-01/leonardoAguilar_roteiro4/leonardoAguilar_ex19.cpp
C++
cpp
2,244
no_license
/* Leonardo Aguilar Calcula a média dos números pares e dos números ímpares digitados pelo usuário, identifica qual o maior e menor número par e o maior e menor número ímpar e o usuário só para de entrar o dados quando é digitado -1. Entrada: Números Saída: Média dos impares, média dos pares, maior par, maior ímpar, me...
a5ef0c833a2b257eadabc4580d823943f5580240
0bd815b19bae001414a665aef19b19fa06881b28
LightAngel60/DIVA-Loader
/Render/dllmain.cpp
C++
cpp
2,110
permissive
#include "framework.h" #include <detours.h> #pragma comment(lib, "detours.lib") #include <GL\freeglut.h> #include <GL\GL.h> #include <windows.h> #include <detours.h> #include <iostream> int hookedCreateWindow(const char* title, void(__cdecl* exit_function)(int)) { glutInitWindowSize(nWidth, nHeight); if (nBorderle...
cc3aa37c70a1cf9f2ce148ba469aa7e8530c7e38
c8d05939041be96852350d2e25b111e9c0cb6c12
fenghuo/cs160homework1
/searchkthin2array.cpp
C++
cpp
730
no_license
//20:13 #include<iostream> using namespace std; int f(int*a,int n,int *b,int m,int k) { int s=0; int e=min(k,n)-1; while(s<=e) { int mid=s+(e-s)/2; int j=(k-mid-1); if(j<0) e=mid-1; else if(j==0) { if(b[0]>=a[mid]) return mid; else e=mid-1; } else if(j>m) s=mid+1; else { i...
39150990ea01ea1c78f1eead030511fc9427fd8f
f78587d53f476191865869956e966a2aba63dc66
arian153/Physics-Project
/Source/Manager/Object/ObjectTemplate.cpp
C++
cpp
1,489
permissive
namespace PhysicsProject { template <typename T> T* Object::AddComponent() { auto type = typeid(T).name(); auto found = m_component_map.find(type); if (found == m_component_map.end()) { auto created = m_component_manager->Create(type, this); m_compone...
e2445e9b7d628b3da8b87350d2c3514c8151df44
83c0dcf5d7706911d5211307ebf51dd3704685a3
ProfessionalSkills/DefiantWorlds
/DefiantWorldsGame/Code/Worker.cpp
C++
cpp
8,512
no_license
//----------------------------------------------------- // FILE: Worker.cpp //----------------------------------------------------- //----------------------------------------------------- // INCLUDES //----------------------------------------------------- #include "Worker.h" #include "WorldState.h" IMesh* CWorker::m...
47226a5e7c11b0c9e76f8447ae809eead4cd30bb
4b56e52ad170be81a52b96db8ba53b4a9eef538a
nichongjia/kaldi
/src/asr-server-src/ResponseMultipartJsonWriter.cc
C++
cc
1,687
permissive
// ResponseJsonWriter.cc // 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 // // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANT...
50f026e3d62375a524b27d1b16e7ec3dc69a97d4
b2a1e1172cc35c57543b09d6c5f02f2ac49d7245
byhj/OpenGL-Sample
/include/gli/core/texture.hpp
C++
hpp
1,936
no_license
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Image (gli.g-truc.net) /// /// Copyright (c) 2008 - 2013 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentation file...
a30fa80596fa694a4602e15eb3dab9a07de84f6c
6ba323c62f34b9946712008307f1c1c29ab9776a
ingunnkw/comap
/src/cpp/libutil/sslice.cpp
C++
cpp
1,675
no_license
#include <sslice.h> #include <serror.h> #include <stoken.h> #include <limits> #include <cstdlib> using namespace std; namespace skn { const int Any = numeric_limits<int>::max(); typedef Vector<int,3> Vec; Slice parse_slice(const string & spec) { Slice res; vector<string> fields = tokenize(spec,","); for(int i = ...
dcc4342ae4c65630762580a12dc8333d3fac4d4a
b49a754efd9588baa7c9d6539dc8335d3c006370
Wonchul08Lee/poseidonos
/src/device/unvme/unvme_ssd.cpp
C++
cpp
6,460
permissive
/* * BSD LICENSE * Copyright (c) 2021 Samsung Electronics Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain th...
4ff46733b813bc1dae5513659a5f046ca2228c51
c235b9eb167501a19a57048478ac8a7685de08fc
Astro86/baekjoon
/시뮬레이션/11559/11559_2.cpp
C++
cpp
2,262
no_license
#include <iostream> #include <queue> using namespace std; char map[12][6]; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; int totalCount = 0; bool isRemoved = false; void moveDown() { for (int i = 10; i >= 0; i--) { for (int j = 0; j < 6; j++) { int cntLine = i; if (map[cntL...
7811f78ec9c06916cc525acb2c7a4638755c3264
4227f4e3d4c39861902c0ee12f7db7698ccc3f42
TinyJie/OpendTect
/src/uiFlatView/uimultiflatviewcontrol.cc
C++
cc
10,608
no_license
/*+ ________________________________________________________________________ (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt Author: Bruno Date: Feb 2012 ________________________________________________________________________ -*/ static const char* rcsID mUsedVar = "$Id$"...
5df73ab6572d7ab3ed7c0861a9d228a0e98e126e
557acaf4f8ddd89ef82a9db0c1009dd793d8ff66
AlistairMills/mantid
/Code/Mantid/MantidQt/CustomDialogs/src/FitDialog.cpp
C++
cpp
16,363
no_license
//------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ #include "MantidQtCustomDialogs/FitDialog.h" #include "MantidQtAPI/AlgorithmInputHistory.h" // Qt #include <QCheckBox> #include <QComboBox> #inclu...
5e27c40af9b17bd03bc22b1650d518d05b9a1bcd
eab6f23a95a269f6e5faf3b9cf9a2e90a46c78cf
lucasrosa/OpenGLCitySimulation
/week11/assignment2.cpp
C++
cpp
24,559
no_license
//======================================================================== // Week 10 - Lighting Part 1 // // Example 4 - Per-pixel specular //======================================================================== #define GLFW_INCLUDE_GL3 #define GLFW_NO_GLU #include <stdio.h> #include <stdlib.h> #ifndef __APPLE__ #i...
dcb93397236d7057bea68c6ead8261edd80fed4b
91c56fa875d1206ccf1a4b6fabe03bab2349209e
CRLab/graspit_bci_plugin
/src/BCI/states/homeState.cpp
C++
cpp
2,708
no_license
#include "BCI/states/homeState.h" #include "BCI/states/executionState.h" #include "BCI/controller_scene/controller_scene_mgr.h" #include "BCI/controller_scene/sprites.h" #include "include/EGPlanner/searchState.h" #include <Inventor/nodes/SoAnnotation.h> HomeState::HomeState(BCIControlWindow *_bciControlWindow, Contr...
527dc40425cbfe17742b95a8708704f367beb75c
6fbd95411714906e3ef5b9dd0c2dade658c4254c
splashgroup/splashfarms-master
/src/qt/qvaluecombobox.cpp
C++
cpp
797
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Copyright (c) 2017 The SPLASHFARMS developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "qvaluecombobox.h" QValueComboBox::QValueComboBox(QWidget* parent) ...
a87dafcf0155ebed3ea6f9627328efba59d96c89
ba0dfe178f4163161a36564f2c1f69050fdae654
Sitispeaks/turicreate
/src/external/boost/boost_1_68_0/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp
C++
hpp
2,423
permissive
// Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { name...
596897e573ad76dd91ee07ae1d5a451db09d75d1
83e3f82386eb4a48c323aa5c2e14db2647f46e17
lordstone/leetcode-product_of_array_except_self
/main.cpp
C++
cpp
780
no_license
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { if(nums.size() == 0) return nums; if(nums.size() == 1){ vector<int> tmp(1,0); return tmp; } if(nums.size() == 2) { int tmp = nums[0]; nums[0] = nums[1]; ...
096a45ad0458098adf698b6af7489568c7d43b02
73ad8f283efefaef73227eab0b873f0b1257a4b2
FlyingRatNotBat/database2014spring
/hw1/exp1/src/testCode/testStr.cpp
C++
cpp
340
no_license
#include <iostream> #include <string> #include <vector> using namespace std; int main() { /* string s = "123456"; cout << s[3] << endl; * std::vector<int> v; v.push_back(1); v.push_back(2); cout << v.at(0) << endl; return 0; */ int a = 0; double b = 3; if(a > b) cout << "XX"; else { cout << "VV" << e...