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
7cd688b1f00aaff7980f280a306d56983438f24c
2cfff99c916a797baa4ca67f8d5cf510dae57835
MukulVashishth/Leetcode-July-Challenge
/Day13.cpp
C++
cpp
648
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
03893e8682b0b77dbba8e9faaa83e048673f1445
cb15b01f14cf8394b07fdf35b2f7624e33d007c3
sudiptog81/ducscode
/YearII/SemesterIII/ComputerNetworks/Practicals/selectiveRepeat/main.cpp
C++
cpp
1,908
permissive
// main.cpp #include <cstring> #include <cstdlib> #include <cmath> #include "protocol.hpp" void getch() { cin.ignore(); cin.get(); return; } void clrscr() { #ifdef _WIN32 system("cls"); #elif __unix__ system("clear"); #endif return; } class selectiveRepeatSlidingWindow : public Pro...
7e84bf5ffe00605c97584c5b17ae9a8733c4d27b
86d4e74400944d46198b567f89d5460c9f12012a
libgdx/libgdx
/extensions/gdx-bullet/jni/src/bullet/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
C++
cpp
3,574
permissive
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permiss...
dba1faba608d08edf513d1ce6d64df195dcb0c5f
e1e79386384da37993de70dced7d72d764a28157
vinzenz/fcppt
/include/fcppt/log/detail/auto_context_fwd.hpp
C++
hpp
423
permissive
// Copyright Carl Philipp Reh 2009 - 2016. // 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 FCPPT_LOG_DETAIL_AUTO_CONTEXT_FWD_HPP_INCLUDED #define FCPPT_LOG_DETAIL_AUTO_CONTEXT_FWD_H...
7a142f6f2ba0d0402323be41275adb6ff570a687
b26516de40dbbe3e9214e785a333e26928d13e8f
Martins3/ACM
/leetcode/1/146.cpp
C++
cpp
345
no_license
#include <bits/stdc++.h> // #include "../dbg.hpp" using namespace std; #define REOPEN_READ freopen("/home/maritns3/test/cpp/input.txt", "r", stdin); class LRUCache { public: LRUCache(int capacity) { } int get(int key) { } void put(int key, int value) { } }; int main(int argc, char...
3de142dac76b7137730d0df39a6945eb46d5cbf0
69b9302132742f80df3faa18274ac51b499cb022
WONILLISM/Algorithm
/01_baekjoon/02_Samsung_EX/01_02_Samsung_EX/01_02_Samsung_EX/07_퇴사.cpp
C++
cpp
608
no_license
#include<iostream> using namespace std; const int MAX = 15; int N, Max; int P[MAX], T[MAX]; void Input() { cin >> N; for (int i = 0; i < N; i++) { cin >> T[i] >> P[i]; } } //T[i] : 3 5 1 1 2 4 2 //P[i] : 10 20 10 20 15 40 200 void Process(int sum, int day) { if (day == N) { if (Max < sum)Max = sum; ...
ac0a69aa5f6682154fb405978b50b072e6261edc
157de02a8b31752cd7743ea6cca549ded5c971a2
neelrshah/Cpp
/Experiments/Constructor and Destructor/BANKAPP.CPP
C++
cpp
2,036
no_license
//EXP=3 //PROGRAM TO IMPLEMENT CONSTRUCTOR AND DISTRUCTOR(BANK APPLICATION) #include<stdio.h> #include<iostream.h> #include<conio.h> class account { private: int an,month,dep,with; float rate,bal,intr; char name[15]; public: account(); ~account(); void getbal(); void compound(); void depos...
0de4d1cd75d54fa1fb327ec470902aeb6ded0a22
c08679e9293dcc5ff0cbcab9d7c3880e142d9d12
BitShekel/Tungsten
/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
C++
cc
44,143
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h" #include <algorithm> #include <memory> #include <set> #include <stri...
186c286e1ced6d1d468fb437d9a49c9a7f936f84
bf9e2b5679b4899147d274667addeaf5bbb167c7
NCAR/lrose-core
/codebase/apps/mm5/src/MM5Simulate/OutputFile.cc
C++
cc
5,478
permissive
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1990 - 2016 // ** University Corporation for Atmospheric Research (UCAR) // ** National Center for Atmospheric Research (NCAR) // ** Bo...
707c2f039d0ad61f27060aee2dc5c5fe96df7b2d
ebe9a64a6b03797c9042c6da646d995df409a443
guziqiu/qiu
/guziqiu/11.春招突击班/07.shence/01.cpp
C++
cpp
459
no_license
#include <iostream> using namespace std; int func(long long x) { if (x == 1) return 0; if (x == 2) return 1; while (x > 1) { if (x % 2 == 0) { x /= 2; // cout << x << endl; continue; } //cout << "x % 2 != 0 : " << x << endl; return 0; }...
c73ad6387bbbce471e14c45f4b3ef96e663954f5
54bb42db26149876a32d9e80ab0c615e47740ea2
vugartaghiyev/e-olymp-cplus
/2440.cpp
C++
cpp
386
no_license
#include<iostream> #include<vector> #include<bits/stdc++.h> using namespace std; int main(){ int n,m=11,a; cin>>n; vector <int> num; for(int i=0;i<n;i++){ vector <int> arr; for(int j = 0;j<m;j++) { cin>>a; arr.push_back(a); } sort(arr.begin(),arr.end()); num.push_back(arr[8]); } for(int i=...
27a1596505912c582cf3ae86006c61805a0e3285
7167b47e30b245a49ab304c8933521d7bbc8e5e8
leihui6/measurement_system_in_3d
/CPP/src/cloud_processing.cpp
C++
cpp
5,078
permissive
#include "cloud_processing.h" cloud_processing::cloud_processing() { } cloud_processing::~cloud_processing() { } void cloud_processing::get_average_spacing(std::vector<point_3d>& points, float & average_spacing, const size_t nb_neighbors) { std::vector<CGAL::Simple_cartesian<float>::Point_3> cgal_points; convert_...
8447a646e30ae4a63b640efd71edb2b0def30da6
da8cbea90dcdbd2089bb67ceeaba9c7c52a42471
huamichaelchen/reverb
/reverb/cc/support/queue_test.cc
C++
cc
5,704
permissive
// Copyright 2019 DeepMind Technologies Limited. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
e8014f0b5f3cdc6b90a12dee8da3bd809b3db53e
26270873cae5168980c4eb3ca3c2e572791e5e6a
sshedbalkar/DigiPen_Projects
/CS582/Project_1/Project_1/main.cpp
C++
cpp
7,057
no_license
#include "bn.h" #include <ctime> #include <string> void test0() { BayesianNetwork bn(5); //from the book B,E,A,J,M (Burglary,Earthquake,Alarm,Mary,John) // 0,1,2,3,4 //this user-ordering is the same as native (see comment in generate.data.cpp) enum {B,E,A,J,M}; //same as native ordering bn.AddLin...
c0e44fd26b407715df82c65f9c4871a5aa379d5d
53b34bce2eda5a51f63fdf8b6a11cdd854030f01
spyhak/mac_gazebo
/plugins/DiffDrivePlugin.cc
C++
cc
4,141
permissive
/* * Copyright 2012 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
53a2817836ec13411f64e317224021f3bb2412d0
ae7e55b231c84ceea5869d06762a187320dda0ff
microsoft/onnxruntime
/onnxruntime/contrib_ops/cuda/tensor/shrunken_gather.cc
C++
cc
1,295
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifdef ENABLE_TRAINING_OPS // Should remove the shrunken_gather include from ENABLE_TRAINING_OPS once 1). compute optimizer is enabled for inference or // 2). this is needed by inference for other purpose. #include "contri...
a05a505af85b17f5d61296ae0f2da461da8f42c4
0c9437c27987239d98a1d09a4f0dbca108e99bf7
tpoisonooo/MegEngine
/dnn/src/x86/conv_bias/f32/strategy_6x3_8x8.cpp
C++
cpp
19,287
permissive
/** * \file dnn/src/x86/conv_bias/f32/strategy_6x3_8x8.cpp * MegEngine is Licensed under the Apache License, Version 2.0 (the "License") * * Copyright (c) 2014-2021 Megvii Inc. All rights reserved. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distribu...
21ab5ac623e4890e36d10f7eb96384aabe84f337
da89a7a0b69de77d27ec21a0350223d83deadd88
cminnera/DataStructures-Algorithms
/C++Exams/Exam 3/P3.cpp
C++
cpp
1,738
no_license
//Clare Minnerath //Final Exam P3 //Popular Names #include <set> #include <iostream> #include <fstream> #include <string> using namespace std; int comCount; class popName { //private: // popularName Name1; public: set<popularName> theNames; friend ostream& operator<<(ostream & o, const popularNam...
dd15307695c92f9edec92d554dcc19ec8aa0321d
51380d6bf90b3f4a12c9904bb3d34c2ee2c2357c
LuminanceHDR/LibHDR
/src/libhdr/io/framewriter.cpp
C++
cpp
1,125
no_license
/* * This file is a part of LibHDR package. * ---------------------------------------------------------------------- * Copyright (C) 2012 Davide Anastasia * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by th...
76ae41e45c5cba9a5da4fbfca0d542e57eb709e1
b09b2e92c29b1a0497a20f4c9fd524f321f5e1c0
jarton/OOprosjekt
/01 Source - Header/class Eiendom.cpp
C++
cpp
10,552
no_license
#include <iostream> #include "class Eiendom.h" #include <cstdlib> // itoa #include <fstream> #include "conster.h" #include "stdio.h" #include <cstring> #include "globale funksjoner og variabler.h" #include "timer3.h" using namespace std; //Constructor u/parameter Eiendom::Eiendom(int oppdragsnr) : Num_...
beda9050a99af65909996eb673531dd108b40b64
7aebe595fc2866cf7363ddf01805ed9b757ea41f
kemokemokemo/Job-creation
/tutorial.cpp
C++
cpp
5,164
no_license
//==================================================================================================== // // 背景処理 (Tutorial.cpp) // Author Kimura Kouta // //==================================================================================================== #include "Tutorial.h" #include "Game.h" #include "camera.h" #...
ca3defd7fd2f85f8b282e6ab1868124fb9421a49
220d4dbefb179e1530ffc9e9b41b8cf1030b9c11
Stephen1993/ACM-code
/HDU1873.cpp
C++
cpp
715
no_license
#include<iostream> #include<queue> #include<string> using namespace std; typedef struct noto{ int ID; int number; bool operator<(const noto &a)const{ if(number!=a.number)return number<a.number; return ID>a.ID; } }; int main(){ int n,a,b,k; while(cin>>n){ k=1; string d; priority_queu...
850fda62021b7cca09495942cd8db5ece03f7cfe
2ad6a684623d1afd65584a5e4ec20281f587ecb8
firiexp/contest_log
/codeforces/1119D.cpp
C++
cpp
393
no_license
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template<class T> constexpr T INF = ::nume...
51c4fe1366ae907d54a4761e59b9e012a66b585e
fb4fad744b62f6176338d899b0851978cc98e1ae
Souravirus/spojQuestions
/shpath.cpp
C++
cpp
1,627
no_license
#include<bits/stdc++.h> using namespace std; #define INF 200001 typedef pair<int, int> iPair; class Graph { int V; list< pair<int, int> >*adj; public: Graph(int V); void addEdge(int u, int v, int w); int shortestPath(int s, int d); void modify(); }; Graph::Graph(int V) { this->V=V; adj=new list<iPair> [V]; } ...
a2a6e35d0422a64673a1261acd758c1362d05799
6c5342438ffffe99cc692a7099484795f5251373
kingmeng-storage/BitcoinDiamond
/src/rpc/server.cpp
C++
cpp
17,677
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2016 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 "rpc/server.h" #include "base58.h" #include "init.h" #include "random.h" #in...
b46fa1f35d27309c6949beb6935a25941eeb9273
33d221e06ea8a231f2ea57e25c9840bce3c2f9fe
cmwade/Caldwell-2020
/Caldwell-2020-Code/src/auton.cpp
C++
cpp
17,941
no_license
#include "vex.h" /* AUTON SELECTOR VALUES */ #define RED 0 #define BLUE 1 #define SKILLS 2 #define LEFT 0 #define RIGHT 1 #define SIMPLE 0 #define COMPLEX 1 #define HOMEROW 2 /* MULTI/POLYTASKER/SUPERTASKER FLAG VALUES */ #define NOTHING 0 #define UNFOLD 1 #define OPENINTAKES 2 #define OPENWIDE 3 #define BALLTOHOOD...
d1aadec98684d262fb6c588edcb10cbbec8b41ad
0bf104da1480345e4ba44bc5f9ac4ba077aabfae
jonniepolkinghorn482/LeetCode
/topic/CodingInterviews/fib/main.cpp
C++
cpp
931
no_license
/* # Copyright (c) 2020 Xinyan Han. All rights reserved. */ #include <bits/stdc++.h> #include <iostream> #include <vector> #include <queue> #include <string> #include <unordered_map> #include <map> #include <algorithm> using namespace std; class Solution { public: /** * vector */ // int fib(int n) ...
bf10495d1a8d5f1a2a3232dc7b81ccfef57144c8
b9d2ef11c0045184fe2564b54cf57319797d1601
ChechenItza/Daily-Planner
/custom_widgets/material_widgets/lib/testrippleoverlay.cpp
C++
cpp
1,777
no_license
#include "testrippleoverlay.h" #include <QPainter> #include <QMouseEvent> #include <QPropertyAnimation> #include <QDebug> TestRippleOverlay::TestRippleOverlay(QWidget *parent) : QWidget(parent), _animation(new QPropertyAnimation(this)), _radius(0) { _animation->setStartValue(0); _animation->set...
7de233f6ca7913cad1f14afaecfb4e5e06fc89ec
ed11b9818302d6ee2694638ad2f7490831511954
iridium-browser/iridium-browser
/services/video_capture/push_video_stream_subscription_impl.cc
C++
cc
6,076
permissive
// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/video_capture/push_video_stream_subscription_impl.h" #include "base/functional/bind.h" #include "base/functional/callback_helpers.h" #include "services/vide...
cf028c8bce1435ecf385452cc102a069399a3d3e
8e5829e7c6b03619c96bf3a4e7207a6d7ca4be98
timvoytko/BSU.LABS.PROG.PractiseTextStats.MVC
/PractiseTextStat+MVC/TextStat.cpp
C++
cpp
3,373
no_license
#pragma once #include"TextStat.h" TextStat::TextStat(std::string filename) { std::ifstream in(filename); if (!in.is_open())abort(); std::string tmp; while (!in.eof()) { bool exitflag = 1; std::getline(in, tmp); rows.push_back(tmp); std::so...
3e5d1edd07baa3bf1e1aaee149b59a367c0eff43
cc820ea592b33b320dfa7f8e3e32a1806e5397f2
VB6Hobbyst7/RVProject
/api_arv/lib/evid30/test/test.cpp
C++
cpp
4,711
no_license
#include <cc_evid.hpp> #include <iostream> void showHelp( void ); int main ( int argc, void* argv[] ) { int serial_line = -1; if ( argc == 2 ) serial_line = atoi ( (char*)argv[1] ); else for (;;) { std::cout << "enter serial line number "; std::cin >> serial_line; ...
9d0d4ce3ad2d3a81bd68b07f44a618ba63d51004
fd7ba78b6379847830edcde9edd4739b47fd9861
supersojo/webkit
/Source/WebKit/NetworkProcess/cache/NetworkCache.cpp
C++
cpp
25,320
no_license
/* * Copyright (C) 2014-2017 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
982559a83c37dfaf125c01066fa5ee44626b47a2
eb111c2f914131a5e576afdc3c3aadfbea018dc8
JoaoDanielRufino/Online-Judges
/LeetCode/minimize_deviation_in_array.cpp
C++
cpp
454
no_license
class Solution { public: int minimumDeviation(vector<int>& nums) { set<int> st; for(int x : nums) { st.insert(x % 2 ? x * 2 : x); } int ans = *st.rbegin() - *st.begin(); while(*st.rbegin() % 2 == 0) { int minn = *st.rbegin(); st.insert(mi...
568eae5dfa02f4ac04520bd9eea45cbf8fb5b350
007b90b4cf28e3c6bb436eed4b419b079062b15e
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE680_Integer_Overflow_to_Buffer_Overflow/CWE680_Integer_Overflow_to_Buffer_Overflow__new_connect_socket_64a.cpp
C++
cpp
4,619
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE680_Integer_Overflow_to_Buffer_Overflow__new_connect_socket_64a.cpp Label Definition File: CWE680_Integer_Overflow_to_Buffer_Overflow__new.label.xml Template File: sources-sink-64a.tmpl.cpp */ /* * @description * CWE: 680 Integer Overflow to Buffer Overflow * ...
bcae232f12d0f69a4c8779dc282592af05c5e948
45db016493e65f31945118ad7edee12c8b6ec5cb
azimafroozeh/duckdb
/src/include/duckdb/execution/operator/helper/physical_vacuum.hpp
C++
hpp
925
permissive
//===----------------------------------------------------------------------===// // DuckDB // // duckdb/execution/operator/helper/physical_vacuum.hpp // // //===----------------------------------------------------------------------===// #pragma once #include "duckdb/execution/physical_operator...
61822cd5743cb934705014d94499411fce742d4c
ce934e7ca3ce27e139ddaef769ab526ad7e83f47
Z3Prover/z3
/src/test/lp/nla_solver_test.cpp
C++
cpp
28,961
permissive
/*++ Copyright (c) 2017 Microsoft Corporation Module Name: <name> Abstract: <abstract> Author: Nikolaj Bjorner (nbjorner) Lev Nachmanson (levnach) Revision History: --*/ #include "math/lp/nla_solver.h" namespace nla { svector<lpvar> get_monic(int monic_size, int var_bound, random_gen& rand) { ...
6dd9a738ce8f12cffbc2ef4998c0efbee2b56943
8174be302c5d0bf33669eb52aefa7a8c8fec9530
ybouret/upsylon
/src/main/y/string/time.cpp
C++
cpp
420
no_license
#include "y/string/time.hpp" #include <ctime> namespace upsylon { string string_time:: stamp() { Y_GIANT_LOCK(); time_t timer = time(NULL); struct tm * tm_info = localtime(&timer); char buffer[128]; memset(buffer,0,sizeof(buffer)); strft...
24052e2faf64e4cf55f84b2627a5633e88b96e91
5a28bef990bfd0bacb1172f94c495207d3374785
dianatalpos/Object-Oriented-Programming
/test3/Disorder.cpp
C++
cpp
238
no_license
#include "Disorder.h" Disorder::Disorder(char* _category, char* _name, char* _symptoms) { strcpy(this->category ,_category); strcpy(this->name, _name); strcpy(this->symptoms, _symptoms); } Disorder::~Disorder() { }
f6dc143297dddfecd2f62cff456fb2bcc2588200
31023f87c75fa6e292d24012d7a74e8858c6c165
MAD1364/Practice
/c/practice/Computer_Programming_Practice_70.cpp
C++
cpp
2,430
no_license
/* File: Computer_Programming_Practice_70.cpp Author: Mario Delagarza C.S.1428.001 Lab Section: L07 Program: P70 --/--/-- This program Input: Constants: Output: */ #include <iostream> #include <iomanip> #include <fstream> #include <cstdlib> using namespace std; int main ( )...
ef1d4d4157463ed5b1ff85a8d67453707588d5ad
aa4f6623259e1d4289194dcabf025c9cede09ce9
krenshaw2018/Spike
/Spike/Backend/CUDA/Synapses/VoltageSpikingSynapses.hpp
C++
hpp
1,318
permissive
#pragma once #include "Spike/Synapses/VoltageSpikingSynapses.hpp" #include "SpikingSynapses.hpp" #include "Spike/Backend/CUDA/CUDABackend.hpp" #include <cuda.h> #include <vector_types.h> #include <curand.h> #include <curand_kernel.h> namespace Backend { namespace CUDA { class VoltageSpikingSynapses : public vir...
d227832eebd72dac55ca44926b8854d0b337f57f
f3870c9c8ebcd0f3136a2d0d2fdd9eb550a97ba7
bibhas/tracer
/src/libs/thirdparty/fakeit/src/config/catch/CatchFakeit.hpp
C++
hpp
3,540
permissive
#pragma once #include "fakeit/DefaultFakeit.hpp" #include "fakeit/EventHandler.hpp" #include "catch.hpp" namespace fakeit { struct VerificationException : public FakeitException { virtual ~VerificationException() = default; void setFileInfo(std::string file, int line, std::string callingMethod) {...
693399abe8241b4d821f2793bd49ab4a2815ed1e
df053fabed7c521ab086a77c7ea0dc00f24733cd
benjaminhampe/DarkGDK
/include/ext/imageTool_Repeat.cpp
C++
cpp
10,640
no_license
// Copyright (C) 2002-2013 Benjamin Hampe // This file is part of the "irrlicht-engine" // For conditions of distribution and use, see copyright notice in irrlicht.h #include <imageTool.h> namespace irr { namespace video { IImage* Tool::repeatImage( IImage* src, f32 u, f32 v ) { if (!src) return 0; // const co...
d2496a4630788ac2c77629040541b768f571e317
ebb398869e8ed55793b3e110af1e0fb6cc2836a8
joe4568/centreon-broker
/neb/inc/com/centreon/broker/neb/host_service.hh
C++
hh
2,354
permissive
/* ** Copyright 2009-2013,2015 Centreon ** ** 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 agr...
7997eac086cc1b24c1a0d9eecc5819a19e04b126
7ce1c1bb5bb138e0d5e435b2ea1d292e9b83a0c1
ltinphan/Path_Planning_Algorithm
/HybridAstar_truck_trailer_cplusplus/src/main.cpp
C++
cpp
3,175
no_license
/* Copyright 2018 Weilun Peng */ // main function #include <iostream> #include <fstream> #include <vector> #include "map.hpp" #include "pathfinder_hybrid_astar.hpp" #include "def_all.hpp" using namespace std; int main(int argc, char **argv) { // double gx = 0.0; // [m] // double gy = 0.0; // [m] // d...
8a82831bda15f60aaaee60262ceba58ba5526740
b9d06736221fc3d567232fd4a415a908e0ad7962
seilweiss/dwarfdb
/sd-n100f-ps2/SD2/Game/flat/iScrFX.cpp
C++
cpp
6,112
no_license
typedef struct RwVideoMode; typedef struct iColor_tag; typedef struct RwSky2DVertexFields; typedef struct RwSky2DVertexAlignmentOverlay; typedef struct RwRGBAReal; typedef struct RwSky2DVertex; typedef struct RwV3d; typedef enum RwVideoModeFlag; typedef RwSky2DVertex type_0[4]; typedef RwSky2DVertex type_1[4]; typede...
0a2994760b3b7ca62a2703919a471d7668bad89d
0c5c5adbd92362c94c62e4f62b35fc2dbac66f18
quadpixels/cyclimb
/sprite.cpp
C++
cpp
4,402
no_license
#include "sprite.hpp" #include <stdio.h> #include <assert.h> #include "util.hpp" #define _USE_MATH_DEFINES #include <math.h> void Sprite::Update(float sec) { pos += vel * sec; float rad_sq = glm::dot(omega, omega); if (glm::dot(omega, omega) > 0) { RotateAroundGlobalAxis(glm::normalize(omega), sqrtf(rad_sq)*...
3001348652bee0285ccdc192a27a0848233119ed
02c3bf7c24f01f3faafae78569c94f573f510abd
SYCstudio/OI
/Practice/2018/2018.10.10/BZOJ2834.cpp
C++
cpp
1,976
permissive
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<queue> using namespace std; #define ll long long #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) const int maxN=201000; const int maxM=maxN*20; const int inf=2147483647; class Pos { public: int x,y,id; }; class HData ...
357ae6f6b918d142ee892c938ac1074a8eff717b
60cd02a8bab3faaf1c20f579b84eac127160b7ad
lion38925/kit
/heap/k_largest_elements_in_array.cpp
C++
cpp
3,074
no_license
#include <iostream> using namespace std; // Swap function to interchange // the value of variables x and y int swap(int& x, int& y) { int temp = x; x = y; y = temp; } // Min Heap Class // arr holds reference to an integer // array size indicate the number of // elements in Min Heap class MinHeap {...
e87e0e0d9e808272b425d962b318a8691a6c6ec4
064d5197dc0cba388d20abd51895b5be97d5475c
Kwooley/CS01
/ch06/example-save.cpp
C++
cpp
504
no_license
#include <iostream> using namespace std; int main() { int localinmain; int i; i = 10; localinmain = 100; if ( 1 ) { int i; i = 20; int localinifstmt = 200; cout << localinifstmt << endl; cout << i ; //* Value will be 20; The local var. in if block. ...
e39d746747b0e01fa3dfc004c93ce242e058b302
e0afeda5a26a09db6e899e30bc34255104b90b4e
perone/nanopipe
/src/websocketsource.cpp
C++
cpp
1,941
permissive
#include "websocketsource.hpp" #include "nanomessage.hpp" #include "easylogging++.h" WebSocketSource::WebSocketSource(const std::string &uri) : NanoSource("WebSocketSource"), mUri(uri), mWSHub(nullptr) { } WebSocketSource::~WebSocketSource() { } std::string WebSocketSource::uri() const { return mUri; } void Web...
54e69b190e04845d0b983ee4a6cbe357d7c97b50
137eb11d076370e0a50a4a0241cac898ceca1857
novostary/codes
/LeetCode/Tree/binary-tree-maximum-path-sum.cpp
C++
cpp
584
no_license
#include <limits> #include <algorithm> using std::max; // Runtime: 32 ms struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; class Solution { public: int maxPathSum(TreeNode* root) { int ret = INT_MIN; maxToRoot(root, ret); return ret; }...
20ccdcc9a81ac785230a0cc7714d5751b8a65541
545b9a6d8e2db9f92f2dc2eb5efa670e52c7f54f
Resses/data-structures
/Deque Implementation/VecorOfVectors/deque2.cpp
C++
cpp
7,103
no_license
#include <iostream> #include <sstream> #include <queue> #include <algorithm> #include "deque2.h" #include <vector> using namespace std; //CONSTRUCTOR: Deque::Deque():capacity(10), size(0) { // Allocate new memory for each subvector for(int i=0; i<capacity; i++) vec.push_back(new vector<EType>(SUB_VECT...
0e2fa3795d83decb25c644ba21f07c6b61bbc4bf
01ac10f5a351fe21a37092a2e6f2a4b5e5638f26
shamanthMuroor/coding
/CodeForces/CppCodeForces/1560a-DislikeOfThrees.cpp
C++
cpp
354
no_license
#include <iostream> using namespace std; int main() { int t; cin >> t; while(t--) { int k; cin>>k; for(int i=1; ; i++) { if(i%10 == 3 || i%3==0) { continue; } if(--k == 0) { cout << i << endl; break...
a23b3567abd778137588d4d5cd512b77db573b35
d761309ddc277eb51e317222ac9ce45cd242da8f
aimoonchen/easyeditor
/easycomplex3d/src/easycomplex3d/StageCanvas.cpp
C++
cpp
395
permissive
#include "StageCanvas.h" #include "StagePanel.h" namespace esketch { StageCanvas::StageCanvas(StagePanel* stage) : ee::OrthoCanvas(stage) , m_stage(stage) { } void StageCanvas::onDraw() { if (const ee::ISprite* s = m_stage->getImage()) { ee::SpriteDraw::drawSprite(s); } ee::PrimitiveDraw::cross(ee::Vector(...
a3a35d15df055695244c7b4d5529eb78d42b7159
87f32f58997c8e62246b463e16e19f418d18ace3
camdey/gfxButton
/src/MacroStepper_demo/gui_test_screen.cpp
C++
cpp
8,673
no_license
#include "gui_control.h" #include "gui_test_screen.h" #include "extern_vars.h" namespace test_screen { #define num_btns 9 #define totalRows 3 #define totalCols 3 String stepNr; String railPos; int movementCount = 0; bool areArrowsEnabled = false; bool canEditMovementDistance = false; bool isShutte...
9ddecd3109b183a7844c645317a3f42276ce5492
5fd9d80b4f99f76a6314e770f472056322537844
ericluap/AttributeParser
/AttributeParserV2/Tag.hpp
C++
hpp
1,217
no_license
// // Tag.hpp // AttributeParserV2 #ifndef Tag_hpp #define Tag_hpp #include <string> #include <vector> using namespace std; //aaaaaand a final comment here class Tag { public: Tag(); Tag(string name); Tag(string name, string attributeName); Tag(string name, string attributeName, string attribute...
83a19a8d512c8691862d840484a614d96cdd1fa0
69df962d29080d04a8e459bc3338031148b5b2af
josephmisiti/flashlight
/flashlight/dataset/TensorDataset.cpp
C++
cpp
1,339
permissive
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <array> #include "TensorDataset.h" namespace fl { TensorDataset::TensorDataset(const std::vector<af::array>& datatenso...
cc4801ae12a778f3520dfe3bd083b945654b7e13
21c606d138081fb000de2da2be677d2dd0f23e3c
jettca/TextureAnimation
/src/Filtering/Filter.cpp
C++
cpp
616
no_license
#include "Filtering/Filter.h" using namespace TextureSynthesis; void Filter::filter(const Signal& signal, Aquila::SpectrumType& spectrum) const { std::shared_ptr<Aquila::Fft> fft = Aquila::FftFactory::getFft(signal.size()); spectrum = fft->fft(signal.samples()); filter(spectrum, signal.sampleRate); } voi...
4a8421aa76b1c063ceafa6a6b64aca897681e3d9
1b058118d2189eb9c1ee0ea6c637ab0c74cb65f8
piyushdubey-pd/codeforces_cp2
/1505A.cpp
C++
cpp
354
no_license
#include <bits/stdc++.h> using namespace std; void helper(vector<int> &arr, int n){ // for(int i:arr) // i+=1; arr.push_back(10); } int main(){ int n; cin>>n; vector<int> arr(n); for(int &i:arr){ cin>>i; } // {int x; cin>>x; arr.push_back(x);} helper(arr,n); fo...
4497e0b1a01baa5207ed61f55088a66def5cb046
e39153a53d75399080b4584468f2562dd6ff3756
wesreisz/wasm-explore
/ball/ball.cpp
C++
cpp
352
no_license
#include <emscripten.h> EM_JS(void, drawCircle, (float x, float y, float r), { const canvas = document.getElementById('screen'); const context = canvas.getContext('2d'); context.fillStyle = '#ff0000'; context.beginPath(); context.arc(x, y, r, 0, 2 * Math.PI); context.fill(); }); int main(){ drawCircle(40...
fdb042b2388c8eddd6090ce68cc54992d96242b7
8ebf8aa67bf430e08fb780e96776adde8d0aaa1c
adwpc/webrtc
/rtc_base/rate_limiter_unittest.cc
C++
cc
6,481
permissive
/* * Copyright (c) 2016 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...
e7dedb5d466b985721b162f80a0c387704c53ab8
098ef3ab0d845505c9748652c68eb9dc9a41d344
sago007/sago_env
/programs/oa_maps/onemap.hpp
C++
hpp
368
no_license
/* * File: onemap.hpp * Author: poul * * Created on 17. maj 2015, 13:35 */ #ifndef ONEMAP_HPP #define ONEMAP_HPP #include <set> #include <string> struct OneMap { std::string name; std::string longname; std::string special; std::set<std::string> bots; int fraglimit = 0; int timelimit = 0; std::set<std:...
5f3fdce14505d6b43e7a6edf282de18813030b47
3a7edf6d7505717336f8508925c887729ddb45ff
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_repos_function_2057_httpd-2.3.6.cpp
C++
cpp
5,734
no_license
static int ap_parse_request_form(request_rec * r, ap_filter_t * f, apr_array_header_t ** ptr, apr_size_t num, apr_size_t size) { apr_bucket_brigade *bb = NULL; int seen_eos = 0; char buffer[HUGE_STRING_LEN + 1]; const char *ct; apr_si...
657a41a91e8e2954ee4a251ceba0f42499fbf0c4
edb89b30b433305eb725c7625bb27cc77d2dab73
stnava/ITK
/Modules/Filtering/ImageStatistics/test/itkImageToHistogramFilterTest3.cxx
C++
cxx
3,418
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h...
22518470429242b57de963d6611708a3593649bb
cb621b1b85c118f9f67ca6c9e65347672fa5d615
ToruNiina/wad
/tests/test_bitset.cpp
C++
cpp
228
permissive
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include "wad/bitset.hpp" #include "utility.hpp" TEST_CASE( "std::bitset save/load", "[std::bitset]" ) { const std::bitset<8> v(131uL); REQUIRE(wad::save_load(v) == v); }
ae3fac942480134c1ed98671d1e522f7acb1fb33
13ff7f43eed5bd3396916f33dd9636d41ed26bf7
kyouko-taiga/SwiftSDD
/libsdd/tests/hom/common.hh
C++
hh
633
permissive
#ifndef _SDD_TESTS_HOM_COMMON_HH_ #define _SDD_TESTS_HOM_COMMON_HH_ #include "sdd/hom/definition.hh" /*------------------------------------------------------------------------------------------------*/ using sdd::composition; using sdd::cons; using sdd::fixpoint; using sdd::inductive; using sdd::intersection; using ...
5cec41d78c36605294fb88478caca37a69f36c10
cedc6daf569d18010e0f5982b9c9006005114f40
zhangwj0101/codestudy
/algorithm/HDU-ACM/ambition0109/3750.cpp
C++
cpp
935
no_license
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: ambition0109 ////Nickname: Ambition ////Run ID: ////Submit time: 2010-12-25 17:12:19 ////Compiler: GUN C++...
580e6e9f0deb9e89dcd7791e1923ccd6605eaa90
9f6521933beed443a0d24d0c45b70e8f7b1fa748
shibata0430/DemoLibrary
/LibraryDemo/MyLibrary/Library.cpp
C++
cpp
6,130
no_license
/** * @file Library.cpp * @breif ライブラリ全体の通り道のクラス実装 * @author shibata */ #include "Library.h" #include "Library\DirectX9.h" #include "Library\InputDvice.h" #include "Library\SoundInterface.h" #include "Library\InputManager.h" #include "Library\Window.h" #include "Library\TextureFileManager.h" #include "Library\Ver...
b342aa941f897a0a632dab7071535802d672f1dc
cd992b783f0dadab320af89abc2ed6e9097d64f2
kirshanthans/compiler
/step8/src/codegen.cpp
C++
cpp
13,314
no_license
#include "codegen.h" #include "symboltable.h" map<string, vector<IRNode> > CodeGen::codeByfuncName = map<string, vector<IRNode> >(); map<string, vector<IRNode> > CodeGen::codeByfuncNameUnopt = map<string, vector<IRNode> >(); map<string, vector<string> > CodeGen::callgraph = map<string, vector<string> >(); map<string,...
0af65568ad9a03e2e11e4e72b5175c7e3db10532
adba97e4e350eda2d12279c558b5191813f0b112
epl-viz/EPL_DataCollect
/dataCollect/model/cycleStorage/CycleStorageBase.hpp
C++
hpp
2,876
no_license
/* Copyright (c) 2017, EPL-Vizards * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditi...
331b3d752cca200079ff32262b4a81668fa58ab3
50a86c9b3fd1f8aacf555c69c62af8b94b6c146c
thisiscam/MultiPathP
/runtimes/cpp_runtime/PTypeBoxed.hpp
C++
hpp
766
permissive
#ifndef PTYPE_BOXED_HPP #define PTYPE_BOXED_HPP namespace RUNTIME_NAMESPACE { template<typename T> struct PTypeBoxed : public AbstractPTypePtr<PTypeBoxed<T>> { PTypeBoxed(const PTypeBoxed<T>&) = default; PTypeBoxed(PTypeBoxed<T>&&) = default; PTypeBoxed& operator=(const PTypeBoxed<T>&) = default; PTypeBoxed& ...
673fea6cb3680959e7ef6e65d4855b591a6ec96e
11c67a3870a64edeafa8e97c9e5baa49b6e0f20f
dreamJarvis/Problem_Solving
/matrix/oddValueMatrix.cpp
C++
cpp
3,258
no_license
// 1252. Cells with Odd Values in a Matrix #include <bits/stdc++.h> using namespace std; // brute force solution // time complexity : O(n*m) // space complexity : O(n*m) int oddCells(int n, int m, vector<vector<int>>& indices) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector<ve...
318295445e9e2426912db90fa82004bd874b0d06
a58a54cda723fa5edba9348162c628ebc541a7ea
Damya98/neOCampus-arduino
/neosensor/libraries/neocampus_drivers/lcc_sensor.cpp
C++
cpp
22,071
no_license
/**************************************************************************/ /*! @file lcc_sensor.cpp @author F.Thiebolt (neOCampus / Univ.Tlse3) @license LCC's Airquality sensors driver for neOCampus @section HISTORY aug.20 F.Thiebolt neOCampus integration adapted for ...
680d687b45f536f529297e1842a6e44c38316b9f
6897eaba3c60622336a7c49f04658c2fc29f4b46
fcui1/oop345projects
/OOP244_-_Final_Project_«Milestone_4»_submission_by_fcui1/ErrorMessage.cpp
C++
cpp
944
no_license
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstring> #include "ErrorMessage.h" namespace sict { void ErrorMessage::clear() { delete[] m_message; m_message = nullptr; } bool ErrorMessage::isClear() const { return (m_message != nullptr) ? false : true; } ErrorMessage::~Err...
30167da596491e48b65014dffe69b0a998daa1d1
49dcd5effb6ec5ec72621042dac6228b420c6513
vicholp/Contests
/2/1248_Vicho.cpp
C++
cpp
687
no_license
#include <bits/stdc++.h> using namespace std; int n = 0; int main(){ string q; cin >> n; getline(cin, q); for (int i = 0; i < n; ++i){ bool z = true; string a, b, c, d; getline(cin, a); getline(cin, b); getline(cin, c); a.erase(std::unique(a.begin(), a.end()), a.end()); for (int i = 0; i < b.l...
8dd958c9501e94c4843a03c4cb7f514e44b5b985
c8e58ff073a87c3eb96001b9b85d65d2a50a06c8
alu0101139456/Indexing-Service
/indexing-client/mainwindow.cpp
C++
cpp
987
no_license
#include <QMessageBox> #include <QRemoteObjectNode> #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) , remoteObjectNode_(new QRemoteObjectNode(REMOTE_OBJECT_REGISTRY, this)) { ui->setupUi(this); } MainWindow::~Ma...
317d014b3f3b4aa0a7ab53778de6c33364acab7f
24463871e90d1c943a6d114c524c1b50595de406
zhangchuhu/serviceframe
/service/dao_proxy/test_frame/speed_reader/source_util.cpp
C++
cpp
2,215
no_license
#include "source_util.h" #include <sstream> #include "server_common/seda/common/any_cast.h" #include <time.h> #include <stdexcept> #include <memory> #include <vector> #include <iterator> #include <cctype> using namespace std; int parse_colon_string2map(std::string& ss,std::map<std::string,std::string>& mp...
0114546563def4ee16118e5064a2312a23033f16
c9707d0c75cbc030abf29935a249bb8193f22932
chromium/chromium
/chrome/utility/safe_browsing/mac/hfs_unittest.cc
C++
cc
7,028
permissive
// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/utility/safe_browsing/mac/hfs.h" #include <stddef.h> #include <stdint.h> #include <memory> #include "base/files/file.h" #include "base/logging.h" #include "...
24bd85e4fa3c0bb9426c01200cdf90d81206464a
7f94eea80f08c25ac456bc8b551f59acef3b4456
luco2018/arrayfire
/test/sparse.cpp
C++
cpp
9,726
permissive
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
177a67dcd79201ee623df9e9e98a9e87a296fa2d
79474caf3cfae63d49ffde4ac1cf4cc35abb12fc
berber1016/chromium
/components/sync/engine/cycle/nudge_tracker.cc
C++
cc
14,060
permissive
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/sync/engine/cycle/nudge_tracker.h" #include <algorithm> #include <utility> #include "components/sync/base/sync_base_switches.h"...
67d1c4afdf98f9dbeac020fbd987b82748d1707b
0a766e629e9eebdd571e2b4ab8ba9831fdccdc5e
LizTheGameProg/Creator
/code/math/main (2).cpp
C++
cpp
2,083
no_license
/*#include <iostream> #include "commonTests.h" #include "vec2Tests.h" #include "vec3Tests.h" #include "vec4Tests.h" #include "mat2Tests.h" int main() { #pragma region common Tests #pragma endregion #pragma region vec2 Tests vec2ConstructorVOID(); vec2ConstructorFLOAT(); vec2ConstructorFLOATFLOAT(); vec2dot(); ...
a157bcc45e04ca506a8bcdcdb6ba39122b741b0a
0563423ba0d82982326ab6fa003969eb054ef088
taramic42/RayTracer
/RayTracer/RayTracer/Scene.cpp
C++
cpp
8,378
no_license
#include "stdafx.h" #include "Scene.h" Scene::Scene() { } Scene::Scene(string filePath) { //Open file ifstream scenefile; scenefile.open(filePath); //Close if file does not exist if (!scenefile) { cout << "Could not open file: " << filePath << endl; system("pause"); exit(0); } s...
0314faeafacc3f65d9a1efcb3922c8d8bf9d5880
eb096974ccd4bfee278c57ec132c659b7aae08ce
davidpucheta/Simulaciones
/SimulacionTanqueDeAguaProporcional con plot/moc_plot.cpp
C++
cpp
2,245
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'plot.h' ** ** Created: Mon Jun 4 19:52:11 2012 ** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1) ** ** WARNING! All changes made in this file will be lost! *******************************...
fbb2614bc4c68039df1ee8276a894359c369f3a4
96da1005b7b5ad050c620eca2bec0e90092cc887
nehasangeetajha/Internity_DSAlgo
/chewbacca&number.cpp
C++
cpp
357
no_license
#include<iostream> #include<string> using namespace std; int main() { string str; cin>>str; for(int i =0;i<str.length();i++) { int j = str[i] - 48; if(j==9&&i==0) continue; if(j>4) { j = 9-j; } str[i] = j + '...
b1f4d610b71347a5da7ab0f1b09c1560914d9259
b0cba90986b4e130f543a8c239893588f95c7835
ouxu/CppRecord
/Other/五位.cpp
C++
cpp
256
no_license
#include <iostream> #include <cmath> using namespace std; int main() { int m,n; char a,b,c,d,e; cin>>m; a=m%10;m=m/10; b=m%10;m=m/10; c=m%10;m=m/10; d=m%10;m=m/10; e=m%10;m=m/10; n=(((a*10+b)*10+c)*10+d)*10+e; cout<<n<<endl; return 0; }
9bb3d586d04dc9a2944553236456f62b6d54e919
402c47eca29bddce64edbad59d05757a87b8bbc1
DaveLapp/iowahills_dsp
/tools/pmord_tool.cpp
C++
cpp
4,964
permissive
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <cmath> // https://www.sciencedirect.com/topics/engineering/mcclellan-algorithm // https://dsp.stackexchange.com/questions/37646/filter-order-rule-of-thumb // https://dsp.stackexchange.com/questions/20514/what-is-the-relation-of-the-transitio...
aabbb01ba0663b7cfe9a4e190e2db5491d9607d2
36f3fb16f8a827c485c7027e868797f34bcc7f60
keineahnung2345/leetcode-cpp-practices
/169. Majority Element.cpp
C++
cpp
8,717
no_license
/** Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority element always exist in the array. Example 1: Input: [3,2,3] Output: 3 Example 2: Input: [2,2,1,1,1,2,2] Output: 2 **/ //Run...
c2c96a2d37857d0c7cff6830dc66f6c27894e829
2c9a8eecf2a82e96e2fcca458eabf3e9c1d04ade
SeveneduS/FarManager
/far/common/string_view.hpp
C++
hpp
5,872
permissive
#ifndef STRING_VIEW_HPP_102EA19D_CDD6_433E_ACD2_6D6E4022C273 #define STRING_VIEW_HPP_102EA19D_CDD6_433E_ACD2_6D6E4022C273 #pragma once /* string_view.hpp */ /* Copyright © 2016 Far Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that ...
dde1a2cfaefeb41fe4d9d654a233e23eb0bbc174
3a1df6477f29c75137b3c428673ae16e7f4b468e
nothingholy/lab-02-cache
/sources/cache.cpp
C++
cpp
5,686
permissive
// // Created by nothingholy on 30.09.2019. // #include <cache.h> void toString(string& str,int iter,string name,int64_t time,int bufSize){ str+= "investigation:\n\ttravel_variant: " + name + "\n\t- experiments:\n\t\tnumber: " + to_string(iter) + "\n\t\tinput_data:\n\t\t\tbuffer_size: " + to_string(bufSi...
50c5e92c4c0219e1a84857d239076679d3da0322
bcb27c29fefb47accc653471c325b8459de8ef40
fishy15/competitive_programming
/online/cf/280/vanya_lantern.cpp
C++
cpp
689
no_license
// idk why this doesnt work oops #include <iostream> #include <algorithm> #include <vector> using namespace std; typedef long long ll; int main() { cin.tie(0); ios::sync_with_stdio(0); int n, l; cin >> n >> l; vector<ll> nums; for (int i = 0; i < n; i++) { ll x; cin >> x; nums.push_b...
cf3c5c35b5705480cd6ea6a2aed46250e79da16a
24daf35882bfa7505318271755147f1d49a51fd3
sylcastaing/clock
/lib/LEDMatrixDriver/LEDMatrixDriver.cpp
C++
cpp
7,344
no_license
/* * LEDMatrixDriver.cpp * * Created on: 30.03.2017 * Author: Bartosz Bielawski */ #include "LEDMatrixDriver.hpp" #include <Arduino.h> LEDMatrixDriver::LEDMatrixDriver(uint8_t N, uint8_t ssPin, uint8_t flags, uint8_t *fb) : #ifdef USE_ADAFRUIT_GFX Adafruit_GFX(N*8, N), #endif ...
7a3130cb8dd3a1cac813b561955d8588b1daf0a9
4f457438d3da79e339ab70400a68de03764935a3
edcoffin/vm-project
/src/jitbuilder/increment/increment.hpp
C++
hpp
415
no_license
#ifndef INCREMENT_INCL #define INCREMENT_INCL #include "JitBuilder.hpp" #include <iostream> typedef int32_t (IncrementFunctionType)(int32_t); class IncrementMethod : public OMR::JitBuilder::MethodBuilder { public: IncrementMethod(OMR::JitBuilder::TypeDictionary *types); virtual bool buildIL(); stati...
c5c0ee4144fbbc1e87d92dff209a7471186e6b52
3b361a2d12ef870da8166a4a3301280185cc5ab2
DominikStyp/cpp-tutorial-examples
/StaticKeywordOutsideClass1.cpp
C++
cpp
1,688
no_license
/* 1) You can't have 2 global NON-STATIC variables of functions with the same name across translation units (.cpp files) in one project !!! If you try this: int nonStaticVarOutsideClass = 20; You'll get an error: build/Debug/MinGW-Windows/main.o:main.cpp:(.data+0x0): multiple definition of `nonStaticVarOu...
c126b918fe12d4c80f1928a11242e30826f5542f
780ba9ef519467324ae52b779e6b17308631fd18
minhaz1217/My-C-Journey
/1. Minhaz Template/Kimbbakar_Contest-Resource-master/Graph/Template/BellmanFord.cpp
C++
cpp
642
no_license
inline void bellman() { cost[1]=0; for(int i=1;i<nd;i++) { for(int j=0;j<sz(path);j++) { if(cost[path[j].u]+path[j].w <cost[path[j].v ] && cost[path[j].u]<100000000) { cost[path[j].v]=cost[path[j].u]+path[j].w; } } } } inline ...
96275a805fb31b614dd35465029e4403f886da0a
8053bc8a8b2971451fa512b6d4ccb656c2a9cfdf
IrinaStefanescu/ProjectRestaurant
/Meniu.cpp
C++
cpp
1,057
no_license
#include "Meniu.h" #include <iostream> Meniu::Meniu() { mancaruri.push_back("Ciorba de burta"); mancaruri.push_back("Ciorba de legume"); mancaruri.push_back("Ciorba de ciuperci"); mancaruri.push_back("Frigarui de pui"); mancaruri.push_back("Tocana de pui"); mancaruri.push_back("Vita Chateaubriand"); mancaruri.p...
bb34cdb5fe4d16fa717b877527946dafd220b0a4
89aff314e9323ae317dd110bff2d28a41ef5bab5
VladyslavShch/OOP
/Lab_1_Simple_objects/CoffeMachine/CoffeMachine/coffe_machine.cpp
C++
cpp
10,365
no_license
#include "coffe_machine.hpp" #include <cassert> //Out of information about state of our Coffe Machine //in next format: count of seeds, count of water, count of portions std::ostream & operator << ( std::ostream& _o, const CoffeMachine & _cm) { _o << _cm.SeedsInfo() << ' ' << _cm.WaterInfo() << ' ' << _cm.PortionsInf...
dd7585a1b18963c32bf7f6fc1731491cb39fe46f
160edc514605d9d36f83b3a4da6f96d8ba805abc
zfzlinux/chromium
/chrome/browser/ui/webui/policy/policy_ui_handler.cc
C++
cc
52,361
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/webui/policy/policy_ui_handler.h" #include <stddef.h> #include <string> #include <utility> #include "base/bind.h" #incl...
c7bbb4fd13c1256a8d64496e12f3f302c942e482
caa503b383cc3edeeaaa95252be2bedbd01213b6
ktakiman/a2
/src/parser.cpp
C++
cpp
7,683
no_license
#include "parser.h" #include <stack> #include <numeric> #include <algorithm> #include <regex> #include "tokenizer.h" #include "util.h" namespace { using namespace a2; std::unique_ptr<ConstantsData> CreateConstantsData(const std::string& name, unsigned int value = 0) { auto cd = std::make_unique<ConstantsData>();...
8a4582e520ded6aaed29627c2a27cf7ad2f50c95
64311ee7313c269fe95a8231938865d115df77f5
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14374/function14374_schedule_16/function14374_schedule_16_wrapper.cpp
C++
cpp
1,475
no_license
#include "Halide.h" #include "function14374_schedule_16_wrapper.h" #include "tiramisu/utils.h" #include <cstdlib> #include <iostream> #include <time.h> #include <fstream> #include <chrono> #define MAX_RAND 200 int main(int, char **){ Halide::Buffer<int32_t> buf00(64); Halide::Buffer<int32_t> buf01(64); ...
6b5a0da607a9c9d08bfeeecaf10a9f78482a8f4d
3ec20e9cb43e3d192f57a4363db9ea0f33c4f9b6
Mentos-/Mordhau_SDK
/SDK/Mordhau_BP_ShortSwordSegmentedHandle_parameters.hpp
C++
hpp
1,837
no_license
#pragma once // Mordhau (Dumped by Hinnie) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- ...