text
string
size
int64
token_count
int64
/* Copyright © 2017 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #include <unity/lib/extensions/option_info.hpp> #include <boost/lexical_cast.hpp> namespace turi {...
8,874
2,736
//============================================================================ // // This file is part of GPSTk, the GPS Toolkit. // // The GPSTk is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation; ei...
2,612
777
class Solution { public: vector<vector<int>> combine(int n, int k) { vector<vector<int>> combis; vector<int> combi; dfs(0, n, k, &combi, &combis); return combis; } private: void dfs(int pre, int n, int k, vector<int> * combi, vector<vector<int>> * combis) { if (s...
623
221
#include<iostream> #include<unistd.h> #include<cstdlib> #include<fstream> using namespace std; // int k=1; int main() { cout<<endl<<endl<<endl; int n=15; double temp[n][n]; ifstream f1; f1.open("data.txt"); for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { f1>>temp[...
765
323
// 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 "content/browser/renderer_host/render_widget_host_delegate.h" #include "build/build_config.h" #include "components/rappor/public/sample.h" #...
3,595
1,027
// Copyright 2013 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 "ash/wm/lock_state_controller.h" #include <algorithm> #include <string> #include <utility> #include "ash/accessibility/accessibility_controller...
21,696
6,762
/* Copyright (C) 2020 Christoph Theis */ #include "stdafx.h" #include <wx/progdlg.h> #include <wx/xrc/xh_aui.h> #include "tt32App.h" #include "MainFrm.h" #include "ChildFrm.h" #include "FormViewEx.h" #include "ImportOnlineEntries.h" #include "ItemCtrl.h" #include "Profile.h" #include "InfoSystem.h" #include "CpL...
51,281
19,961
#include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { ui->setupUi(this); DoOperation(OperationInitContext, &currentContext, NULL); UpdateLabels(); } MainWindow::~MainWindow() { delete ui; } void MainWindow...
1,186
377
#include "insertion_sort.h" void InsertionSort::Sort(vector<int> &A) { int n = A.size(); for (int i = 0; i < n; i++) { // 假設 A[0... i-1] 已經排好了。 for (int j = i; j > 0; j--) { if (A[j] < A[j - 1]) { Swap(A[j], A[j - 1]); } else { break; } } } } SorterFactoryRegistrar<...
360
171
#include "baseline.h" #include "load_data.h" #include "cb_dsv_loader.h" #include "data_provider_builders.h" #include <catboost/libs/column_description/cd_parser.h> #include <catboost/libs/helpers/exception.h> #include <catboost/libs/helpers/int_cast.h> #include <catboost/libs/logging/logging.h> #include <util/dateti...
9,581
2,540
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "CPP_Tutorial.h" #include "Kismet/GameplayStatics.h" #include "Blueprint/UserWidget.h" #include "CPP_TutorialGameMode.h" #include "CPP_TutorialCharacter.h" #include "SpawnVolume.h" ACPP_TutorialGameMode::ACPP_TutorialGameMode() { // set default ...
3,084
1,196
// The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt /* This mex file will create a MATLAB function called example_mex_class. If you call it with no arguments it will output the MATLAB .m code to create a MATLAB wrapper class. Paste that code into a .m file. Then you...
1,873
597
// os_frt.cpp /* * FRT - A Godot platform targeting single board computers * Copyright (c) 2017-2019 Emanuele Fornara * * 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 restrict...
23,939
9,754
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. // DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen #include "pch.h" #include "common.h" #include "ToggleSplitButton.h" CppWinRT...
2,321
643
// Copyright (C) 2017, Christopher N. Hume. All rights reserved. // // 2017-07-04 CNHume Created LCSRecord subclass // 2015-01-23 CNHume Created file // #include "LCSRecord.h" // // Delta formatter // uint32_t LCSRecord::Show(shared_ptr<Delta> deltas, const RECORDS& r1, const RECORDS& r2, const string& label1, co...
1,613
640
// // Copyright 2016 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trad...
12,720
3,893
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty o...
11,229
3,648
///////////////// // OS Includes #include <memory.h> #include <stdlib.h> ////////////// // Includes #include "Clause.h" #include "Random.h" #include "SATInstance.h" #include "SATSolver.h" #include "VariableList.h" ///////////////////////////// // Static Data Initialization ///////////// // Defines /////////////////...
49,344
19,124
#include "file.hpp" #include "path.hpp" #include "../Optional.hpp" #include "../config.hpp" #include <fstream> #if defined(MT_UNIX) #include <sys/stat.h> #endif #if MT_IS_MSVC #include <windows.h> #endif namespace mt::fs { Optional<std::unique_ptr<std::string>> read_file(const FilePath& path) { std::ifstream ifs(...
1,088
401
#ifdef ZIMG_X86 #include "common/ccdep.h" #include <immintrin.h> #include "common/align.h" #include "f16c_x86.h" #include "common/x86/sse2_util.h" #include "common/x86/avx_util.h" namespace zimg { namespace depth { void f16c_half_to_float_ivb(const void *src, void *dst, unsigned left, unsigned right) { const uint...
1,855
940
// Copyright 2017 The Abseil 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...
112,969
39,200
#ifndef STAN_LANG_AST_NODE_ARRAY_EXPR_HPP #define STAN_LANG_AST_NODE_ARRAY_EXPR_HPP #include "expression.hpp" #include "stan/language/ast/scope.hpp" #include "stan/language/ast/type/bare_expr_type.hpp" #include <cstddef> #include <vector> namespace stan { namespace lang { struct expresssion; /** * Structure to hol...
901
310
#include <cassert> #include "HyperionConfig.h" #include "Poco/RegularExpression.h" #include "Poco/StringTokenizer.h" #include "Poco/Timestamp.h" #include "Poco/Delegate.h" #include "Poco/NumberParser.h" #include "hyperion/Hyperion.h" #include "hyperion/ImageProcessorFactory.h" #include "leddevice/LedDevice.h" #incl...
16,530
4,904
/* * sortProcess.cpp : * Changes all sortindexes in the file to the given index. */ #include <iostream> #include <string> #include <vector> #include "../../CatOfEvilGenius/library/DBPF.h" #include "../../CatOfEvilGenius/library/DBPF_types.h" #include "../../CatOfEvilGenius/library/DBPF_BINX.h" using namespace std...
2,389
780
#include <iostream> using namespace std; string correct(string s, string t){ int length = s.size(); for(int i = 0; i<length; ++i){ if(s[i] != t[length-1-i]) return "NO"; } return "YES"; } int main() { string s; string t; cin >> s >> t; cout << correct(s, t) << endl; ...
335
130
// Copyright 2020 The XLS 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 t...
6,001
2,191
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/sync_file_system/sync_file_system_service.h" #include "base/bind.h" #include "base/logging.h" #include "base/memory/ref_coun...
18,656
5,825
/** * MaNGOS is a full featured server for World of Warcraft, supporting * the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 * * Copyright (C) 2005-2017 MaNGOS project <https://getmangos.eu> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Gen...
220,487
75,625
#include <oni-core/graphic/oni-graphic-renderer-ogl-quad.h> #include <cassert> #include <GL/glew.h> #include <oni-core/graphic/buffer/oni-graphic-buffer-data.h> #include <oni-core/graphic/buffer/oni-graphic-index-buffer.h> #include <oni-core/graphic/buffer/oni-graphic-frame-buffer.h> #include <oni-core/graphic/buffe...
9,255
2,923
#include <cstdlib> #include <cstdint> #include <string> #include <vector> #include <chrono> #include <ctime> #include <fstream> #include <unistd.h> #include <sys/reboot.h> #include "powercycle.hpp" Powercycle::Powercycle(const uint32_t& wakeupTime) : wakeupTime_(wakeupTime) { execute(); } void Powercycle::execu...
760
302
/**************************************************************************** ** $Id$ ** ** Copyright (C) 2001-2006 Trolltech AS. All rights reserved. ** ** This file is part of the Qt Script for Applications framework (QSA). ** ** This file may be distributed and/or modified under the terms of the ** GNU General Publ...
47,347
16,673
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetCircleResolution(120); red = 233; blue = 233; green = 233; hideGUI = false; bdrawGrid = false; bdrawPadding = false; ddl = NULL; textInput = NULL; img = new ofImage(); img->...
15,264
6,066
#include "ModeSetState.h" #include <common/net/message/nodes/SetTargetConsistencyStatesMsg.h> #include <common/net/message/nodes/SetTargetConsistencyStatesRespMsg.h> #include <common/toolkit/MessagingTk.h> #include <common/toolkit/UiTk.h> #include <program/Program.h> #define MODESETSTATE_ARG_TARGETID "--targetid" ...
7,845
2,572
// 2303. 숫자 게임 // 2019.10.27 // 구현 #include<iostream> #include<vector> using namespace std; int maxVal; int idx; int check(vector<int>& v) { int val = 0; for (int i = 0; i < 3; i++) { for (int j = i + 1; j < 4; j++) { for (int k = j + 1; k < 5; k++) { int sum = (v[i] + v[j] + v[k]) % 10; val = va...
629
370
#include "task_base_pro/task_group.hpp"
39
16
#include <escher/stack_view.h> #include <escher/metric.h> extern "C" { #include <assert.h> } namespace Escher { StackView::StackView() : View(), m_controller(nullptr) { } void StackView::setTextColor(KDColor textColor) { m_textColor = textColor; markRectAsDirty(bounds()); } void StackView::setBackgroundColo...
1,446
508
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #include "stdafx.h" #include "...
9,030
2,557
//: C12:ByteTest.cpp // From Thinking in C++, 2nd Edition // Available at http://www.BruceEckel.com // (c) Bruce Eckel 2000 // Copyright notice in Copyright.txt #include "Byte.h" #include <fstream> using namespace std; ofstream out("ByteTest.out"); void k(Byte& b1, Byte& b2) { b1 = b1 * b2 + b2 % b1; ...
1,239
632
/* Cafu Engine, http://www.cafu.de/ Copyright (c) Carsten Fuchs and other contributors. This project is licensed under the terms of the MIT license. */ #ifndef CAFU_MODELEDITOR_SCENE_VIEW_3D_HPP_INCLUDED #define CAFU_MODELEDITOR_SCENE_VIEW_3D_HPP_INCLUDED #include "../Generic3DWindow.hpp" #include "Models/Model_cmdl....
2,141
671
//===-- RewriteModernObjC.cpp - Playground for the code rewriter ----------===// // // 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 // //===---------------------------...
295,372
94,020
/*-------------------------------------------------------------------- # required.h - R2TAO CORBA basic support # # Author: Martin Corino # # This program is free software; you can redistribute it and/or # modify it under the terms of the R2CORBA LICENSE which is # included with this program. # # Copyright (c) Remedy I...
12,199
4,994
class ref_count_intf { unsigned d_count; public: ref_count_intf() : d_count(0) {} virtual ~ref_count_intf() = default; ref_count_intf(const ref_count_intf&) = default; ref_count_intf& operator=(const ref_count_intf&) = default; virtual void destroy()=0; void inc() { ++d_count; } ...
2,361
970
// 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 "SemanticScene.h" #include "GibsonSemanticScene.h" #include "Mp3dSemanticScene.h" #include "ReplicaSemanticScene.h" #include <algor...
3,316
964
/* drdec3.f -- translated by f2c (version 19990311). */ #include <ivp_physics.hxx> #if !( (defined(__MWERKS__) && defined(__POWERPC__)) || defined(GEKKO) ) #include <malloc.h> #endif #include <ivp_betterdebugmanager.hxx> #include <geompack.hxx> int IVP_Geompack::i_sign(int a, int b) { int x; ...
20,604
8,681
/* * Copyright (c) 2010-2012 OTClient <https://github.com/edubart/otclient> * * 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...
4,772
1,590
#include <iostream> #include <fstream> #include <cstring> #include <glad/glad.h> #include "debug.h" #include "model.h" Model::Model(const char *vertexShaderSourcePath, const char *fragmentShaderSourcePath) { char vPath[128] = "\0", fPath[128] = "\0"; fullPath(vertexShaderSourcePath, vPath); fullPath(fragm...
3,532
1,286
#if !defined(BOOST_PP_IS_ITERATING) ///// header body // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! // Copyright Aleksey Gurtovoy 2000-2004 // // 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...
8,923
4,297
// License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2020 Intel Corporation. All Rights Reserved. //#cmake:add-file ../../../../common/utilities/number/stabilized-value.h #include "../../../test.h" #include <../common/utilities/number/stabilized-value.h> using namespace utilities::number; // ...
1,225
474
#include "source_wrap.h" #include <napi.h> #include <uv.h> #include "log_message.h" Napi::FunctionReference Source::constructor; Napi::Object Source::Init(Napi::Env env, Napi::Object exports) { Napi::HandleScope scope(env); constexpr auto name = "_Source"; Napi::Function func = DefineClass(env, ...
8,327
2,765
// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s struct Agg { const char * x; const char * y; constexpr Agg() : x(0), y(0) {} }; struct Struct { constexpr static const char *name = "foo"; constexpr static __complex float complexValue = 42.0; ...
5,805
2,562
#include "pch.h" #include <string.h> #include "nacl_includes\crypto_sign.h" #include "additions\crypto_hash_sha512.h" #include "ge.h" #include "sc.h" int crypto_sign( unsigned char *sm, unsigned long long *smlen, const unsigned char *m, unsigned long long mlen, const unsigned char *sk ) { unsigned char pk[32]; u...
854
443
// Preprocessor Directives #ifndef GLITTER #define GLITTER #pragma once // System Headers #include <assimp/Importer.hpp> #include <assimp/postprocess.h> #include <assimp/scene.h> #include <btBulletDynamicsCommon.h> #include <glad/glad.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/...
630
253
#include <algorithm> #include <regex> #include "AutoSchedule.h" #include "AutoScheduleUtils.h" #include "ExprUsesVar.h" #include "FindCalls.h" #include "Func.h" #include "IREquality.h" #include "Inline.h" #include "ParallelRVar.h" #include "RealizationOrder.h" #include "RegionCosts.h" #include "Scope.h" #include "Simp...
147,876
43,093
// 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 "chrome/chrome_cleaner/zip_archiver/target/sandbox_setup.h" #include <memory> #include <utility> #include "base/bind.h" #include "base/memory/s...
3,184
1,078
/** * Copyright 2018 - 2019 HITSIC * 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...
9,840
6,870
/** Copyright (c) 2014-2015, Sandia Corporation All rights reserved. This file is part of fast-matmul and is under the BSD 2-Clause License, which can be found in the LICENSE file in the root directory, or at http://opensource.org/licenses/BSD-2-Clause. */ #ifndef _COMMON_HPP_ #define _COMMON_HPP_ #...
751
319
#include <ThirdParty/imgui/imgui.h> #include "Gui/BibleBookWindow.h" namespace GUI { /// Updates and renders a single frame of the window, if it's open. /// @return The verse range for any selected chapter; null if no chapter was selected. std::optional<BIBLE_DATA::BibleVerseRange> BibleBookWindow::UpdateA...
4,068
1,127
/* * Essex Engine * * Copyright (C) 2018 Nathan Mentley - All Rights Reserved * You may use, distribute and modify this code under the * terms of the BSD license. * * You should have received a copy of the BSD license with * this file. If not, please visit: https://github.com/nathanmentley/EssexEngine */ #i...
716
227
/// @file lahqr_schur22.hpp /// @author Thijs Steel, KU Leuven, Belgium /// Adapted from @see https://github.com/Reference-LAPACK/lapack/tree/master/SRC/dlanv2.f // // Copyright (c) 2013-2022, University of Colorado Denver. All rights reserved. // // This file is part of <T>LAPACK. // <T>LAPACK is free software: you ca...
7,239
2,275
/** For conditions of distribution and use, see copyright notice in LICENSE @file AssetsWindow.cpp @brief The main UI for managing asset storages and assets. */ #include "StableHeaders.h" #include "DebugOperatorNew.h" #include "AssetsWindow.h" #include "AssetTreeWidget.h" #include "TreeWidgetUtils.h" ...
14,504
4,465
int global; int main() { int i, j, k, l, m, n; }
53
27
/* * This software is distributed under BSD 3-clause license (see LICENSE file). * * Authors: Heiko Strathmann, Soeren Sonnenburg, Sergey Lisitsyn, Viktor Gal */ #include <shogun/features/streaming/StreamingFeatures.h> #include <shogun/features/streaming/StreamingDenseFeatures.h> #include <shogun/features/DenseFeat...
943
353
/** * Copyright 2019-2020 Huawei Technologies Co., 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 applicabl...
8,443
3,222
/* * This file is part of the Micro Python project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2015 Damien P. George * * 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...
15,617
6,982
#include "GameApp.h" #include "d3dUtil.h" #include "DXTrace.h" using namespace DirectX; GameApp::GameApp(HINSTANCE hInstance) : D3DApp(hInstance), m_IndexCount(), m_CurrFrame(), m_CurrMode(ShowMode::WoodCrate), m_VSConstantBuffer(), m_PSConstantBuffer() { } GameApp::~GameApp() { } bool GameApp::Init() { if...
12,791
6,494
// Copyright 2022 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 "src/ui/scenic/lib/display/display_power_manager.h" #include <fuchsia/ui/display/internal/cpp/fidl.h> #include <lib/async/default.h> #include <li...
6,478
1,965
/* * Copyright 2018 by Marco Martin <mart@kde.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 the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
12,109
3,801
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> #define MAX_L 1005 #define INF 0xffffff #define LL long long using namespace std; int G[MAX_L][MAX_L]; int dis[MAX_L][MAX_L]; LL t, s, d, n = 0; int start[MAX_L]; int dest...
1,652
920
#include <bits/stdc++.h> using namespace std; int main() { int testCases; cin >> testCases; while (testCases--) { long long int A,Y,X; cin>>A>>Y>>X; if( Y>A ) { cout<<X*A +1<<endl; } else if(Y<=A) { cout<<X*Y <<endl;...
363
142
// // Copyright (c) 2020 Erwin Rol <erwin@erwinrol.com> // // SPDX-License-Identifier: MIT // #ifndef NEDERROCK_SRC_AND_PARSER_NODE_HPP #define NEDERROCK_SRC_AND_PARSER_NODE_HPP #include "and_parser_node_pre.hpp" #include "separator_parser_node_pre.hpp" #include "equality_check_parser_node_pre.hpp" #include "token_st...
1,636
599
// NewEditBox.cpp : implementation file // #include "stdafx.h" #include "Magenta.h" #include "Constants.h" #include "Person.h" #include "NewEditBox.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////...
5,496
2,312
#pragma once #include <string> #include <list> #include <vector> /*! * \file lacze_do_gnuplota.hh * * Plik zawiera definicję klasy realizującej interfejs * komunikacyjny do programu gnuplot. */ /*! * \brief Moduł narzędzi umożliwiających połącznie z GNUPlotem * * Niniejsza przestrzeń nazw stanowi modu...
23,551
9,605
// Copyright 2020 Google LLC // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
5,262
1,643
/* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen University * * ...
6,959
1,861
// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com // ---------------------------------------------------------------------------- // "THE BEER-WARE LICENSE" (Revision 42): // <ztn@zurreal.com> wrote this file. ...
12,732
4,051
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights 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 t...
18,214
6,253
#include <iostream> #include <string> #include <vector> using namespace std; vector<string> read_data(string file_path); int count_trees(vector<string> data, int right_step, int down_step) { int position = 0, number_of_trees = 0; int col_num = data[0].length(); string str; for (int row = 0; row < data...
1,401
501
#include <fc/thread/future.hpp> #include <fc/thread/spin_yield_lock.hpp> #include <fc/thread/thread.hpp> #include <fc/thread/unique_lock.hpp> #include <fc/exception/exception.hpp> #include <boost/assert.hpp> namespace fc { promise_base::promise_base( const char* desc ) :_ready(false), _blocked_thread(nullptr)...
4,471
1,487
#include <QApplication> #include "ivyservice.h" QString loadFile(QString path) { QFile f(path); f.open(QIODevice::ReadOnly); QString s = f.readAll(); f.close(); return s; } void showHelpAndExit() { puts( R"(Usage: ivyserver [arguments] Arguments: --minimized: Start with the ma...
1,116
397
/* Copyright 2020 The TensorFlow 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 a...
4,303
1,374
/* * Copyright (C) 2011 Igalia S.L. * * 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 Foundation; either * version 2 of the License, or (at your option) any later version. * * This library i...
11,738
4,067
/* * Copyright (c) 2018, Ford Motor Company * 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...
47,717
16,345
// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <string> #incl...
10,276
3,916
#include <cstdint> #include <stdexcept> #include <iostream> enum Side { NONE, LEFT, RIGHT }; class ChainLink { public: void append(ChainLink* rightPart) { if (this->right != NULL) throw std::logic_error("Link is already connected."); this->right = rightPart; rightPart->lef...
1,262
400
#include <iostream> bool bipartition(std::pair<size_t, size_t>* edges, size_t* hamilton_cycle, bool* partition, size_t edges_size, bool* visited, size_t current_index, bool first_part = true) { if (visited[current_index]) { return partition[current_index] == first_part; } visited[current_i...
2,817
997
#ifndef INTERLINCK_DELPHI_SYNTAX_STATEMENTS_DELPHIRAISESTATEMENTSYNTAX_H #define INTERLINCK_DELPHI_SYNTAX_STATEMENTS_DELPHIRAISESTATEMENTSYNTAX_H #include "interlinck/Core/Syntax/SyntaxVariant.hpp" #include "interlinck/Core/Types.hpp" #include "Core/Basic/Macros.hpp" #include "Delphi/Syntax/Statements/DelphiStatementS...
2,778
788
#include <iostream> #include "Foo.h" using namespace std; int main (void) { Foo theFoo; cout << theFoo; theFoo.SetMsg("Hello World"); cout << theFoo; return 0; }
184
73
/* Copyright (c) 2018 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 "meta/MetaServiceUtils.h" #include "meta/MetaServiceHandler.h" #include "meta/processors/partsMan/CreateSpacePr...
14,374
4,897
#pragma once #include "abstract_rule.hpp" #include "expression/abstract_expression.hpp" #include "types.hpp" namespace opossum { class AbstractExpression; class AbstractLQPNode; class AliasNode; class AggregateNode; class BinaryPredicateExpression; class LQPSubqueryExpression; class PredicateNode; class ProjectionNo...
5,344
1,506
// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s #include "Inputs/sycl.hpp" struct Base { int A, B; cl::sycl::accessor<char, 1, cl::sycl::access::mode::read> AccField; }; struct Captured : Base, cl::sycl::accessor<char, 1, cl::sycl::access::mode::read> { int C; }; int ma...
3,517
1,394
/* * 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 ...
6,285
1,986
#include <stan/math/fwd/scal.hpp> #include <gtest/gtest.h> #include <math/fwd/scal/fun/nan_util.hpp> TEST(AgradFwdPow, Fvar) { using stan::math::fvar; using std::isnan; using std::log; using std::pow; fvar<double> x(0.5, 1.0); double y = 5.0; fvar<double> a = pow(x, y); EXPECT_FLOAT_EQ(pow(0.5, 5.0),...
1,571
880
// ____ ______ __ // / __ \ / ____// / // / /_/ // / / / // / ____// /___ / /___ PixInsight Class Library // /_/ \____//_____/ PCL 2.4.9 // ---------------------------------------------------------------------------- // Standard CosmeticCorrection Process Module Version 1.2.5 // -----------------...
13,660
4,368
/** * Copyright 2019 Christophe Pollet * * 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 agr...
1,403
520
/**************************** Copyright © 2014 Luke Salisbury 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, including co...
4,317
1,797
// AMD AMDUtils code // // Copyright(c) 2018 Advanced Micro Devices, Inc.All rights reserved. // 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 limitat...
23,581
7,469
#ifndef OSMIUM_IO_READER_HPP #define OSMIUM_IO_READER_HPP /* This file is part of Osmium (https://osmcode.org/libosmium). Copyright 2013-2021 Jochen Topf <jochen@topf.org> and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person o...
23,510
6,362
#pragma once #include <map> #include <ostream> #include <boost/test/unit_test.hpp> #include "api/Packet.hh" #include "oxm/field_set.hh" #include "maple/Backend.hh" #include "maple/Flow.hh" namespace runos { class MockSwitch : public maple::Backend { using Flow = maple::Flow; using FlowPtr = maple::FlowPtr; ...
3,040
950
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <fstream> #include <iostream> #include <list> #include <map> #include <memory> #include <sstream> #include <typeinfo> #include <vector> extern "C" { #include "libavcodec/avcodec.h" #include "libavcodec/cabac.h" #include "libavcodec/...
59,976
23,249
/* * This Kalman filter is implemented as a learning exercise. * It is used in the final version of the cube, but could be * almost drag and drop replaced by a more efficient library. * * Uses a custom Matrix<T> class to perform matrix operations * in an arduino friendly (space saving) way. */ #inclu...
2,006
736