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
9409e72c2746cbe1b1fe8ab0d77e0f8ffc3880f3
b5caa4a51b4167f6451b8d0a8b615c7b73cb7bb1
azraelly/knetwork
/ACE-5.6.1/ACE_wrappers/performance-tests/Synch-Benchmarks/Perf_Test/rwrd_test.cpp
C++
cpp
936
no_license
// $Id: rwrd_test.cpp 57546 2004-05-07 21:33:02Z shuston $ #define ACE_BUILD_SVC_DLL #include "ace/RW_Mutex.h" #include "Performance_Test_Options.h" #include "Benchmark_Performance.h" ACE_RCSID(Synch_Benchmarks, rwrd_test, "$Id: rwrd_test.cpp 57546 2004-05-07 21:33:02Z shuston $") #if defined (ACE_HAS_THREADS) cla...
2ec1df3538abb980cffcf3775a2bca9027d7ce7c
b6308b35957e2e6932032bce28cbd276caeb5719
Reidond/mdb2sqlite
/wxwidgets/samples/widgets/dirpicker.cpp
C++
cpp
7,737
permissive
///////////////////////////////////////////////////////////////////////////// // Program: wxWidgets Widgets Sample // Name: dirpicker.cpp // Purpose: Shows wxDirPickerCtrl // Author: Francesco Montorsi // Created: 20/6/2006 // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows li...
d5147dc111a8c2844e03fa34cd822c881fafcc2a
97f8f3c2465f08e0cb33a085ae25c6e17470a334
metux/chromium-suckless
/ui/app_list/views/app_list_view_unittest.cc
C++
cc
27,178
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 "ui/app_list/views/app_list_view.h" #include <stddef.h> #include <string> #include <vector> #include "base/command_line.h" #include "base/macr...
ba7c80158760ad44d27d0cef5bc74b36bd404f78
4bc0d73e473c3faab5fe63c0d73aee2527829cd7
DVDPT/O-Maestro
/test/Filtros/Filters/Filters/Program.cpp
C++
cpp
5,370
no_license
#include "PlayerRecorder.h" #include "LowPassFilter.h" #include <stdio.h> #include <stdlib.h> #include "goertzel.h" #include <iostream> #include <fstream> //#include "BandPassFilter.h" #include "GoertzelStructs.h" #define __N (4400) #define __A (1000) const int SecondsOfCollection = 1; const int __Fs = 8800; //...
5e83ac3d16e0e2073d4cfd35238b0f837f84166c
9f1fa94b1db1d218201e710d805c564b7ba9ea19
15831944/Commun
/DObject/src/DObject/DObjSaveGuard.cpp
C++
cpp
2,088
no_license
// ----------------------------------------------------------------------------- // // Auteur : GENNESSEAUX Jocelyn // // Description : Classe objet // // ----------------------------------------------------------------------------- // Révisions : 10/09/2015 : // -------------------------------------------------...
bf8751c330c2be30fa8d362ac77c63b0b18b72e1
2e5990bb0fa94a3f6910c4d5d50a8d2477e3e2d3
mashoujiang/openvino
/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape_loop.cpp
C++
cpp
7,152
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "ngraph/opsets/opset6.hpp" #include "vpu/ngraph/transformations/dynamic_to_static_shape_loop.hpp" #include <vpu/utils/error.hpp> #include <vpu/ngraph/operations/dynamic_shape_resolver.hpp> #include <ngraph/ngraph.hpp> #incl...
cba440e378ef39134fe9aab86adae50f9ed503b9
b088692b6a10f9885a8c5dc9599e462f963379f4
natonato/COSE436_Interactive
/HW3_SPH_SIMULATION/SPH_skeleton2/SPH_skeleton/Viewer.cpp
C++
cpp
3,628
no_license
#pragma once #define GLM_ENABLE_EXPERIMENTAL #include <iostream> #include "Viewer.h" #include "Windows.h" #include "glm/gtx/rotate_vector.hpp" #include "glm/glm.hpp" #include "glm/gtc/matrix_transform.hpp" #include "glm/gtc/type_ptr.hpp" using namespace std; Viewer::Viewer(void) { m_Zoom = 20; for (int i = 0; i < 2...
505a57d2052a632457c967d11655250ea26a74eb
930b5f94d8ff4b088c4548f8c35ef9193d8bafc2
mbkim95/Algorithm
/Baekjoon/1629.cpp
C++
cpp
392
no_license
#include <iostream> using namespace std; long long a, b, c; long long mul(long long n, long long m) { if (m == 0) return 1; if (m == 1) return n; if (m % 2 == 1) return mul(n, m - 1) * n; long long h = mul(n, m / 2); h %= c; return (h * h) % c; } int main() { ios_base::sync_with_stdio(0); cin.tie(0)...
2e2e4d1c513fc9dca7e108cb694ee3694e52f3a8
512b38e81cb19055f85f7cb08b0669620c4acd26
zeph1912/milkomeda_chromium
/net/ssl/client_cert_store_nss.cc
C++
cc
7,577
permissive
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/ssl/client_cert_store_nss.h" #include <nss.h> #include <ssl.h> #include <algorithm> #include <memory> #include <utility> #include <vector>...
02ea4cf5b85f9e57641a3fa07e40513355911750
c0c8fac422d89042df660e2427aa02e4c7e0eeeb
thngkaiyuan/chromium
/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.cpp
C++
cpp
1,558
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 "modules/presentation/ExistingPresentationConnectionCallbacks.h" #include "bindings/core/v8/ScriptPromiseResolver.h" #include "core/dom/DOMExcep...
055988358dde9107cc6de790e037385d63af0987
9f511560ade07133b4245b1045f9fad7ba06de00
Aman12b/Uni-uebungs-bsp
/Pr1_Uebungs_Bsp/week9/Aufgabe9_4.cpp
C++
cpp
1,959
no_license
#include<iostream> #include<vector> #include<limits> #include<ios> #include"Geheim.h" //Die Klasse Geheim dient zum Speichern von wichtigen Informationen, die mit Passworten geschützt werden können. //Jedes Objekt enthält außer der zu speichernden Information (String) noch einen zweiten String, das Passwort. //Ist ...
dde5c49709b91751e6f0f820146f52abd174d356
210d907ec5fef56ab6f3a14d90a52a9fa7a63e32
giginet/MM-Lib
/mm/mm/Machine.cpp
C++
cpp
35,450
permissive
/****************************************************************************** * Copyright (c) 2013-2014, Amsterdam University of Applied Sciences (HvA) and * Centrum Wiskunde & Informatica (CWI) * All rights reserved. * * Redistribution and use in source and binary forms, with or wi...
edbc052e7e3575e5af54567c5cc6827990b4b501
fdfe00fe2a4bf2606927b5a3cc9917895777e72a
lishujun5/leecodeLearn
/others/平衡二叉树/SearchTree.hpp
C++
hpp
7,676
no_license
#pragma once /*搜索二叉树*/ #include "Tree.hpp" #include "Node.hpp" template <class T, class N = SearchNode<T>> class SearchTree : public Tree<T, N> { public: typedef N Node; typedef Node *PtNode; typedef Node &RefNode; typedef SearchTree<T, N> self; typedef Tree<T, N> FatherTree; typedef SearchTree<...
d82a58d6b080df6299d1d5cc57ad6dba405993b9
276298b38af00b2d5ae674f5554a27c62bcbf9bf
JamieMaple/LearningNotes
/cpp/primer/chap09/9.49.cc
C++
cc
739
no_license
#include <iostream> #include <fstream> #include <string> #include <vector> int main(int argc, char *argv[]) { if (argc <= 1) { std::cout << "No args provided!" << std::endl; return -1; } constexpr const char * scender = "ertuioaszxcvnm"; std::string max_word; std::ifstream input; ...
4a4c3734ae46e67f9e97ab119904a74b9332e2cc
c5b40c93630ea63b33913a6d2a73ea6a109ee42f
wfystx/LeetCodeDailyPractice
/DoublePointer/80RemoveDuplicatesfromSortedArrayII.cpp
C++
cpp
520
no_license
class Solution { public: int removeDuplicates(vector<int>& nums) { int pre1 = 0, pre2 = 0, cur = 0, cnt = 0; int n = nums.size(); while(true){ if(++cur>=n) break; if(nums[cur]==nums[pre2]){ if(pre1==pre2) pre2++; else { ...
7ab0ea3d5428fd69305ecbd3a5790e01632b43c2
3d6e0e4267bd0e2116b18fd782038dfbc48f85e5
sigurg/ssh-pam-access-control
/daemon/src/envstore.cpp
C++
cpp
723
no_license
#include "envstore.h" EnvStore::EnvStore(QObject *parent) : QObject(parent) { } void EnvStore::fromConnection(const QVariantMap &connection) { m_pamRUser = connection["pamRUser"].toString(); Q_EMIT pamRUserChanged(); m_pamRHost = connection["pamRHost"].toString(); Q_EMIT pamRHostChanged(); m...
cacd1af9fa80b9f26b63f31ab35d3aead88c059b
1cbe9de60c9fcbc9967cbb45355e8311c01dc5b9
jclifton333/stdmMf_cpp
/src/main/vfnBrAdaptSimPerturbAgent.cpp
C++
cpp
6,782
no_license
#include "vfnBrAdaptSimPerturbAgent.hpp" #include <glog/logging.h> #include <armadillo> #include <njm_cpp/linalg/stdVectorAlgebra.hpp> #include "system.hpp" #include "objFns.hpp" #include "proximalAgent.hpp" #include "myopicAgent.hpp" #include "vfnMaxSimPerturbAgent.hpp" #include "brMinSimPerturbAgent.hpp" names...
f35f6e254f33b4c38298aa35f6f99f2dc850be2d
f45d18d63b5bd74d9ba4c634cae0c1f7e3ce4d9f
SignalK/SensESP
/src/sensesp/transforms/threshold.cpp
C++
cpp
2,352
permissive
#include "threshold.h" namespace sensesp { template <class C, class P> void ThresholdTransform<C, P>::set_input(C input, uint8_t input_channel) { if (input >= min_value_ && input <= max_value_) { this->output = in_range_; } else { this->output = !in_range_; } this->notify(); } void FloatThreshold::g...
df173453c49ec16cfac294fd21c98e51599c9b2c
afb758ed1b15ad9208ef831b2f6f1da5707b3288
JoshuaHolloway/Parallel_Programming
/Parallel_Studio/Amplifier_VTune/tachyon/src/trace.tbb1d.cpp
C++
cpp
7,471
no_license
/***************************************************************************** Copyright 2017 Intel Corporation. The source code, information and material ("Material") contained herein is owned by Intel Corporation or its suppliers or licensors, and title to such Material remains with Intel Corporation or its supplie...
10c50ee9598969b6d3e29003ba1a7316271c247f
140bb30e6cd60a16a2449025fbc73109de296af8
alxndrtarasov/iroha-rest
/test/module/irohad/ametsuchi/mock_storage.hpp
C++
hpp
2,800
permissive
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef IROHA_MOCK_STORAGE_HPP #define IROHA_MOCK_STORAGE_HPP #include "ametsuchi/storage.hpp" #include <gmock/gmock.h> #include "ametsuchi/mutable_storage.hpp" #include "ametsuchi/temporary_wsv.hpp" namespace iroha...
80054036637a44023a48fa35c3476869b540d760
1a8dae863dde4d572e3c5123c50cc8e789603312
sd8917/Codeforces-Ladder-problem
/Ladder-B/B. Big Segment/B. Big Segment.cpp
C++
cpp
461
no_license
#include<bits/stdc++.h> #define ll long long int using namespace std; int main(){ ll n,l,r,minl,maxr,number; cin>>n>>minl>>maxr; for(ll i = 2 ; i <= n ; i++){ cin>>l>>r; if(l<=minl && r>=maxr){ number = i; } else if(l < minl || r> maxr){ ...
6a328cf54aba394dad7a2fc9b791355121495f5b
6de98344a37cd08d92eb01493ded6280de6bf25d
JL2718/leetcode
/solutions/0832-binary-tree-pruning/binary-tree-pruning.cpp
C++
cpp
1,376
no_license
// We are given the head node root of a binary tree, where additionally every node's value is either a 0 or a 1. // // Return the same tree where every subtree (of the given tree) not containing a 1 has been removed. // // (Recall that the subtree of a node X is X, plus every node that is a descendant of X.) // // /...
de4e3ce033c19da9e5a3016caae08240175e4ec0
9e95564e78aab2108bb3be59d44463078a705a19
rokrepo/pomdog
/include/Pomdog/Experimental/Spine/SkeletonDescLoader.hpp
C++
hpp
446
permissive
// Copyright (c) 2013-2020 mogemimi. Distributed under the MIT license. #pragma once #include "Pomdog/Experimental/Spine/SkeletonDesc.hpp" #include "Pomdog/Utility/Errors.hpp" #include <memory> #include <string> #include <tuple> namespace Pomdog::Spine { class SkeletonDescLoader final { public: [[nodiscard]] st...
cec041d76f99e402c18299300e506dd5b86bb3a1
8856db31019bfc474bad6fb1f585b7d39cbb3e13
WSquared88/MMOGame
/Engine/project/HSRC/networking/NetworkManager.cpp
C++
cpp
7,847
no_license
#include "NetworkManager.h" NetworkManager* NetworkManager::networkManager = nullptr; void NetworkManager::init() { if (networkManager == nullptr) networkManager = new NetworkManager(); } void NetworkManager::Initialize(int nThread) { SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); if (nThread > sysinfo.dwNumb...
d973f746494c37e3798403665e450776c3d109ec
e00ee0b24d06d2f3db4b185f60ffb368773fc7be
fx-dev-playground/gecko
/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp
C++
cpp
108,151
permissive
/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrOvalOpFactory.h" #include "GrDrawOpTest.h" #include "GrGeometryProcessor.h" #include "GrOpFlushState.h" #include "GrProcessor.h" #include "GrResourceProvider.h" #...
31e3215d039cad9993aa95f746cef9b6be2c632f
00b1c30aaef253396fc3ff04522643a9d2894616
Falcons-Robocup/code
/tools/multiCamRemote/src/multicastReceive.cpp
C++
cpp
46,901
permissive
// Copyright 2017-2019 Andre Pool // SPDX-License-Identifier: Apache-2.0 #include <arpa/inet.h> #include <errno.h> #include <netdb.h> #include <pwd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include "multicastReceive.hpp" // #define READFROMFILE using namespace std; multic...
2ede13a00b4fa819783cacaa59c7ef4157954fff
617e1fb0ab7f892107c7aab2ca22a0886998b89a
stevenlix/onnxruntime
/onnxruntime/test/framework/math_test.cc
C++
cc
6,674
permissive
/** * Copyright (c) 2016-present, Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
c5b35e203c2dc5a01ac8e3a09a76a19c72793cc1
f2c0ed79dab1a24167aa3a233ad4afeaa7aebca8
germanohn/competitive-programming
/codeforces/651-a.cpp
C++
cpp
645
no_license
#include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define mp make_pair #define debug (args...) fprintf (stderr, args) using namespace std; typedef long long ll; typedef pair<int, int> pii; int a, b; int main () { scanf ("%d %d", &a, &b); int i = 1; while (1) { if (a ...
6aabfff4da69dcddfd2f38079eae8d7ef8a2b74d
f0038c04358689e76e8e79785872b5be8e7d3e37
beepboop271/programming-contest-stuff
/CCC-10-J5.cpp
C++
cpp
1,520
no_license
#include <bits/stdc++.h> #define ll long long #define byte unsigned char #define pii std::pair<int, int> #define printi(a) printf("%d\n",a) #define printii(a,b) printf("%d %d\n",a,b); #define scani(vara) scanf(" %d",&vara) #define scanii(vara,varb) scanf(" %d%d",&vara,&varb) #define scanNewi(vara) int vara; scanf(" %d"...
a989cc3bb63915fa15f53d63b000e18b2a942a33
8cbe7011c69cdff4dd2bc02401fe022ed86a8452
i-Android/skia
/src/gpu/GrContext.cpp
C++
cpp
36,873
permissive
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "GrContext.h" #include "GrContextPriv.h" #include "GrContextOptions.h" #include "GrDrawingManager.h" #include "GrRenderTargetContext.h" #include "GrResourceCache.h" #...
bcca7d869e6a521b05a1a79008dac1dea7787ab7
2a8017edf88925a6c0765417cce95770db3415e0
bgpalmer/Computer-Science-II
/lab9/stack.cpp
C++
cpp
816
no_license
#include "stack.hpp" void Stack::set_user_string() { cout << "Enter a string that you would like a palindrome made from.\n"; user_string = facilitateNameInput(); } void Stack::create_palindrome() { stack <char> reverser; const char * c_str = user_string.data(); int i = 0; ...
97050243a7e385bb115dca95286287d0c8c5a4f4
803f6748863ac9e070823166d3cef92ad4286b96
hcl3210/opencv
/cv/src/cvfilter.cpp
C++
cpp
103,106
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
93401b16ad89973c699bfea453ae97b6f02283f2
85cc32021b62cafbd047d44faaf0af1278930172
fdfzjxxxStudent/CS101
/发布版unit04/棋盘最优路径 - 无障碍.cpp
C++
cpp
354
no_license
#include<iostream> #define N 5 using namespace std; int d[6][6],g[6][6],i,j; int main(){ for(i=1;i<=N;i++) for(j=1;j<=N;j++){ char ch; cin>>ch; d[i][j]=ch-'0'; } for(i=1;i<=N;i++) for(j=1;j<=N;j++) if(i==1&&j==1) g[1][1]=d[i][j]; else g[i][j]=max(g[i-1][j],g[i][j-1])+d[i][j]; cout<<g[...
85f52ac0064d879641ad4c1a9c3611743bb8e0d5
55126d0323e4f3c0cb91c7231be887739c621ca9
intel/llvm
/sycl/include/sycl/sycl_span.hpp
C++
hpp
23,611
permissive
// -*- C++ -*- //===------------------------------ span ---------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===-------------...
34a8beb7e0b65e3c494c035b4825d4712fc04a22
4a9336647c3e931e05df0e9dbc964d6f1f07797b
Sixzeroo/CodingInterviews
/C++/026.cpp
C++
cpp
2,311
no_license
/* struct RandomListNode { int label; struct RandomListNode *next, *random; RandomListNode(int x) : label(x), next(NULL), random(NULL) { } }; */ class Solution { public: RandomListNode* Clone(RandomListNode* pHead) { if(pHead == NULL) { return NULL; ...
46cfe8087d9a0b824c4c4c544682c91ccb6bdcbe
825d6ad3fac5fc9adc998d5544ba86ecb6103a94
shenhuashan/httpdownloader
/HTTP_Downloader/lite_winmm.cpp
C++
cpp
1,597
no_license
/* HTTP Downloader can download files through HTTP(S) and FTP(S) connections. Copyright (C) 2015-2020 Eric Kutcher 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 3 of the L...
be0eaab5dbf708a9869a1c7a867c750e2fe03529
7ea459ed615c9493bbb5fcb7b1bb4764e91b2d18
cms-sw/cmssw
/SimG4CMS/CherenkovAnalysis/src/PMTResponse.cc
C++
cc
484
permissive
#include "SimG4CMS/CherenkovAnalysis/interface/PMTResponse.h" #include <cmath> //________________________________________________________________________________________ double PMTResponse::getEfficiency(const double &waveLengthNm) { // Overall range if (waveLengthNm < 300. || waveLengthNm > 850) return 0.; ...
e5ae9b71f018708c6998d3d03cb01b09c5ece099
30fa0c501edb22661d48ce089840d10a9f255fdf
DeokgyuKim/MagicianWar
/Directx12/Text.cpp
C++
cpp
977
no_license
#include "Text.h" #include "Renderer.h" Text::Text(ID3D12Device* device, ID3D12GraphicsCommandList* cmdLst, Renderer* pRenderer, XMFLOAT4 xmfInfo, XMFLOAT2 Idx) : UI(device, cmdLst, pRenderer, xmfInfo, "Ui_Text_AllText") { m_xmfRatio = XMFLOAT2(0.f, 0.f); m_xmfScorllPos = Idx; m_TextCB = make_unique<UploadBuffer<T...
689b19e9719331ed52ba16ffbf1b2bb688c41d78
aa3a474a623b00232f0dd9e11b4de6869c746186
icyleaf/omim
/graphics/circle_element.hpp
C++
hpp
560
permissive
#pragma once #include "graphics/overlay_element.hpp" #include "graphics/circle.hpp" namespace graphics { class CircleElement : public OverlayElement { Circle::Info m_ci; public: typedef OverlayElement BaseT; struct Params : public BaseT::Params { Circle::Info m_ci; Params(); }...
b5f1622e2413c2f26178acbebdb8e051ed49b1e2
dfb3511f927d3bbd8f8e025dc7dbcbe97b8942e1
admb-project/admb
/examples/autodif/hemholtz/hemholtz.cpp
C++
cpp
3,094
permissive
/** * Copyright (c) 2008, 2009, 2010 Regents of the University of California * * ADModelbuilder and associated libraries and documentations are * provided under the general terms of the "BSD" license. * * License: * * Redistribution and use in source and binary forms, with or without * modification, are per...
7827bf6b0f6ed81c8d02301ca181e3f14c7fcbad
518b240d126f697a5670142834577c4c3242626c
Paul-Arts/cplus
/kap10pLesbarerCode_lst101-19p-klammern01.cpp
C++
cpp
441
no_license
#include <iostream> int func(int arg1, int arg2) { if(arg1 > arg2) { return arg1-arg2; } else { return arg2-arg1; } } int main(int argc, const char* argv[]) { (void)argc; (void)argv; //# for(int x=0; x<10; ++x) { for(int y=0; y...
060dc8a6a66a6fffd3b1e173936ed732560bbbd7
0301546bc709246550befea7fe16dac59ac1af9d
sugawaratukasa/Jobi_SugawaraTsukasa
/吉田学園情報ビジネス専門学校_管原司/ハッカソン/ソースコード/HGS_2021_Spring/scene.cpp
C++
cpp
10,469
no_license
//****************************************************************************** // リスト構造 [scene.cpp] // Author : 管原 司 //****************************************************************************** //****************************************************************************** // インクルードファイル //**********************...
817d93b1d3f16f553fdb22dcf0f9ef60d5b694d4
c21f7a049cff4d2554f9d2430c0007b64de6298b
flagbug/simutrans-extended
/gui/components/gui_halthandled_lines.cc
C++
cc
3,245
permissive
/* * This file is part of the Simutrans-Extended project under the Artistic License. * (see LICENSE.txt) */ #include "gui_halthandled_lines.h" #include "../../simcolor.h" #include "../../simworld.h" #include "../../utils/cbuffer_t.h" #include "../gui_theme.h" #include "../../player/simplay.h" #include "../../li...
9c8806702f300f6dd7820e7f94630b6d8d6d89e8
4fe0cc63b4b906c83e610264ffad2806a82f8b64
SimVascular/SimVascular
/Code/ThirdParty/vmtk/simvascular_vmtk/vtkvmtkDataSetItem.cxx
C++
cxx
1,352
permissive
/*========================================================================= Program: VMTK Module: $RCSfile: vtkvmtkDataSetItem.cxx,v $ Language: C++ Date: $Date: 2005/11/15 17:39:25 $ Version: $Revision: 1.3 $ Copyright (c) Luca Antiga, David Steinman. All rights reserved. See LICENCE file ...
4a37a358066e221f0bf5b31855274217ee77141e
f2f812ea972116ae29fa1b9489e826f65110fa46
holequotin/Data-Structures-and-Algorithm
/Sort/Select_Sort.cpp
C++
cpp
670
no_license
#include<bits/stdc++.h> using namespace std; //hàm nhập mảng void nhap(int n,int arr[]){ for(int i=0;i<n;i++){ cin>>arr[i]; } } //hàm xuất mảng void xuat(int n,int arr[]){ for(int i=0;i<n;i++){ cout<<arr[i]<<" "; } } //hàm đổi chỗ void swap(int *a,int *b){ int c=*a; *a=*b; *...
b506e6997fe3fc3ad26ebf7bf6399d7ec548ba7f
785be367ecfc1423a52385c90a583b922d8d8363
Wattisforpower/ELEC143-Coursework
/ELEC143-P1-2020-master/ELEC143-P1-2020/Code/Template/temperature.cpp
C++
cpp
4,258
no_license
//#include "mbed.h" #include "../lib/uopmsb/uop_msb_2_0_0.h" #include "BMP280_SPI.h" #include <cstring> using namespace uop_msb_200; // Using the External Buzzer extern Buzzer buzz; // Initialising the DigitalOut only for this file static DigitalOut traf1RedLED(TRAF_RED1_PIN,1); static DigitalOut traf1YelLED(TRAF...
0f6df83580c8887bf4898007a7915e6bce071297
bc213fbb1c22761d05a99fdb9e414d4bd93e7b80
pengchant/C-C-
/2.数据结构/2.2线性表-链表结构/main.cpp
C++
cpp
3,981
no_license
#include <iostream> #include <cstring> #include <cstdlib> using namespace std; // 定义数据结构 typedef struct{ char key[10]; char name[20]; int age; }Data; typedef struct Node{ Data nodeData; struct Node* nextNode; }CLType; //追加结点 CLType* CLAddEnd(CLType* head,Data nodeData){ CLType* node; CLTy...
836f4d1ec0d89c9800d6d5c0a109b74f42f13471
e5aaa34fce4ce9638bcc8c8d31107a19026b1ebb
ira20022/clonecraft
/Src/View/Frustum.cpp
C++
cpp
1,591
permissive
#include "Frustum.h" #include "Util/Logger.h" vec3 Plane::norm() const { return { x, y, z }; } bool Plane::contains(vec3 point) const { return glm::dot(norm(), point) >= -w; } void Plane::normalize() { *this /= glm::length(norm()); } inline vec3 firstPointCrossed(const Box& box, vec3 norm) { vec3 poi...
eb193b2220a2a1ed63faee163d10c64bea227fd5
f51fb31c8113e8edbce3a420358d30f01a9f9fe0
hiroin/webserv
/prototype/recvData.hpp
C++
hpp
602
no_license
#ifndef _RECVDATA_H_ #define _RECVDATA_H_ #include <iostream> #include <string> #include "ft.hpp" #include <sys/socket.h> #include <unistd.h> #include <errno.h> class recvData { private: static unsigned long recvBuffsize_; public: void clearData(); void setSocketFd(int fd); bool recvFromSocket(); bool cu...
b2a3586cce7be4f7f631c39450229b91c7d15ca5
cffbf84d193378843d775f6ec05829deb982745b
Nitish-Chandra-Thakur/Cpp_Basics
/return_digits_after_decimalpoint.cpp
C++
cpp
300
no_license
#include<bits/stdc++.h> using namespace std; string returnDigits(const string &str) { int pos = str.find('.'); if(pos == string::npos) return ""; else return str.substr(pos+1); } int main() { string str = "12.5318"; cout<<returnDigits(str); }
219a4697de15bb687c1f9a6e4733cc03722e6b5d
b7fafb41858bd2c8ee742ca93f0e5be73b7ef0bf
mharriso/CPP-piscine
/module_07/ex01/include/iter.hpp
C++
hpp
456
no_license
#ifndef ITER_HPP #define ITER_HPP #include <iostream> template <typename T> void iter(T *array, size_t n, void f(T &elem)) { for (size_t i = 0; i < n; i++) f(array[i]); } template <typename T> void inc(T &elem) { elem++; } template <typename T> void multiply21(T &elem) { elem *= 21; } template <typename T> vo...
dd22647a1b13d56b0b8b4ce7e6dbe9b7c6a35f47
285c36f451909dbeb71f0d7912053b9c9078da32
miningape/online
/helpers/helper.hpp
C++
hpp
393
no_license
#ifndef HELPER #define HELPER #include <iostream> void log( std::string text ) { std::cout << "== " << text << " ==" << std::endl; } template<typename T> void logVector ( std::vector<T>& vector ) { for (auto i = vector.begin(); i != vector.end(); ++i) std::cout << *i; } void logError( std::string t...
751419e60e4af3433237ec37dbe395611caa6e47
9f43ad7198f9034477d5fece99640c19547eb59b
mihainsto/FMI
/Year 1 Sem 2/pooExamQuestions/probleme/112.cpp
C++
cpp
209
no_license
#include <iostream.h> class cls { int x; public: cls(int y) { x = y; } int operator*(cls a, cls b) { return (a.x * b.x); } }; int main() { cls m(100), n(15); cout << m * n; return 0; }
d9565e4bc48a7977c7ad4e624acd8e0b2a134433
9477a94be7a55d23dab987b408ca20a8278bb71d
khoahocmaytinh/GameEngine
/Game/main.cpp
C++
cpp
214
no_license
#include <stdio.h> #include "../Stone/Core/SApp.h" #undef main int main() { if (SAPP->init("Pong", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_SHOWN)) { SAPP->run(); } return 0; }
a322becb129f49cb015c242077547b9d58c0cca2
0cc112a4ca127e0541889a67eadfc9ba0c8bba09
bikemike/quiver
/src/Timer.cpp
C++
cpp
1,017
no_license
#include <config.h> #include "Timer.h" using namespace std; /* Timer::Timer(bool quiet) { m_bQuiet = quiet; StartTimer(); } */ Timer::Timer() { m_bQuiet = true; StartTimer(); } Timer::Timer(string strFunctionName, bool bQuiet /* = false */) { m_strFunctionName = strFunctionName; m_bQuiet = bQuiet; StartTimer...
a97a89bca7b09113aba1dabd560ebbc329dbcbed
11094f7c5897c328dbe341e2723a74fadef05add
zjj2016/aliyun-openapi-cpp-sdk
/vcs/src/model/CreateCorpRequest.cc
C++
cc
1,844
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...
d93abba33b131165d731920d371f852242eb9c1b
103ad6d180a70321c9af1de2d4753aaa7422d5d7
randall86/LED_Tester_System
/libraries/DTIOI2CtoParallelConverter/DTIOI2CtoParallelConverter.cpp
C++
cpp
3,865
no_license
#include <DTIOI2CtoParallelConverter.h> DTIOI2CtoParallelConverter::DTIOI2CtoParallelConverter(byte SlaveAddress) { _SlaveAddress = SlaveAddress; } bool DTIOI2CtoParallelConverter::twiRead(byte &registerAddress) { Wire.beginTransmission(_SlaveAddress); Wire.write(registerAddress); if(Wire.endTransmission(fa...
74e3bc2cef1c9e30245f942f8c706e922a08c7c4
67da9838df3933750d7fac8bb324662a9261b344
Muzahid037/Data-Structure
/String/detect char in a str.cpp
C++
cpp
245
no_license
#include <stdio.h> #include <string.h> int main () { const char str[] = "http://www.tutorialspoint.com"; const char ch = '.'; char *ret; ret = strchr(str, ch); printf("String after |%c| is - |%s|\n", ch, ret); return(0); }
302ae84442bccf9242a956613f663607316cb2cf
e08a2cda7d40b32e98ab08244288e0e85e9644ca
wisdomroc/TestQuick
/Src/TreeItem.cpp
C++
cpp
2,204
no_license
#include <QStringList> #include <QDateTime> #include "TreeItem.h" #include "define.h" TreeItem::TreeItem(TreeItem *parent) { mParentItem = parent; mPtr = NULL; mLevel = 0; mRow = 0; } TreeItem::~TreeItem() { removeChilds(); } void TreeItem::appendChild(TreeItem *item) { item->setRow(mChildItems...
9a63ac434ac0cdf878ad1e92b6871b6249d045fa
41d3c170ae2f44a7681308015d73a460422d41a7
Frank-Wu/Snapshot
/virtualization/shared_client.cpp
C++
cpp
622
no_license
#include "process.h" #include "hacker.h" int main(int argc, char **argv){ if(argc!=2){ std::cout<<"please provide the parameter!"<<std::endl; return -1; } std::cout<<argv[1]<<std::endl; int tenantId=atoi(argv[1]); std::cout<<"tenantId="<<tenantId<<std::endl; srand(time(0)); char *state=(char *)myAlloc(tenan...
58b8b822ebc0513f0e13992542d9f5d180496dc7
b85c6fdc2463c63c005f906af36ba503c840c48c
radtek/NG_Beijing54
/beijing45/beijing54/NGMap/NGPyramidMapGeo.cpp
C++
cpp
3,029
no_license
#include <stdio.h> #include <math.h> #include <string.h> #include "NGPyramidMapGeo.h" char gSzLdf_FileName[] = "LAYERDESCRIPTIONFILE.LDF"; char gSzLayer_Prex[] = "ImagePyramid/Layer"; #pragma warning(disable:4996) CNGPyramiMapGeo::CNGPyramiMapGeo() { m_DefaultValue = 0; m_MapDataType = NG_MT_UNKNOWN_MAP_TYPE; m_X...
a307599439a1ea40977e1ffbbc1da28fea04f084
a79122cccf0a8f3cc2f9fadb68a28e2ac2bcddeb
algorithm-exploration/set-theory
/magic-squares/tests.cpp
C++
cpp
809
no_license
#include "min_cost_magic_square.hpp" int main() { cout << "\nThese are the possible magic squares for this size square:\n"; // ofstream fout(getenv("OUTPUT_PATH")); ifstream fin("input.txt"); vector<vector<int>> s(3); for (int i = 0; i < 3; i++) { s[i].resize(3); for (int j = 0; ...
2db0b1376e9e7239825b87deeb2f222604cfbaf9
2eb6a5ee1afbef67a647c03064e83a64c499e353
nbgao/Leetcode
/valid-parentheses.cpp
C++
cpp
720
no_license
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cstring> #include <string> #include <cmath> #include <cctype> #include <vector> #include <stack> using namespace std; class Solution { public: bool isValid(string s) { int l = s.length(); stack<char> st; ...
e054cf0971963b11815e7637ef4f7d277f087ee5
29ffdefd95e0653c61a3c3d9ae739f15e05ef48e
kimmoli/psic
/src/psic.cpp
C++
cpp
1,498
no_license
#include "psic.h" #include <QDebug> #include <QThread> psic::psic(QObject *parent) : QObject(parent) { qDebug() << "initialising"; socket = new QTcpSocket(this); connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead())); } psic::~psic() { socket->disconnectFromHost(); qDeb...
bc15189d657ab51ec9f6fc357d9c5c2a6020f9cc
573e9bfefaedcb83ebf8975ecc3b7dd97704710f
ljb2208/osr-rover-code
/osr_perf/src/robot.cpp
C++
cpp
3,512
no_license
#include "../include/robot.h" robot::robot() { mc.connect(); } robot::~robot() { } void robot::setDistances(float d1, float d2, float d3, float d4) { this->d1 = d1; this->d2 = d2; this->d3 = d3; this->d4 = d4; } void robot::setEncoderValues(int* enc_min_vals, int* enc_max_vals) { for (int i=0; i < 4; i++) {...
90ca504df069b95c6422ca401c0b225685275e55
23370e1c023185d975739f21abc46845af8eed81
zenoalbisser/chromium
/third_party/mojo/src/mojo/public/cpp/utility/lib/mutex.cc
C++
cc
1,214
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 "mojo/public/cpp/utility/mutex.h" #include <assert.h> #include <errno.h> namespace mojo { // Release builds have inlined (non-error-checking) ...
f8acbe7af68190283379e925e65fe2cf6e4a5ccf
72cac09749019592cb61c0324b7454632f47e772
arnabgho/competitive_programming
/potpourri/Jan_15_GCDQ.cpp
C++
cpp
4,609
no_license
#include"assert.h" using namespace std; struct segtree_node{/*{{{*/ public: void merge(segtree_node&, segtree_node&){} void split(segtree_node&, segtree_node&){} };/*}}}*/ template<class node> class segtree{/*{{{*/ template<bool b>class param{}; inline void spltdwn(int idx,param<true>){splt(idx);} inline void sp...
ac5f0f95625a5b311a3320a3eb001450b9358a84
874ed1bcab00392133ecdfd044f8c769c01ba23c
oertl/bagminhash
/c++/weighted_minwise_hashing.hpp
C++
hpp
21,281
no_license
//################################## //# Copyright (C) 2018 Otmar Ertl. # //# All rights reserved. # //################################## #ifndef _WEIGHTED_MINWISE_HASHING_HPP_ #define _WEIGHTED_MINWISE_HASHING_HPP_ #include "bitstream_random.hpp" #include <vector> #include <algorithm> #include <functional...
f63ac457366c14453ac9419872a61dbebe19587d
8fffab617920db6b5b75203e2d651dae514d8bea
ostiff/c89-mips-compiler
/src/ast/ast_int.cpp
C++
cpp
609
no_license
#include "ast_int.hpp" void Integer_Constant::printPy(std::ostream &dst, int depth) const{ dst << value; } void Integer_Constant::printMips(std::ostream &dst, Context &ctx) const { dst << value; } void Integer_Constant::printMipsExpr(std::ostream &dst, std::string &destreg, Context &ctx) const{ int tmp_...
14b597df4ab899d9160c4e5266f1c52779391116
edb2bb6b4f6aa8349543a737d77850d9dd5d0729
sds-tools/LemmaGen
/lemmagen/source/main/lemTest.cpp
C++
cpp
1,179
no_license
/****************************************************************************** This file is part of the lemmagen library. It gives support for lemmatization. Copyright (C) 2006-2007 Matjaz Jursic <matjaz@gmail.com> The lemmagen library is free software; you can redistribute it and/or modify it under the terms of ...
bacac3ab5d2618936b8cafc4856353f92bec38a3
abf58c2a09d804d18eab97ec5136f023dcc9a00a
Tanjim131/Problem-Solving
/Codeforces/1100/260-2-A.cpp
C++
cpp
707
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Laptop{ int price, quality; bool operator < (const Laptop &lapotp) const{ return price < lapotp.price; } }; int main(int argc, char const *argv[]) { int n; cin >> n; vector <Laptop> laptops(n); ...
18870c27f9fa1609f387c41d521592901ed443c2
26c118b0eef4b2d67f504498dac72d0933b04c60
zdnscloud/zdhcp
/slave/configure/json_conf.cpp
C++
cpp
5,459
no_license
#include <kea/configure/json_conf.h> #include <kea/util/strutil.h> #include <vector> #include <fstream> #include <streambuf> namespace kea { namespace configure { std::unique_ptr<JsonConf> JsonConf::parseFile(const string& path) { std::fstream f(path); std::string json_str((std::istreambuf_iterator<char>(f))...
a18d1bb10c171a8f43e9d34eb90916d74c2b8d35
f2affe0f9bad3e15f96d91afa6d79dc7257a30bc
lab305itep/digi
/drawstat.cpp
C++
cpp
3,316
no_license
#include <string.h> #include <stdlib.h> void drawstat(char * fname = "stat_all.txt", int startfile=5540, int col = 8, int mask = 0xFFFFFFFF, char * listpref = "danss_root/") { FILE *f, *fl; char line[1024]; char * ptr; int i, first = -1, last, n, type; double val, min=1e10, max=-1e10; const in...
5dc9d8330c84e7bc4a787defe64f17d1a3ac06e0
a9accefc4683ca4a6882aaf2d3bb12e243969d48
jjzhang166/WinNT5_src_20201004
/NT/net/config/shell/netsetup/wmain.cpp
C++
cpp
15,736
no_license
// *************************************************************************** #include "pch.h" #pragma hdrstop #include "resource.h" #include "wizard.h" #include "ncreg.h" #include "ncui.h" extern const WCHAR c_szEmpty[]; // *************************************************************************** // Fu...
a5ddb48cc3356a40e83a7499f8e0e3cfbf081f96
a00485bc276467f545eeb91ba5b0d2414f184d0f
abarriel/cpp
/d01/ex05/main.cpp
C++
cpp
215
no_license
#include "Human.hpp" #include <iostream> #include "Brain.hpp" int main(void){ Human bob; std::cout << bob.identify() << std::endl; std::cout << bob.getBrain().identify() << std::endl; return 0; }
328173b2a85e5e4edf3de7e6a2fcd9f13ca5729a
026db2d3cd0d0c45f7f2e266775b75426cfbb06f
Schlam/chromium-white-flash-fix
/cc/surfaces/surfaces_pixeltest.cc
C++
cc
12,420
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 "cc/output/compositor_frame.h" #include "cc/quads/render_pass.h" #include "cc/quads/solid_color_draw_quad.h" #include "cc/quads/surface_draw_quad...
56b6a695202bdbb82a79bef6e3f3dc5471df832d
847dbf9e6e185fe5bab9ddd4aa9b24f095a006a2
xrick/word_spotting
/src/dataset.cpp
C++
cpp
18,784
permissive
//======================================================================= // Copyright Baptiste Wicht 2015-2017. // Distributed under the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //======================================================================= #include ...
fef7f030a0614697ed9beb364b077b80814e7b75
6f6a80edcbeb6fb55d22b9d0ec59af1250011147
Btotals/mini-renderer
/src/util/geo.cc
C++
cc
474
no_license
#include "./geo.h" template <> template <> Vector<3, int>::Vector(const Vector<3, float>& v) : x(int(v.x + .5f)), y(int(v.y + .5f)), z(int(v.z + .5f)) {} template <> template <> Vector<3, float>::Vector(const Vector<3, int>& v) : x(v.x), y(v.y), z(v.z) {} template <> template <> Vector<2, int>::Vector(const Vector...
ba082b6a5f5e2ded37f56884fbebb1f3553a4f7e
b488b41b99236e0179fcec5d00de96ce3ad74d84
laojiang19/hikyuu
/hikyuu_cpp/unit_test/libs/hikyuu/trade_sys/system/test_Simple_SYS_for_base.cpp
C++
cpp
7,771
permissive
/* * test_SYS_Simple.cpp * * Created on: 2013-4-20 * Author: fasiondog */ #ifdef TEST_ALL_IN_ONE #include <boost/test/unit_test.hpp> #else #define BOOST_TEST_MODULE test_hikyuu_trade_sys_suite #include <boost/test/unit_test.hpp> #endif #include "test_sys.h" #include <hikyuu/StockManager.h> #in...
084b4511216782891910d5a2fa06ee1cf291eb0e
7d4b260af2b151f9343c252c2d715bcb8867e4ad
surega/login-id
/primebetween.cpp
C++
cpp
328
no_license
#include <iostream> using namespace std; int main() { int a,b,c,i; cout<<"enter the value of a,b"<<endl; cin>>a>>b; while(a<b) { c=0; for(i=2;i<=a/2;i++) { if(a%i==0) { c=1; break; } } if(c==0) cout<<a<<" "; ++a; } retu...
e2a95a31bab3ad5bd501e8dac07fec8f1edeca2b
78e2e3dae22a382c09fa531ebc0179510e46c300
gr-sheryl/GraphPi
/src/run_brute_force_tc.cpp
C++
cpp
1,185
permissive
#include <../include/graph.h> #include <../include/dataloader.h> #include "../include/pattern.h" #include "../include/schedule.h" #include "../include/common.h" #include <iostream> #include <string> #include <cstdlib> int main(int argc,char *argv[]) { if (argc != 3) { printf("Please give a name of da...
def681fc21507058bad5e2e9b8096c924ca5b810
6b510e8d49d94c4364ef83b074c20a3ee14a5419
BlueAndi/esp-rgb-led-matrix
/lib/HalTftDisplay/src/Board.cpp
C++
cpp
5,681
permissive
/* MIT License * * Copyright (c) 2019 - 2023 Andreas Merkle <web@blue-andi.de> * * 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 ...
9398b733ef8e992bf874014c160c6e5d6f4a5b33
e7d5b8bb86d31f92454f5574c2c96ea80ab359ad
foonathan/type_safe
/test/constant_parser.cpp
C++
cpp
739
permissive
// Copyright (C) 2016-2020 Jonathan Müller <jonathanmueller.dev@gmail.com> // This file is subject to the license terms in the LICENSE file // found in the top-level directory of this distribution. #include <type_safe/detail/constant_parser.hpp> #include <catch.hpp> using namespace type_safe; TEST_CASE("detail::par...
3259fd00b6204b64560f372d1da9e8d9dda51183
e9d08feb7aca2d6ca65a01be652cb4d371dcacf3
SAN-CHAIN/sand
/src/ripple/overlay/impl/PeerSet.cpp
C++
cpp
5,540
permissive
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is h...
9ab41956df2888b7e47054a79bbcd00969603add
72cbbda41ee80c57cae49ee4baa725bc09858118
byte4byte/cloudretro
/content/browser/renderer_host/render_widget_host_view_android.cc
C++
cc
96,492
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 "content/browser/renderer_host/render_widget_host_view_android.h" #include <android/bitmap.h> #include <utility> #include "base/android/bu...
b7ae61ee2b24b7ab84cb6ef2dbc02c256553fd64
5b306790d93761d4e072acac594e239d568afc97
hjybdrs/ananas
/tests/test_future/TestFutureWhenAll.cc
C++
cc
1,087
permissive
#include <thread> #include <iostream> #include "net/EventLoop.h" #include "net/Application.h" #include "util/ThreadPool.h" #include "future/Future.h" using namespace ananas; template <typename Type> Type ThreadFunc() { std::cout << "SetValue 10\n"; return Type(10); } void ThreadFuncV() { std::cout << "Se...
122e7f6faefbb79d25f3d47810f88cf39d57474f
fa04cdb7254ae337b602b753a7acfb882293a418
nxboost/nxboost
/src/hash.cpp
C++
cpp
2,549
permissive
// Copyright (c) 2013-2014 The Bitcoin developers // Copyright (c) 2017 The PIVX developers // Copyright (c) 2018-2019 The NXBoost developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "hash.h" #include "crypto/hma...
f50e5d527214cf3f6d89a4c20e80f57db3c3c2a7
efa1314c94e30385c80f695b6b43c750f5d978e5
fxcebx/libdynd
/src/dynd/types/type_id.cpp
C++
cpp
1,307
permissive
// // Copyright (C) 2011-15 DyND Developers // BSD 2-Clause License, see LICENSE.txt // #include <dynd/types/type_id.hpp> using namespace std; using namespace dynd; std::ostream &dynd::operator<<(std::ostream &o, type_kind_t kind) { switch (kind) { case bool_kind: return (o << "Bool"); case sint_kind: ...
fab670904793aa0fbd743effac24c82056dea6ed
3a3049753a347790a8e3439e60f67f3bf47e9fe2
marsaud/staticworld
/src/StaticArea.cpp
C++
cpp
1,793
no_license
#include "StaticArea.h" StaticArea::StaticArea(std::string const& key, std::string const& scenarioDir) { m_zoneLinker = new ZoneLinker(scenarioDir + "/" + key + "/" + ZoneLinker::ZONE_LINK_FILE); m_loadSet(scenarioDir + "/" + key); m_key = key; } StaticArea::~StaticArea() { delete m_zoneLinker; m_...
4a766f611fe38e4bd00e39801f8689df827cf2fd
fd25d031e0ed390808de8765dd934090b284f3db
Lewanchik/abstractVM
/classes/Parser.hpp
C++
hpp
569
no_license
#pragma once #include <regex> #include <sstream> #include "Calculator.hpp" #include <iomanip> #include "../inc/includes.hpp" #include "VMLogic.hpp" class Parser { public: Parser() = default; void executeCommandWithArguments(VMLogic &vmLogic); void executeCommnadWithoutArguments(VMLogic &vmLogic); v...
d29e57a7bd618811d02f14e2ea81a981020eec10
6bc9a1fbd251cef7050128631278b4c54c136326
Csineneo/Vivaldi
/chromium/third_party/blink/renderer/platform/bindings/parkable_string_test.cc
C++
cc
34,080
permissive
// Copyright 2018 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 <limits> #include <random> #include <thread> #include <vector> #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_featur...
803f53151016f8a7f9366290b4bc8218a99d0c9e
bf7767efbabcd8bf0a66238ee1cf85beb1f48c5e
bopopescu/jstrace
/content/browser/shared_worker/shared_worker_host.cc
C++
cc
10,928
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/shared_worker/shared_worker_host.h" #include "base/metrics/histogram.h" #include "content/browser/devtools/shared_worker_devtoo...
1fc832c36a2e9e5bd6b4a0ce4a6a37d15220b48a
2e58127de20c3e43894db02c4d6a972e10cb7be1
formid/worm_cv
/worm_cv/worm_cv/main.cpp
C++
cpp
1,104
no_license
#include "stdafx.h" using namespace std; using namespace cv; bool Image_Get(Mat & binary_image, int img_index); int BW::BINARY_THRESHOLD = 80; int PIC_START = 1951; int PIC_END = 3100; //const string file_path = "..\\..\\worm_pic\\"; //const string file_path = "..\\..\\..\\Elegan_Images\\Group6\\Centroid\\image_"; /...
ad3dd4dfa401088077ce8e532fd7d7d05db53b1a
77d81fbd5269c3103843692fd07edee3e9d39015
sakshistar/LeetcodeSolutions
/Binary Search/findMedianOfSortedArray.cpp
C++
cpp
934
no_license
class Solution { public: double findMedianSortedArrays(vector<int>& A, vector<int>& B) { int n=A.size(); int m=B.size(); if(m<n) return findMedianSortedArrays(B,A); int l=0; int r=n; while(l<=r){ int px=(r-l)/2+l; int py=(n+m+1)/2-px; ...
b72e6c56e1d7f2210cb7da1a0147752ae4f0c86d
3f4966cfecbab88b725ed52c4e925d0bfd9e48e7
harshagrwl/Competitive-Programming
/Codeforces/alicendthelistofpresents.cpp
C++
cpp
892
no_license
#include<bits/stdc++.h> #define MAX 9223372036854775807 #define endl "\n" #define ll long long #define int long long #define double long double #define pb push_back #define pf pop_front #define mp make_pair #define ip pair<int, int> #define loop(i,n) for(int i=0;i<n;i++) #define loops(i,s,n) for(int i=s;i<=n;i++) #de...
c32e5c6691cafaf1e4c7d42536da2682ea5b426f
5daf1aab47c3cb233ceb9bad6e9c17745ddb7add
Benntobox/EulerProblems1
/EulerProblems1/main.cpp
C++
cpp
548
no_license
// // main.cpp // EulerProblems1 // // Created by Benjamin Boyle on 9/18/19. // Copyright © 2019 Benjamin Boyle. All rights reserved. // #include <iostream> using namespace std; // return sum of all numbers between 1-1000 that are multiples of 3 or 5 int calcSum(int n) { int total = 0; for (int i = 0; i ...
94f145390c320dbe55119935653b7cf873f6bb28
903f1a9c91afde63cbb9b606757a33342ad6371a
ibmruntimes/node
/deps/icu-small/source/i18n/numfmt.cpp
C++
cpp
47,566
permissive
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * Copyright (C) 1997-2015, International Business Machines Corporation and * others. All Rights Reserved. *******************...
cc663dc162120f71cb20c2e258e49c22d2795e94
234ef90472ae95380650d6faf5396ed0d80fcf94
RomanBelkov/python-trikRuntime
/siptrikControltrikControlObjectSensorInterface.cpp
C++
cpp
9,493
no_license
/* * Interface wrapper code. * * Generated by SIP 4.18.1 */ #include "sipAPItrikControl.h" #line 10 "ObjectSensorInterface.sip" #include <objectSensorInterface.h> #line 12 "./siptrikControltrikControlObjectSensorInterface.cpp" #line 101 "/usr/share/sip/PyQt4//QtCore/qvector.sip" #include <qvector.h> #line 16 "...
960df241566181672491accc56935410fef5801b
c9539ab1bdb7ff6fabfbceec18b043bdacc5996d
dbuskariol-org/chromium
/chrome/browser/ui/webui/theme_source.cc
C++
cc
10,126
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/ui/webui/theme_source.h" #include "base/bind.h" #include "base/memory/ref_counted_memory.h" #include "base/strings/string_nu...
c473e0f0c9db15fb2018c823dc86a7a311750d24
d7e65771bae3c6379cf82e84f241b087cddad9ad
daniel94104/chess-game
/Knight.cc
C++
cc
1,720
no_license
#include "Knight.h" #include "Game.h" using namespace std; Knight::Knight(){ setType('N'); } bool onBoard(int x, int y){ return (x >= 0 && x <= 7) && (y >=0 && y <=7); } vector<Move> Knight::getMoves(){ vector<Move> moves; if(onBoard(x+2, y+1) && (!game->pieceAt(x+2, y+1) || !sameCase(type, game...