text
string
size
int64
token_count
int64
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
3,546
1,451
// This program calculates the average // of three test scores. #include <iostream> #include <cmath> using namespace std; int main() { double test1, test2, test3; // To hold the scores double average; // To hold the average // Get the three test scores. cout << "Enter the first test scor...
668
202
#pragma once #include <functional> #include <memory> #include <sstream> #include <string> #include <unordered_map> #include <vector> #include <tudocomp/meta/Config.hpp> #include <tudocomp/meta/Meta.hpp> namespace tdc { namespace meta { /// \brief Error type for registry related errors. class RegistryError : public ...
5,712
1,761
// ====================================================================== // \title Rules.hpp // \author ciankc // \brief Rules for testing SphinxUartOnboardDriver // // \copyright // Copyright (C) 2019 California Institute of Technology. // ALL RIGHTS RESERVED. United States Government Sponsorship // acknowledged....
7,938
2,539
#include <algorithm> #include <random> #include <chrono> #include "../include/board.h" Board::Board() { boardArr = { }; } void Board::addCard(Card card, int index) { boardArr[index] = card; } std::string Board::getCardWord(int index) { return boardArr[index].getWord(); } std::string Board::getCardMatch(int i...
1,630
730
/* * Copyright 2017-2020 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "...
1,183
402
//----------------------------------------------------------------------------------- // DirectXSH.cpp -- C++ Spherical Harmonics Math Library // // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // // http://go.microsoft.com/fwlink/p/?LinkId=262885 //---------------...
218,510
144,117
// // Copyright (c) 2017 The Khronos Group 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 la...
56,288
16,570
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation...
16,728
7,824
// @@@ Notice! the savings algorithm assumes symmetric costs! #include "Route.h" // From SRP-Utils #include "Utils.h" #include "VectorUtils.h" Route::Route(const CVRPInstance& instance) : m_pInstance(&instance), m_pMatDists(&(instance.getDists())) { int iN = instance.getN(); m_vecRoute.push_back(0)...
12,963
4,623
/* * Copyright (C) 2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "level_zero/tools/test/unit_tests/sources/sysman/linux/mock_sysman_fixture.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "mock_sysfs_frequency.h" #include <cmath> using ::testing::Invoke; namespace L0 { na...
15,190
5,296
#ifndef FOR_EACH_HPP_INCLUDED_DSPOJSADLK111111111111111111111983UY4KAJSLFLKJFDIF #define FOR_EACH_HPP_INCLUDED_DSPOJSADLK111111111111111111111983UY4KAJSLFLKJFDIF #include "../includes.hpp" #include "./range.hpp" #include "./parallel.hpp" namespace ceras { namespace// anonymous namespace { template < ...
3,411
1,085
#ifndef SDB_EXCEPTIONS_HPP #define SDB_EXCEPTIONS_HPP #include <stdexcept> namespace SDB { class SdbException : public std::runtime_error { public: explicit SdbException(const std::string& msg) : std::runtime_error(msg) {} }; } // namespace SDB #endif
261
96
/* Interface that implements an exception throwing write method. */ #pragma once #include "interfaces.hpp" class WriteOnly : public ReadInterface { public: WriteOnly() : ReadInterface() { } ReadReturn read(void) override; };
246
70
// // Created by wei on 5/22/18. // #include "common/ConfigParser.h" #include "core/warp_solver/RigidSolver.h" #include <Eigen/Eigen> surfelwarp::RigidSolver::RigidSolver() { //Init the intrisic for projection const auto& config = ConfigParser::Instance(); m_project_intrinsic = config.rgb_intrinsic_clip(); m_ima...
2,225
935
//--------------------------------------------------------------------------- #include <vcl.h> #include <FileCtrl.hpp> #pragma hdrstop #include "rtklib.h" #include "refdlg.h" #include "svroptdlg.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resourc...
5,499
2,084
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/android/signin/signin_bridge.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "base/androi...
1,561
475
/* * Copyright 2015 David A. Boyuka II * * 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,574
552
#ifndef GENERATOR_POLAR_SYS_ #define GENERATOR_POLAR_SYS_ #include <map> #include <vector> #include <mipp.h> #include <aff3ct.hpp> #include "../Generator.hpp" namespace aff3ct { namespace generator { class Generator_polar : public Generator { protected: const int K; // k bits input const int N; // n bits input co...
3,554
1,132
/// /// Host Implementation /// /// Molecular Dynamics Simulation on GPU /// /// Written by Vadim Kuras. 2009-2010. /// #include "Host.h" /// /// Simulation main host function /// int hostMain(CUdevice device, char * module_path, configuration * config) { real4 * posArray; //positions (host) real3 ...
33,982
14,485
#include <rthw.h> #include <rtthread.h> #include <rtdevice.h> #include <U8g2lib.h> // You may reference Drivers/drv_gpio.c for pinout // In u8x8.h #define U8X8_USE_PINS #define ST7920_8080_PIN_D0 36 // PB15 #define ST7920_8080_PIN_D1 35 // PB14 #define ST7920_8080_PIN_D2 ...
2,351
1,030
// 4ms, beat 94% class Solution { private: int helper(const vector<int> &num, int low, int high) { if(low == high) return low; int mid = (low + high)/2; int nxt = mid + 1; if(num[mid] > num[nxt]) { return helper(num, low, mid); } else { ...
653
212
#include "../datas/binwritter.hpp" #include "../datas/binreader.hpp" #include <sstream> struct BinStr00 { int8 v0; bool v1; int16 v2; uint32 v3; }; struct BinStr00_Fc : BinStr00 { void Read(BinReaderRef rd) { rd.Read(v0); rd.Read(v3); } void Write(BinWritterRef wr) const { wr.Write(v0); ...
3,474
1,988
// Copyright 2018 The Chromium OS 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/macros.h> #include <gmock/gmock.h> #include <gtest/gtest.h> #include <metrics/metrics_library_mock.h> #include "biod/biod_metrics.h" u...
3,694
1,370
#include "Blech.h" #define CheckOne(ID) \ if (nevent != 1) { \ printf("bad event count %d != 1\n", nevent); \ exit(1); \ } \ if (eventarray[0].id != ID) { \ printf("bad event %d != " #ID "\n", eventarray[0].id); \ exit(1); \ } struct { int id, nvalues; char name...
12,243
5,512
////////////////////////////////////////////////////////////////// // (c) Copyright 2007- by Jeongnim Kim ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // National Center for Supercomputing Applications & // Materials Computati...
10,904
4,248
#include "CaloTowersCreationAlgo.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" #include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" #include "Geometry/CaloGeometr...
72,627
25,327
// // This source file is part of appleseed. // Visit http://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited // Copyright (c) 2014-2017 Francois Beaune, The appleseedhq Organization // ...
3,770
1,341
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/invalidation/fake_invalidation_state_tracker.h" #include "base/bind.h" #include "base/callback.h" #include "base/location.h" #includ...
1,482
483
#include "tables.hpp" using namespace std; using namespace eosio; CONTRACT site : public contract { public: using contract::contract; #define errorTableKey "There is no entry with this key." #define errorOldNotMatch "Old reffered transaction doesn't match the last reffered transaction." #define er...
4,080
1,171
/*========================================================================= medInria Copyright (c) INRIA 2013 - 2014. All rights reserved. See LICENSE.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE...
1,716
571
/* Source code for computing ultrametric contour maps based on average boundary strength, as described in : P. Arbelaez, M. Maire, C. Fowlkes, and J. Malik. From contours to regions: An empirical evaluation. In CVPR, 2009. Pablo Arbelaez <arbelaez@eecs.berkeley.edu> March 2009. */ #include <stdio.h> #include <stdlib...
11,413
4,356
#ifndef BIT_MATH_DETAIL_GEOMETRY_POINT_POINT2_INL #define BIT_MATH_DETAIL_GEOMETRY_POINT_POINT2_INL //---------------------------------------------------------------------------- // Constructors //---------------------------------------------------------------------------- inline constexpr bit::math::point2::point2()...
6,099
1,866
/* ==================== Uniforms ==================== */ #include "lgl/Base.h" #include <cmath> float vertices[] = { 0.5f, 0.5f, 0.0f, // top right 0.5f, -0.5f, 0.0f, // bottom right -0.5f, -0.5f, 0.0f, // bottom left -0.5f, 0.5f, 0.0f // top left }; unsigned int indices[] = {...
3,822
1,297
// // Copyright (c) 2015, J2 Innovations // Copyright (c) 2012 Brian Frank // Licensed under the Academic Free License version 3.0 // History: // 28 Aug 2014 Radu Racariu<radur@2inn.com> Ported to C++ // 06 Jun 2011 Brian Frank Creation // #include "col.hpp" #include "str.hpp" #include "dict.hpp" //////////////...
1,214
373
#pragma once /* BSD 3-Clause License Copyright (c) 2017, Alibaba Cloud 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 li...
2,511
983
#include <Arduino.h> #include <ArduinoJson.h> #include <Wire.h> #include <Ticker.h> #include <Button2.h> #include "Config.h" #include "vorratConfig.h" #include "myTimer.h" #include "wifiman.h" #include "Logger.h" #include "hch_stuff.h" #include "ePaperBWR.h" #include "lilygo.h" #include "ota.h" #include "deep_sleep_he...
9,581
3,937
#include <iostream> using namespace std; int main(){ double input; cin >> input; double table[275]; table[0] = 0.5; int index = 0; while (input != 0){ int i = 0; while (1){ //while condition not working? if (input < table[i]){ //i++ not working? ...
633
201
/*! * Copyright (c) 2020 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for * license information. */ #ifndef LIGHTGBM_TREELEARNER_COL_SAMPLER_HPP_ #define LIGHTGBM_TREELEARNER_COL_SAMPLER_HPP_ #include <LightGBM/dataset.h> #include <LightGBM/meta...
7,799
2,625
#include "caffe2/operators/given_tensor_fill_op.h" namespace caffe2 { REGISTER_CPU_OPERATOR(GivenTensorFill, GivenTensorFillOp<float, CPUContext>); REGISTER_CPU_OPERATOR(GivenTensorBoolFill, GivenTensorFillOp<bool, CPUContext>); REGISTER_CPU_OPERATOR(GivenTensorIntFill, GivenTensorFillOp<int, CPUContext>); REGISTER_C...
1,448
613
/* Copyright 2010-2019 Kristian Duske Copyright 2015-2019 Eric Wasylishen 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, ...
7,058
3,159
// Problem 1: A Whole New Word // Idea: Brute Force (just generating all strings of given characters, return the first generated string that is not found in the dictionary) #include <bits/stdc++.h> using namespace std; const int MAX_N = 1e5 + 5; const int MAX_L = 20; // ~ Log N const long long MOD = 1e9 + 7; const l...
1,421
560
#define CATCH_CONFIG_ENABLE_BENCHMARKING #include <catch2/catch.hpp> #include <fstream> #include <iostream> #include <math/fraction.hpp> #include <parser/dice.hpp> #include <parser/math.hpp> #include <parser/math_function.hpp> #include <parser/regex.hpp> SCENARIO("Regex parse tree") { GIVEN("A regex parser and ...
5,021
1,509
#include <iostream> #include <seqan3/alphabet/nucleotide/dna4.hpp> #include <seqan3/alignment/matrix/debug_matrix.hpp> #include <seqan3/core/debug_stream.hpp> #include <seqan3/range/views/to_char.hpp> int main() { // using namespace seqan3; using seqan3::detail::debug_matrix; using seqan3::operator""_dna4...
1,788
698
#include "sort.h" #include "reorder_bins.h" #include <catboost/cuda/cuda_lib/cuda_buffer.h> #include <catboost/cuda/cuda_lib/cuda_kernel_buffer.h> #include <catboost/cuda/cuda_lib/kernel.h> #include <catboost/cuda/cuda_util/kernel/sort.cuh> #include <catboost/cuda/cuda_util/kernel/transform.cuh> #include <catboost/lib...
21,876
8,122
#include "ControlsWidget.h" #include "ui_ControlsWidget.h" #include <QGroupBox> #include <QKeySequenceEdit> #include <QLabel> ControlsWidget::ControlsWidget(const QString& platform, QWidget* parent) : QDialog(parent) , m_ui(new Ui::ControlsWidget) { m_ui->setupUi(this); m_ui->platform->setTitle(platform); m_sect...
2,266
869
/* @migen@ */ /* * --------------------------------- START OF LICENSE ---------------------------- * * MySQL cimprov ver. 1.0 * * Copyright (c) Microsoft Corporation * * All rights reserved. * * MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software...
21,074
6,418
/* Copyright (c) 2014 Aerys 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, publish, distribute, sublicens...
4,479
2,518
#pragma once #include <algorithm> #include <cstdint> #include <functional> #include <RED4ext/Common.hpp> #include <RED4ext/DynArray.hpp> #include <RED4ext/REDfunc.hpp> namespace RED4ext { struct IMemoryAllocator; template<typename K, typename T, class Compare = std::less<K>> struct Map { enum class Flags : int3...
4,897
1,758
#pragma once #include <SFML/Graphics/Font.hpp> #include <SFML/Graphics/RenderWindow.hpp> #include <memory> #include <vector> #include "Layers/Layer.hpp" #include "Player.hpp" class Game { public: Game(); ~Game(); void run(); void push_layer(std::unique_ptr<Layer> layer); template <typename La...
788
275
/// /// @file PropertyExpr.h /// @brief header file of PropertyExpr /// @author Dohyun YUn /// @date 2008-12-10 /// #include "PropertyTermInfo.h" #include <glog/logging.h> using namespace std; namespace sf1r { PropertyTermInfo::PropertyTermInfo(void) : isWildCardQuery_(false) { } // end - PropertyTermIn...
7,548
2,162
#pragma once #ifdef IMPL_USING_MFC typedef class CSyncObject cclSyncObject; typedef class CSingleLock cclSingleLock; typedef class CMutex cclMutex; typedef class CCriticalSection cclCriticalSection; typedef class CEvent cclEvent; #else class _CCL_API cclMutex : public cclSyncObject { public: c...
1,929
869
#include <server_lib/network/scope_runner.h> #include <server_lib/asserts.h> namespace server_lib { namespace network { std::unique_ptr<scope_runner::shared_lock> scope_runner::continue_lock() { long expected = count; while (expected >= 0 && !count.compare_exchange_weak(expected, expected + 1...
811
242
//===----------------------------------------------------------------------===// // // 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 // //===---------------------------...
698
217
/* This file belongs to Ashes. See LICENSE file in root folder */ #include <math.h> #include "util/Vectorisation.hpp" namespace utils { template< typename T > QuaternionT< T >::QuaternionT( NoInit const & )noexcept { } template< typename T > constexpr QuaternionT< T >::QuaternionT()noexcept : x{} , y{} ,...
8,586
4,090
//************************************************** // \file ATLHECTBPrimaryGeneratorAction.hh // \brief: Definition of ATLHECTBPrimaryGeneratorAction class // \author: Lorenzo Pezzotti (CERN EP-SFT-sim) @lopezzot // \start date: 11 May 2021 //************************************************** //Prevent including hea...
993
296
#include <iostream> #include <unordered_map> enum Direction { North, South, East, West }; class MapSite { public: virtual void Enter() = 0; }; class Room : public MapSite { public: Room(unsigned int number) : _number(number) { } MapSite* GetSide(Direction direction) const { ...
2,609
848
/* MANGO Multimedia Development Platform Copyright (C) 2012-2016 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <algorithm> #include <mango/filesystem/path.hpp> namespace mango { // ----------------------------------------------------------------- // Path // -------------------------...
1,209
380
#ifndef TIMER_H #define TIMER_H #include <string> #include <iostream> class Timer { protected: time_t start_t; time_t current_t; double seconds_elapsed; public: Timer(); ~Timer(); virtual void restart(std::string text_p); virtual void print_seconds(std::string pretext_p, std::string post_text_p); };...
329
134
#include "stdhdr.h" #include "camplib.h" #include "mfd.h" #include "Graphics/Include/render2d.h" #include "dispcfg.h" #include "simdrive.h" #include "camp2sim.h" #include "hud.h" #include "aircrft.h" #include "fack.h" #include "otwdrive.h" //MI #include "cpmanager.h" //MI #include "icp.h" //MI #include "aircrft.h" //MI...
7,687
2,655
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04...
32,773
12,884
#include "ops.h" #include <iostream> using std::cin; using std::cout; int main() { int a; cout << "Enter first integer: "; cin >> a; int b; cout << "Enter second integer: "; cin >> b; cout << "Sum: " << add(a, b) << "\n"; cout << "Difference: " << subtract(a, b) << "\n"; cout << "Product: " << mul...
404
167
// Copyright 2019 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/window_mirror_view_pip.h" namespace ash { WindowMirrorViewPip::WindowMirrorViewPip(aura::Window* source, ...
642
225
/* Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> This file is part of the KDE project This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Publi...
2,274
783
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<vector> #define ri register int #define ll long long using namespace std; const int MAXN=1005; const int INF=0x7fffffff/2; struct point{int x,y;}; int map[MAXN][MAXN]; boo...
1,318
703
/**************************************************************************** ** Meta object code from reading C++ file 'ColourDialog.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.7) ** ** WARNING! All changes made in this file will be lost! ********************************************************...
3,990
1,546
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2016-2017. 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 the root directory of...
9,091
3,434
//----------------------------------------------------------------------------- // Name: derivdlg.cpp // Purpose: XML resources sample: A derived dialog // Author: Robert O'Connor (rob@medicalmnemonics.com), Vaclav Slavik // Copyright: (c) Robert O'Connor and Vaclav Slavik // Licence: wxWindows li...
4,577
1,164
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: System.Net.SimpleAsyncResult...
6,103
2,091
/** * @file port.cpp * @brief Port implementation * @author Matúš Liščinský xlisci02, Marcin Vladimír xmarci10 */ #include "port.h" /** * @brief Port constructor */ Port::Port() { this->connected_to=NULL; } /** * @brief Instert complex number to map * @param real real part of complex number ...
2,178
714
/* NOTE - eventually this file will be automatically updated using a Perl script that understand * the naming of test case files, functions, and namespaces. */ #include <time.h> /* for time() */ #include <stdlib.h> /* for srand() */ #include "std_testcase.h" #include "testcases.h" int main(int argc, ch...
39,397
16,855
/** * 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...
2,196
764
#include "ItemRocket.h" ItemRocket::ItemRocket(int _x, int _y): x(_x), y(_y) { sprite = new cgf::Sprite(); sprite->load("data/img/rocket.png"); sprite->scale(1.2, 1.2); sf::Vector2f vpos = sf::Vector2f(); vpos.x = x; vpos.y = y; sprite->setPosition(vpos); } ItemRocket::~ItemRocket(){ ...
523
224
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <limits> #include <string.h> using namespace std; typedef long long int ll ; ll expmodulo(ll a, ll b, ll mod) { if(a == 0 || b == 0 || a < 0 || b < 0) return 0; else if(b == 0) return 1; else if(b == 1) return a % mod; else if(b&1) retu...
767
318
// Copyright (C) 2016 Elviss Strazdins // This file is part of the Ouzel engine. #include "ShaderOGL.h" #include "core/Engine.h" #include "RendererOGL.h" #include "files/FileSystem.h" #include "utils/Log.h" namespace ouzel { namespace graphics { ShaderOGL::ShaderOGL() { } Shad...
9,059
2,402
#include "Graphics/GL.h" #include "Common/Debug.h" #include "Graphics/MathGL.h" #include "Graphics/Shader.h" #include <GL/glew.h> #define NOMINMAX #include <fstream> #include <Shlwapi.h> #pragma comment(lib,"shlwapi.lib") namespace GL { void GLAPIENTRY ErrorCallback( GLenum source, GLenum type, GLuint id,...
1,446
640
#pragma once #include <iostream> #include <type_traits> #include <utility> namespace Unicy { template <typename Ty, typename = void> struct has_insertion_operator : std::false_type { }; template <typename Ty> struct has_insertion_operator< Ty, std::void_t<decltype(std::declval<std::ostream &>() << std::decl...
381
135
#if defined(_WIN32) || defined(_WIN64) || (defined(__CYGWIN__) && !defined(_WIN32)) // Windows uses a different system for path names. #include "..\includer.hpp" #else #include "../includer.hpp" #endif int main() { // Without fixed size. Queue<int, false> qu; for (int i = 0; i < 5; i++) { ...
718
272
#include <iostream> #include <iomanip> #include <cmath> #include <string> #include <algorithm> #include <random> #include <ctime> using namespace std; double rand_a_b(double a, double b) { static mt19937_64 gnr{ time(nullptr) }; static const size_t max_gnr = gnr.max(); return a + (b - a) * ( double(gnr()...
5,461
2,029
#include <memory> #include <gflags/gflags.h> #include "drake/lcm/drake_lcm.h" #include "drake/systems/lcm/lcm_driven_loop.h" #include "drake/systems/lcm/lcm_publisher_system.h" #include "drake/systems/lcm/lcm_subscriber_system.h" #include "drake/systems/analysis/simulator.h" #include "drake/systems/framework/diagram.h...
5,142
1,900
#include "CondCore/PopCon/interface/PopConAnalyzer.h" #include "CSCChamberMapHandler.h" #include "FWCore/Framework/interface/MakerMacros.h" typedef popcon::PopConAnalyzer<popcon::CSCChamberMapImpl> CSCChamberMapPopConAnalyzer; DEFINE_FWK_MODULE(CSCChamberMapPopConAnalyzer);
278
117
#include "userlist.h" #include "ui_userlist.h" #include "info.h" #include "addfriend.h" userlist::userlist(QWidget *parent) : QWidget(parent), ui(new Ui::userlist) { ui->setupUi(this); // sock = new QTcpSocket(this); // lists = ui -> listWidget; // person = new user(); // QListWidgetItem *itemN...
14,800
4,771
/*=================================================================== BlueBerry Platform 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 of MERCHANTABILITY o...
1,176
333
#pragma once #include <cstdint> #include <tuple> #include <vector> #include "capstone/capstone.h" std::tuple<cs_arch, cs_mode> map_triple_cs(uint32_t triple); std::vector<uint64_t> get_imm_vals(const cs_insn &insn, cs_arch arch, uint32_t base_reg, uint64_t reg_val); bool is_nop(cs_arch arch, cs_insn *insn); boo...
449
195
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/extensions/document_scan/document_scan_api.h" #include <utility> #include <vector> #include "base/base64.h" #include "...
4,999
1,560
/* ** EPITECH PROJECT, 2021 ** sound ** File description: ** soudn */ #include "Sound.hpp" Zic::Zic(float *volume, int play_time, std::string path) { _play_time = play_time; music = LoadMusicStream(path.c_str()); _volume = volume; } void Zic::play_music() { PlayMusicStream(music); SetMusicVolume(...
647
248
#include<iostream> #include<fstream> #include<string> std::string batteryStatus[] = {"", "", "", "", ""}; int main (int argc, char ** argv) { if (argc != 3) exit(1); // Load percentage. std::string line; std::ifstream f(*(argv + 1)); std::getline(f, line); f.close(); std::c...
732
284
/* *********************************************************************************************************************** * * Copyright (c) 2021-2021 Advanced Micro Devices, Inc. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associ...
13,350
3,740
// define must ahead #include <M5Stack.h> // #define M5STACK_MPU6886 #define M5STACK_MPU9250 // #define M5STACK_MPU6050 // #define M5STACK_200Q #include <M5Stack.h> float accX = 0.0F; float accY = 0.0F; float accZ = 0.0F; float gyroX = 0.0F; float gyroY = 0.0F; float gyroZ = 0.0F; float pitch = 0.0F; float roll = 0...
1,593
779
// Copyright 2018 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/connectivity/overnet/deprecated/lib/packet_protocol/aead_codec.h" #include <random> #include "gtest/gtest.h" namespace overnet { namespace...
2,456
1,037
// Copyright (c) 2018 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
3,813
1,248
/* Copyright 2019 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...
12,962
4,571
////////////////////////////////////////////////////////////////////////////////////////////////////// /* 文件 : PhantomAction.cpp 幻影游戏引擎, 2009-2016, Phantom Game Engine, http://www.aixspace.com Design Writer : 赵德贤 Dexian Zhao Email: yuzhou_995@hotmail.com Copyright 2009-2016 Zhao Dexian -------------------...
874
275
/* * Copyright (c) 2018, Arm Limited and affiliates. * SPDX-License-Identifier: Apache-2.0 * * 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/LICEN...
30,019
10,422
#include <lem/solarix/LA_WordEntrySet.h> #include <lem/solarix/word_form.h> #include <lem/solarix/WordSetChecker.h> using namespace Solarix; WordSetChecker::WordSetChecker() : set_type(UNKNOWN), positive(false) {} WordSetChecker::WordSetChecker(int type, const lem::UCString &Setname, bool Positiv...
2,782
1,049
#pragma once #include <algorithm> #include <string_view> #include <cstdio> #include <cstdint> #include <cstdarg> class StringFormer { public: StringFormer(StringFormer&&) = delete; StringFormer(StringFormer const&) = delete; StringFormer& operator=(StringFormer&&) = delete; Strin...
1,772
667
// // Name: frame.cpp // Purpose: The frame class for the Content Manager. // // Copyright (c) 2001-2011 Virtual Terrain Project // Free for all uses, see license.txt for details. // // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/wx.h" #endif #...
34,676
14,227
#include "SDL2Caches.hpp" #include "NE_StringUtils.hpp" FontTextureCacheKey::FontTextureCacheKey (const std::wstring& text, const NUIE::ColorCacheKey& color, int size) : text (text), color (color), size (size) { } bool FontTextureCacheKey::operator== (const FontTextureCacheKey& rhs) const { return text == rhs.te...
1,521
535
#include "Day23-CrabCups.h" #include "CupMixer.h" #include <AdventOfCodeCommon/DisableLibraryWarningsMacros.h> __BEGIN_LIBRARIES_DISABLE_WARNINGS #include <vector> #include <algorithm> #include <numeric> __END_LIBRARIES_DISABLE_WARNINGS namespace { size_t MANY_CUPS_NUMBER = 1'000'000; } namespace AdventOfCode { ...
2,308
835
// Copyright 2016 The SwiftShader 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 b...
52,967
26,083