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
12bf36d9451573b8db1f4c2f972cd2c5cfea08b9
06c5c1c94a9f058ee49b2f968dc576c10c0c537d
arcaneframework/framework
/alien/ArcaneInterface/test/Tests/RefSemantic/block/Profiled.cpp
C++
cpp
1,762
permissive
#include <alien/ref/AlienRefSemantic.h> namespace Environment { extern Alien::ITraceMng* traceMng(); } void buildMatrix(Alien::BlockMatrix& A, std::string const& filename, std::string const& format) { auto* tm = Environment::traceMng(); // Distributions calculée const auto& dist = A.distribution(); int off...
5f76f8537f5e62d93c2b9b28a0871e0c4b6599f2
e4fde18c6960d1320c0c9ebbb60c6cde7c525d64
Butanosuke/Kikori
/Apple.cpp
C++
cpp
1,813
no_license
#include "Apple.h" //#include "Play.h" //#include <cmath> Apple::Apple(void) { //this->speed = SPEED; //this->starttime = GetNowCount(); this->graphic_h = LoadGraph("picture/minirin.bmp"); //this->sound_h = LoadSoundMem("music/bomb.mp3"); //this->hit_area = HIT_AREA; //this->color = GetColor(0, 255, 0...
15bc763659a9e8068793214c48d67488ba048692
d8b9384bb878bb4fafd5a8fd47e58630a5918905
lisahqwang/CS32Project3
/main.cpp
C++
cpp
752
no_license
#include "provided.h" #include <iostream> #include <cassert> using namespace std; void doPlayerTests() { HumanPlayer hp("Marge"); assert(hp.name() == "Marge" && hp.isInteractive()); BadPlayer bp("Homer"); assert(bp.name() == "Homer" && !bp.isInteractive()); //SmartPlayer sp("Lisa"); //assert(sp.name(...
e7123b3d648a42066f524d13c516de91d32f9095
671447294162a055006d5032c412803fbb716529
aliyun/aliyun-openapi-cpp-sdk
/dbs/src/model/GetDBListFromAgentRequest.cc
C++
cc
2,360
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
1c3e755776cfc6eaf996be69c83ad49053745b34
08b66e84dc2788d457054dcdfab001b12b2c885d
Misakachu/Assignment_01
/201616040109/Ex06_50.cpp
C++
cpp
1,002
no_license
// Exercise 6.50 Solution: Ex06_50.cpp // Comparing call by value and call by reference. #include <iostream> using namespace std; int tripleByValue( int ); // function prototype void tripleByReference( int & ); // function prototype int main() { int count; cout << "Enter a value for count: "; cin >> count; cout <...
40842ae2cefca66e80e83a7b0e26269bf870930b
74041132a98de53a6d930c0c407b39ce3194594e
sh1hab/Online-Judge-Solutions
/Codeforces/544/B[ Sea and Islands ].cpp
C++
cpp
30,272
no_license
head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta name="X-Csrf-Token" content="641fc2c277b71d2599491f8fadc13a84"/> <meta id="viewport" name="viewport" content="width=device-width, initial-scale=0.01"/> <script type="text/javascript" src="//st.codeforces.com/s/92293/js/jquer...
f2e59d1f20f32602375cf4c5dd8b4392a0b0ad9e
71f7c082cfb146ed1bd6c040d5a93f0e3e693460
Demon000/device_xiaomi_msm8998-common
/camera/CameraParameters.cpp
C++
cpp
19,576
no_license
/* ** ** Copyright 2008, 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/LICENSE-2.0 ** ** Unless required by appl...
b8beb969f5d6a565a64880a45966b0628d173247
ac61e5af100abcdecc1313c24bc066d3542d86b3
leojing/Leetcode
/Leetcode-57/Leetcode-57/main.cpp
C++
cpp
4,153
no_license
// // main.cpp // Leetcode-57 // // Created by Jing Luo on 9/16/20. // #include <iostream> #include <vector> using namespace std; /* vector<vector<int>> insert(vector<vector<int>>& intervals, vector<int>& newInterval) { int start = -1, end = -1, length = int(intervals.size()); bool canMerge = 0; bool ...
74a441567a115da0bf5d37d4ef094392fdb1ff4d
4c7ade888e866bd168ae2ddba7a4206382f27be3
serjinio/thesis_ana
/src_ana/tthreads_test.cpp
C++
cpp
1,330
permissive
#include <TString.h> #include <TThread.h> #include <TChain.h> #include <TGraph.h> #include <TMultiGraph.h> #include "msgoutput.hpp" #include "init_ds.hpp" #include "consts.hpp" #include "csalg.hpp" #include "drawing.hpp" void * UserFn(void* param) { s13::misc::MessageLogger log("UserFn()"); log.debug("in threa...
68d8e82a5e53613d9f677a8509e100cf6323e64c
e08eac985ecd1f0c48babfa15eac0b31ce35e3c4
151706061/FAST
/source/Data/DataTypes.cpp
C++
cpp
2,767
permissive
#include "DataTypes.hpp" using namespace fast; cl::ImageFormat fast::getOpenCLImageFormat(DataType type, unsigned int components) { cl_channel_order channelOrder; cl_channel_type channelType; switch(type) { case TYPE_FLOAT: channelType = CL_FLOAT; break; case TYPE_UINT8: ch...
9393dd1d9cfb8fd69afb76be8e55781af3037ded
3fbcd42ca963efbfed7429b6cf8c99acd4b34fa9
baagi-rebel/Hackeearth
/andqueir.cpp
C++
cpp
773
no_license
#include <bits/stdc++.h> using namespace std; #if DEBUG && !ONLINE_JUDGE #include "header.h" #else #define debug(args...) #endif typedef vector<int> vi; typedef pair<int,int> ii; typedef long long lli; typedef long double ld; #define pb push_back #define all(x) x.begin(),x.end() #define SZ...
1170ce1e7ccd701dfcb82d3db6fff43f2c08a1c7
e77d8879a72549e9cd7fc2cba15b1e33dbaa5cbc
fredricksolomon0/Octree_Implementation_CPP
/src/mge/octree/AABB.hpp
C++
hpp
489
no_license
#pragma once #include "Collider.hpp" class AABB : public Collider { public: AABB(glm::vec3 min, glm::vec3 max); ~AABB(); int type() { // used for swich test return 1; } bool collidesWith(Collider * other); bool collidesWith(AABB * other); bool collidesWith(OBB * other); bool Contains(Collider * compare_t...
cccee0aeda98d0568c3a6169f7852694c73b05c9
3197061c622e774221a488506cba65d2a69696f3
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-13362.cpp
C++
cpp
2,494
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 : c0 { bo...
c16537456e1f5cee8aae63d82ed547c030a6eac9
369f188692ef35952c945d06863e8f350aa6ec2b
ashray/VTK-EVM
/Charts/Core/vtkChartXYZ.cxx
C++
cxx
49,817
permissive
/*========================================================================= Program: Visualization Toolkit Module: vtkChartXYZ.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is dis...
47e116bfdaa4990a4d51067dcd720c3bd28f1222
1491180ce3c0c95ad2f66da6fd3cd0c76dd220b4
eashandash/Operating-System-Simulation-
/deadlock/Untitled Folder/bankers.cpp
C++
cpp
3,503
no_license
#include<iostream> using namespace std; // Number of processes const int P = 5; // Number of resources const int R = 3; // Function to find the need of each process void calculateNeed(int need[P][R], int maxm[P][R], int allot[P][R]) { // Calculating Need of each P for (int i = 0 ; i < P...
b92f9c9c1c026cfec8658deedf06f3b0a47b3836
ca71038f7917cfe61e1b5ceb4fc5f72f9b216fb9
valdeseXD/Prog4Engine
/Minigin/TextComponent.cpp
C++
cpp
1,614
no_license
#include "MiniginPCH.h" #include <SDL.h> #include <SDL_ttf.h> #include "Font.h" #include "Texture2D.h" #include "TextComponent.h" #include "ResourceManager.h" #include "Renderer.h" #include "TransformComponent.h" Valdese::TextComponent::TextComponent(const std::string& text, Font* font) :m_pTexture(nullptr) , m_Tex...
96a4327af15f2d4fa5f682e4c2db8a839d89ca2f
02d39cc49d7d1106aa30996269fe9973dd5c9248
jprescott/BoostTestWithLib
/Sources/CXXBoost/include/boost/numeric/ublas/detail/matrix_assign.hpp
C++
hpp
71,943
no_license
// // Copyright (c) 2000-2002 // Joerg Walter, Mathias Koch // // 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) // // The authors gratefully acknowledge the support of // GeNeSys mbH & Co. KG in producing t...
47e6bafca1c481f4c47a16965d207e8d22b3cade
09f88ee534fbdec3ab60b091ab1d489058f11395
TesterTerbon/hardware_qcom_media
/audio/msm7x30/AudioPolicyManager.cpp
C++
cpp
45,291
no_license
/* * Copyright (C) 2009 The Android Open Source Project * Copyright (c) 2009-2011, Code Aurora Forum. 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 * * htt...
631d2ae6d30710d762cf8d9ad9a3e92f2ef3e885
5c87cfdcbb4a2b8db1d5a17d767f4dcdc4519790
rpbrandau/OSU-Coursework
/162 - Intro pt 2 - Labs/LabB/dice.hpp
C++
hpp
418
no_license
/***************************************************************** ** Program Filename: dice.hpp ** Author: Riley Brandau ** Date: 6/29/16 ** Description: header file for dice class *****************************************************************/ //#pragma once #ifndef DICE_HPP #define DICE_HPP class Dice ...
af6bf82eea3ded611a87d733a65cdabb51d8afa6
249b7b18f82a609a89b728128a3c9186576e19ff
akshaymarch7/chromium
/chrome/browser/media/history/media_history_origin_table.cc
C++
cc
4,318
permissive
// Copyright 2019 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 "chrome/browser/media/history/media_history_origin_table.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #includ...
d990fd8100aedc4df1a6e4a9807783be48010771
97f3c87dc0934efc022ae9d77f36de2d932a2a26
ckti-integral-clone/wagerr
/src/rpcmining.cpp
C++
cpp
31,403
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 The Wagerr developers // Distributed under the MIT software license, see the accompanying // file COPYING or http:/...
4a9401a18c700b94089e5bc175885d7e649cb1aa
7db6c0d4ab95c8a384aaed917b20dae76b6b7442
ManikantaReddy-1112/primenumbers
/prime 1&2&3.cpp
C++
cpp
410
no_license
#include<bits\stdc++.h> using namespace std; int main() { int n,i,factors=0; cout<<"enter the number:"; cin>>n; for(i=2;i<n;i++)// 1st mesthod for(i=2;i<n/2;i++)//2nd method for(i=2;i<sqrt((n)+1);i++)//3rd method { if(n%i==0) { factors++; cout<<"It is not a prime number"<<endl; break;...
7d287d392f65d2f7151586ef66100b0e6da767ba
289d1856f465535c698dd5fae220a7c3bdf195e6
ange-yaghi/urbanity
/test/fsm_tests.cpp
C++
cpp
276
no_license
#include "pch.h" #include "fsm_test.h" TEST(FsmTests, FsmSanityCheck) { urb::FsmTest test; test.initialize(); EXPECT_EQ(test.id<urb::FsmTestState<0>>(), 0); EXPECT_EQ(test.id<urb::FsmTestState<1>>(), 1); EXPECT_EQ(test.id<urb::FsmTestState<2>>(), 2); }
8ab9bb6d71d5f82624669f82c60ac699d5815e0d
3e445ecbc47714f5e22663aab0753cf4fc4da285
iam-abbas/cs-algorithms
/shell_sort.cpp
C++
cpp
628
permissive
#include <cstdio> #define ELEMENT_COUNT 100000 using namespace std; int n, d[ELEMENT_COUNT]; void Shell_sort() { for (int gc = n >> 1; gc >= 1; gc >>= 1) { for (int s = 0; s < gc; s++) { for (int i = s; i < n; i += gc) { for (int j = i - gc; j >= 0 && d[j] > d[j + gc]; j -= gc) ...
6af7a326d2e65ad47a6e07295048fdfff015e49d
c54e110628ed5d7fefac56b159dee39503680dc5
JonasDHomburg/amiro_senseact
/project/process/misc/teleoperationWebserver/main.cxx
C++
cxx
38,298
no_license
/* * Author: Markus Gaffke, Timo Korthals * File: main.cxx * Purpose: Providing the Steering Website for the BeBot/Amiro. * Furthermore sending the cameradata and infrareddata via Websocketprotocol * to the website. Incoming commands are computed and send via RSB to the * respective scope. ...
ff6387e56bb100726f5c3b84e7f47746970a96b6
a7be4161086b18c9efa6f286fbcd3c37881aa12f
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14794/function14794_schedule_1/function14794_schedule_1.cpp
C++
cpp
999
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14794_schedule_1"); constant c0("c0", 512), c1("c1", 128), c2("c2", 512); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i100("i100", 1, c0 - 1), i101("i101", 1, c1 - 1), i102("i102"...
20d8fda04f0827b74066c0ddbf2acc7910a80a34
be7dd58abff49cf60e8a2afddca2c3a634c95f08
rubenkar/seg3d2
/src/Interface/Application/LayerIOFunctions.cc
C++
cc
12,706
no_license
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2009 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
ed13dbdec2a278c54cfd6736188b659762c0f422
4aa9af66f72cc9c3f406707ad1dfded73244ca98
orbitcowboy/cppcheck_crash_files
/crash193.cpp
C++
cpp
1,829
no_license
{ }; void namespace A::f; { g() { int } } /* (gdb) run /home/martin/projects/cppcheck_testfiles/bugs/crash193.cpp Starting program: /home/martin/cppcheck/./cppcheck /home/martin/projects/cppcheck_testfiles/bugs/crash193.cpp Checking /home/martin/projects/cppcheck_testfiles/bugs/crash193.cpp... P...
ff8428d6858ac516025fd4c99a8b9d1485b4aa1a
4d61526e98ee070feb08cfca2ef2433a5b940128
g-akash/spoj_codes
/jumping_champa.cpp
C++
cpp
847
no_license
#include <iostream> #include <vector> #include <unordered_map> #include <string> #include <math.h> #include <map> #include <queue> #include <stack> #include <algorithm> #include <list> using namespace std; #define ll long long int #define ull unsigned ll #define umm(x,y) unordered_map<x,y > #define mm(x,y) map<x,y >...
3bc17a1662275387572050cdd5dd0cc92959cffc
666f1b3e4b56a59ab6923a48559a00da5accd435
ulisesten/JUCE-plugin
/src/PluginProcessor.cpp
C++
cpp
7,827
no_license
#include "PluginProcessor.h" #include "PluginEditor.h" //============================================================================== AudioPluginAudioProcessor::AudioPluginAudioProcessor() : AudioProcessor (BusesProperties() #if ! JucePlugin_IsMidiEffect #if ! JucePlug...
74bb9006f565e45f3a2f1564943d4d6c363c6c93
9403759572e7ac9ebe726c61d1fc5c7e9ebba23b
DBHeise/fileid
/fileid/document/excel/records/CalcModeRecord.hpp
C++
hpp
262
permissive
#pragma once #include "Record.hpp" namespace oless { namespace excel { namespace records { class CalcModeRecord : public Record { public: CalcModeRecord(unsigned short type, std::vector<uint8_t> data) : Record(type, data) { } }; } } }
2f057a63f8daed7020f3ba5ac48e5e973fd20706
85daa88fce17e03ebfcc582b1492bfa4b45f3108
Victor-Frocrain/OOP_arcade_2019
/src/AEntity.cpp
C++
cpp
949
no_license
/* ** EPITECH PROJECT, 2020 ** Arcade ** File description: ** Arcade: AEntity.cpp */ #include "AEntity.hpp" #include <iostream> AEntity::AEntity(const float &pos_x, const float &pos_y, const IEntity::entitiesType &type, const short &nbType) : _pos_x(pos_x), _pos_y(pos_y), _entityType(type), _nbTy...
de249644102565163d7014abf1069f079291bdc6
88b904fcb621e060206275bf70d2f9970d2e9ccc
tokitsu-kaze/ACM-Solved-Problems
/Codeforces/Codeforces Round 548/1139C.cpp
C++
cpp
4,315
no_license
#include <bits/stdc++.h> using namespace std; namespace fastIO{ #define BUF_SIZE 100000 #define OUT_SIZE 100000 //fread->read bool IOerror=0; // inline char nc(){char ch=getchar();if(ch==-1)IOerror=1;return ch;} inline char nc(){ static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE; if(p1==pend){ ...
78edb893765be5eabc7b18aa7171c7944b484d63
9a3d8c13d63e823223c2df39cec49a781b458fc2
dingshiyu/aliyun-openapi-cpp-sdk
/alb/src/model/ListListenersRequest.cc
C++
cc
3,130
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
49be17a720f6a1959712c6f3a7e6d6c364885d4d
cb5cbc24a8d492e09706134e4c33723f6e082a7a
shermnonic/sdmvis
/sdmvis/e7/Generative/PerlinNoise.cpp
C++
cpp
5,508
no_license
// Max Hermann, August 7, 2010 #include "PerlinNoise.h" #include <cmath> //linux/ unix specific includes #ifndef WIN32 #include <stdlib.h> #endif unsigned char PerlinNoise::s_permutation[512] = { 151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6...
74e5de2b15971fa68db84b9a16f4f7f4660d86b9
9a0b7b8e5dfef303412ba3f5c5c43e54c765b572
Castlebinia/ALGORITHM
/boj/dp/14501_퇴사.cpp
C++
cpp
494
no_license
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int t[16], p[16], d[16]; int n; int foo(int x) { if (x==n)return 0; if (x > n)return -0x3f3f3f3f; int &ret = d[x]; if (ret != -1)return ret; ret = max(foo(x + 1), foo(x + t[x]) + p[x]); return ret; } int main() { ...
bab08e1634108dc2292f80527111707ab2eb864c
ddcbee74daceb9d024a0037ded32ac42b6b78d83
SuperHuYue/SunshineFrame
/SunshineNet.hpp
C++
hpp
10,586
no_license
#pragma once #include "CMatrix.hpp" #include <iostream> #include <list> #include <string> #include <sstream> #include <filesystem> #include <fstream> #include "alllayers.hpp" namespace SunshineFrame { class Sunshine { public: Sunshine():m_bInit(true),m_lossIdValid(0){}; ~Sunshine() { } std::shared_ptr<Layer...
0199b7452ea39c476a35822bd3581bca26fa3046
ad24b586511f389dd4c69194e9acb23663b937c0
xibeilang524/rtsp_example
/xop/RtspConnection.cpp
C++
cpp
14,315
no_license
// PHZ // 2018-6-10 #include "RtspConnection.h" #include "RtspServer.h" #include "MediaSession.h" #include "MediaSource.h" #include "net/SocketUtil.h" #define USER_AGENT "-_-" #define RTSP_DEBUG 0 #define MAX_RTSP_MESSAGE_SIZE 2048 using namespace xop; using namespace std; RtspConnection::RtspConnection(Rtsp *rtsp...
7da8343de824be61fe95e29a3f18b871679a071a
8ff39b99c75a1497fa6f4f270f51f004ab2f3dcd
Zouizoui78/godotcppweb
/src/RotatingSprite.cpp
C++
cpp
645
permissive
#include "RotatingSprite.hpp" #include <ResourceLoader.hpp> #include <Texture.hpp> RotatingSprite::RotatingSprite() {} RotatingSprite::~RotatingSprite() {} void RotatingSprite::_register_methods() { register_method("_process", &RotatingSprite::_process); } void RotatingSprite::_init() { Godot::print("Rotati...
70cb092c20bfb4a8cb81bbb4f7fe2a75a4662af3
0a3b4e5f44af3f394dffb1b1280a9211fb2ab39c
yieldthought/hemelb
/Code/colloids/ParticleMpiDatatypes.cc
C++
cc
11,206
no_license
// // Copyright (C) University College London, 2007-2012, all rights reserved. // // This file is part of HemeLB and is CONFIDENTIAL. You may not work // with, install, use, duplicate, modify, redistribute or share this // file, or any part thereof, other than as allowed by any agreement // specifically made by you ...
f096815e8971171af65907392282166684ad3f4d
63118b9e2b3f9a01baf6b4ae45f12086a74c93ee
jjzhang166/WinNT5_src_20201004
/NT/com/rpc/runtime/trans/common/httptran.cxx
C++
cxx
27,190
no_license
/*++ Copyright (C) Microsoft Corporation, 1997 - 1999 Module Name: httptran.cxx Abstract: HTTP transport-specific functions. Author: GopalP 06-25-97 Cloned from EdwardR's NT 4.0 RPC version. Revision History: EdwardR 01-26-98 Rewrite NetworkOptions parsing. ...
dc2c6812cc02a3f43da2151f8723d5ceddcdb537
f7a2d33a80f82481eaa5635c30905c808a333d99
reisele08/Decaf-Compiler
/decafcomp/answer/decafcomp.cc
C++
cc
29,899
no_license
#include "default-defs.h" #include <list> #include <ostream> #include <algorithm> #include <iostream> #include <sstream> #include <list> #include <map> #ifndef YYTOKENTYPE #include "decafcomp.tab.h" #endif using namespace std; symbol_table_list symtbl; bool debug = false; llvm::Value* retVal; bool assignment = fals...
38c3fd41db6b66c9205ee3653c088a77f7607e6e
cc368c7c8886c0cf15aa32770faad52e839289f7
ROBOTIS-GIT/ros2xrcedds
/nav_msgs/Odometry.hpp
C++
hpp
2,648
permissive
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // 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 re...
3d225d5dd5eba297663d277cf601ec0975b4c1c0
40e40cad59902f0ec734c76f03b79cedf2827b81
wasmerize/WasmVM
/test/unittests/lib/core/runtime/br_table_unittest.hpp
C++
hpp
6,156
permissive
#include <skypat/skypat.h> #define _Bool bool extern "C" { #include <string.h> #include <stdlib.h> #include <core/Runtime.h> #include <core/Stack.h> #include <dataTypes/vector_p.h> #include <dataTypes/Value.h> #include <dataTypes/Label.h> #include <instance/ControlInstrInst.h> } #undef _Bool SKYPAT_F(Runtime_control_...
252e04cf9a265330237afca2208efcce6b613a5a
293dc524021af567b8b2ebe513592e6e9babef4f
lkw1120/problem-solving
/BOJ/q11729.cpp
C++
cpp
417
no_license
#include<bits/stdc++.h> typedef long long ll; using namespace std; ll N,ans; void hanoi(int n, int from, int by, int to) { if(n == 1) { cout<<from<<" "<<to<<"\n"; } else { hanoi(n-1,from,to,by); cout<<from<<" "<<to<<"\n"; hanoi(n-1,by,from,to); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NU...
5dc3f6a92d3028e5f206eafbdc249b0e091ec1ad
ab6b4210a90faa15f6a4610fba2e425dbc64f866
Stoxum/stoxumd
/src/stoxum/app/ledger/AccountStateSF.cpp
C++
cpp
1,528
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
7a9b7369a8839448670eb2d06bfdbf09615f0a3f
57ec850ffa1a1d3c350679306a1b96b8c4c6f22e
Sitispeaks/turicreate
/src/external/boost/boost_1_68_0/libs/wave/test/testwave/testfiles/t_6_006.cpp
C++
cpp
2,348
permissive
/*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library http://www.boost.org/ Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt o...
4802d815063a724c9f15186acf1fc975039a640a
3eb0d58076ff9816fe88416bb3333f72fc217945
donovan680/Plasma
/Extensions/Widget/Events.hpp
C++
hpp
5,395
permissive
/////////////////////////////////////////////////////////////////////////////// /// /// \file Interactive.hpp /// Definition of the interactive display object class. /// /// Authors: Chris Peters /// Copyright 2010-2012, DigiPen Institute of Technology /// ///////////////////////////////////////////////////////////////...
85f6b7c8907abbac709daf22a41379899a9cc420
84c6e5720110c493963bb57c577f415658216deb
dmishin/dmishin-pyscript
/cpp/alife/src/matrix_breeder.cpp
C++
cpp
4,603
no_license
#include "matrix_breeder.h" #include "world.h" #include "ftype.h" #include "random_choise.h" #include "matrix_brain.h" #include "shared_pointers.h" #include "parameters.h" #include <iterator> MatrixBreeder::MatrixBreeder() { minimalBots = NUM_BOTS; numBrainStates = NUM_BRAIN_STATES; numBrainIntermediate = ...
db845a53fb7681af7de16dc709befb578adc592c
129e0a1f9f3fbf4a7aad8d00876b63fddf2a5655
mmerchante/CUDA-Path-tracer
/src/scene.cpp
C++
cpp
46,180
no_license
#include <iostream> #include "scene.h" #include <cstring> #include <glm/gtc/matrix_inverse.hpp> #include <glm/gtx/string_cast.hpp> #include <cstdlib> #include <cstring> #include <cassert> #include <cmath> #include <cstddef> #include <string> #include <vector> #include <map> #include <fstream> #include <sstream> #incl...
98add2cf3b5cd6687853f5c2b6726b0c5829c438
a8856e6af4bc74e2880dcda3cc159b3f23c22ea5
onyettr/cpp-tlist
/test_copy.cpp
C++
cpp
2,558
no_license
/** * @brief Test harness for single linked list copy operations * @file test_copy.cpp */ /* ****************************************************************************** Includes ****************************************************************************** */ #include <iostream> #include "list.h" u...
7fe16f6913f867d8f47a5c344d3a8802801b9f57
40e2b7462c772bcee525222a1fa13b438ed2b2c5
zhmu/ananas
/external/gcc-12.1.0/libstdc++-v3/testsuite/20_util/is_swappable/requirements/explicit_instantiation_ext.cc
C++
cc
917
permissive
// { dg-do compile { target c++11 } } // Copyright (C) 2015-2022 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 Found...
4d9b1f386f3f6466432907c1ca722233050a45a0
30dab59cbdcd0f7c4871bde09f5ec818f1106a30
Ruijan/Pixelnos
/MallowsVsDango/Classes/Scenes/Level/Towers/GUI/NextLevelPanel.cpp
C++
cpp
3,560
no_license
#include "NextLevelPanel.h" NextLevelPanel * NextLevelPanel::create(float spriteWidth, Tower * tower, cocos2d::Size size, GUISettings* guiSettings) { NextLevelPanel* panel = new NextLevelPanel(); if (panel->init(spriteWidth, tower, size, guiSettings)) { return panel; } delete panel; return nullptr; } bool Next...
63a9930d2adff5b3b67fc0e4f8e520c79e1b8476
a1e2189b55634bc0ee9fecf9a367f8b37a435893
Avazart/Bicycle
/Bicycle/Win/TextStream/Buffer.cpp
C++
cpp
3,968
no_license
// --------------------------------------------------------------------------- #include "Buffer.h" #include <assert.h> // --------------------------------------------------------------------------- using namespace Bicycle; // --------------------------------------------------------------------------- Buffer::Buffer(Buf...
acc02817de8c2939b4f08015b79c3dae0bbfde52
f24f8f2e8b4a8ba54e4ed32c49ab1e8df2bade1d
satylogin/spoj_solutions
/MSE06H.cpp
C++
cpp
1,096
no_license
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define ll long long int #define ld long double #define pb push_back #define mkp make_pair #define scan(x) scanf("%d", &x) int BIT[1001][1001], n, m; void insert(int x, int y) { int i, j; for (i = x; i <= n; i += (i&-i)) for (j = y; j <= m; j ...
68a611ebccbc5962eff7b1281c1c7838bb164dc3
fc6d928f617803c850f6eec94b3ec85f22217bf5
honggui/lullaby
/redux/redux/systems/tween/tween_system_tests.cc
C++
cc
15,267
permissive
/* Copyright 2017-2022 Google Inc. 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 agreed t...
9d4706e605e0a47701225d446ba954e8e28fbe8a
9e8d0fe728a7c4979d71cd0906399509bbc4c932
shoaibrayeen/Programmers-Community
/Data Structure/Array Or Vector/Reverse of An Array/SolutionByAditya.cpp
C++
cpp
635
permissive
#include <bits/stdc++.h> using namespace std; vector<int> reverseArray(vector<int> arr, int sizeOfArray) { for (int i = 0; i < sizeOfArray / 2; i++) swap(arr[i], arr[sizeOfArray - i - 1]); return arr; } void printArray(vector<int> arr, int sizeOfArray) { for (int i = 0; i < sizeOfArray; i++) ...
1ca0901249e3e43690d3d4291753b7d6182fb89f
fcef64554c59f8606a5acacbaa9637ed647e3162
MonsWTF/crucible-code
/gameSource/EditorCategoryPage.cpp
C++
cpp
21,378
permissive
#include "EditorCategoryPage.h" #include "minorGems/game/game.h" #include "minorGems/game/Font.h" #include "minorGems/game/drawUtils.h" #include "minorGems/util/stringUtils.h" #include "message.h" extern Font *mainFont; extern Font *smallFont; #include "ObjectPickable.h" static ObjectPickable objectPick...
434a5ee2dc5484cfade0daf145c917c72d8346ae
d302a04bfd2f816092877e617189590c17cc7b1b
daodaoliang/SCDBrowser
/src/app/GraphicBrowser/SSDLoader.cpp
C++
cpp
18,905
no_license
#include "SSDLoader.h" #include "SCLModelSvrAdapter.h" CSSDLoader::CSSDLoader() { SCLModel = SCLModelAdapter::GetInstance(); } CSSDLoader::~CSSDLoader() { } void CSSDLoader::SetCurrentSubstation(QString subStationKey) { SCLModel->GetSSDInfoFromSCD("220kV." + subStationKey, m_SSDSubStationCache); m_IEDEq...
0824cb094386df2eb2dd40238a64c99983f55c65
69bcfce9d4165c9b64a7d62d693125d304b08bf4
iburgoa13/Algoritmias
/Ultimo digito del factorial/Ultimo digito del factorial/Source.cpp
C++
cpp
783
no_license
//IKER BURGOA #include <iostream> #include <fstream> using namespace std; int factorial(int n) { int factorial = 0; switch (n) { case 0: factorial = 1; break; case 1: factorial = 1; break; case 2: factorial = 2; break; case 3: factorial = 6; break; case 4: factorial = 4; break...
aa27fabb1b1e67e2dbb2709ce2f89ef8ddbd6421
2776ff24759701b3632c3fbe8fae463a54b1368e
frankenstein32/Dynamic-Programming
/0-NKnapsack(DP).cpp
C++
cpp
2,627
no_license
#include "algorithm" #include "iostream" #include "numeric" #include "iomanip" #include "cstring" #include "math.h" #include "bitset" #include "string" #include "vector" #include "ctime" #include "queue" #include "stack" #in...
ee1e20b67491f1cce4b72aa4b89206e8d6d7dd46
9d590dd0e49ad33b44ad543ac644c952122934a8
kberryUSGS/ISIS3
/isis/tests/FunctionalTestsApolloPanStitcher.cpp
C++
cpp
1,272
permissive
#include <QTemporaryDir> #include <memory> #include "apollopanstitcher.h" #include "Fixtures.h" #include "Pvl.h" #include "PvlGroup.h" #include "TestUtilities.h" #include "Histogram.h" #include "Endian.h" #include "PixelType.h" #include "gtest/gtest.h" #include "gmock/gmock.h" #include "Fixtures.h" using namespace ...
a630e86190b887f11de8c11a10c00bbbb33420b6
7d8db94dc5689918fc0d5fdb4f175313972c9a6c
jordanlittlefair/Foundation
/Math/Include/Vector2.hpp
C++
hpp
3,801
permissive
#pragma once #ifndef _MATH_VECTOR2_ #define _MATH_VECTOR2_ namespace Fnd { namespace Math { /* 2D Vector. */ struct Vector2 { float x; float y; inline Vector2(); inline Vector2( const float X, const float Y ); inline Vector2& operator =( const Vector2& v ); inline static Vector2 Zero(...
78fb9044615a4c26c3fc386935f859163a892352
0739de39695bacbe44b97f548d80f9a268a05dde
AatroxMercer/Moodle
/zzc3-sscanf.cpp
C++
cpp
1,056
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <string> using namespace std; void comeOn(string & input, int index) { int length = input.size(); for (int i = index; i < length; ++i) { input[i] = input[i+1]; } } void parseStrintToNumber(string & input) { int length = inpu...
0e321cf99cedbd195fead32eba3f7b6af1be6334
1770cc5cea6b3073127cfa14ca84b08547af9b82
justgoofingaround/6-star-problem_solving-hackerrank
/apple_and_orange.cpp
C++
cpp
622
no_license
#include <iostream> using namespace std; int main() { int s,t,a,b,count1=0,count2=0,m,n; cin>>s>>t>>a>>b>>m>>n; int a1[m],a2[n]; for(int i=0;i<m;i++) { cin>>a1[i]; } for(int i=0;i<n;i++) { cin>>a2[i]; } for(int i=0;i<m;i++) { a1[i]=a1[...
541bb5c3297786c3cb6face42f07ed9697ac7a06
dcf86676bbe23a4ffcf1d51e7613eadc18012dad
kshitij0809/Competitive-Coding-with-CPP
/Arrays/segregate_zero_one.cpp
C++
cpp
1,265
no_license
/* Segregate 0s and 1s in an array You are given an array of 0s and 1s in random order. Segregate 0s on left side and 1s on right side of the array. Traverse array only once. Input array = [0, 1, 0, 1, 0, 0, 1, 1, 1, 0] Output array = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1] */ // C program to sort a binary array in one p...
899236667a039a27932a4927914cb8f7966c4a62
4118feac77755b30f2711f519a177e04b7e4be08
mohamedsobheykh/ProjectC
/SPOT/Actions/ActionDoubleConcentration.cpp
C++
cpp
2,017
no_license
#include "ActionDoubleConcentration.h" #include "..\Registrar.h" #include "../Courses/UnivCourse.h" #include "..\Registrar.h" #include "..\Rules.h" #include <vector> #include <iostream> #include <fstream> #include "..\GUI\GUI.h" #include <iostream> ActionDoubleConcentration::ActionDoubleConcentration(Registrar* p) :Ac...
5b22159397be5d42fb610957da458d9647cc1374
0ef523343b4ebeb54cc76cecc2074cee9851624d
sdk-team/aliyun-openapi-cpp-sdk
/domain/src/model/SaveBatchTaskForUpdatingContactInfoByRegistrantProfileIdRequest.cc
C++
cc
3,371
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
f7f5c503752f9cda05d0c303e3e7fbdcfae818e0
34d80aac9b23a87a8869e7ff46ffabdbb1349970
aruna09/Competitive-Programming
/Codechef/ESWCR18A.cpp
C++
cpp
240
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int a=0, b=0, c=0; int ar[3]; cin>>a>>b>>c; ar[0]=a; ar[1]=b; ar[2]=c; sort(ar, ar+3); cout<<ar[1]; }
3d421e9f2ea907f8124c728cbcbc449fcffc90b6
67b47c655b9585a3463879814c948d5edb44da25
godsfist10/Engine
/Graphics 2/EGP300-proj1/Matrix.cpp
C++
cpp
7,237
permissive
#include "Matrix.h" #include "Vector3D.h" Matrix::Matrix() : Matrix(2, true) { } Matrix::Matrix(const Matrix& rhs) { m_NumRows = rhs.GetNumRows(); m_NumColumns = rhs.GetNumColumns(); m_Size = m_NumRows * m_NumColumns; mp_Matrix = new float[m_Size]; for (int i = 0; i < m_Size; ++i) { mp_Matrix[i] = rhs.mp_Matr...
6367829947c568df555ee82fe5216b8c113eddb8
b28969dc91b245146527f2efdbb70b06208b5879
Pentagon03/competitive-programming
/codeforces/Codeforces Beta Round #3/D.cc
C++
cc
655
no_license
#include <queue> #include <string> #include <iostream> #include <algorithm> using namespace std; typedef long long LL; priority_queue<pair<LL, LL> > q; int cnt, a, b; LL ret; string st; int main() { while (!q.empty()) q.pop(); cin >> st; cnt=ret=0; for (int i=0; i<st.size(); i++) { if (st[i]=='(') cnt++; el...
4096b4ddd5bd9ead5921745d5f11dbead46de24e
c404c1ed877e23c431b6e77f32503be61a7b5ac0
mit-carbon/Graphite-Cycle-Level
/common/network/components/link/performance/electrical_link_performance_model_repeated.cc
C++
cc
945
permissive
#include <cmath> #include "electrical_link_performance_model_repeated.h" #include "simulator.h" #include "config.h" #include "log.h" ElectricalLinkPerformanceModelRepeated::ElectricalLinkPerformanceModelRepeated(volatile float link_frequency, volatile double link_length, UInt32 link_width, SInt32 num_receiver_e...
f47b2aa58dd398c35cc31ebf529459d81c389bea
0205fbfbba463b4a67fe4c859f30c44215bc3209
ca2/app
/apex/node/linux/process.cpp
C++
cpp
7,038
no_license
#include "framework.h" #include "acme/node/posix/pipe.h" #include "apex/platform/static_start.h" #include "process.h" #include <sys/wait.h> #undef USE_MISC #include <spawn.h> #ifdef RASPBIAN #include <sys/types.h> #include <unistd.h> #endif extern char **environ; struct chldstatus { bool m_bRet; int ...
c475df6ced30f6cd738ae43f2804269bf647743d
91a95ba7680508112eb0135acc4a34ed61d52bd0
ALICEHLT/AliPhysics
/PWG/CaloTrackCorrBase/AliCaloTrackMCReader.cxx
C++
cxx
28,807
permissive
/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors ...
441556839fd2888eafaacbaedbb0aad9b32798ac
1308e81df1a005e54251aa58e59d5462c426cc42
JonnoRobson/Vulkan-Terrain-Generator
/VulkanApp/camera.cpp
C++
cpp
2,612
no_license
#include "camera.h" #include <glm/gtc/matrix_transform.hpp> Camera::Camera() { position_ = glm::vec3(0.0f); rotation_ = glm::vec3(0.0f); speed_ = 100.0f; view_width_ = 0.0f; view_height_ = 0.0f; fov_ = 0.0f; } void Camera::MoveForward(float speed) { speed *= speed_; glm::vec3 forward = glm::rotateX(glm::vec3(...
b8392e3ddd3f54cc11732920bf808b5bd0833855
d055861e054c6c59fedecd252b9aa647d1602bb4
rdewanje/HiggsAnalysis-HiggsToTauTau
/src/PrintLimits.cc
C++
cc
22,527
no_license
#include "HiggsAnalysis/HiggsToTauTau/interface/PlotLimits.h" void PlotLimits::print(const char* filename, std::string& xval, std::string& yval, std::vector<TGraph*> contour, const char* type) { if(std::string(type) == std::string("tex")){ ofstream file; file.open (std::string(filename).append(".tex").c_str...
f2c38aa21273a6e776ec91248d7849686f1148d4
9a536b3bd4542015c3a276ccd59c22fdb6c44e81
haoyu0918/Error_Detecting-Correcting_C-
/群技术码仿真.cpp
C++
cpp
1,840
no_license
/*本代码实现群计数码的仿真模拟 数据量15000 码组长度为6 冗余码长度为3 每个信道误码率为5% By Haoyu Li*/ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #define N 6 void qunjishu(int a[],int n_pro); void exam(int send[],int n_pro, int &sign); void test(); void test(){ int num=15000,sam[N+3]={1,0,0,1,0,1},n_pro=N+3; int send[num...
54e8f035ceb582b837656efc8094741d8b2b9290
f827947bc97cae9aa790954f390e4e905483d0ec
Madjogger1202/Ecologist-version-2.0
/src/main.cpp
C++
cpp
23,787
no_license
//////////////////////////////////////////////////////////////////////// // // // ┌◄──────────────────────────────────────►┐ // // │ Ecologist Cansat V2 │ ...
9ba0d7f74fe2c55fbc31b6a5c36cd09bed6a7bf0
0fec6c8d1e9e2b9afec74e9c2e07e945980205d6
crosslink/xlink
/src/algorithm_ltw_incoming_search_tn.cpp
C++
cpp
2,198
no_license
/****************************************************************************** * This file is part of the XLINK - The Link Discovery Toolkit. * (c) Copyright 2013 Queensland University of Technology * * This file may be distributed and/or modified under the terms of the * BSD 3-cause LICENSE appearing in the file...
a0c84a9fb9319d2e2f04f485b9cefdf0bcd3a7f0
6a75dc33deeafecc429306b4f599c04d627cea01
stanislavstoyanov99/Technical-University-Projects
/Sixth semester/Computer graphic/Exercises/OpenGL1Lighting/OpenGL1/BufferLayout.cpp
C++
cpp
1,119
permissive
#include "BufferLayout.h" #include <glad/glad.h> BufferElement::BufferElement(std::string name, ShaderDataType type) : name(name), type(type), size(SizeOfType(type)) { } BufferLayout::BufferLayout(std::initializer_list<BufferElement> elements) : elements(elements) { unsigned offset = 0; stride = 0; for (auto...
cea4961a75f35555dd61e1da0cdcbae70d4bd4d0
d5279d9101f9efa51824226ee62be72bce4cf4c8
ytrikoz/garlandproject
/src/utils.cpp
C++
cpp
836
no_license
#include "utils.h" #include <Arduino.h> unsigned long millis_since(unsigned long sinse) { return millis_passed(sinse, millis()); } unsigned long millis_passed(unsigned long start, unsigned long finish) { unsigned long result = 0; if (start <= finish) { unsigned long passed = finish - start; ...
2bc758400a2200f0745403d32f5b417e2407432f
a473cfcfef10c084051d6e3bf8016b6758f51a24
dickynovanto1103/CP
/Online Judges/Hackerrank/Practice/Algorithm/Game Theory/misereNim.cpp
C++
cpp
890
no_license
#include <bits/stdc++.h> using namespace std; #define inf 1000000000 #define unvisited -1 #define visited 1 #define eps 1e-9 #define mp make_pair #define pb push_back #define pi acos(-1.0) #define uint64 unsigned long long typedef long long ll; typedef vector<int> vi; typedef pair<int,int> ii; typedef vector<ii> vii; ...
77d6205c26f9a27b3f39e4cbd0498d237d979aee
e0ad230f5b52e595fc0f2a22b5589edc3acbab63
wizbl/wizbl
/src/test/test_wizblcoin_main.cpp
C++
cpp
484
permissive
// Copyright (c) 2011-2016 The Wizblcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #define BOOST_TEST_MODULE Wizblcoin Test Suite #include "net.h" #include <boost/test/unit_test.hpp> std::unique_ptr<CCon...
1322763544775fddf3e2c93eac3dc8d09ef57014
2f34ab41bf96d1a82d4ac9b67663e025f95a71dc
gzhu108/sg
/example/worldapi/RequestCreateWorld.cpp
C++
cpp
875
no_license
#include "RequestCreateWorld.h" #include "BinarySerializer.h" using namespace microreactor; using namespace worldapi; RequestCreateWorld::RequestCreateWorld() { Id.set((int)ID::CreateWorldRequest); } RequestCreateWorld::~RequestCreateWorld() { } bool RequestCreateWorld::Encode(std::ostream& stream) const { ...
ca68eb876bd9436dde6fb87ebec6a0d96dd2a61b
6837d8067e5b17936410e61e566160bbf4d5feb0
Johni0702/mumble
/plugins/ffxiv/ffxiv.cpp
C++
cpp
8,375
permissive
// Copyright 2005-2017 The Mumble Developers. All rights reserved. // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file at the root of the // Mumble source tree or at <https://www.mumble.info/LICENSE>. #include "../mumble_plugin_win32.h" // Include standard plugin head...
5455c7fae8684cba90549125f35ba12ca46dedb4
007b5ce6458d1088673d26b9c3d5b5e5d9a257d7
reguly/volna
/volna_init/external/boost/archive/detail/polymorphic_iarchive_route.hpp
C++
hpp
6,430
permissive
#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP #define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // p...
6c1ca388a4f24dd46c59345104c982595dfff8b8
1692edb467dee328d35d433e70f405fcbf7a1e2a
Ti20-ntson/solutions
/treefc.cpp
C++
cpp
1,044
no_license
#include<bits/stdc++.h> using namespace std; #define task "treefc" #define lb lower_bound #define ub upper_bound #define ALL(v) (v).begin(),(v).end() #define zs(v) (int)(v).size() #define fi first #define se second #define pb push_back #define mp make_pair #define cntbit __builtin_popcountll #define BIT(x, ...
105e7c64b908990c4c6dd4297daa0dcbc786224a
0cf8f54dc809bb20eaca46db5e1eb5b9e4d78814
b1f6c1c4/ele585
/final/src/main.cpp
C++
cpp
1,328
no_license
#include <iostream> #include <algorithm> #include <cstdint> #include <climits> #include <mpi.h> #include "bitonic_mpi.hpp" #if SIZE_MAX == UCHAR_MAX #define MPI_SIZE_T MPI_UNSIGNED_CHAR #elif SIZE_MAX == USHRT_MAX #define MPI_SIZE_T MPI_UNSIGNED_SHORT #elif SIZE_MAX == UINT_MAX #define MPI_SIZE_T MPI_UNSIGNED #elif SI...
303c18e6e7898db5144405ff1355820ec39a7655
21649b26eae752c9ad15f6709c90ab09d39676b3
kailaisi/android-29-framwork
/native/libs/gui/tests/Malicious.cpp
C++
cpp
8,615
permissive
/* * Copyright 2017 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/LICENSE-2.0 * * Unless required b...
571d53d74bbd86cbecae8ae643deda41dcd2a5b3
51c595d3cdf7861638410c03e3e8a19cc7447d61
mascoma/GTA_modelling
/GillespieSSA_cpp_V3/GTAmodelling_recomb_V3/reactstatus.cpp
C++
cpp
30,015
no_license
/*reactstatus.cpp Jun 2, 2016 Xin */ #include <cstdio> #include <cstdlib> #include <cmath> #include <string> #include <ctime> #include <iostream> #include <sstream> #include "GTAcpp_recomb.h" using namespace std; statusMatrix getArray(string index){ // get reactioin status matrix for one strain int a=0; int b=...
6e8bf23188f12f4217ca57499fd718280fc05449
ca8485199a735f948e2fb9090ffcedfa186c421a
haoyuanliu/LeetCode
/122.BestTimeToBuyandSellStockII.cpp
C++
cpp
752
no_license
class Solution { public: int maxProfit(vector<int>& prices) { int res = 0; int len = prices.size(); if(len < 2) return res; int cur = 0; while(cur+1 < len) { if(prices[cur] < prices[cur+1]) { res -= prices[cur++]; ...
b7e5cf4b51b1b5cd8a08a6b6f06c97c5783f7656
91d2794838e4d2a09ef368f03b6f0b50686a6cce
woshihuangzhijie/LearnOpenGL
/main.cpp
C++
cpp
12,916
no_license
#include <glad/glad.h> #include <GLFW/glfw3.h> #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include "shader.h" #include "camera.h" #include <iostream> void framebuffer_size_callback(GLFWwindow* window, int widt...
35211634cddc707347adeadd05f2298daef893d8
567248614becf1d43163af6d567cc72c0377e90a
the-locksmith/fuchsia
/garnet/lib/debugger_utils/load_maps.cc
C++
cc
5,422
permissive
// Copyright 2017 The Fuchsia 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 "load_maps.h" #include <cinttypes> #include <cstdio> #include <cstdlib> #include <cstring> #include <map> #include <lib/fit/defer.h> #include "...
a34472bdd130ead823fcca69ccbb4f613f7f4d99
2e84a0c92060716a10da164586ae6baa1fcccb7f
Kaosumaru/RemoteCall
/RemoteCall/tests/mtl/binary_stream.hpp
C++
hpp
2,025
permissive
#ifndef MTL_BINARY_STREAM #define MTL_BINARY_STREAM #include <sstream> #include <type_traits> namespace mtl { class binary_stream { public: void seekp(std::streampos p) { _ss.seekp(p); } std::streampos tellp() { return _ss.tellp(); } void seekg(std::streampos p) { _ss.seekg(p); } s...
17f95f2a23d92a4f0efc358929150d673db193d5
b88da719b7fcaad4e91efd1b7dfbb83dbb0f1e53
liujunliuhong/OpenGLBallSpinning
/OpenGLBallSpinning/main.cpp
C++
cpp
8,728
no_license
// // main.cpp // OpenGLBallSpinning // // Created by apple on 2020/7/20. // Copyright © 2020 yinhe. All rights reserved. // #include <stdio.h> #include "GLTools.h" #include "GLShaderManager.h" #include "GLFrustum.h" #include "GLBatch.h" #include "GLMatrixStack.h" #include "GLGeometryTransform.h" #include "StopWat...
7dbf3ea725a2136fded3fdada7cc6a7d6ea8713a
6535f728af4ef8a2e09bd76c6ec7c47a906e0b5b
ebin123456/node-hoedown
/src/html.hpp
C++
hpp
2,070
permissive
#ifndef NODE_HOEDOWN_HTML_HPP #define NODE_HOEDOWN_HTML_HPP #include "common.hpp" #include "hoedown/html.h" namespace HTML { Persistent<Object> html; Persistent<Object> html_toc; NODE_HOEDOWN_SIMPLE_HANDLER(Smartypants, "smartypants", hoedown_html_smartypants) V8_SCB(IsTag) { String::Utf8Value html (...
5e7bb82facd3c423d2b28907174e8a5c5eb4ded3
f3289d2eee4f1234c863c56e965aa386df8634e2
iskilia/Coding-Challenges
/Algorithms:ProblemSolving/hacker-rank-print-linked-list.cpp
C++
cpp
349
no_license
// Complete the printLinkedList function below. /* * For your reference: * * SinglyLinkedListNode { * int data; * SinglyLinkedListNode* next; * }; * */ void printLinkedList(SinglyLinkedListNode* head) { if(head == NULL) return; while(head != NULL){ cout << head -> data << endl; ...
567f1418890145437e3006c83d6242f854b63399
f79283e5468face0c7bf44384ce3023737b6ef57
zweiein/kaldi
/branches/complete/src/gmmbin/gmm-init-et.cc
C++
cc
2,296
permissive
// gmmbin/gmm-init-et.cc // Copyright 2009-2011 Microsoft Corporation // See ../../COPYING for clarification regarding multiple authors // // 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 ...
4061b7a58711ea3c8345086a5011b5783ddd2051
f2e5ca4bae043d44f4b141eacaec7655145340a6
jadmr/cpts483_Summer2015_drc
/Tools/Converter/Tests/FruitDatabaseTestSuite/drcdb.cpp
C++
cpp
10,429
no_license
#include "drcdb.h" #include <QtSql/QtSql> #include <QDebug> using std::string; using std::vector; #define db_driver "QSQLITE" //Change this to the real table fpr joins #define db_join_table "FruitBasket" DRCDB::DRCDB() { } //======================================================================== //Constructor ta...
7ad25689a32f5557b4c291ce5dc5d2539917909f
91866198b634aea8bd395bfa99d952acf9d308a2
yohokuno/nb
/CShowResult.cpp
C++
cpp
1,215
no_license
#include "stdapp.h" #include "nb.h" bool CShowResult::StepFrame() { GetDevEvent();//キー状態更新 if(devevent[PL_1][DEV_B1]==1) OnOk(); return true; } bool CShowResult::Initialize() { char buffer[128]; m_snd.LoadSound(prfGetString(szIniFile,"snd","fanfare",buffer)); m_snd.Play(); m_timer=100; return true; } void CS...