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
b076aced3d852f73b298eb282f91e5f7c765a373
a0cfd0b5a787db064b80cef7ae34604ab263c031
xlnd47/Get-Rekt-Coin-Core
/src/qt/intro.cpp
C++
cpp
10,840
permissive
// Copyright (c) 2011-2015 The Bitcoin Core developers // Copyright (c) 2014-2019 The Dash Core developers // Copyright (c) 2020 The GetRektCoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CO...
32e5a6df1cc6a4698a4eb91c86dd390006732e74
fb337af9a3005ce57756ac08d90cdd4e7a8ef7f6
mimiliaogo/CS_I2P_2
/MiniProject2/TowerDefense_v2/MissileTurret.cpp
C++
cpp
941
no_license
#include "PlayScene.hpp" #include "MissileTurret.hpp" #include "MissileBullet.hpp" #include "AudioHelper.hpp" const int MissileTurret::Price = 300; MissileTurret::MissileTurret(float x, float y) : Turret("play/tower-base.png", "play/turret-3.png", x, y, 1000, Price, 4) { } void MissileTurret::CreateBullet() ...
4664f3734a499e979d4d553f70d88ec1c2bc873d
d9f756ed016b434b968e8974448f341c41b6329b
Jake-Ailey/AI-Behaviours
/AI Behaviours/project2D/WanderState.cpp
C++
cpp
916
permissive
#include "WanderState.h" #include "SeekState.h" #include "SeekBehaviour.h" #include "WanderBehaviour.h" WanderState::WanderState() { m_pSeekBehaviour = new SeekBehaviour(); m_pWanderBehaviour = new WanderBehaviour(); } WanderState::~WanderState() { delete m_pSeekBehaviour; delete m_pWanderBehaviou...
41a802999ee4aa2e02f077d941ec5ea6a2b08548
6061236117cf42fd32b48e49eaa3f89019faa6c9
lcls-daq/pds
/xtc/CDatagramIterator.hh
C++
hh
842
no_license
#ifndef Pds_CDatagramIterator_hh #define Pds_CDatagramIterator_hh #include "PayloadIterator.hh" #include "pds/service/Pool.hh" #include "pds/xtc/Datagram.hh" namespace Pds { class Datagram; class CDatagramIterator : public PayloadIterator { public: CDatagramIterator( const Datagram& dg); ~CDatagramIte...
d9a305279daa3de7679e3c95c87247f4adb9fb04
3dc8934e639502a2697cb65e532fc1bb6b23f062
sn000w55/td
/td/telegram/LinkManager.cpp
C++
cpp
52,210
permissive
// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021 // // 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) // #include "td/telegram/LinkManager.h" #include "td/telegram/A...
83754a4c1bb0592ad02fe2b20c191b39df21fb48
6c0447019d03d62a19c3aa2df843237c14978854
Houssk/FollowAndDrop
/score.cpp
C++
cpp
2,818
no_license
#include "score.h" Score::Score(QWidget *parent) : QWidget(parent) { QString path=QString("%1/records.txt").arg(QDir::homePath()); ifstream is(path.toStdString().c_str()); quitButton = new QPushButton("Fermer"); connect(quitButton,SIGNAL(clicked()),this,SLOT(close())); // Pour les titres ti...
23c0c79138cd3048e1e74bf327d668919f38009a
7e047a90e51648dd830fe12bc2900bd1b7d6b0df
Artoriaxx/c-Program
/hndx2020/2/g.cpp
C++
cpp
1,818
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 50; string s[N]; struct node { string fname, lname, fa, ch; } a[N]; vector<int> G[N]; map<string, int> mp; int in[N], vis[N]; int d[N]; void dfs(int u, int &d1, int &r) { d1 = max(d1, d[u]); vis[u] = 1; r++; for...
aa60b1045c02bc1e720a80c017a1df42492fc7b9
650853fae777a69bbfa7df392da80b621eb7ba49
sriteja777/JetStrike
/src/ObliqueCone.cpp
C++
cpp
3,217
no_license
// // Created by sriteja on 10/2/19. // #include "ObliqueCone.h" ObliqueCone::ObliqueCone(glm::vec3 position, glm::vec3 base_center, float length, float radius, color_t color, float initial_rotation_angle, glm::vec3 rotation_axis) { this->position = position; this->vertex = position; ...
da5670c06faf71f48d74f0bfd1d1f6d478187894
71d5bfb76176ee154663d5895aa6d99cece2c361
Jerry-Larry/PSS
/PssSampleClient/PSSPlugClient/PSSPlugClient/PSSPlugClientApp.cpp
C++
cpp
706
permissive
/*************************************************************** * Name: PSSPlugClientApp.cpp * Purpose: Code for Application Class * Author: smith () * Created: 2019-02-22 * Copyright: smith () * License: **************************************************************/ #include "PSSPlugClientApp.h"...
bf34320c7957d05f11775baf5fd66101763debd0
e8b6a64be0eb720387804750c2f36efb5a43f118
qwertycoin-org/qwertycoin-forkable
/lib/CryptoNoteCore/BlockchainMessages.cpp
C++
cpp
3,897
permissive
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // Copyright (c) 2018-2021, The Qwertycoin Group. // // This file is part of Qwertycoin. // // Qwertycoin is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by ...
6adc874be75ab66cc2e6a5f17e59601d3ca6facf
e60f30b35db7df01132a32ea796ee18716c30342
alexanderpuerov/labWorks_8373_2018
/EvseevSD/Project1/Project1/Lab1.cpp
C++
cpp
953
no_license
#include<conio.h> #include<iostream> using namespace std; int main() { setlocale(0, ""); float first, second, result; char sign; bool check = 0; cout << "Введите 1 число." << endl; cin >> first; cout << "Введите символ операции." << endl; cin >> sign; cout << "Введите 2 число." << endl; cin >...
2bdf9bf369e09c4e6456c12d95345e92ee1a561b
ab1be24e81f7231510b63f6ae5419aa37e9f4fb5
vla5924-practice/computational-methods
/04_heating/src/computation.cpp
C++
cpp
4,784
no_license
#include "computation.h" #include <cmath> constexpr double PI = 3.14; double Computation::phiFunction(double x) const { return 1.0 / m_l + m_phi1 * std::cos(PI * x / m_l) + m_phi2 * std::cos(2.0 * PI * x / m_l); } double Computation::bFunction(double x) const { return m_b0 + m_b1 * std::cos(PI * x / m_l) + ...
07b729377c4c5234dd5d72a60d03593b6a020aba
faf9e3ef4ff0ec02a565187414e9eb07e60ebccd
cms-externals/boost
/libs/spirit/test/x3/lit.cpp
C++
cpp
763
permissive
/*============================================================================= Copyright (c) 2001-2013 Joel de Guzman 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) =========================================...
12a3d0644d5835eb60676027ae2130b140a40738
dfae87f1caaf0cc10bed8d754f6f6128c969613f
syongh/aic
/rpc/lesson2/code3.cpp
C++
cpp
270
no_license
#include <iostream> #include <string> #include <functional> std::function<void()> test(){ int lnum = 128; auto lambda = [&lnum]{ std::cout << lnum << " " << "lambda"; }; return lambda; } int main(){ auto lambda1 = test(); lambda1(); }
eaffab23e28e75b2975e92e0619fbdd03cace6a3
29cfbf1f64818904bf4c5e2024592751db5f0b72
iampkuhz/OnlineJudge_cpp
/leetcode/cpp/PassedProblems/RemoveElement.cpp
C++
cpp
420
no_license
/* * RemoveElement.cpp * * Created on: 2014年10月28日 * Author: hanzhe */ #include<iostream> using namespace std; class Solution { public: int removeElement(int A[], int n, int elem) { if(n == 0) return 0; int ind = 0, cur = 0; while(ind < n) { if(A[ind] != elem) { ...
3545dbf03850de393e108c305f2e5eadfdaa7989
7bf3afabf406f5008d5b1cdb6998fdef6cd9b187
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14011/function14011_schedule_5/function14011_schedule_5_wrapper.cpp
C++
cpp
1,212
no_license
#include "Halide.h" #include "function14011_schedule_5_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(64, 64); Halide::Buffer<int32_t> buf01(64...
0732f6442a70a80a92d3c752b1a4a846d7cfa2d5
931697c232d75092ef5a4f9676979dfa2b51ef4f
dahahua/pap_wclinet
/client/SceneEdit/Xerces/src/xercesc/framework/XMLAttDefList.hpp
C++
hpp
5,868
permissive
/* * Copyright 1999-2004 The Apache Software Foundation. * * 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...
81ebb4bc5048e8feb0293ae000d8dc95b1a933e3
942377e58993a5074873758c3882d276ed72c26e
8adam95/problems
/lalaLand.cpp
C++
cpp
785
no_license
//http://codeforces.com/contest/558/problem/A #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<map> #include<vector> #include<set> using namespace std; #define REP(I, N) for(int I = 0; I < (N); I++) #define FOR(I, A, B) for(int I = (A); I <= (B); I++) #define FORD(I, A, B) for(int I =...
fbd2ee5190e577eebb9d91a4d31f7f3cbcb366f7
b324144727491d3b6f09c1795c4cbc7e14f6527d
marcoramilli/mouseglove
/MouseGlove-ARDUINO/iGlove_Arduino_Source/applet/iGlove_Arduino_Source.cpp
C++
cpp
4,750
no_license
/* ############################################################################################################## #iGlove v0.1 - designed and developed by Marco Ramilli (http://marcoramilli.blogspot.com) mramilli@gmail.com.# ###############################################################################################...
b26535f9c6964fd46f0878ff82cdda61e643fc6f
277648e405225752d920b0d06f4ef60670469425
LittleDrogon/MFC-Examples
/PropertyViewLib/EPropertyTextblock.cpp
C++
cpp
3,200
no_license
// EPropertyTextblock.cpp: implementation of the EPropertyTextblock class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "IPropertyHost.h" #include "EPropertyTextblockWindow.h" #include "EPropertyTextblock.h" ////////////////////////////////////////////////////...
5237aa65ca60c38cc975d86c34b9894e69c4156b
749bee15eb28136052e2dc5aa1bf3cbb85db9253
vonernue/WinVacPractice
/week3/c.cpp
C++
cpp
1,468
no_license
#include <iostream> #include <cmath> using namespace std; int main(){ int times; cin>>times; while(times--){ int n,rear = 1,iszero = 1,isloop = 1; cin>>n; int arr[1000][n]; for(int i=0;i<n;i++){ cin>>arr[0][i]; } for(int i=1;i<1000;i++){ ...
610ec2c7382ad6c0831a64c4179da3b2ecbb2519
02f615f223c9f101a2c0aa8912395ce2c87464fc
wbrennan899/arasan-chess
/src/searchc.cpp
C++
cpp
4,237
permissive
// Copyright 2006-2008, 2011, 2017-2020 by Jon Dart. All Rights Reserved. #include "searchc.h" #include "search.h" SearchContext::SearchContext() { history = new ButterflyArray<int>(); counterMoves = new PieceToArray<Move>(); counterMoveHistory = new PieceTypeToMatrix<int>(); fuMoveHistory = new PieceType...
bab79e4cc722346260580e0fb1b6ca1cd8b83940
889025fa99bae21af7d637a9ac61e727923b0d18
franzoni/cmssw
/SimG4Core/GFlash/src/G4ProtonBuilder_WP.cc
C++
cc
3,429
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
d82cb9aa65e58e1bba40bc913457680991519e2e
75e859da34446c59b85a0f7fc077ad02a49aa413
HououinKyouma29/impacto
/src/character2d.cpp
C++
cpp
6,757
permissive
#include "character2d.h" #include "io/io.h" #include "io/vfs.h" #include "util.h" namespace Impacto { Character2D Characters2D[MaxCharacters2D]; bool Character2D::LoadSync(uint32_t charaId) { int fileId = charaId & 0xFFFF; Io::InputStream* stream; int64_t err = Io::VfsOpen("chara", fileId, &stream); if (er...
a7193ceee162b815d2adfb3bff39eaa4b674d9c4
8cfcf9763ca02bb28769294253ca338aac69f37c
b2gOS/platform_system_core
/libziparchive/zip_archive.cc
C++
cc
44,078
permissive
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
7f0b44c89d66f4bf7d09056fc6ba64c8e0c1cf9e
81f00fbfc9f08d5449b325a132e355c6ff430c28
mbaschnitzi/wxWidgets
/src/ribbon/toolbar.cpp
C++
cpp
37,625
no_license
/////////////////////////////////////////////////////////////////////////////// // Name: src/ribbon/toolbar.cpp // Purpose: Ribbon-style tool bar // Author: Peter Cawley // Modified by: // Created: 2009-07-06 // Copyright: (C) Peter Cawley // Licence: wxWindows licence ////////////////////////...
f72cb2003812ae4f91123b9991a14944f00b4792
362b79bd61330a99e8cb5622d9b838f4d9c5d8c3
Wen0313/Wen0313
/Project5_KMyLogHandler/kmyloghandler.cpp
C++
cpp
2,845
no_license
#include "kmyloghandler.h" KMyLogHandler::KMyLogHandler(QObject *parent) : QObject(parent) { m_fileWatcher = new QFileSystemWatcher(); } KMyLogHandler::~KMyLogHandler() { } QFileSystemWatcher* KMyLogHandler::getFileWatcher() { return m_fileWatcher; } //QString KMyLogHandler::getText() //最头一行 不用了 //{ // ...
6e042b54388b8d53fd26d37cdfeefee72813304d
9ed7ee84c50601628f990a4b7abf13e5348a69cb
nozuonodienobb/AirplayServer-1
/src/network/xtxp_connection_base.cpp
C++
cpp
10,804
no_license
#include <network/xtxp_connection_base.h> namespace aps { namespace network { request_route_table::request_route_table() {} request_route_table::~request_route_table() {} void request_route_table::register_request_route(const request_route_t &route) { std::lock_guard<std::mutex> l(mtx_); auto it_scheme_method =...
68dcbe965a56396cc69cc92875c557e50517614e
9c662db32cbb4ef6404cca6597ebee2f33de8e01
charkops/QSlicer
/Point.hpp
C++
hpp
809
no_license
#pragma once namespace qslicer { struct Point { float x = 0; float y = 0; float z = 0; Point() = default; Point(float x, float y, float z) : x (x), y (y), z (z) {}; ~Point() = default; // Exact comparison bool operator==(const Point &p) const; // Floating point comparison...
43a7c67d68be62e835886846a5200dba76d13567
9e21034cf8b0806ecfeae1c91f1a5c6ea5450d29
QtLab/qsparkle
/qsparklereleasewindow.cpp
C++
cpp
1,486
permissive
#include "qsparklereleasewindow.h" #include "ui_qsparklereleasewindow.h" QsparkleReleaseWindow::QsparkleReleaseWindow(QString url, QString newVersion, QPixmap icon, QWidget *parent): QWidget(parent), _ui(new Ui::QsparkleReleaseWindow) { this->_ui->setupUi(this); this->_ui->iconLabel->setPixmap(icon); this->_versio...
e203290a18370e0a38a6549c0932daae18218478
bb689bb642e71ebccb65ae6248d4b6626df8b1e4
mikedev9000/wt_helloworld
/hello.cc
C++
cc
1,243
no_license
/* * helloworld.cpp * * Created on: Jun 21, 2012 * Author: mike * * tutorial here: http://www.webtoolkit.eu/wt/doc/tutorial/wt.html */ #include <Wt/WApplication> #include <Wt/WBreak> #include <Wt/WContainerWidget> #include <Wt/WLineEdit> #include <Wt/WPushButton> #include <Wt/WText> class HelloApplic...
ba16aba4baffa7a034f2f540955c09ceccfa905c
67489c88923bd3924289a79e25f31cebf8347493
KevinPatist/CPSE1
/opdracht5/deel2/verzameling.hpp
C++
hpp
1,322
no_license
#ifndef VERZAMELING_HPP #define VERZAMELING_HPP #include <iostream> template< int N, typename T > class verzameling { protected: std::array< T, N > set; int filled = 0; public: void add( T item ){ for(int check = 0; check < filled; check++) { if(set[check] == item){ re...
6993aff85670fd09af9fd9b7670fd1b3d683feae
d11457d20ae49a01ff6ad0a8e0b89915db8808b5
szyrom/libcxx
/test/std/experimental/filesystem/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
C++
cpp
7,498
permissive
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
fef51688ec19af99e7b2f2ac3191582689cc09c0
31a8873d7947fa53a8759ceef0acdd31450a62b5
MarkOates/easterhack-2018
/src/models/item_dialogue.cpp
C++
cpp
2,051
no_license
#include <models/item_dialogue.hpp> #include <framework/objects/text_object.hpp> #include <framework/color.hpp> #include <framework/framework.hpp> #include <cmath> ItemDialogue::ItemDialogue(float x, float y, float w, float h, ALLEGRO_BITMAP *item_bitmap, ALLEGRO_FONT *font, std::vector<std::string> pages) : ...
d3e904a4d483d1a9728cf69fbeab6bf941fed3f6
650f068a01f98efcae54fb4808f2ab362eeb8732
spartango/BioImagery
/liblabeler/src/Roi.cpp
C++
cpp
2,235
no_license
#include "Roi.h" #include "util/CurlUtils.h" namespace Bioimagery { Roi::Roi(): id(0), x(0), y(0), height(0), width(0), confidence(0) { } Roi::Roi(uint32_t id, int32_t x, int32_t y, ...
cc5af562283d66a90f92527360b8679ed90ec742
1c6a99bf6d1da5a2ba488307df59c082b277357f
JulianBiancardi/Wolfenstein-Taller1
/tests/client_tests/pistol_tests.cpp
C++
cpp
3,703
permissive
#include "pistol_tests.h" #include <iostream> // TODO DELETE #include "../../../common/src/main/utils/matrix.h" #include "../main/guns/hit.h" #include "../main/guns/pistol.h" #include "../main/map.h" #include "tests_setup.h" int static creation_test(); int static angle_zero_test(); int static small_angle_test(); in...
c2670dbddcdad364118b24ac533c19f0c7510122
2e2cd681f4bb71fbd8385369446bff038802cc21
limon2009/ACM-UVA-Online-Judge-solution
/247.cpp
C++
cpp
1,330
no_license
#include<stdio.h> #include<map> #include<string.h> #define MAXN 30 using namespace std; char S[MAXN][30]; char flg[MAXN]; char link[MAXN][MAXN]; int N, E; map<string,int>M; void Set() { int i, j; for(i = 1; i<= N; i++) { for(j = i+1; j<= N; j++) link[i][j] = link[j][i] = 0; link[i][i] = 0; } } void Dfs(i...
9087c29ecd60e8d9d2a48aa347990a374becbe32
4f9c0fd6f34d634899b394606a2aca3a70ed5c2a
cmonsol/digitalmoney
/tests/transfers_tests/tests.cpp
C++
cpp
14,834
permissive
// Copyright (c) 2011-2015 The Cryptonote developers // Copyright (c) 2014-2015 XDN developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "globals.h" #include "cryptonote_core/account.h" #include "cryptonote_co...
ad5a6f3a7b9df5a3e4f576f8bd1ddaf429b9c3bb
b0106d129ac69414be652ccf86f53d50af85bf61
zhengshizhao/OpenSpace
/modules/base/rendering/screenspaceimage.cpp
C++
cpp
6,405
permissive
/***************************************************************************************** * * * OpenSpace * * ...
08012e26bd60a4901303a2234823e9040eb7b2a1
e1cb217c03ad4f515f61926bdbe15b2171c42ea7
JacobGathof/GameEngine
/GameEngine/GameEngine/InputNamePage.cpp
C++
cpp
736
no_license
#include "InputNamePage.h" #include "UIText.h" #include "InputTextArea.h" InputNamePage::InputNamePage() { promptText = new UIText(Vector2f(400, 400), std::string("Enter your name"), Vector2f(40, 40), 0); area = new InputTextArea(Vector2f(400, 300), Vector2f(300, 50)); } InputNamePage::~InputNamePage() { delete ...
614b62dc5f8e6c458a255db90936a27d0003ee4f
df8b2c0f0870425035cb4eb21ca6a2023f7ec0e7
PICKQUE/Leetccode
/Leetcode/292.nim-游戏.cpp
C++
cpp
344
no_license
/* * @lc app=leetcode.cn id=292 lang=cpp * * [292] Nim 游戏 */ class Solution { public: bool canWinNim(int n) { if(count%2!=0&&n<3) return true; if(n<0){ return false; } return ++count&&canWinNim(n-1)||canWinNim(n-2)||canWinNim(n-2); } private: ...
5771c272552c201d327d6a1bcdebccb937c52621
291fca20b7c0f144a02b0e30a7ab3fd09a54eee0
Gerrytty/parallel-programming-course
/MPI/task10.cpp
C++
cpp
1,587
no_license
#include <stdio.h> #include <cstdlib> #include <cmath> #include <string> #include <mpi.h> #define SIZE 8000 #define ELEMENTS_PER_PROCESS 2000 using namespace std; void fill(int* arr) { for (unsigned int i = 0; i < SIZE; i++) { arr[i] = i; if (i % 2 == 0) { arr[i] *= -1; } ...
bc75d2c3348c2b8cb65782ec2dfb47b02d22f2f2
c42a26f5ea6e5cd498fd3eb2893f6ffe6daae2de
keineahnung2345/cpp-code-snippets
/vector_last_element.cpp
C++
cpp
222
no_license
#include <iostream> #include <vector> using namespace std; int main() { vector<int> v = {1,2,3}; cout << "last element: " << v.back() << endl; v.back() = 5; cout << "last element: " << v.back() << endl; return 0; }
061eed4a0fb0f361e5e3a2911b462d7ed68ce438
b3947f6edf13f35118bfa0e33901b73e1ecb27e1
Crawping/fishjam-template-library
/Temp/CyberLink4CC/src/uhttp/io/StringBufferInputStream.cpp
C++
cpp
1,052
permissive
/****************************************************************** * * uHTTP for C++ * * Copyright (C) Satoshi Konno 2002-2013 * * This is licensed under BSD-style license, see file COPYING. * ******************************************************************/ #include <string.h> #include <uhttp/io/StringBufferInputS...
94d9e64381f9620c2a94fdd90c910d55d9050922
275d8786b037f6bf669eede3cee7a3022fade9fa
bassemaed/HackerRank_TestDome_Practise
/CircularArray_cpp/main2.cpp
C++
cpp
2,173
no_license
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); vector<int> circularArrayRotation(vector<int> a, int k, vector<int> queries) { vector<int> Result(queries.size()); vector<int> b(a.size()); int i = 0; int n = int(a.size()); int x = k%n; for(i= 0; i<n;i++){ ...
1ff1645797da4cc5d56e738fd9fc66f9cff4ee1f
830a9c21745a30a7ad96f7ce3415ee30320b8fec
Yale-LANS/ALTO
/common/cpp/src/lib/protocol/metainfo.cpp
C++
cpp
2,046
permissive
/* * Copyright (c) 2008,2009, Yale Laboratory of Networked Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright...
0c19760d83ed916cf0d8aca29ec6ef08ada6539b
432ee09044182c78cadf2acce8ec396af3074ded
jgwerner/pgadmin4
/runtime/Runtime.cpp
C++
cpp
20,128
permissive
////////////////////////////////////////////////////////////////////////// // // pgAdmin 4 - PostgreSQL Tools // // Copyright (C) 2013 - 2020, The pgAdmin Development Team // This software is released under the PostgreSQL Licence // // Runtime.cpp - Core of the runtime // ///////////////////////////////////////////////...
715dc4fea90300aec5e80a0283aa04ac71ca232c
c8506554d4f25f3c7b559c22b91d19869fb77e71
JinKyong/Zelda
/zelda_triforce/zelda_triforce/timer.cpp
C++
cpp
1,325
no_license
#include "stdafx.h" #include "timer.h" #include <mmsystem.h> //TimeGetTime() 함수를 사용하기 위한 라이브러리 #pragma comment (lib, "winmm.lib") timer::timer() { } timer::~timer() { } HRESULT timer::init() { // if (QueryPerformanceFrequency((LARGE_INTEGER*)&_periodFrequency)) { QueryPerformanceCounter((...
b3f591e291bb6daff89d34bffb9ed5dfbf9d542b
ec383b9b1c651716ae0454084bdc07ccbba61412
koparasy/HPAC
/llvm/lib/CodeGen/RDFGraph.cpp
C++
cpp
59,129
permissive
//===- RDFGraph.cpp -------------------------------------------------------===// // // 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 // //===---------------------------...
ca413f6ffcc04faac241d49ea283576f531e80d6
c23cedade26237c72f21be53dd3f477b223a0a37
maunovaha/CppBuutti
/Exercises/Homework/Homework_05/Exercise_1/Source/Application.cpp
C++
cpp
834
no_license
#include "Application.h" #include "InputReader.h" #include "StringManipulator.h" #include <string> #include <iostream> Application::Application() { run(); } void Application::run() const { for (;;) { std::cout << "Write a text:" << std::endl; const std::string text = InputReader::read_str(); ...
2054286f092b8adb5d5efa8af9a435db24e83c10
c5b96e2dff1de2a3f5ce7a59589f29406a16a40c
Steven-Efthimiadis/gamesprogramming
/Games Programming/Spike9/Spike5/Gameplay.cpp
C++
cpp
4,268
no_license
#include "stdafx.h" #include "Gameplay.h" Gameplay::Gameplay() { move = ""; locations = vector<Location*>(); worldSetUp(); cm = new CommandManager(); player = new Player(); } Gameplay::~Gameplay() { delete(&locations); delete(currLoc); delete(cm); } void Gameplay::play() { bool inPlay = true; cin.ignore();...
a0fbd226304dd62e0b6febe4ba2e85b1d4abd1dc
8d0cf5329de592cd9a3e5dad3b04be30b34846bd
mpk934/mediasoup
/worker/src/RTC/RTCP/FeedbackRtpTmmb.cpp
C++
cpp
2,532
permissive
#define MS_CLASS "RTC::RTCP::FeedbackRtpTmmbPacket" // #define MS_LOG_DEV #include "RTC/RTCP/FeedbackRtpTmmb.hpp" #include "Logger.hpp" #include <cstring> namespace RTC { namespace RTCP { /* Class methods. */ template <typename T> TmmbItem<T>* TmmbItem<T>::Parse(const uint8_t* data, size_t len) { MS_TRACE(); ...
14d54c16cb9e1dc41e3fe14acbc882e8dd933280
8db3bbe57648cba87a62bf548e48f1d9eb3b412d
vn-os/Castor3D
/source/Core/Castor3D/Material/Texture/TextureConfiguration.cpp
C++
cpp
4,242
permissive
#include "Castor3D/Material/Texture/TextureConfiguration.hpp" namespace castor3d { namespace { void mergeMasks( uint32_t toMerge , TextureFlag flag , TextureFlags & result ) { result |= toMerge ? flag : TextureFlag::eNone; } } //**************************************************************...
c67f6171860721f8caeb3a395222fac4fcd10f7e
574339a6b1ae9384c2ee003de0f67944da78952d
vasilevp/sstv-test
/main.cpp
C++
cpp
443
no_license
#include <cstdint> #include <iostream> #include <functional> #include <cmath> #include <vector> #include "utils.hpp" #include "sstv.hpp" #include "wav.hpp" using namespace std::literals; int main(int argc, char *argv[]) { if (argc != 3) { std::cerr << "Usage: " << argv[0] << " <input_bmp> <output_wav> - co...
e3a2f201101ca0ed8651b0924562de9c4e1455e8
9eeee5d00f08504bdd171a1da88f53323309bc43
lunashade1127/tensorflow
/tensorflow/core/kernels/reduction_ops_test.cc
C++
cc
2,591
permissive
#include "tensorflow/core/public/tensor.h" #include <gtest/gtest.h> #include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h" #include "tensorflow/core/platform/test_benchmark.h" namespace tensorflow { // Creates a Graph which "reduce"s a 3D float tensor of "num" elements // into a scalar. static Graph* To...
7c7f55d36099a469c32ced509af2f066fe4a96f3
11aa046e9187f7596920b8515edef3faa14dfa1d
tjrdud123/Baekjoon
/2020-09/9655.cpp
C++
cpp
563
no_license
#include <string> #include <vector> #include <iostream> #include <string.h> #include <stdlib.h> #include <algorithm> using namespace std; int N; int isWin[1001]; bool game(int N) { if (isWin[N] != -1) return isWin[N]; if (game(N - 1) == 1 && game(N - 3) == 1) return isWin[N] = 0; else return isWin[N] = 1; } int main...
8452a1f8e2807870a784c234a3574359b128e054
893f9288d16f8b6d3681884bd842188286491465
phhusson/platform_system_vold
/PublicVolume.cpp
C++
cpp
7,329
no_license
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
35bd67a611ba2b670048090238343ec2d7155ec6
013f52ff56f3bc92c141d68c746b668b4c71e2f9
XWHQSJ/Particles
/allParticles/torchLight.cpp
C++
cpp
54,613
no_license
/* * This Code Was Created By Jeff Molofee 2000 * If You've Found This Code Useful, Please Let Me Know. * Visit My Site At nehe.gamedev.net */ #pragma comment(lib, "legacy_stdio_definitions.lib") #include <windows.h> // Header File For Windows #include <stdio.h> // Header File For Standard Input/Output #inclu...
2f3d7a55591a7319303ccbf29f032fc2f1ddbb92
599fa08c9db3ec762ffbd919d686dd34afc31aec
dgkang/ROG
/code/centerserver/timing_trigger_manager.cpp
C++
cpp
1,239
no_license
#include "centerserver_pch.h" #include "timing_trigger_manager.h" #include "ranking_list_manager.h" #include "game_handler.h" #include "daily_fashion_manager.h" IMPLEMENT_SINGLETON(TimingTriggerManager) TimingTriggerManager::TimingTriggerManager() { } TimingTriggerManager::~TimingTriggerManager() { } void TimingTri...
f837bd834a8f905ff037a15639aeed57a6c33cf2
e18b74049d6999f02bda72dfb135a29906421957
AliNemat/PostProcess_EpiScale_Feb2017
/PostProcess_EpiScale_Feb2017/stat.cpp
C++
cpp
6,367
no_license
//stat.cpp //==================== // //include dependencies #include "data.h" #include "stat.h" #include <fstream> #include <iostream> #include <stdlib.h> //==================== /*****StatBin Class*******/ StatBin::StatBin(double min, double max) { this->min_prog = min; this->max_prog = max; } double StatBin:...
4041a5adf05f76048814e223d39901742d95b3db
a487fd3ee16772a449095208417322275967dec1
libretro/REminiscence
/src/graphics.cpp
C++
cpp
11,902
no_license
/* * REminiscence - Flashback interpreter * Copyright (C) 2005-2015 Gregory Montoir (cyx@users.sourceforge.net) */ #include "graphics.h" void Graphics::setClippingRect(int16_t rx, int16_t ry, int16_t rw, int16_t rh) { _crx = rx; _cry = ry; _crw = rw; _crh = rh; } void Graphics::drawPoint(uint8_t color, const...
59ad855c66f003ad2d7797ea8f03e90c7e560c8b
c2b421b66a864027ed11fc95c1e42d0cee2eea07
peterou/mrpt
/libs/expr/src/CRuntimeCompiledExpression.cpp
C++
cpp
4,210
permissive
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | | | Cop...
78ce210581ebbbeb9cfe1cf500d8315317a3818c
3b8554fe690d4ddce1ada8f7009c9d8d118735c4
ndeana-21/cpp
/cpp02/ex01/Fixed.hpp
C++
hpp
447
permissive
# include <iostream> # include <cmath> class Fixed { public: Fixed(void); Fixed(const int num); Fixed(const float num); Fixed(const Fixed &src); ~Fixed(void); Fixed &operator=(const Fixed &rhs); int getRawBits() const; void setRawBits(const int raw); float toFloat() const; int toInt() const; p...
50763dec32c1d4a411cd183d8927bfe11c60741f
b9c964f777cfcec6b5cd0ff30b272132a1eddd33
temp69/magnet
/build/moc_sendcoinsentry.cpp
C++
cpp
6,866
permissive
/**************************************************************************** ** Meta object code from reading C++ file 'sendcoinsentry.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.1) ** ** WARNING! All changes made in this file will be lost! ******************************************************...
2235d6bac585b9895d34cd81208bd826c60b6427
4120ad646ec26e3f7e988c0e391c6aa2d3526723
CS6751/Jarvis
/jarvis_pointcloud/src/example_planarsegmentation.cpp
C++
cpp
6,890
no_license
#include <ros/ros.h> // PCL specific includes #include <sensor_msgs/PointCloud2.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl/conversions.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> //#include <pcl/point_type_conversions.h> #include <pcl/sample_consensus/model_types.h> #include <pcl/sam...
4e8c0de8d56d8d4dcd47d39f333065f7477be524
4d95fd22794b341fb825fe58e7d8028a24d1ce72
AngelJSD/EDA
/QuadPoint/qtree.hpp
C++
hpp
3,976
no_license
#include "node.hpp" #include <stack> template <typename T> class cQTree{ public: cNode<T>* mRoot; int mOVF; int mGreatX; int mLessX; int mGreatY; int mLessY; void mInsert(cData<T>); void mExplosion(cNode<T>*); bool mFindElement(cData<T>); bool mFindByRange(coord, coord, cNode<T>*); void print...
9992c62c374b7f3ba68dcb421fc97da66702a463
e80bf209ed821d2364dfd4d4ad7af94f69bd3ea5
slipslob/3d-zfxengine
/ZFXEngine/ZFX3D/ZFXAabb.cpp
C++
cpp
3,390
no_license
#include "zfx3d.h" void ZFXAabb::Construct(const ZFXObb &Obb){ ZFXVector vcA0,vcA1,vcA2; ZFXVector _vcMax,_vcMin; vcA0=Obb.vcA0 * Obb.fA0; vcA1=Obb.vcA1 * Obb.fA1; vcA2=Obb.vcA2 * Obb.fA2; //Min and Max X if(vcA0.x > vcA1.x){ if(vcA0.x>vcA2.x){ vcMax.x=vcA0.x; vcMin.x=-vcA0.x; }else{ ...
819dc4d969d13ab418cee37731368b66c17bf79e
181b922b17d1ee25d549425688f718eabaff031b
jbohren-forks/CMake
/Source/cmLoadCommandCommand.cxx
C++
cxx
8,488
permissive
/*============================================================================ CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. This softwa...
fc3752c4d2d4c66156d5e7bcc9e2e068d6d5e5b0
4ba6d2da915c85a95a6f419a6a6a00616d2ad664
PADME-Experiment/padme-fw
/PadmeReco/Target/include/TargetCalibration.hh
C++
hh
938
no_license
// -------------------------------------------------------------- // History: // // Created by Stefania Spagnolo (stefania.spagnolo@le.infn.it) 2019-03-14 // // -------------------------------------------------------------- #ifndef TargetCalibration_H #define TargetCalibration_H #include "PadmeVCalibration.hh" #includ...
a90966a2e12d686631fe725d24b214a7df6bcf10
6f3ff62874d3fa6d30a7ab2d7b595c5542e19dcd
VIS4ROB-lab/HyperVariables
/include/hyper/matrix.hpp
C++
hpp
2,965
permissive
/// This file is subject to the terms and conditions defined in /// the 'LICENSE' file, which is part of this repository. #pragma once #include <Eigen/Core> namespace hyper { constexpr auto DefaultStorageOption(const int rows, const int cols) -> int { return Eigen::AutoAlign | ((rows == 1 && cols != 1) ? Eigen::R...
92d23fec36f9aa5ad7fc311512bb34cba08d94c5
5ed334b2930ff50200c49dba307fd4bf8819b757
C00172160/AILabs
/lab2/sfml - starter/Player.cpp
C++
cpp
1,607
no_license
#include "stdafx.h" #include "Player.h" #include <cmath> Player::Player(sf::Vector2f pos, sf::Texture &tex) { mPosition = pos; mSprite.setTexture(tex); mSprite.setPosition(pos); mSprite.setOrigin(16, 16); } void Player::Update(sf::Vector2f windowSize) { borderCheck(windowSize); if (sf::Keyboard::isKeyPres...
4eef69602b578e031f37e8e71a51855d34f1e103
2bed3a715a047d8c7dca80a8c3c0c52b409c3231
AEScracker/networksec
/aescrack.cpp
C++
cpp
2,202
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <sstream> #include "openssl/aes.h" #include "openssl/evp.h" using namespace std; bool checkeng(unsigned char* out_) { int cnt =0; for(int i=0; i<sizeof(out_); i++){ //if((out_[i]<=122 && out_[i]>=97) || (out_[i]>=65 && out_[i...
44ce070ed531f757cbeb2bafb77c1612e26f2788
0817257ccdb6547e96f84110c686e5dca652dc95
Marine-ingenuimlabs/Measurement_unit
/ArduPilot-Arduino-1.0.3-windows/libraries/AP_GPS/AP_GPS_SIRF.cpp
C++
cpp
5,976
no_license
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*- // // SiRF Binary GPS driver for ArduPilot and ArduPilotMega. // Code by Michael Smith. // // This library is free software; you can redistribute it and / or // modify it under the terms of the GNU Lesser General Public // License as published ...
5ad40d4bddaf11bec973f8b12f30d5c1912c32a8
d9a0fe6e46d82a5d563c1734f967566cd4965bc3
ehsanmqn/UVA-Problems
/100.cpp
C++
cpp
878
no_license
#include<stdio.h> #include<iostream> using namespace std; const int maximum=1000000; int memo[maximum]; unsigned short int cycle_length(unsigned int cycle) { if(cycle<maximum) { if(memo[cycle]) return memo[cycle]; if(cycle%2) return memo[cycle]=1+cycle_length(3*cycle+1); return memo[cycle]=1+cyc...
26432d4a3c97320765fba70a73da5b7c454e2e4b
eca6240ee072837bd19040a3b81771a0a0dea662
emanueljuliano/Competitive_Programming
/cf/neerc_2016/gen.cpp
C++
cpp
477
no_license
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' typedef long long ll; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; const int LIM = 100; const int LIM2 = 1e9; int main(int argc, char** argv) { _ srand(atoi(argv[1])); in...
ea2f9d40e885a3837b903ac7c2ca00947d975d82
0081f85253364cd105bc55851ffd3dcad0f2d60e
SjoerdKoop/vicon_control
/vicon_workspace/src/vicon_tools/src/vicon_tools/objects.cpp
C++
cpp
1,405
permissive
// ROS #include "ros/ros.h" // ros::*, ROS_* // Vicon tools #include "vicon_tools/clients.h" // ObjectClient #include "vicon_tools/general_tools.h" // isValidIp, isValidPort // Checks whether provided arguments are correct bool checkArguments(int argc, char* argv[]) { // If the number of arguments is not cor...
b4521a2e9f2fd53a64936f76541532ddf0fb94f0
4246ab42d5b0d64917411d30dccbebaff9e598e8
GuilhermeSaito/Game_SFML_C-_StepbyStep
/Maybe_half_game_with_enemies/player.cpp
C++
cpp
1,926
no_license
#include "player.h" Player* Player::p_instance = NULL; Player::Player() { player1Pos = sf::Vector2f(0, 500); player2Pos = sf::Vector2f(10, 500); } Player::~Player() { delete p_instance; } Player* Player::getInstance() { if (!p_instance) p_instance = new Player; return p_instance; } /* U...
5084488b36803b1abf61964d11ed2b6dd60ad549
c9671e173bd0d5d61db3da28bb380115a7ea292c
rockduan/androidN-android-7.1.1_r28
/WORKING_DIRECTORY/system/extras/memory_replay/Action.cpp
C++
cpp
5,341
permissive
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
5717e4ddff8aa840c8fc4f4f9e04b7fc02b42055
1b5a0039b5f89176733f439c60afcc73a4d13de3
Yanick-Salzmann/message-converter-c
/message/generation/swift-mt-generation/repository/SR2018/parsers/SwiftMtParser_MT690BaseListener.cpp
C++
cpp
450
permissive
#include "repository/ISwiftMtParser.h" #include "SwiftMtMessage.pb.h" #include <vector> #include <string> #include "BaseErrorListener.h" #include "SwiftMtParser_MT690Lexer.h" // Generated from C:/programming/message-converter-c/message/generation/swift-mt-generation/repository/SR2018/grammars/SwiftMtParser_MT690.g4 ...
f432a6b8051884957b52eb0724dc27c0facb8c89
57211654d923c252fad98bffae4f13541326d766
stephensmitchell-forks/Kapsul3D
/src/TerrainEd/CSkyView.cpp
C++
cpp
5,749
no_license
// TestSt.cpp : implementation file // #include "stdafx.h" #include "CSkyView.h" #include "gl/glut.h" //#include "TestSt.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif IMPLEMENT_DYNCREATE(CSkyView, CButton) //extern OGLView *View; //extern Desk *CurrentDesk; /////...
18528affaea05e76852e7afc9ab8f61c76724668
924f54aa11221e8df5d26ae32837dcee09cf93e8
killerdevildog11/hello-world
/CPP/helloworld-openCV/main.cpp
C++
cpp
535
permissive
#include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> int main( ) { cv::namedWindow("Output",1); //initialize a 120X350 matrix of black pixels: cv::Mat output = cv::Mat::zeros( 120, 350, CV_8UC3 ); //write text on the matrix: putText(output, "Hello World :...
0bc66c325094b7f2b0308690f44c54d6d7734a8b
d7f85c58b2c4d7e4bbf19b9f55a862454015d5de
TUTProCon2014/guess_img
/include/guess.hpp
C++
hpp
6,248
no_license
#pragma once #include "../../inout/include/inout.hpp" #include "../../utils/include/template.hpp" #include "../../utils/include/types.hpp" #include "../../utils/include/range.hpp" #include <vector> #include <set> #include <array> #include <deque> #include <unordered_set> namespace procon { namespace guess { using n...
02749e7205831a5328ee234edad918f9c5304e90
e750c34ddb1c313da1d79606dc398b35323f36db
strebski/omim
/generator/transit_generator.cpp
C++
cpp
8,360
permissive
#include "generator/transit_generator.hpp" #include "generator/borders.hpp" #include "generator/utils.hpp" #include "routing/index_router.hpp" #include "routing/road_graph.hpp" #include "routing/routing_exceptions.hpp" #include "routing/vehicle_mask.hpp" #include "storage/country_info_getter.hpp" #include "storage/r...
1c7ee322652be93abe1c7d17cf46b1246877e368
89392a349c047ae036e51f66ffa64155e329f404
litaoran/leetcode-daily
/cpp/726-number-of-atoms.cc
C++
cc
2,000
no_license
class Solution { public: string countOfAtoms(string formula) { stack<int> s; int n = formula.size(); vector<int> closed(n, -1); for (int i=0;i<formula.size();i++) { if (formula[i] =='(') { s.push(i); } else if (formula[i] ==')') { ...
5f4e78ca3205b94c382b3dd0739cdce20b17ba5c
e6f5f795881c3adcc93aefe4e5c8efddb365dd72
hzjiangm/clickhouse-cpp
/clickhouse/client.cpp
C++
cpp
13,568
no_license
#include "client.h" #include "protocol.h" #include "varint.h" #include "columns.h" #include "io/coded_input.h" #include "net/socket.h" #include <system_error> #include <vector> #include <iostream> #define DBMS_NAME "ClickHouse" #define DBMS_VERSION_MAJOR ...
116561a54b73cf974616c9562a79189cf25b3f2b
1b617681c3491fdd944a1a33d588ca081e639fde
JohnVance1/Portfolio
/Projects/IGME.540/TerrainMesh.cpp
C++
cpp
7,683
permissive
#include "TerrainMesh.h" #include <DirectXMath.h> #include <vector> #include <fstream> using namespace DirectX; TerrainMesh::TerrainMesh( Microsoft::WRL::ComPtr<ID3D11Device> device, const char* heightmap, unsigned int heightmapWidth, unsigned int heightmapHeight, TerrainBitDepth bitDepth, float yScale, float...
72a9f577b187c76a996489c656faa6d7b9b449c3
02fd65759406fbb50820ba9eb7f8a3335e024e48
popacai/TQOS
/code/threads/test_schedule.cc
C++
cc
5,930
permissive
#include "test_schedule.h" int low = 0; int medium = 0; int high = 0; void lock_thread(int args) { Lock* lock = (Lock*) args; printf("%s, run\n", currentThread->getName()); lock->Acquire(); if (strcmp(currentThread->getName(), "low") == 0) { low++; ASSERT(high == 1); } if (strc...
21dab180138a96ee7bcbd65cdb981506436c319b
59aa14f3039e5125379eae80b708986e84d4b163
CRRobotics/Robots
/CodeRedRobot2014.bak/Commands/Drive/JoystickAutoDrive.cpp
C++
cpp
1,421
no_license
// RobotBuilder Version: 1.0 // // This file was generated by RobotBuilder. It contains sections of // code that are automatically generated and assigned by robotbuilder. // These sections will be updated in the future when you export to // C++ from RobotBuilder. Do not put any code or make any change in // the b...
d51d9f1bf445b41aeabc31189f60d51e1e9535d5
6c9f179c2d6c0553d3ede9fd2ab4ecb136c01d9d
aditya865/LeetCode-June-Challenge
/week_4/day24.cpp
C++
cpp
313
no_license
class Solution { public: long long CatalanNumber(long long n, long long r){ long long ans = 1; for(long long i=0; i<r; i++){ ans = ans*(n - i)/(i+1); } return ans; } int numTrees(long long n) { return CatalanNumber(2*n,n)/(n+1); } };
22c4464c74d4492206099b337412a78a65c0cf67
e7cc28e88af302533922a7c36afa8ccf3b33ac2e
Ray9090/Home-Automation-Arduino-Qt
/Serial_Home_Automation_Qt/dialog.cpp
C++
cpp
2,847
no_license
#include "dialog.h" #include "ui_dialog.h" #include <QSerialPort> #include <QSerialPortInfo> #include <QDebug> #include <QtWidgets> Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); arduino_is_available = false; arduino_port_name = ""; arduino = new QS...
eb510d71322f32398fc3244d4e5c8c6a906f6ee9
2651f33ec5b7f800320710388b369da75b7a650f
unjambonakap/prog_contest
/codeforces/beta_92/pb.cpp
C++
cpp
2,174
no_license
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <algorithm> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <cstdlib> #include <string> #include <cstring> #include <cstdio> #include <cmath> #include <cstdli...
ba2b24ccda679ce5b3ba88af90a1168b44112c8e
b09415852192b42dfd80abd36662f4b02c7f9dbc
romange/gaia
/examples/wordcount/word_count.cc
C++
cc
6,067
permissive
// Copyright 2019, Beeri 15. All rights reserved. // Author: Roman Gershman (romange@gmail.com) // // Counts word frequency in the text files. #include <hs/ch.h> #include <re2/re2.h> #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_split.h" #include "base/hash.h" #inc...
36e4f84643fe5154c39d68f21b94cf353a008fc9
287cc3fcce90c8ea63b153b8de1092f73b8adb20
RahulKar-106114075/codechef-solutions
/Jewels and Stones.cpp
C++
cpp
300
no_license
#include <iostream> #include <string> #include <set> using namespace std; main() { int cases; cin>>cases; while(cases--){ string s, t; cin>>s>>t; set<char> S(s.begin(),s.end()); int cnt = 0; for(int i=0;i<t.size();i++) if(S.count(t[i])) cnt++; cout<<cnt<<endl; } }
a871f4c9da7880d2ce5d40e17b0c45b721df3a0c
81335c0d83ec1397f0524a57219b03b49e5b520e
wangscript007/Forte
/PDUPeerImpl.cpp
C++
cpp
2,554
no_license
// #SCQAD TAG: forte.pdupeer #include "PDUPeerImpl.h" #include "SystemCallUtil.h" #include "LogManager.h" #include "Types.h" #include "PDUPeerTypes.h" #include "Thread.h" #include <boost/make_shared.hpp> using namespace boost; using namespace Forte; Forte::PDUPeerImpl::PDUPeerImpl( uint64_t connectingPeerID, ...
10ccea41ff1f6c972e28340e19e9d7e7b9db4b17
226f65680101757810eb5230cd97f80d57d3c9c0
daiemna/RnD-Pedestrian-Detection
/Detector/src/main.cpp
C++
cpp
4,641
no_license
#include <opencv2/opencv.hpp> #include <iostream> #include <fstream> #include <dirent.h> #include <sys/stat.h> #include <errno.h> #include <vector> //#include <algorithm> #include "Detector.hpp" #include "debug.h" #include "hog_lite_features.h" #include "CascadedClassifier.h" using namespace std; using namespace feat...
ec9442d104a292ed1e24f49a4539a8bfb7b0d5d1
2cbb1209864b1329690243fde987e9b0c57adfc7
dk-dev/rethinkdb
/src/do_on_thread.hpp
C++
hpp
2,386
permissive
// Copyright 2010-2013 RethinkDB, all rights reserved. #ifndef DO_ON_THREAD_HPP_ #define DO_ON_THREAD_HPP_ #include "arch/runtime/runtime.hpp" #include "utils.hpp" /* Functions to do something on another core in a way that is more convenient than continue_on_thread() is. */ template <class callable_t> struct thread_...
42abbf94ad7e478a7718c1329bb58a521e372c7a
b069735bfbf1a4fe9817ce2bf21f397f62fd6649
kimsj0302/algorithm_study
/BOJ/5557.cpp
C++
cpp
559
no_license
#include<iostream> #include<vector> using namespace std; long long DP[100][21] = { 0, }; int main() { int num; scanf("%d", &num); int ans; for (int i = 0; i < num; i++) { int tmp; scanf("%d", &tmp); if (i == 0) { DP[0][tmp] = 1; } else if (i == num - 1) { ans = tmp; } else { for (int j = 0; ...
02f5e0a5170ec1a50782502f2abcb345910543b9
dc1a4b5cf2cdad788a117fe529b05f0b63ad3e80
mfkiwl/dsvo-stereoOdemeter
/src/stereo_processor/g2o_edges/scale_edge.cpp
C++
cpp
1,783
permissive
#include "stereo_processor/g2o_edges/scale_edge.hpp" #include <g2o/core/factory.h> #include <iostream> using namespace std; void EdgeScaleDirect::computeError() { if(( v-BATCH_SIZE/2-4 ) <0 || ( v+BATCH_SIZE/2+4 ) >img1.rows) { _error(0,0) = 1.0; //TODO this->setLevel ( 1 ); return; } const VertexScale* ...
3997c884e5a58ddd282610e9acadb54ca3f0a1ec
a15296afb80545a7b68a66e612d8403781c0ac0e
yssource/pythran
/pythran/pythonic/random/seed.hpp
C++
hpp
523
permissive
#ifndef PYTHONIC_RANDOM_SEED_HPP #define PYTHONIC_RANDOM_SEED_HPP #include "pythonic/include/random/seed.hpp" #include "pythonic/utils/functor.hpp" #include "pythonic/__builtin__/None.hpp" #include "pythonic/random/random.hpp" #include <ctime> PYTHONIC_NS_BEGIN namespace random { types::none_type seed(long s) ...
b94a5c58264433caa296ae5db79360c3e02f546a
74cba41680af91600fdf6484d0de28578eab3cfa
rsobt/cobra
/KIVA/Agent.cpp
C++
cpp
1,593
no_license
#include "Agent.h" struct HeuristicNode { HeuristicNode(int loc, Task *task, int h_val) : loc(loc), task(task), h_val(h_val) {}; int loc; Task *task; int h_val; }; struct CompareHeuristic { // returns true if n1 > n2 (note -- this gives us *min*-heap). bool operator()(const HeuristicNode &n1, const H...