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
c7480d6711beac7ddf73ec570bb4dfdcfb1374bd
b63c84b39477c16a1a043b7d238491789ce51d2e
rmartella/ComputationalGeometryAlgorithms
/LineSegmentIntersection/src/DataStructures/Tree/Node.cpp
C++
cpp
327
no_license
/* * Node.cpp * * Created on: 27/02/2015 * Author: rey */ #include "Node.h" #include "stddef.h" Node::~Node() { // TODO Auto-generated destructor stub } Node::Node(EventPoint d) { event = d; left = NULL; right = NULL; bf = 0; } Node::Node() { event = EventPoint(); left = NULL; right = NULL; bf =...
96ada21f900b32aa92242272dd76f9ee11dd9b24
fefb846d8b1f57aef2c0ae15802293f35503223a
Adpa18/plazza
/src/main.cpp
C++
cpp
640
no_license
#include <string> #include <iostream> #include <csignal> #include <exception> #include "Plazza.hpp" Plazza *plazza; void kill(int) { plazza->kill(); throw std::exception(); } int main(int ac, char **av) { unsigned int nb_threads; if (ac < 2 || (nb_threads = std::stoi(av[1])) == 0) { ...
ea1c2f038668e928fc27d064c60c3185c4f6c046
c78223ea5e8a1fd730c9ce07862ab226d689958d
Xuhui-Wang/poj-solutions
/1477/1690082_AC_0MS_72K.cpp
C++
cpp
462
permissive
#include<iostream.h> void main() { int iStackNum,iHeight[50],i,iSum,iMove,iCount=0; while(1) { cin>>iStackNum; if(!iStackNum) break; iCount++; iSum=0; for(i=0;i<iStackNum;i++) { cin>>iHeight[i]; iSum+=iHeight[i]; } iMove=0; for(i=0;i<iStackNum;i++) if(iHeight[i]>iSum...
73d1f9da45562973e0479fe38dadf4a3c1a7bb69
92627426805c944df6c449c1226c7680556d70e5
nanaHa1003/NLA_SCML_2018
/project/include/symrcm/util/convert.hpp
C++
hpp
3,958
permissive
#ifndef SYMRCM_UTIL_CONVERT_HPP_ #define SYMRCM_UTIL_CONVERT_HPP_ #include <vector> #include <tuple> #include <algorithm> #include <symrcm/matrix/coo.hpp> #include <symrcm/matrix/csr.hpp> #include <symrcm/matrix/dense.hpp> namespace symrcm { namespace util { using namespace symrcm::matrix; template <typename Scala...
50409a1cec38aa8c4676fb738f4b1dae02b6080b
43050e55e2f2113a6a7cfd8f3d0694427676bd9a
mdqyy/HnT-neuralNetworks
/src/machines/neuralMachines/layers/LayerSigmoid.cpp
C++
cpp
2,232
no_license
/*! * \file LayerSigmoid.cpp * Body of the LayerSigmoid class. * \author Luc Mioulet */ #include "LayerSigmoid.hpp" #include <math.h> using namespace std; using namespace cv; LayerSigmoid::LayerSigmoid() : Layer() { } LayerSigmoid::LayerSigmoid(uint _numUnits,string _name, bool _recurrent) : Layer(_numUnits,_n...
3936ec53098eac1f901d5a9ac2fb6e1ab3f5cde5
eed63dfcbacb58294af267fb7dca63dad0662223
reezer/maplibre-gl-native
/include/mbgl/gfx/backend.hpp
C++
hpp
918
permissive
#pragma once #include <cstdint> #include <cstdlib> #include <memory> namespace mbgl { namespace gfx { class Backend { public: enum class Type : uint8_t { OpenGL, }; static constexpr Type DefaultType = Type::OpenGL; static void SetType(const Type value) { if (Value(value) != value) {...
32614870ddf49d9b8c9833a874ae11694ae08dca
c40e1dc4e6c40e33e54ecb87df55cd52bf2eabfd
moniquesenjaya/DSA-Lab-Exercise
/week 1/Session 1/activity_1b.cpp
C++
cpp
1,349
no_license
#include <iostream> using namespace std; // I'm sorry sir im not sure how to solve your third point "be ware of using loop while making decision on only one intended data." other than using multiple ifs. int main(){ // declare variables bool flag = false; // Declared a flag string day; string days[7] = {"...
05d2848c706b10d9cb60677a5b7e0b46c85bea0d
9b3ec89d6cab264571d5c18726e6cb7b3104ec28
subnr01/subs-practice
/leet_code/strings/prob/longest_uncommon_subsequence/longest_uncommon_subsequence.cpp
C++
cpp
892
no_license
/* Longest uncommon subsequence Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings. A subsequence is a sequence t...
359977b2e620c7e925fa52d72ad4761d28b611d4
d6755ec0e1c9f09291b6d04404afabef173201cc
subnr01/subs-practice
/leet_code/hashtable/easy/employee_importance.cpp
C++
cpp
1,978
no_license
/* Employee Importance --------------------- You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates' id. For example, employee 1 is the leader of employee 2, and employee 2 is the leader of employee 3. They have importance v...
48924006965c66fd07047fa0b65e2b65b77dc430
5c12735b6596202d4516aa0a10df5b77d02a8142
poshul/OpenMS
/src/openms/source/FORMAT/HANDLERS/MzQuantMLHandler.cpp
C++
cpp
66,926
permissive
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
c382053399848e8bc6e93df5bac843e8fe9bccce
aaf1d6f775643169cf6b21e2bb2c174cb756c050
earjuice/Cinder_NVidia_Graphics_Samples
/NVidiaCommandList/src/nvcommandlist.cpp
C++
cpp
4,829
no_license
//---------------------------------------------------------------------------------- // File: gl4-maxwell\NvCommandList/nvcommandlist.cpp // SDK Version: v3.00 // Email: gameworks@nvidia.com // Site: http://developer.nvidia.com/ // // Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights re...
e9e19ba0eaa2fbfa18b78dfb54a21298ba68581a
9500c80d3d8e80acc4abf578bbeac1c58e6d50e3
andrikos/kismet-debian
/packetsource_pcap.cc
C++
cc
38,090
no_license
/* This file is part of Kismet Kismet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Kismet is distributed in the ...
3c332f81ad5155d7a8d0f58ea2ee3e26854ad104
457f5bbfb85a681c980309ff2b6d82298d653f34
calista95/Leetcode
/Hard/median.cpp
C++
cpp
4,650
no_license
/* * Program: median.cpp * Description: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). You may assume nums1 and nums2 cannot be both empty. Example 1: nums1 = [1, 3] nums2 = [2] ...
5c61a110ac77beb919a6cb759e79dd1dbc6d4c5a
b27af4b74117615089459b5e911016aa5f913d6f
t-pool/rcoin
/src/bitcoin-tx.cpp
C++
cpp
29,788
permissive
// Copyright (c) 2009-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. #if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <clientversion.h> #include <coins.h> #include ...
52cfdc6db89998ef4137da983ba1de47d38a6ea5
55f37348b99bf7c4eae5b9c8f27fd65e2b7d508b
libklein/polybar
/src/x11/tray_manager.cpp
C++
cpp
33,379
permissive
#include "x11/tray_manager.hpp" #include <xcb/xcb_image.h> #include <thread> #include "cairo/context.hpp" #include "cairo/surface.hpp" #include "components/config.hpp" #include "errors.hpp" #include "events/signal.hpp" #include "utils/color.hpp" #include "utils/factory.hpp" #include "utils/math.hpp" #include "utils/...
b75aeb82fdd6cf60a2574dcf6206ad832fcd19a0
4da541c36a0f073efb065a51eb45f42a61faca73
hhoegelo/C15
/projects/playground/src/proxies/hwui/descriptive-layouts/events/event-sources/edit-buffer/EditBufferEvents.cpp
C++
cpp
6,186
no_license
#include "EditBufferEvents.h" #include <Application.h> #include <proxies/hwui/HWUI.h> #include <groups/ParameterGroup.h> #include <sigc++/sigc++.h> #include <parameters/SplitPointParameter.h> #include <presets/EditBuffer.h> void DescriptiveLayouts::EditBufferTypeStringEvent::onChange(const EditBuffer *eb) { const au...
91df3cfa7ad207979803dd6e0549c8acd693a027
caef88228da1cc7c735949fe1262bf96cb80b1bf
CG-SS/Urho3D-Empty-Project
/Source/Input/Controllers/JoystickInput.cpp
C++
cpp
7,953
permissive
#include <Urho3D/Urho3DAll.h> #include "JoystickInput.h" #include "../ControllerInput.h" #include "../../MyEvents.h" #include "../../Global.h" /// Construct. JoystickInput::JoystickInput(Context* context) : BaseInput(context), _joystickAsFirstController(true) { SetMinSensitivity(1.0f); Init(); auto* input ...
9a07b35bb2e58c961fa895d922446bb7a7141805
0d9b6b1245b8227eeb120ee829079986ee68a113
kojingharang/algorithm_contest
/atcoder/past3_o.cpp
C++
cpp
3,610
no_license
#include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <numeric> #include <functional> #include <sstream> #include <iostream> #include <iomanip> #define _USE_MATH_DEFINES #include <cmath> #include <climits> #include <cstdlib> #include <cstring> #include <cfloat> ...
167cb726332e35d28487908b75f2c51c24223609
7a8cf8f24cf40230db2cd31faa7decefac8c16d6
ucsb-cs16-w19/lab02_larajanjic_geovane805
/starZ.cpp
C++
cpp
2,229
no_license
// starZ.cpp A demonstration of ASCII Art printing C characters #include <iostream> #include <cstdlib> #include <string> using namespace std; void assertEquals(string expected, string actual, string message); string starZ(int width); void runTests(void); // Write starZ per specifictions at // https://foo.cs.ucsb....
d1582107194bb6a63b20f79075436519305b55eb
376bb9d64db36919df7df628f773dc8597d16f2f
davinash/arangodb
/arangod/MMFiles/MMFilesFulltextIndex.cpp
C++
cpp
9,364
permissive
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
c0c2021f2dc139737af899ef6af476981d57a437
655078dd53dca21bf682d4a9e788f505ced9882a
joaotargino/moolajoo-tcg
/War of Heroes TCG/src/CApp_OnEvent.cpp
C++
cpp
789
no_license
//============================================================================== #include "CApp.h" //============================================================================== void CApp::OnEvent(SDL_Event* event) { Event::onEvent(event); inputManager.getKeyboardHandler()->onEvent(event); if(event->t...
05e0e228d834ff0759f683a19309bfd8b997ec2d
3ca5071d91cc1f06f500af99bb5022759e3a653a
waybarrios/video_nonlocal_net_caffe2
/third_party/ComputeLibrary/src/runtime/BlobLifetimeManager.cpp
C++
cpp
3,022
permissive
/* * Copyright (c) 2017 ARM Limited. * * SPDX-License-Identifier: MIT * * 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 ...
d26531c5c701cfe3c029c28561ac3e96be78dfb8
541675bcef44a2ee2663b23d60cacde6ccdbe19d
DUMIE505/bitcoin
/src/wallet/rpcdump.cpp
C++
cpp
83,233
permissive
// Copyright (c) 2009-2020 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 <chain.h> #include <core_io.h> #include <interfaces/chain.h> #include <key_io.h> #include <merkleblock.h> #include <...
69c2681b15928b2ebe884e8d50fb19c331948e98
35f87cd6fdc886ed332d34cb649875137b738a4a
njlr/icu4c-2
/source/test/perf/convperf/convperf.cpp
C++
cpp
23,470
permissive
/* *********************************************************************** * Copyright (C) 2016 and later: Unicode, Inc. and others. * License & terms of use: http://www.unicode.org/copyright.html#License *********************************************************************** **************************************...
f0c10eb3cbb19a0bfc104db978b317d48d319b40
b105fdc8289fad1a692eb2303b67083f8e4a12ea
VB6Hobbyst7/3D_ShadowMap
/TreDe/TreDe/Direct3D.cpp
C++
cpp
4,959
no_license
#include "Direct3D.h" #include <iostream> using namespace std; #include "SettingsClass.h" Direct3D::Direct3D(void) : mDevice(nullptr), mDevCon(nullptr), mSwapChain(nullptr), mDSBuffer(nullptr), mRTView(nullptr), mDSView(nullptr), mDriverType(D3D_DRIVER_TYPE_HARDWARE), mEnable4xMsaa(false), m4xMSAAQuality(0)...
f9aaeb5aa809ad11b1861b4cc3cc75512c972ba2
b7045279cf0d1d5cfda3ce2d99cd07fccb47585a
FluffyNekoKun/GADE
/TriangleTask/TriangleTask/main.cpp
C++
cpp
366
no_license
#include"HelloTriangleApplication.h" #define GLFW_INCLUDE_VULKAN #include <GLFW/glfw3.h> #include <iostream> #include <stdexcept> #include <functional> #include <cstdlib> int main() { HelloTriangleApplication app; try { app.run(); } catch (const std::exception& e) { std::cerr << e.what() << std::endl; ret...
2878f9ef8a19e0a099ce7713319cfa63e1ea8eb7
d9a30b7ffaa058e37dfb4f0216ba0788b8de2d8d
jsj2008/leetcode
/locked/294. Flip Game II.cpp
C++
cpp
2,269
no_license
/* You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take turns to flip two consecutive "++" into "--". The game ends when a person can no longer make a move and therefore the other person will be the winner. Write a function ...
be81074fbc53b36ff52c7caba5254ed8c8dbc3db
30c5747fb0796c51b48f3b38d3e7ce44f1f2b532
Yash-YC/Source-Code-Plagiarism-Detection
/gcj/gcj/188266/vexorian/190103/0/extracted/C.cpp
C++
cpp
2,513
no_license
#include<string> #include<iostream> #include<sstream> #include<assert.h> #include<cstdio> #include<map> #include<algorithm> #include<bitset> #include<cmath> #include<queue> #include<functional> #include<set> using namespace std; //========================================================= // program: // long long comb...
fd1d87d13dfcafbc5aee87bde634a3b089d4fb84
b78f0a925639fe667878d8c74136441739ab35a9
GJGijan/List
/list/unordered.cpp
C++
cpp
3,027
no_license
#include <iostream> #include "unordered.h" unordered::unordered() :baselist() { } unordered::~unordered() { delete[] item; } bool unordered::listEmpty() //checks whether the list has no data { int dataFound = 0; for (int i = 0; i < maxSize; i++) { if (item[i] != 0) return false; } return true; } bool u...
b176c7f28910c9b3aac034d657b306e6e0158fa7
7c875b113892e583be38cd0d2585d2fa656c6b7d
EHB-MCT/Plant-Sensors
/Sensors/dhtl/src/main.cpp
C++
cpp
2,700
no_license
#include <Arduino.h> #include <string> #include <WiFi.h> #include <WiFiMulti.h> #include <WiFiClientSecure.h> #include <SocketIoClient.h> #include <ArduinoJson.h> #include <sensor.h> const char* ssid = "FPDreamTeam"; const char* password = "fullproject"; char host[] = "10.0.0.1"; // Socket.IO Server Address int ...
283dbb36b143267a3c5549c01633a7049ad62720
a3f5c9b947864179e33f78cfa077762263a30bf8
deardeng/learning
/cpp4/04autoptr.cpp
C++
cpp
865
no_license
#include <iostream> using namespace std; #include <string> struct date{ int year; int month; int day; }; struct Person{ string name; int age; bool gender; double salary; date birth; Person(){cout<<"创建Person对象在"<<this<<endl;age=88;} ~Person(){cout<<"释放Person对象在"<<this<<endl;} }; class autoptr{ Person* p; sta...
a29728def429e1075cbfede8111231df96c7f48a
061cb884adadc3c6c17094c3c44060bd3bc31427
invor/glowl
/include/glowl/GLSLProgram.hpp
C++
hpp
16,483
permissive
/* * GLSLProgram.hpp * * MIT License * Copyright (c) 2019 Michael Becher */ #ifndef GLOWL_GLSLPROGRAM_HPP #define GLOWL_GLSLPROGRAM_HPP #include <iostream> #include <sstream> #include <string> #include <utility> #include <vector> // Auto detect glm header availability #ifndef GLOWL_USE_GLM #if __has_include(<gl...
e71767f94829845efe56b9cf2ba8eee15b04ea0e
b82455e2e96de643a87ffc6ca6c93405a5a0c7f6
sanjeetboora/Launchpad-Pitampura-10June
/Lecture 2/pattern2.cpp
C++
cpp
460
no_license
#include <iostream> using namespace std; int main(){ int user_row,val=1; cin>>user_row; for(int row=1; row<=user_row; row++){ for (int col = 1; col <= row; col++){ cout<<val<<" "; val++; } cout<<endl; } return 0; // int mul = 1; // for(int i=1;i<=y;i++){ // mul = mul*x; // } // cout<<mul<<endl; ...
01bfa55be4f701fed5ea671e64881dc2568d39f4
31cab32f2b5d2b7ed74ca94726a64617e0a53d2e
ch3ny1/CSCI-1113-HW
/Labs/Lab 6/cheny004_6C.cpp
C++
cpp
1,944
no_license
//lab 6_Workout 1 #include<iostream> #include<iomanip> using namespace std; const int NROWS = 5; const int NCOLS = 5; void input(double old[NROWS][NCOLS]); void display(double temp[][NCOLS]); void stablize(double temp[][NCOLS], double tol); int main() { double temp[NROWS][NCOLS]; double tol; input(temp); cout <<...
40eef6462c7786b29ce1a67a6b5687a0ed8524be
c60739eb9801db7f6f338e768cec9cc07e08b99f
knight666/glazedcake
/include/public/Context.hpp
C++
hpp
1,667
permissive
/* Copyright (C) 2017 Quinten Lansu 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, distrib...
a6036d6f86b689845a31d1d994169fcd6d36c649
bd33c40143dee9988c6784c25a0dfb67e3299759
chenming-me/chromium
/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc
C++
cc
64,541
permissive
// Copyright 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/views/frame/browser_non_client_frame_view_ash.h" #include <string> #include "ash/public/cpp/ash_constants.h" #include "ash/p...
35844791e6233dc40a123ba0c7e60db75df1b765
45f7df20451bf49d32be14dc060bfe8d2f3310ba
Littlegaga666/Secure-Two-party-K-means
/src/abycore/sharing/yaoserversharing.cpp
C++
cpp
45,913
no_license
/** \file yaoserversharing.cpp \author michael.zohner@ec-spride.de \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation Copyright (C) 2019 Engineering Cryptographic Protocols Group, TU Darmstadt This program is free software: you can redistribute it and/or modify ...
eeafb0fb5a478b320317d642d8ba383f47ce4069
f1c9fe34f68fd0ad29246d3a834e9f7ddb3b6bce
kmu-algospot/problems
/TILING2/juheesvt.cpp
C++
cpp
790
no_license
// // Created by juheeSVT on 2020-03-21. // // // Created by juheeSVT on 2020-03-21. // #include <iostream> using namespace std; const int MAX = 100; int memory[100]; int main() { int testCase, number; cin >> testCase; while(testCase--) { cin >> number; if (number == 1) cout << 1 <<...
bb9bae0af0ac92afa19b720ca6624c467cdd34d1
b70f71c4645a40d6fdab4ae21a5b5c8ea66f32a2
strigazi/athena
/TestBeam/TBEvent/src/TBBPC.cxx
C++
cxx
1,668
permissive
/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "TBEvent/TBBPC.h" ///////////////////////////////// // Constructors and Destructor // ///////////////////////////////// TBBPC::TBBPC() : TBBeamDetector() { this->reset(); } TBBPC::TBBPC(const std::string& thisBPCName) :...
3ec624dd9c7a65a27c31aacfb5129c09f531bcbe
ca3994a1dbdf27dfc96414fbac35c8a726b26531
Qu3tzal/meuporg
/meuporg-server/source/Kantan-2/GUI/GUIGraph.cpp
C++
cpp
1,434
no_license
#include "GUIGraph.hpp" namespace kantan { GUIGraph::GUIGraph() : m_numberOfPoints(0) , m_vertexArray(sf::LinesStrip) { //ctor } GUIGraph::~GUIGraph() { //dtor } void GUIGraph::setSize(float x, float y) { m_size = sf::Vector2f(x, y); } void GUIGraph::addValue(float x, float y) { m_values.push...
e1436a09988be91afa0d5ccfd9b32cfb89b0ef64
fd751047a5d27ba6a7ca8a169865d6b0bbf7db76
TaoDF/high-performance-coding-
/Final/q5/solver.cpp
C++
cpp
4,242
no_license
#include "gatsp.hpp" #include <chrono> #include <cstdlib> #include <ctime> #include <iostream> #include <fstream> #include <string> #include <sstream> #include <unistd.h> void output_tour(const GATSP& gatsp, const GATSP::index_type& first_index, const std::string& name, unsigned long int iterations) { std::ostrin...
223902e54d100caabeee845f5a24507c2ae701ba
66003334852a435be718b046f7ec6ee8847266f1
VaibhavSaran/Competetive-Programming-CPP
/cp11.cpp
C++
cpp
910
no_license
/*Problem Statement: Arun wants to perform sorting of an array of size n Element with following contraints 1) Arun don't want to use in-built function for sorting 2) Only single for-loop or while-loop is allowed*/ #include <bits/stdc++.h> using namespace std; int main() { int j,temp,a[100],n; cout<<"Enter the...
6092c2f84c85d9fd9e31b34ce313f4019cab4728
db72157bbdd87786bd65da71e746d1e84b526852
Reza-Najafi/rpp
/src/modules/hip/kernel/rain.cpp
C++
cpp
7,807
permissive
#include <hip/hip_runtime.h> #define saturate_8u(value) ( (value) > 255 ? 255 : ((value) < 0 ? 0 : (value) )) __device__ unsigned int rain_xorshift(int pixid) { unsigned int x = 123456789; unsigned int w = 88675123; unsigned int seed = x + pixid; unsigned int t = seed ^ (seed << 11); unsigned int r...
d64e8fc0878f03254a217ccea5f26e5297b261e9
170ad81a6b7400e7e58286cc043c87ad03ee06d1
FanJups/apollo
/modules/dreamview/backend/simulation_world/simulation_world_service.cc
C++
cc
46,450
permissive
/****************************************************************************** * Copyright 2017 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
8692819cd3e9d7a7e1aaea061ace78ca2ae6a969
72e7df5a93ad2228f117b5f37398740514345955
ISTE-SQA/HamsterJNIPP
/java/lang/invoke/LambdaForm_NamedFunctionProxy.cpp
C++
cpp
3,504
no_license
#include "net/sourceforge/jnipp/JNIEnvHelper.h" #include "LambdaForm_NamedFunctionProxy.h" // includes for parameter and return type proxy classes #include "java\lang\ObjectProxy.h" #include "java\lang\invoke\MethodHandleImpl_IntrinsicProxy.h" #include "java\lang\invoke\MemberNameProxy.h" #include "java\lang\invoke\Me...
0102bf50d02b84c08978f00fc5864308d66ce069
b89e2c96ff5332368bda83fd5fc52a544824e98f
viralgecko/kdepim-runtime
/resources/mbox/deleteditemsattribute.cpp
C++
cpp
2,068
permissive
/* SPDX-FileCopyrightText: 2009 Bertjan Broeksema <broeksema@kde.org> SPDX-License-Identifier: LGPL-2.0-or-later */ #include "deleteditemsattribute.h" DeletedItemsAttribute::DeletedItemsAttribute() { } DeletedItemsAttribute::DeletedItemsAttribute(const DeletedItemsAttribute &other) : Akonadi::Attribute(...
9c9cc2bda15f6d09edca7f60aa8e34a129b9e5b2
eeb3378eae0caa60320e8b30cf7bb41e84dca733
liuhycn/algorithm-exercise
/PAT/PAT/PAT-A/A-1046.cpp
C++
cpp
667
no_license
// // A-1046.cpp // PAT // // Created by Hongyan Liu on 2019/5/5. // Copyright © 2019 Hongyan Liu. All rights reserved. // #include "Header.h" int dist[100001]; int ans[100002]; int main() { int n; pp(); scanf("%d",&n); int sum = 0; for (int i = 1; i<=n; i++) { scanf("%d",&dist[i]...
f22ca323b9655ceac60a925256f1d1f61386667f
8049e277a67c07391e6db4ad27893a67a1e57f8c
maperz/Teaser
/include/Teaser/Types.hpp
C++
hpp
369
no_license
//------------------------------------------------------------ // <copyright file="Types.hpp" autor="Markus Perz"> // Copyright (c) Markus Perz. All rights reserved. // </copyright> //------------------------------------------------------------ #ifndef TEASER_TYPES_HPP #define TEASER_TYPES_HPP #include <cinttype...
08d9eefd713e940365520bfd6130b1aff82c63fa
1167cb9a4391f6db6540af202802d04f2043cb93
lilexuan/codeup
/100000611C.cpp
C++
cpp
955
no_license
#include <cstdio> #include <cstring> struct node { char data; node* lchild; node* rchild; }; char pre[30], in[30]; node* create(int preL, int preR, int inL, int inR) { if (preL > preR) { return NULL; } node* root = new node; root->data = pre[preL]; int k; for (k = inL; k <...
4ff3579d8ebb88d5971f9e6932e719d92b141e46
9a10d0b666146a72dbe565f8dc6178e9f31b0377
shrutz2007/c-
/Paper2Q1.cpp
C++
cpp
540
no_license
#include<iostream> using namespace std; /*C++ Function to print leaders in an array */ void printLeaders(int arr[], int size) { for (int i = 0; i < size; i++) { int j; for (j = i+1; j < size; j++) { if (arr[i] < arr[j]) break; } if (j == size) // the loop didn't break ...
59a86a075c1269ae060466c8ae2f35a4324a8deb
249fccc5e3ee32303d1c7acfa7fd6c3e358b0a83
ybai8/Leetcode
/searchinRotatedArray33.cpp
C++
cpp
541
no_license
class Solution { public: int search(vector<int>& nums, int target) { int n=nums.size(); int l=0; int r=n-1; while(l<=r){ int mid=(l+r)/2; if(target==nums[mid]) return mid; if(nums[mid]>=nums[l]){ if(target>=nums[l]&&target<nums[mid]) ...
d5322ed58f88052bf76da6cd6801d79f005522ce
1d35b5dad6b5244ba5defda61fe3c4e8b452eb08
liuxuanhai/Cplusplus-References
/lx.cpp
C++
cpp
2,552
no_license
#include <iostream> #include <string> using namespace std; #include "lx.h" size_t count = 0; // ::count void Count(string& s) { ::count ++; } int main(int argc, char**argv) { List<string> l; l.pushTail("one pushTail"); l.pushTail("two pushTail"); l.pushTail("three pushTail"); l.pushHead("zero...
10bb3f50da6de1dd87d57abbe7cd63e4af91f320
76d9f52cbb26f89722ee2861c3d394b42453aaa6
Twinparadox/AlgorithmProblem
/Baekjoon/2206.cpp
C++
cpp
1,465
permissive
#include <iostream> #include <queue> #include <string> #include <vector> using namespace std; int dir[4][2] = { {1,0}, {0,1}, {-1,0}, {0,-1} }; int N, M; vector<vector<int> > board; vector<vector<vector<int> > > dp; bool isValid(int y, int x) { return y >= 0 && y < N && x >= 0 && x < M; } int BFS(int y, int x) { que...
36e0671c969048fea5c82c206ae29c22d393050b
8e772ed920fb88ed66c3abbe8d5ecd20e2c44e83
yyy-hhh-lll/caffe_mobilessd
/src/caffe/ristretto/layers/conv_ristretto_layer.cpp
C++
cpp
18,606
permissive
#include <vector> #include <iomanip> #include "ristretto/base_ristretto_layer.hpp" #include "caffe/filler.hpp" #include "string" namespace caffe { template <typename Dtype> ConvolutionRistrettoLayer<Dtype>::ConvolutionRistrettoLayer( const LayerParameter& param) : ConvolutionLayer<Dtype>(param), BaseRist...
bd2d358ffbf7c112dc4875aaef9641060bcb309b
a34c455a9eea4ba1e84fc794af53e72e0296c3e3
Nikhil94j/Data-structures-and-Algorithms
/Recursion and Backtracking/Introduction to Recursion/Tower_of_hanoi.cpp
C++
cpp
507
no_license
#include<iostream> using namespace std; void toh(int n, int t1id, int t2id, int t3id){ // write your code here if (n==0) return; toh(n-1,t1id,t3id,t2id); //will print the instruction to move n-1 disks from t1 to t3 using t2 cout<<n<<"["<<t1id<<"->"<<t2id<<"]"<<endl; toh(n-1,t3id,t2id,...
1cb047e5fcde80f40bb7a9b2bb9565a5b77135e7
df07e4f009fe491914c0a851cf138e4ae1a2edc2
BlackLunx/tp-lab-7
/src/cell.cpp
C++
cpp
909
no_license
// // Created by Mikhail on 01.05.2020. // #include <cell.h> #include <ocean.h> #include <utility> Cell::Cell(pair<int, int> _position, Ocean *_ocean) : position(std::move(_position)), ocean(_ocean) {} void Cell::deleteObj() { if(object) { delete object; object = nullptr; } } Object *Cell::g...
bebbda55d1b51ec97039422258bb09080505ac8f
e3f5e7f7eada070d6dd27625bfe19b38f3250a8b
kingring/swift
/lib/AST/Builtins.cpp
C++
cpp
109,207
permissive
//===--- Builtins.cpp - Swift Language Builtin ASTs -----------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
63d1ade2a79d84218b380a5d204f6b28a821437f
4c5bfebf16a4750d3d6565a199896ef8f57f8060
kyun2024/ProgramSolve
/23808.cpp
C++
cpp
317
no_license
#include <iostream> char map[][6]={ "@ @", "@ @", "@@@@@", "@ @", "@@@@@" }; using namespace std; int main(){ int n; cin >> n; int i,j; for(i=0;i<n*5;i++){ for(j=0;j<n*5;j++){ cout << map[i/n][j/n]; } cout << endl; } return 0; }
e1289f50e52f156f60ce35fdd21e4a29a6f3da56
b7ef0136f109da33bb5b50f9866f7801dbe9326a
brock7/TianLong
/Client/Client/WXCore/OgreExt/OgreTexCoordBillboardParticleRenderer.cpp
C++
cpp
10,963
no_license
/******************************************************************** filename: OgreTexCoordBillboardParticleRenderer.cpp purpose: this particle renderer is used to renderer particle that want to change the texture coordinate at runtime. *********************************************************************/ #i...
ed6565db2160ade30e94a7018f1c30493c669ecc
bdd86d2dabce0c60725fcf3bd0bce691d73c80fd
kaitai-io/ci_targets
/compiled/cpp_stl_98/combine_bytes.cpp
C++
cpp
2,423
permissive
// This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild #include "combine_bytes.h" combine_bytes_t::combine_bytes_t(kaitai::kstream* p__io, kaitai::kstruct* p__parent, combine_bytes_t* p__root) : kaitai::kstruct(p__io) { m__parent = p__parent; m__root = this; f_...
528cf6b6e3594099b50c5f4d0c15005131f2be7d
d482d7d2a20a156f66b79d35c4514029215d1942
mkmartinw/compute-runtime
/runtime/gen8/windows/hw_info_config_gen8.cpp
C++
cpp
473
permissive
/* * Copyright (C) 2018 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/helpers/hw_info.h" #include "runtime/os_interface/hw_info_config.h" #include "runtime/os_interface/hw_info_config.inl" namespace OCLRT { #ifdef SUPPORT_BDW template <> int HwInfoConfigHw<IGFX_BROADWELL>::configureH...
e57775d708a5e903a81dfa5010f03ce9984e4b18
1683389a8a3c29de58c0aadbfb93bdf9f269a2be
shas9/codehub
/Codechef/Lost in Code/A.cpp
C++
cpp
1,089
no_license
// God put a smile upon your face <3 #include <bits/stdc++.h>` #define slld(longvalue) scanf("%lld", &longvalue) #define ll long long #define ull unsigned long long #define pll pair < long long, long long > #define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0) #define pb push_back #define bug ...
325e276602884682f38d498f58aca61308d3ce1e
c9c8312f2311cd599af99cd603f0f3f60e0e3250
DaniAngelov/Cpp_Programming
/HackerRank Challenges/Introduction/Variable Sized Arrays.cpp
C++
cpp
729
no_license
// github.com/DaniAngelov #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int N; cin >> N; int Q; cin >> Q; int** groupArr = new int* [N]; int number; for(int i = 0;i < N;i++) { cin >> number; ...
477d9eb00f1f3f55c88bc91bca48c4b1d2ef0678
b7cb068dd4317261d66a65248e0b994321d89bd9
kant/CLDrone
/src/Firmware/src/lib/mathlib/math/Quaternion.hpp
C++
hpp
9,270
permissive
/**************************************************************************** * * Copyright (c) 2013-2015 PX4 Development Team. 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. Red...
ac8671cca31141fef07ce00e22c909f33dc2b2a2
710548a2a868bb175a3e715385caeaa53bbf69b1
yash-gupta2000/CP_Codeforces
/codeforces/1203/E.cpp
C++
cpp
752
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; int a[n]; int cnt=0; for(int i=0;i<n;i++) { cin>>a[i]; } sort(a,a+n); set<int> x; if(a[0]!=1) { x.insert(a[0]-1); } else { x.insert(a[0]); } int prev=1; for(int i=1;i<n;i++) { if(a[i]!=1)...
94042998b775f580facb9c1fbffd5f7b1b66ef2e
97405f59169796d73c3de3fd0f63a2bf82cd2be2
satvik007/uva
/Problem Solving Paradigms/Complete Search/Recursive_backtracking_medium/The dominoes solitaire.cpp
C++
cpp
1,057
permissive
#include <bits/stdc++.h> using namespace std; typedef vector <int> vi; typedef long long ll; int n, m; vector <pair<int, int>> a; int flag; void solve(int row, int mask, int last){ if(row == n){ if(a[last].second == a[m+1].first) flag = 1; return; } for(int i=1; i<=m; i++){ if(!(ma...
c5d581aba02e52a15258dc31ad8909455a919821
0aac19c19f6cc4a50c27a78ed63d65eaed69097f
hta1996/Graphics-Final-Project1-3D-Render
/src/object/material.cpp
C++
cpp
2,056
no_license
#include "material.h" const Material* Material::DEFAULT = new Material(); /* void operator >> (const YAML::Node& x, Material &y) { x["color"] >> y.c; x["diffuse"] >> y.fd; x["reflect"] >> y.fl; x["refraction"] >> y.fr; x["refract_index"] >> y.ri; x["mirror"] >> y.fs; } /* Material::Material(con...
5e7953af53b9a3f317f995eb13f32fcf11c143cc
f4bcc0cf13a8c468627f1e063c58266eff25af0c
blockspacer/CarbonSDKAlpha
/Framework/Source/World/cgSpatialTree.cpp
C++
cpp
38,406
no_license
//---------------------------------------------------------------------------// // ____ _ _ // // / ___|__ _ _ __| |__ ___ _ __ __ _/ | __ __ // // | | / _` | '__| '_ \ / _ \| '_ \ \ \ / / | \ \/ / ...
aed7bad6d3bb138055e06a7d18d50269ef74d58e
cd9edb6621635652249ebd332309ff749abb89d1
libooo/hifi
/libraries/procedural/src/procedural/Procedural.cpp
C++
cpp
16,060
permissive
// // Created by Bradley Austin Davis on 2015/09/05 // Copyright 2013-2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "Procedural.h" #include <QtCore/QFile> #include <QtCore/QFileI...
05611ab55586143d01d747ae2636aa85cee2f754
3541dc8f7a135acb6c85639b3233b8e6a8d42b12
ctanakul/hackerRank
/c++challenges/LowerBound_STL/Lowerbound_STL.cpp
C++
cpp
782
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int size = 0; std::cin >> size; std::vector<int> vect(size); for(int i = 0; i < size;...
76241e4543708db32471020b127d413b65f0e4e6
2d7e7ea228430d8e7b832061ccc3ff2ed186e519
alexandraback/datacollection
/solutions_6404600001200128_0/C++/darkstallion/GCJ2015Round1A_A.cpp
C++
cpp
1,157
no_license
//darkstallion's template #include<bits/stdc++.h> #define fi first #define se second #define mp make_pair #define pb push_back #define popb pop_back #define del erase #define sz size #define ins insert #define FOR(a,b,c) for(int a = b; a < c; a++) #define FORS(a,b,c) for(int a = b; a <= c; a++) #define FO...
287c7fea0c97fe7445960da6f603720ca3dfe723
d92f4da84c89990d1b8df10131f9279519e43d16
cwshu/sudoku_solver
/src/sudoku_solver.cpp
C++
cpp
7,555
no_license
/** * @file sudoku_solver.cpp * @brief solve sudoku problem by SAT. mapping sudoku puzzle to SAT problem, serialize to/deserialize from DIMACS CNF form. */ #include "sudoku_solver.h" #include <iostream> uint32_t SudokuSolver::count_block(uint32_t row, uint32_t col) const { /* * block: * 1, 2, 3 ...
532a8f5f9ca9b47eb443bf80117b89a1a50efa76
fd5a0b13101d729c526b3e6446bbf336363f5444
shawon39/C-C-plus-plus-Programming
/Old Things/Blue Team Problem/1387 - Setu.cpp
C++
cpp
798
no_license
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define dbg1(x) cout<< #x<<" = "<<x<<endl; #define dbg2(x,y) cout<<#x<<" = "<<x<<" , "<<#y<<" = "<<y<<endl; #define loop(v) for(auto x : v2){ cout << x << " "; } cout << endl; int main() { fast; in...
788657cbfbabe23752a6cf24186330d7ae90ec60
7d5f2782cb5d913d8689ea473f86688f904e056b
ahuzmeza-ws/TAP
/lab_06/ex_01-People/pers.cpp
C++
cpp
3,223
no_license
/* ************************************************************************** */ /* */ /* */ /* pers.cpp ╦ ╦╔╦╗╔═╗╔═╗╔╦╗ */ /* ...
83fa8ead9bd27112ec325df5628762f273156a1c
64dacf190a73a7e84e413408511bfa62bde177a2
Oilplik/psscharts
/src/linechart.cpp
C++
cpp
27,923
permissive
/* MIT License Copyright (c) 2020 Paddington Software Services 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, m...
d25337d7c602a48cfecac72bad3e8d43a2292f9a
7f0e9dacabeacb0f522132c6918a0cfc9f85f7f8
whatisor/mediasoup-client-android
/mediasoup-client/deps/webrtc/src/call/rtp_video_sender.cc
C++
cc
39,327
permissive
/* * Copyright (c) 2015 The WebRTC 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 in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
0c97bf58bf89e5dab6c6f54c9668801f24e542d8
76d1af016b5d071e03ad7e3e78d97e683cdce40e
gegenschall/visualizationlibrary
/src/vlCore/ImageTools.hpp
C++
hpp
9,077
permissive
/**************************************************************************************/ /* */ /* Visualization Library */ /* http://www.visualizationlibrary.org ...
ed62b21337d096d3443cdf6b202a0dabc22ad545
f0250d7393fde75e7c81eff9a92b7cf721d2f377
swarzzy/flux
/src/_Win32Platform.cpp
C++
cpp
54,988
no_license
// NOTE: Enforcing unicode // Engine always supports unicode #if !defined(UNICODE) #define UNICODE #endif #if !defined(_UNICODE) #define _UNICODE #endif #include "Win32Platform.h" #include "Memory.h" #include "Path.h" #include <intrin.h> #include <timeapi.h> #include <tchar.h> #include <stdlib.h> #include "../ext/im...
3d357c6c05f1c7c645c9600ba344ed499d494653
13bc4bcd02b0faa1ecd8d1b496222a02034764a8
xtremi/para-mesh-generator
/para-mesh-generator/Mesh3DPipe.cpp
C++
cpp
1,744
no_license
#pragma once #include "Mesh3DPipe.h" Mesh3DPipe::Mesh3DPipe(const glm::dvec3& _pos, double _radInner, double _radOuter, double _height, double _revAng) : Mesh3DTubular(_pos, _revAng < 0.0), PipeGeometry3D(_radInner, _radOuter, _height, _revAng) { } /* elsize.x = size along radius elsize.y = size along inner edge ...
182b831ef8157ca1e4b4e54b7f1c28238cfa03f9
b75fb5a7672a1b75291dd698e76f6345e918385e
The00/SensorHub_firmware
/src/rpm.cpp
C++
cpp
3,134
no_license
/* * rpm.cpp * * Created on: 17 févr. 2017 * Author: theo */ #include "Arduino.h" #include "banc.h" #include "capturetim3.h" /// Global variables /// unsigned int lastVal; char rpm_count; unsigned int rpm_sample[MAX_RPM_SAMPLE]; void rpm_isr() { /* captureVal defined in capturetim3 driver */ rpm...
a57a67170f3257c885a4678c66b67769abc14cb8
57cfd34ac11233dbc2b1aaabf61815a07ea6e031
EQt/graphidx
/cxx/graphidx/lina.hpp
C++
hpp
1,231
permissive
/** Some linear algebra helpers */ #pragma once #include <cmath> // std::abs #include <algorithm> // std::max #include <limits> // numeric_limits<...>::infinity #include <type_traits> // std::is_arithmetic #include <stdexcept> #include <vector> template <typename F = double> inline F l1_diff(const...
a5804b41d8c8cbcca50d5c0c19b40bea704eb360
bce5143295f61103387e4d7380078326b13ce954
man-k28/2gis-test
/main.cpp
C++
cpp
759
no_license
/* * \file %{Cpp:License:FileName} * \copyright (C) 2021 * \author : Prokofev S.V. * \date : 18.08.2021 */ #include <QApplication> #include "2gis-test.h" constexpr static auto GLOBAL_APP_NAME = "2Gis-test"; int main(int argc, char *argv[]) { #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QApplication::setAttrib...
6e89a359989d604777f2c2e69e5642905606382b
5874d8626061dc21d63da2702482acd1810193ee
asyzruffz/ProjectPhronesis
/Phronesis/Sources/Phronesis/Maths/Vector2.hpp
C++
hpp
817
no_license
#pragma once #include <glm/glm.hpp> namespace Phronesis { template<typename T> struct Vector2T : public glm::tvec2<T> { Vector2T(); explicit Vector2T(const T& val); Vector2T(const T& x_val, const T& y_val); template<typename K> Vector2T(const Vector2T<K>& source); template<typename K> bool operat...
20d8bb13cd533e5890edd0ffe583b2ed9b22bb66
3bc8bb09115e98e2f958ad2170c56f2b69757114
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/Z6.1+poonceonce+poreleaseonce+ctrlonceonce.c.cbmc.cpp
C++
cpp
42,137
no_license
// Global variabls: // 0:vars:3 // 3:atom_2_X0_1:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 4 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) ...
13de9f9273bc4ebfb5565e51fb1feab84202ad81
968e23246ebe558eb122706c51cd94b4363bb0d1
FilmChain/FilmChain
/programs/utils/bitcoin_recovery.cpp
C++
cpp
1,035
no_license
#include "../../libraries/bitcoin/include/fcc/bitcoin/bitcoin.hpp" #include <fcc/blockchain/pts_address.hpp> #include <iostream> #include <iostream> #include <fc/exception/exception.hpp> using namespace mcc::blockchain; int main( int argc, char** argv ) { try { std::cout << "password: "; std::string li...
bfb5c491933f6559afbf965aff110906ced1a82b
582db005146966c187a469a060c079a88abb24b6
flyforhigh/vendor_mediatek_proprietary_hardware
/libhwcomposer/utils/tools.cpp
C++
cpp
23,593
no_license
#define DEBUG_LOG_TAG "TOL" #include <dlfcn.h> #include <sys/types.h> #include <sys/mman.h> #include <linux/ion_drv.h> #include <ion/ion.h> #include "ion.h" #include <cutils/properties.h> #include <utils/tools.h> #include <ui/GraphicBufferMapper.h> #include "transform.h" #ifdef USE_HWC2 #include "hwc2.h" #include ...
bc675852af28d6d60269f6f6fbab66afa60065fa
6108a1b8f711ca69be1d9b2d1e38ce1c4d688b84
vitae-labs/Vitae
/src/versionbitsinfo.cpp
C++
cpp
490
permissive
// Copyright (c) 2016-2019 The Bitcoin Core developers // Copyright (c) 2020-2021 The Vitae Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <versionbitsinfo.h> #include <consensus/params.h> const struc...
67cfb0b07518e11f807db552c7efa68aaf18c86e
f327dcccc368b921fd90e915348f9e02fc7148bb
Meisterlama/BwatEngine
/Engine/src/Rendering/Animation.cpp
C++
cpp
2,646
no_license
#include "Rendering/Animation.hpp" #include "Rendering/Model.hpp" #include "Debug/Logger.hpp" #include <cassert> using namespace Rendering; Animation::Animation(const std::string& animationPath, Rendering::Model* model) { Assimp::Importer importer; const aiScene* scene = importer.ReadFile(animationPath, aiP...
d5272e47cb721e2414d673285164c5d9d76fcfdf
4ee2f6ee8d472686c40467c15cd585d566f0e788
wuxiaobai09/leetcode-cn
/problems/145.binary-tree-postorder-traversal/145.binary-tree-postorder-traversal.cpp
C++
cpp
1,558
no_license
// 145.binary-tree-postorder-traversal.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include "pch.h" #include <iostream> #include <algorithm> #include <map> #include <unordered_map> #include <unordered_set> #include <vector> #include <queue> #include <deque> #include <set> #include <stack> #include <list> #include <strin...
dfa20910f59756f744a645a664a5e19e148bc31c
edac9b45a2d130132fe012ca10f0a2a565873c2f
grundler/pxar
/tests/PixTestIV.cc
C++
cc
5,864
no_license
#include <cstdlib> #include <algorithm> #include <iostream> #include <fstream> #include <TH1.h> #include <TMath.h> #include <TTime.h> #include <TPad.h> #include "PixTestIV.hh" #include "log.h" #include "helper.h" #ifdef BUILD_HV #include "hvsupply.h" #endif using namespace pxar; using namespace std; ClassImp...
0e937a9c0e15c89bb56ea100037617a00b172ec9
8b7b8e8bb66d832bbbde04dece3aaffec3d85587
zettel-kasten/burgerbot
/src/qt/clientmodel.cpp
C++
cpp
5,950
permissive
#include "clientmodel.h" #include "guiconstants.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include "transactiontablemodel.h" #include "alert.h" #include "main.h" #include "checkpoints.h" #include "ui_interface.h" #include <QDateTime> #include <QTimer> static const int64 nClientStartupTime = GetTim...
9adedcff4242ae3090bd2e8cc08935f91d5c1bce
14d05626924c5bf9e5242bce6e36518c25e31cef
yungyuc/nsdhw_19au
/hw2/t0037799/Q1/src/line.cc
C++
cc
408
no_license
#include "line.h" Line::Line(Line const &line) { this->datas_ = line.datas_; } Line::Line(Line &&line) { datas_ = std::move(line.datas_); } Line &Line::operator=(Line const &line) { this->datas_ = line.datas_; return *this; } Line &Line::operator=(Line &&line) { this->datas_ = std::move(line.datas_); return *t...
39af5681dea64bb9325ce9eb464fef90e5189a25
50ea42aaf84783afe6b76a4e51c5c1d9c2cbfd18
bnpy/bnpy
/bnpy/allocmodel/hmm/lib/FwdBwdRowMajor.cpp
C++
cpp
7,799
permissive
#include <iostream> #include "Eigen/Dense" using namespace Eigen; using namespace std; // ======================================================== Func Declaration // ======================================================== // Declare functions that need to be visible externally extern "C" { void FwdAlg( doubl...
1576b1605c53263ce8f4eb0b333eb1d2d87a131c
fc60042d503e4c46fddd5fa703b6df39766e5bdc
leeyangjie/quiche
/gquiche/quic/core/frames/quic_retire_connection_id_frame.cc
C++
cc
761
permissive
// Copyright (c) 2019 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 "gquiche/quic/core/frames/quic_retire_connection_id_frame.h" namespace quic { QuicRetireConnectionIdFrame::QuicRetireConnectionIdFrame( ...
be088c1f0b289a55647196420987d44ef5f4a05d
6a8b17477abfc1d0be219bafd669c9bba4ead8a6
LEChaney/ClothSimulation
/ClothSimulation/InputSystem.cpp
C++
cpp
5,318
no_license
// // Bachelor of Software Engineering // Media Design School // Auckland // New Zealand // // (c) 2017 Media Design School // // Description : A system which handles input and propogates // input to entities. // Author : Lance Chaney // Mail : lance.cha7337@mediadesign.school.nz // #inc...
927d5cec4d2ba89735fdf58c10d2601d7b8483af
4c527087edb8cdabc5b8cb5e49efadc6d3bb1217
thisiscian/voronoi
/src/quadratic.cpp
C++
cpp
1,560
no_license
#include "quadratic.h" Quadratic::Quadratic(double A, double B, double C) : Equation({A, B, C}) {} std::vector<double> Quadratic::get_x(double y) const{ std::vector<double> output; /* if Quadratic is functionally a line, we can't use the quadratic equation formula (divide by zero errors), so we solve...
431434d781b05b65aa032ee3a9fa71a14928034a
1656441763191efed5663c0fc9bf3d8287f064d5
sergivb01/aoc-2019
/01/ex2.cpp
C++
cpp
539
no_license
#include <iostream> #include <fstream> using namespace std; int required_fuel(int mass){ int fuel = mass / 3 - 2; if(fuel <= 0){ return 0; } return fuel + required_fuel(fuel); } int main(int argc, char const *argv[]){ ifstream in_stream(argv[1]); if(!in_stream.is_open()){ printf("Could not ...
5463e9087bdfb7d445f146599ebe90f6b9b5381c
f3fb63799f57d3e6101bee0f4aa04c8248d04b24
xhan0o/PoCs
/IoT/post_data.cpp
C++
cpp
1,004
no_license
#include <sqlite3.h> #include <stdio.h> int callback(void *, int, char **, char **); int main(void) { sqlite3 *db; char *err_msg = 0; int rc = sqlite3_open("data.db", &db); if (rc != SQLITE_OK) { fprintf(stderr, "Cannot open database: %s\n", sqlite3_errmsg(db)); ...
6a7891da6c2fddf26eaa9ccb70c4f345ae264edf
34a0a05422d1a884bc6d5cc4ca0f7146840d59c4
ElAraujo97/Cards
/main.cpp
C++
cpp
9,993
no_license
#include <iostream> #include <string> #include <array> #include "dealer.h" int checkHand(array<Card, 52> myDeck); using namespace std; int main(int argc, char **argv) { //char input = *argv[1]; int input = atoi(argv[1]); char* inputStringPointer = argv[1]; // cout << input << " is my numerical i...
fddeef9fea90fc932ab8e6aa04beb8d586cffc4f
f983646dbdf179be12734cdddc51886874e15dc1
Shopify/protobuf
/src/google/protobuf/compiler/command_line_interface.cc
C++
cc
108,488
permissive
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...