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
58fb790d1056bda43e1daefd862fe464f09f1f28
431599f922cda4ae229c58b09e5f2abbefc50c29
HuRRiCaNe276/ygopro
/ocgcore/playerop.cpp
C++
cpp
23,118
no_license
/* * playerop.cpp * * Created on: 2010-12-22 * Author: Argon */ #include "field.h" #include "duel.h" #include "effect.h" #include "card.h" #include <memory.h> #include <algorithm> int32 field::select_battle_command(uint16 step, uint8 playerid) { if(step == 0) { pduel->write_buffer8(MSG_SELECT_BATTLECMD...
551cfb6b9f8e8be5c2f34199d5a8566ed7af6216
324f28b0fa1aca156a95458415a3214052d48fa4
jmsaavedra/NWS_Collabs
/Spring_2014/Haydn_NWS_2014_FINAL/src/Curtain.cpp
C++
cpp
581
permissive
// // Particle.cpp // spacebrewSoundflower_example // // Created by Bernardo Santos Schorr on 3/1/14. // // #include "Curtain.h" void Curtain::setup(ofVec2f _pos) { pos = _pos; initPos = pos; resolution = ofGetWindowWidth() / 160; } void Curtain::update(ofxOpticalFlowFarneback &_flowSo...
05127effa418ced5e258fb65c00eb47ed3990735
181e72a310b6bbf5e99863351b1f07597087fb1c
seanzli/GenerateLas
/include/LasGen.hpp
C++
hpp
2,104
no_license
/* * @Descripttion: * @version: V0.1 * @Author: Sean * @Date: 2021-08-01 09:18:04 * @LastEditors: Sean * @LastEditTime: 2021-08-01 10:23:58 */ // c++ stl #include <string> #include <iostream> #include <fstream> #include <cmath> // 3rd //#include <liblas/liblas.hpp> //#include "laswriter.hpp" #include "LAStool...
83adfebf945be364c32a0743dcb8ba37b053b88d
7ea052d7fb48d2042de870cc6a63474ebfd8d9d1
Lingen1218/Smilei
/src/Diagnostic/DiagnosticProbes.cpp
C++
cpp
22,206
no_license
#include <sstream> #include <vector> #include <limits> #include "DiagnosticProbes.h" #include "VectorPatch.h" using namespace std; // Calculates the inverse of a square matrix, given row by row vector<double> matrixInverse(vector<double> A) { unsigned int size = A.size(); unsigned int dim = sqrt( si...
0d565105bde59fb8b93fe63ab80fb0295c145c30
78ae849a397469a27b3b1f12ad8dede147fdc51c
Dolphindalt/OPENGL_EXPR
/src/Renderer2d.cpp
C++
cpp
1,222
no_license
#include <Renderer2d.h> #include <shaders.h> #include <player.h> #include <resources.h> extern Player *player; extern Camera *camera_o; GLuint _shader_program_2d; Renderer2d::Renderer2d() { const std::string vertex2d_path = "shaders/vertex2d.glsl", fragment2d_path = "shaders/fragment2d.glsl"; _shader_progra...
85f9f5c3e9062ac5e708ffdb64bf7c06c8fa9201
e065cf15b15500c1586260f546ea6a8e9e8cfed0
avatarbuss/dotnet-api-docs
/samples/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp
C++
cpp
1,686
permissive
/// Class: System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger /// 10 class /// 21 #ctor() /// 22 #ctor(Decimal) /// 13 GetXsdType() /// 11 Parse() /// 12 ToString() /// 14 Value /// 16 XsdType /// Bugs in SoapNonPositiveInteger: /// No bug...
f59b089788e21b026fa99dab17b89eda2dfa7e40
54d2d641abc7ca0b5835e4b4fcc03d3ca5fd8e92
2bite/ARK-SDK
/SDK/ARKSurvivalEvolved_PrimalItemConsumable_Egg_Spider_Fertilized_Aberrant_functions.cpp
C++
cpp
1,390
permissive
// ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemConsumable_Egg_Spider_Fertilized_Aberrant_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //------------------------------...
98b56e50aa3a0bb48d6e5ba9d7c732306e0986e6
105b5f2ff6c4d0038de65e8e61c5a0607aa2b445
Mouadzz/CPlusPlus-Pool
/day05/ex01/Form.cpp
C++
cpp
2,531
no_license
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Form.cpp :+: :+: :+: ...
7599545cea0065880f6715097d1a21e727a64d6c
6eb106dfecbf2371109dbce815877fc733d45baa
sp0n-7/mapbox-gl-native
/src/mbgl/style/expression/formatted.cpp
C++
cpp
1,673
permissive
#include <mbgl/style/expression/formatted.hpp> #include <mbgl/style/conversion_impl.hpp> #include <mbgl/style/expression/is_constant.hpp> #include <mbgl/style/expression/is_expression.hpp> #include <mbgl/style/expression/literal.hpp> #include <mbgl/style/expression/expression.hpp> #include <mbgl/style/expression/type.h...
3635fe4526e562b57550c0a8351e261fe49f5414
025692f355560532af0ec7f5239e5d91db46f526
MaxJTRice/CSE_131_Compiler
/p0/main.cc
C++
cc
1,977
no_license
/* File: main.cc * ------------- * This file defines the main() routine for the program and not much else. * You should not need to modify this file. */ #include <string.h> #include <stdio.h> #include "utility.h" #include "errors.h" #include "scanner.h" #include "location.h" /* Function: PrintOneToken() * Usage...
4e028ea608352215b80c8a72ae3007524617a680
57a64d0302485217c8d3fa8c9ef980c8544a0c56
suhyunx/xcode-files
/20140206/main.cpp
C++
cpp
971
no_license
// // main.cpp // 20140206 // // Created by JM Park on 2014. 2. 6.. // Copyright (c) 2014년 JM Park. All rights reserved. // #include <iostream> using namespace std; class test { private: int x; int y; public: void clim() { cout << " 첫번째 값을 입력해주세요 " << endl; cin >> x; cout << "...
8921fdca9278b70e2a7db76db48938817addeebc
cebf4aa84f67c91ce061e8a0dc3dd303dcb9a76c
ojaster/first_project
/2dArrays/2DMassive62.cpp
C++
cpp
458
no_license
#include <iostream> #include <stdlib.h> using namespace std; int main(){ const int n=5; int k[n][n]; int sum=0; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ k[i][j]=rand()%100; cout<<k[i][j]<<"\t"; } cout<<endl; } for(int i=0; i<n; i++){ fo...
db8d2b679b44af5edf7e28434c9f902afb8c72bd
128e1147cac5358d397cb3c2c2cebb849217ae33
K-Wu/libcxx.doc
/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/const_Types.pass.cpp
C++
cpp
4,538
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 // //===---------------------------...
b127c6457d2d07f7acff4509c7fec277475ee9cd
1377e987815bdb6fa51ac0b2d22d4e1e74fc62f0
elliptic1/NDK_Engine
/app/src/main/jni/engine/sound/Sound_Sample.hpp
C++
hpp
1,537
no_license
// // Created by F1 on 6/16/2016. // #ifndef ENGINE_SOUND_SAMPLE_H #define ENGINE_SOUND_SAMPLE_H #include "../common.hpp" #include "../File_Utils.hpp" #include "SL_Utils.hpp" class Sound_Sample { public: const char *raw_data; int length = 0; int raw_data_length = 0; Sound_Sample(const char *filepa...
d2bceb66631d58cb4b4ca70367a4448188ff3ca4
331bb4981251eec0041e0680b4fabae6cc6050c8
mprzypasniak99/MQ_lib
/ExamplePrograms/tests/userListTest/reader.cpp
C++
cpp
1,713
no_license
#include "../../lib/MQ_lib.hpp" #include "../../lib/MessageHandler.hpp" #include <vector> #include <cstdlib> void response(uint16_t code) { if(code >= 200 && code < 300) { printf("Success!\n"); } else { printf("Failure!\n"); } } void messageResponse(std::string q, std::string user...
4686b77941544f28b0b7ac665a6a29f3abf56735
cad64e13ca815673c92279d60aeccbc78ff63492
IsraMekki/tiramisu_code_generator
/cmake-build-debug/programs_tiling/function14075/function14075_no_schedule/function14075_no_schedule.cpp
C++
cpp
581
no_license
#include <tiramisu/tiramisu.h> using namespace tiramisu; int main(int argc, char **argv){ tiramisu::init("function14075_no_schedule"); constant c0("c0", 512), c1("c1", 512), c2("c2", 256); var i0("i0", 0, c0), i1("i1", 0, c1), i2("i2", 0, c2); computation comp0("comp0", {i0, i1, i2}, 6 - 9); ...
fb1d78e04df364b4c773aa9a31d78e0c705be480
7d100283c6b6d22fd59c347bf15c21949ab91d8b
joshuabezaleel/cp
/coci/contest #1 2013/C.cpp
C++
cpp
2,242
no_license
#include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <algorithm> #include <utility> #include <numeric> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime...
b3bd062cfd3fef759d7b689860d73cf98dcba728
4d52bc373decd683816a44e7aac8add90665ad64
rvanvenetie/spacetime
/src/applications/uniform.cpp
C++
cpp
12,742
permissive
#include <stdlib.h> #include <boost/program_options.hpp> #include <chrono> #include <limits> #include "../space/initial_triangulation.hpp" #include "../time/basis.hpp" #include "../tools/util.hpp" #include "adaptive_heat_equation.hpp" #include "problems.hpp" using applications::AdaptiveHeatEquation; using datastruct...
51fc1bd729aa9f9770e3fd03338aa85b8bc208a7
493358297f877c162469f99ace99eb6b7917b8e3
Piinks/ADS
/RegistrationSystem/Source.cpp
C++
cpp
257
no_license
#include "RegSystem.h" #include <iostream> int main() { cout << "Welcome to the MTSU Registration Management System!" << endl << endl; RegSystem fall16 = RegSystem("Fall 2016"); fall16.readFile("test2.txt"); fall16.printRegistration(); return 0; }
951390fea5ff6893c8ba0c0d2fb002d9a085e101
ac1236a48424bf9d2a38d864731217a0abc76087
TobiasJohansen/TMA4280v2018
/P1/mach0/test.cpp
C++
cpp
370
no_license
#include <cstdlib> #include <iomanip> #include <stdio.h> #include "machin.h" int main(int argc, char* argv[]) { if(argc != 2) return 1; int iterations = std::atoi(argv[1]); if(iterations == 0) return 1; printf("Serial approximation of pi using the Machin formula after %d iterations: %.17f\n\n", iterations, Mac...
bc07b1024f3d24a46835ad81cd3147ff3ecb729e
38196e950f989497b5e75cb96694d52e2491eaed
zlxy/Genesis-3D
/Engine/extlibs/IosLibs/mesa/GLSL_Optimizer/src/glsl/ir_function.cpp
C++
cpp
6,724
permissive
/* * Copyright © 2010 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, pub...
0746bc559a937fe885530fe08b9067ec6d87f527
cb93f8068154b37c0875e54181b0cd727b9daaf7
ShiningBrightly/ieleak
/drip/src/MemDCCtrl.cpp
C++
cpp
1,930
permissive
// MemDCCtrl.cpp : implementation file // #include "stdafx.h" #include "MemDCCtrl.h" // CMemDCCtrl IMPLEMENT_DYNAMIC(CMemDCCtrl, CStatic) CMemDCCtrl::CMemDCCtrl() { m_bitmap = NULL; } CMemDCCtrl::~CMemDCCtrl() { emptyPaintCache(); } BEGIN_MESSAGE_MAP(CMemDCCtrl, CStatic) //{{AFX_MSG_MAP(CMem...
1f069bdd4e1c4b9afa701940a4034014c0f28eee
f590c0c55046931b3db3588bf589fa99d45b33c5
LegendBC/PET
/src/Graph/tensor.cc
C++
cc
555
permissive
#include "tensor.h" #include "common.h" #include "operator.h" namespace tpm { std::pair<Operator *, int> Tensor::getOutputOfWithIndex() { if (outputOf == nullptr) return {nullptr, -1}; auto it = std::find(outputOf->getOutputs().begin(), outputOf->getOutputs().end(), this); i...
ae02d93cd2a8080752c808fd421e3eb4121e4e2e
e3367af4845962bd75aa80cbcd8261682ddbac54
boorad/impala
/be/src/common/global-flags.cc
C++
cc
1,992
permissive
// Copyright 2012 Cloudera Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
65227df8b58aec17dbcfc87064066989ead4612f
eb46e960adec3d96ab7770e22fc2cd56dd543b3d
amanashu201/Aman2002
/CPP/StackWorkingDemo.cpp
C++
cpp
343
no_license
#include<iostream> using namespace std; class StackWorkingDemo { public: static int id; StackWorkingDemo() { id++; cout<<"Object "<<id<<" Created!"<<endl; } ~StackWorkingDemo() { cout<<"Object "<<id<<" Destroyed!"<<endl; id--; } }; int StackWorkingDemo::id = 0; int main() { StackWorkingDemo s1,s2,...
602d349b9070aa2c01e0d9a19fc8a35de5380367
9854318cd3847cd56dfc6ee6e07bac73a3d50185
Tekh-ops/checkedc-clang
/clang/lib/Parse/ParseExpr.cpp
C++
cpp
168,083
permissive
//===--- ParseExpr.cpp - Expression Parsing -------------------------------===// // // 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 // //===---------------------------...
362c43fe316d382bf81fd391f84271086205a4d8
88ebcdf8e60282df841a0f3ecdcd5373a95585f0
touchlab/kotlin-native
/runtime/src/main/cpp/Runtime.cpp
C++
cpp
10,810
permissive
/* * Copyright 2010-2017 JetBrains s.r.o. * * 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 agre...
9d3b55db90e71ec3d65ad358938acec428000119
a40231ca946abdb548d659084c3bd5b08e398ba1
kumokumo1653/Atcoder
/PastQuestions/ABC145C.cpp
C++
cpp
855
no_license
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define CMAX(m, x) m = max(m,x); #define CMIN(m, x) m = min(m,x); #define itn int typedef long lon...
2ae0a14d0768f9eab8affd9b4656d17674c3bf40
f48df84401a9b36a8a4329412dbdbe8d543f441d
Yeolar/coral
/folly/test/DynamicOtherTest.cpp
C++
cpp
3,268
permissive
/* * Copyright 2015 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
631ba20e4e784ef67c43b6353ec0367dabf6093d
1758860e46300e8e8b0a282dc8415bfa6ab27153
csarofeen/pytorch
/third_party/nvfuser/benchmark/softmax_backward.cpp
C++
cpp
11,433
permissive
#include <executor.h> #include <fusion.h> #include <ir_all_nodes.h> #include <ir_utils.h> #include <lower2device.h> #include <ops/all_ops.h> #include <scheduler/all_schedulers.h> #include <benchmark/benchmark.h> #include <cuda_runtime.h> #include <benchmark/utils.h> //-----------------------------------------------...
87879c8620184b1f82ab46234a6d4f1d80f4ff46
cd58b5f475631462259fc3caea6fbeb17df49de7
sonali9696/InterviewBit
/Binary Search/Painter's Partition Problem.cpp
C++
cpp
1,544
no_license
bool isPossible(int T, int K, int B, vector<int> &C) { long long int len = C.size(); long long int i=0; long long int timeSpent = 0; while(K > 0 && i < len) { long long int var = timeSpent % 10000003 + B*C[i] % 10000003; var = var % 10000003; if(var < 0)//too high ...
c971391ed4392ce473ea1b987611d14ff56f864a
6aecee01b9b74b5edba7a28d1d7082cdc4ae5daf
kreischtauf/CSRST
/src/ShapeFunction.hh
C++
hh
18,909
permissive
/*************************************************************************** ShapeFunction.hh ------------------- begin : Thu Feb 23 2012 copyright : (C) 2012 by Christof Kraus email : christof.kraus-csrst@my.mail.d...
a892c01ae5193b8e820f3cf2ba40e96290953ef7
1328418c5d7fd4e36e622b2ae41f7064c6a413bb
renzov/Red_Crown
/Codeforces/CF-627/D.cpp
C++
cpp
628
no_license
#include<cstdio> #include<algorithm> using namespace std; const int MAXN = 200005; int pos[MAXN]; int neg[MAXN]; int A[MAXN]; int B[MAXN]; void process(){ int N; int a, b; scanf("%d", &N); for ( int i=0; i < N; ++i ){ scanf("%d", A + i); } for ( int i=0; i < N; ++i ){ scanf("%d", B + i); } for ( int i=0;...
463b2c34ee75be190b1da26fa355a7f14fdf5e31
d18c84404ff7dabb44fa92d9d91b910b35b8053b
abdelrady/CS-Code-Samples
/Second+Third_Year/Third Year/Second Term/all/Graphics/Project1/TRANSFORMATIOn/all operation of transformation/mostafa/mostafa/PaintView.cpp
C++
cpp
8,494
no_license
// PaintView.cpp : implementation of the CPaintView class // #include "stdafx.h" #include "Paint.h" #include "PaintDoc.h" #include "PaintView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////...
9c7f29546b7dfb7d0632ecba55b5e84851f48dc7
d63797330ad8b0e1fa8bd091916bd0eea7311696
kmmao/ZLMediaKit
/server/WebApi.cpp
C++
cpp
57,588
permissive
/* * Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved. * * This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit). * * Use of this source code is governed by MIT license that can be found in the * LICENSE file in the root of the source tree. All contributing project authors ...
66a4e414cbde0bc43181a20d7ee40eb02b02b95c
e72fbc6e1451074592ab632fcd5b77b2df0aa9d2
chaomengnan/aliyun-openapi-cpp-sdk
/ehpc/src/model/CreateGWSImageResult.cc
C++
cc
1,522
permissive
/* * Copyright 2009-2017 Alibaba Cloud 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...
239c5c42aae99e72d1c72a8e3a163c36a955819c
302d44163f1f1282efac9d2f3245e96700c3eb72
gokaykacan/Cpp-works
/Parsing Text in Files/Parsing.cpp
C++
cpp
498
no_license
#include <iostream> #include <fstream> using namespace std; int main (){ string filename = "stats.txt"; fstream input; input.open(filename); if(!input.is_open()){ return 1; } while(input){ string line; getline(input, line, ':'); int population; input >> population; input >> ...
3df309eba853643713d9711118d948875c1c296f
f3601cfc166754cdf1498fa4d9129bc010d3466d
soaped/incubator-doris
/be/src/vec/functions/function_ifnull.cpp
C++
cpp
1,121
permissive
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
f6bcc71896a121823fce0d06a7e5b3a548070807
d23d13528db436ba93617bfb151c4c87bf1000e8
Ashish-uzumaki/CG
/OGL_Primer_by_Ankita-christine-victor_2019-01-11/main3_3.cpp
C++
cpp
6,984
no_license
#include <bits/stdc++.h> #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> using namespace std; #define cout(a) cout<<a<<endl // IDs GLuint VAO, VBO, VAO2, VBO2, shaderID, uniformModel; float scale = 1.0, x = 0.0, y = 0.0; con...
44ecd35ce65ab5f0100580ae59a299df7c46a62f
e1bb9139f3e9b1b7ccf91f12c25c258efc9a966b
Nexuapex/Harmony
/src/gx/gx_texture_atlas.cpp
C++
cpp
2,068
no_license
// // gx_texture_atlas.cpp // Harmony // #include "gx_texture_atlas.h" #include "gx_texture.h" #include "gl.h" namespace harmony { gx::texture_atlas::texture_atlas(gl::size_t tile_size) : tile_size_(tile_size) {} void gx::texture_atlas::add_texture(const texture_ref & texture) { textures_.insert(texture); } ...
5608f013e13ff8a76ef82f100c9798f6fcfcae9d
b0c2e043922a7a540e7839cad34b093f5d0afb10
windrobin/ovise
/XMLRPCInterface/back_up/Connection.cpp
C++
cpp
3,428
permissive
#include "Connection.h" Connection::Connection(boost::asio::io_service& _io_service, XMLRPCMessageHandler& _handler) : m_strand(_io_service), m_socket(_io_service), m_msgHandler(_handler) {} Connection::~Connection() {} boost::asio::ip::tcp::socket& Connection::socket() { return m_socket; } void Connection::start()...
902891620daf0e47a4d08e48266cd734150cf3ef
06f9aeefbe672fb1c25e22957e38fcc522fcbfa9
MiguelLentisco/practicas-ig
/alum-srcs/materiales.cpp
C++
cpp
16,122
no_license
// ********************************************************************* // ** // ** Gestión de materiales y texturas (implementación) // ** // ** Copyright (C) 2014 Carlos Ureña // ** // ** This program is free software: you can redistribute it and/or modify // ** it under the terms of the GNU General Public License a...
f1484be137cec2e58df51111430858bf456206f7
a929da4e233dc76007de7012a58f3d0655def9b0
amaleewilson/clang
/lib/Lex/Lexer.cpp
C++
cpp
143,733
permissive
//===- Lexer.cpp - C Language Family Lexer --------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
72ace6b1a97f9701bfb4cdab59acb71718c93814
bcb88b69c1967bc513cbec8510ba162172edf85a
ozqf/zealous_engine
/games/run_n_gun/rng_ent_null.cpp
C++
cpp
2,241
no_license
/* Empty base entity type code. Shows basic blueprint concrete entities extend */ /* In fact, here is a little template for that: #include "rng_internal.h" ze_internal ZEngine g_engine; ze_internal zeHandle g_scene; ze_internal void Restore(EntStateHeader* stateHeader, u32 restoreTick){} ze_internal void Write(Ent2d...
01c42a1213fe5faf404a1b42f4bfdfb54517635f
f857b3e0dedb097810e137742529c9c9b3f1a518
Nisonic/FAST
/source/FAST/Algorithms/UltrasoundVesselDetection/VesselCrossSection.hpp
C++
hpp
798
permissive
#ifndef VESSEL_CROSS_SECTION_HPP_ #define VESSEL_CROSS_SECTION_HPP_ #include "FAST/Data/DataObject.hpp" #include "VesselCrossSectionAccess.hpp" #include "FAST/Data/Access/Access.hpp" namespace fast { class FAST_EXPORT VesselCrossSection : public DataObject { FAST_OBJECT(VesselCrossSection) public: v...
58aa7b2c6db97c833700c9fef35f5cb9dbfdf845
07c217324a2e8104e82a01e9face61e2c140c90a
anhdamm/Data-Structure-Array-List
/test3.cpp
C++
cpp
9,392
no_license
//-------------------------------------------------------------------- // // Laboratory 3 test3.cpp // // Test program for the operations in the List ADT // //-------------------------------------------------------------------- #include <iostream> using namespace std; // B...
29263122b00697f48e4c08e369bcb6bb61fe4f60
adec06e2167a9c24590e01ecd4ddda7ecba0095c
sayands/competitive-programming
/LeetCode_Solutions/Remove_Duplicates_From_Sorted_List_II.cpp
C++
cpp
864
no_license
// 82 - Remove Duplicates from Sorted List II /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ #include <iostream> #include <bits/stdc++.h> using namespace std; class Solution { public: ListNode *delet...
af5c49f65ccd9c8eb8c7dcada8615b0534866736
21840dd0cb1ef370423ac0d0424123c0eacc873e
SongkyoLee/KUNPL
/2011/LAMPS_tof/tof_Helium/draw_hist_02.cc
C++
cc
2,008
no_license
#include "TFile.h" #include "TTree.h" #include <fstream> #define XMIN 144.5 //set #define XMAX 153.5 #define Nbin 40 void draw_hist_02() { TFile* f = new TFile("tof.root", "READ"); TTree* t1 = (TTree*)f->Get("T"); //from T to t1 Int_t entryNum = t1->GetEntries(); //total entry number std::cout<< "entryNum :...
8f8496aad99b97f7ae6ba04d366789ec83dd6d8c
11d75331a94ed7931ac52101e95162009b6ac40d
x1aoo/openvino
/inference-engine/src/transformations/include/transformations/convert_opset1_to_legacy/convert_convolutions.hpp
C++
hpp
1,396
permissive
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <vector> #include <memory> #include <transformations_visibility.hpp> #include <ngraph/pass/graph_rewrite.hpp> namespace ngraph { namespace pass { class TRANSFORMATIONS_API ConvertConvolutions; class TRANS...
0af6db9258681f40ada441e6ed47745aa938df0d
aeb2780159526bcf37efa082979f6ac05c7e2779
guanzi008/OpenTheDoor-X
/OpenTheDoor/src/notifier.cpp
C++
cpp
4,984
no_license
#include "../include/notifier.h" #include "../include/utils.h" #include <jsoncpp/json/json.h> #include <curl/curl.h> #include <iostream> #include <fstream> #include <cstring> #include <ctime> using std::string; #define NDEBUG Notifier::Notifier(): setuped_(false), curl_(nullptr), sckeys_{"", "", "", ""} { } Not...
fa63684ca955d29cc34c43113e33164b86a2c93f
f8c09a4b9f25cc805ea02c9f1260e89473e7db02
dylie/chromium
/chrome/browser/ui/ash/chrome_launcher_prefs.cc
C++
cc
28,417
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 "chrome/browser/ui/ash/chrome_launcher_prefs.h" #include <stddef.h> #include <memory> #include <utility> #include "ash/constants/ash_featu...
ae690271f4b5a7916496f910f8d6f8ccc19c593a
52a8996f0210071db3f6e5412820315e3b66f269
OddballGreg/Bomberman
/Other Stuff/gameEngine/gameEngine/Vertex.hpp
C++
hpp
431
no_license
#pragma once #include <GL/glew.h> namespace gameEngine { struct Position { float x; float y; }; struct UV { float u; float v; }; struct Colour { GLubyte r; GLubyte g; GLubyte b; GLubyte a; }; struct Vertex { Position position; Colour colour; UV uv; void setColour(GLubyte r, G...
43b4766e7a8bdc1f714be367ad013e652ee9d409
4871245186debc29cdc2ef07d3e4b08f09f06ad1
filipeabelha/gym-solutions
/cdf/267154l.cpp
C++
cpp
991
no_license
#include <bits/stdc++.h> using namespace std; #define gcd(x, y) __gcd((x), (y)) #define pb push_back #define st first #define nd second typedef long long ll; typedef pair <ll, ll> pll; typedef vector <int> vi; ll a, b, n, x, y, h, ans; map <pll, vector <pll> > m; int main () { scanf("%lld%lld%lld", &a, ...
8053cd04e50a1c4c73965fa24d342f918f1ec278
33397eed38acc26841199030d454ea02885509d2
elyo9381/practice
/boj/boj_11725_treefindparent_DFS(with graph).cpp
C++
cpp
1,418
no_license
#include <bits/stdc++.h> #define endl '\n' #define MAXN 100003 typedef long long ll; using namespace std; /* 연결리스트를 이용한 그래프의 부모 구하는 방법은 parent배열을 놓은뒤에 DFS를 돌리는것이다. vis 배열을 통해서 방문여부를 체크하고 방문하였으면 연결되어있는 노드에 1-6 1-4가 연결되어있을때 adj[1][0], adj[1][1]를 방문하고 배열안에 들어있는값을 p[nxt]에 cur이 부모가 된다. */ int T; ...
d9ede660d2c016f4fb85be11256a4698f2910200
e7ecc75955e042948c1815a3fba931b3aa0da950
spjammy/OPS
/apps/CloverLeaf_3D/MPI_OpenMP/update_halo_kernel3_minus_2_b_omp_kernel.cpp
C++
cpp
6,578
no_license
// // auto-generated by ops.py // #ifdef _OPENMP #include <omp.h> #endif //user function inline void update_halo_kernel3_minus_2_b(double *vol_flux_x, double *mass_flux_x, const int* fields) { if(fields[FIELD_VOL_FLUX_X] == 1) vol_flux_x[OPS_ACC0(0,0,0)] = -(vol_flux_x[OPS_ACC0(-2,0,0)]); if(fields[FIELD_MASS_F...
98a134557bd3b0c32c46bf351f9eb0a5dbfdf50b
0006db0d071cde00786daff7da9668264780b500
like0403/v8
/test/cctest/compiler/function-tester.cc
C++
cc
6,666
permissive
// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "test/cctest/compiler/function-tester.h" #include "src/ast/ast-numbering.h" #include "src/compilation-info.h" #include "src/compiler.h" #inclu...
c4e4eb02a8721f737159498e45a66972b1157db0
757b64dea137fdc145b7177f175ba1565f5d0bb0
abaty/OpenGL_LHC
/src/Event.cpp
C++
cpp
8,729
no_license
#include "include/Event.h" #define SPEED_OF_LIGHT_M_PER_NS 0.2998 #define UNIT_CONVESTION_FOR_P 1.602*SPEED_OF_LIGHT_M_PER_NS/5.39 #define PI 3.14159265359f float UniformRandom(float min, float max) { return min + (max - min) * (rand() % 10000) / 10000.0f; } Event::Event(double _startTime, double _animationTime, dou...
afff0ae4dd1c9f2bd28022846fc9d5579fc0c13e
68cd2bb0ff2933f5063559593a8e7e913417bbb5
alibaba/weex
/weex_core/Source/android/jsengine/object/weex_global_object.cpp
C++
cpp
40,614
permissive
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
1773c06ce58f67efe4d3d7eea0dec36b1610b2f8
5550551ee2594650a1622fe9e9951ca9da8d1a3c
gdrcoin/gdrcoin
/src/wallet/walletdb.cpp
C++
cpp
26,649
permissive
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Gdrcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "wallet/walletdb.h" #include "base58.h" #include "consensus/tx_verify.h...
61d7b2d46d8d3538e3ceab92458ea9892561a722
02765c2a6ce0647439a20f3520c6508e13506e6a
d685shvarts/textGame
/Space.cpp
C++
cpp
5,277
no_license
/*************************************************************************************************************************************** ** Program name: Space implementation file ** Author: Daniel Shvarts ** Date: 03/19/2019 ** Description: Implementation of abstract Space class that will be used to create 6 other der...
cf0ef126b13a6adc340b56eeaef3966742cd7dbc
26842c4a08061eec19c47a378010e179a2d47737
fccoguz/OpenSeaSeis
/src/cs/modules/picking/mod_picking.cc
C++
cc
45,908
no_license
/* Copyright (c) Colorado School of Mines, 2013.*/ /* All rights reserved. */ #include "cseis_includes.h" #include "geolib_methods.h" #include "csSort.h" #include <cmath> #include <cstring> using namespace cseis_system; using namespace cseis_geolib; using namespace std; /** * CSEIS - Seabed S...
7daf8ce92f545c855f8deb8da6e0bb1374f89ebf
b22a7ad21624c90a9b69f9379259834b013849cf
taishanren88/Practice
/dailycoding/rot_k.cpp
C++
cpp
897
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; void rotate( vector<int>& input, int k) { k = k % input.size(); int posToFill = 0; const int N = input.size(); const int offset = N - k; int current = offset; while (posToFill < k) { swap(input[posToFill], input[current]); ...
86addc17fbec1334042d3f314a559af53a5831ef
a6108d2d4174500dcb7cc8ee042a9f8a5585d8ae
quasar0204/Problem-Solving
/BOJ/5572.cpp
C++
cpp
1,034
no_license
#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif #include <cstdio> #include <algorithm> using namespace std; typedef pair<int, int> pi; int n, m, k, a[1005]; pi swp[100005]; int up[1005], down[100005]; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif scanf("%d %d %*d...
0de90a0ce9358ea9f62fb50c4ccd8352ea9e41bf
70a784221eee7ddd6366782b15f8faef8483ba66
pilgarlicx/rendering-fw
/RFW/backends/VkContext/src/ShaderModule.cpp
C++
cpp
1,312
permissive
// // Created by Mèir Noordermeer on 12-09-19. // #include "ShaderModule.h" #include "VulkanDevice.h" #include <rfw/utils/file.h> using namespace vkc; static std::vector<char> read_file(const std::string_view &filename) { std::ifstream file(filename.data(), std::ios::ate | std::ios::binary); if (!file.is_open())...
03a97d6c1c5a7f1c2b38487f52d1dc21c0d293ee
0f3dc5837d4ee004a5ac31ad67f53b0541577953
netzz/minemonics
/Minemonics/src/view/visualization/bulletphysics/OgreBtDebugDrawer.hpp
C++
hpp
6,874
no_license
#ifndef VIEW_VISUALIZATION_BULLETPHYSICS_OGREDEBUGDRAWER_H_ #define VIEW_VISUALIZATION_BULLETPHYSICS_OGREDEBUGDRAWER_H_ //# corresponding header //# forward declarations class btDynamicsWorld; namespace Ogre { class Overlay; class OverlayContainer; class OverlayManager; class TextAreaOverlayElement; } /* namespace Ogr...
927d6c722fa1987741a37f3ef7e3b5d8f87f9ce9
6aad7b588e0f83f3168cf6b7c4dc77368d30e8e9
stevebeard/rend
/src/api/vulkan/logical_device.cpp
C++
cpp
11,502
no_license
#include "logical_device.h" #include "physical_device.h" #include "command_pool.h" #include "command_buffer.h" #include "descriptor_pool.h" #include "descriptor_set_layout.h" #include "event.h" #include "fence.h" #include "framebuffer.h" #include "gpu_buffer.h" #include "image.h" #include "pipeline.h" #include "pipeli...
8209bdc8a671126cdd8e8ffd707008a176766fd6
34ab44fc266432c7266c78ea983e0c5f01d2727a
chi-tech/chi-tech
/modules/MGDiffusion/lua/setBCproperty.cc
C++
cc
7,535
permissive
#include "chi_lua.h" #include "../mg_diffusion_solver.h" #include "chi_runtime.h" #include "chi_log.h" namespace mg_diffusion::mgd_lua_utils { //############################################################################# /** Sets a property of a Diffusion solver. Please also consult the whitepaper * for the Diff...
aed9548886d332e7342e3d4248150b87fcd2d150
2b20ce6a2eb26cec437bc6e8e235b6171ff123a4
Manu343726/Sprout
/sprout/type_traits/is_object.hpp
C++
hpp
1,026
permissive
/*============================================================================= Copyright (c) 2011-2015 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout 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.tx...
af2e079324dbd8ad56a03b883fb7eb53f64bd5da
bccecaa0f8dcc8f99668c96d920229260c9f4e3b
coolboy/myptm
/myPTM/Scheduler.cpp
C++
cpp
5,514
no_license
#include "StdAfx.h" #include "Scheduler.h" #include "LockManager.h" #undef max using namespace std; using namespace boost; typedef list<TranManager::Operation> OpLst; ////////////////////////////////////////////////////////////////////////// //Get trans by id OpLst GetTransactionsById(const OpLst& ...
e3502dac7ab8fde7caadfd53d6ab912d73f5da48
b5b02be32a7e7fb85486c16c64e51fd347c49502
polyfem/polyfem
/tests/test_utils.cpp
C++
cpp
5,114
permissive
//////////////////////////////////////////////////////////////////////////////// #include <polyfem/utils/InterpolatedFunction.hpp> #include <polyfem/utils/RBFInterpolation.hpp> #include <polyfem/utils/Bessel.hpp> #include <polyfem/utils/ExpressionValue.hpp> #include <polyfem/io/MshReader.hpp> #include <polyfem/mesh/Mes...
bbd1ba99ed4a2aaef8477c50cbb7593bd5d5da1d
c17e90954064d8231ecdec4292a0544e2ce105bd
rajarshisur/Programming-in-CPP-NPTEL
/Week 2/Question-2.cpp
C++
cpp
422
permissive
/*Consider the following program and fill in the function header print() at LINE-1 such that it matches the given test cases.*/ #include <iostream> #include <string> using namespace std; void print(string a, string b="Anyone"){ // LINE-1 cout << a << " " << b; } int main() { string p; cin >> p; i...
c15b15f5645f235c2231f685e08eff7c37174231
bbf239424fbc0a2a14c37a9781568c6d483e7d06
whatwewant/3D_GraphicProgramming_2014
/Exp2/Mesh.cpp
C++
cpp
10,332
no_license
#include <windows.h> #include <GL/gl.h> #include "Mesh.h" CMesh::CMesh (void) { vertices = NULL; indices = NULL; } void CMesh::Release (void) { if (vertices != NULL) delete [] vertices; if (indices != NULL) delete [] indices; vertices = NULL; indices = NULL; } void CMesh::Draw (void) { gl...
ca8fef98420d5d5c9fc18b25aa92c238cf5f12b6
a959750f27ab11fe5557b07175038efb2fd217dd
Mohit21/Questions-Mohit
/gfginternQ3.cpp
C++
cpp
921
no_license
#include<iostream> #include<string.h> using namespace std; /* int numChar(int A1[], int m){ int count=0,flag=-1; for(int i=0;i<m-1;i++){ if(A1[i+1]>A1[i]){ flag=-1; count++; } else{ fla...
b57c2b29b413b937297f98fe05302eecca1778c2
0709032a30492d1fb46f622ae6282f1b99ff561c
schinmayee/nimbus
/applications/physbam/physbam-lib/Public_Library/PhysBAM_Fluids/PhysBAM_Incompressible/Incompressible_Flows/INCOMPRESSIBLE_OCTREE.cpp
C++
cpp
5,690
permissive
#ifndef COMPILE_WITHOUT_DYADIC_SUPPORT //##################################################################### // Copyright 2004-2005, Ron Fedkiw, Frank Losasso, Andrew Selle, Tamar Shinar. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT...
447305170251e3c9a3e2dca5cb10d1330b12d659
7c01a9c8190bc4a473d3db9f34b43f0d670ad2ff
ivan-kits/skia-opengl-emscripten
/src/chromium/third_party/blink/renderer/platform_TODO/heap/heap.cc
C++
cc
24,208
permissive
/* * Copyright (C) 2013 Google 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 code must retain the above copyright * notice, this list of conditio...
bad63f4a6aa4ee3bde9c641474adde1df248e14b
26bf6bcd242ab2366950e865636f441ed2871a70
Watch-Later/parser
/test/generated_parsers_107.cpp
C++
cpp
90,128
permissive
// WARNING! This file is generated. // Copyright (C) 2018 T. Zachary Laine // // 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 <boost/parser/parser.hpp> #include <boost/mpl/assert.hpp> #include <boost/t...
476f0f04a0c8f2946e2519fe319e27f5d89e5007
37e03ee9ce992d9fe9f718a980959b83460a5eec
polarvm/polarvm
/src/utils/CircleRawOutStream.cpp
C++
cpp
1,611
no_license
// This source file is part of the polarphp.org open source project // // Copyright (c) 2017 - 2018 polarPHP software foundation // Copyright (c) 2017 - 2018 zzu_softboy <zzu_softboy@163.com> // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://polarphp.org/LICENSE.txt for license infor...
fadad10f0db1a6514934a1147a2f1c8782e8c94f
4aa34f0c139f287efe4c4295a8a0679b92dbba11
chaunnt/Qt-Training-Document
/Self Study Qt Application Engine Development/labs/lab-benchmarking-iterators/main.cpp
C++
cpp
2,318
no_license
/************************************************************************* * * Copyright (c) 2016 The Qt Company * All rights reserved. * * See the LICENSE.txt file shipped along with this file for the license. * *************************************************************************/ #include <QtCore> #defi...
297a5c06f45261ece106dda53222acbbc99597e9
99f7cfb90e98da0cef2a0a91f6ca00938fd83041
lvleysuper/notes
/sdn/code_segment.cpp
C++
cpp
709
no_license
int parse_string_field(char* src, char sep, char** dst, int size) { if (src == NULL) return 0; char* p = src; while (*p == sep) p++; char* start = p; int index = 0; while (*p != '\0' && index < size) { if (*p == sep) { dst[index] = start; *p = 0; p++; start = p; index++; } ...
2db962f2422ab02411ffb53bce501503e60e91c4
594b7cf4937e298edd91a11e5b7b948070675089
lmh760008522/ProgrammingExercises
/王道/68-4.2.cpp
C++
cpp
325
no_license
#include<cstdio> int main(){ long long m,a,b; scanf("%d %lld %lld",&m,&a,&b); while(m!=0){ a=a+b; int ans[100]; int size=0; do{ ans[size++]=a%m; a=a/m; }while(a!=0); for(int i=size-1;i>=0;i--){ printf("%d",ans[i]); } printf("\n"); scanf("%d %d %d",&m,&a,&b); } return 0;...
c69df347a76d5024d9661128f1cde3cc86d59b70
df453b8ed27fa5d7d0b71c73a74aaedeb20c3ce0
maugf214/LiquidCore
/deps/boost_1_66_0/libs/asio/example/cpp11/http/server/server.cpp
C++
cpp
2,687
permissive
// // server.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2017 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 "server.hpp" #include <signal.h> #incl...
1b578e9a13242d4fcf8b8cbfe9fae8f49abc1615
604ce363ce349b4477481bfff4b29fcc39d10936
mkskeller/SPDZ-2
/Math/modp.cpp
C++
cpp
5,917
permissive
// (C) 2017 University of Bristol. See License.txt #include "Zp_Data.h" #include "modp.h" #include "Exceptions/Exceptions.h" bool modp::rewind = false; /*********************************************************************** * The following functions remain the same in Real and Montgomery rep * *****************...
22d88a5d5e0ce99b90cc89902d186a4a61ee54b5
eef400a8a24d63da4aac2e2b96d1554e0198e7c6
Farrius/cp
/codeforces/654/d.cpp
C++
cpp
573
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int t; cin >> t; while(t--){ int n, k; cin >> n >> k; int ar[n][n]; memset(ar, 0, sizeof(ar)); if(k % n == 0){ cout << 0 << '\n'; }else{ cout << 2 << '\n'; } int tot = 0; for(int i = 0; i < n && tot < k; i++){ ...
2395baf82fad85aa528757c13751661d61c26960
c6ede1e60ceca28059942881f1eaaf2186f1b091
musdcoin1/musdcoin
/src/qt/transactionview.cpp
C++
cpp
15,568
permissive
// Copyright (c) 2011-2013 The Bitcoin developers // Copyright (c) 2014-2017 Thinkwide Technology developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "transactionview.h" #include "transactionfilterproxy.h" #...
ac8130ddfc7848376f4eb12e78aa7b6ee1a87acb
acd72e4bc0f4eb310d1559da223a1ce566c5cd25
SeesePlusPlus/opencv4nodejs
/cc/modules/objdetect/HOGDescriptor.cc
C++
cc
10,024
permissive
#include "HOGDescriptor.h" #include "HOGDescriptorBindings.h" Nan::Persistent<v8::FunctionTemplate> HOGDescriptor::constructor; NAN_MODULE_INIT(HOGDescriptor::Init) { v8::Local<v8::FunctionTemplate> ctor = Nan::New<v8::FunctionTemplate>(HOGDescriptor::New); v8::Local<v8::ObjectTemplate> instanceTemplate = ctor->I...
5cb6a11230e86f04524ee8f80b675b7dd0b20417
30080bc1f83cd1d242fe698ded69648cb619a11d
kyc113212/BOJ
/TopologicalSort/1005_ACM_Craft.cpp
C++
cpp
1,434
no_license
#include <iostream> #include <queue> #include <vector> #include <cstring> #include <algorithm> using namespace std; struct info { int n_v, w_t; info(int a, int b) : n_v(a), w_t(b) {} }; int N, K, W; int start_time[1005]; int now[1005]; int solve(vector<int> graph[], vector<int> & work_time) { queue<info> q; f...
458cb4ecf2e63a377bdd26f1fadcb1314bb9c4a4
bf7abc766944c21b9598d2c603c61f7878dc83cb
KL-Lru/Competitive-Programming
/AtCoder/abc185/d.cpp
C++
cpp
627
no_license
#include <bits/stdc++.h> using namespace std; int main(){ int n,m; cin >> n >> m; vector<int> a(m); for(auto &ai: a) cin >> ai; sort(a.begin(), a.end()); int k = n; int before = 0; for(int i = 0; i < m; i++){ int diff = a[i] - before - 1; before = a[i]; if(diff == 0) continue; k = min(k,...
2a358ebf85b2636be2757e18db2f6d097eeeb8d6
dfa646b97954e67edeb28193ea68fb523c083bff
bgranzow/p3a
/p3a_matrix3x3.hpp
C++
hpp
5,544
permissive
#pragma once namespace p3a { template <class T> class matrix3x3 { T m_xx; T m_xy; T m_xz; T m_yx; T m_yy; T m_yz; T m_zx; T m_zy; T m_zz; public: P3A_ALWAYS_INLINE constexpr matrix3x3() = default; P3A_HOST P3A_DEVICE P3A_ALWAYS_INLINE constexpr matrix3x3( T const& a, T const& b, T const...
8463d66bb8151d5a2ad1e83bb169c8e30408d529
916d4e3a89cd585a8ef454cd23afcd73809b345c
gokoushiro/d912pxy
/d912pxy/d912pxy_config.cpp
C++
cpp
3,792
permissive
/* MIT License Copyright(c) 2018-2019 megai2 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, publish, dist...
bdb849320340525cd69eaf9f90bae059e2742e7c
0871c21b7dfd580074163fa81da128ba81d08df5
proqk/Algorithm
/solve/10988 팰린드롬인지 확인하기.cpp
C++
cpp
260
no_license
#include <stdio.h> #include <string.h> char a[200]; bool chk = true; int main() { scanf("%s", &a); int n = strlen(a); for (int i = 0; i < n; i++) { if (a[i] != a[n - i - 1]) { chk = false; break; } } if (chk) printf("1"); else printf("0"); }
983b7cbb436f01809a6dce69805347eabaea0e42
639aef802a969f8b3e28e777f31d1dab49b34f56
giogam/Network-Lib
/lib/core_libs/lib_utils/admission_controller.cpp
C++
cpp
1,567
permissive
#include "../../../include/admission_controller.h" #include "../../../include/enum_classes.h" int admission_controller::admission_control(std::string address) { /* per prima cosa controllo la Blacklist */ if(check_blist(address)) return client_status_t::CLI_BLS; else if(check_flist(address)) { ...
49dd4c441b26acbd4ef330d05b7d3d5a6258c91b
7d4371ff133a168afb7f497df19957c96e1c2f8a
bkahlert/seqan-research
/raw/pmsb13/pmsb13-data-20130530/sources/24xc47o54r0zzgyu/2013-05-21T22-57-01.91+0200/sandbox/my_sandbox/apps/SeqDPT/SeqDPT.cpp
C++
cpp
43,147
permissive
// ========================================================================== // SeqDPT // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and use in source...
77261b15ca0bf90a635beaeef72c91763d92b3f7
c6fb6771ea6de975dab482bdced8b37c05ececa8
victorsenam/treinos-old
/na2th/renzoWeek/dia04/catsAndDogs.cpp
C++
cpp
420
no_license
#include<bits/stdc++.h> using namespace std; typedef int num; typedef int node; typedef int edge; const int V = 500; const int E = 2*V*V; int adj[V], label[V], in[V], out[V], vs; int to[E], es; int main() { int tc; scanf("%d", &tc); while(tc--) { scanf("%d %d %d", &c, &d, &vs); for(int...
7cee8ff596e52cc46e13f8df88da3febbce1900b
7b5c814a4a75ce2a0203869e0d5f1dcff0842e69
helloworldzlg/cplusplus_learning
/继承机制下的构造函数.cpp
C++
cpp
932
no_license
#include<iostream> using namespace std; class book { public: book(); book(char* a, double p = 5.0); void setprice(double a); double getprice()const; void settitle(char* a); char * gettitle()const; void display(); private: double price; char * title; }; class book_derived :public bo...
b5f3fadb4e836625c6599ac3881af1cead3fe80e
2d14e2df96b803d0e152a2012775c2540153a50b
BrokenShell/Stack
/Stack.hpp
C++
hpp
2,137
no_license
#pragma once #include <vector> #include <cassert> #include <cmath> namespace Containers { template<typename T> class Monoid { T value {T()}; public: Monoid() = default; explicit Monoid(T val) : value(val) {} auto get() const -> T { return value; } ...
cfa181cb17ec7a8221b12498e202c6d801ecf8d5
2f1bc62799e9a2eb1ab91722f405122eb56ab5d2
TimWengefeld/pointcloud_person_orientation_estimation
/classifier/src/pointcloud_orientation_estimation/nodes/dump_features.cpp
C++
cpp
25,353
permissive
/* Copyright (c) 2014-2015, Timm Linder, Social Robotics Lab, University of Freiburg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright noti...
8b6a871b73d3d3533a7e8bc05ec8dfb5eb421c4f
3222e89163d10b35236f492d287bccdd1ee1293d
PeterAlfonsLoch/app
/appseed/core/filesystem/userfs/userfs_update_hint.cpp
C++
cpp
338
no_license
//#include "framework.h" namespace userfs { update_hint::update_hint() { } update_hint::~update_hint() { } bool update_hint::is_type_of(e_type e_type) { return m_etype == e_type; } void update_hint::set_type(e_type e_type) { m_etype = e_type; } } // nam...
b737751e2797d2a310a6df7c72b5f3de53aadaeb
1e3d8439bacc741d71133d4fa3c5f295931f2a73
umet55/delfem2
/examples_glfwold/105_MeshSlices/main.cpp
C++
cpp
4,429
permissive
/* * Copyright (c) 2019 Nobuyuki Umetani * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <vector> #include <string> #include <cassert> #include <cstdlib> #include <set> #include "delfem2/mshmisc.h" #include "delfem2/mshio.h...
42577ee2cfed93c99f0455af3ffee2ae3ebb4d84
6a99c2e5e1a3a5abee44250002eeac1f458f259c
UdemyUnrealEngine/04_BattleTank
/BattleTank/Source/BattleTank/Private/Tank.cpp
C++
cpp
1,293
permissive
// Fill out your copyright notice in the Description page of Project Settings. #include "Tank.h" #include "Engine/World.h" // Sets default values ATank::ATank() { // Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = fa...
3c21f34e36e2fa29e60fa99d647356f49e073e9b
a0756520b805dff47cb6d5055066e143b4f6e770
bhavikmalhotra/DSA
/Classes/fraction.cpp
C++
cpp
2,533
no_license
#include <iostream> #include "Fraction.cpp" using namespace std; class Fraction{ private: int numerator; //pvt bc we dont want them to get chnaged easily; int denominator; public: Fraction(int numerator,int denominator){ this -> numerator = numerato...