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
93c00f995e709a0682e578cd5463af3dd2064c2b
ed8970044f9b5d3c1ee8edbaf3bbfd415252ffb1
rajivranjanmars/codechef
/RELATIVE.cpp
C++
cpp
307
no_license
#include <iostream> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--){ int g, c; cin >> g>> c; cout<< (c*c)/(2*g) << endl; } return 0; }
c623076841d37ab29b72dcef71f7f3b11a0cfefe
e527fa97637b1973624356ad07bc8b45c2537d24
BYakov/Pahsed_Array_repair
/Что не запускается/sul-2010.07.10-rel-4.0 — копия (2)/sul_src/sul_mdo.cpp
C++
cpp
29,320
no_license
#include <windows.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <conio.h> #include <iostream> #include <string> #include <istream> #include <fstream> #include <iomanip> #ifndef _SUL_MDO_H_ #include "sul_mdo.h" #endif using namespace std; //---------------------------------------------------...
9ca99b5094e2e5bb5cd8cea8f3dd956430ee0701
88332b330ffc5a620c9076ba8938bde760c2d424
PysKa-Ratzinger/personal_project_euler_solutions
/solutions/051-075/69/main.cc
C++
cc
1,011
permissive
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <stdint.h> #include <string.h> #include <sys/resource.h> #include "../../utils/primes.hpp" #include "../../utils/totient.hpp" #define ONE_OVER_MILLION 1E-6 uint64_t magic() { double maxval = 0.0; uint64_t res = 0; for (unsigned i=2; i<=10000000...
247e19c0fd5852e63c1a7072e7977696f3f90dbe
0c94f8412ffdf5ea3cddc0089e574c2988cc4991
MichaelHDesigns/hodl-cash
/src/masternode/masternodeman.cpp
C++
cpp
25,488
permissive
// Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2015-2018 The PIVX developers // Copyright (c) 2018-2020 The HodlCash Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <masternode/...
6e05a26c4451c3b1d1d5da510b17e8558bc85089
a0f6b1709f04a5d252dd07f8f69a626c4456fbb6
ManasR4A/DSL
/MegaScryptLib/MegaScrypt/Generated/MegaScryptParser.cpp
C++
cpp
94,980
no_license
// Generated from MegaScrypt.g4 by ANTLR 4.8 #include "MegaScryptVisitor.h" #include "MegaScryptParser.h" using namespace antlrcpp; using namespace antlr4; MegaScryptParser::MegaScryptParser(TokenStream *input) : Parser(input) { _interpreter = new atn::ParserATNSimulator(this, _atn, _decisionToDFA, _sharedCont...
d8d2e76fc95a563a007564ad980c91b2476b6cce
6050bd0ca3417471adc20905e9d4d7467ce38e90
jmorton06/Lumos
/Lumos/External/msdf-atlas-gen/msdf-atlas-gen/Workload.cpp
C++
cpp
1,311
permissive
#include "Workload.h" #include <vector> #include <thread> #include <atomic> #include <algorithm> namespace msdf_atlas { Workload::Workload() : chunks(0) { } Workload::Workload(const std::function<bool(int, int)> &workerFunction, int chunks) : workerFunction(workerFunction), chunks(chunks) { } bool Workload::finis...
88eea08e0c4f15da47ba56b385e578669693d7bf
a40fe8c9e0df8f25d5decd9b7d71a28c65e045f3
daffaputra24/TugasFindWords
/FindingWords.cpp
C++
cpp
4,944
no_license
//Anggota Kelompok /* M. Daffa Putra Wibowo - 2017051061 Irvandra Dwidya Agsatra - 2017051055 Rafi Dinata - 2017051043 */ #include <iostream> //untuk input-output #include <string.h> //untuk str function #include <algorithm> //untuk reverse function using namespace std; string RandomMatriks(char _input[]); int main...
4cabe49746eea7ed94537a6daaebf742e0e090a8
6d18c08d2a38f9252bdd371f64b418485831945f
alexandraback/datacollection
/solutions_2652486_0/C++/ypjie/gcjc.cpp
C++
cpp
1,201
no_license
#include <stdio.h> #include <string.h> using namespace std; const int M = 1<<10; const int N = 3 +10; bool flag[M]; int len; int m; int n; int nowtd; int tdnum; int a[N]; int b[N]; int ans[N]; void ri() { int i; memset(flag, false, sizeof(flag)); for (i = 0; i < len; i++) scanf("%d", &b[...
a70143263878524e3a046b07b4bcdba210609d4b
fbc45cf9b9f34e8dc16b338db1c1833bf608178b
blockspacer/ValveLeak_SDK
/dlls/genericmonster.cpp
C++
cpp
6,006
no_license
/*** * * Copyright (c) 1999, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. * All Rights Reserved. * * This source code contains proprietary and confidential information of * Valve LLC an...
acc960f72f513f40743b0ed9747dde839f1ebaf4
d5747280197e92e4ee3778b17d9106339d5bd5ac
stungeye/Exercism-Praxis
/cpp/difference-of-squares/difference_of_squares.cpp
C++
cpp
559
no_license
#include "difference_of_squares.h" // Three versions. The first solves O(n) loops. // The second over-complicates with <numeric> fun. // The last (this one) is O(1) math. namespace difference_of_squares { int square_of_sum(int n) { const auto square_of_sum = (n * (n + 1)) / 2; return square_of_...
9be4cd9d9f4806d9a3d966bef994b17f2e0488b3
1d21e462e718036abd25b77fdc027620354f483a
LoveBettygirl/code-practice
/leetcode/颜色分类/3.cpp
C++
cpp
574
no_license
#include <iostream> #include <vector> using namespace std; class Solution { public: void sortColors(vector<int> &nums) { int i = 0, j = 0; int size = nums.size(); for (i = 0; i < size; i++) { if (nums[i] == 0) { swap(nums[i], nums[j]); ...
f47dc65dd159ac9f2dbcad058325390da66134cd
ab7935afb2342ec6a04d4c7e4fe75c1265e35be2
jayhover/Tobler
/4 Pack/main.cpp
C++
cpp
7,091
permissive
/// \file Main.cpp /// \brief Main. /// /// \mainpage DEM File Packer /// /// This is the DEM file packer from Ian Parberry, "Tobler's First /// Law of Geography, Self Similarity, and Perlin Noise: A Large Scale Analysis /// of Gradient Distribution in Southern Utah with Application to Procedural /// Terrain Generatio...
02dc69459d4f36c1b2b5f122337b9bda242f618d
4c42426de1a6609fd5ae05ed2a086109962206c3
puzcoin/SyndicateQT
/src/rpcnet.cpp
C++
cpp
15,576
permissive
// Copyright (c) 2009-2012 Bitcoin Developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcserver.h" #include "main.h" #include "alert.h" #include "main.h" #include "net.h" #include "netbase.h" #include "protoc...
9d6e90b46c1c2fa504c5bd354e5922920c916ad6
2e7ff9e1af070d5e78107d951435d201999cc17a
kaifsm/serenity
/Userland/Services/SQLServer/ClientConnection.cpp
C++
cpp
2,925
permissive
/* * Copyright (c) 2021, Jan de Visser <jan@de-visser.net> * * SPDX-License-Identifier: BSD-2-Clause */ #include <AK/String.h> #include <AK/Vector.h> #include <LibSQL/Result.h> #include <SQLServer/ClientConnection.h> #include <SQLServer/DatabaseConnection.h> #include <SQLServer/SQLStatement.h> namespace SQLServer...
b13b039e8c8f85ba012dfe77ce6b616f126e29b8
beeb60ad093c7f65cbc60c3a4aaabdc7f9af328e
kpyrkosz/tejk_it_izi
/server/net_core/ut/fake_client_acceptor.cpp
C++
cpp
495
no_license
#include <fake_client_acceptor.hpp> fake_client_acceptor::fake_client_acceptor() : last_socket_id_(0) { } void fake_client_acceptor::async_accept(accept_completion_handler& handler) { handler_ = &handler; } void fake_client_acceptor::simlulate_socket_spawn(unsigned count) { if (!handler_) throw std::logic_...
e95159953cae637b84416dbe124736c2a56e8b89
619243c75f5df62aea86c010cb9cb075a3889939
lanbb/incubator-trafodion
/core/sql/exp/ExpSequenceFunction.cpp
C++
cpp
12,264
permissive
/********************************************************************** // @@@ START COPYRIGHT @@@ // // 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. ...
10226dd7ab3433ac8256166c4dd1ae0c2b1589df
edcf7d20fba2e8b6ec4b8de8039abddeb9a8aa5f
mfem/mfem
/fem/integ/nonlininteg_vecconvection_mf.cpp
C++
cpp
1,718
permissive
// Copyright (c) 2010-2023, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // // This file is part of the MFEM library. For more information and source code // availability visit ht...
4542f8c1acb9de3be225c42f317979972f8d78fe
b81e0431fd8fa9e107dce2b6dcc95f20b4b17ecc
DJ-JR30/code-editor
/plugins/cordova-plugin-x-toast/src/blackberry10/native/public/json_value.cpp
C++
cpp
40,938
permissive
#include <iostream> #include <json/value.h> #include <json/writer.h> #include <utility> #include <stdexcept> #include <cstring> #include <cassert> #ifdef JSON_USE_CPPTL # include <cpptl/conststring.h> #endif #include <cstddef> // size_t #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR # include "json_batchallo...
4dc99927bfeab92c26959498f5bd3909c19414af
01d33f761653bf22c313ac6c7284c7f582185d40
sndnyang/programCode
/xmu/1213 卡片.cpp
C++
cpp
585
no_license
#include<stdio.h> #include<string.h> typedef struct { char name[30]; }team; int main() { char t[30]; team a[10000]; int n,i,j,top; scanf("%d",&n); top=1; for(i=0;i<n;i++) { scanf("%s",t); if(i==0) strcpy(a[0].name,t); else ...
65a0c68cf432df2ec47012d7b5b4b565ca24576c
fd214e886bc65b47008557270f5d68fccf98fe68
ilelann/adobe_source_libraries
/adobe/task.hpp
C++
hpp
13,441
permissive
/* Copyright 2013 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://stlab.adobe.com/licenses.html) */ /**************************************************************************************************/ #ifndef ADOBE_TASK_HPP #define ...
b6b968cac784b62539c6983a48c757de1f79896f
ffd6a21fc9e7026c477a7c6eb8c9070361585a1b
TomasPirir/controlsystems2019
/Projects/Protoproject/main/vector.hpp
C++
hpp
5,124
no_license
/* Inertial Measurement Unit Maths Library Copyright (C) 2013-2014 Samuel Cowen www.camelsoftware.com Bug fixes and cleanups by Gé Vissers (gvissers@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
455b7a4b05602ff39f525fd055e04fa4f9b0a7e8
b44937255bb0c0b1405d82e55180c9e3e537b705
hd2705576/DelgadoHector_CIS5_42375
/Hmwk/Assignment_5/Gaddis_8ed_Ch6_Prob7_Celcius/main.cpp
C++
cpp
1,202
no_license
/* * File: main.cpp * Author: Hector Delgado * Date: May 6, 2018 10:03am * Purpose: Assignment 5 Problem 7 Celsius to Fahrenheit * Celsius Temperature Table * The formula for converting a Temperature from Fahrenheit to Celsius is C = (5 * (F - 32))/9 * where F is the Fahrenheit temperature and C is the Cel...
2c93711486492447deb8d3152feeb65d0e46dfd6
3d72d9439454c6540dfa60226ec456a8eb38d1e3
sarellanos/NOVACProgram
/Configuration/SystemConfigurationPage.cpp
C++
cpp
1,302
no_license
#include "StdAfx.h" #include "SystemConfigurationPage.h" using namespace ConfigurationDialog; IMPLEMENT_DYNAMIC(CSystemConfigurationPage, CPropertyPage) CSystemConfigurationPage::CSystemConfigurationPage(void) { CPropertyPage(); m_configuration = NULL; m_curScanner = NULL; m_curSpec = NULL; m_scann...
f4aa33e0ccf6b2a078db0cf0f636c4023b37a374
1f4cb2fc86b244bf9640298e73c0bf6bdd061f1a
Razdeep/Standard-algorithms
/QuickSort.cpp
C++
cpp
725
no_license
// Implementation of Quick Sort Algorithm #include<bits/stdc++.h> using namespace std; void swap(int arr[],int i,int j) { int temp=arr[i]; arr[i]=arr[j]; arr[j]=temp; } int partition(int arr[],int beg,int end) { int pivot=arr[beg]; int i=beg+1; for(int j=beg+1;j<=end;j++) { if(arr[j]<=pivot) { ...
ad8e7513e613f2deaa52f73828c5b73c1ab26047
37b273ba67c3693d08008aac83b1e301721179b2
Core-Game-Project-2016/nebula-trifid
/code/render/renderutil/freecamerautil.cc
C++
cc
2,561
permissive
//------------------------------------------------------------------------------ // freecamerautil.cc // (C) 2012-2016 Individual contributors, see AUTHORS file //------------------------------------------------------------------------------ #include "stdneb.h" #include "renderutil/freecamerautil.h" namespace Render...
d8c9cf0362a942e489de5738f933f5080671b481
e1496e96d58879c0fab7dcc2eba628b9ade5bbe5
shrabana99/CSES-Problem-Set
/String Algorithms/Longest Palindrome.cpp
C++
cpp
1,044
no_license
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); string s; cin >> s; int n = s.size(); vector<int> d1(n, 0), d2(n, 0); int len = 0, pos = -1; for(int i = 0, l = 0, r = -1; i < n; i++){ int k = (i > r ? 0 : min(r-i+1,...
6ca798616896948515ecc31997512f9f41251c19
f52ab0e54d4df6005a7a2ff775ca9467b6c7d0b1
BenjaminTrapani/GPULockFreeDataStructuresPublic
/GPULockFreeDataStructures/DoubleListBasedStack.hpp
C++
hpp
672
permissive
#pragma once #include "LockFreeDoublyLinkedList.hpp" namespace NUCARLockFreeDS { template<typename T, LockFreeDoublyLinkedListConfig::DoublyLinkedListIndex_t numThreads, LockFreeDoublyLinkedListConfig::DoublyLinkedListIndex_t scanThreshold = LockFreeDoublyLinkedListConfig::GetDefaultScanThreshold<LockFreeDoubl...
b4fad574e0ccb4b0f124bec621639b700df58f48
40ea8ae15dffc61e9cbd66c79eb65883f76f1e5d
l24cui/Group-Project-CC3K-Game
/shade.cc
C++
cc
271
no_license
#include "shade.h" #include <string> using namespace std; Shade::Shade(int x, int y, int bc, Floor *fl): Player(25, 25, 125,"shade", x, y, bc, fl, 0, 1, '.', 125) {} Shade::~Shade() {} void Shade::reset_Atk() { Atk = 25; } void Shade::reset_Def() { Def = 25; }
3135da4929b9472b35217440831d013571c96275
ea605a673ab9704279a583a84258edd2756142b1
madhav-bits/Coding_Practice
/leetMinGardenPerimEnoughApples.cpp
C++
cpp
2,638
no_license
/* * //***********************************************1954. Minimum Garden Perimeter to Collect Enough Apples.********************************************** https://leetcode.com/problems/minimum-garden-perimeter-to-collect-enough-apples/ *******************************************************************TEST CASES...
34efbce24c91161c9fd2a58c8014b2a68bcb46cb
9a918e34f3224643f3257f8f400729d445d0aa6b
GourishVashisht/Codechef-Submissions
/second largest.cpp
C++
cpp
539
no_license
#include<iostream> using namespace std; int main() { int t=0,a=0,b=0,c=0,max=0,min=0; cin>>t; for(int i=1;i<=t;i++) { cin>>a>>b>>c; max=(a>b?(a>c?a:c):(b>c?b:c)); min=(a<b?(a<c?a:c):(b<c?b:c)); if(a<max && a>min) { cout<<a<<endl; ...
e21b9fd0b8f40ef18e1050b3c45e35a755392ab2
859a336cb3c015d832ea545d5b3b07d24e8bae10
egorpushkin/hielog
/include/hielog/providers/detail/thread_storage.hpp
C++
hpp
3,471
no_license
// // thread_storage.hpp // ~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2009 Egor Pushkin (egor.pushkin at scientific-soft dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef HIELOG_THREAD_S...
d962d7fa1b7849f05ee0d3ad0a0cc16d28203619
3715e37dcaf9a58ae9778437bd149d67c27ad20c
irigopou/QuantLib
/ql/time/frequency.cpp
C++
cpp
3,126
permissive
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2004, 2005, 2006 Ferdinando Ametrano Copyright (C) 2006 Katiuscia Manzoni Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl Copyright (C) 2003, 2004, 2005, 2006, 2008 StatPro Italia srl This file is part of QuantLib, ...
0aef024d2a0265780de1a1c771acf05cc617c53e
c148d4555fc65edc532adb453a2bdc1c82c6efaf
Mesywang/EPSILON_Noted
/EPSILON/util/ssc_planner/src/ssc_planner/ssc_server_ros.cc
C++
cc
11,891
permissive
/** * @file ssc_server.cc * @author HKUST Aerial Robotics Group * @brief implementation for ssc planner server * @version 0.1 * @date 2019-02 * @copyright Copyright (c) 2019 */ #include "ssc_planner/ssc_server_ros.h" namespace planning { SscPlannerServer::SscPlannerServer(ros::NodeHandle nh, int ego_id) : nh_...
e7da765e5ae4af080a8008c8f1303390b8232a57
28feebcf7f10fca34eebefed7b9aaed165350542
kooner/CPEN442
/Assignment2/q3crcbrute.cpp
C++
cpp
1,196
no_license
// Brute force for question 3 #include <iostream> #include <unordered_map> #include "crc.h" std::string createRandomString(int size) { static const char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; std::string str; for (int i = 0; i < size; i++) { int key ...
8d1123c152d78261153920c5583f6c87f4548be2
00bf53c799f7b2bd92fd6f322f1748c6d76450c8
amoseui/chromium
/services/network/network_service_network_delegate.cc
C++
cc
5,900
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 "services/network/network_service_network_delegate.h" #include "services/network/cookie_manager.h" #include "services/network/network_context.h"...
3717ceb14594444f75ed7e7a3491f2f86231dd81
e47f4664c8e1b1c0b63a52f0b7448d4d096f74d7
aqing1987/s-lang-cpp
/beginning-c++-through-game-programming-4th/chapter2/die_roller.cpp
C++
cpp
482
no_license
// Die Roller // Demonstrates generating random numbers #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main(int argc, char *argv[]) { // seed random number generator srand(static_cast<unsigned int>(time(0))); int randomNumber = rand(); // generate random number cout << "max ...
09b8c8346c6a6d2780dd744fc8edd18ece81ae11
d9c6645f5ce63cbcb572ee31a02849cdca8ce88c
lochbrunner/eval-gmock
/src/foo.cpp
C++
cpp
236
no_license
#include "foo.hpp" #include <iostream> void foo(int reps, Actor* actor, Sensor* sensor) { for (int i = 0; i < reps; ++i) { int value = sensor->goo(); std::cerr << "value: " << value << std::endl; actor->doo(value); } }
1216222f59bedc355b15a1358589250934a10a18
396f2c939cb975c7c3f8876db4666de86d06bb99
EunSeokJeon/algorithm
/dp/2133.cpp
C++
cpp
342
no_license
#include <stdio.h> int d[1001]; int dp(int x){ if(x==0) return 1; if(x==1) return 0; if(x==2) return 3; if(d[x]!=0) return d[x]; int result = 3 * dp(x-2); for(int i = 3; i<=x;i++){ if(i%2 == 0){ result += 2 * d(x-i); } } return d[x]=result; } int main(void){ int x; scanf("%d", &x); printf("%d", d...
567366c561ed49e4ebba5ce03203a9e970306fa4
28b16a5d4bb0640ee3b8f12f0a636226b4228a25
fcccode/Ginger
/Ofp/Plug.cpp
C++
cpp
10,434
no_license
#include "stdafx.h" #include "trace.h" #include "Plug.h" #include "Subcls.h" #include "LayerWindow.h" #include "detouring.h" // class variables _ATL_FUNC_INFO CPlug::FuncInfo_DocumentOpen = { CC_STDCALL, VT_EMPTY, 1, { VT_BYREF|VT_USERDEFINED } }; _ATL_FUNC_INFO CPlug::FuncInfo_NewDocument = { CC_STDCALL, VT_...
398558506e85af6d46a13f84a64e203a32984970
f2a5c4eb3976ce2b7b6a18a2d4ce9da76debcb97
yashrsharma44/Competitive-Programming
/cf/1473/q2.cpp
C++
cpp
1,253
no_license
#include <bits/stdc++.h> #define int long long using namespace std; #define MAX 1000005 bool check(int i, string &s, string &t){ string com = s.substr(0, i); int k = 0; for(int j=0;j<s.length();j++){ if(s[j] != com[k % (int)com.length()]){ return false; } k++; } if(k % (int)(com.length()) != 0){ retu...
f50ef1897e1b50e293b48bf00bb3c22d66089fab
476c15193961ec3cb7d9af54603a9e1db7d9314c
jack16888/bundlefusion_ubuntu1604
/mLibExternal/include/OpenMesh/Core/IO/exporter/ExporterT.hh
C++
hh
10,373
no_license
/* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen University * ...
3750b710734cffe46485e18ad4d9387be56d65d9
e149ece9b65b6b963bbd9f8ac84f57bcc774082d
dokipen3d/cpplox
/Statement.hpp
C++
hpp
2,722
no_license
#pragma once #include "Expr.hpp" #include "TokenTypes.h" #include "Utilities.hpp" namespace cpplox { struct VoidType {}; // recursive block struct BlockStatement; struct IfStatement; struct WhileStatement; struct ExpressionStatement { explicit ExpressionStatement(Expr expression) : expression(expression)...
d2398338a350dd092a1b932bb884f37d8194a8ef
54f115df7924d6cbb10339502cc1b451afbbe650
dipta007/Competitive-Programming
/OTHERS/progkriya 2015/A.cpp
C++
cpp
3,723
permissive
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #includ...
0663821e8b92b4b13e15a5975388ea1e6c74c469
d5578955f905dec20efdb0c12fa9b5174005d9bc
fishy15/competitive_programming
/online/cses/graph/teleporters.cpp
C++
cpp
1,324
no_license
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #define ll long long #define eps 1e-8 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3f // ...
bedb00968c1db887d3d97b3c36e800346d84a765
7cfa2b3a07a7db40410a52bddf47935a198655e3
Gansito144/competitive-programming
/online-contests/short-contest/978/G.cpp
C++
cpp
1,030
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; using i64 = long long int; vector <int> day, s, d, c, p; bool cmp (const int &a, const int &b) { return d[a] < d[b]; } int main () { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; day.assign(n, 0...
1d8c1bfa846a7dde8a0b009eb48928c6851bc55d
d96dbe581629cc6cb97384b6d4aa291ffdc6c6b0
cooler-SAI/ServerMythCore
/src/server/shared/Cryptography/SHA1.cpp
C++
cpp
1,269
no_license
/* * Copyright (C) 2008 - 2011 Trinity <http://www.trinitycore.org/> * * Copyright (C) 2010 - 2013 Myth Project <http://mythprojectnetwork.blogspot.com/> * * Copyright (C) 2012 SymphonyArt <http://symphonyart.com/> * * Myth Project's source is based on the Trinity Project source, you can find the * link to that...
eeb3926cc6e8bc7a3df3cdb93bddec3171aa4d28
2265807d064cc1641a32d360872f1a8695743cde
perry2008084/TestCPP
/vector/rbegin/rbegin.cpp
C++
cpp
684
no_license
/************************************************************************* > File Name: rbegin.cpp > Author: Pansj > Mail: perry2008084@gmail.com > Created Time: Fri 04 Apr 2014 10:23:15 PM CST ************************************************************************/ #include<iostream> #include<vector> using na...
fc8cf0c9982c9c783b64facd53d1394db14812bd
d91e15acb45f1b538df6743592ee3204f035d90d
kongqx/shaka-packager
/packager/hls/base/media_playlist.cc
C++
cc
15,610
permissive
// Copyright 2016 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #include "packager/hls/base/media_playlist.h" #include <algorithm> #include <cmath> #include <mem...
1a604c3b6bb0a6e8294b07c3ee0c766cdf1e34be
ceb478cdf90cc55a895a0b0627890e538c9814e0
Daydreamer008/Codeforces
/1557A. Ezzat and Two Subsequences.cpp
C++
cpp
1,294
no_license
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define cendl cout<<endl #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector < vi > #define pii pair<int,int> #define pll pair<long long, long long> #define mod 1000000007 #define inf 10000000...
1ca6d33547d4e3b2018292cb8c391c2a207a4d15
50b6d88874f82d26bf6dbccb2e49b0078f1fcb6b
qianli1/leetcode
/_733_FloodFill/_733_FloodFill.cpp
C++
cpp
3,174
no_license
#include <vector> using namespace std; /** * 本代码来自 CSON 官方视频课程,由 @CSON 提供 * 题目来源: http://leetcode.com * CSON 致力于在 CS 领域内帮助中国人找到工作,让更多海内外国人受益 * 讲师: Edward Shi * 官方网站: https://cspiration.com * 版权归 CSON 所有, 禁止 转载! */ class _733_FloodFill { /** * 733. Flood Fill * An image is represented by a 2-D array of in...
4d3a26891ecd954b0608195ce561c38786ccf487
4438d57365112927ce08a1228bbe7b684314d644
RICHARDOIII/C-datatype
/Linkedlists.cpp
C++
cpp
1,986
no_license
#include <iostream> using std::cin; using std::cout; using std::endl; class Link { public: int data; Link* next; }; std::ostream& operator << (std::ostream &out, Link* data ) { out<< "[ "; while ( data->next != 0) { out << data->data<< " "; data=data->next; } out << data->data<<" ]"; return out; } cla...
6af97f560aca992dbc9868c21dc5fb8d4b1d78c4
7faa95fb5d2d548484eb89630e997c1942859102
DataDog/envoy
/test/common/tcp_proxy/tcp_proxy_test.cc
C++
cc
61,814
permissive
#include <chrono> #include <cstdint> #include <memory> #include <string> #include <utility> #include <vector> #include "envoy/config/accesslog/v3/accesslog.pb.h" #include "envoy/extensions/access_loggers/file/v3/file.pb.h" #include "envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.pb.h" #include "envoy/extensio...
0e658d8bdaa22c5bc1de37fb351b2633d57b503e
fc939f8070a89ca287d2630c864fc89e8ab49627
rodalladea/tcc2
/collector-project/opencv-2.4.9/modules/core/test/test_math.cpp
C++
cpp
83,924
permissive
////////////////////////////////////////////////////////////////////////////////////////// /////////////////// tests for matrix operations and math functions /////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// #include "test_precomp.hpp" #include <flo...
0944c24b610f31bb799308d7e4edadfe58c003bf
4232fc13bd60e56555fdb72a7a37df8c6fa4bc87
jonathan2222/Project-L
/Project L/GLAbstractions/VertexBuffer.cpp
C++
cpp
887
no_license
#include "VertexBuffer.h" #include "GL\glew.h" VertexBuffer::VertexBuffer() : hasData(false) { } VertexBuffer::VertexBuffer(const void * data, unsigned int size, GLenum usage) { make(data, size, usage); } VertexBuffer::~VertexBuffer() { if(this->hasData) glDeleteBuffers(1, &this->id); } void VertexBuffer::make...
04673cf62dafcdd9f97e09b633687ac93c823bea
7dcff656942e0bffee8fa68d7863050deb24cffd
lifeshave/Browser
/Browser/CaptionRightPanel.cpp
C++
cpp
2,780
no_license
#include "StdAfx.h" #include "CaptionRightPanel.h" #include "resource.h" #include "MainFrame.h" #define IDC_MIN_BTN 10001 #define IDC_MAX_BTN 10002 #define IDC_CLOSE_BTN 10003 CCaptionRightPanel::CCaptionRightPanel(void) { m_imgMinBtn.m_hWnd = NULL; m_imgMaxBtn.m_hWnd = NULL; m_imgCloseBtn.m_hWnd = NULL; } CCapti...
f99df2cc8fb33af439d9967644df24a72e8020a1
33f35771dbbe33a828719f6b997b7e50d7931a9c
Codehalli/ComplexTodoList
/abstract_list.hpp
C++
hpp
957
no_license
/* * Purpose for program * This programming project generates to do list * * Programmer: Pranav Rao * Date: Jan 30 2020 * * Honor Code: I have neither given nor received any unauthorized assistance with this program. */ //Provided data structure code #ifndef _ABSTRACT_LIST_H_ //defines #define _ABSTRACT_L...
1868008dff9f1c6009d8ee6d9b5a4fcbf2d7a55a
0065782c9488e291e9272d4b83dbe8be8b6c647b
RedShyGuy/Vapecord-ACNL-Plugin
/Includes/Helpers/Save.hpp
C++
hpp
1,432
permissive
#ifndef SAVE_HPP #define SAVE_HPP #include <CTRPluginFramework.hpp> #include <type_traits> #define SAVE_GARDENPLUS 0x89B00 //0x95CF94 #define SAVE_MAIL 0x1C208 //0x983050 #define SAVE_EXHIBITION 0x17BE10 //0x9B4AC0 #define SAVE_FRIEND 0x29608 //0x983038 #define SAVE_AMIIBO 0x128 //0x95CF88 #define...
93f3ad10d3b4d0aa2faebb83c2906ae316fd7353
5a28f91807e8bbafce6ffdc2d7d2645b60b3e3d3
ylevygithub/CPP-Pool
/cpp_d16_2019/ex00/Parser.hpp
C++
hpp
537
no_license
// // EPITECH PROJECT, 2020 // c++pool // File description: // Parser.hpp // #ifndef _Parser_H_ #define _Parser_H_ #include <iostream> #include <string> #include <vector> #include <stack> /* std::vector<int> v; v.push_back(42); std::cout << v[0] << std::endl; */ class Parser { std::stack<char> _oper...
aab9c073ba3bc3b79220b48e79b33af637cd2616
37cdff4c161dc24373f8e2f35831993e5b9371ac
libreliu/cmake-u3d
/Source/Tests/UnitTesting/Modifiers/SampleCLODModR/SampleCLODModR.cpp
C++
cpp
14,276
no_license
//*************************************************************************** // // Copyright (c) 2001 - 2006 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ...
1a3a5cb14a397b5fe712626632e98a57948b3c8e
2d8b6b275e4fb934b7404e2b6dc2cf45a34a14ff
guidoajansen/NaturalLI
/pub/Pseudocode.cc
C++
cc
3,656
permissive
// TODO(gabor) data structures: // -- query // -- response // -- "path" of edits // Populate Tables createTable("words"); for ( (word, key) : readWordsFromPostgres()) { write("words", key, word); } createTable("edges"); for ( line : readEdgeFile().getLines().map( _.split("\t") ) ) { write("edges", line.hea...
182f737b928340b406254d51529239c9c36d5a7c
4ec6640959e7d47d266cce69dd0fdbbcc9efff89
Makogan/OpenGL-Template
/source/Rendering/Camera/Camera.cpp
C++
cpp
3,559
no_license
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /* * Author: Camilo Talero * * * Version: 0.0.1 * * Implementation of the camera header. Defines the behaviour for a generic camera. */ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //+...
454fc3ad61297e63705884ffbd621610328dcf23
8e7632d5dfa54efb8b068829c12f5d257cfb04da
nezumimusume/GamePG_2_2018
/Sample/Chapter_03/Game/Src/Player/Animation/PlayerAnimator.cpp
C++
cpp
4,645
no_license
/*! * @brief プレイヤーのアニメータ。 */ #include "stdafx.h" #include "Player/Player.h" #include "Player/PlayerRenderer.h" #include "Player/Animation/PlayerAnimator.h" #include "tkEngine/graphics/effect/tkEffect.h" bool CPlayerJumpAnimCtr::Start() { m_animator.PlayAnimation(CPlayerAnimator::enAnimationClip_Jump, 0.2f); //@to...
2979294bf07dc6ed8ff5127615afcca579754d6e
ce9f27f270bb6c8897bc69c751cc0d53243732d8
Mrhuangyi/ZCMU-template
/串/字符串匹配 KMP.cpp
C++
cpp
846
no_license
//字符串匹配 KMP //时间复杂度:O(n+m) /*定理 字符串最小循环节长度 : cir = len - next[len] ; */ int next[MAXN]; void getnext(const char *s) { int i = 0, j = -1,len=strlen(s); next[0] = -1; while(i != len) { if(j == -1 || s[i] == s[j]) next[++i] = ++j; else j = next[j]; ...
c1c860dfcb1092a64c6ec21f0d2fa1b5464fc11c
371c87b442bccf5e3e4edc2185b00f3cbe1935b1
Kingwl/kineto
/libkineto/src/CuptiActivityInterface.cpp
C++
cpp
8,743
permissive
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include "CuptiActivityInterface.h" #include <chrono> #include "cupti_call.h" #include "Logger.h" us...
f490f3442036e349056a3fd1de4dce4d68be0941
e2235930f9255549781a35ecf0560c4b821a5a11
Heasummn/flax
/source/Codegen/TypeHandling/Autocasting.cpp
C++
cpp
12,615
permissive
// Autocasting.cpp // Copyright (c) 2014 - 2016, zhiayang@gmail.com // Licensed under the Apache License Version 2.0. #include <cmath> #include "ast.h" #include "codegen.h" namespace Codegen { std::pair<fir::Value*, fir::Value*> CodegenInstance::attemptTypeAutoCasting(fir::Value* lhs, fir::Value* lhsptr, fir::Value...
6a9c2cc5856952828abab715a2980671cc472a16
4b90b8b7874fc61ce982f252fb52442d79910648
BibekSaha/cpp
/oop/counter.cpp
C++
cpp
575
no_license
#include <iostream> using namespace std; class Counter { private: int count; public: // This is the constructors in C++ Counter(): count(0) {} // This is the destructor in C++ ~Counter() {} void incCount() { count++; } int getCount() { return count; } }; int main(void) ...
ebd2d17cf37f80480830279c97d3dea9409cd131
740596d087bf329fc2e51d0ecc5a6f25deac9745
Rahul-Kumar-Tiwari/Cpp-programs
/copy_const_string.cpp
C++
cpp
996
no_license
#include<iostream> #include<cstring> using namespace std; class String { private: char *s; int size; public: String(const char *str = NULL); // constructor ~String() { delete [] s; }// destructor String(const String&); // copy constructor void print() { cout << s << endl; } // Function to pri...
3f2dbd11f0e52d2859104a78780b6ff261e4f984
11add128a080f4413737d59d62920ddbc7993e8b
shaihitdin/CP
/Olymp/APIO/2014/B.cpp
C++
cpp
1,075
no_license
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 100, K = 210; typedef long long ll; ll d[K][N]; int p[K][N]; const ll oo = 1e15; int n, k, a[N], sum[N]; int main () { freopen ("sequence.in", "r", stdin); freopen ("sequence.out", "w", stdout); ios_base :: sync_with_stdio (0); cin.tie (0); ...
1ed45c1bef09d5b75b77f74140c63df05ebff68c
9b7058d1f46e822d439dd4382b5c9da3acef222f
NickLavr/2-3tree
/2-3tree.cpp
C++
cpp
10,307
no_license
#include <algorithm> #include <iostream> #include <string> #include <utility> using std::string; using std::swap; template<class ValueType> class Set { public: static const int ChildrenAmount = 4; struct Node { Node* sons[ChildrenAmount]; Node* parent; ValueType MaxValue; size...
09b9e8c406f03aaee0af8c0e1c518a4bcfc2339f
e970f1c71014b23d8531fe00a7ce19084d28a0ad
Kman1131/UnrealSandboxTerrain
/Source/UnrealSandboxTerrain/Private/VoxelDataInfo.hpp
C++
hpp
3,069
permissive
// // VoxelDataInfo.h // UE4VoxelTerrain // // Created by Admin on 20.04.2020. // #pragma once #include "VoxelData.h" #include <atomic> enum TVoxelDataState : uint32 { UNDEFINED = 0, GENERATED = 1, LOADED = 2, READY_TO_LOAD = 3 }; class TVoxelDataInfo { private: volatile double LastChange; ...
01b6fa1b91af4593e7ecec8c9cda69feaead4201
ca1a9774f7e8b1e6481e1f4fab0ccfd9d43e6114
Trietptm-on-Coding-Algorithms/my-leetcode-solutions
/code/25.cpp
C++
cpp
2,551
no_license
#include <iostream> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; // 翻转链表 ListNode* reverse(ListNode* head) { ListNode *p = head, *p1 = head->next, *p2; bool first = true; while (true) { p2 = p1->next; ...
16a760f59f78afa56437b612ac938666f2ac435d
16cdc9b9b51d04c3ff9579a7096b0b34481dca47
ZuxiGIT/homework
/task3/src/ray.hpp
C++
hpp
783
no_license
#pragma once #include "color.hpp" #include "objects.hpp" #include "noncopyable.hpp" #include "functions.inl" struct Ray { static int recursion_depth; sf::Vector3f m_origin = {}; sf::Vector3f m_direction = {}; int m_generation = 0; void reflect(const sf::Vector3f& normal) { m_direc...
2682b87153f770b6d2e74a3a178887ffee1606b7
a38ae9474e9ae34ef0acbcace2b20869359b1829
BarbaraPriwitzerGitHubRT/neuro-stat
/neurocorr/arch/v3/tests/test-intg.cpp
C++
cpp
4,403
no_license
#include "../cpw.hpp" #include "../records.hpp" #include "yocto/utest/run.hpp" #include "yocto/code/rand.hpp" #include "yocto/ios/ocstream.hpp" #include "yocto/sys/wtime.hpp" #include "yocto/string/conv.hpp" YOCTO_UNIT_TEST_IMPL(intg) { wtime chrono; chrono.start(); size_t maxSpikes = 100; if(argc>1) ...
33debda155eb57de858f6672641edc3cf44e55f4
6d369ca7b7d2f17d62a905e92d516669615e3fd2
reetheshnavale/Udacity-Translate-python-to-C--Project3
/tests.cpp
C++
cpp
5,612
no_license
#include <iostream> //#include "tests.h" #include "simulate.cpp" using namespace std; bool test_normalize() { vector < vector <float> > unnormalized, normalized, result; unnormalized = zeros(2, 2); normalized = zeros(2,2); int i,j; for (i=0; i<2; i++) { for(j=0; j<2; j++) { unnormalized[i][j] = 1.0; no...
624bedbd728748bab9890f9973ca1d6f031ac9d5
282ba60ddaf1b9017a96ff6f7a0f8d0a31d2225d
HellenFuentes/Paralela-y-concurrente
/goldbach_omp_mpi/src/distributor.cpp
C++
cpp
3,514
no_license
/* * Copyright 2021 Hellen Fuentes Artavia - Universidad de Costa Rica */ #include "distributor.hpp" #include <omp.h> #include <mpi.h> #define ASKER_TAG 0 ~Distributor() { for (size_t i =0 ; i < nums.size(); i++) { delete nums[i]; } } void Distributor::addNum(int64_t number) { Number *newNumber = new Numbe...
997be85d7606c376f1a42b3645fd07c08bcf4544
b212f4bd9f5bed0ff2c576e4eb187d1be2195aad
yangj96/leetcode-solution
/10.regular-expression-matching.cpp
C++
cpp
2,156
no_license
/* * @lc app=leetcode id=10 lang=cpp * * [10] Regular Expression Matching * * https://leetcode.com/problems/regular-expression-matching/description/ * * algorithms * Hard (25.70%) * Likes: 3166 * Dislikes: 592 * Total Accepted: 350K * Total Submissions: 1.4M * Testcase Example: '"aa"\n"...
34670338469b75f2862b5a03b44dfc602e85a019
439d62faa10c21eb5f57356cfaab905a6536b394
flowerfx/cc_iw_game
/trunk/iWinOnline-cocos2dx/iwin/Classes/Network/JsonObject/Friend/ResponseFriendFromLocation.cpp
C++
cpp
1,715
no_license
#include "ResponseFriendFromLocation.h" #include "json/writer.h" namespace iwinmesage { ResponseFriendFromLocation:: ResponseFriendFromLocation () { } ResponseFriendFromLocation::~ResponseFriendFromLocation() { } rapidjson::Document ResponseFriendFromLocation::toJson() { rapidjson::Document document; ...
5ae83323a2c8544aa1136de201add8f2beccb87c
9ee9b05888021223b7bd47828eb13519a79616ce
boschglobal/iceoryx
/iceoryx_posh/test/moduletests/test_roudi_cmd_line_parser.cpp
C++
cpp
14,133
permissive
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. // Copyright (c) 2021 by Robert Bosch GmbH. 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:...
63b6c166bc0cdb25d0436a02ed9854e615006a50
84324fc1be565ce1b896d1d38adad0c27bc2b476
zubairabid/DS
/Lab/10/427C.cpp
C++
cpp
1,976
no_license
#include <iostream> #include <bits/stdc++.h> using namespace std; const long long int maxN = 122345; const long long int modder = 1000000007; vector<long long int> adj[maxN]; vector<long long int> trans[maxN]; bool visited[maxN]; bool visited2[maxN]; long long int cost[maxN]; stack <long long int> stk; vector <long...
c3fc69022622631378632fc423653b02cec8015b
bd36b9df8501849ce74f85460cd3adf8395c6dc7
kondrak/quake_bsp_vulkan
/src/Application.cpp
C++
cpp
9,223
permissive
#include <SDL.h> #include "Application.hpp" #include "StringHelpers.hpp" #include "ThreadProcessor.hpp" #ifdef __APPLE__ #include "apple/AppleUtils.hpp" #endif #include "renderer/CameraDirector.hpp" #include "renderer/RenderContext.hpp" #include "q3bsp/Q3BspLoader.hpp" #include "q3bsp/Q3BspStatsUI.hpp" extern RenderCo...
434630cf264beac3d3f53ae459aa8568000322de
6df9a9be69dbd5cda47b42399ff0140b59efcb61
snsv-dy/voxelgame
/src/server/netQueue.hpp
C++
hpp
855
no_license
#ifndef netQueue_hpp #define netQueue_hpp #include <queue> #include <mutex> #include <condition_variable> template<typename T> class TsQueue { std::queue<T> q; std::mutex queueMutex; std::condition_variable waitOn; std::mutex waitMutex; public: void push(T elem) { std::unique_lock lock(queueMutex); q.push(...
accd3fb4db8d90817e84639e75fbf788c7413713
09ec61dd403695539f220d536bbb75e7f35e1d6c
Lucas-Emanuel-360/C-Questoes-2020-2021-treino
/Projetos - Lista de Questões/Questao_14.cpp
C++
cpp
588
no_license
#include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> using namespace std; int main() { float a , b , c; cout <<"Indique seu primeiro numero: "; cin >> a; cout <<"Indique seu segundo numero: "; cin >> b; cout <<"Digite 1 para somar,digite 2 para subtrair,digite 3 para mult...
c0085b630bc5dc621df266302bcdbd48268add09
7f26b0849d2fa53c41ebbbb689870b82cfeb4533
rowidanagah/Hands-On-Practice
/New_Delete (pointer).cpp
C++
cpp
358
no_license
#include<iostream> using namespace std; int main(){ int *x; x = new int ; *x = 90; // There is a special syntax to access the value of a variable using its address instead of its name cout<<*x<<endl; cout<<x<<endl<<&x<<endl<<"----------------Delet------------"<<endl; delete x; x = new int ; *x = 100; ...
ae590930ce875e2dd28814dd8c21ec62769f6834
1682d4fe0881fa843b446b2c417bdc55bccaec4b
cocoj521/libmwmysql
/mwmysql/src/SQLResult.cpp
C++
cpp
5,971
no_license
#include "SQLException.h" #include "SQLResult.h" #include "SQLValue.h" #include "SQLField.h" MYSQL_SQLRESULT_NSAMESPACE::CSQLResult::CSQLResult(MYSQL_SQLTYPES_NSAMESPACE::ConnectionPtr hConnect) : MYSQL_SQLBASE_NSAMESPACE::CSQLBase(hConnect), m_hRes(NULL), m_nAffectedRowCnt(0), m_hFields(NULL) { } ...
01cef09dd8b9d3bcb197680b10edbd081ac719b5
fabdd203795b97b0132b60689fdb3ee9793ceed3
HenrickyL/Monitoria_2020-1
/ED-03A/Monitoria11 - Exercicios Moodle/Ponteiros/L1Q7.cpp
C++
cpp
1,373
no_license
#include<iostream> #include<stdio.h> using namespace std; //vou adicionar no vetor passado o caracter C, char* adiciona(char* s,int *n, int pos, char c){ // fiz com retorno void e deu problema if(pos >= *n){ cout <<"*\n"; //termos que realocar //criar um novo ponteiro char* ...
e7fd2768f1b1704b8601e8498f99bdcc2832f809
2d4badf4491a70dec865ed529c0449daa091072e
greearb/vocal-ct
/sip/sipstack/SipStatusLine.hxx
C++
hxx
5,709
permissive
#ifndef SipStatusLine_HXX #define SipStatusLine_HXX /* ==================================================================== * The Vovida Software License, Version 1.0 * * Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * mod...
d555ea055146e7105e6e1320f8ce79ce25a355a8
0d00c4dbbd7f5ff241fd77d43684749dd8ed84ba
DeanSturtevant1/realm-core
/src/realm/query.cpp
C++
cpp
57,973
permissive
/************************************************************************* * * Copyright 2016 Realm Inc. * * 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/lice...
a95bdbea1dbdc1fc3867416588ca3bfdb412cb79
c49328fd8bab46a128cc786a168411e897e728ce
DorianHawkmoon/Graphiure
/src/Component.cpp
C++
cpp
654
no_license
/* * File: Component.cpp * Author: dorian * * Created on 13 de diciembre de 2014, 19:41 */ #include "Component.h" namespace GUI { Component::Component() : selected(false), actived(false) { } Component::~Component() { } bool Component::isSelected() const { return selected; }...
5c291553f1856c9585b10e81f511375417980546
b72f84fe4fa1eef8479ed7b57e975a799d342a21
dbadb/pbrt-v3
/src/core/api.cpp
C++
cpp
59,609
permissive
/* pbrt source code is Copyright(c) 1998-2016 Matt Pharr, Greg Humphreys, and Wenzel Jakob. This file is part of pbrt. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redi...
4b423ca5bb18426f5c4ffffe0d3304b508af3853
d5432a6ce4e2fca14c46ab45328b594a505d3027
BrandonDickey303/DickeyBrandonCIS1202ProgrammingAssignment14
/Main.cpp
C++
cpp
1,123
no_license
#include <iostream> #include <string> #include "Vehicle.cpp" #include "Car.cpp" #include "Truck.cpp" using namespace std; int main() { string manufac; int year; int numDoor; int cap; cout << "Vehicle program " << endl; cout << "\nVehicle\n"; cout << "Enter the manufacturer: "; getlin...
06254c0778c1cd53a7a1f4d244c1c479b4202411
fe8fae057d709978349b0267f023bb6aaf1b8317
aliefian/Aliefian-GK-160411100180
/alief/main.cpp
C++
cpp
1,773
no_license
#include <windows.h> #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif void display(){ glClear(GL_COLOR_BUFFER_BIT); glLineWidth(3); glBegin(GL_LINES); glVertex2f (-15.0, 15.0); glVertex2f (-15.0, -15.0); glVertex2f (-15.0, -15.0); glVertex2f (15.0, -15.0); glVertex2f (15.0, -15.0); glVertex2f (...
41ee1a53a503bbcdbdf581354b39da5696122a41
86f0b5888b86caa54dd28a960eff08dcce5a409b
d2macster/leetcode-cpp
/src/M/7/M718_MaximumRepeatedSubarray.cpp
C++
cpp
602
no_license
// // Created by Andrii Cherniak on 4/4/18. // #include <vector> using namespace std; class Solution { public: int findLength(vector<int>& A, vector<int>& B) { int La = A.size(); int Lb = B.size(); vector<vector<int >> dp = vector<vector<int >>(La+1, vector<int >(Lb+1, 0)); int ma...
b72ff8e86d5d9036dd11f5ebb570b528e5786a26
8277804d27c0eceff30192f23e60a140730b407b
mikeash/llvm-project
/clang/lib/CodeGen/CoverageMappingGen.cpp
C++
cpp
58,066
permissive
//===--- CoverageMappingGen.cpp - Coverage mapping generation ---*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
b5572fdfbf6525fb75c278b26032af9e135a06b3
a5721ad074a00d0a4bf6448f3a58ff9ce0640aa5
dayat81/spcrf
/diameter/main.cpp
C++
cpp
2,142
no_license
/* A simple server in the internet domain using TCP The port number is passed as an argument */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include "entry.h" void error(const char *msg) { perror(msg); ex...
73eff473b2f6961ece5db158c877959827c90f21
cfd7428482b55d7ccf241d54aac750e2ee92b5fc
dimentox/hifi
/interface/src/ui/RunningScriptsWidget.cpp
C++
cpp
7,198
permissive
// // RunningScriptsWidget.cpp // interface/src/ui // // Created by Mohammed Nafees on 03/28/2014. // Updated by Ryan Huffman on 05/13/2014. // Copyright 2014 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENS...
67246744e54c9ab9850e1e04bd9d5521ed5ff444
a92de9e6b4464fd3ef1cf5b2d2d93367d3c2b79b
rima1-m/cnn_accelerator
/software_test/convolver.cpp
C++
cpp
7,148
no_license
#include "convolver.h" #include <sstream> #include <iostream> #include <fstream> #include <iomanip> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include "time.h" void convolveImage( const struct image& image, const struct kernel& kernel) { struct node activatedNode; activatedNode.mGrid = new std::v...
e92bda63cf6c44d161ca91f6b3c143870c8979fe
b46a981c025cc546140c20c9ebcae0747c7990d9
miscetti/Offline
/Mu2eG4/src/ConstructEnvTube_tool.cc
C++
cc
4,445
permissive
// // Free function to create a geant4 test environment geometry // // // Original author KLG // // Notes: // // one can nest volume inside other volumes if needed // see other construct... functions for examples // #include "art/Utilities/ToolMacros.h" // Mu2e includes. #include "Mu2eG4/inc/MaterialFinder.hh" #inc...
fe1965ee901099d77f2e0f43f6f90997b72524a3
69f4a8dae194c31bb68913dfc0f03008ee56e3c1
vampcoder/Online-Programmes
/Codechef/OPC/theAuction.cpp
C++
cpp
2,250
no_license
#include<cstring> #include<iostream> #include<cstdio> #include<algorithm> #include <cfloat> #include<vector> #include<map> #include<cmath> //typedef vector<int> vi; //typedef vector<vi> vvi; //typedef pair<int,int> ii; /*#define sz(a) int((a).size()) #define pb push_back #define all(c) (c).begin(),(c).end(...
6e924814a5e22335fa7fcb212a9ced0a6bd3c48b
5df7f3bd48422efea425ddb71b44cd79073f5dff
rushioda/PIXELVALID_athena
/athena/Generators/PythiaB/src/components/PythiaB_entries.cxx
C++
cxx
608
no_license
//==================================================================== // GeneratorBModules_entries.cxx //-------------------------------------------------------------------- // // Package : Generators/GeneratorModules // // Description: Declaration of the components (factory entries) // specified b...
f42ba61b4da8c7ff9a41768721ea7d1747342a53
0d62d4859b3b0f58e2759189a5f8d58473c8684b
Hissane/Competitive-Programming
/Cses/IncreasingArray.cpp
C++
cpp
324
no_license
#include<bits/stdc++.h> using namespace std; int main(){ long n, counter = 0; long arr[200005]; cin >> n; for(int i = 0; i < n; i++){ cin >> arr[i]; } for(int i = 0; i < n-1; i++){ if(arr[i] > arr[i+1]){ counter += arr[i] - arr[i+1]; arr[i+1] += arr[i] - arr[i+1]; } } cout << counter; return ...