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
d5d77e1eb4968603df46859990a14b188f2132a8
05728c429eb4f04aac3b613b24e8b565849615be
r00xid/Slemanium
/src/addrman.cpp
C++
cpp
16,432
permissive
// Copyright (c) 2012 Pieter Wuille // Copyright (c) 2012-2016 The Slemanium Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "addrman.h" #include "hash.h" #include "serialize.h" #include "streams.h" in...
b4a953bd17e6bf967cb2a611199ab64214ba8dc7
fe55446bc731224c25312f4cce51e6b1d679213c
peperontino39/commentgame
/src/Game/Enemy/Golem/Golem.cpp
C++
cpp
872
no_license
#include "Golem.h" Golem::Golem(Vec2f _pos, Vec2f _size) : Enemy(_pos, _size) { std::string pattern("res/Texture/Enemy/golem_pattern.txt"); std::string action("res/Texture/Enemy/golem_animation.txt"); readPatterns(pattern); readAction(action); std::string register_key("golem"); std::string resourse("res/Textur...
a1abeac9cfe5d2419b2375a5e8e4515aa7a510c0
8c8108edef028f0d567c918e6f1229ff75f13bbf
engincandanabas/Box_Tower
/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutput/UnityEngine.InputLegacyModule.cpp
C++
cpp
145,464
permissive
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // UnityEngine.Camera[] struct CameraU5BU5D_tAF84B9EC9AF40F1B6294BCEBA82A1AD123A9D001; // System.Char[] struct CharU5BU5D_t7B7FC5BC8091AA3B9CB0B29CDD80B5EE9254AA34; // UnityEngine....
9685ffe08950198a876d372da6e2d576bbc6ea24
78e509f7e14ba1c465c6582a82e6a9ea48e9260b
stonier/ceres_solver
/internal/ceres/gradient_problem_solver.cc
C++
cc
11,218
permissive
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2014 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistr...
364e4f32e7cd1810fc29db687fb2e8796e17234a
5979c15d88442a7e402ff81dcb6cd1ffceff93b6
jacketsj/cgshop2022-gitastrophe
/src/verify/verify_coloring.hpp
C++
hpp
4,457
permissive
#pragma once #include "bentley_ottmann_any_intersection.hpp" #include "geom.hpp" #include <cstddef> #include <optional> #include <sstream> #include <unordered_map> namespace boi { /** * Structure that represents an error in a coloring; * either an error in the encoding (is_intersection is false), * or a pair of int...
cc7e594d46a0c57c67caba3ecba7b59b36595747
1116c1cd1de8d9820e112b3b4031c8e7916f59c6
ICCup02/Programmer
/programm/24/24)/24).cpp
C++
cpp
1,606
no_license
#include <iostream> size_t strlen(const char* string) { int i = 0; while (string[i] != '\0') { i++; } return i; } char *strcats(char* combination, const char* srcptr) { int max = strlen(combination) + strlen(srcptr) + 1; int one_longitude = strlen(combination); for (int i = one_longitude , count_srcptr = 0;...
e302c889a24bbe392039572d3ef5d8858bee70a0
70e15b06c587862f2453d90826b0e3b7ec66421e
BackupTheBerlios/airdc-svn
/branches/2.3x/client/HighlightManager.cpp
C++
cpp
4,348
no_license
/* * Copyright (C) 2003-2005 Pär Björklund, per.bjorklund@gmail.com * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later vers...
b1764ed97add07eb1f443ee32b3a32b4ca2095b6
63d5ca0f07dcc32a36a086d15827c33d64a6ac4f
wrazik/kurs_cpp
/lekcja3/main.cpp
C++
cpp
456
no_license
#include <iostream> #include <string> using namespace std; int main() { string name; cout << "Czesc, jak sie nazywasz?" << endl; cin >> name; if (int age = 0; name == "Wojtek" || name == "Piotrek" || name == "Dominik" || name == "Maciej") { cout << "Ile masz lat?" << endl; cin >> age; if (age >= 1...
1887409c39b476276c6c87bda79f755cc1d9e6ae
3c95685d5edc97d079b55c3e6ef698cba1816c1c
yanqiangmiffy/fastmoe
/cuda/global_exchange.cpp
C++
cpp
3,613
permissive
#include "global_exchange.h" #include "utils/fmoe_utils.h" #include <torch/extension.h> #ifdef FMOE_USE_NCCL #include <nccl.h> torch::Tensor _expert_exchange( torch::Tensor local_expert_count, long n_expert, long n_workers) { auto global_expert_count = torch::empty_like(local_expert_count); au...
8021fc1cb0344d7df974e8f2a2abd3021a5f4fca
e667a2a616903ed3cd1e3846dc9336afe822f910
FaceFuture/Parallel-SVM
/SVM_Trainer_OMP.cpp
C++
cpp
8,132
permissive
#include "stdafx.h" #include "SVM_Trainer_OMP.h" #include <math.h> #include <omp.h> #include "PublicFunctions.h" #include "DataSet.h" //#include "mkl.h" #include "ParticleSwarmOptimizer.h" #include <chrono> const double SVM_Trainer_OMP::XX[2] = { FLT_MAX, 0 }; const double SVM_Trainer_OMP::YY[2] = { DBL_MA...
8c984d947a45fbd42392c82be82948a0862e60f1
0b952846fd9ce8f83f02db1e7eeda027625364ae
trabish/buaa_compiler
/源代码/ConsoleApplication1/main.cpp
C++
cpp
1,547
no_license
#include "pch.h" #include "Lexer.h" #include "Parser.h" #include "error.h" #include "midcode.h" #include "opt.h" #include <iostream> #include <cstdio> #include <sstream> #include <fstream>//文件操作 using namespace std; int main() { /*char ch; index = 0; while ((ch = getchar()) != EOF) {//从控制台读入所有字符 S[...
92b3f27595b14767d83e86831dccb0797e873df6
966aadb94a861952cc46d3ed4af2e7a3df580127
AramakiYui/ReLearn-C-
/面向对象编程/036父类中有重载的构造函数.cpp
C++
cpp
612
no_license
#include <iostream> using namespace std; class A { protected: //protected类型允许子类使用其数据 int a; public: A() { a=10; } A(int aa) { a=aa; } void output_A() { cout<<"a="<<a<<endl; } }; class B:public A //子类继承 { private: int b; public: B() { ...
351d69f93528653804e5a449861d00376e20ab37
e8d7ed61460c7804448c3559468c6e0a25bddc2e
Qmax/QUTE
/DMM/DMMControlLibraryHY3131/debug/moc_qcustomplot.cpp
C++
cpp
145,860
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'qcustomplot.h' ** ** Created: Mon Sep 8 16:46:16 2014 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.1) ** ** WARNING! All changes made in this file will be lost! ************************...
301890727ae7b2a041780f9ec042d52bb7cad1a5
7468faea68ca050a51974dbc3a0379e43d85b7c6
AhmedKamal08/3D-Museum
/Scene.cpp
C++
cpp
17,768
no_license
#include <iostream> #include <cmath> #include <random> #include <fstream> #include <cstdlib> #include <sstream> #include <string> #define GLM_FORCE_RADIANS #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/matrix_inverse.hpp> #include "Scene.h" #include "PLYReader.h" #include<vector> #include "Mesh.h" Scene:...
7c4bdc2b074fcf01cd46f85cece084bfb8c73a85
8ccaa64e8ab142ff3be4f004fa47ee29969ac11d
thomasLeMeur/00-piscine-cpp
/rush00/PlayerShip.hpp
C++
hpp
1,250
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* PlayerShip.hpp :+: :+: :+: ...
1d0676071b48b1aac610851ee0c63b32394f081e
7db10d8a6187e52169e2e4bc4fee464e47013929
stlcours/karia2
/walksitewndex.cpp
C++
cpp
19,068
no_license
#include <QtCore> #include <QtGui> #include <QAction> #include <QToolBar> #include <QTreeView> #include <QGraphicsView> #include <QMainWindow> #include <QMenu> #include <QActionGroup> #include <QStatusBar> #include <QMessageBox> #include <QDialog> #include <QFileDialog> #include <QInputDialog> //#include <QUrlInfo> #...
826442524950723bfea13158eca401d6e446698c
434f964daaa2ffe1a08e6178eac06dc13d6b7e33
OperDoc/Problems
/trains/#1/D.cpp
C++
cpp
325
no_license
#include <iostream> #include <vector> using namespace std; int main() { int T; cin >> T; for(int t = 0; t < T; t++) { int n, a, cnt = 0; cin >> n; for(int i = 0; i < n; i++) { cin >> a; cnt += (a != 0); } cout << cnt << '\n'; } return...
acc0664dde8e56d065811e7a8a8c9d9c910208e8
32ed0285337fb9f8e3ffe70e63b5a5c8c2123ade
wmjtxt/PAT
/Basic/patB1030.完美数列(25).cpp
C++
cpp
935
no_license
/// /// @file :patB1030.cc /// @author :wmjtxt(972213032@qq.com) /// @date :2018-04-18 03:31:03(NewYork time) /// @quote : /// #include <stdio.h> #include <algorithm> using namespace std; int main() { int n; double p; while(scanf("%d%lf",&n,&p) != EOF){ double a[n]; int i, ...
1462f17af4e2238fb8cee9c829410d5ebcafe35b
af58c1f8c20b5e746e8386066f3b5959928f244d
maldewar/calaveras
/jni/src/Renderer/LayeredGraphicRenderer.cpp
C++
cpp
4,197
no_license
#include "LayeredGraphicRenderer.h" #include "../Util/CMath.h" #include "../Util/RendererUtil.h" #include "../Model/AreaNode.h" #include "../Util/Log.h" LayeredGraphicRenderer::LayeredGraphicRenderer(){ m_renderer = NULL; m_scene_height = 0.0f; }; LayeredGraphicRenderer::~LayeredGraphicRenderer() { }; void ...
772da8424151574b99374259b6a40cbf8703b503
72e88bc59467ef3e0d4a9af4056fa8c23877e15c
TencentCloud/tencentcloud-sdk-cpp
/tcss/src/v20201101/model/NetworkAuditRecord.cpp
C++
cpp
11,098
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
3e726d9da70f80f618c57e544bbb9ac087fd6b1b
1258c43449ce0931b703ef32065b0cf8f3108077
TheCoderRaman/ny
/include/ny/winapi/windows.hpp
C++
hpp
406
permissive
// Copyright (c) 2015-2018 nyorain // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt #pragma once #define UNICODE #include <windows.h> #include <winuser.h> #include <windowsx.h> // undefine the shittiest macros // holy fuck...
3117a272cccb439b41fa4ba0afbc1b588703cc6d
88639f857f978dce4d2e9f8a2f903cf29f8ec3ce
kyx0r/FA_Patcher
/boost_lib/boost/hof/match.hpp
C++
hpp
3,266
permissive
/*============================================================================= Copyright (c) 2012 Paul Fultz II match.h 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) ====================================...
7c3af553a0d1840e1c6297965ff8513c345711c2
d947c72286ca743eee8e049138578f71051c8e83
jihoonwang98/BOJ
/1991 트리 순회.cpp
C++
cpp
1,442
no_license
#include <iostream> #include <string> #include <cstring> #include <vector> #include <sstream> #include <list> #include <queue> #include <stack> #include <deque> #include <utility> #include <algorithm> #include <cmath> #define MAX_V 100000 #define MOD 1000000009 const long long int LINF = (unsigned long long int)(-1) >...
96f52bac0f83a5c343b0d29a5cca0cf13c2a9ec3
753cbe5a781b8b03b3786846fea65294ebcf221d
KarlaSalamun/ECF
/ECF/StatCalc.cpp
C++
cpp
6,031
permissive
#include "ECF_base.h" #include "ECF_macro.h" #include <cmath> StatCalc::StatCalc() { statNo = 0; statsFileName_ = ""; } void StatCalc::registerParameters(StateP state) { state->getRegistry()->registerEntry("stats.file", (voidP) (new std::string("")), ECF::STRING); } bool StatCalc::initialize...
0a5ad077acae83e6f9a649de37260abd4388a30c
52448c00e88d45a112780cac2d6ba8f8e18ea45f
dmellosanjay/runtime
/backends/common/lib/ops/tf/metadata_functions.cc
C++
cc
21,324
permissive
// Copyright 2020 The TensorFlow Runtime 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 ...
b8c5ebd8c9d1f8b6968d9cd73a6a2fac293aa4e4
9a1044ce143c6627008b3a12c64ca7bcc3dad5cc
fedepad/conduit
/src/libs/conduit/Utils.cpp
C++
cpp
15,105
permissive
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Copyright (c) 2014-2015, Lawrence Livermore National Security, LLC. // // Produced at the Lawrence Livermore National Laboratory // // LLNL-CODE-666778 // // All rights reserved. // // This file is part of Conduit. // // For detail...
66fc052e9e9c68daa17b02d231748dd97f983fb1
0a8a4cc6380d6ca23e4c0aa9bdad64644a50c957
strigazi/athena
/Trigger/TrigT1/TrigT1EventAthenaPool/src/CMXRoICnv.cxx
C++
cxx
1,283
permissive
/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** * @file CMXRoICnv.cxx * @brief Generated implementation file which includes header files needed by CMXRoICnv * @author RD Schaffer <R.D.Schaffer@cern.ch> */ #include "CMXRoICnv.h" using namespace LVL1; //createPersistent CMXR...
7acf39b1dba8354aebd73917ab448b7841e8aad6
591164ac2f4ecb807f84ef0ab40b1312dd1d79da
ajchili/coursework
/cs_230/Project 9/Project 9/main.cpp
C++
cpp
999
no_license
#include <iostream> using namespace std; int getPosition(long value) { long previousValue = 0; long currentValue = 1; int position = 2; while (currentValue < value) { long tempValue = currentValue; currentValue += previousValue; previousValue = tempValue; position+...
e130769f18574113640b93affe9e9ef69c097d2a
d9cbed9ba463162badaa16fe47cf59714241fa89
mysterymagination/DungeonLib
/DungeonLib/src/cresco.ai.dungeonlib.data/env/DungeonNode.cpp
C++
cpp
264
permissive
/* * DungeonNode.cpp * * Created on: Jun 16, 2013 * Author: CresCoJeff */ /* #include "DungeonNode.h" DungeonNode::DungeonNode() { // TODO Auto-generated constructor stub } DungeonNode::~DungeonNode() { // TODO Auto-generated destructor stub } */
d499ce0ca15ed9cd879bb4548d215c29ee919ec7
e54cfde9033def8ed637ed8c1cd9206b313c4b82
strimbob/pixelCrowd
/src/main.cpp
C++
cpp
350
no_license
#include "ofMain.h" #include "testApp.h" //======================================================================== int main( ){ ofSetupOpenGL(500,768, OF_WINDOW); // <-------- setup the GL context // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN // pass in width and height too: ...
26e785e2b10df7b7582424bbe965479cb5cb7606
a235c0ec06211440b9e35489e701942b1026af54
Platin21/TestLib
/StringTest/pb_memmory.cpp
C++
cpp
4,239
no_license
#include "pb_memmory.hpp" namespace PB::RAM { #ifdef __WINDOWS__ //#FUNC //#INF Zeros the heap memmory out //#PARAM i64 : size , 17 , The Size in bytes that should be allocted on the heap //#RET Ptr : A pointer to the allocated heap //#SCOPE PB::RAM ptr_Void allocte_zero(i64 size) { ret HeapAlloc(GetProc...
f512a68a3c128812abf21afccd84c08c303fb46d
bd19b66544dc7e2e94042e99187eab13af1b9e1e
baseboxorg/jadecoin
/src/db.cpp
C++
cpp
36,844
permissive
// Copyright (c) 2009-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 "db.h" #include "net.h" #include "checkpoints.h" #include "util.h" #inclu...
4a6e7335b9dde3d5cc188af2353d4e94334584cf
d84e9956ba2fd70f3f3c8700fe21d6c3a13c16cf
Yanhejingyu/godot
/scene/gui/text_edit.cpp
C++
cpp
68,818
permissive
/*************************************************************************/ /* text_edit.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
979f5ab9af5b8c8684d560f40299bbe59ba67e86
0542587d18b314b16c8082fc343b9893fc00c371
s-e-r-g/cpp-examples
/interview-tasks/3-choise-distribution.cpp
C++
cpp
732
no_license
#include <random> #include <iostream> bool chooseAndSwap() { int prize = (std::rand() % 3000) / 1000; int my = (std::rand() % 3000) / 1000; // Exclude another empty int excluded = 0; for (; excluded < 3; ++excluded) { if (excluded != prize && excluded != my) { break; ...
d6a610e629b2bca68f7bf4731fa28cb9867d24ff
11286c9e5314df110c5429d4a2e1b231c5a3fd2b
rdrdrdrd95/OpenLoco
/src/OpenLoco/Windows/StationWindow.cpp
C++
cpp
37,485
permissive
#include "../CompanyManager.h" #include "../Config.h" #include "../Entities/EntityManager.h" #include "../GameCommands/GameCommands.h" #include "../Graphics/Colour.h" #include "../Graphics/Gfx.h" #include "../Graphics/ImageIds.h" #include "../Input.h" #include "../Interop/Interop.hpp" #include "../Localisation/FormatAr...
bc0222c6cd6a44a73e5d587dd2a3212198b78fb2
bd8dd954b186b815d34cf88b43122dc74138ae60
Girl-Code-It/Leetcode-Challenge
/Vaishali Thakur/July/10. Flatten Multilevel DLL.cpp
C++
cpp
649
no_license
class Solution { public: Node* flatten(Node* head) { if(!head) return head; Node* curr = head; while(curr && !curr->child){ curr = curr->next; } Node* currNext; if(curr){ currNext = curr->next; curr->next = flat...
5dab3a28fdb44896831bff7e0e062108cec9103b
a35c36cf03fb5743e36150346409f40f196e80cb
sudopluto/kattis-practice
/comp-prog-club/spring-2020/practice-1/cursethedarkness/main.cpp
C++
cpp
966
permissive
#include <iostream> #include <cmath> double abs(double v) { return (v < 0) ? -1 * v : v; } int main() { int cases; std::cin >> cases; for (int i = 0; i < cases; ++i) { double b_x; double b_y; std::cin >> b_x >> b_y; double candles; std::cin >> candles; ...
c8c4ad099c622cb0a18a3eee57a0dfccfe739564
b4a1b029728e370215642b92c818e779980d9563
dpclove/newclient
/frameworks/runtime-src/Classes/logic/KBRPixelReadNode.cpp
C++
cpp
981
no_license
// // KBRPixelReadNode.cpp // qpgame // // Created by apple on 14-8-25. // // #include "KBRPixelReadNode.h" KBRPixelReadNode * KBRPixelReadNode::create(const cocos2d::Vec2& readPoint){ KBRPixelReadNode * ret = (KBRPixelReadNode *)Node::create(); ret->_readPoint = readPoint; for(int i=0;i<4;i++){ ...
f22c7f1a18792b4e1deae4ba2881ea963a92a7ba
21afdb245ae5483d96f7a2dc3d05539aec9335af
cjx132/algorithm_learn
/递归与分治/二分搜索_下标和对应值相等.cpp
C++
cpp
572
no_license
#include<iostream> using namespace std; int search_tag(int a[], int l) { int left = 0, right = l - 1; while (left <= right) { int mid = (left + right) / 2; if (a[mid] == mid)return mid; else if (a[mid]>mid)right = mid - 1; else left = mid + 1; } return -1; } int main() { int a[100]; cout << "请输入数组长度:" ...
dfd5a08254e2539110c9998c4df589437afbe73c
b86e9c426a316827009c6f8e955b0bd85aa240ba
asraa/envoy
/test/common/http/http1/conn_pool_test.cc
C++
cc
44,199
permissive
#include <memory> #include <vector> #include "envoy/http/codec.h" #include "envoy/network/transport_socket.h" #include "common/buffer/buffer_impl.h" #include "common/event/dispatcher_impl.h" #include "common/http/codec_client.h" #include "common/http/http1/conn_pool.h" #include "common/http/utility.h" #include "commo...
6231243f43917964254a7df9f33a0dfa28a3bffd
4d8ba6d23ec958a9456466230bfdae2e45b8f691
stardog-union/boost
/libs/numeric/odeint/test_external/nt2/algebra_dispatcher.cpp
C++
cpp
2,564
permissive
//============================================================================== // Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI // Copyright 2014 NumScale SAS // // Distributed under the Boost Software License, Version 1.0. // See accompanying fi...
504cc264710f3c82d10d07ac6956d9288381f8ad
35c943b91ac4d38841b2c62cc01c41c8649353df
yangy30685/cpp
/demo_2/catch_demo.cpp
C++
cpp
637
permissive
#include<iostream> #include<cstdlib> double fuc(double x, double y) { if(y == 0) { throw y; } return x/y; } int main(int argc, char *argv[]) { double res; try ...
c9359675428f83df8d57e06760c06a55922878cf
e6791c76cf536d861da827f3a95c44013c377d9c
UCC-Programacion3-historico/ejercicios-2018-martin22ca
/U02_Listas/Ej-03/main.cpp
C++
cpp
517
permissive
#include <iostream> #include "../Lista/Lista.h" int main() { std::cout << "Ejercicio 01/03\n" << std::endl; int j = 0, res; Lista<int> l; srand(getpid()); for (int i = 0; i < 10; i++) l.insertarPrimero(rand() % 100); while (j < 10){ l.print(); cout << "El dato es: " << l...
f8253eb8d6f0f26ca3d6e9739f1cdcf04bb2fe5f
2c1f52dc4821f135e9e0ab569f7907d68c939e7f
DarthVader72/FestonCoin
/src/qt/walletframe.cpp
C++
cpp
7,041
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2018-2019 The FestonCoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/l...
e408bd8dd7ae61807dc0f79540d66733ee0fa21e
05848c9aac2df62cabfcc686d3472c6edca82984
JoeGilkey/flutter_audio_desktop
/audioplayer/audio.cpp
C++
cpp
1,095
permissive
/* http://github.com/alexmercerind/flutter_audio_desktop */ #include "audioplayer.hpp" namespace Audio { AudioPlayer* audioPlayer; void initPlayer(int debug) { audioPlayer = new AudioPlayer(static_cast<bool>(debug)); } void loadPlayer(const char* fileLocation) { audioPlayer->load(fil...
302031e9ebe8015346b71e549a6e79bd8b065fab
38bbe88a95ddacdfa79cb5ca8692a285abf41284
manlius/Network-Motif
/src/main.cpp
C++
cpp
11,627
no_license
#include <stdio.h> #include <stdlib.h> #include <map> #include <math.h> #include <graph.h> #include <getopt.h> #include <randomGenerator.h> #include <iostream> #define EPOC 10 //#define Debug using namespace std; void GEN ( int n, int k, int root, int level, int reminder, int m); void NEG ( int n, int k, int root, i...
4e96a91eb181ffb533fc13971d61913c196d2657
9778a081d8ae2626a5ff786424cd35f9dd49e434
adamrankin/ITK
/Examples/RegistrationITKv4/BSplineWarping2.cxx
C++
cxx
11,536
permissive
/*========================================================================= * * Copyright NumFOCUS * * 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.or...
b083157609abdbd2d147e4f91f9fea61125d4edb
319f1d2647c81160715395b9705e7ce35001d0b3
janekptacijarabaci/Pale-Moon
/netwerk/protocol/http/Http2Stream.cpp
C++
cpp
46,417
no_license
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set sw=2 ts=8 et tw=80 : */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */...
e648b388ccef2ba67d3e2042b1a77d7f5e17e211
e8eedb06a2da7ce9e0c6ce3e82ca9f7d5515dd7e
ilelann/legacy
/adobe_platform_libraries/windows/adobe/future/widgets/headers/platform_presets.hpp
C++
hpp
5,443
no_license
/* Copyright 2005-2007 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://stlab.adobe.com/licenses.html) */ /****************************************************************************************************/ #ifndef ADOBE_WIDGET_PRE...
173af6e8c4f79d45532af71889beb56dac19fb13
0bb2acb350fd57706d9311c3edf19a54324cac40
JackEdwards/Pazuzu
/GLEngine/MainLevel.cpp
C++
cpp
700
no_license
#include "MainLevel.hpp" MainLevel::MainLevel(std::string name) : Level(name) { } void MainLevel::Init() { CreateObject("Background", glm::vec2(0, 0), glm::vec2(800, 600), 0.0f); CreateObject("Player", glm::vec2(0, 0), glm::vec2(50, 50), 0.0f); std::shared_ptr<GameObject> background = GetObject("Background"); ba...
d2cb997c05b2854b23c4bb589fabe600e3baa6fa
8241063898d84ac4eacdd9701499e6c2ad609927
Reichard/deep_endoscopic_stereo
/TMI_disp_to_3d/tmi.hpp
C++
hpp
389
no_license
#ifndef TMI_H_ #define TMI_H_ #include <string> #include <PreprocessingFilter/PreprocessingFilter.h> class TMI { public: void setCalibration(std::string s); void setFileName(std::string s) { file_name = s; } void compute_3d_points(); private: std::string fil...
9f55cf781145bfe78efc36fc94016f412b3216a2
4969b3b39aa7e4f0bc84f783970191b659e06ac4
hannes-bartosik/py-orbit
/src/mpi/wrap_mpi_status.cc
C++
cc
4,107
permissive
/////////////////////////////////////////////////////////////////////////// // // INCLUDE FILES // /////////////////////////////////////////////////////////////////////////// #include "orbit_mpi.hh" //this header is from Python package #include "structmember.h" //c++ header for cerr and cout #include <iostream> #inc...
ce343ebd1108a4b12ec47bb02bc6b2e1c82e3069
af209c7f048922d7f9824b25019b22537cdde8ef
froexilize/jancy
/src/jnc_ct/jnc_ct_TypeMgr/jnc_ct_BitFieldType.cpp
C++
cpp
1,666
permissive
//.............................................................................. // // This file is part of the Jancy toolkit. // // Jancy is distributed under the MIT license. // For details see accompanying license.txt file, // the public copy of which is also available at: // http://tibbo.com/downloads/archive/...
4c25cacb2845c92129d2d3dbf412f375c163f6d0
446eb4e7a7e1f6f6d8d4cf841c74e602b1d3e7d0
LeeLinSCUT/C-11_Practice
/src/9_26.cpp
C++
cpp
594
no_license
#include<iostream> #include<list> #include<vector> int main() { int ia[]={0,1,1,2,3,5,8,13,21,55,89}; std::vector<int> i_v(ia,ia+11); std::list<int> i_l(ia,ia+11); for(std::vector<int>::iterator v_b = i_v.begin(); v_b != i_v.end(); ) { (*v_b)% 2==0 ? v_b = i_v.erase(v_b):v_b++; } fo...
b788faa1d7cb0d3374c5ab19cffe9f82b228fe7f
a3963326898fa2eb483ace88c1cb6c884edac3ab
ENgineE777/Controls2
/controlsmenu.cpp
C++
cpp
3,496
no_license
#include "controlsmenu.h" #include "Support/json/JSONWriter.h" extern vector<Controls::AliasMappig> controlsMapping; void ControlsMenu::Work(float dt) { if (sel_mapping == -1) { Menu::Work(dt); if (controls.GetAliasState(alias_menu_act)) { sel_mapping = items[sel_elemenet].data; if (sel_mapping != -1...
a1032781778b3da5239c3d3ce67fb91126c9718d
7a8986e3e6c8307ffedda514d7db3fbeede69d77
Aleshkev/algoritmika
/archive/3/mlodnik.cpp
C++
cpp
1,663
permissive
#include <bits/stdc++.h> using namespace std; typedef int I; struct Pt { I x, y; I i; }; bool by_xy(Pt l, Pt r) { return (l.x == r.x ? l.y < r.y : l.x < r.x); } bool by_i(Pt l, Pt r) { return l.i < r.i; } I cross(Pt o, Pt a, Pt b) { return (a.x - o.x) * (b.y - o.y) - (a.y - o.y) * (b.x - o.x); } ...
a28f963a63e55bbcc7cc05903109261dc1f1792a
de4d2a34e89f435d34f4b63636617dfeb45c2e56
mrajashree/Practice-codes
/min_stack.cpp
C++
cpp
1,055
no_license
#include<stdlib.h> #include<string.h> #include<iostream> using namespace std; int m = 100000000; int prev_m; typedef struct stack { int data; int mini; struct stack *next; }STACK; STACK *top=NULL; void push(int data) { STACK *temp = (STACK*)malloc(sizeof(STACK)); temp->data = data; temp->...
0a8da6911be357097493ea643cf3b856a651c4be
f627fd52868f74f100315fb73fb5c8ac83dd4bf5
morffiy/filament
/filament/src/driver/vulkan/VulkanDriver.cpp
C++
cpp
38,854
permissive
/* * Copyright (C) 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 app...
7ce885e6b6116524056d89386fa5d410f997f148
a3807a10c5b3210b08150d9412242575b7cdc3bd
Adsew/ClassStuff
/PROG54310GraphAnim/JamesMattGraphicsFinal/graphics.project/RenderManager.cpp
C++
cpp
4,283
no_license
#include "Core.h" #include "RenderManager.h" #include "Light.h" #include "DirectionalLight.h" #include "SpotLight.h" #include "Window.h" #include "IRenderable.h" #include "ShaderProgram.h" RenderManager::RenderManager() : IManager(TO_STRING(RenderManager)), m_window(std::make_unique<Window>()) { } RenderManager...
4730a157c569269c4894de25a7e4424accb48b58
29465c2e066ca72691b720423f6dd2ea06a8ed57
Tencent/mars
/mars/boost/thread/win32/recursive_mutex.hpp
C++
hpp
2,002
permissive
#ifndef BOOST_RECURSIVE_MUTEX_WIN32_HPP #define BOOST_RECURSIVE_MUTEX_WIN32_HPP // recursive_mutex.hpp // // (C) Copyright 2006-7 Anthony Williams // // 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) #inclu...
85487fe0ad84805f097bbc431006ee2651cf138f
75f7486a50fc649d8e64ba2f2d0c449eade7975d
xrLil-Batya/gitxray
/net.ssa/Editors/!old/ShaderEditor/Engine/GameMtlLib.cpp
C++
cpp
4,501
no_license
//--------------------------------------------------------------------------- #include "stdafx.h" #pragma hdrstop #include "GameMtlLib.h" CGameMtlLibrary GMLib; void SGameMtl::Load(IReader& fs) { R_ASSERT(fs.find_chunk(GAMEMTL_CHUNK_MAIN)); ID = fs.r_u32(); fs.r_stringZ (m_Name); if (...
75b6d51fe7d6d0787ade3cae50f2ead2f300dfa9
2e15438771a75573f6af5c84c15d4d2410b2727e
nemtsov/fish-shell
/highlight.cpp
C++
cpp
52,328
no_license
/** \file highlight.c Functions for syntax highlighting */ #include "config.h" #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> #include <unistd.h> #include <errno.h> #include <wchar.h> #include <wctype.h> #include <termios.h> #include <signal.h> #include "fallback.h" #include "util.h" #include "wutil....
78a12cec0345c674418636803cb37666f3035c3c
f8c7adf0a127b16d273dc72792f7fe75fee07ba6
aweers/tensorflow
/tensorflow/contrib/mpi_collectives/ring.cu.cc
C++
cc
4,335
permissive
/* Copyright 2016 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...
66cbd7d673b597a946f81832d3d148a98b117b09
acbca8db6b3e859ce90ae3b8b21fa1d2ee1d526d
trigrass2/buildroot-ltc
/system/hlibispv2500/DDKSource/ISP_Control/ISPC_lib/src/Controls/ControlAWB.cpp
C++
cpp
28,391
no_license
/** ******************************************************************************* @file ControlAWB.cpp @brief ISPC::ControlAWB implementation @copyright Imagination Technologies Ltd. All Rights Reserved. @license Strictly Confidential. No part of this software, either material or conceptual may be copied or distri...
3066bed81172a7023962544ebffeee47c2151acb
050d052012ee37a0237209c55aee1fd7584342e1
Wen0313/Wen0313
/Project5_KMyLogHandler/widget.cpp
C++
cpp
1,391
no_license
#include "widget.h" #include "ui_widget.h" Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); ui->textEdit->setReadOnly(true); setFixedSize(this->width(),this->height()); mylog.getFileWatcher()->addPath("C:\\Users\\3G7K8F3\\Desktop\\kscampus\\myqt\\Proje...
7e81fb7ec2f802567881a61eb06afb37615a4921
4679479dd2b1f4500e719bc35ce49c724c37e4e6
ryppl/boost-history
/devel/boost/xpressive/xpressive_fwd.hpp
C++
hpp
6,531
permissive
/////////////////////////////////////////////////////////////////////////////// /// \file xpressive_fwd.hpp /// Forward declarations for all of xpressive's public data types. // // Copyright 2004 Eric Niebler. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or ...
9988a9c154b746678b999389c82b42968f04ffd3
f62a1198771c3667eea79cfc1d37756116abb56e
vmilkovic/algoritmi_i_strukture_podataka
/vjezbe5/cekaonica.cpp
C++
cpp
1,305
permissive
#include <iostream> #include <list> #include <string> using std::list; using std::string; struct Osoba { int redniBroj; string ime; string prezime; }; class Cekaonica { public: Cekaonica() { trenutni = 1; } void dodajNaCekanje(string ime, string prezime) { osobe.push_back({ tr...
361b40dc355eb35d8446332ee71690504c1e261e
6e618e99f1b1a31b1b4d6726e7df5be593d0bd9c
alistair23/opentitan
/sw/device/silicon_creator/lib/drivers/uart_unittest.cc
C++
cc
3,881
permissive
// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #include "sw/device/silicon_creator/lib/drivers/uart.h" #include "gtest/gtest.h" #include "sw/device/lib/base/mmio.h" #include "sw/device/silicon_creator/lib/base/mock_...
d06cd1c964cd1749370134051cb087a1b1e7645f
25ea645d7975cbd1e8d09b3af7e4824c908b2444
ClariiD/ParticleImages
/ParticleImages/src/main.cpp
C++
cpp
264
no_license
#include "ofMain.h" #include "testApp.h" #include "ofAppGlutWindow.h" //======================================================================== int main( ){ ofAppGlutWindow window; ofSetupOpenGL(&window, 1024,768, OF_WINDOW); ofRunApp( new testApp()); }
65c04ab2b470a12d9a61283afde49d45a0c4dd66
cb46d928db01d9c62e47aa577010d452d683be69
gpeyre/2017-EJAM-quantum-ot
/code/aux/svbrdf/twoshot_renderer/framework/base/String.hpp
C++
hpp
7,866
no_license
/* * Copyright (c) 2009-2011, NVIDIA Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * ...
9f64547ce2e44344923f5f2bb63235cdd150d87e
b6b1a20fe1d70adae364390e69ceb464b3a51783
windystrife/UnrealEngine_NVIDIAGameWorks
/Engine/Source/ThirdParty/PhysX/APEX_1.4/module/clothing_legacy/src/autogen/ClothingMaterialLibraryParameters_0p6.cpp
C++
cpp
42,977
permissive
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
d1dbfb00ffee1166cc62760fc02b92a4323899ae
70eab3461ae9465838635d0dfc823a78154aa26c
alpha7happy/kaggle-keyword
/Code/cxz/NB.cpp
C++
cpp
2,813
no_license
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <sstream> #include <cctype> using namespace std; #define lowbit(x) ((x)&(-(x))) #define sqr(x)...
f2f175f30ef8a471b51f980d93a6207dd0ba35dc
06fd8785141122ac4cea16c8d5093a0909f75afc
jiaojiaojing84/RemlTMB
/RemlTMB/examples/linreg.cpp
C++
cpp
307
no_license
// Simple linear regression. #include <TMB.hpp> template<class Type> Type objective_function<Type>::operator() () { DATA_VECTOR(Y); DATA_VECTOR(X); PARAMETER(logSigma); PARAMETER(a); PARAMETER(b); Type nll = -sum(dnorm(Y, a+b*X, exp(logSigma), true)); return nll; }
7211da78b1ae42eb1f2782dc0da2a22b69ce548a
54ee0d738e6a5e997fbcebc0538e5578db9d474b
Kuovane/creator_to_cocos2dx
/HelloWorld/frameworks/cocos2d-x/cocos/editor-support/spine/IkConstraintData.cpp
C++
cpp
3,198
permissive
/****************************************************************************** * Spine Runtimes License Agreement * Last updated January 1, 2020. Replaces all prior versions. * * Copyright (c) 2013-2020, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * der...
acce0f83c2a9c890b917e9cdf52f82f793c9b569
058d02fbb13394f68746b88f9bfa5d411be0b46b
mcobzarenco/unet
/src/external/stan/agrad/fwd/functions/pow.hpp
C++
hpp
1,564
no_license
#ifndef STAN__AGRAD__FWD__FUNCTIONS__POW_HPP #define STAN__AGRAD__FWD__FUNCTIONS__POW_HPP #include <stan/agrad/fwd/fvar.hpp> #include <stan/meta/traits.hpp> #include <stan/agrad/fwd/functions/inv.hpp> #include <stan/agrad/fwd/functions/inv_sqrt.hpp> #include <stan/agrad/fwd/functions/inv_square.hpp> namespace stan { ...
f4b272838d42b31b0ae70b43b8e74d3502de02e9
f49ba7e9415d8aa2113823d27dda2bbbab528f0a
ccdxc/logSurvey
/data/crawl/git/new_hunk_7231.cpp
C++
cpp
321
no_license
} } /* * xwrite() is the same a write(), but it automatically restarts write() * operations with a recoverable error (EAGAIN and EINTR). xwrite() DOES NOT * GUARANTEE that "len" bytes is written even if the operation is successful. */ static inline ssize_t xwrite(int fd, const void *buf, size_t len) { ssize_t nr...
1260ee322fdf909af1630cd25ef0f4346f1ef32c
82b956a4b223d41e6e2508f75b9dd921ecf0800f
whit2333/bubble_chamber
/exampleB1.cc
C++
cc
3,291
no_license
#include "EBLsim.h" #include "B1DetectorConstruction.hh" #include "B1ActionInitialization.hh" #include "G4SystemOfUnits.hh" #ifdef G4MULTITHREADED #include "G4MTRunManager.hh" #else #include "G4RunManager.hh" #endif #include "G4UImanager.hh" #include "QBBC.hh" #include "G4UIQt.hh" #include <qmainwindow.h> #include "...
1d6049662fcc0332986ddc0f6b3bb1d7a0a49c07
611be9866496e9a6369eb26998c90408a921607b
VictorLamarca/CP---Algorithms
/dataStructures/segTree/different_segs/seg_seto_range_cor.cpp
C++
cpp
4,120
no_license
#include <bits/stdc++.h> using namespace std; #define fr(i,n) for(int i=0;i<n;i++) typedef long long ll; /* Problema com diferentes tipos de coisa na lazy ***lazy eh setado para um nó quando ele afeta o range inteiro! (lazy nao muda soh alguns dos subfilhos do no, muda todos!) ***Tinha dado TLE...
ae961354dd8514cfa6c194d340548f5d8b64de2e
cba566b3a1fbeef213e88a00075838e889952571
ondralukes/OpenGLCraft
/src/gui/gui.cpp
C++
cpp
7,730
permissive
#include "gui.hpp" int GUI::wWidth; int GUI::wHeight; GLuint GUI::vertexBuffer; GLuint GUI::uvBuffer; GLuint GUI::textureID; GLuint GUI::selectedTextureID; GLuint GUI::mvpID; GLuint GUI::shaderID; std::vector<ItemStack *> GUI::blocks; GUIImage * GUI::crosshair; TextManager * GUI::textManager; int GUI::selectedItemInde...
23663c95951e81893ee75781eb6a35d1ca9556e0
07ce6f1cf295a6b8e02ad33647c703f6be9447b0
Computarian/OOPL_Project1
/OOPL_Project1/Room.cpp
C++
cpp
2,480
no_license
#include "Room.hpp" Room::Room(){ this->north_ = nullptr; this->south_ = nullptr; this->east_ = nullptr; this->west_ = nullptr; this->story_ = ""; } void Room::setRoomDoors(std::vector<Room*> doors) { this->north_ = doors[0]; this->south_ = doors[1]; this->east_ = doors[2]; this->west_ = doors[3]; } voi...
7b876e09718f3822ae947bb490daffd0c0d7824a
d6d6ba97d0406239cb7874095da26a4a28e62c24
noticeable/clockwork
/soda_codes/multi_kernel_design/soda_code/soda_multi_kernel_design_host.cpp
C++
cpp
4,996
no_license
#include "xcl2.hpp" #include <algorithm> #include <fstream> #include <vector> #include <cstdlib> int main(int argc, char **argv) { srand(234); if (argc != 2) { std::cout << "Usage: " << argv[0] << " <XCLBIN File>" << std::endl; return EXIT_FAILURE; } std::string binaryFile = argv[1]; int num_epochs...
fec8ee53a51bef440c39c42fe59b8fb9e6508c4a
3715b22c5ee206d39dc6d795636b19606d4b3388
joshuayan/DearPyGui
/DearPyGui/src/core/AppItems/custom/mvKnob.cpp
C++
cpp
3,413
permissive
#include "mvKnob.h" #include "mvKnobCustom.h" #include "mvPythonExceptions.h" namespace Marvel { void mvKnobFloat::InsertParser(std::map<std::string, mvPythonParser>* parsers) { mvPythonParser parser(mvPyDataType::UUID, "Adds a knob that rotates based of change in x mouse position.", { "Widgets" }); ...
56fcb0fb2694c769040365fd8f1d9c9e9b2f4320
297e33e5db71616d71d334724d844dfb12235bd0
wouf/cmssw
/FWCore/RootAutoLibraryLoader/test/stdnamespaceadder_t.cppunit.cpp
C++
cpp
1,714
permissive
/*---------------------------------------------------------------------- Test program for edm::TypeIDBase class. Changed by Viji on 29-06-2005 ----------------------------------------------------------------------*/ #include <cassert> #include <iostream> #include <string> #include <cppunit/extensions/HelperMacros.h...
bfe9a618197a2075797b3365b6418f6de516b1f3
beabb1112d765a6760e9d150650246e0d6c2c850
arnab000/Problem-Solving
/atcoder/abc170/D.cpp
C++
cpp
3,213
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long #define f first #define s second #define Fast ios_base::sync_with_stdio(false);cin.tie(NULL); #define fo(a,b,c) for(int i=a;i<b;i+=c) typedef pair<ll , pair<ll, ll> > pi; int pow(int x,int y){ int res=1; while(y){ if(y&1) res...
b39bddd9fb03275411c9f0505c0ee8b9bb438180
cbffb09812ce4614804bbd2898b06e56fbcd6b6d
GSIL-Monitor/platform.framework.web.chromium-efl
/tizen_src/chromium_impl/components/spp_client/spp_client_registration.cc
C++
cc
5,198
permissive
// Copyright 2016 Samsung Electronics. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/spp_client/spp_client_registration.h" #include "base/bind.h" #include "base/location.h" #include "base/logging.h" #include "base/memo...
72c969632b0819500f9c09ed01b695c397d07862
598f87332553d92011b02652966bdac90454e976
Md-Sabbir-Ahmed/52_Problems----Tamim_Shahriar_Subeen_Book
/problem03.cpp
C++
cpp
211
no_license
#include<iostream> using namespace std; int main() { int c=0,i,n; for(i=1000;i>0;i--) { cout<<i<<"\t"; c=c+1; if (c%5==0) { cout<<"\n"; } } }
915e814f6460071f0a0c75f15dfbbfa340ca4ad9
58806dddb097185fe19f5a41b86e42bc7e9c0d13
Sitispeaks/turicreate
/src/external/boost/boost_1_68_0/boost/fusion/container/vector/detail/advance_impl.hpp
C++
hpp
1,287
permissive
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman 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) =========================================...
9daacdd5629a43e0fd5b442785a3bbc1626b3243
f1b178253c861e9ac3e8d633c318b74366a3d39b
amitray1608/PCcodes
/codechef/CCDSAP/PlanetCycles.cpp
C++
cpp
822
no_license
//“Make it work, make it right, make it fast.” – Kent Beck #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double dd; const int siz = 1e6 + 5; const int MOD = 1e9 + 7; #define endl '\n' #define deb(x) cout << #x << " = " << x << endl; void solve(){ int n, q; cin >> n >> q; vector<...
1a52192791ac9348902caebcba8c6dffb037641a
921fd086fb95f0bd78be335a8a2c181c0a6be548
HelioStrike/AtCoder
/dpr.cpp
C++
cpp
740
no_license
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define ll long long #define M 1000000007 #define N 51 using namespace std; ll n,k,ans,a[N][N],b[N][N],c[N][N]; void mul(ll m1[N][N],ll m2[N][N],ll t[N][N]) { memset(t,0,N*N*sizeof(ll)); FOR(i,0,n) FOR(j,0,n) FOR(k,0,n) t[i][j]=(t[i][j...
fcd8f0cf35947b4466f712ab6a84a66ab9409706
619675460b06e465c4619f7cb4eb0894fb600784
ee08b397/LintCode
/C++/maximum-gap.cpp
C++
cpp
1,595
no_license
// Time: O(n) // Space: O(n) class Solution { public: /** * @param nums: a vector of integers * @return: the maximum difference */ int maximumGap(vector<int> nums) { if (nums.size() < 2) { return 0; } // Init bucket. int max_val = *max_element(nums.c...
c3e4033b62403de83ade1de26fca1f231f30574d
64b247edbc6928da08bc06f85d99da94aed0c957
nikcherr/QTcpConnection
/QClient/client.cpp
C++
cpp
1,480
no_license
#include "client.h" Client::Client(QObject *parent) { socket = new QTcpSocket(this); } PortValid Client::setPortNumber(const std::__cxx11::string &port) { int socketPort = 0; for(auto item : port){ if(isdigit(item)){ socketPort *= 10; socketPort += item - '0'; } ...
1255f7bf670ef32b5e18b02e5aebb8e5bbd85064
a5bc3655105ebae26a0e278711380a821973b4ee
eclab/gizmo
/Gizmo/Storage.cpp
C++
cpp
2,005
permissive
////// Copyright 2016 by Sean Luke ////// Licensed under the Apache 2.0 License #include "All.h" /// LOAD DATA /// Loads data from Flash starting at the given position and of the given length. void loadData(char* data, uint16_t position, uint16_t length) { for (uint16_t i = 0; i < length; i++) *(data ...
1094a6895d99ef593cbebe0ba5482fbbf6698b85
d315452cf5f2da79da2958d4e78588e53a232ca8
Abhilashkumarsingh/CASPER-GHOST-ANIME-CGV-PROJECT
/main.cpp
C++
cpp
40,549
no_license
#include<math.h> #include<windows.h> #ifdef __APPLE__ #else #include <GL/glut.h> #endif #include <stdlib.h> #include <cstring> #include <iostream> #include<dos.h> //for delay bool text1_visibility=true; //bool music_play=true; int flag=0; int counter_music=0; float xx=00.0,yy=0,state=1,xxt=0,yyt=0,statel...
bd0a1555323e14a0901d318d772ea271deb4672a
66a13bffd534203ab2d72b4f0e6b5b287fdaa1c3
tyzljf/MicroService_Auth
/src/libcurl_get_file/DCurlHttp/DCurlHttp.cpp
C++
cpp
1,976
no_license
#include "DCurlHttp.h" #include "CThread.h" DCurlHttp::DCurlHttp() { } DCurlHttp::~DCurlHttp() { } DCURL_RETURN_E DCurlHttp::DownloadFile(NodeParam* param) { CURL* curl = initHttpCurl(param); if (NULL != curl) { std::cout << "init http curl failed." << std::endl; return DCURL_INIT_CURL_FA...
483b24654a8e4654e26cbca081205e43be41e90d
63056d3a1bfea4cda6bcfee2739d97c9e4b45c53
nidamon/CS202
/Labs/CS202Lab9OverloadedArithmeticOperators/complex.hpp
C++
hpp
451
no_license
/*complex.hpp Nathan Damon CS 202 2/18/2021 This is the header file for the complex class */ #ifndef COMPLEX_HPP #define COMPLEX_HPP #include <iostream> class Complex { friend std::ostream& operator<<(std::ostream&, const Complex& rhs); friend Complex operator+(const Complex& lhs, const Complex& rhs); public: Co...
bc132082513467261e261153d8fb583e0b1d6522
a5cd4ffd099bd45969127283561db9bcdf78a49a
dreamtrue/TWS_SAMPLE
/twstest/DlgSmartComboRoutingParams.cpp
C++
cpp
3,635
no_license
/* Copyright (C) 2013 Interactive Brokers LLC. All rights reserved. This code is subject to the terms * and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable. */ #include "stdafx.h" #include "DlgSmartComboRoutingParams.h" CDlgSmartComboRoutingParams::CDlgSmartCombo...
f14d9c9f9d894386f092c2c3e2d0281beb1ea26a
ac38ba85f6dac04f9f8172dbb65f7bcffe348c6d
filija/podnikatelkakillers
/tests/testyTadeáš/test_faktorial_iterativne.cpp
C++
cpp
367
no_license
/* Program 1: Vypocet faktorialu (iterativne) */ int main() { int a; int vysl; cout << "Zadejte cislo pro vypocet faktorialu: "; cin >> a; if (a < 0) // cin nacitani zaporneho cisla nemusi podporovat { cout << "Faktorial nelze spocitat!\n"; } else { vysl = 1; for (int foo; a > 0; a = a - 1) { vysl = vysl * a; } cout <<...
fe980eae2f21a48c3e7ee89facbf0eeb599b8271
c856f465fd052ec44dccf360221d1f97c1ce3caf
herenvarno/gsbn
/include/gsbn/Database.hpp
C++
hpp
7,647
permissive
#ifndef __GSBN_DATABASE_HPP__ #define __GSBN_DATABASE_HPP__ #include "gsbn/SyncVector.hpp" namespace gsbn{ /** * \class Database * \brief The Database class manage all the SyncVector need by the program. It organize * these vectors by a ordered map (std::map). * */ class Database{ public: /** * \fn Databa...
00a169dbb3f7e75ed35272ae0cd759d40d6687eb
3483a0a12f8e2fe403f108378958080d58a11848
liuwake/CppPractice
/HalconCpp/HalSubFunc/HalSubFunc/HalSubFunc.cpp
C++
cpp
1,198
no_license
// HalSubFunc.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "Hal.h" #include "HalconCpp.h" using namespace HalconCpp; using namespace std; #include <string> #include <iostream> int main() { string path; string str; std::cout << "OCR:\n"; path = "C:/Users/i...
2b2a2927ac671aea1fde729333fa06586ca8cb75
d0c849d08a394d6484492183538d19e0bb850fcb
Mashiatmm/Offlines
/2-2/Data Structure and Algorithms Part 2/Offline 7/offline7.cpp
C++
cpp
8,771
no_license
#include<iostream> #include<queue> #include<stack> #include<fstream> #include <sstream> using namespace std; ofstream out; class Node { public: int key; Node* child; Node *sibling; Node* parent; int degree; Node(int key) { this->key = key; parent = 0; sibling = 0...