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
515329ef1d5ecb1d13f0e39f9390947c3755189f
5468f98e6af2c708231ce81a2d582369eec46bb7
QuetzalCoatlus/QuetzalCoatlus
/MyGame/Game/Game_Cleanup.cpp
C++
cpp
368
no_license
#include "Game.h" void Game::Cleanup() { DestroyWindow(); DestroyTextures(); gameEntity->Destroy(); QuitSdlSubSystems(); } void Game::DestroyWindow() { SDL_DestroyRenderer(gameRenderer); SDL_DestroyWindow(gameWindow); gameWindow=NULL; gameRenderer=NULL; } void Game::DestroyTextures() { } void Game::Q...
573d118fea9320713d3888d2c317aefe22e6bc79
a5eb8003beb714a2ff3f7be1535cc5e85cad8cf9
rising-turtle/modules
/Kd_GravityTree/ANN.cpp
C++
cpp
8,845
no_license
/* +---------------------------------------------------------------------------+ | The Mobile Robot Programming Toolkit (MRPT) C++ library | | | | http://mrpt.sourceforge.net/ ...
a712ec0d5c524f3378228e52cba54bbc03d03047
3d2684089d7c2d15383cbfcb641422fcd388bf6f
akashrautela/p3
/Class Work (4-06-19)/2.cpp
C++
cpp
280
no_license
#include<iostream> #include<math.h> using namespace std; int main() { int i,n,limit; cin>>n; limit=sqrt(n); for(i=1;i<=limit;i++) { if(n%i==0) cout<<i<<" "; } for(i=limit;i>=1;i--) if(n%i==0) cout<<n/i<<" "; return 0; }
9562d59ab181a9e89f81059534225e582e27c3b2
b5a28a5fb8d92eb5890a172d66643c2946084d23
Julian-guillermo-zapata-rugeles/proyectoInformatica
/proyectoInformatica/enemigoGigante.cpp
C++
cpp
3,082
no_license
#include "enemigoGigante.h" void enemigoGigante::asignarCaracteristicas() { sonido->stop(); sonido->setMedia(QUrl("qrc:/multimedia/suspensoCreciente.mp3")); sonido->play(); short int aleatorio = 1+rand() %10; //aleatorio=0; if(aleatorio%2==0){ setPos(1300,530); this->direction=...
9afb251d6dd612680e3495a3d0989c132d0eb7f8
b8b14e42443804f41bd7a3cd83e017e7eb80f711
ChrisZhang95/Mapper
/libstreetmap/src/m2.cpp
C++
cpp
87,842
no_license
#include "m1.h" #include "m2.h" #include "m3.h" #include "StreetData.h" #include "draw_feature.h" #include <cfloat> #include "LatLon.h" #include <sstream> #include "OSMDatabaseAPI.h" #include "constants.h" #include <math.h> #include <map> #include <unordered_map> #include <vector> #include "easygl/graphics.h" #include...
20feb144cbdb1ffbd1241d8fcb5a46c8660ffb9f
7a8f2e7dc8f87175bf5cc32546611e858f2f4647
GambetaClub/CIS-221-82A---1.Statistician
/stats.cpp
C++
cpp
4,895
no_license
// Provided by: ____________(your name here)__________ // Lab: ____________(the lab number here)________ // Course number: ____________(the course number here)________ // FILE: stats.h // CLASS PROVIDED: Statistician // (a class to keep track of statistics on a sequence of real numbers) // This class is...
a1368fc7d495f2b7d5c0cb22f5dc1a11eb70e24d
5982d29963e64c546cbab88859508efbfba24f26
brmcfarland/vaa3d_tools
/released_plugins/v3d_plugins/neuron_tile_display/neuron_tile_display_plugin.cpp
C++
cpp
62,696
permissive
/* neuron_tile_display_plugin.cpp * This Plugin will tile neuron to display * 2014-10-28 : by Hanbo Chen */ #include "v3d_message.h" #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <algorithm> #include <QApplication> #include <QTime> #include <cmath> #include "neuron_tile_displ...
6b5bac1547337b19066c9a2c80f01a2cd403a0ef
7546c7d35f0a1301e70760ab535b289a5d5123f9
MelvinG24/dust3d
/thirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/src/tbbmalloc/backend.cpp
C++
cpp
56,702
permissive
/* Copyright (c) 2005-2016 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable la...
c392953d15dfd5835a7b223043e15b47977560dc
44f8d317b7c0716ed0ba5300d68b6e7d96780e63
911gt3/tensorflow
/tensorflow/compiler/xla/mlir_hlo/gml_st/transforms/peeling/peeling.cc
C++
cc
7,785
permissive
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
14b78ea25a8dc36d9c4c5c2a484c53041be8395d
db0c1c2f9cdd6088a9911eeea390478ccf4e6daa
Rakib-31/Algorithm
/bellman.cpp
C++
cpp
1,641
no_license
#include<bits/stdc++.h> using namespace std; #define INF 1000000 struct edges { int u, v, w; void set(int a, int b, int c) { u = a; v = b; w = c; } }; vector<edges> g; int dist[100], n; bool bellmanFord(int s) { dist[s] = 0; for(int i = 1; i < n; i++) { ...
af5a6827e7b8f3346236411998ae7036186ddf34
a2fa0fa6efcfc7cbb67e2607b3867ba4c5618735
iomeone/CSGOCheat
/CreateMove.cpp
C++
cpp
4,128
no_license
#include "HookManager.h" #include "InterfaceManager.h" #include "AntiAim.h" #include "Aimbot.h" #include "EPrediction.h" #include "BunnyHop.h" #include "Menu.h" #include "MovementFix.h" #include "MiscFunctions.h" #include "LowerBodyTimer.h" #include "LagFix.h" #include "SecurityUtils.h" #include <intrin.h> bool Rese...
2b0fd0ca54cfe8aa29fbc6e7727ae0a616b156fd
7eb2980ff2e61c7a90cf344fafb3ecbc1fa7fd67
melton1968/PEGTL
/include/tao/pegtl/internal/peek_mask_uint8.hpp
C++
hpp
960
permissive
// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ #ifndef TAO_PEGTL_INTERNAL_PEEK_MASK_UINT8_HPP #define TAO_PEGTL_INTERNAL_PEEK_MASK_UINT8_HPP #include <cstddef> #include <cstdint> #include "../config.hpp" #include "input_pair.hp...
675910dc1171d14d4bf5d9a68eee42c21944196d
07fe20974b2556b39523be1a04c88baa3f3fc79f
voidarg/Dumbduino
/PositionRequest.cpp
C++
cpp
867
no_license
// // // #include "ErrorCodes.h" #include "RequestReader.h" #include "RobotControl.h" #include "PositionRequest.h" #include "Diagnostics.h" void PositionRequest_P::clear() { step = 0; motor = 0; } ResultClass::ResultCode PositionRequest_P::process() { Result.reset(); if (RequestReader.getReadStatus() == Reques...
702fca5e68afa3a23fb4c80cf5acd8f969ab2272
82e8228f61d35636dfabe8e2e1ce82b5ec0b9115
tktk2104/TktkDirectX12GameLib
/TktkDirectX12GameLib/TktkDX12WrappingLib/src/TktkDX12Wrapper/Resource/Buffer/Constant/ConstantBufferData.cpp
C++
cpp
2,133
no_license
#include "TktkDX12Wrapper/Resource/Buffer/Constant/ConstantBufferData.h" #include <algorithm> #ifdef _DEBUG #include <stdexcept> #endif // _DEBUG namespace tktk { ConstantBufferData::ConstantBufferData(ID3D12Device* device, const CopySourceDataCarrier& constantBufferData) { // GPUアクセスに特化したヒープを作る(シェーダーが使用する) D3D...
bc8e266fab8ea107763fcb527d58bfa7dd8133d4
98ed5272e4f32f833dee65c646deb60712ef0a70
dmkorolevskii/OOP
/w8/lab/SavingsAccount.cpp
C++
cpp
1,028
no_license
// Header implementation file. Contains implementation of 3 member functions, including constructor // File SavingAccount.h // Date: 2018/02/26 // Author: Dmitrii Korolevskii #include <iostream> #include "SavingsAccount.h" namespace sict{ // 2-arg constructor. Stores rate and sets balance // SavingsAccount::Saving...
260caa63cf3670106e851be73e0adfe99a58fe33
ebb845fc1bd3c036fd7ef255740d2d33de446dfc
SREERAGI18/chromium
/components/favicon/core/favicon_database_unittest.cc
C++
cc
54,563
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 <stddef.h> #include <algorithm> #include <vector> #include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/...
e8028baa753d8b5b6d5898581d12e042c5fcf120
4c2b6a3fea65577330972f9c7efc3c5b5f1b0588
jostor/rugemaskin
/src/menu.cpp
C++
cpp
5,919
no_license
#include "menu.h" #include "global.h" #include "TimeHandling.h" #include <WProgram.h> #include <avr/pgmspace.h> #include <Fat16.h> #include <Fat16util.h> // use functions to print strings from flash memory #include <FiniteStateMachine.h> #include <DS1307RTC.h> const byte NUMBER_OF_STATES = 4; State Main = State(prin...
2809d194c739cf49ffcc2dfdd90e861f8efe5333
33cfd0fee0aeb6606340c5d4cf383bd06dd22aaa
prtik147/codechef
/PRTITION1.cpp
C++
cpp
2,026
permissive
#include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <climits> #include <string> #include <utility> #include <map> #include <set> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; #define val(x) cout<<#x<<" "<<x<<endl; #define ...
b3a199edfec60edb7c7721fe7e66cf0a5a1c81d0
28b63ea3feaefd6bb0a43e31d153a7dcdb726547
pkxpp/Study
/code/visualstudio/vs2005/Visual Studio 2005/Projects/base/base/SourceCode/Engine/File/FilePath.cpp
C++
cpp
16,854
no_license
//--------------------------------------------------------------------------- // Sword3 Engine (c) 1999-2004 by Kingsoft // File: KPath.cpp // Date: 2000.08.08 // Code: WangWei(Daphnis) // Desc: File Path Utility //--------------------------------------------------------------------------- #include "Precompile.h" #ifde...
6e4dba9903649940986ba46c9837d039a89df163
64eac35b9b6be1b18f2824a4b52fe383bfcf944d
ChaosExplorer/programming-lib
/SOAP/MetaCommon.cpp
C++
cpp
39,228
no_license
/* * Common.cpp * * Created on: 2012-6-14 * Author: Haosen Chen * Mail : chenhaosen@genomics.cn */ #include "MetaCommon.h" #include "Logger.h" namespace MetaPreProcessTool { bool isSequence(const string &seq) { if (seq.empty()) return false; for (int i=seq.size()-1; i>=0; --i) { switch (...
087bf0c189d9b85d7854e3941afc6b17f8f698cf
af037e99f5e6cdb192f2f9999d02ada26e039cb8
libletlib/libletlib
/libletlib/operations/libletlib_binary_or.hpp
C++
hpp
21,531
permissive
// Copyright (c) 2020-2021, Ville Rissanen // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this // lis...
8eaff77d2236e91bb828e711a5efb9ca91285933
cde63a6505d2d443a5e0822c58e19f8e0ef9deda
zcsd/EyeTracking
/app/src/main/jni/com_ntu_zc_eyetracking_NativeClass.cpp
C++
cpp
563
no_license
#include <com_ntu_zc_eyetracking_NativeClass.h> JNIEXPORT jint JNICALL Java_com_ntu_zc_eyetracking_NativeClass_convertGray (JNIEnv *, jclass, jlong addrRgba , jlong addrGray){ Mat& mRgb = *(Mat*)addrRgba; Mat& mGray = *(Mat*)addrGray; int conv; jint retVal; conv = toGray(mRgb, mGray); retVal...
fc483bc93e08536d9c6c0e3eff7d74e3ef6ca826
54f464ea57f2f87837bb6f42bb360204eb21f2a2
Chreschtf/open_spiel
/open_spiel/public_states/public_states.cc
C++
cc
8,747
permissive
// Copyright 2019 DeepMind Technologies Ltd. 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 require...
dfb68450a16af890d548cd84c8d60f10325fa7be
ca1c054a4a0e40e8884087b1314aeafc45fc535d
fmrico/Fast-RTPS
/src/cpp/Domain.cpp
C++
cpp
11,867
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...
816702d74b22eaa58f7d2819fae6105146ca58e3
5781591c94095b5cadc40060131423165e8cb960
oscardhc/DS_STLite
/STLite/map.hpp
C++
hpp
21,476
no_license
/** * implement a container like std::map */ #ifndef SJTU_MAP_HPP #define SJTU_MAP_HPP // only for std::less<T> #include <functional> #include <cstddef> #include <iostream> #include "utility.hpp" #include "exceptions.hpp" namespace sjtu { template < class K, class T, class Compare = std::less<K...
a3ab6dd565195eb3616fa3d8868e440d9ae7390e
156e14226431f6d7d46e331f47363b4ee5e9fc10
BetterWang/g4e
/resources/erhic/extractor.cc
C++
cc
14,818
no_license
// // c++ -o extractor extractor.cc // // // FIXME: for now for outgoing electron side it is easier just to // change rotation angles by hand in the output file; // #include <vector> #include <map> #include <string> #include <math.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h>...
0539aaff6064f7cb14bfa70c4bd06e69ebdbe360
add9460abc3784a76cca69a26d42ce7d2f2a065e
kuningfellow/Kuburan-CP
/yellowfellow-ac/UVA/608/11983504_AC_10ms_0kB.cpp
C++
cpp
1,979
no_license
//608 Counterfeit Dollar #include <stdio.h> #include <string.h> #include <iostream> using namespace std; int main() { int tc; cin>>tc; while (tc--) { char left[3][50]; char right[3][50]; int rel[3]; char s[500]; for (int i=0;i<3;i++) { scanf("%...
264c14acb3977ce40abe78c5c7227980bd8ab85e
f350cee15985567c043719a69e94e582c1f13350
dke-knu/i2am
/JXIO/src/c/src/CallbackFunctionsClient.cc
C++
cc
3,124
permissive
/* ** Copyright (C) 2013 Mellanox Technologies ** ** 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 applicab...
5c9f5c2929c07c88bc78b8ba62815c390b3c7ac7
6ff4fb137e12dcb5c547298741c2232a33622b93
LONGZR007/IAP-STM32
/5.Bootloader应用示例/App-FreeRTOS+emXGUI综合桌面_5寸_7寸/User/app/Board_App/nes/InfoNes/InfoNES_v0.97J_RC1/mapper/InfoNES_Mapper_049.cpp
C++
cpp
8,807
no_license
/*===================================================================*/ /* */ /* Mapper 49 (Nin1) */ /* */ /*==============================...
d3c7ec22f1d4baebd141cb561fdb8d9425df77f2
040dcca9c401f659c23da8d06b163a8c96ae84ed
piotr-skotnicki/tc-optimizer
/src/slicing.cpp
C++
cpp
17,649
no_license
#include "slicing.h" #include "utility.h" #include "debug.h" #include "transitive_closure.h" #include "options.h" #include <isl/ctx.h> #include <isl/set.h> #include <isl/map.h> #include <isl/id.h> #include <cstddef> __isl_give isl_set* tc_uds_set(__isl_keep isl_map* R) { isl_set* uds = isl_set_subtract(isl_map_d...
dcf6f15431292981f898eef3c471d1dbc915843f
ae3baeec0bd4f581d0f17bfebe7cfa9bd9a5edc3
kaanguru/chromium
/content/test/test_render_frame.cc
C++
cc
16,557
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/test/test_render_frame.h" #include <string> #include <utility> #include <vector> #include "base/bind_helpers.h" #include "base/optiona...
1d946a39e064454a965cb7d502f2cecee33d5794
2eef2cb361853736e40aee66cb3a81e09a79d5f1
JohnyDevelop/testGitCpp
/testGit/Main.cpp
C++
cpp
394
no_license
#include <iostream> #include <conio.h> #include "MyMath.h" using namespace std; int main() { cout << "Hello world" << endl; cout << "New commit" << endl; cout << MyMath::Operations::sum(10, 2) << endl; cout << MyMath::Operations::sub(10, 2) << endl; cout << MyMath::Operations::mult(10, 2) << endl; cout << MyMa...
394abb834131b08d28b6a47437d9abca517533d8
bf157296a61dff029a7c50d91bb951cda1db512c
entrlove/mblsoc-1d
/src/fc.cpp
C++
cpp
1,349
no_license
////////////////////////////////////////////////////////////////////////// /// COPYRIGHT NOTICE /// Copyright (c) 2016, Swinburne University of Technology /// All rights reserved. /// /// @file fc.cpp /// @brief 计算阶乘数和组合数 /// /// 计算小整数范围的阶乘和组合数 /// /// @version 1.1 /// @author 曹业 /// @date 2016年8月1日...
3793442622b92ef8e8aba83820477bf790fb3083
2aa8c5c41776a9e56b8157b527ec827362ab3fb1
rdkcentral/Thunder
/Tests/unit/core/test_weblinktext.cpp
C++
cpp
7,017
permissive
/* * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * * Copyright 2020 Metrological * * 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 ...
42cde0043dc07e72b52e701408ea7c95dfaaca62
ec64188260dc9a4d8dfe55a976a8b136ef3a3e13
CrazyIEEE/algorithm
/OnlineJudge/LeetCode/第1个进度/594.最长和谐子序列.cpp
C++
cpp
1,580
no_license
/* * @lc app=leetcode.cn id=594 lang=cpp * * [594] 最长和谐子序列 * * https://leetcode-cn.com/problems/longest-harmonious-subsequence/description/ * * algorithms * Easy (45.39%) * Likes: 75 * Dislikes: 0 * Total Accepted: 8.1K * Total Submissions: 17.7K * Testcase Example: '[1,3,2,2,5,2,3,7]' * * 和谐数组是指一...
c2d8aae5485db0e58aa84ad21db0438f445229b4
823bd4f5da69fe06dcc5d362209cadc9f6132aba
harigovindan/Hackerrank-Solutions
/beautiful binary strings.cpp
C++
cpp
238
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int n,c=0; string a; cin>>n; cin>>a; int i=0; while(i<a.length()){ if(a[i]=='0'&& a[i+1]=='1'&& a[i+2]=='0'){ c++; i+=3; } else{ i+=1; } } cout<<c<<endl; }
1c73caf9fbf758e1c3b1af11f84a1db6574ac680
d35bd12e4d51d554439966d1f039cc482c5f5c1f
Rajpratik71/compute-runtime
/shared/source/helpers/blit_commands_helper.cpp
C++
cpp
6,687
permissive
/* * Copyright (C) 2019-2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/blit_commands_helper.h" #include "shared/source/helpers/timestamp_packet.h" #include "shared/source/memory_manager/surface.h" namespace NEO { BlitProperties BlitProperties::constructPropertiesFor...
3b7cf2c90169173b11ff1957a51df4f193d17b10
475d28129c83b620ec9611ab4eda21c2032fbb9d
ymd104/atcoder
/abc122b.cpp
C++
cpp
779
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0; i<n; i++) typedef long long ll; typedef long long unsigned int llu; ll MOD = 1000000007; ll INF = 1000000009; void solve(){ string s; cin >> s; int n = s.length(); string ans = ""; rep(i,n){ for(ll j=1; j<=n-i; j++){...
fa68d427043e1b1eec0460064698ccb2bbb1ebb6
0b03881e2aaedbb2606defb9f1ed05392e4d1c35
lmmartine/DomainModelsRepositories
/CommObjectRecognitionObjects/smartsoft/src-gen/CommObjectRecognitionObjects/CommObjectRecognitionInformationCore.hh
C++
hh
3,162
permissive
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
bd105905939aa29a58eb1ec7af3565c770b75edd
f44f0a8f867e788f3cefb610887f0b7dbf8afa6a
arcosuc3m/grppi
/unit_tests/mpmc-queue.cpp
C++
cpp
4,767
permissive
/* * Copyright 2018 Universidad Carlos III de Madrid * * 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...
df16908de4a9b001ab8392d50f03d08a14c0da1e
cae09a3eb2cf9e7ffb1629856a22ca0d53033c84
Anternt/Aleksey-Riabov
/lab4/main.cpp
C++
cpp
4,426
no_license
#include "Program.h" #include "List.h" void menu(); int main() { setlocale(LC_ALL, "Rus"); menu(); if (_CrtDumpMemoryLeaks()) cout << endl << "Есть утечка памяти." << endl; else cout << endl << "Утечка памяти отсутствует." << endl; return 0; } void menu() { CList list; //список элементов C_Program getPr...
fdbf91ad9a7eed5082ce1b10ca6711fdb563c751
ef3c0dc2cf9d0987552e989f26cef1b1c2c8b762
yedidyakorn/4-in-a-row
/Source.cpp
C++
cpp
900
no_license
#include <iostream> #include <windows.h> #include "board.h" using namespace std; board welcome() //starts a game, bulids a board { system("Color 0A"); int row, col; cout << "welcome to 4 in a row game! \n choose number of rows:\n"; cin >> row; cout << "choose number of colums: (betreen 2-10)\n"; cin ...
ba6f987edbdbea4324322543772a4b00d72c9949
c4897967428d804a771341bdbcf74be84e77d999
kapkunal/color
/test/test_color.cpp
C++
cpp
764
permissive
#define CATCH_CONFIG_MAIN #include <catch/catch.hpp> #include <color/color_checker.hpp> #include <color/color_space_rgb.hpp> #include <color/rgb.hpp> #include <color/spd_conversion.hpp> TEST_CASE("BabelAverage spectral to u8 sRGB matches", "[color]") { auto xyz = spd_to_xyz(color::Illuminant::D65, color::ColorSp...
bc4ad9d8b82019e280bf5ad1d0a8d1f216ca24da
b1c46f8725f1267b2be83515e0afe13c7c5f9af6
chancheukkitjeffrey/courseproject
/managementsys.cpp
C++
cpp
7,225
no_license
#include <iostream> #include <string> #include <vector> #include <ctime> #include "Employee.h" using namespace std; int choice; // The option selected in main menu bool same; // Bool to determine if a randomized ID is taken. True ==> yes is same, False ==> no not same long tempID; // Store an ID generated by the rand...
3dc0d86d05559a713820608bc6f8f2f1ba4bc4fd
3b845d2c237114c8deea546aca6936806a81628d
zucl/bassoons
/Queue.hpp
C++
hpp
2,344
no_license
// HW9/10: Template Queue Class // Peter Hurford and Bryan #include <iostream> #include <sstream> using namespace std; template <typename T> int Queue<T>::enqueue(T & x) { // define enqueue method // pre: queue size does not exceed max size // post: inserts an element x into the queue using the doubly linked list'...
eae1a57710e71148494e8f1644edccb5f3fabf00
2657a6dd40dcc48c0037afc561ce525835ea6c08
isoundy000/cocosclient
/external/libcocos3dx/Particles/CC3ParticleEmitter.cpp
C++
cpp
18,346
permissive
/* * Cocos3D-X 1.0.0 * Author: Bill Hollings * Copyright (c) 2010-2014 The Brenwill Workshop Ltd. All rights reserved. * http://www.brenwill.com * * Copyright (c) 2014-2015 Jason Wong * http://www.cocos3dx.org/ * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software...
9d6551126060c2531db3a50ed1145dd12d4ab03f
677b872d1ef083d77321f8aa1a45b11ae628bba7
ric2b/Vivaldi-browser
/chromium/components/policy/core/browser/url_blocklist_policy_handler_unittest.cc
C++
cc
11,742
permissive
// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/policy/core/browser/url_blocklist_policy_handler.h" #include <memory> #include <utility> #include "base/strings/string_number_conversions.h" #include "ba...
0b4e6f56e5da32f8dab329c8d51f13950420290d
748465ffd8b2dd790e7944a72916dfbacbe26df4
Duy-Phuong/CTDL
/1512418_tuan7/1512418_BT1/main1.cpp
C++
cpp
610
no_license
#include "thuvien1.h" int main() { Tree t; Init(t); int a[] = { 18, 13, 37, 15, 23, 40}; for (int i = 0; i < 6; i++) { InsertNode(t, a[i]); } cout << "LNR: "; Print(t); int x, y; cout << "\nnhap phan tu can tim: "; cin >> x; NODE* q = Search(t, x); if (q == NULL) { cout << "\nkhong tim thay phan tu...
1785a024afe8fc51400148bb727b8f2d0f65bffd
487f05ad3fd5a656cac04e52392e9788513328e5
HiroSatou/Thorcoin
/src/qt/signverifymessagedialog.cpp
C++
cpp
8,782
permissive
#include "signverifymessagedialog.h" #include "ui_signverifymessagedialog.h" #include "addressbookpage.h" #include "base58.h" #include "guiutil.h" #include "init.h" #include "main.h" #include "optionsmodel.h" #include "walletmodel.h" #include "wallet.h" #include <string> #include <vector> #include <QClipboard> Sign...
c7eccdc64e9ac46a4451c6f17a54649bda3c3119
49516691c0ee1d9afa2ebb0262466fe1f47786f0
emptyland/mai
/src/lang/bytecode.cc
C++
cc
5,569
no_license
#include "lang/bytecode.h" #include "lang/mm.h" #include "base/slice.h" namespace mai { namespace lang { const BytecodeDesc kBytecodeDesc[kMax_Bytecodes] = { #define DEFINE_BYTECODE_DESC(name, kind, ...) \ {BytecodeTraits<k##name>::kId, BytecodeTraits<k##name>::kType, BytecodeTraits<k##name>::kName, \ {__VA...
4c99dfa2803ddf3cdf775f9a344729e6bb78b08d
fd8ec3ca2e124c9b2afe3d30318828f651c59ab6
alibaba/heterogeneity-aware-lowering-and-optimization
/tests/unittests/lit_cases/test_eigen/test_reshape_reduced_dims_eigen.cc
C++
cc
2,041
permissive
//===-test_reshape_reduced_dims_eigen.cc-----------------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtai...
45c3ba450bccf90d6221a9b32fdce326bd648b8d
a56ed0ee92f7dc7814858aadb243ba90d0129cbf
lhynn/Project-Tracking
/JPTZ-4轮终端_7_13/Sec_Terminal/searchdir.cpp
C++
cpp
1,136
no_license
#include "searchdir.h" #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent.h> #include <string.h> LLIST *mySearchDirFun(char *str,char *fileType){ LLIST *handler; T_MyFileSt tmp; int len = 0,count = 0; struct dirent **namelist; int n,i; handler =...
92b6db144cbb43f5dd2c9fb0ba418147c040cee1
6e23a0a6c3ab7ee451505ff1120247540d336b9d
nishgpt/competitive_programming
/codeforces/practice/727C.cpp
C++
cpp
1,855
no_license
/* Author : Nishant Gupta 2.0 */ #include<bits/stdc++.h> using namespace std; #define LL long long int #define getcx getchar_unlocked #define X first #define Y second #define PB push_back #define MP make_pair #define MAX 100005 #define LOG_MAX 20 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL (LL(1e18)) #...
e3b12122117074fdc55231796f90d51af234dc0c
c54e6f095305a338f39bc3d9a7695b6ce2ee0514
yunxinzhang/algForRec
/00_leetcode/112_path_sum/test.cpp
C++
cpp
610
no_license
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: bool hasPathSum(TreeNode* root, int sum) { if(!root) return false; if( !root->left && !root->right && root->val ...
6126c3afcf7dd768325f895480080825f5f107e6
3d8027a56f79259d6a6d158574a3b0385347a6a2
juarezpaulino/coderemite
/problemsets/Codeforces/C++/B236.cpp
C++
cpp
5,139
permissive
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #include <bits/stdc++.h> using namespace std; #define eb emplace_back #define mp make_pair #define mt make_tuple #define fi first #define se second #define sz(v) ((int) (v).size()) #define all(v) (v).begin(), (v).end() #define ms(x...
0fd30b02f9ec83cf3042b4aab2747dbd3ad99b08
afaa5dc8bfe6457c3c9d8b8718ce22cfcd38cdba
jaydeep-bagthariya/Dynamic-Programming
/_0_1_KNAPSACK/0_1_knapsack.cpp
C++
cpp
1,144
no_license
#include<bits/stdc++.h> using namespace std; int knapSack(int W, int wt[], int val[], int n, vector<vector<int>>&dp) { if(n==0 || W==0) return 0; if(dp[n][W]!=-1) return dp[n][W]; if(wt[n-1]<=W) { return dp[n][W]=max(val[n-1]+knapSack(W-wt[n-1], wt, val, n-1,dp),knapSack(W,wt,val,n-1,dp)); ...
ec688ce12d61ddd9be9cd2f04116b8f08a101738
cc5fc2cbe7e1f70c8e624c7c94d12725bc1a1fec
1nthemist/Proyecto-B33733-y-B03843
/Proyecto B33733 y B03843/Proyecto B33733 y B03843/OperadorSuma.cpp
C++
cpp
448
no_license
#include "stdafx.h" #include "OperadorSuma.h" OperadorSuma::OperadorSuma() :Operador(){ } OperadorSuma::~OperadorSuma(){ } int OperadorSuma::compareTo(Elemento * otro) { int cmp = -1; // No es necesario compararlo, siempre devuelve un -1. return cmp; } void OperadorSuma::imprimir(ostream& out) const { out << '...
f0218f6942b10f3a6d6461d8008f10047c4d9352
d2f2dce8470b787df839a7ac663345e8274b17e9
andreavs02/EjemplosC_Cpp
/EjemploFuncion2.cpp
C++
cpp
1,213
no_license
#include<iostream> using namespace std; #define SIN_TIPO string void Saludar(); float calculardoble(float num); void triplicar(float &num); // funcion que no recibe ni devuelve nada void Saludar() { cout << "Hola mundo!" << endl; } // funcion que recibe un argumento por valor, y devuelve su doble float calcula...
0f35ab0fd45e1cf0ca0d1172b3a5a90b94b278b6
87ed986a6f72436fd61e711f4dd92361ca5060ae
tahsinsoha/Problem-solving-
/Codeforces/k-multiple free set.cpp
C++
cpp
348
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int n,k,inp,out; vector<long long int>v; set<long long int>s; cin>>n>>k; for(int i=0;i<n;i++){ cin>>inp; v.push_back(inp); } sort(v.begin(),v.end()); for(int i=0;i<n;i++){ int p = v[i]; if(s.find(p/k)==s.end() || p%k!=0) s.insert(p); } cout<<s.s...
355f3fff7b6b4666aa7d3ee05246d7d3702097cd
08ecc9b010f755b21eccd6f335c4075300067499
Jooye0n/Algorithm
/BAEKJOON/5427.cpp
C++
cpp
2,561
no_license
/* https://www.acmicpc.net/problem/5427 */ #include <cstdio> #include <iostream> #include <queue> #include <string> #include <memory.h> using namespace std; struct point{ int x; int y; }; int n,m; char arr[1002][1002]; bool chk[1002][1002];//상근이 queue<point> q;//상근이 queue<point> fire; int T; int dx[4] = {0...
5cbd72a0ed92eeb1ed122b85e088e58578dfa3aa
9fdc7e6c03925ee8bca3abb4fa773ae619fe9be0
kamarush/TCL_POP8
/mediatek/custom/mt6582/hal/camera/camera/ae_tuning_custom.cpp
C++
cpp
15,016
no_license
#include "camera_custom_types.h" #include "camera_custom_nvram.h" #include "ae_feature.h" #include <aaa_types.h> #include "camera_custom_AEPlinetable.h" #include "awb_param.h" #include "ae_param.h" #include "ae_tuning_custom.h" AE_PARAM_T const& getAEParam() { static strAEParamCFG g_AEParasetting = { ...
7b0cb1488c3e054f8e82396f32961e7d53b2af6e
4ea94c7d332bc84fbe113e3ffe909cf1f27ce578
ajweeks/FlexEngine
/FlexEngine/dependencies/openAL/alc/helpers.cpp
C++
cpp
18,595
permissive
/** * OpenAL cross platform audio library * Copyright (C) 2011 by authors. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option)...
1c1052f55ebf17ed6ae94c11aaab3c4c6a137cf8
bafb4c3e26fc5fc643bd233ec8940b6f4eb2b3ee
dmehrab06/Time_wasters
/codechef/snack19/1A/AVGMAT.cpp
C++
cpp
5,301
no_license
#include <bits/stdc++.h> using namespace std; int posdiagonal[703][405]; int posdiagsize[703]; int negdiagonal[703][405]; int negdiagsize[703]; int house[303][303]; int ans[703]; char hh[303]; void init(){ memset(posdiagonal,0,sizeof(posdiagonal)); memset(negdiagonal,0,sizeof(negdiagonal)); memset(ans,0,sizeof(a...
b353cc505e43c44f874a19efd26d96427b0c9f84
76da530fed0ba88bdf82d48c2338fd9038540a93
1816013/cocosAction
/MyGame/Classes/EffectMng.cpp
C++
cpp
960
no_license
#include "EffectMng.h" std::unique_ptr<EffectMng>EffectMng::s_Instance(new EffectMng); EffectMng::EffectMng() { } EffectMng::~EffectMng() { } bool EffectMng::AddEffect(const std::string name, float extend, efk::EffectManager* efMng) { auto effect = efk::Effect::create(name, extend); if (emitter.find(name) == e...
86dffa0068497ca7a98428ccabb73abda5130770
3f5a88df93deba6740a4bd3e4854427a2579ccd7
NeoniteDev/Osmium
/Osmium/SDK/FN_FortReplayLensSettingsTab_parameters.hpp
C++
hpp
6,957
no_license
#pragma once // Fortnite (4.5-CL-4159770) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function Fo...
bcb9c5f358c8e9ed21e4bf23ce9a008e5ef25c0a
303f2ba5ea9c7a8e436d5cb027bef15290b6ab0e
marant/magicforest
/magicforest/CLocation.cpp
C++
cpp
2,537
no_license
#include <stdio.h> #include "CLocation.h" #include "IEvent.h" CLocation::CLocation() { // set all routes to null pNorthRoute = NULL; pSouthRoute = NULL; pEastRoute = NULL; pWestRoute = NULL; } CLocation::~CLocation() { /* delete all events from a location */ unsigned int i; for (i = 0; i < Events.siz...
17b958c111f307d1ce0512c6ec0f1cb2b3fba54e
1ddb0eb36ebe3442ec595f9d24d29fb2ff138534
Varad-Kulkarni/C-and-Cpp-programs
/practical5.cpp
C++
cpp
263
no_license
#include<iostream> using namespace std; int a; int b=10; int main() { int c,d; cout<<"\nenter two numbers to add: "; cin>>::a>>c; cout<<"\nenter number to substract by 10: "; cin>>d; cout<<"\naddition is: "<<::a+c; cout<<"\nsubstraction is: "<<d-::b; return 0; }
07b2d2107cfcdff3fd82497d99e0c6bf4ad6cffe
b5862fcd6b0c8b8094d4d432429515a41fa649ce
tadeuzagallo/ChakraCore
/lib/Common/Memory/ArenaAllocator.cpp
C++
cpp
49,606
permissive
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
3b7f958c8ca69e4c767454037d35008d224b7e02
7383a2b5fa7fed6ecdc71c329d76c56d4fdcfcb9
akakimmykim/DataStructures-Alogorithms
/2DSA/graphFinal/heap.cpp
C++
cpp
5,140
no_license
#include <iostream> #include "heap.h" #include "hash.h" //node constructor heap::node::node(std::string tid, int tkey, void* tpData){ id = tid; key = tkey; pData = tpData; } //heap constructor heap::heap(int cap):mapping(cap*2){ capacity = cap; curSize=0; data.resize(capacity+1); //resize heap to } //pe...
43ee7cb28e7748b5d7ff9bcda6b33f2f311979e1
399e36d09d8f923e65bb17e0ff611a27a4199bf8
chromium/chromium
/chromeos/ash/components/network/profile_policies_unittest.cc
C++
cc
24,164
permissive
// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/ash/components/network/profile_policies.h" #include "base/containers/flat_set.h" #include "base/functional/callback.h" #include "base/test/values_test_util....
8e842f331e89bae035773452c75111ea487b0a5b
92312065f97c61dbbac471b739c42947b3a4bbd8
zheng-song/routonQtPro
/01-22-VideoPlayer/WWWNOTE.cpp
C++
cpp
6,308
no_license
/* ***************************************** 修改日期:2016-04-02 进展: 1、可以通过bottomWidget移动窗体 ***************************************** 修改日期:2016-03-29 进展: 1、优化图标 2、添加清空无效记录的功能 ***************************************** 修改日期:2016-03-27 进展: 1、使videoWidget0彻底没有边框 ************************...
75c700b95a2770887648813a5ba7ad3cb53c7a1a
bed8244fa416f02d6d284d071d28f81d36561bd8
dipta007/Competitive-Programming
/COACH/zahin vai/155670/M.cpp
C++
cpp
4,821
permissive
#pragma comment(linker, "/stack:640000000") #include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <map...
cd305ace98945252acf08107cc09f22617201c9e
00df9a71afa2259d446592e8fc92e4fc2ad0aa61
peaceleven/pad
/OCRer.cpp
C++
cpp
4,897
no_license
#include "OCRer.h" namespace pad { OCRer::OCRer() { _n_imgs = 0; _motion = false; _last_n_features = -1; char tessdata_path[] = "/usr/local/share/"; setenv("TESSDATA_PREFIX", tessdata_path, 1); int n_configs = 1; char *tess_configs[n_configs]; char tess_config0[] = "common"; tess_configs[0] = tess_config0;...
30f2c16c965c4b33dabcd14a14505a5162282908
e8a4e40fd13a03c6b02d50bcb4ef8f119aa70961
sirikata/sirikata
/liboh/plugins/sqlite/SQLiteStorage.cpp
C++
cpp
41,704
permissive
/* Sirikata * SQLiteStorage.cpp * * Copyright (c) 2011, Stanford University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the ab...
6bfa53c874969134e9db4fc1651bc2aa6d48ca46
dc4e554cbdb3fe5216b445ff741bd18a3c5fe18a
JohnnyFlight/Random-SFML-Projects
/SFML_test - Copy/SFML_test/NoiseTest.hpp
C++
hpp
533
no_license
#pragma once #include "Application.hpp" #include "Noise.hpp" #include "PerlinNoise.hpp" class NoiseTest : public Application { public: NoiseTest(unsigned width, unsigned height, std::string title); void initialise(); void update(); void draw(); protected: Noise _noise; std::vector<PerlinNoise> _perlin; uns...
6e4196a162eba0fb9c4d1c59b4a7567066498d7a
9beff025b84e174ce78aef29550cadf875332c02
anirudhSK/chromium
/chromeos/system/statistics_provider.cc
C++
cc
11,691
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/system/statistics_provider.h" #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/l...
17531abba995637f5895b47ab6c1201fcc2884b0
f014c642fbd7447010dda679b403f253c665633b
YJBeetle/QtAndroidAPI
/android-30/android/media/MediaParser_ParsingException.hpp
C++
hpp
341
permissive
#pragma once #include "./MediaParser_ParsingException.def.hpp" namespace android::media { // Fields // Constructors // Methods } // namespace android::media // Base class headers #include "../../java/lang/Exception.hpp" #include "../../java/io/IOException.hpp" #ifdef QT_ANDROID_API_AUTOUSE using namespace an...
4876b1d750ffe978494f0d1d8dcd90542941af91
7210f577e279c0f3308df5a9ffa95af6565ad8d0
grabthar/HysteriaCore
/src/server/game/Entities/Creature/TemporarySummon.cpp
C++
cpp
11,450
no_license
/* * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will b...
49b22b1fdfefaaa32fe4358a751c10481990dcd4
cf5da18d7cd9cac121a6abe3afabb7adeba8ad67
gorkinovich/GAGC
/Source/Games/Tetraminoes/TetraminoesManager.cpp
C++
cpp
9,501
permissive
/****************************************************************************** Copyright (c) 2014 Gorka Suárez García 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, incl...
ee5f66369db85aecc04bbdfbe68a95447d2722fc
feeaec2d099c92334357bd53951594ddd610ca7b
ThanhPhongIT/CTDL-GT
/CHUONG4_PHAMVANPHONG.cpp
C++
cpp
2,459
no_license
#include<iostream> using namespace std; struct NODE { int data; NODE* pLeft; NODE* pRight; }; NODE* CreateNode(int x) { NODE* p = new NODE(); p->data = x; p->pLeft = p->pRight = NULL; return p; } NODE* FindInsert(NODE* root, int x) { if (root == NULL) { return NULL; } ...
13c1d7f4e5b7c53d12e26cf2d3872d3f660bab2b
49fb5b5dba96a99b50debda6663b0c0ed7bf7a99
gu9694/LC_Practice
/125. Valid Palindrome.cpp
C++
cpp
766
no_license
class Solution { public: bool isPalindrome(string s) { string res; int len=s.length(); if(len==0||len==1) return true; for(int i=0;i<len;i++) { if(isalpha(s[i])||isdigit(s[i])) { res.push_back(s[i]); } } ...
06ce72faf68a3c7271893879fead3bd1e5e2d72e
774b983c9798cbcd034b4239a270da432612e522
simudream/mimosa
/mimosa/cpu-foreach.hh
C++
hh
406
permissive
#ifndef MIMOSA_CPU_FOREACH_HH # define MIMOSA_CPU_FOREACH_HH # include <functional> namespace mimosa { /** * Will create one thread for each cpu, set the cpu affinity * and execute cb. * * Thread created in cb will by default keep the same cpu affinity. */ void cpuForeach(const std::function<void (...
883f94b26832f06de48198623d9bded247bfb5d0
0d271965e13a0fe955266e88c5fe5e0b599d7985
orosius/loot
/src/backend/helpers.cpp
C++
cpp
14,623
no_license
/* LOOT A load order optimisation tool for Oblivion, Skyrim, Fallout 3 and Fallout: New Vegas. Copyright (C) 2012-2014 WrinklyNinja This file is part of LOOT. LOOT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publishe...
605c67832b49e16295505d0a54d3b32559350624
4e568178a5946be8af4c97aaa6e38875fe397907
arkmohba/design-pattern-cpp-samples
/multithread/thread_specific_storage/classes.hpp
C++
hpp
742
no_license
#include <condition_variable> #include <deque> #include <fstream> #include <memory> #include <mutex> #include <string> class TSLog { private: std::ofstream ofs; public: explicit TSLog(std::string file_path) { ofs = std::ofstream(file_path); } void print_ln(std::string s) { ofs << s << std::endl; } void clos...
89d66468d35c4412398d712e2fe18d95bbf458f0
5d1163621455d714988348d17091cf384797b865
mantranhusc/Lab_oj
/PT025.cpp
C++
cpp
1,298
no_license
//Tong binh phuong khoang cach giua cac cap diem (x,y) #include <stdio.h> #include <stdlib.h> int main(){ int N; long long x, y; unsigned long long s1=0, s2=0, r1=0, r2=0, t; scanf("%d",&N); for(int i=0; i<N; i++) { scanf("%lli%lli",&x,&y); s1 = s1 + x; r1 = r1 + (N+1)*x*x - 2*x*s1; s...
aceed007b15439ccf556952a8ea2295d34aa1765
406bc1d5a4b4e6fc86af113b741025c69db8e5ee
Icay12/LeetCode
/Cpp/791_CustomSortString.cpp
C++
cpp
564
no_license
class Solution { public: string customSortString(string S, string T) { sort(T.begin(), T.end(), [&](char a, char b){ return S.find(a) < S.find(b); }); // cout << S.find('c'); return T; } }; class Solution { public: string customSortString(string S, string T) { unordered_map...
e799490d619008696aa74268b35c939bbddb1499
0d337471e4d0201a6e755f7cb8980d19f2948e80
twpark/lti-autograder
/assignments/DEBUG/AssertionTest1/myfunc.cpp
C++
cpp
1,408
no_license
#include <iostream> #include <cmath> using namespace std; void PrintGreetings() { cout << "+=========================+" << endl; cout << "|/\\/\\Falcon Calculator/\\/\\|" << endl; cout << "+=========================+" << endl; } void PrintByeBye() { cout << "Thank you for using Falcon Calculator!" << endl; } vo...
46a29b4e98751026deb82f71a0825902760e9f36
93d1118856c4342667fdc6766253414648859000
Naronco/Rekd-Engine
/Rekd-Test/Game1.cpp
C++
cpp
11,989
no_license
#include "Game1.h" Game1::Game1() { } void Game1::Init() { { world = new Physics::World(Vector2F(0, 9.8f)); b2PolygonShape shape; shape.SetAsBox(40, 10); b2BodyDef groundBodyDef; groundBodyDef.position.Set(40, 50); groundBodyDef.type = b2_staticBody; ground = world->AddRigidBody(&groundBodyDef); gro...
46db9ed71f47cd59cc0857467be87f5e36230773
98ee0e2bea23b33bd2fa701146a02f45eead2705
tangxiangru/NOIP
/book/每一位之和.cpp
C++
cpp
268
permissive
#include <stdio.h> #include <stdlib.h> void main() { int n=0,ch; while((ch=getchar())!='\n') //用ch保存getchar接收到的输入字符ascii码 { n+=(ch-'0'); //-'0' 是ascii码转数字 } printf("%d",n); system("pause"); }
babc38182781efe858f376ae545807c915beaf75
bb4469ca1dfd9189101a9813477bfdb6e1321862
841661831/perception
/second_cpp/inference.cpp
C++
cpp
42,328
no_license
// // Created by root on 3/23/21. // #include <iostream> #include <map> #include <torch/script.h> #include <torch/torch.h> #include <ATen/ATen.h> #include <vector> #include <string> #include "src/target_assigner.h" #include "src/SparseConvolution.h" #include "src/middle.h" #include "src/rpn.h" #include "src/cnpy.h" #in...
2f577b9fbaa19ac18f142cfaff9dde30c94910cc
891e005dac49f6ae3646e6f0cfbe4cec34191225
LUTLJS/CodeForces
/Div2_A/Coder.cpp
C++
cpp
373
no_license
#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0);cin.tie(0); int n,count=0;cin>>n; string s; for(int r=0;r<n;r++){ if(r&1)for(int l=0;l<n;l++)if(l&1){s+="C";count++;}else{s+=".";} else for(int l=0;l<n;l++)if(l&1){s+=".";}else {s+="C";count++;} s+="...
61016a1fc48ce5e0d712eb76920f2d13c16b2267
73c6653d0c4c4fc826499e50d9878e7aa0680f86
KimHwon/Teamnote
/archive/2021 ICPC - fresh water/code/HLD.cpp
C++
cpp
1,791
no_license
const int MAX; struct SegmentTree{ //query, update시 l > r이 들어올 수 있음. }S; vector<int> adj[MAX]; //입력 필요 int level[MAX]={}, sub_size[MAX]={}, parent[MAX]={}; int DFS_cnt[MAX]={}, dn=0, chain[MAX]={}, tail[MAX]={}; void make_tree(int here, int p){ parent[here] = p; sub_size[here] = 1; for(int &i : adj[here...
8966ce835494b4127dd9af7c1251cf00af1faae7
e22db97731bb5dae822327e4689261f820cc2f57
junming403/Multi-Pivots-Quicksort-Experiment
/cache/optimzed-quick-sort-multiple-pivot-standard.cpp
C++
cpp
9,333
no_license
#include <iostream> #include <vector> #include <stdlib.h> #include <time.h> #include <ctime> #include <map> using namespace std; class Node { public: int key, value; Node *prev, *next; Node(int k, int v): key(k), value(v), prev(NULL), next(NULL) {} }; class DoublyLinkedList { Node *front, *rear; ...
f7a3fcc7c34ccc4742e330242e4b46bb46c38b67
d62b1e5fe236e38d1775a988247c62b1c92b9319
cmt-qo/cm-cRBM
/compute_energies/main.cc
C++
cc
4,246
permissive
//Author: Agnes Valenti. #include <iostream> #include <fstream> #include <vector> #include <cstdlib> #include <cmath> #include <cassert> #include <string> #include <sstream> #include <random> #include <iomanip> #include <limits> #include <ctime> #include <complex> #include "sampler.cc" #include <sys/time.h> //useful...
fb6e9d8e3342be4347663b5dd2c2d63ca6421e28
5a4f13439578a811c926e0646ad14dcea49ec087
worxli/algolab-ethz
/week10/return_of_the_jedi/return_of_the_jedi.cpp
C++
cpp
2,857
no_license
#include <iostream> #include <algorithm> #include <limits> #include <stack> #include <vector> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/kruskal_min_spanning_tree.hpp> #include <boost/tuple/tuple.hpp> using namespace boost; using namespace std; typedef adjacency_list<vecS, vecS, undirectedS, no_p...
ea534df1f007244ce2860b0565b8b30deb9cb69c
624e0cd06d8b7daa14b2a2d2c9d493b6e930675a
alexandraback/datacollection
/solutions_5670465267826688_0/C++/zaskar/C-small.cpp
C++
cpp
1,648
no_license
#include <iostream> #include <fstream> #include <vector> using namespace std; enum quat { ONE=0,I,J,K,MONE,MI,MJ,MK, NONE }; quat tmult [4][4] = { {ONE, I, J, K}, { I,MONE, K, MJ}, { J, MK,MONE, I}, { K, J, MI,MONE} }; quat tabs [8] = { ONE,I,J,K, ONE,I,J,K }; quat tinv [8] = { MONE,MI,MJ,MK, ...
ea70425da375cba5a9721c52748b3a1778c23263
42275f37099e051fa88f2a60391ca3e03f65628e
ChenXiaoFei-CS/Simple-Compiler-In-Experiment
/parseTree.cpp
C++
cpp
14,811
no_license
/********************************************************* * 模块名: parseTree * 文件名: parseTree.cpp * 依赖文件: parseTree.h * 作 用: 对于C/C++语言进行语法分析的基础数据机构--解析树 * 作 者: 陈骁飞 * 时 间: 2020.6.2 * 版 本: Version 1.1 *********************************************************/ #include "parseTree.h" ...
0760620c0003cbbcaf0dffdab45e9f94d153215d
be0222f11e1746d4a6bf0dde9a2d0c38fc938505
DogeCoding/Algorithm
/字节跳动LeetCode/字符串相乘.cpp
C++
cpp
1,548
no_license
#include <stdlib.h> #include <iostream> #include <stdio.h> #include <math.h> #include <string> #include <cstdlib> #include <algorithm> #include <map> #include <vector> #include <stack> #include <queue> #include <unordered_map> #include <string> using namespace std; struct ListNode { int val; ListNode *next; ListNo...
414548f672197eec48c610d4f600aa83c1edc90d
b66f384c74df09ba894db3ad0bd2b37a0fe87c31
Tacticode/battle-engine
/src/tacticode/script/api/ApiCollection.cpp
C++
cpp
11,535
no_license
#include "api_intern.hpp" #include "tacticode/script/ScriptFactory.hpp" #include "tacticode/utils/Singleton.hpp" #include "tacticode/script/script_intern.hpp" #include "tacticode/system/Vector2.hpp" #include <sstream> #include <iostream> #include <cassert> #include "tacticode/engine/BattleEngine.hpp" #include "tacti...
f04bf2f1c2627b8c5c753cb2511b52863ae26021
f40a0986c08505020ced444fd85dfb5859973eb8
antaljanosbenjamin/miscellaneous
/projects/codility/min_abs_sum_of_two/include/MinAbsSumOfTwo.hpp
C++
hpp
216
permissive
#pragma once #include <vector> namespace MinAbsSumOfTwo { // https://app.codility.com/programmers/lessons/15-caterpillar_method/min_abs_sum_of_two/ int solution(std::vector<int> &A); } // namespace MinAbsSumOfTwo