text
string
size
int64
token_count
int64
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector <ll> vi; int n; vi a, b; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); while(cin >> n){ a.resize(1 << n); b.resize(a.size());...
836
340
#include "Convertible.hpp" #include <functional> #include <stdexcept> namespace succotash::utilities { //------------------------------------------------------------------------------ // Local functions which are not for export //------------------------------------------------------------------------------ inline ...
2,805
793
/* * HoldQueue1.hpp * * Created on: 2018/5/13 * Author: Qun Cheng * Author: Jiaxuan(Percy) Pan */ #ifndef HOLDQUEUE1_HPP_ #define HOLDQUEUE1_HPP_ #include "HoldQueue2.hpp" class HoldQueue1{ std::list<Job> q; public: HoldQueue1(){} bool empty(){ return q.empty(); } ...
872
449
#include <algorithm> #include "atomutil.h" #include "elements.h" #include "renderer.h" #include "strings.h" namespace htmlparser { namespace { inline void WriteToBuffer(const std::string& str, std::stringbuf* buf) { buf->sputn(str.c_str(), str.size()); } // Writes str surrounded by quotes to buf. Normally it wil...
4,892
1,643
/* * This file is part of liblcf. Copyright (c) 2018 liblcf authors. * https://github.com/EasyRPG/liblcf - https://easyrpg.org * * liblcf is Free/Libre Open Source Software, released under the MIT License. * For the full copyright and license information, please view the COPYING * file that was distributed with t...
5,878
2,484
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <cstring> #include <string> #include <iomanip> #include <climits> #include <vector> #include <set> #include <queue> #define SIZE 10 using namespace std; int arr[SIZE]; int main() { ios::sync_with_stdio(false); string origNum,...
2,490
764
#include <memory> #include <algorithm> #include <cassert> #include <cstdint> #include "circuit-repo.hpp" #include "circuit-test-util.hpp" #include "context-helib.hpp" int main(void) { using namespace SHEEP; ContextHElib_Fp<int8_t> ctx; std::vector<ContextHElib_Fp<int8_t>::Plaintext> pt_input = {55, -42, 120};...
703
312
// Copyright 2019 The Beam Team // // 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...
11,408
3,339
#ifndef TIME_HPP #define TIME_HPP #include <chrono> using namespace std::chrono; using timeStamp = time_point<steady_clock,microseconds>; using timeStampSeconds = time_point<steady_clock,seconds>; extern timeStamp programStart; timeStamp getCurrentTimeMicro(); timeStamp getTimeInFuture(uint64_t usec); int64_t ti...
3,005
1,222
// Copyright 2018 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 "chromeos/services/secure_channel/ble_advertiser_impl.h" #include "base/bind.h" #include "base/containers/contains.h" #include "base/logging.h" ...
15,126
4,587
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/ssm/model/LabelParameterVersionResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <aw...
1,420
457
// Copyright 2010-2018, 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 condit...
7,082
2,344
// Copyright (c) 2018 DENSO CORPORATION. All rights reserved. /** * Sound content class */ #ifndef RBASOUNDCONTENT_HPP #define RBASOUNDCONTENT_HPP #ifdef _MSC_VER #ifdef _WINDLL #define DLL_EXPORT __declspec(dllexport) #else #define DLL_EXPORT __declspec(dllimport) #endif #else #define DLL_EXPORT #endif #include <...
1,868
638
/* * This file is part of the Simutrans project under the Artistic License. * (see LICENSE.txt) */ #include <string.h> #include "../simworld.h" #include "../simobj.h" #include "../simmem.h" #include "../display/simimg.h" #include "../bauer/brueckenbauer.h" #include "../descriptor/bridge_desc.h" #include "../bod...
3,858
1,745
// Copyright (c) 2019-2020 Xenios SEZC // https://www.veriblock.org // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef __SIGNUTIL__HPP__ #define __SIGNUTIL__HPP__ #include <stdexcept> #include <vector> #include "slice.hpp"...
2,988
924
/* * $Id: mech.hitloc.c,v 1.1.1.1 2005/01/11 21:18:17 kstevens Exp $ * * Author: Markus Stenberg <fingon@iki.fi> * * Copyright (c) 1996 Markus Stenberg * Copyright (c) 1998-2002 Thomas Wouters * Copyright (c) 2000-2002 Cord Awtry * All rights reserved * * Created: Fri Sep 20 19:54:48 1996 fingon * ...
53,641
19,756
#include <cstdio> #include <cstdlib> #define MAX_ELEMENT_COUNT 1000000 using namespace std; int d[MAX_ELEMENT_COUNT]; void qsort(int l, int r) { if (l < r) { int x = d[r]; int j = l - 1; for (int i = l; i <= r; i++) { if (d[i] <= x) { j++; int temp = d[i]; d[i] = d[j]; d[j] = temp...
587
347
/* * RandomSelector.actor.cpp * * This source file is part of the FoundationDB open source project * * Copyright 2013-2018 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You...
22,255
9,939
#include "gtest/gtest.h" #include "../vsearch/distance.h" #include "../vsearch/vsearch.pb.h" #include <iostream> #include <fstream> #include <string> class DistanceTest : public testing::Test { }; TEST(DistanceTest, DistanceTest_L2_Test_Far) { float pX[] = {1.3, 1.3}; float pY[] = {6.6, 6.2}; float r = vsear...
3,532
1,617
// XBrowseForFolder.cpp Version 1.2 // // Author: Hans Dietrich // hdietrich@gmail.com // // Description: // XBrowseForFolder.cpp implements XBrowseForFolder(), a function that // wraps SHBrowseForFolder(). // // History // Version 1.2 - 2008 February 29 // - Changed API to allow f...
12,887
5,210
// Copyright 2017 Fonero Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "lib/catch.hpp" #include "util/types.h" using namespace fonero; bool addBalance(int64...
1,892
859
/* for High Granularity Calorimeter * This geometry is essentially driven by topology, * which is thus encapsulated in this class. * This makes this geometry not suitable to be loaded * by regular CaloGeometryLoader<T> */ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interf...
34,406
13,461
/*============================================================================= Copyright (c) 2011-2019 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.txt) ==...
2,764
1,060
#include "vcepch.h" #include "RenderCommand.h" #include "Platform/OpenGL/OpenGLRendererAPI.h" namespace VCE { RendererAPI* RenderCommand::s_RendererAPI = new OpenGLRendererAPI; }
181
62
#include<bits/stdc++.h> using namespace std; class Solution { public: bool wordBreak(string s, vector<string>& wordDict) { unordered_set<string> dict(wordDict.begin(), wordDict.end()); vector<bool> dp(s.size() + 1, false);//dp表示字符之间的隔板,n个字符有n+1个隔板 dp[0] = true;//dp[0]是s[0]前面的隔板 ...
797
312
// // Benjamin Wagner 2018 // #include "generators/uniform_generator.h" #include <random> namespace generators { uniform_generator::uniform_generator(size_t min, uint64_t max, uint64_t count): built(false), min(min), max(max), count (count), data() { // Generate a pseudo random seed value ...
1,236
411
// // guild.cpp // ********* // // Copyright (c) 2019 Sharon W (sharon at aegis dot gg) // // Distributed under the MIT License. (See accompanying file LICENSE) // #include "aegis/guild.hpp" #include <string> #include <memory> #include "aegis/core.hpp" #include "aegis/member.hpp" #include "aegis/channel.hpp" #include ...
29,280
10,449
#pragma once #include <vector> #include <spdlog/spdlog.h> struct graphNode { graphNode(int x, int y) : x(x), y(y) {} int x; int y; }; struct graphEdge { graphEdge(int neighbourIndex, float dist) : neighbourIndex(neighbourIndex), dist(dist) {} int neighbourIndex; float dist; }; class Graph { public: Graph(); ...
1,597
541
/** @file Http1ClientTransaction.cc - The Client Transaction class for Http1* @section license License 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 ownershi...
1,932
599
#include "ag_LegendBody.h" #include <QApplication> /*! \file This file contains the implementation of the LegendBody class. */ namespace ag { //------------------------------------------------------------------------------ // DEFINITION OF STATIC CLASS MEMBERS //----------------------------------------------...
1,765
517
//------------------------------------------------------------------------------ /* This file is part of jbcoind: https://github.com/jbcoin/jbcoind Copyright (c) 2012, 2013 Jbcoin Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
22,259
6,671
//============================================================================================================= /** * @file ssvepbci.cpp * @author Viktor Klüber <viktor.klueber@tu-ilmenau.de>; * Lorenz Esch <lorenz.esch@tu-ilmenau.de>; * Matti Hamalainen <msh@nmr.mgh.harvard.edu> * @version 1...
32,676
10,105
/*! * WTEngine | File: apply.hpp * * \author Matthew Evans * \version 0.7 * \copyright See LICENSE.md for copyright information. * \date 2019-2021 */ #ifndef WTE_MNU_ITEM_APPLY_HPP #define WTE_MNU_ITEM_APPLY_HPP #include <string> #include <vector> #include "wtengine/mnu/item.hpp" #include "wtengine/mgr/men...
1,549
510
/* * Copyright (C) 2015, UChicago Argonne, LLC * All Rights Reserved * * Generic IO (ANL-15-066) * Hal Finkel, Argonne National Laboratory * * OPEN SOURCE LICENSE * * Under the terms ...
8,413
2,916
/* Copyright 2005-2012 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundat...
6,132
2,159
/* This file is part of the Pangolin Project. * http://github.com/stevenlovegrove/Pangolin * * Copyright (c) 2013 Steven Lovegrove * * 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 wit...
14,098
5,226
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. #include "pch.h" #include "common.h" #include "Vector.h" #include "TreeViewDragItemsCompletedEventArgs.h" TreeViewDragItemsCompletedEventArgs::TreeViewDragI...
921
262
/** * __author__ = anonymized * __date__ = 2019-05 * __copyright__ = Creative Commons CC0 */ #include <array> #include <vector> #include <stdint.h> #include <stdlib.h> #include "ciphers/random_function.h" #include "ciphers/small_aes_present_sbox.h" #include "ciphers/small_state.h" #include "ciphers/speck64.h" ...
13,245
4,693
#include <cassert> #include <string.h> #include "EEdims.h" #include "EEfeeDataBlock.h" ClassImp(EEfeeDataBlock) const int EEfeeDataBlock::DefaultMaxHead=4; const int EEfeeDataBlock::DefaultMaxData=192; //-------------------------------------------------- //-------------------------------------------------- //-----...
6,003
2,238
#include <bits/stdc++.h> #define MM 1002 using namespace std; string a, b; int c; int main(){ getline(cin,a); getline(cin,b); cin >> c; for(int i = 0; i < a.length(); i++){ if(a[i] != b[i]){ if(a[i] == ' ' || b[i] == ' '){ c = -1; break; ...
486
187
#include <string> #include "Carolija.h" Carolija::Carolija(std::string ime, int cost) : Karta(ime, cost) { } std::string Carolija::GetCategory() const { return "CAROLIJA"; }
178
75
/* This is a Replicated Module. A plug-in for running PrimaryProtonGun-based event generator for running in MT art. It produces a GenParticleCollection of primary protons using the PrimaryProtonGun. These Collections are used in Mu2eG4_module.cc. Original author Lisa Goodenough */ // Mu2e includes. #in...
4,624
1,398
#ifndef PYTHONIC_NUMPY_ONESLIKE_HPP #define PYTHONIC_NUMPY_ONESLIKE_HPP #include "pythonic/include/numpy/ones_like.hpp" #include "pythonic/utils/functor.hpp" #include "pythonic/numpy/ones.hpp" PYTHONIC_NS_BEGIN namespace numpy { template <class E, class dtype> auto ones_like(E const &expr, dtype d) -> decltype...
635
257
/* * Copyright (c) 2014 The WebM 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 in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributin...
23,687
9,535
/****************************************************************************** * Copyright (c) Open Connectivity Foundation (OCF), AllJoyn Open Source * Project (AJOSP) Contributors and others. * * SPDX-License-Identifier: Apache-2.0 * * All rights reserved. This program and the accompanying ...
3,341
1,020
//%Header { /***************************************************************************** * * File: src/MushGame/MushGameMessageControlInfo.cpp * * Author: Andy Southgate 2002-2005 * * This file contains original work by Andy Southgate. The author and his * employer (Mushware Limited) irrevocably waive all of ...
3,225
1,053
/* * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
95,213
32,841
// Copyright 2017 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/android/preferences/prefs.h" #include "base/stl_util.h" #include "chrome/browser/android/preferences/pref_service_bridge.h" #inc...
5,273
2,076
/* Copyright 2016 Emanuele Vespa, Imperial College London 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 ...
6,744
2,255
/* Masstree * Eddie Kohler, Yandong Mao, Robert Morris * Copyright (c) 2012-2016 President and Fellows of Harvard College * Copyright (c) 2012-2016 Massachusetts Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation...
11,711
4,067
//////////////////////////////////////////////////////////////////////////////// //! \file Common.hpp //! \brief File to include the most commonly used headers. //! \author Chris Oldwood // Check for previous inclusion #ifndef APP_COMMON_HPP #define APP_COMMON_HPP #if _MSC_VER > 1000 #pragma once #endif #include ...
384
129
/** * -=-<[ Bismillahirrahmanirrahim ]>-=- * Date : 2021-01-11 06:31:32 * Author : Dahir Muhammad Dahir (dahirmuhammad3@gmail.com) * About : Compile with g++ */ #include <iostream> #include <string> #include <sstream> using namespace std; class Student { private: int age; string first...
1,387
438
/** * @file SedFunctionalRange.cpp * @brief Implementation of the SedFunctionalRange class. * @author DEVISER * * <!-------------------------------------------------------------------------- * This file is part of libSEDML. Please visit http://sed-ml.org for more * information about SED-ML. The latest version of...
35,534
12,083
/* Copyright (c) 2008-present Advanced Micro Devices, Inc. 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, me...
18,883
7,522
//+--------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation, 1998. // // File: EDUTIL.CXX // // Contents: Utility functions for CMsHtmled // // History: 15-Jan-98 raminh Created // // Notes: This file contains some utility function...
47,119
15,029
#include "RemoteAdministrator.h" #include <interfaces/IKeyHandler.h> #include <libudev.h> #include <linux/uinput.h> namespace WPEFramework { namespace Plugin { static char Locator[] = _T("/dev/input"); class LinuxDevice : public Exchange::IKeyProducer, Core::Thread { private: LinuxDevice(const L...
8,710
2,347
/** * @file colorChange.cpp * @brief mex interface for cv::colorChange * @ingroup photo * @author Amro * @date 2015 */ #include "mexopencv.hpp" #include "opencv2/photo.hpp" using namespace std; using namespace cv; /** * Main entry called from Matlab * @param nlhs number of left-hand-side arguments * @param pl...
1,900
711
// Copyright 2013 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/hydrogen.h" #include <algorithm> #include "src/v8.h" #include "src/allocation-site-scopes.h" #include "src/codegen.h" #include "src/ful...
438,399
134,313
#include "../../headers/data/Face.h" Face::Face() {} Face::~Face() { vertices.clear(); vertices.shrink_to_fit(); normais.clear(); normais.shrink_to_fit(); textures.clear(); textures.shrink_to_fit(); } void Face::addVerticeId(int idVertice) { this->vertices.push_back(idVertice); } void Face::addN...
470
188
#include "StdAfx.h" #include "ThirdStandardDataModel.h" CThirdStandardDataModel::CThirdStandardDataModel(void) { } CThirdStandardDataModel::~CThirdStandardDataModel(void) { }
177
69
// Fortnite (1.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function GA_DefaultPlayer_InteractSea...
4,667
1,636
// Fill out your copyright notice in the Description page of Project Settings. #include "Drone_Simulator.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Drone_Simulator, "Drone_Simulator" );
208
71
/* Copyright 2017 - 2021 R. Thomas * Copyright 2017 - 2021 Quarkslab * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless req...
83,350
39,840
/* * @Author: gpinchon * @Date: 2021-04-11 20:53:00 * @Last Modified by: gpinchon * @Last Modified time: 2021-04-11 20:53:22 */ #include <Driver/OpenGL/Renderer/Light/PointLightRenderer.hpp> #include <Light/PointLight.hpp> #include <Surface/SphereMesh.hpp> #include <Renderer/Surface/GeometryRenderer.hpp>...
3,749
1,216
/* Open Asset Import Library (assimp) ---------------------------------------------------------------------- Copyright (c) 2006-2016, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions ...
21,467
6,636
//===-- AddressResolverFileLine.cpp -----------------------------*- C++ -*-===// // // 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 // //===---------------------------...
3,126
1,019
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "src/pch.h" #include <Microsoft/MixedReality/Sharing/StateSync/NetworkConnection.h> #include <Microsoft/MixedReality/Sharing/StateSync/NetworkListener.h> #include <Microsoft/MixedReality/Sharing/StateSync/NetworkManager.h> #include <M...
6,236
1,839
// 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. // // This test uses the safebrowsing test server published at // http://code.google.com/p/google-safe-browsing/ to test the safebrowsing // protocol i...
23,824
7,543
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or organiz...
3,385
1,201
// -*- 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...
24,414
8,382
/* * The MIT License * * Copyright 2017-2019 azarias. * * 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, mo...
2,528
929
#include <stdio.h> #include <string.h> #include <assert.h> #include <stdlib.h> #include <lua.hpp> #include <stdio.h> #include "malloc_hook.h" #include "ls.h" // turn on MEMORY_CHECK can do more memory check, such as double free // #define MEMORY_CHECK #define MEMORY_ALLOCTAG 0x20140605 #define MEMORY_FREETAG 0x0badf...
2,616
1,171
/** * * 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 ...
3,280
1,033
/* ** Copyright 2011-2019 Centreon ** ** This file is part of Centreon Engine. ** ** Centreon Engine is free software: you can redistribute it and/or ** modify it under the terms of the GNU General Public License version 2 ** as published by the Free Software Foundation. ** ** Centreon Engine is distributed in the hope...
9,214
3,205
//===--- DeclContext.cpp - DeclContext implementation ---------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
32,679
10,487
/*========================================================================= * * Copyright NumFOCUS * * 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.or...
23,895
6,779
#include "chunker.hpp" #include "sys/time.h" extern Configure config; struct timeval timestartChunker; struct timeval timeendChunker; struct timeval timestartChunker_VarSizeInsert; struct timeval timeendChunker_VarSizeInsert; struct timeval timestartChunker_VarSizeHash; struct timeval timeendChunker_VarSizeHash; uint...
35,998
12,280
/* +------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | | | Cop...
8,664
2,892
#pragma once #include "routing_common/maxspeed_conversion.hpp" #include "platform/measurement_utils.hpp" #include "base/geo_object_id.hpp" #include <cstdint> #include <map> #include <string> #include <vector> namespace routing { using OsmIdToMaxspeed = std::map<base::GeoObjectId, Maxspeed>; /// \brief Parses csv ...
1,647
495
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "AdHocConnectionImpl.hpp" #include "Utils.hpp" #include "ThreadUtils.hpp" #include "../serial_com/Port.h" #include "../serial_com/SerialPort.hpp" #include "../serial_com/UdpClientPort.hpp" #include "../ser...
9,199
2,877
#pragma once #include <chrono> #include <functional> namespace FastTransport::Protocol { class PeriodicExecutor { public: PeriodicExecutor(std::function<void()>, const std::chrono::microseconds& interval); void Run(); private: using clock = std::chrono::steady_clock; std::function<...
521
167
// Copyright (c) 2018, ETH Zurich // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and...
34,188
11,627
// Copyright 2017 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 "android_webview/browser/aw_web_ui_controller_factory.h" #include "components/safe_browsing/web_ui/constants.h" #include "components/safe_browsi...
2,519
815
//===== utility.hpp ==================================================================================================== // // Author: Immanuel Haffner <haffner.immanuel@gmail.com> // // Licence: // Copyright 2019 Immanuel Haffner // // Licensed under the Apache License, Version 2.0 (the "License"); // ...
1,609
465
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup() { ofSetVerticalSync(true); // load an image from disk img.loadImage("linzer.png"); // we're going to load a ton of points into an ofMesh mesh.setMode(OF_PRIMITIVE_POINTS); // loop through the image in th...
2,460
813
// ArduinoJson - arduinojson.org // Copyright Benoit Blanchon 2014-2018 // MIT License #pragma once #include "../Polyfills/attributes.hpp" namespace ARDUINOJSON_NAMESPACE { template <typename TImpl> class VariantCasts { public: template <typename T> FORCE_INLINE operator T() const { return impl()->template...
465
166
#include <libgba-sprite-engine/scene.h> #include <libgba-sprite-engine/sprites/sprite_builder.h> #include <libgba-sprite-engine/background/text_stream.h> #include <libgba-sprite-engine/gba/tonc_memdef.h> #include <libgba-sprite-engine/gba_engine.h> #include "karakter.h" #include "SongSelect.h" #include "song1.h" #incl...
4,845
1,694
/** * $File: JCS_TreeNode.cpp $ * $Date: $ * $Revision: $ * $Creator: Jen-Chieh Shen $ * $Notice: See LICENSE.txt for modification and distribution information * Copyright (c) 2016 by Shen, Jen-Chieh $ */ #include "JCS_TreeNode.h" #include "JCS_TreeView.h" namespace JCS_GUI { JCS_TreeNo...
1,788
640
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/banners/app_banner_settings_helper.h" #include <algorithm> #include <string> #include "base/command_line.h" #include "chrome/br...
12,365
3,905
#include "fipch.h" #include "VertexArray.h" #include "Renderer.h" #include "Platform/OpenGL/OpenGLVertexArray.h" namespace Flick { VertexArray* VertexArray::Create() { switch (Renderer::GetAPI()) { case RendererAPI::API::None: FI_CORE_ASSERT(false, "RendererAPI::None is not yet supported by Flick!"); return ...
465
175
// Copyright 2015 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 "components/password_manager/core/browser/android_affiliation/affiliated_match_helper.h" #include <stddef.h> #include <memory> #include <utilit...
28,944
9,262
 #include "osm.ReferenceObject.h" namespace osm { ReferenceObject::ReferenceObject() : m_reference(1) {} ReferenceObject::~ReferenceObject() {} int ReferenceObject::AddRef() { std::atomic_fetch_add_explicit(&m_reference, 1, std::memory_order_consume); return m_reference; } int ReferenceObject::GetRef() { r...
616
206
/* * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundat...
2,081
694
#include <iostream> using namespace std; int main() { int n, reversedNumber = 0, remainder; cout << "Enter an integer: "; cin >> n; while(n != 0) { remainder = n%10; reversedNumber = reversedNumber*10 + remainder; n /= 10; } cout << "Reversed Number = " << reversedNum...
342
122
// $Id: SOCK_Dgram_Mcast_QoS.cpp 96985 2013-04-11 15:50:32Z huangh $ #include "SOCK_Dgram_Mcast_QoS.h" #include "ace/Log_Category.h" #include "ace/OS_NS_sys_socket.h" #if defined (ACE_WIN32) #include "ace/Sock_Connect.h" // needed for subscribe_ifs() #endif /* ACE_WIN32 */ #if !defined (__ACE_INLINE__) #include "SO...
8,758
2,734
/***************************************************************************************** * * * GHOUL * * General Helpful Open Utility Library ...
4,589
1,207
#include "default_partitioner_inputs.hpp" DefaultPartitionerInputs::DefaultPartitionerInputs(const MeshMetaData& mesh) { for (const auto& elt : mesh.elements) { weights.insert(std::make_pair(elt.first, std::vector<double>{1.})); } }
249
85
// Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
1,952
716
/* This file is part of the Pangolin Project. * http://github.com/stevenlovegrove/Pangolin * * Copyright (c) 2014 Steven Lovegrove * * 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 wit...
18,658
6,144
#include <iostream> #include <memory> #include "columnar_batch_encoder.h" std::unique_ptr<fpvc::columnarbatch::ColumnarBatchEncoder> encoder; std::unique_ptr<fpvc::columnarbatch::ColumnarBatchEncoder> encoder2; void printRecordBatch(fpvc::columnarbatch::BatchPtr batch) { if (batch) { std::cout << "Got the...
2,128
794