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
853b1fe426066bbf32045d92bd7631024dd2def8
938ca8f629aaf4cd6256b355425e32e5b652201c
alexandraback/datacollection
/solutions_5631572862566400_0/C++/sancho/c.cpp
C++
cpp
3,084
no_license
#include <bits/stdc++.h> using namespace std; #define forn(i, x, n) for (int i = int(x); i <= int(n); ++i) #define for1(i, n, x) for (int i = int(n); i >= int(x); --i) #define file "" #define F first #define...
e4d06cd5cb02867d6572d2fcfd3923b6d20bca8b
d31439bef6ff282e32c1219b80b5ec9de975679a
green-fox-academy/julcsi2121
/week-03/day-4/SharpieSet/SharpieSet.cpp
C++
cpp
954
no_license
// // Created by Varga Júlia on 2019-04-18. // #include "SharpieSet.h" void SharpieSet::addSharpie(Sharpie& sharpie) { Sharpies.push_back(sharpie); } Sharpie* SharpieSet::getSharpie(int i) { return &Sharpies[i]; } void SharpieSet::countUseable() { int counter = 0; for (int i = 0; i < Sharpies.size()...
4048608f04ff3eaaa30fab57cbbd1f6763e0cf5f
241fce87c8f9591cc4a73bf18985d4fe4699eb52
ianyue/mycpp_utils
/unit_test/test.cpp
C++
cpp
324
no_license
#include <cppunit/extensions/TestFactoryRegistry.h> #include <cppunit/ui/text/TestRunner.h> int main() { CppUnit::TextUi::TestRunner runner; CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry("MyTest"); runner.addTest(registry.makeTest()); runner.run(); return 0...
fd69e427faa671d9ce8592b92dcc85260cfc53e3
a4ea5774d1ff639bdfa4063de530c9f173cc99fc
aninoy/cplusplus
/YAVPAR2.CPP
C++
cpp
12,693
no_license
#include<iostream.h> #include<fcntl.h> #include<ctype.h> #include<stdio.h> #include<conio.h> #include<string.h> #include<process.h> #include<io.h> int val,flags=0; struct symboltable { char name[100]; int value; }symtab[100]; struct identifier { char name[100]; char type[20]; int value; }id[20],in[20],ch[20]; int...
7d5998cc884c828ab8f3a7badeed784cc92b48db
abcb3233ed29076796b254e2632790f3ec832929
gautamgtm/Codechef
/Easy/DECSTR.cpp
C++
cpp
1,515
no_license
//DECSTR #include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <vector> #include <string> #include <cstring> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <cmath> #include <iomanip> #include <time.h> #include <climits> #include...
16b0e30edb92589dd7ba8f5f5fb2ab53a5a3ee5f
aa09fe897da7f456b7cf5455f6186b4d7330dbe6
structure-computation/scills
/scillsResultClient/main.cpp
C++
cpp
496
no_license
#include <Soca/Com/SodaClient.h> #include "ScillsResultUpdater.h" int main( int argc, char **argv ) { // connection SodaClient sc( QHostAddress::Any, 8890 ); if ( not sc.connected() ) return 1; // sc.reg_type( "ScillsAssemblyItem" ); // attente while ( SodaClient::Event event = sc.e...
d7cb4a92daba88db2a987cc96a5f3bba3c0e6ea3
d7dc7893459ea5fb099a6f205b5465a7ea4571fa
TanJunYan/SP2
/Application/Source/Camera2.cpp
C++
cpp
2,842
no_license
#include "Camera2.h" #include "Application.h" #include "Mtx44.h" Camera2::Camera2() { } Camera2::~Camera2() { } void Camera2::Init(const Vector3& pos, const Vector3& target, const Vector3& up) { this->position = defaultPosition = pos; this->target = defaultTarget = target; Vector3 view = (target - position).Norma...
e08cbbe1795b887188fca923847beac47ca72060
3dc060efe8edea0f2911571d5c368df116ac122e
Cutyroach/Solve_Algorithms
/Acmicpc/C++/BOJ6679.cpp
C++
cpp
470
permissive
#include <stdio.h> int main() { for(int i = 2992; i < 10000; i++) { int dec = 0, tw = 0, he = 0; int p = i; while(p) dec += p % 10, p /= 10; p = i; while(p) tw += p % 12, p /= 12; if(dec == tw) { p = i; whil...
cd2c36aaa5c7ed4aa9b2d1922326f6284eb44571
5bd8cd6ad138245b766af50f94ccea8d868ee3a4
Starli16/Guide-auto-follower
/modules/guide_can/protocol/id_0x18f02502.cc
C++
cc
2,777
permissive
/****************************************************************************** * Copyright 2019 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
35879a71c3fb1f52eaff7ee240ffab3883dcec0a
4e1fff921ded564a07df35a8c9d9e5686837925d
MichaelKarpe/ponts-paristech-projects
/optimization/text-matching/text.cpp
C++
cpp
8,496
no_license
#include "text.h" //Methods for constructor /** * @brief When word is detected, add currentWord to the different tables * @param currentWord word to add * @param currentSection number of current section in the text */ void Text::addWordToTables(Word &currentWord, int &currentSection) { wordIndices[currentWord...
d99b56116a68e9186df43992c2aeb588c68e8b87
a7c1df4b406d9acf78aca7c2459d921d3fe773cf
reanag/snailfight
/MoveEvent.hpp
C++
hpp
366
no_license
#ifndef MOVEEVENT_HPP #define MOVEEVENT_HPP #include "Event.hpp" #include <string> using namespace std; class MoveEvent: public GameEvent{ private: float xVelocity; float yVelocity; float angVelocity; public: MoveEvent(float xVel, float yVel, float angVel); MoveEvent(string s); //~MoveEvent(); vir...
03f7febfd8c9f102d8ad402e52a8ea31c95efe33
7cee4fcaf43d6b6d3c002f8a9b830e90947043fb
yoshi5534/schorsch-the-robot
/src/Control2012/libreoffice/com/sun/star/task/OfficeRestartManager.hpp
C++
hpp
1,611
no_license
#ifndef INCLUDED_COM_SUN_STAR_TASK_OFFICERESTARTMANAGER_HPP #define INCLUDED_COM_SUN_STAR_TASK_OFFICERESTARTMANAGER_HPP #include "sal/config.h" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/DeploymentException.hpp" #include "com/sun/star/task/XRestartManager.hpp" #include "com/sun/star/...
3a91d482585b31068e425d0b55f8943ba976623b
cc5968960f70d86803a35d6abc1e9535cee2896b
aliyun/aliyun-openapi-cpp-sdk
/vpc/src/model/ModifyVcoRouteEntryWeightResult.cc
C++
cc
1,291
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...
d932f1d7b9cbc4bee26143b2d715c90a024dcae2
fde62f6e8ae37572ea248786d8ccdce16b2e8e3e
Sitispeaks/turicreate
/src/external/boost/boost_1_68_0/boost/metaparse/v1/cpp98/last_of.hpp
C++
hpp
1,880
permissive
#ifndef BOOST_METAPARSE_V1_CPP98_LAST_OF_HPP #define BOOST_METAPARSE_V1_CPP98_LAST_OF_HPP // Copyright Abel Sinkovics (abel@sinkovics.hu) 2009 - 2010. // 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)...
9e541a118ec9a564364c134fd0fb59c9bef91859
b1abeedbe0281539763b21ee79cffcd0db808e61
yesmar/sei-cert-cppcs-samples
/rules/oop/54/c2.cpp
C++
cpp
238
no_license
// OOP54-CPP: Compliant Solution (Move and Swap) T(T &&rhs) { *this = std::move(rhs); } // ... everything except operator= .. T& operator=(T &&rhs) noexcept { using std::swap; swap(n, rhs.n); swap(s1, rhs.s1); return *this; }
02f80432f82987a92e5920a9e4e7b5c628dc3635
c64b5ebf93f2d24dac6b574eb9d7f358f104d057
paranjay11/DS-Algo
/utilities/insertionLIstToBST/source.cpp
C++
cpp
1,159
no_license
#include <bits/stdc++.h> using namespace std; #define w(x) int x; cin>>x; while(x--) #define mk(arr,n,type) type *arr=new type[n]; #define vii vector<int> #define ll long long #define mii map<int,int> #define pb push_back #define pq priority_queue #define ff first #define ss second #define...
767c03c690a79e866bb7f05b7d46a66b498db122
60c12fbdd6a2a63181b6c2278ce8f228e106a6d4
add-amoz/Halide
/src/runtime/hexagon_dma.cpp
C++
cpp
29,481
permissive
#include "HalideRuntimeHexagonDma.h" #include "device_buffer_utils.h" #include "device_interface.h" #include "hexagon_dma_pool.h" #include "mini_hexagon_dma.h" #include "printer.h" #include "runtime_internal.h" #include "scoped_mutex_lock.h" namespace Halide { namespace Runtime { namespace Internal { namespace Hexagon...
f402fe683f8071fc82aa47379662f2a189c0fc61
661f61b4199999271112aaad888a7ce85437a52a
dawsonzhang/Scut
/Sample/ClientSource/ScutScene/LuaSceneGenerator.cpp
C++
cpp
5,213
permissive
/* ** Lua binding: SceneGenerator ** Generated automatically by tolua++-1.0.92 on 08/11/11 14:35:22. */ #ifndef __cplusplus #include "stdlib.h" #endif #include "string.h" #include "tolua++.h" /* Exported function */ TOLUA_API int tolua_SceneGenerator_open (lua_State* tolua_S); #include "SceneGenerator.h" /* funct...
2c0dc95a4e81719bed36a4d337e8b63c6eaafe8c
ed382fe1889703762c6283bae1ba02d216d5e08d
DDWC1603/lab-exercise-chapter-8-CaneraX
/LogLevel.cpp
C++
cpp
806
no_license
#include<iostream> using namespace std; class Log { public: const int LogLevelError = 0; const int LogLevelWarning = 1; const int LogLevelInfo = 2; private: int m_LogLevel=LogLevelInfo; public: void SetLevel(int level) { m_LogLevel = level; } void Error(const char me...
e6503051b00c498187c34fe92f7edb771a485d46
6c363084204bb9a8294e44f535674f79ee135bba
mmasser95/PlaneGameC
/main.cpp
C++
cpp
6,675
no_license
#include <windows.h> #include <iostream> #include <conio.h> #include <stdio.h> #define IZQUIERDA 75 #define DERECHA 77 char avion_l1[]={' ',' ',' ', '*',' ',' ',' ',0}; char avion_l2[]={' ',' ','*', '*','*',' ',' ',0}; char avion_l3[]={' ','*',' ', '*',' ','*',' ',0}; char explosion_l1[]={' ',' ','*','*',' '...
eba566a1a8c2612de29912179016864730bf88d0
8a03d4b3710e03e287b8dbc7dba3691df21bf623
lucasmingatos/projetosFaculdade
/laboratorio de programacao 1/votos.cpp
C++
cpp
871
no_license
/* implementar um algoritmo para receber o voto de 10 eleitores. Os candidatos são: 0 - branco; 10 - ze da cantina; ; 15 -tia do churros e o que for diferente de 0, 10, 15 deve ser considerado nulo. Mostrar o percentual de votos de cada candidato.*/ #include <stdio.h> #include <stdlib.h> int tia=0, ze=0, branco=0, n...
6bc24cf3c6fd9481c9969ad666217ebadcae0977
a49cb9aa61ae7b3cd87c83bb1aa01a8d65c9b497
oriubimo/arrow
/cpp/src/arrow/compute/kernels/cast.cc
C++
cc
56,636
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
b453bbca17a62050be41942a4a6ac5c1670c8535
29ddcce8c0020709ede5a178e2d92192ad70ead0
jurgina/perholm
/src/driveDB.cc
C++
cc
7,506
no_license
#include "article.h" #include "database.h" #include "driveDB.h" #include <map> #include <string> #include <cstddef> #include <vector> #include <algorithm> #include <sstream> #include <iostream> #include <sys/stat.h> #include <fstream> #include <dirent.h> using namespace std; typedef struct dirent dirent; vector<pair<...
710e0c8c716ce6b4877725a89d78c9726eacfcb7
c4f529797ba9c7d2871fbe30b60dc61d3627f9df
NynkeDekkerLab/qtrk
/cputrack/qtrk_c_api.cpp
C++
cpp
3,259
no_license
#include "std_incl.h" #include "QueuedTracker.h" CDLL_EXPORT QueuedTracker* DLL_CALLCONV QTrkCreateInstance(QTrkSettings *cfg) { return CreateQueuedTracker(*cfg); } CDLL_EXPORT void DLL_CALLCONV QTrkFreeInstance(QueuedTracker* qtrk) { delete qtrk; } // C API, mainly intended to allow binding to .NET CDLL_EXPORT ...
ae4729e26144675053fd3485941b47699e620913
2d30ecbb7227a3dac3c89c7bf7d5bc60cc37a636
David-Xilo/CodingPlatforms
/HackerRank/C++/Introduction/BasicDataTypes.cpp
C++
cpp
389
no_license
#include <iostream> #include <cstdio> using namespace std; int main() { int d; long ld; long long lld; char c; float f; double lf; scanf("%d %ld %lld %c %f %lf", &d, &ld, &lld, &c, &f, &lf); printf("%d \n", d); printf("%ld \n", ld); printf("%lld \n", lld); printf("%c \n", c)...
8cb64aceb21422b752d8c9a5013bd30b7e43a534
dba9116e16385ceb306d55cc3c975ac85cf2a2ae
sc2ad/BeatSaber-Quest-Codegen
/include/Org/BouncyCastle/Utilities/Date/DateTimeObject.hpp
C++
hpp
3,754
permissive
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: System.DateTime #include "S...
a78d7e3228778e29f3ef2efa23f847f916c5c2b4
aa8a1772a2f8a900e3ae0d70c03606c88d440b57
idshibanov/OpenApoc
/game/ui/city/alertscreen.cpp
C++
cpp
4,378
permissive
#include "game/ui/city/alertscreen.h" #include "forms/form.h" #include "forms/graphic.h" #include "forms/label.h" #include "forms/ui.h" #include "framework/event.h" #include "framework/framework.h" #include "framework/keycodes.h" #include "game/state/city/agentmission.h" #include "game/state/city/building.h" #include "...
a1e3f282cae42e1284ea8910d12d1a316f75955e
33a7c416f51d6f1ffcb044847c6ffad5cca7d4d3
PinkingS/Data-Structure
/18-1-addTwo.cpp
C++
cpp
324
no_license
#include <iostream> using namespace std; int addTwo(int a, int b) { if(b == 0) return a; int sum = a^b; int carry = (a&b) << 1; return addTwo(sum, carry); } int addTwo_2(int a, int b) { char *c = (char*)a; return (int)&c[b]; } int main() { int a = 762; int b = 345; cout << addTwo_2(a, b) << endl; return 0...
7a70035edb9e2a826dce5db11353c9d32d76b864
53e7a9184d6ce7e8a4045cc836fe770c9b4e780a
harshareddy794/Placement-preparation
/Ds and algo/Basic/Heap/buildHeap.cpp
C++
cpp
2,125
no_license
#include <iostream> using namespace std; void swap(int &a, int &b){ int temp = a; a = b; b= temp; } class minHeap{ public: int *arr; int cap,size; minHeap(int n){ arr = new int[n]; size = 0; cap = n; } minHeap(int ele[],int n_element_array,int n){ a...
d082f1aa52daba7bc1a6de67fcec2c97245bc008
d98dede03e03037956516b989f8c060bc30cfad5
staticinstance/eos
/libraries/types/AbiSerializer.cpp
C++
cpp
10,464
permissive
#include <eos/types/AbiSerializer.hpp> #include <fc/io/raw.hpp> #include <boost/algorithm/string/predicate.hpp> namespace eos { namespace types { using boost::algorithm::ends_with; using std::vector; using std::string; template <typename T> inline fc::variant variantFromStream(fc::datastream<const cha...
1aa8e4ce35330a26ae1ba077a5c44d36c7aabd31
1d20eecfc6b48b9a7b4e35c51a7c8bf3ca70691c
lawlient/leetcode
/medium/permutation.cpp
C++
cpp
1,198
no_license
/* Given a collection of distinct numbers, return all possible permutations. * * For example, * [1,2,3] have the following permutations: * * [ * [1,2,3], * [1,3,2], * [2,1,3], * [2,3,1], * [3,1,2], * [3,2,1] * ] * */ #include <iostream> #include <algorithm> #incl...
bdc42e3a4e6fa40e9ab0fce5019682931137713e
3caac25c8cf2fb7ae768fad0c5bae089b423ff40
junmin-zhu/chromium
/chrome/browser/about_flags.cc
C++
cc
80,466
permissive
// Copyright (c) 2012 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/about_flags.h" #include <algorithm> #include <iterator> #include <map> #include <set> #include <utility> #include "ash/ash_...
e56d0ee9694eeda8ad8357c84aec4f1621aaff46
06acb900e9713a0341cc98021ffc4ddc419d7f59
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE36_Absolute_Path_Traversal/s04/CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_fopen_84a.cpp
C++
cpp
2,458
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE36_Absolute_Path_Traversal__wchar_t_listen_socket_fopen_84a.cpp Label Definition File: CWE36_Absolute_Path_Traversal.label.xml Template File: sources-sink-84a.tmpl.cpp */ /* * @description * CWE: 36 Absolute Path Traversal * BadSource: listen_socket Read data ...
2fc3891758519883de30c85cffa4614ae21ec475
2776b4ca2c326478f5a695926db1eb4c8fe58132
i-aditya-kaushik/geeksforgeeks_DSA
/DPP/fibonacci_bottom_up.cpp
C++
cpp
348
no_license
long long findNthFibonacci(int number) { vector<long long> dp(number,-1); if(number==1){ return 1; } dp[0]=0; dp[1]=1; int i=2; //cout<<0<<" "<<1<<" "; while(i!=number){ dp[i] = dp[i-1]+dp[i-2]; //cout<<dp[i]<<" "; i+=1; } //cout<<endl; return ...
75ff609f081d01f58675f1fcbdb785b7989f6c6a
7e2c6382e8da82aa4e0a22eceeab09887ab2e494
NickVoron/Stable
/Sources/Libraries/imageFiltering/interpolate.cpp
C++
cpp
1,513
no_license
// Copyright (C) 2014 Voronetskiy Nikolay <nikolay.voronetskiy@yandex.ru> // // This library is distributed under the MIT License. See notice at the end // of this file. // // This work is based on the RedStar project // #include "interpolate.h" #include "algorithm/mitchellNetravali.h" #include "newmath/library.includ...
92e2785a4b28b45a2875b3f104a8a0791d1da222
6e172821f492ce03a8d5bccaf948babfa716843a
Halksel/Competition
/yukicoder/347.cpp
C++
cpp
1,900
no_license
#include <bits/stdc++.h> using namespace std ; #define pb(n) push_back(n) #define fi first #define se second #define np string::npos #define X real() #define Y imag() #define value(x,y,w,h) (x >= 0 && x < w && y >= 0 && y < h) #define all(r) (r).begin(),(r).end() #define gsort(st,en) sort((st),(en),greater<int>()) #de...
98c7b0a469167fbec6f7d06f190d4e34e81acb22
84fe05c08701697f57d0f01487da8419d29c7672
liukai-tech/ntrip-client
/mainwindow.cpp
C++
cpp
3,483
no_license
#include "mainwindow.h" #include "Widgets/MainWindowWidget.h" #include "Widgets/MessageViewer.h" #include "Widgets/MapViewer.h" #include "Widgets/NtripStatusbar.h" #include "Misc/Logger.h" #include "NtripClient.h" #include <QMenuBar> #include <QStatusBar> #include <QQuickView> #include <QQuickItem> #includ...
3a6a5e43aa894a4e095d331e34afe6289e74dbd5
31c98709013d4828abff8db0274387722a94c2eb
emuikernel/BDXDaq
/devel/coda/src/rc/runControl/Xui/src.s/rcDownload.cc
C++
cc
2,997
no_license
//----------------------------------------------------------------------------- // Copyright (c) 1994,1995 Southeastern Universities Research Association, // Continuous Electron Beam Accelerator Facility // // This software was developed under a United States Government license // described in t...
6ee63a8826804ffbf9d9f35e6ee1a3f8fef4afee
415a477a95709f0f69c3ef6a650180f66c659844
zyhustgithub/leetcode
/hard/316.去除重复字母.cpp
C++
cpp
1,041
no_license
/* * @lc app=leetcode.cn id=316 lang=cpp * * [316] 去除重复字母 */ // @lc code=start class Solution { public: string removeDuplicateLetters(string s) { int strSize = s.size(); for (int pos = 0; pos < strSize; ++pos) { mp[s[pos]] = pos; } stack<char> st; for (int p...
3ef72d94de7e11b32a49ff2521150ec7b24951a3
c6abe21bbef47ffca29bee8c36841efa36182d98
Bishnu04/lumi
/include/lumiPrimaryGeneratorAction.hh
C++
hh
686
no_license
#include "G4VUserPrimaryGeneratorAction.hh" #include "globals.hh" class G4ParticleGun; class G4Event; class lumiPrimaryGeneratorMessenger; class lumiPrimaryGeneratorAction: public G4VUserPrimaryGeneratorAction{ public: lumiPrimaryGeneratorAction(); virtual ~lumiPrimaryGeneratorAction(); virtual void GeneratePr...
c544fd695c5fbf5be00aaa821315fbe533522801
4b4c105e99a153b0e8649f4601d9a8d440989953
MaximePoirier/Projets-Universitaire
/C-C++/TD5/test_matrix.cpp
C++
cpp
1,202
no_license
/*! \file * \brief This file is meant to test matrix implantation. * * \author PASD * \date 2017 */ # include "matrix.hpp" # undef NDEBUG # include <assert.h> using namespace std ; namespace { const int size = 5 ; } int main ( void ) { // Tests sur les opérateurs Matrix m1 ( size , size ) ; float t...
7c426a8bb51a88ac24e33ad66e2800c8224e4d13
7914a26c23d59413d17caa1fd45a2856155e414b
haotianyuan/520-Assignments
/hw_5/unit_tests.cc
C++
cc
8,293
no_license
#include "gtest/gtest.h" #include <iostream> #include <vector> #include <cctype> #include <numeric> // std::accumulate #include "examples.h" #include "db.h" namespace { using namespace std; class Imag { public: Imag(double a, double b) : x(a), y(b) {} double x, y; }; TEST(Vector,Vect...
7598cef9a947cdb3daacc504415e8c94a84f5ece
dd8684d0f963cc474899a1deae75b3408b02615b
bigdoods/OpenInfraPlatform
/IfcRoad/src/OpenInfraPlatform/IfcRoad/entity/IfcRelFlowControlElements.cpp
C++
cpp
6,083
no_license
/*! \verbatim * \copyright Copyright (c) 2015 Julian Amann. All rights reserved. * \author Julian Amann <julian.amann@tum.de> (https://www.cms.bgu.tum.de/en/team/amann) * \brief This file is part of the OpenInfraPlatform. * \endverbatim */ #include <sstream> #include <limits> #include "OpenInfraPlatform/IfcRoad...
4c1d706f9790e5ece36557bf0a9a93fbc70872d9
5c025d2b5a2653a93c25f1216bde4a4d4ff898b3
Fladirmacht/visioX
/src/qt/guiutil.cpp
C++
cpp
16,465
permissive
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #...
3c823b7014a57b8fc5f96a6112f7d24b4852d6d0
7142c78685c6f2d6d62591a86b558ce04dd158b1
metux/chromium-suckless
/third_party/crashpad/crashpad/util/thread/thread_posix.cc
C++
cc
1,184
permissive
// Copyright 2015 The Crashpad 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 ...
f1d2f84087337febaf7fa76669b9a3132bd0acd3
563f1936ad598562aede34c5df038c4f045979e4
y761823/ACM-code
/HDOJ/p1040.cpp
C++
cpp
918
no_license
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: y761823 ////Nickname: Oyk ////Run ID: ////Submit time: 2014-11-07 10:54:14 ////Compiler: GUN C++ /////////////////...
1ef1dadbd6ee2479b0f4ac18030893f1db391ce6
451c79537e2ef7c7e3f29a6b2ba9550f6de29893
bruian/AutoBot
/wxSF/FlexGridShape.cpp
C++
cpp
3,548
no_license
/*************************************************************** * Name: FlexGridShape.cpp * Purpose: Implements flexible grid shape class * Author: Michal Bližňák (michal.bliznak@tiscali.cz) * Created: 2008-09-27 * Copyright: Michal Bližňák * License: wxWidgets license (www.wxwidgets.org) * Notes:...
bb706b19010229607858ec90739669b709ea25be
b25606af9fe4ed6c5dbcd91197f25ebc4de1fe2e
b4sgren/RoboticVision
/SFM/knownParams.cpp
C++
cpp
6,495
no_license
#include <opencv2/opencv.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <string> #include <iostream> #include <cmath> int mouseX, mouseY; void firstCallback(int event, int x, int y, int flags, void* userdata) { if (event == cv::EVENT_LBUTTONDOWN) { mouseX = x; mouseY = y; std::co...
0d119307ebb14738bbb3f3f1452821e66a0c02e3
ff3d3411d6915bb56d1f77e0b3702d1584fc65f2
Stefan-China/Keil_HomeControl
/HNNK/HNNK_UI/Update191106/temp/moc/moc_homeform.cpp
C++
cpp
8,980
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'homeform.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.8) ** ** WARNING! All changes made in this file will be lost! ************************************************************...
41afa26f23ac1b697ad68d93d5b4a7f0ad23dabd
8ccecad69607b5cab143e95c8ae63ec7d1640233
Mjoinir/ACM-ICPC-Template
/模板/7_数论/3_分解质因数.cpp
C++
cpp
259
no_license
int a[1000000]= {},pcnt=0; void pdec(int n) { int x=sqrt(n); for (int i=1; prime[i]<=x; i++) if (n%prime[i]==0) { a[++pcnt]=prime[i]; n/=prime[i]; i--; } if (n!=1) a[++pcnt]=n; }
7c672d80ff6b6d74bbd250a778bf98d151c852e6
75762c6f00abfea201bf966af4acaa45679c09a7
tmrhombus/UWAnalysis
/CRAB/MuNu/farmoutAJ_analyzer/Submit_VVCheckExtended/TTbar_full_JESUp_callHistoFiller.cc
C++
cc
4,046
no_license
/******************************** Instantiates histoFiller.C with the correct chain and naming for a definable set of parameters Usage: root -l -b .L TTbar_full_JESUp_callHistoFiller.cc TTbar_full_JESUp_callHistoFiller() root -l -b -q TTbar_full_JESUp_callHistoFiller.cc Author: T.M.Perry UW-Madison ****************...
3dc7b0b7ac3f5143a082c9b24f445c507305c84c
dc5186220d48bdbf6944787da1351c79564e284a
ViolaMiki/cpp
/adt/1.cpp
C++
cpp
205
no_license
#include<stdio.h> int main() { int max(int x, int y); int a,b,c; scanf("%d,%d",&a,&b); c=max(a,b); printf("%d\n",c); return 0; } int max(int x, int y){ int z; if(x>z) z=x; else z=y; return z; }
1df439fdac2f3732287768fc1cf8b89c2ed6ccc1
397b9b3bffed1b20ca0ee4bec7c412bc3cd09eb9
alliedmodders/hl2sdk
/game/server/hl2/hl2_playerlocaldata.cpp
C++
cpp
2,416
no_license
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "hl2_playerlocaldata.h" #include "hl2_player.h" #include "mathlib/mathlib.h" #includ...
031243411c4c36e93b7d68a9a233f9c66414b43b
e95d0f524f77b20bf5bcf484fcd661d7877b7a36
zhqing007/Match
/DrawLotsManager/CGridListCtrlEx.cpp
C++
cpp
140,223
no_license
//------------------------------------------------------------------------ // Author: Rolf Kristensen // Source: http://www.codeproject.com/KB/list/CGridListCtrlEx.aspx // License: Free to use for all (New BSD License) //------------------------------------------------------------------------ #include "stdafx.h" #i...
bbfad79d9cfaf069abb4bd5382a3cd1dad476fae
04a8bac44d8da43b22bc930eefccad3e953f2a78
brianbbsu/program
/code archive/CF/1081D.cpp
C++
cpp
2,271
permissive
//{ #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; #define REP(i,n) for(ll i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define FILL(i,n) memset(i,n,sizeof i) #define X first #define Y second #define SZ(_a) (int)_a.size() #define ALL(_a) _a.begin(),_...
dc397c93e649bfe0b888bd74054f7c7a5322b2bf
20c80c4c0f813e88179ac1bcfbeea90c539073c0
InspectorDidi/serenity
/Libraries/LibGUI/GDirectoryModel.cpp
C++
cpp
10,564
permissive
#include "GDirectoryModel.h" #include <AK/FileSystemPath.h> #include <AK/StringBuilder.h> #include <LibCore/CDirIterator.h> #include <LibDraw/GraphicsBitmap.h> #include <LibGUI/GPainter.h> #include <LibThread/BackgroundAction.h> #include <dirent.h> #include <grp.h> #include <pwd.h> #include <stdio.h> #include <time.h> ...
8c402bb5df0dbabba55f9633fcbec44f36c506ac
32ebbc409143d392b4436438b255e2496d208888
TheTypoMaster/ElastosRDK5_0
/Sources/Elastos/LibCore/src/org/apache/http/message/CBasicListHeaderIterator.cpp
C++
cpp
388
permissive
#include "CBasicListHeaderIterator.h" namespace Org { namespace Apache { namespace Http { namespace Message { CAR_OBJECT_IMPL(CBasicListHeaderIterator) ECode CBasicListHeaderIterator::constructor( /* [in] */ IList* headers, /* [in] */ const String& name) { return Init(headers, name); } } // namespace M...
60daadd0e407549cfba83608eacf66f93af23e34
f6787732e3022b28b25dc9754b3420a0dd6d2941
romulovff/Trabalho_TR1
/src/fisica.cpp
C++
cpp
6,580
no_license
#include "../include/fisica.hpp" fisica::fisica(int *quadro_inicial, int quadro_tamanho) { this->quadro = quadro_inicial; this->quadro_tamanho = quadro_tamanho; } fisica::~fisica() { free(this->quadro); this->quadro = nullptr; } void fisica::MeioDeComunicacao() { cout << endl << "========REALIZAN...
0267d0d31b372721e30d40350b3fa14873439ea8
59f6709b280e9bb8b9ca8217d9109fc069c60912
WiViClass/cef-3.2623
/chromium/src/remoting/host/server_log_entry_host_unittest.cc
C++
cc
3,981
permissive
// Copyright 2014 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 "base/memory/scoped_ptr.h" #include "base/strings/stringize_macros.h" #include "build/build_config.h" #include "remoting/host/server_log_entry_ho...
60d79b1a2fcc525c27e55c783a81461c966f1922
0b368eaecefa6de7cf664beb2ffa53717cf08f82
adityasarvaiya/coding
/Crio/Array/6_FindAllAnagramsInAString/FindAllAnagramsInAString.cpp
C++
cpp
985
no_license
#include<bits/stdc++.h> using namespace std; vector<int> findAnagrams(string s, string p) { // CRIO_SOLUTION_START_MODULE_L1_PROBLEMS vector<int>ans; if(s.size() < p.size()) { return ans; } int cntP[26],cntS[26],left = 0,right = p.size()-1; memset(cntS,0,sizeof cntS); memset(cntP,0,sizeof cntP); for(int i = ...
7f074becf3b3bd1525156941f05e9d0ebb4c5ea5
e12a3ec4e4d4fdb9c7fad02cf62c94722f236cc5
ddcc/llvm-project
/llvm/unittests/ADT/PointerUnionTest.cpp
C++
cpp
9,520
permissive
//===- llvm/unittest/ADT/PointerUnionTest.cpp - Optional unit tests -------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
e4a228fe5225daed3b238188d18822947efa49e2
4edcd28a29a2c90cf74ab45b8a307605a9e3bf40
KathanKP/Principles-of-Programming-Language-Assignments
/Assignment1/Assignment1_Kathan_Kashiparekh.cpp
C++
cpp
7,368
no_license
#include <bits/stdc++.h> #include <fstream> using namespace std; // Kathan Kashiparekh: 2014B3A7792G //Struct for entries in the symbol table. struct entry{ string identifier; string kind; string type; }; //Struct for SymbolTableNode struct node{ node *parent; //Hold a pointer to the parent of current scope. ve...
fc84b38e386e99083ea56fe99ac402b0750b253e
53b54a9f3ce6f94db2b265e36c77aa8ade4f86ba
rajammanabrolu/WorldGeneration
/evennia-engine/evenv/Include/LIEF/VDEX/Parser.hpp
C++
hpp
1,965
permissive
/* Copyright 2017 R. Thomas * Copyright 2017 Quarkslab * * 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 appli...
b59a9f15c926e4e429e693c02212e77bccd19dd4
b8a41772a724465ed264a4c83012c32fb916375c
GarryGuanDoubleG/Under-World
/source/model.hpp
C++
hpp
2,921
no_license
#pragma once struct AABB { glm::vec3 min; glm::vec3 max; }; /** *3D model class. Supports most file formats. Imports and parses model file and stores mesh information *to use for rendering */ class Model { private: AnimController *m_animController; Assimp::Importer m_importer; const aiScene *m_scene; glm::mat4...
32599aedbb4a634920cbdf3ec2f06333c4719e63
48a71b5261626f6be9cc1efa4d27675cd4e472d3
michal367/Algorithms-and-Data-Structures
/programs/math_parser/main.cpp
C++
cpp
448
no_license
#include <iostream> #include "MathParser.h" using namespace std; int main() { cout << "Math Parser" << endl << "Type expression to calculate" << endl << endl; string expr; do{ getline(cin,expr); if(expr != "exit" && expr != "quit") { cout << "result: " << MathParser::...
8a53b2d40f16a6d26993384ba3d9c7872ba28a08
b3b6d6e71179f34aea477863e81a39f137ee27c6
AhJo53589/leetcode-cn
/problems/maximum-sum-obtained-of-any-permutation/SOLUTION.cpp
C++
cpp
1,409
no_license
////////////////////////////////////////////////////////////////////////// class Solution { public: int maxSumRangeQuery(vector<int>& nums, vector<vector<int>>& requests) { vector<int> cnt(nums.size() + 1, 0); for (int i = 0; i < requests.size(); i++) { cnt[requests[i][0]]++; ...
ee6ab2638b1f919e250f15ac48395bee741317d4
922edf1ecaa7887f4decd23b3ea1c3b0ab3332a6
masakinihirota/2019pg
/ABC/111-120/ABC113/C/main.cpp
C++
cpp
1,763
no_license
#include <bits/stdc++.h> using namespace std; // 総数を1000000007で割った余り const long long mod = 1e9 + 7; using ll = long long; using pii = pair<int, int>; using pll = pair<ll, ll>; #define ull unsigned long long #define ld long double #define vi vector<int> #define vll vector<ll> #define vc vector<char> #define vs vector...
76c975f224c307cc0301af136102aade39959356
8c10dfc56f8c2c8e1d1512d9a5b27c8d233506da
wtznc/Principles-and-Applications-of-Programming-CPP
/PixelPushing/src/ofApp.cpp
C++
cpp
3,357
no_license
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ int size = sizeof(pixels) / sizeof(char); float phase = 0.0; float phaseD = TWO_PI / 100.0; for(int i = 0; i < size; i+=4){ pixels[i] = sinf(phase) * 255.0; pixels[i+1] = sinf(phase ...
68d45559135cf6c1658a02f50d871ebd83eea076
6bd884b38ba23ff4726ea8e80eb38e2f95d07bc1
freebsd/freebsd-ports
/www/ungoogled-chromium/files/patch-v8_src_wasm_jump-table-assembler.cc
C++
cc
2,562
permissive
--- v8/src/wasm/jump-table-assembler.cc.orig 2023-07-21 09:49:17 UTC +++ v8/src/wasm/jump-table-assembler.cc @@ -52,15 +52,21 @@ void JumpTableAssembler::InitializeJumpsToLazyCompileT #if V8_TARGET_ARCH_X64 void JumpTableAssembler::EmitLazyCompileJumpSlot(uint32_t func_index, ...
44c6bb6257e82e90aed10e1bd4a39b52707d3fa9
7b529f4970caac17adf74fd9feb788eb93c57b14
shenwei1234ab/Algorithm
/src/main.cpp
C++
cpp
1,174
no_license
//============================================================================ // Name : thread2.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #define _CR...
e3d82a9b482378e077de6c29c43ce5bd90a969cf
52cb6e5df1e7a7970dfe39d5ba59f3a6da01f5c8
Crasader/PreviousProject2
/CrazyMahjong/Classes/MenuScenePayHandler.cpp
C++
cpp
1,733
no_license
#include "MenuScenePayHandler.h" #include "PayDefine.h" #include "cocos2d.h" #include "PxPayMannger.h" #include "MahjongEvent.h" USING_NS_CC; #define PLAYINFO_PICKCARDSCOUNT "goodTimes" static MenuScenePayHandler* _instance = nullptr; MenuScenePayHandler* MenuScenePayHandler::getInstance() { if (!_instance) { _inst...
05cf38b8aaaf69e26a908d55fb34139765baa8f8
dedf74ae35dbac883a8622826727291dbbcbe260
SimonTomazic/LSD-SLAM_Android
/SLAM/app/src/main/jni/ImgFun.cpp
C++
cpp
1,058
no_license
#include <jni.h> #include <stdio.h> #include <stdlib.h> #include <opencv2/opencv.hpp> extern "C" { JNIEXPORT jint JNICALL Java_com_lhc_slam_LibImgFun_intfun(JNIEnv *env, jobject obj); JNIEXPORT jint JNICALL Java_com_lhc_slam_LibImgFun_intfun(JNIEnv *env, jobject obj) { jint a = 2; return a; } JNIEXPORT jlong...
6d14e83ce448e7003d056f7fc9fe76435608f9a1
ff98cf5fd3155e182a40e1464ac05cad1b7ffb0c
gogakoreli/snake
/snake_map.cpp
C++
cpp
2,471
no_license
#include "snake_map.h" #include <pthread.h> #include <iostream> #include <vector> #include <utility> #include <stdlib.h> #include <time.h> #include "macros.h" using namespace std; SnakeMap::SnakeMap(Snake *snake) { this->snake = snake; clear_map(this->map_array); srand(time(NULL)); update_snake_food(t...
2bb7656f6b1255c50f16c0e4c28d73938c6559d5
7c301b3cb0f31233e13fdee204ae722a4d7782b2
littleredbear/ssss
/helloworld/frameworks/cocos2d-x/cocos/renderer/CCGLProgramCache.cpp
C++
cpp
21,942
no_license
/**************************************************************************** Copyright (c) 2011 Ricardo Quesada Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2011 Zynga Inc. Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any...
86e53701be30160d9bd96ab9352b597f0bbaf80b
fd65dfdde3062744b0c95b1827bb14f2709a44b1
hamking/apollo
/modules/planning/tasks/qp_spline_path/qp_spline_path_generator.cc
C++
cc
14,767
permissive
/****************************************************************************** * Copyright 2017 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
736addef0349636faaf887a90ef2176b447a8dab
15581bc66ff5a131bae8d357796c61ea0de0eeb7
Moon3903/CodeForces
/978/F.cpp
C++
cpp
559
no_license
#include<bits/stdc++.h> using namespace std; int kasus,sampai,ok,hai,tmp,x,y; int arr[1000000],vv[1000000]; int meh[1000000]; int main(){ cin>>sampai>>ok; for(kasus=0;kasus<sampai;kasus++){ cin>>arr[kasus]; meh[kasus]=arr[kasus]; } sort(meh,meh+sampai); for(kasus=0;kasus<sampai;kasus++){ tmp=0; while(arr[...
cfc1ec4a660aa03861d8873bec9dafba5f382b30
28df1f03574d0aaadb596b84d7525ec69a0b75ac
colinyoyo26/Comet
/src/basic_simulator.cpp
C++
cpp
26,370
permissive
/** Copyright 2021 INRIA, Université de Rennes 1 and ENS Rennes * * 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...
6423866aa5437eeb91fb64c9f5c2136be5c3e308
7c24043504b4868facb90f6b78ab500a99a5b055
h123a456rr789y/Algorithm-
/homework6.2 Longest Non-decreasing Subsequence.cpp
C++
cpp
913
no_license
#include<iostream> using namespace std; int main(){ int T; cin >> T; int count; for(int i=0;i<T;i++){ int n; cin >>n; long long int c[n]; for(int j=0;j<n;j++){ cin >>c[j]; } long long int memo[n]; memo[n-1]=1; ...
355e12f0ea79ec73a4548a1521e00044e06eed0e
3cdda11fa5e00eb9af2d56c19f00d7286d6ea84f
Norgg/Principia
/mathematica/mathematica_body.hpp
C++
hpp
4,045
permissive
 #pragma once #include "mathematica/mathematica.hpp" #include <cmath> #include <string> #include <tuple> #include <vector> namespace principia { using quantities::DebugString; using quantities::SIUnit; namespace mathematica { namespace { // A helper class to scan the elements of a tuple and stringify them. temp...
7eaa0e6a334f91fdecdacbf76dab2fda9d1a9061
ad1608acc399e15d277832aedd08446a6db32591
deleted/visionworkbench
/src/vw/Core/ProgressCallback.cc
C++
cc
2,336
permissive
// __BEGIN_LICENSE__ // Copyright (C) 2006-2011 United States Government as represented by // the Administrator of the National Aeronautics and Space Administration. // All Rights Reserved. // __END_LICENSE__ #include <iomanip> #include <vw/Core/ProgressCallback.h> namespace { vw::NullProgressCallback g_dummy_prog...
15df5975dd75b7a5d9e0fabb74f162cadc06ec86
561669bd1162f6342e4168260bb6dbd27f196c1c
bonly/exercise
/2011/201109/20110927_mysql_cront.cpp
C++
cpp
506
no_license
#include <string.h> #include "20110928_tick.hpp" #include "20110927_mysql_cront.h" #ifdef __cplusplus extern "C"{ #endif my_bool cront_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { return 0; } long long cront(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error){ bus::Tick tk; ...
bb7bbcd83a669f3673c2e2ef5e6211fcba193a50
4b28e45c53816548e62318aaa58227d81a6cafdf
Happy-Ferret-Entertainment/creatures3
/engine/Caos/PortHandlers.cpp
C++
cpp
9,294
no_license
// disable annoying warning in VC when using stl (debug symbols > 255 chars) #ifdef _MSC_VER #pragma warning( disable : 4786 4503) #endif #include <string> #include "PortHandlers.h" #include "CAOSMachine.h" #include "../Agents/Agent.h" #include "../AgentManager.h" #include "../Agents/InputPort.h" #include "../Agents...
5374b03674cf892febaa96de3afa769cabaa55d3
8ae9c841d4cdda9014c189bb115aa7999027fe60
cortoproject/corto-script-ast
/test/declaration-scope-shorthand/src/main.cpp
C++
cpp
444
permissive
/* This is a managed file. Do not delete this comment. */ #include <include/test.h> extern "C" int cortomain(int argc, char *argv[]) { int result = 0; test_Runner runner = test_Runner__create(NULL, NULL, "corto/script/ast declaration-scope-shorthand", argv[0], (argc > 1) ? argv[1] : NULL); if (!runner) re...
99487fd3e9331e95dffde75145b849aa5943a6d5
88310433a16cc3be93e9e38c30aac006a79238b2
rushioda/PIXELVALID_athena
/athena/DetectorDescription/GeoModel/GeoModelKernel/src/GeoTorus.cxx
C++
cxx
818
no_license
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ #include "GeoModelKernel/GeoPolyhedron.h" #include "GeoModelKernel/GeoShapeAction.h" #include "GeoModelKernel/GeoTorus.h" const std::string GeoTorus::s_classType = "Torus"; const ShapeType GeoTorus::s_classTypeID = 0x24; GeoTorus::GeoTo...
6cb4564595ec2078f5d9cd814ed55dd3d0179bef
00de6937750304a8711735e286286d1610cadfe0
wangsi12/Sort
/MergeSort.cpp
C++
cpp
2,303
no_license
#include "MergeSort.h" #include"Tool.h" #include<stack> #include<algorithm> //递归 void MergeSortRecursive(int * nums, int* temp, int start, int end) { if (start >= end) { return; } int length = end - start; int start1 = start, end1 = (length >> 1) + start; int start2 = end1 + 1, end2 = end; //分别排序 Me...
374676415dcd7f58e9c0855a73a9af54915c476a
7c26ecbc77f111da96d57863f1f1d758774f1b05
gkastrinis/bamboo
/tests/basicTests.cpp
C++
cpp
2,033
permissive
#include <gtest/gtest.h> #include "index/ArrayIndex.h" #include "relation/Column.h" #include "relation/Relation.h" TEST(basic_check, array) { ArrayIndex<uint64_t> index; for (auto v : (uint64_t[5]) {100, 42, 80, 4, 10}) index.put(v); EXPECT_EQ(index.size(), 5); ASSERT_TRUE(index.contains(42)); ASSERT_FALSE(index....
752114f4dd9bc014dc88ad1076ee257e4635dc6f
66c3abe5ee85657dcfd37c20b77ad44b187d87e8
wangzitan/BCGBPRo
/BCGPRibbonCustomizePage.cpp
C++
cpp
42,345
no_license
//******************************************************************************* // COPYRIGHT NOTES // --------------- // This is a part of BCGControlBar Library Professional Edition // Copyright (C) 1998-2018 BCGSoft Ltd. // All rights reserved. // // This source code can be used, distributed or modified // only unde...
287a336487821a21fadd613c949d9d11d840af95
034011cbf357bed72bb10b39f3b49a9d83e458be
JXS2012/QuadController
/src/angleTransform.cpp
C++
cpp
4,076
no_license
#include <ros/ros.h> #include <tf/transform_listener.h> #include <tf/tf.h> #include "math.h" #include <sstream> #include <vector> #include <stdio.h> #include <sensor_msgs/Imu.h> #include <time.h> double x_origin, y_origin, z_origin,previousTime; std::vector<double> imu_x,imu_y,imu_z,imu_vel_x,imu_vel_y,imu_vel_z,x,y,z...
65ed6a4c396419f3e254843f69dab7e9c5d64846
1655c0e2d807eeef836f4417e29ad73fa441f1d4
Wednesnight/lostengine
/source/lost/application/linux/Window.cpp
C++
cpp
6,047
permissive
/* Copyright (c) 2011 Tony Kostanjsek, Timo Boll Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
64b89d6c44a5a806d499a7741cba018dcdf4d426
025b362d1094b0d7ad1e4eac415b2f4fa7047f83
01office/DesignPatterns
/DesignPatterns/product.hpp
C++
hpp
449
no_license
// // product.hpp // DesignPatterns // // Created by heyong on 16/8/14. // Copyright © 2016年 heyong. All rights reserved. // #ifndef product_hpp #define product_hpp #include <stdio.h> class Product { public: virtual ~Product() = 0; protected: Product(); private: }; class ConcreteProduct: publi...
cb2baa874c7ce7550bbfb850db5b6da05f8935fe
d8fc5e580a98f76233f01fdc4d7987311f78ee45
xiaoyichao/anyq_paddle
/paddle/fluid/inference/analysis/data_flow_graph_to_fluid_pass_tester.cc
C++
cc
1,479
permissive
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requir...
85485a7806dcd7f130e9700ab7b7da1d18ac7a0b
1d86201b8f48eba32d9bef84dcceeda49ed249f6
xiaoDongSky/PSUAVT_ADAS_2017
/VehicleDetectionTracking/object.cpp
C++
cpp
363
no_license
#include <opencv2/opencv.hpp> #include "objects.h" object::object(const cv::Rect &_boundingBox, const std::vector<cv::Point2f> &_corners, const int &_lastSeenIndex) { boundingBox = _boundingBox; center = cv::Point2i(boundingBox.x + boundingBox.width / 2, boundingBox.y + boundingBox.height / 2); corners = _cor...
c8e514e53facfe3b3c7a3fd16c686f554034aff8
39aa0128459a9949d7766dbda0232d42f9e7a4f7
kelleyrw/AnalysisTools
/CMS2Tools/src/CMS2Tag.cc
C++
cc
1,049
no_license
#include "AnalysisTools/CMS2Tools/interface/CMS2Tag.h" #include "CMS2/NtupleMacrosHeader/interface/CMS2.h" #include <string> #include <vector> #include "boost/lexical_cast.hpp" #include "AnalysisTools/RootTools/interface/RootTools.h" #include "AnalysisTools/LanguageTools/interface/LanguageTools.h" namespace at { /...
bab0f8b8209e0e0d19a66dcaf59e8005829fbb73
750f0d77cffb153c9c13cce0e9ce39531fd9873a
ChenTanyi/DataStructIn2015
/OJ/1236.cpp
C++
cpp
939
no_license
#include <iostream> #include <vector> typedef std::pair<int,int> PII; const int inf = ~0u >> 2; const int check = 1e7; int main(){ int n, m, start, end; std::cin >> n >> m >> start >> end; std::vector< std::vector<PII> > v(n + 1); for (int i = 0 ; i < m ; ++ i){ int x, y, w; std::cin >> x >> y >> w; v[x].p...
d037704220f95e8739ec1924aad35492f796fa5a
3c356b77f964868b3958bb9f51b801f027cfffab
Nozomi-Takemura/Cpp_primer_5th_exercises
/3/ex3_1.cpp
C++
cpp
228
no_license
#include <iostream> using std::cout; using std::endl; int main() { int sum = 0; int cur = 50; while ( cur <= 100) { sum += cur; cur++; } cout << cur << ", sum: " << sum << endl; } // 25*150 = 750 + 3000 + 75 + 51+99
4dcbc0a19895d64d389b30144d27b82d693f6914
bb695769d24f624570db98adc95f742653eea576
nickyfieu/CodePain
/Game/Commands.cpp
C++
cpp
21,069
no_license
#include "CodePainPCH.h" #include "Commands.h" #include "GameObject.h" #include "Logger.h" #include "Components.h" #include "InputManager.h" #include "AudioLocator.h" #include "BubbleBobbleAudio.h" #include "GameManager.h" #include "SceneManager.h" #include "ResourceManager.h" #include "InputHandler.h" #include "Observ...
1b2436bf91f94deb5cdd7c8d7526f030a0122e13
0902cf6ff3c8c87d1e93bf54cb66344a4be1e058
ttyang/sandbox
/sandbox/libs/shmem/doc/code/doc_scoped_ptr.cpp
C++
cpp
2,645
no_license
#include <boost/shmem/named_shared_object.hpp> #include <boost/shmem/smart_ptr/scoped_ptr.hpp> using namespace boost::shmem; class my_class {}; class my_exception {}; //A functor that destroys the shared memory object template<class T> class deleter { private: //A typed...
148bea7acb9cef84b8e3e08eb98250bac8273815
5515d0c66ed5832a4e5081c95c684028ac503817
VadimKutovoi/sst-elements
/src/sst/elements/memHierarchy/cacheController.cc
C++
cc
28,340
permissive
// Copyright 2009-2019 NTESS. Under the terms // of Contract DE-NA0003525 with NTESS, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2019, NTESS // All rights reserved. // // Portions are copyright of other developers: // See the file CONTRIBUTORS.TXT in the top level directo...
d77c849d2104a9f167f38b723062e91f0a097d46
2a3bb3a3b9be653e620184074fab8155c7901b6d
shader-slang/slang
/source/compiler-core/slang-test-server-protocol.cpp
C++
cpp
1,787
permissive
#include "slang-test-server-protocol.h" namespace TestServerProtocol { static const StructRttiInfo _makeExecuteUnitTestArgsRtti() { ExecuteUnitTestArgs obj; StructRttiBuilder builder(&obj, "TestServerProtocol::ExecuteUnitTestArgs", nullptr); builder.addField("moduleName", &obj.moduleName); builder.ad...
d309f112f42a977e3dd91be188ab09f0a90f2758
5ccf2a469dceec8cb0f2718cd9784e3700f76373
dfyz/llvm-project
/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
C++
cpp
28,032
permissive
//===- Loops.cpp - conversion from Linalg named and generic ops to loops --===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...