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
8a964b3110891a11fcef5ef932dbdae2c3f12f29
a6e3f028652fea6cbe46f3fedaf9e89224357857
tsmdmitry/OpenPosePersonDetector
/code.cpp
C++
cpp
11,982
permissive
/* * Wrapper on OpenPose API * OpenPose Repo: https://github.com/CMU-Perceptual-Computing-Lab/openpose *======================================== * Compatible commit from OpenPose Project: * commit d80fd22c293969908ce852f32789cbdb8aa71584 * Author: Gines <gines@cmu.edu> * Date: Tue Feb 6 12:51:20 2018 -0500 ...
f92374e799a0b7b5c45930ac0b5900c6a96982c6
c10882daa624d643fd83a0ea5c68642c97b72984
BlenderCN-Org/spacegameengine
/libs/renderer/include/sge/renderer/display_mode/comparison.hpp
C++
hpp
1,781
no_license
/* spacegameengine is a portable easy to use game engine written in C++. Copyright (C) 2006-2016 Carl Philipp Reh (carlphilippreh <at> gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation...
e9e0c5616c260110fcefb660dd39372a4b7c9999
5404c106e4c2519cd820cc8f86ca963eeb1c6ddf
AdityaKarn/cp-cpp
/LEARNING/segmentTrees/segmentTrees_min.cpp
C++
cpp
1,315
no_license
//For minimum query #include <iostream> #include <vector> #include <algorithm> #define REP(i, n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ii pair<int, int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 1000000000 using namespace std; int ...
2077d4c64bdda73a254497ce71e6ec0ae632a260
f85cadae1156ffdb5a59f35aaed3a0175bbf3d2e
Luzgar/Pendulum-Newton-OpenGL
/src/Ficelle.cxx
C++
cxx
4,340
no_license
#include"ficelle.h" Ficelle::Ficelle(float taille,float diametre, std::string const vertexShader, std::string const fragmentShader,Sphere Sphere): m_shader(vertexShader, fragmentShader) { m_shader.charger(); //recupération du centre de la sphère pour le placement float cx = Sphere.getcx(); float cy = Spher...
ca507dfec39f611716455c835096569f50acc9cd
8ca952819ca67eb027c22d409c9affe6be8cc229
mpound/carma
/carma/antenna/ovro/canbus/Encoder.cc
C++
cc
12,775
permissive
/** @file * Definition file for 10-m Antenna Encoder Module. * * <dl><dt><b>Author </b></dt><dd>Andy Beard</dl> * $Revision: 1.23 $ * $Date: 2011/09/26 17:48:16 $ * $Id: Encoder.cc,v 1.23 2011/09/26 17:48:16 iws Exp $ */ #include "carma/antenna/ovro/canbus/Encoder.h" #include "carma/canbus/Types.h" #include "c...
efe9aea3b6be28f63ee0540edb36a614fe318dbf
f95370d0b9481623168b63da6d2cbd9be6ad5b08
gom74/procon
/aoj/GRL/1/A/main.cpp
C++
cpp
1,117
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; struct edge { int to; int cost; }; int main() { cin.tie(0); ios::sync_with_stdio(false); int V, E, r; cin >> V >> E >> r; vector<vector<edge> > G(V); for (int i = 0; i < E; +...
bf54b4661240665062ff7c15c4f59f3042a49925
f28b337aae193d912918bceac45e1740e4b1c4c9
WHO-A-U/BOJ_algorithm
/2439.cpp
C++
cpp
255
no_license
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ for(int j=0;j<n-i-1;j++){ cout<<" "; } for(int j=0;j<=i;j++){ cout<<"*"; } cout<<"\n"; } }
0677be4df521b069bf47d2a070e30d6195961064
ef90e6250eb5db37878b9850b40e49b0588d2c07
EQ4/engine
/sky/shell/ui/input_event_converter.cc
C++
cc
2,564
permissive
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sky/shell/ui/input_event_converter.h" #include "base/logging.h" #include "base/time/time.h" #include "sky/engine/public/platform/WebInputEvent....
c90e27944df97af13881b05db92cab30087733ff
a63a272412e63e46fe4aec4f7fda690f650367ff
MinghuiGao/chromium
/components/invalidation/impl/per_user_topic_registration_manager.cc
C++
cc
20,670
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 "components/invalidation/impl/per_user_topic_registration_manager.h" #include <stdint.h> #include <algorithm> #include <cstddef> #include <iter...
c6b67d6342790233ccb345b9c57754393aaa773e
6c02f18e9c12c33f5f60cdbcb37815b02a295fb4
jamiepg1/ta
/C++/lab/lab07/7-6.cpp
C++
cpp
398
no_license
#include <iostream> #include <fstream> #include <vector> #include <assert> using namespace std; int main(){ string str; char del; ifstream infile; infile.open ("input6.txt"); assert(!infile.fail()); getline(infile,str); cout<<"get rid of ?"<<endl; cin>>del; for(int i=0; i<static_cast<in...
889ab288b139786384a69db2c0d968ffc5c692c7
54b650dcf13e8ece3704b951a63df114416a1e4f
anusjc/CPP
/Strong_Language.cpp
C++
cpp
917
no_license
#include <bits/stdc++.h> using namespace std; #define ll long long int int no_of_strongwords(string s, int n) { ll cnt = 0, ans = 0; ll i = 0; while (i < n) { if (s[i] == '*') { // cnt++; ll j = i; cnt = 0; while (s[j] == '*' and j < n) ...
99721f14eabaef2285414217026a8478bdc7c2e9
393d143282eb77d95b8b26e24b682fef5b0bb269
JinningYang/CPP_Project
/MidtermTest/JinningYang_001029162_Walmart/Walmart/Walmart/main.cpp
C++
cpp
2,340
no_license
#include <iostream> #include "Walmart.hpp" using namespace std; int main() { edu::neu::csye6205::Walmart::demo(); return 0; } //Walmart::demo() starting... // Sort employees by ID and inventory by item ID. //Store (#7470348): // Employees: // Person #1001: Dan Peters, age 17 // ...
30af6e108e69d3890fef52409b590dce5ef92746
7889bde1cc2dc3d22bcc14cde69984a59a63c3e1
liyuxuan2003/ImageTool
/CropProcess.cpp
C++
cpp
7,211
no_license
#include "CropProcess.h" #include "ui_CropProcess.h" #include <iostream> CropProcess::CropProcess(QWidget *parent) : QFrame(parent), ui(new Ui::CropProcess) { ui->setupUi(this); thread=new ProcessThread*[threadAmount]; processingIndex=new int[threadAmount]; for(int i=0;i<threadAmount;i++) ...
cdc756cf973a791f7f459fcfc4c422c6284b14eb
a77375740d37e399d68c481fc1353df1e072115b
xiangt920/gporca
/libgpopt/src/operators/CPhysicalLeftOuterHashJoin.cpp
C++
cpp
1,311
permissive
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2012 EMC Corp. // // @filename: // CPhysicalLeftOuterHashJoin.cpp // // @doc: // Implementation of left outer hash join operator //----------------------------------------------------------------------...
c24cf09587366f78c90be50ad0169e0c73cf00e1
5c307ff372c428e305f4f6136d27c386a02caa48
adityanjr/code-DS-ALGO
/CodeForces/Complete/600-699/621B-WetSharkAndBishops.cpp
C++
cpp
539
permissive
#include <cstdio> #include <iostream> #include <vector> int main(){ const int N = 1000; std::vector<long> sums(2 * N + 1, 0); std::vector<long> diffs(2 * N + 1, 0); long n; scanf("%ld\n", &n); while(n--){ int x, y; scanf("%d %d\n", &x, &y); ++sums[x + y]; ++diffs[N + x - y...
23eee9628d43c1119f621bb4635f8d3e9ee85fe6
e8f1f538892e9b9e4f45b13721b3bd145e5d8f18
leonardo-DG/handFun
/StdAfx.cpp
C++
cpp
293
no_license
// stdafx.cpp : source file that includes just the standard includes // camera.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" #ifdef _ATL_STATIC_REGISTRY #include <statreg.h> #endif #include <atlimpl.cpp>
fdee2fcc36ca100aec00d217a70e05b2d0a65a3c
2cb0d8e2b5ea894e832ca51ac603601c647fec6f
zhudelong/HawkEye
/src/tag_detector/apriltags_ros_new/src/apriltags.cpp
C++
cpp
24,587
permissive
/*********************************************************************** Copyright (c) 2014, Carnegie Mellon University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code ...
f6fdc7e37c045efbc4067239e39a4994f9a9af58
f204b04c82bdbf9defabc5bf6689b0259bbf284a
uFreezy/SoftUni
/CPP/C++-Homeworks/Memory-Management-C++/Memory-Management-C++/Vote.cpp
C++
cpp
248
no_license
#include "Vote.h" Vote::Vote(VoteChoice vote) { this->setVoteChoice(vote); } Vote::~Vote() { } VoteChoice& Vote::voteChoice() { return this->_voteChoice; } void Vote::setVoteChoice(VoteChoice voteChoice) { this->_voteChoice = voteChoice; }
f9281d409bd950a277865254a8ab502604957b75
ef99feb47a5b66e8e6366fd4ba73626588c133de
socratesone/vespa
/document/src/tests/fieldpathupdatetestcase.cpp
C++
cpp
48,768
permissive
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/document/base/testdocman.h> #include <vespa/document/fieldvalue/iteratorhandler.h> #include <vespa/document/select/node.h> #include <vespa/document/base/exceptions.h> #include <vespa/v...
3d1621034465ed8125ede210b7e113923ea8347f
fc40920beeaa5da97e4a2d2efc49182b8608e203
BackupTheBerlios/fluxbox-svn
/trunk/src/FbTk/CommandRegistry.cc
C++
cc
3,477
permissive
// CommandRegistry.cc for FbTk // Copyright (c) 2007 Fluxbox Team (fluxgen at fluxbox dot org) // // 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 lim...
c54476dc45a539bcd4a2e2c1879b33e16d892001
b2253936edeef67719f65ce57173561167a397db
sureyeaah/Competitive
/PT07F.cpp
C++
cpp
2,661
no_license
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; #define DEBUG(x) cout << '>' << #x << ':' << x << endl; #define FOR0(i,n) for(int i=0, _##i=(n); i<_##i; ++i) #define FOR(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i) #define FORD(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; ) #define repi(i,a)...
843430b1aa369140e92f705b11a135c41e3eaf45
744d21640ca2ceb5bbb0176df0c47ab05f17a242
rcirca/irose
/src/sho_gs/SHO_GS_LIB/Common/CRegenAREA.cpp
C++
cpp
12,044
no_license
#include "stdAFX.h" #ifndef __SERVER #include "CRegenAREA.h" #include "Game.h" #include "IO_Terrain.h" #if defined( _DEBUG ) #include "Tgamectrl.h" #endif #else #include "GS_ThreadZONE.h" #endif //------------------------------------------------------------------------------------------------- #ifndef __SERVER CReg...
2b891627e6a0ebff762fcd25d9bcbcc5e21382f2
e674da92df452f4cc318e7961b8ce390001014db
Ir1d/Fantasy
/POJ/3046.cpp
C++
cpp
1,533
no_license
/** * @authors Ir1d (sirius.caffrey@gmail.com) * @date 2018-05-25 23:05:21 * @copyright MIT */ #include <cstdio>// NOLINT #include <cstring>// NOLINT #include <algorithm>// NOLINT #include <cmath>// NOLINT #define x1 x11 #define y1 y11 #define f(x, y, z) for (int x = (y), __ = (z); x < __; ++x) #define g(x, y, ...
9b39613785dd553591110abd51ed325571a6274c
d0355c65e308a4a07d596db386d0bcb1a13e2750
noagol/AirlineDataManagement
/sorceFiles/MyEmployee.cpp
C++
cpp
2,255
no_license
#include "MyEmployee.h" /** * Constractor * @param employeeSeniority * @param birth * @param boss * @param title */ MyEmployee::MyEmployee(int employeeSeniority, int birth, Employee *boss, Jobs title) : seniority(employeeSeniority), birthYear(birth), employer(bo...
de4f84bf75c46a80e7e850f0b6a4172308957454
9f9edb3a53be2f789e8cd26847dbe43aebcf2b97
advaitsangle/unilang
/source/code/hello_world/glut/gears/main.cpp
C++
cpp
8,279
no_license
/* gears.c */ /* * 3-D gear wheels. This program is in the public domain. * * Brian Paul */ /* Conversion to GLUT by Mark J. Kilgard */ // Notes on if this crashes: // I had this segfault with something like this before: // pthread_setname.c: No such file or directory // https://stackoverflow.com/questions/426656...
a61612684e78bae7e55adb41215770fc2a6466f7
3eb2ba8d4d9c21bbaafa73a043355c75d30e4f7b
aliyun/aliyun-openapi-cpp-sdk
/cams/src/model/DeleteChatappTemplateResult.cc
C++
cc
1,559
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...
dc90ef4091d2fbef1aa4cfe1fe46ba8ec532ae98
98c54b8096e46bfeea261811eb0eec32ec5ae07f
kirchhoff/USACO
/ch1/section1.2/milk2_3.cpp
C++
cpp
247
no_license
/* ID:twd30651 PROG:milk2 LANG:C++ */ #include<iostream> #include<fstream> #include<vector> using namespace std; int main(int argc,char *argv[]) { freopen("milk2.in","r",stdin); // freopen("milk2.out","w",stdout); return 0; }
4de490c0c0e014883551a42641c029bc5f21e35c
b724f554388c4831705a4f9edb44ae6f224178c6
tridibsamanta/LeetCode_Solutions
/MergeIntervals_56.cpp
C++
cpp
733
no_license
/* ~ Author : leetcode.com/tridib_2003/ ~ Problem : 56. Merge Intervals ~ Link : https://leetcode.com/problems/merge-intervals/ */ class Solution { public: vector<vector<int>> merge(vector<vector<int>>& intervals) { if (intervals.size() <= 1) return intervals; v...
df7306c0eaa18984cbe882d4429f30faa913b650
fc2a3319a1158bada24bd81169d5d26856994d76
Drice27149/rasterizer
/Renderer.hpp
C++
hpp
568
no_license
#pragma once #include "Scene.hpp" #include "Triangle.hpp" #include "Texture.hpp" class Renderer { public: void render(Scene* scene); void renderTriangle(Vector* vs, Triangle* t); void writeImage(const char* filename); public: // eye position, gaze & up direction Vector origin, gDirection, uDirection; // field o...
b73f674cac7053b13fb555a1294ed95f3d7d6756
1a514c38f3cd61968800298b1ea426165d39593a
Ralith/matrix-structs
/include/mtx/events/collections.hpp
C++
hpp
4,800
permissive
#pragma once #include <variant.hpp> #include "mtx/events.hpp" #include "mtx/events/aliases.hpp" #include "mtx/events/avatar.hpp" #include "mtx/events/canonical_alias.hpp" #include "mtx/events/create.hpp" #include "mtx/events/guest_access.hpp" #include "mtx/events/history_visibility.hpp" #include "mtx/events/join_rule...
8e3f02007df5fe3b40aa3bff559d30af81ff0fdc
7e7f3b13fcccaa197c96de478cc63da0a12ab83a
OpenTrustGroup/fuchsia
/zircon/system/ulib/async/wait.cc
C++
cc
2,032
permissive
// Copyright 2017 The Fuchsia 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 <lib/async/cpp/wait.h> #include <utility> #include <zircon/assert.h> namespace async { WaitBase::WaitBase(zx_handle_t object, zx_signals_t tri...
ec78b77dbd3697b7dd34f3c304f03751889d3fe6
ba362796bbece472abb4fde7d9be5b89826706bb
Nattchi/Atcoder
/Easy100_2020-9-19/AC_三井住友銀行プロコン2019_B.cpp
C++
cpp
420
no_license
#include <iostream> #include <cmath> using namespace std; int main(){ int n; cin >> n; bool matched = false; int ans = 0; for(int x = 1; x <= 50000; x++){ if(floor(x * 108 / 100) == n){ ans = x; matched = true; } } if(matched){ cout << round(...
86daf4cd9e062ef0a44bf9ca16f22bf4dd5fd185
0df19146dcb6509226ac2b0650d9e00a3cfb7c08
emaballarin/advanced_programming_2019-20
/lectures/c++/03_more_on_pointers_and_vectors/07_std_vectors.cc
C++
cc
1,112
no_license
#include <iostream> #include <string> #include <vector> // Always in the HEAP // template<class T, class Allocator = std::allocator<T>> // class vector; template<typename T> void print_vector(const std::vector<T>& v, const std::string& s); int main() { std::vector<int> v0{1, 2, 4}; // A vector with elements 1,...
d2dea9932212727706ee03fdcc6f69e07a11a136
7170936d637c45c4f2465a6f0df0d51f8df90a9c
openbmc/telemetry
/src/metrics/collection_function.cpp
C++
cpp
5,653
permissive
#include "metrics/collection_function.hpp" #include <cmath> namespace metrics { class FunctionMinimum : public CollectionFunction { public: double calculate(const std::vector<ReadingItem>& readings, Milliseconds) const override { return std::min_element( read...
1ccc48fc913054af3cfe660acf00d60b6a67ee30
126dfb0b0647b8ce63c01f5e0106dd2e7c3e51d6
pololu/dual-vnh5019-motor-shield
/DualVNH5019MotorShield.cpp
C++
cpp
6,119
permissive
#include "DualVNH5019MotorShield.h" // Constructors //////////////////////////////////////////////////////////////// DualVNH5019MotorShield::DualVNH5019MotorShield() { //Pin map _INA1 = 2; _INB1 = 4; _PWM1 = 9; _EN1DIAG1 = 6; _CS1 = A0; _INA2 = 7; _INB2 = 8; _PWM2 = 10; _EN2DIAG2 = 12; _CS2 = A1...
824175721727c44439b208501e99661e465c84d7
f8c06eecc3e5b5f9c1bee9c6d51aefdb915e73fd
wjw136/course_designing_project
/compiler/.history/lab1/lexical_20210412104335.cpp
C++
cpp
1,264
no_license
#include <iostream> #include <windows.h> #include <string.h> #include <queue> #include <math.h> #include "stdio.h" #define ll long long #define inf 100000 #define clr1(a) memset(a,-1,sizeof(a)) # define clr(a) memset(a, 0, sizeof(a)) using namespace std; //reserved word static char reserveword[35][20]={ "and","ar...
2f19bfb0e560a1432582647859fa66e70657082c
8bdfd9540f81340cee37252acb9ec39438321182
szqh97/test
/cpp/memfunp.cpp
C++
cpp
331
no_license
#include <iostream> using namespace std; class P { public: void print() { cout << "p::print()" << endl; } }; typedef void (P::*fun)(); int main ( int argc, char *argv[] ) { fun f; P tmp; f = &P::print; (tmp.*f)(); return 0; } /* ---------- end of function main ---...
1aaf2e26349a0204d8b95f127633ef6136cd69d1
9756bc97ef7a812ce27f62c571a560ee08043018
eaasna/low-memory-prefilter
/hashmap/lib/seqan3/submodules/sdsl-lite/include/sdsl/suffix_tree_helper.hpp
C++
hpp
11,770
permissive
// Copyright (c) 2016, the SDSL Project Authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #ifndef INCLUDED_SDSL_SUFFIX_TREE_HELPER #define INCLUDED_SDSL_SUFFIX_TREE_HELPER #include <stdint.h> #inclu...
784b39740ceb8a86a744a467ce13a6e5ce473f15
102daf0d87dde93561e9e9b7dc9a5d2d75af6a6e
DarkCodez/TCF-SDK
/SDK/TCF_CustomizationRotationComponent_BP_functions.cpp
C++
cpp
2,004
no_license
// The Cycle Frontier (1.X) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "TCF_CustomizationRotationComponent_BP_classes.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------...
e02d96b6a67c101cdb90378cea6429aff297e784
8cebbaa8e1c02626805c74f5f2cb9bea9a13f394
multixd/Assignment4
/main.cpp
C++
cpp
2,082
no_license
// // test.cpp // Assignment4 // // Created by Vincent Liang on 11/2/19. // Copyright © 2019 Vincent Liang. All rights reserved. // #include <stdio.h> #include <iostream> #include <chrono> #include <ctime> #include <algorithm> #include "MyTree.hpp" using namespace std; //Testing (you must implement yours for the...
175967b7b2e5d229f593ceaa3ca5e699766efa1e
4bb5e6f1a919da5103682c206a9b449eda2078b5
akshaymarch7/chromium
/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
C++
cc
89,510
permissive
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h" #include <stddef.h> #include <algorithm> #include <memory> #include <uti...
c4574fb6a7a7d9b5dee50b8b11b8dc998d605348
e1780b1ed470d06b6e00b8aae4eef87afda05cb6
RealmeIP/qtpdfwidget
/src/QPdf/MainMenuItems.cpp
C++
cpp
8,238
no_license
#include "MainMenuItems.h" #include <QBitmap> #include <QScrollBar> #include <QGridLayout> CMainMenuItems::CMainMenuItems(QWidget *parent):QDialog(parent) { setupUi(this); setWindowFlags(Qt::FramelessWindowHint); setBackgroundRole(QPalette::Base); selectedItem = 0; setupMenuOption(); // QP...
6e1294335f77dd1f0c200b3bd262786639303460
e3cdfd3095d37ed05536ac384339f33bac77adfb
sandeepnmenon/Competitive-Coding
/leetcode/rotate-list.cpp
C++
cpp
1,589
no_license
#include <bits/stdc++.h> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: L...
707c169c80a0c694ba216bc750f1a5a8c2e01d4d
f21ea4f245b5c2e5eb2a3dde41b6d7e7267c9ef8
sgc109/CodeForces
/etc/E(eulerCircuit).cpp
C++
cpp
2,211
no_license
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <queue> #include <utility> #include <stack> #include <cstring> #include <cstdlib> #include <string> #include <set> #include <cmath> // #include <unordered_set> // #include <map> #define REP(i,a,b) for(int i = a; i < b;++i) #define FO...
a190dc57c8f228116928a8297090052cdaee2547
e11b17d7e6300e9071c5b324a20c871de9134e3d
JugaruRobert/AlgorithmicProblems
/lab2/modul.cpp
C++
cpp
1,165
no_license
#include <iostream> #include <math.h> using namespace std; void citire(int a[100],int &n) { cout<<"n = "; cin>>n; for(int i=0;i<n;i++) { cout<<"a["<<i<<"]= "; cin>>a[i]; } } int minim(int a[100],int n) { int mic=a[0]; for(int i=1;i<n;i++) if(a...
e768d2223cb3ca904541736bc548b2971daebc27
59a7c22f8448fc001b6cbf667e4a247894404df2
iam-aniket/30Days-Challenge-Solution
/Hashing/LongestConsecutiveNosSubsequence.cpp
C++
cpp
1,135
no_license
#include<bits/stdc++.h> #define tek ios_base::sync_with_stdio(false);cin.tie(0) #define rep(i,a,n) for(int i = a; i < n; i++) #define mp make_pair #define ff first #define ss second #define aip(a,n) rep(i,0,n) cin>>a[i] using namespace std; int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } bo...
791d3fbf99e97f109c0cccf8e126bfa69cc17449
273fe1ffb05de859d41672df7b86c038afcf444e
makiolo/homie-esp8266
/src/Homie/Utils/Helpers.hpp
C++
hpp
509
permissive
#pragma once #include "Arduino.h" #include "../../StreamingOperator.hpp" #include "../Limits.hpp" #include <memory> namespace HomieInternals { class Helpers { public: static void abort(const String& message); static uint8_t rssiToPercentage(int32_t rssi); static void stringToBytes(const char* str, char sep, by...
76094bc192f01ee42826e38be0af0b4a51394dd3
3d928c798f293d8277d12a4bd065f3cdb74331d3
github/codeql
/cpp/ql/test/library-tests/pod/test3.cpp
C++
cpp
2,080
permissive
class MyClass1 { // public / static data members public: int public_val; char public_arr[100]; static int public_static_val; protected: static int protected_static_val; private: static int private_static_val; }; class MyClass2 { protected: int protected_val; // has protected non-static variable -> not aggreg...
bf357ec025b91d7e2f4aa2435e202ec71535fe9c
c3f0cca32da53fc7c68066bdcd2646162ac47954
nachiketkanore/Codeforces-Solved-Problems
/1364_A.cpp
C++
cpp
927
no_license
#include <bits/stdc++.h> using namespace std; #define sz(x) (int)(x.size()) #define FOR(x,y,z) for(int x = y; x <= z; x++) #define int long long const int N = 1e5 + 2, inf = 1e18; int32_t main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE ...
73cd3c0e135aab98127e656855eb68387ad237fc
bfeb4ffe3ab78f43953b067a3fc11a1b2048275d
luoxianjia/esp-iot-solution
/examples/touch_pad_evb/main/evb_touch_matrix.cpp
C++
cpp
4,298
permissive
/* Touch Sensor Example For other examples please check: https://github.com/espressif/esp-iot-solution/tree/master/examples This example code is in the Public Domain (or CC0 licensed, at your option.) Unless required by applicable law or agreed to in writing, this software is distributed on an "AS IS"...
5c8c9596c121b06d3cf2b5aa19cb33e6d5627dd6
216c5ae6770996dd6b9361a9357a0ce6ebaed4d6
aayushsaini/Programs_bucket
/DAA_LAB/activity_selection.cpp
C++
cpp
518
no_license
#include <iostream> using namespace std; //Activity selection, job sequencing w/ dead lines, fractional knapsack int main() { int sTime[] = {1, 3, 0, 5, 8, 5}; int fTime[] = {2, 4, 6, 7, 9, 9}; int size = sizeof(sTime)/sizeof(sTime[0]); cout << "Following activities are selected:" << endl; int i...
48b7198e4e314b010aeba245d602f0bb2cae865e
4ef6153233b8f331fd509f4843469d342d7fd078
khasm/seasky
/docker-ramcloud/ramcloud/src/UdpDriver.cc
C++
cc
7,357
permissive
/* Copyright (c) 2010-2015 Stanford University * * Permission to use, copy, modify, and distribute this software for any purpose * with or without fee is hereby granted, provided that the above copyright * notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(...
c58be7aad4e2c068a6c561c008015602016a9b4a
282a2825d2957b85434bacbc1ad1d83d6dc642f3
mmeyer95/KalmanFilters
/src/tools.cpp
C++
cpp
1,338
permissive
#include "tools.h" #include <iostream> using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; using std::cout; using std::endl; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { //...
3983d6cb9f638cbe195208ef754178640d19b8e5
e1710cfe9ccdaf453147b2ace43d777fd38d2403
Haczar/Asteroids_a_la_Mode
/Asteroids_A_La_Mode/Intermediate/Build/Win64/UE4Editor/Inc/Asteroids_A_La_Mode/ShipProjectile.gen.cpp
C++
cpp
9,196
no_license
// Copyright 1998-2018 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==============================================================...
7ed5803911b6c262979067bd05d2681cee8c9f01
7f2b35496b6281c2809c7f5234ba7db0efa3e701
google-code/andrew-grechkin
/libbase/include/libbase/memory.hpp
C++
hpp
9,531
no_license
#ifndef _LIBBASE_MEMORY_HPP_ #define _LIBBASE_MEMORY_HPP_ #include <libbase/std.hpp> #include <libbase/uncopyable.hpp> namespace Base { namespace Memory { // template<typename Type> // struct PtrHolder: private Uncopyable { // PtrHolder(Type ptr) : // m_ptr(ptr) // { // } // // ~PtrHol...
192fc306894167c4268d7e6bffbdf03c27fdf11a
2fab26abbb9344629c7d309ea652a60d5fa63363
LArSoft/larreco
/larreco/ClusterFinder/BlurredClustering_module.cc
C++
cc
11,203
no_license
//////////////////////////////////////////////////////////////////////// // Class: BlurredClustering // Module Type: producer // File: BlurredClustering_module.cc // Author: Mike Wallbank (m.wallbank@sheffield.ac.uk), May 2015 // // Reconstructs showers by blurring the hit map image to introduce fake ...
6ead46547f0f4ebc60b6d359ea47ebdd36c8851f
c26b3b4a02c128fbd9f0109415a5ea60aeabd6b8
Michael-Z/neural_networks
/src/CLayersConfiguration.cpp
C++
cpp
2,897
no_license
/* * CLayersConfiguration.cpp * * Created on: Jan 26, 2015 * Author: vostanin */ #include "CLayersConfiguration.h" #include "CLayerInput.h" #include "CLayerComputor.h" #include "CLayerMatrix.h" #include "CNeuronFactory.h" #include <numeric> CLayersConfiguration::CLayersConfiguration( unsigned int inputNeur...
5a68ce1b4b528a1b24e7a0be1d9b469bdaf49468
6da1581aa584ef5484adf5ba99d98583523c342e
zhiayang/zkb
/hal/source/wrappers/hal.cpp
C++
cpp
456
permissive
// hal.cpp // Copyright (c) 2020, zhiayang // Licensed under the Apache License Version 2.0. #define ZKB_HAL_IMPL 1 #include "hal.h" #include "hal/impl_common.h" namespace zkb::hal { void init() { hal_board_init(); usb::init(); } void delayMs(uint32_t ms) { hal_delay_ms(ms); } void delayUs(uint32_t us...
0bd71a9634eccb600b2354c804d62787659a155b
743493f20dde7f40950e6ba7437d3b7525b3979d
hawie/aliyun-openapi-cpp-sdk
/ons/src/model/OnsMessageGetByKeyResult.cc
C++
cc
4,024
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...
7f0739e5ec180e22fa15a059436179e839f7e2d8
8c2e0012d280132ca9c306b4f180fcb1b6f30767
xiaoqgao/windows_nt_3_5_source_code
/windows_nt_3_5_source_code/NT-782/PRIVATE/SDKTOOLS/CACLS/UTEST/MAIN.CXX
C++
cxx
5,997
no_license
extern "C" { #include <nt.h> #include <ntrtl.h> #include <nturtl.h> } #include <stdio.h> #include <stdlib.h> #include <windows.h> //+---------------------------------------------------------------------------- ULONG GetAcl(WCHAR *filename, WCHAR *outfile); //+-----------------------------------------------...
a4b7310e695232cc1b139eb938834cdb052179ce
7b11be47b35242755a029f731ed394a29d4a9fd7
Koncord/YAPE
/apps/Core/Instructions/OpMUL.hpp
C++
hpp
849
permissive
/* * * Copyright (c) 2015-2017 Stanislav Zhukov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
9d1ba1a67986eaed8720b5b6a1e63205b0c8278e
7c24d419b33c23b3bd68c7ebbe2773b32bc54972
JulianNeeleman/kattis
/src/convexpolygonarea.cpp
C++
cpp
513
permissive
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> using namespace std; int x[101], y[101]; int main() { int n; cin >> n; while (n--) { int m; cin >> m; for (int i = 0; i < m; i++) { cin >> x[i] >> y[i]; } x[m] = x[0]; y[m] = y[0]; int an...
e02094aed26bc5d642cf392bba2df16242d5d8f6
19273895dc1cf8a1d4332018906f69bc02c0bd00
dbSOD/Security-guards
/安全卫士/TaskManager/TaskManager/Dia3.cpp
C++
cpp
9,277
no_license
// Dia3.cpp : 实现文件 // #include "stdafx.h" #include "TaskManager.h" #include "Dia3.h" #include "afxdialogex.h" #define 系统垃圾 0 #define 浏览器垃圾 1 #define VS垃圾 2 // CDia3 对话框 IMPLEMENT_DYNAMIC(CDia3, CDialogEx) CDia3::CDia3(CWnd* pParent /*=NULL*/) : CDialogEx(CDia3::IDD, pParent) , ExtendString(_T("...
dc3410c15be6b4e92d31bbb6fa8171d78a48e90f
df630b3f762e2202289fb4b998f5d2b6ec3770f5
skywriter94/necroDancer
/deathMetal.cpp
C++
cpp
24,447
no_license
#include "stdafx.h" #include "deathMetal.h" HRESULT deathMetal::init(string bossName, int idx, int idy, int TILE_SIZEX, int TILE_SIZEY) { boss::hp = 9; // 데스메탈의 기본 체력 초기화 boss::save_HP = 9; // 데스메탈의 세이브 체력 boss::max_HP = 9; // 데스메탈의 맥스 체력 boss::shield = 2; // 데스...
dd641fbf4ef9929f336b745ec4679bba96a133bf
ab441f988f646120600246ae13c1bc3e6162a9a0
Deepakku28/Leetcode
/283. Move Zeroes.cpp
C++
cpp
325
no_license
class Solution { public: void moveZeroes(vector<int>& nums) { int i=0; int n=nums.size(); for(int j=0;j<n;j++){ if(nums[j]!=0){ nums[i]=nums[j]; i++; } } while(i<n){ nums[i]=0; i++; } ...
4a76a70de428adffa203f70e14ac358f8a99eea0
9605989e824dc01fbe0cc09ea0be4e6ddde41ada
akure/experiments
/moderncpp/oops_dp/factory_method.cpp
C++
cpp
1,695
no_license
#include<iostream> #include<string> #include<memory> struct product_base { product_base() { std::cout << "product_base ctor" << std::endl; } virtual std::string name() { return "product_base"; } virtual ~product_base() { std::cout << "product_base dtor" << std::endl; } }; struct product_1 final :...
19a31561507f419f8f14e1ff5fe4eec77c7b7192
9d5ad04fd2ec9a34ad23e954a2ddfb08d99690f6
Forstulen/projects
/rtype/src/Server/ServerGame/Player.hpp
C++
hpp
468
no_license
#ifndef PLAYER_HPP # define PLAYER_HPP # include "TCPSocket.hpp" # include "UDPSocket.hpp" # include "Module.hpp" namespace ServerGame { class Player { unsigned int level_; int score_; Module module_; float beam_; TCPSocket tcpClient_; UDPSocket udpClient_; public: vo...
fbb248796090e7920bdbd5797b2b3322c4696aa6
5fe268fc92bdf04aa7fc3bd054cddb286c6f1972
e2-dunstan/CTP
/VSProject/VSProject/RayCast.cpp
C++
cpp
7,846
no_license
#include "Primitive.h" #include "Utilities.h" /*bool RayCast::Test(Primitive* prim, Ray& ray) { ray.direction = ray.direction.Normalise(); switch (prim->type) { case PrimitiveType::PLANE: { Plane* p = dynamic_cast<Plane*>(prim); return TestPlane(p->translation, p->collisionVolume.normal, p->scale, ray); } ...
81cff0b8c46be7ad28b0bc3aec1c8564358fa334
3380d61a5b4cde205ece6dcb1e9b1179a034bfc8
Zedd0202/Cpp_PS
/C++_PS/4963_섬의개수(dfs).cpp
C++
cpp
1,229
no_license
// // main.cpp // C++_PS // // Created by Zedd on 2017. 11. 15.. // Copyright © 2017년 Zedd. All rights reserved. // #include<iostream> using namespace std; int dx[8] = {0,1,1,1,0,-1,-1,-1}; int dy[8] = {1,1,0,-1,-1,-1,0,1}; int arr[51][51]; int visited[51][51]; int cnt; int row,col; bool isPossible(int y, int x){ ...
c0e9cfc8480c6631b9d9b8cee44c7ccaa826e958
7ad956416a7ca243e340a9346297a2319b86340f
besoft/MAF2Medical
/Testing/Operations/medOpComputeWrappingTest.cpp
C++
cpp
3,388
no_license
/*========================================================================= Program: MAF2Medical Module: medOpComputeWrappingTest Authors: Daniele Giunchi Copyright (c) B3C All rights reserved. See Copyright.txt or http://www.scsitaly.com/Copyright.htm for details. This software is distributed WITHOUT ANY WA...
e2519b3b9af9450dcff0938b4a70eebbf3dbb9e7
bface06d595452e5d02074dad0a05fa3a6a64f36
paperfrog1228/Algorithm
/Baekjoon/13300_방 배정.cpp
C++
cpp
286
no_license
#include<stdio.h> int n,k,s,y,c[2][7],a; int main(){ scanf("%d %d",&n,&k); while(n--){ scanf("%d %d",&s,&y); c[s][y]++; if(c[s][y]==k) c[s][y]=0,a++; } for(int i=0;i<=1;i++) for(int j=1;j<=6;j++) if(c[i][j]) a++; printf("%d",a); }
bf542d894cbd7b0edc337de22bfffeade63b1ef6
b0d349d6fbe7bcb50bdb2011307592b4df70bb2c
zrthxn/xtreme
/yinyang.cpp
C++
cpp
1,033
no_license
#include <iostream> #include <vector> // #include <bits/stdc++.h> #define INT32_MAX 2147483647 using namespace std; int isUB(vector<char> S) { if(S.size()%2==0) { for(int i=0; i<(S.size()/2); ++i) { if(S[i]!=S[((S.size()/2) -1) + 1]) return 1; } return 0; } else return 1; } void...
1a7007b56a62b3fbe5a586a7b82789004cab3875
2ab7597b58f43357834a327a5cdcce6639774d2a
imdeepmind/sorting-in-c-plus-plus
/selection sort/selection_sort.cpp
C++
cpp
970
no_license
/* *Programmed by Abhishek Chatterjee *Selection Sort *05/01/2018 */ #include<iostream> using namespace std; int main(){ int arr[100]; int n, i, j, temp; cout << "Bubble sort by Abhishek Chatterjee" << endl; cout << "How many numbers you want to enter : "; cin >> n; // Asking the numbers and then storing it in ...
d5a8f3533957d486bec1c9811171dab14c359568
e9bb1823c31cc2ce93319c30f4f87bd5819a91e4
MNL82/oakmodelview
/Lib/QMLOakTreeViewPlugin/oaktreeviewplugin.cpp
C++
cpp
619
permissive
/** * oakmodelview - version 0.1.0 * -------------------------------------------------------- * Copyright (C) 2017, by Mikkel Nøhr Løvgreen (mikkel@oakmodelview.com) * Report bugs and download new versions at http://oakmodelview.com/ * * This library is distributed under the MIT License. * See accompanying file ...
fd68ba4092fb193a4580ad0e102b08ff8a56a927
26a3df0ef3dc696f1b1676752db3ee70dac5db71
wdu/clang
/test/SemaCXX/warn-thread-safety-analysis.cpp
C++
cpp
86,639
permissive
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wthread-safety -Wthread-safety-beta -fcxx-exceptions %s // FIXME: should also run %clang_cc1 -fsyntax-only -verify -Wthread-safety -std=c++11 -Wc++98-compat %s // FIXME: should also run %clang_cc1 -fsyntax-only -verify -Wthread-safety %s #define LOCKABLE ...
63c48e9c0d1c33afc6e21ef655a6b0c48ccac144
db983c2b442579616dd4d62c3e8e8956d0c952c3
niuxu18/logTracker-old
/second/download/curl/gumtree/curl_repos_function_1322_curl-7.35.0.cpp
C++
cpp
820
no_license
static CURLcode tftp_state_machine(tftp_state_data_t *state, tftp_event_t event) { CURLcode res = CURLE_OK; struct SessionHandle *data = state->conn->data; switch(state->state) { case TFTP_STATE_START: DEBUGF(infof(data, "TFTP_STATE_START\n")); res = tftp_send_first(st...
09ec65898dedd5c0ec2a0574b96467dd6437ce3f
2247ecf429fd09e17cd5c4149b4ddf5231ef1999
wayou/chromium
/chrome/browser/apps/app_service/browser_app_instance_tracker.cc
C++
cc
21,177
permissive
// Copyright 2021 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/apps/app_service/browser_app_instance_tracker.h" #include <utility> #include "base/containers/contains.h" #include "base/debug/...
d1f6d93ad44ce05950d1934e4b9f52eb8cb4f44a
667a34c27740aa18f268ebd4f1be52e762a8319e
eaglexmw-gmail/adotcorporation
/ecos/cvs/packages/compat/posix/current/src/mqueue.cxx
C++
cxx
23,889
permissive
/*======================================================================== // // mqueue.cxx // // Message queues tests // //======================================================================== //####COPYRIGHTBEGIN#### // // --------...
4f197cde7b38dfe6e06ff0e99ddefe222960bd9b
fecdfdfb2ee0b4850fca33c4ff25c23b6b8c2625
LiaoJJ/COP6726-Database-System-Implementation
/Project5/a5Test/DBFile.cc
C++
cc
4,174
no_license
#include "TwoWayList.h" #include "Record.h" #include "Schema.h" #include "File.h" #include "Comparison.h" #include "ComparisonEngine.h" #include "DBFile.h" #include "DBFileHeap.h" #include "DBFileSorted.h" #include "DBFileTree.h" #include "Defs.h" #include <iostream> #include <fstream> // stub file .. replace it with y...
6d436672fd964011783c9072abf8a5d679eaad57
86f20a78181fc99080571536c3d98a2ffb6bc6a4
VasilyevaAS/Leetcode
/Jewels and Stones.cpp
C++
cpp
363
no_license
//https://leetcode.com/problems/jewels-and-stones/ class Solution { public: int numJewelsInStones(string J, string S) { int ret =0; set<char>set; for(int i = 0;i<J.length();i++) set.insert(J[i]); for(int i = 0;i<S.length();i++) if(set.count(S[i])) ...
49c7ff2c04adc843d899040f64bcd694b9ee334d
cd97aec2a39f71157aa2dab2fe0ea32552cf1316
sebastian-wardzinski/programming_c-_coursework
/lab4/galaxy-explorer/src/galaxy-explorer/AsteroidsObserver.cpp
C++
cpp
1,447
no_license
/* * This file was developed for the Fall 2018 instance of ECE244 at the University of Toronto. * Creator: Matthew J. P. Walker */ #include <galaxy-explorer/AsteroidsObserver.hpp> //When the server sends a new asteroid on the screen //Inserts the asteroid to the front of the linkedlist void AsteroidsObserver::onA...
566f29ed3d856dcb71dfb967db7d1724de515c9c
6d5e2a646b636d7085a346a3eabd28012babb9bf
webosce/chromium53
/src/third_party/webrtc/common_audio/vad/vad_sp_unittest.cc
C++
cc
2,650
permissive
/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
55af97fe2571ec2e1b3e5a47ee65fa63074628c4
d90fd8a0029f30acbb8f1af43ba285827e107a5b
alokprince/CPP
/allocateMinimumNumberOfPages.cpp
C++
cpp
1,094
no_license
#include<iostream> #include<climits> using namespace std; bool isPossible(int arr[],int n,int m,int min){ int studentRequired = 1, sum = 0; for(int i = 0 ; i < n ; i++){ if(arr[i] > min){ return false; } if(sum + arr[i] > min){ studentRequired ++; ...
cf6850a5c46b71af73035172250dec2f409ecb00
1eb4b13de6195900f33d691f4fbd96e554fe967f
GonVas/AEDA_Market
/AEDA_Market/Date.cpp
C++
cpp
3,237
no_license
#include "Date.h" Date::Date(string date) { stringstream ss(date); char delimiter; uni d, m, y; if (ss << d << delimiter << m << delimiter << y && count_digits(y) == 4) { struct tm t = { 0 }; t.tm_mday = d; t.tm_mon = m - 1; t.tm_year = y - 1900; t.tm_isdst = -1; time_t when = mktime(&t);...
bb734353fc9be23d7b1765885c3326b09e0d2e4b
df5e0a3a0c3d87b4c2528628af99212db48d9c55
Dileepredd/parallel_computing_ass_2
/q4.cpp
C++
cpp
1,399
no_license
#include <bits/stdc++.h> #include <mpi/mpi.h> using namespace std; int main(int argc, char **argv) { int rank, np; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &np); int n = atoi(argv[1]); int array[n]; int size = 0; int flag = atoi(argv[2])...
b5ddf83220131114fca25bb506d5c97fefe95ef1
aca73c8e20ef1c32958adf03a7abb9c559e4993c
jjzhang166/WinNT5_src_20201004
/NT/base/efiutil/efilib/inc/error.hxx
C++
hxx
16,587
no_license
/*++ Copyright (c) 1991-2000 Microsoft Corporation Module Name: error.hxx Abstract: This module contains ERROR class. Environment: ULIB, User Mode Notes: --*/ /* Defining error code: */ #define ERROR_USER_DEFINED_BASE 0xFF00 #define ERR_ERRSTK_STACK_OVERFLOW E...
7e6a2f74b8afcf4d9c5632823af70ded56514fdc
148cc9af43701df05ac1b2eb7a3d826a0e3204d2
espressif/ESP8266_RTOS_SDK
/components/protobuf-c/protobuf-c/protoc-c/c_message_field.cc
C++
cc
5,220
permissive
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistri...
46926ae68da1ff988119eac00ac01993009fd727
66a9c355e2fc9523b2d286a13e8472db796af503
braph/edev
/lib/tests/spanview.cpp
C++
cpp
1,516
no_license
#include <lib/spanview.hpp> #include <lib/test.hpp> #include <vector> static void dump(std::vector<int> vec) { for (auto it = vec.cbegin(); it != vec.cend(); ++it) std::cout << *it << ','; std::cout << std::endl; } static void test_span_get(std::vector<int> input, size_t output_size, std::vector<int> expected...
8431bc1ac3ec9f69467dea8bdc039882b98305ac
1188931b5e70a6393d064cb63ab71cda28b3a815
git-Charlie/ARK-SDK
/SDK/ARKSurvivalEvolved_FlockBehaviorData_structs.hpp
C++
hpp
1,736
permissive
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_Basic.hpp" #include "ARKSurvivalEvolved_ShooterGame_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Script Structs //--------------...
4ce6122952594861ce736a5cf19d09875f41ebea
82457fa9465291dce6be6b23c84bff060b7b75fb
crash0verrid3/o2c
/robot-dev/RoboRIO_workspace/O2Cfinal2014/Master.cpp
C++
cpp
5,835
no_license
#include "Master.h" MASTER :: MASTER() { } void MASTER :: Init() { Comms.Init(); Robot.Init(); //init variables } //AUTO void MASTER :: AutoInit(INPUT* input) { //auto init goes here /* input->atonForwardPower = 0.0; input->atonRunsStart = 0; input->atonFireDelay = 0; input->atonFire = FALSE; input->a...
72308db9f033f19791a6125d4aa57eab436c39d2
828f3603f8c02c1aca01588eb2b141604dbab192
YuliyaCl/helloIBox.jl
/test/dll_test-master/Dll_test/Dll_test.cpp
C++
cpp
496
permissive
// Dll_test.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include "DLL_test.h" int sum_int(int a, int b) { int c; c = a + b; return c; } float sum_float(float e, float f) { float d; d = e + f; return d; } double sum_double(double a, double b) { double c; c = a + b; r...
3fa75403b1cd227d3601c2795bad166c7303a6ff
5a85319b5456381583fb4e7371a7608cd1968929
kabcode/ITK
/Modules/IO/XML/include/itkDOMReader.hxx
C++
hxx
4,865
permissive
/*========================================================================= * * Copyright Insight Software Consortium * * 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...
957dd58760ac80054865aa9b071e9482aac47769
32489ebaf121a2b1eb897bb29052b3e0859bfa9a
LMJW/weeklycontest
/wc123/case2.cpp
C++
cpp
1,960
no_license
#include <iostream> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; struct disjointset { disjointset() {} unordered_map<int, int> ds; void addequal(int v1, int v2) { int p1 = parent(v1); int p2 = parent(v2); ds[p1] = p2; } int parent...
bdd340deccd7fb66055461ee816d20de8be57db2
75760b643763af8f95a99af048d0490cd3c1ec4e
shophelper/kitti_player
/src/kitti_player.cpp
C++
cpp
57,070
no_license
// redmine usage: This commit refs #388 @2h // ############################################################################################### // ############################################################################################### // ##########################################################################...
4dd9e27c498376907273b95cf9dd6b04ede23638
aae57b552cf89374fa71b0f16d2b012bdf1aaf00
Kawser-nerd/CLCDSA
/Source Codes/AtCoder/abc074/B/4556990.cpp
C++
cpp
358
no_license
#include <iostream> #include <vector> int main(){ int n, k; std::cin >> n >> k; int x; int ans = 0; for(int i = 0; i < n; ++i){ std::cin >> x; if(k - x > x){ ans += 2 * x; }else{ ans += 2 * (k - x); } } std::cout <<...
06a6b1b42370a74b98ab68fea27bfcc750be661e
75c3ccf3a4c028f7ab83b064f68c621d7efc2375
Bprry/MonkeMapLoader
/src/Behaviours/MapLoader.cpp
C++
cpp
27,664
no_license
#include "Behaviours/MapLoader.hpp" #include "libzip/shared/zip.h" #include "static-defines.hpp" #include "Behaviours/TagZone.hpp" #include "Behaviours/Teleporter.hpp" #include "Behaviours/Player.hpp" #include "Behaviours/ObjectTrigger.hpp" #include "Behaviours/PreviewOrb.hpp" #include "Behaviours/RotateByHand.hpp" #...
9664157655150666c36d632d964a5b42faf5ab28
5f84ab7e4f1fdbe391278e50d9a69a44fff3b578
chos2008/chos-framework-c
/HIB_SERVER/EpollSocketConnector.hpp
C++
hpp
213
no_license
/* * * * @author ada * @version 1.0 * @since 1.0 */ #ifndef EPOLL_SOCKET_CONNECTOR #define EPOLL_SOCKET_CONNECTOR class EpollSocketConnector { private: public: void start(); }; #endif
59d750a631f0e6be06a3e680095fb35fe972a97a
38f6b12f68105b6ddcabe9a0e76ac3c876a7d0cf
Udayadroit/inventory-extraction
/src/xml/Im2CharRectsXMLOutputHandler.hpp
C++
hpp
3,933
permissive
/******************************************************************************* * Copyright 2011 Sebastian Colutto * * 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.a...
4a9fe4c391618c9dc92ba20d83f474f364ef3334
7c4f31da95b06980c892f51aab6cd71ba035a4bd
MedicaicloudLink/Rosetta
/main/source/src/core/scoring/CenRotEnvPairPotential.hh
C++
hh
4,486
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
a13b3ebb69a83b452fcfbf03c81984c41f32348b
28063470fc19168752de1d923d89ff0cb421ca90
jose1310/GamePlay
/gameplay-samples/sample00-mesh/src/MeshGame.cpp
C++
cpp
6,015
permissive
#include "MeshGame.h" // Declare our game instance MeshGame game; MeshGame::MeshGame() : _font(NULL), _scene(NULL),_modelNode(NULL), _touched(false), _touchX(0) { } MeshGame::~MeshGame() { } void MeshGame::initialize() { // Display the gameplay splash screen for at least 1 second. displ...