text
string
size
int64
token_count
int64
/* 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 usefu...
1,383
499
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'dynamicArray' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts following parameters: * 1. INTEGER n ...
2,551
929
// // _COREREGCLASSINFOWIN_CPP_ // // Copyright (C) 2017-2020 Tactical Computing Laboratories, LLC // All Rights Reserved // contact@tactcomplabs.com // // See LICENSE in the top level directory for licensing details // #include "CoreGenPortal/PortalCore/CoreRegClassInfoWin.h" // Event Table wxBEGIN_EVENT_TABLE(CoreR...
6,836
2,120
// Copyright (c) 2020, devgo.club // All rights reserved. #include <stdint.h> #include <stdlib.h> #include <iostream> int32_t get_max(int32_t x = 101, int32_t y = 102, int32_t z = 103); int32_t get_max(int32_t x, int32_t y); int main(int argc, char **argv) { int32_t a = 1; int32_t b = 2; int32_t c = 3; std...
809
412
#include <bits/stdc++.h> #define watch(x) std::cout << (#x) << " is " << (x) << std::endl using LL = long long; int main() { //freopen("in", "r", stdin); std::cin.tie(nullptr)->sync_with_stdio(false); int cas = 1; std::cin >> cas; while (cas--) { LL n; std::cin >> n; if (n & 1) { std::cout << -1 << std:...
660
340
// PUBG FULL SDK - Generated By Respecter (5.3.4.11 [06/03/2019]) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "PUBG_Niagara_parameters.hpp" namespace SDK { //--------------------------------------------------------------------------- //Functions //----------------------------------------------------...
7,202
2,335
/* Copyright 2018-2019 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
2,161
743
/* * Copyright 2018 LedoCool. * * 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...
5,709
1,620
/* TP 2016/2017 (Tutorijal 4, Zadatak 1) Autotestovi by Eldar Kurtic, sva pitanja, sugestije i prijave gresaka javite na mail ekurtic3@etf.unsa.ba NAPOMENA: testovi ce biti konacni TEK pred pocetak tutorijala. Zbog toga pokrenite testove za SVE zadatke na tutorijalu, da se ne bi desila situacija da ne...
1,186
536
// Generated by Haxe 3.4.7 #include <hxcpp.h> #ifndef INCLUDED_95f339a1d026d52c #define INCLUDED_95f339a1d026d52c #include "hxMath.h" #endif #ifndef INCLUDED_openfl_display_GraphicsDataType #include <openfl/display/GraphicsDataType.h> #endif #ifndef INCLUDED_openfl_display_GraphicsStroke #include <openfl/display/Graph...
10,884
4,737
// Fill out your copyright notice in the Description page of Project Settings. #include "SDesiredSizeBox.h" #include "Layout/LayoutUtils.h" SLATE_IMPLEMENT_WIDGET(SDesiredSizeBox) void SDesiredSizeBox::PrivateRegisterAttributes(FSlateAttributeInitializer& AttributeInitializer) { SLATE_ADD_MEMBER_ATTRIBUTE_DEFINIT...
4,530
1,566
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
2,805
862
// Copyright © 2016 Venture Media Labs. // // This file is part of mxml. The full mxml copyright notice, including // terms governing use, modification, and redistribution, is contained in the // file LICENSE at the root of the source code distribution tree. #include "AppearanceHandler.h" #include <lxml/DoubleHandler...
4,166
1,293
// Copyright (c) 2018 Graphcore Ltd. All rights reserved. #include <vector> // for `find', we need the algorithm header #include <algorithm> #include <memory> #include <popart/op/add.hpp> #include <popart/opmanager.hpp> #include <popart/tensor.hpp> namespace popart { // TODO : T6250 : Add support for V6 axis & broadc...
3,912
1,305
// Copyright (c) 2012-2017 VideoStitch SAS // Copyright (c) 2018 stitchEm #include "export.hpp" #include "rawOutput.hpp" #include "libgpudiscovery/delayLoad.hpp" #include "libvideostitch/output.hpp" #include "libvideostitch/plugin.hpp" #ifdef DELAY_LOAD_ENABLED SET_DELAY_LOAD_HOOK #endif // DELAY_LOAD_ENABLED /**...
1,092
387
#include "pch.h" void Proxy::Init() { wchar_t realDllPath[MAX_PATH]; GetSystemDirectory(realDllPath, MAX_PATH); wcscat_s(realDllPath, L"\\xinput1_3.dll"); HMODULE hDll = LoadLibrary(realDllPath); if (hDll == nullptr) { MessageBox(nullptr, L"Cannot load original xinput1_3.dll library", L...
1,765
590
/* CDF 9/10/98 A bold new initiaitive! */ #include "3dc.h" #include "inline.h" #include "module.h" #include "io.h" #include "strategy_def.h" #include "gamedef.h" #include "bh_types.h" #include "dynblock.h" #include "dynamics.h" #include "weapons.h" #include "compiled_shapes.h" #include "inventory.h" #include "tri...
9,245
3,840
/*++ Copyright (c) 1992 Microsoft Corporation Module Name: crash.cxx Abstract: Contains code concerned with recovery actions that are taken when a service crashes. This file contains the following functions: ScQueueRecoveryAction CCrashRecord::IncrementCount CRes...
31,699
8,939
// // main.cpp // TwoColor // // Created by mingyue on 2022/3/6. // Copyright © 2022 Gmingyue. All rights reserved. // #include <iostream> #include <vector> using namespace std; class Graph { public: vector<vector<int> *> * adj; Graph() { } Graph(int V) { this->V = V; thi...
2,517
938
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "androidadjusthelper.h" #include <QAndroidJniObject> #include <QString> void AndroidAdjustHelper::track...
597
194
/***************************************************************************************************************************** * Copyright 2020 Gabriel Gheorghe. All rights reserved. * This code is licensed under the BSD 3-Clause "New" or "Revised" License * License url: https://github.com/GabyForceQ/PolluxEngine/bl...
2,469
646
#include "stdafx.h" #include "PhysicsComponent.h" #include "ComponentManager.h" #include "BoxCollider.h" /** * @brief Construct a new Physics Component:: Physics Component object * controls physics movements in the world * */ PhysicsComponent::PhysicsComponent() : minY(0), isRising(false), yPosFallDiff(0) { } ...
2,695
1,050
/******************************************************************************* * tlx/string/appendline.cpp * * Part of tlx - http://panthema.net/tlx * * Copyright (C) 2019 Timo Bingmann <tb@panthema.net> * * All rights reserved. Published under the Boost Software License, Version 1.0 *************************...
1,690
509
#include <ros/ros.h> #include <omp.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/Image.h> #include <opencv2/core.hpp> #include <opencv2/highgui/highgui.hpp> ros::Publisher pub; ros::Subscriber sub; double radar_upgrade_time = 1632182400; void load_radar(cv::Mat raw_data, std::vector<int64_t> &timestamps, ...
5,743
2,411
// Copyright (c) 2013-2018 mogemimi. Distributed under the MIT license. #pragma once #include "Pomdog/Basic/Export.hpp" namespace Pomdog { class POMDOG_EXPORT Shader { public: virtual ~Shader() = default; }; } // namespace Pomdog
239
91
--- content/common/user_agent.cc.orig 2021-01-18 21:28:57 UTC +++ content/common/user_agent.cc @@ -213,6 +213,14 @@ std::string BuildOSCpuInfoFromOSVersionAndCpuType(cons ); #endif +#if defined(OS_BSD) +#if defined(__x86_64__) + base::StringAppendF(&os_cpu, "; Linux x86_64"); +#else + base::StringAppendF(&os_cp...
381
181
#define RPC_HPP_CLIENT_IMPL #include "client.hpp" #include <iostream> #include <stdexcept> #include <string> int main(int argc, char* argv[]) { if (argc < 3) { std::cerr << "USAGE: rpc_client <server_ipv4> <port_num>\n"; return EXIT_FAILURE; } RpcClient client{ argv[1], argv[2] }; ...
2,212
724
/* * * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved * */ #include "LETypes.h" #include "MorphTables.h" #include "SubtableProcessor2.h" #include "NonContextualGlyphSubst.h" #include "NonContextualGlyphSubstProc2.h" #include "TrimmedArrayProcessor2.h" #include "LEGlyphStorage.h" #include "LESw...
1,851
682
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { // freopen("in.txt", "r", stdin); // freopen("out.txt", "w", stdout); int t; cin>>t; int n; int ara[111]; while(t--) { int i; scanf("%d", &n); for(int i=1; i<...
893
334
#include <iostream> #include <iomanip> #include <string> #include <sstream> using namespace std; int main() { stringstream ss; ss << "there are " << 9 << "apple in my cart"; cout << ss.str() << endl; ss.str(""); ss << showbase << hex << 16; cout << "ss = " << ss.str() << endl; ss.str(""); ss << 3.14; cout <...
353
148
#include <iostream> #include <queue> using namespace std; int main(){ // declaring max pqueue priority_queue<int> maxpq; // declaring min pqueue // any container which supports the following opreations can be used to implement priority_queue // empty(), push_back(), size(), pop_back(), front() ...
1,196
380
#include "Precompiled.h" #include "WorldIO.h" #include "World.h" namespace { std::string ToString(const Vishv::Math::Shapes::Capsule& cap) { std::string txt; txt += "Position: " + cap.mTransform.Position().ToString() + "\n"; txt += "Rotation: " + cap.mTransform.Rotation().ToString() + "\n"; txt += "Radius: "...
2,575
1,092
/**************************************************************************** ** $Id: glbox.cpp,v 1.1.2.3 1999/02/01 12:17:42 aavit Exp $ ** ** Implementation of GLBox ** This is a simple QGLWidget displaying a box ** ** The OpenGL code is mostly borrowed from Brian Pauls "spin" example ** in the Mesa distribution ** *...
5,891
2,437
#include "muduo/base/common/logfile.h" #include "muduo/base/common/logging.h" #include "muduo/base/common/file_util.h" #include "muduo/base/common/process_info.h" #include "define/define_new.h" #include <assert.h> #include <cstdio> #include <cstring> #include <ctime> #include <libgen.h> using namespace muduo; std::s...
3,279
1,277
#include <iostream> #include <string> #include "sockettf.h" #include <anet/anet.h> #include <unistd.h> #include <anet/serversocket.h> #include <anet/log.h> #include <signal.h> using namespace std; namespace anet { CPPUNIT_TEST_SUITE_REGISTRATION(SocketTF); class PlainConnectRunnable : public Runnable { public: voi...
8,237
3,112
#include <sstream> #include <cassert> #include "structures/congruence_atom.h" #define CA theorysolver::CongruenceAtom #define SPCA std::shared_ptr<CA> using namespace theorysolver; Term::Term(unsigned int symbol_id) : type(Term::SYMBOL), symbol_id(symbol_id), function_name(), arguments() { } Term::Term(std::string ...
3,617
1,267
// Copyright 2020 Your Name <your_email> #include <gmock/gmock.h> #include <page_container.hpp> #include "stat_sender_test.hpp" #include <used_memory.hpp> TEST(MemoryUsage, MemUsingTest) { std::vector<std::string> old_raw_data{ "first" }, new_raw_data { "first", "second", "third", "fourth" }; used_me...
2,670
1,049
/* * guess number */ #include <iostream> using namespace std; int main() { int input; cin >> input; input *= 1001; input /= 7 * 11 * 13; cout << input; return 0; }
179
78
#pragma once #include <Geometry2d/Point.hpp> #include "planning/MotionConstraints.hpp" namespace Planning { /** * @brief A spatial path with no time or angle information. */ class BezierPath { public: /** * @brief Construct a bezier path for a curve with a given velocity, going * through the specifi...
2,633
769
/******************************************************************************\ * * * ____ _ _ _ * * | __ ) ___ ___ ___| |_ / \ ___| |_ ___ _ __ *...
5,209
1,785
#include "DebugCube.h" #include "W_RNG.h" #include "W_ResourceLoader.h" namespace wolf { static const Vertex cubeVertices[] = { // Front { -0.5f, -0.5f, 0.5f, 255, 0, 0, 255, 0.0f, 0.0f }, { -0.5f, 0.5f, 0.5f, 255, 0, 0, 255, 0.0f, 0.0f }, { 0.5f, 0.5f, 0.5f, 255, 0, 0, 255, 0.0f, 0.0f }, { 0.5f, 0...
3,355
2,489
/* * Copyright 2003,2004 The Apache Software 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...
3,905
1,832
#include "Camera.h" Camera::Camera(float width, float height) : up(0.f, -1.f, 0.f) , target(0.f, 0.f, 0.f) , width(width) , height(height) { } void Camera::Update() { D3DXMatrixLookAtLH(&view, &GetTransform()->GetPosition(), &target, &up); D3DXMatrixOrthoLH(&proj, width, height, 0.01f, 1000.0f); //D3DXMatrixPe...
516
259
// Functions for the <see cref="PiaTable"/> class to manage Pia Table pia // calculations. // $Id: PiaTable.cpp 1.45 2011/08/09 14:59:55EDT 044579 Development $ #include <fstream> #include <utility> // for rel_ops #include "PiaTable.h" #include "oactcnst.h" #include "PiaException.h" #include "piaparms.h" ...
4,968
1,847
//////////////////////////////////////////////////////////////// // precompiled header for render elements // #include "renElemPch.h"
136
36
#include <blik.hpp> #include "blik_vector.hpp" namespace BLIK { Vector::Vector() { x = 0; y = 0; vx = 0; vy = 0; } Vector::Vector(const Vector& rhs) { operator=(rhs); } Vector::Vector(float x, float y, float vx, float vy) { this->x = x;...
1,453
523
#include "Solar.h" Solar::Solar(void) { geo = false; DEG2RAD = 3.14159/180; velocity = 1; Mer = 0.0, Ven = 0.0, Ear = 0.0, Moo = 0.0, Moo2 = 0.0, Mar = 0.0, Jup = 0.0, Sat = 0.0, Ura = 0.0, Nep = 0.0, Plu = 0.0; shine[0] = 10; mooCol[0]=2.3, mooCol[1]=2.3, mooCol[2]=2.3; moo2Col[0]=0.93,moo2Col[1]=0.93,moo2Col[...
9,248
5,642
#include <EdwinAlkinsGameEngine.h> class SandBox : public EdwinAlkinsGameEngine::Application{ public: SandBox() { } ~SandBox() { } }; EdwinAlkinsGameEngine::Application* EdwinAlkinsGameEngine::CreateApplication() { return new SandBox(); }
250
91
//----------------------------------------------------------------------------- // Copyright (c) 2013-2018 Benjamin Buch // // https://github.com/bebuch/BitmapViewer // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.tx...
4,099
1,657
#pragma once #define GLFW_INCLUDE_NONE #include <GLFW/glfw3.h> #include <GL/glew.h> #include "Math.hpp" #include <iostream> class Window { public: static void create(unsigned int _width, unsigned int _height, const char* _title, bool _resizable = false, bool _decorated = true); static void clear(); static void up...
431
154
#include "histogram.h" void histogram_opt(int in[INPUT_SIZE], int hist[VALUE_SIZE]) { int acc = 0; int i, val; int in_buf[INPUT_SIZE], hist_buf[VALUE_SIZE]; for(i = 0; i < INPUT_SIZE; i++) { #pragma HLS PIPELINE II=1 in_buf[i] = in[i]; } int old = in_buf[0]; loop0: for(i = 0; i < INPUT_SIZE; i++) {...
627
300
#include <iostream> #include <cmath> #include <thread> #include <tuple> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <librealsense2/rs.hpp> // rs.h is for C; rs.hpp is for C++... #include <DarknetNet.h> #include <darknet/images/image_opencv...
37,669
12,191
#include <string> #include <vector> #include <iostream> #include <cstring> // std::memcpy #include "core/sample.hpp" // trigno::sample::ID namespace trigno { Sample::Sample(sensor::ID id, size_t n_channels, const char* raw_data) : _id(id), _data(n_channels) { /* ... */ if (raw_data !...
1,980
687
/* BSD 3-Clause License * * Copyright (c) 2020, Simon de Hartog <simon@dehartog.name> * 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 ...
4,050
1,702
#ifndef VERBATIM_VERTEX_BUFFER #define VERBATIM_VERTEX_BUFFER #include "verbatim_array.hpp" #include "verbatim_vertex.hpp" // Forward declaration. class Program; /** Vertex buffer. */ class VertexBuffer { private: /** Current vertex buffer. */ static const VertexBuffer* g_bound_vertex_buffer; /** Cur...
3,592
1,225
//write include statements #include"variables.h" //write namespace using statement for cout using std::cin; using std::cout; /* Call multiply_numbers with 10 and 10 parameter values and display function result */ int main() { double meal_amount; double tip_rate; double tip_amount; double tax_amount; double tot...
821
298
/* * Copyright (c) 2016 K. Isom <coder@kyleisom.net> * * Permission is hereby granted, free of charge, to any person obtaining a copy * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, ...
6,080
2,637
/****************************************************************************** ** ** Copyright (C) 2009-2011 Kyle Lutz <kyle.r.lutz@gmail.com> ** All rights reserved. ** ** This file is a part of the chemkit project. For more information ** see <http://www.chemkit.org>. ** ** Redistribution and use in source and binar...
3,865
1,181
#pragma once #include "Windows.hpp" #include <GLFW/glfw3.h> #include <functional> void framebuffer_size_callback(GLFWwindow* window, int width, int height); void ProcessInput(GLFWwindow *window); namespace TinySandbox { class GLFW_Windows : public Windows { public: GLFW_Windows(); GLFW_Windows(int width...
679
272
// This file if part of the llir-opt project. // Licensing information can be found in the LICENSE file. // (C) 2018 Nandor Licker. All rights reserved. #include <sstream> #include <llvm/Target/RISCV/RISCVInstrInfo.h> #include <llvm/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h> #include "emitter/riscv/riscvannot_pr...
3,098
1,159
// 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 may...
3,257
1,248
#include "../../../../include/odfaeg/Graphics/GUI/filedialog.hpp" #include "../../../../include/odfaeg/Math/maths.h" #include <filesystem> namespace odfaeg { namespace graphic { namespace gui { FileDialog::FileDialog(math::Vec3f position, math::Vec3f size, const Font* font) : rw(sf::...
25,386
6,686
#include "StdH.h" #include "Paths.h" MRAGPP_NAMESPACE_BEGIN; CPaths::CPaths() { ps_iIterator = 0; } CPaths::~CPaths() { ps_aPaths.Clear(); } CPath& CPaths::Create(const Vector2f &vPos1, const Vector2f &vPos2, int iTotalFrameCount, mragPathsOnUpdateFunction onUpdate, mragPathsOnFinishFunction onFinish) { CPa...
1,271
565
#include "nao_auto_bridge.h" #include <boost/algorithm/string/join.hpp> #include <iostream> #include <vector> #include <ros/ros.h> #include <actionlib/server/simple_action_server.h> #include <naoqi_bridge_msgs/SpeechWithFeedbackAction.h> #include <naoqi_bridge_msgs/SetSpeechVocabularyAction.h> #include <naoqi_bridge_...
5,051
1,696
#include <Entity.hpp> #include <Graphics.hpp> #include <KeyPoll.hpp> #include <Map.hpp> #include <Music.hpp> #include <Script.hpp> #include <editor.hpp> //#include "UtilityClass.h" #include <Enums.hpp> #include <FileSystemUtils.hpp> #include <ctime> #include <string> #include <tinyxml/tinyxml.hpp> edlevelclass::edleve...
141,050
81,673
#include "FactoryTypeInputs.h" #include "ParserHelpers.h" mappers::FactoryTypeInputs::FactoryTypeInputs(std::istream& theStream) { registerRegex("[a-z_]+", [this](const std::string& inputGood, std::istream& theStream) { const commonItems::singleDouble inputValue(theStream); productionInputValues.insert(std::m...
490
173
// Statistics.cpp // (C) Copyright 2017 by Martin Brunn see License.txt for details // #include "Statistics.h" Statistics::Statistics() { } Statistics::~Statistics() { }
192
77
// free(): is C method (Is it necessary to use C in your C++ app?) // delete: is C++ operator int main() { int* a = new int[5]; a[4] = 4; int* b = a; //free( a ); // It works but is necessary to include stdlib.h //free( b ); //delete a[]; // It works. delete[] b; // It works. __debugbreak(); return 0; ...
321
137
#pragma once #ifdef ARCHITECT_CLANG_SUPPORT #include <functional> #include <string> typedef struct CXTranslationUnitImpl *CXTranslationUnit; namespace architect { class Registry; namespace clang { typedef std::function<bool(const std::string &)> Filter; struct Parameters { Filter filter; // returns whe...
836
279
#include "Popup.hpp" #include "Colors.hpp" namespace sfs { Popup::Popup(Scene &scene, const sf::Font &font, const sf::Vector2f &position) noexcept : UI(scene, "Popup", position) , _box(addComponent<Rectangle>()) , _text(addComponent<Text>(font, "", sf::Color::Black)) , _queue() , _elapsed(0.f) { } void Popup::up...
2,609
1,079
#include "Preprocessor.h" Preprocessor::Preprocessor(std::string file) : _cap(new cv::VideoCapture(file)) { MEMORY("Preprocessor created"); if(!_cap->isOpened()) throw GenericException(GenericException::CAP_NOT_OPENED); } Preprocessor::~Preprocessor() { MEMORY("Preprocessor deleted"); } bool Pre...
1,240
483
// // Created by USER on 6/1/2020. // #include <iostream> #include "Print.h" #include "../../PyVariable.h" #include "../../primitive/PyString.h" #include "../../../MemoryManager.h" PyClass *Print::process(std::map<std::string, PyClass *> &map) { const PyString* asStr = map["data"]->asString(); if (asStr == nu...
571
198
#include "CellRenderer.hpp" #include "String.hpp" #include "TextLayout.hpp" #include "VTConverter.hpp" #include <string> using namespace std; namespace MinConsoleNative { CellRenderer::CellRenderer(int consoleWidth, int consoleHeight, CellRendererMode mode) { this->consoleWidth = consoleWidth; ...
10,355
3,108
#include <windows.h> BOOL APIENTRY wWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) { int argc; wchar_t **argv = CommandLineToArgvW(GetCommandLineW(), &argc); if (argc < 4) return ERROR_INVALID_PARAMETER; DWORD nErr=ERROR_SUCCESS, nParentID = (DWORD)_wtol(argv[1]); HANDLE hList[2] = { OpenProcess(SY...
817
352
/** * Copyright (C) 2022 Advanced Micro Devices, Inc. * * 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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
24,644
7,978
/****************************************************************************** * Copyright (c) 2020, Intel Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception. * *****************************************************************************/ #include "systemc.h" #include <sc...
2,144
768
#include <iostream> #include <algorithm> #include <vector> using namespace std; class Segment { public: int len; vector<long long> tree; Segment(int n) : len(n) { tree.resize(2*n); } void make() { for (int i=len-1; i>0; i--) tree[i] = (tree[i*2] + tree[i*2+1]); } void update(int i, int val) { i += le...
1,104
597
#include <string> #include <memory> #include <utility> #include <vector> #include "include/micro_hal_control_plugin.h" using namespace std::chrono_literals; namespace micro_hal_control { MicroHalControlPlugin::MicroHalControlPlugin() { printf("Hello World!\n"); }; MicroHalControlPlugin::~MicroH...
621
203
#include "beastquest/auth.hh" #include <boost/beast.hpp> #include <string> namespace detail = boost::beast::detail; namespace quest { BasicAuth::BasicAuth(std::string username, std::string password) : username_{std::move(username)}, password_{std::move(password)}, auth_string_("Basic " + ...
559
166
#ifndef _OPENCV_DMP_HPP_ #define _OPENCV_DMP_HPP_ #include <vector> #include <opencv2/core/core.hpp> #include <boost/filesystem.hpp> #include <limits> #include <map> #include <set> #include <list> #include <vector> #include <stdexcept> #include <opencv2/imgproc/imgproc.hpp> //for DEBUG //#include <opencv2/highgui/h...
27,492
10,087
/* * \file CPointerToImplementation.cpp * \author https://github.com/infojg9 * \brief An example of the PIMPL Design / Pointer to Implementation. * \copyright MIT/BSD Redistributable License */ #include "CPointerToImplementation.h" #include <iostream> #ifdef _WIN32 #include <windows.h> #else #includ...
2,291
826
#ifndef __HTTP_SESSION_H__ #define __HTTP_SESSION_H__ #include <memory> #include <iostream> #include <boost/beast/core.hpp> #include <boost/beast/http.hpp> #include <boost/beast/version.hpp> #include <boost/asio/bind_executor.hpp> #include <boost/asio/ip/tcp.hpp> #include <boost/asio/strand.hpp> #include <boost/prope...
3,694
1,184
#include "TCPManager.h" TCPManager* TCPManager::instance = nullptr; TCPManager::TCPManager() { } TCPManager::~TCPManager() { for (std::string id : online_subscribers) close(subscribers_by_id[id]); close(listen_fd); } TCPManager* TCPManager::get_instance() { if (!instance) instance = new ...
9,104
3,062
#ifndef _PERSEUS_META #define _PERSEUS_META #define ANIM_BUTTON_PREAMBLE disableSerialization;_ctrl=_this select 0;if(ctrlEnabled _ctrl)then{ #define ANIM_BUTTON_HELPER_0(ARG) ANIM_BUTTON_PREAMBLE _ctrl ctrlSetText 'Perseus\Interface\Textures\##ARG##.paa';}; #define ANIM_BUTTON_HELPER_1(ARG) ANIM_BUTTON_PREAMBLE if([...
823
396
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "Misc/Exec.h" FExec::~FExec() { }
106
51
#include "PihaDeviceProvider.h" #include <assert.h> #include <algorithm> #include "PihaDevice.h" namespace Piha { DeviceProvider::DeviceProvider() { } DeviceProvider::~DeviceProvider() { deleteDevices(); } void DeviceProvider::addDevice( Device* device ) { mDevices.push_back( device ); for ( Listeners::iterator...
1,512
541
// Houzi Game Engine // Copyright (c) 2018 Davide Corradi // Licensed under the MIT license. #include "hou/gfx/mesh_draw_mode.hpp" #include "hou/cor/core_functions.hpp" #define MESH_DRAW_MODE_CASE(mdm, os) \ case mesh_draw_mode::mdm: \ return (os) << #mdm namespace hou { std::ostream& operator<<(std::ostre...
914
414
/** MIT License Copyright (c) 2018 Sarthak Mahajan 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, p...
2,487
889
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define mem(Arr,x) memset(Arr,x,sizeof(Arr)) #define lowbit(x) ((x)&(-x)) const int maxN=101000; const int inf=2147483647; int n,Seq[maxN]; int numcnt,Num[maxN]; int BIT[maxN],F[maxN]...
1,327
703
#pragma once #include "CellState.hpp" #include "Coord.hpp" #include "Direction.hpp" #include <concepts> #include <cstdint> namespace model { enum class VisitStatus : std::uint8_t { STOP_VISITING, KEEP_VISITING }; using enum VisitStatus; // Non-directional visitors don't have a direction. They are used with // visit...
2,338
728
/* * 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...
105,085
32,887
/* This file is part of Nokia HEIF library * * Copyright (c) 2015-2021 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. * * Contact: heif@nokia.com * * This software, including documentation, is protected by copyright controlled by Nokia Corporation and/ or its * subsidiaries. All rights are r...
1,087
347
#include <lug/Graphics/GltfLoader.hpp> #if defined(LUG_SYSTEM_ANDROID) #include <android/asset_manager.h> #include <lug/Window/Android/WindowImplAndroid.hpp> #include <lug/Window/Window.hpp> #endif #include <gltf2/Exceptions.hpp> #include <lug/System/Logger/Logger.hpp> #include <lug/Graphics/Builder/Sce...
19,279
5,801
#include "flat_file.hpp" #include "hibp.hpp" #include <cstdlib> int main(int /* argc */, char* argv[]) { std::ios_base::sync_with_stdio(false); std::cerr << argv[0] << ": reading `have i been pawned` text database from stdin,\n" "converting to binary format and writing to stdout." ...
550
193
#include "heap.h" #include <algorithm> #include <cassert> #include "stack.h" using namespace vaiven; using std::min; using std::max; // set by interpreter Heap* vaiven::globalHeap = NULL; GcableType vaiven::Gcable::getType() { return (GcableType) (((GcableType) this->type) & ~GcableMarkBit); } bool vaiven::Gcab...
4,126
1,618
#include <gtest/gtest.h> #include "utility/partitioner.h" TEST(Partitioner, Basic) { Partitioner part1(0, 0b111, 3); part1.compute(); std::vector<uint64_t> vres1 = part1.getResult(); std::set<uint64_t> ref1 = {0x0000, 0x0100, 0x0010, 0x0110, 0x0210}, res1(vres1.begin(), vres1.en...
355
175
#include "graph_map/ndt_dl/ndtdl_map_param.h" #include <boost/serialization/export.hpp> BOOST_CLASS_EXPORT(perception_oru::libgraphMap::NDTDLMapParam) using namespace std; namespace perception_oru{ namespace libgraphMap{ void NDTDLMapParam::GetParametersFromRos(){ MapParam::GetParametersFromRos(); ros::NodeHandle...
590
205
#include <iostream> #include <vector> using namespace std; class Solution { public: double findMedianSortedArrays(vector<int>& top, vector<int>& bottom) { if (top.size() > bottom.size()) { return findMedianSortedArrays(bottom, top); } int left = 0; int right = top.size()...
2,174
668
/** @file "/owlcpp/include/owlcpp/detail/vector_set.hpp" part of owlcpp project. @n @n Distributed under the Boost Software License, Version 1.0; see doc/license.txt. @n Copyright Mikhail K Levin 2013 *******************************************************************************/ #ifndef VECTOR_SET_HPP_ #define VECTO...
1,830
614
#ifndef FALCON_FUNCTIONAL_INVOKE_PARTIAL_RECURSIVE_PARAM_HPP #define FALCON_FUNCTIONAL_INVOKE_PARTIAL_RECURSIVE_PARAM_HPP #include <falcon/math/min.hpp> #include <falcon/c++1x/syntax.hpp> #include <falcon/functional/invoke.hpp> #include <falcon/parameter/manip.hpp> #include <falcon/preprocessor/not_ide_parser.hpp> #i...
2,455
936