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
c988ef250348d9a0e17f6d467bd9364e8947e626
3278df7fa8eef43738e48bd644dec0b649c17a4e
convict-git/sport_coding
/cplib/snippets/segment_tree_min.cpp
C++
cpp
2,417
no_license
#include <bits/stdc++.h> using namespace std; class seg_min { /*{{{*/ // Recurisve Segment Tree with lazy propogation for min library // This library is created by Priyanshu Shrivastav (mr.convict) // https://github.com/convict-git/sport_coding/blob/master/cplib/snippets/segment_tree_min.cpp public: u...
bea3411d06a33e6d5483a847ab973b78fe313619
f5ef5c735f8e3f1565d46103bba74563173f3d30
ChristiaanAlwin/NeuLAND_Veto
/R3BRoot_Source/Nveto_seg/test/testNvetoClustringEngine.cxx
C++
cxx
2,602
no_license
#include <vector> #include <stdexcept> #include "NvetoClustringEngine.h" #include "gtest/gtest.h" namespace { TEST(testNvetoClustringEngine, basic_int_clustering) { auto clusteringCondition = [](const int& a, const int& b) { return std::abs(b - a) <= 1; }; auto clu...
1b5a7e4bf6f119943287f56527013bd493080ef3
daf6b4e7f6a1738381b45ec981a93e087288b1ea
ProfessionalSkills/DefiantWorlds
/DefiantWorldsGame/Code/SettingsManager.cpp
C++
cpp
1,304
no_license
//----------------------------------------------------- // FILE: SettingsManager.cpp //----------------------------------------------------- #include "SettingsManager.h" //----------------------------------------------------- // SETTINGS MANAGER CLASS CONSTRUCTORS & DESTRUCTOR //-------------------------------------...
359b8a23335cefe2029dc5e69408c08e08885313
aa2676ba93177286fb326df90072b16b38ec738e
K-Wu/libcxx.doc
/test/std/containers/sequences/forwardlist/incomplete.pass.cpp
C++
cpp
1,127
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
64c1192ccac451bc9283c34d9d22ceedc4dc9089
1f3e7478fbd0fb1fb71e9f4180ca94cca5182d6f
Marg0cz/01_BattleTank-course
/BattleTank/Source/BattleTank/Private/AimingComponent.cpp
C++
cpp
3,377
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "AimingComponent.h" #include "TankTurret.h" #include "TankBarrel.h" #include "Engine/World.h" #include "Projectile.h" #include "Tank.h" // Sets default values for this component's properties UAimingComponent::UAimingComponent() ...
48522db5112aa12c6e9a81e3f1c21baa67abe8e1
ef91ae8275b99c1ddc7c96586bda7d3f9af635d4
Mozarek/WDI
/cwiczenia 01/cw01zad20.cpp
C++
cpp
402
no_license
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { double A,B, prevA,prevB; cin >> A; cin >> B; double epsilon = 0.00000000001; while(A-B > epsilon || A-B < (-1)*epsilon) { prevA = A; prevB = B; A = sqrt(prevA*prevB); B ...
1f5f2fb0ac2faab90c3745058f19e886c1f0a338
ace0f121100040178be2e98a67ab235b88ffb6cc
adithyakoundinya/VTKExamples
/src/Cxx/ImageData/ExtractVOI.cxx
C++
cxx
3,842
permissive
#include <vtkVersion.h> #include <vtkSmartPointer.h> #include <vtkImageData.h> #include <vtkImageMapper3D.h> #include <vtkExtractVOI.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkInteractorStyleImage.h> #include <vtkRenderer.h> #include <vtkImageActor.h> #include <vtkImageCast.h> #...
5ab1e249664e2b4d6c6fd7211e2910844d9ff25e
9425de61ecd7c1a9c930f9a2700dc477b9eab98c
ptooley/buddhabrot
/trajectory.hpp
C++
hpp
1,584
permissive
#ifndef TRAJECTORY_HPP #define TRAJECTORY_HPP #include <complex> #include <iostream> template <class T> class Trajectory { friend class TrajectoryGenerator; public: Trajectory(std::complex<T> z, std::complex<T> c):z0(z), c(c){} virtual size_t calculate_trajectory(size_t max_steps, double rmin, double rmax, ...
1e0ec8d89949db029cde125864a3070f7097e810
cf4a4956fecd482dc4374b821f1e51ff5fba2984
EntangleIT/terminal
/src/cascadia/TerminalSettingsModel/ActionArgs.cpp
C++
cpp
17,491
permissive
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #include "pch.h" #include "ActionArgs.h" #include "ActionEventArgs.g.cpp" #include "NewTerminalArgs.g.cpp" #include "CopyTextArgs.g.cpp" #include "NewTabArgs.g.cpp" #include "SwitchToTabArgs.g.cpp" #include "ResizePaneArgs.g.cpp" ...
1348bee3469deea73e0b52fe5c063dcb5265375a
f8d7b5f38bf0b102d1594c5b52334d85c7dc1de1
garfiaslopez/Legacy_Projects
/Proyectos NO terminados/DesicionApp/src/applicationui.cpp
C++
cpp
2,223
no_license
/* * Copyright (c) 2011-2013 BlackBerry 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 law ...
de8b876965009f5c61e9ed5b4faad5abb5fb372a
5aa9e8644fde0c6b77b919855200ed60b78b5e94
biprodas/OJ-Solutions
/UVa/11494 - Queen.cpp
C++
cpp
342
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int x1, y1, x2, y2, ans; while(cin>>x1>>y1>>x2>>y2){ if(!x1 && !y1 && !x2 && !y2) break; if(x1==x2 && y1==y2) ans = 0; else if(x1==x2 || y1==y2 || abs(x1-x2)==abs(y1-y2)) ans=1; else ans = 2; cou...
b47ab32fd5815ee440c35968a03effc73afcb30e
caa7a8d3962569fa384527b13a3babc163f67e24
Vovtshik/ex07_34
/ex07_34.cpp
C++
cpp
4,457
no_license
/*ex07_34.cpp*/ #include <iostream> using std::cout; using std::endl; #include <cstdlib> using std::rand; using std::srand; #include <ctime> using std::time; #include <iomanip> using std::setw; bool correctness_of_the_course(int [][8], int, int); void make_move(int [][8], int, int); void make_m_1(int [][8], int, i...
d91980d3fd7f31ebfff04c3da2c1616d663a97fa
006a53b1727697a574eb85ab9f644350aaaa5d87
Former/CircleWorld
/SolidObject.cpp
C++
cpp
4,159
no_license
#include "SolidObject.h" struct LOD_Settings { double m_Distance; size_t m_DrawStep; }; const LOD_Settings settings[] = { {8000, 1}, {16000, 4}, {32000, 16}, // {100000, 32}, }; static irr::scene::ISceneNode* MakeNodeFromMesh(irr::scene::SMesh* a_Mesh, irr::scene::ISceneManager* a_SMgr) { irr::scene::ISceneNod...
5fd82da6bc6ed647061483a4f8e0f7f4ab513df6
2c841eb4df5e5b8668056f0ea9e6ad0edd554cdb
operativeF/Kvasir
/Lib/Chip/Unknown/Spansion/MB9BF42xS/MFS9.hpp
C++
hpp
34,175
permissive
#pragma once #include <Register/Utility.hpp> namespace Kvasir { // peripheral MFS0 namespace Mfs9UartScr{ ///< register UART_SCR using Addr = Register::Address<0x40038901,0xffffff60,0x00000000,unsigned char>; /// bitfield UPCL constexpr Register::FieldLocation<Addr,Register::maskFromR...
e4eaea820fb4560712f07e9af3812544433f1717
fe4c39b843e2df1bc7358c3e45195a427b21db23
jschmucke/e4Coin
/src/evo/simplifiedmns.cpp
C++
cpp
5,877
permissive
// Copyright (c) 2017-2018 The e4Coin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "cbtx.h" #include "core_io.h" #include "deterministicmns.h" #include "simplifiedmns.h" #include "specialtx.h" #inclu...
198b46c548a23ed1ad13418506be2d6bdf313550
bca2c5f46ad4617a27c234bb2757efbf44d61677
Adil-sc/Zoo-Tycoon
/Turtle.cpp
C++
cpp
396
no_license
/********************************************************************* ** Program Name: Project 2 ** Author: Adil Chaudhry ** Date: 1/26/2019 ** Description: Turtle.cpp holds the class functions for the Turtle class *********************************************************************/ #include "Turtle.h" Turtle::Tur...
91c6b505c68070f99b42582257516ef6c81f0aab
4f6f39f0def7f339d4479bc32188b1e28b50451c
Tlamelo/hiphop-php
/hphp/runtime/vm/jit/ir.cpp
C++
cpp
29,366
permissive
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) | +---------...
fb2973e92d8c8434227b013800d5ec14dbd06a63
ebe92d5b7329f3d95ce51388d6453ac25e8ef710
sadrulhc/chromium
/ui/views/test/dialog_test.cc
C++
cc
857
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/views/test/dialog_test.h" #include "ui/views/test/widget_test.h" #include "ui/views/widget/widget.h" #include "ui/views/window/dialog_delegat...
858fcf7594354e3a298e092436e9f7e0a690696d
ce0e96522c9e285cd55fb57396db0986061de1e3
RichardHightower/Aeron
/aeron-driver/src/main/cpp/buffer/MappedRawLog.cpp
C++
cpp
3,194
permissive
/* * Copyright 2016 Real Logic Ltd. * * 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 agreed to ...
47acb7e74d38745901b9c0f96a4976c7aa48a69d
da2d261351db3b5b8704edb935741cab6f35f93f
ChristianSommer/BIZ
/src/rpcmining.cpp
C++
cpp
19,458
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "db.h" #include "txdb.h" #include "init.h" #include "miner.h...
2ff158da0e332b2f600a45d80288d7d172774e5d
f509039214521abda79bfb9121de7ad8fb62d9dc
computer-graphics-fall-2018-2019-haifa/project-hufflepuff
/Viewer/src/Utils.cpp
C++
cpp
7,962
no_license
#include "Utils.h" #include <cmath> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <math.h> #define PI 3.14159265358979323846 / 180 glm::vec3 Utils::Vec3fFromStream(std::istream& issLine) { float x, y, z; issLine >> x >> std::ws >> y >> std::ws >> z; return glm::vec3(x, y, z);...
92db24d970f7ed745cbd4406f42800b4d6d922a5
d5a9b87043ce39e4bdd968ec7ddd8bd639f1bc90
neatudarius/pa
/tutorial/cpp/demo/01-skel_intro.cpp
C++
cpp
1,688
no_license
// Copyright 2020 Darius Neatu <neatudarius@gmail.com> #include <bits/stdc++.h> // include toate headerele de care avem nevoie // using namespace std; // (optional): sa nu mai folositi std:: class Task { // declarare membri (vizibil in toata clasa) // ex. daca calculam fibonacci int n; ...
e7b640ccdecaf5145ef1b0a67154b20036739264
34e9c0eed51ca6137325b36a746f08871e2977c3
Oneflow-Inc/oneflow
/oneflow/core/job/collective_boxing/executor.cpp
C++
cpp
995
permissive
/* Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
69e194f11c1cbaaeb6a686ec2dae227258ca3199
3c38f08898ac8bc26580750ce5b0950d7a32bbcb
tekezo/onikiri2
/src/Sim/ExecUnit/MemExecUnit.cpp
C++
cpp
6,329
permissive
// // Copyright (c) 2005-2008 Kenichi Watanabe. // Copyright (c) 2005-2008 Yasuhiro Watari. // Copyright (c) 2005-2008 Hironori Ichibayashi. // Copyright (c) 2008-2009 Kazuo Horio. // Copyright (c) 2009-2015 Naruki Kurata. // Copyright (c) 2005-2015 Ryota Shioya. // Copyright (c) 2005-2015 Masahiro Goshima. // // Thi...
4294ead573922667019dd6313c669ea65bd77887
9ed5e6c47591a22f87c7aad112c59c8117d7275a
Fexty12573/ams-cheat-to-c
/atmosphere-cheat-to-c/parser.cpp
C++
cpp
18,507
no_license
#include "parser.h" #include "convert.h" #include "keys.h" #include <iostream> CheatCodeParser::CheatCodeParser(const std::string& filepath) { file.open(filepath); } const std::string& CheatCodeParser::Parse() { std::string line; AddOutputLine("typedef unsigned char u8;\n"); AddOutputLine("typedef unsigned sho...
33c0f64e65618023ac4dd0a3313c9b7adcf4c937
11950df04b12aceb628354945fea2c446030d852
domiyan/llvm
/sycl/include/CL/sycl/detail/scheduler/commands.hpp
C++
hpp
8,286
permissive
//==-------------- commands.hpp - SYCL standard header file ----------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
7218d208b983e5d0e03e32053127a3c8afae60b8
552b6a3268c35dc64bdb8ec374aa99bfb3848096
nc-77/algorithms
/ACM/Newcow/牛客寒假3/i.cpp
C++
cpp
727
no_license
#include<bits/stdc++.h> #define ll long long using namespace std; ll cnt; ll ab,ac,ba,bc,ca,cb; void move(char a,char c) { cnt++; //cout<<a<<"->"<<c<<endl; if(a=='a'&&c=='b') ab++; if(a=='a'&&c=='c') ac++; if(a=='b'&&c=='a') ba++; if(a=='b'&&c=='c') bc++; if(a=='c'&&c=='a') ca++; if(a=='c'&&c==...
3e18cfaedf9a690d46ce9755c6cdd113c83b0ad7
1d3d74372e110f15f6afc5b4950973be538766d3
kamaroyl/data-structures-2421
/hw5/test/TestLinkedList.cpp
C++
cpp
4,642
no_license
#include "../src/LinkedList.h" #include <string> string b2s(bool value) { if(value) return "true"; return "false"; } string decorate(string functionName) { return "=======" + functionName + "======="; } void testConstructor() { std::cout << decorate("testConstructor") << std::endl; LinkedList lin...
568d36c734e2edb26f4dcd86c2d34514c8770b69
f32da81314d8659d4055a35a84b08c5b07090745
3031687356/chromium
/chrome/browser/ui/webui/settings/people_handler_unittest.cc
C++
cc
38,909
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/settings/people_handler.h" #include <memory> #include <string> #include <vector> #include "base/command_line.h" #inclu...
17496eae144d76224d50b9bbf7d74632963c0352
cfa23bb30f2d81e98d79930505a0b8558ea00e14
kkskk/openrasp
/agent/php7/openrasp_v8_request_context.cc
C++
cc
15,830
permissive
/* * Copyright 2017-2019 Baidu Inc. * * 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 agreed...
425cdb0f1c482fd7ca7983b663630c098bfa37d0
4b2bee7cc6865eb9a59eecd35f0288bf681f471a
Kawser-nerd/CLCDSA
/Source Codes/AtCoder/abc058/A/2931539.cpp
C++
cpp
234
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void){ int a,b,c; cin >> a >> b >> c; if(b-a==c-b){ cout << "YES" <<endl; }else{ cout << "NO" << endl; } return 0; }
9f25b2e94931bf5134e0d87512b02ae9e701474c
c4a5a6b06fafdffd3724857301d01927132b68ce
JMViJi/RoboticsND-Home-Service-Robot
/catkin_ws/src/pick_objects/src/pick_objects.cpp
C++
cpp
2,298
no_license
#include <ros/ros.h> #include <move_base_msgs/MoveBaseAction.h> #include <actionlib/client/simple_action_client.h> // Define a client for to send goal requests to the move_base server through a SimpleActionClient typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient; int main(int argc, ...
adb71ac9beff505c6d44793bf36cd33686247acc
62621a8d40112705e22460f9f20fc4bef887b2f0
apmccartney/hpx
/src/runtime_impl.cpp
C++
cpp
31,857
permissive
// Copyright (c) 2007-2017 Hartmut Kaiser // Copyright (c) 2011 Bryce Lelbach // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <hpx/config.hpp> #include <hpx/performance_counters/counters.hpp> ...
ea4bf205cd5690f25b77f9f00db1fa7660303109
49c72ee701b623d185f170db69f5f26102edf674
oelizondo/competitive_cpp
/TGA1.cpp
C++
cpp
488
no_license
// oscar elizondo a01192543 #include <iostream> #include <string> #include <cmath> using namespace std; string translate(string word) { int aux; string translatedWord = ""; for(int i = 0; i < word.length(); i++) { aux = word[i] - 'A'; aux = abs(aux - 25); char newChar = aux + 'A'; translatedW...
c174bb7ffad7898f7ba9c4e5fe3c2ee1f4aa1994
105b26a79ce6951a24e8ede9ac4dced845f583e6
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/W+RR+WR+WR+dmb.sy+dmb.sypa+dmb.sylp+L.c.cbmc.cpp
C++
cpp
66,752
no_license
// Global variabls: // 0:vars:3 // 3:atom_1_X0_1:1 // 4:atom_1_X2_0:1 // 5:atom_2_X2_0:1 // 6:atom_3_X2_0:1 // Local global variabls: // 0:thr1:1 // 1:thr2:1 // 2:thr0:1 // 3:thr3:1 #define ADDRSIZE 7 #define LOCALADDRSIZE 4 #define NTHREAD 5 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSE...
b39e365474519f13c1a8da269839b1db046f76d9
dccd89470bfb01de6224a39d30fe80be092d44f4
PeterAlfonsLoch/app
/appseed/aura/aura/aura/aura_command_target_interface.cpp
C++
cpp
3,458
no_license
#include "framework.h" bool command_target_interface::_001SendCommand(id id) { ::aura::cmd_msg msg(id); msg.m_pcommandtargetSource = this; return _001OnCmdMsg(&msg); } bool command_target_interface::_001SendUpdateCmdUi(cmd_ui * pcmdui) { ::aura::cmd_msg msg(pcmdui); msg.m_pcommandta...
7e97d8653ae6234419b32e24dce95f0bbce9ca84
a691b1442be78690cb683e2f4c25ee4affaf2964
svn2github/ncbi_tk
/src/app/netstorage/nst_perf_logging.cpp
C++
cpp
1,908
no_license
/* $Id$ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyrig...
532f248605ddc424ad8d5f27b835df86a6a6161d
c3976d050e950e4f285ec582600ab2a8e0e62de9
matitr/Roguelike-Game
/Button.cpp
C++
cpp
1,577
no_license
#include "Button.h" #include "Game.h" #include "DataBase.h" #include "SDL_TTF.h" #include "Input.h" #include "ScreensManager.h" #include "Settings.h" void Button::draw() { SDL_RenderCopy(Game::renderer, textTexture, NULL, &dstRect); SDL_SetRenderDrawColor(Game::renderer , DataBase::colors[TextColor::MenuButtonText...
9f621af09f30b2681fc313b689b37313001bdfbf
e9f9fa5458c6c6bcf03215c7b56c07b4b9d5a289
AaronNGray/GenomeWorkbench
/include/gui/utils/app_job_impl.hpp
C++
hpp
6,151
permissive
#ifndef GUI_OBJUTILS___APP_JOB_IMPL__HPP #define GUI_OBJUTILS___APP_JOB_IMPL__HPP /* $Id: app_job_impl.hpp 34471 2016-01-12 21:51:15Z katargir $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Bio...
ac2b14bcace1d965037a3c23f63ff90a8d3c3f5b
8f85e35a589d20a9ce210d745663d3b45505c57e
kbu1564/SimpleAlgorithm
/acmicpc.net/10164.cpp
C++
cpp
545
permissive
#include <iostream> using namespace std; long long DP[16][16]; int main() { int N, M, K; cin >> N >> M >> K; int x = (K-1) % M; int y = (K-1) / M; if (K == 0) { x = M; y = N; } for (int i = 0; i <= y; i++) { for (int j = 0; j <= x; j++) { DP[i][j] = (i-1 < 0? 0: DP[i-1][j]) + (j-1 < 0? 0: DP[i][j-1]); ...
74ac2d39d96d24828407e43d3b36487cbfcd98ba
85d31cb282748b7c7f1f387135958f6f3ceaad56
jmontel333/SchoolProjects
/Programming 1/Lab8/8.2.cpp
C++
cpp
424
no_license
#include <iostream> #include <string> using namespace std; int countWords(string str); int main(void) { int num = 0; string str; cout << "please enter a string or Q to quit: "; cin >> str; cout << "word count: " << countWords(str); } int countWords(string str) { int num = 1; int numtimes = 1; wh...
e4c9468dc67fe0d750e53b9b9b175eb6fef24a38
7f2904b84d273f4383f15d56303a8984dc2f0dc6
joelahoover/SFMLGameJam2016
/Source/Game.cpp
C++
cpp
17,488
no_license
#include "Game.h" #include <iostream> #include <string> #include "ResourcePath.h" const sf::Time Game::timePerFrame = sf::seconds(1.0f / 60.0f); Game::Game() : m_window(sf::VideoMode(800, 900), "Orange guy jumping on the cloud then fall ?? XD"), m_gravity(0.2), m_maxY(50) { m_floorNumber = 0; m_currentFloor ...
ca1d5e054ae42e6ca78d4f0f96f2b988bd1ca8e7
575057e8d90a5fcca6399b000364059b4f7a7354
sonneveld/ags
/Compiler/script/cc_compiledscript.cpp
C++
cpp
8,962
permissive
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "cc_compiledscript.h" #include "script/script_common.h" // macro definitions #include "cc_symboltable.h" // symbolTable #include "script/cc_options.h" // ccGetOption #include "script/cc_error.h" void ccCompiledScript::write_cmd(int cmd...
6b261d7d6aad5fb6f3c8ab6d5cab7bc53dbb9ae1
b264ab98e034ef77cdcbffc469b5cc79f93b5b25
sriankit/cpp_codes
/hr_euler047.cpp
C++
cpp
1,649
no_license
/* Ankit Srivastava */ #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define pb(x) push_back(x) #define mp(x,y) make_pair(x,y) #define FF first #define SS second #define s(n) scanf(...
647609f258e895164a733774c0020e36365bffce
62e09c0d398a406278fb32a09106a41c3bd019fd
DHaylock/ofxTramontana
/example-subscribe/src/testApp.cpp
C++
cpp
5,529
permissive
#include "testApp.h" //-------------------------------------------------------------- void testApp::setup(){ //OPEN THE CONNECTION WITH YOUR DEVICE iphone.start("192.168.1.2"); iphone.onConnectionOpen(this, &testApp::connectionOpenHandler); } //------------------------------------------...
09e5c25401a0035b113a2fc895d9c7af7fbf0550
d82113678e1683d8b777efdd775f02e274727689
itaiamit/MathematicalSnake
/Snake EX3 - Final/Snake/main.cpp
C++
cpp
212
no_license
#include "MainMenu.h" #include "Game.h" void main() { Game game; bool run = true; printBigSnake(); game.setActiveMissions(loadMissions(run, game.getActiveMissionCount())); MainMenu(1,run, game); }
cf3002b93c915187e999d956b73a6ab5729a7401
5dd3aba359028a6cbe8dbf8c787cb4e32c4fbef9
yushansuger/MyBus
/mybus/demo/testRead.cpp
C++
cpp
717
no_license
#include <assert.h> #include <unistd.h> #include <cstring> #include <sys/types.h> #include <iostream> #include "src/MyBus.h" using namespace std; int shmid = 2981904; int main() { MyBus station; BusCard* cardPtr = station.getChannelControl(shmid); station.prepareSocket("read1.json"); char p[...
4ff550b002ada13bd70974db46d41116588a0a68
3d43a923ee3187c29c4a7616137dc24db60c8518
Vizionnation/chromenohistory
/third_party/blink/renderer/core/paint/compositing/compositing_inputs_updater_test.cc
C++
cc
8,712
permissive
// Copyright 2017 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 "third_party/blink/renderer/core/paint/compositing/compositing_inputs_updater.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_p...
e377a8a05136ce4ecb4656cf8254b4ebf00c4ebb
775d810e3f103cab765bc29c46004cad0423423a
FRENSIE/FRENSIE
/packages/monte_carlo/event/dispatcher/src/MonteCarlo_ParticleEventDispatcher_def.hpp
C++
hpp
3,558
permissive
//---------------------------------------------------------------------------// //! //! \file MonteCarlo_ParticleEventDispatcher_def.hpp //! \author Alex Robinson //! \brief Particle event dispatcher database base class definition //! //---------------------------------------------------------------------------// #...
72dd1db4cdf5ac55cc184b7b0013dadd23322b54
dba5018c8826162c5cd3fb3adc844a11973daea5
jfmherokiller/TheOuterWorldsSdkDump
/Indi/SDK/Indi_Drug_SC_HardineramElixir_classes.hpp
C++
hpp
720
no_license
#pragma once // TheOuterWorlds SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "Indi_Drug_SC_HardineramElixir_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------...
57af0144a52488dd5cc8ba7f831a7b4ec9af5f28
cbd35af3e24c52eee3dab7cde52c2f7535f8c536
ibjc/open_spiel
/open_spiel/games/first_sealed_auction.cc
C++
cc
6,895
permissive
// Copyright 2019 DeepMind Technologies Ltd. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless require...
fa6fb40c6d008090515e6d5b0e558d6e0816c640
a16d3eba075a295ff46d322973ad4d850165be89
Mihail-simple/PhotoDistorter
/src/distortionsettings.cpp
C++
cpp
405
no_license
#include "headers/distortionsettings.h" DistortionSettings::DistortionSettings() : pivot(0,0), interpolation(true) { } DistortionSettings::DistortionSettings(QPointF _pivot, bool _interpolation) : pivot(_pivot), interpolation(_interpolation) { } QPointF DistortionSettings::getPivot(){ return pivo...
6430832ef915edbf1ec43314d091be85cce41ad5
af1485ee2f86f3f4e68e35c730fdd9ba679a389f
fsps60312/old-C-code
/C++ code/Uva Online Judge/Q1327.cpp
C++
cpp
1,514
no_license
#include<cstdio> #include<stack> #include<vector> #include<cassert> #include<algorithm> using namespace std; void getmin(int &a,const int b){if(b<a)a=b;} int N,PRE[4000],LOW[4000],PRE_CNT,SCC[4000],SCC_CNT; vector<int>ET[4000]; stack<int>STK; void Dfs(const int u,const int fa) { PRE[u]=LOW[u]=++PRE_CNT; STK.push(u); ...
2a62b50574fb607100ad695a072b73d523a077e9
aecb516b1739a6a9e4b462f49a1985fec5479e9b
tondyw002/taylor
/src/ripple/overlay/impl/OverlayImpl.cpp
C++
cpp
45,482
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
37da1c84b09b1502a43f4e50fb8c87752e22632a
ed5c646d9be70dbd43c9ec1b71a1d9048ee83aed
ZibeSun/Oj-C
/求圆、球以及球体的表面积与体积.cpp
C++
cpp
854
no_license
#include<stdio.h> #define PI 3.14 int main() { float r,h,C1,Sa,Sb,Va; double Vb; scanf("%f %f",&r,&h); C1=2*PI*r; Sa=(PI)*r*r; Sb=4*PI*r*r; Va=(PI)*r*r*r*(4.0/3.0); Vb=(PI)*r*r*h; printf("C1=%.2f\nSa=%.2f\nSb=%.2f\nVa=%.2f\nVb=%.2lf",C1,Sa,Sb,Va,Vb); return 0; } /*题目描述 设圆半径r,圆柱高h 求圆周长C1、圆面积Sa、圆球表面积Sb、圆球体积Va、圆柱...
1d2344cdeb48a8892ade2d939cb8c384c16da8fc
e50a5f35fa4d1b1e1fc481142de6912d5e83447b
egorpushkin/neurolab
/source/LuaLib/LuaSource/lparser.cpp
C++
cpp
35,545
permissive
/* ** $Id: lparser.c,v 1.208a 2003/04/03 13:35:34 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ #include "StdAfx.h" #include <string.h> #define lparser_c #include "lua.h" #include "lcode.h" #include "ldebug.h" #include "lfunc.h" #include "llex.h" #include "lmem.h" #include "lobject.h" #include "l...
250accb7cf29ba11451077934d03fd156b3be9b7
4f9536270e8d871bd73d56b26c53e026311acbfa
YipZLF/NACHOS
/threads/main.cc
C++
cc
5,696
permissive
/* * @Description: In User Settings Edit * @Author: your name * @Date: 2019-09-11 23:49:35 * @LastEditTime: 2019-09-20 10:21:58 * @LastEditors: Please set LastEditors */ // main.cc // Bootstrap code to initialize the operating system kernel. // // Allows direct calls into internal operating system functions, // ...
2faff3263956c6943c2c64a805b29cec623c1346
668817a226b925526460fa82e24c5a195c2ae271
FalseCAM/openp2p
/example/DHT/dht1.cpp
C++
cpp
2,752
permissive
#include <stdint.h> #include <iostream> #include <boost/asio.hpp> #include <boost/optional.hpp> #include <p2p.hpp> #include <p2p/Kademlia.hpp> #include <p2p/UDP.hpp> void printData(const p2p::Buffer& buffer) { p2p::BufferIterator iterator(buffer); uint8_t v; while (iterator >> v) { std::cout << (char) v; } ...
222dff3ed98c20882fe7f9f9228b339eb1c6a6ea
571de8defa91664210da96914d688e985e354dec
VB6Hobbyst7/NCL_in_VisualStudio
/postworks/pwmpost/makepost.cpp
C++
cpp
7,062
no_license
/************************************************************************ c c FILE NAME: Makepost.cpp c c CONTAINS: Defines the class behaviors for the application. c all CMPostApp class override functions and c Implementation functions c c COPYRIGHT 2001 (c) Numerical Control Computer Sciences. c ...
38d1fae4ff72055d7fa1c0db95931bf27a2e4a8b
fed4a2adc07ba3847e8adcb3a1ff26906fb86323
mgautamk/cs215
/Lab14/OrderedSet.hpp
C++
hpp
12,899
no_license
//Author: Mahesh gautam //Assignment : Lab14 //Date: Fall 2013 //File: LList2.hpp //Description: This file contains function definations, prototypes, and holds all //required informations and function implementations to run a Ordered linked list #ifndef OrderedSet_HPP #define OrderedSet_HPP #include <iostream> #inc...
b8ff1afb8c43fbf98362dd9d8f8ce7ff2323765e
17f21dd0729d25ba81d3fef8179fae2c311b7652
lawscott1988/padleft
/src/padleft.cpp
C++
cpp
201
permissive
#include <padleft.hpp> namespace pl { std::string pad_left(const std::string& str, int num_spaces) { if(num_spaces >= 0) return std::string(num_spaces, ' ') + str; return str; } }
bbf571a422a1ec29443b872593426faf44863787
35c431d7ed7d6ae3a284b8541ca467111ccb4989
chengxulvtu/ClickHouse
/dbms/src/Interpreters/SettingsConstraints.cpp
C++
cpp
6,296
permissive
#include <Interpreters/SettingsConstraints.h> #include <Core/Settings.h> #include <Common/FieldVisitors.h> #include <IO/WriteHelpers.h> #include <Poco/Util/AbstractConfiguration.h> namespace DB { namespace ErrorCodes { extern const int READONLY; extern const int QUERY_IS_PROHIBITED; extern const int NO_EL...
983831f33cbef872fc0fab477add897ce40b64f7
72e9adf964b0131b7b30e46ca5964dda0fbf193c
anu-prakash-dev/NightEngine2
/NightEngine2/src/Graphics/Opengl/Window.hpp
C++
hpp
1,325
permissive
/*! @file Window.hpp @author Rittikorn Tangtrongchit @brief Contain the Interface of Window */ #pragma once //Forward declaration struct GLFWwindow; namespace NightEngine::Rendering::Opengl { namespace Window { enum class CursorMode : unsigned char { NORMAL = 0, DISABLE, HIDDEN }; enum class...
fcbe7cafcebd9964fe1c104adec322b2013c2fad
6c1e7956b64040b07cdeff3e3db23cf06a9874cd
tst-ccamp/earthenterprise
/earth_enterprise/src/third_party/sgl/v0_8_6/src/SkPathMeasure.cpp
C++
cpp
18,048
permissive
/* libs/graphics/sgl/SkPathMeasure.cpp ** ** Copyright 2006, Google Inc. ** ** 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 ** ** Unl...
41671d71051fb11152a3837fa328973a604d1072
122fb182cc5df38d2993d353c7a7ccd3b3148ab2
patelhardik/pal
/src/core/os/amdgpu/dri3/dri3WindowSystem.cpp
C++
cpp
55,076
permissive
/* *********************************************************************************************************************** * * Copyright (c) 2015-2021 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
1ccd19957dc1d6f1f7846a27af84ab4e32105b75
9e945c1218742704230aa4049301bb498639bd75
inkawhich/pytorch
/torch/csrc/Module.cpp
C++
cpp
21,238
permissive
#include "torch/csrc/python_headers.h" #include <sys/types.h> #ifndef _MSC_VER #include <sys/socket.h> #endif #include <stdbool.h> #include <unordered_map> #include <cstdlib> #include <libshm.h> #include <TH/TH.h> #include <ATen/ATen.h> #include <ATen/ExpandUtils.h> #include <ATen/dlpack.h> #include <ATen/DLConvertor...
43ed14385f53a55472d0d2415bd90683ac975ff4
553a4bfe1b72d758d072bd549fa6e719c51a4c0b
ajayguna-96/LeetCode
/N-ary Tree Postorder Traversal.cpp
C++
cpp
592
no_license
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; */ class Solution { public: vector<int> postorder(Node* root) { vector<int> answer; if(r...
99d3434c8d2b10128d57dfe862bbb449dbee92d9
32f4930470b5dea5543292adf89bf6dc29e9a220
leidav/libdl
/bindings/utils/mnist/mnist_loader_bindings.cpp
C++
cpp
577
no_license
#include "mnist_loader_bindings.h" #include <utils/mnist/mnist_loader.h> using namespace nn::utils::mnist; namespace py = pybind11; static nn::Layer::Array pyLoadImages(const char* path) { nn::Layer::Array images; loadImages(images, path); return images; } static nn::Layer::Array pyLoadLabels(const char* path) ...
02db05d16b5854a25921198ca8430b680fb97ef1
3de1db5afdbebab06fdcb185931a077b4002e286
Arkheias/Mammoth
/TSE/CExtension.cpp
C++
cpp
39,081
no_license
// CExtension.cpp // // CExtension class // Copyright (c) 2012 by Kronosaur Productions, LLC. All Rights Reserved. // // API VERSION HISTORY // // 0: Unknown version // // 1: 95-0.96b // Original Extensions // // 2: 0.97 // Changed gStation to gSource // // 3: 1.1 // <SmokeTrail>: emitSpeed fixed (used in klicks...
cb16a6464fa0a7f3fb748686e4df38d859b9e141
48f2a242e6fd0d827da51bc2cd81a0f80f3f0176
lijiaxin-dut/leetcode
/leetcode_train/Solution_144.cpp
C++
cpp
731
no_license
#include<iostream> #include<algorithm> #include<vector> #include<stack> #include"TreeNode.h" using namespace std; //Given a binary tree, return the preorder traversal of its nodes' values. // //Example: // //Input: [1, null, 2, 3] // 1 // \ // 2 // / // 3 // // Output: [1, 2, 3] // //不断的将非空右节点放入栈中 //一直向左子树走 // clas...
991ac4d785eb6586fc7bd73f54184588f2318c08
271712a0028978fba144157490327c475646a325
marcotambasteb/dimple
/solvers/cpp/stdafx.cpp
C++
cpp
1,054
permissive
/******************************************************************************* * Copyright 2012 Analog Devices, Inc. * * 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:/...
face4e4acf9dfc0d684987ce9f22156c299afe0b
dfb6b1c868775416fb726f386e1f1204a58c62bd
himanshuromeo/competitive_programming
/broken_keyboard.cpp
C++
cpp
777
no_license
//ac #include <bits/stdc++.h> using namespace std; int main(){ int count[256]; string S; int l,r,ans,repeat,m; bool flag; while(true){ l=r=repeat=ans=0; memset(count,0,sizeof count); cin>>m; if(m==0) break; cin.ignore(); getline(cin,S); while(r<S.length()){ //cout<<S...
4e369557de2c9be251204d1ad5795e0318cb4142
11c401794e727001acd66650a1815baf76e6e3d4
Jiangxiaochen/ubtdspace
/C/primerCPP/ch13-copyCtrl/ex13.13.cpp
C++
cpp
327
no_license
#include "mycpp.h" struct X{ X() { cout << "X()" << endl; } X(const X &){ cout << "X(const X&)" << endl; } ~X(){ cout << "~X()" << endl; } X & operator=(const X &rhs){ cout << "operator=" << endl; return *this; } }; int main() { X a; X b(a); X *c = new X; X *d = new X(*c); a = b; c = d; delet...
1d03e4a0b6f7a333d3bc6e41d1c14993de9bcff5
d3e8859b7c235614f10cfb37dd2428db7dbf81ab
pockymonsta/OmaiyeLeah_CIS5_42641
/homework/assignment_2/Savitch_9thEd_ch2_prob_3_treadmill/main.cpp
C++
cpp
949
no_license
/* * File: main.cpp * Author: Leah Omaiye * Created on March 10, 2017, 2:30 PM * Purpose: Convert pace on treadmill */ //System Libraries #include <iostream> //Input - Output Library using namespace std; //Name-space under which system libraries exist //User Libraries //Global Constants //Function Prototy...
87397fa842d219670defb04c36f8976da4bc30bd
885cc6877639a38aef69d4f226cdfc2fe8b9e44d
kaloronahuang/KaloronaCodebase
/Practices/BZOJ/BZ3781.cpp
C++
cpp
1,275
no_license
// BZ3781.cpp #include <bits/stdc++.h> using namespace std; const int MAX_N = 50100; typedef long long ll; int n, m, limit, aff[MAX_N], ai[MAX_N], bucket[MAX_N], siz; ll ans, ansBox[MAX_N]; struct query { int l, r, id; bool operator<(const query &rhs) const { return aff[l] == aff[rhs.l] ? ((aff[l] & 1) ? r...
fee463230cbc5f89fe4514f8fc778b494198cb9c
a0cf9c8eb9a253464f7f398905c9c3ce085c52b4
AITutorials/tensorflow
/tensorflow/compiler/mlir/tensorflow/transforms/freeze_global_tensors.cc
C++
cc
5,071
permissive
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
4546cb886df75635954c51f2e74b7f1ca838f4e0
0ddf24ff4acc1bcabe48bb601b566463c7f42559
alecnunn/bookresources
/GameDevelopment/3D Game Engine Architecture/Windows/MagicSoftware/WildMagic3/SamplePhysics/IntersectBoxes/IntersectBoxes.cpp
C++
cpp
8,712
no_license
// Magic Software, Inc. // http://www.magic-software.com // http://www.wild-magic.com // Copyright (c) 2004. All Rights Reserved // // The Wild Magic Library (WM3) source code is supplied under the terms of // the license agreement http://www.wild-magic.com/License/WildMagic3.pdf and // may not be copied or disclosed ...
60a2e5d0e6d65da473437f094c55b1982f7bda9e
addb4a27ac4b2e67004ff9e88f7c48d2e3e8f4be
Pandinosaurus/mediapipe
/mediapipe/calculators/tensorflow/unpack_media_sequence_calculator_test.cc
C++
cc
28,088
permissive
// Copyright 2019 The MediaPipe Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
4c372e944fb661c67dbafc5d558eeea9190cf12d
5ed9572c45b3c4909c88edcf538ad9e67c30a799
Unity-Technologies/com.unity.webrtc
/Plugin~/WebRTCPlugin/Context.cpp
C++
cpp
14,364
permissive
#include "pch.h" #include <api/create_peerconnection_factory.h> #include <api/task_queue/default_task_queue_factory.h> #include <rtc_base/ssl_adapter.h> #include <rtc_base/strings/json.h> #include "AudioTrackSinkAdapter.h" #include "Context.h" #include "EncodedStreamTransformer.h" #include "GraphicsDevice/GraphicsUti...
cdf8bcfdde2846e4f8caf095bf82335cf6447403
d436b1132dd752fe9f950a35fc5ea9c2ab16d65f
BlenderCN-Org/spacegameengine
/libs/image3d/include/sge/image3d/bgrx8_format.hpp
C++
hpp
1,180
no_license
/* spacegameengine is a portable easy to use game engine written in C++. Copyright (C) 2006-2016 Carl Philipp Reh (carlphilippreh <at> gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation...
6fd9c6f49ce6d1c31ef7f448dc28d5f648862497
0dd2e5b0b059590a8be749f5835e4013b4119580
kyx0r/FA_Patcher
/boost_lib/boost/log/attributes/attribute_cast.hpp
C++
hpp
1,739
permissive
/* * Copyright Andrey Semashev 2007 - 2015. * 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) */ /*! * \file attribute_cast.hpp * \author Andrey Semashev * \date 06.08.2010 * * The h...
1ffa1d8bd9d66fbc7e82cf7a3981c7c0935697b1
2619f4120c0f1e02dc4b4b2805607b3a380c505e
MaksimGurov0906/Tower-defense
/programm cod/level/XmlLevelParser.cpp
C++
cpp
3,252
no_license
#include <QDebug> #include <QFile> #include <QXmlStreamReader> #include "XmlLevelParser.h" QPolygon& parseRoad(QString line, QPoint start); XmlLevelParser::XmlLevelParser(QString filePath) { QFile* fileOfMap = new QFile(filePath); if (!fileOfMap->open(QIODevice::ReadOnly | QIODevice::Text)) { qDeb...
995d792bc78aaa006d06af52713a29562b023dc2
ca77a9b7b61bb2b227060be6e9b8eded058d09d8
prashant-3108/Data_Structures
/Stacks/Infix_to_Postfix.cpp
C++
cpp
2,665
no_license
#include <iostream> #include <cstring> #include <stack> using namespace std; int isOperand(char x) { if(!isalpha(x) && !isdigit(x)) { return 0; } return 1; } int outPrecedence(char x){ if (x == '+' || x == '-'){ return 1; } else if (x == '*' || x == '/'){ return 3; ...
503788e18cff07bc21419323940a800181c0d512
cbf11973486051ea44707b33afadbcf1cce9542a
alldatacenter/alldata
/olap/ByConity/src/ResourceGroup/VWQueueSyncThread.cpp
C++
cpp
8,466
permissive
/* * Copyright (2022) Bytedance Ltd. and/or its affiliates * 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 appl...
c6e1d666cff24a9baa13a1a3f944270774bec02c
22056dc95a8cc80132336d7be6ec0b623c02c4a3
wonny-Jo/algorithm
/알고리즘 정리/정렬/문제풀이/최종 순위.cpp
C++
cpp
1,611
no_license
#include<iostream> #include<vector> using namespace std; int N; bool adj[501][501] = { 0 }; //adj[a][b] // b보다 a가 순위가 높음 int indegree[501] = { 0 }, rank[501]; //indegree: 나보다 앞에 몇명 있는지, rank: 순위(index)에 따른 넘버 int main() { cin.tie(0); cout.tie(0); cin.sync_with_stdio(0); int T; cin >> T; for (int a = 0;...
dad4025be5f48bd1541073acd762051481dab6ad
72ec0bf4413b4c44d2c414b98c0432b89994b95b
EthanJamesLew/WhoVille
/src/main.cpp
C++
cpp
2,146
no_license
#include <iostream> #include "profiler.h" #include "people.h" #include <unistd.h> #include "utils.h" #include<vector> int main(int argc, char *argv[]) { system("sh whofile.sh"); int counter = 0; std::vector<std::string> alert = utils::strInFile("conf/users_sms.conf"); People *ppl = new People(); std::vector<...
d2a17ae4cbf85b74c85f61b004bf09e301dc32c6
b20689fbbc1c3e4671fac1650cce7d86ab3ccf85
mongodb/genny
/src/driver/src/main.cpp
C++
cpp
1,339
permissive
// Copyright 2019-present MongoDB Inc. // // 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 agreed t...
c05cf57e7c2893665cd37c1a93ff110000797a97
6305f0dbc2a287d84f35f7d6351150286e91549c
maykodo/teste
/teste4.cpp
C++
cpp
746
no_license
#include <stdio.h> main(){ int n[5]; int i, maior=0, menor=10000, soma=0; float media; for (i=0;i<5;i++) { printf("digite o %d numero : ", i+1); scanf("%d", &n[i]); if(n[i] > maior){ maior = n[i]; } if (n[i]< menor){ menor = n[i]; } soma =soma+n[i]; } printf("*** MOSTRA VETOR ***\n"); for (i=0;i<5;i++...
d16b6852090476af013dacb20d2b0b0f36c0829e
7eff030c307a187af9c0457e4ab5daa17f985eb4
GSIL-Monitor/platform.framework.web.chromium-efl
/content/child/child_thread_impl.cc
C++
cc
30,962
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 "content/child/child_thread_impl.h" #include <signal.h> #include <string> #include <utility> #include "base/base_switches.h" #include "base...
ad4a3982dfaa948e04a649b2a4a30e9d5b6354e8
dee56fe0caa0430b27eb39adf7a8cce48d209254
liveanuragdubey/CplusplusPrimer-code
/factorial.of.any.number.cpp
C++
cpp
390
no_license
#include<iostream> using namespace std; int main() { int num, iteration; double factorial; cout<<"Enter the number whose factorial you wish to find.\n"; cin>>num; iteration=1; factorial=num; while(iteration<num&&iteration>0) { factorial=factorial*(num-iteration); iteration=iteration++; } cout<<"T...
929a774c1f231d52544d1e77b72676507155a400
7ffd1f84c40b027edc851ee4ab3e1654328a97d3
CodingWD/course
/c/chenmingming/chapter02/enum.cpp
C++
cpp
948
no_license
#include <iostream> using namespace std; int main() { enum week { Monday=1,Tuesday, Wednesday ,Thursday ,Friday ,Saturday ,Sunday }; cout << Monday << Tuesday << Wednesday << Thursday << Friday << Saturday << Sunday <<endl; enum week1 { Monday1=8,Tuesday1, Wednesday1 , Thursday1=20,Friday1 ,Saturday1 ,Sunday1 }; ...
1869d6224ca3abcf6a5e5fbb53573b6856a0aef1
2bbc6406a49dd89e366bbba96e12cde4529caa5d
TheCapleGuy/NSFWGL_Personal
/defer/main.cpp
C++
cpp
3,158
no_license
#include "DefApp.h" #include "Geometry.h" #include "Light.h" #include "Camera.h" #include "GPass.h" #include "CPass.h" #include "LPassD.h" using namespace nsfw; int main() { DeferredApplication d; d.init(); d.play(); d.term(); system("pause"); } void DeferredApplication::onInit() { auto &w = nsfw::Window...
a82c91d8feefbb72f4dab6c32ebfc2f78152e7df
d53da923ce7b37dd8390f88042b248ab78dbe034
MyLibh/mephi-icis-ib-labs
/src/2lab/Stream.hpp
C++
hpp
7,708
no_license
#pragma once #ifndef __STREAM_HPP_INCLUDED__ #define __STREAM_HPP_INCLUDED__ #ifndef __cplusplus #error #error Must use C++ to compile. #error #endif /* __cplusplus */ #if (_MSVC_LANG < 201703L) #error #error Must use ISO C++17 Standart #error #endif /* __cplusplus < 201703L */ #include <vector> #include <string> #...
3aadba7bd87e46e03ac27d520644b65f1c83db90
257d550aec3d261f4793b93345436edf36653c0b
techina/amiconveyor
/cocos2d/tests/cpp-tests/Classes/Box2DTestBed/Box2dView.cpp
C++
cpp
8,116
no_license
#include "Box2dView.h" #include "GLES-Render.h" #include "Test.h" #include "renderer/CCRenderer.h" #define kAccelerometerFrequency 30 #define FRAMES_BETWEEN_PRESSES_FOR_DOUBLE_CLICK 10 extern int g_totalEntries; Settings settings; enum { kTagBox2DNode, }; //--------------------------------------------------...
e4a7366554d1c89bf6a6c6940bfdf9f9863c0b18
a2b6f98867cef89e13f459bba04c545b07b28687
acechat/sopmq
/node/src/ring.cpp
C++
cpp
3,886
permissive
/* * SOPMQ - Scalable optionally persistent message queue * Copyright 2014 InWorldz, LLC * * 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-...
6394f5dd385c91bd9fa3c7622699ef9b2dc7af5c
90664d385636248a57e8d90047088639bdcfafd5
NanthR/IPMP
/week5/array/array_36.cpp
C++
cpp
744
no_license
#include<iostream> #include<vector> using namespace std; vector<vector<int>> rotate(vector<vector<int>> &image) { int r, c; int row = image.size(); if(row == 0) { vector<vector<int>> res (0, vector<int>(0, 0)); return res; } int col = image[0].size(); vector<vector<int>> res (col, vector<int>(row,...
0a0fe56074adddfb7c68fd61ca7a73910a0777f0
e64f78d5593171c637e858937a15390220ef15ad
wangrun678/erp
/hello.cpp
C++
cpp
210
no_license
#include<iostream> using namespace std; int main() { cout<<"hello aaa git"<<endl; <<<<<<< HEAD cout<<"hello git"<<endl; ======= cout<<"hello bbb git"<<endl; >>>>>>> dev cout<<"hello 20170612 git"<<endl; }
f11e43795ebbdaa073ae396120a1e156ebba01b0
862d17790f78ffd03a3ad8e0554e4d5aff7ce42a
iambaangkok/ACM-ICPC-Journey
/CSES/00 Introductory Problems/10CoinPiles.cpp
C++
cpp
876
no_license
#include <bits/stdc++.h> using namespace std; using lli = long long int; using pii = pair<lli,lli>; #define INF 2e9+10 #define MOD (lli)(1e9+7) #define FOR(i,n) for(int i = 0; i < n; ++i) #define FORS(i,start,n) for(int i = start; i < n; ++i) #define FORSI(i,start,n, increment) for(int i = start; i < n; i += increment)...
08bf8fda8936edafeeb0240b7bcc8963effca82e
fb03c5ebcddcab1465f45a55930ec5639d6beb18
crdroidandroid/android_frameworks_av
/media/libstagefright/StagefrightPluginLoader.cpp
C++
cpp
3,362
permissive
/* * Copyright 2018, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
11f366b62bce737ae3917a7bbc510804e302f835
d883cede8f12ee85f0c9bee8621ba9b8d1fdf0f0
chipsneutrino/chips-sim
/src/base/WCSimConstructPMT.cc
C++
cc
3,623
permissive
#include "WCSimDetectorConstruction.hh" #include "WCSimMaterialsBuilder.hh" #include "WCSimPMTConfig.hh" #include "G4Box.hh" #include "G4Sphere.hh" #include "G4SubtractionSolid.hh" #include "G4LogicalVolume.hh" #include "G4VisAttributes.hh" #include "G4Material.hh" #include "G4Polycone.hh" #include "G4PVPlacement.hh" ...