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
b2d9dd290de681ec63ccea44518cdfc34b2318ae
459273f695914e6bfc0edb99b4e51d646e35dc5b
fifoosid/OOP-Project
/Iteration #2/Footbal_Project_OOP_71710/Team.cpp
C++
cpp
2,042
no_license
#include "stdafx.h" #include "Team.h" Team::Team() { setTeamName("No name"); setNumOfPlayers(0); setPlayers(nullptr); setCoachName("No Name Assigned"); setCoachStats(0); } Team::Team(char* newTeamName, int newNumOfPlayers, Player * newPlayers, char * newCoachName, int newCoachStats) { setTeamName(...
7d758b3f35d5fa594b736bc5ea94a498a59624a9
3204049625f0907f36c5ff1481dbefb14528122f
yangyuyueYY/data_structure
/22、由二叉树的遍历序列确定二叉树:由先序遍历序列和中序遍历序列.cpp
C++
cpp
2,171
no_license
/* * 由二叉树的遍历序列确定二叉树:由先序遍历序列和中序遍历序列 */ #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node { char data; struct node *lchild; struct node *rchild; }Node,*Tree; /* * 由二叉树的遍历序列确定二叉树:由先序遍历序列和中序遍历序列 * @param Tree *T 二叉树根节点指针 * @param char *pre 前序遍历序列 * @param char *i...
76bf0eb73acdace5b111b9a6c773257d68a9f400
da3d7d6851b2e8dd1e295ee9bf7fc93cb6e87c9f
haohuixin/Shooter
/Shooter/StateParser.cpp
C++
cpp
3,202
permissive
#include "StateParser.h" #include "TextureManager.h" #include "Game.h" #include "GameObjectFactory.h" bool StateParser::parseState(const char* statFile, std::string stateID, std::vector<GameObject*>* pObjects, std::vector<std::string>* pTextureIDs) { // Create the XML document TiXmlDocument xmlDoc; ...
fe08a45d779a7b01fb54086d6b5e27890912fa36
9b1605f28277a35b79d5efd86018080eaf9fce18
mcobzarenco/unet
/src/external/stan/agrad/rev/matrix/mdivide_left_spd.hpp
C++
hpp
11,110
no_license
#ifndef STAN__AGRAD__REV__MATRIX__MDIVIDE_LEFT_SPD_HPP #define STAN__AGRAD__REV__MATRIX__MDIVIDE_LEFT_SPD_HPP #include <vector> #include <stan/math/matrix/Eigen.hpp> #include <stan/math/matrix/typedefs.hpp> #include <stan/error_handling/matrix/check_multiplicable.hpp> #include <stan/agrad/rev/var.hpp> #include <stan/a...
d6bdc8144f910d16e14b7fbebd74f9a40b7c3c83
ad859208a09fe1e268642fb899713028a3338401
jmluis/Gengine
/Gengine/TButton.cpp
C++
cpp
438
permissive
#include "TButton.h" namespace Gengine { TButton::TButton() { } TButton::~TButton() { } bool TButton::Init(SDL_Renderer* gRenderer, std::string path) { bool success = true; bTexture = GTexture(); if (bTexture.LoadTexture(gRenderer, path)) { printf("Loaded Image %s...\n", "background.png"); } ...
80c64de8de89a0f29464b2f53f41222e163c36b5
6570d60656f3f6661aaf2e06c40f8d12ab0d9213
UMDGeoVis/Multitessalation_Delaunay
/programs/ttriang.cpp
C++
cpp
22,186
no_license
/***************************************************************************** Delaunay Triangulator and MT constructor, version 1.0, 1999. Copyright (C) 1999 DISI - University of Genova, Italy. Group of Geometric Modeling and Computer Graphics DISI. DISI - University of Genova, Via Dodecaneso 35, 16146 Genova - ITALY....
36aa37dba2396de152726e5b060afdd0e7c3fb6e
e173d8542a92c1c10bca07330d151edae2a10a3c
ryandeng1/mc2-copy
/SCALE-MAMBA/src/Processor/Processor_IO.cpp
C++
cpp
3,461
no_license
/* Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom. Copyright (c) 2018, COSIC-KU Leuven, Kasteelpark Arenberg 10, bus 2452, B-3001 Leuven-Heverlee, Belgium. All rights reserved */ #include "Processor_IO.h" #include "Processor.h" #include <unistd.h> exter...
fa201c018ceab6f5769ce2b2d7863161372a2e80
f3df07edca100245539d476873d83b6a2930d8b3
thanhpd/Rubik
/Image.cpp
C++
cpp
4,309
no_license
#include "Image.h" #include <cassert> #include <fstream> using namespace std; Image::Image(char *ps, int w, int h) : pixels(ps), width(w), height(h) { } Image::~Image() { delete[] pixels; } namespace { //Converts a four-character array to an integer, using little-endian form int toInt(const char *bytes) { re...
d5fafab30f3667b2f6ccf21f41ec8ba280f5182f
296b6eb0656e4c1aefe00901ef9e09c5f953274c
zhh2005757/slambook2_in_Docker
/slambook2/3rdparty/opencv-3.3.0/modules/viz/src/vtk/vtkOBJWriter.cpp
C++
cpp
9,609
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ad70ff3343270efc2e6273f91bf6c46f6a5c1c74
4a2e170109d0d7f9c1a4efdf509ba11060d54fb1
bmcdonnel/data-structures
/cpp/algorithms/reverse_words.cpp
C++
cpp
1,620
no_license
#include <iostream> #include <cstdint> #include <cstring> #include <stdexcept> #include "utils/array_utils.h" void reverse_words(char* buffer, unsigned int length) { if (length == 0) { throw std::runtime_error("invalid length " + std::to_string(length)); } utils::reverse_buffer(buffer, length); std::c...
6b88a9efed05ef9ce76cb1b0b0d5fbebca0f9e79
a8f16d8c290df15ffbe7ceefb1e8e1fcba474228
Samsung/Castanets
/chrome/browser/chromeos/crostini/crostini_mime_types_service_factory.cc
C++
cc
1,428
permissive
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/crostini/crostini_mime_types_service_factory.h" #include "chrome/browser/chromeos/crostini/crostini_mime_types_service....
72f64312fb0bc100ca38d9c396ec886781125dea
6302ab3bbb856871915293e132f43532ee55161b
Hab5/btc
/CompactSize.cpp
C++
cpp
1,720
no_license
#include "CompactSize.hpp" #include "utils.hpp" CompactSize::CompactSize(const uint64_t& size) : size_value(size) { Encode(size); } CompactSize::CompactSize(const std::vector<uint8_t>& bytes) { Decode(bytes); } std::vector<uint8_t> CompactSize::GetBytes() { if (bytes.empty()) Encode(size_val...
434fa9fe5d9d685605d88c7e9c30be231d55d707
dbd42feca7600a6e15659b760629248be98f2df5
OscarProgra3/Examenlab2_OscarVargas
/Revolucionarios.cpp
C++
cpp
555
no_license
#include "Revolucionarios.h" Revolucionarios::Revolucionarios(string praza,int pedad,string pnombre,Frutadeldiablo* pfrutadiablo,bool phakiobservacion,bool phakiarmadura,bool phakirey,string pfechaingreso) : Seres(praza,pedad,pnombre, pfrutadiablo, phakiobservacion,phakiarmadura,phakirey) { fechaingreso=pfechaingreso...
239cbbc83ef2f372ee50979614d004e4a283615c
da590a8bacdf5e735e91f86e05401d2fbce2ddde
cpkt9762/SCUM-SDK
/SDK/SCUM_Trip_wire_dead_fall_for_large_animals_classes.hpp
C++
hpp
810
no_license
#pragma once // SCUM (0.1.17.8320) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SCUM_Trip_wire_dead_fall_for_large_animals_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //---------------------------------------------------------...
0381d38b93f74872aead0c71ce004788c53bf98e
3a81fe48ecb25793e7bc39c9e6eb4e6872153601
bgoonz/UsefulResourceRepo2.0
/MY_REPOS/misc-experiments/_FIREBFIRE/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc
C++
cc
6,124
permissive
/* * * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * orm.h> #include "src/core/tsi/alts/zero_copy...
75fc333ceb7efe3214856bfdb9b2d8b654671a5b
b599460c7b82de27be22e2d68c46feb36fa53c9e
Khaos-Labs/khaos-wallet-core
/src/NEAR/Entry.cpp
C++
cpp
1,039
permissive
// Copyright © 2017-2020 Khaos Wallet. // // This file is part of Trust. The full Trust copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. #include "Entry.h" #include "Address.h" #include "Signer.h...
1a0f5c743f81bc853a30a26f07b912921edaa942
eea12aee1ef380df70b064d484ff09944e199b36
metux/chromium-suckless
/extensions/shell/browser/shell_prefs.cc
C++
cc
3,307
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "extensions/shell/browser/shell_prefs.h" #include "build/build_config.h" #include "components/pref_registry/pref_registry_syncable.h" #include "...
fbe5695b9b7e8f722df3387927cf78cd17e7fc52
d254cead3b8fba9eb7c2d7d73c52133935d08d78
sapioit/thor
/server/connection.hpp
C++
hpp
2,833
permissive
// // connection.hpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2016 Vladimir Voinea (voineavladimir@gmail.com) // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost...
69e0800438b21a27d928c910d8a49a0edf5f4a42
334364dac77034ac83e9f6eeb87d0f6d0323a979
ethanhou99/ec602hw
/hw6.cpp
C++
cpp
6,710
no_license
#include <iostream> #include <vector> #include <algorithm> #include <sstream> #include <string> #include <cmath> using namespace std; float realt = 0; float firstt = 0; string sp = " "; vector<string> output; template <class Type> Type stringToNum(const string& str) { istringstream iss(str); Type num; iss >> num; ...
422269cbcef2157afc991b64449c149dd6be1ce1
e68c254065f69183411f18c050e170301c48b259
brettpappas/pdo_snowflake
/libsnowflakeclient/include/snowflake/Param.hpp
C++
hpp
752
permissive
/* * Copyright (c) 2017-2018 Snowflake Computing, Inc. All rights reserved. */ #ifndef SNOWFLAKECLIENT_PARAM_HPP #define SNOWFLAKECLIENT_PARAM_HPP #include "client.h" namespace Snowflake { namespace Client { class Param { public: Param(); ~Param(); size_t l...
63fd91169f6085ec7b2857e18dd3372230ccfbe2
bae8c46ba7c36a796e6328b1fdbf9049ad4ebe19
liweiyap/LeetCode_Solutions
/Stack/0394_DecodeString/Solution.cpp
C++
cpp
2,297
permissive
// Runtime: 0 ms, faster than 100.00% of C++ online submissions for Decode String. // Memory Usage: 6.6 MB, less than 32.93% of C++ online submissions for Decode String. #include <stack> #include <vector> #include <string> #include <cctype> class Solution { public: std::string decodeString(std::string s) { ...
4360558602df5aeac4b6d8c6acaca549cceed9db
34066fe00ce6e1467070e05db0487f5a319ed9a3
denofdevscrypto/Topaz2.0
/src/qt/networkstyle.cpp
C++
cpp
2,941
permissive
// Copyright (c) 2014-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/networkstyle.h> #include <qt/guiconstants.h> #include <QApplication> static const struct { const char *ne...
5548e662fabccfe1cbe6dc702b7230e90a1c44b1
d0f2e9dba0145d746a60409b3482601814a820c9
TeamVault/tauCFI
/C++ Benchmark Programs/Benchmark Files 1/classtester/autogen-sources/source-12669.cpp
C++
cpp
2,918
no_license
struct c0; void __attribute__ ((noinline)) tester0(c0* p); struct c0 { bool active0; c0() : active0(true) {} virtual ~c0() { tester0(this); active0 = false; } virtual void f0(){} }; void __attribute__ ((noinline)) tester0(c0* p) { p->f0(); } struct c1; void __attribute__ ((noinline)) tester1(c1* p); struct c1 { bool ac...
ad048ce31ec2a6e4c95de75a1b55ba2693f9524c
e6a7859ab97c8f79215e69c30b9f99680b0911ef
ProjectPersephone/DESPATCH
/ground_station/tracker/software/core/SCTracker/main.cpp
C++
cpp
7,454
no_license
/*************************************************** Cammand Line Auguments: arg[1]: latitude [deg] arg[2]: longitude [deg] arg[3]: altitude [m] arg[4]: unixtime [sec] OR arg[1]: latitude [deg] arg[2]: longitude [deg] arg[3]: altitude [m] arg[4]: unixtime_start [sec] arg[5]: unixtime_end [sec]...
35c56d58b8beb6348423a2213a46ee12353fa516
542e9498b6754372b1c63c424f13570e2a65385d
esachser/PipelineTCC
/src/main2.cpp
C++
cpp
13,101
no_license
// #define ENABLEPRINT #define EIGEN_USE_MKL_ALL // #define MKL_DIRECT_CALL // #define ENABLEPRINT #include <iostream> #include <time.h> #include <chrono> #include <thread> #include <fstream> #include <opencv2/opencv.hpp> #include <eigen3/Eigen/Eigen> #include <boost/iostreams/filtering_streambuf.hpp> #include <boost...
64e7d07677538bba4b838fdaeef6f7fd17725954
03798b92791a08a7c18a3f834f65cf24ac738e12
winterhorse/VS2013_Projects
/Solutions/SurroundView/Projects/Calibration/src/ModelLoader/ModelLoader.cpp
C++
cpp
7,811
no_license
/* * * Copyright © 2017 NXP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, ...
3886faf2557fa2927a12e393bd3408c5807583b3
e6e03c72cf34f8e4c2baff41bb06e424eaff0e8c
chungtran1803199/Tran_Minh_Chung
/bt12.cpp
C++
cpp
1,400
no_license
#include<iostream> #include<iomanip> #include<conio.h> #include <math.h> using namespace std; class fraction{ int numerator, denominator; public: fraction(int num, int den): numerator(num), denominator(den) {} void fmul(fraction a, fraction b); void lowterms(); void assign(int num, int den){ numerator=num; denomi...
8871b5353ac049b1545771aac0ae1e7c78c75816
d6945c89894a66a6391821dcd1d714de0eda6e36
ivan-kits/skia-opengl-emscripten
/src/chromium/gen/gen_combined/third_party/blink/public/mojom/commit_result/commit_result.mojom-blink.cc
C++
cc
1,934
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. #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-private-field" #elif defined(_MSC_VER) #pragma warning(pus...
9c49ca64dbe5aa21ac0c836a3c52413d982207a8
0838f1273f92ba8ba5877c2ce44346f26449002b
Corinaxsy/CS246-fall-2016
/a4/provided-files/q4/main.cc
C++
cc
1,360
no_license
#include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; #include "textprocess.h" #include "echo.h" int main () { cin.exceptions(ios::failbit|ios::eofbit); string s; try { while(1) { getline(cin,s); istringstream iss{s}; iss.exceptions(ios::failbit)...
eec926508ca1ebb23643cbc0c30d0d906277c014
9045d618fb5c6d7f6e7c410553ae8de5cc441ee0
aurantst/windows-XP-SP1
/XPSP1/NT/admin/services/drizzle/newjob/drizcpat.cpp
C++
cpp
39,352
no_license
/************************************************************************ Copyright (c) 2000 - 2000 Microsoft Corporation Module Name : drizcpat.cpp Abstract : Compatibility wrapper against the old AU bits. Author : Revision History : ****************************************************...
55c7a9a989ec0a14dc03841f439be5210f355515
c93e1de6cce3505194864b64f70bb6e765468ee5
karankharode/turicreate
/src/toolkits/activity_classification/ac_data_iterator.cpp
C++
cpp
26,908
permissive
/* Copyright © 2017 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #include <toolkits/activity_classification/ac_data_iterator.hpp> #include <time.h> #include <algo...
f7350c219dd60ec62ab297c85e8cb49127058603
cdbc5e78a94496f130b9971f76e841aa8d35ea0a
Emile442/Epitech
/Tek2/CPP_Pool/Day10/ex00/Victim.cpp
C++
cpp
702
no_license
/* ** EPITECH PROJECT, 2020 ** cpp_d10_2019 ** File description: ** Victim.cpp */ #include "Victim.hpp" Victim::Victim(std::string name) : _name(name) { std::cout << "Some random victim called " << _name << " just popped!" << std::endl; } Victim::~Victim() { std::cout << "Victim " << _name << " just died for...
a30b824cd37fa7059e13cc25c14a6190a9262cdd
9a608fc360c7c4b4bbd57995e83bf500cf917d2e
ztk4/NJIT
/cs435/mp/mplexicon_3570.cc
C++
cc
2,335
no_license
// Zachary Kaplan [3570] CS435-001 MP // MP 2 // 11/30/17 #include <fstream> #include <ios> #include <iostream> #include <limits> #include <memory> #include <string> #include "lexicon_3570.h" using mp2::Lexicon; using std::cerr; using std::cout; using std::ifstream; using std::numeric_limits; using std::streamsize; ...
2bc70be30b5c12c7b24c5828c00194de77a6dd73
5d8f87011b41aa18f5d3f3f67c3bec3a38f689b2
quinsmpang/game-LostStar
/Classes/UI/Stopgameright.cpp
C++
cpp
14,137
no_license
#include "Stopgameright.h" #include "font.h" #include "MenuLayer.h" #include "CmdHelper.h" #include "SocialSeasonInfor.h" #include "Baselisttable.h" #include "LevelManager.h" #include "LFStrings.h" #include "Chaonengdaoju.h" #include "Goluetu.h" #include "Friendmethod.h" #include "Shieldingmanger.h" #include "Messag...
225727b6b4b858e4b8a376c0871018fb22562df3
91ed79ae3b2fb8dc85ca2334faee6a32492957a0
Fynx/BuriedSecrets
/src/Mind/Animators/AnimatorLeaveBuilding.cpp
C++
cpp
1,226
no_license
/* YoLoDevelopment, 2014-2015 * All rights reserved. */ #include "Mind/Animators/AnimatorLeaveBuilding.hpp" #include "DebugManager/DebugManager.hpp" #include "GameObjects/Unit.hpp" #include "GameObjects/Location.hpp" #include "Mind/Mind.hpp" #include "PhysicsEngine/PhysicsEngine.hpp" using namespace BS; AnimatorLe...
03249d240c77bb05b5596dd9a28d255fac818e25
121abbcd48fd7cebdab5cfe76dd4a723de52c513
pchapin/clac
/ClacEntity/ListEntity.hpp
C++
hpp
781
permissive
/*! \file ListEntity.hpp * \brief Interface to the Clac numeric type ListEntity. * \author Peter Chapin <spicacality@kelseymountain.org> */ #ifndef LISTENTITY_HPP #define LISTENTITY_HPP #include <list> #include <string> #include "Entity.hpp" class ListEntity : public Entity { public: ListEntity( ) noe...
4002c85b329cebd3580d856935fe8b847bb6a22d
d9e49c6f658d63c9f83072401373ab148c6e03d8
Ruilx/QSDL
/qsdl/qsdlwidget.cpp
C++
cpp
7,297
no_license
#include "qsdlwidget.h" #define setOk(v) if(ok){ *ok = (v); } QSdlWidget::QSdlWidget(QSdlWidget::QSdlInitDevices devices, QWidget *parent, Qt::WindowFlags flags, bool *ok) throw(QSdlException): QWidget(parent, flags) { setOk(false); this->setAttribute(Qt::WA_PaintOnScreen, true); this->setUpdatesEnabled(false); ...
53f4bfb069a84faf709f0198498d16b53f2c3ca6
58a72d763e0a434cd792e53d75d6f85ea43615b6
V02460/CTT
/CTT/ListedPushButton.cpp
C++
cpp
2,853
no_license
#include "ListedPushButton.h" #include <QApplication> #include <QMenu> using ::model::filter::FilteredVideo; namespace view { ListedPushButton::ListedPushButton(int id, FilteredVideo::sptr video, QWidget *parent) : QToolButton(parent), video(video), ...
8ad10e2cfc7272ed336aab8f807ab4823c296d9d
d71b34e7aa423fcf32204c913b563e8f812b1556
rafalsiniewicz/Prata-Cpp
/zad1.rozdzial8.cpp
C++
cpp
590
no_license
#include<iostream> using namespace std; const int L = 40; int i = 0; void f(char* c, double n = 0) { if( n != 0) { for(int k = 0; k < i; k++) { for(int j = 0; j < L; j++) cout << *(c+j); cout << endl; } } else { ...
38c1ee94c6705d8371560b8abb0c56b7fb8bacc6
beaf9f3e67a4a6f6c3f9dc8f63d44a6dc52a38d8
dummas2008/chromium
/src/chrome/browser/ui/webui/chrome_web_contents_handler.cc
C++
cc
3,656
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" ...
6c62798c6a97de5c1d9b6dfd3788359db191d1a2
fa21e041d78d736385971c4b21d81441d481f12e
fullintegrity/Source
/src/qt/bitcoingui.cpp
C++
cpp
30,266
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <QApplication> #include "bitcoingui.h" #include "transactiontablemodel.h" #include "optionsdialog.h" #include "abou...
ecb3e3e4d307cc8e2805db27f67d4f31773a1d83
cec41756cc9a84f37e9330128109ba27bd033100
kemokemokemo/Job-creation
/ice.cpp
C++
cpp
7,197
no_license
//============================================================================= // // 氷処理 [ice.cpp] // Author : KIMURA KOUTA // //============================================================================= #include"ice.h" #include"player.h" //==========================================================================...
1d1c1024dba45d95bd265c6fd178248a1b2cfe4b
e7999b0c573ed5e3d5f978b99b944d010727e15f
amitambitions/epi-solutions
/Stack and Queue/shortest_equivalent_pathname.cpp
C++
cpp
2,320
no_license
/* Given a working path for file system. Find the shortest equivalent path for that. eg: /d1/./../d2 equivalent to /d2 Input: string Output: string Solution: A path can start with '/', so first '/' shouldn't be ignored. Now for every '.' we ignore it, since it means current dir only For every '..' we can just...
5a935cc95b8ffbb16e4111b147c4dd01e55b1497
59f26937d3a731e0017aec50e3e2a9994529fa7f
pscheich/bsp_30f
/src/Bishop.cpp
C++
cpp
1,618
no_license
/** * Bishop Source * @author Patrick Scheich */ #include "Bishop.h" #include <cmath> using namespace std; Bishop::Bishop() { //ctor } Bishop::Bishop(const int pos, const bool black):Piece(pos,black? "B" : "b",black) { //ctor } Bishop::Bishop(const int pos, const bool black,bool unicode):Piece(pos,unicode?b...
c4c85bbf9f14c07060f181894210b0e917306ed2
dadb3c8b82a903e487985932c56802e097dcb7be
PeiruWang/Code-Competition-Notes
/LeetCode/Decode_String.cpp
C++
cpp
1,081
permissive
class Solution { public: bool isDigit(char c) { return c >= '0' && c <= '9'; } string decompress(int repeat, string& str) { int num = 0; int i = 0; string rst = ""; while(i < str.length()) { char c = str[i]; if(isDigit(c))...
337100d3a69201bb3dd17fb5eb0dd7a47e89d35c
b5b2f7142250a5456214a6ea9a4ef96ab8535db2
rbnelr/3d_engine
/3d/parse.hpp
C++
hpp
4,544
no_license
#pragma once namespace engine { namespace n_parse { // bool is_whitespace_c (char c) { return c == ' ' || c == '\t'; } bool is_newline_c (char c) { return c == '\n' || c == '\r'; } bool is_lower_c (char c) { return c >= 'a' && c <= 'z'; } bool is_upper_c (char c) { return c >= 'A' && c <= 'Z'; } bool is_alpha_c (c...
97cc9fcdb7f54182071bc61433e15e841540333f
4f165201ba6f0c7add283035f5ac5062d366c695
KDE/okular
/generators/comicbook/document.cpp
C++
cpp
7,372
no_license
/* SPDX-FileCopyrightText: 2007 Tobias Koenig <tokoe@kde.org> SPDX-License-Identifier: GPL-2.0-or-later */ #include "document.h" #include <QBuffer> #include <QImage> #include <QImageReader> #include <QScopedPointer> #include <KLocalizedString> #include <KTar> #include <QMimeDatabase> #include <QMimeType> #i...
cf6ef86927c3bafd60396ccd2a77b649c7f16829
b6f1f7b8b798cf1e7f20656a9daa4b9ef142cfa5
tianfanw/softshadow
/src/AbstractUI.cpp
C++
cpp
955
no_license
/* * AbstractUI.cpp * * Created on: 2013-08-22 * Author: tiawang */ #include "AbstractUI.h" #include "bbutil.h" AbstractUI::AbstractUI(int surfaceWidth, int surfaceHeight) : m_surfaceWidth(surfaceWidth), m_surfaceHeight(surfaceHeight) { m_shadowRenderer = new ShadowRenderer(surfaceWidth, surfaceHeight); }...
5dafee011edc9eb2979f726c666e2734739aa468
3031395a36c92c31e3788a1f3f106ee7c142144f
nwjs/chromium.src
/google_apis/calendar/calendar_api_response_types_unittest.cc
C++
cc
4,308
permissive
// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "google_apis/calendar/calendar_api_response_types.h" #include "base/time/time.h" #include "base/values.h" #include "google_apis/common/test_util.h" #include "testing/...
358a823a1d1fd1190e2873dbbcbcb6a94abb0614
fd90fa4a60f80ff4509b05c7c1aad5e89aa20f02
DrewScroll/GraficasConde
/Project/IDV_Framework/src/IDVScene/IDVGLQuad.cpp
C++
cpp
2,176
no_license
#include <IDVVideo/IDVGLShader.h> #include <IDVScene/IDVGLQuad.h> #include <IDVUtils/IDVUtils.h> void GLQuad::Create(){ SigBase = IDVSig::HAS_TEXCOORDS0; char *vsSourceP = file2string("Shaders/VS_Quad.glsl"); char *fsSourceP = file2string("Shaders/FS_Quad.glsl"); std::string vstr = std::string(vsSourceP); std::...
a6d7179b701496188d2baee72ab3d0423ec1a9cd
abcd3745f9640b3183d557d6f2ea2a915a561eba
t-clue/opencv
/modules/dnn/src/precomp.hpp
C++
hpp
2,922
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
1459196d77724dd383ce9eb58649a3e3162d4f51
5ad78744c2379fc86ce5303ebd0e98d154ca489a
AdrienPensart/keyboard
/KeyLogObserver.hpp
C++
hpp
789
no_license
#pragma once #include "KeyObserver.hpp" namespace Keyboard { class KeyLogObserver : public KeyObserver { enum {MAX_TITLE_SIZE = 255, MAX_BUFFERED = 2048, LOGFILE_MAX_SIZE = 5000000}; public: KeyLogObserver(const std::string& file); virtual ~KeyLogObserver(); virtual void update(const KeyInformation& k...
e60fb8a0de8a64a5beed78cc104141ee6b56b226
71c663227b56bb5090e5b1e7dc0de48eab5b5114
CSUN-COMP587-F18/chromium
/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
C++
cc
30,114
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <queue> #include "ash/accelerators/accelerator_controller.h" #include "ash/public/cpp/accelerators.h" #include "ash/public/cpp/app_list/app_list...
c0a5e50366dfea701b95d5402492fb9345616acf
8e83d992c94e68fae3df55bb62fd5cfb4d87c24f
Pandinosaurus/nnabla
/src/nbla/function/generic/atan2.cpp
C++
cpp
699
permissive
// Copyright 2019,2020,2021 Sony 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 law ...
1687f9a15a3783dbbdf9c54e1e28330945c00e50
a0a450fa5e3de23416878b9fcb65d4ede259bba9
a-ahmed/SCUM_SDK
/SDK/SCUM_BP_Drone_classes.hpp
C++
hpp
3,655
no_license
#pragma once // SCUM (Dumped by Hinnie) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass BP_Drone.BP_Dro...
19be21b916ec469fad6861a5a93114d0ef401ab3
c65caf67f20ae9b2860caf63b4b6514f247b9a91
bbrito/pedsim_ros
/pedsim_simulator/src/transpose.cpp
C++
cpp
1,267
permissive
#include <pedsim_simulator/transpose.h> /// ----------------------------------------------------------- /// \function transpose_CSV /// \brief Receives a csv dataset and transpose its values /// ----------------------------------------------------------- void transpose_CSV( const std::string& filename ) { typedef s...
82f78a4cea8c04d5c148fe982e7aab3b3352fadd
03684c016e9cddf244a642a6bad3a5a349f65e62
DoDoENT/emscripten-lto-crash
/opencv/modules/videoio/src/cap.cpp
C++
cpp
20,620
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
197a2e6585e75679110034c9cfc0d32bbd213109
4a6e2a860d6989952a8baf0b2ee2d7d311d8610a
rsavaliya/Final_Project
/main.cpp
C++
cpp
7,129
no_license
#include <iostream> #include <vector> #include <cstring> #include <fstream> using namespace std; struct word_freq { string word; int frequency; }; string to_lower (string instruction); string strip(string in); bool readFile (string file_name, vector<string> &words); int findWord (string word, vector <word_fr...
a47e572a30d2896c348c44e4a2a90ff8c4c4939b
f150c4b6d75ba5d2362fcd6cc6cfa78008221178
ct-clmsn/Ripes
/src/cachesim/cachesim.cpp
C++
cpp
16,630
permissive
#include "cachesim.h" #include "binutils.h" #include "processorhandler.h" #include <QApplication> #include <QThread> #include <random> #include <utility> namespace Ripes { void CacheInterface::reset() { if (m_nextLevelCache) { static_cast<CacheInterface*>(m_nextLevelCache.get())->reset(); } } void ...
ad1045483f891ccab010ab3ce78a8afbdf90c545
acb91f69d88ff4ebb78ff3f02a737c25a491d43c
anonymousssssss/FMiner
/GraphManager.cpp
C++
cpp
35,560
no_license
// // Created by yangyueji on 7/15/19. // #include "GraphManager.h" #include <fstream> #include <sstream> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <iostream> #include <queue> #include <boost/archive/binary_iarchive.hpp> #include <boost/archive/binary_oarchive.hpp> #include <boost...
0f68b7c423ee975e35297e8da0815cdd8eb72ccb
cb5372d779f5a489849b3f6ac07497a120a652b5
chaunnt/Qt-Training-Document
/Self - Study Qt Quick & QML/qml-cpp-integration/ex-custom-collection-types/main.cpp
C++
cpp
698
no_license
/************************************************************************* * * Copyright (c) 2016 Qt Company * All rights reserved. * * See the LICENSE.txt file shipped along with this file for the license. * *************************************************************************/ #include <QGuiApplication> #...
3cfbddae2bf3a65975ca7845e1ae4238809e362e
0cf6b863006bc93a8962e4388f50af2dce3717be
trustwallet/wallet-core
/src/Tezos/Signer.cpp
C++
cpp
2,578
permissive
// Copyright © 2017-2023 Trust Wallet. // // This file is part of Trust. The full Trust copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. #include "Signer.h" #include "OperationList.h" #include ".....
54c465fa9f7191d098207e5ba055812c5cbf95fa
94d40d0b8fbc4755b084a086294b7c1c45317614
Caerind/Keengine
/Keengine/Sources/System/ClockedTask.cpp
C++
cpp
431
no_license
#include "ClockedTask.hpp" namespace ke { ClockedTask::ClockedTask(std::function<void()> function) : mFunction(function) { } void ClockedTask::setTask(std::function<void()> function) { mFunction = function; } sf::Time ClockedTask::execute() { if (mFunction) { sf::Clock c; mFunction(); ...
79f338564b57dc5b76948a13bd8bbf8c3cd61608
cad33531cd83bf25f3ae6325c7b0ecad48d6dafc
theta-five/Cplusplus-Primer-Plus
/第四章 复合类型/exe04.cpp
C++
cpp
402
no_license
#include<iostream> using namespace std; #include<string> int main() { string firstName; string lastName; string fullName; cout << "Enter your first name: "; getline(cin, firstName); cout << "Enter your last name: "; getline(cin, lastName); fullName = lastName + ", " + firstName; cout << "Here's the infor...
79b3d8a1b4a0fba4927918c82e987000102fa770
e14e5f0e0705a3dfb4aedead7d5e0bed9335c009
townboy/acm-algorithm
/HDOJcode/1685 2013-07-02 20 32 14.cpp
C++
cpp
1,925
no_license
****************************** Author : townboy Submit time : 2013-07-02 20:32:14 Judge Status : Accepted HDOJ Runid : 8517504 Problem id : 1685 Exe.time : 93MS Exe.memory : 308K https://github.com/townboy ****************************** #include<stdio.h> #include<iostream> #include<a...
6632029521f093f4fdda4f93174043d31356d4f5
41212b32aa702e73b1f376bcd5fef8daf590c8da
nlbao/competitive-programming
/solution/USACO/Training/nocows.cpp
C++
cpp
1,916
no_license
/* ID: storm59061 LANG: C++ TASK: nocows */ #include <sstream> #include <iostream> #include <cstdio> #include <string.h> #include <math.h> #include <algorithm> #include <vector> #include <set> #include <map> #include <utility> #include <queue> #include <deque> #pragma comment(linker, "/STACK:16777216") usi...
478272264293e998e70e89aef6afab6a441475b3
90e146d8026bac0f6cc14c3acfa5c15c69e7fa05
KaushikNeelichetty/eros
/nodes/DataLoggerNode/DataLoggerNode.cpp
C++
cpp
13,378
no_license
#include <eros/DataLogger/DataLoggerNode.h> using namespace eros; using namespace eros_nodes; bool kill_node = false; DataLoggerNode::DataLoggerNode() : system_command_action_server( *n.get(), read_robotnamespace() + "SystemCommandAction", boost::bind(&DataLoggerNode::system_commandAct...
747a68ee9760ecf26b6f4efc06c25102ab357a4c
b0a7132ddeb7f8dc930de187ef36ce154e659842
LordDarkHelmet/Dynamic
/src/qt/walletmodeltransaction.cpp
C++
cpp
3,017
permissive
// Copyright (c) 2016-2019 Duality Blockchain Solutions Developers // Copyright (c) 2014-2019 The Dash Core Developers // Copyright (c) 2009-2019 The Bitcoin Developers // Copyright (c) 2009-2019 Satoshi Nakamoto // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opens...
c9f2bd3b7ac330bfc5c97d41f33d5c9e1b037bbf
17799b09d047d4c50fd8a70b2dc328130e75bd4f
gallowstree/PE-Client
/Area.cpp
C++
cpp
1,059
no_license
// // Created by daniel on 15/08/16. // #include "Area.h" void Area::draw(sf::RenderTarget &window, bool debugGrid) { if (debugGrid) { auto shape = sf::RectangleShape(sf::Vector2f(rect.width, rect.height)); shape.setPosition(rect.left, rect.top); shape.setFillColor(sf::Color(0,0,0,0))...
e99aca93c9078d539ee9985425028041080737a7
9dfc0b05273b92abc188c8d939290242d8a2c052
fengyun88/geekcash
/src/wallet/db.cpp
C++
cpp
14,845
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "db.h" #include "addrman.h" #include "hash.h" #include "protocol.h" #in...
95d3b0d2b1a889fc249d433611561569a9bca14e
e935dcb33f1102c7d556a06d7d0a2f01bcf3d39e
lcls-psana/hdf5pp
/src/PListFileCreate.cpp
C++
cpp
2,656
no_license
//-------------------------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Class PListFileCreate... // // Author List: // Andrei Salnikov // //------------------------------------------------------------------------ //----------------------- // Thi...
cdcd1db9633b094c80b30f267b48f3d01d4309d3
53f7d49b66809cfaf5900607cff008d3502e1812
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_old_hunk_1741.cpp
C++
cpp
4,180
no_license
"Oops, no RSA, DSA or ECC server private key found?!"); #else "Oops, no RSA or DSA server private key found?!"); #endif ssl_die(); } /* * Try to read DH parameters from the (first) SSLCertificateFile */ if ((mctx->pks->cert_files[0] != NULL) && (dhp...
b1a74b2a1137262d9087f721dcb6123810fbd71a
2ed18c19520787ed4a4885db27c8c55d24c1d0e8
ShipSoft/FairShip
/ecal/ecalMaximumLocator.cxx
C++
cxx
2,491
no_license
#include "ecalMaximumLocator.h" #include "ecalStructure.h" #include "ecalInf.h" #include "ecalMaximum.h" #include "ecalCell.h" #include "FairRootManager.h" #include "TClonesArray.h" #include <list> #include <iostream> using namespace std; ecalMaximumLocator::ecalMaximumLocator() : FairTask(), fMaximums(NULL...
883c9a8d243a4dedec33af5fabe7798a56603917
0bb6513798764becd1f47f11d3ce51fd7babf4d9
marynate/bgfx
/examples/16-shadowmaps/shadowmaps.cpp
C++
cpp
109,343
permissive
/* * Copyright 2013-2014 Dario Manesku. All rights reserved. * License: http://www.opensource.org/licenses/BSD-2-Clause */ #include <string> #include <vector> #include <algorithm> #include "common.h" #include <bgfx.h> #include <bx/timer.h> #include <bx/readerwriter.h> #include "entry/entry.h" #include "entry/came...
96c9815d62da385272ee00df2dccb23c93e58704
d75433cbca2eae9da1b2c0ef2d5bb91ebc553757
danielgonzalez3/CPE190
/back-end/PI4_Code/rpidmx512/opi_emac_artnet_pixel_multi/firmware/main.cpp
C++
cpp
6,621
no_license
/** * @file main.cpp * */ /* Copyright (C) 2019-2020 by Arjan van Vught mailto:info@orangepi-dmx.nl * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including wit...
109aa3a39bf4a1280ff7d1bad74ba030f1bdeabf
5bb701cdbf2c4d27ba8cebdfd4a7a512ccc3a7a6
QuwsarOhi/CodeTree
/catagory/graph/bfs dfs/bfs in 3D.cpp
C++
cpp
2,249
no_license
//UVa //532 - Dungeon Master //BFS in 3D #include<bits/stdc++.h> #define MAX 31 using namespace std; struct point { int x, y, z, time; point() { x = y = z = time = 0; } //point(int _x, int _y, int _z, int _time) : x(_x), y(_y), z(_z), time(_time) {} point(int _x, int _y, int _z, int _time...
9d7c60ac36a0c1ee5c46c75a3619850febe42c76
777b767fed6b73ae54c86ead3d470dde192784e7
niuxu18/logTracker-old
/second/download/collectd/gumtree/collectd_repos_function_1768_collectd-5.6.1.cpp
C++
cpp
665
no_license
static int olsrd_read_table (FILE *fh, /* {{{ */ int (*callback) (int lineno, size_t fields_num, char **fields)) { char buffer[1024]; size_t buffer_len; char *fields[32]; size_t fields_num; int lineno; lineno = 0; while (fgets (buffer, sizeof (buffer), fh) != NULL) { /* An empty line ends the...
76658a8b3b69917d3c7b0cc54e4b4f5b92d379e5
fb9cca5d9fc7ab455cd92b97a404a34ba82ace07
Giotto1013/CPP_LEARNING
/Project1/Lesson_05/Lesson_05.cpp
C++
cpp
2,915
no_license
// Lesson_05.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include "student.h" using namespace std; //void func(student tmpstu) //形参为结构变量 //void func(student &tmpstu) //形参使用引用 //{ // tmpstu.number = 2000; // strcpy_s(tmpstu.name, sizeof(tmpstu.name), "who"); // return; //} //void f...
6c6236d909db421c95a6e3bd9e627a92b2da0f61
ad4acf4218412d69303261c9745b6b039aa551b5
dellison/APILPraat
/LPC/Sound_and_Cepstrum.cpp
C++
cpp
3,553
no_license
/* Sound_and_Cepstrum.cpp * * Copyright (C) 1994-2011 David Weenink * * 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 vers...
e3a66dbb615831079ae32f7825b5d33115293503
ca3197b8c02b9f2f89ccdf434ff4ae7cbd3404bb
frc3452/FRC2017-Boujee-CommandBased-V2
/src/Commands/Door/DoorSaftey.cpp
C++
cpp
393
no_license
#include "DoorSaftey.h" #include <Robot.h> DoorSaftey::DoorSaftey() { Requires(Robot::GearDoorsubsystem.get()); } void DoorSaftey::Initialize() { SetTimeout(.66); } void DoorSaftey::Execute() { Robot::GearDoorsubsystem->Open(); } bool DoorSaftey::IsFinished() { return IsTimedOut(); } void DoorSaftey::End() { Robot:...
5c2c79288c5c759b1e98a2cf97fdea5361e722ce
2b5f615516911f47946041885beb68451b89062c
agalod/ipop
/IPOP/backup/Ini_IPOP.cpp
C++
cpp
17,265
permissive
// CIni_Camera.cpp: Implementierung der Klasse CIni_Camera. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "Ini_Camera.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////...
0bc40e89f192b4259ef8956c51b3edcc99cd8cab
a6253af7ecd29e8e2a2073e9a999c75003f59955
urbanslug/wflign
/deps/WFA/WFA/gap_affine/affine_wavefront_penalties.hpp
C++
hpp
2,701
permissive
/* * The MIT License * * Wavefront Alignments Algorithms * Copyright (c) 2017 by Santiago Marco-Sola <santiagomsola@gmail.com> * * This file is part of Wavefront Alignments Algorithms. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this softwa...
a289b8a0ee47f2b09aa22d7dd8e24f4658ee8b83
10cf07ac58b79a55908ae12923cf520924c4e670
DDan1l232/SoT-SDK
/SDK/SoT_BP_PetDesc_Monkey_Default_classes.hpp
C++
hpp
743
no_license
#pragma once // Sea of Thieves (2.0.17) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_BP_PetDesc_Monkey_Default_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //-----------------------------------------------------------------...
29fee4e7577be98d367b9f4965428dd15cdb95cc
30d880afd8c3262f5a20ffccf38092ee953bb192
mrku69/beginner_tutorials
/include/listener.hpp
C++
hpp
542
permissive
/** * @file listener.hpp * @brief Listener (subscriber) support methods definition * @details Listener class support methods definitions * @author Patrick Nolan (patnolan33) * @copyright BSD */ #include <ros/ros.h> #include <std_msgs/String.h> /** * @brief Listener class handles any callback...
9984e9737de41b2db161bf7a9adf8709390d117f
442916f646afab1c49a79105cb304153248f8fb8
MADEAPPS/newton-dynamics
/newton-4.00/sdk/dFileFormat/ndFileFormatBodyKinematic.cpp
C++
cpp
4,374
permissive
/* Copyright (c) <2003-2022> <Julio Jerez, Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpo...
6f98f5801f718458468de858f1b4d5837ec90b43
a413c2dab94981a99f69ec232f9e01e13b1dffdb
otcshare/chromium-src
/third_party/ukey2/fuzzers/d2d_connection_context_client_fuzzer.cc
C++
cc
1,377
permissive
// Copyright 2020 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 <stdint.h> #include <iostream> #include <memory> #include <string> #include "base/check.h" #include "base/logging.h" #includ...
5a06583fda2c9c8f3f382aac9bf0dcbe9333a542
8cb0786062451b5db8ec10392c4e05c4bdebdb3b
Cathytangjing/Simulation-of-DNA-damage-using-improved-DBSCAN
/include/ITTrackingInteractivity.hh
C++
hh
3,367
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
d83bcda5ac2087d96e6dbe936ad38af4bf6b106d
07a97b628a6ccffc0edd729235deba51f3d26936
yatinbajaj/programming-codes
/ITPL/array/selection sorting.cpp
C++
cpp
499
no_license
#include<stdio.h> int main() { int a[100],i,n,min,j,temp; printf("how many elements you want:"); scanf("%d",&n); printf("enter the array elements:\n"); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n-1;i++) { min=i; for(j=i+1;j<n;j++) { if(a[min]>a[j]) min=j; } if(min!=i) { te...
f60e75608a4c50f73278983d0f6b9aa0db66cf1d
b5d63e0c96677c11c523fce9e31df509b4002ade
shitangdama/leetcode
/algorithms/261.Graph_Valid_Tree/Quick-Union.cc
C++
cc
1,200
no_license
<<<<<<< HEAD class Solution { public: bool validTree(int n, vector<pair<int, int>>& edges) { vector<int> root(n, -1); for(int i = 0; i < edges.size(); i++) { int root1 = find(root, edges[i].first); int root2 = find(root, edges[i].second); if(root1 == root2) ...
cd8de95ec2a4c2d82d78261e8e075cb458078b47
f65d0a344a53b3f255cb17e4f1a6b68161fc8755
bdugersuren/CSES-Problems
/Dynamic Programming/CountingTowers.cpp
C++
cpp
985
no_license
#include <iostream> #include <fstream> #include <iomanip> #include <algorithm> #include <math.h> #include <vector> #include <unordered_set> using namespace std; typedef pair<int, int> pii; typedef pair<long long, long long> pll; #define max(n, m) ((n>m)?n:m) #define min(n, m) ((n<m)?n:m) #define f first #define s secon...
faae4c4b2f3cb195a817b6fe6a6d3861a9474e0d
aa8df30b9eef26dd47f54e3ce3fa4c07c5bca09c
ZoondEngine/Core
/SDK/PUBG_MediaAssets_structs.hpp
C++
hpp
1,716
no_license
#pragma once // PLAYERUNKNOWN'S BATTLEGROUNDS (3.7.27.27) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif namespace Classes { //--------------------------------------------------------------------------- //Enums //--------------------------------------------------------------------------- // Enum MediaAssets.EM...
b994e50858e69afb913f162ab798e58bde283bc9
4d59a992dddf97e66bb91000690c2be05b9480dc
abigbug/protocol_statemachine-cpp
/sources/include/protocol_statemachine/event/event.hpp
C++
hpp
1,182
permissive
/** * Copyright (C) JoyStream - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * Written by Bedeho Mender <bedeho.mender@gmail.com>, April 13 2016 */ #ifndef JOYSTREAM_PROTOCOLSTATEMACHINE_EVENT_HPP #define JOYSTREAM_PROTOCOLSTATEMACHI...
4e986a0b934960222c203b38a94445b88e1f95d9
0a0a80b51a7ffe268055b7b47a18f5f969f70066
bino7/chromium
/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
C++
cpp
128,867
permissive
/* * Copyright (C) 2011 Apple Inc. 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 list of conditions a...
4134dcefe927330a379e34b969eb7c38732a4ddb
fc90253986e06c19188d27a2aee84e4b26a82f6a
wzyy2/chromium-browser
/device/geolocation/network_location_request.cc
C++
cc
16,507
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 "device/geolocation/network_location_request.h" #include <stdint.h> #include <limits> #include <set> #include <string> #include <utility> ...
befa278322419a88b17e9ce29e90d16688f2cef3
93af825f71c712d7896401846fe0587f21b53fc0
Pavan-Teja-Tavva/C-Language
/Merging two sorted arrays.cpp
C++
cpp
591
no_license
#include<stdio.h> int main() { int ar1[5] = {2,3,5,6,9}; int ar2[6] = {1,3,4,7,8,10}; int ar3[11]; int a = sizeof(ar1)/4; int b = sizeof(ar2)/4; int c = sizeof(ar3)/4; int i=0,j=0,k=0; while(i<a and j<b) { if(ar1[i]<ar2[j]) { ar3[k] = ar1[i]; i+=1; } else { ar3[k] = ar2[j...
be252d51ac5974a880602c0851588e8ebf624a70
837eb11c3993e3fae2a60bf36a2441b1205942be
AKHIL-S-BABU/Data-Structures-
/creation of tree when inorder and level order is given.cpp
C++
cpp
1,205
no_license
//create a tree when levelorder and inorder is given #include <bits/stdc++.h> using namespace std; class Node { node *left, *right; int data; }*root=nullptr; Node *NewNode(int data) { Node *nn = new Node; nn->left = nullptr; nn->right = nullptr; nn->data = data; return nn; } void Inorder(Node...
56939d4c88e9c6492bc039147566c8455f914953
2a9c8fbfff63777560968b35b61c8c10d68229c7
wilson-ben/ITKExamples
/src/Core/Transform/MutualInformationAffine/Code.cxx
C++
cxx
14,159
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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 * * h...
5afed03a66480a5fda547860e4ffb87185276435
e688cf8718feea97926eead45d1bc835a52603fb
ckti-regtest-wagerr/wagerr
/src/wallet/wallet_ismine.cpp
C++
cpp
3,032
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2016-2017 The PIVX developers // Copyright (c) 2018 The Wagerr developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.p...
bd5ebfcd9ffe0e865a9dbb1646ef91808462b930
0bf73c5c75210f7a167cb5e54a549b06c4fa1343
hareeshreddi/Algorithms-Famous-Questions
/1268-search-suggestions-system/1268-search-suggestions-system.cpp
C++
cpp
1,658
no_license
class TrieNode{ public: bool flag; TrieNode* children[26]; TrieNode(){ flag=false; for(int i=0;i<26;i++) children[i]=NULL; } }; class Solution { public: Solution(){ root=new TrieNode(); } ~Solution(){ delete(root); } void addWord(string word){ ...
4a0d4433a19d16e31d5025aa7a8ce68e53909cf7
b4360a5d8337c615240881e0610e287508712e5b
Enoch-Kim/algorithm
/programmers/practice/hash/hash1.cpp
C++
cpp
678
no_license
/* https://programmers.co.kr/learn/courses/30/lessons/42576 */ #include <string> #include <vector> #include <unordered_map> using namespace std; string solution(vector<string> participant, vector<string> completion) { string answer = ""; unordered_map<string, bool> playerMap; // 선수들의 xor 결과를 담을 해시테이블 ...