text
string
size
int64
token_count
int64
/* * Copyright 2016-2020 Christian Lockley * * 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...
2,910
1,084
#include "test/engine/TestSystems.h" #include "engine/system/Entity.h" #include "engine/system/EntityManager.h" #include "engine/utility/Debug.h" namespace { //############################################################################ void TestEntityManagerSingleComponent(void) { EntityManager<float> entM...
7,285
2,572
#ifndef CGIROOT_HPP #define CGIROOT_HPP #include <string> #include <Wt/WAnchor> #include <Wt/WApplication> #include <Wt/WButtonGroup> #include <Wt/WComboBox> #include <Wt/WContainerWidget> #include <Wt/WDialog> #include <Wt/WEnvironment> #include <Wt/WFileUpload> #include <Wt/WFormWidget> #include <Wt/WImage> #inclu...
23,952
9,269
// SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: 2019-2022 Second State INC #include "executor/executor.h" #include <array> #include <cstdint> #include <cstring> namespace WasmEdge { namespace Executor { Expect<void> Executor::runExpression(Runtime::StoreManager &StoreMgr, ...
62,201
24,510
/* * Copyright (C) 2012 Open Source Robotics Foundation * * 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 appl...
3,698
1,133
#include "stdafx.h" #pragma hdrstop #ifdef DEBUG #include "PHDebug.h" #endif #include "alife_space.h" #include "Hit.h" #include "PHDestroyable.h" #include "Car.h" #include "Actor.h" #include "script_entity_action.h" #include "../xrEngine/xr_level_controller.h" #include "../xrEngine/CameraBase.h" #include "../Include/xr...
7,464
3,474
#include "ba.hpp" static mat2_t J_intrinsics(const mat3_t &K) { // J = [K[0, 0], 0.0, // 0.0, K[1, 1]]; mat2_t J = zeros(2, 2); J(0, 0) = K(0, 0); J(1, 1) = K(1, 1); return J; } static matx_t J_project(const vec3_t &p_C) { const real_t x = p_C(0); const real_t y = p_C(1); const real_t z = p_C(2...
9,970
4,372
// Fortnite (1.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "../SDK.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------------------- // Function ItemManagementEquipSlot.Item...
9,808
3,002
/*----------------------------------------------------------------------------- * This file is part of the Colony.Core Project. The Colony.Core Project is an * open source project with a BSD type of licensing agreement. See the license * agreement (license.txt) in the top/ directory or on the Internet at * http://int...
4,159
1,404
/* * Copyright (c) 2012-2021 Devin Smith <devin@devinsmith.net> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS I...
16,033
5,744
#include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: vector<vector<int>> pathSum(TreeNode* root, int sum) { vector<vector<int> > ans; ...
1,708
584
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2008 INRIA * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed...
15,215
5,622
/* * This file is part of ACADO Toolkit. * * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau, * Milan Vukov, Rien Quirynen, KU Leuven. * Developed within the Optimization in Engineering Center (OPTEC) * u...
6,270
2,314
/** 🍪 thew6rst 🍪 12.02.2021 10:45:31 **/ #ifdef W #include "k_II.h" #else #include <bits/stdc++.h> using namespace std; #endif #define pb emplace_back #define all(x) x.begin(), x.end() #define sz(x) static_cast<int32_t>(x.size()) template<class T> class Y { T f; public: templa...
1,464
670
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/reporting/reporting_header_parser.h" #include <sstream> #include <string> #include <vector> #include "base/bind.h" #include "base/json/jso...
78,997
24,992
/** * \file * \copyright * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * */ #include "FemConditionModel.h" #include ...
3,693
1,199
/** * 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...
1,723
534
#define CATCH_CONFIG_RUNNER #include <catch2/catch.hpp> #include <Nazara/Audio/Audio.hpp> #include <Nazara/Core/Log.hpp> #include <Nazara/Core/AbstractLogger.hpp> #include <Nazara/Core/Modules.hpp> #include <Nazara/Network/Network.hpp> #include <Nazara/Physics2D/Physics2D.hpp> #include <Nazara/Utility/Utility.hpp> in...
471
202
#include <iostream> //import input output using namespace std; //mengguanakan file fungsi std int main() //fungsi { double x, y; //deklarasi variable menggunakan tipe data double cout << "Masukkan x: "; //cetak ke layar monitor x cin >> x; //inputan kemudian di simpan di variable x cout...
589
209
#include "../../CK2ToEU4/Source/Mappers/PrimaryTagMapper/PrimaryTagMapper.h" #include "gtest/gtest.h" #include <sstream> TEST(Mappers_PrimaryTagMapperTests, CultureTagsDefaultToEmpty) { std::stringstream input; const mappers::PrimaryTagMapper tagMapper(input); ASSERT_TRUE(tagMapper.getCultureTags().empty()); } T...
1,771
607
//===-- DataBufferMemoryMap.cpp ---------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
11,805
3,412
#include "../include/dispatcher.h" //Funcao de ordenacao para o vetor de processos bool ordena (Processo *proc1, Processo *proc2){ return (proc1->getTempoInicializacao() < proc2->getTempoInicializacao()); } Dispatcher::Dispatcher(vector< Processo* > processosArquivo, Disco *discoArquivo){ tempo_atual = 0; //Atr...
2,716
934
/* * Copyright 2021 Assured Information Security, 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 a...
10,123
3,063
#include <cstdio> #include <cstring> char PROG[] = "cbarn"; #include <algorithm> using namespace std; int n; long long x, c[1000]; long long squaresum(long long begin, long long end) { return (end * (end + 1) * (2 * end + 1) - (begin - 1) * begin * (2 * begin - 1)) / 6; } long long endat(int i) { return x + c[i] ...
1,061
500
// Boost.TypeErasure library // // Copyright 2011-2012 Steven Watanabe // // Distributed under the Boost Software License Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // $Id$ #if !defined(BOOST_PP_IS_ITERATING) #ifndef BOOST_TYPE_ERASURE_TUPLE_HPP_INCLU...
17,204
6,064
/* * OpenSplice DDS * * This software and documentation are Copyright 2006 to TO_YEAR PrismTech * Limited, its affiliated companies and licensors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complianc...
5,419
1,874
#include "netcdf/lpm_netcdf.hpp" #ifdef LPM_USE_NETCDF #include "util/lpm_string_util.hpp" #include <sstream> namespace Lpm { template <typename Geo> void NcWriter<Geo>::open() { int retval = nc_create(fname.c_str(), NC_NETCDF4 | NC_CLOBBER, &ncid); CHECK_NCERR(retval); text_att_type att = std::make_pair("LPM"...
25,506
11,143
/* * Copyright 2010-2017 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 "license" fil...
59,736
17,499
/*=================================================================== 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 or FITNESS...
4,784
1,435
/* * * Copyright 2013 Netflix, 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 ap...
10,958
3,925
// // Horista.hpp // PolimorfismoEmpregados // // Created by Vini Cassol on 29/05/20. // Copyright © 2020 Vini Cassol. All rights reserved. // #ifndef Horista_hpp #define Horista_hpp #include "Empregado.hpp" class Horista : public Empregado { public: Horista(); double vencimento(); private: ...
398
163
#include <benchmark/benchmark.h> #include "simdjson.h" using namespace simdjson; using namespace benchmark; using namespace std; const padded_string EMPTY_ARRAY("[]", 2); SIMDJSON_PUSH_DISABLE_WARNINGS SIMDJSON_DISABLE_DEPRECATED_WARNING static void json_parse(State& state) { ParsedJson pj; if (!pj.allocate_capac...
1,929
749
//============================================================================================================= /** * @file hpifit.cpp * @author Lorenz Esch <Lorenz.Esch@tu-ilmenau.de>; * Matti Hamalainen <msh@nmr.mgh.harvard.edu> * @version 1.0 * @date March, 2017 * * @section LICENSE * * Copyrig...
32,725
11,315
#pragma once #include <stdint.h> #include <stddef.h> #include "Colors.hpp" #define UNREFERENCED_PARAMETER(name) do { (void)(name); } while (0) namespace Tex { //------------------------------------------------------------------------------------- // Constants //------------------------------------------------------...
2,792
1,065
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 DiMS dev-team // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcserver.h" #include "rpcclient.h" ...
5,669
2,390
/*! * @brief Simple camera program with OpenCV * @author <+AUTHOR+> * @date <+DATE+> * @file <+FILE+> * @version 0.1 */ #include <iostream> #include <opencv/cv.h> #include <opencv/highgui.h> /*! * @brief Entry point of the program * @param [in] argc A number of command-line arguments * @param [in] ar...
919
368
#ifndef MITAMA_MANA_FUNCTIONAL_CHUNKIFY_HPP #define MITAMA_MANA_FUNCTIONAL_CHUNKIFY_HPP #include <mitama/mana/algorithm/chunk.hpp> #include <mitama/mana/algorithm/klisli.hpp> #include <mitama/mana/utility/apply.hpp> #include <mitama/mana/utility/peel.hpp> #include <mitama/mana/type_traits/is_tuple_like.hpp> #include <...
2,922
1,073
#include<iostream> using namespace std; bool isChildString(char* parent,char* child) { int j = -1; int i = 0; for(; child[i] != '\0';i++) { if(j != -1 && parent[j] == '\0') break; for(;parent[j] != '\0';) { j++; if(parent[j] == child[i]) ...
757
321
#include <bits/stdc++.h> #include "Time.cpp" using namespace std; int main() { Time t1; t1.setHour(3); t1.setMinutes(34); t1.setSeconds(54); Time t2; t2.setHour(2); t2.setMinutes(24); t2.setSeconds(35); Time t3; t3 = t1.add(t2); t1.print(); t2.print(); t3.pri...
385
186
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2019-2020 FIRST. 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...
8,876
4,212
/***************************************************************************** Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Founda...
70,728
29,295
/************************************************************************* * * Lavabo *__________________ * * Program.ViewDisplay2D_3D.cpp * * Clement Berthaud - Layl * Please refer to LICENSE.TXT */ #include "Program.ViewDisplay2D_3D.h" #include <QGraphicsItem> #include <QGraphicsProxyWidget> #include "ViewDisp...
2,868
866
// Copyright (c) 2012-2014 Plenluno All rights reserved. #include <libnode/buffer.h> #include <libnode/detail/buffer.h> namespace libj { namespace node { Buffer::Ptr Buffer::create(Size length) { return Ptr(new detail::Buffer<Buffer>(length)); } Buffer::Ptr Buffer::create(const void* data, Size length) { if...
2,592
852
#include <AK/JsonArray.h> #include <AK/JsonObject.h> #include <AK/JsonValue.h> #include <LibCore/CFile.h> #include <LibCore/CProcessStatisticsReader.h> #include <pwd.h> #include <stdio.h> HashMap<uid_t, String> CProcessStatisticsReader::s_usernames; HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all...
1,977
670
// Copyright (c) 2012 The Chromium Embedded Framework 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 "tests/unittests/test_util.h" #include "testing/gtest/include/gtest/gtest.h" void TestBinaryEqual(CefRefPtr<CefBinaryVa...
3,698
1,402
#include "manager.hpp" #include <chrono> #include <iostream> #include <memory> #include <opencv2/opencv.hpp> #include <vector> int main(int argc, char **argv) { cv::Mat frame = cv::imread(argv[1]); manager *tm = new manager(); int image_w = frame.cols; int image_h = frame.rows; cv::Mat origin; frame.copyTo...
1,658
726
// Copyright 2015-2018 RWTH Aachen University // // 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,678
463
/* * Copyright (c) 2016 Shanghai Jiao Tong University. * 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....
1,349
454
/* Copyright 2016 Massachusetts Institute of Technology 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...
11,131
4,737
#pragma once #include "../Utils/event.hpp" #include "MpPacketSerializer.hpp" namespace MultiplayerCore::Networking { struct MpNetworkingEvents { static event<Networking::MpPacketSerializer*> RegisterPackets; }; }
233
74
// Copyright 2022 PingCAP, Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
2,069
594
#define CATCH_CONFIG_MAIN #include "catch2/catch.hpp" #include "libtorus.hpp" Torus<int> IntTorus(unsigned int x, unsigned int y) { return Torus<int>(x, y); } TEST_CASE( "Torus need make sense", "[torus]") { REQUIRE( IntTorus(1,1).get_x() == 0); }
259
110
#include "core/queues.hpp" #include <chrono> #include <thread> #include <iostream> void client(abstract_queue<int>* queue, long& counter, bool is_provider, int sleep_milliseconds=100); void test_queue(abstract_queue<int>*q, const int num_providers, const size_t num_consumers); int main(int /*argc*/, char** /*argv*/...
2,115
748
#include<bits/stdc++.h> using namespace std; #include <iostream> // for std::cout #include <utility> // for std::pair #include <algorithm> // for std::for_each #include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/adjac...
2,309
863
/* CH08-320142 Problem 1.2.cpp Digdarshan Kunwar d.kunwar@jacobs-university.de */ #include <iostream> #include <string> using namespace std; int main (int argc, char** argv){ int nr; float val; string s; cin >> nr; cin >> val; cin.get(); getline(cin,s); for (int i=0;i<nr;i++){ ...
381
164
//////////////////////////////////////////////////////////// // Nero Game Engine // Copyright (c) 2016-2020 Sanou A. K. Landry //////////////////////////////////////////////////////////// ///////////////////////////HEADERS////////////////////////// //NERO #include <Nero/core/cpp/scene/SceneUtility.h> //////////////////...
7,232
1,999
/* Sirikata Input Plugin -- plugins/input * SDLInputDevice.cpp * * Copyright (c) 2009, Patrick Reiter Horn * 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...
16,835
6,238
#include <opencv/highgui.h> #include <opencv2/opencv.hpp> #include <iostream> #include <string> #include <sstream> using namespace cv; using namespace std; int main() { auto cap = VideoCapture( "../Documents/drop.avi" ); auto frame_counter = 0; // не всегда можно получить cout << "fps:" << cap.get( CV_CAP_PRO...
1,114
486
#include <iostream> #define maxn 101 int main() { int n, m; int a[maxn]; std::cin >> n >> m; for (int i = 0; i < n; ++i) { std::cin >> a[i]; } m = m % n; if (m == 0) { std::cout << a[0]; for (int i = 1; i < n; ++i) { std::cout << " " << a[i]; }...
538
224
#include "mainwindow.h" #include "qfindedit.h" #include "ui_mainwindow.h" #include <QHBoxLayout> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QFindEdit* edit = new QFindEdit(this); QHBoxLayout *pLayout = new QHBoxLayout(this); pLa...
432
162
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "napitest.h" #define Init test_number_init #include "js-native-api/test_number/test_number.c" using namespace napitest; TEST_P(NapiTest, test_number) { ExecuteNapi([](NapiTestContext *testContext, napi_env env) { testContext->...
513
178
#include <iostream> using namespace std; void insert_sort(int a[], int n){ int temp, k; for (int i = 1; i < n; i++){ k = i; temp = a[k]; for (int j = i - 1; j >= 0; j--){ if (a[j] > temp){ a[k] = a[j]; k--; } } a[k] ...
540
220
#include <boost/spirit/home/karma/action/action.hpp>
53
21
#include "Body.h" #include "WebPage.h" #include "WebPageManager.h" Body::Body(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) { } void Body::start() { QString result = page()->currentFrame()->toHtml(); emit finished(new Response(true, result)); }
315
100
// 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 "AttributesBase.h" namespace esp { namespace metadata { namespace attributes { const std::map<std::string, ObjectInstanceShaderType...
2,413
675
//------------------------------------------------------------------------------ // \file Token_tests.cpp //------------------------------------------------------------------------------ #include "DeskCalculator/Token.h" #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(DeskCalculator) BOOST_AUTO_TEST_SUITE(T...
653
176
// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fms-extensions -fdump-record-layouts -fsyntax-only %s 2>/dev/null \ // RUN: | FileCheck %s --strict-whitespace // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fms-extensions -fdump-record-layouts -fsyntax-only %s 2>/dev...
17,083
7,574
#pragma once #include "common/types.hh" #include "common/utf8/rune.hh" #include "common/hex_formatter.hh" #include <vector> #include <string> #include <iostream> #include <tuple> #include <fstream> template <typename T> std::vector<T> slice(std::vector<T>& v, std::size_t low, std::size_t high = -1) { std::vector<...
2,220
734
//<Snippet1> #using <System.dll> #using <System.Windows.Forms.dll> #using <System.Drawing.dll> using namespace System; using namespace System::Drawing; using namespace System::Windows::Forms; public ref class ListViewInsertionMarkExample: public Form { private: ListView^ myListView; public: //<Snippet2> L...
5,531
1,579
#include "estacaocarregamento.h" /*=============================================== Construtores ===============================================*/ EstacaoCarregamento::EstacaoCarregamento() { tempoMinimoFila = Relogio(); tempoMaximoFila = Relogio(); minimoEntidadesNaFila = 0; maximoEntidadesNaFil...
6,326
2,308
/* * Copyright (c) 2020 Inria * Copyright (c) 2016 Georgia Institute of Technology * Copyright (c) 2008 Princeton University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: redistributio...
5,662
1,965
/* Programa: cadastro02 Arquivo: cadastro02.cpp */ #include <iostream> #include "parametros.h" using namespace std; struct Pessoa { string nome; int idade; char sexo; } ; int main() { Pessoa cadastro[N]; int x; // Variável de controle for ( x = 0; x < N ; x++) { cout << "Digite ...
718
274
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
25,528
9,014
/* * Copyright (c) 2014-2020, Ilya Kotov <forkotov02@ya.ru> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of condi...
7,863
2,644
//========================================================================= // Copyright (C) 2012 The Elastos 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 // // ...
25,820
7,888
/*++ Copyright (c) 1991-2001 Microsoft Corporation Module Name: fatsachk.cxx --*/ #include <pch.cxx> #include "bitvect.hxx" #include "error.hxx" #include "rtmsg.h" #include "ifsentry.hxx" // Timeinfo is full of windows stuff. #if !defined( _AUTOCHECK_ ) && !defined( _SETUP_LOADER_ ) && !def...
144,164
45,745
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/ui/scenic/lib/scheduling/delegating_frame_scheduler.h" #include "src/lib/fxl/logging.h" #include "src/ui/scenic/lib/scheduling/id.h" namesp...
4,921
1,451
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
3,267
1,015
// This file is distributed under the BSD 3-Clause License. See LICENSE for details. #include <ctype.h> #include <algorithm> #include "eprp.hpp" void Eprp::eat_comments() { while (scan_is_token(Token_id_comment) && !scan_is_end()) scan_next(); } // rule_path = (\. | alnum | / | "asdad.." | \,)+ bool Eprp::rule_p...
7,992
3,068
#include <iostream> using namespace std; int a[6] = {[4] = 29, [2] = 15}; struct node { int data; node *next; node(int d) : data(d), next(NULL) {} }; int add_node(void *data) { node *n = (node *)data; cout << n->data << endl; return 0; } int main(int argc, char const *argv[]) { node *n1 = new nod...
449
214
#include <iostream> #include <fstream> #include "IntroScene.h" #include "Textures.h" #include "Utils.h" #include "Brick.h" #include "IntroGround.h" #include "Leaf.h" #include "MushRoom.h" #include "Goomba.h" #include "Koopas.h" using namespace std; CIntroScene::CIntroScene(int id, LPCWSTR filePath) : CScene(id, fil...
6,413
2,705
//////////////////////////////////////////////////////////////////////////////// // // Copyright 2013 - 2015, Göteborg Bit Factory. // // 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 witho...
10,153
4,626
/*++ Copyright (C) 2018 3MF Consortium All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the followi...
9,190
3,492
#include "action.h" Action::Action(QString name, QKeySequence shortcut, bool terminal) : m_name(name), m_shortcut(shortcut), m_terminal(terminal) {} QString Action::name() const { return m_name; } QKeySequence Action::shortcut() const { return m_shortcut; } bool Action::terminal() const { return m_terminal; }...
321
120
#include "souistd.h" #include "control/SListCtrl.h" #include <algorithm> #pragma warning(disable : 4267 4018) #define ITEM_MARGIN 4 namespace SOUI { ////////////////////////////////////////////////////////////////////////// // SListCtrl SListCtrl::SListCtrl() : m_nHeaderHeight(20) , m_nItemHeight(20) ,...
23,864
9,852
#include "controls/menu_controls.h" #include "DiabloUI/diabloui.h" #include "controls/remap_keyboard.h" #include "utils/sdl_compat.h" namespace devilution { MenuAction GetMenuAction(const SDL_Event &event) { if (event.type == SDL_KEYDOWN) { auto sym = event.key.keysym.sym; remap_keyboard_key(&sym); ...
1,325
603
// Copyright (C) 2017 Jérôme Leclercq // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_CONFIG_CHECK_CORE_HPP #define NAZARA_CONFIG_CHECK_CORE_HPP /// This file is used to check the constant values defin...
1,075
417
#include <shogun/lib/Hash.h> #include <stdio.h> using namespace shogun; int main(int argc, char** argv) { uint8_t array[4]={0,1,2,3}; printf("hash(0)=%0x\n", CHash::MurmurHash3(&array[0], 1, 0xDEADBEAF)); printf("hash(1)=%0x\n", CHash::MurmurHash3(&array[1], 1, 0xDEADBEAF)); printf("hash(2)=%0x\n", CHash::Murmu...
956
487
#include "IgnoresPage.hpp" #include "Application.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/ignores/IgnoreController.hpp" #include "controllers/ignores/IgnoreModel.hpp" #include "providers/twitch/TwitchAccount.hpp" #include "singletons/Settings.hpp" #include "util/LayoutCreator.hp...
4,279
1,283
/* MIT License Copyright (c) 2019 Zhehang Ding 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, ...
2,218
817
#include<iostream> using namespace std; int main() { int b[3][3]; int a [3] [3]={1,2,3,4,5,6,7,8,9}; for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { b[i][j]=a[2-i] [2-j]; } } for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { cout<<b[i][j]<<" "; } cout<<endl; ...
336
185
#include "keyboard.hpp" #include <algorithm> namespace town { Keyboard::KeyList Keyboard::_KeysUp; Keyboard::KeyList Keyboard::_KeysDown; bool Keyboard::isKeyPressed(sf::Keyboard::Key key) { return sf::Keyboard::isKeyPressed(key); } bool Keyboard::isKeyUp(sf::Keyboard::Key key) {...
851
301
#pragma once #include "../Name.hpp" #include <list> template<typename T> struct Ubpa::details::custom_type_name<std::list<T>> { static constexpr auto get() noexcept { return concat_seq( TSTR("std::list<{"), type_name<T>(), TStrC_of<'}', '>'>{} ); } };
270
119
#pragma once #include <QSet> #include <QPointer> #include <QAbstractItemModel> #include <QItemSelectionModel> #include <QPersistentModelIndex> class TreeViewModelAdaptor : public QAbstractItemModel { Q_OBJECT Q_PROPERTY(QAbstractItemModel* model READ model WRITE setModel NOTIFY modelChanged) Q_PROPERTY(QModelIndex...
5,032
1,638
// // test_esdhttp.hpp // EyeOfSauronDHTMonitor // // Created by shuaizhai on 4/25/16. // Copyright © 2016 com.dhtMonitor.www. All rights reserved. // #ifndef test_esdhttp_hpp #define test_esdhttp_hpp #include <stdio.h> #include "ESDHttpUtility.hpp" #include "ESDHttpProtocol.hpp" namespace test_esdhttp { ...
381
167
/* Copyright (C) 2011 James Coliz, Jr. <maniacbug@ymail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ #include "RF24Network_config.h" #if defined (RF24_LINUX) #include <s...
43,845
16,635
// Generated by Haxe 4.1.5 #include <hxcpp.h> #ifndef INCLUDED_Std #include <Std.h> #endif #ifndef INCLUDED_haxe_Exception #include <haxe/Exception.h> #endif #ifndef INCLUDED_haxe_IMap #include <haxe/IMap.h> #endif #ifndef INCLUDED_haxe_ds_StringMap #include <haxe/ds/StringMap.h> #endif #ifndef INCLUDED_haxe_io_Bytes ...
31,177
15,215
//===- ClassDefinitionDumper.cpp --------------------------------*- C++ -*-===// // // The LLVM37 Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-----------------------------------------------------...
6,521
2,197
#include <vtkActor.h> #include <vtkCellData.h> #include <vtkColorSeries.h> #include <vtkFloatArray.h> #include <vtkLookupTable.h> #include <vtkNamedColors.h> #include <vtkNew.h> #include <vtkPlaneSource.h> #include <vtkPolyData.h> #include <vtkPolyDataMapper.h> #include <vtkProperty.h> #include <vtkRenderWindow.h> #inc...
20,670
7,997
/* // Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a // component of the Texas A&M University System. // All rights reserved. // The information and source code contained herein is the exclusive // property of TEES and may not be disclosed, examined or reproduced // in whole or in part withou...
1,868
735