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
3f6b49a39bae2a345c44ffc964f6d51b165dfeb2
f361dc710f7f19c9cc99e8c4db4d4c12e8a76c07
Luminoth/gled
/src/editor/gui/ResourceDialog.cc
C++
cc
1,467
no_license
#include "src/pch.h" #include <wx/wx.h> #include <wx/listctrl.h> #include <wx/notebook.h> #include "src/engine/Engine.h" #include "src/engine/ResourceManager.h" #include "ResourceDialog.h" ResourceDialog::LightResourcePanel::LightResourcePanel(wxWindow* parent) : wxPanel(parent) { wxListView* listview = new wx...
ad0e23f8efbcee2bf2d309db75966efa25c9e41d
51b0c171029803c7ea4a7a7abcdb7d3346be1c56
bejonwe/MPIHelloWorld
/MPIHelloWorld.cpp
C++
cpp
613
no_license
#include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char **argv) { int rank=0, size=0; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (rank == 0) { char helloStr[] = "Hello World"; MPI_Send(helloStr, strlen(helloStr) + 1...
ef9a22c229d84b716ac4179be67670b91c009904
a6e3bee47dc8f67c8d9dd879fe7d90d0112c5cc7
lokesh755/openthread
/src/cli/cli_srp_server.cpp
C++
cpp
8,545
permissive
/* * Copyright (c) 2020, The OpenThread Authors. * 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 ...
5ca97bbd64d97e5c5fbf5c20c991ad2196acff29
531aa21a3fe136c36f1608600f3311d07d860a72
lggruspe/ibex
/src/rnd/internals/automaton.hpp
C++
hpp
395
permissive
#pragma once #include "zsymbols.hpp" #include "nexpr.hpp" #include <map> namespace rnd { struct Automaton { // start state = 0 // error state = -1 by default // (assumes after minimization, that there's a single error state) ZPartition symbols; std::map<int, std::map<ZRange, int>> states; std:...
578911ea7bfb47043fd7b2710dcfb08c9bda4b8d
3fd91f839cb0f6ed833d92b9a61f4f746e3ea016
Jamal-Ra-Davis/RPG-Game
/RPG_Backup/src/shop.cpp
C++
cpp
6,743
no_license
#include "../headers/shop.h" #include "../headers/Safe_Input.h" #include "../headers/item.h" #include "../headers/party.h" #include "../headers/FileFunctions.h" #include <stdio.h> #include <stdlib.h> #include <assert.h> int getShopRange() { int cnt = lineCount("./files/Shop_List.txt"); return cnt; } shop* getShop(...
1a6ff5255e7824990b9e2185a7ec8ebe1eb987d3
47a9c20a0697eb7f98389d4e10211e8d8a2d71b5
Chen-Zhihui/SeismicPackage
/CPSeis/wrappers/src/org/cpseis/wrappers/CpseisEagc.hh
C++
hh
931
permissive
//////// DO NOT EDIT THIS FILE - it is machine generated //////// #ifndef _HH_CPSEIS_EAGC_HH_ #define _HH_CPSEIS_EAGC_HH_ #include "CpseisBase.hh" //------------------------ start of class ----------------------------// //------------------------ start of class ----------------------------// //----------------------...
37895fd01626ab87c373bf90895cafab832c06a6
40ee0f58182a33f66df491d087e812b9ac2505e1
DonLuyendijk/eindopdracht_raytracer
/source/main.cpp
C++
cpp
1,040
no_license
#include <iostream> #include <SDL2/SDL.h> int main(int argc, char **argv) { int width = 640, height = 360; if (SDL_Init(0) != 0) { std::cout << "failed to initialize sdl: " << SDL_GetError() << "\n"; return -1; } SDL_Window *window = SDL_CreateWindow( "ray tracer", SDL...
a62b9186109d5a484c9fd187ab064890c9caddc1
480f6910ca53f7ae576a2fe22ad4833c228f7c1f
sean-henning/cryptosecure
/src/ui/Windows/AdvancedDlg.cpp
C++
cpp
22,086
permissive
/* * Copyright (c) 2003-2017 Rony Shapiro <ronys@pwsafe.org>. * All rights reserved. Use of the code is allowed under the * Artistic License 2.0 terms, as specified in the LICENSE file * distributed with this code, or available from * http://www.opensource.org/licenses/artistic-license-2.0.php */ // ADVANCEDDlg.cpp : i...
e9c040722935658e3de4b8b7ad5fbba37d583fe5
c701916ac78d0d3e588b571fa28f8a901f0caa3d
wcysai/Calabash
/Discover Vladivostok 2019. Division A Day 4/H.cpp
C++
cpp
556
no_license
#include<bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int,int> P; int n,s,f,ans; int main() { scanf("%d%d%d",&n,&s,&f); ans=0; if(s>f) swap(s,f); if(s==f) { if(n==1) p...
39fd4418a1089841cd987e6869eed6f8ef2731d8
5114da95838d2386c760c3dac5d1f637d80b0eec
Spautov/HW_C
/HW_1_1.cpp
C++
cpp
442
no_license
#include <iostream> int main() { std::cout << "Leaves are floating \n" <<"softly down; \n" <<"Some are red and \n" <<"some are brown. \n" <<"The wind goes \"swish\" \n" <<"through the air; \n" <<"When you look back, \n" ...
a03fa1c17bf9ac2eb87dd1214827625f6db89cfd
77654d0841830a68a69acd5ebb198c82c3ddaf9b
T208FOR2/T208FOR2_2016
/problem_solving_class/DT04/main-fyrritími.cpp
C++
cpp
2,719
no_license
#include <iostream> #include <fstream> #include <cstdlib> using namespace std; //void initialize_random_generator(int seed); //int random_int(int max_value); void openFile(ofstream& fout, string filename); void writeNumberToFile(ofstream& fout); void openFile(ifstream& fin, string filename); void printNumbersFromFile(...
6506bc9651c2e93abb36d60178d43b7d8cab6108
47eca119e81d837b2b9f18fdbfe4e657a429c41d
extrasaucestudio/ProjectSulphur
/src/engine/core/editor/world_decorator.cc
C++
cc
2,383
permissive
#include "engine/core/editor/world_decorator.h" #include "engine/networking/editor/editor_messages.h" #include "engine/networking/editor/editor_messaging_system.h" #include "engine/systems/editor/gizmo_system.h" #include "engine/core/editor/free_cam_system.h" #include "engine/assets/asset_system.h" #include "engine/ne...
4d6e4cba1d68253c59c2c9a8034540a3bddaa264
99e0e565e44d729d3c75706ad84fa17933b7a2e8
AglailsonSantiago/Estrutura-de-Dados-2020.2
/src/Atividades/converte_tempo.cpp
C++
cpp
658
no_license
#include <iostream> using namespace std; // Recebe tempo em 'segundos', converte para horas, minutos e seguntos, e // retorna o resultado através dos parâmetros 'hor', 'min' e 'seg'. void converte_tempo(int segundos, int *hor, int *min, int *seg){ *hor = segundos/3600; *min = (segundos%3600)/60; *seg = (s...
cf636f6e4e843c8d2e29efac909326e10261c8c1
4097bc59eafea25a07120741820202c02956d39e
AsterNighT/MeyaS
/src/ServerSocket.cpp
C++
cpp
2,795
no_license
#include "Exception.h" #include "Address.h" #include "ServerSocket.h" #include "WorkerSocket.h" /*MeyaS::ServerSocket::ServerSocket() { addrinfo *result = nullptr, hints{}; hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; hints.ai_flags = AI_PASSIVE; ...
68f6ac75f17146dfe4aaa8350d3ef8bd4a01207c
252c95765d13115b6743010c51e5774d9f9f9bfa
arigus/omniBotProto
/OmnibotGame/src/LeafHandler.cpp
C++
cpp
6,591
permissive
#include "LeafHandler.h" #include "GSettings.h" #include "glm/gtc/random.hpp" #include "cinder/gl/gl.h" #include "cinder/Perlin.h" #include "glm/gtc/matrix_transform.hpp" #include "NormalGenerator.h" using namespace std; using namespace ci; using namespace ci::app; LeafHandler::LeafHandler(){} void LeafHandler::upd...
069bf5426c0f494001f8f3995cc3aa7d25c6eb2a
05c7b68b0aa6aaf8767a5a931844d5c4b4a21f4c
arshamzo/multigrid
/calc.cpp
C++
cpp
1,038
no_license
#include "Header.h" vector<vector<double>> mult(vector<vector<double>> a,vector<vector<double>> b) { vector <vector<double>> result(a.size(),vector<double>(b[0].size(),0)); for (int i = 0; i < result.size(); i++) { for (int j = 0; j < result[0].size(); j++) { int m = 0; int n = 0; for (int z = 0; z < b...
9473e5c72563cc03b49b9ac76b11db002c5a1009
e4888036029993ce0616566d16585bdf8aecea9e
ShubhamS156/daaPrac
/hashing/pair_with_given_sum.cpp
C++
cpp
622
no_license
#include<iostream> #include<unordered_set> #include<fstream> #include"driver.h" /* * SIGNATURE of DRIVER_CODE * (file,function pointer,data(if necessary)) */ using namespace std; int pairWithGivenSum(int *arr,int n,int sum){ unordered_set<int> hash(arr,arr+n); unordered_set<int>::iterator it=hash.begin(); ...
c75376c3078314c7aa0ae9c963faf12fc286dbb2
451c91f0ca19ed579d5d0e92b87d1acd1022e55d
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function13964/function13964_schedule_16/function13964_schedule_16.cpp
C++
cpp
910
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function13964_schedule_16"); constant c0("c0", 64), c1("c1", 64), c2("c2", 64), c3("c3", 64); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2), i3("i3", 0, c3), i01("i01"), i02("i02"), i03("i03...
7f5fa8fd4996cf388fb624fc191531ece624a8b0
cb3f5ab8da5aaaf8a031b4382af2da5dbf09174c
tuanduong3001/homework3.5
/2.20.cpp
C++
cpp
281
no_license
#include<iostream> #include<math.h> using namespace std; int squareRoot(int n) { if ((int)sqrt(n) - sqrt(n) == 0) return 1; else return 0; } int main() { int n; cin >> n; for (int i = 2; i <= n; i++) { if (squareRoot(i)) cout << i << " "; } }
6808ba19b91a00265fd3583fdcb07944c1dd37c1
a970b0beb1aca91d7322dc5e938788bcb64b5568
bigben0123/chromium
/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.cc
C++
cc
24,724
permissive
// Copyright 2016 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/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.h" #include "base/metrics/histogram_functions...
a14e7fba113f4e128e8c6257d0bb244cd7bba973
e82ee7cd9a841f79f87d69c9c26e3bc016c58211
songchaow/starcrat2-ai
/src/RangedManager.cpp
C++
cpp
34,812
permissive
#include "RangedManager.h" #include "Util.h" #include "CCBot.h" #include "BehaviorTreeBuilder.h" #include "RangedActions.h" #include <algorithm> #include <string> #include "AlphaBetaConsideringDurations.h" #include "AlphaBetaUnit.h" #include "AlphaBetaMove.h" #include "AlphaBetaAction.h" #include "UCTConsideringDuratio...
02da448e1b4da4d80bc3d3f0dcd3b5492fbc863b
f13918b5c2511bfad63fdc892b5ec46a58f184a4
sorf/cpp-playground
/source/async_state.hpp
C++
hpp
7,397
permissive
#ifndef ASYNC_STATE_HPP #define ASYNC_STATE_HPP #include "bind_allocator.hpp" #include <boost/asio/associated_allocator.hpp> #include <boost/asio/associated_executor.hpp> #include <boost/asio/async_result.hpp> #include <boost/asio/bind_executor.hpp> #include <boost/asio/executor_work_guard.hpp> #include <boost/scope_...
62af1bce4a5767b380e8ebc69b7f7fa1f1abd7b4
cd27168a212e35823d4814911f115cef1cc961a7
horingring/Algorithm
/C/65_미로탐색(2차원배열 DFS)/mySol/성공/65(성공)_소스.cpp
C++
cpp
680
no_license
#include <stdio.h> #include <vector> using namespace std; int n, cnt = 0; vector < vector <int> > a; void DFS(int row, int col) { if (a[row][col] == 2 || a[row][col] == 1) return; if (a[row][col] == 3) { cnt++; return; } a[row][col] = 2; if (row + 1 <= n) DFS(row + 1, col); if (col + 1 <= n) DFS(row, col ...
0824009ece1aafd47662a4a93fd04e8c50ecf0d0
54553253b4e2c150d6336fcd55ff043840c465a7
alldatacenter/alldata
/olap/ByConity/src/Optimizer/tests/gtest_optimizer_utils.cpp
C++
cpp
2,360
permissive
/* * Copyright (2022) Bytedance Ltd. and/or its affiliates * 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 appl...
86fb8021d6e17cc36b473b9b4211681602d5cab0
491861bd94d6d0603edf68936e24dc668af91a36
Zylann/SnowfeetFramework
/include/fm/app/Application.hpp
C++
hpp
2,624
no_license
#ifndef HEADER_ZN_APPLICATION_HPP_INCLUDED #define HEADER_ZN_APPLICATION_HPP_INCLUDED #include <iostream> #include <exception> #include <fm/reflect/ObjectTypeDatabase.hpp> #include <SFML/System.hpp> namespace zn { /// \brief Top-level class handling the execution of a game. /// There must be only one Application (...
d448c7aec6212fc1f3341046c6b7a71e0bad474f
50f7715c4d47d5a809ca2819a760a7fd436aa219
nwpuacm2012/nwpu2015
/0315 - [NWPU2015][SRM][02][div2]三一五专场/E.cpp
C++
cpp
1,847
no_license
// <!-- encoding UTF-8 --!> /***************************************************************************** * ----Stay Hungry Stay Foolish---- * * @author : Shen * * @name : E ...
d5ac61485148c9364757b5dc7758a779b60fa372
f7708cec68fa92e0a9c74bc97929d46ea69f07bb
tolmachevpk/wordParserFinder
/Sources/ahoKorasik.cpp
C++
cpp
1,559
no_license
#include "../Headers/ahoKorasik.h" #include <iostream> std::string AhoKorasik::algorithmRealization(const std::string &word) { Trie* node = root; for (int i = 0; i < word.length(); i++) { node = goTo(node, word[i]); if (out(node)) { return word; } } return "-1"; } b...
a932e90052b4e593c624cc4bf61ec95de2536cbf
e8cdd606db90bc564fce7ec6467861fdb55e14d8
myjeffxie/duckdb
/src/optimizer/pushdown/pushdown_inner_join.cpp
C++
cpp
2,074
permissive
#include "duckdb/optimizer/filter_pushdown.hpp" #include "duckdb/planner/operator/logical_any_join.hpp" #include "duckdb/planner/operator/logical_comparison_join.hpp" #include "duckdb/planner/operator/logical_cross_product.hpp" #include "duckdb/planner/operator/logical_empty_result.hpp" namespace duckdb { using namesp...
4cf1837535ea0993ea3b788fb440bfd5d26dfabd
31cb4752a31bcb5f5a661d98f4076d3b41316d27
bbruillet/SpacecraftvsAsteroids
/src/CreditView.cpp
C++
cpp
2,009
no_license
#include "CreditView.h" /* constructor */ CreditView::CreditView() { //ctor /* Load the sprite and the texture */ if (!credit_texture.loadFromFile("Images/Backgrounds/credit.png")) { std::cout << "Problem while loading the background" << std::endl; } credit_sprite.setTexture(cr...
0d82bc36a49fcdd1baf251efcaa6408ae37b8302
d479d87d2f6b4fa83017317c181b0ece2eaa8115
shitcoinproject/Shitcoin
/src/qt/optionsdialog.cpp
C++
cpp
8,219
permissive
#include "optionsdialog.h" #include "ui_optionsdialog.h" #include "bitcoinunits.h" #include "monitoreddatamapper.h" #include "netbase.h" #include "optionsmodel.h" #include <QDir> #include <QIntValidator> #include <QLocale> #include <QMessageBox> #include <QRegExp> #include <QRegExpValidator> OptionsDialog::OptionsDi...
2a6f0aef73083c3c9823fddc65689059bd4e24a7
488cfd3a17d8eeb30323985ee23078403f16065f
showliu/open-content-decryption-module
/src/com/cdm/rpc/rpc_cdm_platform_handler.cc
C++
cc
16,707
permissive
/* * Copyright (c) 2017 Fraunhofer FOKUS * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WA...
69b08660b46d438b8ae5b7b98682c1a86b615c6c
4b05b2e0864f71a87b1e62d5f5be4edd7eccdad4
JosvanGoor/ray-ez
/src/core.hpp
C++
hpp
1,064
no_license
#ifndef BBM_OBJECT_HPP #define BBM_OBJECT_HPP #include <vector> #include <string> #include <fstream> #include <iostream> #include <typeinfo> #include <exception> #include "math/vector3.hpp" #include "math/vector4.hpp" using math::Vector3d; using math::Vector4d; class Object { public: virtual st...
4905596351796925479a218d8b3565ea90c838e3
6f6697c1201c8cadae5a015093a1bbb04bcc2a4a
SallingProject/Subject
/Master/Numeron/Numeron/SceneGame.cpp
C++
cpp
2,315
no_license
#include "SceneGame.h" #include "SceneTitle.h" #include <algorithm> #include <random> #include <conio.h> namespace { std::string kStringNull = "null"; std::string kExitKeyword = "exit"; std::string kTitleKeyword = "title"; const int kRange = 3; const int kRandamMin = 0; const int kRandamMax = 9; } SceneGame::Scen...
26811520d63fc56b2909dccf3c5a4e7097cb5167
29a3be0053af34b9ad5e29b8947abb42cfc7a65d
CyberFlameGO/flecs
/examples/cpp/19_auto_override_nested_prefab/src/main.cpp
C++
cpp
2,166
permissive
#include <auto_override_nested_prefab.h> #include <iostream> struct Position { double x, y; }; int main(int argc, char *argv[]) { /* Create the world, pass arguments for overriding the number of threads,fps * or for starting the admin dashboard (see flecs.h for details). */ flecs::world ecs(argc, arg...
eb20910bed8b54f98b42e270517b1da800b62a51
2d1b697fdf8cd8554eddc4726322e7a4c6d9dc53
nairnj/nairn-mpm-fea
/NairnMPM/src/Boundary_Conditions/NodalConcBC.cpp
C++
cpp
2,965
no_license
/******************************************************************************** NodalConcBC.cpp nairn-mpm-fea Created by John Nairn on Thu Apr 1 2004. Copyright (c) 2004 John A. Nairn, All rights reserved. ********************************************************************************/ #include...
452a9b163394facd8e849701e3d54b08c1cc682d
efa0e92fb95010fcdec947cc4597e2405851537a
apple/swift-libcxx
/test/std/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
C++
cpp
3,117
permissive
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
17d1d85feda9bf010d19e4d8fd991fb9f84ce418
e090b5be360db5206ce39f6c5c06e921020d8a19
chromium/chromium
/net/dns/resolve_context.cc
C++
cc
21,052
permissive
// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/dns/resolve_context.h" #include <cstdlib> #include <limits> #include <utility> #include "base/check_op.h" #include "base/containers/contains.h" #include "base/m...
cf80084f09856fea0b46264a3c2738bc11aebae4
b33bc03185e8b0eafab76db5e2d41aea676e4099
SamFeig/CSCI-2275
/Assignment5/main.cpp
C++
cpp
219
no_license
// // Created by Sam Feig on 10/6/18. // Assignment 5 // #include <iostream> #include "CommunicationsNetwork.h" using namespace std; int main(int argc, char* argv[]) { CommunicationNetwork a(argv); return 0; }
3eab324d547d8e73f3be2bbc5322b99a8ab879c9
cd9f9faf7fc14afa91cb1e2f0951debe44818e15
TencentCloud/tencentcloud-sdk-cpp
/es/src/v20180416/model/EsConfigSetInfo.cpp
C++
cpp
3,016
permissive
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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 ...
99198b86f5a415bde84e90f713111a267735ab29
074578fff0785894311d2ddbb0fc7c3003c67da1
Loopush/Loopop
/libs/cpp/commons/benchmark/TimeBench.hpp
C++
hpp
3,865
no_license
/* * TimeBench.hpp * * Created on: Dec 6, 2011 * Author: issle */ #ifndef TIMEBENCH_HPP_ #define TIMEBENCH_HPP_ #include <iostream> #include <map> #include <time.h> #include <sys/time.h> using namespace std; /** * A Time Probe is an object that contains the time value at * two distinct points in time. ...
3d1b8bca21f606269eaa9b0deca8cfb31cc46262
1c599d9e68722ccc5666c084e2f061cacb9b89c4
ycsgg/oi_code
/archieve/Luogu4651/Luogu4651.cpp
C++
cpp
1,578
no_license
#include <bits/stdc++.h> using namespace std; const int N = 1000005; struct node { int next, to, w; } e[5000005]; bool bo[N][2]; int now[N * 2], ret[N * 2], head[N], m; inline void add(int u, int v, int w) { e[++m].w = w; e[m].to = v; e[m].next = head[u]; head[u] = m; } int main() { char ch...
03cbb51739f090ca3fe59902fd4199ea247f8b48
65f2f7278c43e26f5234d0f03af767bdca9ed906
sdwvit/plasma-workspace
/kcms/kfontinst/lib/Fc.cpp
C++
cpp
18,072
no_license
/* SPDX-FileCopyrightText: 2003-2007 Craig Drummond <craig@kde.org> SPDX-License-Identifier: GPL-2.0-or-later */ #include "Fc.h" #include <QHash> #include <QTextStream> #include <QUrlQuery> // // KDE font chooser always seems to use Italic - for both Oblique, and Italic. So I guess // the fonts:/ should do too...
5d05ba2c85a468e1cb127df5449b5b1218e25fac
0c11a805613ce3a3b36a64c514e32aacc6d0a82d
Domomod/GameEngine
/Source/EngineLogic/EntitySystem.cpp
C++
cpp
875
no_license
// // Created by dominik on 21.03.19. // #include "EntitySystem.h" void EntitySystem::addEntity(const std::string &entityName, const std::shared_ptr<Entity> &entityPtr) { entityStorageManager.addObject(entityName, entityPtr); } void EntitySystem::removeEntity(const std::string &entityName) { } void EntitySystem...
94283ef3a8e7180b29ba10fb166d0cdceccd86f1
b8da61b0b693fe827a74fff0cee02752a2699996
ma5terdrag0n/Competitive-Programming
/Spoj/DQUERY - D-query.cpp
C++
cpp
5,692
no_license
/* * Author : pritish.thakkar */ #include<bits/stdc++.h> #define pb push_back #define mkp make_pair #define inf 1000000007 #define rep(i,n) for(int i=0;i<n;i++) #define fr first #d...
5f47f1968e172fadd5939d275619224aaf37eaee
1cef843745de5de01e40529fdcb11f16ed65fb14
raytandia/Ray-GK-160411100030
/Modul 4/p4_4/main.cpp
C++
cpp
1,305
no_license
#include <windows.h> #ifdef __APPLE__ #include <GLUT/glut.h> #else #include <GL/glut.h> #endif #include<math.h> void lingkaran(){ glColor3f(0.0,0.0,1.0); int sudut = 0; for (int i=1; i<=12; i++){ //Perulangan for sampe 12 if(i%2!=0){ //Jika i modulus 2 tidak sama dengan 0 glRotated(sud...
c47db7427480937a9632dd5ccf4c3b2fcc9d336a
8cab944d4b62f8edfc70cafdd3a43549fd60c99f
TiagoCaldaSilva/FEUP-AEDA
/Study/Teste_2/TP7/aeda2021_p07/Tests/tests.cpp
C++
cpp
6,499
no_license
#include <gtest/gtest.h> #include <gmock/gmock.h> #include "game.h" #include "dictionary.h" #include <fstream> using testing::Eq; TEST(test_1, a_CreateDictionary){ ifstream f; f.open("C:\\Users\\user\\Desktop\\FEUP\\2_Ano\\1_Semestre\\AEDA\\ESTUDAR_TESTE_2\\7\\aeda2021_p07\\Tests\\dic.txt"); if (!f) { ...
e41322f61a5f1a27d54b9cb3d802a132c817b1db
788fa188aae80aeee927c666647020afe62b763f
JonnyBanana/botnets
/VirusPack/CBot-Fixed Version/CBOT-}BOT/Config.cpp
C++
cpp
480
no_license
#include "Include.h" #include "Hell.h" /* Well it does work its just reconnecting for some reason*/ char blowkey[] = "whatismyip"; int nTimeMs = 60000; void CConnectIRC::Init(void) { cConf.cNick = "|RoAr|"; cConf.cServer = "irc.dstiny.eu"; cConf.cPort = 6667; cConf.cBotPass = "test"; cConf.cChan = ...
5a697db6443f26b25c9588a95098ee1dc6fb5c35
64ac36164d98ed9f0263c85ec3faf3c54cf74def
wwqqqqq/LeetCode-Solution
/Numbers At Most N Given Digit Set.cpp
C++
cpp
1,566
no_license
class Solution { public: int lessthan(vector<string>& D, int num) { if(num <= 1) return 0; for(int i = 0; i < D.size(); i++) if(D[i][0] >= num + '0') return i; return D.size(); } bool find(vector<string>& D, int num) { if(num == 0) ...
f00296b2ece125fcdd5e6695c2a3dc676230364a
a9a11ec701c714d5b31e6143a1efb27fac17f496
recluse27/ft_gkrellm
/src/CPUModule.cpp
C++
cpp
532
no_license
#include "../headers/CPUModule.hpp" // #include "includes.hpp" #include "../headers/header.hpp" CPUModule::CPUModule(void) { } CPUModule::~CPUModule(void) { } void CPUModule::refreshData(void) { char *buf; buf = new char(CPU_BUF_SIZE); std::string ret; flag_text = 1; FILE* top = popen("ps -axro pc...
183b3b545967089cf1a05c8fd3da2c8aaa96aa55
1c5600f48b3848f73d810496e3d86078d1101ca7
asi1024/competitive-library
/cpp/include/graph/bidirected_graph.cpp
C++
cpp
378
permissive
#pragma once #include "definition.cpp" class BidirectedEdge { public: using cost_type = int; int from, to; static const cost_type cost = 1; BidirectedEdge(int s, int t) : from(s), to(t) { ; } }; using BidirectedGraph = graph_t<BidirectedEdge>; void add_edge(BidirectedGraph &g, int from, int to) { g[from]....
089534bad3b37d8d4853008d1c1e2edeefc21fdf
fdb966a620434937552ab761175dbb8cabb86892
Johniel/contests
/euler/14/main.cpp
C++
cpp
594
permissive
#include <bits/stdc++.h> #define each(i, c) for (auto& i : c) #define unless(cond) if (!(cond)) typedef long long int lli; using namespace std; lli f(lli n) { if (n % 2) return n * 3 + 1; else return n / 2; } map<lli, lli> memo; lli rec(lli n) { if (memo.count(n)) return memo[n]; memo[n] = 0; return mem...
dcaa59cb6a645e4e5472b092b2b105b7a6b1d622
b58bdd2cb718355374c32d7740714ea1ab39f2c3
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_new_hunk_3147.cpp
C++
cpp
1,069
no_license
SSLConnRec *sslconn = myConnConfig(f->c); apr_bucket *bucket; switch (status) { case MODSSL_ERROR_HTTP_ON_HTTPS: /* log the situation */ ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c, APLOGNO(01996) "SSL handshake failed: HTTP spoken on HTTPS port; " ...
c166e481444107116e092140118ef1f1358d9456
95a83737eb6fafacd5964aa305f858cd399a0fa2
ndoxx/wcore
/hosts/waterial/texmap_generator.cpp
C++
cpp
9,947
permissive
// OBSOLETE: Texture map generation moved to GPU // Normal map generation algorithm inspired from the work of Christian Petry // Licence: /* * Author: Christian Petry * Homepage: www.petry-christian.de * * License: MIT * Copyright (c) 2014 Christian Petry * Permission is hereby granted, free of charge, to any pe...
9370cf78353d6aba9256056b3e99c47944ae73dd
c316778385a9a9a0d702868d409d52b1a00d23d1
gswei/China-Telecom-International-Clearing
/example/quzj/CalcResultDetailNew/src/main.cpp
C++
cpp
2,548
no_license
/** Copyright (c) 2009-2012 GUANGDONG ESHORE TECHNOLOGY CO., LTD. All rights reserved. Created: 2012-9-4 14:10:52 Module: main.cpp Author: 瞿兆静 Revision: $v1.0$ Description: 测试模块 for CalcResultDetail */ #include "calc_result_detail1.h" using namespace tpss; void LoadRecord( FILE* fp, CalcResultDetai...
a4e57a161fbf6c4ab2c4caf00a33be6f27669619
db37fcf5b6051069f250344ac1d7acf4e7deb4e0
SilverIce/JContainers
/dep/boost/libs/asio/example/cpp11/echo/blocking_udp_echo_server.cpp
C++
cpp
1,175
permissive
// // blocking_udp_echo_server.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include <c...
78f7b99c462bbf67470a9dc5d0bbbe871d5fd121
fba0beb2500452cee05bbb81ae02e22bc8277395
jonassibbesen/vg
/src/subcommand/minimizer_main.cpp
C++
cpp
11,720
permissive
/** \file minimizer_main.cpp * * Defines the "vg minimizer" subcommand, which builds the minimizer index. * * The index contains the lexicographically smallest kmer in a window of w * successive kmers and their reverse complements. If the kmer contains * characters other than A, C, G, and T, it will not be indexe...
93911b8f5fb41ebe99a7a33d3fd1498189b8277a
cf5631e9384c0b282a61069ee0c596b0ef9f3363
timxx/QuickRun
/keybdHook/keybdHook/DllMain.cpp
C++
cpp
486
permissive
#include <Windows.h> #include <tchar.h> #pragma data_seg("Shared") HWND ghWnd = NULL; HINSTANCE ghDLLInst = NULL; BOOL gfShow = FALSE; #pragma data_seg() #pragma comment(linker,"/section:Shared,rws") BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) { ghDLLInst = hInst; switch (dwReason)...
eeca6765776559ad8eba0ef868ccd7a2c4b23b44
ca70da356a953d7712f22ba0f74964bb386433f9
jsphLim/algorithms
/Uva/uva11395.cpp
C++
cpp
1,121
no_license
#include<cstdio> #include<iostream> #include<cstring> using namespace std; const int N=1e6+5; bool vis[N]; int prime[N],cnt; void is_prime() { cnt=0; memset(vis,0,sizeof(vis)); for(int i=2;i<N;i++) { if(!vis[i]) { prime[cnt++]=i; for(int j=i+i;j<N;j+=i) ...
a607ad156e6d524487f6b93345ae1420efd45310
f82462ae7f621f75c7433c8f5791fa15862e400f
BAEKYUJEONG/Algorithm
/BOJ/1037_2.cpp
C++
cpp
276
no_license
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int N; cin >> N ; int *Num = new int[N]; for(int i=0;i<N;i++){ cin >> Num[i]; } sort(Num,Num+N); cout << Num[0]*Num[N-1]; }
5146cb7ee0be0e4b7e2a437c2e9c6838c6748c3a
006f2e23a4dcbd8be74c0f1e92238dc04f6d3466
selivni/first_server_junk
/anal/syn_anal/kurwa/lex.cpp
C++
cpp
7,986
no_license
#include <typeinfo> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/socket.h> #include <sys/select.h> #include <arpa/inet.h> #include <netinet/in.h> #include <math.h> #include <time.h> #include "lex.hpp" char* lexem::string() { ...
620ec4820fe70f836e22c876548673c48f7cc7d1
74bcf29deb7f1ad552ef395abd438de41349bdef
jihongeek/Algo
/baekjoon/1977.cpp
C++
cpp
480
no_license
#include <stdio.h> int main(void) { int squares[10000]; int index = 0; int sum = 0; int m,n; scanf("%d\n%d",&m,&n); for (int j = 1; j * j <= n; j++) { if (j * j >= m && j * j <= n) { squares[index++] = j*j; } } for (int i = 0; i < index; i++) ...
74b792ce55e9a1f0d6df9d2beb2d58ae1951aac8
68a3942e4956635dbacaf29c2e634cfc9767f47c
TobiasBanno00/Ejercicios2021-Info2-Banno
/Ej14-ComandosUartArduino/src/main.cpp
C++
cpp
1,237
no_license
#include <Arduino.h> #define led 13 String datosRecibidos; //String que se envia por el puerto serie void comandoRecibido(void); void setup() { Serial.begin(9600); pinMode(led,OUTPUT); } void loop() { if(Serial.available()>0) //Procede a la lectura solo si hay datos disponibles en el buffer {...
e7bf499896054686e6572bb09994e7c14a4c95e0
10687cb036b41ff1621a98c753a961c9cbc66f3d
447327642/leetcode-1
/75 Sort Colors/75 Sort Colors/Source.cpp
C++
cpp
535
permissive
class Solution { public: void sortColors(vector<int>& nums) { int p0 = 0, p1 = 0; for (int i = 0; i < nums.size(); i++) { int num = nums[i]; nums[i] = 2; if (num == 1) { if (p1 >= p0) nums[p1++] = 1; else { p1 = ...
63995602bf575b077907d1dd5f9a0b21507adc95
bc33776e9b8d9237b56b2bad2f16dace1e0dbe12
utsavsingh899/LeetCode_Solutions
/201_Bitwise_AND_of_Numbers_Range.cpp
C++
cpp
251
no_license
class Solution { public: int rangeBitwiseAnd(int m, int n) { long res = ~0; for (long i = m; i <= n; ++i) { res &= i; if (!res) return res; } return res; } };
0e62c606bfa8aa435c924938ccdefd73ba427b20
b40f06fab3a7df3de7e6ded56dd2854d5d74830d
SamuelAlonsoDev/lux
/concepts/has_not.hpp
C++
hpp
257
permissive
#pragma once namespace lux { namespace concepts { ///Returns at compile-time if T type has a bitwise not '~t' operator overloading template<class T> concept has_not = requires(T t) {~t;}; } } /** @example concepts/has_not.cpp */
643146fdf58137a46562ff264369508208a5393a
c951bd7008197ac3ab7c395b5753c7ce921e7813
irods/irods
/server/core/src/objMetaOpr.cpp
C++
cpp
23,710
permissive
#include <sys/types.h> #include <sys/wait.h> #include "irods/objMetaOpr.hpp" #include "irods/resource.hpp" #include "irods/collection.hpp" #include "irods/specColl.hpp" #include "irods/genQuery.h" #include "irods/icatHighLevelRoutines.hpp" #include "irods/miscUtil.h" #include "irods/modAVUMetadata.h" #include "irods/rs...
4733d0ab2c77991d69957cbd3605bb408514af6e
fd18840b0fd09d6db6f22bc938f94445d4e55995
sakhawat-sifat/UVA-solutions
/uva 11057.cpp
C++
cpp
630
no_license
#include<bits/stdc++.h> #define pii pair<int,int> using namespace std; int main() { int n,p,i; while(scanf("%d",&n)==1){ int ara[n]; for(int i=0;i<n;i++) scanf("%d",&ara[i]); scanf("%d",&p); sort(ara,ara+n); pii ans; for(int i=0;i<n;i++){ int one = ara[i]; ...
af9c5ae8dad7a949c4146995529f65ba5be8f5e6
e92771772c40cf560f2ea341c599cba6a9d12823
VB6Hobbyst7/GERBER_X3
/file_plugins/gerber/gbrattributes.cpp
C++
cpp
12,813
no_license
// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com /******************************************************************************* * * * Author : Damir Bakiev * * Version : na * * Dat...
e959b9a3a1fb492f99a9e1708e143ce7d77daa87
ba69ae15907467984c101073990ee23b35f1b5fc
man-of-steele21/CE3377-Homework5
/dealerbonus2.cpp
C++
cpp
3,967
no_license
// Homework 5, Optional Exercise B.1 // dealerbonus1.cpp // Jackson Steele #include <iostream> #include <string> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/wait.h> #include <stddef.h> #include <GetPot.cpp> #include <sstream> using namespace std; int main(int argc, char ** argv) { ...
5ff006fe135aaff54361b255e0803827f04e3a6f
5b55c7f99f73f6de817bd93832ca641abe9ee88c
arangodb/arangodb
/3rdParty/boost/1.78.0/boost/asio/detail/gcc_x86_fenced_block.hpp
C++
hpp
2,460
permissive
// // detail/gcc_x86_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifnd...
fd0c323fc2c80701cdccacb868d231e8346f28c6
5ff12dd6ddf386707b6a9414a2fce81b0e0a357b
Kadresiak/The-Forgotten-Client
/src/surfaceOpenglCore.cpp
C++
cpp
68,501
permissive
/* The Forgotten Client Copyright (C) 2020 Saiyans King This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, in...
27ba1162151a4402abe32cca6f5ffdbf74eb25ab
9b29bfd2caa8e1c0504447a4e7d9a18dad1f4785
ros2/rviz
/rviz_common/src/rviz_common/widget_geometry_change_detector.cpp
C++
cpp
2,136
permissive
/* * Copyright (c) 2011, Willow Garage, Inc. * Copyright (c) 2017, Open Source Robotics Foundation, Inc. * 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...
235ece53a7dbc7630d125b1410513e3a371fb235
a3fda51a3b95f25a52445de40ba4f47acde7222b
xuanyuantd/ToolsBuilder
/Classes/third_party_lib/boost/boost/mpl/placeholders.hpp
C++
hpp
2,517
permissive
#if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED #define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE...
6e15521fb17921d9094a2b9b32f2e3de64fb88c3
3ab2d45b618f56f431b01e78f970c113772f75f0
15831944/pre2006
/VisualStudioProjects/VC7/DLL/AddInsInput/AddInsInput/IncludeFile.cpp
C++
cpp
29,106
no_license
/******************************************************************************************************* 版权所有 (C) 2006 康林工作室;保留所有权利。 文件名:IncludeFile.cpp 描 述:完成头文件提示框。包括三个类 1、CIncludeTiShi 2、CSystemIncludeTiShi 3、CLocalIncludeTiShi 版 本:1.0.0.1 作 者:康 林 E_Mail:kl222@126.com 日 期:2006年9月6日 时 间:1...
aa98248d22303878141078c3697f76ac75c2c647
7da0c51e473185b8c8363fdf8e11771c45f041c0
kibo27/coding
/Socialnetworkbfs.cpp
C++
cpp
1,181
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define mp make_pair #define mem(x,y) memset(x,y,sizeof(x)) #define Boost std::ios::sync_with_stdio(false); int Bfs(vector<vector<int>> &x,int s,int dis) { vector<int> level(x.size()); vector <int> visited(x.size(),1); ...
e43a65b450389f44e7ad581e5932425656f8f6b0
fc96b8c91314827d0f8dd90c5826e21471eb1598
GaisaiYuno/USACO
/Implementations/content/contest/TemplateShort.cpp
C++
cpp
3,166
permissive
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using db = double; using str = string; // yay python! using pi = pair<int,int>; using pl = pair<ll,ll>; using pd = pair<db,db>; using vi = vector<int>; using vb = vector<bool>; using vl = vector<ll>; using vd = vector<db>; ...
47dfa6e8e79eda509ae3d007e66e11c954ae751e
1b6c6f0fdb47130cdefd5478bb22810b86a4c080
rohimma/chromium
/content/renderer/render_thread_impl.cc
C++
cc
94,707
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/renderer/render_thread_impl.h" #include <algorithm> #include <limits> #include <map> #include <utility> #include <vector> #include...
2bb86d524a750de98c31812251826c170036e948
1806bfdb5635f4220a292689f0561274756bebce
prudolph/cinder_gui_interface
/src/GuiObjects/MovableObject.cpp
C++
cpp
1,147
no_license
// // MovableObject.cpp // cinder_gui_interface // // Created by Paul Rudolph on 7/22/13. // // #include "MovableObject.h" void MovableObject::setup(app::WindowRef window, Vec2f pos,Vec2f size,string text){ registerForInput(window); setPosition(Vec2f(400,400)); setSize(size); setText(text); } void...
bbd5bfc02ec94adfe65de9b99963c9e311e151cf
167874f77c11bf69b10933b3bd50431882ae8b49
archerjd/modcom
/Release 2.0.6/SourceCode/src/vgui2/vgui_controls/KeyRepeat.cpp
C++
cpp
2,488
no_license
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "vgui_controls/pch_vgui_controls.h" #include <vgui_controls/KeyRepeat.h> // memdbgon must be the las...
e66b4da3359f8bb22f5152dbe145e7620d1cf818
999ab155c47f9356fe305eed8da9e9f214b90d03
Mohamedss/qt-segy-viewer
/printview.cpp
C++
cpp
2,431
no_license
/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the demonstration applications of the Qt Toolkit. ** ...
dff7255c5082a43604e2b96b9d71f65d857bc570
9999f5a859406f03a9d0a10a11a1640bde0104f7
flaithbheartaigh/symbian-4x-space-game
/implementation/game/Events.cpp
C++
cpp
1,821
no_license
// Symbian 4X Space Game // // Copyright (C) 2011 Patrick Pelletier // // This program is free software: you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation, either version 3 of the License, or any later // version. //...
15a17be915ded61118ae5efc5aa8b4d63ec3471d
6089d171eca170c087d59a48be4e0be317b4cb4c
ZhenweiRanpak/pcl-project
/pcl-project/asc_txt.cpp
C++
cpp
3,424
no_license
#include <iostream> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <pcl/registration/icp.h> #include <pcl/features/normal_3d.h> #include <pcl/visualization/pcl_visualizer.h> #include <pcl/surface/mls.h> #include <pcl/common/centroid.h> #include <pcl/common/transforms.h> #include <pcl/filters/statistic...
2d86283277bf04055d6885272546f9a108952edd
4ec8d37ddc71a411dbfc4ddba1ff7d6f70d1a074
progress0987/APIFrameworkBase
/API_Base/winAPI/winAPI.cpp
C++
cpp
3,030
no_license
#include"stdafx.h" #include"mainGame.h" //API : Application Programming Interface HINSTANCE _hInstance; //어플 고유번호 HWND _hWnd; //조작질 LPTSTR _lpszClass = TEXT("API BASE"); POINT ptMouse; FLOAT ptScale; //스케일 값(마우스로함) mainGame _mg; void setWindowsSize(int x, int y, int width, int height); LRESULT CALLBACK WndP...
b55ef104b0698b63c801f219ac037bd5a73ffc4b
c14b508013b4dadfd76da054ec5dd261180ee796
MedicaicloudLink/Rosetta
/main/source/src/protocols/hbnet/UnsatSelectorCreator.hh
C++
hh
1,408
no_license
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
0e0179a8ddcfc9d3c72c77fa9dcc6b5c4d774f53
48facf105233d2655a60a1d2db675082fe7c89ee
DimonMobile/DP
/3/extendedEu/extendedEu/extendedEu.cpp
C++
cpp
459
no_license
// extendedEu.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> int gcd(int a, int b, int& x, int& y) { if (a == 0) { x = 0; y = 1; return b; } int x1, y1; int d = gcd(b % a, a, x1, y1); x = y1 - (b / a) * x1; y = x1; return d; } int main(int arg...
326f8e5b2f0e89053e34191ce3329dac4fc6d707
f1c8364334a8aee9473d4f5e5956ce3fe379006e
myCigar/Cpp-Primer
/ch08/ex8_07.cpp
C++
cpp
1,534
no_license
#include <iostream> #include <fstream> #include <string> struct Sales_data { std::string bookNo; unsigned units_sold = 0; double revenue = 0.0; std::istream& read(std::istream &cin); std::string isbn() const; void combine(const Sales_data &trans2); void print(std::ostream &cout) const; };...
6631f703b85c6e2877214a391a78012ef0813813
ff142c5d1a2a505b16ecb1e7746d0b13cde2f3eb
root-jeong/BOJ
/~9999/2447_별 찍기10.cpp
C++
cpp
1,035
no_license
#include<cstdio> #include<iostream> #include<cmath> using namespace std; char arr[2201][2201]; int S; int N; // 공백생성 함수 void makeHole(int lineSize) { for (int i = 0; i < N; i = i + (lineSize * 3)) { for (int j = 0; j < N; j = j + (lineSize * 3)){ for (int z = i + lineSize; z < i + lineSize + lineSize; z++) { ...
ad1b528bb55e33bc86f82ed9ccb839398e5538d2
3c3f15b5e23b44529196404b325c656dcbd05705
JumpingNinja/GameEngine
/Mouse.cpp
C++
cpp
1,159
no_license
#include "Mouse.h" std::map<sf::Mouse::Button, MouseStatus*> MouseStatus::map; MouseStatus::MouseStatus(sf::Mouse::Button Button) : InputStatus(static_cast<gb::Key>(Button + gb::LastKeyboardKey)) { MouseStatus::map[Button] = this; } MouseStatus::~MouseStatus() { std::map<sf::Mouse::Button, MouseStatus*>::iterator...
a31814cd5c464cc84d12217ff462e5d0480d7109
a64d129b8bceb187896db454cf0bf4110ff482b5
LinkClinton/rainbow
/rainbow-core/math/bound.hpp
C++
hpp
597
no_license
#pragma once #include "vector.hpp" namespace rainbow::core::math { template <size_t Dimension, typename T> struct bound_t { vector_t<Dimension, T> min; vector_t<Dimension, T> max; bound_t(); bound_t(const vector_t<Dimension, T>& p0, const vector_t<Dimension, T>& p1); void union_it(const bound_t<Dimen...
b5d3fdee34f18d5621816c6d822e14bedb3e58af
79b9659335fe58a5752d00f7bd469027a4d31ed0
dahai78/noip
/第一章编程基础/ch03算术表达式与顺序执行/15.cpp
C++
cpp
1,149
no_license
/* 江苏省黄桥中学 戴海源 版权所有 程序仅供参考 交流联系 626071473@qq.com */ #include <iostream> #include <cmath> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; const double pi = 3.14159; int main(int argc, char** argv) { int n, x, y; cin >> n >> x >>y; ...
1cadc17b5a1b60ced8c2150f7292282c42e38cb8
7bb9d9755c494abeb42fe1de55948773d3d28bfa
skyformat99/restinio
/dev/restinio/impl/connection.hpp
C++
hpp
30,941
permissive
/* restinio */ /*! HTTP-connection routine. */ #pragma once #include <asio.hpp> #include <nodejs/http_parser/http_parser.h> #include <fmt/format.h> #include <restinio/exception.hpp> #include <restinio/http_headers.hpp> #include <restinio/request_handler.hpp> #include <restinio/impl/connection_base.hpp> #include...
f6dfe4756efd928c3b3e5ff0db2acd78404d8dcb
a9568aeda7e450b91fc4864009b63c0efca318dc
devansh2021/My_LC_Sol
/design-authentication-manager/design-authentication-manager.cpp
C++
cpp
874
no_license
class AuthenticationManager { int ttl; map<string, int> m; public: AuthenticationManager(int timeToLive) { ttl=timeToLive; } void generate(string tokenId, int t) { m.emplace(tokenId, t+ttl); } void renew(string tokenId, int t) { if(m.count(tokenId)>0) ...
ab93ad5486e8b6f569cb818be20a98e8bf557db2
c9754f922f1046764a53a8bc7df32ca7f622c2b7
maorhayoun/LiquidCore
/LiquidCoreiOS/LiquidCoreiOS/V82JSC/Array.cpp
C++
cpp
442
permissive
// // Array.cpp // LiquidCoreiOS // // Created by Eric Lange on 2/9/18. // Copyright © 2018 LiquidPlayer. All rights reserved. // #include "V82JSC.h" using namespace v8; uint32_t Array::Length() const { return 0; } /** * Creates a JavaScript array with the given length. If the length * is negative the ret...
47ca21248f809d339ab885a11fef78554619c8c2
045c8d6c5e0e7e31f638b63c4bf72fdbeb7879b6
sr3dna/opentoonz
/toonz/sources/common/tcore/tstopwatch.cpp
C++
cpp
10,431
permissive
#include "tstopwatch.h" #include <sstream> #ifdef _WIN32 #include <stdlib.h> #else //_WIN32 #include <unistd.h> #include <limits.h> #include <sys/times.h> #include <sys/types.h> #include <time.h> #ifndef STW_TICKS_PER_SECOND #ifndef _WIN32 extern "C" long sysconf(int); #define STW_TICKS_PER_SECOND sysconf(_SC_CL...
4ef6c8f7387cf9d4d3d2eba208d687b1a7dd20e8
4382e3933c4a646e2c2688e12c18b229a7332ac4
vityo/OpenGLApps
/3 HelloRectangle/HelloRectangle/main.cpp
C++
cpp
3,900
no_license
#include <iostream> #define GLEW_STATIC #include <GL/glew.h> #include <GLFW/glfw3.h> const GLuint WIDTH = 800, HEIGHT = 600; void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); } int mai...
f353afadf66c0fa4f8a217a0308f5826fa15524a
ffac6aaa91273c02dbbbc005491b436c3b035e7c
amju-games/lo-res
/unit_tests/pixel_intersect_tests.cpp
C++
cpp
4,160
no_license
// "LO RES" // (c) Copyright 2017-2022 Juliet Colman #include "catch.hpp" #include "image_8.h" #include "sprite_sheet.h" // Test pixel-perfect intersection between two sprite sheets. class pixel_fixture { public: pixel_fixture() { image1 = std::make_shared<image_8>(); image2 = std::make_shared<image_8>()...
728e0685c83144da482856600203cecaa4cc552c
4ff193f720f01345f428c9304d6712ab713dd863
MartiDavicino/Project_UPC
/UPC 2019-2020/Project versions/PANG version 0.07/Project_7_Handout/Source/Application.cpp
C++
cpp
2,131
no_license
#include "Application.h" #include "Module.h" #include "ModuleWindow.h" #include "ModuleInput.h" #include "ModuleTextures.h" #include "ModuleAudio.h" #include "ModulePlayer.h" #include "ModuleScene.h" #include "ModuleParticles.h" #include "ModuleEnemies.h" #include "ModuleCollisions.h" #include "ModuleRender.h" Applic...
ffd85c50fac58c2f015023de93889fe84c9c1cee
39a725a40512b9bbfdf2fc61b5f73db9cfda76a5
operativeF/Kvasir
/Lib/Chip/CM4/Freescale/MKV43F15/LLWU.hpp
C++
hpp
63,342
permissive
#pragma once #include <Register/Utility.hpp> namespace Kvasir { //Low leakage wakeup unit namespace LlwuPe1{ ///<LLWU Pin Enable 1 register using Addr = Register::Address<0x4007c000,0xffffff00,0x00000000,unsigned char>; ///Wakeup Pin Enable For LLWU_P0 enum class Wupe0Val { v...
8bebbaeae89493d9eaa3da117fb7871ed9a857a2
928e1ea091121d73dda3ccfccbb438b79df27845
zylzjucn/Leetcode
/100~199/131. Palindrome Partitioning.cpp
C++
cpp
860
no_license
class Solution { public: vector<vector<string>> partition(string s) { vector<vector<string>> res; vector<string> v; find(s, res, v, 0); return res; } void find(string s, vector<vector<string>> &res, vector<string> &v, int start) { if (start == s.length()) { ...
10796060c943b941312a0ad3aec16157e4767770
8871c98201d689cc16524bec2fb0ff5c47033796
Darkvood/cpp-learn
/basic/0032.15_class_operator_index.cpp
C++
cpp
303
no_license
#include <iostream> using namespace std; class MyClass { public: int& operator[](int index) { return arr[index]; } private: int arr[5]{ 1,2,3,4,5 }; }; int main() { MyClass c1; cout << "c1[3] = " << c1[3] << endl; // 4 c1[3] *= 2; cout << "c1[3] = " << c1[3] << endl; // 8 return 0; }