text
string
size
int64
token_count
int64
#include <QtGui/QApplication> #include <boost/filesystem.hpp> #include "window.h" using namespace boost::filesystem; int main(int argc, char *argv[]) { current_path(path(argv[0]).parent_path()); //chdir() to executable's path QApplication a(argc,argv); Window window; return a.exec(); }
306
106
// Ivan Carvalho // Solution to https://www.urionlinejudge.com.br/judge/problems/view/1234 #include <cstdio> #include <cstring> #include <cctype> #include <iostream> int main(){ char frase[50]; while(std::cin.getline(frase,50)){ int tamanho = strlen(frase),i,valido=1; for(i=0;i<tamanho;i++){ char davez = frase...
543
285
#include <typeinfo> #include <cstdlib> #include <cstdio> #include <cstring> struct T { virtual ~T() {} }; struct rttiinfo { void* type; const char* name; void* base; }; T* f(const char* name) { static rttiinfo rti; void** vt = new void*[10]; static T object; memcpy(&rti, ((void***)&object)[0][-1], si...
422
186
#include <iostream> using namespace std; class Shape { protected: float width, height; public: void set(float a, float b) { width = a; height = b; } }; class Rectangle : public Shape { public: float area() { return width * height; ...
644
209
#include "rote.hpp" namespace rote{ bool CheckOrder(const Unsigned& outOrder, const Unsigned& inOrder){ if(outOrder != inOrder){ LogicError("Invalid redistribution: Objects being redistributed must be of same order"); } return true; } bool CheckNonDistOutIsPrefix(const TensorDistribution& outDist, cons...
4,929
1,869
#include "cmatrix.h" #include <iostream> struct dodgy; std::ostream& operator<< (std::ostream&, const dodgy&); static int initcount=0; static int destroycount=0; static int copycount=0; //static int assigncount=0; struct dodgy { int val; explicit dodgy(int valv =1234) : val(valv) { std::cerr << "Make: " <<...
1,960
788
// vim:ts=2:sw=2:expandtab:autoindent:filetype=cpp: /* The MIT License Copyright (c) 2008, 2009 Flusspferd contributors (see "CONTRIBUTORS" or http://flusspferd.org/contributors.txt) Permission is hereby granted, free of charge, to any person obtaining a copy of this software an...
22,360
8,525
#include <ast/AtomExprNode.h> using namespace PythonCoreNative::RunTime::Parser::AST; using namespace PythonCoreNative::RunTime::Parser; AtomExprNode::AtomExprNode( unsigned int start, unsigned int end, std::shared_ptr<Token> op1, ...
831
257
//Ultrasonic Ranger #define ECHO A4 #define TRIG A5 #include <Servo.h> Servo rangerServo; // function prototypes void allStop(); void forward(); void back(); void right(); void left(); int findRange(){ //Dist in cm int range; digitalWrite(TRIG,LOW); delayMicroseconds(2); ...
1,070
419
#include "server_state_game.hpp" #include "server_state_idle.hpp" #include "server_instance.hpp" #include <filesystem.hpp> namespace server { namespace state { game::game(server::instance& serv) : base(serv, server::state_id::game, "game"), saving_(false) { // TODO: add all game components to this containe...
5,203
1,512
/** * UGENE - Integrated Bioinformatics Tools. * Copyright (C) 2008-2012 UniPro <ugene@unipro.ru> * http://ugene.unipro.ru * * 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...
5,784
1,762
#include "Communicator.h" namespace WPEFramework { namespace RPC { static Core::ProxyPoolType<RPC::AnnounceMessage> AnnounceMessageFactory(2); static void LoadProxyStubs(const string& pathName) { static std::list<Core::Library> processProxyStubs; Core::Directory index(pathName.c_str(), _T...
7,724
2,198
#include "MCLog.h" #include <stdarg.h> #include <string.h> #include <stdio.h> #include <time.h> #include <sys/time.h> #include <pthread.h> #include <unistd.h> static pid_t sPid = -1; bool mailcore::logEnabled = false; __attribute__((constructor)) static void initialize() { sPid = getpid(); } static void logInte...
1,954
746
$NetBSD: patch-mozilla-release_media_webrtc_trunk_webrtc_modules_video__capture_linux_device__info__linux.cc,v 1.1 2020/07/24 07:29:32 fox Exp $ * Fix buiuld under NetBSD. NetBSD's sys/videoio.h does not have v4l2_capability.device_caps and video capture does not work for me anyway. Taken from www/firefox --- mo...
1,945
793
//========================================================================= // 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 // // ...
3,101
943
// Copyright © 2013 the Search Authors under the MIT license. See AUTHORS for the list of authors. #pragma once #include "../search/search.hpp" #include "../utils/geom2d.hpp" #include "../utils/pool.hpp" #include <vector> template <class D> class Flrtastar2 : public SearchAlgorithm<D> { private: typedef typename D::...
12,103
5,644
#ifndef SHADER_HPP #define SHADER_HPP #include <string> #include <GLFW/glfw3.h> class ShaderProgram { GLuint programID; public: bool load(const char* vertexFilePath, const char* fragmentFilePath); void use(); GLuint getProgramID(); private: static bool loadShaderFromFile(const GLuint shade...
626
221
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "EnginePrivate.h" #include "EngineFontServices.h" #include "SlateBasics.h" #if !UE_SERVER #include "ISlateRHIRendererModule.h" #endif FEngineFontServices* FEngineFontServices::Instance = nullptr; FEngineFontServices::FEngineFontServices() { chec...
2,759
959
/** * The MIT License (MIT) * * Copyright (c) 2015 Nathan Osman * * 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...
2,715
915
/* * Copyright (c) 2017 Darren Smith * * wampcc is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. */ #include "wampcc/wampcc.h" #include "wampcc/utils.h" #include <algorithm> #include <sstream> #include <getopt.h> /* for getopt_long; standa...
16,397
5,572
/** * */ #ifndef _WATER_HPP_INCLUDED_ #define _WATER_HPP_INCLUDED_ #include "euclidean2/vertex.hpp" #include "euclidean2/system/material.hpp" #include "euclidean2/system/texture.hpp" #include <climits> #include <vector> static constexpr int MIN_TESSELATIONS = 16; static constexpr int MAX_TESSELATIONS = 512; str...
1,375
543
/* Problem Statement: ----------------- Given an array Arr of N positive integers, find K largest elements from the array. The output elements should be printed in decreasing order. Example 1: --------- Input: N = 5, K = 2 Arr[] = {12, 5, 787, 1, 23} Output: 787 23 Explanation: 1st largest element in the array is 787...
1,284
501
// Copyright 2022 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "typecd/usb_monitor.h" #include <utility> #include <base/files/file_util.h> #include <base/logging.h> #include "base/strings/string_number_c...
5,646
2,001
/************************************************************** * * 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 y...
9,163
3,187
#include "pch.h" #include "GameObject.h" #include "Renderer.h" Actor::Actor(Model* model, SMatrix& transform) : _steerComp(this), _transform(transform), _collider(Collider(BoundingVolumeType::BVT_SPHERE, this, true)) { _renderables.reserve(model->_meshes.size()); for (MeshNode& meshNode : model->_meshNodeTree) ...
2,549
974
// This program demonstrates overloaded functions to calculate // the gross weekly pay of hourly-wage or salaried employees. #include <iostream> #include <iomanip> using namespace std; // Function prototypes char getChoice(); double calcWeeklyPay(int, double); double calcWeeklyPay(double); int main() { char selecti...
2,952
810
#ifndef GUI_H #define GUI_H #include <QtOpenGL> #include <QGLWidget> #include <QString> #include <QList> #include "Print.hpp" #include "Dialog.hpp" #include "../config.hpp" #include "../solver/FluidSolver2D.hpp" #include "../solver/FloatMatrix2D.hpp" #include "LeapMotion.h" /** * Class herited from myGLWidget corr...
2,768
865
#include "Queue.h" // `int size()` - returns the number of elements in the stack (0 if empty) int Queue::size() const { return mySize; } // `bool isEmpty()` - returns if the list has no elements, else false bool Queue::isEmpty() const { return mySize==0 ? true : false; } // `void enqueue(int val)` - enqueue a...
618
215
#include "SoundManager.h" namespace Indecisive { static const std::string _PATH = ".\\/Assets\\/"; bool SoundManager::Initialize(HWND hwnd) { // TODO: Too many lines, just return method bool result; // Initialize direct sound and the primary sound buffer. result = InitializeDirectSound(hwnd); if (!resu...
8,595
3,268
#include "boost/test/unit_test.hpp" #include "synacor/instructions.h" #include "synacor/io.h" #include "synacor/memory_storage.h" #include "synacor/stack.h" #include "test_utils.h" #include "boost/scope_exit.hpp" #include <sstream> #ifdef _MSC_VER # pragma warning( disable : 4459 ) #endif namespace { struct Inst...
10,466
4,349
#ifndef INERTIA_HPP #define INERTIA_HPP #include <vector> #include "Omega_h_remotes.hpp" #include "Omega_h_vector.hpp" namespace Omega_h { namespace inertia { struct Rib { std::vector<Vector<3>> axes; }; Read<I8> mark_bisection( CommPtr comm, Reals coords, Reals masses, Real tolerance, Vector<3>& axis); Rea...
619
240
#include "ContactButton.h" #include "ConfigSmtp.h" #include "smtp.h" #include <QMimeData> #include <QPushButton> #include <QMessageBox> #include <QList> #include <QWidget> ContactButton::ContactButton(QPushButton *parent) : QPushButton(parent) { setBaseSize(230,125); setFixedSize(230,125); /...
1,507
494
/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.BarCode 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.BarCode for .NET API from http://www.a...
2,769
939
/*----------------------------------------------------------------------------- * 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...
7,411
3,172
#ifndef I2C_H_ #define I2C_H_ #include "driver/gpio.h" #include "rom/ets_sys.h" class I2C { private: gpio_num_t scl_pin, sda_pin; public: I2C(gpio_num_t scl, gpio_num_t sda); void init(uint8_t scl_pin, uint8_t sda_pin); bool start(void); void stop(void); bool write(uint8_t data); uint8_t read(void); void set...
347
176
#include <bits/stdc++.h> using namespace std; int const N = 3001; int n, g[N][N], x, y, xx, yy; long long dp1[2 * N], dp2[2 * N], sol1 = -1, sol2 = -1; int main() { scanf("%d", &n); for(int i = 1; i <= n; ++i) for(int j = 1; j <= n; ++j) { scanf("%d", &g[i][j]); dp1[i + j] += g[i][j]; dp2[i...
797
393
#include "sdl.hpp" #include "./cpu.hpp" #include "./gdb.hpp" #include "./gpio.hpp" #include "./screen.hpp" #include "./state.hpp" #include "./sd.hpp" #include "./adc.hpp" #include "gif.h" extern volatile EmuState emustate; extern volatile bool hasQuit; extern std::string srcPath; extern "C" void reset(); GifWriter g...
9,609
3,993
/***************************************************************************\ * * File: Scheduler.cpp * * Description: * Scheduler.cpp maintains a collection of timers that are created and used * by the application for notifications. * * * History: * 1/18/2000: JStall: Created * * Copyright (C) 2000 ...
14,639
4,250
/////////////////////////////////////////////////////////////////////////////// // Copyright (C) Microsoft Corporation, 1998. // // rrutil.hpp // // Direct3D Reference Rasterizer - Utilities // /////////////////////////////////////////////////////////////////////////////// #ifndef _RRUTIL_HPP #define _RRUTIL...
27,470
11,029
#include "LieroX.h" #include "SkinnedGUI/CommonDialogs.h" #include "SkinnedGUI/CButton.h" #include "SkinnedGUI/CTabControl.h" #include "SkinnedGUI/CLabel.h" #include "SkinnedGUI/CTextbox.h" #include "SkinnedGUI/CSlider.h" #include "SkinnedGUI/CCheckbox.h" #include "SkinnedGUI/CListview.h" #include "MathLib.h" #includ...
18,891
6,883
/* Copyright (C) 2021 Quaternion Risk Management Ltd All rights reserved. This file is part of ORE, a free-software/open-source library for transparent pricing and risk analysis - http://opensourcerisk.org ORE is free software: you can redistribute it and/or modify it under the terms of the Modified BSD License...
4,847
1,520
#include "window.h" namespace toy { namespace { static const wchar_t* WINDOW_CLASS = L"hlsl-toy-class"; } // anonymous namespace LRESULT WINAPI Window::windows_proc(HWND handle, UINT message, WPARAM wparam, LPARAM lparam) { Window* window = reinterpret_cast<Window*>(::GetWindowLong(handle, GWL_USERDATA)); if (wi...
5,754
2,367
#ifndef EXPRESSIONEVALUATOR_HPP #define EXPRESSIONEVALUATOR_HPP #include <string> #include <vector> #include "Errors.hpp" #include "DataTypes.hpp" ErrorTypes EvalExpression( const std::vector< DataType::Data > & dataline, const int & from, const int & to, Variable & result ); ErrorTypes GenPostfix( const std::vecto...
1,070
342
/// \file // Range v3 library // // Copyright Eric Niebler 2014 // // Use, modification and distribution is subject to 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) // // Project home: https://github.com/ericniebler/range-v...
5,536
1,633
// Copyright 2017 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "xfa/fxfa/parser/cxfa_list.h" #include "core/fxcrt/fx_extension.h" #...
879
345
#include "BListenUDP.hh"
26
14
/* * Copyright 2011 - 2019 Centreon (https://www.centreon.com/) * * 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 ...
5,173
2,191
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/permissions/last_tab_standing_tracker.h" #include "chrome/browser/profiles/profile.h" #include "url/gurl.h" LastTabStandingTrac...
1,821
592
#include "ldpcsim.h" #include <omp.h> namespace ldpc { ldpc_sim::ldpc_sim(const std::shared_ptr<ldpc_code> &code, const decoder_param &decoderParams, const channel_param &channelParams, const simulation_param &simulationParams) : ldpc_si...
14,555
4,404
/* (c) 2020 KAI OS TECHNOLOGIES (HONG KONG) LIMITED All rights reserved. This * file or any portion thereof may not be reproduced or used in any manner * whatsoever without the express written permission of KAI OS TECHNOLOGIES * (HONG KONG) LIMITED. KaiOS is the trademark of KAI OS TECHNOLOGIES (HONG * KONG) LIMITE...
8,392
2,713
/* * 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,043
629
#include <cstddef> #include "extract_common.h" u32 clean_up_vertex_indices(std::vector<u32>& idx) { std::vector<u32> fixed; u32 num_tris = 0; bool looking_for_start = true; size_t i_of_start; for (size_t i = 0; i < idx.size(); i++) { if (looking_for_start) { if (idx[i] != UINT32_MAX) { loo...
1,116
457
#include <sltbench/Bench.h> #include <algorithm> #define _USE_MATH_DEFINES #include <math.h> #include <numeric> // A simple shorthand for single precision floating point. using floatSP = float; // A simple shorthand for double precision floating point. using floatDP = double; // A simple shorthand for quadruple preci...
5,471
1,698
/* Copyright 2008 (C) Nicira, Inc. * * This file is part of NOX. * * NOX 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 3 of the License, or * (at your option) any later version. * * N...
2,514
866
//! Unit Tests for MPAGSCipher CaesarCipher Class #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "Cipher.hpp" #include "CipherMode.hpp" #include "CaesarCipher.hpp" #include "PlayfairCipher.hpp" #include "VigenereCipher.hpp" bool testCipher( const Cipher& cipher, const CipherMode mode, ...
1,420
619
/************************************************************** * * 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 y...
20,090
7,540
#include "crc32.hpp" std::uint32_t get_crc32(const std::string& str) { return recursive_crc32(0, str.c_str(), 0, str.size(), 0, 0x4C11DB7); }
147
76
#include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include "Group.hpp" #include "bus.hpp" #include "TouristGenerator.hpp" #include "TouristOrganizer.hpp" using namespace std; #define INPUT_FILE "input.txt" #define NODES_FILE "T03_nodes_X_Y_Fafe.txt" #define EDGES_FILE "T0...
884
361
/* Problem Statement: https://leetcode.com/problems/power-of-two/ Time: O(1) Space: O(1) Author: Mohammed Shoaib, github.com/Mohammed-Shoaib */ class Solution { public: bool isPowerOfTwo(int n) { return n > 0 && !(n & (n - 1)); } };
237
105
#include "DitherAdapter.h" #include <dither.h> #include <test/ConfigGenerator.h> #include <util/Util.h> TestConfigurations DitherAdapter::generate (Plugin* plugin, const GenerateCommand::Parameters& parameters) { return generate (plugin->getInfo(), parameters); } TestConfigurations DitherAdapter::gene...
3,146
943
// // c3dGlobalTimer.cpp // HelloOpenGL // // Created by wantnon (yang chao) on 12-11-19. // // #include "c3dGlobalTimer.h" static Cc3dGlobalTimer*s_globalTimer=NULL; Cc3dGlobalTimer*Cc3dGlobalTimer::sharedGlobalTimer(){ if(s_globalTimer==NULL){ s_globalTimer=new Cc3dGlobalTimer(); } return s_gl...
571
216
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: CIM.Friend.proto #include "CIM.Friend.pb.h" #include <algorithm> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/extension_set.h> #include <google/protobuf/wire_format_lite.h> #include <google/protobuf/io/zero_copy_stream_i...
16,168
6,110
/*** * * Copyright (c) 1996-2001, Valve LLC. All rights reserved. * * This product contains software technology licensed from Id * Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc. * All Rights Reserved. * * Use, distribution, and modification of this source code and/or resulting * obje...
5,658
2,732
/* * Data Exchanger Implementation * Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com) * * 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) * * @file: nana/system/dataexch.cpp * @description: An implementa...
7,158
3,125
#include "atkui/framework.h" #include "atk/toolkit.h" #include <deque> using namespace atk; using glm::vec3; class Steve : public atkui::Framework { public: Steve() : atkui::Framework(atkui::Perspective) { background(vec3(0)); cameraPos = vec3(-500, 500, -500); setCameraEnabled(false); ...
4,497
1,870
int PL ,du ,lUu , h2, KjY1 ,ez ,Ilu ,l ,uVy8 , YaZ ,/*Bv*/ UkM , wGDvh, ho ,XNDO ,gb9nx , HW, f ,H,KHvs85Q , qvf , Pu , Vf85E, T ,//H fjK, kIb/*kl0*/ , TEE,s2 ,// rqqN38 ,HiA2 , H4av , j, Qy , /*Q8*/ Tal,bYpV , mfW /*Dk*/;void f_f0 () { volatile int sS1s, //Z Ajs ,lC//fco1 //0iGM ,C9I, /*N1*/...
9,354
6,444
// -*- C++ -*- /*! * @file LocalServiceAdmin.cpp * @brief SDO service administration class * @date $Date$ * @author Noriaki Ando <n-ando@aist.go.jp> * * Copyright (C) 2011 * Noriaki Ando * Intelligent Systems Research Institute, * National Institute of * Advanced Industrial Science and Te...
6,949
2,389
#include "UtilsString.h" #include "Error.h" #include <cstring> #include <algorithm> #include <stdlib.h> void Utils::checkEmptyValue(int value){ if (value == 0) { std::string message = "Some values of attributes are missing"; Error er(message); throw er; } }; FPType Utils::extractNumber(const std::string& lin...
3,658
1,491
// Copyright 2017 Elias Kosunen // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
4,992
1,727
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <vector> #include <map> #include <taglib/mpegfile.h> #include <taglib/fileref.h> #include <taglib/tag.h> #include <taglib/audioproperties.h> using namespace TagLib; #include <scx/Conv.h> #include <scx/FileHelper.h> #include <scx/...
6,216
2,375
#include "util.hxx" #include <dilib/state.hxx> #include <random> #include <chrono> #include <thread> int main(int argc, char *argv[]) { if (argc > 2) { std::string name = argv[1]; std::string did = argv[2]; std::cout << "StateWriter(" << name << ")" << std::endl; dilib::StateWriter<dilib::demo::Dev...
932
325
#include <iostream> using namespace std; class BaseString { protected: char *p; int len; int capacity; public: BaseString(char *ptr) { //cout<<"\nBase Constructor 1\n"; len = 0; for (int i = 0; ptr[i] != '\0'; i++) { len++; } capacity = (len >= 2...
4,191
1,518
/* * gRenderManager.cpp * * Created on: 4 Ara 2020 * Author: Acer */ #include "gRenderer.h" #include "gLight.h" const int gRenderer::SCREENSCALING_NONE = 0; const int gRenderer::SCREENSCALING_MIPMAP = 1; const int gRenderer::SCREENSCALING_AUTO = 2; const int gRenderer::DEPTHTESTTYPE_LESS =...
21,808
8,827
/* * Copyright 2015 Alexey Baranov <me@kotiki.cc>. 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 re...
1,643
497
#pragma once #include "../handle.hpp" #include <vg/vg.pb.h> #include <functional> #include "../position.hpp" namespace vg { namespace algorithms { using namespace std; map<pos_t, char> next_pos_chars(const PathPositionHandleGraph& graph, pos_t pos); } }
260
97
#include <stdio.h> #include <ctype.h> int main() { int a[20], i=0; char ch; while((ch=getchar())>='0'&&ch<='9') a[i++]=ch-'0'; while(i>0&&a[--i]==0); for(;i>=0;i--) printf("%d",a[i]); if(ch=='\n') return 0; printf("%c",ch); if(ch=='%') return 0; i=0; while((ch=getchar())>='0'&&ch<='9...
468
289
/* * https://leetcode.com/problems/partition-list/ */ #include <iostream> #include <vector> #include <string> #include <algorithm> #include <iomanip> #include <cstdlib> #include <cstdio> #include <map> #include <set> #include <deque> #include <queue> using namespace std; /* //Definition for singly-linked list. str...
805
351
#include "reset_key_data.h" namespace test_data { const uint8_t kResetKeyPem[] = "-----BEGIN RSA PRIVATE KEY-----\n\ MIIEpAIBAAKCAQEAo0IoAa5cK7XyAj7u1jFStsfEcxkgAZVF9VWKzH1bofKxLioA\n\ r5Lo4D33glKehxkOlDo6GkBj1PoI8WuvYYvEUyxJNUdlVpa1C2lbewEL0rfyBrZ9\n\ 4cp0ZeUknymYHn3ynW4Z8sYMlj7BNxGttV/jbxtgtT5WHJ+hg5/4/ifCPucN17Bt...
7,029
6,114
#include "auth_server.hpp" #include <boost/program_options.hpp> #include <iostream> #include <fstream> int main( int argc, char **argv ) { namespace po = boost::program_options; std::string bind_address; uint16_t bind_port; std::string zone_filename; std::string apex; po::options_descript...
1,357
499
#include "Catch.hpp" #include "RaZ/Render/Renderer.hpp" #include "RaZ/Render/Shader.hpp" namespace { inline void checkShader(const Raz::Shader& shader, const Raz::FilePath& path = {}) { CHECK_FALSE(Raz::Renderer::hasErrors()); CHECK(shader.isValid()); CHECK(shader.getPath() == path); shader.compile(); CHE...
9,980
3,366
#include "GLES3Renderer.h" CGLES3RenderTextureManager::CGLES3RenderTextureManager(void) { } CGLES3RenderTextureManager::~CGLES3RenderTextureManager(void) { for (const auto& itRenderTexture : m_pRenderTextures) { delete itRenderTexture.second; } } CGLES3RenderTexture* CGLES3RenderTextureManager::Get(uint32_t na...
1,145
454
// Copyright (c) 2013 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 "ui/gl/android/surface_texture_bridge.h" #include <android/native_window_jni.h> // TODO(boliu): Remove this include when we move off ICS. #...
3,811
1,292
#include <algorithm> #include <cstdio> #include <cstring> struct point { char name; int neighbor_num; char neighbor[500]; }; bool comp(point a, point b) { return a.name < b.name; } int main() { point point_list[100]; char str[500] = {'\0'}; int point_num = 0; while (gets(str) != NULL)...
1,825
632
// Created by amoylel on 06/09/2018. // Copyright (c) 2018 amoylel All rights reserved. #ifndef AMO_CLIENT_SOCKET_63DEE874_EDFB_4063_A818_BA44CA9D0782_HPP__ #define AMO_CLIENT_SOCKET_63DEE874_EDFB_4063_A818_BA44CA9D0782_HPP__ #include <iostream> #define ST_ASIO_REUSE_OBJECT //use objects pool //#define ST_ASIO...
5,295
1,711
//3. roots of quadratic equation #include <iostream> #include <cmath> using namespace std; int main(){ cout<<" please enter a, b and c according to your quadratic equation ax^2 + bx + c = 0 "<<endl; float a,b,c,r1,r2;// where a, b and c are coefficients as per quadratic equation ax^2 + bx + c = 0 and r1, r2 ar...
577
239
///////////////////////////////////////////////////////////// // // // Copyright (c) 2003-2017 by The University of Queensland // // Centre for Geoscience Computing // // http://earth.uq.edu.au/centre-geoscience-computing // // ...
1,534
481
#include "usart.h" #include "mutils.h" Usart::Usart() : fd_(-1), device_name_("") { } Usart::Usart(const char* name, int baud_rate, int databits, int stopbits, char parity, int flow_ctrl) { Open(name, baud_rate, databits, stopbits, parity, flow_ctrl); } int Usart::Open(const char* name, int baud_rate, int dat...
3,702
1,699
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information abo...
960
301
/* A. A+B (Trial Problem) time limit per test1 second memory limit per test: 256 megabytes inputstandard input outputstandard output You are given two integers 𝑎 and 𝑏. Print 𝑎+𝑏. Input The first line contains an integer 𝑡 (1≤𝑡≤104) — the number of test cases in the input. Then 𝑡 test cases follow. Each test c...
826
374
#include <AR/gsub_es.h> #include <Eden/glm.h> #include <jni.h> #include <ARWrapper/ARToolKitWrapperExportedAPI.h> #include <unistd.h> #include <android/log.h> #define JNIFUNCTION_DEMO(sig) Java_org_artoolkit_ar_samples_ARSimpleNativeCars_SimpleNativeRenderer_##sig extern "C" { JNIEXPORT void JNICALL JNIFUNCTION_DE...
3,997
1,644
#include "pch.h" #include "Editor.h" #include "Animation/Components.h" #include "Animation/Animation.h" #include "Scripting/Components.h" #include "Core/Time.h" #include "Core/ModelImporter.h" #include "Renderer/SpriteRenderer.h" //#include "GameUI/Widget.h" #include <ImGuizmo.h> #include <windows.h> #include <commdlg...
68,205
27,073
/*! \file common.hpp */ #ifndef INDIGOX_UTILS_COMMON_HPP #define INDIGOX_UTILS_COMMON_HPP #include <array> #include <bitset> #include <algorithm> #include <iterator> #include <memory> #include <string> #include <type_traits> // forward definitions of serilisation stuff namespace cereal { class access; class Por...
5,216
1,794
#include "InformationManager.h" #include "MiraBotMain.h" #include "Global.h" using namespace MiraBot; /// <summary> /// Here we save important information through the game e.g. enemy race and where they are. /// </summary> InformationManager::InformationManager() { //// Save positions of all chokepoints in main bas...
4,986
1,736
#include "..\include\Spectre2D\FileSystem.h" namespace sp { FileSystem::FileSystem(bool appdata) { if (appdata) { #if defined(_WIN32) char* appbuff; size_t len; _dupenv_s(&appbuff, &len, "APPDATA"); current_path = appbuff; #elif defined(__linux__) current_path = "~/.local/"; #endif } else ...
4,165
1,658
#include<iostream> #include<iomanip> using namespace std; int main(){ int cod_peca1, num_peca1, cod_peca2, num_peca2; double valor_unit_peca1, valor_unit_peca2; cin >> cod_peca1 >> num_peca1 >> valor_unit_peca1; cin >> cod_peca2 >> num_peca2 >> valor_unit_peca2; cout << fixed << setprecision(2); cout <<...
427
194
/** 852. Peak Index in a Mountain Array Let's call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1] Given an array that is definitely a mountain, return any i such that A[0]...
860
370
///////////////////////////////////////////////////////////////////////////// // Purpose: wxID_ strings // Author: Ralph Walden // Copyright: Copyright (c) 2020 KeyWorks Software (Ralph Walden) // License: Apache License -- see ../../LICENSE ///////////////////////////////////////////////////////////////////////...
3,286
1,614
// // MessagePack for C++ static resolution routine // // Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi // // 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) // #ifndef MSGPACK_V2_...
882
393
#include <iostream> using namespace std; int main(){ int n, m, resultado; cin >> n; cin >> m; resultado=n-m; cout << resultado << endl; return 0; }
155
63
#include "dna_block.hpp" DNABlock::DNABlock() { }
51
26