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
dc4b9a1f57c84419e74670d1921a1d8c3dc4fcc8
6658f4461cb669da98b56fa8833f6758333ef14a
atatomir/work
/_Practice/Baltic OI/Baltic OI 2018/Day 1/B/main.cpp
C++
cpp
2,057
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <cmath> using namespace std; #define mp make_pair #define pb push_back #define ll long long const int maxN = 200011; struct aint { int data[maxN * 2 + 11]; int frm(int l, int r) { return (l + r)...
70717187ee03bd35a8d11dfd3381bfad24b54708
e2170b321cc28bea65775245d91f593e98d393a0
BoxBy/Cpp
/20191017/Exercise03.cpp
C++
cpp
573
no_license
#include <iostream> #include <string> using namespeace std; class BC1 { // base class 1 int x; public: void set_x(float a) { x = a;} }; class BC2 { // base class 2 int x; public: void set_x(char a) { x = a; } }; class DC : public BC1, public BC2 { int x; public: void set_x(int a) { x = a; } }; void tester(){ ...
02d17109a8481e93b1d4a64188c513401671f0aa
53967e63a6c11b24b03e14ff4feb64b4e2eb91db
ku-alps/cse17_keunbum
/Baekjoon/solved/11375/sol.cpp
C++
cpp
983
no_license
#include <iostream> #include <vector> #include <functional> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<vector<int>> g(n); for (int i = 0; i < n; i++) { int t; cin >> t; while (t--) { int j; cin >> j; j--; g...
977b3f5349f822edb660d38e1e003d2f2d4991da
aa2e34e46887b6f55449892c38ae4a9f7bb57a71
tmyksj/atcoder
/Judge System Update Test Contest 202004/C - Numbering Blocks/main.cpp
C++
cpp
1,100
no_license
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int a1, a2, a3; cin >> a1 >> a2 >> a3; vector<int> p(a1 + a2 + a3); for (int i = 0; i < a1 + a2 + a3; i++) { p[i] = i; } int res = 0; do { bool f = true; for (int i = 0; i...
43cc22fd25c13a16e5466fa56dcea800eb28dcb6
265579ead2410c0daf317c0d2a66f74977cc8dcf
wgnet/wds_qt
/qtdeclarative/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp
C++
cpp
22,133
permissive
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercia...
9b61e54ad61c106b5824ed5dfde4a0641de06087
24e57cd41e07718cb5e12591a452108fb6e61dd4
vxl/vxl
/core/vil/tests/test_sample_profile_bicub.cxx
C++
cxx
2,082
no_license
// This is core/vil/tests/test_sample_profile_bicub.cxx #include <vector> #include <iostream> #include "testlib/testlib_test.h" #ifdef _MSC_VER # include "vcl_msvc_warnings.h" #endif #include "vxl_config.h" // for vxl_byte #include "vil/vil_image_view.h" #include "vil/vil_sample_profile_bicub.h" static void test_samp...
771fc3b8f769dc04655a9a62c7ce65f9b9c48808
707897f175f709a189731b34c224d313db7e7609
Laymalay/Start
/include/Pet.hpp
C++
hpp
720
no_license
#include <string> #ifndef PET_HPP_ #define PET_HPP_ class Pet { public: Pet (); std::string condition_; std::string thoughts_; void shower (); void food (); void WC (); void Game (); void Sport (); void Work (); void Cure (); void placebo (); int propertyOfCondition (int &condition); voi...
dea21b568b79942dd457bfd728b0d6f8124031bc
22cfcb5ddf06d7eee1b79f038b61f8b0bafbf5ad
imLogM/code_practice
/leetcode/cpp/62_不同路径.cpp
C++
cpp
1,182
no_license
//一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。 // //机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。 // //问总共有多少条不同的路径? // // // //例如,上图是一个7 x 3 的网格。有多少可能的路径? // //说明:m 和 n 的值均不超过 100。 // //示例 1: // //输入: m = 3, n = 2 //输出: 3 //解释: //从左上角开始,总共有 3 条路径可以到达右下角。 //1. 向右 -> 向右 -> 向下 //2. 向右 -> 向下 -> 向右 //3. 向下 -> 向右 -> 向右 ...
225b3547a9918d59859145f1e29c72097e32c0bb
fa47792a9f9dc680446b72c9c6ff146ff8eff0cc
chilung1224/mavros
/mavros/src/plugins/setpoint_velocity.cpp
C++
cpp
2,979
permissive
/** * @brief SetpointVelocity plugin * @file setpoint_velocity.cpp * @author Nuno Marques <n.marques21@hotmail.com> * @author Vladimir Ermakov <vooon341@gmail.com> * * @addtogroup plugin * @{ */ /* * Copyright 2014 Nuno Marques. * * This program is free software; you can redistribute it and/or modify * it u...
b16dde65ef6ab721d9f072f9a193de518e5a6d54
0bbbf4006675780288599bef6ba9c8b2335d7ba7
hefen1/chromium
/chrome/browser/history/history_backend.cc
C++
cc
95,269
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/history/history_backend.h" #include <algorithm> #include <functional> #include <list> #include <map> #include <set> #include...
dfe17024f021d14deb9f3087458a65314599f3ce
ba78a320cf4e4988c50c15c0fe196017cae08a41
tudodetalhado/varios
/KinectPCL-master/src/KinectGrabber/PcdGrabberFromFile.cpp
C++
cpp
3,997
permissive
#include "PcdGrabberFromFile.h" #include <pcl/io/pcd_io.h> namespace pcl { pcl::PcdGrabberFromFile::PcdGrabberFromFile() : running(false) , quit(false) , signal_PointXYZ(nullptr) , signal_PointXYZRGB(nullptr) { setFramesPerSecond(30); signal_PointXYZ = createSignal<signal_Kinect2_PointXYZ>(); sig...
41a74b3ecd0c273d4500f977af3f11236db30db1
bd73e7c80fe204242b32b4754d7da8bf7a4562d1
LLVMCOpt/COpt
/lib/Transforms/COpt/Opt-GVN/source/GlobalVN.cpp
C++
cpp
46,241
permissive
#include "llvm/Pass.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Analysis/GlobalsModRe...
3d3ce83ff25192c9bc4c3278dcc266764c578f1a
dc9fbb6d3c65de9680e9c848f1ddffe78813e5da
FaiScofield/boost_guide
/container/bimap.cpp
C++
cpp
5,605
permissive
// Copyright (c) 2015 // Author: Chrono Law #include <iostream> using namespace std; #include <boost/bimap.hpp> #include <boost/bimap/vector_of.hpp> #include <boost/bimap/list_of.hpp> #include <boost/bimap/multiset_of.hpp> #include <boost/bimap/unordered_set_of.hpp> #include <boost/bimap/unordered_multiset_of.hpp> #in...
40071f7f94a0fc3444188a5933dafc3e135be407
818c19ad30a57d7cac9c88cec8efbc2cf91e6701
zerotrac/DailyCompetitive
/ICPC/NAQ2021/H.cpp
C++
cpp
2,323
no_license
#include <iostream> #include <iomanip> #include <fstream> #include <cmath> #include <cstdlib> #include <cstring> #include <climits> #include <algorithm> #include <numeric> #include <utility> #include <random> #include <chrono> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include...
532348a6551ee3b2409560762363f1d8dd8aff3b
ed3699ac14e7309a10b4347df5d343cd134c2071
RanXacT/renderdoc
/qrenderdoc/Code/ReplayManager.cpp
C++
cpp
12,339
permissive
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2019-2020 Baldur Karlsson * * 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...
2bf965e652a0b9d766cb1db2129cc36fcd112ad3
f39b03677fbf26f6e461f788b1c6b519179d06a8
Rika-Nika/Lab2_1
/Laba2_1/Laba2_1.cpp
C++
cpp
33,994
no_license
// Laba2_1.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include"ArraySequence.hpp" #include"Sequence.hpp" #include <iostream> #include "DynamicArray.hpp" #include "Exception.h" #include "LinkedList.hpp" #include "LinkedListSequence.hpp" #include "Queue.hpp" //#inc...
12a159535dac1c9dc529680599e87999107f6de5
2806f9e29e1fc85c13b628156662d81ce3601721
bstandley/mdsplus
/device_support/camera_utils/camstreamutils.cpp
C++
cpp
9,998
permissive
#include <stdlib.h> #include <stdio.h> #include <limits.h> #include <string.h> using namespace std; #include <iostream> //tcp sender #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <unistd.h> #include "camstreamutils.h" //****************************************...
211f1b8890862e936e982e11476c1882e1363566
0efe43c205c74ce9f5efd28b9722eae47d057a91
april1989/UFO
/tsan/rtl/tsan_mman.cc
C++
cc
10,909
permissive
//===-- tsan_mman.cc ------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
dc6434a6df77109f3b4d3a6632c3181ecfd7915b
e9e7dbf5846440196fc8ac9e214fcd2761ef57e7
msrLi/portingSources
/ACE/ACE_wrappers/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp
C++
cpp
577
permissive
#include "Payload_Receiver.h" Payload_Receiver::Payload_Receiver (CORBA::ORB_ptr orb) : count_ (0), orb_(CORBA::ORB::_duplicate (orb)) { } void Payload_Receiver::more_data (const Test::Payload &payload) { ++this->count_; CORBA::ULong length = payload.length (); for (CORBA::ULong i = 0; i < length; ++i) ...
eefbf5b81b5beae2445f707f0f23550be004252e
cb145083a5a2d56cbc827c926b596a93982ce35e
TencentCloud/tencentcloud-sdk-cpp
/postgres/src/v20170312/model/InquiryPriceUpgradeDBInstanceResponse.cpp
C++
cpp
5,666
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 ...
12d69625bae81951a6d768276ec5d3e362b7e6b6
ac800df76ce4da008ef14bab063fcc0c75636e10
ARM-software/ComputeLibrary
/src/graph/detail/ExecutionHelpers.cpp
C++
cpp
8,018
permissive
/* * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * * 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 * ri...
fe2713633cc164a1f56dc363d8cdda85f0ecace5
ffc06ab95424a4e0fbc1f85e29a2f2d32e5eef94
faresfrikha/Codes
/C. Counting Stars/main.cpp
C++
cpp
2,028
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vl; #define mp make_pair #define pb push_back #define f first #define s second #define lb lower_bound #define ub upper_bound //upper_bound(all(a),h{position})-a.begin() #define all(v) v.begin(),v.end() #def...
cbe1129c61b36dc90ba47de2b797dba81257dc72
66108bfd0679c28c62ba62cded7275b43fd89e88
minhazmiraz/Codeforces_AC_Submission
/714A[Meeting_of_Old_Friends].cpp
C++
cpp
631
no_license
#include<bits/stdc++.h> using namespace std; int main() { long long x1,y1,x2,y2,k,time=0; cin>>x1>>y1>>x2>>y2>>k; if(x2<=y1&&y2<=y1&&x2>=x1&&y2>=x1) { time=y2-x2+1; if(k>=x2&&k<=y2) time=time-1; } else if(x2<=y1&&x2>=x1&&y2>y1) { time=y1-x2+1; if(k...
a0b279baa98bf99a582b03902138b1e868a977c7
6eabde02885739906cda2ba1867f19977b6378a6
jaem/lpDn
/src/main.cpp
C++
cpp
1,064
permissive
// Test // Load the library for LpDn #include "lpDnLib/lpDnLib.h" // APPS, you can remove these simple test ones #include "apps/app_00_blinkPrint/app_00_blinkPrint.h" #include "apps/app_03_bme280/app_03_bme280.h" void main(void) { // Stop Watchdog Timer WDT_A_hold(WDT_A_BASE); // Setup clock configuration c...
432c11c5236efde0cb1ca2ddbabff10060a5ad69
afbbfdec8b310a82424b3a0bef945a6eceaffc45
webclinic017/onegram-core
/libraries/chain/include/graphene/chain/budget_record_object.hpp
C++
hpp
2,633
permissive
/* * Copyright (c) 2015 Cryptonomex, Inc., and contributors. * * The MIT License * * 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...
6d97923067c61465740d8de4d4068c927a99aaaa
6b8dd6ed21228d34f36fa5918f4816c316809e15
kmjp/procon
/yuki/1001-2000/1201-1300/1226.cpp
C++
cpp
2,025
no_license
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();...
42c7003d9452494eedce75fa9878ccb7de7981aa
a6b4030c400d46730f1c03d04e5893a402a49bd7
icrelae/cpp_primer
/9-sequential_container/9.48-find_of_string.cpp
C++
cpp
300
no_license
/* 2016.11.27 12:50 * P_327 */ #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, char **argv) { string numbers("0123456789"), name("r2d2"); if (numbers.find(name) == string::npos) cout << "yes, string::npos"; else cout << "no"; return 0; }
26e3519ebfc6a7155b2bb44d96f10b1b023d64ea
dd778bbf0bef1b8c094cb5ad32dcdbf443e8354d
arBmind/WinNFSdpp
/src/nfs/mount.cpp
C++
cpp
4,640
no_license
#include "mount.h" #include "rpc/rpc.h" #define DEBUG_NFS_MOUNT_RPC #ifdef DEBUG_NFS_MOUNT_RPC #include <iostream> #endif namespace mount { namespace { struct directory_path_reader_t { directory_path_reader_t(const binary_reader_t& reader) : directory_path_m(xdr::opaque_reader<DIRECTORY_PATH_LEN...
859791390b8b333080bca49f0f14e3b80dd21db2
6d5f6c48620b79ef63f6f48abf3374ddc3c5951d
KatOfCats/w2rap-contigger
/src/paths/long/large/CN1PeakFinder.cc
C++
cc
4,917
permissive
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2014) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
a5be1aa0a2619c1d40e47c439d494d2939ff5394
d9bd60d1163e9032c88f59b511a2e60ac1a87376
nibilin33/chromium
/chromecast/browser/extensions/cast_extension_system.cc
C++
cc
11,075
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 "chromecast/browser/extensions/cast_extension_system.h" #include <string> #include "base/bind.h" #include "base/files/file_path.h" #include "ba...
1869a8bb29d976054ad9270c6c3debaec28a5a2c
743cc3cb3a76d44bdf91cf2a94be97be9592b7d3
YLeventhal/tufin
/tufin/CTree.cpp
C++
cpp
396
no_license
#include "pch.h" #include "CNode.h" #include "CTree.h" CTree::CTree() { m_pRoot = nullptr; } CTree::~CTree() { } void recInsert(CNode* node, int data) { if (node == nullptr) { node = new CNode(data); return; } if (data > node->GetData()) recInsert(node->GetRight(), data); else recInsert(node->GetLe...
ad46baf31860d5663aade51e9850cc528f5b01f6
8d3b3d8557412016a4c5dd458572286d11a18831
functard/INK.-A-SDL-2-GAME
/SDL2/SDL2Engine/SDL2Engine/Collectable.cpp
C++
cpp
327
permissive
#include "Collectable.h" #include "Engine.h" #include "ContentManagement.h" #include "MoveEntity.h" void GCollectable::Update(float _deltaSeconds) { if (m_pColTarget) { // if collision target is enemy delete if (m_pColTarget->GetTag() == "Player") CTM->RemoveObject(this); } } void GCollectable::Render...
ab4f207365aa34bccd58e6651ec4d8c280492305
198cf6c3f147ccbcd3b25126113057be57251631
dbuskariol-org/chromium
/media/remoting/stream_provider.cc
C++
cc
20,590
permissive
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "media/remoting/stream_provider.h" #include <vector> #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" #inclu...
7706a608c7820c293b6369cfda3753377f3ad0c0
275be09dd612c26faefcb7853e9486d05117f793
TarsCloud/TarsFramework
/QueryPropertyServer/DbProxy.cpp
C++
cpp
28,987
permissive
/** * Tencent is pleased to support the open source community by making Tars available. * * Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except * in compliance with the License. You may obtain a ...
d17ef8f4f317c6b52aa0ddb8e33024a29df1eb5e
da8b8a69d67868d7cf2666958543af6071e8d6fd
KevinJW/OpenColorIO
/src/OpenColorIO/ops/exposurecontrast/ExposureContrastOpData.cpp
C++
cpp
26,165
permissive
/* Copyright (c) 2019 Autodesk Inc., et al. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the foll...
38f4da4c0497475608b2919c8339c3a18a40dc07
5f0f31ac3da747c367b3134e30cf683acda5837d
prriyanayak/GFG_Solved
/easy/RemoveDuplicatesMaintainOrder.cpp
C++
cpp
531
no_license
#include <iostream> #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--){ map<char, int> m, n; string str; cin>>str; for(int i=0; i<str.length(); ++i) m[str[i]]++; for(int i=0; i<str.length(); ++i){ if(m[str[i]]==1){ co...
8d04351e8cfce6f6707ca8574ecf4123f34370e2
f00d72d5304eb81f08a2a9c89a403516fbcab3a1
ksyx/bill_statistics
/opencv-4.0.1-mingw/build/modules/ml/opencv_ml_main.cpp
C++
cpp
950
permissive
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #ifndef _WIN32 #error "Build configuration error" #endif #ifndef CVAPI_EXPORTS #error "Build configuration error" #endif #de...
da05c0dc26695fbf78e7631ff1891ae7d437968f
476686fface5dc8c97a12acad60f2fc27ca87879
zeta1999/azure-remote-rendering-asset-tool
/Arrt/View/Settings/StorageAccountSettingsView.cpp
C++
cpp
1,532
permissive
#include <QHBoxLayout> #include <View/Settings/StorageAccountSettingsView.h> #include <ViewModel/Settings/StorageAccountSettingsModel.h> #include <Widgets/FlatButton.h> #include <Widgets/ReadOnlyText.h> StorageAccountSettingsView::StorageAccountSettingsView(StorageAccountSettingsModel* model, QWidget* parent) : Se...
353f6925f4b4447b3c73b81060a3118c21d2d465
2ce37ef94d875bf7447cbfb46e6d816c934ab170
kant/CLDrone
/src/Firmware/src/modules/navigator/mission_block.cpp
C++
cpp
9,792
permissive
/**************************************************************************** * * Copyright (c) 2014 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistri...
2f6e5a0063e27af57e558bb2eccb01b7f9a1882d
9ca5c4c8603884bbdd49950ef82e18c4bc9b0fea
PetervdPerk-NXP/libuavcan
/libuavcan_drivers/linux/include/uavcan_linux/socketcan.hpp
C++
hpp
25,252
permissive
/* * Copyright (C) 2014-2015 Pavel Kirienko <pavel.kirienko@gmail.com> * Ilia Sheremet <illia.sheremet@gmail.com> */ #pragma once #include <cassert> #include <cstdint> #include <queue> #include <vector> #include <map> #include <unordered_set> #include <memory> #include <algorithm> #include...
d97379511c797ae46fe2b939ed171c472ace1ef4
42ab0aa0a827fb83ba5ccf07e3a0c690eb3fbb89
worthenmanufacturing/tcad-charon
/src/evaluators/Charon_SRHLifetime_Constant_decl.hpp
C++
hpp
1,129
no_license
#ifndef CHARON_SRHLIFETIME_CONSTANT_DECL_HPP #define CHARON_SRHLIFETIME_CONSTANT_DECL_HPP #include "Panzer_Dimension.hpp" #include "Phalanx_Evaluator_Macros.hpp" #include "Phalanx_MDField.hpp" #include "Charon_Scaling_Parameters.hpp" using panzer::Cell; using panzer::Point; namespace charon { //! obtain SRH lifeti...
27ce85ab18f26b6b1d719a7a5b0ba338fd67b639
9812299b820fc4ec977910bbcf991c222469e7e0
Sporknugget/Juliet_prep
/testcases/CWE23_Relative_Path_Traversal/s04/CWE23_Relative_Path_Traversal__wchar_t_environment_w32CreateFile_15.cpp
C++
cpp
4,493
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__wchar_t_environment_w32CreateFile_15.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sources-sink-15.tmpl.cpp */ /* * @description * CWE: 23 Relative Path Traversal * BadSource: environment Read input from ...
2f5257e341c29d082a0b35f85fb0475d52f9cb7d
f13e2a54f1f47b5cef7c1695f313535ecb6187be
pavelpolischuk/masstransit_cpp
/src/rabbit_mq/exceptions.cpp
C++
cpp
19,440
no_license
/* * ***** BEGIN LICENSE BLOCK ***** * Version: MIT * * Copyright (c) 2010-2013 Alan Antonuk * * 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 withou...
2d426837df422b202852cafd3c06958a047c4c74
0a3d4d3c2a4e311868d54342c20ac0b9a4d17f3c
RobotLocomotion/drake
/multibody/plant/test/sap_driver_multidof_joints_test.cc
C++
cc
8,897
permissive
#include <memory> #include <gtest/gtest.h> #include "drake/common/test_utilities/expect_throws_message.h" #include "drake/multibody/plant/compliant_contact_manager.h" #include "drake/multibody/plant/multibody_plant.h" #include "drake/multibody/plant/sap_driver.h" #include "drake/multibody/plant/test/compliant_contact...
cd67e14e976257cfab48d78ef130c901399b7761
2b02d0fc43e6f2b9a58ca4271b6366aabc702e35
angoodkind/MIT-Language-Modeling-Toolkit
/src/WordErrorRateOptimizer.cpp
C++
cpp
10,739
permissive
//////////////////////////////////////////////////////////////////////////// // Copyright (c) 2008, Massachusetts Institute of Technology // // All rights reserved. // // // // Redistrib...
9871d3012175dbed4895d73baf6c274257400b3e
f07e27985400f35c69e369ea18f747be6995df21
gwihlidal/slang
/tools/render-test/render-gl.cpp
C++
cpp
27,182
permissive
// render-gl.cpp #include "render-gl.h" #include "options.h" #include "render.h" #include <assert.h> #include <stdio.h> #include <stdlib.h> #include "core/basic.h" #include "core/secure-crt.h" #include "external/stb/stb_image_write.h" // TODO(tfoley): eventually we should be able to run these // tests on non-Windows...
eeaf0ea6e4ad32addb1087a1ff190c732b716720
188ca800ae333235a12ff8862eb2bf8a2b2db022
morzhovets/momo
/test/sources/libcxx/unord.set/unord.set.cnstr/move.pass.cpp
C++
cpp
6,910
permissive
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
6b1631c131a9b58496e79cd48e2936496ed7f63f
7264d0a1e3b3565540edacbfad8f261894446f00
chromium/chromium
/third_party/protobuf/src/google/protobuf/repeated_field.cc
C++
cc
3,284
permissive
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
420f4234841b7856091811c095433c29a1e6909d
eeeabf2d2b2da0bc533102423bace8cc8b224ed8
xxuanzhu/CityFlow
/src/utility/barrier.cpp
C++
cpp
479
permissive
#include "barrier.h" namespace CityFlow { void Barrier::wait() { std::unique_lock<std::mutex> lock(m_mutex); assert(0u != *currCounter); if (!--*currCounter) { currCounter += currCounter == counter ? 1 : -1; *currCounter = m_threads; m_condition.notify_all(); } else { si...
a2cd9e343384e3bc5126f2619adc3fe44b0e77a6
368e5a1c0829e2f46bf20d6c3aa56b1d96469d56
xu188618861886/Applications
/data_compression/xil_lz4/src/xil_lz4_compress_kernel.cpp
C++
cpp
11,279
permissive
/********** * Copyright (c) 2017, Xilinx, Inc. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of con...
1f52784b10ba91c1f7c44e6f61624992d84f7c52
ca351d364559423848e44e2cfa5928ea52e59685
JumHorn/leetcode
/Cplus/MinimizeMaximumofArray.cpp
C++
cpp
905
permissive
#include <vector> using namespace std; class Solution { public: int minimizeArrayValue(vector<int> &nums) { vector<pair<int, int>> s; //{val,count} use as stack s.push_back({nums[0], 1}); //dummy for (int i = 1; i < nums.size(); ++i) { int n = nums[i]; if (n > s.back().first) { long long val = ...
b04d0268a164a871c2eda16e446d03aaafd680c2
12a6e48c1570c6574967d3fdbd0d60b09927c978
dbagnyuk/cpp-cource-2
/September_15/cw_task_03/Class_BackUp.cpp
C++
cpp
1,487
no_license
#include "stdafx.h" #include <iostream> #include <stdlib.h> #include <time.h> #include <iomanip> #include <conio.h> #include <stdio.h> #include <io.h> #include "Class_BackUp.h" #include "Class_Array.h" using namespace std; //void BackUp::Save(const char * sFileName, void * pData, int nBytes, int * Er...
af081cb89afd88f3fc5e82e589fb4107165d9377
83f5445b25a5b4c82a7430fbb609107dccbc45b7
MrMoose/mredis
/MRedisTypes.cpp
C++
cpp
331
permissive
// Copyright 2018 Stephan Menzel. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include "MRedisTypes.hpp" namespace moose { namespace mredis { #if defined(BOOST_MSVC) void MredisTypesGetRidOfLNK4221() {} #...
62c3edf10870fea7408fa4c1c4b35266f7479b7f
8f574b5bbb77c5120e6c3bf4c05cb31b65736e0f
niuxu18/logTracker-old
/second/download/curl/gumtree/curl_repos_function_1026_last_repos.cpp
C++
cpp
1,246
no_license
char *curl_easy_escape(struct Curl_easy *data, const char *string, int inlength) { size_t alloc; char *ns; char *testing_ptr = NULL; unsigned char in; /* we need to treat the characters unsigned */ size_t newlen; size_t strindex = 0; size_t length; CURLcode result; if(inlength ...
55d7565fed64c7e46a76e14ce2095e9be0951d70
77e2402fa8a2db27160b49ffcf143db0b112d7c1
mhahnenberg/v8
/test/fuzzer/inspector-fuzzer.cc
C++
cc
24,829
permissive
// Copyright 2020 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #if !defined(_WIN32) && !defined(_WIN64) #include <unistd.h> // NOLINT #endif // !defined(_WIN32) && !defined(_WIN64) #include <locale.h...
21a5e4faf50b504ec2f60b585a728c236d1c8c35
04e7725445fa0b245d60ff4d5a1931cabb8d73be
rmarchiori/SDL2_Tutorial_Examples
/15_rotation_and_flipping/15_rotation_and_flipping.cpp
C++
cpp
7,018
no_license
/*This source code copyrighted by Lazy Foo' Productions (2004-2015) and may not be redistributed without written permission.*/ //Using SDL, SDL_image, standard IO, math, and strings #include <SDL.h> #include <SDL_image.h> #include <stdio.h> #include <string> #include <cmath> //Screen dimension constants const int SCR...
583880b96387d49a6e11212902f83f20dd60fbfc
2bb30b1682f3384c7987abc1fdc08b1f10144749
will133/libdynd
/tests/array/test_array.cpp
C++
cpp
26,786
permissive
// // Copyright (C) 2011-15 DyND Developers // BSD 2-Clause License, see LICENSE.txt // #include <iostream> #include <stdexcept> #include <algorithm> #include <cmath> #include "inc_gtest.hpp" #include "../test_memory.hpp" #include "dynd_assertions.hpp" #include <dynd/array.hpp> #include <dynd/types/fixed_bytes_type....
95911b97e80dcce23039c786d3ba807e8f892337
1e68272062fac1ff71e499bd10e3cec790f840a2
elfslmn/Contest_Solutions
/inzva/w9-online/brackets.cpp
C++
cpp
2,181
no_license
// g++ -std=c++14 -O2 -Wall qa.cpp // /usr/bin/time -v ./a.out #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; typedef vector<bool> VB; typedef vector<ll> VLL; typedef pair<int, int> PII; typedef pair <ll, ll> PLL; typedef vector<PII> VPII; typedef tuple<int,int,...
f0fc92c35948bcc11b6e92f7d1d9a61e31647ee7
68c0675ee96b049f3837f0527ec8d7f896ddc20e
BlogEmbarcado/RTC-on-ChipKit-Max32---Arduino-PIC32--
/lib/pic32_RTC.cpp
C++
cpp
5,082
no_license
// // pic32_RTC // // © http://sites.google.com/site/vilorei // CC = BY NC SA // // Jun 19, 2011 version 1 - initial release // Nov 21, 2011 version 2 - all functions made private // to avoid collusion between pic32_RTC and I2C_Clock // Dec 24, 2011 version 3 - fix added by majenko to suppor...
f94e661e7fa30cc31ec4a77cbf022518b8271de2
fa6e983b71730f0ddd92cf9933b9b33e26502652
PerennialWheatSA/commit-project
/main.cpp
C++
cpp
1,293
no_license
#include <thread> #include <iostream> #include <vector> // commit info int amountOfCommitsNeeded; int currentAmountOfCommits = 1; void Printer() { //starts while loop for commits while (currentAmountOfCommits < amountOfCommitsNeeded) { // the command being executed std::string str = "git commit --al...
c5dc5cb335546f77a3e853e693ddb19e2572cb5c
504df29d27186841c656dc25a45ea08d9da8c4b8
benjiboy50fonz/Phoenix-Examples-Languages
/C++ General/MotorSafety/src/main/cpp/Robot.cpp
C++
cpp
5,341
no_license
/** * Phoenix Software License Agreement * * Copyright (C) Cross The Road Electronics. All rights * reserved. * * Cross The Road Electronics (CTRE) licenses to you the right to * use, publish, and distribute copies of CRF (Cross The Road) firmware files (*.crf) and * Phoenix Software API Libraries ONLY when...
08192bcffdb2ede8788a3d2286e1d80dd4ef4084
b7be8a97cec0992b7fde375131d511b5232aec46
MNogFonseca/MyBCGen
/Parser.cpp
C++
cpp
1,873
no_license
#include "Parser.h" #include <stdlib.h> #include <iostream> string Parser::nextLine() { if (m_file.is_open()) { string line; while (getline(m_file, line)) { m_line++; if (line[0] != ' ' && line[0] != '#' && !line.empty() && li...
9995f9f05a33bbbadad5d4dca8851626a8215e78
2af7d8cf369b49033dac5e344e0d81ff624d1c72
wesnjazz/map-fusion
/mapping_simulator/src/robot.cpp
C++
cpp
2,233
no_license
#include "robot.h" #include "simulator.h" #include "transformation.h" Robot::Robot() { this->position_in_Wframe = Vec2f(0, 0); this->heading_degree_in_Wframe = 0; this->heading_radian_in_Wframe = 0; this->speed = 0.2; this->set_velocity(); this->set_robot_frame(); } Robot::Robot(Vec2f &positi...
bcdeb049c65808877d4584a0640e842199dbfc26
5ed0a1fdf5643e2362343714fd83815ce930fbe2
Mr-13-10/C-Primer-Exercise
/3.5.cpp
C++
cpp
588
no_license
// 3.5.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> #include<string> using namespace std; int main() { char cont = 'y'; string s, result; cout << " 请输入第一字符串:" << endl; while (cin >> s) { result += s; cout << "是否继续(y or n)?" << endl; cin >> cont; if (cont == 'y' || c...
928a6e5fad32edc627b1455e98874aa8194b0a61
26716ffcec78ff76d16aa97134496a8942a89a81
yumdeer/daily_practice
/vs_project/XJOI/数组-筛法求素数/数组-筛法求素数.cpp
C++
cpp
1,511
no_license
/************************* 筛法求素数,指的是每次将一个素数的所有的倍数去掉,如果当前的数没有被比它小的数去掉过,那么当前的数就是素数。 比如1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1不是素数。不用管。 2是素数,那么2的所有的倍数要被去掉。 3是素数,那么3的所有的倍数要被去掉。 4 被去掉了。不用管。 。。。 这样做下去我们就可以筛选出所有的指定范围内的素数了。 你的任务是求小于等于n的素数的个数count。 做完这道题后感兴趣的同学可以将n/count 的值打印输出来看看。 输入格式: 第一行输入一个整数T,...
19499eba96fd4338714ac3964f27c3575e03dadd
10b4500f2cf52235330d88072c280cfadb0a57ef
juanjohn/codechef
/practice/voronoitessellationCOUNTSTR.cpp
C++
cpp
642
no_license
#include <stdio.h> #define getcx getchar_unlocked inline void inp(int *n )//fast input function { *n=0; int ch=getcx(); while(! (ch >= '0' && ch <= '9')) ch=getcx(); while( ch >= '0' && ch <= '9' ) *n = (*n<<3)+(*n<<1) + ch-'0', ch=getcx(); } int main(){ int r,c; scanf("%d",&r); scanf("%d",&c)...
0deac7ce536af6ce6055f1d60047dd3df20a553f
4ea3da949db574e5b41e89f6d632797592182cb8
paddlelaw/Paddle
/paddle/fluid/imperative/reducer.cc
C++
cc
43,706
permissive
// Copyright (c) 2020 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 required...
a8738703ebf29b6d7a1d53f19cab616bd8833c4c
10037d31cdb1f393c31619072159b2a93fa45d45
NetBSD/pkgsrc-wip
/virtualbox/patches/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp
C++
cpp
1,429
no_license
$NetBSD$ --- src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp.orig 2016-03-04 19:29:00.000000000 +0000 +++ src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp @@ -2247,7 +2247,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a) CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true)); }...
4996fafd6aebe392acf82b9ea3c4e3b4bf1e0407
6f9c3425035d21343b9c2c91b19d33a0ceb6fa30
joeliven/robotics
/core/vision/VisionModule.cpp
C++
cpp
6,703
permissive
#include "VisionModule.h" #include <memory/FrameInfoBlock.h> #include <memory/JointBlock.h> #include <memory/RobotVisionBlock.h> #include <memory/SensorBlock.h> #include <memory/ImageBlock.h> #include <memory/BodyModelBlock.h> #include <memory/RobotStateBlock.h> #include <memory/CameraBlock.h> #include <memory/WorldObj...
0a87e6f1126afa336844eb9b4ef1451936953113
5aa5c41ec5eab0091a683327b03f3f2ec2fd1741
dgi09/D3D
/Engine/ComputeShaderPtr.cpp
C++
cpp
473
no_license
#include "ComputeShaderPtr.h" #include "Heap.h" ComputeShaderPtr::ComputeShaderPtr(unsigned int index) : HeapPtr(index) { } ComputeShaderPtr::ComputeShaderPtr() { } ComputeShaderPtr::ComputeShaderPtr(bool isNull) : HeapPtr(index) { } ComputeShader * ComputeShaderPtr::Get() { return Heap::GetPtr()->ComputeShaders...
188dbefeaa80b3c7202c0acc1c7e9fa0c4be8607
20c1a393b4b914d71558d7c2dc8b972ffe9cc969
Mags17/Booksim_custom_traffic
/src/routers/router.cpp
C++
cpp
5,286
no_license
// $Id$ /* Copyright (c) 2007-2012, Trustees of The Leland Stanford Junior University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright...
58e621c29c8fa5b22e27772904c20906716057a1
26efafe4577767449be7b66154d03acee594e5d1
alexandraback/datacollection
/solutions_5639104758808576_1/C++/Seehait/exam1.cpp
C++
cpp
806
no_license
#include <iostream> #include <string> using namespace std; int calculate(int h, string in) { int mIn[in.size()]; for(size_t i = 0; i < in.size(); i++) { mIn[i] = in[i] - '0'; } int mOut = 0; int cur = 0; size_t i = 0; while(i < in.size()) { //cout << "#" << mIn[i] << endl; if(mIn[i] == 0) i++; else ...
4eb98e47a38afa977246129031823051bc2e9f2f
9a484113b82b56546085721852a6fd969d4556d5
Zahidsqldba07/Data-Structures-and-Algorithms
/GFG problems/Array/removeDuplicates.cpp
C++
cpp
509
no_license
//To remove all the duplicate values from a given sorted array #include <bits/stdc++.h> using namespace std; int rmDuplicates(int a[],int n) { int res = 1; for(int i=1;i<n;i++) { if(a[res-1]!= a[i]) { a[res] = a[i]; res ++; } } return res; } int mai...
58b172f60f9938d625faf397d556e06000b5430c
2bb649e1a6e0b84911ee34cd7214c6c015b3f298
iCoder0020/Miscellaneous
/Min\Max Heap.cpp
C++
cpp
3,294
no_license
/* Min\Max Heap Insertion - O(logN) Extraction - O(logN) */ #include <bits/stdc++.h> using namespace std; #define parent(temp) (temp-1)/2 #define left_child(temp) 2*temp + 1 #define right_child(temp) 2*temp + 2 vector <int> heap; string type; void switch_places(int i, int j) { int temp = heap[i]; heap[i] = heap...
5b92f64fb942b2128075edd80fc77b42209a3319
874db5ca8e5c00b00d6f8d571fb36ae01991f400
SJTUStevenDu/Algorithm-Contest
/BZOJ/1967 [Ahoi2005]CROSS 穿越磁场.cpp
C++
cpp
2,908
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> using namespace std; const int MAXN = 100 + 10; const int MAXM = 20000 + 200; const int MAXE = 500000 + 10; const int MAXV = 50000 + 10; const int INF = 0x7FFFFFFF >> 2; const int gx[4] = {1, 0, -1, 0}; const int gy[4] = {0, 1, 0, -1}; int n...
52482b87861f801ff7de03f56f0edfd365fc2110
e2f5065777dec0064a20d3f79793429816dbe147
CMorehead74/Critical-Mass
/Critical Mass/Source Files/CreditsMenu.cpp
C++
cpp
7,004
no_license
#include "../Header Files/stdafx.h" #include "../Header Files/CreditsMenu.h" /***************************************************************** File name: CreditsMenu.cpp Date: 7/17/13 Modify Date: 08/07/13 Modify Initials: CM Author: Ian Alcid Purpose: Class for Credits state. *********************...
f808b32b27aa9c9ecd049f01494df0e9e5a41c89
d546e55f7045b1a138b56e7ecd4d9aca04ce51b0
mposypkin/BNB-solver
/misc/obsolete/uncons/hump.hpp
C++
hpp
2,294
no_license
#ifndef __HUMP__ #define __HUMP__ #include <math.h> #include <problems/cover/common/intobj.hpp> #include <util/common/interval.hpp> /** * The optimization target for Hump function */ template <typename FT> class Hump : public IntervalObjective <FT> { public: FT func(const FT* x) { FT rv; ...
e9a728ec018a69da8cc1537cf365c15680aff8bc
bf14aaa1657f9f317e8babbf0307fcdd3bc30846
wangyongliang/nova
/poj/2189/POJ_2189_5358052_AC_0MS_212K.cpp
C++
cpp
711
no_license
#include<iostream> #include<algorithm> using namespace std; int a[10000]; int main() { int n,p,c; int i,j,st,en; int cnt; int ans; while(scanf("%d%d%d",&n,&p,&c)!=EOF) { if(p==1) while(1); for(i=0;i<p;i++) a[i]=0; for(i=0;i<n;i++) { scanf("%d",&j); a[j]++; } ...
4aeb8c47665313107d227ec928b10bbc9a104acd
1de1642d03ea4277440a9e947cb2ceb3b099441f
vampirecat35/STDXS
/XS++/include/XS/UI/Screen.hpp
C++
hpp
3,020
permissive
/******************************************************************************* * The MIT License (MIT) * * Copyright (c) 2018 Jean-David Gadina - www.xs-labs.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softwar...
8122cbca706164b83ea6f194c5dcd26a4ef2f286
2b5650d4cf224bdf7da5c90da234cbade91ceee3
Noammac/FRC-Vision-Project
/src/main/cpp/main.cpp
C++
cpp
2,324
permissive
#include "opencv2/opencv.hpp" #include <iostream> #include <time.h> using namespace std; using namespace cv; void fastBlur(Mat image, int radius) { if (radius<1) return; int w = image.cols; int h = image.rows; unsigned char * pix = (unsigned char*)(image.data); int wm=w-1; int hm=h-1; int wh=w*h; int div=radi...
e4f1913e4d61bf3d1cf277370b53c557d0d375fb
57e1b13fb11603ce2e6c00abbb055db9ac1ef31f
Kmakinator/ntfstool
/Sources/Bitlocker/bek.cpp
C++
cpp
1,853
permissive
#include "Bitlocker/bek.h" #include "Utils/buffer.h" #include "Utils/utils.h" #include "Bitlocker/bitlocker.h" bool test_bitlocker_bek(ULONG64 nonce_time, ULONG32 nonce_ctr, PBYTE mac_val, PBYTE enc_vmk, ULONG32 enc_size, PBYTE salt, std::string bek_file) { std::shared_ptr<Buffer<PBYTE>> bek = read_bek_file(utils::...
848fb21c019bd60f246391142cef50101870e63a
e5ded305d14fa2b9afc18edcc6a571f216e2109b
pmorou/data-race-test
/race_checker/race_checker_unittest.cc
C++
cc
2,133
no_license
/* Copyright (C) 2008-2008 Google Inc opensource@google.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ...
f373f95fc82035931f07e1ce702b081da026bbd5
c0659dbcc7db1189b4690f06d2daad7ee3c3a150
MAPSWorks/GIS
/viewer-development/indra/llrender/llshadermgr.cpp
C++
cpp
27,819
no_license
/** * @file llshadermgr.cpp * @brief Shader manager implementation. * * $LicenseInfo:firstyear=2005&license=viewerlgpl$ * GIS Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General ...
206df7bbde0025a0228b0037946994fae0efb51c
48da0eea481b0f231e976fecae73371be96d0bc5
siconos/siconos
/kernel/src/modelingTools/NewtonImpactFrictionNSL.cpp
C++
cpp
1,868
permissive
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2022 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 * *...
ae69f4dbcf38102d64bffd2b37eb0385733a4e78
7c4d5d4a08cf15a6ab01778645e9fd87c8b746ba
yumi-crew/pose_estimation
/pose_estimation/src/halcon_surface_match.cpp
C++
cpp
4,426
no_license
#include "halcon_surface_match.hpp" #include <unistd.h> namespace pose_estimation { HalconSurfaceMatch::HalconSurfaceMatch() { current_scene_ = HalconCpp::HObjectModel3D(); char *buf = getlogin(); std::string u_name = buf; path_to_scene_ = "/home/" + u_name + "/abb_ws/current_scene.ply"; } Hal...
3bc5b057c034cc9b52cdce0052b6051e9665b1cf
2d7cfbf7c293865a803647a69d37012d820f1f8f
gabrielPeart/Flash-Plugin-SnapPlatform
/SampleCreateJSPlatform/Plugin/SampleCreateJSPlugin/src/Main.cpp
C++
cpp
3,668
no_license
/************************************************************************* * ADOBE CONFIDENTIAL * ___________________ * * Copyright [2013] Adobe Systems Incorporated * All Rights Reserved. * * NOTICE: All information contained herein is, and remains * the property of Adobe Systems Incorporated and its suppli...
1377d14ad2f0aef1b1980d5e440e5455a2d674ae
0d88704f18ff07e7f55fa5237e8ca659ed643f18
tepperly/Caliper
/src/caliper/controllers/HatchetSampleProfileController.cpp
C++
cpp
6,877
permissive
// Copyright (c) 2019, Lawrence Livermore National Security, LLC. // See top-level LICENSE file for details. #include "caliper/caliper-config.h" #include "caliper/ChannelController.h" #include "caliper/ConfigManager.h" #include "caliper/common/Log.h" #include "caliper/common/StringConverter.h" #include "../../servi...
cf805d0cf9f798558c9aee51fc7924fccb147349
94d0d801db712e975ae994726a10009f22d94c08
paul356/sift_stitch
/ff_invfile.cpp
C++
cpp
10,860
no_license
/* Copyright (c) 2008, Eidgenössische Technische Hochschule Zürich, ETHZ * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright...
4baf62d787d6567afe716b53697521de0ccd85cf
5aef649862f7d0ba226c6851f73f18950f9320be
lemarkis/ZappyGraph
/ZappyGraph/State/GameState.hpp
C++
hpp
1,231
no_license
#ifndef GAME_STATE_HPP #define GAME_STATE_HPP #include <OgreSubEntity.h> #include <OgreMaterialManager.h> #include "Framework\AppState.hpp" #include "Network\Socket.hpp" #include "Network\Protocole.hpp" #include "Network\CircularBuffer.hpp" class GameState : public AppState { public: GameState(); DECLARE_APPSTATE...
5f9880aa39eaf4e7da4a3c9667f2d669f93ebc12
cd0fa45a91a04da7228a6b41c2a2c148e7077a8d
rennatobarros/lab03
/prog02-03/src/movimentacao.cpp
C++
cpp
2,005
no_license
/** * @file movimentacao.cpp * @brief Arquivo com a implementaçãa da classe */ #include "movimentacao.hpp" using std::string; using namespace std; /** Construtor sem parametros */ Movimentacao::Movimentacao(){} /** * @brief Construtor com parametros * * @param _valor Valor da movimentação * @para...
692ce848487c1519f2a3777127999b0701737f80
5164abb805019642073952800384ba7d4548a4bc
fafik23/usercode-OMTFSimulation
/src/XMLConfigReader.cc
C++
cc
15,755
no_license
#include <iostream> #include <cmath> #include "UserCode/OMTFSimulation/interface/XMLConfigReader.h" #include "UserCode/OMTFSimulation/interface/GoldenPattern.h" #include "UserCode/OMTFSimulation/interface/OMTFinput.h" #include "UserCode/OMTFSimulation/interface/OMTFConfiguration.h" #include "FWCore/MessageLogger/inte...
35ee94f43261a4c9ce8de23b68bdc9cf420658a8
719a59fb7b43297796f485f1540fda3c1052f9c5
ravikasyap97/mergesort
/main.cpp
C++
cpp
1,046
no_license
/*Write a function, which accepts an integer array and its size as parameters and rearrange the array in reverse order. e.g. if an array contains the elements as: 4, 2, 5, 1, 6, 7, 8, 12, 10 Then, the function should rearrange the array as: 10, 12, 8, 7, 6, 1, 5, 2, 4*/ #include <bits/stdc++.h> using namespace std; /...
571653e8669a807f68f06283c86343ed919ac5a2
5b40cf380b828e59e432458b1d26286594fdbb1d
CodeJin19/Baekjoon
/구현/5032.cpp
C++
cpp
250
no_license
#include <iostream> using namespace std; int main() { int e, f, c, now, r; int cnt = 0; cin >> e >> f >> c; now = e + f; while (c <= now) { cnt += (now / c); r = now % c; now /= c; now += r; } cout << cnt << endl; return 0; }
3bb94cde755afd41e5ddfce53a3fc8097e284d20
e5a48e18624381a1145dddd628052bc8405412a6
rarosu/WarSettlers
/Code/Libs/r2tk/r2-exception.hpp
C++
hpp
14,342
no_license
/* HEADER * * File: r2-exception.hpp * Created by: Lars Woxberg (Rarosu) * Created on: October 17, 2010, 1:14 PM * * License: * Copyright (C) 2010 Lars Woxberg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published...
c1d62456af362ebdc3d2a829376dbf863146ae22
7cb73e32cb155b486e8f9226275e2c0ab184412f
ShinuziKyura/VCOM_Projects
/VCOM_Project_1/VCOM_project_1/opencv_utility.hpp
C++
hpp
2,625
no_license
#ifndef OPENCV_UTILITY_HEADER #define OPENCV_UTILITY_HEADER #include <filesystem> #include <opencv2/opencv.hpp> namespace fs = std::filesystem; class Image { public: Image() = default; Image(fs::path const & in_file, int in_flags = cv::IMREAD_COLOR) : image_name{ in_file.filename().string() } { if (!fs::exis...
0f37d6925c4da6fcc89cbe9152556accf0ea888d
ad4a7899a033a17994f488354438abb5535c3ad9
dimtass/tflite-micro-python-comparison
/source/libs/tensorflow/lite/experimental/micro/debug_log_numbers.cc
C++
cc
6,284
no_license
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
3dda996d669578a4bd1aa85afb3b7345d03e75a8
4f09cea46231f80d2927e458af7cb04ccba611d3
ypzhang/playground
/gpu_solver/gpu-lib/src/format.cpp
C++
cpp
6,143
permissive
#include "gpusollib.h" /*--------------------------------------------*/ void COO2CSR(coo_t *coo, csr_t *csr) { int n,nnz; /*------- Allocate CSR */ n = coo->n; nnz = coo->nnz; malloc_csr(n, nnz, csr); /*-------- COO -> CSR */ coocsr_(&coo->n, &coo->nnz, coo->val, coo->ir, coo->jc, csr->a, csr->ja,...
f0a8992ac4d68dd31d50b948521e5b45d6be14a0
6c6c151e2d1e64809992939d2472ca4ca1ce5477
AlexSkvor/SharedMutexLab
/main.cpp
C++
cpp
351
no_license
#include <fstream> #include <iostream> #include "ThreadSheduler.h" #include "TestDatabase.h" void work(ATestDatabase& db){ for(int i = 0; i < 200; i++) db.doSomething(); } int main() { SharedDatabase db; Scheduler scheduler; for(int i = 0; i < 20; i++){ scheduler.addThread(std::thread(work, std::...
6cf1ce5565ddce363f7b1b767e369068265cdb19
d8d114fe509740ef0214075fa87d06c68590e7b6
TXWSLYF/learn-c-primer
/2021-04-09/copy-on-write.cpp
C++
cpp
363
no_license
#include <iostream> using namespace std; int main() { string str1 = "hello world"; string str2 = str1; cout << "Sharing the memory:" << '\n' << &str1 << '\n' << &str2 << endl; str1[1] = 'q'; str2[1] = 'w'; cout << "After Copy-On-Write:" << '\n' << &str1 << '\n' ...
dae8ffcf3944028b5b72b54eccadc5beb84b33e6
4c3b1a9b8e8f625e8109d7585578306aa44ca67b
KrzysztofKozubek/Projects
/RecognitionNLP - praca licencjacka/.localhistory/RecognitionNLP/1470227495$Recognitionnlp.cpp
C++
cpp
54,003
no_license
#include "Recognitionnlp.h" RecognitionNLP::RecognitionNLP(QWidget *parent) : QMainWindow(parent) { ui.setupUi(this); setParameters(); fillVectorValue(); fillDefaultValue(); //load data connect(ui.buttonLoadData, SIGNAL(released()), this, SLOT(clickLoadData())); //clear list data connect(ui.buttonLoadClear...