text
string
size
int64
token_count
int64
#include "multiplier_LT.hh" multiplier_LT::multiplier_LT(sc_module_name name_): sc_module(name_), target_socket("target_socket"), pending_transaction(NULL) { target_socket(*this); } void multiplier_LT::b_transport(tlm::tlm_generic_payload & trans, sc_time & t) { timing_annotation = SC_ZERO_TIME; ioDataStruct =...
1,878
682
#include <AirTester.h> #include <iostream> TEST(other_tests, test_other) { EXPECT_TRUE(false); EXPECT_TRUE(!true); EXPECT_TRUE(!!false); EXPECT_TRUE(!!!!!false); EXPECT_TRUE(false); // std::cout << "This is another test!" << std::endl; }
244
103
#include "UnsortedType.h" template<class ItemType> UnsortedType<ItemType>::UnsortedType() { length=0; currentPos=-1; } template<class ItemType> void UnsortedType<ItemType>::MakeEmpty() { length =0; } template<class ItemType> bool UnsortedType<ItemType>::IsFull() { return (length == MAX_ITEMS); } tem...
1,307
432
//********************************************************* // Control.cpp - Program Control //********************************************************* #include "ProblemSelect.hpp" #include "Utility.hpp" //--------------------------------------------------------- // Program_Control //-------------------------------...
5,366
2,091
#include <iostream> #include <string.h> #include <SDL.h> #include <SDL_image.h> #include "..\include\SDL_helper.h" #include <res_path.h> #include <cleanup.h> #include "Minefield.h" #include "mineFieldIO.h" #include "main.h" #include <ctime> const int SCREEN_WIDTH = 1080; const int SCREEN_HEIGHT = 810; const int BUTTO...
18,123
7,612
class Solution { public: bool isLongPressedName(string name, string typed) { int a = 0, b = 0, n = name.size(), m = typed.size(); while (a < n && b < m) { if (name[a++] != typed[b++]) return false; while (b > 0 && name[a] != typed[b] && typed[b] == typed[b - 1]) ++b; ...
364
132
/* * Struck: Structured Output Tracking with Kernels * * Code to accompany the paper: * Struck: Structured Output Tracking with Kernels * Sam Hare, Amir Saffari, Philip H. S. Torr * International Conference on Computer Vision (ICCV), 2011 * * Copyright (C) 2011 Sam Hare, Oxford Brookes Universi...
2,542
1,044
#pragma once #include <memory> #include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include "GameState.hpp" #include "PlayState.hpp" #include "Background.hpp" /** * @brief The PauseState class This the pause menu. * The user can decide to resume, restart or quit. */ class PauseState : public GameState { pub...
1,693
589
#pragma once #include "vcl/vcl.hpp" #include "skeleton.hpp" namespace vcl { enum Marine_Animations { IDLE, WALK, RUN, }; struct marine_animation_structure { bool transition = false; float transitionStart; Marine_Animations current_animation = IDLE; ...
991
285
/******************************************************************* ** This code is part of Breakout. ** ** Breakout is free software: you can redistribute it and/or modify ** it under the terms of the CC BY 4.0 license as published by ** Creative Commons, either version 4 of the License, or (at your ** option) any la...
1,018
315
#include "managementD3D.h" #include "utility.h" ManagementD3D::ManagementD3D() { swapChain_ = NULL; device_ = NULL; devcon_ = NULL; uavBackBuffer_ = NULL; rtvBackBuffer_ = NULL; dsvDepthBuffer_ = NULL; } ManagementD3D::~ManagementD3D() { SAFE_RELEASE(swapChain_); SAFE_RELEASE(device_); SAFE_RELEASE(devco...
4,638
2,178
#include <ros/ros.h> #include <aidu_elevator/actions/moveoutelevator.h> #include <aidu_robotarm/robot_arm_positions.h> #include <aidu_vision/DistanceSensors.h> #include <sensor_msgs/JointState.h> #include <geometry_msgs/Twist.h> #include <math.h> using namespace aidu::elevator; MoveOutElevator::MoveOutElevator(ros::N...
1,755
673
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. #define LOG_WITH_G...
3,034
1,002
#pragma once #include "tds/ip/tcp_socket.hpp" #include <span> #include <vector> namespace tds::protocol { class Receiver { public: explicit Receiver(ip::TcpSocket& socket); Receiver(const Receiver&) = delete; Receiver& operator=(const Receiver&) = delete; std::span<const char...
499
164
/******************************************************************************* * Copyright 2020-2022 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.apa...
2,842
1,008
#include "../../amalgamated/rfc_amalgamated.h" class MyWindow : public KFrame, public KButtonListener { protected: KButton btn1; public: MyWindow() { this->SetText(L"My Window"); this->Create(); btn1.SetPosition(10, 10); btn1.SetText(L"My Button"); btn1.SetListener(this); // set MyWindow class as butt...
770
314
#include "core/ecs/system_manager.h" #include "core/ecs/tags.h" #include <entt/core/hashed_string.hpp> #include <entt/meta/factory.hpp> #include <algorithm> namespace hg { std::vector<SystemManager::SystemDescriptor> SystemManager::m_systems[2]; void SystemManager::commit() { size_t current_tag_index = 0; ...
3,494
1,005
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE expected #include <coco/combix/combinators.hpp> #include <coco/combix/iterator_stream.hpp> #include <coco/combix/primitives.hpp> #include <coco/combix/chars.hpp> #include <coco/combix/parser.hpp> #include <coco/combix/lazy_fun.hpp> #include <boost/test/unit_test.h...
4,910
1,901
#ifndef STATIC_LINK #define IMPLEMENT_API #endif #if defined(HX_WINDOWS) || defined(HX_MACOS) || defined(HX_LINUX) #define NEKO_COMPATIBLE #endif #include <hx/CFFI.h> #include "OpenFLUnityAds.h" using namespace openflunityads; static void openflunityads_init (value cb, value gameId, value testmode, value debugm...
1,624
669
#ifndef FRAMESET_H #define FRAMESET_H #include "frame.cc" #include "stream_profile_extractor.cc" #include "utils.cc" #include <iostream> #include <librealsense2/hpp/rs_types.hpp> #include <napi.h> using namespace Napi; class RSFrameSet : public ObjectWrap<RSFrameSet> { public: static Object Init(Napi::Env env, Obj...
6,727
2,662
#include <iostream> #include <sstream> #include <cassert> #include "./utils.hpp" #include "../libraries/core/serializers.hpp" int main() { MessageBuilder builder; builder.writeMessageType(MessageType::CLOSE_REQUEST); builder.write((u_int8_t)2); builder.write((int32_t)0x12345678); builder.write((u_int32_t)...
927
496
#include <boost/test/unit_test.hpp> #include "lineside/boparraymashdata.hpp" #include "lineside/boparraymash.hpp" #include "lineside/linesideexceptions.hpp" #include "exceptionmessagecheck.hpp" #include "mockmanagerfixture.hpp" BOOST_AUTO_TEST_SUITE(BOPArrayMASHData) // --------------- BOOST_AUTO_TEST_SUITE(Extrac...
7,730
3,319
#include "vpm/Window.hpp" namespace VPM { bool Window::m_isClosed = false; bool Window::getIsClosed() const { return m_isClosed; } }
148
62
#include <string> /** * These constants are topic names with special significance to the web * visualizer. * */ namespace webviz_constants { /** * @brief (amrl_msgs/RobofleetStatus) Robofleet status information for listing * robot in webviz overview. */ static const std::string status_topic = "status"; /** * ...
1,543
499
#include "CBarney.h" class CUlkata : public CBarney { void Spawn(); void Precache(); int Classify(); }; LINK_ENTITY_TO_CLASS(monster_ulkata, CUlkata); void CUlkata::Spawn() { Precache(); SET_MODEL(ENT(pev), "models/ulkata.mdl"); UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX); pev->solid = SOLID_...
1,480
702
/* ******************************************************************** */ /* Algoritmo Branch-And-Bound Secuencial */ /* ******************************************************************** */ #include <cstdlib> #include <cstdio> #include <iostream> #include <fstream> #include <st...
3,190
1,368
// -!- C++ -!- ////////////////////////////////////////////////////////////// // // System : // Module : // Object Name : $RCSfile$ // Revision : $Revision$ // Date : $Date$ // Author : $Author$ // Created By : Robert Heller // Created : Sun Feb 17 15:35:50 2019 /...
15,878
5,707
#include "LPD8806.h" // Arduino library to control LPD8806-based RGB LED Strips // (c) Adafruit industries // MIT license /*****************************************************************************/ // Constructor for use with arbitrary clock/data pins: LPD8806::LPD8806(uint16_t n, uint8_t dpin, uint8_t cpin) { ...
4,036
1,642
class Solution { public: double largestTriangleArea(vector<vector<int>>& points) { double res = 0; for (vector i : points) for (vector j : points) for (vector k : points) res = max(res, 0.5 * (i[0] * (j[1] - k[1]) + j[0] * (k[1] - i[1]) + k[0] * (i[1] -...
353
136
#pragma once #include "drape_frontend/tile_info.hpp" #include "base/thread.hpp" #include <memory> namespace df { class ReadMWMTask : public threads::IRoutine { public: explicit ReadMWMTask(MapDataProvider & model); void Do() override; void Init(std::shared_ptr<TileInfo> const & tileInfo); void Reset() ove...
861
314
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2021 Ryo Suzuki // Copyright (c) 2016-2021 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # pragma once # include "Common.hpp" namespac...
529
254
/*************************************************************************** * Copyright (C) 2009 by Dominik Seichter * * domseichter@web.de * * * * This pr...
5,906
1,851
// Copyright (c) 2022 ETH Zurich // // SPDX-License-Identifier: BSL-1.0 // 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) // This test reproduces a segfault in the split sender adaptor which happens if // the con...
1,292
447
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <string> #include <algorithm> #include <sstream> #include <map> #include <set> #include <queue> #include <numeric> using namespace ...
1,089
429
#include "zenEngine.h" namespace sample { extern void SampleVector(); class SampleBaseMath : public zenSys::zSampleEngineInstance { public: virtual const char* GetAppName()const { return "Sample Math"; } virtual void Update() { SampleVector(); SetDone(); } }; } int main(int argc, char * con...
421
162
#include <bits/stdc++.h> using namespace std; int main(){ long int t; vector<long int> vals(100000); long int n, x; cin>>t; while(t--){ cin>> n; for(int i=0;i<n; i++) cin>>x; vals.push_back(x); } sort(vals.begin(), vals+n); }
288
125
#ifndef color_hsi_get_gray #define color_hsi_get_gray // ::color::get::gray( c ) #include "../../gray/place/place.hpp" #include "../../gray/akin/hsi.hpp" #include "../../gray/trait/component.hpp" #include "../category.hpp" #include "../../_internal/normalize.hpp" #include "../../_internal/diverse.hpp" #include "../...
1,393
457
// Luaponte library // Copyright (c) 2011-2012 Peter Colberg // Luaponte is based on Luabind, a library, inspired by and similar to // Boost.Python, that helps you create bindings between C++ and Lua, // Copyright (c) 2003-2010 Daniel Wallin and Arvid Norberg. // Use, modification and distribution is subject to the ...
3,479
1,325
#include "gtmaterialparametervector3f.h" #include <QOpenGLShaderProgram> #include "ResourcesModule/resourcessystem.h" #include "../internal.hpp" GtMaterialParameterVector3F::GtMaterialParameterVector3F(const QString& name, const QString& resource) : GtMaterialParameterBase(name, resource) {} GtMaterialParameter...
596
187
#include<bits/stdc++.h> #include<iostream> using namespace std; int main() { int t,a,b,ca=1; cin>>t; while(t!=0) { int sum=0; cin>>a; cin>>b; for(int i=a; i<=b; i++) { if(i%2==1) { sum+=i; } } ...
408
165
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2009-2012, Willow Garage, Inc. * Copyright (c) 2012-, Open Perception, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification...
10,744
3,092
#pragma once #include <vector> #include <cstring> #include <string> constexpr long day1p1(const char input[], const size_t &index=0); constexpr long day1p2(const char input[], const size_t &index=0); long day2p1(const std::vector<std::vector<int>>&); long day2p2(const std::vector<std::vector<int>>&); long day3p1(con...
2,542
932
// PMSPservice.cpp #include "NTServApp.h" #include "PMSPservice.h" #include "svchost.h" #define BUFSIZE 256 #define PIPE_TIMEOUT 2000 #define NUM_BYTES_PER_READ_REQUEST (sizeof(MEDIA_SERIAL_NUMBER_DATA)) #define INACTIVE_TIMEOUT_SHUTDOWN (5*60*1000) // in millisec -- 5 minutes #include "seriali...
31,886
9,842
#ifndef EXT_DEC_LIST_H #define EXT_DEC_LIST_H #include "ast.hh" #include "../common.hh" #include "../enums.hh" #include "../symtable.hh" #include "../typedef.hh" class VarDec; class ExtDecList : public NonterminalNode { public: // nonterminal member variables std::vector<VarDec *> node_list; // data member v...
564
222
#include "anaglyphrectangleentity.h" AnaglyphRectangleEntity::AnaglyphRectangleEntity() : RectangleEntity() {} void AnaglyphRectangleEntity::addShaders() { m_program->addShaderFromSourceFile(QOpenGLShader::Vertex, ":/shaders/stereo/overlap.vert"); m_program->addShaderFromSourceFile(QOpenGLShader::Fragment, ":/sha...
351
125
#include <iostream> #include <fstream> #include <string> #include <vector> //hex to vtk int main(int argc, char** argv) { //input must be two file name' //tet version if (argc != 3) { std::cout << "input format: " << "input.vtk output.mesh" << std::endl; } std::ifstream inputfile(argv[1]); std::ofstream out...
1,855
887
#include "all.h" void homie::Device::computePsk() { int rc = 0; unsigned char output[64]; int is384 = 0; rc = mbedtls_sha512_ret((const unsigned char *)this->topicBase.c_str(), this->topicBase.length(), output, is384); if (0 == rc) { char *hex = (char *)calloc(1, sizeof(output)...
796
331
#include <boost/bind.hpp> #include "button.hpp" #include "language_dialog.hpp" #include "dialog.hpp" #include "draw_scene.hpp" #include "graphical_font_label.hpp" #include "i18n.hpp" #include "level.hpp" #include "preferences.hpp" #include "json_parser.hpp" #include "foreach.hpp" namespace { void end_dialog(gui::dia...
3,453
1,331
// Copyright James P. McNellis 2011 - 2013. // // 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 CX...
5,377
1,563
#include <stdexcept> #include <gtest/gtest.h> #include <gmock/gmock.h> #include "../vector_s.hpp" #include <vector> using namespace testing; using namespace estl; class VectorSUnitTest : public testing::Test { public: VectorSUnitTest() = default; ~VectorSUnitTest() override = default; void SetUp() ove...
24,253
11,669
/** * @file grayscale.cpp * @author Chris Tralie * * Purpose: To add a certain amount of noise to an image * */ #include <stdio.h> #include <stdlib.h> #include <string> #include <sstream> #include "simplecanvas/SimpleCanvas.h" #include "randutils.h" using namespace std; /** * @brief Add noise to every chann...
1,255
454
template<typename iter> void quick_sort(iter l, iter r) { if (l >= r)return; iter i = l - 1, j = r + 1; auto pivot = *l; while (i < j) { do i++; while (*i < pivot); do j--; while (*j > pivot); if (i < j)swap(*i, *j); } quick_sort(l, j); quick_sort(j + 1, r); }
278
137
/// Source : https://leetcode.com/problems/bulb-switcher-ii/description/ /// Author : liuyubobobo /// Time : 2017-12-02 #include <iostream> #include <unordered_set> using namespace std; /// For further analysis, we can see the first three lights uniquely determine the rest of the sequence /// Assume the four opera...
1,335
540
// insertion sort algorithm #include <iostream> using namespace std; int main(){ int size, i, j, curr; cout << "Enter the size of array to be sorted\n"; cin >> size; int A[size]; cout << "Enter the elements of array\n"; for(i = 0; i < size; i++) cin >> A[i]; for(i = 0; i < size - 1; i++){ j = i + 1; ...
544
272
#ifndef MXX_TYPE_TRAITS #define MXX_TYPE_TRAITS #include <type_traits> #include <vector> #include <string> namespace mxx { // source for testing if member functions are available: http://stackoverflow.com/a/16824239/4639394 #define MXX_DEFINE_HAS_MEMBER(member) \ template<typename, typename T> \ struct has_member_ #...
6,580
2,212
#include "StarBurst.h" namespace Effect { namespace Snowflake { /* ** ============================================================================ ** Constructor ** ============================================================================ */ StarBurst::StarBurst(NeoPixelWrapper* pixelWrapper, Data* effectD...
6,986
1,915
class Solution { private: static inline int row(int i, int v) { return (i<<4) | v; } static inline int col(int j, int v) { return 0x100 | (j<<4) | v; } static inline int grid(int i, int j, int v) { return 0x200 | ((i/3*3 + j/3)<<4) | v; } static inline bool isBusyCell(int i, int j, int v, vector<bool> ...
4,374
1,429
//========================================================================= // SEEDTOOL.CC - part of // // OMNeT++/OMNEST // Discrete System Simulation in C++ // // seedtool utility // // To compile under Unix: gcc seedtool -o seedtool // // Author: Andras Varga // //=====================...
102,616
90,367
#include "stdafx.h" #include "IntConstantExpression.h" #include "Compiler.h" #include "ObjectFileHelper.h" void IntConstantExpression::ResolveType(SymbolTable&) { mType = GCompiler.GetIntType(); Token& tok = GCompiler.GetToken(mRootToken); mValue = tok.GetIntValue(); } void IntConstantExpression::GenCode(Object...
548
196
// // Lips, lisp shell. // Copyright 2020 Krister Joas // #pragma once #include "lisp.hh" namespace lisp { namespace Map { void init(); LISPT map(lisp&, LISPT, LISPT, LISPT); LISPT mapc(lisp&, LISPT, LISPT, LISPT); LISPT maplist(lisp&, LISPT, LISPT, LISPT); LISPT mapcar(lisp&, LISPT, LISPT, LISPT); } inline L...
1,073
500
#define __MAKEMORE_KLEPTION_CC__ 1 #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <assert.h> #include <sys/stat.h> #include <sys/sysmacros.h> #include <dirent.h> #include "kleption.hh" #include "random.hh" #include "youtil.hh" #include "colonel.hh" #include "camera.hh" #includ...
31,030
12,594
// http://www.acpi.info/spec.htm #include "types.h" #include "amd64.h" #include "kernel.hh" #include "cpu.hh" #include "apic.hh" struct rsdp { u8 signature[8]; u8 checksum; u8 oemid[6]; u8 revision; u32 rsdtaddr; u32 length; u64 xsdtaddr; u8 extchecksum; u8 reserved[3]; }; struct header { u8 sign...
3,647
1,701
////////////////////////////////////////////////////////////////////////// // // winmain.cpp. Application entry-point. // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR...
14,976
5,141
#include <cstdio> #include <vector> #include <algorithm> using namespace std; struct cmp { bool operator()(const pair<int,int>& a, const pair<int,int>& b) const { if (a.first == b.first) { return a.second < b.second; } else { return a.first > b.first; } } }; int main() { int T; scanf...
846
357
#include <iostream> #include <fstream> #include <string> using namespace std; int main(){ //For output file //opening a file ofstream out("myFile.txt"); if(!out.is_open()){ cout<<"Error in opening file"<<endl; //ABORT return 1; } out<<"Raghav is a human"<<endl; ...
883
320
<<<<<<< HEAD #include<iostream> #include<math.h> #include<algorithm> using namespace std; int gcd(int m,int n); int gcd(int m,int n) { while(m!=n){ if(m>n) return gcd(m-n,n); else return gcd(m,n-m); } return m; } int main() { int t,n,x,i,a[1001],diff,fl...
1,090
499
// // Copyright © 2015 Claus Christmann <hcc |ä| gatech.edu>. // // 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 requ...
3,296
887
#include <stddef.h> #include <stdint.h> #include <kmesg.h> enum type_kinds { TK_INTEGER = 0x0000, TK_FLOAT = 0x0001, TK_UNKNOWN = 0xffff }; struct type_descriptor { uint16_t type_kind; uint16_t type_info; char type_name[]; }; struct source_location { char *filename; uint32_t line; uint32_t column; }; struct o...
4,586
1,795
/* * Periodic.cpp * * Created on: Jul 6, 2019 * Author: oleh */ #include <iostream> #include <Utils.h> #include <Periodic.h> Periodic::Periodic() : AxisX() , samples(0) , trig(0) , firstTime(0) , incrementTime(0) { } Periodic::~Periodic() { } /* // Read periodic information from a file // See 'Ve...
1,325
470
/** * Copyright (c) 2016 Xavier R. Guerin * * 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...
4,255
1,684
/* Implementation of some functions declared in utility.h. */ #include "utility.h" namespace crep { tstamp_ util::CUR_TIME = 0; tstamp_ util::CUR_TIME_AGE = 0; //Begin: legacy code dur util::charikar_partial_time_detailed = dur(0); dur util::charikar_partial_time_detailed2 = dur(0); dur util::ch...
3,095
1,313
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/ec2/model/IpamPool.h> #include <aws/core/utils/xml/XmlSerializer.h> #include <aws/core/utils/StringUtils.h> #include <aws/core/utils/memory/stl/AWSStringStream.h> #include <utility> us...
17,573
6,190
#include <cassert> #include <sstream> #include <sv/Engine.h> #include <sv/Globals.h> #include <sv/ProgramOptions.h> #include <sv/platform/SDL2Platform.h> namespace sv { Engine::Engine() { isInitialized = false; platform = std::shared_ptr<Platform>(new SDL2Platform()); } Engine::~Engine() { if (isIni...
1,224
392
#include<iostream> using namespace std; int main(int argc, char* argv[]) { int choice = 0; int count = 0; int capacity = 3; int* a = new int[capacity] { 0 }; int element = 0; do { cin >> choice; switch (choice) { case 1: cout << "[" << count << "/" << capacity << "] : "; for (int i = 0; i < count...
715
366
class Solution { public: int trailingZeroes(int n) { int trails = 0; for(long long int i = 5; n/i > 0; i*=5) { trails += (n/i); } return trails; } };
201
76
/* * Project : FoxMath * Editing by Six Jonathan * Date : 2020-08-28 - 10 h 03 * * * MIT License * * Copyright (c) 2020 Six Jonathan * * 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 S...
23,028
6,375
#include <C:\TC\BIN\PRESENTA.CPP> #include <C:\TC\BIN\CAPTURA.CPP> #include <C:\TC\BIN\SALIDA.CPP> #include <C:\TC\BIN\PROCESO.CPP> #include <C:\TC\BIN\Menu.CPP> void main() {entrar(); matriz a,b; double x; a=crear(a);limpiar(); b=crear(b);limpiar(); a=llenar(a);limpiar(); b=llenar(b);limpiar(); menu(a,b); getcha...
371
194
// AlgoritmaOdev4.cpp : Bu dosya 'main' işlevi içeriyor. Program yürütme orada başlayıp biter. // #include <iostream> #include <string> using namespace std; void minmax(int a, int b, int c, int d) { int min_ab, min_cd, min, max_ab, max_cd, max; min_ab = a < b ? a : b; min_cd = c < d ? c : d; max_ab...
1,245
503
// ExtractingFilePath.cpp #include "StdAfx.h" #include "../../../Common/Wildcard.h" #include "../../../Windows/FileName.h" #include "ExtractingFilePath.h" static UString ReplaceIncorrectChars(const UString &s, bool repaceColon) { #ifdef _WIN32 UString res; bool beforeColon = true; { for (unsigned i = 0...
4,075
1,590
#include "ZThreadPthread.h" #if defined(_DEBUG) && defined(_MSC_VER) #include <Windows.h> #endif #if !defined(_MSC_VER) || _MSC_VER > 1200 #define USE_STD_THREAD #include <thread> #include <mutex> #include <condition_variable> #include <chrono> #else #include <windows.h> #include <process.h> #if _WIN32...
7,384
2,900
template <typename Tp> class lower_envelope { public: using size_type = size_t; using value_type = Tp; private: using interval_type = std::pair<value_type, value_type>; using line_type = std::pair<value_type, value_type>; std::map<interval_type, line_type> M_lines; std::map<line_type, interval_type, std::g...
3,585
1,460
/* FileName.cpp */ //---------------------------------------------------------------------------------------- // // Project: CCore 4.01 // // Tag: Applied // // License: Boost Software License - Version 1.0 - August 17th, 2003 // // see http://www.boost.org/LICENSE_1_0.txt or the local copy // // Copyrig...
5,139
1,853
/* You are given an array of n integers. Modify the array so that it is increasing, i.e., every element is at least as large as the previous element. On each turn, you may increase the value of any element by one. What is the minimum number of turns required? Input The first input line contains an integer n: the size o...
1,068
381
// Copyright 2014-2017 Oxford University Innovation Limited and the authors of InfiniTAM #include "../../ITMLibDefines.h" #include "SceneCompletion.tpp" //Core template class SCFUSION::SceneCompletion<ITMVoxel, ITMVoxelIndex>;
227
79
// // EventHandler.hpp // Jogo-SFML // // Created by Matheus Kunnen Ledesma on 11/5/19. // Copyright © 2019 Matheus Kunnen Ledesma. All rights reserved. // #ifndef EventHandler_hpp #define EventHandler_hpp #include "base_gui_includes.hpp" namespace GUI { namespace Events { enum Type {CLICK, HOVER, ENABLED, ...
558
204
#include <string.h> #include "keycreate.h" char *KeyCreate::withScope(const char *scopeId, const char *name) { strncpy(_buffer, scopeId, MAX_VAR_NAME_LEN - 1); strncat(_buffer, ".", MAX_VAR_NAME_LEN - strlen(_buffer) - 1); strncat(_buffer, name, MAX_VAR_NAME_LEN - strlen(_buffer) - 1); return _buffer; ...
464
180
//////////////////////////////////////////////////////////////////////////////////////////////////// // // Project: Embedded Learning Library (ELL) // File: ModelMaker.tcc (compile_test) // Authors: Umesh Madan, Chuck Jacobs // ///////////////////////////////////////////////////////////////////////////////////...
4,351
1,461
#include "Pipeline.h" #include <glm/glm.hpp> using glm::vec4; namespace render { VertexOut &&lerp(const VertexOut &a, const VertexOut &b, float d) { VertexOut result; result.clipPosition = glm::mix(a.clipPosition, b.clipPosition, d); result.worldPosition = glm::mix(a.worldPosition, b.worldPosition, d); resul...
2,097
790
// Fill out your copyright notice in the Description page of Project Settings. #include "MapActorDetailCustomization.h" #include "Editor/PropertyEditor/Public/PropertyEditorModule.h" #include "MapGenerator/MapActor.h" #include "Modules/ModuleManager.h" TSharedRef<IDetailCustomization> MapActorDetailCustomization::M...
848
241
#include <toppra/solver/osqp-wrapper.hpp> #include <OsqpEigen/OsqpEigen.h> #include <toppra/toppra.hpp> namespace toppra { namespace solver { struct OSQPWrapper::Impl { OsqpEigen::Solver qp; Impl(Eigen::Index nV, Eigen::Index nC) { qp.data()->setNumberOfVariables(nV); qp.data()->setNumberOfConstraints(...
7,113
3,041
#pragma once #ifndef INDEX_HPP #define INDEX_HPP #include <cstddef> #include <iostream> using namespace std; class Index { unsigned int size = 0; unsigned int *values = NULL; public: ~Index(); // done Index(); // to do Index(unsigned int new_size); // done Index(unsigned int new_size, unsigned in...
801
248
/** simple wrappers for iterator pairs *************************************** * * * Copyright (c) 2018 Florian Oetke * * This file is distributed under the MIT License * * ...
11,166
4,100
/* ** Lua binding: easeactions ** Generated automatically by tolua++-1.0.92 on Sat Jun 11 19:26:05 2011. */ #ifndef __cplusplus #include "stdlib.h" #endif #include "string.h" #include "tolua++.h" /* Exported function */ TOLUA_API int tolua_easeactions_open (lua_State* tolua_S); #include "WiEngine.h" /* function ...
149,018
66,451
// // Copyright (C) 2014 Haruki Hasegawa // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ap...
5,516
1,800
#include "Container.h" Container::Container(json& object): mFieldCount(0) { for (auto& [key, value] : object.items()) { if (!key.compare("name")) { mName = value.get<std::string>(); LOGD(" Name: %s\n", mName.c_str()); } else if (!key.compare("param...
3,220
993
/* Test Program (Switch) * * From: https://github.com/PokemonAutomation/Arduino-Source * */ #include <cmath> //#include <QSystemTrayIcon> #include <QProcess> #include "Common/Cpp/Exceptions.h" #include "Common/Cpp/PrettyPrint.h" #include "Common/Cpp/AlignedVector.h" #include "Common/Cpp/SIMDDebuggers...
38,794
15,362
#include <bits/stdc++.h> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define se second #define pb(x) push_back(x) #define mp(x,y) make_pair(x,y) #define LET(x, a) __typeof(a) x(a) #define foreach(it, v) for(LET(it, v.begin()); it != v...
1,484
737
#include <iostream> #include <cmath> using namespace std; bool is_prime(long long a){ long long x=sqrt(a), i; if (a%2==0){ if (a==2) {return true;} else {return false;} } for (i=3; i<=x; i=i+2){ if (a%i==0) {return false;} } return true; } int main () { long long n,m,i,j,brc...
768
385
#include <bits/stdc++.h> #define F first #define S second #define PB push_back #define MP make_pair #define ll long long int #define vi vector<int> #define vii vector<int, int> #define vc vector<char> #define vl vector<ll> #define mod 1000000007 #define INF 1000000009 using namespace std; int main() ...
1,045
460
//**************************************************************************** // Copyright © 2017 Jan Erik Breimo. All rights reserved. // Created by Jan Erik Breimo on 24.04.2017. // // This file is distributed under the BSD License. // License text is included with the source distribution. //************************...
3,470
1,020