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
cce40ab5c6dfe325e48bcabe5a382d1b920b76aa
c7beb63084d9172a7362052bb97f0db1878b8ef5
Gouet/Software-updater
/SoftwareUpdater/src/service/filerightsservice.cpp
C++
cpp
2,327
no_license
#include <QNetworkAccessManager> #include <QNetworkRequest> #include <QUrl> #include <QNetworkReply> #include <QList> #include <QByteArray> #include <QFile> #include <QDir> #include <QtNetwork> #include <QSslSocket> #include <iterator> #include "include/service/filerightsservice.h" FileRightsService::FileRightsService...
9f560c62ca5537b3be543e89dc0522eb59bf0f23
3490d725ac4238f4e64bf65336fdca371549ab34
manik114/My-All-Programs
/bellman ford/main.cpp
C++
cpp
1,616
no_license
#include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; class graph{ int V; vector<pair<int,pair<int,int>> > edges; //pair first weight the connected vertex bool negEdge = false; public: graph(int V); void addEdge(int u,int v,int w); void bellmanFord(int source); }; graph::graph...
b76d3ba996c62b79d95893d58d3309e875d236e0
408ac335b612a2321d273fc57f355a0479b3d94c
jviereck/crocoddyl
/include/crocoddyl/core/costs/cost-sum.hxx
C++
hxx
9,145
permissive
/////////////////////////////////////////////////////////////////////////////// // BSD 3-Clause License // // Copyright (C) 2019-2020, LAAS-CNRS, University of Edinburgh // Copyright note valid unless otherwise stated in individual files. // All rights reserved. /////////////////////////////////////////////////////////...
71365875e0c2961c91f823b7159b230b4e6db1ce
c6c09a032666ad0890e4580166856614779f4ea2
TheMrButcher/offline-mentor
/omkit/json_utils.cpp
C++
cpp
867
permissive
#include "json_utils.h" #include <QFile> #include <QJsonDocument> bool readJSON(QString fileName, QJsonObject& jsonData) { if (fileName.isEmpty()) return false; QFile file(fileName); if (!file.exists()) return false; if (!file.open(QIODevice::ReadOnly)) return false; QJsonPa...
c4a0f2638dd2c3633f72118533c59ec0452dab87
002f7d8d9152be5d04d2c6f966e6c2e43b3bde91
Taylormsz/sandboxed-api
/sandboxed_api/util/statusor_test.cc
C++
cc
12,641
permissive
// Copyright 2019 Google LLC. 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...
21371cdb9ae57836474c46c21cc8d2e5c1801aa8
818f61c47e3621cdacc32120206b80193a765e07
PabloMessina/Competitive-Programming-Material
/Solved problems/kattis/TreasureSpotting.cpp
C++
cpp
3,492
no_license
// tags: geometry, cross product, dot product #pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i = a; i < b; ++i) typedef long long int ll; // ------------------------------- int W, P; template<typename T> struct Point { // 2D T x, y; Point<T> operator-(cons...
e5bfff7bfb5948ed147688155e4766008956d461
bd556d956a2dd1b6be13aba3f0d77551bdc706ca
shivral/cf
/0900/90/990a.cpp
C++
cpp
469
permissive
#include <iostream> using integer = unsigned long long; void answer(integer v) { std::cout << v << '\n'; } void solve(integer n, integer m, unsigned a, unsigned b) { const integer r = n % m; const integer c1 = (m - r) * a; const integer c2 = r * b; const integer c = std::min(c1, c2); answer...
7156f1c3e7f7f3af63800ca50f3c76d3004bfac3
5b1c282b29ff58b6dc23eb99f8da7e53bc6ec17f
ppiecuch/gd_raknet
/raknet/Source/DS_Table.cpp
C++
cpp
27,519
permissive
/* * Copyright (c) 2014, Oculus VR, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ ...
99a02efd4991f12550b17a57ce4d01c3f54839a6
3066c8c46a53a7589f00b3fb0489d911144b0111
WillieTaylor/simgen
/code5save/cell.cpp
C++
cpp
24,620
no_license
#include "util.hpp" #include "geom.hpp" #include "cell.hpp" #include "data.hpp" Cell* Cell::world; Cell* Cell::scene; int Cell::total; int Cell::allatoms; Cell** Cell::uid2cell; float inEgg ( Vec, Vec, Vec, float ); float inEgg ( Vec, Seg, float ); // short temp names for Data::globals char *names; int...
a4e138df12666a3e4f5f945c15afcb68d446ff9d
976a332ee50c208eb31638cebf346a76ebd22194
stefanyangwang/mir_100
/pid/src/setpoint_node.cpp
C++
cpp
3,430
permissive
/***************************************************************************/ /** * \file setpoint_node.cpp * * \brief Node that publishes time-varying setpoint values * \author Paul Bouchier * \date January 9, 2016 * * \section license License (BSD-3) * Copyright (c) 2016, Paul Bouchier * All rights reserve...
d3f49b601dcba2b877bb9081e923cf3069d71d52
f25ff10ea5781f91e103bb32582cc860c2af353d
nitesh-147/Programming-Problem-Solution
/hust COntest/B.cpp
C++
cpp
3,098
no_license
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); long long cas=1,tmpn,n,ar[305][305],mx[305][305],i,j,k,sum=0; while(cin>>n &&n) { tmpn=100+n; for(i=0;i<305;i++) for(j=0;j<...
3c729fecc8cca2b3269f2813878213f14b3dca26
9e35d506712d488ff63a1bba35aa3b90c407b29f
gezel-hdl/gezel-cg
/vhdl/vtype.cxx
C++
cxx
1,675
no_license
//-------------------------------------------------------------- // Copyright (C) 2003-2010 P. Schaumont // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License...
b97426d909e3b111e72112146931cb106b64f791
c0caa62d0610e03a8df46ca473e0795de1686ade
uvbs/wx2Server
/Common/Packets/GWCityCloseSuccess.cpp
C++
cpp
655
no_license
#include "stdafx.h" #include "GWCityCloseSuccess.h" BOOL GWCityCloseSuccess::Read( SocketInputStream& iStream ) { __ENTER_FUNCTION iStream.Read( (CHAR*)(&m_CityGuid), sizeof(_CITY_GUID)); return TRUE ; __LEAVE_FUNCTION return FALSE ; } BOOL GWCityCloseSuccess::Write( SocketOutputStream& oStream ) ...
34c5cb8d563752a4a6dbf72a747185f3a42bb10e
9dbcfde2dac6763db5fc553ab51e13a80d00d874
KMcEwan/University---Game-Physics
/Final project/App/ProjectGit/ContactResolver.cpp
C++
cpp
1,036
no_license
/* Name: Kirsty McEwan Student ID: B00188061 I declare that the following code was produced by Kirsty McEwan, Lauren McNally, Matthew McMahon Wood as a group assignment for the Game Physics module and that this is our own work. I am aware of the penalties incurred by submitting in full or in part work that is not o...
dbe245e2a7bad9db11dbab4f3a639281be01d085
24201e99bdbd133a14c7bcc5a64162c0a08c566b
jypjypjypjyp/Leetcode
/Junior/String/count_and_say.cpp
C++
cpp
368
no_license
#include"main.h" #include<sstream> string CountAndSay(int n) { if (n == 1) return "1"; string previous = CountAndSay(n - 1); stringstream ss; char current = previous[0]; int num = 0; for (char c : previous) { if (c == current) num++; else { ss << num << current; current = c; num = 1; } } ss << n...
d8bcc9e8240a9a4d6cafa28f70099f0d289a11eb
8a4e9b6ea0f45985d3712fcf535b0802d2a92294
oyagci/humangl
/opfor/vendor/Refureku/Refureku/Generator/Submodules/Kodgen/Source/InfoStructures/NamespaceInfo.cpp
C++
cpp
962
permissive
#include "Kodgen/InfoStructures/NamespaceInfo.h" using namespace kodgen; NamespaceInfo::NamespaceInfo(CXCursor const& cursor, PropertyGroup&& propertyGroup) noexcept: EntityInfo(cursor, std::forward<PropertyGroup>(propertyGroup), EEntityType::Namespace) { } void NamespaceInfo::refreshOuterEntity() noexcept { for (...
7a2391f82258958aa1dd8a89a5351585c7883a8c
52e5086108380421a7dd44debdee19ab7c5a311c
lunochod/arrayfire
/src/backend/opencl/set.cpp
C++
cpp
5,485
permissive
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
5e9fa5768653ab12b83688d94e9dcabb6aed0b05
c2218b829c6d4e2618c95c57469f7f3fc55672b9
HXHHY/GA-aided-NMPC-tuning
/src/hone_weights.cpp
C++
cpp
1,205
no_license
#include "genetic_algorithm/population.h" #include "utils/config_handler.hpp" int main(int argc, char **argv) { DEBUG_LOG("Binary built in debug mode. If not intended, abort."); srand(time(0)); const auto gaConfig = config::ConfigHandler<config::GA>::getGAConfig(); const size_t &popSize = gaConfig.g...
6e6f955d1772c5644fc4440cf4bd75bc585ac0f2
f7556ca557c8810e5a9255857bdcf4637fe51c08
suivalli/crobots
/grid_stat.hh
C++
hh
9,212
no_license
// grid_stat.hh C++11 // Part of the robots project // Author: Dirk Oliver Theis #ifndef __ROBOT__GRID_STAT_HH__ #define __ROBOT__GRID_STAT_HH__ #include "grid.hh" #include <array> #include <algorithm> #include <stdexcept> #include <string> namespace GridSpace { enum class On_Node : char { empty, Car0, Car1, C...
a961c4eda2e9c70b88f02eba21876a74498dcda6
5106e68f55ed839eb407d69636592635975d72f0
scottie/testtest
/src/qt/paymentserver.cpp
C++
cpp
24,985
permissive
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017 The Zix developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.p...
68fccf7cf94c0b2ce3f2d0a815e72944ff544b6a
32939244b2017d0f3983891dec8e6d4c7edf7b2f
EpicGames/DirectXShaderCompiler
/lib/HLSL/DxilLoopDeletion.cpp
C++
cpp
1,925
permissive
//===- DxilLoopDeletion.cpp - Dead Loop Deletion Pass -----------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-----------------------------------------------------------------...
1fb25d7581683249f56ae5db924f955d7f9af162
6d57bd5dcae92d0b0911b9faa41801348fe1b1f9
shreejaverma/HacktoberFest2020
/Optimized_bubble_sort.cpp
C++
cpp
1,161
no_license
#include<iostream> using namespace std; //- Optimized bubble sort technique (elements gets bubbled up!) void bubbleSort(int* a,int n) { int flag; //-flag to check whether the further array is already sorted or not (This is gonna reduce ur passes!) for(int i=0;i<n-1;i++){ flag = 0; for(int...
3a772a52fe616b584fe1b3b377b0cafd43775691
d060560bc57cbfd59838f938d50748dda08707c0
ddozza/T3000_Building_Automation_System
/T3000/AllNodesDiaolg.cpp
C++
cpp
22,785
permissive
// AllNodesDiaolg.cpp : implementation file // #include "stdafx.h" #include "T3000.h" #include "MainFrm.h" #include "AllNodesDiaolg.h" #include "ARDDlg.h" #include "../SQLiteDriver/CppSQLite3.h" // CAllNodesDiaolg dialog #define AN_MAINNAME 1 #define AN_NAME 2 #define AN_SerialID 3 #define AN_FLOORNAME 4 #define AN_...
6cac69a05f9583525fa78f5d5143e6ba9c449eaa
325b34893776ae36bb6ec8235a2f4b1d3d3d1c04
caselitz/pcl
/io/tools/ply/plyheader.cpp
C++
cpp
7,446
permissive
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2007-2012, Ares Lagae * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted pro...
4fa2db06fc94c4890e97bc5e97c353938999ab8c
f10b00751a356b1c1a31582d8081a8e48f6d6644
ArneDJ/terraingen
/src/main.cpp
C++
cpp
7,305
permissive
#include <iostream> #include <vector> #include <random> #include <algorithm> #include <SDL2/SDL.h> #include <GL/glew.h> #include <GL/gl.h> #include <glm/vec3.hpp> #include <glm/vec4.hpp> #include <glm/mat4x4.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> ...
6dd90d7d1811cdd08a1b62c53c1d2c1b96a64676
c768e5deb1ebe54fce45b191a9d010fb3fce0291
bbbiggest/12
/idle_code/CinOrScanf.cpp
C++
cpp
3,543
no_license
// 更推荐去看 https://www.geeksforgeeks.org/fast-io-for-competitive-programming/ // 和 https://www.geeksforgeeks.org/cincout-vs-scanfprintf/#:~:text=With%20synchronization%20turned%20off%2C%20the,does%20this%20at%20compile%20time. // More recommended to see https://www.geeksforgeeks.org/fast-io-for-competitive-programming/ ...
a096ee2213e808f71b69622f066202bd3851c393
17abf2bc20921ccce02f83d538a9341097077c71
jim-leedham/RCN
/RCN001/RCN/Audio/RCNContainer.cpp
C++
cpp
1,930
no_license
/*---------------------------------------------------------------------------* Project: RCN File: RCNContainer.h Description: Stores a variety of audio source parameters as read in from XML *---------------------------------------------------------------------------*/ #include "stdheader.h" #include "RCNContai...
6623e598f779d3af69f2839a2e709186a4abd3e5
9341197818467ba0783e42f09c106697fa5e9ecf
tonifj/MiniStreetFighter
/ModuleRender.cpp
C++
cpp
2,465
no_license
#include "Globals.h" #include "Application.h" #include "ModuleRender.h" #include "ModuleWindow.h" #include "ModuleInput.h" #include "SDL/include/SDL.h" #include <iostream> ModuleRender::ModuleRender() { camera.x = camera.y = 0; camera.w = SCREEN_WIDTH * SCREEN_SIZE; camera.h = SCREEN_HEIGHT* SCREEN_SIZE; } // Des...
e9613b56a74d4448e65716b633779c2ff5c5f004
e0b1d974ac0d85b684aba44cc153149ec88451c6
hongshui3000/mt5507_android_4.4
/kk-4.x/external/bluetooth/mtk/blueangel/btadp_int/sys/bt_adp_ashm_impl.cpp
C++
cpp
14,556
no_license
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or ...
29a53ba8b54c3a8b0473427c24618efc077513ca
ed22134d1dcc82dc284de4b3e5fe85d60841c174
WangLuofan/llvm-project
/mlir/lib/IR/BuiltinAttributes.cpp
C++
cpp
72,707
permissive
//===- BuiltinAttributes.cpp - MLIR Builtin Attribute Classes -------------===// // // 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 // //===---------------------------...
e1d4d5069b17486d222b6a66c325347dbf275b72
fe64a3eba92e555c6143e5b2ead233830395d1ed
Sahaj-Bamba/algorithms
/Algos/bit-mask-dp.cpp
C++
cpp
1,830
no_license
#include <bits/stdc++.h> #define fastIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define mod 1000000007 #define mx 1000005 #define rep(i,n) for(i=0;i<n;i++) #define invrep(i,n) for (i = n-1; i >=0 ; --i) #define pb push_back #define mp make_pair #define f first #define s second #define prec(n) fixed<...
c45baf4cad682c2a76e849d97833416cda23447a
ef5f5658d4e7b7896fa833cd396488dc5bb11de4
verizoncoins/verizon
/src/checkpoints.cpp
C++
cpp
3,484
permissive
// Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2017-2020 The Verizon Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses...
bd05e01348de15b742366b608e12eb2ad632d74f
20028b3542794742565fcc0419b5d485e863e936
iridium-browser/iridium-browser
/chrome/installer/mini_installer/decompress.cc
C++
cc
9,048
permissive
// Copyright 2011 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/installer/mini_installer/decompress.h" #include <windows.h> #include <fcntl.h> // for _O_* constants #include <fdi.h> #include <stddef.h> #include <stdlib.h...
6d33baf45e487da4d68b840d1183ade75eae07a6
cf394536a05dba92da0cfeab7e5dba867747216a
szuer2017/phoneshell_3Dmeasure_
/src/main.cpp
C++
cpp
325
no_license
#include "pclviewer.h" #include <QtWidgets/QApplication.h> #include <QMainWindow> int main(int argc, char *argv[]) { QApplication a(argc, argv); PCLViewer w; w.setWindowTitle("3DCloud_Measure"); std::cout << " ----Welcome to Use 3D PointCloud Geometry Measurement Tool ---" << endl; w.show(); return a.exec(...
9fbf6088fcc118186f52bdfb759f2f5a1722cacd
13fd16f92cc59efa076233069c6d3e51380055ae
manii24/C-
/assignment3/Alphabet.cpp
C++
cpp
261
no_license
#include<iostream> using namespace std; class Alphabet { char Alpha,i; public:void display() { for(i='A';i<='Z';i++) { cout<<i<<endl; } } }; int main() { Alphabet d1; d1.display(); }
80575aca8c9b5a603fe26277560315c42029c9a2
8157d95041acb485e558bd89e5b4521f9b4f9662
ncbi/ngs-tools
/tools/tax/src/and_db.cpp
C++
cpp
2,112
permissive
/*=========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was ...
3235dccee57fb0017bd11c718731e96d273030de
89181c9dd4238fb7df1671318e0e256080390944
sreeni-k/ngraph
/src/ngraph/runtime/cpu/kernel/pad.hpp
C++
hpp
5,807
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...
c355ab1c5b7b7f76a753527adca9093549d7e23e
1dbcc012b77b5325c604fcbe0f6bbdad24709d11
anhvanthe/StratifyAPI
/src/dsp/SignalQ15.cpp
C++
cpp
532
permissive
#include "dsp/SignalData.hpp" #include "dsp/Transform.hpp" #include "dsp/Filter.hpp" using namespace dsp; #define IS_FLOAT 0 #define HAS_SHIFT 1 #define native_type q15_t #define arm_dsp_api_function() arm_dsp_api_q15() #define SignalDataType SignalDataQ15 #define SignalType SignalQ15 #define SignalComplexType Sign...
26ed02a8ed47223bc37c52f3aece1990c8255ccb
c3b4d8b76686afc40d31bf1057a0f07b0d4ee88d
channyHuang/leetcodeOJ
/982.cpp
C++
cpp
631
no_license
class Solution { public: int countTriplets(vector<int>& A) { int len = pow(2, 16); int lena = A.size(); vector<int> twoAnd(len, 0); vector<int> one(len, 0); for (int i = 0; i < lena; i++) { twoAnd[A[i]]++; for (int j = i + 1; j < lena; j++) { ...
0ac9e456b767b83881be6ab7de898e3cdf77b1b8
a8656ca85c1967d078de10d341676941fc24f18f
NikitaLandge51/codig-ninja-dsa-learning
/01-introduction-to-c++/modules/002-loops/code-part-1/005-Number-Pattern-2.cpp
C++
cpp
769
no_license
#include<iostream> using namespace std; /** * Number Pattern 2 * - Print the following pattern * - Pattern for N = 4 * 1 * 23 * 345 * 4567 * * Input Format : * N (Total no. of rows) * Output Format : * Pattern in N lines * * Sample Inpu...
3d7862cc5cecc2841b17def9d13f3c44638605a0
8a9375778515fe6c2f80c18e96f2013093b5a214
chaomengnan/aliyun-openapi-cpp-sdk
/green/src/model/DescribeWebsiteInstanceIdResult.cc
C++
cc
1,959
permissive
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
9629409b57418d1d6a2602c661563a4f427c4b4d
3c545f0fa00fccd361271f10f8c084be884880b0
JNiewiadomski/unix
/projects/legacy/LIBS/SEASHELL/CPP/MENU/POPUP.CPP
C++
cpp
737
permissive
#include "menu\_menu.h" #include <common\old\keyboard.h> #include <seashell\seashell.rh> #include <seashell\status.h> void MenuPopup(short id) { short ch; MenuItems *mp; // We ask MenuIDFind to return a pointer to the popup menu, returning // NULL if it can't be found. A popup menu may not have be...
fb5c704f2ef46379f269dbd2ac937efb0a8c71e2
517b9c7af8a2d9c5b32d41a148b257232a531750
Moein-Karami/OlympiadCodes
/M3/23/1/VollyIII/main.cpp
C++
cpp
2,058
no_license
#include <bits/stdc++.h> #define int long long int #define f first #define s second using namespace std; typedef pair<int,int> pii; const int mod=10357; vector <int> v[2]; int x; int ans; int f[10]; int c[7][7]; void check() { for(int i=0;i<7;i++) for(int j=0;j<7;j++) c[i][j]=0; ...
3374b902d4edcfbc57ea3ef19c128af6d0738943
df8833defe45ecbed286771edeb6b8be7b7dac7f
pandian4github/competitive-programming
/spojnew/marbles.cpp
C++
cpp
389
permissive
#include<stdio.h> long long int combination(int n,int a) { long long int c=1LL; if(n==a) return 1; c=n*combination(n-1,a); c=c/combination((n-a),1); return c; } int main() { int a,b,n,r,t; scanf("%d",&t); while(t--) { scanf("%d %d",&a,&b); a=a-b; n=a+b-1; ...
55befadcde51e818913b591815324f0b494b86f2
cb1f84c5f198ddc7560b8fcbba98bd15874241b3
thesurix/TRCharts
/Charts/TRChartsJava/jni/TRChartsJNI/TRChartsJNI/LineStyle.cpp
C++
cpp
1,058
permissive
/******************************************************************************* * Copyright 2015 Thomson Reuters * * 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.apac...
b72da9fc2a4585aee47ea222c92d97d567e6fc85
263f8eff3d59026c014fedca71295b262bc82f9a
irvingow/libel
/libel/base/tests/num2string_test.cpp
C++
cpp
944
no_license
// // Created by 刘文景 on 2020-03-25. // #include "libel/base/num2string.h" #include <string> #include <cassert> using namespace Libel::Util; int main(){ uint32_t u32 = UINT32_MAX; int32_t i32 = INT32_MIN; uint64_t u64 = UINT64_MAX; int64_t i64 = INT64_MAX; uint16_t u16 = UINT16_MAX; int16_t i1...
194bda66091c5ca0d904ace5978695bb55c1fcc7
c91112ce1f1a82d57c3e5ef0b85370b416069b21
stefanofontanelli/SimFITS
/src/Junction.cpp
C++
cpp
1,261
no_license
/* -*- mode:c++ -*- ******************************************************** * file: AimsunMap.h * * author: Stefano Fontanelli * * copyright: (C) 2010 Real-Time System Laboratory (Retis Lab) at * Scuola Superiore Sant'Anna, Italy. * * This program is free software; you c...
aeba7d5a098dadb8c058d529a321aec967811212
db54d87ec87d1168a5c2b29500358f3cf3bd914a
Joshua-Ashton/jgui
/jgui/src/font.cpp
C++
cpp
558
no_license
#include "jgui/font.h" #include "jgui_private/globals.h" #include <string> #include <vector> namespace jgui { void register_font(const char* name, const u8* data, u32 size) { FontData localData; localData.Name = std::string(name); localData.Size = size; localData.Data = (u8*) malloc(size); memcpy(localDat...
3f5b1485ccb5e8b925a93aca351f86c3be52c0b6
24233a29ccf55cd74616a969e8118e8dc421cd52
krzemienski/cpix_cc
/drm_system.cc
C++
cc
4,579
permissive
// Copyright 2019 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
3a5a9873a4b42f51910c1568d421fb57a79b6443
543a5fe4cf24d42f0eca693dc1ff9679b64ae11e
Confocus/ExtractEverything
/pe-parser-library/GenteeUnpacker.cpp
C++
cpp
2,358
no_license
#include "GenteeUnpacker.h" CGenteeUnpacker::CGenteeUnpacker() { m_szUnpackerName = "Gentee"; ResetUnpackMethod(); } CGenteeUnpacker::~CGenteeUnpacker() { } bool CGenteeUnpacker::IsMatchPackerSig(bool *pIsMatch) { CHECK_NULLPTR_ERR(pIsMatch); *pIsMatch = false; if (IsMatchEPSig(reinterpret_cast<const std::uint...
ed06bb503c0c6f906772787f53c7345af8646c65
1a4392e3f6bf8f97bae062ffd6d5ba928331e59e
niepp/sperm-x
/src/SpermView.cpp
C++
cpp
47,996
no_license
// SpermView.cpp : implementation of the CSpermView class // #include "stdafx.h" #include "dxtrans.h" #include "spermview.h" #include "MemDC.h" #include "wingdi.h" #include "math.h" #include "spermview.h" #include "ImageProcess.h" #include "Sperm.h" #include "DShowUtilities.h" #include "SpermDoc.h" #in...
671b8943b07eded72de34f4dcfa44a93a3c1e78a
d5e49dbc44d3bdfbbb86d9c0855372e65ffc92cf
Zlobarq/programmiersprachen-aufgabenblatt-2
/source/mat2.cpp
C++
cpp
1,964
permissive
#include <iostream> #include <cmath> #include "mat2.hpp" Mat2::Mat2(): a11_{1.0f}, a12_{0.0f}, a21_{0.0f}, a22_{1.0f}{} Mat2::Mat2(float a1, float a2, float a3, float a4): a11_{a1}, a12_{a2}, a21_{a3}, a22_{a4}{} float Mat2::geta11() const { return a11_; } float Mat2::geta12() const { return a12_; } floa...
fe02548e090add9f5d74356761563ea41dc655fb
855e0abbdd2a45ee91d02160c82d36ba0fa9a487
shuaitq/CppPrimer
/ch11/11.38.cpp
C++
cpp
625
no_license
#include <iostream> #include <unordered_map> #include <string> #include <vector> using namespace std; int main() { unordered_map<string, int> um; vector<string> v = { "apple", "apple", "egg", "egg", "egg", "duck" }; for(const auto &s : v) { ++ um[s]; } // cout << um.bucket_count() <<...
be01b2dc37ca862f51bdd6b859762de7b1428a55
0ce883ab88b510893e1d5b6f86f3ce354bb22256
aliyun/aliyun-openapi-cpp-sdk
/dataworks-public/src/model/AddToMetaCategoryResult.cc
C++
cc
2,090
permissive
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
7df922a769e8bb3bc7533ee2c2096342fe5c5905
ccc8c565ba7a30ec1d2840cf221b90d7d985812f
dummas2008/chromium
/src/chrome/browser/chromeos/arc/arc_service_launcher.cc
C++
cc
2,073
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/chromeos/arc/arc_service_launcher.h" #include "base/bind.h" #include "base/memory/ptr_util.h" #include "chrome/browser/chromeos/...
3fd4a5c78b59c4ed086a0921ded0a7395ab9c8da
de7ce0d44a349c6f1e33b15362f5baf7933e934e
Poet-LiBai/pytorch
/torch/csrc/lazy/core/tensor.cpp
C++
cpp
17,645
permissive
#include <torch/csrc/lazy/core/config.h> #include <torch/csrc/lazy/core/tensor.h> #include <c10/util/irange.h> #include <torch/csrc/lazy/core/helpers.h> #include <torch/csrc/lazy/core/ir_dump_util.h> #include <torch/csrc/lazy/core/lazy_graph_executor.h> #include <torch/csrc/lazy/core/metrics.h> #include <torch/csrc/la...
524287dbba3a468f6fcc8c25f65181e17caea310
3adb47f9f4788578afdf04c5664d0c1a426e2732
deepali-c/pytorch
/torch/csrc/tensor/python_tensor.cpp
C++
cpp
13,535
permissive
#include <torch/csrc/tensor/python_tensor.h> #include <structmember.h> #include <pybind11/pybind11.h> #include <torch/csrc/Dtype.h> #include <torch/csrc/DynamicTypes.h> #include <torch/csrc/Exceptions.h> #include <torch/csrc/Layout.h> #include <torch/csrc/autograd/variable.h> #include <torch/csrc/autograd/python_vari...
3b9309f2b8f46c49351ae7fcf59e30e04a34ff67
cb52b9f38d558a31b690699bffcab74797ec1e31
greenfox-zerda-sparta/bmakszim
/week-10/day-4/amoeba_client/amoba_client.cpp
C++
cpp
4,944
no_license
#include <iostream> #include <SDL.h> #include <SDL_net.h> #include <string> #include <vector> #include "draw.hpp" #include "game-logic.hpp" using namespace std; void _draw(vector<vector<char>> v); int main(int argc, char ** argv) { Game game; int width = 570; int height = 570; bool quit = false; SDL_Event ...
506ce7d84f176aba9948fa5c0ba8a12c52728635
b0abc3d60a68a507e0ec26ead32e1bdd06afd85f
kingstertime/parallel-programming-2020
/Lesson7/task7_3.cpp
C++
cpp
3,087
no_license
#include "mpi.h" #include <locale.h> #include <iostream> #include <stdio.h> #include <time.h> #include <math.h> #include <array> void fill_array(int* array, long int length, int seed = 0) { srand(clock() + seed); for (int i = 0; i < length; i++) array[i] = (rand() % 1000) - 500; } int main(int argc, char** argv...
3dcc44819b67551e419bbd494a98b3990fcb824e
b98a315cecc6e93b18e8861835d48988af0ba236
Crixpx/Vulcoin
/src/darksend.cpp
C++
cpp
81,328
permissive
// Copyright (c) 2014-2015 The Darkcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "darksend.h" #include "main.h" #include "init.h" //#include "script/sign.h" #include "util.h" #include "masternode....
e3060460e6230e0b9916df5a71c4306e5428055a
00bd3e0a6faeab9c2398524a762bbb31f2ad406f
HuyTranQ/Competitive-Programming
/Competitive Programming/UVA Online Judge/00416.cpp
C++
cpp
2,001
no_license
#include <iostream> #include <string> #include <cstdint> #include <vector> using std::cin; using std::cout; using std::string; using std::getline; using std::vector; using byte = std::uint8_t; byte reverse(string const & binary); //string to_string(byte input); vector<byte> const original = { reverse("YYYYYYN") ,...
93050662c3fa1e1971c61f135bcb6f0f4ad47d11
f374a8dfbc60ffd2030332342ba9785067ad7bb3
otcshare/chromium-src
/components/metrics/reporting_service.cc
C++
cc
7,306
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. // ReportingService handles uploading serialized logs to a server. #include "components/metrics/reporting_service.h" #include "base/base64.h" #include "...
0701d1cf41bc969860000a0b9a5211df0ef3ff46
e4133d25d8fed8ec991baeb1752b14178d535960
agileluo/c--_learn
/chapter2/myfirst.cpp
C++
cpp
242
no_license
/* * myfirst.cpp * * Created on: 2013-6-20 * Author: v_mliangluo */ #include <iostream> int main(){ using namespace std; cout << "Fo llow me to learning c++" << endl; cout << "You won't regret it! Yes?" << endl; return 0; }
7baf909161754302f09067d17d53a16a348761cd
8dd338e1381dc5e58f808a0bf81ce967217de303
ubaidsayyed54/drake
/drake/bindings/pybind11/pydrake_common.cc
C++
cc
2,813
permissive
#include <pybind11/eigen.h> #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include "drake/common/drake_assert.h" #include "drake/common/drake_assertion_error.h" #include "drake/common/drake_path.h" #include "drake/common/find_resource.h" namespace py = pybind11; // This function is defined in drake/common...
6a9cc6c483a85bce6dec91bfd821e8f5604ae19a
95d6fd53a7b097a8d5e130a7067a35ce6878e72e
gogun/Labs-for-SPbSPU-C-course-during-2019
/nazarov.dmitry/A1/rectangle.cpp
C++
cpp
679
no_license
#include "rectangle.hpp" #include <iostream> #include <cassert> Rectangle::Rectangle(const point_t &pos, const double &width, const double &height) : Shape(pos), width_(width), height_(height) { assert((width_ >= 0.0) && (height >= 0.0)); } Rectangle::Rectangle(const double &x, const double &y, const double...
f3e95fd62a31e1a9e74a1970f739b71f1105b27c
4ba9e26999b081e19e2e5432a54111d22f847e9d
rohankumar997/CPP_SAMPLE_PRACTISE
/for_loop.cpp
C++
cpp
366
no_license
#include<iostream> using namespace std; int main(){ for (int i = 0; i < 10; i++) { cout<<i<<endl; } cout<<"++++++++++++++++++++++"<<endl; for (int j = 10; j >= 1; j--) { /* code */ cout<<j<<endl; } cout<<"++++++++++++++++++++++"<<endl; for (int k = 0; k < 60...
8305dffb5edd4d908de0ef968837afabf0331553
077e6825d307ca9958dbe1e6401c2718d87416ec
varungupta181186/vistool
/src/segmentSVM.cpp
C++
cpp
7,258
no_license
#include "featureExtractor.h" #include "segmentSVM.h" #include "descriptorWriter.h" using std::string; using std::stringstream; using std::vector; using std::cout; using std::endl; using std::pair; namespace vito{ namespace classification{ using features::FeatureExtractor; using write::readDescriptor; string Segmen...
1904de7b7e292ee3de3c39f0913b5fdb5a999d54
42617b90bded04492902747d4feeb85c0c4df291
sergii-yatsuk/leetcode
/cpp/sort-characters-by-frequency.cpp
C++
cpp
718
no_license
// https://leetcode.com/problems/sort-characters-by-frequency/ class Solution { public: string frequencySort(string s) { unordered_map<char, int> om; for (auto& a: s) { ++om[a]; } vector<pair<char,int>> m(om.begin(), om.end()); sort(m.b...
6336eab2232b7e49b2e85e07c4b723a8202d46a6
821557e1af1493e901483d3a8bdf7cff0cfc3339
tatsumiking/GitBackup
/workvs6/smsV3src/MyCmnLib/Sysenv.cpp
C++
cpp
6,893
no_license
// sysenv.cpp : アプリケーション用環境定義 // #include "stdafx.h" #include "sysenv.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif extern "C" { } CSysEnv::CSysEnv() { int i; DBL dx, dy; m_dCntrX = 0; m_dCntrY = 0; m_dSubX = 0; m_dSubY = 0; m_dSubRag = 0; m_nSubFlag ...
23c4575500964b111bf778ad5bd579b8fe7927fc
db8908ed20a871cca50265a506d2163de6c3daa8
amarini/pandolf
/VHgg/VHggAnalysis/RedNtpFinalizer_THq.cc
C++
cc
94,965
no_license
#include "RedNtpFinalizer_THq.h" #include "QGLikelihood/interface/QGLikelihoodCalculator.h" #include "THqStudies/THqLeptonicLikelihood/interface/THqLeptonicLikelihoodCalculator.h" #include "BTagSFUtil/interface/BTagSFUtil.h" #include "TMVA/Tools.h" #include "TMVA/Reader.h" #include "TMVA/MethodCuts.h" #define DEB...
1465fb91f09522508a0da31f17e6a860bacb299e
baa96cb179aec087016e12bd31861eb59c955c74
ric2b/Vivaldi-browser
/chromium/chrome/browser/extensions/warning_badge_service_factory.cc
C++
cc
1,460
permissive
// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/warning_badge_service_factory.h" #include "chrome/browser/extensions/warning_badge_service.h" #include "chrome/browser/profiles/profile.h" ...
3f197a44bc6390886b5d8dcdb7ab39358de0eed8
5487a899e1dc778735d7fd89ca53eae1e793199e
1481-tw1c3b0t/allwpilib-tw1c3b0t
/wpilibcExamples/src/main/cpp/examples/StateSpaceFlywheelSysId/cpp/Robot.cpp
C++
cpp
4,842
permissive
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of...
120bafefc01b1f26275a75a5dbc789e5cdfe8eff
743da8f63ca638b83494308513a44760aa36cb4a
krishoza/HIP
/samples/2_Cookbook/6_dynamic_shared/dynamic_shared.cpp
C++
cpp
4,168
permissive
/* Copyright (c) 2015-present 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 to use,...
b9c0582506d98e8b631e81af0b8b1738c5a02b6b
452b8b4af10549b186fe92d201ae297df8e3a786
junxuezheng/chromium
/chrome/browser/ui/views/omnibox/remove_suggestion_bubble.cc
C++
cc
4,439
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 "chrome/browser/ui/views/omnibox/remove_suggestion_bubble.h" #include <memory> #include <utility> #include "base/strings/utf_string_conversions...
c4676e39b7c38a54d9769a9f9a0cb4d9ce09fa9a
80b45b63d0b4291d1148f85241b5255e498c1bb4
WesGtoX/Data-Structure-I
/aula00_2018_02_21_low-complexity-system/aula00_exe01_low-complexity-system.cpp
C++
cpp
5,784
permissive
// library #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <ctype.h> #include <string.h> // variables int opcao,i=1, fb=0, n=0, qtd=0, cons, d; char feed, controle; // vector of register char name[100][50]; char address[100][50]; char cpf[100][50]; char rg[100][50]; char phone[100][50]; char email...
b75c813553136919528735e552ec3825b6f8e7f6
782a353d392210efb348ed6340482c2f56eafd90
humblefool96/SPOJ-100
/SPOJ-100/whatsNext.cpp
C++
cpp
367
no_license
#include <iostream> using namespace std; int main() { int a1,a2,a3; while(1){ cin>>a1>>a2>>a3; if(a1==0 && a2==0 && a3==0) break; else if(a3-a2==a2-a1 && a3-a2!=0 && a2-a1!=0){ cout<<"AP"<<" "<<a3+(a3-a2)<<"\n"; }else if((a2*a2)==(a1*a3)){ cout<<"GP"<<" "<<...
d5cee5a7d49c0b5282d2942b558122a8a618683d
fc5929acc421c0993c327e0e8c19a59833dcda01
gulrupa/lutz-en-dunois
/Tuile.cpp
C++
cpp
579
no_license
// // Created by Gulrupa on 23/07/2018. // #include "Tuile.h" #include <iostream> #include <vector> Tuile::Tuile(int PosX, int PosY, bool abbaye, bool blazon, type Nord, type Sud, type Est, type Ouest) { this->PosX = PosX; this->PosY = PosY; this->abbaye = abbaye; this->blazon = blazon; this->Nord...
4a7c98ff356e219aff3ff747dcc093d73562e481
742e296f3c4a7ce28a5ffc0fc486234199537c21
sushmanthreddy/A20J-LADDERS-1300
/Bear and Big Brother.cpp
C++
cpp
213
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int w1,w2,count=0; cin>>w1>>w2; while(w1<=w2){ count++; w1=w1*3; w2=w2*2; } cout<<count<<endl; return 0; }
cbef5e2f1217b5b89d7a9ae8fcbe4c5a3a484563
2ab2d0168a2d73b56f643c54b02bcab816b8d3dd
bsochack/openvino
/inference-engine/thirdparty/movidius/tests/XLink/helpers/XLink_tests_helpers.cpp
C++
cpp
4,884
permissive
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "XLink_tests_helpers.hpp" #include <thread> //------------------------------------------------------------------------------ // Implementation of methods of class XLinkTestsHelpersBoot //-----------------------------------...
8fc362c058bb47a1cc3630d04859502736ebef28
2b70b0888a19098b9b9e480d60c95964bd163401
imhuwq/QtSpace
/debug.cpp
C++
cpp
302
no_license
#include <QQuaternion> #include <QVector3D> int main() { QVector3D target(0, 0, 0); QVector3D position(0, 0, 25); float distance = 25.0f; QVector3D separate_1 = QVector3D(2, 6, 0); QVector3D separate_2 = QVector3D(3, 3, 0); QVector3D all = separate_1 + separate_2; };
22eb3526a28d08b74a70822ea7d316d319297416
7a20b891c308b290c0d9c38ed76e02bebc81874b
Saifu0/Competitive-Programming
/CP/1500/66C.cpp
C++
cpp
1,935
no_license
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > stru...
4225d93462302c0207899b0061bd7b1d7bc014a1
ac323579c418cb36b1676a60761d0e61a74933f0
Expost/Coroutine
/examples/iocp/main.cpp
C++
cpp
5,824
no_license
#include <winsock2.h> #include <stdio.h> #include "xco/xco.h" #pragma comment(lib,"ws2_32.lib") #define PORT 5000 #define MSGSIZE 1024 //该结构体包含重叠IO结构,主要用来进行重叠操作 typedef struct { OVERLAPPED overlapped; WSABUF WsaBuf; char buffer[MSGSIZE]; DWORD RecvBytes; Coroutine* co; }MyOverData, *LPMyOverData;...
cfe06169182319ff5b0c5a423c800035d7e9b4e3
1748d87b077f25535146dec535500ef718e884a2
novaquark/aws-sdk-cpp
/aws-cpp-sdk-medialive/source/model/StartTimecode.cpp
C++
cpp
1,443
permissive
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" fil...
cd263b4fe6f689df5bb53f6e8a0edbd0748d63e2
7bf950c4d9240120c86808dd47af73d0b605af86
biel-wro/SimBaD
/src/core/containers/space/space_impl.hpp
C++
hpp
2,355
no_license
#ifndef SPACE_IMPL_HPP #define SPACE_IMPL_HPP #include "core_def.hpp" #include "board_impl.hpp" BEGIN_NAMESPACE_CORE template <class T, class config> class space_impl { public: using board_impl_type = board_impl<T, config>; using board_coords = typename config::board_coords; using space_coords = typename confi...
179a4e3692759077aa85f03d4d1e206cc9689741
e2e1b620a5147b6381dce85611b30b2780a93913
bobstine/lang_C
/gsl_tools/gsl_model.cc
C++
cc
510
no_license
/* * gsl_model.cc * seq_regr * * Created by Robert Stine on 12/4/07. * Copyright 2007. All rights reserved. * */ #include "gsl_model.h" std::ostream& operator<< (std::ostream& os, LinearModel<gslData,olsEngine> const& m) { m.print_to(os); return (os); } std::ostream& operator<< (std::ostream& os, Line...
c1c9eaa5c8986f5db9925e0c2d6b7475fa1d7cc5
5932e72d7ee58b5e857650c9b4957b1f9816e0f3
XavierRefactor/xavier-logan-dev
/src/gpu/coalesced/parser/parser.cpp
C++
cpp
1,026
no_license
#include <fstream> #include <string> #include <sstream> #include <cstdlib> #include <iostream> #include <vector> using namespace std; int main(int argc, char const *argv[]) { std::ifstream infile("roofline.txt"); ofstream myfile; //std::vector<std::string> result; //myfile.open ("example.txt"); //myfile << "...
288e4f8d5e74a56871f8632b686a21ac2e24bcce
80198cfa07a659ca24075a92b8a7f87d2f27eb70
hengne/d0wmass
/caf_trigger/src/cafTriggerOutput.cpp
C++
cpp
5,858
no_license
//file: cafTriggerOutput.cpp // //Author: Kevin Chan // //Purpose: This processor collects the calculations from the probability // weight processors and outputs them based on specifications // in the config file. // //Usage: Place at the end of a chain in a config file // cafTriggerEff...
5935d46a76d08cbbacddfd085e0d759c4b7926d3
84aba1c6b55533196166d8805a40fbd317113435
t1war1/CP
/Codeforces/Edu47/C.cpp
C++
cpp
1,639
no_license
/** * author: Gaurav Tiwari, Delhi Technological University **/ #include <bits/stdc++.h> #define mod 1000000007ll #define mod2 100000009ll #define mod3 998244353 #define pb push_back #define fastIO ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL); #define readi(x) scanf("%d",&x) #define r...
b015b3fb1cabefbbb2f947b70e88545b7fa51e1b
4d6c024558cc07c879e484411b415bff10b33afc
wpilibsuite/allwpilib
/simulation/halsim_ws_core/src/main/native/cpp/WSHalProviders.cpp
C++
cpp
1,149
permissive
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "WSHalProviders.h" #include <fmt/format.h> namespace wpilibws { void HALSimWSHalProvider::OnNetworkConnected...
bbbf6ce2934792232281e5eb1be8733516d93f56
beb6f9fa1ccff9950202b25f06280864299af45f
petrekm/xtsystem
/test_stackwalker.cpp
C++
cpp
3,698
no_license
#include "stdafx.h" #include "XTSystem_all.h" using namespace XTSystem; #ifdef XTSYSTEM_EXCEPTIONS_WITH_CALLSTACK #ifdef _WIN32 using namespace Stack; void ProcessInfoDemo() { //ProcessInfo pi; } class MyStackWalker : public XTSystem::Stack::StackWalker { public: MyStackWalker() : XTSystem::Stack::StackWal...
033e16770c14d642934a910eca69c067f04ed5b9
45050e5e79ec5ab194c430dab7041acde6f63051
FRC5437/ParadeBot
/src/CommandBase.cpp
C++
cpp
647
no_license
#include "CommandBase.h" #include "Subsystems/DriveSubsystem.h" #include "Commands/Scheduler.h" // Initialize a single static instance of all of your subsystems to NULL //ExampleSubsystem* CommandBase::examplesubsystem = NULL; OI* CommandBase::oi = NULL; DriveSubsystem* CommandBase::drivesubsystem = NULL; CommandBase...
793f67301b1386b20dddaa6c1425e25c812894c8
fcf1ae1d9464db2a78806ac5a843bd5b0c799713
klarmann2018/sams_teach_c-_in_one_hour_a_day
/sams_teach_c++_in_one_hour_a_day/26/listing26_02.cpp
C++
cpp
1,163
no_license
/* * ===================================================================================== * * Filename: listing26_02.cpp * * Description: Using a Deep-Copy-Based Smart Pointer to Pass Polymorphic * Objects by Their Base Types * * Version: 1.0 * Created: 03/15/2020 08:37:30 PM * ...
ce07c2e21d3110765ac31f0ac31c8a667fe5539d
7e58837a9e1c42ac6425bf87f21039bdb51812b6
wusanshou2017/Leetcode
/using_C++/40_combination_sumII/40 Combination Sum II.cpp
C++
cpp
817
no_license
class Solution { vector<vector<int>> combinationSum(vector<int> & candidates, int target) { sort(candidates.begin(),candidates.end()); vector<vector<int>> res; vector<int> combination; combinationSum(candidates,target, res, combination,0); return res; } void combinationSum(vector<int>&cand...
b9a8c0ec69267fde98480ad6e6155f2099d4bf34
69c30e3869f4d60e517bc0e7bca6184947c65d83
darshanhs09/UAV
/MeanShiftnew.cpp
C++
cpp
3,708
no_license
#include "MeanShiftnew.h" RAList::RAList( void ) { label = -1; next = 0; } RAList::~RAList( void ) {} int RAList::Insert(RAList *entry) { if(!next) { next = entry; entry->next = 0; return 0; } if(next->label > entry->label) { entry->next = next; next = entry; return 0; ...
f14723dfb1b3aa4b6c38c0ed91eeda6a98f104ae
6bdbad003715c6cfd4bee6bd58a25060cf1fb484
BharatiSukanya/CODEONFEST-Program
/141. Linked List Cycle.cpp
C++
cpp
1,459
no_license
Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail's next pointer is connected ...
1575dd4197859ce543af709354ca0d902f78b74b
eee6e70f59691b76e2c7173816f68b9ce1344e6b
ralucado/SFMLGameTemplate
/MyGame.cpp
C++
cpp
2,173
no_license
#include "MyGame.hpp" MyGame::MyGame(int scrwidth, int scrheight, std::string title, int style) : Game(scrwidth,scrheight,title,style) { //Create the components of the game and init them _scrwidth = scrwidth; _scrheight = scrheight; player.setFillColor (sf::Color::Magenta); sf::Vector2f size(sc...
471c6393fac37e3b3a315a66226e040ca61c2aa4
7d9478465d2af7525998969506c101f340249a13
manolismih/OJsolutions
/usaco/milk4.cpp
C++
cpp
1,769
no_license
/* ID:manolis2 PROG:milk4 LANG:C++11 */ #include <cstdio> #include <algorithm> #include <cstring> using namespace std; #define inf 200 short q,n,cap[105], dp[20005][105][2]; //dp[poso][pail][(bool)taken once] void read() { freopen("milk4.in","r",stdin); freopen("milk4.out","w",stdout); scanf("%hd...
15cd507d79df7867905681a2ea31c1a486804ced
3ece596884f870e32bd9e0cb3ed0eac8b1ebb1fc
proteanthread/CLK
/Storage/Disk/DiskImage/DiskImageImplementation.hpp
C++
hpp
1,981
permissive
// // DiskImageImplementation.hpp // Clock Signal // // Created by Thomas Harte on 22/09/2017. // Copyright © 2017 Thomas Harte. All rights reserved. // template <typename T> HeadPosition DiskImageHolder<T>::get_maximum_head_position() { return disk_image_.get_maximum_head_position(); } template <typename T> int...
743517b48f6e34142f3859a483e0417c54ad631c
0f1b82dbfe7053686a3ba45d86d5d3a6bb1bf2bc
dragonlet/vtk-dicom
/vtkDICOMValue.cxx
C++
cxx
50,178
no_license
/*========================================================================= Program: DICOM for VTK Copyright (c) 2012-2014 David Gobbi All rights reserved. See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied ...
13409b6b7a54d06f574b4c4236178d4e3b39fa2a
0eac548aae72957e8cd64a282002755bd0bcd50e
JarethD/Projects
/Blackjack/Blackjack/Blackjack/Board.cpp
C++
cpp
1,362
no_license
/* Author: Jareth Dodson Date Created: 5-13-19 */ #include "Board.h" Board::Board() { } Board::Board(const Board& copy) : m_deck(copy.m_deck) { } Board& Board::operator=(const Board& rhs) { if (this != &rhs) { m_deck = rhs.m_deck; } return *this; } Board::~Board() { } void Board::DisplayBoard() { system(...