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
1e38e79a2b9a1bae8cd6523bab05448ee606d780
b28bc91d0f78b39a4225dea4900685061196bd83
lokeshbv/TizenRT
/external/libcxx-test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp
C++
cpp
7,113
permissive
/**************************************************************************** * * Copyright 2018 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at...
34b5d8b67b53fb650fe6ed8c67f58022278cae7e
b48c62359a1dc404ed7e8b7cf0431317c4cf519b
PlasmaPower/raiblocks
/rai/qt/qt.cpp
C++
cpp
69,433
permissive
#include <rai/qt/qt.hpp> #include <boost/property_tree/json_parser.hpp> #include <sstream> namespace { void show_line_error (QLineEdit & line) { line.setStyleSheet ("QLineEdit { color: red }"); } void show_line_ok (QLineEdit & line) { line.setStyleSheet ("QLineEdit { color: black }"); } void show_line_success (QLi...
337fa5e597c36dafcf47e849748775ee636c5970
7b56372086e521efc27d5ddb9141b66e5fbe66eb
awwwq/shuaTi
/PAT/basic/1029.cpp
C++
cpp
786
no_license
#include <iostream> #include <vector> #include <string.h> #include <algorithm> #include <cmath> using namespace std; char upper(char ch){ if(ch>='a'&&ch<='z'){ return ch-'a'+'A'; } else return ch; } bool isin(string s,char ch){ int length=s.length(); for(int i=0;i<length;i++){ if(uppe...
57135d713359e503f3b19786429e20cee0dc6dbf
d7ff6bc7bc911986c7f76f1f82580c4680e69546
ashcyc673/Introduction-to-Object-Oriented-Programming
/Workshop7/Truck.cpp
C++
cpp
2,127
no_license
//============================================== // Name: Chiao-Ya Chang // Student Number: 130402191 // Email: cchang76@myseneca.ca // Section: NEE // Date: 07/15/2020 //============================================== // Workshop: 7 // Part: 1 //===============================...
eee70f4347df6185eda2bb585c668c873ee8a248
97f212730a0edfc3f1654cc60e266f729dec2f84
TomColdenhoff/FPS
/FPS/Source/FPS/Player/Interaction.cpp
C++
cpp
1,893
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Interaction.h" #include "Runtime/Engine/Classes/Camera/CameraComponent.h" #include "FPSPlayer.h" #include "Runtime/Engine/Classes/Engine/World.h" #include "DrawDebugHelpers.h" #include "../Level/InteractAble.h" // Sets default v...
6332f25fc79e51b6eb1afd674db6b8347ec40974
a0ca58032d8cf3743025f68d5870e691648062cd
iammeatchunky/calculator
/src/Calculator/Views/UnitConverter.xaml.cpp
C++
cpp
12,577
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // UnitConverter.xaml.cpp // Implementation of the UnitConverter class #include "pch.h" #include "UnitConverter.xaml.h" #include "CalcViewModel/UnitConverterViewModel.h" #include "Controls/CalculationResult.h" #include "Co...
d03fc563930be601f51560a483c001ebe25e6dc4
7a8ccc0844b45df0e31698c72c0439acf72216f2
flotisable/PD_PA1
/parser.cpp
C++
cpp
2,966
no_license
#include "parser.h" #include <fstream> #include <sstream> #include <string> #include <cstdlib> #include <stdexcept> using namespace std; ostream& operator<<( ostream &out, const Parser::ParseResult &result ) /*{{{*/ { out << "balance degree : " << result.balanceDegree << "\n"; // output net information {{{ fo...
316620ebce061bbe82dc10a4d510107d09fc5d38
e6b7e6202f852fd1fa96cb7b0e4bec6c568e85f6
MedicaicloudLink/Rosetta
/main/source/src/protocols/moves/FilterMover.cc
C++
cc
2,774
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
d8645d04efe2d51de2a1928c0be2675873271e12
823187d8cd1b8b0439b9cf8a96a2ab424d321d92
zhanglGitHub/windows_10_shared_source_kit
/windows_10_shared_source_kit/windows_10_shared_source_kit/unknown_version_2/Source/Tests/Graphics/Graphics/DirectX/dxgi/conf/GetDispSurfData/DrawD3D10Scene.cpp
C++
cpp
26,660
no_license
/************************************************************ * * File: DrawD3D10Scene.cpp * Class definitions for drawing a 2D checker pattern in 3D space. * Copyright (c) Microsoft Corporation, 2007 * * Program: GetDispSurfData - API Test for IDXGIOutput::GetDisplaySurfaceData() * Crea...
f013eafc805ace387d02c12961d600db9fae505d
9206bbd975f1de9e5fa32c673ea4c5f17870f7f7
sahilskumar/Implementation
/sorting/O(N)/counting sort.cpp
C++
cpp
1,020
no_license
//for negative numbers too //time complexity : O(n+k) k=range //Counting sort uses a partial hashing to count the occurrence of the data object in O(1). //The Counting sort is a stable sort i.e., multiple keys with the same value are placed in //the sorted array in the same order that they appear in the input array. ...
825485bda5d15a120c5601630786813a63e1f27a
a472cf1dcd080c137a1a02fe8b51b90a85a602ee
muzzy404/first-kepler-law
/source/graph.hpp
C++
hpp
614
no_license
#ifndef KEPLER_GRAPH #define KEPLER_GRAPH #include <SFML/Graphics.hpp> class KeplerGraph : public sf::Drawable { public: KeplerGraph(const std::string &); typedef std::vector<std::pair<float, float>> LinesVect; void calculate(const sf::Vector2f &, const sf::Vector2f &, std::vec...
2d2ebcf0c99936d4bbdc63eddd74ac9b2ba03715
d639a0289c67588e9dedb1840c1c3f6d1cd6d10e
adweathers/MQSim
/src/nvm_chip/flash_memory/Die.cpp
C++
cpp
784
permissive
#include "Die.h" namespace NVM { namespace FlashMemory { Die::Die(unsigned int PlanesNoPerDie, unsigned int BlocksNoPerPlane, unsigned int PagesNoPerBlock) : Plane_no(PlanesNoPerDie), Status(DieStatus::IDLE), CommandFinishEvent(NULL), Expected_finish_time(INVALID_TIME), RemainingSuspendedExecTime(INVALID_TIM...
7836083efc0e8b578d9d6fa37e591d9f11cc3520
e167ae24efa509aecc5a24be0337c1b5839c7a7d
Sly14/upp-mirror
/uppdev/ChPartMaker/main.cpp
C++
cpp
315
no_license
#include <CtrlLib/CtrlLib.h> using namespace Upp; struct App : TopWindow { virtual void Paint(Draw& w) { w.DrawRect(GetSize(), White()); w.DrawImage(1, 1, CtrlsImg::SBVU()); ChPaint(w, 100, 100, 100, 100, CtrlsImg::SBVU()); } }; GUI_APP_MAIN { Ctrl::SetSkin(ChStdSkin); App().Run(); }
1c901d70e29760f8728307aac00221e1597ff9df
983906883206f32defd727c16b4beb54ea07a627
mlz000/Algorithms
/Tyvj/2029(字符串).cpp
C++
cpp
1,107
no_license
#include<cstdio>//e出现次数最多,对应即可 #include<iostream> #include<climits> #include<queue> #include<cstring> #include<algorithm> #include<cmath> using namespace std; const int N=50010; char s[N]; long long a[30]; int main() { int i,j,t,n,pos; char ch; j=0; while((scanf("%c",&ch))!=EOF) ...
d8a88214e2548e0c881426ed816a0f90771a798e
3f782895ed5e1dc062bbb9871d8bde3cd2c67d4f
presto8/mergerfs
/src/fuse_opendir.cpp
C++
cpp
1,192
permissive
/* Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" ...
0605595c182f52f2e699544421863740ead95e07
37ee85afcd1aff7060f1d1c1d7059ee6ffb4a473
nodjiin/QuantizedConvolutionalNeuralNetwork_FPGA
/tiled_quantized_convolution/tiled_convolution.sdk/cnn_cpp/src/net_types.hpp
C++
hpp
2,455
no_license
#include <stdint.h> #ifndef NET_TYPES_H #define NET_TYPES_H #define N_INIT_ARG_CONV 10 #define N_INIT_ARG_POOL 6 #define N_INIT_ARG_ACTIV 1 #define N_INIT_ARG_CONT 3 #define DEPTH 1 #define HEIGHT 2 #define WIDTH 3 #define quant8 //#define DATA_FORMAT_STR "%lf" //#define DATA_FORMAT_STR_SP "%lf " #define DATA_FORM...
c8e25f30227c8355e959c74abf43fbec6a68cfb3
1bafd7b6151a31667e1ac3868956a4a089faaa71
Tecyle/yuki
/yuki/yuki_inline_sub.cpp
C++
cpp
384
no_license
#include "stdafx.h" #include "yuki.h" #include "yuki_internal_types.h" #include "yuki_file_reader.h" #include "yuki_line_string.h" #include "yuki_inline_format.h" #include "yuki_inline_sub.h" YukiInlineSub::YukiInlineSub() { m_prefix = m_suffix = L"vv"; m_infix = nullptr; m_allowEscapeNearMark = false; } yuki_node...
55a17d7da93d837463550e219e79680139cd9540
71bdec709a90cfe78e01b29b947e235de4768042
BlueNightHawk4906/Aura-CL
/cl_dll/hud_watermark.cpp
C++
cpp
1,112
permissive
#include "hud.h" #include "cl_util.h" #include "parsemsg.h" #include "update_checker.h" int CHudWatermark::Init() { m_iFlags = 0; gHUD.AddHudElem(this); return 0; } int CHudWatermark::VidInit() { m_iFlags |= HUD_ACTIVE; refresh_draw_until = true; update_is_available = update_checker::is_update_available(); r...
3c39c9d51ae2b77d2dcdba859f50a1ac20d70e70
023294f2e09e3eb604d0e1eaac4d3f1e43769549
chrispcx/es-hhvm
/hhvm/hhvm-3.17/hphp/runtime/base/dummy-resource.cpp
C++
cpp
1,478
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2016 Facebook, Inc. (http://www.facebook.com) | | Copyrigh...
bd13abacd79b8666a6da63e7f712edaa2a3fdda0
27f0bf0757134f6c011553efd84af202c618c5d3
zxy888pro/Sapphire
/Core/Src/Deserializer.cpp
C++
cpp
7,127
no_license
#include "Deserializer.h" static const float invQ = 1.0f / 32767.0f; static const std::string EmptyString = ""; namespace Sapphire { Deserializer::Deserializer(): m_uPosition(0), m_uSize(0) { } Deserializer::Deserializer(unsigned size): m_uPosition(0), m_uSize(size) { } Deserializer::~Deserializer(...
25846080411f3656380fbb780075684f97c892fa
0888ea3cb9b08599cdb3d36a346e1c1cf1cb95cd
ndugger/grok
/grok/cmd/use.cpp
C++
cpp
3,693
permissive
# pragma once # include <string> # include <utility> # include "common/json.cpp" # include "fs/current_path.cpp" # include "fs/file.cpp" # include "fs/path.cpp" # include "git/manager.cpp" # include "git/repository.cpp" # include "grok/lib/package.cpp" # include "grok/lib/project.cpp" # include "grok/lib/registry....
d6ee675f7910bf568178b2cfa543b1addc7ee41c
b8ff1091e19c97543733c0d3aa9b12ad92d0394a
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/MP+dmb.sy+ctrl-addr-ctrl.c.cbmc.cpp
C++
cpp
52,397
no_license
// Global variabls: // 0:vars:4 // 5:atom_1_X7_0:1 // 4:atom_1_X0_1:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 #define ADDRSIZE 6 #define LOCALADDRSIZE 2 #define NTHREAD 3 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>...
1688c247c96a00cfa8e714c8557466f452f4e490
964850c51a3ba511ed909c7f41d2345190cac84a
ermig1979/Simd
/src/Simd/SimdAvx512bwFloat32.cpp
C++
cpp
8,783
permissive
/* * Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2022 Yermalayeu Ihar. * * 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 limi...
b1d7af57ce714ee31b3b84974f333bae637f3f90
ca82ebbe83b77b78d906bd5e1fed91e04b579e3d
sidnarayanan/PandaProd
/Producer/src/FillerBase.cc
C++
cc
921
no_license
#include "../interface/FillerBase.h" FillerBase::FillerBase(std::string const& _fillerName, edm::ParameterSet const& _cfg) : fillerName_(_fillerName), enabled_(getParameter_<bool>(_cfg, "enabled")), isRealData_(getGlobalParameter_<bool>(_cfg, "isRealData")), useTrigger_(getGlobalParameter_<bool>(_cfg, "useTrig...
8dfc1c64545237667c9d935c6c372ebd097da406
73f72aaea2467fdc6d32eb64d72f3eaf8e7f5101
NomadGroup/node
/deps/v8/src/objects/map.cc
C++
cc
88,898
permissive
// Copyright 2019 the V8 project 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 "src/objects/map.h" #include "src/execution/frames.h" #include "src/execution/isolate.h" #include "src/handles/handles-inl.h" #include "src/ha...
0aea67c343404b6529555a66368728aea733799d
a834b33ed73f0d6dcd3f12df25f4d3571788b58f
iakshatgandhi/DSAImportantQuestionScratch
/LinkedList/circularLinkedList.cpp
C++
cpp
983
no_license
#include <iostream> using namespace std; //Circular LL //Head Insertion and Traversal class node{ public: int data; node *next; node(int d){ data= d; } }; void print(node *head){ node *temp= head; while(temp->next != head){ cout<< temp->data<<"->"; temp= temp->n...
3e38c580206f56d7f223a900192b36544e75be00
5f5151f4289e0c3911ce712a76b23160af84102c
lbc3402785/expressServer
/test.cpp
C++
cpp
6,438
no_license
#include "test.h" #include "src/MMSolver.h" #include "src/Dlib.h" #include "modelfitting.h" #include "settings.h" #include "util/eigenfunctions.h" #include "obstaclemethodsolver.h" Test::Test() { } Settings& sets=Settings::instance(); bool KeypointDetectgion(Mat image, MatF &KP) { vector<vector<Point>> keypoints; ...
94d2244e3e319de86fa67ad951e9f5acc9d33f7a
3aee1683a96199add39fde6c06e1b78031901553
pcvishak/CS213_Midsem
/Solutions/S1_Q1/S1_Q1_template.cpp
C++
cpp
293
no_license
#include <iostream> #include <vector> using namespace std; int solve(vector<int> &a, int size){ // Complete this function ..! } int main(){ int n, input; cin >> n; vector<int> array; for(int i=0; i<n; i++){ cin>>input; array.push_back(input); } cout << solve(array, n) << endl; }
9506e382900c7cc79d18c53d1480b39a29793675
640d4d04ffda8843fd43ea8f7508b1d5e9868fce
maryna-kryshchuk/CPP-Piscine
/d04/ex02/TacticalMarine.cpp
C++
cpp
1,694
no_license
// ************************************************************************** // // // // ::: :::::::: // // TacticalMarine.cpp :+: :+: :+: ...
703ca699fe1c6ba478d38eacbb8e6c087bab6374
3ca1c0a8394cbff2023fc9429c17b2ec40e82b91
matbentancur/pav
/ejercicio1/src/DtSpinning.cpp
C++
cpp
918
permissive
#include "DtSpinning.h" DtSpinning::DtSpinning(int id, string nombre, Turno turno, int cantBicicletas) : DtClase(id,nombre,turno){ this->cantBicicletas = cantBicicletas; } DtSpinning::~DtSpinning() { } int DtSpinning::getCantBicicletas(){ return this->cantBicicletas; } ostream& operator << (ostream& salida...
87110cfeff8ae0d0a9bfd865fae976e16daf6ddd
7dafeb4268c57f105e2291190cc53293bef4b7ce
myousefi2016/vtkPolyDataDelta
/vtkPolyDataDeltaDemo.cxx
C++
cxx
4,072
no_license
#include "vtkPolyDataDelta.h" #include <vtkActor.h> #include <vtkDataArray.h> #include <vtkDoubleArray.h> #include <vtkGlyph3D.h> #include <vtkInteractorStyleTrackballCamera.h> #include <vtkLookupTable.h> #include <vtkMath.h> #include <vtkPointData.h> #include <vtkPolyData.h> #include <vtkPolyDataMapper.h> #include <v...
1462abf039e1b13cfc9bf45352c47b46c1371397
ab434f4c54e0c6824be782eedaa1a4f793022012
cugone/GGE1.0
/Code/Engine/Renderer/VertexBuffer.cpp
C++
cpp
1,641
no_license
#include "Engine/Renderer/VertexBuffer.hpp" #include "Engine/RHI/RHIDevice.hpp" #include "Engine/RHI/RHIDeviceContext.hpp" #include "Engine/Core/ErrorWarningAssert.hpp" VertexBuffer::VertexBuffer(RHIDevice* owner, const std::vector<Vertex3D>& buffer, const BufferUsage& usage, const BufferBindUsage& bindUsage) : I...
c370ed1e46f9ff070f678a6779eb30b210c93e71
c726a2019c79e0ec9afcdd39674ede80297cf536
cdzhang/javaCodes
/others/gGames.cpp
C++
cpp
1,844
no_license
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <cstring> using namespace std; template <typename T> ostream &operator <<(ostream &out, const vector<T> &v) { out<<'('; for (auto &x: v) out<<x<<','; out<<')'; return out; } int n; vector<vector<pair<int,int>>> friends; int proh...
28d0d69c03e8e62b5dbde9f02c48d1fc1bd7f239
5b2bdb445d6ef0ffc93a54f5930f7b1f51485008
KhalilBellakrid/lib-ledger-core
/core/test/lib/boost/boost/context/posix/protected_fixedsize_stack.hpp
C++
hpp
3,086
permissive
// Copyright Oliver Kowalke 2014. // 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) #ifndef BOOST_CONTEXT_PROTECTED_FIXEDSIZE_H #define BOOST_CONTEXT_PROTECTED_FIXEDSIZE_H extern "C...
803d89122c8bc43024b126f5131130ab07393017
76ab33fe98887dafd69a45e80ee6794d7044384b
NervanaSystems/tensorflow
/tensorflow/core/kernels/data/experimental/scan_dataset_op.cc
C++
cc
12,353
permissive
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
0e6ef28144637b1e873906f124d6c14aa2e377cd
eedfce0610c77e7b2eabe2ea2116b814b5dbacec
presstab/zecwallet
/src/sendtab.cpp
C++
cpp
31,872
permissive
#include "mainwindow.h" #include "ui_mainwindow.h" #include "addressbook.h" #include "ui_confirm.h" #include "ui_memodialog.h" #include "ui_newrecurring.h" #include "settings.h" #include "rpc.h" #include "recurring.h" using json = nlohmann::json; void MainWindow::setupSendTab() { // Create the validator for send ...
842296c2b9a2b8b02ccfee9459634b171046799c
d40ea8db0148a19d1cc38852ca523470e94c6438
Cirex02727/Elys
/Elys/src/Platform/OpenGL/OpenGLRendererAPI.cpp
C++
cpp
1,785
permissive
#include "elyspch.h" #include "OpenGLRendererAPI.h" #include <glad/glad.h> namespace Elys { void OpenGLMessageCallback( unsigned source, unsigned type, unsigned id, unsigned severity, int length, const char* message, const void* userParam) { switch (severity) { case GL_DEBUG_...
255fc203fb2039b97badb1200e95c1f587721fd2
7af3f647a1d514416a3db959a602a11c72cd446a
slowfranklin/synology-ds
/usr/local/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/sys-root/usr/include/boost/polygon/detail/rectangle_formation.hpp
C++
hpp
12,280
no_license
/* Copyright 2008 Intel Corporation Use, modification and distribution are subject to 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). */ #ifndef BOOST_POLYGON_RECTANGLE_FORMATION_HPP #define BOOST_POLYGON_RECTANGLE_FORMAT...
bbcb5c17898217261a8543c329a4f5e92e3cb43f
8ba90f67e45763d402da82b2ff7f8a2e59d7ec61
shahidul-brur/OnlineJudge-Solution
/Codeforces/1092_F - Tree with Maximum Cost (2).cpp
C++
cpp
2,454
no_license
/*==============================================*\ ID: shahidul_brur Name: Md. Shahidul Islam Study: CSE, BRUR Address: Rangpur, Bangladesh mail: shahidul.cse.brur@gmail.com FB : fb.com/shahidul.brur Blog: shahidul-brur.blogspot.com(in Bengali), shahidul-brur-en.blogspot.com(in English) ...
8058317b22f9312ab57e2dd8465239cd728ad675
230db3c9ffbfe3ef78866df10f1014e8ac9dae42
NoureldinYosri/competitive-programming
/codeforces/168/D/main.cpp
C++
cpp
1,635
no_license
#include <bits/stdc++.h> #define loop(i,n) for(int i = 0;i < (n);i++) #define range(i,a,b) for(int i = (a);i <= (b);i++) #define all(A) A.begin(),A.end() #define PI acos(-1) #define pb push_back #define mp make_pair #define sz(A) ((int)A.size()) #define vi vector<int> #define vl vector<long> #define vd vector<double> #...
20e2155bdf995317ae91e7a1ce2771e286e551dc
61c7691e11444cdc56bd9dbfd9f996985551e5e4
ngzHappy/cpc2
/cpp_boost/boost/boost/asio/detail/handler_alloc_helpers.hpp
C++
hpp
2,156
no_license
// // detail/handler_alloc_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // 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.org/LICENSE_1_0.txt) // #i...
279d7e8581879387d7a160841c08837a99540ae4
b448fe6db0e6104f629041afad3d4c30c0e1e041
cryptowithacause/cryptocause-coin
/src/rpc/net.cpp
C++
cpp
29,128
permissive
// Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2018 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpc/server.h" #include "chainparams.h" #include "clientversion...
9f1921755c5392df9dbcf6196183ee89d417351e
7ff7262768fac0cf48f42808257ce98a74312d24
UsingCoding/ood
/src/Command/src/Document/Document.hpp
C++
hpp
1,468
no_license
#pragma once #include "IDocument.hpp" #include "../History/ICommandsHistory.hpp" #include "DocumentConverter/IDocumentConverter.hpp" class Document : public IDocument { public: Document( std::shared_ptr<ICommandsHistory> commandsHistory, std::unique_ptr<IDocumentConverter> converter, std::...
d79b83153f07d5d26bb7d925639dde59319f12f7
98e0cf851c6d947f204bac39fb932123b3e7d18c
afouri/cocos2d-x
/extensions/CCBReader/CCMenuItemImageLoader.cpp
C++
cpp
1,154
permissive
#include "CCMenuItemImageLoader.h" #define PROPERTY_NORMALDISPLAYFRAME "normalSpriteFrame" #define PROPERTY_SELECTEDDISPLAYFRAME "selectedSpriteFrame" #define PROPERTY_DISABLEDDISPLAYFRAME "disabledSpriteFrame" NS_CC_EXT_BEGIN void CCMenuItemImageLoader::onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParen...
cb3a5d4b9107297997630c47be48ca3e256b95e2
6ec059c8464cc0c11ef83e6e73ce647af62ab9b0
roche-emmanuel/singularity
/sources/plug_wx/src/luna/bind_wxStopWatch.cpp
C++
cpp
6,516
no_license
#include <plug_common.h> class luna_wrapper_wxStopWatch { public: typedef Luna< wxStopWatch > luna_t; // Base class dynamic cast support: inline static bool _lg_typecheck_dynCast(lua_State *L) { if( lua_gettop(L)!=2 ) return false; if( lua_isstring(L,2)==0 ) return false; return true; } st...
0f565b649562d31b357c0f26202b84ba314e115b
c2384371d40263e8d7fea7bb9c4f01ccb4004a34
AbdullahZahra/problemsolving
/frequency array/PermMissingElem.cpp
C++
cpp
1,161
no_license
// PermMissingElem /* An array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. Write a function: int solution(vector<int> &A); that, given an array A, returns the value ...
b80267f4e8e3f65d0975b8b5b94b578a3a940cbd
0accff0bf43b10c1cc82806302e6c7ebbfe3f218
harshita19244/opentelemetry-cpp
/exporters/otlp/test/otlp_exporter_benchmark.cc
C++
cc
5,848
permissive
#include "opentelemetry/exporters/otlp/otlp_exporter.h" #include "opentelemetry/exporters/otlp/recordable.h" #include <benchmark/benchmark.h> OPENTELEMETRY_BEGIN_NAMESPACE namespace exporter { namespace otlp { const int kBatchSize = 200; const int kNumAttributes = 5; const int kNumIterations = 1000; const trace...
d33f4387c783f1f860e519c613a884c98c48b427
45c4faa05b8bbba0ff567abc2224fc0049eded3b
ghsecuritylab/android_platform_sony_nicki
/external/webkit/Source/WebCore/bindings/js/ScriptController.cpp
C++
cpp
16,981
permissive
/* * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) * Copyright (C) 2001 Peter Kelly (pmk@post.com) * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licens...
cd82dc3b6e3f5e329a5bfa8fdbfa26a1ed4fc9c7
b2988f7f0d72779ebb8c7174107800d652e44135
ericfib/UPC-FIB
/Q1/PRO1/P6/maxseq.cc
C++
cc
215
no_license
#include <iostream> using namespace std; int main () { int n, max, lim; while (cin >> lim){ cin >> n; max = n; for (int i = 1; i < lim; i++){ cin >> n; if (n >= max) max = n; } cout << max << endl; } }
9c49d456db4fb896f599aa3b8ffa0b1cc63dc77b
de74790fab8c214eeb9e1647a6291e8b2d6d7b2f
KiriKiri/bitwin24
/src/libzerocoin/AccumulatorProofOfKnowledge.cpp
C++
cpp
8,887
permissive
/** * @file AccumulatorProofOfKnowledge.cpp * * @brief AccumulatorProofOfKnowledge class for the Zerocoin library. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This pro...
ac914a363ff62f4ef130feaa16886c653bcc3d23
db5bc20df8ac95a702301e8c72f85fd3f6503e40
jyopari/drake
/drake/automotive/maliput/utility/test/generate_obj_test.cc
C++
cc
9,380
permissive
#include "drake/automotive/maliput/utility/generate_obj.h" #include <cmath> #include <fstream> #include <gtest/gtest.h> #include "spruce.hh" #include "drake/automotive/maliput/monolane/builder.h" #include "drake/automotive/maliput/monolane/loader.h" namespace drake { namespace maliput { namespace utility { namespa...
09ba93d6c909333e687e76b4aae9b9f461962c01
e6b173a322b3711e9e4f3dc3a4f7edf2a8b6e19c
Provenance-Emu/Provenance
/Cores/FCEU/FCEU-2.2.3/boards/vrc7.cpp
C++
cpp
5,045
permissive
/* FCE Ultra - NES/Famicom Emulator * * Copyright notice for this file: * Copyright (C) 2012 CaH4e3 * * 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 Licen...
c4632f8218cae85660de6622ab7d8098260b81db
fdf8c66e9c18b7872dfd98aba9fbc05af88acec1
SoftwareNetwork/specifications
/dd/85/c1/ff/dbf551e891722fbbccff2f3402c882ab327e6c8b32b891142fa733c8d818cb6e9f4486ecaa0758c0e1d257ba6cc968067ffd8b903c5ab35266cce807/sw.cpp
C++
cpp
445
no_license
void build(Solution &s) { auto &lzma_sdk = s.addTarget<LibraryTarget>("_7zip.lzma_sdk", "18.1.0"); lzma_sdk += RemoteFile("https://www.7-zip.org/a/lzma{M}0{m}.7z"); lzma_sdk.setRootDirectory("C"); lzma_sdk += ".*\\.h"_rr, "Alloc.c", "LzFind.c", "LzFindMt.c", ...
6e0bd9c3ae59fba188c706bdf2dd0448f7fe0742
cb872be223605a8e84fc2521bafbcef39c7e7981
ARG-NCTU/moos-ivp-taiwanMoos
/src/pDiffThrustControl/main.cpp
C++
cpp
1,591
no_license
/************************************************************/ /* NAME: Chao-Chun Hsu */ /* ORGN: MIT, Cambridge MA */ /* FILE: main.cpp, Cambridge MA */ /* DATE: December 29th, 1963 */ /****...
572637cff0d7fa013ee293fd0048359f82a649e8
dc0838094bec89764ba8b63d52681b997dae74d7
breezy1812/MyCodes
/Algorithm/调整数组顺序使奇数位于偶数前面/调整数组顺序使奇数位于偶数前面/调整数组顺序使奇数位于偶数前面.cpp
C++
cpp
2,679
no_license
// 调整数组顺序使奇数位于偶数前面.cpp : 定义控制台应用程序的入口点。 // //题目:输入一个整数数组,实现一个函数来调整该数组中数字的顺序 //使得所有奇数位于数组的前半部分,所有偶数位于数组的后半部分 #include "stdafx.h" #include <iostream> using namespace std; //仅仅能满足题意的算法,没有良好的可扩展性 void ReorderOddEven(int *numbers, unsigned int length) { if (numbers == NULL || length == 0) return; int oddIndex=0, evenIn...
6a5913724cdaf5eea26fdf1bec34d49766fe6cd8
9f41e1582ed949af3a70013a3c3a7d6b88f28665
ShchchowAMD/VK-GL-CTS
/external/vulkancts/modules/vulkan/protected_memory/vktProtectedMemUtils.hpp
C++
hpp
7,882
permissive
#ifndef _VKTPROTECTEDMEMUTILS_HPP #define _VKTPROTECTEDMEMUTILS_HPP /*------------------------------------------------------------------------ * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2017 The Khronos Group Inc. * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under ...
9c3b3ba575770b5142bc732a6cb528a1fa017240
4c3a664113b37248a7bc8adf54ccd5c92d686cca
Luckyblock233/OI-code
/Luogu/P1451 求细胞数量.cpp
C++
cpp
1,732
no_license
//dfs求联通快 #include<cstdio> #include<cstring> #include<iostream> using namespace std; int que[101000][2];//储存坐标的队列 char a[1100][1100]; int main() { int n,m,ans=0; scanf("%d%d",&n,&m); for(int i=0;i<n;i++) { cin>>a[i];//输入数 } //==============输入与处理的境界=========================================...
edd43ac4bd9a072f8b068bd9daf29d7fbda0c9e4
dea0d6f44b10c4d5e0257b2132651c5af81c377c
camike/chromium
/chrome/browser/ui/ash/network/network_portal_notification_controller.cc
C++
cc
8,540
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 "chrome/browser/ui/ash/network/network_portal_notification_controller.h" #include <stdint.h> #include <memory> #include <vector> #include "ash...
d98bd24a58acdc0128f6cfb4958e2c91d0412a1a
10bc86b4cbfe58898fc9d6fd09c2797716d13f3d
ashrafyawar/CPP-Projects
/HOMEWORKS/HW06/mohammad_ashraf_yawar_161044123.cpp
C++
cpp
49,316
no_license
#include "headerfile.h" using namespace Personal_Management; using namespace My_Struct; int main(){ fstream inpfile; inpfile.open("personnellist.txt"); string st1= "research";//string constants used in implementation. string st2= "linguistic";//string constants used in implementation. string st3= "technical...
4deeecef0abf0112e296eeb0d81e9c49180d6497
04564a4369bb901c789a8365454bd5b1817b2b4b
pcw109550/problem-solving
/LeetCode/non-overlapping-intervals.cpp
C++
cpp
933
no_license
// 435. Non-overlapping Intervals #include <algorithm> #include <iostream> #include <vector> #include <climits> #include <utility> using namespace std; class Solution { public: int eraseOverlapIntervals(vector<vector<int>>& intervals) { // O(N * log(N)) int N = intervals.size(); vector<pair...
03078836646bae56a4729df1124dcd7a3a9c6df1
b65cc1ff34aa8e73b5c28a95101b8420de929a5e
PacktPublishing/Game-Development-Patterns-and-Best-Practices
/Chapter 10/EngineTest/EngineTest/Source/Core/M5StageManager.cpp
C++
cpp
11,194
permissive
/******************************************************************************/ /*! file M5StageManager.cpp \author Matt Casanova \par email: lazersquad\@gmail.com \par Mach5 Game Engine \date 2016/08/7 This provides Support for switching stages in your game, such as switching between levels and menus. */ ...
3834d2315669292f992f83d4fcb3d7e2ef6f8c9b
aeb23152a11a51ccfc99191b7a32fb484ddd9dd6
ccdxc/logSurvey
/data/crawl/collectd/old_hunk_263.cpp
C++
cpp
913
no_license
static int Notification_init(PyObject *s, PyObject *args, PyObject *kwds) { Notification *self = (Notification *) s; PyObject *tmp; int severity = 0, ret; double time = 0; const char *message = ""; const char *type = "", *plugin_instance = "", *type_instance = "", *plugin = "", *host = ""; static char *kwlist[]...
c82cff3e3074083bec37f61bac60c641b0caae0e
c3f3bd2758e0133a2bd4fcfb78a9e8082ce01266
miodek/Thinking_in_cpp_1
/examples_from_the_book/C03/VoidPointer.cpp
C++
cpp
398
no_license
//: C03:VoidPointer.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt int main() { void* vp; char c; int i; float f; double d; // Do wskaznika typu void* mozna // przypisac ad...
a81ecf3a2a0639baac2e3d719c7467ab3c1f3ade
ffec336e0749242ce18c07763fac209fe64dda20
hnlylmlzh/cs
/socket/网络编程/Codes/90926148/chap6/FTP/《--程序--》ftp客户端/FTPCommandProcessor.cpp
C++
cpp
14,339
no_license
/*///////////////////////////////////////////////////////////////////// FTPclient.cpp (c) GDI 1999 V1.0.0 (10/4/99) Phil Anderson. philip@gd-ind.com Simple FTP client functionality. If you have any problems with it, please tell me about them (or better still e-mail me the fixed code). Please feel free to use th...
0429f78a2f1b0e97185f16a3d5d65e9d8749d1cb
b029c51f1cf547d0727e0d3928a603e2fbd01d48
NetBSD/pkgsrc
/x11/qt5-qtwebengine/patches/patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp
C++
cpp
1,010
no_license
$NetBSD: patch-src_3rdparty_chromium_skia_ext_SkMemory__new__handler.cpp,v 1.1 2021/08/03 21:04:35 markd Exp $ --- src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp.orig 2020-07-15 18:56:01.000000000 +0000 +++ src/3rdparty/chromium/skia/ext/SkMemory_new_handler.cpp @@ -78,7 +78,7 @@ static void* malloc_nothrow(s...
fa5a78620684174b31cf5507f4874f5f6b461931
4c7702891a6e6f784a6530fc0451e114d97842a3
reliveinfire/codes
/155/155.cpp
C++
cpp
1,310
no_license
#include <iostream> #include <string> #include <unordered_map> #include <vector> #include <limits.h> #include <queue> #include <stack> #include <sstream> #include <algorithm> #include <set> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(...
7d4a8604d743f2e2d6b6451a8279048c9bccbf05
c52f3583c27523b897101a66d1125ccd8fa4489e
7kia/ISpringPractic
/ShapeCompositor/Canvas/Shapes/ShapeViewFactory.cpp
C++
cpp
1,219
no_license
#include "stdafx.h" #include "ShapeViewFactory.h" #include "Presenter/ShapePresenter.h" CShapeViewPtr CShapeViewFactory::CreateShape(CShapeModelPtr & data) { switch (data->GetType()) { case ShapeType::Triangle: return std::make_shared<CTriangleView>( data->GetPosition(), data->GetSize(), data->GetFillCol...
acd2eb20575b0364a82ac12b47f3a16ed4cc63ef
c0d5c85c3598ae02d300509be1b13054c304db2a
pooja-j-n/adaptive-sort
/sortingParameters.cpp
C++
cpp
752
no_license
#include "stdafx.h" #include "sortingParameters.h" sortingParameters::sortingParameters() { } sortingParameters::~sortingParameters() { } void sortingParameters::display() { cout << endl << "Sorting Parameters : " << endl; cout << "Size : " << size << endl; cout << "Range : " << range << endl; cout << "Sor...
f9a250a0e022ed0405c00d4f4fd8ae3f32a11890
957e63f06f15d6ff176134be17b2d0fa3dcf3836
wangbichao/dual_camera_x
/vendor/mediatek/proprietary/hardware/mtkcam/legacy/platform/mt6735m/hal/sensor/test/src/acdk/AcdkMain.cpp
C++
cpp
112,737
no_license
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or ...
3eb5a3d26487dc8e9eb165a1b6f796e98b219447
d485b6ceef0a4101eaf403908c70ebe65490bc08
kttkjl/4985_COMMAUDIO
/4985_Assn1/Command.cpp
C++
cpp
43,354
no_license
/*------------------------------------------------------------------------------------------------------------------ -- SOURCE FILE : Command.cpp - An application that will receive data, and prints out the statistics for the transaction: -- (1) The total bytes received from the socket -- (2) The total time ...
0f302314254d2a4b066cf2142fee2dbd8cd16069
b15ea227338619eb0f51497b7c7980f3b53971fb
sailfishos/sailfish-secrets
/lib/Crypto/storedkeyidentifiersrequest.cpp
C++
cpp
7,928
permissive
/* * Copyright (C) 2018 Jolla Ltd. * Contact: Chris Adams <chris.adams@jollamobile.com> * All rights reserved. * BSD 3-Clause License, see LICENSE. */ #include "Crypto/storedkeyidentifiersrequest.h" #include "Crypto/storedkeyidentifiersrequest_p.h" #include "Crypto/cryptomanager.h" #include "Crypto/cryptomanager...
e184e51ae81824a8102e4ed0a5d0348c9c80c620
a26873106b3948c33eac93d259731995783f89dc
realnhl/Calculator-using-Round-Robin
/OS__65332_68097_66424_68268_66645.cpp
C++
cpp
13,491
no_license
#include <iostream> #include <fstream> #include <sstream> #include <cstdlib> #include <string> #include <iomanip> using namespace std; // Function prototype void readFile(); void vInitialization(); void summaryCalculation(); struct jobInformation // Struct for storing Job Informations { string typ...
c8451c0589ed022aa787691d4849118cde450e51
cc090c01521764bcaf11110713b545ecd553f3b1
CadQuery/pywrap
/opencascade/MoniTool_DataInfo.hxx
C++
hxx
1,646
permissive
// Created on: 1996-09-04 // Created by: Christian CAILLET // Copyright (c) 1996-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the ...
2bb583e96eaad5b882908963efacda72a223fb83
b84b070acdc561c9decc883f2e0094fdb7105bf9
LinggYuu/shua-ti
/MINGW&c++/10.cpp
C++
cpp
841
no_license
#include<iostream> using namespace std; int main() { int L, M,i,j,num=0; cin >> L >> M; int a[10001][2]; for (i = 0; i < M; i++) for (j = 0; j < 2; j++) cin >> a[i][j]; for(i=0;i<M;i++) for (j = 0; j < M; j++) { if (a[i][1] > a[j][0] && a[i][1] < a[j][1]) a[i][1] = a[j][1]; if (a[i][0] > a[j...
e293271a03cd60c4d47136046864c4fdbe84fbe8
45f7f40e1cedb30284e6aa6832e3a723fce95dcc
timondy/PhaseFieldBenchmarking
/Uintah/src/CCA/Components/MPM/Materials/ConstitutiveModel/Biswajit/ElasticityModels/LinearElasticShear.cc
C++
cc
2,567
permissive
/* * The MIT License * * Copyright (c) 1997-2018 The University of Utah * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * right...
a38137c28a5d43042687384a68237c84caa66282
3cddb4d4590fa5ef87656a5b1d1cb0831ffe86bb
SandyXi/data-structure
/排序/12-1.cpp
C++
cpp
1,189
no_license
#include <stdio.h> #define MaxSize 20 typedef int KeyType; //定义关键字类型 typedef char InfoType[10]; typedef struct //记录类型 { KeyType key; //关键字项 InfoType data; //其他数据项,类型为InfoType } RecType; //排序的记录类型定义 void InsertSort(RecType R[],int n) //对R[0..n-1]按递增有序进行直接插入排序 { ...
63ab510f451df83f56de29686a6590c37f664f28
70ffa2c8c51071bd3b2b5d51427202006b6d1c51
iamnidheesh/MyCodes
/Tutorials/graph/dijkstra/general/ADATRIP-19127322.cpp
C++
cpp
1,319
no_license
#include<bits/stdc++.h> using namespace std; vector < pair <int,int> > graph[5*100001]; int m,n,q,l,x,y,s; int dis[5*100001]; int dij(vector <pair<int,int> > * v,int s,int * dis) { priority_queue < pair <int,int> , vector < pair <int,int> >,greater < pair <int,int> > > pq; pq.push(make_pair(0,s)); dis[s] = ...
4ec4031dfc0b5acdc95c6bbcf07f5deb28dd76df
3b0485e2dbafeed6e2cb1cc7f6f8ad0989f387da
iCell/wallet-core
/tests/chains/Harmony/SignerTests.cpp
C++
cpp
6,234
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 <gtest/gtest.h> #include "Ethereum/RLP.h" #includ...
672e3cbedc53f673e1ea0b53a32a202576943044
ed2810b66ce18a90ae5cbf2f60d075a73c3e6650
aadhar54/CppSessions
/Submissions_Solutions/SwapTwoNumbers.cpp
C++
cpp
385
no_license
#include<iostream> using namespace std ; void doSwap(int* n1,int* n2); int main(){ int n1,n2; cout<<"Enter two numbers \n"; cin>>n1>>n2; cout<<"Number 1 is "<<n1<<endl; cout<<"Number 2 is "<<n2<<endl; doSwap(&n1,&n2); cout<<"Number 1 is "<<n1<<endl; cout<<"Number 2 is "<<n2<<endl; return 0; } void doSwa...
9bc241184e962107f70b77e2eb1f283ccd76eab7
5ba0de1c8a6bbec5799ead574e2b16bc88d626c4
zjm1060/HandSet
/trunk/tools/ProduceTester/ProduceTester/DT6000功能性测试/DT6000被测设备端/PC端/FunctionTest/CANLib.cpp
C++
cpp
4,539
no_license
#include "stdafx.h" #include "CanLib.h" #undef _T #define _T(x) x static HINSTANCE hDLL = NULL; static DWORD (CALLBACK *pfnVCI_OpenDevice)(DWORD DeviceType,DWORD DeviceInd,DWORD Reserved) = NULL; static DWORD (CALLBACK *pfnVCI_CloseDevice)(DWORD DeviceType,DWORD DeviceInd)=NULL; static DWORD (CALLBACK *pfnVCI_InitCA...
bf3ed22aa8a9d020d48c6bf30bda91d28759074c
29d27a431f375478194429f4db3dae47ea51f417
hackerlank/Cocos2dxGame-1
/Client/MyGame-Lua/frameworks/Common/Module/ModuleGame/Process/MountsProcess.cpp
C++
cpp
7,891
no_license
package game.process { import flash.utils.ByteArray; import modulecommon.scene.dazuo.DaZuoMgr; import modulecommon.scene.sysbtn.SysbtnMgr; import modulecommon.scene.watch.WuMainProperty_Watch; import modulecommon.scene.wu.WuProperty; import game.netmsg.mountcmd.stAddMountToUserCmd; import game.netmsg.mountcmd....
a1ea065e342c4946df81993fd376533d5d8477de
56194623ee47c78cd30306dd7eb0aaa49c984c19
dongdong331/test
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/Blend.cpp
C++
cpp
48,744
permissive
/* * Copyright (C) 2011 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...
44128ac753d7c534f7407bec30c2d713744b4926
75465c8b1d27044c09143d0f88bf9d445bb5f3c5
ValtoForks/Acid
/Sources/Models/Obj/ModelObj.hpp
C++
hpp
1,300
permissive
#pragma once #include <functional> #include "Helpers/String.hpp" #include "Models/Model.hpp" #include "Models/VertexModel.hpp" #include "Models/VertexModelData.hpp" namespace acid { /// <summary> /// Class that represents a loaded OBJ model. /// </summary> class ACID_EXPORT ModelObj : public Model { public: ...
6ac537d13fce6f2919f970fcfffd70478ffb9894
9a8d17725ce5d75eaf8fae0c7fd8c2d9c45ceedb
atakanakbulut/DesignPatterns
/Flag/flag.cpp
C++
cpp
1,372
no_license
#include <iostream> #include <stdlib.h> uint8_t myFlag = 0; static const struct flagCapsule { static const uint8_t DATA_ENABLE_1 = 0x01; static const uint8_t DATA_ENABLE_2 = 0x02; static const uint8_t DATA_ENABLE_3 = 0x04; static const uint8_t DATA_ENABLE_4 = 0x08; static const uint8_t DATA_ENABLE...
781bade2ae58870993b23018cfdb06625de34c4e
3e0627679b3180114cc4f72d7a001ab0122fbbdd
benjaminhuanghuang/ben-leetcode
/0874_Walking_Robot_Simulation/solution.cpp
C++
cpp
1,326
no_license
/* 874. Walking Robot Simulation Level: Easy https://leetcode.com/problems/walking-robot-simulation */ #include <vector> #include <string> #include <unordered_map> #include <unordered_set> #include <algorithm> #include "common/ListNode.h" #include "common/TreeNode.h" using namespace std; /* Solution: */ class...
f8895f227416fee1a2a90cf09541d1c6af8e0d0b
5a5609537eea791cc7d358d84643216e2311428f
swacisko/CODES
/Sprawdzarka UAM/Zrobione zadania/Planety/Planety na mapie.cpp
C++
cpp
2,053
no_license
#include<iostream> #include<map> using namespace std; int main() { ios_base::sync_with_stdio(0); int N; int tab[3000][2]; cin>>N; map< int, map <int,int> > mymap; map< int, map <int,int> >:: iterator it; map<int,int>::iterator iter; ...
b3b5c4d940292470ef7899bcbeadffd8b6e37176
dfd85eff15d79f32a7194597fafed2245c6e84d0
renzov/Red_Crown
/Live Archive/6656.cpp
C++
cpp
2,503
no_license
#include <cstdio> #include <algorithm> #include <set> #include <cctype> #include <string> #include <vector> #define repn( i , a , b ) for( int i = ( int ) a ; i < ( int ) b ; i ++ ) #define rep( i , n ) repn( i , 0 , n ) #define all( x ) x.begin() , x.end() #define rall( x ) x.rbegin() , x.rend() #define mp make_pai...
99eba7d44c6bbe9fcb485bf93070e23569333630
7f7556a838cdef5e1c7c124b9e58de7297026f7b
Hrothgor/3D_Engine
/src/Entities/Camera.cpp
C++
cpp
1,483
no_license
/* ** EPITECH PROJECT, 2021 ** 3D ** File description: ** Camera */ #include "Camera.hpp" Camera::Camera() : _position(0, 0, 0) { _pitch = 0; _yaw = 0; _roll = 0; } Camera::~Camera() { } void Camera::move(std::vector<bool> keys, sf::RenderWindow *window) { static bool clicked = false; static...
9d8b0b0a01bca122b697ff6e7ccee71ffb7efd23
ed06bd79d80145751eeacc0ae016bbdc96164ec0
m13kot/dnp3
/cpp/src/opendnp3/TransportStates.cpp
C++
cpp
2,830
permissive
// // Licensed to Green Energy Corp (www.greenenergycorp.com) under one or // more contributor license agreements. See the NOTICE file distributed // with this work for additional information regarding copyright ownership. // Green Energy Corp licenses this file to you under the Apache License, // Version 2.0 (the "Li...
66ea1f957ac8e7187b7955d6e994c5ba86979181
1d292c6cf1ee4c9d6c672bd420bb8c9b8358edce
Ayush32/DSA-Cracker
/Day 5 (Linked List)/3_add_two_linked_list.cpp
C++
cpp
682
no_license
/* * Copyright (c) 2020 * All rights reserved. */ ListNode *addTwoNumbers(ListNode *l1, ListNode *l2) { ListNode *dummy = new ListNode(); ListNode *temp = dummy; int carry = 0; while (l1 != NULL || l2 != NULL || carry) { int sum = 0; if (l1 != NULL) { ...
b60720d572dae7a02d9b6cacda81bab2bb77e96e
0305cecdc56be5c0d6e7044add289474b8f463f9
chkob/forked-blaze
/blazetest/src/mathtest/dmatdmatmult/MDbM3x3b.cpp
C++
cpp
3,844
permissive
//================================================================================================= /*! // \file src/mathtest/dmatdmatmult/MDbM3x3b.cpp // \brief Source file for the MDbM3x3b dense matrix/dense matrix multiplication math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // // ...
0d3ced866a81c74a68989a5932f75129875097cc
6451d360c8f98092fdede4a4fd9f58329ea25238
YogaVicky/Codeforces-Solutions
/760d.cpp
C++
cpp
528
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define mod 1000000007 #define mp make_pair // for(i=0;i<n;i++) // for(auto it = m.begin();it!=m.end();it++) void solve(){ ll n,i,j,k,m; cin>>n>>k; vector<ll>a(n); for(i=0;i<n;i++) cin>>a[i]; sort(a.begin(),a.end()); ll ...
4d82f568c8bb029b383b839fe45ee0dff019e8b8
df6db72cddb171c76d518a2a5c066e23c68ecb3f
bescovedo/becode
/fafnir/WPILib/AnalogChannel.cpp
C++
cpp
12,669
no_license
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2008. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ /*----------...
fba5202de3fc9e6a79f64eff3527bf21b67adc0e
f63f3a757f7add1e1d4615f0f8a70ab5e42e95a0
brandonrobertz/namecoin-core
/src/qt/transactionrecord.cpp
C++
cpp
9,818
permissive
// Copyright (c) 2011-2017 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/transactionrecord.h> #include <base58.h> #include <consensus/consensus.h> #include <validation.h> #include <tim...
fab06cdc9ef1769f22cd261e493484250e0c640d
a9efdb67be8b2bf63bb53de6bfec5f53c2449d1a
wacr2008/atframe_utils
/src/algorithm/base64.cpp
C++
cpp
14,820
permissive
#include <assert.h> #include <inttypes.h> #include <limits> #include <stdint.h> #include <stdlib.h> #include <string.h> #include "algorithm/base64.h" #define BASE64_SIZE_T_MAX ((size_t)-1) /* SIZE_T_MAX is not standard */ #define BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */ ...
065d41341b0b62091bd734abc1421692cce61ff4
781b69b820328adc28089bc8b3c1f638d375b593
souravdas142/cppfiles
/C++_STL/template2.cpp
C++
cpp
579
no_license
#include<iostream> using namespace std; template <typename gen,typename gen2> void swp(gen &a,gen2 &b) { gen tmp; tmp = a; a=b; b=(gen)tmp; } void swp(string a,string b) { string tmp=a; a=b; b=tmp; cout<<endl<<"a = "<<a<<"b = "<<b<<endl; } template <typename gen1,typename gen2,typename gen3> void swp(gen1 &a,ge...
dc931616c0efba526519360f9430dcd2a79e48d1
11ac0b9f0ddc3b191382e45417c67d10cffda2f3
watchdog1023/Eurodollar
/src/qt/transactiondescdialog.cpp
C++
cpp
808
permissive
// Copyright (c) 2011-2017 The Eurodollar Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/transactiondescdialog.h> #include <qt/forms/ui_transactiondescdialog.h> #include <qt/transactiontablemodel.h...
97cd206cacc0dec9dc985dfced7c71045ce3b81c
e40c8a6f488599f931085777d05a5d0a9a12b544
syniox/Online_Judge_solutions
/AtCoder/ARC068E.cpp
C++
cpp
1,069
no_license
#include<iostream> #include<cstdio> #include<algorithm> #include<cstring> const int N=1e5+2; int n,m; struct data{ int l,r; bool operator < (const data &b) const { return r-l<b.r-b.l; } }dt[N*3]; inline char get_c(){ static char buf[20000],*h,*t; if(h==t){ t=(h=buf)+fread(buf,1,20000,stdin); } return h==t?E...
98133cc485a62c7293faeb464e936fe4d0f22974
44d2e6a4dac17507ba636139d8feb321b2802e8b
svarvel/browser-android-tabs
/content/renderer/pepper/video_decoder_shim.cc
C++
cc
36,532
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 "content/renderer/pepper/video_decoder_shim.h" #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <GLES2/gl2extchromium.h> #include <uti...
7f01ffd4daad5b0ec44c5006c9a63f0260408cf4
7cbf0a762b09ae775cb05fa1f0b0af4fd34cbd32
wwxFromTju/TrueOnlineSarsa
/src/common/Parameters.cpp
C++
cpp
10,846
no_license
/**************************************************************************************** ** This class reads parameters from a file informed in the command line and store the ** relevant information. It is ideal to centralize all parameters here, as well as defining ** most of them in a file, to ease the execution of ...