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
634a181f53e9f4e2e8ed077116702f057b89732d
382be6093fa078cd23a54f909e6a2475396dca9c
starstruuk/VRTKBuild
/New Unity Project_BackUpThisFolder_ButDontShipItWithYourGame/il2cppOutput/System.Core.cpp
C++
cpp
61,636
no_license
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include <stdint.h> #include "codegen/il2cpp-codegen.h" #include "il2cpp-object-intern...
da4739e207774b806ce2a8331b7f64cde04fef16
4776f96589c949887d3dff2ff5b7b1d8fb4336b9
Shehab7osny/JuCC
/src/lexer/lexer.cpp
C++
cpp
5,312
permissive
#include "lexer/lexer.h" namespace jucc { int Lexer::GetToken(std::ifstream &is) { static char last_char = ' '; while (!is.eof() && (isspace(last_char) != 0)) { is.get(last_char); } // check for identifier and literal tokens // RE : [a-zA-Z][0-9a-zA-Z] if (isalpha(last_char) != 0) { identifier_s...
30fccd2220491f544559560ea069ac3da948b91f
52017cef4b7a4c6e31646cff3c3985771fe444ba
aki323buri2/atd
/atd.d/atd.generic.property.cpp
C++
cpp
8,581
no_license
// atd.generic.property.cpp #include "atd.h" using namespace atd; using namespace atd::generic; #include "picojson.h" #include <fstream> #include <sstream> //==================================================== //= struct property //==================================================== property::property(const string &n...
355e1cbe231225fb2b5a5558ab916dd0b8eae5d3
57f37cfc5b3a6999d96782bdcdb2f2c028b81d93
prashkrans/DSA
/13. Greedy Algo/3. Greedy Florist.cpp
C++
cpp
883
no_license
/* Greedy Prob. #3. Greedy Florist */ // Method 1: Greedy Algo - Sort the array in descending order and increase curr by 1 after each k steps // thus making the price = original price * (1 + curr) // Running time = O(nlog2n + n) ~ O(nlog2n) where n = arr.size() // Auxiliary space = O(1) i.e. constant space #include <...
80417090c7f72aa1be52199ef86da00aa6dd1325
72f54649c19d11ad0ab9e9328b6dab2ae65290be
amritshukla001/CodeForces-Solution
/cf_737/a.cpp
C++
cpp
3,784
no_license
#include <bits/stdc++.h> #include <unordered_map> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double lld; #define int long long #define IOS \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define testcase \ long long testn; \ ...
d5aa3600f1a8aab3b7f4434da992da9cf42cb4c6
3b30438031c6ecafaec01b737f346aaa8dc16c59
jubayera/Embedded-Systems
/Hacker_Hash_Table_Ransom_Note.cpp
C++
cpp
1,249
no_license
//https://www.hackerrank.com/challenges/ctci-ransom-note/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=dictionaries-hashmaps #include <iostream> #include <unordered_map> #include <vector> using namespace std; bool ransom_note(vector<string> magazine, vector<string> ransom) {...
b3179cb407fa13d472c64c2f62364dee67158b38
03d8d66e60cbdcd2299bb4aa519bb8c63a92b2a2
Olney-James/CISS242
/punchLine/punchLine/punchLine.cpp
C++
cpp
2,789
no_license
/*********************************************************** Program: punchLine.cpp (Week 5 Programming Assignment 2) This program reads and prints a joke and it's punch line from two files. One file contains a joke, but not the punch line. The punch line will be the last line of the second file. Detail: Punch Line:...
9f13ceae67fc1f81fa34d57c43080a22b0513133
5606491d37510c9f6226bfbb6fdc82bf33678d3a
BasCreator/rpcs3
/rpcs3/Emu/FS/vfsFileBase.cpp
C++
cpp
552
no_license
#include "stdafx.h" #include "vfsFileBase.h" vfsFileBase::vfsFileBase() : vfsDevice() { } vfsFileBase::~vfsFileBase() { Close(); } bool Access(const wxString& path, vfsOpenMode mode) { return false; } bool vfsFileBase::Open(const wxString& path, vfsOpenMode mode) { m_path = path; m_mode = mode; vfsStream::Res...
074ab46f8ed5112449b656e146523fc59e538dd6
0fb1829d024f6f71ec0fa0da394de5567031a753
FarmerKb/oj
/ACM/summer training 2019/UESTC 2019 Summer Training #5 Div.1/E.cpp
C++
cpp
1,707
no_license
/* _____ .'|||||'. / > < \ | ^ | | \ / | \ '---' / '._____.' ||||| */ #include<iostream> #include<string> #include<algorithm> #include<cstdlib> #include<cstdio> #include<set> #include<map> #include<vector> #include<cstring> #include<stack> #include<cmath> #include<queue> using namespa...
5437ed0228a9314f49ae3bc2de263a8ecfa2a730
fd8e0876b9e5b111d1f07b36ef8b57549372e1e3
jaspreet11111111/competitive-programming-library-1
/graph/format.hpp
C++
hpp
875
permissive
#pragma once #include <cassert> #include <utility> #include <vector> #include "utils/macros.hpp" std::pair<std::vector<std::vector<int> >, int> children_from_parent(const std::vector<int> & parent) { int n = parent.size(); std::vector<std::vector<int> > children(n); int root = -1; REP (x, n) { ...
1346dda54e085eaf84aa3cde100d691b614127e5
c4b87f40de912a69daa4ac7a1e1ed16677b2ab29
hicder/icpc_code
/uva/uva_10305.cpp
C++
cpp
1,011
no_license
#include <iostream> #include <cstdio> #include <vector> #include <cstdlib> #include <queue> #include <bitset> #include <algorithm> #include <utility> #include <cstring> #include <string> #include <map> #define INF 128 #define MAXV 50102 #define pb push_back #define FOR(i, n) for(int i = 0; i < (n); i++) #define pf prin...
7effabf0549f82c59369489a4f25f034e4affe73
1931ff07e550a3425e44ab07404d9bdc7d833b6e
ElRobertt/C
/calculadora.cpp
C++
cpp
2,309
no_license
#include <iostream> #include <windows.h> using namespace std; class suma { float num1; float num2; float resultado; public: void leernumeros (); void sumar (); void imprimir (); }; int main () { suma sum; sum.leernumeros(); sum.sumar(); sum.imprimir(); syste...
963caea16e134512f4de60ceb9cfdb1d70b615f6
d748f27f431e12614735e25a8cbb941ee4152687
Stevemario/Dice-Poker
/mainmenu.cpp
C++
cpp
23,272
no_license
#include "mainmenu.h" void mainmenu::prepare ( const bool& bHaveGameData, const bool& bShowMainMenuNewGamePageChoice, const std::string& sLoadSource, const std::string& sNewAdventureName, const std::string& sSaveDestination, const sf::Font& font_, const mainmenupage& mainmenupage_, const gamedata*& gam...
3d83497b6b30f175f605011e21bbd660a59461ee
eae43935e2cf33277319cbdf50f3f7d72322a330
Shree987/WinterOfCP
/Chapter 1 - 25DaysOfCP/Day 05/Subarray Product Less Than K.cpp
C++
cpp
711
no_license
/* Author : Shreeraksha R Aithal Problem name : Subarray Product Less Than K Problem link : https://leetcode.com/problems/subarray-product-less-than-k/ Difficulty : Medium Tags : Math, Two Pointers */ class Solution { public: int numSubarrayProductLessThanK(vector<int>& nums, int k) { int i=0,j=0,cnt= 0,n ...
1c580b33053f299f19c6f12e721dc6afb9f893df
2a074fdcbbea4ce802cb4614cd5840534461798e
primitiv/primitiv
/test/eigen_device_test.cc
C++
cc
6,783
permissive
#include <primitiv/config.h> #include <chrono> #include <thread> #include <vector> #include <gtest/gtest.h> #include <primitiv/devices/eigen/device.h> #include <primitiv/core/error.h> #include <primitiv/core/shape.h> #include <primitiv/core/tensor.h> #include <test_utils.h> using std::vector; using test_utils::vec...
cbaaf0bc5bf41e435059a8ec7c333a3307dcb39a
cc7587b72fc68e4486ed4a274e1fb8cbcbb3721e
pvincent42/SDL2_GLTemplate
/src/Camera.cpp
C++
cpp
3,265
no_license
#include "Camera.hpp" Camera::Camera(const Vec3<float> &pos) { this->_position = pos; this->_theta = 0.0; this->_phi = 0.0; this->calcVectors(); this->_speed = 0.0005; this->_sensivity = 0.05; this->_verticalMotionActive = false; this->_wheelUp = false; this->_wheelDown = false; // keys configuration _keyC...
c77f61a2d49a78d085cd7fd3e1f4fc559947de3a
219ad4ccab84626fa8fec4c4cd901166c94b98c0
meniossin/src
/mojo/edk/system/message_pipe_dispatcher.cc
C++
cc
11,423
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "mojo/edk/system/message_pipe_dispatcher.h" #include <limits> #include <memory> #include "base/logging.h" #include "base/macros.h" #include "ba...
1bd4ecf85ad4fcc0b576ebbe13fda8c72e307fb1
ea7e1bcab967d5d7b9a97843b36a00df45be2622
hqtecheptech/MagicPill
/yhfp/sharehelper.cpp
C++
cpp
2,756
no_license
#include "sharehelper.h" #include <QDebug> //key_t sharedKey = 99; size_t maxSize = 200; union semum { int val; struct semid_ds *buf; unsigned short *array; }arg; ShareHelper::ShareHelper(key_t shared_key) { sharedKey = shared_key; shmid = shmget(sharedKey, maxSize, IPC_CREAT | 0777); if (sh...
21cf64b96549f0e55a51299feb8e85889d58dcfa
c50c37952b087a52487dbf5a589caf50ea40d499
623524718/mir2x
/server/src/monster.cpp
C++
cpp
47,109
no_license
/* * ===================================================================================== * * Filename: monster.cpp * Created: 04/07/2016 03:48:41 AM * Description: * * Version: 1.0 * Revision: none * Compiler: gcc * * Author: ANHONG * Email: anhonghe@gma...
82f9758c39ad93e20657d15968e2e86f20879fd0
aa4fdc58f395d694e689bb750e66765258db65aa
anyagixx/xorx
/src/qt/coincontroldialog.cpp
C++
cpp
37,933
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coincontroldialog.h" #...
31940351de0c7f120ea227adf05263964769be6e
a5fdf6de334b83ba83ecaa0dd52425ed365d8d24
GXhua/puno
/.libs/puno_automatic_generated/inc/types/com/sun/star/deployment/ui/LicenseDialog.hpp
C++
hpp
4,190
no_license
#ifndef INCLUDED_COM_SUN_STAR_DEPLOYMENT_UI_LICENSEDIALOG_HPP #define INCLUDED_COM_SUN_STAR_DEPLOYMENT_UI_LICENSEDIALOG_HPP #include "sal/config.h" #include <cassert> #include "com/sun/star/awt/XWindow.hpp" #include "com/sun/star/ui/dialogs/XExecutableDialog.hpp" #include "com/sun/star/uno/DeploymentException.hpp" #...
4638da1727b10597c31258918a48023a5f747cb1
80eb221fc62fb34162a9494413a92f9909421aed
RedCat13/cpp_book
/Chapter 2/ex25.cpp
C++
cpp
1,698
no_license
/***************************************************************************** C++ Programming - From Problem Analysis to Program Design 6th Edition Chapter 2 - Exercise 25 markdhoad@gmail.com Cindy uses the services of a brokerage firm to buy and sell stocks. The firm charges 1.5% service charges on the total ...
e55b55d1938abc4920fd3785ee8971e6881d84e2
7cdc633594f3cd5ce5395378cf86f0efcbc7ba2c
cms-nanoAOD/cmssw
/Alignment/OfflineValidation/plugins/ResidualRefitting.cc
C++
cc
46,503
permissive
#include <iostream> #include "ResidualRefitting.h" #include <iomanip> //framework includes #include "DataFormats/MuonDetId/interface/MuonSubdetId.h" #include "DataFormats/MuonDetId/interface/DTWireId.h" #include "DataFormats/MuonDetId/interface/CSCDetId.h" #include "DataFormats/MuonDetId/interface/RPCDetId.h" #include...
f10898590d47912d2a5f25d400fd9680b8a09f56
8b5ad9580159e0706f261028e514d93d9569841b
JacobianDet/CompeteUp
/544/zqm.cpp
C++
cpp
747
no_license
#include <bits/stdc++.h> #define mp std::make_pair typedef long long ll; ll a[200001], b[200001]; std::map<std::pair<ll, ll>, int> ZF; int main(void) { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); int n; std::cin>>n; for(int i=1;i<=n;i++) std::cin>>a[i]; for(int i=1;i<=n;i+...
1a2f6fdc8e676aed672d82ce93bd3e7a3b6e7586
b44fa8a4d1f9e61c6e76fd30744c52bf9daf683f
goldsborough/Anthem
/src/tables/Wavetable.cpp
C++
cpp
10,221
no_license
/********************************************************************************************//*! * * @file Wavetable.cpp * * @author Peter Goldsborough * * @date 29/11/2014 * ************************************************************************************************/ #include "Wavetable.hpp...
d783e8636cf8d6e4a47f8e939132cfbef90aa839
808f115d02fb2e9be192d1989da775bb45eba6cb
rnasynthetase/viruscoin
/src/qt/optionsmodel.cpp
C++
cpp
9,639
permissive
#include "optionsmodel.h" #include "viruscoinunits.h" #include "init.h" #include "walletdb.h" #include "guiutil.h" #include <QSettings> OptionsModel::OptionsModel(QObject *parent) : QAbstractListModel(parent) { Init(); } bool static ApplyProxySettings() { QSettings settings; CService addrProxy(setti...
05bb6d39a9b50db52f9751c7536c2ee188dbd1b7
a1683f92ce7afe640e0399835141a1f550d1ece1
mehrdad-shokri/couchbase-lite-core
/Replicator/Checkpointer.cc
C++
cc
16,675
permissive
// // Checkpointer.cc // // Copyright © 2019 Couchbase. 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 ...
34cbba0d47dfd21b8f9428af06fd0e40a60a73e7
c86f08be56b840ce22fcff40ef345560ef338704
jnshcppanswers/ClassExamples
/MinLadder.cpp
C++
cpp
537
no_license
#include<stdio.h> int A[100]; int main(int argc, char **argv) { int counter=0; for(int i= 1; i <= argc-1 ; i ++) { sscanf(argv[i], "%d", &A[i]); } for(int i = argc-1; i>=1 ; i--) { for(int j = 1 ; j < i ; j++) { //printf("%d %d\n", A[j], A[j+1]); //for(int i = 1 ; i < argc ; i++) printf("%d ", A[i]);...
c9e511ae3974a2157ee7b77252cd74f7609d353c
040f139fdfcfa546708f2bc9a4f0bca61acc25af
Stakhiev-Alexander/spbstu
/C++/common/matrix.hpp
C++
hpp
773
no_license
#ifndef MATRIX_HPP #define MATRIX_HPP #include <memory> #include "shape.hpp" namespace stakhiev { class Matrix { public: using elem_type = std::shared_ptr< Shape >; using list_type = std::unique_ptr< elem_type[] >; Matrix(); Matrix(const Matrix& matrix); Matrix(Matrix& matrix); ~Matrix(...
3be9436fa0e242eba51a8ab477cfeb3644f394a7
dd3766c4406d381b50cf28633ea3375242da0799
otcshare/chromium-src
/content/browser/renderer_host/input/render_widget_host_latency_tracker.cc
C++
cc
8,254
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/renderer_host/input/render_widget_host_latency_tracker.h" #include <stddef.h> #include <string> #include "base/check_op.h" #in...
43f5c227bef5f8d75380e5f76faafe04b6f8182f
8b3f7a964d9f0929d9224e35d96dfa2b54c40c47
joskid/PDFUtils
/PDFUtils/src/main.cpp
C++
cpp
945
permissive
#include "Core/Log.h" #include "UI.h" #include <iostream> int onClosing(uiWindow *w, void *data) { LOG_INFO("Closing window"); uiQuit(); return 1; } void saySomething(uiButton *b, void *data) { LOG_INFO("We were clicked"); } int main(int argc, char* argv[]) { Log::Init(); LOG_INFO("Hello World!"); uiInitOp...
4335d5c991ab43611d34bcc8dd80d307c634acca
b2eaaf255b5db1111004e5033c505ebd30a12c02
Wouterdek/raytracer
/raytracer/src/lib/io/PNG.cpp
C++
cpp
1,316
no_license
#include "PNG.h" #include "io/lib/lodepng.h" #include "film/FrameBuffer.h" #include <algorithm> #include <cmath> void write_to_png_file(const FrameBuffer& buffer, std::string filepath, double exposure, double gamma) { std::vector<unsigned char> rgb(buffer.getHorizontalResolution() * buffer.getVerticalResolution() * 3...
568b21fe4948c3edc73d173500215cf6dd1bf127
a10783d6979f107f7b508ac971973787f5dc7622
Piercson/Finding-Candidate-Keys
/FuncDependency/fd_testrunner.cpp
C++
cpp
333
no_license
#include <iostream> #include <vector> #include <string> #include "FuncDependency.h" using namespace std; int main() { vector<string> words1; words1.push_back("C"); vector<string> words2; words2.push_back("A"); words2.push_back("B"); FuncDependency fd = FuncDependency(words1,words2); cout << fd << endl; ...
dd58be3ab6a21649cc9a1b2af0d53b9ec7334460
421efa900256a75b632e451c88ad4e045df95106
franz-alt/cv-playground
/src/libcvpg/imageproc/algorithms/tiling/mean.hpp
C++
hpp
639
permissive
// Copyright (c) 2020-2021 Franz Alt // This code is licensed under MIT license (see LICENSE.txt for details). #ifndef LIBCVPG_IMAGEPROC_ALGORITHMS_TILING_MEAN_HPP #define LIBCVPG_IMAGEPROC_ALGORITHMS_TILING_MEAN_HPP #include <cstdint> #include <libcvpg/imageproc/algorithms/tiling/parameters.hpp> namespace cvpg::im...
018a6d4863b8d542477a15978ce475e4f00fbfd8
60d4fcb60b4364b22d6e17f38e509d6a3f5a7ac2
wu-qing-157/Aerial-Ace
/Training/0730/B/1.cpp
C++
cpp
1,237
no_license
#include <cstdio> #include <cstdint> #include <algorithm> __int128_t n, k, ans; void solve(int d, __int128_t lc, __int128_t lv, __int128_t mv, __int128_t rc, __int128_t rv) { if (lc & 1) ans ^= lv; if (rc & 1) ans ^= rv; ans ^= mv; if (d == 1) return; solve(d - 1, lc / k, lv * k + 1, lc % k * lv +...
757da82ca7863af5d589c7b96fa40336899460ca
2b00b173f4b6ade44a24e572408efa5193f10935
maxUo/wallet-core
/tests/interface/TWBitcoinScriptTests.cpp
C++
cpp
4,743
permissive
// Copyright © 2017-2020 Trust Wallet. // // This file is part of Trust. The full Trust copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. #include "TWTestUtilities.h" #include <TrustWalletCore/TWB...
03e03bdbc058c043efc0e98722a2988a16dfc87a
fda4323d9fca2b92537162d08f00161fb0008a0f
tigershan1130/PhaseEngine
/D3D10App/Source/ResourceManager.cpp
C++
cpp
3,849
no_license
//-------------------------------------------------------------------------------------- // File: ResourceManager.cpp // // Template resource manager class // Handles file-based resource objects // // Coded by Nate Orr //-------------------------------------------------------------------------------------- #pragma unma...
c51e2d07132824b85009de2cbf07ef305b8f8f2f
cbde610ee5db665d63ede536a1b13aeb3a8a3b17
serge-sans-paille/pythran
/pythran/pythonic/numpy/ediff1d.hpp
C++
hpp
902
permissive
#ifndef PYTHONIC_NUMPY_EDIFF1D_HPP #define PYTHONIC_NUMPY_EDIFF1D_HPP #include "pythonic/include/numpy/ediff1d.hpp" #include "pythonic/numpy/asarray.hpp" PYTHONIC_NS_BEGIN namespace numpy { template <class E> types::ndarray<typename E::dtype, types::pshape<long>> ediff1d(E const &expr) { auto arr = asarra...
981ded9e088d75385d1697c55b95353dd78e4fa5
64893e8821e01812489c4769134625860aae6f67
EhODavi/INF110
/Prova Prática I/barragem.cpp
C++
cpp
508
permissive
#include <iostream> using namespace std; int main() { int P, T, N; int i = 0; int salvos = 0; cin >> P >> T; do { cin >> N; if(N == -1) { break; } i++; if(i <= T) { salvos += N; } ...
3de3f1ea9f593df1edabc5a29c1ce32427cd0ce1
32a14020c85cfff2b43bc013fa814f402f4f5519
zmiksis/SciComp
/Homework 1/hw_1_ex_3.cpp
C++
cpp
1,149
no_license
#include <iostream> #include <string> using namespace std; int main() { double num_apples, num_bananas, num_oranges, num_lemons; cout << endl << "Please enter the number of apples: "; cin >> num_apples; cout << "The total bill for " << num_apples << " apples is: $" << num_apples << endl; cout << "Please e...
69a98644d6d6c31e263d2c302190a5fac0d65b04
3e6dbebbcd9b52f4be0a7b95f7606027a9142829
slsius/webscript
/serialib.cpp
C++
cpp
23,665
no_license
/*! \file serialib.cpp \brief Class to manage the serial port \author Philippe Lucidarme (University of Angers) <serialib@googlegroups.com> \version 1.2 \date 28 avril 2011 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANT...
241d55b157effc3fa59486fd9b43a5a5009f5bac
f4406d1aedcb741bf283e570367084d393b25c6d
JudyHsiao/codejam
/test/book/String.cpp
C++
cpp
1,731
no_license
#include "String.h" #include <iostream> #include <algorithm> using namespace std; std::allocator<char> String::alloc; String::String(const char* s) { int n = strlen(s); if (n) { auto data = alloc.allocate(n+1); uninitialized_copy(s, s+n, data); *(data+n+1) = '\0'; elements = dat...
4349329ce19ae281f1dea9469be07b0b14d2ad30
4c6ea3d089a9decb8b7b682a9dc4d2f321406563
lxp/sulong
/projects/com.oracle.truffle.llvm.test/tests/c++/simple/ignore/dynamicDispatch1.cpp
C++
cpp
252
permissive
// parser fails on this class A { public: virtual int fetchClassName() { return 1; } }; class B : public A { public: virtual int fetchClassName() { return 2; } }; int main(void) { B obj_b; A &obj_a = obj_b; return obj_a.fetchClassName(); }
afd02ad161e0882f8053a43b408b93b89103e18d
45cbe163530198eab5abee3b07bd611b9f18c84b
daverigby/kv_engine-1
/engines/ep/src/dcp/producer.cc
C++
cc
50,762
permissive
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2015 Couchbase, 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 * * h...
3f5427d94150023c30177a2ec1c1587bf638083a
6c457c6d2d4cb4f56e6b667538dedb1b3ef7594b
Nihav-Jain/The-Channeler
/TheChanneler/Source/TheChanneler/Storytelling/StoryNode.cpp
C++
cpp
993
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "TheChanneler.h" #include "StoryNode.h" UStoryNode::UStoryNode() : mNextNode(nullptr), bRequiresTick(false), bCanMoveToNext(true), mWorld(nullptr), mNodeName(), Manager(nullptr) {} void UStoryNode::AddNextNode(UStoryNode* next...
9b07582437f53c8221d25643df323ee130a0accc
4fac2373e5f62f12c4380b24cba9398716fa1193
snikolova27/UP-2.0
/Week11_Strings/task05_S.cpp
C++
cpp
1,570
no_license
#include <iostream> const int MAX_WORDS = 100; const int MAX_LETTERS = 50; int strlen(const char *str) { int len = 0; while (str[len]) { len++; } return len; } void strcopy(const char *src, char dest[]) { int len = strlen(src) + 1; for (int i = 0; i < len; i++) { dest...
13c2fd378f0623504f52ee9acb4e324667ed5cc1
ecd47a04f12ce5954691cd9161163e3f5421c40b
xxyyzz/HackerEarth
/ToggleString.cpp
C++
cpp
285
no_license
#include <cstdio> #include <iostream> int main(){ std::string s; std::cin >> s; for(int p = 0; p < s.size(); p++){ if(islower(s[p])){s[p] = toupper(s[p]);} else if(isupper(s[p])){s[p] = tolower(s[p]);} } std::cout << s << std::endl; return 0; }
708dd4b1874ec1c8edf0e61ee761607cb39262eb
a8106555e4ab47a4f3f7772209da8704d9e1c1b3
gauravc6/CollegeStuff
/cpp/Calculator.cpp
C++
cpp
1,210
no_license
#include<iostream> using namespace std; class Calculator { private: float a,b; public: void input() { cout<<"Calculator initiated."; cout<<"Enter 2 numbers:"<<endl; cin>>a>>b; } void add() { float sum; sum=a+b; cout<<"a+b="<<sum; } void sub() { ...
3cf7b566b26728c3e50e0faabc9561478a1d3ce1
cb9555b19292495d6a3a900840cb2c7e6c296a12
ludopulles/kactl
/fuzz-tests/lazy-segment-tree-alt.cpp
C++
cpp
983
no_license
#include "template-no-main.h" #include "../content/data-structures/LazySegmentTreeAlt.h" const int tests = 16; void run(int N, int operations) { // initialize with random values: vector<ll> arr(N, 0); rep(i, 0, N) arr[i] = rand() - RAND_MAX / 2; segment_tree st(arr); while (operations--) { int op = rand() % ...
1b2e10f3c3b76b91ac94b36ed481442396bd5382
72c4bcdd4e5bbeedf8bb297d9891f1517554414f
iotivity/iotivity-constrained
/api/unittest/reptest.cpp
C++
cpp
27,752
permissive
/****************************************************************** * * Copyright 2018 Samsung Electronics 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 * ...
c68b28d35c1d1cd62b67f858f16519911a9594a6
27947e86e4d161bef7cc37c19ae7755cef48a70f
cmillescas/repoALGORITMOS2
/ejemplo c++/main.cpp
C++
cpp
240
no_license
#include <iostream> #include <string> using namespace std; int main() { cout << "Hello world!" << endl; cout << "Hello world 2!" << endl; string cadena; cadena= "hola mundo"; cout << cadena << endl; return 0; }
4a9d5516d16cd05682c571813d02c909970b04e9
4b6e82896a586b47a4e07538994792ef5b0932fa
ahhbliulei/chromium
/components/performance_manager/v8_memory/v8_detailed_memory_unittest.cc
C++
cc
78,714
permissive
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/performance_manager/public/v8_memory/v8_detailed_memory.h" #include <memory> #include <tuple> #include <utility> #include "base/bin...
f3087aea5a45bec494ec9ef6a88b58be7522b925
68b32245b431dccb791f52951c0f41afe14e3ab4
Onchao/HillClimb-RL
/source/verticalLine.cpp
C++
cpp
2,117
no_license
#include "verticalLine.h" VerticalLine::VerticalLine(View* v, unsigned int vao, GLuint i) : view(v), VAO(vao), image(i) { glBindVertexArray(VAO); glGenBuffers(1, &VBO); glGenBuffers(1, &EBO); setCorners(); } void VerticalLine::setCorners() { float W = view->getW(); float H = view->getH(); vertices[0] = (1) /...
9208114e1e4bbb8f64d21f60ea19365015805c11
f324339330b7df81d62e646e34b6e2c57c9f3f42
SirAyawGumanaNgUsernameKoHayz/lab_exer-4
/Lab exer 4_2.cpp
C++
cpp
211
no_license
#include <iostream> #include <cstring> using namespace std; int main() { char name[]= "ALFREDO"; char *ptr = name; for (int x=0; x<strlen (name); x++) { cout<<*ptr<<endl; ptr++; } }
b70598d8ec058b7f9079bc90c1e4250408c2ec24
0d34536d8bf0d9fee33e401c40553270b3ac7906
vikchopde/AlertDispatcher
/Dispatcher.hpp
C++
hpp
867
permissive
#ifndef ZEROTOHERO_DISPATCHER_HPP #define ZEROTOHERO_DISPATCHER_HPP #include <memory> #include <thread> #include <map> #include "AlertQueue.hpp" #include <list> #include "IAlertListener.hpp" class IAlert; class Dispatcher { public: using Ptr = std::shared_ptr<Dispatcher>; Dispatcher() { run(); ...
33f8382335610e529b87c40c581656f4eff09937
e50a378404955304f985b235c95a127fb74b0d4b
ndhuanhuan/16_coding_practice
/601-800/785. Is Graph Bipartite.cpp
C++
cpp
712
no_license
//http://www.cnblogs.com/grandyang/p/8519566.html class Solution { public: bool isBipartite(vector<vector<int>>& graph) { vector<int> colors(graph.size()); for (int i = 0; i < graph.size(); ++i) { if (colors[i] == 0 && !valid(graph, 1, i, colors)) { return false; ...
fd0400696fe69d623b7635ab47ab1c6959f85fd3
9dc1b8d4262df2d149c280cf0e0cf65b72056666
shotastage/node
/deps/v8/test/unittests/heap/cppgc/gc-invoker-unittest.cc
C++
cc
5,480
permissive
// Copyright 2020 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/heap/cppgc/gc-invoker.h" #include "include/cppgc/platform.h" #include "src/heap/cppgc/heap.h" #include "test/unittests/heap/cppgc/test-pl...
f3b04d00f791b1c9c5fcfe0db02f7a42efcfdc6d
01c4b132d5cc35d5a7dfeaf51d2fec7fcd554ad4
pengdu/bbam
/mw/amf/src/pipelines/record/record_pipeline.cpp
C++
cpp
6,717
no_license
/* * Record_pipeline.cpp * * History: * 2010/4/17 - [Yi Zhu] created file * * Copyright (C) 2007-2011, Ambarella, Inc. * * All rights reserved. No Part of this file may be reproduced, stored * in a retrieval system, or transmitted, in any form, or by any means, * electronic, mechanical, photocopying, recor...
4fdd33032bdc250b3b71ccdf5230544515897184
90a1b8375707c89ec88ef0755c53a1727799220b
TimSimpson/lp3-main
/src/pc/platform.cpp
C++
cpp
3,189
no_license
#include <lp3/main/utils.hpp> #include <optional> #include <stdexcept> #ifdef _WIN32 #include <windows.h> #endif namespace { #if !defined(_WIN32) std::optional<std::string> get_env_var(const char * name) { const char * const env_var_value = getenv(name); if (env_var_value) { return std::string{env_v...
463d6af47d6949a9bda1188b532047a2c25d1619
327322f0a6ebf6f9c822c4b190b86e66b949db0c
cyhbrilliant/hdu_oj.rc
/2032.cpp
C++
cpp
558
no_license
#include <iostream> using namespace std; int main() { int n; while (cin >> n) { int YH[30][30]; for (int i = 0; i < 30; i++) { for (int j = 0; j < 30; j++) { YH[i][j] = 0; } } for (int i = 0; i < n; i++) { YH[i][0] = 1; } for (int i = 1; i < n; i++) { for (int j = 1; j < i+1; j++) { ...
8786a845064cb464e134ba7afa58efa78e77ac23
59620897d43598a8be534e2504d94f0624ea6887
Fenrisulfr503/PersonPractice
/houdiniengine/Source.cpp
C++
cpp
8,490
no_license
#include <HAPI/HAPI.h> #include <iostream> #include <string> #define ENSURE_SUCCESS( result ) \ if ( (result) != HAPI_RESULT_SUCCESS ) \ { \ std::cout << "Failure at " << __FILE__ << ": " << __LINE__ << std::endl; \ std::cout << getLastError() << std::endl; \ exit( 1 ); \ } #define ENSURE_COOK...
e79677c30d45c9337f94a38359aa9a5920d68928
43df467d6761df53491b1a36e49dc9146f4dc643
KimKJ/cocos2d-x-player
/Classes/HelloWorldScene.cpp
C++
cpp
3,040
no_license
#include "HelloWorldScene.h" USING_NS_CC; Scene* HelloWorld::createScene() { // 'scene' is an autorelease object auto scene = Scene::create(); // 'layer' is an autorelease object auto layer = HelloWorld::create(); // add layer as a child to scene scene->addChild(layer); // return the scene return scene; } ...
08794f3bb247ec18cbd8be460174057bf816daa0
18b8c510bd374c928fd367a1b909b06ee1fb0362
FITCommunity/Programiranje-2
/Ispiti/2020-07-15/PR2_2020-07-15_Rjesenje.cpp
C++
cpp
23,488
no_license
#include<iostream> #include<vector> #include<string> #include<thread> #include<mutex> #include<regex> using namespace std; const char* PORUKA = "\n-------------------------------------------------------------------------------\n" "0. PROVJERITE DA LI PREUZETI ZADACI PRIPADAJU VASOJ GRUPI (G1/G2)\n" "1. SVE...
6ec21e253081b02b2a0aa3b7248e2b373201a929
37b5ed203e7a753297e6c90bf88ce70ee699bbf2
idvr/Seg3D
/src/Application/ImageRegistrationTools/Actions/ActionAddTransformsFilter.cc
C++
cc
18,761
permissive
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2015 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
706469210dc7d2999ee7321dd0ae4cc262ed9cd1
8801cebc5a97ec76f7c17b834bf56883203de4e2
hoholee12/pcsx2
/pcsx2/gui/MSWstuff.cpp
C++
cpp
1,856
no_license
/* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any l...
b150f73423436a61e7c6952b6732bca177d73787
2aa8bf4fe1b6cbfd443ffcdabfe4fe4466d4e3a2
belargej/resoneut_analysis
/RNFilters/include/SiHitFilter.hpp
C++
hpp
1,146
no_license
/***********************************************************/ //Class: SiHitFilter // //Author:Belarge // // Filter events that to not have a nonzero IC time. /***********************************************************/ #ifndef _SiHitFilter_H #define _SiHitFilter_H #include <TH2.h> #include <cstdlib> #include <string...
abd0989b780b19360d4742c90d1ec7a037544bcb
b4ed94cc333249107a024c9560251977c97c799c
crvz6182/sudoku_partner
/main.cpp
C++
cpp
236
no_license
#include "sudokuGui.h" #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); sudokuGui w; w.setWindowFlags((w.windowFlags())& ~Qt::WindowMaximizeButtonHint); w.show(); return a.exec(); }
e5a448c92ada36ad8b714b94ddde3948a83dfa1d
3353a4f660bed673ad530ede0171852fa1768c46
Vaa3D/vaa3d_tools
/hackathon/XuanZhao/JudgeBranch/vigra/autodiff.hxx
C++
hxx
16,402
permissive
/************************************************************************/ /* */ /* Copyright 2012-2013 by Ullrich Koethe */ /* */ /* This file is p...
7fb9b67f8287d07a64cf4bf8adc7d234ce2b9d47
7ec6815b705f42e67c513bd0a412a5390969526d
nimble-dev/nimble
/packages/nimble/inst/include/cppad/core/convert.hpp
C++
hpp
1,281
permissive
# ifndef CPPAD_CORE_CONVERT_HPP # define CPPAD_CORE_CONVERT_HPP /* -------------------------------------------------------------------------- CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell CppAD is distributed under the terms of the Eclipse Public License Version 2.0. This ...
7baa81132cc2d51ea141dcc5008f52f06bf3cae9
4904303096d9fb88c33e72def50d63e114d488fb
3031687356/chromium
/chrome/browser/chromeos/settings/device_settings_provider.cc
C++
cc
41,112
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/settings/device_settings_provider.h" #include <memory.h> #include <stddef.h> #include <memory> #include <utility> ...
8471978754b1aa8edc32ea3cbdb8a68113611a28
9786b0110437449ceb3f30069381132515f147c6
kyx0r/FA_Patcher
/boost_lib/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp
C++
hpp
34,194
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) This is an auto-generated file. Do n...
d6fb1517a40e77eb9527a15a3eed07a02e3f6a5c
9e0aaf4b4842b5c44092e2e1c04cae443657e06d
rfluisa/URI_Online_Judge-Solutions
/C++/2028.cpp
C++
cpp
859
no_license
//2028 Sequência de Sequência Accepted C++ 0.512 17/12/2018 16:46:34 #include <iostream> #include <string> using namespace std; int main() { string seq; int n, k=0, test=1; while(cin >> n){ seq = ""; for(int i=0; i<n; i++){ if(i==0){ seq+=...
d44de898e94b4c1d0478d5d4798337cae922cf2d
92cf3878c38b7b4344ccd10e2593d5783ba9f0bd
DamieFC/chromium
/chrome/browser/chromeos/policy/core/device_policy_decoder_chromeos.cc
C++
cc
85,967
permissive
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/policy/core/device_policy_decoder_chromeos.h" #include <limits> #include <memory> #include <string> #include <utili...
a96797a9b6a6c315a9f8258297460a75e3708322
305a93660f84fa5aa1e497140fd8f78184346b57
daniel-riehm/burn-out
/library/learning/training_feature_set.cxx
C++
cxx
2,945
no_license
/*ckwg +5 * Copyright 2010-2015 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #include "training_feature_set.h" #include <algorithm> #include <string> #include <alg...
70e49b25f92dd5059278a9d70ced5e8960036f2e
5709bbeef7ec54157e90ec292178fd4ebf0e929c
SuperKamiGuru/MyG4STORK
/src/NeutronHP/ModGEANT4/Processes/G4NeutronHPTInelasticFS.cc
C++
cc
2,454
no_license
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
7582444cef7b077d36a3415ddbfee361965dce0f
f073dcfdf03c0920486ccc0e17ddfd3710c8750a
Sohan083/Programming
/Lightoj/1083-Histogram.cpp
C++
cpp
1,573
no_license
#include<bits/stdc++.h> using namespace std; int main() { int t; scanf("%d",&t); for(int i=1; i<=t; i++) { int n; scanf("%d",&n); stack<int>st; int ar[30000]; for(int j=1; j<=n; j++) { scanf("%d",&ar[j]); } st.push(0); ...
7a88c23670e01888f703d073d10156dd8f4febab
669dae89f9da4e9ba8213b8e8ae1871f0c6a5adc
veinamond/RLNT
/Ipasir/sat/RLNT2020/ipasirRLNTglue.cc
C++
cc
4,173
no_license
/* Copyright (C) 2011 - 2014, Armin Biere, Johannes Kepler University, Linz */ /* Copyright (C) 2014, Mathias Preiner, Johannes Kepler University, Linz */ /* This file contains code original developped for the Boolector project, * but is also available under the standard IPASIR license. */ #define __STDC_LIMIT_MACRO...
bed9519636514fc9fcb607db5bf42a48301486b0
3c6a5d4098139440c6eb5f0260ad05357eb265ef
nio304-mai/nmOpenGL
/src_proc0/nmgl/nmglDisable.cpp
C++
cpp
1,884
no_license
#include "demo3d_nm0.h" #include "nmgl.h" #include "nmblas.h" #include "nmpp.h" #include "ringbuffer.h" #include "nmgl_data0.h" #pragma code_section ".text_nmgl" SECTION(".text_nmgl") void nmglDisable(NMGLenum cap) { switch (cap) { case NMGL_ALPHA_TEST: //code break; case NMGL_BLEND: //code break; ca...
8fef3d851ab6591be33adb536d9eaf0e64362ebb
4179cf0271a4f6dd92280a34bdb799826e28a060
LeoComandini/gdk
/src/session_common.hpp
C++
hpp
10,393
permissive
#ifndef GDK_GA_SESSION_COMMON_HPP #define GDK_GA_SESSION_COMMON_HPP #pragma once #include "autobahn_wrapper.hpp" #include "ga_wally.hpp" #include "include/gdk.h" #include "signer.hpp" #include "amount.hpp" #include "autobahn_wrapper.hpp" #include "ga_wally.hpp" #include "include/gdk.h" namespace ga { namespace sdk ...
eb5e553fb91434faa1439d6ed2fbb2b21d1ef56b
62c7e7ac4ab608c2d59ca00c06a4b983998e8bec
midnite8177/jak-project
/game/overlord/iso_cd.cpp
C++
cpp
31,808
no_license
/*! * @file iso_cd.cpp * IsoFs API for accessing the CD/DVD drive. */ #include <cstring> #include "game/sce/iop.h" #include "game/sce/stubs.h" #include "iso_cd.h" #include "isocommon.h" #include "overlord.h" #include "soundcommon.h" #include "srpc.h" // iso_cd is an implementation of the IsoFs API for loading file...
882a6cf022898515b961542fae8d6e3041436a27
170da201a835917d947e9f6f3ce18aa064507e44
jonspock/devault
/src/net_processing.cpp
C++
cpp
184,910
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <net_processing.h> #include <memory> #include <addrman.h> #include <ba...
f2a4b0b983a850912f0318c1b6140d026a75ed1f
ddd84bfeb2a3bb8bd308439904e9ea0adcabafb6
qianjianxin/chromium
/ash/system/status_area_widget_unittest.cc
C++
cc
13,552
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/system/status_area_widget.h" #include "ash/focus_cycler.h" #include "ash/public/cpp/ash_switches.h" #include "ash/session/session_controlle...
299afc40569b18eeeec7147d4d88894475160be7
fcc1c642e53afde944dc2ecf12c2cadea5ee8b93
AMDmi3/freebsd-ports
/www/chromium/files/patch-components_autofill_core_common_autofill__payments__features.cc
C++
cc
684
permissive
--- components/autofill/core/common/autofill_payments_features.cc.orig 2022-04-21 18:48:31 UTC +++ components/autofill/core/common/autofill_payments_features.cc @@ -187,7 +187,7 @@ const base::Feature kAutofillUpstreamAllowAllEmailDoma bool ShouldShowImprovedUserConsentForCreditCardSave() { // TODO(crbug.com/1052397)...
129062f4a8b262db432c76c20e387fd6cb5d77a5
9edb6320b69bfcf5bf9f0f8bb6d1bfa8ccf160a3
VD-15/Sprout
/sprout/numeric/dft/fixed/square.hpp
C++
hpp
3,987
permissive
/*============================================================================= Copyright (c) 2011-2019 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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.tx...
5659ad8e63302b8eb1a63ffe35862e02cee97b1d
4475931ace64f6d84cf82dfaee2b459b17a30dfd
AABHINAAV/InterviewPrep
/Doubly Linked List/Reversal_DLL.cpp
C++
cpp
1,617
permissive
//Reverses a Doubly Linked List #include<iostream> using namespace std; struct Node { int data; Node *prev=NULL; Node *next=NULL; }; class DoublyList { private: Node *head; public: DoublyList(){ head=NULL; } Node* create(int); void InsertBegin(int); void Display(); void Reverse(); }; //for allocatin...
26c6d23f9513d8880328f2958923d096d0281dab
881e293e56d3bd629bc892f813eaf3e7df4ea671
sunny-aguilar/final
/menu.cpp
C++
cpp
15,163
no_license
/********************************************************************* ** Author: Sandro Aguilar ** Date: March 4, 2019 ** Description: Menu class holds the main menu and user prompts ** for the program. The menu class also holds the ** user input validation fun...
5110294f8207c0330be4c4969b84d81b9227e350
7467059649d113c01fe153016d3ce1d9e5875f93
xuxiaochun025/DS
/C/动态数组/顺序表.cpp
C++
cpp
2,374
no_license
#include<stdio.h> #include<stdlib.h> #include<string.h> #include"DynamicArray.h" //初始化 Darr *init_Array() { Darr *array = (Darr *)malloc(sizeof(Darr)); array->size = 0; array->capacity = 20; array->pAddr = (int *)malloc(sizeof(int)*array->capacity); return array; } //插入 void Insert_Array(Darr *arr, int value,int ...
21f14c2c643fabe7eb3c4999f0d61033fe367d04
2149cdedbaab3dd3cff221c91abb7def37c8c3b3
wuzhen247/ACM-ICPC
/OJ/POJ/#POJ3438.cpp
C++
cpp
467
no_license
#include<cstdio> #include<cstring> using namespace std; int main() { int n,i,j,num,len; char a[1010],*p0,temp,b[1010]; scanf("%d",&n); for(j=0;j<n;j++) { scanf("%s",a); char*p=new char[1001000]; p0=p; for(i=0;a[i]!=0;i++) { temp=a[i]; for(num=0;a[i]==a[i+1];i++) num++; num++; sprintf(b,"%...
438f6dda4d605dec2b8883a49e7dbcce881ab8dc
d111a1f1139d501ba05cc5af1ae8d3114c74c1b6
urho3d-archive/Urho3D-Sandbox-Dirty
/Source/FlexEngine/Scene/DynamicComponent.cpp
C++
cpp
1,587
permissive
#include <FlexEngine/Scene/DynamicComponent.h> #include <Urho3D/Core/Context.h> #include <Urho3D/Core/CoreEvents.h> #include <Urho3D/Scene/Node.h> #include <Urho3D/Scene/SceneEvents.h> namespace FlexEngine { DynamicComponent::DynamicComponent(Context* context) : Component(context) { SubscribeToEvent(E_UPDATE...
3d0e33311a1ec1ea4b83a6a01cd92476ef4da625
a0172c1b568260613e8fdfa474b066940c100656
Restream/reindexer
/cpp_src/core/selectfunc/selectfuncparser.cc
C++
cc
9,432
permissive
#include "core/selectfunc/selectfuncparser.h" #include <ctime> #include <set> #include <string> #include "tools/errors.h" #include "tools/logger.h" namespace reindexer { SelectFuncStruct &SelectFuncParser::Parse(const std::string &query) { tokenizer parser(query); token tok = parser.next_token(false); selectFunc...
487f3754feb34184c1fe77a4561107277261755c
e75340e16225145ce28940696b4ffc2e240b8ce0
alexandraback/datacollection
/solutions_1673486_1/C++/Joker/main-A.cpp
C++
cpp
649
no_license
#include <cstdio> #include <cstring> #include <cmath> #include <string> #include <algorithm> #include <vector> #include <deque> using namespace std; int main() { freopen("A-large.in", "r", stdin); freopen("A-large.out", "w", stdout); int T; scanf("%d", &T); for (int k=1; k<=T; ++k) { doubl...
e3e8703d8b08c219cfbd97422ea325032f1bb9da
8c7d8adc3483b3be2be31d88342c08dcf9481c4c
rosoareslv/SED99
/c++/libtorrent/2015/12/test_tracker.cpp
C++
cpp
22,053
no_license
/* Copyright (c) 2010, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
d2c5144d41caa03273396208351eb8d380b1ed2e
cf10efc7e1806ac6cdbf09f03068fb8c0da79e69
EvalCPlusPlusGestionFormes/Gestion_courbes
/gestion/modele/testergesdessin.cpp
C++
cpp
5,528
no_license
#include "testergesdessin.h" #define ECHELLETRIGO 5 #define ECHELLEMATH 10 #define RAYON 50 #define LARGEUR 50 #define HAUTEUR 100 #define ECHELLEFORME 0.5 static void AjouterDessinTrigo(gesdessin *gd) { repere *r; sinus *ds; cosinus *dc; r = gd->AjouterRepere(); r->EcrireDimensions(M_PI,1); ...
99ea19c5ffe30744564a38cc80aaddf79b2ef1a3
72e9dd5fd3665ea957fec55d6903d635e772b996
Tekh-ops/Rogy-Engine-
/Rogy/Engine/renderer/shadow_map.cpp
C++
cpp
21,224
permissive
#include "shadow_map.h" ShadowMapper::ShadowMapper() { } ShadowMapper::~ShadowMapper() { } void ShadowMapper::Init() { Clear(); CascadesSplitsCalc = false; for (size_t i = 0; i < SHADOW_MAP_CASCADE_COUNT; i++) { cascades.push_back(ShadowCascade()); ShadowCascade* sc = &cascades[cascades.size() - 1]; s...
b1a8b629030728228b7bc5241bbf2b148eee663e
8c86e99a047da71990515e161fbc5a986c230fbf
ATM006/acm_problem_code
/poj/2502/7522776_WA.cc
C++
cc
1,380
no_license
#include <cstdio> #include <cmath> #include <cstring> using namespace std; struct node { int x, y, id; } nod[222]; double dis[222][222], inf = 1e100; double Distance(int i, int j) { double ax = nod[i].x - nod[j].x; double by = nod[i].y - nod[j].y; return sqrt(ax * ax + by * by); } void solve(in...
f2cdd49f999a3496667c4a979222bc8617ee70b5
2a68393cdb83c3a231798f09a8cf000c3f9f2422
tangodown1934/Algorithm-judge
/20150802/3번_전화번호목록.cpp
C++
cpp
1,392
no_license
#pragma warning(disable:4996) #include <stdio.h> #include <string.h> #define SIZE 11111 #define STRSIZE 22 int N; char dict[SIZE][STRSIZE]; int cnt[SIZE]; // Quick sorting for String 2-Array void qsort(char arr[][STRSIZE], int left, int right) { int l = left; int r = right; char temp[STRSIZE]; char pivot[STRSIZ...
d41cd3f26d00f528af819577a75818ec807e3495
63b0b728c18916734d5a67af8507331736ccfb58
ryyyyan-taylor/csci2270
/Project/Spotify.cpp
C++
cpp
5,880
no_license
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include "Spotify.hpp" using namespace std; Music::Music(int size){ songTable = new songItem*[size]; for(int i=0; i<size; i++) songTable[i]=NULL; tableSize = size; current=NULL; totalSongs = 0; } Music::~Music(){ for(i...
e943aa9299b75b7b6d7b3c1beef604883d9cf91e
22d5edfdadadce82db8f145b845e9a97c7493489
Oliveoly/Frankenstein
/src/Hero.cpp
C++
cpp
8,148
no_license
#include "Hero.h" #include <iostream> #include <conio.h> #include <../Collider2D/include/CollisionDetection.hpp> #include "Commandes.h" #include "Iceball.h" #include "Special_None.h" #include "Special_Ice.h" #include "Special_Fire.h" extern std::vector<std::unique_ptr<Element>> elements; extern std::vector<std::unique...
efe93bb90f4aaf39f36ba6c8bc551dc516028ae8
c6b5f973437591a90c21fbada0af0b39088cae7b
schreibikus/nmPlayer
/MFW/voMM/Recorder/Source/Base/CBaseModule.cpp
C++
cpp
655
no_license
#include "CBaseModule.h" #include <tchar.h> CBaseModule::CBaseModule(void) :m_hDll(NULL) { } CBaseModule::~CBaseModule(void) { if (m_hDll) { FreeLibrary(m_hDll); m_hDll = NULL; } } HMODULE CBaseModule::LoadDll (const TCHAR * pDllFile) { HMODULE hDll = NULL; HINSTANCE hInst = NULL; ...
8ec4995fd795b8df5427c3c6259eb9379975d4b0
e9350052270b347a86822a2928b174bf5963551f
knrdg/list
/mlist.cpp
C++
cpp
611
no_license
// // Created by konrad on 05.02.17. // #include "mlist.h" void mlist::insert(Node *node, const size_t index) { Node** current = &head; for(int i = 0; *current && i < index; ++i) current = &(*current)->next; node->next = *current; *current = node; } Node *mlist::remove(const size_t index) { ...