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
ca8d501ab06c9a3ddd02efce8e553ba6291818fd
90f98e517d7abaa081b9971f0a5348d9c7680f50
medinu/Assignment-4---gradeBook
/main.cpp
C++
cpp
891
no_license
#include <iostream> #include "studentType.h" #include "studentType.cpp" int main(){ //new student object test student test; student test2; //values being passed in are test.initialize("John", "Doe", 1010, 2, 2, 1, 20, 40, 40); //test2.initialize("Jane", "Doe", 1011, 2, 2, 1, 20, 40, 40); ...
e57ade12196e5999da307208155965b921792faa
65eb964aa553783ad21b4631e282e1aea2de2260
slide-lig/plcmpp
/src/util/Helpers.cpp
C++
cpp
1,496
permissive
/******************************************************************************* * Copyright (c) 2014 Etienne Dublé, Martin Kirchgessner, Vincent Leroy, Alexandre Termier, CNRS and Université Joseph Fourier. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
58383e438a029119b4ce3c7c25f82d7181466659
df3d2372e274b86239fe5d849685742ff5e51473
snake0/upcxx-2020.3.2
/src/copy.hpp
C++
hpp
11,008
permissive
#ifndef _f42075e8_08a8_4472_8972_3919ea92e6ff #define _f42075e8_08a8_4472_8972_3919ea92e6ff #include <upcxx/backend.hpp> #include <upcxx/cuda.hpp> #include <upcxx/completion.hpp> #include <upcxx/global_ptr.hpp> #include <upcxx/rput.hpp> #include <functional> namespace upcxx { namespace detail { void rma_copy_g...
cde3c72d88bc072e9011b5c1319b2d9dfacefb1d
f3d16f39129578504d9c73206bcf4c750e50852f
ReiiSky/ThinMatrix-OpenGL-Engine
/Source/Toolbox/Maths.cpp
C++
cpp
1,032
no_license
#include "Maths.h" namespace Maths { Matrix4 createTransforrmationMatrix(const Vector3& translation, const Vector3& rotation, const Vector3& scale) { Matrix4 transformation; transformation = glm::translate( transformation, translation ); transformation = glm::rotate( transformation, g...
f60a40444efed5611394775ea22831095391af64
7b1e3237e35e4a4e2cad024e3ffea883a2b7f910
tkadauke/raytracer
/test/unit/raytracer/cameras/OrthographicCameraTest.cpp
C++
cpp
1,583
no_license
#include "gtest.h" #include "raytracer/cameras/OrthographicCamera.h" #include "raytracer/Raytracer.h" #include "raytracer/primitives/Scene.h" #include "core/Buffer.h" namespace OrthographicCameraTest { using namespace ::testing; using namespace raytracer; TEST(OrthographicCamera, ShouldConstructWithoutParamet...
d99b792e5777a2ea9a14dfc77e78a8cf38ee66d0
58dbabfa8e92241a2b023de8502123d436f2bf4b
MasashiWada/ouya-sdk-examples
/Unreal/NativeUnrealPlugin/jni/OuyaSDK_JSONArray.cpp
C++
cpp
17,365
no_license
/* * Copyright (C) 2012-2015 OUYA, 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 to i...
2b60fd7d34ea12bf624b91ee0caecd76de5ce136
76d505af4fce639e1598fbbdb5ece01b03fe2b94
lineCode/Rendu
/src/engine/scene/lights/DirectionalLight.cpp
C++
cpp
5,227
permissive
#include "scene/lights/DirectionalLight.hpp" #include "graphics/GLUtilities.hpp" DirectionalLight::DirectionalLight() : Light() { _lightDirection = glm::vec3(1.0f, 0.0f, 0.0f); } DirectionalLight::DirectionalLight(const glm::vec3& worldDirection, const glm::vec3& color) : Light(color) { _lightDirection = glm::norma...
7fb72cb43bb18e53dc13dd6314599a822f67ecae
59cad5fb4fc3e3bad04c9a8844366090d464d898
harion01/JJUtil
/datastruct_algorithm/c++/graph/GraphTraversal/GraphTraversal.cpp
C++
cpp
1,500
no_license
#include "GraphTraversal.h" using namespace std; GraphAlgorithm::GraphAlgorithm(Graph* ){ this->graph = graph; } void GraphAlgorithm::ClearFootStep(){ cout << endl << "Clear Footstep!" << endl << endl; for (auto i = graph->Vertices.begin() ; i!= graph->Vertices.end(); i++){ i->isVisited = false; } } void Gra...
b87d6506f2e6ff39a0dc08c0c736250d9174cda5
4e936bf7afc6004acdc13a93acd72e2e829569ac
erika1616/Proyecto_TO
/proyecto/board.cpp
C++
cpp
3,305
no_license
#include "board.h" #include <QPixmap> #include "pawn.h" #include "king.h" #include "queen.h" #include "bishop.h" #include "tower.h" #include "horse.h" #include "square.h" #include "mainwindow.h" extern MainWindow *mainwindow; tablero::tablero() { setUpBlack(); setUpWhite(); } void tablero::dibujarCasillas(int x...
763b2e719372721cdf866b82a7b246b683f29444
523225212f802ebbd8b06545317a9b49d437108f
pgolden1/CS440HW3
/SharedPtr_test.cpp
C++
cpp
24,532
no_license
/* * Usage: -t secs * where secs is how long to run the thread test for. Defaults * to 15 seconds. */ // NOTE compile with -pthread #include "SharedPtr.hpp" #include <new> #include <pthread.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <time.h> #include <string.h> #include <iostream>...
9e6cb073942b49dee600e2367b6384907c7e4401
c2cd99dac95003b2f1b6c0afd6011a530b5825f8
RomenBraman/OpenMaya
/src/mayaToCorona/src/Corona/CoronaOSLMap.cpp
C++
cpp
7,878
permissive
#include "Corona.h" #include "CoronaOSLMap.h" #include "utilities/logging.h" static Logging logger; OSLMap::OSLMap() { this->bumpType = NONE; this->worldScale = 1.0f; this->isEnvMap = false; } void OSLMap::setShadingGlobals(const Corona::IShadeContext& context, OSL::ShaderGlobals &sg, int x, int y, OSL::Matrix44&...
ab9aa93fd6e78cf26e513db39585c281b1f2b084
112014dfb3936efa9c9767c5e8244de5f42a2053
lellam/GP
/utility.hpp
C++
hpp
1,462
no_license
#ifndef UTILITY_H #define UTILITY_H #include <iostream> #include <string> #include <sstream> #include <fstream> #include <vector> #include <random> // Global PRNG std::random_device rd; std::mt19937_64 gen(rd()); void write_vec1d(const std::string& file_name, const std::vector<double>& vec) { std::ofstream file; f...
2e12763e474fb9b6eef38f00d411c23647850dd5
769086b19c6512d5e3a3b4c181ce5850f95da01f
lpimem/nacapp
/shared/src/buffer-helper.hpp
C++
hpp
236
no_license
#ifndef NACAPP_BUFFER_HPP #define NACAPP_BUFFER_HPP #include <memory> #include <string> #include <ndn-cxx/encoding/buffer.hpp> namespace nacapp { extern ndn::ConstBufferPtr fromString(std::string buf); } // namespace nacapp #endif
7ed105d8fa51ff60fe8aeb1fb41420066a04c4c7
ab0cc55f0d17f190faa6881877048f8d865e3ccf
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_10/S+poll+dataal.c.cbmc_out.cpp
C++
cpp
31,011
no_license
// Global variabls: // 0:vars:2 // 2:atom_1_X0_1:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 #define ADDRSIZE 3 #define LOCALADDRSIZE 2 #define NTHREAD 3 #define NCONTEXT 10 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_...
adb03ca1cca8e7801d3d970a478c7dee397e90bd
1a4e3406c49d52f233266fdde2abaebd6c8b1ab0
zishengye/compadre
/kokkos-kernels/src/impl/generated_specializations_cpp/trsm/KokkosBlas3_trsm_eti_spec_inst_Kokkos_cmplx_dbl__LayoutRight_Serial_HBWSpace.cpp
C++
cpp
2,522
permissive
/* //@HEADER // ************************************************************************ // // KokkosKernels 0.9: Linear Algebra and Graph Kernels // Copyright 2017 Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retain...
b4961e3849eef309fa6badc0fc0e0367da08331b
93bdcde666adf3eb13a360f31d6c21157260ef83
jianming1481/FY109-FLP
/kobuki_gazebo_melodic/src/line_follower/src/line_follower.cpp
C++
cpp
13,580
no_license
#include <line_follower/line_follower.h> #include <pluginlib/class_list_macros.h> #include <cmath> //PLUGINLIB_DECLARE_CLASS(pose_follower, PoseFollower, pose_follower::PoseFollower, nav_core::BaseLocalPlanner) PLUGINLIB_EXPORT_CLASS(line_follower::LineFollower, nav_core::BaseLocalPlanner) namespace line_follower { ...
fa9208c31a17a3b02b66e678f978b5dd0605a52a
029a12cfd5603429aa0e4896f0ae9271ca188377
zadid56/privacy-preserving-ML-models
/he-transformer-master/src/seal/he_seal_cipher_tensor.hpp
C++
hpp
7,161
permissive
//***************************************************************************** // Copyright 2018-2019 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
645f524b95ee014855c5ca3e615603a99b4a01e4
370cc99f7f3e0b75e7ec86dd8e2e20815a808ac9
freedomvictory/cpp-practices
/projects/copyControl/13-5.cpp
C++
cpp
509
no_license
#include <iostream> // practice 13-5 //copy constructor basic class HasPtr { public: HasPtr(const std::string &s = std::string()) : ps(new std::string(s)), i(0){} HasPtr(const HasPtr &h) : ps(new std::string(*(h.ps))), i(h.i){}; void PrintPs(); private: std::string *ps;...
aa35c62a498aa2c55ddaa360b3e2ce37d7ef3b6d
75c961c3f8bd0185d9be3b3e18808bcf391ea1a0
ppodhajski/Tide
/tests/cpp/core/VisibilityHelperTests.cpp
C++
cpp
9,630
permissive
/*********************************************************************/ /* Copyright (c) 2016, EPFL/Blue Brain Project */ /* Raphael Dumusc <raphael.dumusc@epfl.ch> */ /* All rights reserved. */ /* ...
2d53d06bb6f2b9b56218a1dd919fc89c0916c308
d18973ceac8a21714b6c34b64d43aaecbf22ada7
HilaShoshan/c_parser
/symbol.cpp
C++
cpp
322
no_license
#include "symbol.h" Type Symbol::getType() { return this->type; } int Symbol::getSymbol() { return this->symbol; } void Symbol::printSymbol() { if (type == Type::TERM) { cout << terminalStrings[symbol]; } else { // type is nonterminal / token cout << tokenStrings[symbol]; }...
d908fec19448dd216aa5c308bae6fa026254ca70
f8e414f288bb45b59bd5840e231e743cb96ba6e3
hphp/Algorithm
/Contest/ACM/2010_bak/MULTIPLE_2010/bupt11/MULTIPLE/C/Solutions.cpp
C++
cpp
2,369
no_license
#include<iostream> #include<algorithm> using namespace std; typedef long long ll; #define FORD(i,b,c) for(int(i)=(b);(i)>=c;(i)--) #define REPD(i,b) FORD(i,b,0) #define FOR(i,b,c) for(int i=(b);i<(c);i++) #define REP(i,c) FOR(i,0,c) #define INT_MAX (1<<29) //const int dm[8][2]={{0,1},{-1,1},{-1,0},{-1,-1},{0,-...
04a02787dafbc461721f4a2da9c8a3669ef06ab6
49a60050adb094c4f7740d969ac3bb9880bf2ea6
viettrungIT3/OOP_cpp
/VD_Thuc_Te/KeThua/1.cpp
C++
cpp
1,170
no_license
#include <bits/stdc++.h> using namespace std; class Nguoi { protected: string HoTen; int Tuoi; string GT; private: public: void Nhap(); void Xuat(); }; void Nguoi::Nhap() { cout<<"Nhap Ho Ten: "; fflush(stdin); getline( cin, HoTen); cout<<"Nhap Tuoi: "; cin>>Tuoi; ...
28dfcf5cd4fd080112aacd5c7624936a9ce8793c
59026d7ed42bce2e8916a9859e86222322fa6585
warrenween/Elastos
/Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/telephony/gsm/GSMSmsMessage.cpp
C++
cpp
15,111
permissive
//========================================================================= // Copyright (C) 2012 The Elastos 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 // // ...
a12ca9bd68e99d42631b2fe91bcfbe76d3323942
5f2b8f44124664a4b7b25d10d7acc9058574b4c4
hkhl/LeetCode
/20. Valid Parentheses.cpp
C++
cpp
1,142
no_license
/* Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Note that an empty string is also considered valid. Exam...
0f2dd5db09d16d85548fb2adf1b9e321b5366039
a6a9eeecc92ec15c84968766bdea855fbc194d85
rbianchi66/pyqt_md
/src/geo2d/build/temp.linux-x86_64-2.7/sip_geo2dcppPlacement.cpp
C++
cpp
640
no_license
/* * Interface wrapper code. * * Generated by SIP 4.10.2 on Thu Mar 12 16:30:15 2015 */ #include "sipAPI_geo2dcpp.h" sipClassTypeDef sipTypeDef__geo2dcpp_Placement = { { -1, 0, 0, SIP_TYPE_NAMESPACE, sipNameNr_Placement, {0} }, { sipNameNr_Pla...
64ae4f43b76360a05aacda45c649fccac7bb14f7
25d07762eb48c2a257cdfa07a5852f6671e3116e
naman238/Data-Structures
/Stack/pop sequence.cpp
C++
cpp
896
no_license
#include <iostream> using namespace std; struct stck{ int size; char elements[50]; int top; }; void push(struct stck &x,int c){ if(x.top==x.size-1) cout<<"full"; else{ x.top++; x.elements[x.top]=c;} } void pop(struct stck &x){ if(x.top==-1){ return; } else ...
c1e4fe6dc901ff1a2ece001177ffe2e60b7606db
9e844cee73ac1d76dd091be9a2e29b590300356d
dradgun/firstweb
/home6/fin6406021410055_3.cpp
C++
cpp
1,920
no_license
#include <iostream> #include <string.h> using namespace std; int main() { cout << endl; string word = "Jules Gabriel Verne was born to Pierre Verne, an attorney (died 1871), and his wife,Sophie-Henriette Allotte de la Fu?e (died 1887), in Nantes. The eldest of five children, he spent his early years at home wit...
85861f37aa0ccf43c336ae2497f60664bd57863d
be3359f3c8d47de2c8db60737af82b5c38ed3170
kheaactua/pcl
/test/registration/test_registration.cpp
C++
cpp
32,950
permissive
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2011, Willow Garage, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ar...
0ef370d781b1aa5b5f5b449ef007735d329ceab4
32f76df154dd6f3a067f38f6aa0b79c35915ddff
Hexer10/win32
/tool/constants.cpp
C++
cpp
2,154
permissive
/** * Copyright (c) 2020 the Dart 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. */ // constants.cpp // Development utility to confirm the width of various Win32 types. // This code not used by the package itself, but is...
ab7dcb828b6f0d9fd974280adeb28e1f3d1a85db
1c22a666925a3ef9b3ca3fcbe6627d89a1a4c766
cxvisa/Wave
/C++/source/Framework/Messaging/HaPeer/HaPeerMessageReceiverThread.cpp
C++
cpp
20,738
permissive
/*************************************************************************** * Copyright (C) 2005 Vidyasagara Guntaka * * All rights reserved. * * Author : Vidyasagara Reddy Guntaka * ***********...
0aaa5f84709eb81739324799688018298e85a39d
cfa683205f8692c9a8e7f8281ce909601e89cdd6
whztt1989/OpendTect
/src/uiEarthModel/uiimpbodycaldlg.cc
C++
cc
2,338
no_license
/*+ ________________________________________________________________________ (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt Author: Bert Date: Aug 2008 ________________________________________________________________________ -*/ #include "uiimpbodycaldlg.h" #include "b...
5552bbe031f2bf8aaba0647f2bf5ef9aed28033c
af2e35bb866dffcc02fe0a94df15a1a8db476ffd
robertodr/clang
/lib/Basic/Targets/AArch64.cpp
C++
cpp
18,101
permissive
//===--- AArch64.cpp - Implement AArch64 target feature support -----------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
6d48f837d257f55d53fbd5a3587082e52e9f151e
70c7e85bdb3a31bd9f47072a887d8265cc76c04b
BCITTeamAlpha/TheFarmiParadox
/OpenGLTest/main.cpp
C++
cpp
4,298
no_license
#include <vector> #include <Windows.h> #define GLEW_STATIC #include <GLEW/glew.h> #include <glm/glm.hpp> #include "AssetLoader.h" #include "MarchingSquares.h" #include "Renderer.h" #include "Renderable.h" #include "Character.h" #include "Input.h" #include "SoundManager.h" #include "PlayerManager.h" #include <thread> ...
8d189e0da5bd8c46306d965bb7fe9fc6f4524511
dca42cd6ca5640eea9bf811922965dee3368c3aa
picnkname/SYSU_Courses
/数据库系统/实验/实验6/ConsoleApplication1.cpp
C++
cpp
3,732
no_license
#define _CRT_SECURE_NO_WARNINGS //#include "pch.h" #include <mysql.h> #include <stdio.h> #include <winsock.h> #include <iostream> using namespace std; MYSQL mysql; //声明为全局变量 MYSQL_RES* result; int create_course_table() { char yn[2]; result = mysql_list_tables(&mysql, "course");//删除表 unsigned int ro...
ec2bc7ccf72e51fcc45fafd91fead985de2e5dd3
1381b660a9c3a3eed955f4ffea02746c4cef397e
DeretsunGit/RType
/Proj/RType/RType/WinUDPSocketClient.cpp
C++
cpp
3,243
no_license
#ifdef _WIN32 #include <iostream> #include <stdexcept> #include <winsock2.h> #include "WinUDPSocketClient.h" #include "WSAException.h" #define READ_SIZE 1024 WinUDPSocketClient::WinUDPSocketClient(const char* hostname, unsigned short port) : _sock(WSASocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, 0, 0)), _live(tr...
648f89a07001335d74b0e73544011d4b8fbe64fa
1afb5451e6db2de2fba645429677da33dc0764d8
spacefan/Leetcode
/112.path-sum/path-sum.cpp
C++
cpp
659
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool dfs(TreeNode* root,int now,int sum) { now+=root->val; if...
554248841c7016fc3a0e0a59a230c3119a55860d
1c1d627e34d67a46fa157ed4caecbc38b72a6a82
lbryio/lbrycrd-dependencies
/boost_1_59_0/libs/log/example/doc/extension_record_tagger.cpp
C++
cpp
7,385
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) */ #include <string> #include <ostream> #include <fstream> #include <boost/smart_ptr/shared_ptr....
49ab95004f58962d5d93612c8bdf3d24cd00328c
594f68089549ed7dd59f0442706ea2e73db74e0b
eaglesakura/jointcoding
/sources/core/jc/thread/MutexLock.cpp
C++
cpp
402
no_license
/* * MutexLock.cpp * * Created on: 2012/07/21 */ #include "jc/system/Macro.h" #include "jc/thread/Mutex.h" #include "prv_Thread.h" using namespace boost; namespace jc { MutexLock::MutexLock(jc::Mutex &mtx) { this->mutex = mtx.mutex; nativeLock = (new native_lock(mtx.mutex.as<native_mutex>()));...
daed32c612fa1ecfa80b93d8d4dbd134ef1edfaf
e0289a3f0490c87c89335666578c77ba55caf55d
sususama/Test1
/Maven/Project1/Project1/Project1.cpp
C++
cpp
1,187
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #define SIZE 32 struct stack { int sta[SIZE]; int top; }; void init_stack(struct stack* s) { memset(s->sta, 0, sizeof(s->sta)); s->top = -1; } int in_stack(struct stack* s, int data) { if (s->top == SIZE - 1) { printf("the stack is full. \n"); re...
5b165fc147ed86ff688c6acf35b2dfd70783396b
c09173997e859110b2ffc24cf90bb4c5748411b8
Daltz333/allwpilib
/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheel/cpp/Robot.cpp
C++
cpp
4,557
permissive
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include <frc/DriverStation.h> #include <frc/Encoder.h> #include <frc/TimedRobot.h> #include <frc/XboxController.h> #inc...
941caf251f09d452094de929e04facd989b487d7
ce1cdcb823eb3583815d1deaeaa2c08547cfd847
mmatheuspalma/InTheCube
/src/game/StaticMirror.hpp
C++
hpp
493
permissive
#ifndef GAME_STATIC_MIRROR_HPP #define GAME_STATIC_MIRROR_HPP #include <cmath> #include "game/Forme.hpp" #include <smk/Sprite.hpp> namespace smk { class Window; } // namespace smk #define DEGTORAD 0.0174532925 class StaticMirror { public: Line geometry; smk::Sprite sprite; int xattach, yattach; int xcente...
9860d7160d1fe71f2921a95f209f9729bfed9fed
10893d9e4533313cb2003fe0c11ef6b1ce54debe
wcysai/CodeLibrary
/Codeforces/Regular/567/A.cpp
C++
cpp
729
no_license
#pragma GCC optimize(3) #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #include<ext/pb_ds/priority_queue.hpp> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; using namespace __gnu_pbds; typedef l...
2683a90ee3603ccd621b3d5a8550df4460f3dd3f
58a340f14db421d61048f6591c6b8c456398f280
ariellucien/cypss17_2
/unittest/listenersApi/testEventLusteners.cc
C++
cc
1,004
no_license
#include "gtest/gtest.h" #include <stdio.h> using ::testing::EmptyTestEventListener; using ::testing::InitGoogleTest; using ::testing::UnitTest; using ::testing::TestEventListeners; using ::testing::TestPartResult; class EventListener : public EmptyTestEventListener { public: virtual void OnTestProgra...
48b3a86306de423923c9b051cb68373149043401
b5b42a427963f5d7494366dcd74edc8335d33b84
staffle-zz/CP_Staffle
/Algo snippets unoriginal/fenwick.cpp
C++
cpp
470
no_license
struct fenwick { int n; vector<int> t; fenwick (int _n) { n = _n; t.assign(n, 0); } int sum (int r) { int ans = 0; while (r >= 0) { ans += t[r]; r = (r & (r+1)) - 1; } return ans; } int sum (int l, int r) { retur...
17f0268eeeab3d53e1fe2910a770366a7459c5a0
b12ddd0391850166326f1ccd43fa7caec5e6f428
g-truc/glm
/glm/detail/type_mat4x3.hpp
C++
hpp
5,841
permissive
/// @ref core /// @file glm/detail/type_mat4x3.hpp #pragma once #include "type_vec3.hpp" #include "type_vec4.hpp" #include <limits> #include <cstddef> namespace glm { template<typename T, qualifier Q> struct mat<4, 3, T, Q> { typedef vec<3, T, Q> col_type; typedef vec<4, T, Q> row_type; typedef mat<4, 3, T,...
180818a1ac18fcf3b1c975e1137e31a7e04ffd34
ad3412d9400091f4c4ba710a45febe4582b0f92e
GameTechDev/OcclusionCulling
/CPUT/CPUTComputeShaderDX11.cpp
C++
cpp
3,819
permissive
//////////////////////////////////////////////////////////////////////////////// // Copyright 2017 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); you may not // use this file except in compliance with the License. You may obtain a copy // of the License at // // http://w...
f80cc4b1ee7b6b754248c2c1aecf038556776db5
1b2fc9ee4fdc55995e6d1d9e6654723eaa7943a8
pxl-accname/octomap_editing
/catkin_ws/src/octomap_editing/include/OEPanel.hpp
C++
hpp
830
no_license
#ifndef OEPANEL_HPP #define OEPANEL_HPP #include <QWidget> #include <QVBoxLayout> #include <QPushButton> #include <QSize> #include <iostream> #include <OEServer.hpp> #include <QCheckBox> #include "rviz/panel.h" namespace octomap_editing { class OEPanel: public rviz::Panel { // This class uses Qt slots and is...
b765ae3e5c5d68c1608883e0ce8907a2b6352d30
0c2e8b0019e522d4a3ff2ba645fe30baa9c56c7b
ethanfine/ia
/src/render.cpp
C++
cpp
47,464
no_license
#include "render.hpp" #include <vector> #include <iostream> #include "init.hpp" #include "item.hpp" #include "character_lines.hpp" #include "marker.hpp" #include "map.hpp" #include "actor.hpp" #include "actor_player.hpp" #include "actor_mon.hpp" #include "msg_log.hpp" #include "attack.hpp" #include "feature_mob.hpp" ...
a907c438e361c0fefba9eac933b4b3c81149b6e1
c193d1b60ccb3d73519643e75ec15264c1b18a0a
eladeban/tensorflow
/tensorflow/lite/kernels/cpu_backend_gemm_test.cc
C++
cc
26,194
permissive
/* Copyright 2019 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...
3f443af4f41337f9afe6c39df4ca08bcdcf9db44
1052c6769dee9831717ed9091bd3d890cc93a7e0
fdfragoso/GameEngines
/Random-Engine/include/MeshCmp.hpp
C++
hpp
1,118
no_license
#pragma once #include <SRE/Mesh.hpp> #include "glm/glm.hpp" #include "Component.hpp" #include "DefaultRandomMat.hpp" //! MeshCmp /*! Class that inherits from Component class */ /*! Used to create mesh for 3D GameObjects */ class MeshCmp : public Component { public: ~MeshCmp(); /*! Setup function */ /*! Assigns ...
30eaf309957d570207c7facbdaeec4277369b6a7
98a5b346e53cbc9ac37b7e15a33d99a319012668
i-am-mike-m/LeetCode
/452.cpp
C++
cpp
927
no_license
bool compare (pair<int,int> a, pair<int, int> b) { if (a.second == b.second) return a.first < b.first; else return a.second < b.second; } class Solution { public: int findMinArrowShots(vector<pair<int, int>>& points) { if (points.size() == 0) return 0; sort(points.begin(), poi...
e2984fac34f62a9bf35d9a6596a395fbd31b7ffa
cf9dd5338e21ecd411308c03621968f5dd7cf3fa
VuTan115/C-
/baychimdicu.cpp
C++
cpp
479
no_license
#include <iostream> #include <vector> using namespace std; int main () { int n; cin >> n; vector <int> a(6,0); int max = 0; int nhap; for (int i = 0; i < n; i++) { cin >> nhap; a[nhap]++; cout<<"cai lon gi do "<<a[nhap]; if (max < a[nhap]) max = a[nhap]; } ...
d310295353ca80c3a8f818d222bc759c6ac40e72
0522ae221f82f06e5b63c6aeac9cbae9b85a9f01
mithrakoganti/C-C-Projects
/MultiLevelInheritanceConcepts.cpp
C++
cpp
774
no_license
//Multi-level Inheritance #include<iostream> using namespace std; class Myclass1 { public: Myclass1() { cout<<"\n"<<"Invoked Myclass1"; cout<<"\n"<<"Myclass1 object is created"; } ~Myclass1() { cout<<"\n"<<"Myclass1 object is blowing up"; } }; class Myclass2: public Myclass1 { publ...
cc9d431f909d65bc742db8ca8af5ce9088b24dd9
12addfad088eae53701f288381f350295268c76f
BackRowPowerPosse/projectSTF-OOP
/safeio.cpp
C++
cpp
3,525
no_license
//---------------------------------------------------------------------------- // File: safeio.cpp // // Function: // safeChoice //---------------------------------------------------------------------------- #include "FleetLibrary.h" //----------------------------------------------------------------------------...
ac1f211357adff7a46d925ae40ee80a3ca68110c
a459d5ef02c3b97de6ebc928709cc7a7875c6079
z1ggy-o/leetcode_solutions
/tree/144-a.cpp
C++
cpp
816
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...
e03f6241a3b158ab796f446af329341522a1d906
dc354e40274836ba9fd25738baae68972b377cc7
ConnectionMaster/tsduck
/src/libtsduck/dtv/windows/tsTunerGraph.cpp
C++
cpp
20,534
permissive
//----------------------------------------------------------------------------- // // TSDuck - The MPEG Transport Stream Toolkit // Copyright (c) 2005-2022, Thierry Lelegard // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the ...
ef6ff557659390143616d1d93283934f23f4565c
1ce830c9a47c26afc15781cf01e8b13a4e448168
Koerner/TUM_AdvancedCourseCPP
/Projekt/release/moc_gameengine.cpp
C++
cpp
7,372
permissive
/**************************************************************************** ** Meta object code from reading C++ file 'gameengine.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.2.1) ** ** WARNING! All changes made in this file will be lost! **********************************************************...
fbd92eb32ba2d7eb66060ba66c72968d6a289e6d
d85c9470349d8dc03c7fe6862c8295bda25f6b06
gakkiri/ncnn_project
/centernet/src/main.cpp
C++
cpp
7,730
no_license
#include "net.h" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> #include <stdio.h> #include <vector> #define input_h 448 #define input_w 672 #define pool_size 3 #define conf_th 0.3 struct Box { float x1; fl...
3f998ed3dca5b9e6993db946764fb20d57ceaee2
9e8d8a7f0aa9e57156d89b582cc81ea1cf538ca0
sonicma7/choreopower
/source/ogre/OgreNewt/boost/mpl/inserter.hpp
C++
hpp
791
no_license
#ifndef BOOST_MPL_INSERTER_HPP_INCLUDED #define BOOST_MPL_INSERTER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE...
47d83027beae478f5c47bb0ab629a78f0da96449
82326025a826c175e556949d62aebc037e9ee1b1
liuzf1986/network
/http/HttpServer.cpp
C++
cpp
2,408
no_license
#include "HttpServer.hpp" #include "VecBuffer.hpp" #include "Utils.hpp" const SpVecData HttpServer::_400_VecData = HttpServer::genResponse_400(); const SpVecData HttpServer::_401_VecData = HttpServer::genResponse_401(); const SpVecData HttpServer::_403_VecData = HttpServer::genResponse_403(); const SpVecData HttpSer...
c082e9ad759c28cdf291668faebc5b7951e4de49
1f79a86eb2202c212f4ca3be9170a4c83d1d20f3
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE190_Integer_Overflow/s02/CWE190_Integer_Overflow__int64_t_fscanf_square_62b.cpp
C++
cpp
1,406
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__int64_t_fscanf_square_62b.cpp Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-62b.tmpl.cpp */ /* * @description * CWE: 190 Integer Overflow * BadSource: fscanf Read data from the console using fscanf(...
622c29fd482ea06d142885c42a0990a5faecbcf6
4160a53fa728099e27c51250ad0f8216715ea514
akash95dutta/Date
/binarySearch.cpp
C++
cpp
1,391
no_license
# include <stdio.h> # include <stdlib.h> # include <conio.h> int binarySearch(int arr[],int size,int key) { int lb=0; int ub=size-1; while(lb<=ub) { int mid=(lb+ub)/2; if(arr[mid]==key) return mid; else if(arr[mid]<key) lb=mid+1; ...
5c8658ef2472a1a7726e6f8a3ff1cd94aacc3c64
7c943c2ad3a0ad5244fa968389849cbc8a5c84dd
Onygox/UnrealProjects
/ShooterStarter/.history/Source/ShooterStarter/ShooterStarterPlayerController_20200908124343.cpp
C++
cpp
682
no_license
// Copyright Lionel Miele-Herndon 2020 #include "ShooterStarterPlayerController.h" #include "TimerManager.h" #include "Blueprint/UserWidget.h" void AShooterStarterPlayerController::GameHasEnded(class AActor* EndGameFocus, bool bIsWinner) { Super::GameHasEnded(EndGameFocus, bIsWinner); UE_LOG(LogTemp, Error,...
f2a1dc91d67c8027cc44a53c56608764fa7bf90b
301692279ab714dcfaf3f6199d8a0c040be44290
Fan-Yi/Efficient-Local-Search-for-Maximum-Weight-Cliques-with-Applications-in-Image-Co-localization
/myLSCC.cpp
C++
cpp
384
permissive
#include <iostream> #include "localSearch.h" using namespace std; int main(int argc, char* argv[]) { char filename[1024]; sscanf(argv[1], "%s", filename); int seed; sscanf(argv[2], "%d", &seed); srand(seed); int time_limit; sscanf(argv[3], "%d", &time_limit); StochasticLocalSearch mySLS(filename, time_limi...
b41f1830018c162b436caf31b57beebf1d129409
f8c372a4fc86f723b33fe429f6ba3c4e972eb097
rajatgirotra/study
/cpp/C++_11_14/35.cpp
C++
cpp
1,513
no_license
#include "35.hpp" #include <stdexcept> #include <system_error> #include <future> #include <iostream> template <typename T> void processCodeException(const T& e) { using namespace std; auto c = e.code(); cerr << "- category: " << c.category().name() << endl; cerr << "- value: " << c.value() << endl;...
b9b3a274547e4312895f211a191cbcebf311b09f
952433124c60653e8643a18b7cea01880ee65a24
shiinamiyuki/lunatic
/src/opcode.cc
C++
cc
1,324
permissive
#include "opcode.h" namespace lunatic { #define W_AB(o) if(opcode == o){out << (#o) <<" "<< getA() <<" "<<getInt();} #define W_ABC(o)if(opcode == o){out << (#o) <<" "<< getA() <<" "<<getB()<<" "<<getC();} #define W_F(o) if(opcode == o){out << (#o) <<" "<< getA() <<" "<<getFloat();} std::string Instruction::str() cons...
67dfd12f1cd47ac744b9f7216ba123496f9618cf
d4273c0e5db3d91a85fae4d0dae3b108e2d687cd
EricMiddleton1/LightNode-ESP-Arduino
/Arduino/LightNode-ESP/ColorWipeEffect.cpp
C++
cpp
640
no_license
#include "ColorWipeEffect.h" #include <algorithm> #include <cmath> #include <Arduino.h> ColorWipeEffect::ColorWipeEffect() : Effect{"Color Wipe", {LightAdapter::Type::Linear, LightAdapter::Type::Matrix}, UPDATE_PERIOD} { } void ColorWipeEffect::effectStart() { hue = 0; mult = 255.f / adapter->size(); run(...
ee83f8d1f9bf3e11c1f3d86861880edd17e7913f
ad3987657cc09b4a4e8d4d4e25b42c326a5e0b65
aidanwolter3/atlas-emu
/src/engine/instruction/status.cc
C++
cc
845
no_license
#include "src/engine/instruction/status.h" Instruction::ExecuteResult CLC::Execute(uint16_t operand) { reg_.status.reset(Status::kCarry); return {}; } Instruction::ExecuteResult SEC::Execute(uint16_t operand) { reg_.status.set(Status::kCarry); return {}; } Instruction::ExecuteResult CLI::Execute(uint16_t ope...
d5043b300152a95c3a8ac46f1aa4f98698fa9392
175f97804a6737741212a9785c9336912720b1f8
rouault/gdal_coverage
/gdal/ogr/ogrsf_frmts/db2/ogrdb2tablelayer.cpp
C++
cpp
53,481
permissive
/***************************************************************************** * * Project: DB2 Spatial driver * Purpose: Implements OGRDB2TableLayer class, access to an existing table. * Author: David Adler, dadler at adtechgeospatial dot com * ****************************************************************...
7976725edab72ed561cc8e4c8bf3d4fa0ea3b6e0
c107604e8f53142f59a5cc8c31d48013e708615b
GeminiDylan/PAT
/A1094.cpp
C++
cpp
1,371
no_license
#include<iostream> #include<cstdio> #include<cstring> #include<vector> #include<queue> const int maxn=110; using namespace std; vector<int> Node[maxn];//存放结点 int n,m;//结点总数n,有孩子的结点数m int maxnum=0,num=0,level=0,maxlevel;//当前level有多少个结点 void BFS(int root) { queue<int> q;//用来进行层序遍历的队列 q.push(root); while(!q.em...
478f28707431bcd9f37a675cc8a37a72f9476280
965b85dfe73879460cf63cddd450052e106d52c5
aniknaemmm/recovery-repository-2-002
/C++/Win32Events/Win32Events/main.cpp
C++
cpp
6,263
no_license
// Файл WINDOWS.H содержит определения, макросы, и структуры // которые используются при написании приложений под Windows. #include <windows.h> #include <tchar.h> #include <map> #include <ctime> using namespace std; //прототип оконной процедуры LRESULT CALLBACK WindowProc(HWND, UINT, WPARAM, LPARAM); TCHAR szClassW...
69baaca8a99fecf7aff820463a08820d25756608
e509c8866981e17b5eca155458c1915db3af0781
tedkim81/algorithm-study
/cpp/codejam/y2018/Round2/Gridception.cpp
C++
cpp
7,993
no_license
/** * 2020.4.2 * * https://codingcompetitions.withgoogle.com/codejam/round/0000000000007706/00000000000459f4 * * Gridception = grid + ception(인셉션의 그 "셉션") * 다른 사람의 꿈을 훔쳐볼 수 있는 도둑이 있다..;; * 꿈의 형상은, 격자형(바둑판 모양)이고 흰색(W) 또는 검은색(B)으로 이뤄져 있다. * 그리고 첫 형상에서, 꿈이 한단계 진행되면 형상이 가로 세로가 각각 2배씩 커지는데, * W => WW * WW * ...
4913ea21724ecc6f09d57ece10363dc5de36e7a9
40f61285d49d3ec0fb79a72a7914910bf9bd821a
niuxu18/logTracker-old
/second/download/curl/gumtree/curl_new_log_14903.cpp
C++
cpp
524
no_license
fputs( " size_header The total amount of bytes of the downloaded head-\n" " ers.\n" "\n" " size_request The total amount of bytes that were sent in the\n" " HTTP request.\n" "\n" " size_upload The total amount of by...
02b684aa6288a165362ec0eeeb106aba8ac25521
4746469b10cc74ccbc46cb901a73c7ee13a70fb8
siankatabg/android_frameworks_av
/media/libstagefright/SampleTable.cpp
C++
cpp
29,662
permissive
/* * Copyright (C) 2009 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
dd80c2b864a9d5777b2dde5237706dde5b8aad5c
936baa7aff27169cf853221e46dffcd9c36e6263
naraemirae9/intruder_detect
/intruder.cpp
C++
cpp
4,859
no_license
#include "opencv/cv.hpp" #include "opencv2/highgui.hpp" #include <Windows.h> #include <iostream> #include <time.h> #define WIN_NAME "침입자 탐지" #define DIFF_THRESHOLD 0.1 #define FACE_CLASSIFIER_PATH "C:\\Users\\CIEL_PC_SIMUL1\\Downloads\\opencv\\build\\etc\\haarcascades\\haarcascade_frontalface_default.xml" #define FAC...
cd34ea0900a25ec1b28d6663996a5ac7bc1ef6a6
1c1688355b9d224358f6a4fbc46fbaf228d8efb6
Aniket2107/dsa-450
/LinkedList/1.cpp
C++
cpp
2,004
no_license
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; }; Node* head; void Insert(int number){ Node* temp1 = new Node; temp1->data = number; temp1->next = NULL; if(head == NULL){ head = temp1; }else { Node* temp2 = head; while(temp2->next...
1c08a9abe296588f7879fda32a7310b10ef10951
43449df9e51672e1594b250101b63b52984600a5
NeoResearch/neopt-sdk-js-old
/src/neo3-cpp-bindings/neo3-bindings.hpp
C++
hpp
8,616
permissive
#pragma once // ------------------------------------------------------- // these are useful to javascript ONLY (via emscripten) // ------------------------------------------------------ // ======================================================================================= // these are C++ methods provided to emsc...
5b91a5f3c7d2570ccc6bdd5314994a0f030ab832
6c85e5d942107353188f9610b0febba6edaf0107
furkankocyigit/Cplusplus-Topics
/STL_library/src/my_pins.cpp
C++
cpp
923
no_license
#include <iostream> #include <map> using namespace std; int main(){ map<pair<int,int>,string> pins; int temp = 0; string str; pair<pair<int,int>,string> p; pair<int,int> landmark; cout<<"Inserting..\n"; while(temp>=0){ cout<<"Enter latitude: "; getline(cin,str); ...
e1f4a9d656c1d5c5934493cff39ca4e9455043ba
4df3804dcceb6c5c24fe207c000e3b0a8277cac2
vadniks/MyCppProjects
/Snippets/legacy/main1.cpp
C++
cpp
1,845
no_license
#include <iostream> #include <cstring> #include <cstdlib> #define ct(_x, y) cout << _x << ((y) ? '\n' : '\0'); #define _cs(y, _x) \ case y: \ _x; \ break; #define sc static const using namespace std; class A { private: sc int lgt = 3; sc int bf = 256; sc char spc = '...
00702cf9b98d91481082faeab577bee372dee908
2bc1a7e3b569e099880bace5a564de0d3c77484a
LASpencer/aie-Custom-Physics-Project
/Source/PhysicsEngine/PhysicsScene.cpp
C++
cpp
6,752
no_license
#include "PhysicsScene.h" #include "ExternalLibraries.h" #include "PhysicsObject.h" using namespace physics; const float PhysicsScene::k_def_max_frame = 0.05f; physics::PhysicsScene::PhysicsScene(float timeStep, glm::vec2 gravity) : m_timeStep(timeStep), m_gravity(gravity), m_accumulatedTime(0), m_maxFrameLength(k...
89950c7ee2dda7518c43d08cd133fde46b3fbfa9
51a9454403eb918419f47c350cf93850e5e22fa7
proaholic/Win2K3
/NT/inetsrv/iis/iisrearc/iisplus/ulw3/redirectionhandler.hxx
C++
hxx
1,796
no_license
#ifndef _REDIRECTIONHANDLER_HXX_ #define _REDIRECTIONHANDLER_HXX_ class W3_REDIRECTION_HANDLER : public W3_HANDLER { public: W3_REDIRECTION_HANDLER( W3_CONTEXT * pW3Context ) : W3_HANDLER( pW3Context ), _strDestination( _achDestination, sizeof(_achDestination) ) { } HRESULT SetD...
0671d6f10a1b198b1293b03aa83205272427be98
f3318c408fa762d88c963d15c65389478132b644
Karthik-Ragunath/competitive_programming
/KadanesMaxSubArray.cpp
C++
cpp
1,137
no_license
// https://www.hackerrank.com/challenges/maxsubarray/problem #include<bits/stdc++.h> using namespace std; #define ll long long int int main() { ll testcases; cin >> testcases; for(ll l = 0; l < testcases; l++) { ll n; cin >> n; vector< ll > inputs(n + 1); for(ll i = 1; i...
0e1f66b5e13a3a0186cd73487f6938d86d3495a2
650fc57c0bbc11ef898384e18b888674cf63e552
msfwaifu/jlquake
/source/client/game/quake2/hud.cpp
C++
cpp
11,726
no_license
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** This program is free software; you can redistribute it and/or //** modify it under the terms of the GNU General Public License //** as published by the Free Software Foundation; either ...
8cff1b91f686b46f246aa8c6db4b03a37e7d26ed
cb28bc739a9b1d32921aa49f66400bfcb7c52f0a
wolfv/ElastoPlasticQPot
/include/xElastoPlasticQPot/Cartesian2d_Elastic.hpp
C++
hpp
3,501
permissive
/* ================================================================================================= (c - MIT) T.W.J. de Geus (Tom) | tom@geus.me | www.geus.me | github.com/tdegeus/ElastoPlasticQPot ================================================================================================= */ #ifndef XELASTOPL...
cab878d76ffe14f384f8b52020951a63db269692
44b9001824fc0dd22bb452fc785ccecb36ce62d2
WuyangPeng/Engine
/AssistTesting/Code/Example/MathematicsExample/DistanceAlignedBoxesTesting/TestingHelper.cpp
C++
cpp
761
permissive
/// Copyright (c) 2010-2023 /// Threading Core Render Engine /// /// 作者:彭武阳,彭晔恩,彭晔泽 /// 联系作者:94458936@qq.com /// /// 标准:std:c++20 /// 版本:0.9.1.0 (2023/06/20 10:52) #include "Testing.h" #include "TestingHelper.h" #include "CoreTools/Helper/ClassInvariant/MathematicsClassInvariantMacro.h" #include "CoreTools/UnitTestSui...
3e39073c40636a49a120d04c30b659b80b6c2142
850389d7f61e487504006a0ca7663438e7e8c444
johnrsibert/tagest
/jnigraphics/test/example/example.cpp
C++
cpp
3,985
permissive
#include <iostream> #include <fvar.hpp> #include <stdlib.h> #include "jnigraphics3.h" //#ifdef unix int random(const int i) { return 3; }//random() % i; } //#endif int main() { //jnigraphics3 jni; //jnigraphics3 jni("../g++"); jnigraphics3 jni; int* grid53 = jni.addGridLayout(1, 2); int* tabs5 = jni.addT...
64cc1789b06558f6a3408e55185b6f24f34259cb
91665bce6cb72a084facd631c4676535a2089c9d
drblallo/googlebenchmarkExample
/lib/utils/include/example/utils/IRange.hpp
C++
hpp
1,704
no_license
#pragma once #include <iterator> namespace example { template<typename Iterator> class IteratorRange { public: IteratorRange(Iterator&& b, Iterator&& e): b(std::move(b)), e(std::move(e)) { } [[nodiscard]] Iterator& begin() { return b; } [[nodiscard]] Iterator& end() { return e; } private: Iterator ...
e8462b0e13288529637fa088f420ab2a2fa37f85
45afc76d758ab5052da78879b27380e2c1ccb5b9
helloworldcup/tensorflow
/tensorflow/compiler/tf2tensorrt/convert/convert_nodes_test.cc
C++
cc
143,639
permissive
/* Copyright 2018 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...
d0ee909e17f5b95f79bfbe74813c5f00d21c8f31
4cfe8cc0181dc74ce516d223c61a2ba347fac6be
smartDex/r_fork
/src/cbc/beast/net/impl/IPAddressV6.cpp
C++
cpp
2,067
permissive
//------------------------------------------------------------------------------ /* This file is part of Beast: https://github.com/vinniefalco/Beast Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without f...
46bf074709907b11a9a3e5fd2062c492d3b24fc1
281536a12836cdb12102490e3436ac0a81316040
fabricio21x/Lp1_2016-1
/Clase14_Ejercicio1/Universidad.cpp
C++
cpp
972
no_license
#include "Universidad.h" #include "Curso.h" #include "Alumno.h" #include <iostream> using namespace std; void leerDatos(void *&cursos, void *&alumnos){ int numCursos, codAlumno; codAlumno = leeCursos(cursos, numCursos); //imprimirCursos(cursos, numCursos); leerAlumnos(alumnos, codAlumno); ...
1556b3e49c03b6c0354a9ee47eabade8d63d1073
76431fdbe56cdc46a09a8d044c455b66b11512c9
ShubhamAnandJain/Matroid-Secretary-simulations
/UniformMatroids/multipleSecretaryWorstCase.cpp
C++
cpp
2,211
no_license
#include<iostream> #include<random> #include<algorithm> #include<chrono> #include <ctime> // For time() #include <cstdlib> // For srand() and rand() using namespace std; void random_perm(int ranks[], int n){ // random permutation //int ranks[n]; for (int i=0; i<n; i++) ranks[i]=i+1; //for (int i=0; i<n; i++...
043209758129f3cc68594ff6b58cbf8cd9defcfe
97302b0682245cafefc178ccc19e4beac01487b4
tokitsu-kaze/ACM-Solved-Problems
/Codeforces/Codeforces Round 536/1106C.cpp
C++
cpp
3,338
no_license
#include <bits/stdc++.h> using namespace std; namespace fastIO{ #define BUF_SIZE 100000 #define OUT_SIZE 100000 //fread->read bool IOerror=0; // inline char nc(){char ch=getchar();if(ch==-1)IOerror=1;return ch;} inline char nc(){ static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE; if(p1==pend){ ...
faf218b103159ca9c7e09b2c79cc22e24e8847d7
b2705f687f9b328051a942e27160ddee5f6f9c09
Islamiz/core
/src/ledger/LedgerMongodb.hpp
C++
hpp
7,669
no_license
#ifndef NEURO_SRC_LEDGERMONGODB_HPP #define NEURO_SRC_LEDGERMONGODB_HPP #include "common/logger.hpp" #include "config.pb.h" #include "ledger/Ledger.hpp" #include "ledger/mongo.hpp" #include "messages.pb.h" namespace neuro { namespace ledger { class LedgerMongodb : public Ledger { private: mutable mongocxx::instan...
e5829d4f778f2a53caf9bb2eb91366991c00836c
3edd63364de31f97cf4c58bd0619960fe6ac4ac0
Tarun-19/SPOJ-Soutions
/TIPTOP.cpp
C++
cpp
371
no_license
// TIPTOP - Tip Top Game // Author: Tarun Kumar // E-mail: tarunkumar281200@gmail.com #include <iostream> #include <cmath> using namespace std; int main() { int t,i; unsigned long long n,x; cin>>t; for(i=1;i<=t;i++) { cout<<"Case "<<i<<": "; cin>>n; x=(int)sqrt(n); if((x*x)==n) cout<<"Ye...
1d36626fe6a3d34755db09af0c056b0e2e3ab9f5
ebeb8d189a2c99e590a166247a9181e28680fe18
elix22/Urho3D
/Source/ThirdParty/angle/third_party/SwiftShader/src/OpenGL/libEGL/Texture.hpp
C++
hpp
1,201
permissive
// Copyright 2016 The SwiftShader 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 b...
4adf6e085bc1f6b03839f3113bab2d962550cb00
00dda821d8e02e267650cd11e779616db8422459
damueller/ogs
/Applications/DataExplorer/DataView/MshModel.cpp
C++
cpp
5,024
permissive
/** * \file * \author Lars Bilke * \date 2009-10-19 * \brief Implementation of the MshModel class. * * \copyright * Copyright (c) 2012-2014, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * ...
667ee3bd221fcb3e76ffdd5b4899cfe9f22d2fba
d1410ba0ff3fd5b35a387484a7e11acb2f9762c9
logan-5/kepler
/src/common/types.hpp
C++
hpp
9,052
no_license
#ifndef TYPES_HPP #define TYPES_HPP #include "kepler_config.hpp" #include "util/util.hpp" #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/euler_angles.hpp> #include <glm/gtx/string_cast.hpp> #undef GLM_ENABLE_EXPERIMENTAL #include <ostream> #include <t...
6143fa07b8253c98a75ed77834c50fb6646e6fb6
f4dd5a9b508308d22ba6c511025c91d670e357cb
juwh/ctci6
/test/ch01_arrays_and_strings/q01_is_unique/main.cpp
C++
cpp
1,225
no_license
#pragma region Interview Question /* 1.1 Is Unique: Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures? */ #pragma endregion #pragma region Hints /* Hints: #44. Try a hash table #117. Could a bit vector be useful? #132. Can you solve it in O(...
8b2746bb13f93e821bbd58f22e6256e9292c9765
a5e2305f2c2afdd27ca17a037ef3931e024454ea
webpigeon/Stratega
/dependencies/recastNavigation/Recast/Source/Recast.cpp
C++
cpp
14,265
no_license
// // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // Permission is granted to anyone to use this software for any purpose...
e4f73d5a55128012587db6664a549c2e299992b5
5175bc5829cc5736b7285e73ea4f2355ee980083
techlabxe/SimpleWindowWayland
/model.cpp
C++
cpp
1,207
no_license
#include <stdio.h> #include <cmath> #include "model.h" static const double PI = 3.14159265; void createTorus( std::vector<uint16_t>& indices, std::vector<VertexPN>& vertices ) { float radius = 3.0f; float minorRadius = 1.0f; int n = 20; int vertexCount = (n+1) * (n+1); for( int i = 0; i <= n; ++i...