text
string
size
int64
token_count
int64
/* This file is a part of QVGE - Qt Visual Graph Editor (c) 2016-2019 Ars L. Masiuk (ars.masiuk@gmail.com) It can be used freely, maintaining the information above. */ #include <QInputDialog> #include <QMessageBox> #include "CAttributesEditorUI.h" #include "CPropertyEditorUIBase.h" #include "CNodeEdgePropertiesUI.h...
13,463
5,101
#include <iostream> #include <vector> using namespace std; int main() { { vector<int> vec { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; auto elem1 = vec.begin() + 2, elem2 = vec.begin() + 2; elem1 = vec.erase(elem1, elem2); for (auto &v: vec) { cout << v << " "; } co...
606
252
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
17,596
5,523
// ===================================================================================== // m a p c o n v . c p p // conver a MAPI message to and from an RFC 822/RFC 1521 (mime) internet message // ===================================================================================== #include "pch.hxx" #include "Im...
15,092
5,489
/* * Copyright 2011, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: * Oliver Tappe <zooey@hirschkaefer.de> */ #include <package/ActivateRepositoryCacheJob.h> #include <File.h> #include <package/Context.h> namespace BPackageKit { namespace BPrivate { Activ...
1,068
353
/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkColorCubeFilter.h" #include "SkColorPriv.h" #include "SkOnce.h" #include "SkOpts.h" #include "SkReadBuffer.h" #include "SkUnPreMultiply.h" #include "SkWriteBuffer....
12,639
4,267
/**************************************************** * Template for coding contests * * Author : Sanjeev Sharma * * Email : thedevelopersanjeev@gmail.com * *****************************************************/ #pragma GCC optimize("O3") #pragma GCC optimize("...
2,802
1,104
#include "Enemy.hpp" namespace OgrO // Namespace com o nome do jogo. { namespace PhysicalEntities // Namespace do Pacote Entities. { namespace Characters // Namespace do Pacote Personagens. { namespace Enemies // Namespace do Pacote Enemies. { // Constru...
3,018
746
/* Copyright (c) 2017-2022, Hans Erik Thrane */ #pragma once #include <arpa/inet.h> #include "roq/api.hpp" #include "roq/client.hpp" // note! thin wrappers around libzmq #include "roq/samples/zeromq/zmq/context.hpp" #include "roq/samples/zeromq/zmq/socket.hpp" namespace roq { namespace samples { namespace zeromq {...
757
264
/* * Copyright 2014-2019 Real Logic Ltd. * * 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 agree...
5,414
2,589
/* 引用元:https://atcoder.jp/contests/dp/tasks/dp_h H - Grid 1Editorial // ソースコードの引用元 : https://atcoder.jp/contests/dp/submissions/6221550 // 提出ID : 6221550 // 問題ID : dp_h // コンテストID : dp // ユーザID : xryuseix // コード長 : 2238 // 実行時間 : 19 */ #include <algorithm> #include <bitset> #include <cctype> #include <climits> #incl...
1,860
835
/* Copyright 2021 The Many as One Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
1,903
648
class Solution { public: void rotate(vector<vector<int>>& matrix) { int n = matrix.size(); for (int i = 0; i < n / 2; i++) { for (int j = i; j < n - i - 1; j++) { //A[i][j] -> A[j][n-1-i] -> A[n-1-i][n-1-j] -> A[n-1-j][i] -> A[i][j] in...
581
242
#include "Model.h" #include "OpenGL.h" #include "model_generated.h" #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include "utils/Texture.h" #include "utils/Shader.h" #include "Common.h" #include "CommonProject.h" #include "TextureManager.h" glm::mat4 Convert(const ModelData::Mat4 & m) { return gl...
11,888
3,992
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> namespace RED4ext { namespace game { enum class CityAreaType : uint32_t { Undefined = 0, PublicZone = 1, SafeZone = 2, RestrictedZone = 3, DangerousZone = 4, }; } // namespace game } // namespace RED4ext
317
116
// Copyright (c) 2018-2019 FRC Team 3512. All Rights Reserved. #pragma once #include <atomic> #include <condition_variable> #include <string> #include <thread> #include <vector> #include <frc/circular_buffer.h> #include "communications/PublishNodeBase.hpp" namespace frc3512 { /** * A communication layer that can...
2,662
787
// // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "Runtime.hpp" #include <armnn/Version.hpp> #include <armnn/BackendRegistry.hpp> #include <armnn/BackendHelper.hpp> #include <armnn/Logging.hpp> #include <armnn/utility/Timer.hpp> #include <armnn/backends/...
29,900
7,839
//$Id$ //------------------------------------------------------------------------------ // TimeSystemConverter //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool. // // Copyright (c) 2002 - 2017 United States Government...
6,670
2,092
#include "validator_test.h" #include "kernels/kernel.h" #include "kernels/kernel_factory.h" #include "matrix.h" #include "validator.h" void ValidationTest::ValidateAddition() { CPPUNIT_ASSERT( AdditionValidator( Matrix_t( 0, 0 ), Matrix_t( 0, 0 ) ) ); CPPUNIT_ASSERT( AdditionValidator( Matrix_t( 1, 1 ), Matrix...
5,342
2,287
#include <iostream> #include <thread> #include "Util/Timer.cpp" #include "Contract/SimpleAuctionSCV.cpp" #include "Util/FILEOPR.cpp" #include <unistd.h> #include <list> #include <vector> #include <atomic> #include <condition_variable> #include <set> #include <algorithm> #define maxThreads 128 #define maxBObj 5000 #de...
22,130
8,901
#include "uml/signal.h" #include "uml/interface.h" #include "uml/operation.h" #include "uml/manifestation.h" #include "uml/stereotype.h" #include "uml/behavior.h" #include "uml/dataType.h" #include "uml/association.h" #include "uml/deployment.h" using namespace UML; Set<Property, Signal>& Signal::getOwnedAttributesSe...
939
350
#include "NeuronInitializer.h" void Initializators::ConstantInitializer(double *weigths, unsigned int n_values, double value) { for(unsigned int i=0; i<n_values; i++) { weigths[i] = value; } } void Initializators::NormalDistributionInitializer(double *weights, unsigned int n_values, default_random_eng...
1,857
613
// 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 writing, software // distributed und...
4,583
1,482
// // Part of Metta OS. Check https://atta-metta.net for latest version. // // Copyright 2007 - 2017, Stanislav Karchebnyy <berkus@atta-metta.net> // // Distributed under the Boost Software License, Version 1.0. // (See file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt) // #include "parser.h" #incl...
6,578
2,081
/* * IVTEntry.cpp * * Created on: Sep 13, 2020 * Author: OS1 */ #include "IVTEntry.h" #include "Kernel.h" #include "KernelEv.h" IVTEntry* IVTEntry::ivtEntires[] = { 0 }; IVTEntry* IVTEntry::getEntry(IVTNo ivtNo) { return ivtEntires[ivtNo]; } IVTEntry::IVTEntry(IVTNo ivtNo, InterruptRoutine newRoutine) ...
612
292
#include <iostream> #include <map> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; int T, lenJ, lenS; string s, j; int main(void) { cin >> T; while(T--) { cin >> j >> s; map<char, int> ct; for(int i = 0; i < j.size(); i++) { ...
555
214
/* Copyright 2012-2018 Sumandeep Banerjee, sumandeep.banerjee@gmail.com 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...
2,395
867
//********************************************************* // Read_Activity.cpp - Read the Activity File //********************************************************* #include "TripPrep.hpp" //--------------------------------------------------------- // Read_Activity //-------------------------------------------------...
11,058
5,233
/**************************************************************************** * * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ***************************************...
8,628
2,715
// This is an independent project of an individual developer. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com #include <sol/sol.hpp> #include "tolua/LuaImGui.hpp" #include "imgui/ImGui.hpp" void tnt::lua::loadImGui(sol::state_view lua_) { auto ...
2,163
784
/* * @file core/dists/laplace_distribution.hpp * @author Zhihao Lou * @author Rohan Raj * * Laplace (double exponential) distribution used in SA. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clau...
5,634
1,759
#include "idlecurrentpage.h" #include <QGridLayout> #include <QVBoxLayout> #include "testform.h" #include "currentform.h" #include "mainwindow.h" IdleCurrentPage::IdleCurrentPage(QWidget *parent) { currentForm=qobject_cast<TestForm*>(parent); // setTitle(QString::fromLocal8Bit("关机电流测试")); QFont font; ...
1,259
478
#include "../../../JString.hpp" #include "../../../JThrowable.hpp" #include "./XPathFactoryConfigurationException.hpp" namespace javax::xml::xpath { // Fields // QJniObject forward XPathFactoryConfigurationException::XPathFactoryConfigurationException(QJniObject obj) : javax::xml::xpath::XPathException(obj) {} ...
880
290
/* * Copyright (c) 2016-2017, The OpenThread Authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * ...
7,495
2,753
#include "ros/ros.h" #include "std_msgs/Header.h" #include "sensor_msgs/Temperature.h" int main(int argc, char **argv) { // Initialize the ROS node ros::init(argc, argv, "TemperatureSensor", ros::init_options::AnonymousName); // Node handler ros::NodeHandle nodeHandler; // Publisher object ros:...
1,336
425
// Copyright 2021 - present, Mikhail Svetkin // All rights reserved. // // For the license information refer to LICENSE #ifndef ECORO_WHEN_ANY_HPP #define ECORO_WHEN_ANY_HPP #include "ecoro/awaitable_traits.hpp" #include "ecoro/detail/invoke_or_pass.hpp" #include "ecoro/task.hpp" #include <tuple> #include <variant> ...
5,810
2,000
#include <boost/mp11/mpl.hpp> #include <type_traits> template <int I> using int_ = std::integral_constant<int, I>; using namespace boost::mp11; template <typename Sequence, typename Value> struct index_of_impl { using index = mp_find<Sequence, Value>; using size = mp_size<Sequence>; using index_smaller_than_size ...
729
290
#include "../benchmark/ArgParser.h" #include "ShapeTester.h" #include "VecGeom/volumes/GenTrap.h" typedef vecgeom::SimpleGenTrap GenTrap_t; int main(int argc, char *argv[]) { if (argc == 1) { std::cout << "Usage: shape_testGenTrap -test <#>:\n" " 0 - twisted\n" " 1 -...
3,862
1,704
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int mod = (int)1e9 + 7; string s; cin >> s; string t = "$chokudai"; map<char, int> ind; for ( int i = 0; i < (int)t.size(); i++ ) { ind[t[i]] = i; } map<char, int> cnt; cnt['$']...
472
235
// StartApp.cpp: implementation of the StartApp class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "commctrl.h" #include "DeskEditor1.h" #include "windowsx.h" #include "DeskEditor1.h" #include "StartApp.h" //#include "commctrl.h" /////////////////...
693
225
/* * Copyright (c) 2012 The WebRTC 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 contribut...
53,548
18,232
#ifndef AGPU_METAL_PIPELINE_STATE_HPP #define AGPU_METAL_PIPELINE_STATE_HPP #include "device.hpp" #include "pipeline_command_state.hpp" namespace AgpuMetal { class AMtlComputePipelineBuilder; class AMtlGraphicsPipelineBuilder; class AGPUMTLPipelineStateExtra { public: virtual ~AGPUMTLPipelineStateExtra() {}...
2,875
931
/* * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include "Tests.h" #include <GridMate/Carrier/StreamSocketDriver.h> #include <AzCore/Math/Random.h> ...
20,758
5,915
/* A simple wrapper to suppress all warnings from gtest.h */ #pragma GCC system_header #include "gtest/gtest.h"
112
36
/* cpu_x86.cpp * * Author : Alexander J. Yee * Date Created : 04/12/2014 * Last Modified : 04/12/2014 * */ // Dependencies #include <iostream> #include <cstring> #if _WIN32 #include <Windows.h> #include <intrin.h> #else #include <cpuid.h> #endif #include "neo_ica/backend/cpu_x86.h" namespace n...
5,391
2,615
// QTSimpleDemo // // Copyright © 2020 tencent. All rights reserved. // #include "VideoListView.h" #include "ui_VideoListView.h" #include <QtDebug> #include "ui_TestVideoSetting.h" #ifdef __APPLE__ #include "GenerateTestUserSig.h" #endif #ifdef _WIN32 #include "GenerateTestUsersig.h" #endif VideoListView::VideoLis...
14,451
5,158
// fastjet stuff #include "fastjet/ClusterSequence.hh" #include "fastjet/SISConePlugin.hh" // sisocne stuff #include "siscone/momentum.h" #include "siscone/siscone.h" // other stuff #include<sstream> FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh using namespace std; using namespace siscone; ...
7,763
2,693
//********************************************************* // AB_Data.cpp - network link A->B access classes //********************************************************* #include "AB_Data.hpp" //--------------------------------------------------------- // AB_Key constructor //-----------------------------------------...
441
110
// Copyright 2020 VMware, Inc. // SPDX-License-Identifier: Apache-2.0 // #include "herald/datatype/signal_characteristic_data.h" #include "herald/ble/ble_sensor_configuration.h" #include <vector> #include <optional> namespace herald { namespace datatype { namespace SignalCharacteristicData { using n...
6,352
2,142
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
3,106
894
#include <iostream> #include <cstdio> #include <string> #include <sstream> #include <fstream> #include <cmath> #include <valarray> #include <complex> #include <cufft.h> #include <cufftXt.h> #include <thrust/complex.h> #include <gtest/gtest.h> #include "isce3/signal/Signal.h" #include "isce3/io/Raster.h" #include "isc...
13,436
5,092
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <openvino/opsets/opset7.hpp> #include "op_table.hpp" using namespace std; using namespace ov; using namespace ov::frontend::tensorflow::detail; namespace ov { namespace frontend { namespace tensorflow { namespace op { O...
2,463
817
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages a...
6,993
1,875
#include <iostream> #include <type_traits> // When applying the detection-idiom it may be necessary to rely on ADL - we may want to check // if some expression can be called on a given type, taking into account free functions provided // in some namespace and also taking ADL into consideration. // We can do so, witho...
1,574
452
// Copyright Vladimir Prus 2004. // SPDX-License-Identifier: BSL-1.0 // 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) #pragma once #include <hpx/program_options/config.hpp> /** The version of the source interf...
718
250
/** * Copyright (c) 2017 Melown Technologies SE * * 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 conditions and the f...
4,230
1,346
// // HashStatistic.cpp // // $Id: //poco/1.4/Foundation/src/HashStatistic.cpp#1 $ // // Library: Foundation // Package: Hashing // Module: HashStatistic // // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge, to any ...
2,806
1,003
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of th...
8,673
2,655
/****************************************************************************/ /*** ***/ /*** Altona main configuration file. ***/ /*** ***/ /***...
2,005
507
#pragma once #include <lava/sill.hpp> #include <nlohmann/json.hpp> struct GameState; class Frame { public: Frame(GameState& gameState); Frame(const Frame&) = delete; Frame& operator=(const Frame&) = delete; /// Create a frame. static Frame& make(GameState& gameState); /// Prepare the frame ...
1,440
452
int Jn, ZjHQ/*Y*//*dEky*/ ,H , lAIw, Mb4p , Rfpqw,s ,e6k,zuS,sSjf /*T*//**/ ,IBH , dg4 ,Vhk, iLTc ,X5YU, F4, hL /*2jtUXBP*/, oHs , JC,MHO, joPQ , zOHJ ; void f_f0 () {;//0uh { { int VTT; volatile int N ,/*kec*/ n , Q,O ; { for(int i=1 ; i< 1 ;++i//zYj ){} { for (int i=1;i<2 ;++i//X ) //...
6,338
4,347
/* ------------------------------------------------------------------------- * * nbtdesc.cpp * rmgr descriptor routines for access/nbtree/nbtxlog.cpp * * Portions Copyright (c) 2020 Huawei Technologies Co.,Ltd. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 199...
6,368
2,151
#include "TTreeNodeStack.h" TTreeNodeStack& TTreeNodeStack::operator = (const TTreeNodeStack& treeNodeStack) { fStack = treeNodeStack.fStack; return (*this); } void TTreeNodeStack::Pop (TTreeNode*& item) { TObject* obj = NULL; fStack.Pop (obj); item = (TTreeNode*)obj; } void TTreeNodeStack::Top (const TTreeNod...
626
225
// Copyright (c) 2015 The CSUTIL 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 "base/search.h" namespace base { } #ifdef _SEARCH_MAIN_TEST_ #include <deque> #include <vector> #include <utility> #include <assert.h> int ...
7,127
2,877
#include <bits/stdc++.h> #define IOS std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::cout.tie(nullptr); // #define __DEBUG__ #ifdef __DEBUG__ #define DEBUG(...) printf(__VA_ARGS__) #else #define DEBUG(...) #endif #define filename "" #define setfile() freopen(filename".in", "r", stdin); freope...
3,262
1,204
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma // de Barcelona (UAB). // // This work is licensed under the terms of the MIT license. // For a copy, see <https://opensource.org/licenses/MIT>. #include "carla/geom/GeoLocation.h" #include "carla/geom/Location.h" #include "carla/geom/Math...
2,475
906
#include <iostream> #include "include/rules.hpp" #include "include/helper.hpp" int main(int argc, char **argv) { std::ios::sync_with_stdio(false); Game game(BoardSize::SMALL, atoi(argv[1])); while (true) { size_t c, r; game.render(); input_play(game, game.get_turn()); i...
427
153
// // Copyright (C) 2014 Haruki Hasegawa // // 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 ap...
6,051
2,055
#include "mainwindow.h" #include "savedialog.h" #include <ui_savedialog.h> #include "ui_mainwindow.h" #include <QtCore> #include <QPainter> #include <QtXml/QtXml> #include <QMessageBox> #include <QMenu> #include <QXmlReader> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui:...
10,855
3,571
/* 21. Merge Two Sorted Lists https://leetcode.com/problems/merge-two-sorted-lists/ Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together the nodes of the first two lists. */ /* Solution: -> Simple and short recursive code that works by pointer manipu...
723
268
/* Copyright 2017-2018 ccls Authors 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 writing, software...
2,711
786
#include "node.hpp" #include "cmd.hpp" #include <iostream> #include <string> int main(int argc, char** argv) { bool quit = false; tree_node* root = nullptr; while(!quit) { std::string input = ""; std::cout << ">"; std::cin >> input; tree_cmd cmd = parse_command(input);...
1,734
442
#ifndef FALCON_HELPER_USE_DIFFERENCE_TYPE_HPP #define FALCON_HELPER_USE_DIFFERENCE_TYPE_HPP #include <falcon/type_traits/use_def.hpp> namespace falcon { namespace _aux { FALCON_USE_XXX_TRAIT_NAMED_DEF(difference_type, use_difference_type); } template <class T> struct use_difference_type : _aux::use_difference_type<...
338
149
/* Boot selection menu * * Initial author: Floris Bos * Maintained by Raspberry Pi * * See LICENSE.txt for license details * */ #include "bootselectiondialog.h" #include "ui_bootselectiondialog.h" #include "config.h" #include "json.h" #include "util.h" #include <QDir> #include <QMessageBox> #include <QProcess> ...
7,985
2,548
// 16. 3Sum Closest // https://leetcode.com/problems/3sum-closest/ #include <algorithm> #include <climits> #include <iostream> #include <numeric> #include <vector> #include "leetcode_util.h" using namespace std; class Solution { public: int threeSumClosest(vector<int> & nums, int target) { if (nums.size()...
1,913
895
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
26,297
9,989
/* RandomSynthesizer.hpp randomly copy from source to target; good for initialization Li-Yi Wei August 17, 2014 */ #ifndef _RANDOM_SYNTHESIZER_HPP #define _RANDOM_SYNTHESIZER_HPP #include "Synthesizer.hpp" class RandomSynthesizer : public Synthesizer { public: RandomSynthesizer(const Texture & source)...
495
176
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "op_table.hpp" #include "openvino/opsets/opset8.hpp" using namespace std; using namespace ov::opset8; namespace ov { namespace frontend { namespace tensorflow { namespace op { OutputVector translate_slice_op(const NodeCo...
876
302
#include <iostream> int main() { // 1 Byte = 8bit bool my_value0 = true; // false // 1 Byte = 8bit char my_value1 = 10; // 2 Byte = 16bit short my_value2 = 42; // 4 Byte = 32bit int my_value3 = 22; // 4 Byte = 32bit float my_value4 = 12.0f; // 8 Byte = 64bit double ...
355
169
#include <iostream.h> #include "DisjSets.h" // Test main; all finds on same output line should be identical int main( ) { int numElements = 128; int numInSameSet = 16; DisjSets ds( numElements ); int set1, set2; for( ...
899
276
/*****************************************************************************\ Copyright (c) 2011-2017 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.apach...
6,810
1,945
#ifndef RYML_SINGLE_HEADER #include "c4/yml/std/std.hpp" #include "c4/yml/parse.hpp" #include "c4/yml/emit.hpp" #include <c4/format.hpp> #include <c4/yml/detail/checks.hpp> #include <c4/yml/detail/print.hpp> #endif #include "./test_case.hpp" #include <gtest/gtest.h> namespace c4 { namespace yml { std::string emit2s...
19,771
7,710
// Copyright 2019 The Fuchsia 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 <fuchsia/device/llcpp/fidl.h> #include <fuchsia/fshost/llcpp/fidl.h> #include <lib/devmgr-integration-test/fixture.h> #include <lib/driver-integra...
26,091
9,364
#include "./audio-source-impl.hpp" #include "./audio-engine-impl.hpp" using namespace lava::flow; AudioSource::Impl::Impl(AudioEngine::Impl& engine) : m_engine(engine) { } void AudioSource::Impl::playing(bool playing) { m_playing = playing; playing ? restart() : finish(); } void AudioSource::Impl::loop...
700
252
#include "term_buffer.h" #include "term_window.h" #include "term_network.h" #include "cap_manager.h" #include "term_cell.h" #include "string_utils.h" #include <string.h> #include <iostream> #include <sstream> #include <iterator> DEFINE_CAP(osc_selection_request); void osc_selection_request(term_data_context_s & term...
1,095
371
#include "std.h" #include "expr_item_if.h" //////////////////////////////////////////////////////////////////////////////// // TOperandNode类 KC::TOperandNode::TOperandNode(IExprTreeWork& wk, IWebPageData& pd, const TKcSynBaseClass& syn) : m_work(wk), m_pd(pd), m_pBeginPtr(syn.GetBeginPtr()), m_pEndPtr(syn.GetEndP...
3,699
1,329
#include "time.hpp" timeStamp programStart; timeStamp getCurrentTimeMicro(){ return time_point_cast<microseconds>(steady_clock::now()); } timeStamp getTimeInFuture(uint64_t usec){ return time_point_cast<microseconds>(steady_clock::now()) + std::chrono::microseconds(usec); } int64_t getTimeDifference(timeS...
1,826
709
/* * Copyright (C) 2018 The Android Open Source Project * Copyright (C) 2015-2020 STMicroelectronics * * 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/lic...
17,693
6,351
// 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 "ui/gl/gl_implementation.h" #include <algorithm> #include <string> #include "base/at_exit.h" #include "base/command_line.h" #include "base/...
4,259
1,454
/* * Copyright © 2015 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...
17,048
7,748
#include "VertexArray.h" #include <Engine/Render/API.h> using namespace Render; VertexArray::VertexArray() : indexArraySize(0) { glGenVertexArrays(1, &handle); glGenBuffers(1, &indexArrayID); } VertexArray::~VertexArray() { for(auto vbo : buffers) { deleteBuffer(vbo.id); } ...
2,444
841
#include "program_defs.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" #include <stdint.h> #include <vector> #include <random> #ifdef WIN32 #define PCG_LITTLE_ENDIAN 1 #endif #include "pcg_random.hpp" // NOTE: Include order is a bit brittle due to some of these appearing exactly as they are in...
7,562
3,319
/** * @file tests/tests.cpp * @brief Mega SDK main test file * * (c) 2013 by Mega Limited, Wellsford, New Zealand * * This file is part of the MEGA SDK - Client Access Engine. * * Applications using the MEGA API must present a valid application key * and comply with the the rules set forth in the Terms of Serv...
7,893
3,609
// // Example for calculating AccurateRip checksums from each track of an album, // represented by a CUESheet and a single losslessly encoded audio file. // #include <cstdint> // for uint32_t etc. #include <cstdio> // for fopen, fclose, FILE #include <iomanip> // for setw, setfill, hex #include <iostream> // f...
11,646
3,988
/* You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the winner. You will take the first turn to remove the stones. Both of you are very clever and have optimal strategie...
853
257
#include <sstream> #include <unordered_map> #include "ast.hpp" class CodeGen : public Listener { public: explicit inline CodeGen() { builder = {}; indentLevel = 1; builder << "// Generated by bfc\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\nint main() {\n"; buil...
1,522
429
#include "hasmember.hpp" #include <iostream> #include <vector> #include <utility> DEFINE_HAS_MEMBER(size); DEFINE_HAS_MEMBER(first); int main() { std::cout << "int::size: " << HasMemberT_size<int>::value << '\n'; std::cout << "std::vector<int>::size: " << HasMemberT_size<std::vector<int>>...
452
172
/* <base/file_reader.test.cc> ---------------------------------------------------------------------------- Copyright 2017 Dave Peterson <dave@dspeterson.com> 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 ...
5,650
2,039
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved #include "TestDefinitions.h" #include "LocalDeploymentManager.h" #include "SpatialCommandUtils.h" #include "SpatialGDKDefaultLaunchConfigGenerator.h" #include "SpatialGDKDefaultWorkerJsonGenerator.h" #include "SpatialGDKEditorSettings.h" #include "CoreMinim...
6,583
2,259
#ifndef STATIC_TARGET_3_HPP_ #define STATIC_TARGET_3_HPP_ #include <iostream> #include <InterfaceTarget3/InterfaceTarget3.hpp> #include <InterfaceTarget2/InterfaceTarget2.hpp> #include <InterfaceTarget4/InterfaceTarget4.hpp> #include <StaticTarget1/StaticTarget1.hpp> #include <StaticTarget2/StaticTarget2.hpp> /** * ...
1,003
373