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
0f8a60d956b0bc87818d0c61e9d38b9b1a4d3089
1b2f38753b667b0b01c695021a0ce3a3576f5df1
zaborowska/FCC-fast-sim
/src/FCCFastSim/Atlfast/AtlfastCorrelatedData.cc
C++
cc
4,684
no_license
#include "AtlfastCorrelatedData.hh" #include "G4ios.hh" #include <cmath> namespace Atlfast{ using std::abs; using std::pair; using std::vector; using std::cout; using std::endl; /** @brief Class to smear parameters that are correlated. */ /** Constructor accepts random seed */ CorrelatedData:...
b39afe072b66d2a129ca0c0780bd44823ee24877
e7bb73340b841c70ef48d2c7ebff4b446e7208a1
ceci3/Paddle
/paddle/fluid/operators/elementwise/mkldnn/elementwise_sub_mkldnn_op.cc
C++
cc
5,151
permissive
// Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless require...
c2a11fc4eaf06eafcbbd4dda0cc95fb270d8a9d3
5a08d958bf72a578a1824c3ba46cc443d99b85ae
sheepcat/contrail-controller
/src/vnsw/agent/oper/vn.cc
C++
cc
44,233
permissive
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include <algorithm> #include <boost/uuid/uuid_io.hpp> #include <cmn/agent_cmn.h> #include <base/parse_object.h> #include <base/util.h> #include <ifmap/ifmap_link.h> #include <ifmap/ifmap_table.h> #include <vnc_cfg_types.h> #include <agent_types...
503ea9bac94887c232ba901a11f178ee67d6e368
5310278c89db79d9812292f9dced87da09b0e0f7
FDiot/code_tympan3
/Tympan/gui/widgets/TYCalculWidget.cpp
C++
cpp
22,942
no_license
/* * Copyright (C) <2012> <EDF-R&D> <FRANCE> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is dis...
f2475f2f36602bc434fffaec2af9e1eaa0ce8003
ff7ad13bb9bd9d31bccf346f0d678ffb4b9f7b16
bks-dev/BKS
/src/test/merkle_tests.cpp
C++
cpp
5,903
permissive
// Copyright (c) 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 "consensus/merkle.h" #include "test/test_BKS.h" #include "random.h" #include <boost/test/unit_test.hpp> BOOST_FIXTURE_T...
9add9a552e0251ac12489d9fd4fbd3bea6dea7cf
7a004969a8655b3a1134bbe806232bf6ecc4178d
i-v-s/Units
/XMLParser.cpp
C++
cpp
622
no_license
//#include "stdafx.h" #include "XMLParser.h" //#include <string.h> //#include <wchar.h> ///////////////// Символьные сущности ////////////////////////////////////////// namespace TXML { char Symbols[] = {"&<>'\""}; int SSizes[] = {3, 2, 2, 4, 4}; TCHAR InvChar[] = _T("A name contains an invalid chara...
6427bf2659d47ed2b97e6f6d621460f31e5cdc06
e9d7dae6aa4c26a6beafd6f0b21047cbc2ec6389
tarakhanall/vuo
/editor/VuoPanelDocumentation.cc
C++
cc
1,824
no_license
/** * @file * VuoPanelDocumentation implementation. * * @copyright Copyright © 2012–2020 Kosada Incorporated. * This code may be modified and distributed under the terms of the GNU Lesser General Public License (LGPL) version 2 or later. * For more information, see https://vuo.org/license. */ #include "VuoPanel...
7d8a169e43f77c032003ee6054e5fcab47683973
2a7b9026a49beed5d0dc858fe955931cfa4ad585
grav/audiogroup
/soundenc/quantizer.cc
C++
cc
1,964
no_license
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /*************************************************************************** * quantizer.cc * * Tue Jun 10 11:48:08 CEST 2008 * Copyright 2008 Bent Bisballe Nyeng * deva@aasimon.org **************************************...
9122f2917209648e530197eb4ba90669161d1f51
5d1bb414d2e57f100fd738b6ff4b46466e501c4a
shibagold-project/shibagold
/src/qt/sendcoinsdialog.cpp
C++
cpp
18,546
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" #include "init.h" #include "walletmodel.h" #include "addresstabl...
5582683be7113c57967712298391c8c09f14b3c8
ee48b5d4a096fbf4a2efcb685a9a980c2c4aca51
BochkarevMaxim/pp2_blank
/PP2/CBank.cpp
C++
cpp
1,711
no_license
#include "CBank.h" #include "SyncPrimitiveHandler.h" CBank::CBank(int clientsCount, CSyncPrimitiveHandler & syncPrimitive) { m_clients = std::vector<CBankClient>(); m_totalBalance = 0; m_threads = std::vector<HANDLE>(); m_syncPrimitive = syncPrimitive; for (int i = 0; i < clientsCount; i++) { CreateClient(); ...
3c82db4d651b85dac0c1706fcadd33112a54c064
9262a2f93c44c60814d47853dfd1f5f0bf315298
RachelYutongDu/MTH4600_HW4
/5_StockPrice_Antithetic_CallOption_BScompare.cpp
C++
cpp
3,874
no_license
#include "Declarations.h" int main() { double r, t, T, mu, sigma, dt, sqrtdt, S, S0, Z, Zbar, Z2bar, elapsed_time, t_star, stdhatZ, error, epsilon, n, Discount_factor, U, B, B_telda, S_telda, K, C, C_telda, BS_call, diff; int i, N, done, test; // Call option struck price K...
f4ea8ff7d1db79cfa9b9da579d9d29b932fc3c55
a076070256c3b4ae142e90741b643f0f6d4cedbd
Cosmos0603/coding
/C++/UnitTesting/gtest/SongTests.cpp
C++
cpp
7,044
no_license
// SongTests.cpp // // ICS 45C Fall 2016 // Code Example // // Unit tests for the Song class, including tests of the truncation // functionality newly added in this version. This set of unit tests // is intended to be complete -- it tests everything that the class // does (which doesn't require that many tests, becaus...
557e969ae0f999674ba18d83cd75b19d8076fdd9
0057cd6dead082597f8360055a4593b64e60b669
chao89/-C-Tutorial
/day06/cast.cpp
C++
cpp
664
no_license
#include <iostream> using namespace std; class Integer { public: // 从int转换来,explicit关键字表明基于该构造函数 // 的类型转换必须显式进行 explicit Integer (int i = 0) : m_i (i) {} // 向int转换去,C++2011支持对类型转换操作符函数 // 使用exlicit关键字,C++98语法不支持 /*explicit*/ operator int (void) const { return m_i; } void show (void) const { cout << m_i << e...
6be5b87f2bb3e4f32d7a6a8a275a108c55d6faeb
cc520dcf22390fc90cdc8851eb47f10bf8f6fa4c
rfabbri/vxl-1
/contrib/brl/bbas/bwm/exe/bwm_visualsfm_to_vpgl_cams.cxx
C++
cxx
14,216
no_license
#include <vector> #include <set> #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <bwm/bwm_observer_cam.h> #include <bwm/video/bwm_video_cam_ostream.h> #include <bwm/video/bwm_video_corr_sptr.h> #include <bwm/video/bwm_video_corr.h> #include <bwm/video/bwm_video_site_io.h> #include ...
de905eae27c4086b9083c0479f84950b8a6c0282
c57ba29a72e2d0e31eed41ae161ab61795c4a2be
jionlei/EPlayer
/lib_eplayer/src/main/cpp/mediaplayer/source/renderer/InputRenderNode.cpp
C++
cpp
4,070
no_license
#include "InputRenderNode.h" #include <cstring> #include "GLInputYUV420PFilter.h" #include "GLInputABGRFilter.h" #include "AndroidLog.h" /** * OpenGL 纹理渲染的对外接口 */ InputRenderNode::InputRenderNode() : RenderNode(NODE_INPUT) { resetVertices(); //OpenGL 顶点坐标 resetTextureVertices(NULL); //纹理坐标 } InputRenderNod...
4536b84ccf7c5755eb8cc173d316e7c22b966cb3
d1cabbc40da7a4e9d025c42f7872ed0943dfbda8
assuom7827/Hacktoberfest_DSA_2021
/Code/data_structures/list/doubly_linked_list/insertionAndDeletion.cpp
C++
cpp
2,048
permissive
#include <bits/stdc++.h> using namespace std; struct Node //defining the structure { int data; Node *next; Node *prev; Node(int value) { data = value; next=NULL; prev=NULL; } }; Node *insertHead(Node *head,int data)//insertion at the head of linked list {...
a594050ecc8ba3c7ff399c6991b57751f5b6086c
37cf661a16a14abe03fe5fd13eb0c47632a67766
sssunho/TheInn
/TheInn/TheInn/sound.cpp
C++
cpp
2,539
no_license
#include "sound.h" #include "framework.h" #include <fmod.h> FMOD_SYSTEM* CSound::g_sound_system; map<string, CSound*> SoundManager::bgmTable; map<string, CSound*> SoundManager::seTable; CSound* SoundManager::loadedBgm; std::list<CSound*> SoundManager::seList; CSound::CSound(const string path, bool loop) { if (loop)...
ab12f046b41589636c6019b1a486f06618ad0e13
6ae4fb94ba1413827a04dc430f4e12232e8b5fa8
XUJIN123/SpikeGLX
/Src-graphs/FVScanGrp.cpp
C++
cpp
4,504
no_license
#include "Util.h" #include "FileViewerWindow.h" #include "FVScanGrp.h" #include "DataFile.h" #include "SignalBlocker.h" #include <QDoubleSpinBox> #include <QLabel> #include <QPushButton> #include <QSlider> #include <QHBoxLayout> FVScanGrp::FVScanGrp( FileViewerWindow *fv ) : fv(fv), pos(0), pscale(1) { QD...
49c535e4bbd008d614298175a24ba3c86904b15e
3e7a200af91cf2cef26e381c4b2b8f9ed1f3a2a8
Bondar3512/lab-03
/task1.cpp
C++
cpp
335
no_license
#include <iostream> #include <string> using namespace std; int main() { int i, j, n; cin >> n; for (i=n; i>=1; i++) { for (j=1; j<=2*n; j++) if (j == i && i != 1) cout << '/'; else if (j==2*n-i+1 && i != 1) cout << '\\'; else if (i == 1) cout << '='; else cout << ' '; cout << '\n'; ...
61c571f5c9f097cc448d86f24144ce58ce4aa838
63552a18ff6a396f1ca5e47340ca269fa55d69c3
xiaolangyuxin/LIEF
/api/python/Abstract/objects/pyBinary.cpp
C++
cpp
3,723
permissive
/* Copyright 2017 R. Thomas * Copyright 2017 Quarkslab * * 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 appli...
6d8b0d7ba0c6d942acce5d58f07708c2cd0d34dd
5ecb9be62ffecf85a4d0843530adb2f9b1f25468
WaykiChain/wicc-wasm-cdt
/wasm_llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
C++
cpp
54,978
permissive
//===- DumpOutputStyle.cpp ------------------------------------ *- C++ --*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
e22c5d1e8d17f2d7dae5ed98a949bac1f1bb776b
fcaca01237197143be558035b1ec9f3e6d54f90f
Stackingit/bde
/groups/bsl/bslalg/bslalg_typetraitbitwisemoveable.t.cpp
C++
cpp
5,977
permissive
// bslalg_typetraitbitwisemoveable.t.cpp -*-C++-*- #include <bslalg_typetraitbitwisemoveable.h> #include <cstdio> #include <cstdlib> using namespace BloombergLP; using namespace std; //============================================================================= // ...
83c7cdb10e3b25dc74c9becac08e8b6f04f6103b
33d51249e7b78e123308d2ee3c04c85c4140627a
mikelv92/PacBot
/Echoes/src/SonarProcesser.cpp
C++
cpp
1,532
no_license
/* * RoboTower, Hi-CoRG based on ROS * * Copyright (C) 2012 Politecnico di Milano * Copyright (C) 2012 Marcello Pogliani, Davide Tateo * Versione 1.0 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Softwa...
b081f4df9d49eed72e0b11c36e28e7e5cb12f236
616b70c5d26479c238fb4be320910468b3113895
flow123d/flow123d
/src/io/output_time.cc
C++
cc
12,135
no_license
/*! *  * Copyright (C) 2015 Technical University of Liberec. All rights reserved. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 3 as published by the * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html...
1c12144049ffb45b4a025b8243fa0b5ac60765e6
41068a5e4aaaf69cdc2fc57b152de10fc83b8a9f
ClaudiuHNS/OGLeague2
/packets/PKT_Building_Die.hpp
C++
hpp
207
no_license
#ifndef HPP_085_PKT_Building_Die_HPP #define HPP_085_PKT_Building_Die_HPP #include "base.hpp" #pragma pack(push, 1) struct PKT_Building_Die_s : DefaultPacket<PKT_Building_Die> { }; #pragma pack(pop) #endif
f31eb51c1d21cad1b0ab5fd650cfb539fe2e0464
100a843726b5681611965ba4c572343320defd43
lng8212/DSA
/C_C++/Samsung/Basic/Bai17.cpp
C++
cpp
678
no_license
#include<bits/stdc++.h> using namespace std; long long muz (int n){ if (n==1) return 2; if (n==0) return 1; long long p = muz(n/2); if (n%2!=0) return p *p*2; return p*p; } int main (){ int t; cin >>t; while (t--){ long long n, k; cin >>n>>k; long long mid = ...
37e4865e7e29ce80342b6f5350f3fa403c6c6157
2d77b9ea05109350bd4e0decdd1c46558ee65a51
akhikolla/TestedPackages-NoIssues
/CARBayesST/inst/testfiles/Qdet/Qdet_DeepState_TestHarness.cpp
C++
cpp
1,461
no_license
// AUTOMATICALLY GENERATED BY RCPPDEEPSTATE PLEASE DO NOT EDIT BY HAND, INSTEAD EDIT // Qdet_DeepState_TestHarness_generation.cpp and Qdet_DeepState_TestHarness_checks.cpp #include <fstream> #include <RInside.h> #include <iostream> #include <RcppDeepState.h> #include <qs.h> #include <DeepState.hpp> NumericVector Qdet...
9149b7d5b022818c14b58362f003ebb32f40af7d
6107d95c9887caded0e562f10ca750a0aa2e01fe
SymbianSource/oss.FCL.sf.app.phone
/tsrc/mocks/qtgui/mock_qgraphicsview.cpp
C++
cpp
34,853
no_license
/* * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.h...
062773de7fb4c4a4df922cebfb17ab29fe5c50dc
31385c90c90ea1b7d77600ab708432380046faca
erikpoole/Masters-of-Software-Developement
/6010/Week2/8-27-18/LabVectorPractice/LabVectorPractice/main.cpp
C++
cpp
702
no_license
// // main.cpp // LabVectorPractice // // Created by Erik Poole on 8/27/18. // Copyright © 2018 ErikPoole. All rights reserved. // #include <iostream> #include <vector> #include "functions.hpp" int main(int argc, const char * argv[]) { std::vector<double> testDouble = {1.1, 1.3, 1.6}; std::string testStr...
0a0b742634d09179dd8b6eef3f2ab679d773dd72
65da6a3c4ded38c74142a0142e2cd671c3ee156b
Ti20-ntson/solutions
/MIXUP2.cpp
C++
cpp
1,139
no_license
/*https://bom.to/nxtvde2k1m4l*/ #include<bits/stdc++.h> using namespace std; #define task "MIXUP2" #define debug cout << '\n'; typedef pair<int,int> ii; const int number_of_mask = (1 << 16) + 5; unsigned long long dp[20][number_of_mask]; int a[20],n,k; void init() { ios_base::sync_with_stdio(0); cin...
54413a586075eb5671bd84ca6010c11762e264fa
3cf8eac6f5f455807b2be89fc6f0577043c569bf
ParticularJ/interview
/seed_store/Seed.cpp
C++
cpp
22,669
no_license
#include<opencv2/opencv.hpp> #include<iostream> #include<vector> #include<string> #include<queue> #include<time.h> using namespace std; using namespace cv; #define PI 3.14 RNG rng; class cmpH { public: bool operator() (const pair<int, RotatedRect> a, const pair<int, RotatedRect> b) { float maxa = a.second.size.w...
4c312c70a4691e2a194dbdf124214a2642795779
4305fd50ba1202ab3c35e42a9a310cf9d305b159
opendarkeden/server
/src/server/gameserver/skill/IceField.cpp
C++
cpp
10,806
no_license
////////////////////////////////////////////////////////////////////////////// // Filename : IceField.cpp // Written by : // Description : ////////////////////////////////////////////////////////////////////////////// #include "IceField.h" #include "EffectIceField.h" #include "Creature.h" #include "RankBonus.h" ...
268c3388e86a8cdc69c04feb9d9f65121603b5f1
587944f65fc090318479b4f921cd3b977afc89d1
markreidvfx/appleseed-maya
/src/appleseedmaya/exporters/meshexporter.cpp
C++
cpp
22,600
permissive
// // This source file is part of appleseed. // Visit https://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2016-2019 Esteban Tovagliari, The appleseedhq Organization // // Permission is hereby granted, free of charge, to any perso...
665f575e60c1765af5ecb09a5025393b44204a4e
ee2d2b9d145b26539edc8b3ae05fcac52f346876
Devilsider/Tencent_Cloud_Backup
/20190514/test/Computer3.cc
C++
cc
1,142
no_license
#include <string.h> #include <iostream> using std::cout; using std::endl; class Computer{ public: Computer(const char *brand,float price); void print(); void release(){ delete []_brand; } ~Computer(){ release(); cout<<"~Computer()"<<endl; } private: char * _brand; ...
a6c3940f9e68fc9141d9b81a314a2a6ec5c3a081
4fe30234ee7bbe12759ad1e35f3cbd23f0a0c76c
highweb-project/highweb-codesnapshot
/src/v8/src/ic/ic-compiler.cc
C++
cc
16,842
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/v8.h" #include "src/cpu-profiler.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic-inl.h" #include "src/ic/ic-compiler.h" nam...
f80106114b80212ab09bd8ea7764ec9c48c2847e
437d307a6d09c95545f800dd65dab826c5258f6d
csagan5/kiwi
/device/vr/test/fake_vr_device_provider.cc
C++
cc
1,783
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 "device/vr/test/fake_vr_device_provider.h" #include "device/vr/vr_device_base.h" namespace device { FakeVRDeviceProvider::FakeVRDeviceProvider(...
c97a3c33208cebfa27ea11834123f83bb4e5c1ef
dc8f3b91778b11b6fbb2758133e14c17e96e699c
NobuoTsukamoto/mediapipe
/mediapipe/util/time_series_util_test.cc
C++
cc
7,022
permissive
// Copyright 2019 The MediaPipe Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
aa87fdff90762b71a60d66f00529c8ec4efd08ee
a8763e69cb75786a46149ba29a4a0fa96c3082c6
deeppudasaini/Software-Engineering-II
/Week 8/Week 20 Sample Programs/DynIntStack.cpp
C++
cpp
2,180
no_license
#include <iostream> #include "DynIntStack.h" using namespace std; //************************************************** // Destructor * // This function deletes every node in the list. * //************************************************** DynIntStack::~DynIntStack() { StackNo...
f817a91c4cf4d4ee56c2ff2d1bcd02bef76c335b
de5b2ea1fd270ebdfbac1baa0ed9aed5f744aead
pradeeplearns/codePractice
/linkedlist/compareTwoLinkedList.cpp
C++
cpp
2,079
no_license
#include <iostream> using namespace std; struct Node { int data; Node* next; }; Node* newNode(int data) { Node* node = new Node; node->data = data; node->next = NULL; return node; } Node* insert(Node* head, int data) { Node* node = newNode(data); if(head == NULL) { head = n...
d5895e9efd9f0d450574c9a1080079d3e2f10b28
0bca79df0e01c53ccc14ad388fda2b5c07b14ea4
marbug/QtSamples
/GPSSample/gpspositionprovider.cpp
C++
cpp
1,368
no_license
#include "gpspositionprovider.h" #include <QGeoPositionInfoSource> const QString gInitSucceeded1 = "Default Geo Position Info Source created. Timer with interval %1 started."; const QString gInitFailed = "Failed to create default Geo Position Info Source."; const QString gTimerIntervalChanged1 = "Timer inverval chang...
0fc96ab74432ffd15e985130d81fa96023eb5d3d
d304eb403e1bbed195e76cd681c83ad7e6acec8d
marco-c/gecko-dev-comments-removed
/other-licenses/7zstub/src/CPP/7zip/UI/Common/OpenArchive.cpp
C++
cpp
77,939
permissive
#include "StdAfx.h" #ifdef SHOW_DEBUG_INFO #include <stdio.h> #endif #include "../../../../C/CpuArch.h" #include "../../../Common/ComTry.h" #include "../../../Common/IntToString.h" #include "../../../Common/StringConvert.h" #include "../../../Common/StringToInt.h" #include "../../../Common/Wildcard...
4db8e487d511d660154c658a593384be6d761cb7
5f55d214595b33360901233b197916eb6aafa19a
radtek/Pos
/MenuMate/MenuMate/Source/DBTables.cpp
C++
cpp
46,409
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "DBTables.h" //#include "NetMessageSeatName.h" //#include "ManagerNet.h" #include "MMLogging.h" #include "DBTab.h" #include "GlobalSettings.h" #include "ManagerPatron.h" #pragma package(smart_init) ...
683944facf7991720d218d897a49559955ce04ad
f9d1bbe6bd2e0986e622061861e4f0a446d2f9de
Berlisia/Monopoly
/Tests/PublicFaciliiesTestSuite.cpp
C++
cpp
4,805
no_license
#include <gtest/gtest.h> #include "Bankier.h" #include "DiceMock.h" #include "MonopolyGameFixture.h" #include "Player.h" #include "Property.h" #include "PublicFacilities.h" namespace { constexpr unsigned int FACTOR_OWNER_HAVE_ONE_FACILITY = 4; constexpr unsigned int FACTOR_OWNER_HAVE_TWO_FACILITY = 10; constexpr uns...
568d7dfbae1d912f81230206ab47332cc514759b
6b1af9d878fc24bbf00b28176e6f78385b31c16e
GabrielLins64/Endless-Online-Awaken
/game_engine/src/config.cpp
C++
cpp
2,353
permissive
// Endless Online Awaken #include "config.hpp" #include <fstream> #include <iostream> #include <string.h> #include <stdexcept> bool Config::initialized_ = false; std::vector<Config::Entry> Config::entries; Config::Config() { if(!this->initialized_) { this->initialized_ = true; } } Config::Confi...
47742587cdafa5ce7d7129de1612b7f571e2cdc2
1b2dbb013aede2565d95e8503284d61eb7f08fc3
Penetra/CG-Project
/Wall.hpp
C++
hpp
657
no_license
#ifndef WALL_HPP #define WALL_HPP #include "Structures.hpp" #include "Object.hpp" class Wall: public Object{ public: Vector normal; bool chess; bool limited; int numberOfSquares; Wall(); Wall(double centreX, double centreY, double centreZ, double normalX, double normalY, double normalZ, do...
b7e48ec99c906eb165639f0bacaec1374c93d2e4
7b61d82e9070e83d4c987c3d841335db48922622
stormHan/Parallel_RVD
/comput_RVD_P/math_3d.cpp
C++
cpp
829
permissive
#include "math_3d.h" Vector3f Vector3f::Cross(const Vector3f& v) const { const float _x = y * v.z - z * v.y; const float _y = z * v.x - x * v.z; const float _z = x * v.y - y * v.x; return Vector3f(_x, _y, _z); } Vector3f& Vector3f::Normalize() { const float Length = sqrtf(x * x + y * y + z * z); if (Length < ...
262a2e16da31928f92d50e0083ad6a5882025001
73a077954eae3e27da25ab25f3fd6633786ebefe
miere43/plugin2text
/src/Plugin2TextTest/text_to_esp_test.cpp
C++
cpp
718
permissive
#include <CppUnitTest.h> #include <esp_to_text.hpp> #include "test_common.hpp" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace TextToEspTest { TEST_CLASS(RegressionTest) { public: TEST_METHOD(Test_ByteArrayCompressed_EmptyOutput) { // Bug: writing TypeKind::ByteArrayCompressed...
c3e260424d9e469f8ea794c81afc8f7c5fc6f75c
78400d4f8876ea4a8c6ab523ba989a8f95ae51a3
nv-chromium/chromium-crosswalk
/content/child/indexed_db/indexed_db_dispatcher.cc
C++
cc
32,647
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 "content/child/indexed_db/indexed_db_dispatcher.h" #include <utility> #include "base/format_macros.h" #include "base/lazy_instance.h" #include ...
64531b689d15059af78afeee2c92bdd7b2889384
7e90827ca24e46dbd15b28e23f4e2c8fa4c9f817
anyboo/Phoenix
/src/BusinessLayer/SearchDevice.cpp
C++
cpp
5,788
no_license
#include "stdafx.h" #include "WindowUtils.h" #include "SearchDevice.h" #include "portscan.h" #include "QMFileSqlite.h" #include "QMSqlite.h" DEVICE_INFO_LIST CSearchDevice::m_listDeviceInfo; FastMutex CSearchDevice::m_mutex; bool CheckDeviceInfo(const NET_DEVICE_INFO* devInfo, const DEVICE_INFO_LIST& list) { for (a...
479d990dc8b439fb711e48254a1f1690fb90edce
e144ef264df2d8523dab7a49b5d1bbbc18481568
vertexclique/playground
/laboratuvar/lab4-1/AccountTest1.cpp
C++
cpp
1,502
no_license
/* * File: AccountTest1.cpp * Author: mahmutbulut * * Created on Oct 25, 2011, 9:47:57 AM */ #include <stdlib.h> #include <iostream> #include "Account.h" using namespace std; /* * Simple C++ Test Suite */ int main(int argc, char** argv) { std::cout << "AccountTest1 test 1" << std::endl; Account account1( ...
77cd98eb7623bf4de330861243f182e2ff180457
de7d953f8074d7934f98359f8ff1b92843ac5d5e
krishna-mathuria/competitive
/dsasheet133.cpp
C++
cpp
825
no_license
void moveToFront(Node **head_ref) { /* If linked list is empty, or it contains only one node, then nothing needs to be done, simply return */ if (*head_ref == NULL || (*head_ref)->next == NULL) return; /* Initialize second last and last pointers */ Node *secLast = NULL; ...
0a76ce06acf445b67e3957b76ef0b91dcf20d3b1
e8e0483ed1c13e035561424b9a4319f13b53b6d8
sanyaade-embedded-systems/armhf-node-webkit
/Release/gen/webcore/bindings/V8RTCDataChannelEvent.cpp
C++
cpp
5,369
no_license
/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation...
87437607dcdedb97e85f8125ea7e23f458ddc5a5
c532f7f9170ecc510ccb022094134d48daf81cf1
r-arun/springcoding
/TheSimpleGame.cc
C++
cc
1,120
no_license
//230.05: Success // {{{ Boilerplate Code <-------------------------------------------------- // vim:filetype=cpp:foldmethod=marker:foldmarker={{{,}}} #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <climits> #include <ctime> #include <deque> #include <functional> #include <iomanip> ...
339f0b50d376ddf37676f71697141a4dfafd290a
3afb232868dcc10c03dd706510d17292dd8c7986
87ouo/The-road-to-ACMer
/Spring2019/Week07/I.cpp
C++
cpp
448
no_license
#include<bits/stdc++.h> using namespace std; const int maxn = 1e3+5; int a[maxn],b[maxn]; int main(){ int n; scanf("%d",&n); for(int i=0;i<n;i++) scanf("%d",a+i); for(int i=0;i<n;i++) scanf("%d",b+i); int ans = max(0, b[0] - a[0]); for(int i=0;i<n;i++){ if(a[i] +ans >b[i]){ b...
37d3da1b5ac50be967845a096f675dbd04840076
a2ab0a4e4a1c999e16b8d724c3c8c9cb7074420b
galacticor/cpp
/Pelatihan/Pelatda OSN/Sparring/2 c.cpp
C++
cpp
847
no_license
#include <bits/stdc++.h> #define fi first #define se second using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<pii> vii; typedef vector<int> vi; const int MOD=1000000007; ll dis[1005]; std::vector<ll> v; ll n,k,w[1005],d[1...
36f7c521c7ffe8bc2e2bcf9feabadff6528578e6
6895cdc0955cbab7637d177ce22b7bd36cd3ee94
dedyAxmz/siconos
/kernel/src/utils/SiconosTools/test/SiconosPropertiesTest.cpp
C++
cpp
3,411
permissive
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2021 INRIA. * * 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 * *...
c5ee5184f46acc35d951a75063e01c12d53ce476
ce20dd6078e9e1027b6f642018862e13891a2b1f
BalazsSzekeres/C-intro-project
/C-intro-project/ConsoleApplication1/ConsoleApplication1.cpp
C++
cpp
1,978
no_license
#include <iostream> #include <ctime> void PrintIntroduction(int Difficulty) { std::cout << "\n\nYou have reached the pont of no return! For the time: " << Difficulty; std::cout << "Answer for the C++ Gods:\n\n"; } bool PlayGame(int Difficulty) { PrintIntroduction(Difficulty); // Generate Code con...
ac069eb62ac7eb45450b50cce94168407285544d
92c296e4ab2ded7519e6559fecc49eae2ace0a7c
Qlflflrytlf/bitmap
/bitmap/bitmap.cpp
C++
cpp
12,734
no_license
#include "bitmap.h" BITMAPFILE* bitmapRead(char* file) { FILE* fp; BITMAPFILE* bitmap; bitmap = (BITMAPFILE*)malloc(sizeof(BITMAPFILE)); bitmap->header = (BITMAPFILEHEADER*)malloc(sizeof(BITMAPFILEHEADER)); bitmap->info = (BITMAPINFOHEADER*)malloc(sizeof(BITMAPINFOHEADER)); bitmap->rgb = (RGBQUAD*)malloc(size...
aa1009e61a7a70d8220735264acee399bc7bc1ec
82ba384bdab5d6655c41d5fca4262e429c1ecca8
ttrebuchon/BareBonesOS
/kernel/Memory/Heaps/KernelHeap.hh
C++
hh
3,605
no_license
#ifndef INCLUDED_MEMORY_HEAPS_KERNELHEAP_HH #define INCLUDED_MEMORY_HEAPS_KERNELHEAP_HH #include <kernel/Memory/Heap.hh> #include <Utils/Allocator.hh> #include <Utils/mutex> #include <Utils/shared_mutex> #include "BuddyHeap.hh" #include <Utils/vector> #include <Support/Collections/simple_list.h> #include <Utils/map> #...
7e98a0c5d853ed576a5a93031696320031ab52ec
4175eea6f28f89459adb40757a153cc92b8389e5
jqk6/CodeArchive
/TIOJ/1165.cpp
C++
cpp
586
no_license
#pragma GCC optimize("Ofast") #pragma loop_opt(on) #include<cstdio> inline char readchar(){ const int S = 1<<20; static char buf[S], *p = buf, *q = buf; if(p==q&&(q=(p=buf)+fread(buf,1,S,stdin))==buf) return EOF; return *p++; } inline short R(){ short ans = 0, c = readchar(); while((c<'0'||c>'9')&&c!=EOF) c=readc...
d1eed6d41cc7be9003dd98c4f8a16d0bdeadbe2d
7b1cb539614d58d9d56f032fffa64c61fbdf64c6
zhuyanbing/SouiDemo
/FrogPlay/FrogPlay.cpp
C++
cpp
3,568
permissive
// dui-demo.cpp : main source file // #include "stdafx.h" #include "MainDlg.h" #include "..\controls.extend\SRadioBox2.h" #include "..\controls.extend\SVscrollbar.h" #include "SouiRealWndHandler.h" //从PE文件加载,注意从文件加载路径位置 #define RES_TYPE 1 // #define RES_TYPE 1 //从PE资源中加载UI资源 #ifdef _DEBUG #define SYS_NAMED_RESOURCE...
c835eea7a57b2aeb438f3ca1d31a3cbe7d9fffa1
09e0ae611fe743986a65c39c56a75af77658c416
Vinayak-14/LVCPPMay2021
/July/14thJulyLecture20/006OOPs.cpp
C++
cpp
1,515
no_license
/* Uniform Initialization > cannot be confused with function declaration > default constructor can be called explicitly */ #include<iostream> using namespace std; class Customer { string name; double credits; public: Customer() { cout << "\nInside Customer's default constructor\n"; } Cus...
1a416993f06c5f4b003cef568a8b2b028801e914
cce78e9c2d44bbaee801180ac3cde354cb810823
irinaenachescu/cpp_examples
/1036/Seminar10Gr1036/Seminar10Gr1036/Source.cpp
C++
cpp
2,947
no_license
#include<iostream> using namespace std; class Student { protected: char* nume; bool integralist; unsigned int numar_note; float* note; public: Student() { this->nume = new char[strlen("Anonim") + 1]; strcpy(this->nume, "Anonim"); this->integralist = true; this->numar_note = 0; this->note...
b2bf816bca4480b4e2aa0e12af496d6892b29924
a4461a2168d071fdfc419335791cb93aeefcd181
llzcmxiaotong/CProject
/C++11Excise/C++11Excise/C++11Excise/AtomicTest.cpp
C++
cpp
541
no_license
#include "AtomicTest.h" #include <thread> #include <iostream> using namespace std; AtomicTest::AtomicTest() : mCount(100) { } void AtomicTest::test() { const int threadCount = 5; thread t[threadCount]; for (int i = 0; i < threadCount; i++) { t[i] = thread(&AtomicTest::fun, this); } for (int i = 0; i <...
ba353cc6ffebbad9ddd1f27f26dbe5ed87acb67c
de0a7bc755ec69189ca302e4c66715bf28745186
dazedsheep/AmbientLib
/AmbientLib/SEMhttp.cpp
C++
cpp
10,337
no_license
/* * SEMhttp.cpp ***************************************************************************** * Copyright (C) 2011 - 2013 Alpen-Adria-Universitšt Klagenfurt * * Created on: April 9, 2011 * Authors: Benjamin Rainer <benjamin.rainer@itec.aau.at> * * This file is part of ambientLib. * * This program is free sof...
1de53c40fa6dd699c82a973f4661a7102c457233
ecc498a5f7bbfb88db0aca29b38b9ed909715883
idvr/Seg3D
/src/Core/State/BooleanStateGroup.cc
C++
cc
2,933
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 "Software")...
dbad0ec99796d345d4548e107fec9a0f4d666257
c865ab1662e9a18f4b56ef76eeb1183bacea70f2
Wapps3/proto-ik-legs-unreal
/Source/XLegsIKProto/Private/IkLibrary.cpp
C++
cpp
677
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "IkLibrary.h" #include "DrawDebugHelpers.h" #include "Engine/World.h" /* void TraceGround(FVector From, float LengthRayCast, FVector &HitLocation, float &Distance) { FVector Start = From - FVector(0, 0, LengthRayCast);...
275ac58014f6639f84ad11b8603f3113e95f312e
32186151c75e667787c918ee4b130bcd4f2dbf21
Sniphs98/boss
/src/common/keywords.cpp
C++
cpp
2,254
no_license
/* BOSS A "one-click" program for users that quickly optimises and avoids detrimental conflicts in their TES IV: Oblivion, Nehrim - At Fate's Edge, TES V: Skyrim, Fallout 3 and Fallout: New Vegas mod load orders. Copyright (C) 2009-2012 BOSS Development Team. This file is part of BOSS. BOSS is free softwar...
8b34bf3c1203adfe80f5239d593f9f1e88f770f2
d45e1d16915a2413f81baaedd9a0529dbcd8bd60
walkccc/LeetCode
/solutions/0483. Smallest Good Base/0483.cpp
C++
cpp
398
permissive
class Solution { public: string smallestGoodBase(string n) { const long num = stol(n); for (int m = log2(num); m >= 2; --m) { const int k = pow(num, 1.0 / m); long sum = 1; long prod = 1; for (int i = 0; i < m; ++i) { prod *= k; sum += prod; } if (sum == n...
787518f582258ef845c5e31ffcccee57e8a1728e
ef07d0bb72e49c5692b5321e2dd974685f091e5d
Codave/LeetCode
/454.cpp
C++
cpp
769
no_license
#include<iostream> #include<vector> #include<unordered_map> using namespace std; class Solution { public: int fourSumCount(vector<int>& A, vector<int>& B, vector<int>& C, vector<int>& D) { unordered_map<int, int> record; for (int i = 0; i < C.size(); i++) { for (int j = 0; j < D.size(); j++) { record[C[i] ...
8ebfc9a94bf460b2e66b289b67e845a4d57a5e0e
31cbd4e5686a8e2b27bcca3a65794fb560125cee
mitchty/ellcc-mirror
/llvm/tools/gold/gold-plugin.cpp
C++
cpp
32,601
permissive
//===-- gold-plugin.cpp - Plugin to gold for Link Time Optimization ------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
7f7e719f85a8403cba1905fd5019db6f6aef70c3
955fd6df3cdc46151d938d9c001bd4c7eaed5a6d
rachit173/sport
/codeforces/team_practice01/P.cc
C++
cc
1,059
no_license
#include<bits/stdc++.h> using namespace std; #define sc(a) scanf("%d",&a) #define pf(a) printf("%d",a) #define sc1(a) scanf("%lld",&a) #define pf1(a) printf("%lld",a) #define sc2(a) scanf("%d %d",&a.first,&a.second) #define br printf("\n") #define sp printf(" ") #define ll long long int #define pb push_back #define ff ...
3567c244328d11bec19580f38ab77bf297f9a32a
e3ffd3caf80cf7b9d39cdfe6ac64035965bb506a
valasekg/elu_fi_bsc_cg
/OpenSceneGraph/02/01_Indices/01_Indices/main.cpp
C++
cpp
3,839
no_license
#include <osg/Geometry> #include <osgDB/ReadFile> #include <osgViewer/Viewer> #include <osg/PolygonMode> #ifdef _DEBUG #pragma comment(lib, "osgd.lib") #pragma comment(lib, "osgDBd.lib") #pragma comment(lib, "osgViewerd.lib") #else #pragma comment(lib, "osg.lib") #pragma comment(lib, "osgDB.lib") #pragma comment...
840c046a5c1a50a48edcf881968e9e04aa0adc54
421f3cf08730948a789017d7ccf26390e07066fb
matscube/TopCoder
/SRM669/SubdividedSlimes.cpp
C++
cpp
3,934
no_license
// 2 "SubdividedSlimes.cpp" // BEGIN CUT HERE /* // PROBLEM STATEMENT // The idols Ami and Mami like playing games. Today they bought a new game. At the beginning of the game a single slime appears on the screen. You are given an int S: the size of the slime. The game consists of K turns. In each turn of the game the...
39848331488ee23688ceabb432311146db5d81a3
4a2f225abd521305aa2a9706aec9967e575856fa
pabloveraa/PeopleCounter
/SBC Master/contador/calibration_master.cpp
C++
cpp
9,594
no_license
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> #include <iomanip> #include <pthread.h> #include <sys/stat.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <opencv/cv.h> #include <opencv/cxcore.h> #include <opencv/highgui.h> #include <...
47d651f853cd599018e5b7227e0310734c309256
70d66840041a1a313f628d9d2e8422b3bf10d5b1
Stomach-ache/USACO-Solution
/section4/2/03.cpp
C++
cpp
1,357
no_license
/* ID: sudawei1 PROG: job LANG: C++11 */ #include <algorithm> #include <iostream> #include <fstream> #include <cstring> #include <climits> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #include <map> #include <unordered_set> using namespace std; using pii = pair<int, int>; int...
d4f37a0da318dbb93bd9d6340113f8e2e4c85a47
8bea0c44b524c8dfec399ecb05252fe8bff697f7
cramja/quickstep
/query_optimizer/expressions/SearchedCase.hpp
C++
hpp
6,046
permissive
/** * Copyright 2016, Quickstep Research Group, Computer Sciences Department, * University of Wisconsin—Madison. * * 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 * * ...
2cda10e0b51680f12eb0872613c972ff16bda24b
39f34f6b59ca8753da94934354505328aaeac415
vimanyuawal/cs104-git-practice1
/homework1/barry.cpp
C++
cpp
842
no_license
#include <iostream> #include <stdlib.h> #include <cstring> using namespace std; bool increasing(int a) { if (a > 0) { //if the recursive call fails, don't bother to check further. if (!increasing (a/10)) return false; //the least significant digit int last = a % 10; //the second least significant digi...
5516b4b9f89c3c3b99763ecd5f42f9b401776199
eb5e931ca21a5bc0137ba0ee79f936bf78546669
Waevka/raytracer
/Raytracer by waev/Raytracer by waev/WSphericalMap.cpp
C++
cpp
510
no_license
#include "WSphericalMap.h" WSphericalMap::WSphericalMap() { } WSphericalMap::~WSphericalMap() { } void WSphericalMap::getTexelCoordinates(WVector3 & localHitPoint, int hres, int vres, int & row, int & column) { WVector3 lhp(localHitPoint); lhp.normalize(); float theta = acos(lhp.y); float phi = atan2(lhp.x, ...
de183c0def613f9eb249d844d9230db533a155e2
a8a67fb899f4b671417b13ff4d28854c0db2e61b
digint/openmptl-reg-arm-cortex
/arm/cortex/Spansion/MB9BF41xT/include/arch/reg/can1.hpp
C++
hpp
34,329
no_license
/* * OpenMPTL - C++ Microprocessor Template Library * * This program is a derivative representation of a CMSIS System View * Description (SVD) file, and is subject to the corresponding license * (see "License.txt" in the parent directory). * * This program is distributed in the hope that it will be useful, * bu...
0851cf8ca32cdf26b9f5df2224bef59fc2beea8b
6f8680fd8c792afb1c553f5d7fb1dab2ffdbf071
mkowalikx1337/gitrepo1AP4
/CPP/silnia.cpp
C++
cpp
751
no_license
/* * silnia.cpp * * 0! = 1! = 1 * 2! = 1 * 2 = 2 * 5! = 1 * 2 * 3 * 4 * 5 = 120 * 6! = 5! * 6 = 720 * * n! = 1 dla n = {0, 1} * n! = 1 * ... * n dla n = N+ - {1} */ #include <iostream> using namespace std; long silnia_it(int n){ long s = 1; for(int i = 2; i <= n; i++){ s = s * i; } ...
23b4d6e5d7c1b6360adb2133c32de456a142456f
f82a1bf409d987d112c34e16c4468eaea04fcb12
finding-out/oss.FCL.sf.app.messaging
/mobilemessaging/smum/src/SmumServiceCentreItemDialog.cpp
C++
cpp
20,302
no_license
/* * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-...
be84ca887b37ca5a999b1d82e4f017023614c4fa
e75cb5ed2cdeff2ee50319e8def0ba261797b841
cxmlg/aliyun-openapi-cpp-sdk
/slb/src/model/DescribeLoadBalancerAttributeResult.cc
C++
cc
7,971
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...
84ff9c77931cad56a0d3c3377918eb97c5e49154
d5d7821701e68f0318569a96860a0ef9138a1b72
Ace17/fr_public
/altona_wz4/altona/main/base/input2.cpp
C++
cpp
18,415
permissive
/*+**************************************************************************/ /*** ***/ /*** This file is distributed under a BSD license. ***/ /*** See LICENSE.txt for details. ***/ /***...
00dec9b39c7798fe60685fb98710391369099f8c
c01ca99d22385cbbf89f41191a3e7ccc492fae38
johnbrazzell/wgu_cpp_project
/SoftwareStudent.cpp
C++
cpp
1,135
no_license
#include "SoftwareStudent.h" SoftwareStudent::SoftwareStudent(string studentID, string firstName, string lastName, string emailAddress, int studentAge, int *daysInCourse, Degree degree) { SoftwareStudent::SetStudentID(studentID); SoftwareStudent::SetFirstName(firstName); SoftwareStudent::SetLastName(lastNam...
49be4f4aeb81cfc0c6a42de882c95cfb90a76d6e
8760092de2470b79bbfca69360017e15eb6ad736
pombredanne/irkit
/include/irkit/index/raw_inverted_list.hpp
C++
hpp
5,112
permissive
// MIT License // // Copyright (c) 2018 Michal Siedlaczek // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, m...
0905cf5ff10ac06bd60f76defe08407042c90450
e9f1f392a4abcb9afaaeb3727793b47ed50df3fa
vestchain/vest-token
/unittests/delay_tests.cpp
C++
cpp
100,260
no_license
#include <boost/test/unit_test.hpp> #include <vestio/testing/tester_network.hpp> #include <vestio/chain/producer_object.hpp> #include <vestio/chain/global_property_object.hpp> #include <vestio/chain/generated_transaction_object.hpp> #include <vestio.system/vestio.system.wast.hpp> #include <vestio.system/vestio.system.a...
8eaec2031413f4e0f72933ced2050cfe944447de
fd1f04d0fc5bd9935e01bd98ba3ed8ad4c02a935
TyDunn/hacker-rank-daily-challenge
/HackerRank/Algorithms/Implementation/between-two-sets.cpp
C++
cpp
1,807
no_license
// Between Two Sets // Day #21 // Saturday, May 20, 2017 // https://www.hackerrank.com/challenges/between-two-sets #include <vector> #include <iostream> #include <algorithm> using namespace std; int lcm(vector<int>); int lcm_helper(int, int); int gcd(vector<int>); int gcd_helper(int, int); int main() { int...
57c048fcfbba32641d10bad455cfd9cbf7aa2d2d
a5a1c30afb8412d10e11ba179ac5812ef4d8bcfb
ZuLove/CPP-Concurrency
/exp-19.cpp
C++
cpp
789
no_license
#include <iostream> #include <thread> #include <list> #include <algorithm> using namespace std; std::list<int>myList; void addToList(int max, int interval) { for (int i = 0; i < max; i++) { if( (i % interval) == 0 ) myList.push_back(i); } } void printList() { for ( auto itr = myList.begin(),...
97bef3cf00b76f44e105b6e02b2cab41d168e1c4
a8532e74bedf4f2d51c3ef35444195adb7c109ea
monad-one/chromium
/components/bookmarks/browser/bookmark_model_unittest.cc
C++
cc
78,123
permissive
// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/bookmarks/browser/bookmark_model.h" #include <stddef.h> #include <stdint.h> #include <set> #include <string> #include <unordered_set> #include <utility> ...
6b9a3e3adb83ffedef5a40543f8f4c3408d8de39
f7756ab8a2b3d5ec991d0a9bd79a0572ed8f0449
BackupTheBerlios/artbody-svn
/code/fdynamics/source/core/OdeSolver.cpp
C++
cpp
7,060
no_license
/////////////////////////////////////////////////////////////////////////////// // // Copyright 1998 Mitsubishi Electric Information Technology Center // America (MEITCA). All Rights Reserved. // // Permission to use, copy, modify and distribute this software and // its documentation for educational, researc...
fcb2e94160ae811c99482ab4abd536a940fd9125
78baa13baa018eb81fd6b5e05cf1938e5e14381b
jakirkham/WAVM
/Source/Wavix/wavix.cpp
C++
cpp
11,408
permissive
#include "wavix.h" #include "IR/Module.h" #include "IR/Operators.h" #include "IR/Validate.h" #include "Inline/Assert.h" #include "Inline/BasicTypes.h" #include "Inline/Lock.h" #include "Inline/Timing.h" #include "Platform/Platform.h" #include "Runtime/Intrinsics.h" #include "Runtime/Runtime.h" #include "WAST/WAST.h" #i...
472bd53837ee03042fd61dc7ba732304b0b84585
a2f63f8447907adee8d28f9bd8b0741accc8818c
blackberry/BES10-Cascades
/ECL/app/src/pushclient/pushclientnotification.hpp
C++
hpp
2,137
permissive
/**************************************************************************** * Copyright 2012 BlackBerry Limited. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:/...
985f9a54fe85145dccd831444ef82bc5b096da2a
00f97c0e052592209485beea46d58e5d94016ac8
wjddlsy/Algorithm
/Baekjoon/baek_2564_경비원/main.cpp
C++
cpp
896
no_license
#include <iostream> #include <vector> using namespace std; int main() { int r, c, n; cin >> r >> c >> n; vector<int> stores; for(int i=0; i<=n; ++i) { int dir, dist, ret = 0; cin>>dir>>dist; switch(dir) { case 1: ret = c + dist; break...
19269e7a2cbf15a34c97f9f160972b72f8d5e1d0
743482bc0a21fb02c8aee7b480d8b78e01e78414
ghjang/rocky
/rocky/test/skull/EvenTest.cpp
C++
cpp
358
no_license
#include "../catch.hpp" #include "rocky/skull/Even.h" TEST_CASE("Even for std::integral_constant", "[skull]") { // expected compile-time error. //static_assert(Even<std::tuple<>>()); static_assert(Even<int_c_t<0>>()); static_assert(!Even<int_c_t<1>>()); static_assert(Even<int_c_t<2>>()); sta...
da3778577e8aaff1421c560904b0fdef192c6801
51708b6593a9816e826ecc08a8e0a0560762b27d
teodora2537/DiarySchool
/MFCApplication_12.04.2021/MFCApplication/MFCApplication/CTabStudent.cpp
C++
cpp
6,987
no_license
#include "pch.h" #include "MFCApplication.h" #include "CTabStudent.h" #include "afxdialogex.h" #include "Library.h" #include "Student.h" #include "CUpdateStudent.h" #include "CListMethods.h" #include <list> using namespace std; IMPLEMENT_DYNAMIC(CTabStudent, CDialogEx) CTabStudent::CTabStudent(CWnd* pP...
f841319d78a4642b831052620361a489cec9721a
1238a34e979d3562d9b1cdb47f4d1a4a40c56cb2
kpenguin/rh_project
/Cryptohaze-Combined/src/CUDA_Common/CUDA_Common.cpp
C++
cpp
3,174
no_license
#include "CUDA_Common/CUDA_Common.h" #include <cutil_inline.h> #include <cuda_runtime_api.h> // Beginning of GPU Architecture definitions inline int ConvertSMVer2Cores(int major, int minor) { // Defines for GPU Architecture types (using the SM version to determine the # of cores per SM typedef struct { int SM; /...
b1325b312d39325b430ac76d065f6f6b2f09ee2e
fa125c7fcac1ce8cec9fff2ffcdb2d5b9e8d9f3f
tpurtell/android-cpp-sdk
/android-cpp-sdk/platforms/android-9/java/lang/Math.hpp
C++
hpp
21,476
permissive
/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: java.lang.Math ================================================================================*/ #ifndef J2CPP_INCLUDE_IMPLEMENTATION ...
dbf7bb949c3f79d0b4e54c2320e375229e7c3f64
f48da103a352a77dfb789eecd10909e1dc6df050
farrer/trigger-rally-bullet
/src/PEngine/render.cpp
C++
cpp
10,302
no_license
// render.cpp [pengine] // Copyright 2004-2006 Jasmine Langridge, jas@jareiko.net // License: GPL version 2 (see included gpl.txt) #include "pengine.h" PSSRender::PSSRender(PApp &parentApp) : PSubsystem(parentApp) { PUtil::outLog() << "Initialising render subsystem" << std::endl; } PSSRender::~PSSRender() { PU...
9a714f09c3bcd74b12c9c003eebd33f327a2077a
5eaa36c684c0f702f2192c215b0137bc69959bfa
green-fox-academy/JKatalin
/week-02/day-1/11look-for-maximum/main.cpp
C++
cpp
1,041
no_license
#include <iostream> int *maximum(int size, int array[]); int main() { int size; std::cout << "Please enter the size of the array: " << std::endl; std::cin >> size; int array[size]; for (int i = 0; i < size; i++) { std::cout << "Please enter a number: " << std::endl; std::cin >> ar...