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
37d002fe080f9522c5064e43af6c4f192c6b2338
692bc98c2a6b954c0cb66fca61e55eb1cd07151f
cam1x/bsu-algorithms
/adjacency-matrix/adjacency-matrix/adjacency-matrix.cpp
C++
cpp
622
no_license
#include <iostream> #include <fstream> int main() { std::ifstream file_in("input.txt"); std::ofstream file_out("output.txt"); int n, m; file_in >> n >> m; const auto matrix = new int*[n]; for (auto i = 0; i < n; ++i) { matrix[i] = new int[n]; for (auto j = 0; j < n; ++j) { matrix[i][j] = 0; } } ...
188634af780f938e51b679aaaa4d0585ff482066
ebb0938b27e855c6c733b7205a07714629826ffb
CHROMIETeledaq/cmssw
/CalibTracker/SiStripChannelGain/src/SiStripGainsPCLWorker.cc
C++
cc
30,540
permissive
#include "CalibTracker/SiStripChannelGain/interface/SiStripGainsPCLWorker.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include <iostream> #include <sstream> //********************************************************************************// ...
52dedd3792f20e1bd84b7a633ac34fbcdb1a5ba0
d4f356e691430ed813065fcb86b561f5fde58d76
Quuxplusone/blog
/code/2019-03-06-triples-ranges.cpp
C++
cpp
1,910
permissive
// A sample standard C++20 program that prints // the first N Pythagorean triples. #include <iostream> #include <optional> #include <range/v3/all.hpp> using std::get; using std::optional; using std::make_tuple; using std::cout; using ranges::view_interface; using ranges::iterator_t; namespace view = ranges::v3::view;...
049167bdefca29481d94ddbd3662fdc5c161df13
ea6fee680e0874826ccc02c769459b60882aeebd
MBogda/Mathball
/Source/main.cpp
C++
cpp
1,380
no_license
#include <iostream> #include <SFML/Graphics.hpp> using ui = unsigned int; const ui winW = 800; const ui winH = 600; const ui goalW = 50; const ui goalH = 200; int main() { sf::RenderWindow window(sf::VideoMode(winW, winH), "Mathball"); window.setVerticalSyncEnabled(true); sf::RectangleShape goalL(sf::Vec...
3979f064b8de3c09ee6ee45529f424154de4b587
8dd8c0d8a6de46a6fce08faee2f0afc0368986de
SilenceDB/chromium
/third_party/blink/renderer/core/loader/interactive_detector_test.cc
C++
cc
26,226
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 "third_party/blink/renderer/core/loader/interactive_detector.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/rende...
c1c14edddeb92dadc04e53c166770286e35e8d0f
08e6ded4dd511c6ba5366a7633fb56680748d8c7
atrin-hojjat/CompetetiveProgramingCodes
/CF/EdRound_75/E.cpp
C++
cpp
587
no_license
#include <iostream> #include <vector> #include <set> using namespace std; const int MaxN = 2e5 + 6.66; vector<int> xs[MaxN]; int main() { int T; cin >> T; while(T--) { int n; cin >> n; for(int i = 0; i < n; i++) { int p, m; cin >> m >> p; xs[m].push_back(p); } long long cost = 0; m...
a9f3fe62e03bc805d32060c57aa40141e4b6de8d
3d32c38fc2fd59cbe98e3f51764ffd9c0339f235
HannanSolo/willienelsoncoin
/src/util.cpp
C++
cpp
43,277
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef WIN32 // for posix_fallocate #ifdef __linux__ #define _POSIX_C_SOURCE 2001...
c476dff7104376a56f3883edfa20a1b70e5b7b85
a11b375339f131196fff1c104435834809d79c2a
ECS-251-W2020/chromium
/third_party/blink/renderer/platform/testing/find_cc_layer.cc
C++
cc
2,449
permissive
// Copyright 2019 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 "third_party/blink/renderer/platform/testing/find_cc_layer.h" #include "cc/layers/layer.h" #include "cc/layers/scrollbar_layer_base.h" #include ...
f54b8e3de53af38d64b9a2f03db081853f259692
58a2fb1025e729a4d7d0042e9ddc3d5c6bf0ebc4
arthurdead/srcsdk
/game/client/lampbeamproxy.cpp
C++
cpp
2,708
no_license
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "cbase.h" #include "proxyentity.h" #include "materialsystem/imaterialvar.h" #include "materialsystem/imaterial.h" #...
c53e1932d921121707f38f414c63b18a0da784e7
a00ba5f1a36a65f0a4aa835c85bb8fe0813f2f0d
tomsotte/p2-progetto-docker-composer
/model/compose/dockerparts.cpp
C++
cpp
1,799
no_license
#include "dockerparts.h" #include <exception> #include "volumeconfig.h" #include "networkconfig.h" #include "serviceconfig.h" #include "dockerfileconfig.h" void DockerParts::importFromJSON(const nlohmann::json& j) { for (const auto& jc : j) { // jc = json config addDockerPartFromJSON(jc); } } DockerParts Docker...
a77f175bce0e436a3a1cd42f60a7dfcae47eec8d
2b256a789824ad6ca7c30f3e1a90cb7eff6365b5
GIC-de/contrail-controller
/src/vnsw/agent/ovs_tor_agent/ovsdb_client/test/test_ovs_agent_util.cc
C++
cc
1,466
permissive
/* * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. */ #include <stdlib.h> #include <string> #include <iostream> #include <base/string_util.h> #include <cmn/agent_cmn.h> #include "test_ovs_agent_util.h" #define VTEP_CMD_PREPEND "build/third_party/openvswitch/vtep/vtep-ctl" using namespace std; ex...
41b296f2a019e982e7ef4ec03dbc3ac83ebc5514
6e3ef678351899589b62382c375cb7a84791c715
wordhardqi/ReviveNetwork
/RN/net/TcpConnection.cpp
C++
cpp
4,476
no_license
// #include "TcpConnection.h" void RN::TcpConnection::connectionEstablished() { loop_->assertInLoopThread(); assert(state_ == kConnecitng); setState(kConnected); channel_->enableReading(); connectionCallback_(shared_from_this()); } void RN::TcpConnection::connectionDestroyed() { assert(state...
47e7ecb76c2fd21ee0d422061b914cc1c2fe6b51
662f96fc957be092ed256dac81783cc3b301d319
deniscoady/wilson
/src/main.cpp
C++
cpp
6,074
no_license
#include <iostream> #include <future> #include <random> #include <tcp_mote.h> #include <udp_mote.h> // Seed with a real random value, if available template <typename mote_type, typename pckt_type> void simulate (const int COUNT_MOTES, const int SPACE_SIZE, const int RADIO_STRENGTH); template <typename Iter> void ini...
6d75d0b9ef6c41e9c853a61f9ed8af0b0a2f36b6
8c969b772715b31e78de34462f967e4e896301fa
socratesone/vespa
/config/src/tests/configgen/value_converter.cpp
C++
cpp
3,622
permissive
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/config/configgen/value_converter.h> #include <vespa/config/common/exceptions.h> #include <vespa/vespalib/data/slime/slime.h> #include <climi...
d2137b1b2860d7420bd16258b13f033352ec9086
1334673fa222440fedc593f25204be27ae5dd1f8
darkain/RMX-Automation
/src/rmx_win32/vMasterPlugin/MasterPlugin.cpp
C++
cpp
4,751
permissive
/****************************** RMX SDK ******************************\ * Copyright (c) 2007 Vincent E. Milum Jr., All rights reserved. * * * * See license.txt for more information * * ...
8f086fd0d438f4ba0865fc5c21a59531b16a9d55
ec2040cc2803828421826138ee44ff755ed1ff15
my-hoang-huu/My-hh
/1. Nhap mon lap trinh_chuong03_mang mot chieu/bai063.cpp
C++
cpp
813
no_license
#include<iostream> #include<iomanip> using namespace std; void Nhap(int[], int&); void Xuat(int[], int); void Dem(int[], int); int main() { int a[100]; int n; Nhap(a, n); Xuat(a, n); cout << "\nCac gia tri chi xuat hien mot lan trong mang: " << endl; Dem(a, n); return 1; } void Nhap(int a[], int& n) { cout <<...
8856007b23918740d66d6c6d008ffab689ad1ed9
3c387735ecb8d527a0c0c5470a810f20d32ddbb6
bound1ess/codeforces-problemset-2
/441/b.cpp
C++
cpp
533
permissive
#include <cstdio> const int N = 3003; int x[N]; inline int max(int a, int b) { return a < b ? b : a; } int main() { freopen("input", "rt", stdin); freopen("output", "wt", stdout); int n, v, a, b; scanf("%d%d", &n, &v); for (int i = 0; i < n; ++i) { scanf("%d%d", &a, &b); x[a] += b; } int s = ...
f3225579dc1d75bf8cc7c598f95e83153384c056
808ecdee38d1ab2729467ffd2cc15cfc4f2a1a6e
karunmatharu/Android-4.4-Pay-by-Data
/external/chromium/base/synchronization/condition_variable_unittest.cc
C++
cc
25,574
permissive
// Copyright (c) 2011 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. // Multi-threaded tests of ConditionVariable class. #include <time.h> #include <algorithm> #include <vector> #include "base/logging.h" #include "bas...
60e4dfbba7b53d785273a121ddf5f611783f3ca2
044b563bf4f23efb3fe150ac4e0e4019d18ff616
yuval-cohen/toy_robot
/toy_robot.hpp
C++
hpp
3,392
no_license
//! //! @file toy_robot_base.hpp //! //! @brief toy robot header file //! //! @copyright Yuval Cohen 2019 //! #pragma once #include "toy_robot_base.hpp" namespace toy_robot { /** * @class ToyRobot * Toy Robot class * @template parameter X grid size (>= 1) * @template parameter Y grid size (>=...
c453dba14971cb2b50ec406d8e02ec4aa2178b6b
9dfff2cc060d75dd7b21e7613c16c0e9369470a6
massbrowser/android
/chrome/browser/ui/views/settings_reset_prompt_dialog.cc
C++
cc
3,962
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 "chrome/browser/ui/views/settings_reset_prompt_dialog.h" #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_cont...
eb6a55b57e2de307b2cc4c01a2f77c245d716733
ced0fded5583923e4ed121c52b4c1b9e588fef70
WANGZijian1994/C-
/C++ Exercices during Master Sorbonne/ContainerC++/Sort.cpp
C++
cpp
736
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; bool ascending(int i, int j){ return i<j; } bool descending(int i, int j){ return i>j; } struct myclass{ bool operator()(int i, int j){return i<j;} }myobject; template <typename T> void pprint(vector<T> &t){ for(a...
3c056d5381a481fea0a4883173d00b5d89eebda6
49ab696a6ef52d0bcfcb5f184a5fea4f5b253ff4
kironbot/AtCoder
/Others/EDPC/j.cpp
C++
cpp
1,408
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long; using vll = vector<ll>; using vvll = vector<vll>; using vc = vector<char>; using vvc = vector<vc>; using pll = pair<ll, ll>; using stkll = vector<pll>; const ll INF = 1LL << 60; const ll MOD = 1e9 + 7; #define rep(i, n) for (ll i = 0; i < (n); i++) tem...
09d9fcdbaccb9e14083d5ecf724825ff16541881
054e724078b7d699297179924d9147c62ac19a03
ShahjalalShohag/ProblemSolving
/codeforces/1436/F.cpp
C++
cpp
4,219
no_license
#include<bits/stdc++.h> using namespace std; const int N = 1e5 + 9, mod = 998244353; template <const int32_t MOD> struct modint { int32_t value; modint() = default; modint(int32_t value_) : value(value_) {} inline modint<MOD> operator + (modint<MOD> other) const { int32_t c = this->value + other.value...
6106fafbd87015ecb9ec840dde7e94adc43ac721
7db68c9fe85d29a10def35219b4a90a6aff99100
smcavallo/pixie
/src/stirling/source_connectors/socket_tracer/protocols/kafka/decoder/join_group.cc
C++
cc
2,958
permissive
/* * Copyright 2018- The Pixie Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
ef22cac125dd4f3864e9510be09de520ecddb1bb
f166fa27ef4a2219988e47f778652911a72db37d
aleios/3dapp
/3DApp/World.cpp
C++
cpp
25,621
permissive
#include "World.hpp" #include <algorithm> #include "Settings.hpp" #define USE_FXAA 0 float float_rand(float a, float b) { return ((b - a)*((float)rand() / RAND_MAX)) + a; } const static float maxCol = 5.0f; World::World(sf::RenderWindow& inWindow) : window(inWindow), gbuffer(WINDOW_WIDTH, WINDOW_HEIGHT), hdrDo...
19b6d5bebfd694764acac645675aa972cd027beb
0b0d7a4dda2f7f8aa1b4dd4f10bc3590eac58ea8
pratyush220498/Data_Structure-CPP
/basic/basic/swapping no..cpp
C++
cpp
222
no_license
#include<iostream> using namespace std; int main() { int a,b; cout<<"enter a"; cin>>a; cout<<"enter b"; cin>>b; a=a+b; b=a-b; a=a-b; cout<<"swapped valuse are:"; cout<<"\n a="<<a; cout<<"\n b="<<b; return 0; }
61c64b3aa4cfb425613d342b19bfbfb95d7cade1
87aeb00c0875f4eeddf725dd6b0b5adfbe5062a6
biswajitcsecu/ngraph
/python/pyngraph/ops/batch_norm.hpp
C++
hpp
1,018
permissive
//***************************************************************************** // Copyright 2017-2019 Intel Corporation // // 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://w...
0923f6b12a097b39b8f0a7abd3c711ed842a1b75
12908198766159802cb9ae64f3dce5ce3cd5ba25
klauson/Corvus
/src/qt/bitcoinunits.cpp
C++
cpp
7,743
permissive
// Copyright (c) 2011-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Corvus Glaive developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "bitcoinunits.h" #include "chainparams.h" #include "primitiv...
35c3af25e8a58a98eed724f2e6ca7b7777ea6af7
e3472dca4e478b1c238b5c87672230dd0d99a72c
0Knowledge/SciCompanion
/ViewChildFrame.cpp
C++
cpp
2,089
no_license
// EditViewChildFrame.cpp : implementation file // #include "stdafx.h" #include "SCIPicEditor.h" #include "ViewChildFrame.h" #include "RasterView.h" #include "ViewCelChooser.h" // CEditViewChildFrame IMPLEMENT_DYNCREATE(CEditViewChildFrame, CMDITabChildWnd) CEditViewChildFrame::CEditViewChildFrame() { _pViewMai...
e3a9dcdd5b0d53ca0b374ed1d3c71538960ca8b3
f315d68b2f420023b95eafb5a8d1dcd90cb0aea8
sup6yj3a8/Leetcode
/919 CompleteBinaryTreeInserter/main.cpp
C++
cpp
2,082
no_license
// // main.cpp // 919 CompleteBinaryTreeInserter // // Created by Aaron on 2021/7/12. // #include <iostream> #include <queue> using namespace std; // Definition for a binary tree node. typedef struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(null...
8235fc2339a65f1e53389a2a854346953ce229e7
862f8c88f65e80c7fce368200621151b2c7ee54d
zjkmxy/algo-problems
/出題/20-一道模拟题/标程.cpp
C++
cpp
6,057
permissive
/* 最基本的代码量胜负,合理查资料、学会使用现成代码、冷静的思考和严谨编码是成败的关键 需要熟悉常用的指针操作 */ #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <cstddef> using namespace std; #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wunused-result" #pragma GCC diagnostic ignored "-Wfor...
236a763ebe863aff96561708703aa5639f9cc8b9
6c0f8b169907c99abd0997a03e5558ff37ea07cc
renato-yuzup/axis-fem
/Axis.Physalis/application/locators/WorkbookFactoryLocator.hpp
C++
hpp
2,096
permissive
#pragma once #include "foundation/Axis.Physalis.hpp" #include "application/fwd/output_collectors.hpp" #include "services/language/syntax/evaluation/ParameterList.hpp" #include "services/management/Provider.hpp" namespace axis { namespace application { namespace factories { namespace workbooks { class WorkbookFactory;...
0808646ad409bf4f85cad20359caf8a328a0dbad
6194c61517bf2d3cb76f9a6acf02a0e3fc0a1f52
sbswarna/CodeForces
/A. Changing Volume.cpp
C++
cpp
579
no_license
#include<bits/stdc++.h> using namespace std; long long tst,a,b; int main() { cin>>tst; while(tst--) { cin>>a>>b; long long dif=abs(b-a); long long x=dif/5; long long ans=0; if(x*5!=dif) { dif-=(x*5); ans+=x; x=dif/2; ...
d70ea08170e7fc054a17eac182cdf25912206f57
39ced666241ac12d1cc4601276832bf48aeeb689
WestRyanK/Rodent-VR
/RodentVR/Intermediate/Build/Win64/RodentVR/Inc/Paper2D/PaperFlipbookActor.gen.cpp
C++
cpp
5,621
no_license
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
9566eae01940a428984509ca4d3f10f1cf1cc5ce
ae3b5693e2107a85256fdea508dc27ba0d1c7ce3
arturoc/ofxPBO
/src/ofPBO.cpp
C++
cpp
3,237
no_license
/* * ofPBO.cpp * * Created on: 08/04/2012 * Author: arturo */ #include "ofPBO.h" #include <aio.h> #ifndef TARGET_OPENGLES ofPBO::ofPBO() { // TODO Auto-generated constructor stub } ofPBO::~ofPBO() { if(!pboIds.empty()){ glDeleteBuffersARB(pboIds.size(), &pboIds[0]); } } void ofPBO::allocate(ofTex...
339bbbc883384a62acaea30508f2a37ab771af3d
9de97cf3cda97311e0fffb4835f1991f3cd68944
alvarohub/SpatialPhysicalComputing_GLUONS
/GLUON_GENERIC/lib/LedControl/LedControl.cpp
C++
cpp
5,256
no_license
/* LedControl.h - A library for controling Leds with a MAX7219/MAX7221 Copyright (c) 2007 Eberhard Fahle Modified 2016 by Alvaro Cassinelli (reduce memory footprint - char not used, only numbers) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General...
acfb49d622e876ddda7e0e374bae60b53a80502f
13349618b0ec63bae6bbe2bfa1d908852b970037
Bernhard-Steindl/cuNVSM
/cpp/data_indri.cpp
C++
cpp
31,284
permissive
#include <algorithm> #include <deque> #include <queue> using namespace __gnu_cxx; #include <indri/CompressedCollection.hpp> #include <indri/DiskIndex.hpp> #include <indri/QueryEnvironment.hpp> #include <indri/Path.hpp> #include <indri/Parameters.hpp> #include <glog/logging.h> #include "cuNVSM/data.h" namespace indr...
29c698d114b8a70da66a6dd4ada041e4f3c02a66
e76377ab3a125b07a19fd6f933586e8bf81018af
Gamza-park/opencv_programing
/chapter2/2-14.cpp
C++
cpp
657
no_license
#include "opencv2/opencv.hpp" using namespace std; using namespace cv; // ex2-14 Range template class int main(){ Matx33f A(1,2,3,4,5,6,7,8,9); Mat B(A); cout << "B = " << B << endl; cout << "B[0:1, 0:3] " << B(Range(0,1),Range(0,3)) << endl; cout << "B[0:2, 0:3] " << B(Range(0,2),Range(0,3))...
7004741c76ceb2f26e6ffd6ab1832dc84c173240
95b065d350fbc92d083e405c8c8eb59b2b9b4085
ITMO-Khan/ITMO
/1 course/2 sem/algoandstr/lab2/A/A.cpp
C++
cpp
4,191
no_license
#include <iostream> #include <fstream> using namespace std; template<typename T> class BST { BST *lChild, *rChild; T *data; public: BST() : lChild(nullptr), rChild(nullptr), data(nullptr) {} void insert(const T &key) { if (data == nullptr) { data = new T(key); } else if (...
d4259a707fab747ec2514f5e6d6120cf339324af
79d4ba8835af6ff0ce459a801a73d14d69d98b3f
SMiles02/CompetitiveProgramming
/Codeforces/CF 1500 - 1599/CF1566/CF1566B.cpp
C++
cpp
625
no_license
#include <bits/stdc++.h> #define sz(x) (int)(x).size() using namespace std; void solve() { string s; cin>>s; int n=sz(s),mx=0; for (auto i : s) mx += ((i-'0')==mx); if (mx<2) { cout<<mx<<"\n"; return; } vector<int> v = {0}; for (int i=1;i<n;++i) if (s...
12763b0f9e4f9009194b4aa0156155fe1b2207f7
897328c41442d6f912b885ded8f8ed3225ce484f
mamun4122/My-Online-Judge-Submission
/Codeforces/2017 ACM Arabella Collegiate Programming Contest - 101350/101350D-Magical Bamboos.cpp
C++
cpp
3,272
no_license
#pragma comment(linker, "/stack:640000000") #include <bits/stdc++.h> using namespace std; const double EPS = 1e-9; const int INF = 0x7f7f7f7f; const double PI=acos(-1.0); #define READ(f) freopen(f, "r", stdin) #define WRITE(f) freopen(f, "w", stdout) #define MP(x, y) make_pair(x, ...
88e41c99f917f8ff97dddc2828a0120aceafdc03
44792e78551571c0999bedbaa87c5c7bf1458f67
RhobanProject/Edu
/Projects/VitiTrajectories/vitirover/src/Robot.cpp
C++
cpp
5,121
no_license
#include "Robot.h" using namespace std; Robot::Robot() { _length = 1; _width = 1; _height = 1; _weight = 1; _maxSpeed = 1.0; _maxAcceleration = 0.1 ; _xdirection = 1.0; _ydirection = 1.0; _speed = Point<float>(0.0,0.0,0.0); _acceleration = Point<float>(0.0,0.0,0.0); _strate...
123a619700218bfae0746cd7915f9e7b583dd68b
47fbf5145cd4e47b732306028a8f34396e009d63
smeenai/llvm-project
/clang/lib/AST/Interp/State.cpp
C++
cpp
5,574
permissive
//===--- State.cpp - State chain for the VM and AST Walker ------*- C++ -*-===// // // 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 // //===---------------------------...
fd86588aeafaf4bc9cbdb5c995ff38e35bcfd242
73ae76d65a23de141de3409595948fd7040942b5
superbobry/boost.simd
/test/function/scalar/splatted_minimum.cpp
C++
cpp
1,221
permissive
//================================================================================================== /*! Copyright 2015 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //====================================...
ff4d858ef1df40ded77598244f3e9163b15530b0
8dd57d6e9a5e005e8bb31ed8f5e18f9bb370179b
kevinclement/exitpuzzles-landlord-tnt-debug
/timer-display/src/main.cpp
C++
cpp
2,284
no_license
#include <Arduino.h> #include "LedControl.h" // Display Settings #define DSP_BRIGHTNESS 1 // brightness level (0 is min, 15 is max) #define DSP_DIN 51 // pin 4 to DIN #define DSP_CLK 52 // pin 3 to Clock #define DSP_LOAD 53 // pin 2 to Load LedControl lc = LedControl(DSP_DIN, DSP_CLK, DSP_LOA...
58f27378883389b7fd0f2938d0879881453ab6c4
22f8381ad2d01547fb1085c0f22e5657d9bcdf5b
piplhu/algorithm_training
/leetcode/dichotomy.cpp
C++
cpp
4,866
no_license
/****************************************************************************** * File: dichotomy.cpp * * Created: 03/03/21 * Description: 二分法系列题解 * 如何避免空间缩到最小时候死循环? 左闭右开 左闭右闭 *****************************************************************************/ #include <algorithm> #include <iostre...
9f858d99edd2aa7350c2994c1fd38b8ec27bede7
39de8464a78070580a147b8af58be7c8fda1044e
doanamo/Multiplayer-Tanks-2019
/Source/Common/Utility.cpp
C++
cpp
2,881
no_license
#include "Precompiled.hpp" #include "Common/Utility.hpp" std::string formatString(const char* format, va_list arguments) { // Attempt to format string using static buffer. const int BufferSize = 256; char staticBuffer[BufferSize] = { 0 }; int characters = vsnprintf(&staticBuffer[0], BufferSize, format...
4056c7da6d5ae8be17b68470106a2a4a14f017a2
e8e3bac82180deb5fe20effc5326781353a709fe
duong18/SPS
/sps/trunk/libCore/DelimitedTextReader.cpp
C++
cpp
45,996
no_license
/* * DelimitedTextReader.cpp * * Created on: Jan 2, 2011 * Author: jsnedecor */ #include "DelimitedTextReader.h" namespace specnets { //--------------------------------------------------------------------------- bool DelimitedTextReader::checkHeader(map<string, unsigned int> &header, ...
3145a79d819a6f502f31194be35590df84b972f2
285664b225abafcd37987b802c08ff7ff2b0eca7
vopl/sp
/legacy/picMaker/ChartDirector41/cppdemo/vlinearmeter/vlinearmeter.cpp
C++
cpp
1,696
permissive
#include "chartdir.h" int main(int argc, char *argv[]) { // The value to display on the meter double value = 75.35; // Create an LinearMeter object of size 60 x 265 pixels, using silver background // with a 2 pixel black 3D depressed border. LinearMeter *m = new LinearMeter(60, 265, Chart...
a5d51010caeb284c315233a00c9903fb371ee0e4
d4daae80f0ad42751254a10850fa853bc1261969
xieh1987/MyLeetCodeCpp
/0171 Excel Sheet Column Number.cpp
C++
cpp
233
no_license
class Solution { public: int titleToNumber(string s) { int num = 0; for(int i = 0;i<s.size();++i) { int temp = int(s[i]) - 64; num = num * 26 + temp; } return num; } };
a2404e3a6a546e28c053813e15a2d9d90908aa7a
92097810e0cace8d0e0734ec620bc0a0c4a46b6b
pandey2016/CodingExp
/Codechef2017/July Challenge/first.cpp
C++
cpp
1,834
no_license
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; cin.ignore(); while(t>0) { char a[100],b[100],c[100]; string arr; getline(cin,arr); int l=0,i,p=0,n=0,x=0,y=0,z=0,m=0,k=0,r=0; l=arr.length(); p=0; for(i=0;i<l;i++) { if(arr[i]!=' ') { if(p==0) ...
2cc121c8f99da3c54352104fc9bdad94bd111842
9e803a64a52f850f55cbb0e6258e3bbe2b337893
uilianries/xtr
/include/xtr/detail/commands/connect.hpp
C++
hpp
2,180
permissive
// Copyright 2021 Chris E. Holloway // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish,...
0ab043375e3d8cc83ddd59a3d723c40d97bf7ca5
ece748ac3edc60a144f7701d10654858ce033143
ouzhg/L2TP
/tests/2.parse/1.atom.3.func.1.single.cpp
C++
cpp
874
no_license
#include <stdio.h> #include <assert.h> #include "utility.h" extern FILE* yyin; extern int yyparse(); int main(int argc, char** argv) { init_vocabulary(); yyin = fopen ( "res/1.atom/3.func.1.single.in", "r" ); if(!yyin) { printf("Parser Error: cannot open the input file.\n"); assert(false); } ...
91787719546e05334282de3d631e0895e923ee08
b6f345eaa0f7417bf5b84fd67b0ff6a8e15073d8
ganeshmakavana/TS3AudioBot
/TS3AudioBob/src/commands/CommandGroup.cpp
C++
cpp
3,434
no_license
#include "CommandGroup.hpp" #include "Utils.hpp" CommandGroup::CommandGroup(const std::string &name) : name(name) { } CommandGroup::CommandGroup(CommandGroup &&group) : name(std::move(group.name)), subCommands(std::move(group.subCommands)) { } std::string CommandGroup::composeCommands(const std::vector<std::stri...
6b204d0bba62ced8d1c1a63b4d586c29ad0d8edb
a7fcf2e5e7522d36e305cb18587762ce0d8ecce1
PopCap/GameIdea
/Engine/Source/Editor/PropertyEditor/Private/PropertyEditorHelpers.cpp
C++
cpp
31,752
permissive
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "PropertyEditorPrivatePCH.h" #include "PropertyEditorHelpers.h" #include "PropertyNode.h" #include "PropertyHandle.h" #include "PropertyHandleImpl.h" #include "PropertyEditor.h" #include "SPropertyEditor.h" #include "SPropertyEditorNumeric.h" #inc...
15c965693b3a0c2dac559b45165ba75464730684
c2da790d1e921026b729032332e46113f8689774
pavankapoor31/chromium
/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc
C++
cc
7,794
permissive
// Copyright 2019 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/web_applications/web_app_controller_browsertest.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/...
12c6c33d6b1c718c02ea3264fdf03f5170aa2255
bd4d1e575f8d53a05e957b9a48b2f6a600ff0aa5
nico/chromium
/chrome/browser/ui/gtk/native_theme_gtk.cc
C++
cc
29,628
permissive
// Copyright 2016 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/gtk/native_theme_gtk.h" #include <gtk/gtk.h> #include "chrome/browser/ui/gtk/gtk_util.h" #include "ui/gfx/color_palette.h" #...
98ba755ab35003e74df9017278d445ef4f6a340c
ceea835351d4469b09f6d17e11a6e9de9a5e2203
takashikumagai/amorphous
/framework/amorphous/Item/GameItemDatabase.cpp
C++
cpp
3,321
no_license
#include "amorphous/Item/GameItem.hpp" #include "amorphous/Item/GameItemObjectFactory.hpp" #include "amorphous/GameItemDatabase.hpp" #include <assert.h> #include <algorithm> namespace amorphous { using namespace std; class GameItemSerializer : public IArchiveObjectBase { public: GameItem *pItem; // string strFile...
acc19435c84cadf11dd97a3214467d3074f67c17
118d639211d2597d13e5c188312421aaa65dd02d
chelin192837/GitForDiscover
/src/fs_license.cpp
C++
cpp
53,669
no_license
#include "../include/common.h" #include "../include/fs_pdfdoc.h" #include "../include/fs_pdfpage.h" #include "fxcore.h" #include "fs_util.h" #include "inc/fs_pdfdocImp.h" #include "inc/fs_pdfpageImp.h" #include "inc/fs_license.h" #include "watermark/inc/fs_watermark.h" #include "ofd/fr_include.h" #if !def...
f8ed7f78d045fbabf7f7916878d264ca68b2b21a
d043a0229b5870bf8a334affb03ce78ed5ecf2d4
hovgrig/Playground
/Src/Playground/Hovo/Boost/HttpServer3/request.hpp
C++
hpp
724
no_license
// // request.hpp // ~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef HTTP_SERVER3_REQUEST_HPP #define HTTP...
eaa8825e354f89770d1808339d07e466837d753e
472dd86502895f339629476688597aa867b53208
mato391/OSCAR
/OSCAR/TIMER.cpp
C++
cpp
393
no_license
#include "stdafx.h" #include "TIMER.hpp" #include <iostream> TIMER::TIMER(int timeout, std::string label) { this->timeout = timeout; this->label = label; } TIMER::~TIMER() { } void TIMER::start(bool * feedback) { std::cout << "TIMER STARTED" << std::endl; boost::this_thread::sleep_for(boost::chrono::seconds(tim...
b45807742261d960784293c217afe2e80fe97cd9
826378f138b9e97df632c62b876ef3cd825f2a09
shankarlaldhakar/BiometricEvaluation
/common/src/test/test_be_rs_mpi.cpp
C++
cpp
10,678
permissive
/* * This software was developed at the National Institute of Standards and * Technology (NIST) by employees of the Federal Government in the course * of their official duties. Pursuant to title 17 Section 105 of the * United States Code, this software is not subject to copyright protection * and is in the public...
a7678d303204f5aabb98329fe9dcec2ea8223172
5836818e5eb49c374e25f703dce30e7ea7f816b8
ProgDevel/freetype_wrapper
/string_helpers.hpp
C++
hpp
305
no_license
#ifndef __STRING_HELPERS_H #define __STRING_HELPERS_H //#include <list> //#include <map> #include <string> #include <stdexcept> /*char const * const UTF8 = "UTF-8"; char const * const CP866 = "CP866";*/ std::string convert_encoding(const std::string&, const std::string&, const std::string&); #endif
7ff8332878b625bcee84bd99715e7772b9a54d37
24ca6969ff3bffbda82489223c800a2c3675ff9d
MyHiHi/leetcode-niuke
/leetcode+牛客/数组的众数.cpp
C++
cpp
615
no_license
/* @File : 数组的众数.cpp @Time : 2020/04/03 11:14:28 @Author : Zhang tao @Version : 1.0 @Desc : 数组的众数.cpp */ /* */ #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ vector<int> nums; while (getchar()!=']'){ int c; cin>>c; nums.pu...
ef4b2f2889a68328a59109db31de664ca77676cf
41a6eb5a4afb7de33802ef92b5a52244067d8cb0
Mr-Magnificent/ippc
/leetcode/ImageOverlap_835.cpp
C++
cpp
5,684
no_license
#include <bits/stdc++.h> using namespace std; #ifndef TRAILING_SPACE #define TRAILING_SPACE void trimLeftTrailingSpaces(string &input) { input.erase(input.begin(), find_if(input.begin(), input.end(), [](int ch) { return !isspace(ch); })); } void trimRightTrailingSpaces(string &input) { input.erase...
7b3580541068d8137aafc9a241946e3197204137
5e97ed5ec4e3e7eb46cd29c687e3ad895696b790
npkhang99/Competitive-Programming
/CodeChef/TSORT.cpp
C++
cpp
271
no_license
// CodeChef #include <cstdio> #include <algorithm> using namespace std; int n, a[1000009]={}; int main(){ scanf("%d",&n); for(int i=0; i<n; i++) scanf("%d",&a[i]); sort(a,a+n); for(int i=0; i<n; i++) printf("%d\n",a[i]); return 0; }
b1ef6c44e998ab9021e42eb9b30c4c94618d765a
bc029246ed06400639d5bb35cce1db4406b0996b
umiswing/NiuTrans.NMT
/source/nmt/layer/LayerHistory.cpp
C++
cpp
4,339
permissive
/* NiuTrans.NMT - an open-source neural machine translation system. * Copyright (C) 2020 NiuTrans Research. 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 * * h...
f5c550b1b57d15bd9ad7a93bfcc2e89861a476d6
9bd43491691a95a726d0e05abb8f713404bf9920
New2World/LittleProjects
/ChatClient-QT/widget.cpp
C++
cpp
4,078
no_license
#include "widget.h" #include "ui_widget.h" #define NAME_LEN 20 #define MAX_LEN 1000 Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget){ ui->setupUi(this); if((usrName = (new login())->execute()).isEmpty()) exit(0); setupPanel(); } Widget::~Widget(){ updateSock->write(QByt...
2fbd04a55310cbda017480195dc27cdf0d0d5c66
a6a23a31733c949fe10319059ba1f7e3b41eb6cf
qian99/acm
/problem/数学/数论/毕达哥拉斯三元组/poj 1305 Fermat vs. Pythagoras.cpp
C++
cpp
1,128
no_license
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #include<map> #include<queue> #include<stack> #include<cmath> #include<vector> #define inf 0x3f3f3f3f #define Inf 0x3FFFFFFFFFFFFFFFLL #define eps 1e-9 #define pi acos(-1.0) using namespace std; typedef long long l...
9a39998bebbf8dc0e3521363c219a786bb07f084
8672f2f80a4dc3917af4cd32975fbdd3af315d65
katmsft/azure-sdk-for-cpp
/sdk/core/azure-core/src/http/url.cpp
C++
cpp
5,952
permissive
// Copyright (c) Microsoft Corporation. All rights reserved. // SPDX-License-Identifier: MIT #include "azure/core/http/http.hpp" #include "azure/core/internal/strings.hpp" #include <algorithm> #include <cctype> #include <iterator> #include <limits> #include <vector> using namespace Azure::Core::Http; Url::Url(const...
095039d9a9a36f98f1e95d4d0ea7c6b43840116c
51e705159246eb76fb6d9dd629bbd40898182886
jiezenghuang/ros2
/car_teleop/include/state_machine.hpp
C++
hpp
3,211
permissive
#ifndef _STATE_MACHINE_HPP_ #define _STATE_MACHINE_HPP_ #include <memory> #include <functional> #include <thread> #include <map> #include <exception> #include <sstream> class Alphabet { public: explicit Alphabet(int k, std::shared_ptr<void> v = nullptr) : key(k), value(v) {} virtual ~Alphabet(...
d4a1f2bc0b689cf41d6731daa2e4bd48c9409feb
a965d5f3d528512538eaf109e3ca773c2bfc9c4d
Xiaobin0860/tinch_pp
/impl/erl_string.cpp
C++
cpp
3,616
permissive
// Copyright (c) 2010, Adam Petersen <adam@adampetersen.se>. 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,...
e0987e0f7a45105dfa8a6ae4fd1fbcd35b1699a5
3c5a152f9bee026cb18c562c55a9ddfa47eaa68d
Emoun/patmos-llvm
/lib/Target/Patmos/SinglePath/PredicateDefinition.cpp
C++
cpp
5,583
permissive
//===-- PredicateDefinition.cpp - Patmos LLVM single-path predicate register allocator -===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===------------------------------------------...
ebb168a61a36d963bf694cb1af501cb3036f340b
f41ddf8fe99d59278d14d4aa2616d0f0ee666e26
kevin405/asylo
/asylo/crypto/sha256_hash.cc
C++
cc
2,267
permissive
/* * * Copyright 2017 Asylo authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
b6f0b3b4d349ce57d23118448cf182724e93cad7
ae19ccdba6f448ae440e6c58f17b3e0546ebd670
wzx140/Tube_connect
/src/main.cpp
C++
cpp
375
permissive
#include <QApplication> #include <ui/MainWindow.h> #include <QtGui/qsurfaceformat.h> #include <QVTKOpenGLWidget.h> int main(int argc, char **argv) { QApplication a(argc, argv); auto stlRender = vtkSmartPointer<STLRender>::New(); QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat()); MainWi...
4d67d4fd2b2b94808010e649ff2d41b35995097c
1610d373b14a4ccc1c7277f5a90e36344f3507d2
vertohod/include
/shared_mutex.cpp
C++
cpp
605
no_license
#include "shared_mutex.h" shared_mutex::shared_mutex() : m_count(0) {} void shared_mutex::lock() const { m_shared_mutex.lock(); m_unique_mutex.lock(); } void shared_mutex::unlock() const { m_unique_mutex.unlock(); m_shared_mutex.unlock(); } void shared_mutex::lock_shared() const { std::lock_guard<std::mutex>...
feacf37e66ccfb03fe5c43497f3bbfe6579634d5
3b2c9ac991b90af3c3521b9ee09e27621db29f9c
AprilAndFriends/april
/src/delegates/MotionDelegate.cpp
C++
cpp
1,245
permissive
/// @file /// @version 5.2 /// /// @section LICENSE /// /// This program is free software; you can redistribute it and/or modify it under /// the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause #include <hltypes/hlog.h> #include <hltypes/hstring.h> #include "april.h" #include "MotionDelegate.h...
a7701d337bfedbe57f41737871ce0456af77bc28
784c633cbe203590bb3ccc687680333c8c56be55
dikshant-dwivedi/DSA-CODES
/array/binary_search/find_ceil_of_number_in_sorted_array.cpp
C++
cpp
556
no_license
#include<iostream> using namespace std; int findFloor(int arr[], int n, int e) { int start = 0, end = n-1, mid, res = -1; while(start <= end) { mid = start + (end - start)/2; if(arr[mid] == e) return mid; if(arr[mid] > e) { end = mid - 1; ...
02e9a8b4e85f150ef0040a6f691fc7b683eaf794
1f6648d894d956bdf6bebf952b01239ff355d595
Retnirps/ITMO
/AlgorithmsandDataStructures/11thLab/J(AmountOfPaths).cpp
C++
cpp
1,633
permissive
#include <iostream> #include <vector> const long long INF = 1e9 + 1; class Ikea { public: long long x1, x2, y1, y2; explicit Ikea(long long x1, long long x2, long long y1, long long y2) : x1(x1), y1(y1), x2(x2), y2(y2) {} explicit Ikea() {} }; long long dist(Ikea fi, Ikea se) { return std::max( std::ma...
e5c771d31329cce995bcde89334f9de0ed97f931
f5fee11f27b18acc2020379226aebb234c3b422b
tozawa0406/SpriteMeshEditer
/Projects/Sources/Object/Client/SpriteMesh.cpp
C++
cpp
491
no_license
#include "SpriteMesh.h" SpriteMesh::SpriteMesh(Systems* systems) : Interface(systems) { } HRESULT SpriteMesh::Init(void) { return S_OK; } void SpriteMesh::Uninit(void) { } int SpriteMesh::SetUpLoading(Loading* loading, int sceneNum) { UNREFERENCED_PARAMETER(loading); UNREFERENCED_PARAMETER(sceneNum); return 0; ...
94bf732e75f75d0b3e6fd2257df206dd56cd9f80
57d26114cd7a0ec7841cf4e45c834dde04fb309e
AdriannaCencora/DataStructuresAndAlgorithms
/src/DoubleLinkedList.cpp
C++
cpp
3,365
no_license
#include "DoubleLinkedList.h" #include <random> void DoubleLinkedList::insert(int position, int value) { if (position == 0) insertFront(value); else if (position == size) insertBack(value); else if (position < 0 or position > size) throw std::invalid_argument("Out of range."); else insertAtPosition(po...
802e093b54db3e2eef32f302ca901d13092533e7
f7fecd0828430ea8a9c0786c7812355be26759d1
Zeronfinity/UVa-Solutions
/316 - network.cpp
C++
cpp
847
no_license
#include <stdio.h> #include <climits> #include <iostream> #include <map> #include <cmath> #include <algorithm> #include <set> #include <stack> #include <deque> #include <vector> #include <stdlib.h> #include <string> #include <string.h> #include <utility> #include <queue> using namespace std; #define ll long long #def...
5de03ded043995f6086114f5c7142a2544739815
25b61d63272ed4d3e7212bdead8e2c9a13a3c895
Dolphiniac/Vulkan
/Engine/Code/Engine/Input/XboxController.cpp
C++
cpp
7,079
no_license
#include "Engine/Input/XboxController.hpp" #include "Engine/Core/ErrorWarningAssert.hpp" #include <winerror.h> #include <cstdlib> #include <math.h> #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <Xinput.h> #ifndef __USING_UWP #pragma comment(lib, "xinput9_1_0") #endif //----------------------------------...
2ea93d4e277a56dd07d2b8c1e282fccb33aeb0d2
87f9d0596f8d02239fc6aa57368ae4756c23d65c
choward1491/OptimalSequenceDP
/src/main.cpp
C++
cpp
1,448
no_license
#include "dp_optseq.hpp" class Penalty { public: typedef unsigned int num_type; num_type operator()(num_type n, num_type s, num_type u) const { num_type scale = 1; if (s < 2) { scale = 1; } else if (s < 6) { scale = 2; } else if (s < 11) { scale = 3; } else if( s < 20 ){ scale = 4; } else { scale = 4; } ...
30f551e142a2502350839dac105e7837d3c9e051
7780575e4a2cddb643b3919ad52159fa8404393e
ArseniyCH/MoCap-System-Node
/src/Vibro.cpp
C++
cpp
1,390
no_license
/** * @brief * * @file Vibro.cpp * @author Arseniy Churin * @date 2018-05-28 */ #include "Vibro.h" #include <Arduino.h> #include <Ticker.h> Vibro::Vibro(uint8_t pin) { _pin = pin; pinMode(pin, OUTPUT); digitalWrite(pin, HIGH); } void Vibro::AlarmVibration() { vibro_ticker.attach_ms<Vibro *>(5...
49c27423e10c33748e6e96fd0b36bb75c547799b
a633b42bc73c086c959ab54994130580ff0cd0d5
RS-codes/Qt5_Intermediate_5.3_ExploringQDebug_CreatingCategories
/main.cpp
C++
cpp
656
no_license
#include <QCoreApplication> #include <QDebug> #include <QLoggingCategory> //Declare a logging category Q_DECLARE_LOGGING_CATEGORY(network); Q_LOGGING_CATEGORY(network,"network"); int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); qInfo() << "test"; qInfo(network) << "test"; //turn i...
e9a698c7e1d1409575e5c95c0e1803662288325b
54d29aee0b0eb8de0b43f113f6425ca4d0ff5832
vyeon/OpenNUI_G3
/Windows/libvee_master/voost/interprocess/win32_named_pipe_server.cpp
C++
cpp
4,905
no_license
#include <vee/voost/win32_pipe.h> #pragma warning(disable:4996) namespace vee { namespace voost { namespace interprocess { namespace win32 { win32_named_pipe_acceptor::~win32_named_pipe_acceptor() __noexcept { } win32_named_pipe_acceptor::win32_named_pipe_acceptor() __noexcept { } win32_named_pipe...
d67fbd9b34fc2702760414c41e2c126d8e25dc85
3ad6f51d1f24cbeb6f8cec8d0ec3ff6d43c64e76
gflegar/pal
/shared/gpuopen/src/util/ddEventTimer.cpp
C++
cpp
4,211
permissive
/* *********************************************************************************************************************** * * Copyright (c) 2019-2020 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
bbb3a3e7fc0f79af3b7623411cfa60d16a1d0b57
a555a96d06e51fddb99ad41e7a13c48e8ce4eeb7
cyxsourcetree/chen-yixin
/4.30.cpp
C++
cpp
291
no_license
#include <iostream> using namespace std; int main() { double radius; double pi=3.14159; cout<<"Enter the radius:"; cin>>radius; cout<<"The diameter is"<<radius*2.0; cout<<"\nThe circumference is"<<2.0*pi*radius; cout<<"\nThe area is"<<pi*radius*radius<<endl; }
4724e4a7cea21472ee708b77c58a477456942c0a
8e3d0a367ff20deb975d655f7e3f31835bdafe28
aaronenyeshi/rocPRIM
/rocprim/include/rocprim/device/device_reduce_by_key_hip.hpp
C++
hpp
17,966
permissive
// Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // t...
5f06a111a97f15985c9332ff4da170d023cea6bd
ed2b3068d5dda710de728cfad14a98aeaf847954
zhangjcqq/Paddle
/paddle/utils/tests/test_CommandLineParser.cpp
C++
cpp
3,413
permissive
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. 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 ...
b2b56dcbe5d9eca09126a64f50fd9e9ed39e2ec7
c6185cd8ef5954ac3641bd6c95e14877761b80d3
NaokiTakahashi12/OpenHumanoidController
/src/Tools/Log/Logger.cpp
C++
cpp
5,123
permissive
/** * * @file Logger.cpp * @author Naoki Takahashi * **/ #include "Logger.hpp" namespace Tools { namespace Log { Logger::Logger() { } Logger::Logger(int argc, char **argv) { messenger = std::make_unique<Messenger>(argc, argv); } Logger::~Logger() { close_loger_thread(); } Logger &...
af4588964debd14b42c0f96bc273090380709fb1
701425c4c03a51a82ad8262d9d976ff01089af67
wiltonlazary/arangodb
/arangod/Pregel/Algos/AIR/GraphFormat.cpp
C++
cpp
8,490
permissive
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2022 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
4c3ae087ac41dd3bf18de46dee432ddcdb7a627a
7a1b7675d60deb7e3fb4b9ca23cfea82ba3a8afa
diana4sb/cat-tracking
/main2.cpp
C++
cpp
5,786
no_license
#include "mainwindow.h" #include <QApplication> #include <QGraphicsGridLayout> #include <QWidget> #include <QtGui> #include <QTCore> #include <QLabel> #include <QLayout> #include <QRect> #include <QGraphicsView> #include "mytimer.h" MyTimer::MyTimer() { // create a timer timer = new QTimer(this); // setup ...
39e5ba61e7c3440f3bd0c22f18da4c21229f6230
ccae1340b96d1ac6f9d17231f4f6dd747466b847
linjunhui/work
/qt/auto/main.cpp
C++
cpp
458
no_license
#include <iostream> #include <stdlib.h> int main(int argc, char *argv[]) { double db = 10.9; double *pdb = &db; auto num = pdb; //d = double std::cout << typeid(db).name() << std::endl; //Pd = double * std::cout << typeid(num).name() << std::endl; //Pd = double * std::cout << typ...
92586366d8ae5201080bb782f5bdc6cac3ec0869
9369952548615e05c08ca942b7a92ee357841ed9
phamphurd/Cavestory_Development
/input - Copy.cpp
C++
cpp
1,155
no_license
#include "input.h" /* Input class * Keps track of keyboard state */ //This function gets called at the beginning of each new frame //to reset the keys that are no longer relevant void Input::beginNewFrame(){ this->_pressedKeys.clear(); this->_releasedKeys.clear(); } //This gets call when a key...
e5d6c33859b1b8c73f5056a0bc045e4111288dec
32775df70b0841f6fa39e6e76abf44476ab4a882
PHinker/paint
/main.cpp
C++
cpp
3,647
no_license
/*************************************************************************//** * @file * * @mainpage program 1 - Paint * * @section course_section Course Information * * @author Paul Hinker, Jake Davidson * * @date September 25, 2015 * * @par Professor: * Professor Hinker * * @par Course: * ...
019b01d9c05407a546e81a7d89a52b28db229c78
0792ec894efcf94f623eea299ad61c5afff94cd0
mediabuff/Prelude
/third_party/skia/src/core/SkColorSpaceXform.cpp
C++
cpp
28,169
permissive
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorData.h" #include "SkColorSpacePriv.h" #include "SkColorSpaceXformPriv.h" #include "SkColorSpaceXform_A2B.h" #include "SkColorSpaceXform_Base.h" #include "SkCo...
772c116c4ad442e63b17f54a6220f7ae1a9ce696
4c9eaa5fae3995e1ff36f0d21d838cda3445df5c
eshikafe/wxSynfig
/src/core/synfig/distance.cpp
C++
cpp
6,692
no_license
/* === S Y N F I G ========================================================= */ /*! \file distance.cpp ** \brief Template File ** ** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/o...
f96b77c9258c530549bfa62267da6a1b18e6f747
527212d91d9615a1967c3d8eecaa1603e21761b5
marinie-tao/Practical-5-
/Pract5/Point.hpp
C++
hpp
872
no_license
// Ex. 3 Point Function - Create Point object with list initialization #include <iostream> #include <cmath> using namespace std; class Point { protected: double x_coord; // first point x co-ordinate double y_coord; // first point y co-ordinate public: // default constructor with parameter 0 Point...