text
stringlengths
8
6.88M
#include "Shader.h" #include "Utils.h" int CShader::Create( std::string vertexShader, std::string fragmentSa ) { char *vsSourceP = file2string( vertexShader.c_str() ); char *fsSourceP = file2string( fragmentSa.c_str() ); shaderID = glCreateProgram(); GLuint vshader_id = createShader( GL_VERTEX_SHADER, vsSourceP ...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2009-2010 Benoit Jacob <jacob.benoit.1@gmail.com> // // Eigen 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 So...
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define for1(i,n) for(int i=1;i<=n;i++) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define FORD(i,a,b) for(int i=(a);i>=(b);i--) const int INF = 1<<29; const int MOD=1073741824; #define pp pair<ll,ll> typedef long long int ll; bool...
#include "base/scheduling/task_loop_for_worker.h" namespace base { void TaskLoopForWorker::Run() { while (true) { cv_.wait(mutex_, [&]() -> bool{ bool has_tasks = !queue_.empty(); bool can_skip_waiting = (has_tasks || quit_ || quit_when_idle_); return can_skip_waiting; }); // We now o...
#pragma once // CLeftToolBar 폼 보기 class CLeftToolBar : public CFormView { DECLARE_DYNCREATE(CLeftToolBar) protected: CLeftToolBar(); // 동적 만들기에 사용되는 protected 생성자입니다. virtual ~CLeftToolBar(); public: #ifdef AFX_DESIGN_TIME enum { IDD = IDD_CLeftToolBar }; #endif #ifdef _DEBUG virtual void AssertVa...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Pawn.h" #include "Pet.generated.h" UCLASS() class VIRTUALPET_API APet : public APawn { GENERATED_BODY() public: // Sets default values for this pawn's properties APet(); ...
/* * Led.cpp * Jean Cleison Braga Guimaraes */ #include "Led.h" Led::Led(gpio_Pin pin) : mkl_GPIOPort(pin){ setPortMode(gpio_output); writeBit(0); } void Led::turnOn(){ writeBit(0); } void Led::turnOff(){ writeBit(1); }
#include<bits/stdc++.h> using namespace std; class Student{ public: int age; const int rno; //Constant variable. int &x; //reference variable for age; Student(int r,int age) : rno(r),age(age),x(this -> age){ //We must use initialization list to initialize constant variables at the time of declaration. ...
#ifndef _APPLICATION_H_ #define _APPLICATION_H_ #include "ViewLayer.h" #include "Input.h" #include"Timer.h" #include <Dbt.h> #include "GameState.h" #include "MenuState.h" #include"WinState.h" class Application { private: Application(); Timer m_timer; float m_deltaTime; float m_dtMultiplier; //DirectX Audio HDE...
/* * Copyright (c) 2020 sayandipde * Eindhoven University of Technology * Eindhoven, The Netherlands * * Name : image_signal_processing.cpp * * Authors : Sayandip De (sayandip.de@tue.nl) * Sajid Mohamed (s.mohamed@tue.nl) * * Date : March 26, 2020 * * Function ...
#pragma once #include <QThread> #include <list> #include <mutex> #include "XDecodeThread.h" struct AVCodecParameters; class XResample; class XAudioPlayer; class XAudioThread : public XDecodeThread { public: XAudioThread(); virtual ~XAudioThread(); //打开,不管成功与否都清理 virtual bool Open(AVCodecParameters *para, int samp...
#pragma once #include "stdafx.h" #include "DataTypes\vec.h" #include <map> #include "..\KEGIES\bonePacking.h" #include "DataTypes\mat.h" #define matEYEi Mat3x3i(Vec3i(1,0,0), Vec3i(0,1,0), Vec3i(0,0,1)) #define rotXi Mat3x3i(Vec3i(1,0,0), Vec3i(0,0,1), Vec3i(0,1,0)) #define rotYi Mat3x3i(Vec3i(0,0,1), Vec3i(0,1,0), Ve...
#include "StringCards.hpp" #include <iostream> // cout const string StringCards::cards = "🂠🃁🃂🃃🃄🃅🃆🃇🃈🃉🃊🃋🃌🃍🃎🂱🂲🂳🂴🂵🂶🂷🂸🂹🂺🂻🂼🂽🂾🂡🂢🂣🂤🂥🂦🂧🂨🂩🂪🂫🂬🂭🂮🃑🃒🃓🃔🃕🃖🃗🃘🃙🃚🃛🃜🃝🃞🃟" ; string StringCards::french_card(unsigned int i){ if (i<0 || i>57){ throw std::invalid_argument("Strin...
// Created on: 1991-12-02 // Created by: Laurent PAINNOT // 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 GN...
/************************************************************************ * @project : $rootnamespace$ * @class : $safeitemrootname$ * @version : v1.0.0 * @description : * @author : $username$ * @creat : $time$ * @revise : $time$ ****************************************************************...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "103" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) struct Box{ int id,len,pre; vector<int> edge; Box(){ pre = -1; len = 1; }; void S(){ sort(edge.begin(), edge.end()); } bool operator<( const Box &rhs )c...
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Codec { private: static string intToString(int num){ string res = ""; do{ res += num % 10 + '0';...
#include <string> #include <exception> #include <iostream> #include "execution/engine_simpledb.hh" #include "execution/response.hh" #include "protobufs/gg.pb.h" #include "protobufs/netformats.pb.h" #include "protobufs/util.hh" #include "thunk/ggutils.hh" #include "thunk/thunk_writer.hh" #include "util/iterator.hh" #in...
#ifndef _ZORK_TRIGGER_ #define _ZORK_TRIGGER_ #include "Zork_Def.hpp" #include <list> #include <iostream> #include <string> using namespace std; class Trigger { public: Trigger(const string& com, const string& prt,bool permenant):command(com),print(prt),type(permenant){} void addAction(Action act){action.push_fr...
#include "Switzerland.hpp" /***************************************************************** * default constructor * The default constructor initializes the name to the country and the * checkpoint variables to false. ******************************************************************/ Switzerland::Switzerland()...
#ifndef _DtBarcoPesquero_ #define _DtBarcoPesquero_ #include "DtBarco.h" class DtBarcoPesquero: public DtBarco{ private: int capacidad; int carga; public: //Constructores DtBarcoPesquero(string nombre,string id, int capacidad, int carga); //Getters ...
/** * Project: ows-qt-console * File name: domains_manager.cpp * Description: this class describes the connections management dialog window * * @author Mathieu Grzybek on 2012-04-30 * @copyright 2012 Mathieu Grzybek. All rights reserved. * @version $Id: code-gpl-license.txt,v 1.2 2004/05/04 13:19:30 garry Exp $ ...
// // Created by kumaran on 9/6/20. // #include <bits/stdc++.h> using namespace std; #define debug(x) cout << '>' << #x << ':' << x << endl; #define all(v) v.begin(), v.end() #define pii pair<int, int> #define mxN 1e7 #define newl cout << "\n" #define vi vector<int> typedef pair<int, pair<int, int>> threepair; class ...
/* * LSST Data Management System * Copyright 2014-2015 AURA/LSST. * * This product includes software developed by the * LSST Project (http://www.lsst.org/). * * 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...
#ifndef STAGE_H #define STAGE_H #include "enemy.h" #include <vector> using std::vector; class Room { private: static int nbRoom; vector<Enemy*> listEnemy; public: Room(int a=0); ~Room(); vector<Enemy*> getListEnemy(){return listEnemy;} //Vérifie si une salle tous les monstres de la salle son...
/*! @file LogVol_Collimator_ToSample.hh @brief Defines mandatory user class LogVol_Collimator_ToSample. @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...
/* -*- mode: c++; c-file-style: "gnu" -*- */ group "XMLUtils.XMLFragment.xpath"; require init; require XMLUTILS_XMLFRAGMENT_XPATH_SUPPORT; include "modules/xmlutils/xmlfragment.h"; test("XMLFragment xpath #1") { XMLFragment fragment; verify(OpStatus::IsSuccess(fragment.Parse(UNI_L("<root><element1/>text1<elemen...
//Read a cover file void cover_read(string file, CoverList & l, int n) { //Create the ifstream object ifstream input; //Open the cover file input.open(file.c_str()); //Check for error opening the cover file if(input.is_open() == false) { //Display the error cerr << "Error opening " << file << en...
#include "Tank-turret.hpp" Turret::Turret(SDL_Renderer* rend, SDL_Texture* ast, SDL_Rect mov): Unit(rend, ast), mover(mov) { turret_src = {603, 0, 507, 152}; } void Turret::draw() { Unit::draw(turret_src,turret_mover); }
#pragma once #include "CoreMinimal.h" #include "Engine/DataTable.h" #include "Animation/AnimInstance.h" #include "EnemyData.generated.h" // 적 캐릭터 정보를 나타내는 구조체 USTRUCT(BlueprintType) struct ARPG_API FEnemyData : public FTableRowBase { GENERATED_USTRUCT_BODY() public: // 적 코드 UPROPERTY(EditAnywhere, BlueprintRead...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2011 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #if defined(VEGA_SUPPORT) && (defined(V...
/*! * \file mpredialog.cpp * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Implementation of mpre dialog */ #include <QtGui> #include <QHBoxLayout> #include <QVBoxLayout> #include "./mpredialog.h" MpreDialog::MpreDialog(Machine * a, QString * mt, QWidget *par...
#ifndef FINE_FITTING_TRACKING_LOCAL #define FINE_FITTING_TRACKING_LOCAL #include "util_wrapper.h" #include "MeshSimplification.h" #include "LinearFemDeformation.h" #include <vector> #include <cmath> using namespace std; #define MAX_NUM_ITER 1000 #define ENERGY_TOLERANCE 0.0001 #define MAX_ANGLE 60 #define MAX_DI...
////////////////////////////////////////////////////////////////////// ///Copyright (C) 2011-2012 Benjamin Quach // //This file is part of the "Lost Horizons" video game demo // //"Lost Horizons" is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published ...
#ifndef _TimeOutProcess_H_ #define _TimeOutProcess_H_ #include "BaseProcess.h" class TimeOutProcess :public BaseProcess { public: TimeOutProcess(); virtual ~TimeOutProcess(); virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt) ; virtual int doResponse(CDLSocketHandle...
#include "stdafx.h" #include "Camera.h" Camera::Camera() { /*if (isMainCamera) { renderer->SetMainCamera(shared_ptr<Camera>(this)); }*/ projectionMatrix = XMMatrixPerspectiveFovRH(55.0f * (XM_PI / 180.0f), ((float) Win32App::Width) / Win32App::Height, 0.01f, 1000.0f); orthographicMatrix = XMMatrixOrthographicRH...
#ifndef COLLISION_MANAGER_H #define COLLISION_MANAGER_H #include <sgfx/primitives.hpp> #include <list> class collider; class collision_manager { public: class handle { public: handle(const handle&) = delete; handle& operator=(const handle&) = delete; handle(handle&& other) : par...
#include <iostream> int fnx[20][200001]; int main() { std::cin.sync_with_stdio(false); std::cin.tie(NULL); int m; std::cin >> m; for(int i = 1; i <= m; i++) { std::cin >> fnx[0][i]; } for(int n = 1; n < 20; n++) { for(int x = 1; x <= m; x++) { fn...
#include <iostream> #define REP(i, a, n) for(int i = ((int) a); i < ((int) n); i++) using namespace std; template<typename FI> void parted_rotate(FI first1, FI last1, FI first2, FI last2) { if(first1 == last1 || first2 == last2) return; FI next = first2; while(first1 != next) { std::iter_swap(first1++, next+...
#pragma once #include <vector> #include <omp.h> #include "linalg.h" std::vector<Point> momentums_with_energy_in_direction(double theta, double energy_value); void set_probabilities(); double get_probability(double energy);
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Adam Minchinton, Michal Zajaczkowski */ #include "core...
/* * OLED.h * * Created on: Jan 13, 2019 * Author: Marek */ #ifndef CLASSES_OLED_H_ #define CLASSES_OLED_H_ #define OLED_BUFFER_SIZE 8192 #include "Allshit.h" #include "alphabet.h" class OLED { private: uint8_t buffer [OLED_BUFFER_SIZE]; void send_REG(uint8_t cmd); void send_DATA(...
class Solution { public: int rob(vector<int>& nums) { int n=nums.size(); if(n==0) { return 0; } int dpR[n]; int dpN[n]; dpR[0]=nums[0]; dpN[0]=0; for(int i=1;i<n;i++) { dpR[i]=max(nums[i]+dpN[i-1],dpR[i-1]); ...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include "sgfx.hpp" #include "ui/Element.hpp" #include "draw.hpp" using namespace ui; Element::Element(){} void Element::draw_scroll(const DrawingScaledAttr & attr, int selected, int total, int visible){ sg_point_t p = attr.p(); Dim d = attr.d(); int...
// Created on: 1998-11-26 // Created by: Xuan PHAM PHU // Copyright (c) 1998-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 ...
/* leetcode 485 * * * */ class Solution { public: int findMaxConsecutiveOnes(vector<int>& nums) { if (nums.empty()) { return 0; } int sum = 0; int maxSum = sum; for (int i = 0; i < nums.size(); i++) { if (nums.at(i) == 1) { sum++; ...
#include <CASE/random.hpp> #include <CASE/neighbors.hpp> #include <CASE/quad.hpp> #include <CASE/grid.hpp> #include <CASE/static_sim.hpp> #include <CASE/random.hpp> #define COLUMNS 300 #define ROWS 300 #define CELL_SIZE 2 int RULESET = 0; class Wolfram { int x, y; public: bool live = false; bool scanlin...
#include "String.h" #include "Object.h" #include "Map.h" #include "CFunc.h" #include "GC.h" #include "StringBuilder.h" #include <stdio.h> #include <string.h> #include <assert.h> Value String::value(GC *gc, unsigned len) { return len <= 5 ? VAL_TAG(T_STR0 + len) : VAL_OBJ(String::alloc(gc, len)); } Value String::...
#ifndef MYENGINE_H #define MYENGINE_H #include "Engine.h" class MyEngine : Engine { public: //MyEngine(); ~MyEngine(); virtual void started(); private: }; #endif
#include <iostream> #include <fstream> #include <stdint.h> #include "fann.h" #include "DEdvs/config.h" void createLUT(const char* path_to_fann_net, uint16_t depth_lut[dedvs::kXtionDepthResolutionX] [dedvs::kXtionDepthResolutionY] ...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #include "core/pch.h" #ifdef XSLT_SUPPORT #include "modules/xslt/src/xs...
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetBackgroundColor(50); jelly1.init(ofPoint(0,0,0), ofPoint(1,1,1)); gui.setup(); gui.add(rad1.setup("rad", PI, 0, 2*PI)); gui.add(rad2.setup("rad", 1.5*PI, 0, 2*PI)); } //--------------...
/*! @file LogVol_CCHardCovering_Lid.hh @brief Defines mandatory user class LogVol_CCHardCovering_Lid. @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 e...
//////////////////////////////////////////////////////////////////////////////// // // (C) Andy Thomason 2012-2014 // // Modular Framework for OpenGLES2 rendering on multiple platforms. // namespace octet { /// Scene containing a box with octet. class example_shader : public app { // scene for drawing ...
#include "ClientSocketEx.h" #include <stdlib.h> #include <memory.h> #include <iostream> #include <fcntl.h> //#include <stdio.h> #include <unistd.h> #include "Logger.h" #ifndef MSG_NOSIGNAL #define MSG_NOSIGNAL 0 #endif //每次读数据的最大长度, 注意:这里不是限制包的总长度,纯粹是为了分段读数据 #define MaxOnceRecv 1024 #define MaxOnceSend 1024 CClien...
//============================================================================ // Name : UnorderedMap.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #incl...
//知识点:并查集 /* By:Luckyblock 题目要求: 给定一张图, 判断 这张图每个点是否都联通 并且图中不存在环 (即:为一棵树) 分析题意: 要求 图中不存在环 ,容易联想到Kruscal求生成树的过程 且 要求每个点均联通 , 容易想到 使用并查集来进行维护 算法实现: 使用并查集 每次读入时, 都判断两个点是否在同一个联通块中. 如果在同一联通块 , 那么将这两个点连接后, 图中就会出现一个环 , 则此图不合法 读入时记录图中点的编号 读图完毕后 ,枚举每一个点的祖先,判断它们是否在一个联通块中 以此来判断 所有的点是否联通 */ #include<...
#include "boundaryConditions.h" #include <math.h> double leftVal(double y) { return 0.0; } double rightVal(double y) { return 0.0; } double topVal(double x) { return 0.0; } double bottomDer(double x) { return 0.0; }
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ncurses.h> #include <string> using namespace std; int n, sum, s[100][100]; void input() { scanf("%d", &n); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { scanf("%d", &...
/* * mysql_test.cpp * Copyright: 2018 Shanghai Yikun Electrical Engineering Co,Ltd */ //#include "yikun_common/mysql/db_helper.h" int main(int argc,char* argv[]) { // yikun_client_common::DbHelper slavedb("127.0.0.1","ir_master"); // if(slavedb.dbconnect()) // { // bool ret = slavedb.selectHosts...
#include <stdio.h> #include <stdlib.h> #include <dirent.h> #include <unistd.h> #include <string> #include <sstream> #include <map> #include <iostream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/core/core.hpp" #include "hough.h" #define MAX_SLOPE 10 #define MIN_SLO...
#include <stdio.h> #include <time.h> #include <opencv2/opencv.hpp> #include <iostream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/core/core.hpp" #include "opencv2/opencv.hpp" #include <opencv2\imgproc\types_c.h> #include "bits.h" #include <string> #include <fstream> using namespace std; bool ...
/** * @file CannyDetector_Demo.cpp * @brief Sample code showing how to detect edges using the Canny Detector * @author OpenCV team */ #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" using namespace cv; //![variables] Mat src, src_gray; Mat dst, detected_edges; int ...
// // CRequestFactory.h // server // // Created by Sergey Proforov on 17.05.16. // Copyright (c) 2016 Proforov Inc. All rights reserved. // #ifndef __server__CRequestFactory__ #define __server__CRequestFactory__ #include "Poco/Net/HTTPRequestHandlerFactory.h" #include "Poco/Net/HTTPRequestHandler.h" #include "Poc...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Pawn.h" #include "ShooterController.generated.h" // Hit and shot missed delegate declarations DECLARE_DELEGATE_OneParam(FOnTargetHit, class ATarget*); DECLARE_DELEGATE(FOnShot...
#include <iostream> using namespace std; int main (int argc, char *argv []) { cout << "hallo"; cout << "world"; cout << "\n"; cout << "cs 101\n"; cout << "batch of 2010\n"; // this is a comment. // observe the formatting in the output and trace it in this source file }
#pragma once #include "Module.h" #include "p2List.h" #include "ModulePhysics.h" struct Flipper{ b2Body* Placement; b2Body* ForceShape; b2RevoluteJoint* Flipper_joint; }; class Colliders : public Module { public: Colliders(Application* app, bool start_enabled=true); ~Colliders(); bool Start(); void OnColli...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2008 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Manuela Hutter (manuelah) */ #ifndef ST_WEBSERVER_MANA...
#include <cstdio> #include <iostream> #include <vector> #include <string> #include <stack> #include <unordered_map> #include <unordered_set> #include <queue> #define INT_MAX 0x7fffffff #define INT_MIN 0x80000000 using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : va...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Yngve Pettersen ** */ #ifndef PKCS11_PUBKEY_H #define PKCS11...
#ifndef ISA_HANDLERS_H #define ISA_HANDLERS_H /* * Instructio handler * perform instruction on the state / disassemle */ #include <sstream> #include <cassert> #include "definitions.h" namespace selen { namespace isa { //Base class class handler_t { public: handler_t(){} virtual ~handler_t(){} virtua...
//--------------------------------------------------------------------------- #ifndef optionsH #define optionsH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> //-----------------------------------...
std::string greet(const std::string& name){ std::string outputString = "Hello, " + name + " how are you doing today?"; return outputString; }
/** * @author:divyakhetan * @date: 10/1/2019 */ #include<bits/stdc++.h> using namespace std; int pascal(int i, int j){ if(j == 1) return 1; if(i == j ) return 1; else return pascal(i - 1, j) + pascal(i - 1, j - 1); } int main(){ int n; cin >> n; for(int i = 1; i <= n; i++){ for(int j = 1; j <= i; j++)...
#include<stdio.h> #include<iostream> #include<queue> using namespace std; char map[30][30][30]; //记录节点信息 int sta[30][30][30]; //标记是否访问 int base[6][3] = { {-1,0,0},{1,0,0},{0,-1,0},{0,1,0},{0,0,-1},{0,0,1} };//随意对应 int L, R, C; struct Piont { int x, y, z; //位置坐标 int step; ...
#include "GameStartProc.h" #include "HallHandler.h" #include "Logger.h" #include "Despatch.h" #include "GameServerConnect.h" #include "PlayerManager.h" #include "GameCmd.h" #include "ProcessManager.h" #include <string> using namespace std; GameStartProc::GameStartProc() { this->name = "GameStartProc"; } GameStartPro...
#include <iostream> #include <string> #define SBLOGGER_LOG_LEVEL SBLOGGER_LEVEL_TRACE #include "SmallBetterLogger.hpp" int main() { // Declarations (Logger) sblogger::StreamLogger l; // Simplest way to make a logger sblogger::stream_logger logErr(sblogger::StreamType::STDERR, "[%F %T][%^er]"); ...
#ifndef __WATER_H__ #define __WATER_H__ class Water : public ObjectBase { D3DMATERIAL9 m_mtr; void _StencilWaterOn(void); void _StencilWateroff(void); public: enINITERROR InitVTX (void); // 버텍스 생성 void InitMaterial(void); void Control (float dTime){}; void Render (void); // 오브젝트 렌더링 void R...
/***************************************************************************************************************** * File Name : DeleteLL.h * File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\sites\geeksforgeeks\linkedlist\page04\DeleteLL.h * Created on : Dec 17, 2013 :: 11:48:13 PM * Author...
#ifndef _PushForbidProc_H_ #define _PushForbidProc_H_ #include "BaseProcess.h" class PushForbidProc :public BaseProcess { public: PushForbidProc(); virtual ~PushForbidProc(); virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt) ; virtual int doResponse(CDLSocketHandle...
//Phoenix_RK /* https://leetcode.com/problems/intersection-of-two-arrays-ii/ Given two arrays, write a function to compute their intersection. */ class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { vector<int> result; sort(nums1.begin(),nums1.end()); ...
// // Created by 송지원 on 2020-02-15. // #include <iostream> long long countR(long long input, long long r) { long long ret = 0; long long r_temp = r; while (input / r_temp >= 1LL) { ret += (input / r_temp); r_temp *= r; } return ret; } int main() { long long n, m; long lon...
// the default value of new created value is the default type value class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { vector<vector<string>> anagrams; unordered_map<string, vector<string>> umap; for (string str : strs) { umap[strIndex(str)].pus...
#include <wx/wx.h> #include <wx/msgdlg.h> #include <wx/sizer.h> #include <wx/dir.h> #include <wx/filefn.h> #include <wx/stattext.h> #include <wx/textctrl.h> #include <wx/button.h> #include <wx/dialog.h> #include "clZipReader.h" #include "event_notifier.h" #include "cl_standard_paths.h" #include "file_logger.h" enum {...
#include <iostream> #include <fstream> #include "avltree.hxx" template <class Tree> static void dump_to_dot(Tree const &tree, std::ostream &out) { out << "digraph {\n"; tree.traverse([&out](typename Tree::Node const *n) { out << "n" << n << " [label=\"" << n->value() << " [" << n->yield_height() << "]\", fontcol...
#include "gtest/gtest.h" #include "../../greekjet_fadbad/GreeksFadbadHelper.h" #include "../../options/Option.hpp" #include "../../greekjet_fadbad/Func.h" #include "../../binomial_method/case/Case.hpp" #include "../../options/OptionPut.hpp" #include "../../binomial_method/case/LeisenKlassenMOT.hpp" #include "../../bino...
//************************************************************************************************************* // // 画像2D処理[Image2d.h] // Author : IKUTO SEKINE // //************************************************************************************************************* #pragma once #ifndef _IMAGE2D_H_ #de...
//@author Timofey #include "TXLib.h" void drawKing (int x, int y, int r, COLORREF color, COLORREF color1); int main() { txCreateWindow(1000, 800); drawKing(50,100,10, RGB(0,0,0), RGB(255,255,255));//размер королевы сделан в два раза меньше, чем короля. Поэтому переменная r у королевы должна быть ров...
#include "pch.h" #include "EventSystem.h" void Hourglass::EventSystem::Init() { INIT_COMPONENT_POOL(TriggerEventGroup); INIT_COMPONENT_POOL(TimeTrigger); } void Hourglass::EventSystem::Update() { m_TimeTriggerPool.UpdatePooled(); }
class PartOre { weight = 1; }; class PartOreSilver { weight = 1.2; }; class PartOreGold { weight = 1.5; };
#ifndef GEN_COMMAND_H #define GEN_COMMAND_H #include <iostream> #include <unistd.h> #include <cmath> #include <cstdio> #include <cstdlib> #include <stdint.h> uint32_t genCommand(const char *cmdFilePath, CmdEntry *cmdEntryBuff); void dumpCmdEntry(CmdEntry cmdEntry); void dumpTableMetas(); #endif //GEN_COMMAND_...
#include "equationNode.h" #include "parser.h" #include <iostream> #include <string> #include <vector> #include <unordered_map> #include <algorithm> using namespace std; // initializing static members of class EquationNode unordered_map<string, vector<EquationNode*>*> EquationNode::_equation_map; unordered_map<string, ...
#include <set> #include <vector> const int MAX_VERTICES_COUNT = 32; using Vertex = int; struct Graph { std::vector<std::set<Vertex>> edges; bool HasEdge(Vertex from, Vertex to) const { return (edges[from].find(to) != edges[from].end()); } std::vector<Vertex> GetChildren(Vertex...
#include "Player.h" #include <stdio.h> Player* Player::Instance() { static Player instance; return &instance; } void Player::moveCtrl() { if (getKey()->motion->getMotionForward()) { pitch += 3; if (PlayerPitch < 100)PlayerPitch += 1; } if (getKey()->motion->getMotionLeft()) ...
#include<fstream> #include<string.h> #include<ctype.h> #include<iostream> #include<algorithm> #include<map> #include<unordered_map> #include<array> #include<deque> #include<math.h> #include<functional> #include<unordered_set> #include<set> #include<iomanip> #include<bitset> using namespace std; int i, j...
/** Kabuki SDK @file /.../Source/Kabuki_SDK/_2D/Point_f.cpp @author Cale McCollough @copyright Copyright © 2016 Cale McCollough @license Free and open-source. You can find a copy of the license that YOU MUST READ in the accompanying ./ReadMe.md, file incorporated herein by this reference, ...
/* * Program: Image_Equalizater.cpp */ #include "Image_Equalizater.h" /* * Usage: Construct Method * Parameters: * 1. source image * 2. type 0 for gray image input, type 1 for colorful image input */ Histogram_Equalizater::Histogram_Equalizater(CImg<unsigned char>& src, bool type){ this->srcImg = src; this->img...
#pragma once #include <map> #include <string> #include <iberbar/Utility/Result.h> #include <iberbar/Poster/TextureScale9.h> #include <iberbar/Poster/Font.h> namespace iberbar { namespace Poster { class CSurface; class __iberbarExports__ CResourcesManager { public: CResourcesManager() {} ~CResourcesMa...
#include "ros/ros.h" #include "std_msgs/String.h" #include "beginner_tutorials/Num.h" #include "custom_messages/driveMessage.h" #include "std_msgs/Float32.h" #include "std_msgs/Int16.h" #include "beginner_tutorials/driveCmd.h" #include "math.h" const float sampling_rate = 10; //sampling rate in hz const float ub = 5; ...