text
string
size
int64
token_count
int64
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercia...
6,367
2,625
// -*- C++ -*- // Copyright (C) Dmitry Igrishin // For conditions of distribution and use, see files LICENSE.txt or fcgi.hpp #ifndef DMITIGR_FCGI_LISTENER_OPTIONS_HPP #define DMITIGR_FCGI_LISTENER_OPTIONS_HPP #include "dmitigr/fcgi/dll.hpp" #include "dmitigr/fcgi/types_fwd.hpp" #include <dmitigr/misc/filesystem.hpp>...
2,860
996
#include "listwrapperobjects.h" #include "checkinvitation.h" namespace MoodBox { CheckInvitationData::CheckInvitationData() : QSharedData() { } CheckInvitationData::CheckInvitationData(QString code) : QSharedData() { this->code = code; } CheckInvitationData::~CheckInvitationData() { } CheckInvitation::CheckInvi...
1,603
513
#include "execution/compiler/output_checker.h" #include "gtest/gtest.h" #include "spdlog/fmt/fmt.h" #include "storage/index/bplustree_index.h" #include "storage/index/index.h" #include "test_util/end_to_end_test.h" #include "test_util/test_harness.h" namespace noisepage::test { class CreateIndexOptionsTest : public ...
2,340
935
#include "PhongDivider/PhongDivider.hpp" using namespace castor3d; namespace Phong { namespace { castor::Point3f barycenter( float u , float v , castor::Point3f const & p1 , castor::Point3f const & p2 , castor::Point3f const & p3 ) { float w = 1 - u - v; CU_Ensure( std::abs( u + v + w - 1.0 ) ...
3,869
1,789
/** Definition for a binary tree node. */ //https://leetcode.com/problems/same-tree/ #include<bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr),...
701
254
/* * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
11,241
2,937
/* * 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...
16,068
4,245
// // slippy map elements based on example code Copyright (c) 2014 Christopher Baker <https://christopherbaker.net> // SPDX-License-Identifier: MIT // /* Project Title: Signs of Surveillance Description: ©Daniel Buzzo 2019 dan@buzzo.com http://buzzo.com https://github.com/danbz */ #include "ofAppRunner.h" #...
607
227
/* Copyright (c) 2020 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "optimizer/rule/PushFilterDownGetNbrsRule.h" #include "common/expression/BinaryExpression.h" #include "common/...
5,744
1,817
#include "model_base.h" #include "util.h" /** @file Example of how to run Bert inference using our implementation. */ int main(int argc, char* argv[]) { std::string model_weights_path = argv[1]; int max_batch_size = 128; auto model = lightseq::cuda::LSModelFactory::GetInstance().CreateModel( "Bert", mode...
2,007
800
/* Copyright 2015 Google Inc. 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 agreed to in ...
3,733
1,145
// hacky for now, to be cleaned later #include <vector> #include <string> #include <cstdio> #include <set> #include <queue> std::vector< std::vector<int> > gActions = { {2, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}, {0, 2, 1} }; class ProblemState { public: ProblemState() : mState{{3, 3, 1}} { } ProblemState(...
3,304
1,406
/* Copyright (c) 2021, Arvid Norberg All rights reserved. You may use, distribute and modify this code under the terms of the BSD license, see LICENSE file. */ #include "test.hpp" #include "setup_transfer.hpp" // for load_file #include "libtorrent/flags.hpp" #include "libtorrent/alert_types.hpp" #include "libtorren...
8,415
3,693
#include <imgui.h> #include "core/panels/Profiler.h" namespace ige::creator { Profiler::Profiler(const std::string& name, const Panel::Settings& settings) : Panel(name, settings) { } Profiler::~Profiler() { clear(); } void Profiler::initialize() { clear(); ...
900
322
#include "trivium.h" #include "../algos/trivium.h" TriviumBox::TriviumBox() : Gtk::Box(Gtk::ORIENTATION_VERTICAL) { pack_start(m_KeyGrid); m_KeyGrid.set_halign(Gtk::ALIGN_CENTER); m_KeyGrid.attach(m_KeyHeader, 1, 1, 2); m_KeyGrid.attach(m_KeywordLabel, 1, 2); m_KeyGrid.attach(m_KeywordEn...
4,478
1,664
#include "jass_luastate.h" // Use raw function of form "int(lua_State*)" // -- this is called a "raw C function", // and matches the type for lua_CFunction int LoadFileRequire(lua_State* L) { // use sol2 stack API to pull // "first argument" std::string path = sol::stack::get<std::string>(L, 1); if (path == "a") ...
1,572
608
/* * Copyright (C) 2016 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...
8,826
2,743
#include <IO/WriteHelpers.h> #include <IO/WriteBufferValidUTF8.h> #include <Processors/Formats/Impl/JSONCompactEachRowRowOutputFormat.h> #include <Formats/FormatFactory.h> #include <Formats/registerWithNamesAndTypes.h> namespace DB { JSONCompactEachRowRowOutputFormat::JSONCompactEachRowRowOutputFormat(WriteBuffer &...
3,476
1,054
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* This file is part of the HiGHS linear optimization suite */ /* */ /* Written an...
26,344
8,439
#pragma once #include <so_5_extra/disp/asio_one_thread/pub.hpp> void make_coop_a( so_5::environment_t & env, so_5::extra::disp::asio_one_thread::dispatcher_handle_t disp );
178
79
/* This file is a part of liblsdj, a C library for managing everything that has to do with LSDJ, software for writing music (chiptune) with your gameboy. For more information, see: * https://github.com/stijnfrishert/liblsdj * http://www.littlesounddj.com -----------------------------------------------------...
2,314
758
#include "OptimisticTask.h" /// In the optimistic task, you get reward epsilon in the normal /// state, reward 1 in the good state. OptimisticTask::OptimisticTask(real epsilon_, real delta_) : Environment<int, int>(3, 2), epsilon(epsilon_), delta(delta_) { Reset(); } void OptimisticTask::Reset() { state = 0; ...
1,728
722
/* * Copyright (c) 2011-2020, The Linux Foundation. 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 lis...
8,184
3,167
#include <cstdio> #include <vector> #include <limits> #include <algorithm> using namespace std; int g[501][501]; int stoer_wagner(int N) { vector<int> v(N); for (int i = 0; i < N; i++) { v[i] = i; } int cut = numeric_limits<int>::max(); for (int m = N; m > 1; m--) { //vector<int> ws(m, 0); int ...
1,150
571
// 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 <string.h> #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/extensions/exten...
17,912
5,967
#include <iostream> #include <vector> #include <string> #include <fstream> #include <algorithm> #include <sstream> using namespace std; struct configpeer{ int peerId; string hostname; int listport; bool havefile; } confp; struct configcommon{ int noprfnbrs; int unchokint; int optunchokint...
2,799
893
#include <algorithm> #include <iostream> #include <iomanip> #include <vector> #include <cmath> using namespace std; // Disjoint set implementation class disjoint_set { private: int *rank, *parent; unsigned int n; public: // default constructor disjoint_set() = default; // Constructor to create an...
3,601
1,275
// COPYRIGHT_BEGIN // // The MIT License (MIT) // // Copyright (c) 2020-2021 Wizzer Works // // 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 limitati...
3,948
1,246
////////////////////////////////////////////////////////////////////////////// /// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand /// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI /// /// Distributed under the Boost Software License, Version 1.0 /// ...
1,619
603
#pragma once #ifndef _SHARPEN_ASYNCREADWRITELOCK_HPP #define _SHARPEN_ASYNCREADWRITELOCK_HPP #include <list> #include "AwaitableFuture.hpp" namespace sharpen { enum class ReadWriteLockState { Free, SharedReading, UniquedWriting }; class AsyncReadWriteLock:public sharpen::Nonc...
968
310
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar #pragma once #include <java/io/fwd-POI.hpp> #include <java/lang/fwd-POI.hpp> #include <java/util/fwd-POI.hpp> #include <sun/util/spi/fwd-POI.hpp> #include <java/lang/Object.hpp> struct default_init_tag; class java::uti...
1,396
458
/** * The MIT License (MIT) * * Copyright (c) 2016 by Daniel Eichhorn * Copyright (c) 2016 by Fabrice Weinberg * * 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, i...
6,424
2,333
#include <iostream> #include <vector> int main() { // create a vector containing int std::vector<int> v = {1, 2, 3, 4}; v.push_back(6); v.push_back(7); for (int n:v) { std::cout << n << '\n'; } return 0; }
261
111
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; map<string, pii> mk; int sol = 0; int main() { string a; cin >> a; for(int i = 0 ; i < a.size() ; i++) for(int j = i ; j < a.size() ; j++){ string c = a.substr(i, j - i + 1); if(mk...
595
230
/* * File: ASTCreateIndex.cpp * Copyright (C) 2009 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS) */ #include "tr/xqp/serial/deser.h" #include "tr/xqp/visitor/ASTVisitor.h" #include "ASTCreateIndex.h" ASTCreateIndex::~ASTCreateIndex() { delete name; delete on_path; ...
1,803
685
#include "prpch.h" #include "parrot/core/Input.h" #include "parrot/core/Application.h" #include <GLFW/glfw3.h> namespace parrot { bool Input::isKeyPressed(KeyCode key_code) { auto window = static_cast<GLFWwindow*>(Application::get().getWindow().getNativeWindow()); auto state = glfwGetKey(window,...
951
316
// // VADM - class for loading the executable in Amiga Hunk format // // Copyright(C) 2016 Constantin Wiemer // #include "loader.h" // global logger extern log4cxx::LoggerPtr g_logger; // global pointer to memory extern uint8_t *g_mem; void AmiHunkLoader::load(char *fname, uint32_t loc) { Poco::FileInputStre...
5,024
1,573
#pragma once #include <string> #include <vector> #include <unordered_map> class Variant { public: enum Type : uint8_t { Unknown, Pointer, //void* Bool, //bool Int, //int64_t Float, //double String, //std::string PointerArray, //std::vector<void*> BoolArray, //std::vector<bool> ByteArray, //std::v...
10,574
4,572
#include <math.h> #include <float.h> /* defines DBL_EPSILON */ #include <assert.h> #include "gtest/gtest.h" namespace { TEST(Examples, Allocation) { int * x = new int; double * p = new double[10]; delete x; delete[] p; } }
266
102
#include "extdll.h" #include "util.h" #include "cbase.h" #include "CInfoIntermission.h" LINK_ENTITY_TO_CLASS( info_intermission, CInfoIntermission ); void CInfoIntermission::Spawn( void ) { SetAbsOrigin( GetAbsOrigin() ); SetSolidType( SOLID_NOT ); GetEffects() = EF_NODRAW; SetViewAngle( g_vecZero ); SetNextTh...
684
274
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "IOSWindow.h" #include "IOSAppDelegate.h" #include "IOSView.h" FIOSWindow::~FIOSWindow() { // NOTE: The Window is invalid here! // Use NativeWindow_Destroy() instead. } TSharedRef<FIOSWindow> FIOSWindow::Make() { return MakeShareable( new...
2,797
1,038
/* Cafu Engine, http://www.cafu.de/ Copyright (c) Carsten Fuchs and other contributors. This project is licensed under the terms of the MIT license. */ #include "Delete.hpp" #include "Select.hpp" #include "../CompMapEntity.hpp" #include "../MapDocument.hpp" #include "../MapEntRepres.hpp" #include "../MapPrimitive.hpp...
7,253
2,420
#include "opt/dedicate_to_window.hpp" #if defined(DEBUG) #include <iostream> #endif #include <windows.h> #include "bind/emu/edi_change_mode.hpp" #include "bind/mode/change_mode.hpp" #include "err_logger.hpp" #include "g_params.hpp" #include "io/mouse.hpp" #include "key/key_absorber.hpp" #include "key/keycode_def.hpp...
1,674
580
/* $Id: RTSignTool.cpp $ */ /** @file * IPRT - Signing Tool. */ /* * Copyright (C) 2006-2015 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of ...
36,450
12,647
/** * @file * @brief Generate fibonacci sequence * * Calculate the the value on Fibonacci's sequence given an * integer as input. * \f[\text{fib}(n) = \text{fib}(n-1) + \text{fib}(n-2)\f] * * @see fibonacci_large.cpp, fibonacci_fast.cpp, string_fibonacci.cpp */ #include <cassert> #include <iostream> /** * Re...
1,702
688
/****************************************************************************/ /** * @file TinyXML.cpp */ /*---------------------------------------------------------------------------- * * Copyright (c) Visualization Laboratory, Kyoto University. * All rights reserved. * See http://www.viz.media.kyoto-u.ac.jp...
31,786
10,230
/* Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
5,988
1,941
#include "exercise_10.h" void f() { string s = "a series of whitespace seperated words"; vector<string> substrings = split(s); for (auto substring : substrings) { cout << substring << endl; } } int main() { try { f(); } catch (...) { cout << "MAJOR ERR...
367
133
// Arquivo player_mail_box.hpp // Criado em 13/01/2021 as 09:52 por Acrisio // Defini��o da classe PlayerMailBox #pragma once #ifndef _STDA_PLAYER_MAIL_BOX_HPP #define _STDA_PLAYER_MAIL_BOX_HPP #if defined(_WIN32) #include <Windows.h> #elif defined(__linux__) #include "../../Projeto IOCP/UTIL/WinPort.h" #include <pth...
2,008
909
/* * Copyright 2017 The WizTK 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 agre...
1,855
608
#include "channel.h" #include "library.h" #include "fileinfo.h" #include "connection.h" #include "filetransfer.h" #include "private/cachemanager_p.h" #include "private/interfacemanager_p.h" namespace TeamSpeakSdk { class Channel::Private { public: int getInt(const Channel* channel, ChannelProperty flag) { ...
15,546
4,651
// MIT Licensed (see LICENSE.md). #pragma once namespace Math { namespace Simd { // loading SimMat4 LoadMat4x4(const scalar vals[16]); SimMat4 SetMat4x4(scalar m00, scalar m01, scalar m02, scalar m03, scalar m10, scalar m11, ...
3,165
1,023
#include "serialization_demo.hpp" #include "serialization_examples.hpp" #include "blob.hpp" #include <iostream> #include <stdint.h> #include <stdarg.h> #define WIN32_LEAN_AND_MEAN #include <Windows.h> // Allocator ////////////////////////////////////////////////////////////// void* Allocator::allocate( sizet size...
14,601
5,062
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
23,938
6,113
// MIT License // // Copyright (c) 2020, The Regents of the University of California, // through Lawrence Berkeley National Laboratory (subject to receipt of any // required approvals from the U.S. Dept. of Energy). All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy...
10,440
3,595
/* * Copyright (c) 2008, Willow Garage, 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 l...
5,146
1,823
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
2,932
1,011
/* * Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, ...
4,544
2,082
#include "routing-algos/alg/nth-element.h" #include <algorithm> #include <vector> #include "absl/strings/substitute.h" #include "absl/types/span.h" #include "gmock/gmock.h" #include "gtest/gtest.h" namespace routing_algos { namespace { std::vector<int64_t> RoutingAlgosNth(const std::vector<int64_t>& arg, int n) { ...
3,009
1,110
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/comprehendmedical/model/UnmappedAttribute.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace...
1,454
518
/* * Copyright 1993-2019 NVIDIA Corporation. All rights reserved. * * NOTICE TO LICENSEE: * * This source code and/or documentation ("Licensed Deliverables") are * subject to NVIDIA intellectual property rights under U.S. and * international Copyright laws. * * These Licensed Deliverables contained herein is ...
11,800
4,209
#include <iostream> using namespace std; int main(void) { int k, n, time = 210, ans, t; char z; bool check = false; cin >> k >> n; for (int i = 0; i < n; i++) { cin >> t >> z; if (time - t <= 0 && !check) { ans = k; check = true; } else { time -= t; if (z == 'T') k = (k + 1) > 8 ? 1 : ...
352
193
#include <iostream> #include "code/utilities/web/chrome/version/chrome_version_getter.hpp" int main(){ auto version = Chrome_Version_Getter::Get_Version(); std::cout << version << std::endl; }
202
66
// Copyright (c) 2011 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/gfx/surface/accelerated_surface_wayland.h" #include <wayland-egl.h> #include "third_party/angle/include/EGL/egl.h" #include "third_part...
1,642
675
// Copyright 2017 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 "garnet/bin/ktrace_provider/reader.h" #include <lib/zircon-internal/ktrace.h> namespace ktrace_provider { Reader::Reader(const char* buffer, si...
1,329
485
#include <config.h> #include <mwoibn/loaders/robot.h> #include <mwoibn/robot_class/robot_ros_nrt.h> #include <mwoibn/robot_class/robot_xbot_nrt.h> #include <mwoibn/visualization_tools/rviz_track_point.h> #include <mwoibn/point_handling/robot_points_handler.h> // std::vector<mwoibn::Vector3> // contactPoints(mwoibn::...
13,537
4,766
#include "IntroState.hpp" #include "MainState.hpp" template<> IntroState* Ogre::Singleton<IntroState>::msSingleton = 0; IntroState::IntroState(): _physicsMgr(NULL), _mapMgr(NULL), _overlayMgr(NULL), _cameraMgr(NULL), _shootMgr(NULL), _collisionMgr(NULL), _characterMgr(NULL) {} void Intr...
5,840
2,206
#include "../../headers.h" /* * Something to remember here is that: * all these functions - take iterators as I/P's. * But iterators are more like pointers and they v * can be incremented or decremented */ int main() { string s = "accenllt"; string::iterator it = adjacent_find(s.begin()+2,s.end()); ...
391
133
#include "VBoxLayout.h" #include <QVBoxLayout> #include <QPoint> VBoxLayout::VBoxLayout() : VBoxLayout(nullptr) { } VBoxLayout::VBoxLayout(QWidget* parent) : QWidget(parent) { QVBoxLayout* layout = new QVBoxLayout(this); layout->setAlignment(Qt::AlignTop); layout->setSpacing(0); } void VBoxLayout::add(QWidget* ...
935
377
// VroemVroem - World #include "world.hpp" #include "noise.hpp" #include "objects/terrain.hpp" #include "objects/driver.hpp" #include "utils.hpp" #include "config.hpp" #include "timer.hpp" #include <map> #include <cmath> World::World(uint64_t seed, int width, int height) : seed(seed), width(width), height(height)...
15,267
4,867
// // util/Math.hpp // pTK // // Created by Robin Gustafsson on 2021-12-11. // #ifndef PTK_UTIL_MATH_HPP #define PTK_UTIL_MATH_HPP // C++ Headers #include <cmath> #include <string> namespace pTK { /** This file is purely for the need of math functions. Since in Linux apparently some math functions, ...
813
267
/* * Copyright(c) Sophist Solutions, Inc. 1990-2021. All rights reserved */ #ifndef _Stroika_Foundation_Streams_SharedMemoryStream_inl_ #define _Stroika_Foundation_Streams_SharedMemoryStream_inl_ 1 /* ******************************************************************************** ***************************** Im...
15,876
4,407
// // ExpansionHunter // Copyright (c) 2020 Illumina, Inc. // // Author: Konrad Scheffler <kscheffler@illumina.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.a...
1,468
495
#include <cassert> #include <cstdint> #include <algorithm> #include <string> std::string MakeUpperCase(std::string str) { std::transform(str.begin(), str.end(), str.begin(), ::toupper); return str; } int main() { assert(MakeUpperCase("hello") == "HELLO"); return 0; }
275
106
/* * 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 ...
77,621
24,110
/***************************************************************************************** * * * OpenSpace * * ...
5,018
1,217
#include <iostream> using std::cout; int main(void) { for (int i = 0; i < 10;) { cout << i; } int i = 0; for (;;) { cout << i; } } // i jedan i drugi for loop rade infinite loop
222
92
// Copyright (c) 2018-2021 The Cash2 developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "gtest/gtest.h" #include "Logging/ConsoleLogger.h" using namespace Logging; // constructor TEST(ConsoleLogger, 1) { ...
714
249
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <sstream> #include <boost/algorithm/string/trim.hpp> #include <boost/filesystem/fstream.hpp> #include <fmt/format.h> #in...
8,712
2,740
// Copyright 2020 MongoDB Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wri...
4,066
1,221
/***************************************************************************** export.cpp Author: Laurent de Soras, 2016 --- Legal stuff --- This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the term...
10,532
4,873
// +------------------------------------------------------------------------- // | Copyright (C) 2017 Yunify, Inc. // +------------------------------------------------------------------------- // | Licensed under the Apache License, Version 2.0 (the "License"); // | you may not use this work except in compliance with t...
7,894
2,548
#pragma once #include <hitagi/ecs/world.hpp> #include <hitagi/utils/concepts.hpp> #include <memory_resource> #include <typeindex> #include <vector> #include <functional> namespace hitagi::ecs { class Schedule { struct ITask { virtual void Run(World&) = 0; }; template <typename Func> struct T...
2,358
752
// Copyright (c) 2011 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 "ppapi/proxy/plugin_message_filter.h" #include "base/bind.h" #include "base/location.h" #include "base/logging.h" #include "base/task/single...
3,935
1,257
/**************************************************************************\ * Copyright (c) Kongsberg Oil & Gas Technologies AS * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Red...
7,055
2,306
///////////////////////////////////////////////// // File PulsarSpectrum.cxx // Implementation of PulsarSpectrum class ////////////////////////////////////////////////// #include "Pulsar/PulsarSpectrum.h" #include "Pulsar/PulsarConstants.h" #include "SpectObj/SpectObj.h" #include "flux/SpectrumFactory.h" #include "fac...
72,439
29,138
//Generated lump file. generated by Bee.NativeProgramSupport.Lumping #include "C:/Program Files/Unity 2021.2.8f1/Editor/Data/il2cpp/libil2cpp/metadata/CustomAttributeCreator.cpp" #include "C:/Program Files/Unity 2021.2.8f1/Editor/Data/il2cpp/libil2cpp/metadata/CustomAttributeDataReader.cpp" #include "C:/Program Files/U...
925
384
#include "Papyrus/ExtendedObjectTypes.h" auto extendedObjectTypes::RegisterTypes(VM* a_vm) -> bool { if (!a_vm) { logger::critical("Object types - couldn't get VMState"sv); return false; } a_vm->RegisterObjectType(vm_cast<RE::BGSFootstepSet>(), "FootstepSet"); logger::info("Registered footstep set object typ...
603
217
#include <bits/stdc++.h> using namespace std; int main(){ map<int, int> m; int n,k; scanf("%d%d", &n, &k); vector<int> a(n); vector<int> b(n); for(int i = 0; i<n; i++){ scanf("%d", &a[i]); b[i] = a[i]; } sort(b.rbegin(), b.rend()); for(int i = 0; i<k; i++) ...
933
435
// implementation for regularity.h #include <algebra/vector.h> #include <algebra/matrix.h> #include <numerics/eigenvalues.h> using namespace MathTL; namespace WaveletTL { template <class MASK> AutocorrelationMask<MASK>::AutocorrelationMask() { MASK a; // b(k) = \sum_m a(k+m)*a(m)/2 const int k1 = ...
1,330
563
//Questão: Salario com Bonus #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { string NOME; float SALARIO, TOTALV, TOTAL; cin >> NOME; cout << fixed << setprecision(2); cin >> SALARIO >> TOTALV; cout << fixed << setprecision(2); cout << "TOTAL = R$ "<<((TOT...
366
154
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2008. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ /*--------------...
5,529
1,685
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2017 ArangoDB GmbH, Cologne, Germany /// /// 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...
2,422
638
//===--- LLVMLibcTidyModule.cpp - clang-tidy ------------------------------===// // // 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 // //===---------------------------...
1,543
478
#include <vtkActor.h> #include <vtkCamera.h> #include <vtkLineSource.h> #include <vtkNamedColors.h> #include <vtkNew.h> #include <vtkPointData.h> #include <vtkPolyDataMapper.h> #include <vtkProperty.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkRenderer.h> #include <vtkStreamTracer...
11,679
4,600
#include <OpenCLInvertexIndex.h> /** * WordMapInvertedIndex::InvertedIndexMap */ const char* WordMapInvertedIndex::InvertedIndexMap::at(cl_uint i) const { return (const char*)data() + word_capacity()*i; } const char* WordMapInvertedIndex::InvertedIndexMap::operator[](cl_uint i) const { return (const char*)da...
347
127
#pragma once #include "App.hpp" #include "RisingEdgeButton.h" #include "SmartCard.h" #include <LiquidCrystal_I2C.h> #include <stdint.h> #include <WString.h> class PlayerCardCreator : public App { public: PlayerCardCreator(); void init(); void run(); private: LiquidCrystal_I2C lcd; RisingEdgeBut...
903
304
/* -*- C++ -*- ------------------------------------------------------------ @@COPYRIGHT@@ *-----------------------------------------------------------------------*/ /** @file */ #ifndef __CML_VECTOR_SUBVECTOR_OPS_TPP #error "vector/subvector_ops.tpp not included correctly" #endif namespace cml { template<class Su...
745
234
#include <algorithm> #include <iterator> #include <iostream> #include "mesh.h" #include "geometry/isect_util.h" using std::copy; using std::ostream_iterator; using std::cerr; MeshTri::MeshTri(const Mesh* m, int f, const uint v[3]) : mesh(m), ti(f) { copy(v, v+3, vi); } scalar_fp ray_triangle_intersection_accel(c...
4,112
1,809