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
331b1a6b3174ac33ee2d02303f869015fc856ea3
b0ccb4441ceaddb38c35b5a6a25e48fbea338795
KlimRadostev/CPP-Piscine
/Day01/ex06/main.cpp
C++
cpp
1,317
no_license
// ************************************************************************** // // // // ::: :::::::: // // main.cpp :+: :+: :+: ...
cd6da30bd858295a71d5e9590677b9add36027fb
45bf1d760e10dcc33ea1ce9c7994964eb32d7305
HongfeiXu/CplusplusPrimer
/ch10/ex10_37.cpp
C++
cpp
624
no_license
/* 练习 10.37:给定一个包含 10 个元素的 vector,将位置 3 到 7 之间的元素按逆序拷贝到一个 list 中。 */ #include <vector> #include <list> #include <iostream> using namespace std; template <typename T> inline void printContainer(T const &cont) { for(auto item : cont) { cout << item << " "; } cout << endl; } int main() { vector<int> vecInt { 0,...
fb1ded8c9d2ad63550fc93fe577311b86296bf4a
5995788466a78859e4118e8742e56189ce2244ec
ashutosh0gupta/llvm_bmc
/examples/litmus/c/run-scripts/tmp_5/ISA2+poonceonce+pooncerelease+poonceonce.c.cbmc.cpp
C++
cpp
42,497
no_license
// Global variabls: // 0:vars:3 // 3:atom_1_X0_1:1 // 4:atom_2_X0_1:1 // 5:atom_2_X2_0:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 #define ADDRSIZE 6 #define LOCALADDRSIZE 3 #define NTHREAD 4 #define NCONTEXT 5 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, ...
fb25e06a648fe4cf3c1f58bfc46b5787ba246892
a8b88e2b13e1c0f29ef0a4a92a38e4b9110ad4f5
jiafangtao/web_programming
/cpp/demo.exceptions.cpp
C++
cpp
1,154
no_license
#include <iostream> #include <string> class MyException { private: std::string message; public: MyException() { message = "my exception for demo"; std::cout << "ctor of my exception" << std::endl; } MyException(const MyException & rhs)...
43872a8381397a1ea50e668dc4cf7ca073d0c0f0
705d1ecf52995ba0f3a9aaac9f551c41fb25861b
xirc/cp-algorithm
/atcoder/abc209/A/main.cpp
C++
cpp
276
permissive
#include <bits/stdc++.h> using namespace std; using ll = int64_t; using ff = long double; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int A, B; cin >> A >> B; int c = max(0, B - A + 1); cout << c << endl; return 0; }
97a729ffd2ab19970e31571f88a8286b6eeccc79
548da7d98d81406603b7f44793b0c935bc837c84
VOID001/CodeTogetherNEU
/C-Programming/4-005.cpp
C++
cpp
1,077
no_license
//运算符为什么要重载为友元函数? 看下面的代码 #include<iostream> using namespace std; class Complex{ private: double real, imagine; public: Complex(double r=0, double i=0) :real(r), imagine(i){} Complex operator + (const Complex a); Complex operator + (const double a); friend Complex operator + (const double r, const Complex c); f...
b6c9e22069d91d816217f0a24446e6506de10608
7f228bc3b57ccfc22fb777045009d26ea1d9925e
Mohamed-Hossam/Problem-Solving
/codeforces/34-A/34-A-19158372.cpp
C++
cpp
2,007
no_license
//in the name of Allah #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<vector> #include<set> #include<map> #include<unordered_map> #include<queue> #include<stack> #include<iterator> #include<cmath> #include<string> #include<sstream> #include<cstring> #include<ctype.h> #include<iomanip>...
037424f115cf462d8fe2ad63e3f69399cf4280dc
4ffe43a7ecc2187209ba93f3af2f86640bdd3ac5
Kapsule98/solid-octo-engine
/codeforces/Practice/1353C.cpp
C++
cpp
215
no_license
#include<bits/stdc++.h> using namespace std; #define li int64_t int main() { int t; cin>>t; while(t--) { li n; cin>>n; n = (n-1)/2; li sum = 0; sum = (4*n*(n+1)*(2*n+1))/3; cout<<sum<<endl; } }
15ab3b1826b2fb7acc291ea56bb30d6e639521d6
c8ea66abd31b646cae343875129fe654b68c1ca9
danielgholmes/tank-battles
/source-code/CollisionManager.cpp
C++
cpp
12,734
no_license
//! Implementation for CollisionManager class /*! This manager is responsible for checking and setting the collision and blocked states of game entities. It relies upon the GeometryEngine Class for all of the geometry related logic conditions. \file CollisionManager.cpp \author Daniel Holmes &...
d9adf700b4c8a4571ee1387fbb5b08daac425bbb
9de03966983b4ffa33b00b3375892af04149b2d2
tectronics/pantin-studio
/libraries/GLr/inc/wrappers/scene/WTransformation.hpp
C++
hpp
1,979
no_license
/* * Copyright (c) 2010-2011, Romuald CARI * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of con...
fb0148eb8042ccd48ad786a45ecc77e2483da964
f155b3865135681dc065dd7979290d20cf3870dd
vslavik/poedit
/deps/boost/libs/hana/test/ext/boost/tuple/auto/take_front.broken.cpp
C++
cpp
263
permissive
// Copyright Louis Dionne 2013-2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #if 0 #include "_specs.hpp" #include <auto/take_front.hpp> #endif int main() { }
b274658181f40572d422ddf8376edf1fb927196f
7ca54f6bbbeba097a513c133f8ed6bd0ca2f39b5
willg1996/zynq_conv
/fpga_top.hpp
C++
hpp
354
no_license
#ifndef _FPGA_TOP_H_ #define _FPGA_TOP_H_ #include "dtypes.hpp" // void fpga_top(conv_t layer, volatile data_t* SHARED_DRAM, data_t cmd); void fpga_top(conv_t conv, volatile data8_t* SHM8_DRAM, volatile data16_t* SHM16_DRAM, volatile data32_t* SHM32_DRAM); //void fpga_top(conv_t conv, data32_t cmd, // volati...
3f2f13c88ffdcbdedb6291cdfc0becbbdd9d4e36
b432c1a01c6f22458b19fe89b7dc39d100c6168d
sarthakag/hpx
/libs/resiliency/tests/performance/replay/async_replay_validate.cpp
C++
cpp
4,252
permissive
// Copyright (c) 2019 National Technology & Engineering Solutions of Sandia, // LLC (NTESS). // Copyright (c) 2019 Nikunj Gupta // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.bo...
8742d6e771249d841d01a168fcb5423fcf4e1039
5bee381c073d7c929aaa4ea905e228730f3d27c1
pcs155251/tns_apps
/pess/quant.cpp
C++
cpp
4,021
no_license
#include "quant.h" using namespace std; void quantities::printAll( const string &dataFolder, const double field, const int dimD, const int dimCTM ) { calculate(); printEnergy ( dataFolder, field, dimD, dimCTM ); printMag ( dataFolder, field, dimD, dimCTM ); } void quantities::calculate() { magAvg = 0; f...
ff58d0a44a1cef6fef07aea72b744d89e9dc1256
2d452ead9e288c55703a9dd44e62a1c845bf2dd3
TongZhang/zircon
/system/dev/block/zxcrypt/extra.cpp
C++
cpp
959
permissive
// Copyright 2018 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stddef.h> #include <stdint.h> #include <ddk/protocol/block.h> #include <zircon/assert.h> #include <zircon/listnode.h> #include "extra.h" names...
854319dce2e4ad49ed3b3d76066b7c9a28b88ecc
96c57e7e7995b1d186e6f562ce6e510c60eb4255
TianyiChen/rdcpp-data
/data/68.cpp
C++
cpp
22,082
permissive
int nw, Lf, PW ,mO1 ,VTIA , TCd,rWHq ,/*Vd*/k /*m*/ , DB ,k7H1FT,e0 , ZXJ , Ug9 , k5J3 , No ,oqOm,J, vn2 ,x6 // ,FRm,prDj, tBqE ,VXzz,// LRC ,//ZMu f7 , z8D , q, // ha, vHR, pkO, o5y ,SJ7, Cgh , R6 /*kt2d*/, dhm , BxY, ic, Y4mFAE ,IB //l , dy, tz ,//Q Fusy , Sh, eOMIN,iiwq,jU , Wp ,CVsAl, ...
0eef455f556bb6e6e0bd44655c89400a34684939
2ff0818bc8f422e718d4a067b9554d6ef54dbfde
Ronnoc/Training
/TopCoder/SRM 600-699/SRM 679/231.25:250 1PY.cpp
C++
cpp
806
no_license
#include <bits/stdc++.h> using namespace std; #define AA first #define BB second #define OP begin() #define ED end() #define SZ size() #define MP make_pair #define PB push_back #define cmax(x,y) x=max((x),(y)) #define cmin(x,y) x=min((x),(y)) typedef long long LL; typedef pair<int,int> PII; int dp[2505];...
1d421433a22978046a58c5033c4b28faaa30a536
ab9612ee0543e591ece081373e3bc36799fdc402
KevinTorres03/Codigos-fuente-C-y-Python
/Proyectos C++ (3)/Multiplos de 6.cpp
C++
cpp
224
no_license
#include<iostream> using namespace std; int main(){ int num=6, num2=100; cout<<"Vamos a visualizar los multiplos de 6 (hasta 100) son: "<<endl; for(num;num<=num2;num=num+6){ cout<<num<<endl; } }
72f45c89a9ae69ec93c4c5cbe5d614389a1f3103
321d66adbb0676eb892562b52ca84bfe3a0d648b
VTadevosyan/TicTacToe
/items/item_x.cpp
C++
cpp
1,077
no_license
/** * Tic Tac Toe */ #include "items/item_x.hpp" #include "game/manager.hpp" #include <QPainter> #include <QPixmap> #include <iostream> item_x::item_x() : m_section(0) { m_pos[1] = QPoint(1, 1); m_pos[2] = QPoint(201, 1); m_pos[3] = QPoint(401, 1); m_pos[4] = QPoint(1, 201); m_pos[5] = QPoint(2...
ce4f8186cffb9832d0746d73603506547714b556
128fb400ac191816299edbd9959bdd4923abaf7f
digint/openmptl-reg-arm-cortex
/arm/cortex/Freescale/MKW21D5/include/arch/reg/lptmr0.hpp
C++
hpp
3,087
no_license
/* * OpenMPTL - C++ Microprocessor Template Library * * This program is a derivative representation of a CMSIS System View * Description (SVD) file, and is subject to the corresponding license * (see "Freescale CMSIS-SVD License Agreement.pdf" in the parent directory). * * This program is distributed in the hope...
57a4110946875ee49bab3db1c5bb5bb51235c7fa
57b992e9a4c8f3323cc28c3cc34c37cc4d49e1d6
thiagovas/Algorithms-And-Data-Structures
/Algorithms/Kruskal.cpp
C++
cpp
1,204
no_license
/* Feito por Thiago Vieira <thiagovieiraas@gmail.com> O kruskal descobre a árvore geradora mínima de um grafo. */ #include <iostream> #include <cstdlib> #include <cstdio> #include <vector> #include <set> #include <utility> #include <algorithm> using namespace std; #define MAX 101 int p[MAX]; void in...
4a435c26ba59648413273f6a3f45d801f4e26a92
d16b9a76736bb75ee7615cc34eddaf9f1387fe5b
maojoejoe/Peach-Thinning-GTRI-Agricultural-Robotics-VIP
/ros2-windows/include/composition_interfaces/srv/dds_connext/ListNodes_Plugin.cxx
C++
cxx
90,727
no_license
/* WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY. This file was generated from ListNodes_.idl using "rtiddsgen". The rtiddsgen tool is part of the RTI Connext distribution. For more information, type 'rtiddsgen -help' at a command shell or consult the RTI Connext manual. */ #include <string.h> #ifndef ndds_cp...
6dea176d04a882ce407fdb5bacefa6fd7655cb03
d4c1b05056e44514da22962ee6c8006c56f550b0
xtblock/chromium
/extensions/browser/api/sockets_tcp_server/sockets_tcp_server_api.cc
C++
cc
10,881
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 "extensions/browser/api/sockets_tcp_server/sockets_tcp_server_api.h" #include <memory> #include <unordered_set> #include <vector> #include "bas...
cb351e6ef5cae14c935979f9546934d6b7b0b262
814e74c4c2adbeb245ee99b4b2dc5b593ed1576e
JablonskiMateusz/compute-runtime
/unit_tests/command_queue/enqueue_debug_kernel_tests.cpp
C++
cpp
6,632
permissive
/* * Copyright (c) 2018, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, ...
991299c2d3995473163ada8e1f86255b4fff8641
edb3873a771c3f8315c235bf18835425f2efe97e
kumarshashank571/July-Leetcode-Challenge
/3Sum(July 8).cpp
C++
cpp
844
no_license
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { int n = nums.size(); if(n<3){return {};} vector<vector<int>> result; sort(nums.begin(),nums.end()); for(int i =0;i<n-2;i++){ if(i == 0 || nums[i]!=nums[i-1]){ int j = i+1;in...
3a77ff1f8e6a48ab566d4c8d196617d219fc8008
009d895cd5c00487454ece96dfa3778dfa2ec297
afrochonsp/OAiP
/Semester2/Laba5/Variant3/Variant3.cpp
C++
cpp
4,140
no_license
#include <iostream> #include <string> #include <ctime> using namespace std; struct Stack { Stack *next; int value; }; void Add(Stack *&, int); void Delete(Stack *&); void DeleteStack(Stack *&); void Show(Stack *); void SortAddress(Stack *&); void SortValue(Stack *); template<typename T = int> void InputNumber(T &...
1b570fe45abf47c1fd2ddb904bfb5c1ae528e5ba
65c9bd93b52e9df13d9638114d542b7c550c2bb7
alortimor/c-_tests
/tcp_server/client/SyncTCPClient.cpp
C++
cpp
364
no_license
#include "sync_tcp_client.h" std::string sync_tcp_client::receive_response() { asio::streambuf buf; asio::read_until(m_sock, buf, '\n'); std::istream input(&buf); std::string response; std::getline(input, response); return response; } void sync_tcp_client::send_request(const std::string& request) { as...
ba1216238bba94015976a494dcd54653b66c8f6b
3654b9a07128ca0ea1f957dce8c73ef03f529265
kibetmasi/OpenGL_CA
/Main.cpp
C++
cpp
1,042
no_license
#include <Windows.h> #include <GL\glew.h> #include <GL\freeglut.h> #include <iostream> using namespace std; void changeViewPort(int w, int h) { glViewport(0, 0, w, h); } void render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glutSwapBuffers(); } int main(int argc, char* argv[]) { // ...
44096fad5d4f8409b75841463d4669b95c34b780
f26253eb78c8aab4bb4862ef74ae25193a8d2482
jeavenwong/CHESF
/Menge-master/src/Menge/MengeCore/Agents/SCBWriter.cpp
C++
cpp
10,652
no_license
/* License Menge Copyright ?and trademark ?2012-14 University of North Carolina at Chapel Hill. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for educational, research, and non-profit purposes, without fee, and without a written agreement is hereby grante...
1303a028900fbd6265dd5b68ed69d3e39eb34772
d25da6a201a409082bf595de16ad07c207864715
sabikunnahar4/29-07-2020
/193311055.cpp
C++
cpp
240
no_license
#include<iostream> using namespace std; int main() { char c[20],i; cout<<"Enter uppercase string:"; cin>>c; for(i=0;i<10;i++) { if(c[i]<72||c[i]>100) break; c[i]+=40; } cout<<"\nThe string in lowercase:n" <<c; return 0; }
af49110e699cf1da0b9ffba47e1d1bae42bb11b9
47f2095bb4caaa3b17192d3af484983b13510e2d
mitchellspryn/ClankRoboticsPlatform
/clank/src/StartTeleoperatedRobot.cpp
C++
cpp
725
no_license
#include "robot/TeleoperatedRobot.hpp" #include <iostream> #include <unistd.h> using namespace std; using namespace Clank::Robot; int main(int argc, char** argv) { if (argc < 2) { cout << "Usage: ./TeleoperatedRobot <ConfigFile>" << endl; cout << " <ConfigFile> : Configuration file for robot." << endl; ...
697e6ed453706ae9e1530d537c3a669f4f12089a
6d0131b81ad9523258b37e09fcfb26843d015ed4
Turno/chromium
/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc
C++
cc
162,867
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 "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h" #include <memory> #include <string> #include <utility> ...
74e6ff6de1ab006d4a6e8342d0d7e13a949a224d
ec29a9d7007f8f1c221fcdfc637576abd4ac7faf
robotcator/acm-icpc
/topcoder/single-round-match/single-round-match-624/TreeColoring.cpp
C++
cpp
11,720
no_license
#include <algorithm> #include <cassert> #include <climits> #include <cstdlib> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define ALL(v...
112a1ce47ea5604975ecb2aa7f32d658ef2956f0
49c21a95f1a0d7842e7e697c1d096251ac7f07d7
chromium/chromium
/chrome/browser/web_applications/web_app_sync_bridge.cc
C++
cc
32,952
permissive
// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/web_applications/web_app_sync_bridge.h" #include <memory> #include <vector> #include "base/containers/contains.h" #include "base/containers/flat_set....
8633c3139ded02c6e4c45e510c311168e04b8c66
8b98a3ff79cbb8588a62f038f18c7ac6600b2a27
KonstantinovD/Basics-of-CPP-BSU-2017
/GlobalProject/IntegerArithmeticWeek3/integerArithmetic_5.cpp
C++
cpp
3,957
no_license
#include "../include/TackInclude.h" #include "localHeaders/tack5functions.h" #include <iostream> #include <fstream> #include <cmath> #include <iomanip> bool checkBissextile(int year) //Check is year have 365 or 366 days { bool result = false; if (0 == year % 4) { result = true; if (0 ...
23a7367b9750426738626e707e5b2364f6582657
52c09f10029974a39224130f0e85e12582eb45ec
wghou/Chaste
/crypt/test/simulation/TestOffLatticeCryptProjectionSimulation.hpp
C++
hpp
11,381
permissive
/* Copyright (c) 2005-2020, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
13a0d3c5849bcc2aec16d5d6ae3996f7d2b92187
230e5251ea24b80ef95f25afe2b3d430720b31b1
jianyuyanyu/Panda
/Framework/Common/HuffmanTree.hpp
C++
hpp
7,768
permissive
#pragma once #include <memory> #include <vector> #include "portable.hpp" namespace Panda { template<typename T> class HuffmanNode { protected: T m_Value; std::shared_ptr<HuffmanNode<T>> m_pLeft; std::shared_ptr<HuffmanNode<T>> m_pRight; bool m_IsLea...
e31bf3b339e3f5294a3e0c27374ef4e65454f742
d6be7be96312be046648e06cccc1546b2bdbb1f9
bogyaanna2003/XI.B.
/grafok, amely egy graf harom legtobb kapcsolattal rend csomopontjat keresi/main.cpp
C++
cpp
1,111
no_license
#include <iostream> #include <fstream> using namespace std; int v[100][100]; int n; bool van(int x, int y){ if(v[x][y]>0){ return true; } return false; } int csomopontokszama(int csomopont){ int S=0; for(int i=0; i<n;i++){ S=S+v[i][csomopont]; return S; } } for(int i=1;i<n+1;i++){ ...
297f1cbea54c1ed424bc41f7394909d929f75556
20efa25a2b07f27569e215ff162b4b0d7207e055
cleonro/FLTKTest
/FLTKTest/UtilSources/Math/Vector4.cpp
C++
cpp
1,957
no_license
//#include "StdAfx.h" #include "Vector4.h" #include "Matrix4x4.h" #include <stdio.h> OVector4::OVector4() { for(int i = 0; i < 4; i++) { vec_[i] = 0; } } OVector4::OVector4(float x, float y, float z, float w) { x_ = x; y_ = y; z_ = z; w_ = w; } OVector4::OVector4(const OVector3& v, floa...
a510b2b080ecd9cb9bd6a34cce7b12fe553e8e84
74432e0dcc945a2613aa20e837ab88c761749b94
blockspacer/gallery360
/test/std.test.cpp
C++
cpp
2,965
permissive
#include "pch.h" namespace std::test { TEST(FileSystem, DefaultConstruct) { const std::filesystem::path p1; EXPECT_TRUE(std::empty(p1)); EXPECT_TRUE(std::empty(std::filesystem::path{})); const std::filesystem::path p2{ "" }; EXPECT_TRUE(std::empty(p2)); const std::fi...
4a6cdee8706214151407bd457bb4e6e539e185c0
2c2802a30ecf3defd32442c47548c5677bd3c1c5
sc2ad/BeatSaber-Quest-Codegen
/include/HoudiniEngineUnity/HEU_Platform.hpp
C++
hpp
26,718
permissive
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include <initializer_list> #include "beatsaber-hook/shared/utils/byref.hpp" #include "beatsabe...
3a9654eb5f36a9c5351f1fb5f8ef4513f81bb3f1
9c5aa51a0a310317fc49ebf418c00699a1b0b94b
Asmaasa3d/UVA-solved-problem
/10077uva/main.cpp
C++
cpp
1,238
no_license
#include<bits/stdc++.h> using namespace std; #define loop(i,str,end) for(int i=str;i<end;i++) #define ll long long #define sz(v) ((int)((v).size())) #define clr(v, d) memset(v, d, sizeof(v)) #define pb push_back #define MP make_pair #define P(x) cout<<#x<<" = { "<<x<<" }\n" int n,m;...
a1fcd68e701d37ddf664d8ed41f4d95b0c677eef
7c37af446e382f4e19bbdfcab8dabec27dde4ecd
SpaceManiac/HamSandwich
/source/loonyland/options.cpp
C++
cpp
10,261
permissive
#include "options.h" #include "mgldraw.h" #include "control.h" #include "display.h" #include "player.h" #include "title.h" #include "plasma.h" #include "appdata.h" static byte cursor; static byte oldc; static dword oldBtn; static byte controlX,controlY; static byte optMode; options_t opt; void InitOptionsMenu(void) ...
6a1acaec5a9c220fc3a462264ddd7dec126ea9ec
d781b91ccaa63b6f1154297179dcee6fbf07c876
lucasxia01/Competitive-Programming-Problems
/Facebook Hacker Cup/2021/Round 2/C.cpp
C++
cpp
3,259
no_license
#include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <algorithm> #include <functional> #include <stdlib.h> #include <time.h> #include <complex> #include <iterator> #include <regex> #include <fstream> #include <utility> #include <vector> #include <string> #include <cstring> #include <stack>...
1b05b066bca6838d858e08085d5dce2bf8cd8120
501bfa5bb46f18bd15ee49f6b479b0599e506b72
multifacet/ASAP
/src/cpu/minor/pipe_data.hh
C++
hh
10,255
permissive
/* * Copyright (c) 2013-2014 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall * not be construed as granting a license to any other intellectual * property including but not limited to intellectual property relating * to a hardware implementation of the ...
6cdcae080aabedce55d83fa9375ff7bf3b5da357
20da3e166e63a95ea2e176757cc6ef2be5841357
suyash202/Object-Oriented-Programming-In-C
/Lab_1/Q1/Minimum_Element_in_Array.cpp
C++
cpp
374
permissive
#include <stdio.h> int main(){ int arr[5]; for(int i=0;i<5;i++){ printf("enter element %d: ",i+1); scanf("%d",&arr[i]); } int small=arr[0]; int pos=0; for(int i=0;i<5;i++) { if(arr[i]<small){ small=arr[i]; pos=i+1; } } printf("...
8f1e6c3d17439cf4484974caaaf1d66de3f7b7ec
d3ea79fbdfc063e5003e5d0b956251f88b1de412
liyuglikz/rezonator2
/src/io/SchemaReaderJson.cpp
C++
cpp
12,269
permissive
#include "SchemaReaderJson.h" #include "z_io_utils.h" #include "z_io_json.h" #include "ISchemaWindowStorable.h" #include "../core/Schema.h" #include "../core/ElementsCatalog.h" #include "../WindowsManager.h" #include <QDebug> #include <QJsonDocument> #include <QJsonObject> #include <QJsonArray> #include <QFile> name...
bce2fa4dd9e2df1c023b81e47d059617edebe6e2
88d3836b5011db9915044a10040dc8fa4c297fb6
danmi1258/mt4-odbc-bridge
/MT4ODBCBridge/MT4ODBCBridge.cpp
C++
cpp
10,795
no_license
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include "odbcwrapper.h" #include <stdio.h> #include <stdarg.h> #define MT4_EXPFUNC __declspec(dllexport) #define MOB_DEBUG_LOG false /** * Cache to handle multiple connections. * Assuming a connection per thr...
ccd3066d572ed166878d6cc386b319fefce30671
51851edac289b3fac8d37bfccacec7bb4d3c11bd
dnelson86/idl
/CalcBoxRemap/main.cpp
C++
cpp
4,017
no_license
// // CalcBoxRemap // dnelson oct.2013 // "A volume and local structure preserving mapping of periodic boxes" // based on: http://mwhite.berkeley.edu/BoxRemap/ // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "idl_export.h" #include "cuboid.h" /* IDL glue routine example: ...
e1283f432c49015aef1e0a61ff36d685c28efa86
e978c2f42e5113089609448ba73b28e78a10c58a
kirksaunders/simpleEngine
/src/render_base/shadervariableblock.cpp
C++
cpp
6,706
permissive
#include "render_base/shadervariableblock.hpp" #include <cstring> #include "render_base/uniformbuffermanager.hpp" #include "render_base/window.hpp" using namespace Render3D; using namespace Math3D; static unsigned int GLSL_TYPE_BASE_ALIGNMENTS[] = { 4, // BOOL 4, // INT 4, // UINT 4, // FLOAT ...
e3a740e49c09958ed26727e4eb7c5b0ab5d1166f
356ec7022ef5dfa1203ec5240a318cf1788f908c
lnarolski/mearm-stm32f429i
/TouchGFX/generated/images/include/BitmapDatabase.hpp
C++
hpp
1,784
permissive
// Generated by imageconverter. Please, do not edit! #ifndef BITMAPDATABASE_HPP #define BITMAPDATABASE_HPP #include <touchgfx/hal/Types.hpp> #include <touchgfx/Bitmap.hpp> const uint16_t BITMAP_BLUE_BACKGROUNDS_MAIN_BG_PORTRAIT_240X320PX_ID = 0; const uint16_t BITMAP_BLUE_BUTTONS_ROUND_EDGE_ICON_BUTTON_ID = 1; const...
b1f6204df5c7d2b0bd6ef48c08e3eb18b307ceb2
8cf232394a37bd242318eda77b6423dee58e94e1
anepaul/2pem-viewer
/src/glclient/glfw.hpp
C++
hpp
2,116
no_license
#ifndef __VIEWER_GLFW_HPP__ #define __VIEWER_GLFW_HPP__ #include "glheaders.hpp" #include <cstddef> struct rect { rect(); rect(int width, int height); int width {0}; int height {0}; }; namespace glfw { void init(); void terminate(); void pollEvents(); struct library { librar...
bb9159711ef6a37c27227ba44fd1461bd74b237a
7d72d2c34a7c8a50599d99e60f77edc7bdb73997
jasonb15BU/AzureSpatialAnchorsPOC
/MRTB32Pres/Il2CppOutputProject/Source/il2cppOutput/Il2CppCCWs15.cpp
C++
cpp
84,428
no_license
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include <limits> #include "vm/CachedCCWBase.h" #include "utils/New.h" // System.Collections.Generic.IEqualityComparer`1<UnityEngine.XR.ARSubsystems.TrackableId> struct IEqualityComparer_1_tD2AF20E6...
49408140bb1f83c8bec732fa37bb3c5484cfad4e
1ffb9009de618b4d91185e560a816c0545ec993e
ZouXinyi-a/ZXY
/MFC3.23(1)/MFC3.23(1)/MFC3.23(1)View.cpp
C++
cpp
2,689
no_license
// MFC3.23(1)View.cpp : CMFC323(1)View 类的实现 // #include "stdafx.h" // SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的 // ATL 项目中进行定义,并允许与该项目共享文档代码。 #ifndef SHARED_HANDLERS #include "MFC3.23(1).h" #endif #include "MFC3.23(1)Doc.h" #include "MFC3.23(1)View.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMFC323(1)View IMPLE...
0e9c15e8189befb9dc3c55c4bad54dfadb2c34df
432b18ef176558c94ca03f206e76aa8b3e7849ec
jianghaibobo2016/RTSP_CLIENT
/src/VorbisAudioRTPSink.cpp
C++
cpp
9,789
no_license
/* * VorbisAudioRTPSink.cpp * * Created on: Aug 13, 2018 * Author: jhb */ #include "VorbisAudioRTPSink.h" #include "Base64.h" #include "VorbisAudioRTPSource.h" // for parseVorbisOrTheoraConfigStr() VorbisAudioRTPSink* VorbisAudioRTPSink::createNew(UsageEnvironment& env, CommonPlay *cpObj, Groupsock* RTPg...
ee8d17ced0d1846eafe7db6d01b675a3e3b4cc43
b312332f87d0f22614e8ff6471a96dc96ef2614e
rocking-around/PoL1.62.002
/src/pol/logic2/Graphic.cpp
C++
cpp
42,605
no_license
#pragma warning(disable:4786) #include "logicdefs.h" #include <undercover/IWorld.h> #include <undercover/Skin/Person.h> #include <undercover/GameLevel/grid.h> #include <undercover/GameLevel/ScatteredItems.h> #include <Common/3Deffects/EffectManager.h> #include "spawn.h" #include "Thing.h" #include "Entity.h" #include...
93f90bd23e5736bc7fc51d503630a4e49700d53b
089c8cb58fa7cad4ff3ffa1b551f6b949229fc48
chaitanyajalan/CSES-Solutions
/INTRODUCTORY PROBLEMS/cses1071_NumberSpiral.cpp
C++
cpp
580
no_license
#include<bits/stdc++.h> using namespace std; #define ll unsigned long long int int main() { ll t;cin>>t; while(t--) { ll x,y; cin>>x>>y; ll n=max(x,y)-1; ll sum=n*n; if(x>y) { if(x%2==0) sum=sum+2*x-1-y+1; ...
8c63a93c34ff3a42e41056c05731067bcaf738da
5aea4d27f71833b7f9a50e9b62e189acfd381238
limdonguk/CPP
/Chapter.15/ATM.cpp
C++
cpp
1,568
no_license
#include <iostream> #include <cstring> using namespace std; class DepositException { private: int reqDep; public: DepositException(int money): reqDep(money) { } void ShowExceptionReason() { cout<<"예외 메시지: "<<reqDep<<"는 입금 불가"<<endl; } }; class WithdrawException { private: int balan...
47022d86427aca999007c92f40ec823e49e641b9
a49a67a5af93976935205e0bc020c6188c9a9b97
Riccardo-Beccalli/Physical-Simulation
/linear_regression.cpp
C++
cpp
6,206
permissive
#include <iostream> #include <fstream> #include <cstdlib> #include <iomanip> #include <vector> #include <cmath> #include <ctime> using namespace std; double round (double, int); int cifraSig (double); int main (int argc, char* argv []) //argv è un array dimensionato ad argc di puntatori sotto forma di stringhe { if...
8ebdea11ca9b44d3a62cbfd10972f299362ff6e2
ce36db131c60af78f5df2529e418afe9d402c90b
sclshu3714/MODELWORX.CORE
/OCCT.Foundation.NetHost/ApplicationFramework/TKLCAF/TDF/XTDF_Delta.cpp
C++
cpp
6,768
no_license
// Created by: DAUTRY Philippe // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public Li...
87a438ebb43c2a574e4c073e1bc009af7e46e317
f28a452136c77ce9494f931f83268eef5783d82a
aircom-inc/v8
/src/assert-scope.cc
C++
cc
5,392
permissive
// Copyright 2014 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 "src/assert-scope.h" #include "src/base/lazy-instance.h" #include "src/base/platform/platform.h" #include "src/execution/isolate.h" #include "...
c4e2ae415cde6fdedb83b843cbede6a0ee2938ae
3696b0276831a546240962c6ecf2676340205ac3
ngthvan1612/OJCore
/TestModule/HK1/Users/20133043/BAI3.CPP
C++
cpp
482
no_license
#include<stdio.h> void nhap(int a[], int &n); int central(int a[], int n); void main() { int a[101], n; nhap(a, n); int kq=central(a, n); printf("%d", kq); } void nhap(int a[], int &n) { scanf("%d", &n); for(int i=0; i<n; i++) scanf("%d", &a[i]); } int central(int a[], int n) { int dem=0; for(int i=0; i<n; i...
c804957b9fb3eebeeadfa9fd9fca38cee5ad5f66
c3fde268152b2a9615d709db25a5287fd438a9d0
ChrisMukherjee/COMP345-Project
/Other/Assignment 1/2-Map/Chris/map.cpp
C++
cpp
6,316
no_license
// Map Implementation File // By: Christopher Mukherjee #include <iostream> #include "map.h" using namespace std; // Constructor map::map(int w, int h) { // Initialize variables width = w+2; height = h+2; startX = -1; startY = -1; endX = -1; endY = -1; // Create 2D array mapArr = new char*[width]; for (int...
35888339e6510e8d6e248c674047e1308ce2434c
46c0bcf57580ccb3497e6d0d07c4bcb77f9db119
PauloCesarMarquas/C2
/funcionario.cpp
C++
cpp
1,035
no_license
#include "funcionario.h" #include "cargo.h" // bibliotecas padrao #include "iostream" #include "stdlib.h" // include para o bd: #include <QtSql/QSql> #include <QtSql/qsqldatabase.h> #include <QtSql/qsql.h> #include <QtSql/qsqlquery.h> // includes para o bd, codigo do sistema #include "sqlresultados.h" using namespace ...
052fbcd08dc61e631f3029eed56007c1cb03d04e
ce44370bb28ab97436bcdb00e557489bbe0c5e91
ag2020/Codeforces
/Round 486 - Div. 3/problemone.cpp
C++
cpp
671
permissive
#include <bits/stdc++.h> using namespace std; #define FAST ios::sync_with_stdio(0); cin.tie(0); #define println(x) cout << x << '\n' #define FOR(i, a) for(int i=0;i<a;i++) #define F0R(i, a, b) for(int i=a;i<b;i++) int main() { FAST int n, k; cin >> n >> k; vector<int> vec; bool arr[101]; FOR(i, 1...
fa96f0ae9778d370e9d30bea972b6ca1396a5fdc
1083708a7ff77d04145ffc0975f839597275af4c
chubbymaggie/insight
/src/kernel/expressions/Operators.hh
C++
hh
3,806
permissive
/*- * Copyright (C) 2010-2014, Centre National de la Recherche Scientifique, * Institut Polytechnique de Bordeaux, * Universite de Bordeaux. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitte...
1b7417cdde0bda4d1796e09d1d5cb28b3046d5bc
5003a9b33ff8266e08ec9e550484d65f7427a12c
leleluv1122/Algorithm
/_BAEKJOON_/_BAEKJOON_/6156_Cow_Contest.cpp
C++
cpp
895
no_license
#include <iostream> #include <algorithm> #define endl "\n" #define MAX 101 #define INF 987654321 using namespace std; int N, M; int cow[MAX][MAX]; void init() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); } int main() { init(); cin >> N >> M; for (int i = 1; i <= N; i++) for (int j = 1; j <= N; j...
af3ed4376026833bbd0075dac40fed830567bf03
cfad66c8ffe29cd39e4507dc31a37a14d5cca338
jsherman/platform_frameworks_base
/media/libmediaplayerservice/MidiFile.cpp
C++
cpp
14,779
permissive
/* MidiFile.cpp ** ** Copyright 2007, The Android Open Source Project ** ** 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 req...
d724fffc08a0fcf275454e67baa9ef38c85aa34a
cf8da19ae30574ed4e11188a61b640710a6bd0d4
meniossin/src
/content/browser/storage_partition_impl.cc
C++
cc
48,867
permissive
// Copyright (c) 2012 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 "content/browser/storage_partition_impl.h" #include <stddef.h> #include <stdint.h> #include <set> #include <utility> #include <vector> #in...
46fe96e8b21304922a76c390a85f781bfcaf2507
59f676b5eed9c6d12f50ffaa7eb12807698168c0
Daibingh/MyAlgoLearning
/算法与数据结构/cpp_leetcode/701 二叉搜索树中的插入操作/main.cpp
C++
cpp
782
no_license
#include <bits/stdc++.h> using namespace std; /* 给定二叉搜索树(BST)的根节点和要插入树中的值,将值插入二叉搜索树。 返回插入后二叉搜索树的根节点。 输入数据保证,新值和原始二叉搜索树中的任意节点值都不同。 注意,可能存在多种有效的插入方式,只要树在插入后仍保持为二叉搜索树即可。 你可以返回任意有效的结果。 */ // 递归 class Solution { public: TreeNode* insertIntoBST(TreeNode* root, int val) { if (!root) return new TreeNode(val); ...
1d289d40b5c3782bf8b6c14beffba027330d78c1
3f4352053caff7714de643b63568a57071bd72f9
lameesemad1996/Go-Back-N-ARQ-Protocol
/Qt Project/goBackNApp/inputframeswindow.cpp
C++
cpp
1,970
no_license
#include "inputframeswindow.h" #include "ui_inputframeswindow.h" #include"mainwindow.h" #include"QLabel" #include "QCheckBox" #include<string> #include "QScrollArea" #include"QVBoxLayout" #include "QHBoxLayout" #include "QSizePolicy" #include <list> #include <iterator> #include <output.h> #include "QDebug" using namesp...
cbf084be6f5d70a1bce032c12f7574ae611103fb
87e134db3582d2d87052c49789a100a62776aa68
Salvare219/CodeLibrary
/acm/Online-Judge/vjudge/code/HDU3590.cpp
C++
cpp
1,109
no_license
#include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algorithm> #include<string> #include<vector> #include<map> using namespace std; vector<int> gra[100005]; int sg(int now,int fa) { int sum=0; for(int i=0;i<gra[now].size();i++) if(gra[now][i]!=fa) sum^=sg(gra[now][i],now)+1; ...
b1102758c9c1b5e5ae0db2f54bfe5ec797e8ee16
47221b1802a4cfee376fbc6885c51a4b62b55979
rish1712/Tidier-Drawing-of-Trees
/main1.cpp
C++
cpp
3,530
no_license
#include "tree.h" #include "primitive.h" #include <GL/GL.h> #include <vector> #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include <stdio.h> #include <math.h> #include <iostream> using namespace std; void init() { /*!glClear function sets the bitplane area of the wind...
8e5672fe77866ea0a3a968d2e975cbdbe03be7b6
414656145b7647201ab442caea8ba2da02bc5b22
srzmldl/zzyFighting
/Lesson2/uva10917.cpp
C++
cpp
1,923
no_license
#include <bits/stdc++.h> #define REPP(i, a, b) for (int i = (int) (a); i <= (int) (b); ++i) #define REP(i, n) for (int i = 0; i < (int) (n); ++i) #define mem(a) memset(a, 0, sizeof(a)) #define MAXN 1100 #define MAXM 2200000 #define INF 0x3f3f3f3f using namespace std; typedef int arrayN[MAXN], arrayM[MAXM]; int n, m, ...
236897edce5ccf41db9297196bc103cff084782e
f9e9f4afe7dfbc54456268caa883a739cf1846ec
CU-0xff/juliet-cpp
/000/243/260/CWE762_Mismatched_Memory_Management_Routines__new_array_free_wchar_t_08.cpp
C++
cpp
4,954
no_license
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE762_Mismatched_Memory_Management_Routines__new_array_free_wchar_t_08.cpp Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_array_free.label.xml Template File: sources-sinks-08.tmpl.cpp */ /* * @description * CWE: 762 Mismatched Memory Management ...
9665766e07889de3217cf708efa26d40cbf4a224
003cd7ab3937c83c7decba5646ac036f11d045e1
nandinisood/Pattern
/pattern8.cpp
C++
cpp
253
no_license
#include<iostream> #include<math.h> using namespace std; int main() { int i,j,n,k=1; cin>>n; for (i=1; i<=n; i++) { for (j=1; j<=pow(2,i-1); j++) {cout<<k++<<" "; if(k==10) k=1; } cout<<endl; } return 0; }
97ffaa812d04435ab02c6abf4a48c4caff606152
a9b49b8686ffdb8c4e4b94c24c7f8703c4aaf002
whoozle/gdsdecomp
/register_types.cpp
C++
cpp
1,008
permissive
/*************************************************************************/ /* register_types.cpp */ /*************************************************************************/ #include "register_types.h" #include "core/class_db.h" #include "bytecode/bytecode_version...
ca41ded1f9514f4d32e628da928f0bae452bd516
03f77d2cd680419e9f5ab722cbf3c915871f683e
Tigrouzen/UnrealEngine-4
/Engine/Source/Runtime/Engine/Private/SoundNodeDelay.cpp
C++
cpp
2,208
no_license
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. #include "EnginePrivate.h" #include "SoundDefinitions.h" /*----------------------------------------------------------------------------- USoundNodeDelay implementation. -----------------------------------------------------------------------------*...
a5807874a7edec6b925a8e4b39c1306365c1c865
efec7887c9ccaead3d79e7682a210f3a8edbcb0e
ArtemMartus/NewLife
/Logic/Map.cpp
C++
cpp
2,122
no_license
#include "../Header.h" #include "../Map.h" Cell* Map::find(unsigned int x, unsigned int y) { Cell * c = 0; if (x >= 0 && x < 0xff && y >= 0 && y < 0xff) { c = cellBlock.getCell(block_id(x, y)); try{ if (c) return c; } catch (...){ return 0; } } return 0; } Map::Map(un...
6c8bced14e97b0ee1cdcf9d9f0f6144492b5aa63
28f06daa7df13badf14406f5d14465ef33e576ac
Pussycat-Doll/My_leetcode.
/257力扣二叉树的所有路径/257力扣二叉树的所有路径/源.cpp
C++
cpp
932
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 { public: vector<string> ve; string path; vector<string> binaryTreePaths(TreeNode* root) { ...
1d5b26aa09bd8582857ce149ebdd92f1b021a7c6
909cd32bf03be8ee7dad7e1d2f542129d72b4a4f
sananasir236/project1
/T4.Fibonacci Number For Crud.cpp
C++
cpp
681
no_license
#include <iostream> using namespace std; int main() { char repeat; int initialPopulation, numberOfDays; do { cout<<"\n\n\n Enter the initial size of a green crud population (in pounds) ----->"; cin>> initialPopulation; cout<<"Enter the number of days ----> "; cin>>numberOfDays; int f0 = 0; int f1 = initial...
57ed24d7ef325e44932bf6572ef1079f756831b5
6377408b040821a4bc15aa1d40927cebe616847d
Avogadro/avogadrolibs
/tests/rendering/cameratest.cpp
C++
cpp
3,895
permissive
/****************************************************************************** This source file is part of the Avogadro project. Copyright 2012 Kitware, Inc. This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software distri...
6d4356e7ccc526b6077263d50f57c71c5454eb24
0857bc40e1be179470fe4ed93efae34aaaac1a1f
Reoptima/RPGGame
/main.cpp
C++
cpp
2,748
no_license
#include "src/hero/HeroClass.h" #include "src/hero/grade/WarriorClass.h" #include "src/hero/grade/ArcherClass.h" #include "src/hero/grade/MagClass.h" #include "src/hero/grade/AssassinClass.h" #include "Headers/ManagementSave.h" HeroClass Hero = HeroClass(); #include <iostream> #include <windows.h> #inc...
7d6d3fda2480500e93e6f34a89d66e1e2584869c
434c8e6b31ef04673ce3178b65875c17e252c111
WhiZTiM/coliru
/Archive2/58/8afa2a353942fc/main.cpp
C++
cpp
3,901
no_license
#include <boost/iterator/iterator_facade.hpp> #include <iterator> #include <cassert> template<class base> class concatenated_range_iterator : public boost::iterator_facade< concatenated_range_iterator<base>, typename std::iterator_traits<base>::value_type, typename std::iterator_traits<bas...
54c262ed355913e9502dc8019050c76550dc0338
d3aff48dd38ca7827c8cdcd6e47e93fcf206b5c1
fabalcu97/ADA
/Cutting-Rod/main.cpp
C++
cpp
1,150
no_license
#include <tuple> int max(int a, int b){ if(a>b){ return a; } return b; } int Recursive_CutRod(int p[], int n){ if (n == 0){ return 0; } int q = -1; for (int i = 0; i < n; ++i) { q = max(q, p[i] + Recursive_CutRod(p, n - i)); } return q; } int TD_CutRod_Aux(int p[], int n, int r[]){ if (r[n-1] >= 0) ...
dae38473faa36eac9fc012176b1d91ddc2f9e60a
a8d160d80e32c783702c9edc7271c57fcdf61a90
Kwooley/CS-V13
/Source/Ch02/02-12.cpp
C++
cpp
294
no_license
#include <iostream> #include <fstream> #include <string> using namespace std; int main( ) { string text; fstream inputStream; inputStream.open("player.txt"); while (inputStream >> text) { cout << text << endl; } inputStream.close(); return 0; }
19c32d7613912e6f8c496c0820900a68f77b3071
a022ea7c3497e1b25ec4e546dd9cc83ec368fe24
niuxu18/logTracker-old
/second/download/mutt/gumtree/mutt_repos_function_818_mutt-1.4.2.3.cpp
C++
cpp
2,467
no_license
int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach, int mode, int privacy) { char buffer[LONG_STRING]; char *p; LIST *tmp = env->userhdrs; if (mode == 0 && !privacy) fputs (mutt_make_date (buffer, sizeof(buffer)), fp); /* OPTUSEFROM is not consulted here so that we can still...
ab22607254351a42c63730ba8571da8f8330fb67
725feddd4d5c6235b5ef6554e985830e130ad1e0
kitabatake/AtcoderBeginnerContest
/031/b.cpp
C++
cpp
339
no_license
#include <iostream> #include <vector> using namespace std; int main(){ int L, H, N; cin >> L >> H >> N; vector<int> a(N); for (int i = 0; i < N; i++) cin >> a[i]; for (int i = 0; i < N; i++) { if (a[i] > H) cout << -1 << endl; else if (a[i] >= L && a[i] <= H) cout << 0 << endl; else cout << L - ...
db2761c66322a1a98297206f1b5d201d2ade94f8
2ce4b733603bc61c4922b9fe56019733f2c17058
sorcererxw/yugabyte-db
/src/yb/tools/yb-bulk_load.cc
C++
cc
21,324
permissive
// Copyright (c) YugaByte, 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/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writ...
cdc5f68501d90fb30d67154a03b03eb7bd75ae81
398b029ba567afc61b9e2d0bd51422a0697f445c
wky32768/my-code
/loj.ac/loj10162.cpp
C++
cpp
1,523
no_license
/* 基环树,就是NOIP2018D2T1的那个东西 基本操作是先找环,然后对每一个环上的点向下DFS 其他的更没有上司的舞会差不多 */ #include <bits/stdc++.h> #define int long long using namespace std; const int N = 2300000; int n, x, y, cnt, rt, ans, dp[N][2], head[N], val[N], vis[N], fa[N]; struct node { int next, to; } sxd[N]; void add(int u, int v) { sxd[++cnt].next = h...
e758ebb0417b5b212d0fd005666dae27f50574d0
ba13f250f80110a7cae950d6b3610662800ff379
donaldlee2010/plaidml
/tile/codegen/test/fuse.cc
C++
cc
11,148
permissive
// Copyright 2018, Intel Corp. #include <gmock/gmock.h> #include "base/util/stream_container.h" #include "testing/matchers.h" #include "tile/codegen/cache.h" #include "tile/codegen/fuse.h" #include "tile/codegen/localize.h" #include "tile/codegen/scalarize.h" #include "tile/codegen/tile.h" #include "tile/codegen/vm.h...
cb850aea69a0edce4e84225d07452447859536ec
6b4fca1e499f13b4588d82182b2ab5a78b7c9ab4
pedrojfs17/FEUP-AEDA
/Testes/PA1718-3/Student.cpp
C++
cpp
1,455
no_license
/* * Student.cpp * * Created on: 10/12/2017 * Author: CS */ #include "Student.h" Student::Student(string name, string eMail) { this->name = name; this->eMail = eMail; } string Student::getName() const { return this->name; } void Student::setEMail(string eMail) { this->eMail = eMail; } string Student...
06b5488a3c597f46b55d74c43760d4b2f7b5d0f5
f22ffda6adbabf00ba26585a0ebb8163c51e83d8
davmrtl/IFT2008-Laboratoires-E2017
/Laboratoire2/Question2/main.cpp
C++
cpp
1,179
no_license
#include <iostream> using namespace std; int somme(int, int); float somme(float, float); int* somme(int[10], int[10]); int main() { int a = 5; int b = 10; cout << "Somme d'entiers:" << endl; cout << "5 + 10 = " << somme(a, b) << endl; cout << endl; float x = 3.4; float y = 5.7; cout << "Somme de réels :" <...
92dab3f1d41a9ddd27e4b5d906f7bc55ae94b1cd
40628d79fd01563e3e5e0921ffe237962bbb6f7f
karimchamaa/RoboND-MCLLab
/main.cpp
C++
cpp
8,945
no_license
//Compile with: g++ main.cpp -o app -std=c++11 -I/usr/include/python2.7 -lpython2.7 #include "src/matplotlibcpp.h" //Graph Library #include <iostream> #include <string> #include <math.h> #include <stdexcept> // throw errors #include <random> //C++ 11 Random Numbers namespace plt = matplotlibcpp; using namespace std; ...
1dfa1aad91dda80fb409ab05dad6902ce88da912
6409b09a895952fbcf64d46703299e5e05b5f55b
dbindel/hiqlab
/sandbox/parallel/petsc/old/qpassembly.cc
C++
cc
7,095
no_license
/* HiQLab * Copyright (c): Regents of the University of California * */ #include <cstring> #include <cstdlib> #include <vector> #include <algorithm> #include <iostream> #include "qassembly.h" #include "qpassembly.h" #include "mesh.h" #include "petscksp.h" #define MAXNEN 64 using namespace std; QPETScAssembler...
9b8c694b08dab645bc865c40600e10c64a868844
43ca0ea17408dc64d8456b8ff6c4f05e5412f5ae
cznice/sql-parser
/test/sql_tests.cpp
C++
cpp
20,118
permissive
/* * sql_tests.cpp */ #include "thirdparty/microtest/microtest.h" #include "SQLParser.h" #include "util/sqlhelper.h" #include "sql_asserts.h" using namespace hsql; TEST(DeleteStatementTest) { SQLParserResult result; SQLParser::parse("DELETE FROM students WHERE grade > 2.0;", &result); ASSERT(result.isVali...
8b96ef90c449ed1c54b8da1edf6260200a378829
e15e2871fc04a121eb0fdce52a1ca0d4df93789b
LITdrive/aadc2018
/src/aadcUser/templates/TensorFlowTemplate/TensorFlowTemplate.cpp
C++
cpp
4,314
permissive
/********************************************************************* Copyright (c) 2018 Audi Autonomous Driving Cup. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code ...
73ffbdd5b3d11a32e1b60459f3ba6bb1e94ed511
a38c6a40f08abd4f11bc5bd713b2a5c60e38750c
sid24ss/multi_agent_planner
/multi_agent_planner/src/ParameterCatalog.cpp
C++
cpp
6,403
no_license
#include <multi_agent_planner/ParameterCatalog.h> #include <multi_agent_planner/LoggerNames.h> #include <multi_agent_planner/Utilities.h> #include <boost/filesystem.hpp> #include <log4cxx/logger.h> using namespace boost::filesystem; using namespace multi_agent_planner; using namespace std; ParameterCatalog::Paramete...
b32b8bcd8760b43fb449affa804f69ed54a29f21
26272df5023fc57a9d1c4489c75905a24f4ae36a
zahidaliayub/globaltoken
/src/chainparams.cpp
C++
cpp
17,423
permissive
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Copyright (c) 2017 The Globaltoken Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chainparams.h" #includ...
99622eb888fae7fb855f704f22f27cc955320928
5bbb995099a41461779ee54d00d5e319b7894df3
eslam-99/programming-abstractions
/Chapter_02/Exercise_2_01/2_01.cpp
C++
cpp
726
no_license
/* * File: 2_1.cpp * ------------- * This program reads a number in Celcius and converts it to * Fahrenheit. This time with a function! * */ #include <iostream> using namespace std; double convertToFahrenheit(double value); // Constants const int SENTINEL = 0; int main() { double value; whil...