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
919b2d5a497a994b46bf7d6fcd6beda050b88ca8
43844aaed27558d3f48f2f299f8b3c5e7cd43522
instance01/GRAB0
/src/envs/cartpole.cpp
C++
cpp
1,981
no_license
#include "cartpole.hpp" // Original source from Python. // https://github.com/openai/gym CartPoleEnv::CartPoleEnv() { std::random_device rd; generator = std::mt19937(rd()); reset(generator); // State is already normalized well enough.. expected_mean = {0., 0., 0., 0.}; // Used to be {5., 2., 1., 2.}, ...
bb983f01df5df779837f7e6fc49823ec16b01ffa
a6323d7cdec8c02a4d6c5b8f5aab6bf251c5f4c9
tlsdorye/Problem-Solving
/BOJ/14442.cpp
C++
cpp
1,378
no_license
#include <iostream> #include <vector> #include <queue> #include <utility> using namespace std; class Node { public: int x, y, k, m; Node(int x, int y, int k, int m) { this->x = x; this->y = y; this->k = k; this->m = m; } }; int D[1001][1001], visit[1001][1001]; int dx[4] = { 1,-1,0,0 }; int dy[4] = { 0,0,...
31df73864c4d9a02f64432880672d5cef6b4ace3
a14eb17e6e76d68c848e6f4e9d8f9d0e91217639
dayuyuhai/Haizei_class
/OJ/536-BFS.最大黑色区域.cpp
C++
cpp
1,466
no_license
/************************************************************************* > File Name: 535-BFS.瓷砖.cpp > Author: > Mail: > Created Time: Thu 24 Sep 2020 06:20:36 PM CST ************************************************************************/ #include<queue> #include<iostream> using namespace std; int m, n, an...
e51a24e0099966a90633077c0038afa3824094bd
e8caddcaf329065121974c34a39a2e630f39e956
micro123/GTEST-GMOCK
/SimpleGMockUsageWithMainDeclare/main.cpp
C++
cpp
643
no_license
#include "someinterface.h" #include <gmock/gmock.h> class MockResource: public IResource { public: MOCK_CONST_METHOD0(GetInteger, int()); MOCK_METHOD1(TestResource, bool(int)); }; bool SomeMockBehavior(int x) { return x % 2 == 0; } int main(int argc, char* argv[]) { testing::InitGoogleMock(&argc, argv); test...
8bc66cbace378e5ad488b3f83c080421b699386b
b6d22edadc7d877bdf78431d51231de3ff7c8275
RTootskie/ProgrammingQuirks
/SchoolExam.cpp
C++
cpp
3,047
no_license
/* Exercise: With the following typedef structs make the output be something like: "From Helsinki arrives at 10-01-2020" */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> typedef struct { int hours, mins; } DURATION; typedef struct { int day; char month[4]; int year; ...
d7ec1ecad401f5ab9c9682b9fda90db69b042988
80e0ddb9ad6413906f1f96a0ff149732ddede48c
fsq/leetcode
/1648. Sell Diminishing-Valued Colored Balls.cpp
C++
cpp
738
no_license
class Solution { public: const int M = 1000000007; int maxProfit(vector<int>& a, int o) { sort(a.begin(), a.end(), std::greater<int>()); long long ans = 0, c = 1; for (auto i=0; i<a.size(); ++i) { long long x = a[i]; long long nxt = i+1==a.size() ? 0 : a...
243ba85b97e1d2b6d849e845693b76242070d1e1
cb5b540b660619fe864bce594095f9c1cbedfa32
LuckyKingSSS/LuckKing
/MeidaPlayerView/GeneratedFiles/Debug/moc_displayview.cpp
C++
cpp
2,743
no_license
/**************************************************************************** ** Meta object code from reading C++ file 'displayview.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.4.0) ** ** WARNING! All changes made in this file will be lost! ***************************************************...
4c028ee4b2e694b4f64316215fd2bf50119bc737
3248b7d936f060a89f9392b38bcca5a9a9db1866
quitanddead/Rehab
/Server Specific Files/Server 1 & 2/DayZ_Epoch_11.Chernarus/custom/traders/Category/NeutralSniperRifleAmmo.hpp
C++
hpp
493
no_license
class Category_647 { class 20Rnd_762x51_DMR { type = "trade_items"; buy[] = {4,"ItemGoldBar"}; sell[] = {2,"ItemSilverBar10oz"}; }; class 10Rnd_762x54_SVD { type = "trade_items"; buy[] = {2,"ItemGoldBar"}; sell[] = {1,"ItemGoldBar"}; }; class 5Rnd_762x51_M24 { type = "trade_items"; buy[] = {5,"Item...
5b8875949da8f9c624727cd1333978f5f17a195e
2a588dae0852780dd8d6f23a53c9c9640c476b1b
Holytu/ProjectEulerNetSolution
/EulerNet_Problem_007.cpp
C++
cpp
386
no_license
#include <iostream> #include <math.h> using namespace std; bool isPrime(int x) { if( x % 2 == 0) return false; for(int i = 3; i <= sqrt(x) ; i+=2 ) { if(x % i == 0) return false; } return true; } int main() { int nth = 1 ; long long int number = 2; while(nth < 10001) { if(isPrime(number) == true) ...
799527af874aa7dc345ea7fa09cbbf3d3dfed40a
8c6fc1ede6582b05a806af8adabf1b738a1ecf42
DMikolajczyk/PrisonSurviveUE
/Source/PrisonSurviveUE/Waypoint.cpp
C++
cpp
1,387
no_license
// Fill out your copyright notice in the Description page of Project Settings. #include "Waypoint.h" #include "PrisonerCharacterAI.h" // Sets default values AWaypoint::AWaypoint() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryA...
a3a291b0d1bcab45f00fe0c99d53a44486197fd4
662e7354d4b2bb0a3c0aa1de63b1b8b97bd96507
wang17/graph
/include/andres/ilp/cplex.hxx
C++
hxx
7,664
no_license
#pragma once #ifndef ANDRES_CPLEX_HXX #define ANDRES_CPLEX_HXX #include "ilcplex/ilocplex.h" namespace andres { namespace ilp { template<class T = double> class Cplex { public: typedef T value_type; enum PreSolver {PRE_SOLVER_AUTO, PRE_SOLVER_PRIMAL, PRE_SOLVER_DUAL, PRE_SOLVER_NONE}; enum LPSolver {LP_S...
4254e70db3b7980f0f532534f376ae6c8c8620f8
16d44acd50ae64223d53adb5d7140caa5120e1e6
stvsun/Albany
/src/Hydride/evaluators/HydrideWResid.hpp
C++
hpp
1,670
permissive
//*****************************************************************// // Albany 2.0: Copyright 2012 Sandia Corporation // // This Software is released under the BSD license detailed // // in the file "license.txt" in the top-level Albany directory // //**************************************...
384f526454dd6a6fb95f8bf289afc55123f50dbb
aece901339b6c24fac00c166c10da24a3753f62d
kyawakyawa/tubular-cpp
/src/io/cyhair.cc
C++
cc
5,473
permissive
#include "io/cyhair.h" #include "logger/logger.h" namespace tubular { CyHair::CyHair(void) : flags_(0), num_strands_(0), total_points_(0), default_segments_(-1), default_thickness_(0.01f), default_transparency_(1.0f) { default_color_[0] = 0.5f; default_color_[1] = 0.5f; defaul...
b5ec76801c64170706912ac415c13b9be62fd030
fb3f1b7d992c4047c771f005ececd8ee017da046
XuXo/openFrameworks_Chinese
/of_v0.8.0_osx_Chinese/examples/graphics 图像/blendingExample图像混合模式/src/testApp.cpp
C++
cpp
3,181
permissive
#include "testApp.h" //-------------------------------------------------------------- void testApp::setup(){ alpha = 0; counter = 0; sprintf(eventString, "Alpha"); vagRounded.loadFont("vag.ttf", 32); ofBackground(50,50,50); rainbow.allocate(256, 256, OF_IMAGE_COLOR_ALPHA); rainbo...
aea361ccbfb37330df532c5d040942cb82b4325f
d91a1d2e69901a6a0c9c8f30a4f17a049368dd5a
humanoid-path-planner/hpp-manipulation
/src/manipulation-planner.cc
C++
cc
18,581
permissive
// Copyright (c) 2014, LAAS-CNRS // Authors: Joseph Mirabel (joseph.mirabel@laas.fr) // // 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 must retain the above copyright // n...
4b9ba2fd3a9608fc3a9a28e3936dbe1c33c5dce9
73c84ebe8f4cf24ec48efa51f638eb2ef054683e
geekypandey/cc_solutions
/cses/sorting_and_searching/collecting_numbers.cpp
C++
cpp
1,085
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vl = vector<ll>; using pi = pair<int, int>; using pl = pair<ll, ll>; #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) #define PB push_back #define MP make_pair #define F first #define S second #define...
df8f747faf2aa37fa567d09fee1fcd7546bc4215
9e6874558a78da7121e03ad6f7420e94d9ae6e85
TeCSAR-UNCC/gem5-SALAM
/src/dev/arm/gic_v2.hh
C++
hh
18,134
permissive
/* * Copyright (c) 2010, 2013, 2015-2020 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 implementa...
931b4bf7a3a3e200a0447960fe1ece4e1c68cfc8
34976d163d3f4712a8051f334f8c3bc4a0920d79
joelday/papyrus-debug-server
/dependencies/skse64/src/skse64/CommonLibSSE/src/RE/TESTopicInfo.cpp
C++
cpp
381
permissive
#include "RE/TESTopicInfo.h" #include "RE/TESTopic.h" // TESTopic namespace RE { TESTopicInfo::ResponseData::~ResponseData() { delete next; } float TESTopicInfo::ResponseFlags::GetResetHours() const { return static_cast<float>(resetHours); } DialogueData TESTopicInfo::GetDialogueData(Actor* a_speaker...
8f8d26fa621fe2025841e5ab1ea14888ea8e336d
0ab0f12c5ad58b4106ff6cc5e5b81d3cc5fbf188
ctinkong/cms
/decode/BitStream.cpp
C++
cpp
1,644
no_license
#include "BitStream.h" #include <math.h> CBitStream::CBitStream(void) { } CBitStream::~CBitStream(void) { } void CBitStream::InitBits(uint8_t *buf, int buf_size) { m_error = 0; m_index = 0; m_buffer = buf; m_bufferSize = buf_size; } uint32_t CBitStream::GetBits(int n) { uint32_t ret = 0; if (GetBitsLeft() < n...
fa12594327b2a0d0332d395b6aa79896b65a27f5
0d745a620bb673786660027932c646dbec26b130
roland-wilhelm/cg
/src/Aufgabe2.cpp
C++
cpp
2,058
no_license
/* * Aufgabe2.cpp * * Created on: 30.05.2013 * Author: Roland */ #include "Aufgabe2.h" #include "SvgFile.h" #include <iostream> using namespace std; #define SVG_FILES_BASE "data/" #define TEST_SVG SVG_FILES_BASE "Test.svg" #define GERMANY_SVG SVG_FILES_BASE "DeutschlandMitStaedten.svg...
db4236d93765c05c12c0faf42d5cc6b84a8ca7d1
eb2f58911bf2480a18a1909774d4d03e167d0f2a
thmolena/Random-Pixel-Generator
/main-mondrian.cpp
C++
cpp
8,043
permissive
/* Authors: Thy H. Nguyen Python version of Sierpinski's triangle by Jan Pearce; Conversion to C++ by Jesse W. Walker C-Turtle by Jesse W. Walker, Getrandom by Jan Pearce */ #include "CTurtle.hpp" //This brings in the CTurtle library for use #include <iostream> //for input & output #include <rand...
1f0577d179c23bdb5fdb4908c2143f46d5592ade
9c1731c8bd3bdfee50ebd204cc7d282f149fd46b
anhnguyendepocen/SMRD
/inst/include/altsim/altsim.hpp
C++
hpp
1,666
no_license
#ifndef SMRD_altsim_H #define SMRD_altsim_H Rcpp::List altsim(Rcpp::NumericMatrix x, Rcpp::NumericMatrix y, Rcpp::IntegerVector cen, Rcpp::IntegerVector wt, int nrow, int nter, int ny, int nty, ...
9246a80a0c7edc147cad5e001a743b1b8400dced
64a86315d4b3d0ca6a814f9f28116cd7c65f452d
cvetkovic/kdp
/IR3KDP_2016_K.1.cpp
C++
cpp
722
no_license
monitor Upis { struct Zahtev { int broj; Zahtev* sledeci; Zahtev(int b, Zahtev* z) : broj(b), sledeci(z) {} } bool zauzeto = false; int dodelaIndeksa = 1; Zahtev* glava = 0; int Upisi() { if (glava == 0) return dodelaIndeksa++; else { Zahtev* z = glava; glava ...
556c78bbb72d8dd7aed7cd96642580b797652be8
ac3074c833fca901eee293113925a44052749b82
okutane/miranda
/miranda/src/modules/clist/Docking.cpp
C++
cpp
9,973
no_license
/* Miranda IM: the free IM client for Microsoft* Windows* Copyright 2000-2017 Miranda ICQ/IM project, all portions of this codebase are copyrighted to the people listed in contributors.txt. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
7deadc357e1e2653d50be18516d60059ea97e1b5
6c1f7c1ba64025f78c92ba6c375691ba1faec93e
operativeF/Kvasir
/Lib/Chip/CM4/Freescale/MK20F12/RTC.hpp
C++
hpp
35,803
permissive
#pragma once #include <Register/Utility.hpp> namespace Kvasir { //Secure Real Time Clock namespace RtcTsr{ ///<RTC Time Seconds Register using Addr = Register::Address<0x4003d000,0x00000000,0x00000000,std::uint32_t>; ///Time Seconds Register constexpr Register::FieldLocation<Addr,Registe...
5e09fb1a1459ecadd437c805576387ead9721a55
a30133b9dd5fbac9a6e8ad0d78988cecd7cdef55
niuxu18/logTracker-old
/second/download/rtorrent/gumtree/rtorrent_patch_hunk_123.cpp
C++
cpp
943
no_license
Range range = rak::advance_bidirectional(m_list->begin(), *m_focus != m_list->end() ? *m_focus : m_list->begin(), m_list->end(), m_canvas->get_height() - y); - if (m_download->get_download().chunks_total() <= 0) + if (m_download->download()->chunks_total() <= 0) throw std::logic...
db0d48ce09897ce6fb3549741966ad9971bda54f
a86e017733b33c586dd615ac6b81d63d07aee428
autyinjing/Cpp-learning
/C++ Primer plus/10_class/example/stock10.cpp
C++
cpp
2,150
no_license
/* * ===================================================================================== * * Filename: stock10.cpp * * Description: * * Version: 1.0 * Created: 2014年09月09日 17时20分48秒 * Revision: none * Compiler: gcc * * Author: Aut(yinjing), linuxeryinjing...
206b048c0cbe20c73dee5e2b425d85e146fec643
7c1cc588623fca2401c29acb07c5c9aeee3bb573
mongoose-os-apps/shelly-homekit
/src/shelly_input.cpp
C++
cpp
1,912
permissive
/* * Copyright (c) Shelly-HomeKit Contributors * All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
c662bbca90f71cd7da59398f8e1e0ac78bbf1f4f
705157605351ae6606b28da3f829992380ccbf19
cudevconst/Cau_truc_du_lieu_giai_thuat
/to_hop_co_tong_bang_S.cpp
C++
cpp
820
no_license
#include <bits/stdc++.h> using namespace std; vector<int> v; int a[21]; int n,s; bool ok; void print() { cout<<"["; for(int i=0;i<v.size();++i) { cout<<v[i]; if(i<v.size()-1) { cout<<" "; } } cout<<"]"; } void out(int i,int sum) { if(sum>s) r...
10efff73ab87946422b8a7864b0326f03e475fb6
f7fa46648ad0b8ab027fca3f76c0bb6c5359a191
denisbohm/firefly-ice-api
/Windows/FireflyDevice/FDTime.cpp
C++
cpp
330
permissive
// // FDTime.cpp // FireflyDevice // // Created by Denis Bohm on 3/27/14. // Copyright (c) 2014 Firefly Design LLC / Denis Bohm. All rights reserved. // #include "FDTime.h" #include <ctime> namespace FireflyDesign { FDTime::time_type FDTime::time() { time_t timer; std::time(&timer); return (time_type)tim...
62ac10835e67303f8cf77079f0866dd815a5dba2
1ea5102ed180564bf3d2d97870045d4db9305c01
RozovrRD/lab-oop
/lab8/trapezoid.cpp
C++
cpp
1,477
no_license
#include "trapezoid.h" Trapezoid::Trapezoid() { m_sideA = 0.0; m_sideB = 0.0; m_height = 0.0; } Trapezoid::Trapezoid(std::istream& is) { is >> *this; } void Trapezoid::print() const { std::cout << *this; } double Trapezoid::area() const { return m_height * (m_sideA + m_sideB) / 2.0; } Trapezoid& Trapezoid::o...
42ebe45da5fbf93ed89e25708cf858051a312d14
f97e128ce5832df4d83493e3c3035c2373cdb06b
wang70937/x-framework
/library/skia/ext/platform_canvas.cpp
C++
cpp
3,177
no_license
#include "platform_canvas.h" #include "bitmap_platform_device_win.h" namespace skia { PlatformCanvas::PlatformCanvas() {} SkDevice* PlatformCanvas::setBitmapDevice(const SkBitmap&) { SkASSERT(false); // Should not be called. return NULL; } // static size_t PlatformCanvas::S...
cc846a5d51a65262d0f35da3cb1aefbcd42e5b70
a69a2dbea13b78eeaa21fa082276ad9777c1b0b5
chicshin/Algorithms
/For_If_String/sum_numbers.cpp
C++
cpp
300
no_license
/* ACMICPC 11720 Find the sum of each number given in a string. */ int main() { int t, sum=0; char num[100] = {0, }; scanf("%d\n", &t); scanf("%s", num); for(int i=0; i<t; ++i) { sum += (num[i]-'0'); //turn char into a integer (-'0') } printf("%d\n", sum); }
53d332db5276103dc0f1cffe72f3cc772c4e6fca
ecb3a8d6e702dd16a9f7e55f0ed773d852ba58c9
StevenQin1996/Maze
/migong/checkpoint2.cpp
C++
cpp
2,043
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> #define SIZE 7 using namespace std; typedef struct{ int x; int y; }Point; Point pt(int x, int y){ Point p = {x,y}; return p; } void start( int maze[][SIZE], int &a, int &b) { for (int i =0; i<SIZE; i++) { for (int j=0; j<SI...
89a1c93b1c412eb92e1aebc2730948142e0f6e42
c2dcfc011dda29a5491b4df179ea5a31ad495af9
Axel13fr/ixblue_ins_stdbin_driver
/ixblue_ins_driver/test/test_ixblue_ins_driver.cpp
C++
cpp
2,858
permissive
#include <gtest/gtest.h> #include "../src/ros_publisher.h" TEST(ROSPublisherTester, CanFillANavSatFixMsg) { ixblue_stdbin_decoder::Data::Position pos; pos.latitude_deg = 1.2345; pos.longitude_deg = 9.8745; pos.altitude_m = 123.456; ixblue_stdbin_decoder::Data::PositionDeviation posDev; posDev...
d376ea6ec3cd10120dcdffae00f0343075c2db1b
71db731091e2213fe879614c8be285849d52764a
LiangYue1981816/WickedEngine
/WickedEngine/wiNetwork_BindLua.cpp
C++
cpp
2,209
permissive
#include "wiNetwork_BindLua.h" #include "wiClient.h" #include "wiServer.h" #include "wiHelper.h" using namespace std; const char wiClient_BindLua::className[] = "Client"; Luna<wiClient_BindLua>::FunctionType wiClient_BindLua::methods[] = { lunamethod(wiClient_BindLua,Poll), { NULL, NULL } }; Luna<wiClient_BindLua>...
36e2931d50d7329a8101c01d2a6c9aff062651d2
faf7e031c4a7dbed63576becce4bd573904ddea1
maloleg/ht8
/gui_manager.cpp
C++
cpp
2,374
no_license
#include "gui_object.h" #include "gui_manager.h" // Статическое поле должно иметь определение GuiManager* GuiManager::m_i=0; // см. про 0, NULL и nullptr в Си++ // Конструктор умолчания GuiManager::GuiManager() : m_focused(0) { m_i = this; } // Глобальная точка доступа (см. паттерн Одиночка) GuiMa...
2a731b8e801bcbe468816ddb7f06bd64cdbc3d9c
a8c682544130190588b551bf2bcaabb0293c9d6e
OscarShen/Sloth
/Sloth-core/src/font/meshCreator/text_mesh_data.hpp
C++
hpp
1,300
no_license
/************************************************************************ * @project : $rootnamespace$ * @class : $safeitemrootname$ * @version : v1.0.0 * @description : * @author : $username$ * @creat : $time$ * @revise : $time$ ****************************************************************...
192c5507030da3552d4000d76bad98ce6e0e5296
4addf017c1a0fc42f110ae9908244db6554d1a97
ccpgames/EveLogLite
/src/logmodel.cpp
C++
cpp
9,476
permissive
#include "logmodel.h" #include <QTcpSocket> #include <QDateTime> #include <QPixmap> #include <QSortFilterProxyModel> #include <QDebug> #include <QFileInfo> #include <QDir> #include <QHostInfo> #include <QTimer> #include <QMessageBox> #include "logmonitorfilemodel.h" #include <cmath> namespace { const uint32_t VERSION...
a9d43ba0a2e1ae09ea1864f33a91d891b176b98c
afbeb82ec0aa920ca30340b311ae8bddeb398b9a
ethanelliott/ICS3U1
/src/Tickets/Tickets.cpp
C++
cpp
11,443
no_license
//*****// Ticket Price Source //*****// //Source file for Ticket Price //(C) Ethan Elliott 2015 #include "../EthanLib.h" Tickets * Tickets::instance = NULL; struct Receipt { int blue; int green; int white; int red; int purple; float blueC = 35.000; float greenC = 31.500; float white...
c6ff4de10d3db76315d3d2007ee8d6df8c89976e
6db754ca286ed9f8bd214010e6b06f85eaa210a8
MicroGuitar/Raw
/speed/parallelfor/tbb_test.cpp
C++
cpp
940
no_license
#include "tbb/task_scheduler_init.h" #include "tbb/blocked_range.h" #include "tbb/parallel_for.h" #include "time.h" #include "stdio.h" using namespace tbb; void Foo(int value) { value = value*value; } class ApplyFoo { int * const my_a; public: void operator() (const blocked_range<size_t> & r) const ...
feb6f19f4b28d408c2c3989d922e715c3a966057
80f2788741ec733c3d388ed65bc69c4e8bb1c039
Seal-Clubber/Ravencoin
/src/merkleblock.cpp
C++
cpp
6,561
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Copyright (c) 2017-2019 The Raven Core developers // Copyright (c) 2020-2021 The Meowcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org...
ec37b3c1325a2056e85e827fc8ecf009eafb507f
1f1ce5fc64cca1a49702393dceaf3714bc7ffb6f
OrangeBaoWang/AutoTuneTMP
/include/autotune/tuners/grid_line_search.hpp
C++
hpp
6,027
permissive
#pragma once #include "../abstract_kernel.hpp" #include "../parameter.hpp" #include "countable_set.hpp" #include <mutex> namespace autotune { namespace tuners { class grid_line_search { private: enum class phase { INITIAL, NEXT, PREV, WAITING_FOR_RESULTS }; countable_set initial_parameters; countable_set cur...
f1efefc63a3f8ac969bfa79484edcce9c34a5cd0
11422bb51466ba0327a5d7c49d2e204e26bfdb7a
zhuzhenping/CTP-.Net
/CTPQQ.Net/CTPQQ.Net/CTPTraderAdapter.cpp
C++
cpp
23,789
no_license
#include "stdafx.h" #include "CTPTraderAdapter.h" #include "Util.h" #include "TraderSpi.h" #include "CTPMDAdapter.h" namespace CTPQQ { CTPTraderAdapter::CTPTraderAdapter() : CTPTraderAdapter("") { } CTPTraderAdapter::CTPTraderAdapter(String^ pszFlowPath) : CTPTraderAdapter(pszFlowPath, false) { } CTPTr...
bfb1c21e1976a81328d15a8cfb6e922de3bf26af
7257fc1ba69d00182e68d39977ded5d184e32dc8
iridium-browser/iridium-browser
/third_party/blink/renderer/core/frame/history_util.cc
C++
cc
1,637
permissive
// Copyright 2021 The Chromium Authors // 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/core/frame/history_util.h" #include "third_party/blink/renderer/platform/weborigin/kurl.h" #include "third_party/blink/renderer/platform/w...
c3ce87979c2108fddc47d62ac640edf36c4b553e
b1da80135095370400a6c9959a17e2620a0c36c0
fzylx/std-make
/include/experimental/fundamental/v3/utility/swallow.hpp
C++
hpp
544
permissive
// 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) // // (C) Copyright 2016 Vicente J. Botet Escriba #ifndef JASEL_EXPERIMENTAL_UTILITY_SWALLOW_HPP #define JASEL_EXPERIMENTAL_UTILITY_SWALLOW_HPP namespace std { na...
457338a8d57caa20b13106b0571a56f4186c3b63
9ac95dfff18048ce0a74e8cfa62f4134d85640d7
risooonho/SurvivalUnrealGame
/Survive/Source/Survive/Menuses/HUD/SHUD.cpp
C++
cpp
548
no_license
#include "Survive.h" #include "SHUD.h" ASHUD::ASHUD() { } void ASHUD::DrawHUD() { Super::DrawHUD(); } void ASHUD::DrawInCenter(UTexture *texture, float scale) { const FVector2D screenSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY()); const FVector2D screenCenter = FVector2D(screenSize.X / 2, screenSi...
6c11df097e8b00e42cdaba7b3904802c500e9d65
bc5b7b3afcf0f896c747d19255d9609e2ad00700
KiseRyota1488/cpp_oop_repos
/Lessons/Lesson 5/Task 1/Task 1.cpp
C++
cpp
298
no_license
#include <iostream> using namespace std; namespace Person { void Print() { cout << "Print person" << endl; } } namespace Animal { void Print() { cout << "Print animal" << endl; } } using namespace Animal; using namespace Person; int main() { Animal::Print(); Person::Print(); }
ae3ff8b8e12d48db5ab12dd1eefb2ce5488d12c7
c15338dbba2a2c3eb8cad03abba727f71d74bd83
kmjp/procon
/atcoder/abc151-200/abc187/c.cpp
C++
cpp
1,195
no_license
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a))...
a199978c4a87909a5a47375bfd02d2529f98094b
f0d2554f13c703ce2b16797537d1c4deaaf3fe52
jbro885/fleece
/Fleece/Core/Path.cc
C++
cc
10,045
permissive
// // Path.cc // // Copyright (c) 2016 Couchbase, Inc All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
09aea8e316dadac1c22c6eb65f5b1310b7740ccb
e0f1fd1f7b2a98eae8d144567180a2c2abb76a31
akin666/ice
/lib/entity/properties/meshproperty.cpp
C++
cpp
406
no_license
/* * meshproperty.cpp * * Created on: 16.11.2011 * Author: akin */ #include "meshproperty.h" namespace ice { const std::string MeshProperty::KEY("mesh"); MeshProperty::MeshProperty() : Property( KEY ) { } MeshProperty::~MeshProperty() { } void MeshProperty::attach( Entity& entity )...
f989c0f7a696a18b650d2b51f47e820dd5773ebd
cdda7c45f40e6e24518eb7e0684350a117ff85ae
yoshi61/Object-Oriented-Programming
/practical-01/main-2-4.cpp
C++
cpp
286
no_license
#include<iostream> using namespace std; extern bool ascending(int*,int); int main(void){ int array[7] = {1,2,3,4,5,6,7}; int n = 6; if (descending(array, n) == 0){ cout << "false \n"; } else { cout << "true \n"; } return 0; }
4c7e9b36e281b2417a40e53a59998f51b7f8c358
00254bed99fa3182a6c8f8ff0832f8a918e8d200
cgilet/amrex-tutorials
/ExampleCodes/SENSEI/Advection_AmrLevel/Source/mainExplicitAmrAndParticles.cpp
C++
cpp
3,630
permissive
#include <new> #include <iostream> #include <iomanip> #include <AMReX_Config.H> #include <AMReX_Amr.H> #include <AMReX_ParmParse.H> #include <AMReX_ParallelDescriptor.H> #include <AMReX_AmrLevel.H> #include "AmrLevelAdv.H" #if !defined(AMREX_PARTICLES) || !defined(AMREX_NO_SENSEI_AMR_INST) #error Incompatible AMReX l...
c914b0c7f7a71abbbcb7a2abd7232a096d6c2f70
0a7e8ad864680f13fb43c9df55e4f3c11cc501c2
houlian0/gdal
/gdal/ogr/ogrsf_frmts/ods/testparser.cpp
C++
cpp
2,180
permissive
/****************************************************************************** * $Id$ * * Component: Test ODS formula Engine * Purpose: * Author: Even Rouault <even dot rouault at mines dash paris dot org> * ****************************************************************************** * Copyright (c) 2012, Ev...
6cbcbe7b98953f5497bc285ffb42c7e8f3cf716f
157da73339a8aa54b8e8f51d18772a7bc000835d
tungstenfabric/tf-controller
/src/vnsw/agent/services/test/pkt_trace_test.cc
C++
cc
10,800
permissive
/* * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. */ #include "base/os.h" #include "testing/gunit.h" #include <sys/types.h> #include <sys/socket.h> #include <netinet/ip.h> #include <netinet/if_ether.h> #include <netinet/in.h> #include <netinet/ip_icmp.h> #include <boost/scoped_array.hpp> #include ...
466af7959db71fe89b736c91d566b4e6620607fc
490f710210a3e6f7a824de00446c1fe2488628f9
Shaco-Ma/leetcode
/43_Multiply_Strings/main.cpp
C++
cpp
1,849
no_license
#include <iostream> #include <vector> /* 给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。 注意:不能使用任何内置的 BigInteger 库或直接将输入转换为整数。 示例 1: 输入: num1 = "2", num2 = "3" 输出: "6" 示例 2: 输入: num1 = "123", num2 = "456" 输出: "56088" //思路,选其中一个字符串,按位乘以另一个字符串,结果相加 从后往前,比如123,456 先取3*456,得到一个值a 再取2*456*遍历次数1,得到b ... 再取x...
cabb9455fe1a1adfbe477291a6e946f854f07b6c
39e76f65d1281fd6724415d4f68940c287a690b3
djmorrsee/school_graphics
/Advanced/Ass08/libs/dj_callbacks/key.cpp
C++
cpp
331
no_license
/* * */ #include "../../dj.h" void key(unsigned char ch, int x, int y) { // Exit on ESC if (ch == 27) exit(0); if (ch == 'r') { v_clear_draw = true; } if (ch == 'c') { v_draw_color = (((v_draw_color + 1) % 3) + 1); // Increment, Constrict to [1,3] scale } } void key_up(unsigned char ch, int x, in...
3a110922576b872f7b4301cb4da676b2fee3c64e
06231e0ab4de32f6fad12a0a399a11882d3eac20
vlamicela/vtlDSA2
/A08_CameraClass/AppClass.cpp
C++
cpp
4,008
no_license
#include "AppClass.h" void AppClass::InitWindow(String a_sWindowName) { super::InitWindow("E10_Projections"); // Window Name } //vtlCamera* m_vCam; void AppClass::InitVariables(void) { //Generate the floor m_pFloor = new PrimitiveClass(); m_pFloor->GeneratePlane(100.0f, REGREEN); //Launch the lions lionB = new P...
abfffd029ecf8c6df2e7f4e284bed3102719432b
c342e3cf3d458eebc9d848a16c15847e440eaad1
HavinLeung/cpp_leetcode
/group_anagrams.cpp
C++
cpp
1,051
no_license
#include <vector> #include <algorithm> #include <map> #include <iostream> #define ll long long #define ul unsigned long long using std::vector; using std::string; class Solution { private: static string count(const string& str){ // making a custom hash function would probably be ideal but I'm lazy ...
d109d5b06ecb3a06e3c5a56b680d961e9b23d565
1c2bf8f677b3a5f968a46b4384143ffe75ff5829
Vishwesh14/CPP-Simple-Math-Interpreter
/tokens.cpp
C++
cpp
960
permissive
#include <iostream> #include <string> #include "tokens.h" namespace Tokens { Token::Token(TokenType type, double value) { this->type = type; this->value = value; } Token::operator std::string const() { std::string s; switch (type) { case NUMBER: s += "NUMBER";...
5525c46827b7340d2fe474617b5fd94d138f7f7c
1c87a80bbd9fddda3fd60fc27da866665f9a88f3
rjzhao1/Adv-Programming
/Asg4/cix.cpp
C++
cpp
6,074
no_license
// $Id: cix.cpp,v 1.9 2019-04-05 15:04:28-07 - - $ #include <iostream> #include <memory> #include <string> #include <unordered_map> #include <vector> #include <fstream> using namespace std; #include <libgen.h> #include <sys/types.h> #include <unistd.h> #include "protocol.h" #include "logstream.h" #include "sockets.h...
3c1b6717d035081b7e6a96877d019224337ccbfd
ad696e935116ee3fdeec6dd036006b2e15a68810
mastersingh24/amcl
/version3/cpp/rom_curve_NUMS512W.cpp
C++
cpp
1,742
permissive
#include "arch.h" #include "ecp_NUMS512W.h" namespace NUMS512W { /* NUMS 512-bit Curve - Weierstrass */ #if CHUNK==16 #error Not supported #endif #if CHUNK==32 using namespace B512_29; const int CURVE_A= -3; const int CURVE_B_I= 121243; const BIG CURVE_B= {0x1D99B,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x...
35896475066853c4e25981782284876d93d05a55
ed0fad850f4ed330db857a6038c83b4e6fbcc9b1
andre-wojtowicz/image-processing-project-student
/src/gui/dialogs/corner_harris_dialog.cpp
C++
cpp
622
no_license
#include "corner_harris_dialog.h" #include "ui_corner_harris_dialog.h" CornerHarrisDialog::CornerHarrisDialog(QWidget* parent) : QDialog(parent), ui(new Ui::CornerHarrisDialog) { ui->setupUi(this); setFixedSize(size()); } CornerHarrisDialog::~CornerHarrisDialog() { delete ui; } int CornerHarrisDi...
5f2abe8a87026ef5e0f49a474b3cd53f61dd3e36
76a4f1c43fd249f443823a28af0b98f73bc5b603
XGoldDragon/fantomcoin
/tests/core_tests/chaingen.cpp
C++
cpp
25,434
permissive
// Copyright (c) 2014-2018, The Monero Project // // 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 must retain the above copyright notice, this list o...
3d8a7ef0a335bb0b80c3b1b2548b28dd1f030b2a
12105cee68fa7e5d6645749d764af9d765adc795
davidgreisler/four-in-a-line
/tests/Game/FourInALine/ArtificialIntelligenceTest.hpp
C++
hpp
482
permissive
#ifndef TESTS_GAME_FOUR_IN_A_LINE_ARTIFICIALINTELLIGENCETEST_HPP #define TESTS_GAME_FOUR_IN_A_LINE_ARTIFICIALINTELLIGENCETEST_HPP #include <QtTest/QTest> /** * Units tests for the Game::FourInALine::ArtificialIntelligence class. */ class ArtificialIntelligenceTest : public QObject { Q_OBJECT private slots: ...
b5b22a744b9b21439e2a4042bac3f28e1448f7e1
70d908cb36c17b5226001f0510dd576d669d0b2d
nasacj/ddb_sdk
/DDBSDK/DDBSDK_PC_m/DDBSDK_PC_m/ddbsdk_dmb/Dmb.cpp
C++
cpp
6,474
no_license
#include <list> #include <Windows.h> #include <process.h> #include "Dmb.h" #include <stdio.h> #include <winbase.h> #include "HG_DAB/DAB_public.h" #include "HG_DAB/DabWin.h" #include "../log/LocalLog.h" #define MAXSERVICENUM 12 SERVINFORM serviceInfoList[MAXSERVICENUM]; int serviceNumber = 0; extern void DataCallback...
2beaebaa68081acc085c2f4ee3c49987fd725329
66a9e50bfc41a9834c9b7d1752dcda11b9ab4f66
reed-lau/rclcpp
/rclcpp/test/test_local_parameters.cpp
C++
cpp
2,298
permissive
// Copyright 2018 Open Source Robotics Foundation, 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 appli...
ef5207e7ccbc7d21e8b1bacff3e4b752854ef78a
c6c79df7285b336dbb4c39d16d57eb5b75786eeb
wvk86/MediaSDK
/_studio/mfx_lib/encode_hw/h265/src/mfx_h265_encode_hw_utils.cpp
C++
cpp
127,496
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, publ...
fa47d2788991b58371ebbd984c5d01a0e4d1d43e
6b0907753e0c12d54436c830af4091643393893d
chinajeffery/MPC-BE--1.2.3
/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Internal.cpp
C++
cpp
53,668
permissive
/* Copyright (c) MediaArea.net SARL. All Rights Reserved. * * Use of this source code is governed by a BSD-style license that can * be found in the License.html file in the root of the source tree. */ //--------------------------------------------------------------------------- // Pre-compilation #include "Medi...
8830f0f3cbf0b51aae2611f1f33807b198db3885
41995889eafab46ebc25bd288ff29592c9501dfd
wcysai/CodeLibrary
/Codeforces/Global/6/F.cpp
C++
cpp
2,164
no_license
#include<bits/stdc++.h> #define MAXN 1000005 #define MAXM 30000005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,int> P; vector<int> G[MAXN]; int n,tot,st[MAXN],ed[MAXN]; int f[MAXN],g[MAXN]; int maxi[MAXN]; int cnt[MAXM]; void...
4be31a738b6ccb653028d30a9ebeb0d6ba9d3e98
7ab4a0ee81fd650632da74aa91a91c13953b824f
darrylys/spoj
/CAPCITY.cpp
C++
cpp
2,730
no_license
#include<stdio.h> #include<string.h> #include<vector> #include<algorithm> using namespace std; #define MAXN 100010 int stack[MAXN]; int index_node[MAXN]; int lowlink[MAXN]; bool flag[MAXN]; int owner_set[MAXN]; int idx; int top; int set_id; int in_degree[MAXN]; vector<int> E[MAXN]; vector<int> S[MAXN]; int min(...
2c9161b41028c0da6e17a98e2c017a8b241c7cd1
ae0933d3cf5eea67ec06610471836eb308679ef4
bouje1831715/FightingGameXD
/Projet1/Animation.cpp
C++
cpp
1,746
no_license
#include "Animation.h" #include "TimeManager.h" #include <math.h> Animation::Animation(Spritesheet ss, vector<Coord> indexes, vector<int> showTimes, bool loop) { this->indexes = indexes; currentFrame = 0; currentTime = 0; spritesheet = ss; if (size(indexes) > size(showTimes)) this->showTimes = { -1 }; else ...
eb2f889d9689b0cdc44d10149a3db0a159207e30
cbb698c586b1555c7838a69d5f13aa4bb3971e08
Ainsley-uu/Adventure
/castle.cpp
C++
cpp
11,216
no_license
#include <iostream> #include <string> #include <vector> #include <sstream> #include <ctime> #include "castle.h" using namespace std; Castle::Castle() { getPrincess = false; int i, j; cout << "Your mission is going to the castle to save the princess. " << endl; cout << "The castle has 25 rooms and the s...
f955ba4394cf8047d104996caf95531baa60dc93
99c3020e8541b896ed331521e0dc71949645e52d
BillowBone/Plazza
/src/UserInterface/UserInterface.cpp
C++
cpp
2,138
no_license
/* ** EPITECH PROJECT, 2019 ** PSU - Concurrent Programming - Plazza ** File description: ** UserInterface.cpp */ #include "UserInterface.hpp" namespace plazza { UserInterface::UserInterface(float coeffBaking, int nbCooks, int regeneration) { std::unique_ptr<Reception> reception(new Reception(coeffBak...
4c98d7e31a99320900c4a720720aea53a8922262
f4114b8762381bbf455542b8c6d2f780bfdcd3f3
haophancs/VIAS-yolo-car-detection
/jni-build/jni/tensorflow_jni.cc
C++
cc
12,692
permissive
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
7f1c177a8f6e51bf6f4ba493e4c9b0037c8e6a99
f2b26a50c61ac97fdaacdd51b681c79fc600af2d
thelazy/ContestCodes
/Codeforces/Div2-392/b.cpp
C++
cpp
535
no_license
#include <bits/stdc++.h> using namespace std; int main(){ char arr[101]; cin>>arr; int r=0, rr=0, b=0, bb=0, y=0, yy=0, g=0, gg=0; for(int i=0; arr[i]!='\0'; i++){ if(arr[i]=='R') r = i%4; else if(arr[i]=='B') b = i%4; else if(arr[i]=='Y') y = i%4; else if(arr[i]=='G') g = i%4; } ...
331b45f72834ee4929519cf47b6a56bb45872e0d
2ab2b4eb6cda9ceec9b9226498ff0e53d488b3c5
priyanshu-28/Spoj-Solutions
/RANGESUM.cpp
C++
cpp
598
no_license
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; scanf("%lld",&n); ll a[n]; for(ll i=0;i<n;i++) scanf("%lld",&a[i]); vector< ll > pre; pre.push_back(0); for(ll i=n-1;i>=0;i--) { ll val=a[i]+pre.back(); // cout<<val<<endl; pre.push_back(val); } ll q; scanf("%lld",&q)...
7f01489273a4ae95979b4a8950a0b88e8e502ce2
5c27897fea5abd74ce7d561129c1d94cc1eeeed2
yanboyang713/Binary-Tree-linked-list
/by932/test.cpp
C++
cpp
3,522
permissive
/* Assignment Four Solution This is the solution for assignment four, it uses the class program to parse the input and insert ovbjects into a map Daniel F. Saffioti School of IT and CS University of Wollongong Sun Oct 20 19:51:11 EST 2002 */ #include <iostream> #include <list> #include <map> #include <set> #...
2f9935d2559ce287ee7b811ac76ee981922ed388
65ebe53dbe4b03d5f3b05080cf16b96364d3ad9b
HongfeiXu/LearnCLRS
/ch09 Medians and Order Statistics/RandomizedSelect.cpp
C++
cpp
1,560
no_license
#include <iostream> #include <random> #include <ctime> using namespace std; const int ARRAYSIZE = 20; int Partition(int A[], int p, int r) { cout << "Partition with " << A[r] << " : \n"; int x = A[r]; int i = p - 1; for(int j = p; j <= r - 1; j++) { if(A[j] <= x) { i = i + 1; int temp = A[j]; A[j] ...
8a21751fd615dbe9ffe567797bc4c6089fac7c6e
e7e9298b553b5198620a8a4de658e12c7bcb6429
derekzhang79/Algorithm-Training
/51NOD刷题/LCS_DP.cpp
C++
cpp
1,107
no_license
//TDteam01 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <stack> #include <cstdlib> #include <cmath> #include <set> #include <list> #include <deque> #include <map> #include <queue> using namespace std; typedef long...
88f05a5ed56e79340089ccb5d32624b7ab409337
adaa1a4cd52966bf7139a855164afddbc3e902c1
luoshao23/cpp
/ch2_type/2d_dp.cpp
C++
cpp
684
no_license
#include <iostream> int main() { int findPath(int m, int n); int m, n; std::cin >> m >> n; std::cout << findPath(m, n) << std::endl; // std::cout << findPath(1, 0) << std::endl; // std::cout << findPath(1, 1) << std::endl; // std::cout << findPath(2, 1) << std::endl; // std::cout << findPath(2, 2) << std::endl; //...
3d366ba50b353c21512728d3a1b52ce32fbd3be9
5f1458c6779c7b199346ffa00f964e892bd17c47
HankDaly/pat
/pat_yi/pat_1061.cpp
C++
cpp
1,549
no_license
/* 1061 判断题(15 分) 判断题的评判很简单,本题就要求你写个简单的程序帮助老师判题并统计学生们判断题的得分。 输入格式: 输入在第一行给出两个不超过 100 的正整数 N 和 M,分别是学生人数和判断题数量。第二行给出 M 个不超过 5 的正整数,是每道题的满分值。第三行给出每道题对应的正确答案,0 代表“非”,1 代表“是”。随后 N 行,每行给出一个学生的解答。数字间均以空格分隔。 输出格式: 按照输入的顺序输出每个学生的得分,每个分数占一行。 输入样例: 3 6 2 1 3 3 4 5 0 0 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 1 1 0 0 1 1 输出样例: 13 11 12...
9f0fe0b689fde70e62cca98e629669e788521122
97405f59a51fb255c1920cad04c3cda9bb403e75
dbsGen/gcore
/script/ScriptTransport.cpp
C++
cpp
672
no_license
// // ScriptTransport.cpp // hirender_iOS // // Created by Gen on 16/10/5. // Copyright © 2016年 gen. All rights reserved. // #include <core/Callback.h> #include "ScriptTransport.h" using namespace gscript; ref_map ScriptTransport::callbacks; void ScriptTransport::reg(const StringName &name, const Reference &cal...
c49b153d4a1a4477450b2e9ff03b31154f5936a0
260d198f6e16bc51eea74cb1a0146c7d742699e5
JeongYeonUk/Problem
/BOJ/3002.cpp
C++
cpp
2,248
no_license
#include <cstdio> #include <cstring> #include <algorithm> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 987654321; const int MAX_N = 250001; int tree[MAX_N * 4][10]; int lazy[MAX_N * 4]; int v[10]; int N, M; int init(int node, int ...
4e89f08863ba5e24170e3b210c8e67c0ae988751
aeca491a81d31444b70edeeaced178b5fbb266a0
valvy/miniqubit
/modules/core/include/miniqbt/emulator/tools/ChanceOrder.hpp
C++
hpp
1,825
permissive
#ifndef MINI_QBT_CHANCE_ORDER_HPP #define MINI_QBT_CHANCE_ORDER_HPP #include<complex> #include<ostream> #include<bitset> namespace MiniQbt{ namespace Core{ namespace Tools{ /** * Small struct to easily disassemble and reassemble bit orders of the program. * Mi...
ea97b9d317dd6e5388a83a07e681c62b865f13d1
3a78e33190689f4208ec9b5eea3d545bd96dafa6
tpurtell/android-cpp-sdk
/android-cpp-sdk/platforms/android-7/android/view/inputmethod/BaseInputConnection.hpp
C++
hpp
18,452
permissive
/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: android.view.inputmethod.BaseInputConnection ================================================================================*/ #ifndef J...
2ddbf12d39e1c7aac3d5c9a9e2f0431541069f25
ff5a9a259b0dce4a99d85596e6af7fb61a97af4d
hongyuntw/NachOS
/code/threads/alarm.cc
C++
cc
4,030
no_license
// alarm.cc // Routines to use a hardware timer device to provide a // software alarm clock. For now, we just provide time-slicing. // // Not completely implemented. // // Copyright (c) 1992-1996 The Regents of the University of California. // All rights reserved. See copyright.h for copyright notice and limitation ...
23369c7beec18325c384082199448a6bbd88955f
b7fe5f650434940b0edb0b6431e74123c4fc4881
liyoung1992/mediasoup-sfu-cpp
/deps/boost/include/boost/parameter/macros.hpp
C++
hpp
11,801
permissive
// Copyright David Abrahams, Daniel Wallin 2003. // Copyright Cromwell D. Enage 2017. // 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 BOOST_PARAMETER_MACROS_050412_HPP #define BOOST_PARAMETER_MACR...
22f169500352a068e29c8a7b05bb532b6470fd2c
dac717226fa51fe145192ab55d554aa45834097f
drkvogel/retrasst
/LADS/Wizard/CentralTest1.cpp
C++
cpp
5,540
no_license
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "CentralTest1.h" #include "AddCentralTest1.h" #include "Profile1.h" #include "WizardLogin1.h" //--------------------------------------------------------------------------- #pragma packag...
66e66929ed5db48302945fc0ffdcc35845764ad8
50596cecce5c148694c3d6f0c42dca3d46b77064
YURSHAT/stk_2005
/xrAI/compiler.cpp
C++
cpp
1,804
no_license
#include "stdafx.h" #include "compiler.h" #include "cl_intersect.h" CDB::MODEL Level; CDB::COLLIDER XRC; Nodes g_nodes; xr_vector<SCover> g_covers_palette; Lights g_lights; SAIParams g_params; Fbox LevelBB; Vectors Emitters; void vertex::PointLF(Fvector& D) { Fvector d; d.set(0,-1,0); Fvector v ...
e83d8db05e109f354da07be0e27073ad6d629abc
c8a250e1a12ead54dc9b52be15e3840d250508fe
rwerthman/csci5229
/Vector.cpp
C++
cpp
561
no_license
#include "Vector.h" Vector::Vector(double x, double y, double z){ this->x=x; this->y=y; this->z=z; } void Vector::dotProduct(Vector* one, Vector* two){ } void Vector::crossProduct(Vector* one, Vector* two){ this->x = one->y*two->z-one->z*two->y; this->y = one->z*two->x-one->x*two->z; this->z = one->x*two->y-o...
2d434d4aa4e9f8a1b586f60c3c30bf8ee66fa056
7301c20fda8bfb29107640f9d2c0293b294e924c
calofmijuck/BOJ
/Codes/18100/18111.cpp
C++
cpp
1,175
no_license
#include <bits/stdc++.h> using namespace std; int m, n, b; int gnd[550][550]; int solve(int h, int block) { int ret = 0; for(int i = 0; i < n; ++i) { for(int j = 0; j < m; ++j) { if(gnd[i][j] > h) { int d = gnd[i][j] - h; ret += 2 * d; block ...
5d04fe6d35e318037e25043587c93d8598fa1f6f
8d930c80f9de00c4cf4bdf12f47e213b30c8f9fc
malharDeshpande/bu-met
/cs799/elgamal_sign.cpp
C++
cpp
801
no_license
#include "lib/ElGamalSign.h" #include "lib/Timer.h" #include <iostream> #include <ctime> int main(int argc, char* argv[]) { if (argc != 6) { std::cerr << "Usage: " << argv[0] << " e1 p d M r" << std::endl; exit(-1); } tgl::BigInteger e1(::atoi(argv[1])); tgl::BigInteger p(argv[2]); tgl::BigInteger ...
0f0dc03a1e05f1e097aa3c3ab90d21b5f82f88a9
9c1829e392c3e784bb40c7ffea98d96937d23edb
ananthanandanan/academics
/CPP/advPr/lab-6/seq_lab/pr_queue_max.cpp
C++
cpp
692
no_license
#include <bits/stdc++.h> using namespace std; priority_queue<vector<int>> pq; void Print_Maximum_Vector(vector<int> Vec) { for (int i = 0; i < Vec.size(); i++) { cout << Vec[i] << " "; } cout << endl; return; } int main() { vector<int> data_1{10, 20, 30, 40}; vector<int> data_2{...
c95faa98df6fdf90aa24e7eb5199aafcd647da34
4ba53641ff322c7b1fb3651beb4524aea0476a05
hackerlank/YAPOG
/YAPOG/src/YAPOG/Game/World/Map/DynamicWorldObjectCollection.cpp
C++
cpp
1,499
no_license
#include "YAPOG/Game/World/Map/DynamicWorldObjectCollection.hpp" #include "YAPOG/Game/World/Map/DynamicWorldObject.hpp" namespace yap { DynamicWorldObjectCollection::DynamicWorldObjectCollection () : objects_ () { } DynamicWorldObjectCollection::~DynamicWorldObjectCollection () { for (const auto& it...
f8ed149cf5072b4257fd622af8b38bee95df4bef
a6e649b10623bdcbc9559d5294d15bbf67c1d82b
kiranchhatre/fawkes
/src/libs/aspect/inifins/time_source.cpp
C++
cpp
2,894
no_license
/*************************************************************************** * timesource.cpp - Fawkes TimeSourceAspect initializer/finalizer * * Created: Wed Nov 24 00:39:37 2010 * Copyright 2006-2010 Tim Niemueller [www.niemueller.de] * *********************************************************************...
7bf4d0925f23445a618eb828578cf49e7be858ba
3c48570327353fb952f0b1ae1c3167d93d15734e
githubxj/utn
/software/Web/cgi/CResetFE8Perf.cpp
C++
cpp
2,264
no_license
#include <iostream> #include <stdio.h> #include <dirent.h> #include <string.h> #include "CgiRequest.h" #include "CGISession.h" #include "Lang.h" #include "msg.h" #include "Comm.h" #include "const.h" #include "CResetFE8Perf.h" int CResetFE8Perf::ResetFe8Perf()//for all port perf resert . { std::string card_no = g...
cf00ffb266224449d8f193cec574e04e4464adee
62e336340e380ec7273e5ec23e5d73d4bd88bdf1
MilenaCicha/codility
/passingCars.cpp
C++
cpp
1,909
no_license
#include <iostream> #include <vector> #include <unordered_set> #include <algorithm> //A non-empty array A consisting of N integers is given. The consecutive elements of array A represent consecutive cars on a road. // //Array A contains only 0s and/or 1s: // //0 represents a car traveling east, //1 represent...
6324aa7cdbd445c370b271e5a80655524c9234d5
747184efa4eb7aa4f5bd05c35cbf26d017e9cf33
singhdharmveer311/PepCoding
/Level-2/21. Graphs/Number of Islands.cpp
C++
cpp
915
permissive
#include <bits/stdc++.h> using namespace std; void dfs(vector<vector<int>> &grid,int r,int c,vector<vector<bool>> &vis){ if(r<0 || c<0 || r==grid.size() || c==grid[0].size() || grid[r][c]=='1' || vis[r][c]==true){ return; } vis[r][c]=true; dfs(grid,r-1,c,vis); dfs(grid,r,c+1,vis); dfs(grid,r+1,c,vis);...
e25ec1becfd9fc419d2987e51b218a4d120170cd
3bf20a5e1285c85dbf174f26d320a4beffce5d82
bamiaux/icebox
/third_party/virtualbox/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
C++
cpp
21,503
permissive
/* $Id: VBoxServiceControl.cpp $ */ /** @file * VBoxServiceControl - Host-driven Guest Control. */ /* * Copyright (C) 2012-2017 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it a...