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
7af7e3b6a3792e990f08d52cdb7d225e82c91c44
e8513e67af2a4f4b8c016b7cdc664391d62653d9
sungyoungPark/Programmers_Solution
/Programmers_Solution/main14.cpp
C++
cpp
1,063
no_license
// // main.cpp // helloCPP // // Created by 박성영 on 26/05/2020. // Copyright © 2020 박성영. All rights reserved. // #include <string> #include <vector> #include <iostream> using namespace std; string solution(int n) { string answer = ""; int input = n-1; // int arr[3] = {1,2,4}; while (true) { ...
91aae1f76feb11e1b0ce9f9873a05e28c0f5a45f
06a361846c8e23e99fd8307bbd9274c57831da93
rpmorton29/Systemsprog
/MortonP5/Controller.cpp
C++
cpp
1,544
no_license
// // Controller.cpp // P5 // // Created by Ryan Morton on 3/3/19. // Copyright © 2019 Ryan Morton. All rights reserved. // #include "Controller.hpp" Controller::Controller(int argc, char* const* argv){ p = Params(argc,argv); ck = p.dir; CheckDir(); dir = opendir(ck); CtDir = ck; ProccessD...
50884272389bb2d5d27b05f479607cebe5247297
15414c05f417bcb60fedc70802b5286a29ed700f
Ynjxsjmh/PracticeMakesPerfect
/LeetCode/p0322/Solution2.cpp
C++
cpp
997
no_license
/** * Description * * * Example * Input: * Output: * Explanation: * * @author Ynjxsjmh * @email ynjxsjmh@gmail.com * @since 2020-05-03 01:52 * @tag DP, knapsack * @repeat */ class Solution { public: int coinChange (vector<int>& coins, int amount) { sort(coins.begin(), coins.end()); ...
64228d8d6780461f39a7ed61c28f3cd4321d8d61
56e48b4a03af873cc00fd1470133268703cccaa6
aYido/CPP_Algorithm
/BOJ/Step02/10869.cpp
C++
cpp
236
no_license
#include <iostream> using namespace std; int main() { int A, B; scanf_s("%d %d", &A, &B); printf("%d\n", A + B); printf("%d\n", A - B); printf("%d\n", A * B); printf("%d\n", A / B); printf("%d\n", A % B); }
b013e1352151c62a399655a3f8dad3cdad7ca815
ce7bec3838ef2d13ebddc0a1bfd42a03f8ca6fa1
bbbradsmith/nsfplay
/nsfplug_ui/NSFPanPanel.cpp
C++
cpp
2,680
no_license
// NSFPanPanel.cpp // #include "stdafx.h" #include "NSFPanPanel.h" #include "NSFDialogs.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // NSFPanPanel using namespace xgm;...
b04c76e9bf3236f55c6759a3ff798a950f9e83bd
3133fdeb83328282f4fa13afd974e6c342db0137
rfariasc/Where-s_Wilfo
/REDONLY/main.cpp
C++
cpp
2,266
no_license
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> using namespace std; using namespace cv; Mat redFilter(const Mat& src) { assert(src.type() == CV_8UC3); Mat redOnly; inRange(src, Scalar(0, 0, 165), Scalar(90, 90, 255), red...
b8726fa7a975e348c44cc201577fdda5d68a12e8
c6578a2c2d943b817b8640a77938e13632d316de
whjkm/project
/oj/nyoj/490/main.cpp
C++
cpp
273
no_license
#include <string.h> #include <stdio.h> using namespace std; struct str { char source[15]; char dir[15]; }lky[3001]; int main() { char s[5],c[15]; scanf("%s",s); while(1) { scanf("%s",c); if(!strcmp(c,"END")) break; } return 0; }
72cfc230fef16d177e39e85e51addfc8b1b4643d
1af923e014d52aa8594d482a774abcf24e320431
ddcc/llvm-project
/mlir/test/lib/Transforms/TestConstantFold.cpp
C++
cpp
2,386
permissive
//===- TestConstantFold.cpp - Pass to test constant folding ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
064667ccdc38563c69efd617312a5ad437eb97a5
1bb85f160ff599f1b7f7093801bc2f411170bff2
Yuhe-Wang/Bubble
/Size/Size3/Size.cpp
C++
cpp
2,158
no_license
// Size.cpp : two Guassian Distributions // #include "stdafx.h" #include "Size.h" #include "math.h" //head files of C++ feature #include <map> #include <string> long In; float Ave1=0.4f; //for initial distribution float Variance1=0.1f; //for Gaussian distribution float Ave2=1.1f; //for initial distribution float Vari...
44e31ecafd643299550c6c012cbec218357144e8
891810a01a3603e342cf5a0eb8af35d770f8649b
azhugg/learning-opencv3-exercises
/src/ex14-3.cpp
C++
cpp
1,398
no_license
#include <opencv2/opencv.hpp> #include <algorithm> #include <iostream> using namespace std; int main(int argc, char** argv) { cv::Mat img, img_edge, labels, img_color, stats, centroids; if(argc != 2 || ( img = cv::imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE)).empty()) { cout << "Drawing contours\nUsage: " <<argv...
cb97f463284cc7c8183d9bae26a3d1de9d3720de
fee57497ed87d3ec553aae0eadf3b7f31f424d72
mreinart/PiLoRa
/src/App.cpp
C++
cpp
10,597
no_license
#include <App.hpp> namespace app { Args::Args(const Options& pOptions) : mOptions(pOptions) {} int Args::getChannel() const { return parseInt("channel"); } bfc::IpPort Args::getCtrlAddr() const { return parseIpPort("cx", {0, 2221u}); } bfc::IpPort Args::getIoAddr() const { if (...
51f689edb50a0be826b407f04a8bd9d30a13e871
0ee9420288535c38f330dc6a0ecc349adf77b629
nicolasdespres/CMake
/Source/cmTargetLinkLibrariesCommand.cxx
C++
cxx
15,305
permissive
/*============================================================================ CMake - Cross Platform Makefile Generator Copyright 2000-2009 Kitware, Inc., Insight Software Consortium Distributed under the OSI-approved BSD License (the "License"); see accompanying file Copyright.txt for details. This softwa...
93d96f05e2e1ed478ac5db479da1de699e2ad8b6
8449327718aba034bfe8699ad98f55a421cc6fb6
Merisho/comprog
/codeforces/round-605-div-3/e_parity.cpp
C++
cpp
1,042
no_license
#include <bits/stdc++.h> using namespace std; constexpr int INF = 1e9; vector<vector<int>> g; vector<int> ans; void find(vector<int>& targetParity, vector<int>& oppParity) { vector<int> d(targetParity.size() + oppParity.size(), INF); queue<int> q; for (int v : oppParity) { d[v] = 0; q.push(v); } while (!q....
5eced66f336e3d94f2fad8f4d2bbf9ac49ef3d3b
0faaf26e6227e1aa5cd9a7a56f3e223c3ebcff0f
vandermerwewaj/RED4ext.SDK
/include/RED4ext/Scripting/Natives/Generated/vehicle/DriveFollowSplineEvent.hpp
C++
hpp
687
permissive
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/NativeTypes.hpp> #include <RED4ext/Scripting/Natives/Generated/red/Event.hpp> namespace RED4ext { namespace vehicle { struct DriveFollowSplineEvent : red::Event { static cons...
f1dbbc88f290d609f4e3571adb49745061e1d0df
1dbe69ddcd21633c3f047d2acd75ddc09e46e1b1
danivdwerf/openGL
/main.cpp
C++
cpp
293
no_license
#include <iostream> #include "./Assets/_Scripts/Main.h" void onWindowResize() { glViewport(0, 0, 0, 0); } int main(int argc, char** argv) { Main* game = new Main("OpenGL", 640, 360); if(!game) return -1; game->setFramerate(60); game->mainloop(); return 0; }
b97c54a3e260a6d9320ded3e8bd2ddb0985110e6
e89fcc95fbeec2fc1bedbf021fc9ae2ba01ce7b6
stefb965/v8
/src/compiler/verifier.cc
C++
cc
60,191
permissive
// Copyright 2014 the V8 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. #include "src/compiler/verifier.h" #include <algorithm> #include <deque> #include <queue> #include <sstream> #include <string> #include "src/bit-vecto...
7a125cb7d0405b44b6607462ab33fa9af00926f0
bd8118ed5b034ab0942f3ace6b57a1ab7174a1d6
ramendez28/Analysis
/GraphNeuralNetwork/ExampleCode/GraphNeural/source/Root/PyGeometric_Functions.cxx
C++
cxx
778
no_license
#include<PyGeometric_Functions.h> // Initialize the variables in the object GeometricData::GeometricData(torch::Tensor node_features, torch::Tensor edge_index, torch::Tensor edge_attributes, torch::Tensor node_targets) { this -> node_features = node_features; this -> edge_index = edge_index; this -> edge_attri...
8ef5f4ecf8ead1c998159100c5625852f7e2adbb
d21177c65196f293e264921fed17b76ed1d2be4f
andrey-zakharov/tt3d
/src/core/TimerMaster.cpp
C++
cpp
4,329
no_license
#include <boost/bind.hpp> #include "TimerMaster.hpp" using std::pair; using std::make_pair; void TimerMaster::Start() { boost::mutex::scoped_lock lock( mutex_ ); if ( !mbStop ) { return; } mbStop = false; timer_jiffies_ = 1; thread_.reset( new boost::thread( boost::bind( &TimerMaster:...
81887fb1aff98915dd020f82f9788f0dfb645dda
87b36864258c4ea76aa8846c4993cbcc8ca00c2f
stefdasca/CompetitiveProgramming
/Infoarena/pm.cpp
C++
cpp
3,639
no_license
/// Understanding girls be like #include<fstream> #include<cstring> using namespace std; ifstream f("pm.in"); ofstream g("pm.out"); short x,y,vsum[103]; struct vect { short vm[102],lm; /// ultimu = - short vp[102],lp; /// ultimu = + }; vect v[253]; vect v2[253]; int main() { f>>x>>y; v[...
77de60c555b1403c542075d2694ff8d15615948a
a6d6f6fe3ca6f4fc7fe46b01428f8f1b951e8a13
sjp38/lokapala
/Src/Lokapala/Operator/RuleDataDTO.cpp
C++
cpp
979
no_license
/**@file RuleDataDTO.cpp * @brief CRuleDataDTO 클래스의 멤버함수를 구현한다. * @author siva */ #include "stdafx.h" #include "RuleDataDTO.h" /**@brief 생성자. */ CRuleDataDTO::CRuleDataDTO(CString a_processName, CString a_caption, CString a_targetSeatId, CString a_targetUserId, int a_targetLevel, Reac...
909c9782aa77e131c2975b5fffb8f001d46fc341
9e72279cb8c6a80f208307ee92658b01b0c4fdd8
esprehn/mojo
/net/tools/flip_server/http_interface_test.cc
C++
cc
15,114
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/tools/flip_server/http_interface.h" #include <list> #include "base/memory/scoped_ptr.h" #include "base/stl_util.h" #include "base/strings/...
0f81d4dc3d6c1e77d69c9d6f592861a23992eb4c
8d9585a7a7cfcd00b0c49e7d29f8afd3ff5d5d7a
psallandre/IVRM
/ETS/MarketInterfaces/RTTF/Sage/SageImpl.cpp
C++
cpp
3,878
no_license
#include "stdafx.h" #include "Sage.h" #include "ModulVer.h" HANDLE CSage::m_hStopApplication = NULL; #define ENABLE_QUICK_EDIT 0x0040L #define ENABLE_INSERT_MODE 0x0020L #define TRANSPORT_REGISTRY_KEY _T("Software\\Egar\\ETS\\Transport") #define DB_REGISTRY_KEY _T("Software\\Egar\\ETS\\Database...
3830609f545a803978274a30065c06135f11950f
f801ccd2588f56a78410b5ca87724bb58c1c10da
suaebahmed/programming-contest
/codeforce/685-div2-s(2)/B.cpp
C++
cpp
1,332
no_license
#include<bits/stdc++.h> using namespace std; #define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define For(i,n) for(ll i=0; i<int(n); ++i) #define printArr(v) for(auto x: v) cout<<x<<" "; #define scanArr(v) for (auto &it : v) cin >> it; #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbe...
a42bc8b784694075b9105aa344b6af0096def0bb
7840b5e582c668123ba8a6322c96e5022ebbf328
aashish24/paraview-climate-3.11.1
/VTK/Infovis/Testing/Cxx/TestOrderStatistics.cxx
C++
cxx
19,399
permissive
/* * Copyright 2008 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the * U.S. Government. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that this Notice and a...
a2fa5d0610c6419835464ca10109bd3fb57920c2
1a2097b45fe949b96411fc0d701fb010f757e52e
karim19mohamed/Competitive-Programming-Trainning
/Algorithms Maths/10- extend_GCD.cpp
C++
cpp
863
no_license
#include <bits/stdc++.h> typedef long long ll; #define dbg(x) cout<<#x<<" = "<<x<<endl #define dbg2(x,y) cout<<#x<<" = "<<x<<", "<<#y<<" = "<<y<<endl #define dbg3(x,y,z) cout<<#x<<" = "<<x<<", "<<#y<<" = "<<y<<", "<<#z<<" = "<<z<<endl #define dbg4(x,y,z,q) cout<<#x<<" = "<<x<<", "<<#y<<" = "<<y<<", "<<#z<<" = "<<z<<", ...
5c26a2d589c58b6dde212762d66fd4f360b24333
2a92d5c037be18d0700104ec631152ba05e9d9af
Arsh-ak7/Algo
/MultiplyInt.cpp
C++
cpp
1,398
no_license
#include<iostream> #include<algorithm> #include<cmath> #include<vector> using namespace std; int main(){ cout<<"Enter two numbers "; string num1,num2; cin>>num1>>num2; int len1 = num1.length(); int len2 = num2.length(); string nump1 = num1.substr(0); string nump2 = num2.substr(0); ...
2b9c5fa278c9942ef9288b3f6670c1ca69888e7d
5cc976223103d5a3e51b0830c73f213334d2a72a
delta4d/AlgoSolution
/zoj/23/3279.cpp
C++
cpp
981
no_license
#include <cstdio> #include <vector> #include <algorithm> using namespace std; inline int lowbit(const int x) { return x & -x; } struct BIT { vector <int> x; void init(int sz=0) { x.clear(); x.resize(sz, 0); } void modify(int p, const int off) { for (; p<x.size(); p+=lowbit(p)) x[p] += off; } int sum(int ...
cb284487958a11478b4de4e1b966990c834676b5
0e1c984fb7b77de1d5bcd8b6c05e8543a0248632
hopkings2008/kakoune
/src/ncurses_ui.cc
C++
cc
43,042
permissive
#include "ncurses_ui.hh" #include "display_buffer.hh" #include "event_manager.hh" #include "exception.hh" #include "file.hh" #include "keys.hh" #include "ranges.hh" #include "string_utils.hh" #include <algorithm> #define NCURSES_OPAQUE 0 #define NCURSES_INTERNALS #include <ncurses.h> #include <fcntl.h> #include <c...
d8f9550980bf129872e94a6ffdc5b5017a8db65b
940b7488ca27fcf0744b78512e7a6fe13a40cf91
jvillarreal7/Online-Judges
/HackerRank/Utopian Tree.cpp
C++
cpp
490
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main(){ int t; cin>>t; while(t--) { int treeSize = 1; int cycles; cin>>cycles; for(int i = 0; i < cycles; i++) { if(i % 2 == 0) ...
d9e326042ac68af32900d886bd57f5b1eca8e908
6b6ad1cd195f19eef0f225f47db391b2ad1956e2
niel/SotaHUD
/src/main.cpp
C++
cpp
1,006
no_license
#include "mainwindow.h" #include <QApplication> #include <QSplashScreen> #include <QDebug> #include <QDir> const int MajorVersion = 0; const int MinorVersion = 7; const int RevisionVersion = 0; int main(int argc, char *argv[]) { QApplication a(argc, argv); QFile f(QDir::currentPath() + ...
9d78ed686654c966b1c17fa66ecad0ad07e579b9
829e7556cc0373344f9abf51243b03cadd38fe74
wangpengcheng/MNN
/source/backend/cpu/CPUTopKV2.cpp
C++
cpp
7,454
permissive
// // CPUTopKV2.cpp // MNN // // Created by MNN on 2018/08/28. // Copyright © 2018, Alibaba Group Holding Limited // #include "backend/cpu/CPUTopKV2.hpp" #include "backend/cpu/CPUBackend.hpp" #include "core/Macro.h" #include "core/Concurrency.h" #include "backend/cpu/compute/CommonOptFunction.h" namespace MNN { ...
d4cf29263664a4ad62949035ef39a87038675fce
5db32328f3d27a6e6428d37890eb6a7cf143dad3
roussukke/Yorozuya
/library/ATF/ATL__CComObjectRootEx.hpp
C++
hpp
748
permissive
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> #include <ATL__CComObjectRootBase.hpp> START_ATF_NAMESPACE namespace ATL { template<> struct CComObjectRootEx<CComSingleThreadModel> : CComObje...
d5c63be10dd9779d3a7726a615e335ab48502d95
750a617b87236ff2ce9c34ec495bd9c9f1cfb2bd
Laura-lc/leechcraft
/src/plugins/azoth/plugins/sarin/messagesmanager.cpp
C++
cpp
5,604
permissive
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organiz...
a9c65665a3ebcc6641877262437497d6d47a0f40
f407d81154fa8043989203a95cace7287750f11b
potpath/algo-class
/exercise/ex01/h1_sds/solution/main.cpp
C++
cpp
1,056
no_license
#include <stdio.h> using namespace std; int begin[700000]; int num; void genSeq() { begin[1] = 1; begin[2] = 2; begin[3] = 4; int idx = 3; //index of [begin] to be filled int i = 2; //i is the count do { for (int j = begin[i+1];j > begin[i];--j) { ...
1f1739aaf034bb692b6732c3ef00571663c1bad6
7f501324116057fcd5d2237ff8aad6d5836ee7d8
BGCX067/faint-graphics-editor-svn-to-git
/branches/vc15/bitmap/gradient.hh
C++
hh
3,448
permissive
// -*- coding: us-ascii-unix -*- // Copyright 2012 Lukas Kemmer // // 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 a...
f1d1cd47c8b714ffa97b64ce65174ddeaa1a3ff5
1f3fd379f4ed2c5bb47cb4e6442cb3f20c6a507c
karunmatharu/Android-4.4-Pay-by-Data
/external/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
C++
cpp
28,112
permissive
//=- ClangDiagnosticsEmitter.cpp - Generate Clang diagnostics tables -*- C++ -*- // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
1ddfb56ee9940945eda2511069ae1fa523905633
dd449e490aa9c4dff26d7c2873f2a762e1128f36
Enmk/ClickHouse
/src/Storages/StorageXDBC.cpp
C++
cpp
5,007
permissive
#include "StorageXDBC.h" #include <Interpreters/Context.h> #include <Interpreters/evaluateConstantExpression.h> #include <Parsers/ASTLiteral.h> #include <Storages/StorageFactory.h> #include <Storages/transformQueryForExternalDatabase.h> #include <Poco/Util/AbstractConfiguration.h> #include <common/logger_useful.h> #inc...
e2591678bb798d7768180d4eb4756d676635ba48
a3c6c23082e22ad02ba7e16f468bbae9978f414d
chromium/chromium
/printing/printing_features.cc
C++
cc
3,989
permissive
// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "printing/printing_features.h" #include "build/build_config.h" #include "printing/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_OOP_PRINTING) #include "base/metrics/...
2cf0ee01cdc7b0f10553694a56b4f1c2973b2b9b
76154aea5b41d6dffeff85a8f2cbe9a88f9b7d82
sameerpdeshmukh/Design_Patterns
/FlyweightDesignPattern/FlyweightDesignPattern/Flyweight.cpp
C++
cpp
1,417
no_license
#include"stdafx.h" #include "Flyweight.h" #include <iostream> using namespace std; Flyweight::Flyweight(string intrinsicState) { this->_intrinsicState = intrinsicState; } Flyweight::~Flyweight() {} string Flyweight::GetIntrinsicState() { return this->_intrinsicState; } Concrete...
eab1c97ae6a3836873abb80e29c847e5e30a2f55
f63cffd51edaf800cb1db4f1c59df1bd8c03521d
karunmatharu/Android-4.4-Pay-by-Data
/external/chromium_org/chromeos/settings/timezone_settings.cc
C++
cc
14,248
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/settings/timezone_settings.h" #include <string> #include "base/bind.h" #include "base/file_util.h" #include "base/files/file_path.h" ...
b2bfef8faa45bc2abbbf5f5a67f726dc5a0d9a5a
41c3cc25e195e39b2b2f4564a3e4f0865b210707
facebook/openr
/openr/spark/tests/SparkTest.cpp
C++
cpp
89,141
permissive
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <glog/logging.h> #include <gtest/gtest.h> #include <thrift/lib/cpp2/protocol/Serializer.h> #include <fb303/ServiceData....
f8fdf2e7859a56bb128bdd906a9e6ca86d7f56dc
9eae09c9813b4d172ed29a65c0d48541453b675a
fl4re/COLLADAMobu
/External/boost_1_63_0/boost/program_options/errors.hpp
C++
hpp
14,957
permissive
// Copyright Vladimir Prus 2002-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_1_0.txt) #ifndef BOOST_ERRORS_VP_2003_01_02 #define BOOST_ERRORS_VP_2003_01_02 #include <boost/program_options/config.hpp> #include...
6b8f0c27ad2c3d6fb5f24c1f54371e52a44529f7
4efc968695988551c138c08203f20eab271578d5
Buriola/2d-game-sdl
/src/Time.cpp
C++
cpp
442
permissive
#include "include/core/Time.hpp" namespace core { Time* Time::s_Instance = nullptr; Time::Time() {} void Time::Tick() { m_DeltaTime = (float)(SDL_GetTicks() - m_LastTime) * (TARGET_FPS * 0.001f); if(m_DeltaTime > TARGET_DELTATIME) m_DeltaTime = TARGET_DELTATIME; m_LastTime = (float)SDL_GetTicks(); ...
679c75e09809b5eb909a90ecf93311e830d85565
ce1451fd369a18caef74fe1b30e6886b5ff8afbf
Ace17/deeep
/src/entities/hero.cpp
C++
cpp
11,912
no_license
// Copyright (C) 2021 - Sebastien Alaiwan // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. #include "base/sce...
c540fd6cccdda80c8ea4bf1c5423fd218ac805a7
ed70e9369501737a8efa3cacbe3c8490e2c9ea4d
mgorman7/cse20133
/Lecture26/template.cpp
C++
cpp
1,098
no_license
/********************************************** * File: tempHead.cpp * Author: Matthew Morrison * Email: matt.morrison@nd.edu * * This file demonstrates an example of templates * where the function is in the header file. * tempHead.h includes the function definition * in the header file. *********************...
271ba77b76a00fb707504161597231937830fb6b
8e9db2df75e475ab2dc5696f0497ada0fba11852
CodyKelly/CSCI-2421
/HW2/main.cpp
C++
cpp
894
permissive
#include <sstream> #include <fstream> #include <iostream> #include "ArrayBag.hpp" #include "SetFunctions.hpp" int main() { std::ifstream file; ArrayBag bag1, bag2; try { // Try opening the file and filling the bags. file.open("setInput.txt"); fillBag(bag1, file); f...
ac82238c93605611a38aa1724112c2260e9b0a96
f016c2b7e2a31e878cd182d90613f11cc50fefaf
Suzukaze-Aoba/Code
/剑指offer/求1+2+3+...+n.cpp
C++
cpp
773
no_license
/** 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 考虑到最优的时间复杂度应该使用快速加计算 int quickadd(int n) { // 快速加求1+2+..+n int res = 0; int a = n + 1; while(n) { // 对应(n) && (...) if (n & 1) { res += a; // 对应(n & 1) && (res += a) } a <<= 1; n >>= 1; //对应dfs(a ...
8204222cce5becd4c5986190aabe559f137de294
3c29b4272c6cd10eaff8226e3931ed92eceaf5e9
zeroy0410/OI-Code
/PKUWC/contest14/B/biaoda.cpp
C++
cpp
779
no_license
#include<bits/stdc++.h> #define M 300005 using namespace std; int n,A[M],L[M],R[M]; int cnt[M],all[M]; int dp[M]; int stk[M],top; int main(){ for(int _=(scanf("%d",&_),_);_;_--){ scanf("%d",&n); for(int i=1;i<=n;i++){ cnt[i]=all[i]=dp[i]=0; L[i]=2e9,R[i]=-2e9; } for(int i=1;i<=n;i++){ scanf("%d",&A[i]...
f5ce1cffc9f01ecf879495bbb901e196273d5aeb
146857057f7e4c1e5e3c9de1b492d77974abfe19
taseenb/CLOUDS
/CloudsLibrary/src/VisualSystems/LaplacianTunnel/vs_src/ofVboByteColor.cpp
C++
cpp
15,757
no_license
//TODO: //GL Error checking // handle idling of arrays: possibly let gl create memory and use map buffers for streaming // index updating/deleting? // setVertexData with float* should know about ofVec3f vs ofVec2f? #include "ofVboByteColor.h" #include "ofUtils.h" #include <map> static map<GLuint,int> & getIds(){ sta...
808905a7160f8c4b2209521e437bc33643cf8518
690066e3fdfdc50fb153a489d87159cca096d587
Avinaah17/codeforces-edu
/binary-search/step5/B.cpp
C++
cpp
1,235
no_license
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <queue> #include <map> #include <set> #include <stack> #include <iomanip> #include <cmath> #include <cstring> #include <numeric> #include <cstdio> #include <list> #include <cassert> #include <climits> #include <cassert> using namespac...
181666daf72a791c7555c06cec6e5072433b4364
d6a1f5398debab5ab089d23dafbfbe39e669d899
kei1107/algorithm
/problems/Atcoder/ABC150_C.cpp
C++
cpp
2,519
no_license
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; } inline ll lcm(ll a, ll b) { return a / gcd(a, b)*b; } template<class S,class T> ostream& operator...
3f0527b220347e9c933a0942338fae8222c4096a
6340e3e3931b2b496f3e69e7799dc64d21ef295b
rotemga/ex4_cpp_v2
/Robot.cpp
C++
cpp
4,565
no_license
#include "Robot.h" Robot::Robot(House *house, AbstractAlgorithm *algo, Point* docking, Battery* battery) : house(house), algo(algo), position(docking), battery(battery) { sensor = new OurSensor(house, docking); score.setSumDirtInHouse(house->sumDirt()); score.setPosition(10); canRun = true; brokedDow...
ed4279385e9e7855fe813a72ea82daeb52a6ffba
b0dd1c506d98f8fa615830a889048a30077d7cc5
perplexedMurfy/Asteroids
/src/math.cpp
C++
cpp
5,489
no_license
#include "math.hpp" #include <cstring> v2::v2(double x, double y) { this->x = x; this->y = y; } v2::v2(const v2 &ref) { this->x = ref.x; this->y = ref.y; } /** to interface with SDL's 2d vector type. */ v2::v2(const SDL_Point &ref) { this->x = ref.x; this->y = ref.y; } v2::v2() { this->x = 0; this->y = 0;...
0ac16aa1dec4dca1fa7addf32f17fee2739d7052
2ac94ee8713e58bd70f159812aa126ae2ff0bd10
BenHaase/AI-Tic-Tac-Toe
/Tree.cpp
C++
cpp
5,770
no_license
#include "Tree.h" #include <cstdlib> #include <iostream> #ifndef TREE_CPP #define TREE_CPP using namespace std; Tree::Tree(int player, char pxo){ //creates a new tree with a blank board human = pxo; node * n = new node; generateIntBoard(n); n->p = player; n->d = 12; root = n; n->parent = root; l...
32494947aac7ef21e44779eff77f808add7ca612
0dc5ecbd3494a542613f6cd1b23c0bd12650956e
CMU-Robotics-Club/RoboBuggy
/Legacy/real_time/surface_src/java_src/Alice/jni/RoboBuggy_Vision_Impl.cpp
C++
cpp
3,654
no_license
#include <iostream> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include "RoboBuggy_Vision.h" #include <fstream> #include <string> #define ESCAPE 27 using namespace std; using namespace cv; int ids[MAX_CAMERAS]; const char* labels[MAX_CAMERAS]; Video...
493f396a51cb65b8cb7d739e8c5914ee04021cf2
cf56821f0a4377f33bdd1cfe67b6e5ed6fd5c1ab
yehaike/UE4_EOS_Plugin
/EOSBasic/Plugins/UEOS/Source/UEOS/Private/UEOSModule.cpp
C++
cpp
3,269
no_license
// Copyright (C) Gaslight Games Ltd, 2019-2020 #include "UEOSModule.h" #include "UEOSPrivatePCH.h" #include "Interfaces/IPluginManager.h" // EOS Plugin Includes #include "Config/UEOSConfig.h" #include "UEOSManager.h" #if WITH_EDITOR #include "ISettingsModule.h" #include "ISettingsSection.h" #include "ISettingsConta...
c276c28784965ee2d421e8ba2acd887562e25dc2
2b68f98c25082e85d63a64fc74e1410605b05228
frbyles/ExcavatorSimulator
/PhysX.Net 3.3.1/PhysX.Net/PhysX.Net/Source/Physics Collection.cpp
C++
cpp
14,842
no_license
#include "StdAfx.h" #include "Physics Collection.h" #include "Functions.h" #include "Core.h" #include "Scene.h" #include "Actor.h" #include "Soft Body.h" #include "Cloth.h" #include "Compartment.h" #include "User Notify.h" #include "Pair Flag.h" #include "Core Description.h" #include <NXU_customcopy.h> #include "Scene...
56705e22a9a90d197b3c1e34bd1895e052db52b5
0cc9e1803bc4e285f89e5338fcacebfb8dd41bb0
2cwldys/fodev-tools
/Fallout Online SDK/rotator-tools/SolutionTools/IntellisenseCreator/structs.cpp
C++
cpp
2,457
no_license
#include "structs.h" #include "common.h" void Function::ProcessDeclaration() { ProcessedDeclaration = Declaration; ::ProcessName(ProcessedDeclaration); } void Function::ApplyParams(vector<string>& params, bool guessed /* = false */) { if(!Applied) { Applied = true; if(::ApplyParams(Declaration, params) && gue...
3fed8700332fe5549ceeb324e8f42b4720499e14
202f363314d30efdba5c354b18ee833e6070de1f
JorgeOsorio97/Metodos2
/Vector.cpp
C++
cpp
2,598
no_license
#ifndef FLAG #define FLAG "flag" #include "libraries.h" class Vector{ private: int size; public: float *vector; // float *vec; Vector(int oSize){ size = oSize; vector =(float *) malloc(size * sizeof(float)); } ~Vector(){ ...
4d896a09f41a0ec18509ad372c07ba7c04d1847c
21c5ece45b37fff82e5cb3d1d599a6e1f423142d
seoi2017/Storage
/Test/2017-6-13/stick.cpp
C++
cpp
367
no_license
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #define MX 100003 using namespace std; int l,n; double c,nl; int main(){ freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); scanf("%d%d%f",&l,&n,&c); nl=(1.0+(double)n*c)*l; fcl...
2a60477464a1d8cea9fabbf1b3c97409fcd463a5
6f78eaa3596ee76b54ac00e6759228ef6f74f933
Preetam/cpl
/net/ip.hpp
C++
hpp
1,399
permissive
#pragma once #include <arpa/inet.h> #ifdef __FreeBSD__ #include <netinet/in.h> #include <sys/socket.h> #endif #include <string> // std::string #include <iostream> // std::cout #include <stdexcept> // std::invalid_argument namespace cpl { namespace net { struct IP { int family; union { in_addr v4; in6_addr v6...
6cea586420febb66c0c3fc6b902a2b91d65aebd3
a2813b0331b434f9d4fd22dba3a2204e9fd1306d
charygao/openvino
/inference-engine/src/mkldnn_plugin/nodes/mkldnn_interpolate_node.cpp
C++
cpp
124,650
permissive
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "mkldnn_interpolate_node.h" #include "desc_iterator.hpp" #include "mkldnn_quantize_node.h" #include <legacy/ie_layers.h> #include "mkldnn_eltwise_node.h" #include <mkldnn.hpp> #include <string> #include <vector> #include <mkldnn...
5cf9a6e6c6aafbcb7e0d79de2c1ff8db7f110380
74f029b711a3b5cbf3f0ecb1b82020d3d315d481
arjun619/DSA_practice
/dp questions/longest_subsequence/main.cpp
C++
cpp
417
no_license
#include <bits/stdc++.h> using namespace std; int main() { int arr[8]={6,2,5,1,7,4,8,3}; int length[8]={1}; for(int i=0;i<8;i++) { for(int j=0;j<i;j++) { if (arr[j]<arr[i]) length[i]=max(length[i],length[j]+1); } } int maxs=-1; for(int i=...
d1fa9d78f1a087d776f626c18015e52e7e5f5e54
2ff0631ffc53c6878bb5310f48343560f2c3b063
cjacker/windows.xp.whistler
/source/NET/RAS/SRC/UI/RASPHONE/SRC/ENTRYTB.CXX
C++
cxx
41,640
no_license
/* Copyright (c) 2000, Microsoft Corporation, all rights reserved ** ** entrytb.cxx ** Remote Access Visual Client program for Windows ** Phonebook entry toolbar dialog routines ** Listed alphabetically ** ** 06/28/92 Steve Cobb */ #define INCL_WINDOWS #define INCL_WINDOWS_GDI #define INCL_NETERRORS #include <lmui.hxx...
7d435b6d2234b81d15651b469f842d0aa77c9a85
b6295abd41267bd6a40baead79518d2c326be89f
Archonsh/ACM-code
/2-sat(unfinished)/main.cpp
C++
cpp
5,005
no_license
#include<string> #include<algorithm> #include<cstdlib> #include<cstdio> #include<set> #include<map> #include<vector> #include<cstring> #include<stack> #include<cmath> #include<queue> #include<unordered_map> #define INF 0x3f3f3f3f #define eps 1e-9 #define MOD 1000000007 #define MAXN 10000 #define mm(a,x) memset(a,x,size...
6a10e5bf92aad7cf87d59eb9fb921361370a2751
52a2d4463cfc1f0d808b445d11003b99d243d732
trabs/DCMTK
/dcmdata/libsrc/dctypes.cxx
C++
cxx
3,450
permissive
/* * * Copyright (C) 2002-2009, OFFIS * * This software and supporting documentation were developed by * * Kuratorium OFFIS e.V. * Healthcare Information and Communication Systems * Escherweg 2 * D-26121 Oldenburg, Germany * * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRA...
ec8119cfbb6d98709dca3c3931cffa54f83e24ed
742f3a48079850eb1f196b8c8e1e6db3b7bca664
warrenween/Elastos
/Sources/Elastos/Frameworks/Droid/Base/Core/src/elastos/droid/opengl/CGLSurfaceView.cpp
C++
cpp
971
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 // // ...
7433fac6a23b75d47d3ee67a69f7dcfa2526f092
7e2a58695efd0d203bcc06734c8373a9d10049dc
fingoldin/IrrlichtFPS
/JumpingState.cpp
C++
cpp
305
no_license
#include "stdafx.h" #include "JumpingState.h" #include "CrouchJumpingState.h" void JumpingState::update(Character * player, Core * core, irr::u32 time) { if (player->getInputState(EIS_CROUCH)) player->setState(DBG_NEW CrouchJumpingState(), time); else StandingState::update(player, core, time); }
73ffe2c3e674d91cf6b3367c33414f94ba19eb1f
4ce6a7c8b1f119240e9151634bd2d36e50086f38
wai1496/Quaz
/src/test/arith_uint256_tests.cpp
C++
cpp
23,155
permissive
// Copyright (c) 2011-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/test/unit_test.hpp> #include <stdint.h> #include <sstream> #include <iomanip> #include <limits> #include <cma...
4d64fad3e3d1e2f926d44b471ef9ea8f83f44735
4f6828c605f4a434e838f9f4b924b3684033e4ee
dezed/mantid
/Framework/Algorithms/src/CalculateFlatBackground.cpp
C++
cpp
18,918
no_license
//---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- #include "MantidAlgorithms/CalculateFlatBackground.h" #include "MantidAPI/FunctionFactory.h" #include "MantidAPI/HistogramValidator.h" #include "MantidAPI/IFuncti...
91f41c6c019f44301837c607d6e79dae7a4033cd
45253083dd3cb4b12b9901a55f9a634f06db652c
lambday/shogun
/tests/unit/mathematics/Statistics_unittest.cc
C++
cc
21,898
permissive
#include <shogun/lib/config.h> #include <shogun/lib/SGMatrix.h> #include <shogun/lib/SGVector.h> #include <shogun/lib/SGSparseMatrix.h> #include <shogun/lib/SGSparseVector.h> #include <shogun/mathematics/Statistics.h> #include <math.h> #include <gtest/gtest.h> #include <shogun/mathematics/Math.h> #include <shogun/math...
6d5a20ca5e3e2e85fea0e92cc622057a1ecb8188
0b7ae8cd15aea42bdeb2520a707f8b51f2fe3b07
tomatoskittles/syscoin
/src/test/fuzz/script.cpp
C++
cpp
8,151
permissive
// Copyright (c) 2019-2021 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <chainparams.h> #include <primitives/transaction.h> #include <core_io.h> #include <core_memusage.h> #include <policy...
0c682c116fb853ca2b398c10bae91ba2999c4a04
246582f29e56205554b5421d1c8cea7a006649ce
mizo0203/atcoder
/m_solutions2019_a/Main.cpp
C++
cpp
326
permissive
#include <cmath> #include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <boost/range/algorithm.hpp> #include <boost/integer/common_factor_rt.hpp> using namespace std; int N; int main() { while (cin >> N) { cout << (N - 2) * 180 << endl; } return...
862adf6d7c948b0e04b65703fbfbd248c81fa234
90b0a6e7632e62f67baef9c95658ef156d9f815b
soroush-tabesh/Competitive-Programming
/Quera/EZCup Training Round/main.cpp
C++
cpp
3,615
no_license
#include <bits/stdc++.h> #define Init ios_base::sync_with_stdio(0),cin.tie(0) #define ForI(i,a,b) for(long long int i = a; i < b;i++) #define ForD(i,a,b) for(long long int i = a; i > b;i--) #define WFile freopen("in.txt","r",stdin),freopen("out.txt","w",stdout) typedef long long int ll; typedef long double ld; const...
ac2f8f614ca0ebef0ab3a8990bf9e27815834eca
deb8997502dcffd0aa2e4c0eb64e21445c87fdbf
ferdiansahgg/C--Exercise
/chineseremainderproject/main.cpp
C++
cpp
1,448
no_license
// A C++ program to demonstrate working of Chinise remainder // Theorem #include<bits/stdc++.h> using namespace std; // Returns modulo inverse of a with respect to m using extended // Euclid Algorithm. Refer below post for details: // https://www.geeksforgeeks.org/multiplicative-inverse-under-modulo-m/ int inv(int a, ...
54958311f73a3456da0561184e3615001349a3f0
248ea531256f2eb2de2092c4bff4b7ee55b5fdae
Melvin-Dong/hal
/plugins/gui/src/python/python_editor.cpp
C++
cpp
46,316
permissive
#include "gui/python/python_editor.h" #include "gui/code_editor/syntax_highlighter/python_syntax_highlighter.h" #include "hal_core/utilities/log.h" #include "hal_core/utilities/utils.h" #include "gui/graph_widget/contexts/graph_context.h" #include "gui/gui_globals.h" #include "gui/gui_utils/graphics.h" #include "gui/a...
05e3619040c8e69dc8c23e7425cc2447edecc653
09fc289c239c59d041dc432221d9182cbb25958e
iantuioti/ufora
/packages/python/pyfora/src/serialization/DeserializerBase.hpp
C++
hpp
2,176
permissive
/*************************************************************************** Copyright 2016 Ufora 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/licen...
0c7761b2ccc515370822d14bd6a8007b5c9db264
965aa299047a2cc210384b1210a8a47b66e8e5c3
15831944/cnc-2
/CncControlerGui/CfgEnvironmentPage.cpp
C++
cpp
10,618
no_license
#include <wx/propgrid/manager.h> #include "wxCrafterImages.h" #include "CncFileNameService.h" #include "CncUnitCalculator.h" #include "CncConfigCommon.h" #include "CncConfig.h" extern wxPropertyGridManager* globlSetupGrid; //////////////////////////////////////////////////////////////////////// void CncConfig::setup...
72749fba384dd482026e96d7fdb88bf37013f054
63c69b7557a6f4a5a9e06ce7195389c3d199f897
PsymonLi/sw
/nic/delphi/integtest/delphi_integ_test.cc
C++
cc
13,572
no_license
// {C} Copyright 2018 Pensando Systems Inc. All rights reserved. #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <ev++.h> #include "gtest/gtest.h" #include "nic/delphi/hub/delphi_server.hpp" #include "nic/delphi/sdk/delphi_sdk.hpp" #include "nic/delphi/sdk/delphi_utest.hpp" #include "nic/delphi/sh...
70c8ca23bc3836131e0a0f13cb3a3256e00c6ca0
a66a9f0bf187cb1d27ce55d7a60474754a3e33b3
DreamLolita/BZOJ
/201805/0518/URAL2040/URAL2040.cpp
C++
cpp
1,032
no_license
#include<bits/stdc++.h> #define mkp(x,y) make_pair(x,y) using namespace std; typedef long long LL; typedef long double ldb; typedef pair<int,int> pii; const int N=5e6+10; int n; char s[N],ans[N]; LL read() { LL ret=0,f=1;char c=getchar(); while(!isdigit(c)){if(c=='-')f=0;c=getchar();} while(isdigit(c)){ret=(ret<<1...
92c98d4585af6632fe7257430c99de70955b780a
b1a122ca911bb445c3a6318d63a5eb58839106ca
juhom205/linear-search-algorithm
/Linear Search Algorithm/Linear Search Algorithm.cpp
C++
cpp
452
permissive
#include <iostream> using namespace std; int search(int array[], int n, int x) { for (int i = 0; i < n; i++) if (array[i] == x) return i; return -1; } int main() { int array[] = { 2, 4, 0, 1, 9 }; int x = 1; int n = sizeof(array) / sizeof(array[0]); int ...
650c00edff7980cabe61d10c7e094b892402770d
d15e311be908123d6cd9b58dc01db16cd82da802
mvesterli/thesis2019
/puffinn/include/filterer.hpp
C++
hpp
4,102
no_license
#pragma once #include "dataset.hpp" #include "typedefs.hpp" #include "hash_source/hash_source.hpp" #include "performance.hpp" #include <cstring> #include <immintrin.h> #include <memory> namespace puffinn { const size_t NUM_SKETCHES = 32; const size_t LOG_NUM_SKETCHES = 5; template <typename T> class...
f95f9d666a28b2741f142fb703f7ca97d38509e2
66fa7b18864b3b9d7d0e196e948e10f617f78ca2
nassernna/fboss
/fboss/agent/ThriftHandler.cpp
C++
cpp
56,648
permissive
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #inc...
d78b909b3e7e248214fdc36d91017c8757fc8e82
73ff3947de223ec4efff81a324a50469ab00930f
Andreasgdp/Cpp-2.-semester
/Andreas/Lektion 9/Lektion_9-vector_class/Vector.cpp
C++
cpp
3,448
no_license
#include "Vector.h" Vector::Vector(int n) { if (n >= 0) { this->_size = n; this->_elems = new double[n]; } else { throw std::invalid_argument("Size is not larger than 0!"); } } Vector::Vector(const Vector &v) { if(v._size > 0) { this->_elems = new double[v._size]; }...
98d0ef1b51f7e8525f676d7e2fba30a1ef049cfe
4c54af48e918243537d4ec7b287b0437f9084ce0
hallboyone/sticky_buns
/src/plugins/autonomy/ExamplePlugin/ExamplePlugin.cpp
C++
cpp
3,821
no_license
/*! * @file * * @section LICENSE * * Copyright (C) 2017 by the Georgia Tech Research Institute (GTRI) * * This file is part of SCRIMMAGE. * * SCRIMMAGE is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Softwa...
6f018ae9a257fbe9df7b1e008d79c2a54803a0ef
414b281d6e228623c1bc586ae4af5559b5d6d902
liaofuyan/test
/main.cpp
C++
cpp
3,018
no_license
#include <sys/stat.h> #include "Path.hpp" #include "FileManager.hpp" #include <iostream> #include <string> #include <io.h> #include <vector> using namespace std; int repalce_test(string &szSrc, string szSearch, string szReplace); void Dir(string folderPath, bool bFileOnly = false); void test_cpath(); void test_cfilem...
caa1566a2acdf34acbf089706d3a2895526a769d
5fe4b2afb13b658faed75eea8a1e8be432543525
jbandela/cppcomponents_rt
/testing/unit_test_client_interfaces.hpp
C++
hpp
8,039
permissive
// Define the interfaces - taken from windows.foundation.h #include "../cppcomponents_rt/cppcomponents_rt.hpp" #include <cppcomponents/events.hpp> struct InterfaceUriRuntimeClass : public cppcomponents::rt::define_rt_interface <cppcomponents::uuid< 0x9E365E57, 0x48B2, 0x4160, 0x956F, 0xC7385120BBFC>>{ // Define a typ...
4ca21ef893701a7977dead9e478ec4ef8a88e32e
2550a07de2bd42d4c4843a65edfd765406865a3b
aliyun/aliyun-openapi-cpp-sdk
/live/src/model/DescribeLiveStreamRecordContentResult.cc
C++
cc
2,953
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
ed60b4432fae10dc2a7774aa042e648d07a510d9
c8f8e2ac6ae6cba96a96759706cfe877f38d4367
greenfox-zerda-sparta/korompaidani
/week-06/day-6/Jukebox_again/Jukebox.cpp
C++
cpp
460
no_license
#include "Jukebox.hpp" Jukebox::Jukebox() { songs.resize(0, NULL); } void Jukebox::add_song(Song in_song) { songs.push_back(&in_song); } float Jukebox::get_artist_rating(std::string in_artist) { float temp_aver = 0; int aver_counter = 0; for (int i = 0; i < songs.size(); i++) { if (songs[i]->get_artist...
58b8d92724635880db40b6ce8b1403f2e39f9cd5
9c0c648e6c47f93879a3c4196d0f28c9e6922868
fanliyong007/acmhomeworks
/Acm2017Dzoj3961.cpp
C++
cpp
1,156
no_license
#include<bits/stdc++.h> using namespace std; struct talk { int left; int right; }; int main() { int n = 0;//聊天的天数 int m = 0;//友情值要求的天数 int x = 0;//A给B发的信息条数 int y = 0;//B给A发的信息条数 int t = 0;//测试用例个数 long long int sum = 0;//最后结果 struct talk one[101]; struct talk two[101]; int...
ae15b368f6e84997334cbb2872eba2d850afe9f3
7cdc84b7ac4b66a74bf10caf8e87d615a5b7d415
plamingoh9009/Punchclub_copy
/PunchClub/Scene/HudMapScene.cpp
C++
cpp
4,915
no_license
#include "stdafx.h" #include "HudMapScene.h" void HudMapScene::update_player_pos() { MAPICON::TYPE type = _player->get_current_location(); switch (type) { case MAPICON::ICN_HOME: _player->set_center(_home->get_center()); break; case MAPICON::ICN_SHOP: _player->set_center(_shop->get_center()); break; case...
60fc576265856bd4a3873f0b204d5e1aba27cf02
c45f8d596a900c88e4f6b7c4e901c367c8e85a5a
flex3r/cg_exercises
/cg_exercise_07/cglib/lib/glm/glm/gtx/type_trait.hpp
C++
hpp
5,141
permissive
/// @ref gtx_type_trait /// @file glm/gtx/type_trait.hpp /// /// @see core (dependence) /// /// @defgroup gtx_type_trait GLM_GTX_type_trait /// @ingroup gtx /// /// @brief Defines traits for each type. /// /// <glm/gtx/type_trait.hpp> need to be included to use these functionalities. #pragma once // Dep...
9d4a997962f9cb894ffc200ba79f29160da4a1e4
087e11a808f4fed0e5017e14b0c7c43d3dd19488
hj-ohagan/oldPhysicsProjects
/DoublePendulum/singlependulum.cpp
C++
cpp
11,197
no_license
// // singlependulum.cpp // CompPhysSinglePendulum // // Created by Henry O'Hagan on 04/11/2013. // Copyright (c) 2013 Henry O'Hagan. All rights reserved. // #include "singleheader.h" //includes function declarations and classes used using namespace std; /*---------------------------------------------------------...
8c2d9ab0258b82e04eccbccc63abf5c2d69e62ff
58d316a675d28439d4a9a23c243f79cc9f202a1b
rsbGroup1/frobo_rsd
/sick_tim/src/sick_tim310_1130000m01_parser.cpp
C++
cpp
8,372
no_license
/* * Copyright (C) 2013, Osnabrück University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this ...
e6ad1037997350954e65aa9097388ec5d3803069
216c5d40c9e88d2845823f6d9c66bd0d0e39f8f2
GreenYun/DirectX-Samples
/legacy DirectX SDK/C++/Direct3D10/GPUBoids/GPUBoids.cpp
C++
cpp
49,727
no_license
//-------------------------------------------------------------------------------------- // File: ParticlesGS.cpp // // Copyright (c) Microsoft Corporation. All rights reserved. //-------------------------------------------------------------------------------------- #include "DXUT.h" #include "DXUTgui.h" #includ...
90515f681aab66bcd51eb678fb8ee5ac412da8c5
f7a2c463ce6e01acf10534beea3200911cee1922
AmirAbrams/uniqredit
/src/qt/overviewpage.cpp
C++
cpp
12,909
permissive
// Copyright (c) 2011-2015 The Uniqredit Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "overviewpage.h" #include "ui_overviewpage.h" #include "uniqreditunits.h" #include "clientmodel.h" #include "guic...
b511496ffbf8ff018e2f761e3693b8571c96f473
95f43f2d89cf6f90f4c0eb74a49d37a63678d0a4
philbucher/Kratos
/kratos/tests/cpp_tests/utilities/test_sparse_matrix_mutiplication_utilities.cpp
C++
cpp
2,242
permissive
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // // // Project includ...
d77501c4b2d2fe4acf649a0e797e859befbf94d9
e1f5b4435e89e0950715be336c715c98d4838b4d
staticlibs/Big-Numbers
/Dbase/Btree.12/IndexDefinitionGet.cpp
C++
cpp
4,207
no_license
#include "stdafx.h" void Database::readIndexDefinitions(const String &tableName, IndexArray &indexArray) const { const String tmpName = toUpperCase(tableName); indexArray.clear(); const TableDefinition &tableDef = getTableDefinition(tmpName); /* just to check the tmpName */ DataFile dataFile( *this, SYSTEM_IN...
5ae4d69cd0cfe3b2e0ee85e6e73231de90f56376
6cc57a487907dd253740d05048da9d43f66f5c97
Targrimus/multithreading
/blocking queue.cpp
C++
cpp
427
no_license
#include <iostream> #include "BlockingQueue.h" #include <thread> int main(int argc, char ** argv){ BlockingQueue<int> qu(15); std::thread t1([&](){ for (size_t i = 0; i < 1E2; i++) { qu.push(i); qu.size(); } }); std::thread t2([&](){ for (size_t i = 0; i < 1E...
bb1d5dca63390b977500a92d8bb12a2464dfefb5
abf33926aaa1fc3ff8bfd269cee883399298be3b
bilke/ogs
/MeshLib/Elements/PrismRule15.cpp
C++
cpp
1,652
permissive
/** * \copyright * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * */ #include "PrismRule15.h" #include <logog/include/...