text
string
size
int64
token_count
int64
#include <bits/stdc++.h> #ifdef LOCAL #include "code/formatting.hpp" #else #define debug(...) (void)0 #endif using namespace std; static_assert(sizeof(int) == 4 && sizeof(long) == 8); using P = array<int, 2>; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); int N; cin >> N; vector<P> pts(N)...
968
389
// gf256.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #include "gf256.h" NAMESPACE_BEGIN(CryptoPP) GF256::Element GF256::Multiply(Element a, Element b) const { word result = 0, t = b; for (unsigned int i=0; i<8; i++) { result <<= 1; if (result & 0x100) result ^= m_m...
603
288
#include "utilities/Utilities.h" #include <NvCloth/Range.h> TEST_LEAK_FIXTURE(Range) TEST_F(Range, Constructor) { nv::cloth::Range<char> char_range; EXPECT_EQ(char_range.size(), 0); EXPECT_NULLPTR(char_range.begin()); EXPECT_NULLPTR(char_range.end()); nv::cloth::Range<char> a((char*)0x123, (char*)0x456); nv::cl...
3,822
1,625
#include "ftpretrcommand.h" #include <QFile> #include <QSslSocket> FtpRetrCommand::FtpRetrCommand(QObject *parent, const QString &fileName, qint64 seekTo) : FtpCommand(parent) { this->fileName = fileName; this->seekTo = seekTo; file = 0; } FtpRetrCommand::~FtpRetrCommand() { if (m_started) { ...
1,478
511
// // MailStreamTest.cpp // // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // and Contributors. // // SPDX-License-Identifier: BSL-1.0 // #include "MailStreamTest.h" #include "Poco/CppUnit/TestCaller.h" #include "Poco/CppUnit/TestSuite.h" #include "Poco/Net/MailStream.h" #include "Poco/Str...
2,292
1,080
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // onnxruntime dependencies #include <core/session/onnxruntime_c_api.h> #include <random> #include "command_args_parser.h" #include "performance_runner.h" #include <google/protobuf/stubs/common.h> using namespace onnxrunti...
2,335
818
/* * MIT License * * Copyright (c) 2019 Alexey Edelev <semlanik@gmail.com>, Tatyana Borisova <tanusshhka@mail.ru> * * This file is part of QtProtobuf project https://git.semlanik.org/semlanik/qtprotobuf * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and assoc...
17,985
5,178
// Copyright (C) 2020-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include <details/ie_exception.hpp> #include "arm_converter/arm_converter.hpp" #include <ngraph/runtime/reference/one_hot.hpp> namespace ArmPlugin { template <typename Indices, typename OutputType> void wrap_one_hot(const Indices* ar...
5,302
1,764
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
2,326
674
/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Tasks for .NET API reference when the project is build. Please check https:// Docs.nuget.org/consume/nuget-faq for more information. If you do not wish to use NuGet, you can manually download Aspose.Tasks for .NET API from https://www.n...
2,220
735
/* * Copyright 2016 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
1,797
584
#pragma once #include "EntityRegistry.hxx" #include "EntitySet.hxx" namespace BrokenBytes::Cyanite::Engine { struct Component { Component(std::string name) { this->_name = name; } protected: std::string _name; private: friend class EntityRegistry; friend...
462
128
#include "b.hpp" CommandVertex::CommandVertex(std::string specifier, std::string exec, std::vector<std::string> dependencies) : specifier(specifier) , exec(exec) , dependencies(dependencies) {}; void CommandVertex::run() { // Takes a C stri...
7,739
2,233
/***************************************************************************** Copyright (C) 1994-2000 the Omega Project Team Copyright (C) 2005-2011 Chun Chen All Rights Reserved. Purpose: Notes: History: *****************************************************************************/ #include <omega/omega_cor...
8,312
3,888
#include "lowmc_tfhe.h" #include <iostream> namespace LOWMC { void LOWMC_256_128_63_14_TFHE::encrypt_key() { secret_key_encrypted.init(params.key_size_bits, context); for (size_t i = 0; i < params.key_size_bits; i++) { uint8_t bit = (secret_key[i / 8] >> (7 - i % 8)) & 1; bootsSymEncrypt(&secret_key_encr...
7,698
3,548
#include "SceneManager.hpp" #include "MenuScene.hpp" #include "NewGameScene.hpp" #include "LoadGameScene.hpp" #include "SettingsScene.hpp" #include "RenderScene.hpp" #ifndef __EMSCRIPTEN__ #include "MultiplayerScene.hpp" #include "MakeRoomScene.hpp" #include "JoinRoomScene.hpp" #endif SceneManager::SceneManager(struc...
2,238
783
// // kfilter.cpp // carma_pack // // Created by Brandon Kelly on 6/27/13. // Copyright (c) 2013 Brandon Kelly. All rights reserved. // #include <random.hpp> #include "include/kfilter.hpp" // Global random number generator object, instantiated in random.cpp extern boost::random::mt19937 rng; // Object containing...
14,209
4,951
#include "Dicom_util.h" #include "logging/Log.h" #include <dcmtk/dcmdata/dcelem.h> #include <dcmtk/dcmdata/dcitem.h> #include <dcmtk/dcmdata/dcpath.h> #include <dcmtk/dcmdata/dcsequen.h> #include <stdexcept> static DcmObject* get_object(DcmPath* path) { DcmPathNode* last_element = path->back(); if(last_eleme...
4,071
1,322
/*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~* ** ** ** This file forms part of the Underworld geophysics modelling application. ** ** ...
15,082
4,840
/* * Copyright 2021 Kioshi Morosin <glam@hex.lc> * * 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 ...
21,644
7,738
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2013-2017 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
13,357
4,205
#include "LedManager.h" #include <stdlib.h> #include "Arduino.h" #include <EEPROM.h> // Configuration indicies #define EEPROM_HEADER 42 #define HEADER_ADDR 0 #define NUM_LEDS_ADDR 1 #define LED_SKIP_ADDR 3 #define LED_CHIP_TYPE_ADDR 4 #define LAST_PROGRAM_ADDR 5 #define EEPROM_LAST...
6,634
2,458
#include "precompiled.h" #include "cleanup_loop.h" #include "equality_context.h" #include "exceptions.h" #include "sbt-core.h" #include "stringification.h" #include "simple_face.h" namespace { typedef std::vector<point_3> loop; loop create_loop(const polyloop & p, equality_context * c) { std::vector<ipoint_3> pts...
4,543
1,889
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
1,408
531
// Copyright 2018-present MongoDB Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
11,425
3,479
#include "VideoDecoder.h" #include "Kernel/AssertionMemoryPanic.h" #include "Kernel/AssertionType.h" namespace Mengine { ////////////////////////////////////////////////////////////////////////// VideoDecoder::VideoDecoder() { } /////////////////////////////////////////////////////////////////////...
1,009
259
#include "weight.h" int main(void){ struct weight::hx711_args value; if(0 == weight::setup(&value)) weight::loop(&value); return 0; }
156
60
////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source // License. See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: // Miguel A. Morales, mo...
23,974
9,024
#ifdef PEGASUS_OS_DARWIN #ifndef __UNIX_ABSTRACTINDICATIONSUBSCRIPTION_PRIVATE_H #define __UNIX_ABSTRACTINDICATIONSUBSCRIPTION_PRIVATE_H #endif #endif
157
75
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<vector<int>> zigzagLevelOrder(TreeNode* root) { vector<vector<int>>q; ...
1,032
338
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
6,594
2,273
#include "Renderer.h" #include "post_processing/Bloom.h" #include "GlobalConstants.h" #include "../../MainWindow.h" #include "drawers/BatchedDrawer.h" #include "glad/glad.h" Renderer* Renderer::inst; Renderer::Renderer(GLFWwindow* window) { if (inst) { return; } inst = this; const GLubyte* renderer = glGe...
9,084
3,551
#include "UnrealEnginePythonPrivatePCH.h" int unreal_engine_py_init(ue_PyUObject *self, PyObject *args, PyObject *kwds) { // is it subclassing ? if (PyTuple_Size(args) == 3) { // TODO make it smarter on error checking UE_LOG(LogPython, Warning, TEXT("%s"), UTF8_TO_TCHAR(PyUnicode_AsUTF8(PyObject_Str(PyTuple_Ge...
14,996
7,076
#pragma once // This file is generated from the Game's Reflection data #include <cstdint> #include <RED4ext/Common.hpp> #include <RED4ext/REDhash.hpp> #include <RED4ext/Types/generated/Vector3.hpp> #include <RED4ext/Types/generated/anim/AnimNode_OnePoseInput.hpp> #include <RED4ext/Types/generated/anim/ConstraintWeigh...
1,156
393
#include "CppUTest/TestHarness.h" #include <string.h> #include <stdio.h> #define NO_OF_INPUT_REGS 10 #define INPUT_REG_START_ADDRESS 0 extern "C" { #include "mbap_conf.h" #include "mbap.h" } #define QUERY_SIZE_IN_BYTES (255u) #define RESPONSE_SIZE_IN_BYTES (255u) #define INPUT_R...
11,677
5,438
#include <iostream> #include <cpptest.h> #include "MainTestHarness.h" #include "UnitTests/PacketQueueTests.h" #define RUN_MAIN_TEST_HARNESS // Comment this line if you want to run unit tests, otherwise this will trigger MainTestHarness to execute using namespace std; enum OutputType { Compiler, Html, TextTerse, ...
2,034
818
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // TGUI - Texus's Graphical User Interface // Copyright (C) 2012-2017 Bruno Van de Velde (vdv_b@tgui.eu) // // This software is provided 'as-is', without any express or implied warranty. ...
12,845
4,169
#include <torch/Node.h> #include <algorithm> #include <torch/Context.h> #include <torch/Link.h> #include <torch/Object.h> namespace torch { Node::Node(std::shared_ptr<Context> context) : Object(context) { } size_t Node::GetChildCount() const { return m_children.size(); } std::shared_ptr<Node> Node::GetChild(siz...
2,052
740
/*! * Copyright (c) 2020-2021 by Contributors * \file json_serializer.cc * \brief Reference serializer implementation, which serializes to JSON. This is useful for testing * correctness of the binary serializer * \author Hyunsu Cho */ #include <treelite/tree.h> #include <treelite/logging.h> #include <rapi...
6,545
2,208
/* Copyright 2018 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...
1,801
624
// TnzCore includes #include "tmeshimage.h" #include "tgl.h" #include "tundo.h" // TnzExt includes #include "ext/plasticdeformerstorage.h" // tcg includes #include "tcg/tcg_macros.h" #include "tcg/tcg_point_ops.h" #include <unordered_set> #include <unordered_map> using namespace tcg::bgl; #include <boost/graph/b...
40,903
13,621
#include "fly/coders/base64/base64_coder.hpp" #include "test/util/path_util.hpp" #include "catch2/catch_test_macros.hpp" #include <cctype> #include <filesystem> namespace { // This must match the size of fly::coders::Base64Coder::m_encoded constexpr const std::size_t s_large_string_size = 256 << 10; } // namespac...
8,194
2,845
// Copyright 2021 The Cross-Media Measurement 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 applic...
2,483
809
#include "numword.h" using namespace bw; // destructor numword::~numword() { clearbuf(); } // assignment operator numnum numword::operator = ( const numnum num ) { setnum(num); return getnum(); } const char * numword::words() { return words(_num); } // convert to words const char * numword::words( c...
2,497
918
#include <QtGui> #include "rpc/local-repo.h" #include "repo-item.h" RepoItem::RepoItem(const LocalRepo& repo, QWidget *parent) : QWidget(parent), repo_(repo) { setupUi(this); refresh(); setFixedHeight(70); } void RepoItem::refresh() { mRepoName->setText(repo_.name); mRepoIcon->setPixma...
355
144
/**********************************************************\ This file is distributed under the MIT License. See https://github.com/morzhovets/momo/blob/master/LICENSE for details. tests/SimpleHashTesterOneI1.cpp \**********************************************************/ #include "pch.h" #inclu...
886
357
#pragma once #include "../../../../common.hpp" #include "../../MSExcel.common.hpp" #include "../../IParsable.hpp" #include "Ptg.hpp" namespace oless { namespace excel { namespace structures { namespace formulas { // see: https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/f5ef334a-bc47-...
819
325
/* * GeneticAlgoScene.cpp * * Created on: Nov 2, 2015 * Author: Karl Haubenwallner */ #include "GeneticAlgoScene.h" GeneticAlgoScene::GeneticAlgoScene(const std::string& filename): seed(217197128u), genetic_algo(PGA::ProceduralAlgorithm_impl::createFromConfig(filename)), _current_generation(0) { } doub...
1,173
452
/// shaft, connected to the bround by revolute joint at the point <100, 0, 0> /// initial linear speed is (0, 0, 300.); /// initial angular speed angularVelAbs = (0, 3., 0); #include <cmath> #include "chrono/physics/ChSystemNSC.h" #include "chrono/solver/ChIterativeSolverLS.h" #include "chrono/solver/ChDirectSolverLS...
3,691
1,427
// Copyright (c) 2020-2021 FRC Team 3512. All Rights Reserved. #include <frc/trajectory/constraint/MaxVelocityConstraint.h> #include <frc/trajectory/constraint/RectangularRegionConstraint.h> #include <wpi/numbers> #include "Robot.hpp" namespace frc3512 { void Robot::AutoRightSideShootSix() { // Initial Pose - R...
2,735
1,015
#ifndef RS_PHY_PATH_REG_HPP #define RS_PHY_PATH_REG_HPP #include "rodsConnect.h" #include "dataObjInpOut.h" int rsPhyPathReg( rsComm_t *rsComm, dataObjInp_t *phyPathRegInp ); #endif
185
90
#include <ATen/detail/ComplexHooksInterface.h> namespace at { namespace detail { const ComplexHooksInterface& getComplexHooks() { static std::unique_ptr<ComplexHooksInterface> complex_hooks; // NB: The once_flag here implies that if you try to call any Complex // functionality before you load the complex librar...
813
268
// menor custo para conseguir peso ate M usando N tipos diferentes de elementos, sendo que o i-esimo elemento pode ser usado b[i] vezes, tem peso w[i] e custo c[i] // O(N * M) int b[N], w[N], c[N]; MinQueue Q[M] int d[M] //d[i] = custo minimo para conseguir peso i for(int i = 0; i <= M; i++) d[i] = i ? oo : 0; for(in...
524
265
//#pragma title("usercopy- copies user accounts") /* ================================================================================ (c) Copyright 1995-1998, Mission Critical Software, Inc., All Rights Reserved Proprietary and confidential to Mission Critical Software, Inc. Program - usercopy Class ...
41,303
14,031
#include "hydro_functions.H" #include "hydro_functions_F.H" #include "common_functions.H" #include "common_functions_F.H" #include "common_namespace.H" #include "gmres_functions.H" #include "gmres_functions_F.H" #include "gmres_namespace.H" #include <AMReX_ParallelDescriptor.H> #include <AMReX_MultiFabUtil.H> us...
2,093
875
//-------------------------------------------------------------------------------------------------------------------------------- // Hassan Shahzad // 18i-0441 // OS-Project // FAST NUCES // main.cpp //----------------------------------------------------------------------------------------------------------------...
3,782
1,080
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) | +---------...
4,130
1,539
// Copyright 2019 Google LLC // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #include <benchmark/benchmark.h> #include "bench/utils.h" ...
8,306
3,841
/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * 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 cop...
5,854
1,842
// ============================================================================= // 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...
2,592
846
/* * Mark Benjamin 6th March 2019 * Copyright (c) 2019 Mark Benjamin */ #ifndef FASTRL_SHELL_COMMAND_WORLD_ADD_STATE_OBJECT_SG_COMMAND_HPP #define FASTRL_SHELL_COMMAND_WORLD_ADD_STATE_OBJECT_SG_COMMAND_HPP class AddStateObjectSGCommand { }; #endif //FASTRL_SHELL_COMMAND_WORLD_ADD_STATE_OBJECT_SG_COMMAND_HPP
317
150
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICUL...
4,661
1,743
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// // Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames // Copyright (C) 2015 Faust Logic, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and ...
64,498
24,097
// __BEGIN_LICENSE__ // Copyright (c) 2006-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NASA Vision Workbench is licensed under the Apache License, // Version 2.0 (the "License"); you may not use this f...
4,379
1,752
/* * Original work Copyright (c) 2006-2009 Erin Catto http://www.box2d.org * Modified work Copyright (c) 2017 Louis Langholtz https://github.com/louis-langholtz/Box2D * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * ar...
4,105
1,221
// rotating cube with texture object #include "Angel.h" const int NumTriangles = 12; // (6 faces)(2 triangles/face) const int NumVertices = 3 * NumTriangles; const int TextureSize = 64; typedef Angel::vec4 point4; typedef Angel::vec4 color4; // Texture objects and storage for texture image GLuint textures[2]; ...
8,070
3,248
#include "memory.h" #include "regs.h" #include <cstdio> #include <cstring> // Parameters uint32_t DATA_SIZE = 0; uint32_t TEXT_SIZE = 0; uint32_t STACK_SIZE = 0; // TODO: move constants to header file // Memory Pointers uint8_t *DATA_POINTER; uint8_t *TEXT_POINTER; uint8_t *STACK_POINTER; uint32_t MAIN_START; // H...
2,207
812
#ifdef USE_CUDA #include <openpose/gpu/cuda.hpp> #include <openpose/gpu/cuda.hu> #endif #include <openpose/utilities/openCv.hpp> #include <openpose/core/opOutputToCvMat.hpp> namespace op { OpOutputToCvMat::OpOutputToCvMat(const bool gpuResize) : mGpuResize{gpuResize}, spOutputImageFloatCuda...
4,111
1,186
#include <cstring> #include <iostream> #include <string> #include <fcntl.h> #include <unistd.h> #define TEST_FILE "test.txt" using namespace std; #define checker(ret, key) \ do { \ if (!(ret)) { ...
1,705
578
/* * Copyright (c) 2021 Sebastian Kylander https://gaztin.com/ * * This software is provided 'as-is', without any express or implied warranty. In no event will * the authors be held liable for any damages arising from the use of this software. * * Permission is granted to anyone to use this software for any purpo...
2,296
678
//#include <iostream> //#include <sstream> //#include <vector> // //using namespace std; // //int main() { // // stringstream ss; // string tmp; // // cin >> tmp; // // ss.str(tmp); // // while (getline(ss, tmp, ',')) cout << tmp << " "; // // return 0; // //}
261
112
/* dvdisaster: Additional error correction for optical media. * Copyright (C) 2004-2007 Carsten Gnoerlich. * Project home page: http://www.dvdisaster.com * Email: carsten@dvdisaster.com -or- cgnoerlich@fsfe.org * * This program is free software; you can redistribute it and/or modify * it under the terms o...
5,165
1,970
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "compiler/typecheck/capability_predicate.h" #include "compiler/printing.h" #include <fmt/ostream.h> namespace verona::compiler { PredicateSet::PredicateSet(CapabilityPredicate predicate) : values_(static_cast...
5,082
1,486
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef IROHA_OS_PERSISTENT_STATE_FACTORY_HPP #define IROHA_OS_PERSISTENT_STATE_FACTORY_HPP #include <memory> #include "ametsuchi/ordering_service_persistent_state.hpp" namespace iroha { namespace ametsuchi { ...
719
250
//-------------------------------------------------------------------------- // // Environment: // This software is part of the EvtGen package developed jointly // for the BaBar and CLEO collaborations. If you use all or part // of it, please give an appropriate acknowledgement. // // Copyright Informat...
2,418
938
#include <_character_disconnect_result_wrac.hpp> START_ATF_NAMESPACE int _character_disconnect_result_wrac::size() { using org_ptr = int (WINAPIV*)(struct _character_disconnect_result_wrac*); return (org_ptr(0x1401d24e0L))(this); }; END_ATF_NAMESPACE
281
111
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <fcntl.h> #include <errno.h> #include <linux/hidraw.h> #include <stdint.h> #include <string> #include <linux/version.h> #include "UVCLinuxControl.h" #include "UVCLin...
11,116
5,631
/** Copyright 2009-2018 National Technology and Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government retains certain rights in this software. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering...
10,666
3,678
#ifndef PATH_H #define PATH_H #include <vector> #include <map> #include "coordinate.hpp" class Path { private: std::vector<Coordinate> coords; public: Path(std::vector<Coordinate> coords); Path(int, int); void add_coords(int x, int y); void add_coords(Coordinate coord); size_t size(); ...
464
168
/*-------------------------------------------------------------------------- Copyright (c) 2009, Code Aurora Forum. 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 mu...
57,177
18,960
/* * Interactive disassembler (IDA). * Copyright (c) 1990-2015 Hex-Rays * ALL RIGHTS RESERVED. * */ #ifndef _INTS_HPP #define _INTS_HPP #pragma pack(push, 1) // IDA uses 1 byte alignments! /*! \file ints.hpp \brief Functions that deal with the predefined comments */ class insn_t; c...
2,196
662
/****************************************************************************** * Copyright 2017 The Apollo Authors. All Rights Reserved. * Modifications Copyright (c) 2018 LG Electronics, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
1,978
647
#include <iostream> #include <viface/viface.hpp> #include <viface/utils.hpp> using namespace std; class MyDispatcher { private: int count = 0; public: bool handler(string const& name, uint id, vector<uint8_t>& packet) { cout << "+++ Received packet " << dec << count; ...
1,940
603
// Config Scroller class // Copyright (C) 1996 Michael D. Lore All Rights Reserved #include <stdio.h> #include <io.h> #include "cfgscr.h" #include "registry.h" #include "console/colors.h" #include "cfgdlg.h" #include "console/inputdlg.h" #include "ptr.h" #define COMMAND_SIZE 1024 ConfigScroller::C...
7,218
2,878
/*** * Copyright 2019 The Katla 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 agr...
3,901
1,358
#include <iostream> int main(){ long n, k; std::cin >> n >> k; std::string s; std::cin >> s; if(k == 0){std::cout << s << std::endl;} else if(s.size() == 1){std::cout << "0" << std::endl;} else{ if(s[0] != '1'){s[0] = '1'; --k;} for(long p = 1; p < s.size() && k > 0; p++){ ...
456
195
#include <hxcpp.h> #ifndef INCLUDED_DefaultAssetLibrary #include <DefaultAssetLibrary.h> #endif #ifndef INCLUDED_IMap #include <IMap.h> #endif #ifndef INCLUDED_Type #include <Type.h> #endif #ifndef INCLUDED_flash_display_BitmapData #include <flash/display/BitmapData.h> #endif #ifndef INCLUDED_flash_display_DisplayObje...
49,898
23,261
/*******************************************************************\ Module: Show program locations Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ #include <iostream> #include <util/xml.h> #include <util/i2string.h> #include <util/xml_irep.h> ...
2,296
694
#include "windows/material_properties.hpp" #include "editor_tools.hpp" #include "windows/materials.hpp" #include "erhe/primitive/material.hpp" #include <imgui.h> #include <imgui/misc/cpp/imgui_stdlib.h> namespace editor { Material_properties::Material_properties() : erhe::components::Component{c_name} , Im...
1,283
429
// Copyright 2021 The Autoware 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 applicable law or a...
7,153
2,871
#pragma once #include "engine/graphics/interface/framebuffer.hpp" #include "engine/graphics/opengl/gl_texture.hpp" #include "engine/internal_libs.hpp" namespace oe::graphics { class GLFrameBuffer : public IFrameBuffer { private: // uint32_t m_rbo; uint32_t m_id; Texture m_texture; pub...
884
349
#include "PhysicsSystem.h" namespace { const unsigned long COMPONENTS_MASK { ECSComponent::COMPONENT_POSITION | ECSComponent::COMPONENT_VELOCITY }; } PhysicsSystem::PhysicsSystem(EntityManager &manager, std::vector<ECSComponent::Position> &positions, std::vector<ECSComponent::Velocity> &velocities) : ECS...
547
207
#include "GameConfig.h" #include "../Utils/Strings.h" void GameConfig::loadGameConfig(const char* filename) { XMLDocument doc; doc.LoadFile(filename); XMLElement* objElement = doc.FirstChildElement("Game"); for (XMLElement* child = objElement->FirstChildElement(); child != NULL; child = child->Next...
4,257
1,434
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // /////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #include <cstdint> #include "cldnn.hpp" #include "compounds.h" #include "primitive.hpp" #include <vector> #include <mem...
2,654
813
#include <capi/config.h> #include <iomanip> #include <memory> #include <algorithm> #include <log.hxx> #include <ut/string_view.hxx> #include <global_state.hxx> namespace internal { template< typename T > T retrieve_config_value(ut::string_view p_path) { const auto t_val = global_state<configuration>().get<T>({p...
1,572
627
/* Copyright (c) 2016, Dan Eicher 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 conditions and the following dis...
8,256
2,592
/** * spaint: PerLabelVoxelSampler_CPU.cpp * Copyright (c) Torr Vision Group, University of Oxford, 2015. All rights reserved. */ #include "sampling/cpu/PerLabelVoxelSampler_CPU.h" #include "sampling/shared/PerLabelVoxelSampler_Shared.h" namespace spaint { //#################### CONSTRUCTORS ####################...
4,798
1,759
#ifndef FBi_XMLRPC_UTILITY_HPP #define FBi_XMLRPC_UTILITY_HPP #include <xmlrpc_server/libxmlrpc_server_config.h> namespace FBi { /// The utility class for XMLRPC. class LIBXMLRPCSERVER_DECL XMLRPC_Utility { public: /** * @brief Function to get the default error string of XMLRPC. * * @param[in] error_code The...
1,189
474
#include "position.hpp" #include <iostream> #include <regex> uint32_t Position::parse(const std::string &str) { const std::regex re("^(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)$"); std::smatch match; if (!std::regex_match(str, match, re)) { throw std::runtime_error("Could not parse string"); } const uint32_t bar = ato...
1,401
592
#include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include <iostream> #include "Core/Shader.h" #include "Camera/CenteredCamera.h" #include "Model.h" #include "Light.h" #include "Models/Lamp.h" #include "Models/Cube.h" #include...
12,888
5,307