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
d2a0bf42a4cca1920ad438663e8972d7684d8b26
11b687b7ad726c47eeb13efaa1bc52acac621db3
huqing020/myCplusplus
/utils/tools/tools_test.cpp
C++
cpp
884
no_license
/* * @Author: huqing * @Date: 2019-01-04 14:54:06 * @Last Modified by: huqing * @Last Modified time: 2019-01-04 16:28:09 */ #include <stdio.h> #include <time.h> #include "_tools.h" template<typename t> void printthings(t &val){ std::cout << val << std::endl; } void testVarToStr(); voi...
e29d5d36b67ff891b3192ae9889c5f6c753af205
4d7f864b494999c7e74efb0043db41c2059db2d2
aniketakgec/CommonAlgos
/Graphs/Connected_ComponentsIn2D_GRID.cpp
C++
cpp
1,109
no_license
#include<bits/stdc++.h> using namespace std; #define ll long long int #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); int vis[1001][1001]; char a[1001][1001]; int n,m; bool isValid(int x,int y) { if(vis[x][y]==1 || a[x][y]=='#') return false; if(x<0||x>n-1||y<0||y>m-1) return false;...
963d694de70503bc400a3f724a79793572656c12
19135b2e9f41f347ffc69b72befa02dcb56acd76
emuikernel/BDXDaq
/devel/clon/src/cmroot/cm.s/CMDaq.cc
C++
cc
25,573
no_license
////////////////////////////////////////////////////////////////////////// // // // CMDaq // // // // CLAS Monitoring ...
210e792f14e0aced3a5e300194ff704a67bd8754
19a6a1798a03313f5a02e683167f7eb293a9869a
gelfand/silkworm
/cmd/toolbox.cpp
C++
cpp
52,821
permissive
/* Copyright 2020-2021 The Silkworm Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
239ebca18496ce26e8ba74974941b3e214a04c26
e50eccdae2e7531aa9239ff5e8330feaba2fcee0
kerozou/kyopuro
/Atcoder解答/ABC-D解答/D035 - トレジャーハント.cpp
C++
cpp
3,886
no_license
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() // 昇順ソート #define rall(v) (v).rbegin(), (v).rend() // 降順ソート #define INF 1LL << 60 typedef long long int LL; const int MOD = 1000000007; template<class T> bool chmax(T &a, const T &b) {...
5156f64737483af3ed184098e2759666855916b2
b59304594f4f69b7de6557350d876cd9d902d45a
tyanmahou/Re-Abyss
/Re-Abyss/app/components/Actor/Enemy/CaptainTako/Shot/State/BaseState.cpp
C++
cpp
357
no_license
#include <abyss/components/Actor/Enemy/CaptainTako/Shot/State/BaseState.hpp> #include <abyss/components/Actor/Common/AudioSource.hpp> #include <abyss/components/Actor/Enemy/CaptainTako/SeDef.hpp> namespace abyss::Actor::Enemy::CaptainTako::Shot { void BaseState::start() { this->m_pActor->find<AudioSou...
3ecff933cedd71d8f9940af15a3349bead415716
007d237b2e8afc16626ddaa16ad2a0180eee76ba
gmsilva75/Betscoin
/src/qt/qrcodedialog.cpp
C++
cpp
4,311
permissive
#include "qrcodedialog.h" #include "ui_qrcodedialog.h" #include "bitcoinunits.h" #include "guiconstants.h" #include "guiutil.h" #include "optionsmodel.h" #include <QPixmap> #include <QUrl> #include <qrencode.h> QRCodeDialog::QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent) : ...
5af679e03ca691e9bf9cd061de2fb796109d9c45
035ec79349cf3dae22438d3029c116fbd2a8c25f
ezhangle/CE_FPS_TPS_proj
/Components/Player.cpp
C++
cpp
21,914
no_license
#include "StdAfx.h" #include "Player.h" #include "Bullet.h" #include "SpawnPoint.h" #include <CryRenderer/IRenderAuxGeom.h> void CPlayerComponent::Initialize() { // Create the camera component, will automatically update the viewport every frame m_pCameraComponent = m_pEntity->GetOrCreateComponent<Cry::DefaultCom...
6e503d269894351597d2bbcdeb6209e089750345
76f37b6cca5880df7a52774986fc5dbd1e75e221
Chris-Ju/SYSU-Homework
/Cpp/2087 Simulate stdstring(eden)/Latest Submission/StringTest.cpp
C++
cpp
1,364
no_license
#include <iostream> #include <cstring> #include "String.h" #include <string> using namespace std; String a, b("MFGZ!"); String c = b; void display() { cout << a.empty() << " " << a.length() << " " << a << endl; cout << b.empty() << " " << b.length() << " " << b << endl; cout << c.empty() << " " << c.length() ...
a9cd6074be0644d16888a899dd4c53c54100759a
5030272aea49ef0161a5bc8a161f262a82bbc80e
ediociat/Stntuple
/obj/obj/TStnCluster.hh
C++
hh
4,687
permissive
// // Read the tracks added to the event by the track finding and fitting code. // // $Id: TStnCluster.hh,v 1.1 2014/06/13 06:14:48 murat Exp $ // $Author: murat $ // $Date: 2014/06/13 06:14:48 $ // // Contact person Pavel Murat // #ifndef murat_inc_TStnCluster_hh #define murat_inc_TStnCluster_hh // storable objects (...
ba88e96510f5a52579edd0f2651af9d5d0db698c
2d0c9ad00a3059e7047fd6d2be49f10a39b3a885
JiSooMoon/codingPractice
/firstDigit.cpp
C++
cpp
232
no_license
char firstDigit(std::string inputString) { int i = 0; while(inputString[i] != '\0'){ if(inputString[i] >= 48 && inputString[i] <=57){ return inputString[i]; } i++; } }
feaabb4550e48765aa06add04184e69310a9ac87
40eb20ecacb753f7824aaf6a79a578c13154e0ad
weltyc/ntest
/src/core/BitBoardTest.cpp
C++
cpp
4,994
no_license
#include <cassert> #include "../n64/test.h" #include "BitBoard.h" #include "Moves.h" #include "QPosition.h" #include "BitBoardTest.h" class CBitBoardTest : public CBitBoard { public: CBitBoardTest(const CBitBoard& bb) : CBitBoard(bb) {}; int CalcMobilityOld(u4& nMovesPlayer, u4& nMovesOpponent) const; }; //! Old,...
61941c74fbc1d74c89906432479bac792fd2496b
3546820b05c713e6168fced5a024f39805f439a1
Atemyn/ImitationModel
/snake.cpp
C++
cpp
2,785
no_license
#include "snake.h" #include "mouse.h" #include "plant.h" Snake::Snake(int x, int y, Map* map) : Animal(x, y, map) { healthPoints = rand() % 41 + 10; meatVolume = healthPoints + 10; } void Snake::liveStep() { if (!isAlive()) { // Разложение трупа. if (meatVolume > 0) meatVol...
a0abbcc2f0ef59970342672d82c249429aa3d429
5acc391290ef7fd41434246b90ac4dcba74e5887
DevNulPavel/VulkanExamples
/Example_BaseCode/src/VulkanCommandBuffer.cpp
C++
cpp
20,927
no_license
#include "VulkanCommandBuffer.h" #include <cstdio> #include <cstring> #include <stdexcept> #include "Helpers.h" VulkanCommandBufferInheritanceInfo::VulkanCommandBufferInheritanceInfo(): renderPass(0), subpass(0), framebuffer(0), occlusionQueryEnable(0), queryFlags(0), pipelineStatistics(0){ } ...
83f0793bd945fd5150798dd97a2c293b3fcb8c22
1dfd59fa7c558e91a3d12a62aa4a1048cca057aa
NCTU-Kemono/Practice
/201808ION_test/Day1/A7.cpp
C++
cpp
1,473
no_license
#include <bits/stdc++.h> using namespace std; typedef long long LL; const LL MOD = 1e9 + 7; LL ADD(LL a, LL b) { return (a + 2 * b) % MOD; } LL SUB(LL a, LL b) { return (2 * a + b) % MOD; } LL MUL(LL a, LL b) { return a * (a + b) % MOD; } LL DIV(LL a, LL b) { return (a + b) * b % MOD; } LL strToLL(string input) { L...
219be9344e7b5d9889d0bab480b3d39f87c05b7d
0401e070db054e37d7f05b18d2aaedaceb12ca78
gandhy98/tareas-c-
/problema 10/ejercicio2.cpp
C++
cpp
2,120
no_license
#include<string> #include<iostream> #include<stdlib.h> using namespace std; int main() { string cadena_hora,hora, minuto; int horafin, horaentrada, minutoentrada; cout << "Ingrese la hora:"; getline(cin, cadena_hora); if(cadena_hora.length()==5){ hora=cadena_hora.substr(0,2); ...
a7f5ec6fb7c7dd7eab3dc1581450de015a9a2aca
bfaac3c751bcf3dbcc3996ed928bd3903703f784
arnaudgelas/Examples
/c++/Boost/ProgramOptions/Simple/BoostProgramOptions.cpp
C++
cpp
2,915
no_license
#include <iostream> #include <vector> #include <cstdlib> #include <cmath> #include <boost/program_options.hpp> namespace po = boost::program_options; int main(int argc, char* argv[]) { int compression; std::vector<std::string> FileList; std::vector<std::vector<std::string> > Lists(2); po::options_des...
6dd70d83650ed6c9fed93242d6c15e9916e60e28
730ffdb5ac5918a453c431babfd0b365af614034
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_DinoSettings_Kaiju_parameters.hpp
C++
hpp
710
permissive
#pragma once // ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DinoSettings_Kaiju_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //---------------------------------------------------...
d2b25eae276c33930a99f65759f1227be852e615
3884213b3739848f424ad09b6fc46b62b61083ea
Abel1121/For-Study-Cpp
/Lab_2/comparing number to zero/main.cpp
C++
cpp
419
no_license
#include <iostream> using namespace std; int number; int main() { cout << "Podaj liczbę a ją porównam z zerem" << endl; cin >> number; if(number<0) { cout << "Liczba jest mniejsza od 0" << endl; } else { if(number>0){ cout << "Liczba jest większa od 0" << endl; ...
c42e2312ccd5aa25c74d2850aba938c70ac496a2
2b2f2f1bae374a63543c7abf666f8d50e93d0407
bluedawnstar/algorithm_study
/solutions/leetcode/dp/063 - Unique Paths II.cpp
C++
cpp
873
permissive
// O(n*m) class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { if (obstacleGrid.empty() || obstacleGrid[0].empty()) return 0; int n = (int)obstacleGrid.size(); int m = (int)obstacleGrid[0].size(); vector<vector<int>> dp(n, vector<int...
92b7a69bee94f607056921fe4a955b87b31e904e
8655a54d4da19c1639f8188f13f821f1d01b0eff
jaessss/SWEA2
/2477.cpp
C++
cpp
2,674
no_license
//18.10.09 #No.2477 <차량정비소> 1344-1508 //Coments : 시뮬레이션의 전형, 자료구조 선정 중요, 대기사람수~빈창구수 케이스 나눠서 생각 //while문 구성시 마지막 단계부터 역순으로 구현시작 //STL queue를 사용할 수 있는 구조 확인 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <functional> #include <queue> #define MAXNM 10...
c6ee47fc0a38a0a5476be1b978e7a542fc186f22
7b412afba3e92ab18ea1c2803ebdbfd89bdc1045
stanjacob/cpp
/decltype_test.cpp
C++
cpp
234
no_license
#include <iostream> auto mult = [](int a, int b) -> int { return a*b; }; auto divide = [](int a, int b) -> int { return a/b; }; int main() { decltype(mult) g = divide; int i = g(2, 4); std::cout << i << std::endl; return 0; }
993c1a4f43236de611fe52f3f38a56a731cdf213
394b6eefe47b1d5507f2c7194a89cc1369de31c3
mariondechallens/Second-Internship
/Qt/TPZeroClassGenerator/code.cpp
C++
cpp
489
no_license
#include "code.h" MonCode::MonCode(QString &texte, QWidget *parent = 0): QDialog(parent) { m_code = new QTextEdit; m_code->setPlainText(texte); m_code->setFont(QFont("Courier")); m_code->setReadOnly(true); m_fermer = new QPushButton("&Fermer"); QVBoxLayout *layout = new QVBoxLayout; ...
fe4812024606d421745e060c79a4a9577b52d406
7cc180b94fe39966a449564cae417f21906a3f61
whyshivam/CppCode
/Intern 2020/GoldMan Special character.cpp
C++
cpp
1,943
no_license
//Cut my wings and ask me to fly, //to your astonishment I'll be lost in the sky #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair...
1baf5f843d7a8edb7d2e928ba94e56ebca0edeef
d3a7cfe2bd67ee78658e607a956a474119bcd4b5
JetAr/ZDoc
/code/Windows-classic-samples/Samples/Win7Samples/dataaccess/oledb_conformance/oledb/idbbinderproperties/idbbinderproperties.cpp
C++
cpp
113,428
permissive
//*----------------------------------------------------------------------- // // This is the Test Module for IDBBinderProperties interface, which is a // mandatory interface on BINDER objects. // // // WARNING: // PLEASE USE THE TEST CASE WIZARD TO ADD/DELETE TESTS AND VARIATIONS! // // // Copyright (C)...
b5dbed914139be313fa335799e002e50b033bd9f
34e2751052647c884438c67f81e6be4230c2f768
PatelManav/Codeforces_Backup
/1152B.cpp
C++
cpp
1,239
no_license
/*May The Force Be With Me*/ #include <bits/stdc++.h> #include <stdio.h> #include <ctype.h> #pragma GCC optimize ("Ofast") #define ll long long #define MOD 1000000007 #define endl "\n" #define vll vector<long long> #define mll map<long long,long long> #define pll pair<long long, long long> #define all(c) c.begin(),c.en...
5c7755d0a7d692f4030b55ad79735ec38ea34c04
33869195c1aa127f6f46a1baba18adc5cc866c6d
HrPeanut/unrimp
/Source/Renderer/Public/Resource/CompositorNode/Pass/VrHiddenAreaMesh/CompositorInstancePassVrHiddenAreaMesh.cpp
C++
cpp
15,039
permissive
/*********************************************************\ * Copyright (c) 2012-2021 The Unrimp Team * * 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 wit...
98ac61110b1748ab31fc588c6659a0f03c78c79b
36f1a0916e823dae944ed85bdd997745adf702a5
AndrewHamster/e-olymp
/407.cpp
C++
cpp
518
no_license
#include <iostream> #include <vector> #include <string> using namespace std; int main(){ int m, k; cin >> m; vector<int> a; for(int i = 0; i < m; i++){ cin >> k; a.push_back(k); } for(int i = 0; i < m; i++){ int t = a[i] % 3; switch(t){ case 0: ...
4f92929c6ac3344c22af9624b22c8c3938823b88
65aa4f6e02df657f14d260d2307fbab446370d29
aratalin/write_more_code
/104_max_depth_binary_t_E_dfs.cpp
C++
cpp
468
no_license
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { private: int dfs(TreeNode* root, int ds){ if(!root) return ds - 1; int now = max(dfs(ro...
14a22d75259252b33dfb31afd0a550a7e92fcf28
d58b424d82d1a2ec368396ee2c76cf998d3be3d6
kenji-hosokawa/rba
/unittest/internal_test/HA1051_affectedAlloReArb_isActive_Lhs.cpp
C++
cpp
5,832
permissive
// Copyright (c) 2019 DENSO CORPORATION. All rights reserved. /** * HA1051_affectedAlloReArb_isActive_Lhs.cpp */ #include <vector> #include <string> #include "RBAJsonParser.hpp" #include "TestCommon.hpp" #include "HA1051_affectedAlloReArb_isActive_Lhs.hpp" namespace { using namespace rba; HA1051_affectedAlloReAr...
cdda94067ba29ea2e97ef58e4260c850ae19ddd7
f6a268f15911de2b223055247e9c4f7c9b92716a
heyshb/Competitive-Programming
/CodeForces/PastContest/875/D.cpp
C++
cpp
1,866
no_license
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int MAXDEP = 18; int N; int h[200010]; int st[200010][MAXDEP + 1],ma[200010][MAXDEP + 1]; int lg[500010]; int nxt[200010][32]; int getmax(int L,int R) { int len = R - L + 1,l = lg[len]; return max(ma[L][l],ma[R-(1<<l)+1][l]); } pair<int,i...
ec97d2416ebc07883aec98675527a7b55b18bf8d
465756681fe488ff845de5363c5e50b854f1cc9d
Leroy888/ELString-quzhou
/Controller/ai_save_work.cpp
C++
cpp
9,143
no_license
#include "ai_save_work.h" #include "../Controller/LogicController.h" #include <QDebug> #pragma execution_character_set("utf-8") AI_save_work::AI_save_work(QImage * pImage,vector<string> ElDefect,vector<string> ElPosition,QString codename,bool AI_OK,int okNum,int ngNum,int errNum,int misNum,string strpath, int AI...
b2765435c218f1bb6438981fb3ed42fc41b4f4d8
a94e9ac664cf4cedf3c3a9ca5bf4c4378070094c
SunHaoer/OJ_ZCMU
/1050.cpp
C++
cpp
620
no_license
#include<iostream> #include<algorithm> using namespace std; int fun1(string str) { // ΗσΊΝ int sum = 0; for(int i = 0; i < str.size(); i++) { sum += str[i]; } return sum; } string fun2(int num) { string str = ""; while(num > 0) { str += (num % 2 + '0'); num /= ...
29b42bbe26bee64ba79f3286555a904c79439756
0cde7b51db7a43d1ca04eb647b37fb6fcea17edd
AlexandreBurel/pwiz-mzdb
/pwiz_aux/msrc/utility/vendor_api/UIMF/UIMFReader.cpp
C++
cpp
7,262
permissive
// // $Id: UIMFReader.cpp 6775 2014-10-10 17:48:51Z chambm $ // // // Original author: Brendan MacLean <brendanx .@. u.washington.edu> // // Copyright 2009 University of Washington - Seattle, WA // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with ...
88ade84fee2e6aafc5c492465587a5afd64fb263
48b82edba7b666daf10a31c52d257ec60c667887
SerjArturich/itc_remote
/homework/homework01.05.19/weekdays.cpp
C++
cpp
898
no_license
#include <iostream> using namespace std; int getWeekDay(int yy, int mm, int dd) { int rst = dd + ((153 * (mm + 12 * ((14 - mm) / 12) - 3) + 2) / 5) + (365 * (yy + 4800 - ((14 - mm) / 12))) + ((yy + 48...
ade5c615442e825dc8ad87cfd81d887247ca8b53
aa4706f3e940885fe2a9f3572299c52970ffe56d
maickom88/task-macos-poc
/windows/runner/main.cpp
C++
cpp
1,222
no_license
#include <flutter/dart_project.h> #include <flutter/flutter_view_controller.h> #include <windows.h> #include "flutter_window.h" #include "run_loop.h" #include "utils.h" int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, _In_ wchar_t *command_line, _In_ int show_command) { ...
5be7af41a3febf64969d06454ab3ddd2fd273ab1
1426c1e3e58c9a171e6974d84f3985e46d25b42e
bgarate/proy-grado
/src/systems/PadLandingSystem.cpp
C++
cpp
824
no_license
// // Created by bruno on 30/03/18. // #include "PadLandingSystem.h" void PadLandingSystem::Cleanup() { } std::string PadLandingSystem::GetName() { return "Pad landing"; }; void PadLandingSystem::internalInit() { this->markTrack = new MarkerTrack(this->config); this->markerLand = new MarkerLand(this->...
d3dde0fe3a28a5356844a4db3b73045b99f56002
7eb96442319b7aa1a64c6492f1a25939ced50995
jtg-gg/chromium.src
/media/base/android/media_codec_player.cc
C++
cc
45,536
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 "media/base/android/media_codec_player.h" #include <utility> #include "base/barrier_closure.h" #include "base/bind.h" #include "base/bind_helpe...
0eb8c69d0532a79a2d01155596f60e05db8098bc
44ebc8bf413615524e4969902eccac2eb46a7a9f
ap-Di0/SkyrimSETest
/skyrim64_test/src/patches/CKSSE/BSGraphicsRenderTargetManager_CK.cpp
C++
cpp
13,524
no_license
#include "../../common.h" #include "../TES/BSShader/BSShaderRenderTargets.h" #include "BSGraphicsRenderTargetManager_CK.h" #define CHECK_RESULT(ReturnVar, Statement) do { (ReturnVar) = (Statement); AssertMsgVa(SUCCEEDED(ReturnVar), "Renderer target '%s' creation failed. HR = 0x%X.", Name, (ReturnVar)); } while (0) BS...
bfb4184f4f193579fcb4cffe9d5697b1174cd38e
adc1a4e62b6fa437233c6c506e964db62cf13d40
keef-cognitiv/cxxmetrics
/cxxmetrics/ringbuf.hpp
C++
hpp
12,376
permissive
#ifndef CXXMETRICS_RINGBUF_HPP #define CXXMETRICS_RINGBUF_HPP #include <atomic> #include <thread> namespace cxxmetrics { namespace internal { /** * \brief A simple fixed-size ring buffer implementation because there still isn't one in C++17 * * \tparam TElemType The type of element in the ring buffer. * \tparam...
fd04034cbf1e8285821753bfba5badb931ba07c8
ea5b6525ab328307ee327171e790ef90baa6be8b
ogryzko/laplace
/source/laplace/engine/e_basic_entity.cpp
C++
cpp
20,309
permissive
/* laplace/engine/e_basic_entity.cpp * * Copyright (c) 2021 Mitya Selivanov * * This file is part of the Laplace project. * * Laplace is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. S...
cbb3782a418c67b05424cacbc184fa874368cc3d
c10cf6d53a08874ea773af6a12534e4ad0db1961
FilipeMaia/hdf5
/c++/test/ttypes.cpp
C++
cpp
17,240
permissive
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * ...
70abb28dc74d296f631291b3fc9a7e10ec3f1d42
f1ee267029e0b315128672f7e266e7b43dfd72c1
TorqueGameEngines/Torque3D
/Engine/source/console/stringStack.cpp
C++
cpp
4,698
permissive
//----------------------------------------------------------------------------- // Copyright (c) 2012 GarageGames, LLC // // 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 restrictio...
f6f5ae13f4f184bd1525efe2a571f296e1d7191d
db0284c5a217cab0d2b6a06279b52a73c895597b
nining/FenneX
/Classes/FenneX/Core/Graphics/RawObject.cpp
C++
cpp
6,111
no_license
/**************************************************************************** Copyright (c) 2013-2014 Auticiel SAS http://www.fennex.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 re...
6bd5aa2374c3cc26ff7928632cb4531db6f866de
09e398b70c244897372567fb40c753c4768eb39e
riverandeye/Investment
/Algorithm/Mo's Algorithm/13548.cpp
C++
cpp
1,043
no_license
#include <bits/stdc++.h> using namespace std; int res,sz,what; int a[100001], cnt[1000002], ans[100001]; struct query { int l,r,i; } Q[100001]; void add(int x){ cnt[x]++; if(cnt[x]==1)res++; } void del(int x){ cnt[x]--; if(cnt[x]==0)res--; } int main(){ int n,q; scanf("%d", &n); sz = sqrt(n); for(i...
77750a9b53593d0bae1d6d016bd0ed9f064cdf3b
e1ddcf348cba3c6f7e968a46b98718cee7eafd5c
junxzm1990/ASAN--
/testcases/juliet_test_suite/testcases/CWE122_Heap_Based_Buffer_Overflow/s05/CWE122_Heap_Based_Buffer_Overflow__cpp_src_wchar_t_cpy_51a.cpp
C++
cpp
2,485
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_src_wchar_t_cpy_51a.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_src.label.xml Template File: sources-sink-51a.tmpl.cpp */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Initialize...
ca7c14bf6828393c199f31a0ac0b8d71a56d7616
56757bd56a328ac270b1d55a346762d2a0228d92
hurenhe2008/windows
/design_model/task_threadpool/utils/semophare.cpp
C++
cpp
886
no_license
#include "semophare.h" semophare::semophare() : count(1) , wakeup(0) { } semophare::~semophare() { count = 0; wakeup = 0; } void semophare::wait() { std::unique_lock<std::mutex> locker(mutex); --count; if (count < 0) { cond.wait(locker, [&]()->bool { retu...
a4dbc1da577306f587a0a016bc72d0e18deecbee
3b8ce68aec63714c4c6be4ade96b12e88f513433
alexandraback/datacollection
/solutions_5636311922769920_0/C++/bamilan/problem_d.cpp
C++
cpp
1,223
no_license
//#define _CRT_SECURE_NO_DEPRECATE #include <iostream> #include <cstdio> #include <cstdlib> #include <vector> #include <list> #include<string> #define FOR(i,n) for(int i = 0; i < n; i++) #define FORI(i, a, n) for(int i = (int)(a); i < (int)(n); i++) int main() { //freopen("D-small-attempt0.in", "r...
b2b3b9fe9cb0bdad195dd64b8dbd4dfde339bfd4
a3898bdca78b7d488714ec99d4b8ffe7d829d72e
google/private-join-and-compute
/private_join_and_compute/crypto/context.cc
C++
cc
7,437
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...
8def39b5102f9e7b8ec45c457f626db58fbce93f
05bc00c8af11d2c9d184909cd4962236d38ad3e3
alexandraback/datacollection
/solutions_1674486_1/C++/mynameborat/main.cpp
C++
cpp
1,917
no_license
#include <cstdlib> #include <iostream> #include <set> #include <map> #include <string> #include <cctype> #include <cmath> #include <queue> using namespace std; int main(int argc, char *argv[]) { int T; int cno = 1; cin >> T; while(T--) { cout << "Case #" << cno++ << ":...
af958c5d073b637dd5d9392904774904809513b1
e913e060f448e78add67555d74a6b57ad3421da6
jacksondearing96/leetcode
/solutions/77. Combinations.cpp
C++
cpp
987
no_license
class Solution { public:        vector<int> generateRange(int n) {        vector<int> range;        for (int i = 0; i < n; ++i) range.push_back(n - i);        return range;   }        void helper(vector<int> range, int size_limit, vector<int>& current, vector<vector<int>>& solutions) {        if (current.size...
21721f75a9b8cf314abbc82717f7cf8e97be7aad
130624b85e023e18932ed1e62093e5b03f8a7eef
yang123vc/v8
/test/common/wasm/wasm-module-runner.cc
C++
cc
7,778
permissive
// Copyright 2016 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "test/common/wasm/wasm-module-runner.h" #include "src/handles.h" #include "src/isolate.h" #include "src/objects.h" #include "src/property-desc...
10294c00709e95e353352a0a5ebdfe51e880018b
382420c15e01f4b4af09c70686fdf5a5d2414278
tudiheshifu123/djinni
/test-suite/generated-src/cpp/empty_record.hpp
C++
hpp
278
permissive
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from test.djinni #pragma once #include <utility> /** * Empty record * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ struct EmptyRecord final { };
e954ecd3ead007d74c60b2ab3b8e570c12094064
eec6e684c191a86cc71f4c8ca4b2be3f6b63ab8d
unidevop/sjtu-project-pipe
/ sjtu-project-pipe/thirdparties/VTK.Net/src/Graphics/vtkSortDataArray.cxx
C++
cxx
6,946
permissive
/*========================================================================= Program: Visualization Toolkit Module: $RCSfile: vtkSortDataArray.cxx,v $ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details...
c1395201afb88903a3652d490128e9e85e93133b
32c5ed9168c074907177f16ea26dcee8298d3f0a
JodsintZ/roadtotoi
/TOI/TOI12_cablecar.cpp
C++
cpp
1,651
no_license
#include <bits/stdc++.h> #define tii tuple<int,int,int> #define long long long; #define pii pair<int,int> #define x first #define y second using namespace std; //too ez to compliment //down below using mst with dp //another solution(haven't tried yet) is b-search all max ans and normal dfs //can;t read old code lma...
ed45ede4c044cefa1a1424d8269660c28fb61586
691fc89760e860fee0c9ef65d2462bf727e9e06e
D-os/EasyToolkitAndExtension
/etkxx/etk/support/Archivable.cpp
C++
cpp
2,905
permissive
/* -------------------------------------------------------------------------- * * ETK++ --- The Easy Toolkit for C++ programing * Copyright (C) 2004-2007, Anthony Lee, All Rights Reserved * * ETK++ library is a freeware; it may be used and distributed according to * the terms of The MIT License. * * Permission ...
aa437df9b97d4f1450a61e6833a73c8a7dbd318e
c8ed38a3eb4d5f9b936ed983175f286847447648
anasjaba/SchoolProject
/Software design labs/tp5/PMTVCodec_CodecFactory.cpp
C++
cpp
4,588
no_license
/////////////////////////////////////////////////////////// // PMTVCodec_CodecFactory.cpp // Implementation of the Class PMTVCodec_CodecFactory // Created on: 31-oct.-2010 15:20:25 // Original author: David Dubé /////////////////////////////////////////////////////////// #include "PMTVCodec_CodecFactory.h" #i...
7343695264d2349c58216939c673bc37fed2cb92
6b9430993300f6b5e5c8b27bfce5d8029a4262ca
CourrierGui/chess-game
/src/game.cpp
C++
cpp
6,149
no_license
#include <chess/game.hpp> #include <pangolin/pangolin/resource-manager.hpp> #include <pangolin/pangolin/shader.hpp> #include <pangolin/pgl-tools/logger.hpp> #include <algorithm> #include <iostream> Game::Game(int width, int height) : width(width), height(height), board(std::min(width, height)), pieces(), selected...
d085111d3ab846cd2d2807d78311947332c16a4e
df9143f9889da329cfd402054d2e2e906b62c254
Atul-Kashyap/APS
/Edit_distance.cpp
C++
cpp
1,227
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; const int NN = 2001; int dp[NN][NN]; int editDist(string str1, string str2){ int m = str1.length(); int n = str2.length(); for(int i = 0;i<=m;i++){...
8f487c28a938b551945a028dd7a509da4b27c096
503798794df714c6c048f3b9a27f6a7be351a9e7
gpernot/drp_1d
/RedshiftLibrary/src/lib/operator/linemodel.cpp
C++
cpp
129,501
no_license
#include <RedshiftLibrary/common/mask.h> #include <RedshiftLibrary/extremum/extremum.h> #include <RedshiftLibrary/linemodel/templatesfitstore.h> #include <RedshiftLibrary/linemodel/templatesortho.h> #include <RedshiftLibrary/linemodel/templatesorthostore.h> #include <RedshiftLibrary/operator/chisquare2.h> #include <Red...
ca8f2793dab438a5d54254b4502d8edbccae0778
2de2b16cd38a458df1a12c885ea8d7843d25b84e
ajz34/LeetCodeLearn
/cpp/src/exercise/e0200/e0126.cpp
C++
cpp
4,768
permissive
// https://leetcode-cn.com/problems/word-ladder-ii/ #include "extern.h" class S0126 { bool is_diff1(const string& s1, const string& s2) { assert(s1.size() == s2.size()); int dif = 0; for (int i = 0; i < s1.size(); ++i) { if (s1[i] != s2[i]) if (dif++ >= 1) retu...
f82a6ac38ad13741cf64af12d59a0f0e5241738f
5fc8d67c12e7860bd091bb01ba5f3912fb5a612d
jennyb2911/chromium
/chrome/browser/android/feed/feed_journal_bridge.cc
C++
cc
7,167
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/android/feed/feed_journal_bridge.h" #include <jni.h> #include <list> #include <memory> #include <utility> #include "base/andro...
90c39811aaf7564677cd98fb5a39dbb825798b4a
8bdebb9cea0c9aa6b633b9331f08267bba5cd7c9
ivan-kits/skia-opengl-emscripten
/src/chromium/gen/gen_combined/third_party/blink/renderer/bindings/modules/v8/v8_xr_frame.cc
C++
cc
14,239
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. // This file has been auto-generated from the Jinja2 template // third_party/blink/renderer/bindings/templates/interface.cc.tmpl // by the script code_gen...
c353070e0b89d7fd4d3f0ef37ded54b20772f771
c8d91385a41f603fc015624328c8267aec917b0d
thor-mang/ROBOTIS-THORMANG-MPC
/thormang3_feet_ft_module/src/feet_force_torque_sensor_module.cpp
C++
cpp
20,072
permissive
/******************************************************************************* * Copyright (c) 2016, ROBOTIS CO., LTD. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistribution...
d68bf65b23ce98d8df9ea15f3e29a3e6f9fdabd2
5a7e33cc4271a8c76a09ec8147155e4576acd6b1
cmdrf/molecular-util
/molecular/util/SphericalHarmonics.cpp
C++
cpp
9,303
permissive
/* SphericalHarmonics.cpp MIT License Copyright (c) 2018-2019 Fabian Herb 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, cop...
10a1eb5365e957b8f3c3cae3469fec92b02ab98d
945051ad05161868086af9d72112300fec8c9286
alxarsenault/axServer
/source/axWebUtils.cpp
C++
cpp
11,600
permissive
// // axWebUtils.cpp // HttpServer // // Created by Alexandre Arsenault on 2015-04-08. // Copyright (c) 2015 Alexandre Arsenault. All rights reserved. // #include "axWebUtils.h" namespace http { namespace server { namespace mime_types { struct mapping ...
9b7a8c83377b79e4bdd14f90800cc834d3e769f1
a9cff11dbf300a76bc86a8d814fcb52c0cc79156
Musfiqshohan/Competitive-Programming
/topics wise codes/STRING/Hashing/cf-126 B Password.cpp
C++
cpp
1,981
no_license
#include<bits/stdc++.h> #define pb push_back #define ll long long #define loop(i,n) for(int i=0;i<n;i++) #define d 256 #define mod 1000000009 using namespace std; string str; vector<int>vec; ll hash_value[1000009]; void prepare_hashing() { int len=str.length(); ll p=0,t=0,currBase=1; for(int i=0,j=len-1; ...
b2892842a8aa280b7547400316572ff86c06b36c
dc4ffd020f869dd0590f050c9e3ae006fe40b26e
msupernaw/ATL1
/Utilities/IO/StreamedDataFile.hpp
C++
hpp
7,826
no_license
#ifndef STREAMEDDATAFILE_HPP #define STREAMEDDATAFILE_HPP #include <iostream> #include <sstream> #include <limits> #include <fstream> #include "../StringUtil.hpp" #include "../../AutoDiff/Variable.hpp" #include "../../Containers/Matrix.hpp" #include "../../Containers/Vector.hpp" #include "../../Containers/Array.hpp" n...
dbb2d0707237b8fb2baa87f606a7719718971973
46310bb870c2ca63b30e262ddb05cb0e924e4cdb
VladLyukshin/hw_algorithmization_programming
/sem5.cpp
C++
cpp
1,471
no_license
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; void show_data(const vector <string>& numbers, const int count) { for (int i = 0; i < count; i++) { cout << numbers[i] << endl; } } void input_numbers(vector <string>& numbers, const int count) { ...
da7d7bee4e678f6e321bd8af13e289985baed6dc
f473510e5c157b8573453686c348a4e7569f3d32
ynoza/Biquadris
/biquadris-master/block/gblock.cc
C++
cc
261
no_license
#include "gblock.h" //Grayblock GBlock::GBlock(int levelMade) { this->levelMade=levelMade; orientation=0; cellsLeft=1; letter ='G'; theBlock.emplace_back(Cell{0,5,true,"GBlock"}); } void GBlock::rotateClock(){} void GBlock::rotateCounterClock(){}
6c3770151d918e9aea0c60ccb29ed6fb3740bb38
f6f8d4048a6860137262451f7ccf4f907d6487e6
pedrovxm/20191-team-10
/src/treinador.cpp
C++
cpp
1,780
no_license
#include "../include/treinador.h" #include "../include/pokemon.h" #include "../include/pokemon_agua.h" #include <iostream> #include <string> #include <vector> Treinador::Treinador(std::string nome, int lideranca): _treinador(nome), _lideranca(lideranca){set_pokeball(5);set_capturas_efetivas(0);set_capturas_totais(0)...
3d5dadb48121307360f0c6df7edeaa95197432c5
37e8f299b48afa17fa3c14fc6d81cfc51e1835e0
chenxiaoquan233/File_Transmission
/src/src/Client/Client.cpp
C++
cpp
11,506
no_license
#include "../../include/Client/Client.h" Client::Client(const char* ip_addr) { this->ip_addr = new char[20]; strcpy(this->ip_addr, ip_addr); } Client::~Client() { closesocket(this->cmd_sock); } int Client::send_cmd(const char* cmd) { int res = -1; cout<<cmd<<endl; res = send(...
1736c4673f3dea9a1a70d78b0d10e3ca15063cb4
093748128e6c9bad590707aab6539739670d8d85
chai0704/Atcoder
/AGC/004/A.cpp
C++
cpp
665
no_license
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair<int,int>; //using mint = modint1000000007; const int MAX = 510000; const ll MOD = 1000000007; const ll INF = 1LL << 60; int main(){ ll ...
f4d7b40315982a97eea7c6850743df4671011bdc
79dc227e04ba419604e160af0db2b3d79ec62cb1
yuan195820/GameServer
/libServerCore/src/ServerSocket.cpp
C++
cpp
19,234
no_license
#include "ServerSocket.h" #include "utils/Log.h" #include <errno.h> #include <string.h> namespace ws { //===================== ClientSocket Implements ======================== // socket threads ClientSocket::ClientSocket() : server(nullptr), socket(0), readBuffer(nullptr), isClosing(false), writeBuffer(nullptr), is...
d895a0b86c07c5d9314e83a52ad3ad46f489e52f
cf6b37cdbdd412f35de1fc401f11b38f52d2ccda
Crasader/C-_Project
/code/common/LibHNLobby/HNLobby/HNUpdate.cpp
C++
cpp
16,587
no_license
#include "HNUpdate.h" #include "../../../game/MixProject/Classes/CommonRes.h" #include "HNNetProtocol/HNBaseCommand.h" #include "GamePrompt.h" #include "HNLobby/PlatformConfig.h" #include "HNMarketExport.h" #include "HNNetExport.h" #include "json/document.h" #include "json/rapidjson.h" #include "GameData.h" //#include...
3baf87c869550cfe63524e7466ece443e31e81ca
a96cfbdfb6fdc633a3a4a8f6e91037ef3181575b
mariofv/LittleOrionEngine
/Libraries/include/opencv2/core/hal/intrin.hpp
C++
hpp
18,385
permissive
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
16f8cf4a93dad9ecb9b3c46660ce48ef0f37ecdc
ec8d23b41078fa101cd5091267c6072fba334be2
allianz-pmichel/xerces-c-src_2_8_0
/src/xercesc/util/Compilers/CodeWarriorDefs.cpp
C++
cpp
2,806
permissive
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
eab0058647e66c3359751b3736e63acfd26f7586
8d565f21585492d55f646c48e7495aa9a08aa7d2
denghe/xxlib
/tool_dupe_file_cleaner/main.cpp
C++
cpp
3,123
permissive
/* 功能:扫描当前工作目录下 *.JPG 和 *.HEIC, 如果 文件名相同,删掉 .JPG, 保留 .HEIC 主要用来解决 QNAP NAS 使用 QuMagie 上传一段时间 jpeg 之后 改设置 为 上传 heif, 从而产生很多重复内容文件的问题 另外还发现了 .jpg, .JPG 大小写两种文件名 同时存在 的问题,所以 删除时 数量可能 超过 .heic 的个数 执行后, QuMagie 软件里反应没那么快, 要等它索引, 甚至去清空垃圾桶 最后,dir *-1.* *-2.* *-3.* ... 可列出覆盖时自动重名 的重复文件. 可手工 del */ #include <filesystem> na...
5a9df52237fb2cf05abedc37e8d6a5c5f6ac3a25
49211db4d48f8791b461e3e6b9a0e8ccc31ba6e9
uDeviceX/uDeviceX
/poc/lib/scheme/time_line/imp.cpp
C++
cpp
241
no_license
#include <mpi.h> #include <stdio.h> #include <math.h> #include "utils/msg.h" #include "utils/error.h" #include "utils/imp.h" #include "io/restart/imp.h" #include "imp.h" #include "imp/type.h" #include "imp/main.h" #include "imp/start.h"
1ebd594787d4f88150ede7166ec69d32e0770d5f
2afd217691a5adf01ecc0726766d4665d10254bc
CouleeApps/NeatScroll
/NeatScroll/WindowDetector.hpp
C++
hpp
325
no_license
// // Created by glennsmith on 12/24/2017. // #ifndef NEATSCROLL_WINDOWDETECTOR_HPP #define NEATSCROLL_WINDOWDETECTOR_HPP #include <string> class WindowDetector { std::string mWindowName; public: WindowDetector(const std::string &windowName); bool isWindowDetected() const; }; #endif //NEATSCROLL_WINDOWDETECTOR...
e5cddee00cc1ed2a6004eca54f0655d3770e802c
49a690fbf3f11281adbcf6dd4f68ef1541a8a907
MrBruceLee/LeetCode
/C++/FirstMissingPositive.cpp
C++
cpp
792
no_license
/* * place each number under their corresponding index * */ class Solution { public: int firstMissingPositive(vector<int>& nums) { for(int i = 0; i < nums.size(); i++){ // swap when: // 1. current number is in the range: ( 0 , nums.size() ] // 2. current number is n...
f81100811c273ab95cdc7d9467cb984e03b707a6
146b0bf2d7c127f044c7ae353f45bb10200d76ac
hoboaki/engineplan
/Scratch/LowLevelGraphics/VulkanSample/AeVulkanLib/ae/gfx_low/UniqueResourceMemory.cpp
C++
cpp
1,272
no_license
// 文字コード:UTF-8 #include <ae/gfx_low/UniqueResourceMemory.hpp> // includes #include <ae/base/PtrToRef.hpp> #include <ae/base/RuntimeAssert.hpp> #include <ae/gfx_low/Device.hpp> //------------------------------------------------------------------------------ namespace ae::gfx_low { //----------------------------------...
7ecd0f9f0af2ede0a11c45d4bfeed003f48cd65a
313126d2d0cce99a1bf0642160cfc888679a3c78
adrianrocamora/kng
/hr/Algo/time_conversion.cpp
C++
cpp
729
no_license
#include <cmath> #include <cstdio> #include <vector> #include <string> #include <iostream> #include <algorithm> using namespace std; int main(){ string time; cin >> time; string hh = time.substr(0,2); int hhVal = stoi(hh); bool isPM = (time[8] == 'P'); if (hhVal == 12) { if (isPM) { ...
44464708a0da4708ee249b8b47f5fa448fc54b27
9555ba6f9fb02a639e441fbaba771dc006f66f73
mviseu/Coursera_algorithms_II
/Week4/TrieMain.cpp
C++
cpp
2,116
no_license
#include "Trie.h" #include <iostream> #include <iterator> namespace { constexpr const auto nrAlpha = 26; void PrintVal(const Trie<int, nrAlpha>& trie, const std::string& key) { const auto val = trie.Find(key); if(val) { std::cout << "Value is " << *val << " for Key " << key << std::endl; } else { std::...
e0451f41a1bb08a711fa9372cce3ee1d92e674da
8fd09a06db0785ec661d3d1febc8c9538f1cf45a
D-Denisov/openvino
/inference-engine/src/inference_engine/os/win/win_shared_object_loader.cpp
C++
cpp
8,397
permissive
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "ie_common.h" #include "details/ie_so_loader.h" #include "file_utils.h" // // LoadLibraryA, LoadLibraryW: // WINAPI_FAMILY_DESKTOP_APP - OK (default) // WINAPI_FAMILY_PC_APP - FAIL ?? (defined by cmake) // WINAPI_FAMILY...
a86de30fff24d24fc02b103c2672fb32f632667c
88c1e28a5e9ec4a8c0066983d6f9e2d76177bdd0
destinydai/Chaos
/Source/Geometry/TransformShape.cpp
C++
cpp
745
no_license
#include "stdafx.h" NS_CH_BEG CH_OBJ_TYPE_IMPL(TransformShape,Shape) TransformShape::TransformShape( void ):m_pRefShape(nullptr) { } TransformShape::TransformShape( Reference<Shape> pShape,const Transform &tran ): m_pRefShape(pShape),m_transform(tran) { } TransformShape::~TransformShape( void ) { } BBox Tran...
5f697b23f46f0f7714c762f81b0227674be1c8c4
27705ccca6f4bb0d4c66dc05dadd9547a11a66c7
SamiFawcett/bioinformatics
/consensus_and_profile.cpp
C++
cpp
4,487
no_license
/* INPUT: >Rosalind_1 ATCCAGCT >Rosalind_2 GGGCAACT >Rosalind_3 ATGGATCT >Rosalind_4 AAGCAACC >Rosalind_5 TTGGAACT >Rosalind_6 ATGCCATT >Rosalind_7 ATGGCACT OUTPUT: ATGCAACT A: 5 1 0 0 5 5 0 0 C: 0 0 1 4 2 0 6 1 G: 1 1 6 3 0 1 0 0 T: 1 5 0 0 0 1 1 6 */ #include <iostream> #include <string> #include <stdlib.h> #inclu...
6daa35a4646bb9af0d085bf8883fb9e78fad6de7
7f8a82101cf3e43ba1cb8e76e09fcd13eace2ece
fujunwei/chromium-src
/components/gcm_driver/account_tracker_unittest.cc
C++
cc
28,407
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 "components/gcm_driver/account_tracker.h" #include <algorithm> #include <vector> #include "base/message_loop/message_loop.h" #include "base/str...
469eb775e995e0977280e65677857ea47ef3e7ce
c1be4d3b7b7f39bffebbd56e6facd7f03f548953
gauravsingh9891/INDL_CPP
/Lecture-11/CharacterArrays.cpp
C++
cpp
885
no_license
#include <iostream> using namespace std; void ReadLine(char *a,char delimiter='\n'){ char ch; ch=cin.get(); int current_index=0; while(ch!=delimiter){ a[current_index]=ch; current_index++; ch=cin.get(); } a[current_index]='\0'; } void print1(char *a){ for(int i=0;a[i]!='\0';i++){ // cout<<a[i]; if(...
d70404d96e67ef4f24597a19e7d554675150714a
3a8a6e7151a389d050e42d2727ee89c062aeaa73
nastyakrul/VVP_
/Lab14.6/Lab14.6/Lab14.6.cpp
C++
cpp
2,498
no_license
// Lab14.6.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> #include <locale.h> #include <stdio.h> int main() { setlocale(LC_ALL, "Russian"); //установка русского языка int n,f1,f2,f,k;//ввод переменных printf("Введите N: "); //ввод значения с ...
0f491d497cdb4fc4174dbb16fa6c9b56a08fd52c
bab6780b0462d447c134a58d6ca7f8f15c47ade1
ishuu7/Interview-Preparation
/Hashing/largest-subarray-with-0-sum.cpp
C++
cpp
394
no_license
// https://practice.geeksforgeeks.org/problems/largest-subarray-with-0-sum/1 int maxLen(int A[], int n) { unordered_map<int, int> m; int curr = 0; int ans = 0; m[0] = 0; for(int i = 0; i < n; i++) { curr += (A[i]); if(!m.count(curr)) m[curr] = i + 1; else { ...
dc3ac7f708809cd0ca5efdc83fab54bff75b21f0
e3a3a8b54b49d0b20733e8a6537ca31e2f74ef33
nandarahul/competitiveProgramming
/codeChef/TAVISUAL.cpp
C++
cpp
324
no_license
#include<iostream> using namespace std; int main() { int T,N,Q,C,L,R; cin>>T; for(;T>0;T--) { cin>>N>>C>>Q; for(;Q>0;Q--) { cin>>L>>R; if(C<=R && C>=L) { C=R-(C-L); } } cout<<C<<"\n"; } return 0;...
178e03d91affa6b25f72f4dd3933a823b2b9e4a7
9963bca463ba72e98e5b54d3eb7d04baeab8bf8d
otcshare/chromium-src
/chrome/browser/navigation_predictor/navigation_predictor_browsertest.cc
C++
cc
30,223
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 "base/macros.h" #include "base/run_loop.h" #include "base/sequence_checker.h" #include "base/strings/utf_string_conversions.h" #include "base/tes...
2a86f28106c5c5de0cd95e4c3ffd11be924d7b62
2f00404c26f2a85317657e6cb357810a2e606c16
antuan1996/code-archive
/trello/timus1133.cpp
C++
cpp
1,570
no_license
#include <algorithm> #include <cstdio> #include <deque> #include <queue> #include <string> #include <vector> #include <iostream> #include <sstream> #define pb push_back; #define mp make_pair #define sz(x) ((int)(x.size())) #define forc(i,n) for(int i = 0; i < n; ++i) using namespace std; stringstream fakestream; #i...
b80d238f347bcde7bedd0a88d8902ad4b3fdec4c
b73626e8b897de68517a9f7953b95c08051fcef6
muzhigo/leocad
/common/project.cpp
C++
cpp
67,689
no_license
#include "lc_global.h" #include "lc_math.h" #include "lc_mesh.h" #include <locale.h> #include <array> #include "pieceinf.h" #include "camera.h" #include "project.h" #include "image.h" #include "lc_mainwindow.h" #include "view.h" #include "lc_library.h" #include "lc_application.h" #include "lc_profile.h" #include "lc_fi...
84790fc9acabfc67cd82de2a8b674b9e66272033
47541b7c5e4273f057fc0a382246ac351f1b13ab
xijunke/maplab_summer
/algorithms/vi-map-data-import-export/src/import-export-gps-data.cc
C++
cc
7,955
permissive
#include "vi-map-data-import-export/import-export-gps-data.h" #include <aslam/common/time.h> #include <glog/logging.h> #include <maplab-common/progress-bar.h> #include <nav_msgs/Odometry.h> #include <rosbag/bag.h> #include <rosbag/view.h> #include <sensor_msgs/NavSatFix.h> #include <sensors/sensor-factory.h> #include ...
ed8d9bd75be4c5e98df13b972ffa2624b04f7c09
5e45a484eb21a85e7c7d2360508ad80df93c43c1
koosaga/olympiad
/ICPC/WF/wf2016_c.cpp
C++
cpp
1,267
permissive
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <limits.h> #include <math.h> #include <time.h> #include <iostream> #include <functional> #include <numeric> #include <algorithm> #include <stack> #include <queue> #include <deque> #include <vector> #include <string> #include <bitset...
02e7131dff047186178ab8730f4b966a62be7e88
65eb244cde9c4799999d47461741cc848d21eb05
rav4kumar/openpilot
/phonelibs/acado/include/acado/integrator/integrator_runge_kutta78.hpp
C++
hpp
2,628
permissive
/* * This file is part of ACADO Toolkit. * * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau, * Milan Vukov, Rien Quirynen, KU Leuven. * Developed within the Optimization in Engineering Center (OPTEC) * u...
d55f400cbfeba3aa442ceb6b99f2aa22a4ab3d22
55607efcb092b4a27f60a9ffeb46d4c1720bb0c7
vxl/vxl
/core/vbl/io/vbl_io_bounding_box.hxx
C++
hxx
2,547
no_license
// This is core/vbl/io/vbl_io_bounding_box.hxx #ifndef vbl_io_bounding_box_hxx_ #define vbl_io_bounding_box_hxx_ //: // \file #include <iostream> #include "vbl_io_bounding_box.h" #include <vsl/vsl_binary_io.h> //========================================================================== //: Binary save self to stream....
cd1cf5c014f2ba686a075c81a2698fc8fa46e93c
6fc7f530ccb2b3d158dc25df6ac594cdea737c2b
SpatDIF/SpatDIFLib
/examples/sdInterpolationTest.cpp
C++
cpp
1,604
permissive
/** @file * * @ingroup spatdiflib-examples * * @brief Example: Test all functionalities of the #sdInfo class * * @details * * @authors Chikashi Miyama, Trond Lossius * * @copyright Copyright (C) 2013 - 2014 Zurich University of the Arts, Institute for Computer Music and Sound Technology @n * This code is lic...