text
string
size
int64
token_count
int64
class Solution { public: static int getValueOfChar(char c) { if (c == 'I') return 1; if (c == 'V') return 5; if (c == 'X') return 10; if (c == 'L') return 50; if (c == 'C') return 100; if (c == 'D') return 500; return 1000; ...
1,056
382
#include <iostream> #include "FindSCMain.h" namespace SCAM { FindSCMain::FindSCMain(clang::TranslationUnitDecl *tuDecl): pass(0), scMainFound(false), _scmainFunctionDecl(NULL){ assert (!(tuDecl == NULL)); //Find sc_main TraverseDecl(tuDecl); //Is...
1,291
386
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For Open Source Computer Vision Library (3-clause BSD Licen...
8,908
2,329
#include "StartDialog.h" #include "ui_StartDialog.h" #include <QStringList> #include <QFileDialog> #include <QDir> #include <QDebug> #include <QPushButton> #include <QLabel> #include <QObject> #include <QAction> #include <QMouseEvent> #include "Utils/Helper.h" using Helper::chopFileName; using Helper::openFileDialog...
5,965
1,972
#include "Rogue.h" #include "IronArmor.h" #include "SilverDagger.h" #include "SilverSword.h" #include "YewStick.h" #include "Inventory.h" //Constructor //No drop defined Rogue::Rogue(int lvl) : Monster("Rogue", new int[2]{HP*lvl, HP*lvl}, new int[2]{MANA*lvl, MANA*lvl}, lvl, GOLD*lvl, STRENGTH*lvl, AGILITY*lv...
719
311
#include <stdlib.h> #include "Vled_top.h" #include "verilated.h" int main() { Vled_top* dut = new Vled_top; dut->eval(); printf("led=%d\n", dut->led_r); return 0; }
185
85
#pragma once #include "../../../../utils/ValueWatcher.hpp" namespace Pages::Elements::Mixins { class FilteredDistanceMixin { protected: FilteredDistanceMixin(); ValueWatcher<float> &filtered_distance(); private: ValueWatcher<float> filtered_distance_value; }; }
309
96
#include <traj_visualization_plugin/trajectory_display.hpp> namespace trajectory_display_ns{ trajectory_display::trajectory_display(){ description_property_=new rviz::StringProperty("Robot Description","robot_description", "The name of the ROS parameter where the URDF for the robot is loaded", ...
5,256
1,825
// // list_property_scribe.hpp // OpenPGP // // Created by Yanfeng Zhang on 6/23/17. // // The MIT License // // Copyright (c) 2019 Proton Technologies AG // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), ...
4,535
1,267
#pragma once #include "Treat.hpp" class MultiballTreat : public Treat { public: MultiballTreat(sf::Vector2f pos, float launchAngle); void AddAward(PlayState* state); };
173
68
#ifndef __THROW_MESSAGE_NODE_HPP__ #define __THROW_MESSAGE_NODE_HPP__ #include <rclcpp/rclcpp.hpp> #include <std_msgs/msg/string.hpp> namespace executor_test { class ThrowMessageNode : public rclcpp::Node { public: explicit ThrowMessageNode(const rclcpp::NodeOptions &options); pri...
544
189
// Copyright (c) 2020 Huawei Technologies Co., Ltd // Copyright (c) 2019, Facebook CORPORATION. // All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://opensource...
2,608
977
#include "ai.h" #include "engine.h" #include "state.h" #include <iostream> #include <stdlib.h> #include <unistd.h> using namespace ai; using namespace engine; using namespace state; using namespace std; int RandomIA::run (engine::Engine& engine){ // L'IA effectue ces actions uniquement si c'est son tour //sleep(5)...
4,255
1,957
/* 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...
1,915
591
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; using ll = long long; using stt = pair<pair<int, ll>, pair<int, int>>; const ll mod = 1e9+7; const int MM = 505; int n, m, qt; ll v[MM][MM]; pair<int, ll> dis[MM][MM], ans; array<int, 2> mv[] = {{0, 1}, {0, -1}, {1, 0}, {-...
1,638
1,022
/** * @file oglplus/object/bound.hpp * @brief Operations on currently bound objects * * @author Matus Chochlik * * Copyright 2010-2015 Matus Chochlik. 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) */ ...
2,526
1,065
#include <bspch.h> #include "Vec3.h" namespace bs { const vec3 vec3::up(0.0f, 1.0f, 0.0f); const vec3 vec3::down(0.0f, -1.0f, 0.0f); const vec3 vec3::right(1.0f, 0.0f, 0.0f); const vec3 vec3::left(-1.0f, 0.0f, 0.0f); const vec3 vec3::back(0.0f, 0.0f, -1.0f); const vec3 vec3::forward(0.0f, 0.0f, 1.0f); const ve...
4,964
2,265
MODULE StdStamps; (** project = "BlackBox" organization = "www.oberon.ch" contributors = "Oberon microsystems" version = "System/Rsrc/About" copyright = "System/Rsrc/About" license = "Docu/BB-License" changes = "" issues = "" **) (* StdStamps are used to ke...
16,631
5,580
#pragma once /** * @namespace props * @brief Root namespace containing property classes */ namespace props{} #include <properties/property.h> #include <properties/readonly.h> #include <properties/Prop.h> #include <properties/ReadProp.h> #include <properties/WriteProp.h> #include <properties/utils.h>
305
92
// license:BSD-3-Clause // copyright-holders:Mirko Buffoni /*************************************************************************** video.c Functions to emulate the video hardware of the machine. ***************************************************************************/ #include "emu.h" #include "includes...
1,357
565
#include<stdio.h> int main() { int n;//take n=8; printf("Enter the number to check it is power of 2 or not :\n"); scanf("%d",&n); if((n&(n-1))==0)//8=1000,7=0111 when we take and of (8 & 7)=0; printf("%d is power of 2",n); else printf("%d is not power of 2",n); }
282
131
#using <System.Xml.dll> using namespace System; using namespace System::IO; using namespace System::Xml; using namespace System::Xml::Serialization; // <Snippet1> public ref class Car { public: [XmlAttributeAttribute(Namespace="Make")] String^ MakerName; [XmlAttributeAttribute(Namespace="Model")] Stri...
354
113
#include "FootCommander.hpp"
28
10
#ifndef CONFIG_HPP #define CONFIG_HPP #include <QSettings> #include <QMap> #define CONFIG_SLEEP_STR "watcher_sleep_ms" #define CONFIG_START_MIN_STR "start_minimized" #define CONFIG_ENABLED_STR "enabled" #define CONFIG_AUTOHIDE_STR "autohide" #define CONFIG_TRAY_INFO_SHOWN "tray_icon_warning_shown"...
1,589
503
// Copyright (c) 2019 AutonomouStuff, LLC // // 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, pu...
3,019
999
#include "ConeClassifier.h" vn::ConeClassifier::ConeClassifier(){ } vn::ConeClassifier::ConeClassifier(const std::shared_ptr<StereoCamera>& Camera){ m_Camera = Camera; } vn::ConeClassifier::~ConeClassifier(){ } void vn::ConeClassifier::Detect(){ //preprocess image to do undermine illumination effects...
1,057
372
#include "DropoutLayer.hpp" namespace mario { DropoutLayer::DropoutLayer(const int &_lastNeuronNum, const double &_p) { m_p = _p; m_in = matrix(1, _lastNeuronNum, 0); m_mul = matrix(1, _lastNeuronNum, 0); m_out = matrix(1, _lastNeuronNum, 0); m_dx = matrix(1, _lastNeuronNum, 0); } const matrix& Dropou...
1,373
687
#include "check_network_batchable.hpp" #include "dimension_tracker.hpp" #include "ie_ngraph_utils.hpp" #include "ngraph/opsets/opset.hpp" #include "openvino/op/detection_output.hpp" #include "openvino/op/ops.hpp" #include "openvino/pass/manager.hpp" #include "transformations/common_optimizations/dimension_tracking.hpp...
3,835
1,123
#include "NeheGL.h" #include "app.h" #define WM_TOGGLEFULLSCREEN (WM_USER+1) // Application Define Message For Toggling static BOOL g_isProgramLooping; // Window Creation Loop, For FullScreen/Windowed Toggle // Between Fullscreen / Windowed Mode static BOOL g_createFullScreen;...
7,398
3,248
// Vaca - Visual Application Components Abstraction // Copyright (c) 2005-2009 David Capello // // This file is distributed under the terms of the MIT license, // please read LICENSE.txt for more information. #include <vaca/vaca.h> #include "../resource.h" using namespace vaca; ///////////////////////////...
2,306
791
#include <algorithm> #include <array> #include <iostream> using integer = long long; template <typename T, size_t N> std::istream& operator >>(std::istream& input, std::array<T, N>& v) { for (T& a : v) input >> a; return input; } void answer(integer v) { std::cout << v << '\n'; } void solve(std...
708
310
/* * vfspluginVP: Generic GUCEF VFS plugin for "Violation Pack" archives * Copyright (C) 2002 - 2008. Dinand Vanvelzen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; ...
19,164
5,461
/// @file surface_cps3_reader.cpp /// @brief Read surface in CPS-3 ASCII format /// @author uentity /// @version 1.0 /// @date 30.09.2015 /// @copyright This source code is released under the terms of /// the BSD License. See LICENSE for more details. #include "bs_kernel.h" #include "conf.h" #include <fstr...
3,356
1,435
/* * MPU6050_Axis_MotionApps20.cpp * * Created on: 2016年1月10日 * Author: qq95538 */ // I2Cdev library collection - MPU6050 I2C device class, 6-axis MotionApps 2.0 implementation // Based on InvenSense MPU-6050 register map document rev. 2.0, 5/19/2011 (RM-MPU-6000A-00) // 6/18/2012 by Jeff Rowberg <jeff@rowb...
46,408
25,322
#pragma once #include"State.hpp" class MarioStateMachine { public: MarioStateMachine() : _score(0) { //提前缓存各种状态 _normalMario = new NormalMario(this); _superMario = new SuperMario(this); _fireMario = new FireMario(this); _deadMario = new DeadMario(this); ...
6,428
2,360
// Say you have an array for which the ith element is the price of a given stock // on day i. // Design an algorithm to find the maximum profit. You may complete as many // transactions as you like (ie, buy one and sell one share of the stock // multiple times) with the following restrictions: // You may not enga...
3,128
1,281
#include "resources.hpp" #include <boost/dll/runtime_symbol_info.hpp> #include <fstream> #include <sstream> namespace MinIDE { //##################################################################################################################### path getResourcesDirectory() { auto program_pa...
1,412
320
/** * Universidad de La Laguna * Escuela Superior de Ingeniería y Tecnología * Grado en Ingeniería Informática * Informática Básica * * @author F. de Sande * @date 7.nov.2020 * @brief Cada nuevo término de la serie de Fibonacci se genera sumando los dos anteriores. * Comenzando con 0 y 1, los primeros ...
1,927
724
// ResourcesBar.cpp: implementation of the CResourcesBar class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "ResourcesBar.h" #include "..\GameClientGlobal.h" #include "..\DataObjects\CMap.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #d...
3,984
1,631
// // Created by rahul on 21/7/19. // #include <iostream> #include <cmath> #define ACCURACY 0.001 int main() { int n; float sum,n1,m; n=1;sum=0; for(int i=1;;i++) { n1 = float(1) / n; m = pow(n1, i); std::cout<<m<<'\n'; sum +=m; std::cout<<"sum"<<sum<<'\n'; ...
417
189
#ifndef RSA_INPUT_HPP #define RSA_INPUT_HPP #include <vector> #include <string> //Forward declaration class Demand; class Vertex; class Edge; class RSA_Input { private: std::string file_Outputplacement_; std::vector<Demand *> requests_; std::vector<Vertex *> nodes_; std::vector<...
1,151
369
/* * Copyright 2012, 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 applica...
2,508
958
#ifdef OS_ANDROID #include <stdarg.h> #include <stdlib.h> #include <stdio.h> #include "txWidestringWrapper.h" tx_wstring::tx_wstring(const wchar_t * wstr) : _wstring(wstr) { wcstombs(cbuf, wstr, BUF_SIZE); _astring.assign(cbuf); } tx_wstring::tx_wstring(const tx_wstring & other) : _wstring(other.c_str()) { wcstom...
2,254
1,063
// GDIImage.cpp : Implementation of CGDIImageOle #include "stdafx.h" #include "GDIImageOle.h" // CGDIImageOle //using namespace Gdiplus; const IID IID_IGDIImageDeleteNotify = {0xa991582, 0x6f1a, 0x4150, 0xbd, 0xcd, 0x25, 0x3b, 0xb7, 0x8c, 0xf9, 0xf}; CGDIImageOle::CGDIImageOle(): m_pImage(NULL), m_Frame...
6,173
2,846
/****************************************************************************** ** (C) Chris Oldwood ** ** MODULE: MSGWND.HPP ** COMPONENT: Windows C++ Library. ** DESCRIPTION: The CMsgWnd class declaration. ** ******************************************************************************* */ // Check for previous in...
6,987
2,580
#include "point.h" #include <iostream> #include <cstring> #include <cmath> using namespace std; Point::Point(){ this->x=0; this->y=0; } Point::Point(double x,double y){ this->x=x; this->y=y; } Point::Point(Point& p){ this->x=p.getX(); this->y=p.getY(); } double Point::getX(){ return this->x; } double Point::g...
552
245
#include <Eigen/Dense> double mse(Eigen::MatrixXd X, Eigen::VectorXd W, Eigen::VectorXd Y); Eigen::VectorXd _derivative(Eigen::MatrixXd X, Eigen::VectorXd W, Eigen::VectorXd Y) { /* Computes the jth derivative given W, X, Y by following gradient descent where D_j J(W,X) = (Y -...
1,544
542
/* * Dungeon Engine * Copyright (C) 2020 szczypiorofix <szczypiorofix@o2.pl> */ #include "XMLHelper.h" int XMLHelper::xmlCharToInt(const xmlChar* a) { int c = 0, sign = 0, offset = 0, n = 0; if (a[0] == '-') { sign = -1; } if (sign == -1) { offset = 1; } else { offset = 0; } n = 0; for (c = offset;...
1,121
575
#include "hedgelib/io/hl_stream.h" #include <memory> namespace hl { stream::~stream() {} void stream::read_all(std::size_t size, void* buf) { const std::size_t readByteCount = read(size, buf); if (readByteCount != size) { // TODO: Throw a better error? HL_ERROR(error_type::unknown); } ...
5,518
1,860
// // TM & (c) 2021 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd. // All rights reserved. See LICENSE.txt for license. // #include <MaterialXTest/Catch/catch.hpp> #include <MaterialXFormat/XmlExport.h> namespace mx = MaterialX; TEST_CASE("File Path Predicate", "[xmlexport]") { mx::FileSearchPath sear...
1,529
508
#include <cstdio> #include <cstdlib> #include <ctime> #if 0 #define MAXT 1000 #define MAXN 1000 #endif #if 1 #define MAXT 20 #define MAXN 1000 #endif int T; void gen() { int N = rand() % MAXN + 1; int M = rand() % N + 1; int K = rand() % M + 1; printf("%d %d %d\n", N, M, K); --T; } int main() { srand(time...
394
211
#include "core.h" #include "wbcomprosaplayer.h" #include "keyboard.h" #include "rosaworld.h" #include "rosaframework.h" #include "wbeventmanager.h" #include "wbcomprosatransform.h" #include "wbcomprosacollision.h" #include "wbcomprosacamera.h" #include "wbcomprosafootsteps.h" #include "wbcomprosahealth.h" #include "wbc...
111,373
45,106
/*************************************************************************** * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and * * Martin Renou * * Copyright (c) QuantStack * * ...
3,283
847
#include "Liber_pch.h" #include "InputComponent.h" void Libero::InputComponent::HandleEvent(IEvent& ) { }
107
42
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2013 Vladislav Tyulbashev * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any person or org...
10,874
4,696
#pragma once #include "Hash.hpp" namespace Frozen { struct DagNode; struct Dag; } struct StatCache; struct Mutex; struct ThreadState; namespace CacheResult { enum Enum { DidNotTry, Failure, CacheMiss, Success, }; } struct CacheClient { static CacheResult::Enum Attempt...
787
243
#include "server.h" #include <string> #include <stdio.h> #include <unistd.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include <openssl/ssl.h> #include <openssl/err.h> #include <iostream> /** * Initializes the openssl library, creates SSL context, configures it * and creates ...
5,515
1,851
#include "pch.h" #include "RagdollComponent.h" RagdollComponent::RagdollComponent() { localCenterOfMass = {0.f, 0.f, 0.f}; wireframeModel = nullptr; } RagdollComponent::RagdollComponent(Model* wireframe) { localCenterOfMass = { 0.f, 0.f, 0.f }; wireframeModel = wireframe; } RagdollComponent::~RagdollComponent()...
550
221
// Copyright 2020 The Fuchsia Authors // // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT #include <zircon/assert.h> #include "main.h" // This is what ZX_ASSERT calls. // TODO(mcgrathr): print message, backtrace PHYS_S...
572
209
#include "differentiator.h" Differentiator::Differentiator(double n) {// the value of coefficient (N) is set as needed when the differentiator is created the integrator (I) is created with inital output equal zero N=n; I=new Integrator(0); } Differentiator::~Differentiator() { //the integrator (I) is deleted...
996
309
#include <bitbots_local_planner/bitbots_local_planner.h> #include <pluginlib/class_list_macros.h> PLUGINLIB_EXPORT_CLASS(bitbots_local_planner::BBPlanner, nav_core::BaseLocalPlanner) namespace bitbots_local_planner { BBPlanner::BBPlanner() { } void BBPlanner::initialize(std::string name, tf2_ros::B...
5,820
1,890
 //------------------------------------------------------------------------------ // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //------------------------------------------------------------------------------ #...
5,691
1,763
#ifndef PX_CG_OBJECT_GEOMETRY_HPP #define PX_CG_OBJECT_GEOMETRY_HPP #include "object/geometry/base_geometry.hpp" #include "object/geometry/box.hpp" #include "object/geometry/cone.hpp" #include "object/geometry/cylinder.hpp" #include "object/geometry/disk.hpp" #include "object/geometry/ellipsoid.hpp" #include "object/g...
576
218
#include "Utility.hpp" #define TINYOBJLOADER_IMPLEMENTATION #include <tiny_obj_loader.h> #include <SFML/Graphics.hpp> #include <iostream> #include <string> #include <fstream> #include <streambuf> #define ASSERT(expr) assert(expr) std::string Utility::LoadTextFile(const std::string& filepath) { std::ifstream t(...
6,197
2,107
#ifndef RSSI_HPP #define RSSI_HPP bool CommsFailed(); void RSSI_Check(); #endif
83
41
/* Copyright © 2018 Apple Inc. All rights reserved. * * Use of this source code is governed by a BSD-3-clause license that can * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause */ #include <unity/server/unity_server_control.hpp> #include <unity/server/unity_server_options.hpp> #i...
2,542
804
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved. #include "Serialization/PropertyLocalizationDataGathering.h" #include "UObject/Script.h" #include "UObject/ObjectMacros.h" #include "UObject/UObjectHash.h" #include "UObject/Class.h" #include "UObject/Package.h" #include "UObject/UnrealType.h" #include "UObj...
22,249
7,346
#include "AdvancedScoreModel.h" #include "FileManagement.h" #include "Fragmentation.h" #include "DeNovoDp.h" #include "QuickClustering.h" #include "EdgeModel.h" #include "FragmentSelection.h" #include "MSBlast.h" #include "PMCSQS.h" #include "PeakRankStats.h" #include "PeptideRankScorer.h" #include "DeNovoSo...
23,497
11,774
#pragma once #if defined(_WIN32) # define EXPORT __declspec(dllexport) #else # define EXPORT #endif
107
41
// // Created by wolf on 7/9/18. // #include "Subject.h" void Subject::Attach(Observer* observer) { observers_.emplace_back(observer); } // code from Mitch's in-class slide on erase-remove idiom void Subject::Detach(Observer* observer) { observers_.erase(std::remove_if(observers_.begin(), observers_.end(), ...
721
209
#include <util/util.h> #include "location.h" using namespace ast; const Location Location::None("<no location>"); Location::operator string() const { if ( this == &None ) return "<no location>"; string s = _file.size() ? _file : "<no filename>"; s += ":"; if ( _from >= 0 ) { if ( ...
457
158
/******************************************************************************* * Copyright (c) 2020 Matthew Krueger * * * * This software is provided 'as-is', without any express or implied ...
3,040
733
#include "PerspectiveCamera.h" PerspectiveCamera::PerspectiveCamera(const Vector3& e, const Vector3& look, const Vector3& u, unsigned int height, unsigned int width, float pixSize, const std::shared_ptr<AdaptiveSampler>& sampler, float field) ...
1,715
551
#include <sstream> #include "b_skill.h" #include "../../graphic/gra_lib.h" #include "../../other/help.h" #include "../../other/language.h" // Lix-Bildname namespace Api { SkillButton::SkillButton(const int nx, const int ny, const int nxl) : Button (nx, ny, nxl, 60), icon(GraLib::get_lix(LixEn::GARDEN), get_...
3,091
1,156
/* * File: FilesTest.cc * Author: mike * * Created on Jan 31, 2014, 10:25:33 AM */ #include "FilesTest.h" #include <vector> #include <string> #include "../src/easyeye/common/easyeye_utils.h" using namespace easyeye; using namespace std; CPPUNIT_TEST_SUITE_REGISTRATION(FilesTest); static bool Eq(const string&...
5,629
2,093
/* Runtime: 4 ms, faster than 98.81% of C++ online submissions for Trapping Rain Water. Memory Usage: 14.4 MB, less than 96.32% of C++ online submissions for Trapping Rain Water. */ class Solution { public: int trap(vector<int> &height) { int i = 0; int j = height.size() - 1; int vol = ...
748
247
#include "Curve.h" using namespace minidraw; Curve::Curve() { type_ = kCurve; finish = false; polygon.push_back(start); } Curve::~Curve() { } void Curve::update(int mode) { switch (mode) { case 0: finish = true; break; case 1: if (polygon.size() > 0) { polygon.back() = end; points.push_back(end...
918
470
// admin.cpp : Implementation of CsmtpadmApp and DLL registration. #include "stdafx.h" #include "metautil.h" #include "smtpadm.h" #include "smtpcmn.h" #include "smtpprop.h" #include "admin.h" #include "version.h" #include "oleutil.h" #include "metakey.h" #define SMTP_DEF_SERVICE_VERSION ( 0 ) // MCIS...
24,565
10,288
/******************************************************************************* * Copyright 2003-2010 LASMEA UMR 6602 CNRS/U.B.P * Copyright 2009-2010 LRI UMR 8623 CNRS/Univ Paris Sud XI * * Distributed under the Boost Software License, Version 1.0. * See accompanying f...
1,402
399
#include "mex.h" #include "src/maxpool3d.h" #include "src/wrapperMx.h" // [Y,ind] = MEX_MAXPOOL3D(X); forward pass // dZdX = MEX_MAXPOOL3D(dZdY, ind); backward pass // MEX_MAXPOOL3D(..., 'pool',pool, 'stride',s, 'pad',pad); options void mexFunction(int no, mxArray *vo[], int ni, mxArray const *v...
940
408
#include <string> #include "../core/basic.h" #include "./osplatformutil.h" enum class Platform { Unknown = 0, Windows = 1, Linux = 2, MacOS = 3, Android = 4, iOS = 5, FreeBSD = 6, OpenBSD = 7, Sun = 8 }; inline Platform GetPlatfom() { #if defined ARK_MSVC return Platform:...
493
189
#include "Comms.h" #include "Video_Decoder.h" //#include "Menu_System.h" //#include "Splash_Menu_Page.h" //#include "Main_Menu_Page.h" #include "utils/Clock.h" #include "IHAL.h" #ifdef RASPBERRY_PI # include "PI_HAL.h" #else # include "GLFW_HAL.h" #endif #include "imgui.h" #include "HUD.h" ...
10,370
3,441
/** * ================================================== * _____ * __|___ |__ __ __ _ ____ ____ _ * | ___| | _| |_ | |_| || \ | \ | | * | ___| ||_ _|| _ || \ | \| | * |______| __| |__| |__| |_||__|\__\|__/\____| * |_____| * * Ga...
3,850
1,404
// Exercise5.22.cpp // Ad // Rewrite the last example in this section using a loop. #include <iostream> using std::cin; using std::cout; using std::endl; int get_size(); int main() { int sz = get_size(); while (sz <= 0) { sz = get_size(); } // pause cin.get(); return 0; } in...
351
138
/* * Copyright (c) 2018, Billie Soong <nonkr@hotmail.com> * All rights reserved. * * This file is under MIT, see LICENSE for details. * * Author: Billie Soong <nonkr@hotmail.com> * Datetime: 2018/3/9 15:11 * */ #include <string> #include <list> #include <iostream> #include <algorithm> using namespace std; v...
2,788
1,075
// This file is part of Wintermute Engine // For conditions of distribution and use, see copyright notice in license.txt #include "StdAfx.h" #include "FilePickerDialog.h" #include "QtUtil.h" #include "Project.h" #include "QtUtil.h" namespace Armed { ///////////////////////////////////////////////////...
3,816
1,233
/* * NeutrinoReconstructionByApproximation.cpp * * Created on: Apr 2, 2012 * Author: lkreczko */ #include "../../interface/ReconstructionModules/NeutrinoReconstructionByApproximation.h" namespace BAT { const double initialBigValue = 123456789; boost::array<ParticlePointer, 2> NeutrinoReconstructionByAppro...
4,293
1,642
#include <src/payload_processor/runnable_payload_processor.h> #include <src/sensors/runnable_system_health_check.h> #include <src/telecomms/lithium.h> #include <src/util/message_codes.h> #include <src/util/msp_exception.h> #include <src/util/runnable_console_listener.h> #include <src/util/runnable_console_logger.h> #in...
3,579
1,039
/*FENCE1 - Build a Fence #math There is a wall in your backyard. It is so long that you can’t see its endpoints. You want to build a fence of length L such that the area enclosed between the wall and the fence is maximized. The fence can be of arbitrary shape, but only its two endpoints may touch the wall. Input The ...
885
286
// Copyright (c) 2013-2015 Vittorio Romeo // License: Academic Free License ("AFL") v. 3.0 // AFL License page: http://opensource.org/licenses/AFL-3.0 #ifndef HG_PACKDATA #define HG_PACKDATA namespace hg { struct PackData { std::string id, name; float priority; PackData( co...
478
175
#include <iostream> using namespace std; void variant1(), variant2(), variant3(), variant4(), variant5(), variant6(), variant7(), variant8(), variant9(), variant10(); int main() { int numEx; setlocale(0, ""); while (true) { cout << "\nВведите вар...
4,407
1,485
/* Copyright 2017 Hosang Yoon 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 wri...
20,157
7,550
#include<stdio.h> using namespace std; long long A,B,C; bool check(){ if(A>0 && B>0 && C>0) return A>C-B; if(A<0 && B<0 && C<0) return A>C-B; if(A>0 && B>0 && C<0) return true; if(A<0 && B<0 && C>0) return false; return A+B>C; } int main(void) { // freopen("in.txt","r",stdin); int T; sc...
648
332
#include <common/stdint.h> #include <boot/bootinfo.h> #include <pointers.h> #include <IO/APIC/apic.h> //COMMENT #include <smp/smp.h> //COMMENT #include <gdt/gdt.h> #include <gdt/tss.h> //COMMENT #include <paging/PageTableManager.h> #include <paging/PageFrameAllocator.h> #include <memory/memory.h> #include <memory/...
11,928
4,232
#include <Share.h> #include <bps/event.h> #include <bps/navigator.h> #include <bps/navigator_invoke.h> #include <screen/screen.h> #include <string.h> #include <string> #include <unistd.h> #include <vector> using namespace std; namespace openflShareExtension { void log(const char *msg) { /* FILE *logFile = fope...
3,404
1,368
// Copyright (C) 2018-2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // // pwl_design.cpp : simple activation function designer // #include <vector> #include <iostream> #include <limits> #include <cstdint> #include <algorithm> #ifdef _NO_MKL_ #include <cmath> #include "backend/make_pwl.hpp" #define S...
26,828
8,843
#include <new> #include <cassert> #include "uiwayblock.h" #include <QListWidget> #include <QLineEdit> #include <QDoubleSpinBox> #include <QCheckBox> #include <QPushButton> gui::uiblocks::UIWayBlock::UIWayBlock() : lstWays(nullptr), txtWayName(nullptr), dsbWayTotalTime(nullptr), cbWayClosed(nullptr), btnWayAdd(nullptr)...
2,008
785
#include "./headers/shader.h" #include "./headers/opengl_common.h" #define STB_IMAGE_IMPLEMENTATION_2 #include "./headers/stb_image.h" int hello_3d() { GLFWwindow* window = prepareWindow("hello_3d"); if (!window) { return -1; } Shader textureShader("./shaders/3d.shader.vs", "./shaders/3d.shader.fs"); float ...
3,833
1,683
//! [snippet1] // We include what we need for the test #include <gatb/gatb_core.hpp> #include <fstream> #include <queue> #include <stack> #include <map> using namespace std; #define DEBUG(a) //a #define INFO(a) //a /********************************************************************************/ /* Cmd-line: deb...
5,654
1,560
// Copyright 2008 by BBN Technologies Corp. // All Rights Reserved. #include "Generic/common/leak_detection.h" #include "Generic/common/limits.h" #include "Generic/common/UTF8InputStream.h" #include "Generic/common/ParamReader.h" #include "Generic/discTagger/DTTagSet.h" #include "Generic/discTagger/DTFeature...
5,666
2,513