text
stringlengths
8
6.88M
#pragma once #include "Shape.h" #include "Triangle.h" #include "Sphere.h" #include <vector> namespace RayTracer { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Dr...
#include <unordered_set> #include <vector> #include "gmock/gmock.h" #include "perm.h" #include "test_utility.h" #include "test_main.cc" using cgtl::Perm; using testing::UnorderedElementsAreArray; TEST(PermTest, CanConstructPerm) { Perm perm; EXPECT_TRUE(perm_equal({1}, perm)) << "Default construction prod...
/// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Character.h" #include "GameFramework/SpringArmComponent.h" #include "GameFramework/PlayerController.h" #include "TimerManager.h" #include "Engine/EngineTypes.h" #include "Camer...
#include "Node.h" #include <stdio.h> #include <math.h> #include <stdlib.h> #include <time.h> #define COMM_RANGE 60 double distance2(double x1, double y1, double x2, double y2){ return(sqrt((pow((x1-x2),2)+pow((y1-y2),2)))); } int main(void){ srand( (unsigned)time( NULL ) ); Node n1; Node n2; ...
#include <iostream> #include "CloudGenerator.h" #include "../Utils/RandomUtils.h" #include "../OpenGL/ComputeShader.h" #include "../OpenGL/Texture3D.h" CloudGenerator::CloudGenerator(glm::ivec3 dims, glm::f32 freq) { _cloudVolumeDims = dims; _groupDims = _cloudVolumeDims / 8; _frequency = freq; // just a single...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2010 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef OP_SCOPE_SELFTEST_LISTENER_H #define OP_SCOPE_SELFTEST_LI...
#ifndef _SPRITE_GL_H_ #define _SPRITE_GL_H_ #include <AlgebraLib.h> #include "PrimitiveBase.h" #include "TextureGL.h" #include "Mesh.h" class CSpriteGL : public PrimitiveBase { public: void Create() override; void Transform( float *t ) override; void Draw( float *t, const SRenderAttributes& renderAttribs ) overrid...
/** * @copyright 2013 Christoph Woester * @author Christoph Woester * * 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 ...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...
// Copyright 2012 Yandex #ifndef LTR_DATA_PREPROCESSORS_DATA_SAMPLER_H_ #define LTR_DATA_PREPROCESSORS_DATA_SAMPLER_H_ #include <algorithm> #include <vector> #include <set> #include <sstream> #include <stdexcept> #include <string> #include <boost/lexical_cast.hpp> //NOLINT #include "ltr/utility/shared_ptr.h" //NOL...
/*Tests for cc_shared::thread_pool.*/ #include "cc/shared/thread_pool.h" #include "gtest/gtest.h" #include <set> using std::set; namespace cc_shared { class ThreadPoolTest : public testing::Test { protected: struct Info { bool visited; pthread_t processing_thread; Info() { visited = false; ...
// Copyright (c) 2013 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special ...
#pragma once class CellGrid { public: CellGrid(void); ~CellGrid(void); };
#pragma once #include "ZeroIScene.h" #include "ZeroSceneManager.h" #include "UIManager.h" #include "GameManager.h" #include "Item.h" #include <list> class Stage : public ZeroIScene { public: Stage(); Item* item; UIManager* ui; GameManager* game; ZeroFont* damageText; ZeroFont* healthText; ZeroFont* speedT...
#include "RealImplementation.h" #include <string> RealImplementation::RealImplementation(const std::string& text, float value) { m_Object = RandomObject(text, value); } void RealImplementation::AddText(const std::string& string) { m_Object.m_Text = m_Object.m_Text + string; } void RealImplementation::ClearText() {...
#include <stdio.h> #include <stdlib.h> void NAMD_bug(const char *errmsg) { fprintf(stderr, "%s\n", errmsg); exit(1); } void NAMD_die(const char *errmsg) { fprintf(stderr, "%s\n", errmsg); exit(1); }
#include<iostream> #include<stdio.h> #include<vector> #include<ctime> #include<cstring> #include<stdlib.h> using namespace std; class Roulette{ public: vector<char*> reward; vector<double> poss; int roll_max; Roulette(){ roll_max = 1000000; reward.clear(); poss.clear(); } int set_reward(int _n, ...
/* class to laod shader attributes in main.cpp */ class ShaderLoader{ public: ShaderLoader( const int bufferSize = 10000 ); ~ShaderLoader(); void loadShader( const char *fileName ); const char* getShader(); private: char *shaderInfo; };
#include <sstream> #include "../inc/SEObject.h" uint32_t SEObjectName::nextAutoIndex = 0x00000000; SEObjectName::tNameSet SEObjectName::nameSet(SEObjectName::newNameSet()); SEObject::tObjectMap SEObject::objectMap(SEObject::newObjectMap()); uint32_t SEObjectName::nameToCode(const std::string &n, uint...
#include <SoftwareSerial.h> #include "UbidotsMicroESP8266.h" #define TOKEN "wgcppnHhcK88Z7Vy34jQCyqQI7CULO" // Put here your Ubidots TOKEN #define ID_1 "59d8e2c1c03f97267c9b3a59" // Put your variable ID here #define WIFISSID "Instituto Terra - Visitantes" // Put here your Wi-Fi SSID #define PASSWORD "" // Put here ...
#pragma once #include <iostream> #include <array> #include <vector> #include "json.hpp" #include "particle.h" nlohmann::json estimate_step_json(Particle* particles, double* weights, int N, double time, int* ftag_visible, size_t N_visible, int* da_table, int N_features, int id) ;
#pragma once #include "plbase/PluginBase.h" #include "AnimBlendFrameData.h" #pragma pack(push, 4) class PLUGIN_API CAnimBlendClumpData { public: void *m_pLastAssociationLink; int32_t field_4; uint32_t m_dwNumBones; int32_t field_C; AnimBlendFrameData *m_pBones; }; #pragma pack(pop)
#include <iostream> #include <iomanip> // Program: Given three double numbers from keyboard input, the program returns through a function // the maximum of the three using namespace std; // Function that accepts 3 double numbers and returns the maximum of them double maxim(double x1, double x2, double x3) { dou...
// Copyright (c) 2019 Thomas Heller // // 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) #include <pika/assert.hpp> #include <pika/testing.hpp> #include <string> [[noreturn]]...
#include <bits/stdc++.h> using namespace std; #define MODULO 1000000007 struct Arista{ int x,y,b; const bool operator < (const Arista otro) const{ return b == otro.b? x < otro.x : b > otro.b; } }; priority_queue<Arista> cola; vector<int> padre(100005); vector<int> altura(100005); vector<int> anc...
#ifndef __JSVEC_HH__ #define __JSVEC_HH__ #include <node.h> #include <node_buffer.h> #include <qk/vec.hh> #include <qk/dcube.hh> #include <colormap/colormap_interface.hh> namespace sadira{ using namespace qk; using namespace v8; using namespace node; void free_stream_buffer(char* b, void*x); template...
// check for valid parentheses #include<bits/stdc++.h> using namespace std; bool balanced(string s) { int n=s.length(),i; char x; stack<int>a; for(i=0;i<n;i++) { if(s[i]=='{'||s[i]=='('||s[i]=='[') { a.push(s[i]); continue; } ...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen (Arun MENON) // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it un...
/********** 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; either version 2.1 of the License, or (at your option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.) This libr...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "avencoder.hpp" #include "libyuv.h" #include <time.h> #include <Windows.h> #define DEFAULT_BIT_RATE 10000000 #define DEFAULT_FRAME_RATE 33 #define DUMP_H264 #ifdef DUMP_H264 #define DUMP_FILE_NAME "output.h264" static FILE* f = NULL; #endif // DUMP...
#pragma once #include "declspec.h" #include <string> #include <SFML/Graphics/RenderWindow.hpp> #include <SFML/Window/VideoMode.hpp> #include <SFML/Window/Event.hpp> #include <SFML/System/Time.hpp> #include <SFML/System/NonCopyable.hpp> #include "ResourceHolder.h" namespace pure { class PUREENGINE_API Game : priva...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_FuseControlsTextControl_Value_Property.h> #include <Fuse.Controls.TextControl.h> #include <Uno.Bool.h> #include <Uno.UX.IPropertyListene...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author spoon */ #include "core/pch.h" #include "adjunct/quic...
// Generated by gencpp from file node_robot_msgs/agent_task_2.msg // DO NOT EDIT! #ifndef NODE_ROBOT_MSGS_MESSAGE_AGENT_TASK_2_H #define NODE_ROBOT_MSGS_MESSAGE_AGENT_TASK_2_H #include <ros/service_traits.h> #include <node_robot_msgs/agent_task_2Request.h> #include <node_robot_msgs/agent_task_2Response.h> namesp...
#pragma once #include <stdint.h> class Game { public: void Move(int m, int r, float seconds); float playerX, playerY, playerA; Game(); ~Game(); };
#include "rtc.h" #include "RTClib.h" RTC_DS3231 RtcTime; uint16_t _timeYear = 2020; uint8_t _timeMonth = 1; uint8_t _timeDay = 1; uint8_t _timeHour = 0; uint8_t _timeMinute = 0; uint8_t _timeSecond = 0; uint8_t _timeDayOfWeek = -1; //0 = sunday, 6 = saturday bool CRtc::update() //Copy RTC values to time data { Da...
#ifndef CORE_NET_EVENTLOOPPOOL_H #define CORE_NET_EVENTLOOPPOOL_H #include "EventLoop.h" #include "lock.hpp" #include <map> #include <string> #include <boost/shared_ptr.hpp> #include <boost/noncopyable.hpp> #include <pthread.h> namespace core { namespace net { class EventLoopPool : private boost::noncopyable { publi...
#include <iostream> #include <cmath> using namespace std; int n; int fact(){ if(n == 0){ return 0; } int count_2 = 0; int count_5 = 0; for (int i = 1; i <= n; i++){ int curNum = i; while(true){ if(curNum % 2 != 0 && curNum % 5 != 0){ break; ...
#include "pen.h" #include "fountain.h" #include "rbp.h" using namespace std; void WriteWithPen(Pen &pen) { std::cout << pen.drawLine() << std::endl; std::cout << pen.drawCircle() << std::endl; } int main() { FountainPen fp; WriteWithPen(fp); RollerBallPen rbp("A Pen that Uses a Roller Ball"); WriteWithPen(rbp); Pen p...
/*! @file LogVol_ShieldingPSDCone.hh @brief Defines mandatory user class LogVol_ShieldingPSDCone. @date August, 2012 @author Flechas (D. C. Flechas dcflechasg@unal.edu.co) @version 1.9 In this header file, the 'physical' setup is defined: materials, geometries and positions. This class defines the exper...
// Moduł Scan.cpp // ================= // Defnicje funkcji składowych klasy Scan, tabeli leksemów AT // i tabeli słów kluczowych. // #include "Scan.h" char *AT[MAXSYM+1] = // Tabela Atomów (dla komunikatów o błędach { "if", "nothing", "frac", "str", "bool", "var", "else", "return", "true", "false", "...
#include <iostream> #include <vector> #include <algorithm> #include <fstream> #include <queue> #include <unordered_set> #define INT_MIN (1<<31) #define INT_MAX (~INT_MIN) #define UNREACHABLE (INT_MAX>>2) using namespace std; ifstream fin("11631_input.txt"); #define cin fin typedef vector<int> ele; struct { bool ope...
#include "m_pd.h" //IMPROVE - inlets //FIXME - fixed sample rate //TODO - help file #include "warps/dsp/modulator.h" static t_class *wrps_tilde_class; typedef struct _wrps_tilde { t_object x_obj; t_float f_dummy; t_float f_drive1; t_float f_drive2; t_float f_algo; t_float f_density; // CLAS...
// Copyright (c) 1991-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published ...
#include "DBClass.h" #include <string> #include <fstream> #include <iostream> #include <cstring> using namespace std; int DBClass::load(const char* filename, const char* key) { std::ifstream f(filename); std::string s; if (!f.good()) { return -1; } while (f.good()) { DBRecord...
#ifndef EXECUTIVE_H #define EXECUTIVE_H #include "MinMax.h" #include <fstream> #include <iostream> using namespace std; class executive { private: MinMax myheap; MinMax myTest; public: executive(string _filename); ~executive(); void Print(); }; #endif
#include "network.h" Network::Network(QObject *parent) : QObject(parent) { mngr = new QNetworkAccessManager(this); } QByteArray Network::get(QUrl u) { QNetworkReply *reply = mngr->get(QNetworkRequest(u)); // Wait for reply QEventLoop wait; connect(mngr, SIGNAL(finished(QNetworkReply*)), &wait, SLOT(quit())); ...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> #include <stack> using namespace std; typedef long long ll; #define INF 10e10 #define rep(i,n) for(int i=0; i<...
// // Created by 송지원 on 2020/07/21. // //바킹독님 코드. 어떤 수를 추가하거나 안하거나를 어떻게 구현하는가 했는데 나 // 재귀적으로 호출을 하면서 어떤 값을 더한 값으로 함수를 호출해주거나 // 현재 값 그대로 함수를 호출해주면 // 어떤 값을 더해주거나 안하거나 하는 경우의 수를 만족할 수 있다!! #include <iostream> using namespace std; int n, s; int arr[30]; int cnt = 0; void func(int cur, int tot) { if (cur == n) { ...
#include "gameover.h" #include "game.h" #include <QObject> #include <QGraphicsScene> #include <QGraphicsPixmapItem> #include <QGraphicsItem> #include <QPushButton> #include <QFontDatabase> #include <QIcon> extern Game *game; GameOver::GameOver(): QObject(), QGraphicsPixmapItem() { this->setLabel(); this->se...
/* *change the infix to suffix(reverse Polish Expression) * */ #include <string> #include <stack> #include <iostream> #include <cstdio> #include <queue> using namespace std; static int priority(char op) { if (op == '+' || op == '-'){ return 1; }else if(op == '*' || op == '/'){ return 2; }else{ return 0;...
#include <iostream> #include <fstream> #include <vector> #include <stdio.h> void quit() { putchar('\n'); #ifdef _WIN32 system("PAUSE"); #else puts("Press ENTER to continue...\n"); getc(stdin); #endif exit(1); } template <typename T> void writeFile(const std::string &fileName, const std::vector<T> &vector) { std...
#include<bits/stdc++.h> using namespace std; typedef long long ll; //accepted. AC in One Go. ll n,min_area; vector<pair<ll,ll>> slabs(200); vector<vector<ll>> dp(601,vector<ll>(601)); ll dp_rec(ll w, ll h){ if(w*h < min_area) return w*h; if(dp[w][h]!=-1) return dp[w][h]; dp[w][h] = INT_MAX; for(...
#ifndef PGTOOLS_COPMEMMATCHER_H #define PGTOOLS_COPMEMMATCHER_H #include "../TextMatchers.h" using namespace PgTools; enum verbosity { v0, v1, v2 }; enum reverseMode { no, yes, both }; static const int HASH_COLLISIONS_PER_POSITION_LIMIT = 12; static const int AVERAGE_HASH_COLLISIONS_PER_POSITION_LIMIT = 1; static c...
#include <iostream> #include <string> #include <vector> #include "custom_date.h" #include "custom_person.h" using namespace std; void add_dmy (Date&, int, int, int); void test_class_person() { Person p = Person("Aditya", 15, 9, 1992, 1); cout << "P object's name is " << p.get_name() << endl; Date p_bd; ...
#include "DIR.h"
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2003 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef USERJSMAGIC_H #define USERJSMAGIC_H #ifdef USER_JAVASCRIPT...
#include<stdio.h> #include<iostream> int main() { int sex,age; printf("如果男性請輸入1,女性請輸入2。\n"); printf("請輸入性別和年齡:"); scanf("%d%d",&sex,&age); if( sex==1 && age>=18 ) { printf("你可以結婚\n"); } if( sex==1 && age<18 ) { printf("你不可以結...
#include "gtest/gtest.h" #include <type_traits> #include <utility> class emptyClass { }; TEST(SpecMemFuncGenUnitTest, empty_class_has_everything) { emptyClass a; emptyClass b(a); a = b; emptyClass c(std::move(a)); b = std::move(c); } class classWithCopyCtor { public: classWithCopyCtor() {} classWithCopyCtor(...
// // Created by ischelle on 05/05/2021. // #include "Medic.hpp" namespace pandemic { Medic::Medic(Board board, City city) : Player(board, city) { //nothing } // void Medic::treat() { // } }
#pragma once #include "QsoTokenType.h" // Class for parsing frequency tokens class FreqToken : public QsoTokenType { public: FreqToken(); virtual ~FreqToken(); virtual bool Parse(const string& token); virtual QsoTokenType* Clone() { return new FreqToken(); } };
#ifndef UGV_FOLLOW_MANEUVER_H #define UGV_FOLLOW_MANEUVER_H #include <ros/ros.h> #include <Eigen/Dense> #include "maneuvers/trajectory_class.h" #include "maneuvers/eth_trajectory.h" #include "geometry_msgs/PoseWithCovarianceStamped.h" #include "geometry_msgs/AccelWithCovarianceStamped.h" #include "geometry_msgs/PoseW...
#include <stdio.h> #include <string.h> int syn; //存放单词的类型 int p; //用于遍历程序源代码 int line; //用来标识行数 char ch; //用于读取程序源代码 int sum; //用来保存数字的值 char program[1000], token[10]; // program用来存储源代码,token用来存放词素 char *rwtab[9] = {"begin", "if", "then", "else", "while", "do", "Const", "Var", "e...
// Created by: DAUTRY Philippe // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public Li...
#ifndef GLADIATOR_LISTENER_H #define GLADIATOR_LISTENER_H #include <string> class Gladiator; class Gladiator_Listener { public: Gladiator_Listener(); virtual ~Gladiator_Listener(); virtual void died(const Gladiator* gladiator) = 0; virtual void inflictedDamage(const Gladiator* gla...
//Write a C++ program to count number of digits in a number. #include<iostream> using namespace std; int main() { int a,c=0; cout<<"Enter a multiple digit number:"; cin>>a; while(a!=0) { c++; a=a/10; } cout<<"There are "<<c<<" digits."; }
#include <iostream> #include <vector> #include <map> #include <cmath> #include <queue> #include <algorithm> #include <iomanip> #include <set> using namespace std; /* → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → */ #define int long long #define ld lon...
#pragma once #include "BaseHeader.h" #include "utilityBase.h" class vfiMaxUtil : public utilityBase { protected: double get_wage(const State& current, const StochProc& stoch) const; double get_zshock(const State& current, const StochProc& stoch, COUNTRYID whichCountry) const; double prod_fn(const double k1, const d...
#ifndef YL_BAAR_CONSUMER #define YL_BAAR_CONSUMER #include <ndn-cxx/face.hpp> #include "tinyxml/tinyxml.h" #include <string> #include <map> #include <mutex> using namespace ndn; using namespace std; class Consumer { public: Consumer(); ~Consumer(); public: void setProNum(int pronum); // add by Jerry: 2018 0305 ...
#include "pch.h" Vertex* GraphAdjacencyList::insVertex(int des, Vertex* head) { Vertex* newVertex = new Vertex; newVertex->id = des; newVertex->next = head; return newVertex; } void GraphAdjacencyList::initGraph(int numVertices) { for (int i = 0; i < numVertices; i++) { head[i].next = nullptr; } }
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define FOR(i,n) for(ll i=0;i<n;i++) #define FOR1(i,n) for(ll i=1;i<n;i++) #define FORn1(i,n) for(ll i=1;i<=n;i++) #define FORmap(i,mp) for(auto i=mp.begin();i!=mp.end();i++) #define vll vector<ll> #define vs vector<string> #define pb(x) push_...
// Copyright (c) 2013 Nick Porcino, All rights reserved. // License is MIT: http://opensource.org/licenses/MIT #ifndef LANDRU_RUNTIME_INSTRUCTIONS_H #define LANDRU_RUNTIME_INSTRUCTIONS_H #include <string> #include <vector> namespace Landru { namespace Instructions { #define INSTR_DECL(a, b, c) i##a, enu...
#include "cocos2d.h" #include "monster.h" #include <cmath> #define FIREBALL_TAG 11 #define MOVE_ACTION_TAG 1 #define SMALL_MOVE_ACTION_TAG 2 int getdirection(cocos2d::Vec2 diff) { //0->上方 1->下 2->左 3->右 if (diff.y <= 0 && -diff.y >= fabs(diff.x)) { //往下移动 return 1; } else if (diff.y >= 0 && diff.y >= fabs...
#ifndef CVML_OP_H #define CVML_OP_H class CVMLOp { private: enum { MAX_ARGUMENTS = 2 }; CVML& vml_; CVMLOpCode* op_code_; uint pc_; uint line_num_; uint num_arguments_; CVMLArgument** arguments_; public: CVMLOp(CVML &vml, CVMLOpCode *op_code, uint ...
#include "system.h" #include "Integrators/integrator.h" #include "Potentials/potential.h" #include "InitialConditions/initialcondition.h" #include "particle.h" #include "time.h" #include <iostream> #include <cmath> using std::cout; using std::endl; void System::computeForces() { //resetting forces and potential e...
#include "dfBasic.h" dfBasicType dfGetTypeFromString(std::vector<char> str) { if(dfStrCmp(str, "int")) { return DF_int; } else if(dfStrCmp(str, "float")) { return DF_float; } else if(dfStrCmp(str, "vec2")) { return DF_vec2; } else if(dfStrCmp(str, "vec3")) { return DF_vec3; } else if(dfStrCmp(str,...
#ifndef MASTERS_PROJECT_BINOMIALDIVIDENDMETHOD_H #define MASTERS_PROJECT_BINOMIALDIVIDENDMETHOD_H #include <map> #include "../BinomialMethod.hpp" #include "Dividend.hpp" template<typename X> class BinomialDividendMethod : public BinomialMethod<X> { public: int dividend_number; Dividend<X> **dividends; X *...
#include "parser_table.h" std::vector < std::string > table_parser::extract_rows(std::string table){ return split_string(table, "|-"); } std::vector < std::string > table_parser::extract_fields(std::string row){ return split_string(row, "||"); } std::list < std::vector < std::string > > table_parser::table_to_df...
#pragma once #include <API/Code/Graphics/Material/CookTorranceMaterial.h> #include <API/Code/Graphics/Mesh/3D/CubeMesh.h> #include <API/Code/Graphics/Mesh/3D/SphereMesh.h> #include <API/Code/Graphics/Mesh/3D/Mesh3D.h> #include <API/Code/Graphics/Texture/TextureImage.h> #include <API/Code/Graphics/Light/DirectionalLi...
#include <cassert> namespace rlrpg { template<class T> Optional<T>::Optional(): m_exists(false) { } template<class T> Optional<T>::Optional(empty_t): m_exists(false) { } template<class T> Optional<T>::Optional(default_t): m_exists(false) { in_place(); } template<class T> template<class ...Args>...
/* IBM_PROLOG_BEGIN_TAG */ /* * Copyright 2003,2016 IBM International Business Machines Corp. * * 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/LIC...
#include "Device.h" #include "Resource/Effect/EffectFabric.h" #include "Resource/Effect/Effect.h" #include "Keng/Base/Serialization/SerializeMandatory.h" #include "yasli/STL.h" #include "EverydayTools/Exception/CallAndRethrow.h" #include "EverydayTools/Exception/ThrowIfFailed.h" namespace keng::graphics { const ch...
#pragma once #include<iostream> #include<vector> #include<assert.h> using namespace std; template<class T,class Compare> class Heap //仿函数管理大小堆更方便 { public: Heap() {} Heap(T* a, size_t n) { _a.reserve(n); for (size_t i = 0; i < n; ++i) { _a.push_back(a[i]); } //建...
/* ######################################################################## # Exemplo de Allegro orientado a objetos elaborado por: # # Jorge Leandro Francisco # # Monitor da Disciplina Fundamentos de Programação 2 # # do curso de Engenhari...
/******************************************************************************** ** Form generated from reading UI file 'CSoftUpgredeWidget.ui' ** ** Created by: Qt User Interface Compiler version 5.3.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************...
#include "StdAfx.h" #include "voxelObject.h" #include "Utility_wrap.h" // voxelBox methods voxelBox::voxelBox() { boneIndex = -1; state = -1; } voxelBox::voxelBox(Vec3f ld, Vec3f ru) : voxelBox() { leftDown = ld; rightUp = ru; center = (leftDown+rightUp)/2; boneIndex = -1; } voxelBox::~voxelBox() { } void ...
#include "stdafx.h" #include <stdint.h> // From http://stackoverflow.com/questions/17432502/how-can-i-measure-cpu-time-and-wall-clock-time-on-both-linux-windows // Only works in Windows #include <Windows.h> double get_wall_time() { LARGE_INTEGER time, freq; if (!QueryPerformanceFrequency(&freq)) { // Handle erro...
#ifndef CONTROLLER_H_ #define CONTROLLER_H_ #include "bno055.h" #include "motor_driver.h" extern "C" { #include "ch.h" } class Controller { public: Controller(); ~Controller(); void Update(); void SetOrientation(vector3 setpoint); void SetThrottle(double throttle); private: void velocityLoopUp...
#include<iostream> #include<cstdio> using namespace std; int main() { int t[4],in[4],ma[4],n,a,b,tb[4],inb[4]; //while (cin >> t[0] >> t[1] >> t[2] >> t[3]){ while (scanf("%d %d %d %d",&t[0],&t[1],&t[2],&t[3])==4){ //改成scanf printf比較快 //cin >>n; scanf("%d",&n); for(int i=0;i<n;i++){ a=b=0...
#pragma once #include <iostream> #include <vector> #include <string> #include <fstream> #include <map> #include <string> using namespace std; /* template <typename T, typename U> class create_map { private: std::map<T, U> m_map; public: create_map(const T& key, const U& val) { m_map[key] = val; } create_map...
#include "Parser.h" #include <fstream> void Parser::readCommands(std::string& fileName, std::vector<ICommand*>& commands, std::vector<int>& executeOrder) { std::ifstream fin(fileName); if (!fin) throw std::string("Can't open file " + fileName + "!"); std::string buffer; std::getline(fin, buffer); if (buffer ...
// fileread.cpp // Kellan Cerveny and Jake Yoon // Priebe 312 // 30 April 2020 #include <iostream> #include <sys/types.h> #include <fstream> #include <cstdlib> #include <dirent.h> #include <errno.h> #include <vector> #include <string> #include <queue> #include "fileread.h" using namespace std; /* This is a collectio...
#ifndef ROBOT_H #define ROBOT_H #include <vector> #include <iostream> #include <random> #include <time.h> #include <math.h> #include <map.h> using namespace std; typedef struct position{ float x; float y; float orientation; }position; typedef struct noise{ float forward_noise; float turn_noise;...
#include<iostream> using namespace std; void insertionSort(int arr[],int len){ int val; int hole; for(int i=1;i<len;i++){ hole=i; val=arr[hole]; while(hole>0 && arr[hole-1]>val){ arr[hole]=arr[hole-1]; hole--; } arr[hole]=val; } } int main...
#include "RBFDeform.h" RBFDeform::RBFDeform() { centers = NULL; fctValues = NULL; rbf_coeff = NULL; } RBFDeform::RBFDeform(int numberCenters, int dimension, double * centers, double * functionValues, double standDev, bool approximateRBF) { initialize(numberCenters, dimension, centers, functionValues, standD...
#include <windows.h> #include <windowsx.h> #include <iostream> #include <tchar.h> #include <xstring> #include <process.h> #include <stdio.h> #include <thread> /////////////////////////////////////////////////// COLOR /////////////////////////////////////////////////// #define BLACK 0x00,0x00,0x00 ...
// ============================================================== // RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC // Version: 2018.2 // Copyright (C) 1986-2018 Xilinx, Inc. All Rights Reserved. // // =========================================================== #include "Random....
#ifndef HTML5STANDALONE_H #define HTML5STANDALONE_H #ifdef HTML5_STANDALONE #ifndef CONST_ARRAY # if 1//def HAS_COMPLEX_GLOBALS # define CONST_ARRAY(name, type) const type const name[] = { # define CONST_ENTRY(x) x # define CONST_END(name) }; # define CONST_ARRAY_INIT(name) ((void)0) # else # ...
#pragma once #include "ConstNode.hpp" template<class Type> struct ConstSingleValueNode : ConstNode<Type> { ConstSingleValueNode(Type & value) : m_value(value) {} ArrayView<Type const> getOutputValues() const override { return ArrayView<Type const>(&m_value, 1); } std::size_t ...
#include <gtest/gtest.h> #include "../vector.hpp" TEST(vectorTests, DemonstrateGTestmacros) { vector<int> vec = {1, 2, 3, 4}; EXPECT_TRUE(vec[0] == 1 && vec[1] == 2 && vec[2] == 3 && vec[3] == 4); EXPECT_TRUE(true); //ASSERT_TRUE(false); EXPECT_TRUE(true); }