text
string
size
int64
token_count
int64
/* * Implementation of sphere * Author: Weichen Xu * Date: 11/10/2015 */ #include "sphere.h" WCX_sphere::WCX_sphere(){ this->radius = 1.0; this->rollingSpeed = 0.02; this->accumuRollingM = mat4(); } void WCX_sphere::loadSphereFromFile(){ int Index = 0, triangleNum = 0; std::string sphereFileName; std::ifstream...
3,531
1,552
//--------------------------- // Sheet.cpp // (c) Reliable Software 2000 //--------------------------- #include "HeaderDetails.h" #include "GeneralPage.h" #include "AddressPage.h" #include "AddendumPage.h" #include "DestinationPage.h" #include "resource.h" #include <Ctrl/PropertySheet.h> bool CollectData (HINSTAN...
1,028
336
#include <bits/stdc++.h> using namespace std; int n, tempScore; int scores[110]; int main() { fill(scores, scores+110, 0); scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &tempScore); scores[tempScore]++; } int m; scanf("%d", &m); for (int i = 0; i < m; i++) ...
477
192
#include<iostream> #include<string.h> using namespace std; string menorString(string vt[], int n){ string menor; for(int i = 0; i < n; i++){ if((i == 0) || (menor.length()>vt[i].length())){ menor = vt[i]; } } return menor; } int main(){ int n=-1; int contadorSeq=0; while(n!=0){ cin>>n; string vet...
411
205
#include "Pawns.h" #include <iostream> #include <string> Pawns::Pawns(const char* ID, SDL_Rect map_rect, unsigned rows, unsigned columns, Vec2D<int> offset) :Enemies(ID, map_rect) { selected = UNSELECTED; this->rows = rows; this->columns = columns; this->offset = offset; this->placed = false; this->mo...
4,873
2,043
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // System.Object[] struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE; // System.IFormatProvider struct IFormatProvider_tF2AECC4B14F41D36718920D67F930CED940412DF; // Sys...
253,833
149,352
#include <bits/stdc++.h> using namespace std; const int M = 1e4+2; int N, deep, def, ans; vector<int> adj[M]; void bfs(int u) { ans = -1; queue<int> q; vector<int> vis(M, 0), dist(M, 0); q.push(u); vis[u] = true; while (!q.empty()) { int cur = q.front(); q.pop(); fo...
873
361
// Fill out your copyright notice in the Description page of Project Settings. #include "UIController.h" #include "Engine/PostProcessVolume.h" #include "Materials/Material.h" // Sets default values AUIController::AUIController() { // Set this actor to call Tick() every frame. You can turn this off to improve perf...
950
332
#include "daScript/misc/platform.h" #include "daScript/ast/ast_visitor.h" #include "daScript/ast/ast_expressions.h" namespace das { struct AstContextVisitor : Visitor { AstContextVisitor ( Expression * expr ) : refExpr(expr) { } AstContext astc, astr; Expression * refExpr = nu...
2,936
856
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) | +---------...
15,633
6,453
// // Created by FLXR on 8/8/2018. // #ifndef X808_FRAMEBUFFER_HPP #define X808_FRAMEBUFFER_HPP #include <unordered_map> #include <xe/gfx/texture.hpp> namespace xe { namespace internal { class PlatformFrameBuffer; } class XE_API FrameBuffer { public: explicit FrameBuffer(const string &name); ~...
1,121
368
// // Created by Gegel85 on 30/06/2020. // #ifndef RCONSOLE_CONTROLLER_EXCEPTIONS_HPP #define RCONSOLE_CONTROLLER_EXCEPTIONS_HPP #include <string> #include "../Exceptions.hpp" namespace RC::Client::Controller { class ControllerException : public ClientException { public: ControllerException(const std::string &&...
1,702
491
// Eden Engine #pragma once #ifndef EDEN_EDITOR_GUI #define EDEN_EDITOR_GUI #include "DevelopmentKit/ImGui/imgui.h" #include "DevelopmentKit/ImGui/imgui_impl_glfw.h" #include "DevelopmentKit/ImGui/imgui_impl_opengl3.h" #include <GLFW/glfw3.h> #define EDEN_GUI_CLASSIC 0 #define EDEN_GUI_DARK 1 #define EDEN_GUI_LIGHT 2...
1,668
680
#define BOOST_DISABLE_ASSERTS #include "1.hpp" #undef BOOST_DISABLE_ASSERTS #include "2.hpp" int main() { A::F(); B::F(); }
132
61
#include <iostream> #include <algorithm> #include <functional> #include <cassert> #include <tuple> extern "C" { #include <sys/mman.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> } std::tuple<uint64_t, int> process_memory(void *memptr, size_t elements_to_calculate) { vola...
8,622
3,336
// Copyright Yamashta, Daisuke 2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #if !defined(FMP_34923AEE_9F31_49B2_AD8D_D975BE25512D) #define FMP_34923AEE_9F31_49B2_AD8D_D975BE25512D #...
1,623
652
#include <algorithm> #include <climits> #include <string> #include <unordered_map> using namespace std; class Solution { public: int maxNumberOfBalloons(string text) { unordered_map<char, int> m; //{char,count} for (auto c : text) ++m[c]; int res = INT_MAX; m['l'] /= 2; m['o'] /= 2; string balloon = "...
399
182
/** * To compile and run: * clang++ -o h h.cpp && ./h */ #include <bits/stdc++.h> #define ll long long using namespace std; ll x1, y_1, x2, y2; bool cut(ll x, ll y){ if(x >= x1 && x <= x2 && y >= y_1 && y <= y2){ return true; } return false; } int main(){ ll xb, yb; cin>>xb>>yb>>x1>>y_...
1,569
652
#include "pch.h" BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } /* // debug event static FuncPtr s_debug; exter...
2,767
901
#pragma once #ifndef REGISTER_H #define REGISTER_H #include <string> namespace GGB::Hardware { template <class T> class Register { public: Register(const T initialValue); T read(); uint8_t readBit(const uint8_t bitNr); void writeBit(con...
2,358
708
#pragma once /************************************************************************ * \file generated/src/NECommon.hpp * \ingroup 12_pubsvc * \brief Namespace contains common constants. ************************************************************************/ namespace NECommon { ...
382
86
/*Koperek32(R) Copyright (c) Stanislaw Stasiak, sstoft@wp.pl <2014> All rights reserved. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR...
3,946
1,320
#pragma once #include "Stmt.hpp" #include "StmtVisitor.hpp" #include "includes/Expr/Expr.hpp" #include <memory> class expr_stmt : public Stmt { public: std::unique_ptr<Expr> expr; expr_stmt(std::unique_ptr<Expr> expr); std::any accept(stmt_visitor<std::any> &visitor) override; };
290
111
#include "gtest/gtest.h" #include "ParserProcessor.h" #include "../../src/parser/ParserProcessor.h" #include <cstdio> static const char *test_config = "tests/parser/test_config"; /* --- Function Prototypes --- */ void print_map(strmap *string_map); /** * Test a simple situation */ TEST(ParserProcessorTest, GetP...
6,101
1,870
#include "stdafx.h" #include "XMLDocument.hpp" pcstr UI_PATH = UI_PATH_DEFAULT; pcstr UI_PATH_WITH_DELIMITER = UI_PATH_DEFAULT_WITH_DELIMITER; XMLDocument::XMLDocument() : m_xml_file_name(), m_root(nullptr), m_pLocalRoot(nullptr) {} XMLDocument::~XMLDocument() { ClearInternal(); } void XMLDocument::ClearInternal()...
12,879
4,521
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
1,238
413
/* N <= 2e3, K <= 2e3 fracturing search O(NK log NK) */ #include <algorithm> #include <iostream> #include <queue> #include <vector> #include <assert.h> using namespace std; typedef long long ll; ll N, K, D; vector<ll> costs[2005]; vector<ll> prevUsed[2005]; struct State { // used is represented...
2,921
1,030
#include "../content/Context.hpp" #include "./View.hpp" #include "./ActionProvider.hpp" namespace android::view { // Fields // QJniObject forward ActionProvider::ActionProvider(QJniObject obj) : JObject(obj) {} // Constructors ActionProvider::ActionProvider(android::content::Context arg0) : JObject( "and...
1,783
687
#ifdef USE_PCH #include "rr_pch.h" #endif #pragma hdrstop #include <iomanip> #include <map> #include "rrLogger.h" #include "rrSBMLModelSimulation.h" #include "rrUtils.h" #include "rrRoadRunner.h" //--------------------------------------------------------------------------- #if defined(__CODEGEARC__) #pragma packag...
8,229
2,647
// Copyright (c) 2018-2020 jsonxx - Nomango // // 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, ...
14,635
5,743
// (C) Copyright Edward Diener 2011-2015 // Use, modification and distribution are subject to 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). #if !defined(BOOST_VMD_DETAIL_EQUAL_10_HPP) #define BOOST_VMD_DETAIL_EQUAL_10...
8,228
4,072
/* Copyright (C) 2016 -2017 Jerry Jin */ #ifndef smilesection_h #define smilesection_h #include <nan.h> #include <string> #include <queue> #include <utility> #include "../quantlibnode.hpp" #include <oh/objecthandler.hpp> using namespace node; using namespace v8; using namespace std; class FlatSmileSectionWorke...
14,246
4,713
//========================================================================== // ObTools::XMI: operation.cc // // UML::Operation functionality // // Copyright (c) 2003 Paul Clark. All rights reserved // This code comes with NO WARRANTY and is subject to licence agreement //==============================================...
2,013
628
// UVa103 Stacking Boxes // Rujia Liu // 题意:输入k个n维盒子(k<=30, n<=10),找一个最长嵌套序列。 // 算法:DAG上的最长路。首先把盒子的各个维排序,这样判断起来比较简单 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxk = 30 + 5; const int maxn = 10 + 5; int n, k, box[maxk][maxn], d[maxk], next[maxk]; int dp(int i) { int& ans =...
1,117
584
#include "ObstacleAvoidance.h" #include <iostream> #include <assert.h> using namespace std; int main() { vector<float> a; for (unsigned i = 0; i < 20; i++) { if (i > 10 && i < 16) a.push_back(0); else a.push_back(i); } ObstacleAvoidance* car = new ObstacleAvoidance(a); assert(car->cl...
786
355
// VPKReader.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "VPKReader.h" #include "VPKReaderDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CVPKReaderApp BEGIN_MESSAGE_MAP(CVPKReaderApp, CWinApp) END_MESSAGE_MAP() // CVPKReaderApp construction CVPKReaderApp::CVPKRe...
1,507
523
// Program for implementation of Bisection Method for #include<bits/stdc++.h> using namespace std; #define MAX_ITER 1000000 //Define the maximium iteration according to your questio // An example function whose solution is determined using // Bisection Method. The function is x^3 - x^2 + 2 double func(double ...
1,296
497
//========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ...
31,377
10,209
#pragma once #include "cocos2d.h" namespace pulse { template <typename T> inline cocos2d::Vector<T> toVector(const std::vector<T>& vec) { cocos2d::Vector<T> out; for (auto&& element : vec) { out.pushBack(element); } return out; } } // pulse
270
107
#include "global.h" #include "staticfunctions.h" #include "networkobject.h" #include "matrix.h" #if defined(Q_OS_WIN32) #include <netcdfcpp.h> #endif void NetworkObject::setScale(float s) { m_scaleV = m_scaleE = s; } float NetworkObject::scaleV() { return m_scaleV; } void NetworkObject::setScaleV(float s) { m_scaleV =...
47,400
21,186
#include <iostream> #include <cstdlib> #include <cmath> #include <algorithm> #include <string> #include <cstring> #include <iomanip> using std::cerr; using std::cin; using std::cout; using std::endl; using std::string; int n, k; int ropes[10010] = {0}; bool check(int len) { int tot = 0; for (int i = 1; i <= n...
1,295
521
// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1995 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. /...
5,392
1,940
// Copyright (c) 2007-2013 Hartmut Kaiser // // 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) #if !defined(HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_BUFFER_MAR_07_2013_1250PM) #define HPX_RUNTIME_PARCELSE...
3,794
1,171
#ifdef _WIN32 #include <windows.h> #include <stdlib.h> #include <SDL.h> #endif #if __linux__ || __APPLE__ #include <cstdlib> #include <gtk/gtk.h> #include "SDL.h" #endif #include <stdio.h> //#include <string.h> //#include <conio.h> #include "vars.h" //Screen dimension constants const int SCREEN_WIDTH = 580; const int ...
4,582
2,659
// // binaryTree.cpp // AnishC++ // // Created by Anish Mookherjee on 01/11/19. // Copyright © 2019 Anish Mookherjee. All rights reserved. // #include <iostream> using namespace std; struct node { int data; struct node *left; struct node *right; }*tree; void createTree(struct node* tree) { tree=NUL...
7,772
2,364
// // OpenTissue Template Library Demo // - A specific demonstration of the flexibility of OTTL. // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. // // OTTL and OTTL Demos are licensed under zlib. // #include "setup_domino_spiral.h" #include <OpenTissue/core/geometry/geometry_compute_box...
4,204
1,829
#include "Mobs.h" #include <sstream> #include <iomanip> #include <iostream> Mob::Mob(const EntityPosition& position, int mobLevel, int health) : mobLevel(mobLevel), health(health) { this->position = position; renderData.type = ER_MOB; } void Mob::addHealth(float amount) { if(amount < 0) { amount += getSh...
19,385
7,288
#include <cstdio> #include <cstdlib> #include <ctime> #define MAXT 100 #define MAXN 2000000000 int T; void gen() { int n = rand() % MAXN + 1; int r = rand() % 10; if (n >= 100 && r < 1) n = rand() % 100 + 1; if (n >= 10000 && r < 3) n = rand() % 10000 + 1; if (n >= 1000000 && r < 5) n = rand() % 1000000 + 1...
442
257
// // Created by Vladimir A. Kiselev on 08.11.2020. // #include "Spinlock.h" void Spinlock::lock() { while (lock_.test_and_set(std::memory_order_acquire)) ; } void Spinlock::unlock() { lock_.clear(std::memory_order_release); }
245
102
#include <iostream> using namespace std; int main(){ int id; id = 01; int password; password = 88823; int id1 = 01; int id2 = 02; int password2; password2 = 88824; cout << "KiD KoDeR" <<endl; cout << "Enter Your id: "; cin >> id1; cout << "Enter Password: "; if(id1 != 01);{ cout << " Name : xyz "<<endl; cout ...
2,726
1,318
#ifdef TEST #include "compiler_for_parser_mock.hpp" compiler_for_parser_mock::compiler_for_parser_mock(size_t &merge_called) : merge_called_(merge_called) {} void compiler_for_parser_mock::merge(std::unique_ptr<compiler_i> other) { merge_called_++; return; } #endif // TEST
285
105
#include "Game.hpp" #include "MagicalAttackSpeedCalculator.hpp" using namespace std; ActionCostValue MagicalAttackSpeedCalculator::calculate(CreaturePtr creature) { ActionCostValue action_cost_value = ActionCostConstants::DEFAULT; if (creature) { string spell_id = creature->get_spell_knowledge_ref().get_mo...
547
187
//WinQLDeviceInterfaceClassCollection.cpp // Copyright Querysoft Limited 2013, 2017 // // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the "Software") to use, reproduce, display, distribute, //...
8,920
4,011
/*************************************************************************** * Copyright (C) 2017, Deping Chen, cdp97531@sina.com * * All rights reserved. * For permission requests, write to the publisher. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. *...
2,514
1,017
// This file is part of the dune-gdt project: // https://github.com/dune-community/dune-gdt // Copyright 2010-2017 dune-gdt developers and contributors. All rights reserved. // License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) // or GPL-2.0+ (http://opensource.org/lice...
15,609
4,735
/* fleaTLS cryptographic library Copyright (C) 2015-2019 cryptosource GmbH 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 applica...
19,738
7,307
#include "application.hpp" #include <tello/tello.hpp> #include "keyboard_view.hpp" #include "keyboard_controller.hpp" using tello::Tello; using tello::Response; Application::Application() : _baseSettings(nullptr), _keyboardView(std::make_unique<KeyboardView>()), _keyboardController(std::make_unique<Keybo...
1,620
491
//////////////////////////////////////////////////////////////////// // // Georg Umlauf, (c) 2012 // //////////////////////////////////////////////////////////////////// //#include "stdafx.h" #include "color.h" #include "vec.h" #include "mat.h" #include "quader.h" #include "viewSystem.h" #include <iostre...
6,487
2,172
/* BSD 3-Clause License Copyright (c) 2022, Stable Cloud Computing, Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions ...
16,538
7,058
namespace base64 { namespace avx512 { template <typename LOOKUP_FN, typename UNPACK_FN> void encode_load_gather(LOOKUP_FN lookup, UNPACK_FN unpack, const uint8_t* input, size_t bytes, uint8_t* output) { uint8_t* out = output; const __m512i input_offsets = _mm512_setr_epi3...
3,135
1,274
#include <algorithm> #include <iostream> #include <vector> using namespace std; const int INF = 1e9; int N; vector<vector<int> > W; vector<vector<int> > dp; int TSP(int cur, int visited) { int ret = dp[cur][visited]; if (ret != 0) return ret; if (visited == (1 << N) - 1) { if (W[cur][0] != 0) return W[cur][...
863
427
// Copyright James P. McNellis 2011 - 2013. // // Distributed under the Boost Software License, Version 1.0. // // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef CX...
3,343
911
// // HelloJSI.cpp // react-native-nando-coding // // Created by rbayuokt on 12/03/22. // #include "HelloJSI.hpp"
118
60
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> #include <CCommonDialog.hpp> #include <tagPSDA.hpp> START_ATF_NAMESPACE struct CPageSetupDialog : CCommonDialog { tagPSDA m_psd; }; END_ATF_NAMESPA...
323
111
/*************************************************************************\ C O P Y R I G H T Copyright 2003 Image Synthesis Group, Trinity College Dublin, Ireland. All Rights Reserved. Permission to use, copy, modify and distribute this software and its doc...
3,280
1,252
#pragma once #include <cmath> #include <vector> #include <stdio.h> float vector_dot_product_pointer16_sse(const float *p1, const float *p2, size_t size); double vector_dot_product_pointer16_sse(const double *p1, const double *p2, size_t size); template <typename NTYPE> NTYPE vector_dot_product_pointer_sse(const NT...
360
135
/* * Copyright (c) 2016 maldicion069 * * Authors: Cristian Rodríguez Bernal <ccrisrober@gmail.com> * * This file is part of MonkeyBrushPlusPlus * <https://github.com/maldicion069/monkeybrushplusplus> * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Les...
4,701
1,783
#include<bits/stdc++.h> using namespace std; // Fixed Parities // Link to the problem: https://www.hackerearth.com/practice/data-structures/arrays/1-d/practice-problems/algorithm/fixed-parity-440254c0/ // Alice and Bob are playing a board game. They have n×n boards and two arrays a and b of length n. The value of...
1,557
664
#include <iostream> #include <vector> using namespace std; class Graph { private: vector<vector<int>> adjacencyMatrix; public: Graph(int nodeCount) { adjacencyMatrix.resize(nodeCount); for (int row = 0; row < adjacencyMatrix.size(); row++) { adjacencyMatrix[row].resize(nodeCount); for (int col = 0; col < ...
1,164
450
class Solution { public: int findComplement(int num) { int result = 0; int i = 0; while(num) { if ((num & 1) == 0) result += 1 << i; i += 1; num >>= 1; } return result; } };
295
95
/* * Copyright 2010-2011 Research In Motion Limited. * * 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...
2,680
953
// Created on: 1991-04-12 // Created by: Michel CHAUVAT // Copyright (c) 1991-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU...
2,708
947
#include "SimpleToken.h" #include <stdlib.h> #include <stdio.h> #include <string.h> SimpleToken::SimpleToken() : indent(-1), _level(0), isInt(false) { value[0] = 0; numValue = 0; } //const char *const str ? SimpleToken::SimpleToken(const char str[]) { int i; //long *dst = (long *)value,*src = (long *)...
3,563
1,300
#pragma once #include <sstream> #include <string> #include <vector> #include "util.hpp" // We're using uint32_t as uint24_t: // 32-bit integers has the long type using uint24_t = uint32_t; enum NetMessageCode { MSG_ERROR, // = 0 MSG_AUTH_CLIENT, // = 1 MSG_AUTH_SERVER, // = 2 MSG_INITIAL_DATA, // =...
11,978
3,801
/* Copyright 2011-2013 Alexis Herault, Giuseppe Bilotta, Robert A. Dalrymple, Eugenio Rustico, Ciro Del Negro Istituto Nazionale di Geofisica e Vulcanologia Sezione di Catania, Catania, Italy Università di Catania, Catania, Italy Johns Hopkins University, Baltimore, MD This file is part of ...
30,019
12,193
#ifndef PROTEAN_DETAIL_SEQUENCE_HPP #define PROTEAN_DETAIL_SEQUENCE_HPP #include <protean/config.hpp> #include <protean/detail/collection.hpp> namespace protean { class variant; namespace detail { class PROTEAN_DECL sequence : public collection { public: virtual const ...
518
179
#include <cstdio> using namespace std; const int move_x[4]={1, -1, 0, 0}; const int move_y[4]={ 0, 0, 1, -1}; bool map[51][52]={}, visit[52][52]={}; int count; int dfs(int x, int y) { for(int i=0; i<4; i++) { int nx=x+move_x[i], ny=y+move_y[i]; if(map[nx][ny] && !visit[nx][ny]) visit[nx][ny]=true, dfs(nx, ny)...
804
474
// ============================================================================= // CD-HIT // http://cd-hit.org/ // http://bioinformatics.burnham-inst.org/cd-hi // // program written by // Weizhong Li // UCSD, San Diego Supercomputer Center // ...
2,450
783
struct SignedBigInt { bool is_minus; UnsignedBigInt absVal; SignedBigInt() : is_minus(false) {} explicit SignedBigInt(int num) : absVal(std::abs(num)), is_minus(num < 0) {} explicit SignedBigInt(LL num) : absVal(std::abs(num)), is_minus(num < 0) {} explicit SignedBigInt(const string& num) { ...
7,055
2,396
#include <chrono> #include <iostream> #include <vector> #include "./util.h" using namespace std; using matrix = vector<vector<int>>; int main(int argc, char **argv) { if (argc < 3) { cout << "Not enough arguments" << endl; exit(1); } auto filename1 = argv[1]; auto filename2 = argv[2]; matrix arra...
1,036
383
/* * Copyright (c) 2016 Alex Spataru <alex_spataru@outlook.com> * * This file is part of the LibDS, which is released under the MIT license. * For more information, please read the LICENSE file in the root directory * of this project. */ #include "DS_Config.h" #include "DriverStation.h" #include <QTh...
15,394
4,817
// BSD 3-Clause License // // Copyright (c) 2020, Tixiao Shan // 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, thi...
19,901
7,478
#ifndef AHEUIPLUSPLUS_HEADER_PROGRAM_OPTIONS_HPP #define AHEUIPLUSPLUS_HEADER_PROGRAM_OPTIONS_HPP #include <Aheuiplusplus/version.hpp> #include <cstdio> #include <string> namespace app { class command_line final { public: command_line() = default; command_line(const command_line& data); ~command_line() = de...
1,531
567
#include "Scene.h" #include <apemode/platform/AppState.h> #include <apemode/platform/memory/MemoryManager.h> //#define APEMODEVK_NO_GOOGLE_DRACO #ifndef APEMODEVK_NO_GOOGLE_DRACO #ifdef ERROR #undef ERROR #endif #include <draco/compression/decode.h> #include <draco/animation/keyframe_animation_decoder.h> #endif #ifn...
60,197
19,389
/* Name: Dan Cassidy Date: 2014-04-26 Homework #: 10 Source File: MyFloatD.cpp Class: C-201 MW 1000 Action: This file represents the detailed abstraction and implementation of the Abstract Data Type "MyFloat", which is a dynamically-precise decimal (up to 65535 places) between 0 and 1. In t...
22,688
7,107
/* * Copyright (C) 2008-2010, 2012, Gostai S.A.S. * * This software is provided "as is" without warranty of any kind, * either expressed or implied, including but not limited to the * implied warranties of fitness for a particular purpose. * * See the LICENSE file for more information. */ #ifndef PARSER_TRANSF...
595
224
#include "afx.h" using namespace std; class Solution { public: vector<int> platesBetweenCandles(string s, vector<vector<int>> &queries) { std::vector<int> result(queries.size()); prepare(s); for (int i = 0; i < queries.size(); i++) { result[i] = findOne(queries[i]); ...
1,536
522
#pragma once #include "beatsaber-hook/shared/utils/logging.hpp" Logger& getLogger();
85
30
#include <iostream> #include <vector> using distance_t = std::pair<int, int>; template <typename T, typename U> std::istream& operator >>(std::istream& input, std::pair<T, U>& v) { return input >> v.first >> v.second; } template <typename T> std::istream& operator >>(std::istream& input, std::vector<T>& v) { ...
936
386
// Copyright (c) 2018 The Open-Transactions developers // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include "Internal.hpp" #include "opentxs/api/s...
1,502
466
#include "Fuji_Internal.h" #include "MFString.h" #include "MFHeap_Internal.h" #include "MFObjectPool.h" #include <stdio.h> #include <stdarg.h> #define stricmp strcasecmp #include <string.h> MFObjectPool stringPool; MFObjectPoolGroup stringHeap; int gModuleInitCount = 0; // this is okay as global; ...
37,750
16,890
#include"../timer.h" #include"../../include/fast_io.h" #include"../../include/fast_io_device.h" #include<charconv> int main() { constexpr std::size_t N(10000000); std::size_t osp_total{}; { fast_io::timer t("ospan"); std::array<char,50> array; for(std::size_t i{};i!=100000000;++i) { fast_io::ospan osp(a...
715
361
//Define the structs Workshops and Available_Workshops. //Implement the functions initialize and CalculateMaxWorkshops struct Workshop { int start_time; int duration; int end_time; }; struct Available_Workshops { int n; Workshop *ws; }; Available_Workshops* initialize (int start_time[], int ...
1,164
427
#include "Interaction/Input.h" namespace mtge { const int Input::GLFW_KEY_LIST[Input::NUM_KEYS] = { GLFW_KEY_UNKNOWN, GLFW_KEY_CAPS_LOCK, GLFW_KEY_NUM_LOCK, GLFW_KEY_SCROLL_LOCK, GLFW_KEY_PAGE_UP, GLFW_KEY_PAGE_DOWN, GLFW_KEY_HOME, GLFW_KEY_END, GLFW_KEY_PRINT_SCREEN, GLFW_KEY_PAUSE, GLFW_KEY_LEFT_CONTROL, GL...
3,005
1,664
/* * Copyright (c) 2019-2020 AnimatedLEDStrip * * 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,...
8,847
2,791
///////////////////////////////////////////////////////////////////////////////////// // This file is part of the POEngine library, part of the PngOptimizer application // Copyright (C) Hadrien Nilsson - psydk.org // This library is distributed under the terms of the GNU LESSER GENERAL PUBLIC LICENSE // See License.txt...
451
104
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2019 Ryo Suzuki // Copyright (c) 2016-2019 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # include <Siv3D/Bezier3.hpp> namespace s3d {...
2,994
1,283
/* Author: Zachary Kingston */ #include <moveit/planning_request_adapter/planning_request_adapter.h> #include <robowflex_library/io/plugin.h> #include <robowflex_library/util.h> using namespace robowflex; /* \file plugin_io.cpp * Demonstrates how to use the plugin loader helper class to load some MoveIt * plugins...
947
306
#include "Core_ally.h"
23
11
#define MAJOR 1 #define MINOR 14 #define PATCH 2
49
25