text
stringlengths
8
6.88M
#pragma once #include <glm/glm.hpp> #include "../../texture/Texture.h" class Material { public: Material(); Material(Texture* diffuse); Material(glm::vec3 color); ~Material() {}; char getName(); Texture* getDiffuse(); Texture* getNormal(); glm::vec3 getColor(); void setDiffuse(Texture* diffuse); void set...
class Tokarew_TT33_DZ: Makarov { scope = 2; displayName = $STR_DZ_WPN_TT33_NAME; descriptionShort = $STR_DZ_WPN_TT33_DESC; model = "\RH_de\RH_tt33.p3d"; picture = "\RH_de\inv\tt33.paa"; begin1[] = {"\RH_de\sound\TT33.wss",0.794328,1,700}; soundBegin[] = {"begin1",1}; drySound[] = {"\ca\Weapons\Data\Sound\T33_d...
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*- */ #include "core/pch.h" #include "modules/ecmascript/carakan/src/es_pch.h" #include "modules/ecmascript/carakan/src/object/es_arguments.h" #include "modules/ecmascript/carakan/src/object/es_indexed.h" /* static...
//================================================================================================== // Name : InputParserUtil.h // Author : Ken Cheng // Copyright : This work is licensed under the Creative Commons // Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of th...
#ifndef H_ELEMENT_H #define H_ELEMENT_H #include "libs.h" #include "exceptions.h" class Element { virtual void element(); }; #endif
#include <iostream> constexpr int null = 0; int *p = null; int main() { return(0); }
#ifndef BPUCK2_MANAGER_H #define BPUCK2_MANAGER_H #ifndef PUCK2_ID_MAX #define PUCK2_ID_MAX 31 #endif class BPuck2; class BPuck2Manager { public: BPuck2Manager(unsigned int fromID); virtual ~BPuck2Manager(); int init(); void close(); int addPuck(unsigned int puckID); BPuck2 * getPuck...
#include <iostream> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; vector<pair<int, int>> findSum(const vector<int>& nums, int target){ unordered_set<int> numSet; unordered_set<int> done; vector<pair<int, int>> res; for(int num: nums){ if(numSet.count(n...
/* -*- 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" #ifdef SUPPORT_DATA_SYNC #ifdef SELFTEST #...
#include<iostream> using namespace std; int main() { string s1 = "AB"; cout<<sizeof(s1)/sizeof(s1[0])<<endl; for(int i =0; i<sizeof(s1)/sizeof(s1[0]); ++i) { cout<<"ASCII -> "<< (int)s1[i]<<endl; cout<<"NUMBER -> "<< s1[i] - '0'<<endl; } return 0; }
#ifndef Core_GSelectStageUILayer_h #define Core_GSelectStageUILayer_h #include "GnIListCtrl.h" #include "GInterfaceLayer.h" class GnIListPageCtrl; class GSelectStageUILayer : public GInterfaceLayer { enum { NUM_ROW = 3, NUM_COLUMN = 6, NUM_PAGE = 4, }; private: GnIListPageCtrl* mpListCtrl; ...
#include <iostream> #include "Interfaz.h" int main() { Interfaz i(5); std::cout << "Interfaz contiene " << i.getValor() << " antes de setValor()" << std::endl; i.setValor(10); std::cout << "Interfaz contiene " << i.getValor() << " despues de setValor()" << std::endl; return 0; }
#ifndef _NBODY_SIMULATION_H #define _NBODY_SIMULATION_H #include <nbody/System.h> #include <iosfwd> #include <string> namespace nbody { class Simulation { System *_system; std::string _name; Simulation( const Simulation& sim ) = delete; Simulation& operator=( const Simulation& sim ) = delete; ...
#include "git_repo.h" #include "file_system.h" #include <iostream> #include <exception> int main(){ try{ //reate repo if it doesnt exist and initialize it as bare git_repo rep("ja"); }catch(std::exception &e){ std::cout<< e.what() <<std::endl; } return 0; }
#include "연결리스트.h" Linked_LIST::Linked_LIST() { this->Global_Position = -2; this->Head_NODE = NULL; } int Linked_LIST::Create() { this->Head_NODE = NULL; this->Global_Position = -1; return 0; } int Linked_LIST::Get_ITEM(int n) { if (IsEmpty() == true) return -1; LIST_NODE* p = this->Head_NODE; for (int i = 0;...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2012 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" #include "modules/dragdrop/dragdrop_module...
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "Marabese.h" #include "MarabeseGameMode.h" #include "MarabesePawn.h" AMarabeseGameMode::AMarabeseGameMode(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { // set default pawn class to our character class DefaultPawnClass ...
/*! *@brief パッド。 */ #include "stdafx.h" #include "Engine/HID/Pad.h" #include <limits.h> #define INPUT_DEADZONE ( 0.24f * FLOAT(0x7FFF) ) // 入力の遊びとなる範囲。 Pad g_pad[Pad::CONNECT_PAD_MAX]; //g_padの定義。 /*! *@brief 仮想ボタンとXBoxコントローラのボタンとの関連付けを表す構造体。 */ struct VirtualPadToXPad { EnButton vBu...
#ifndef AMVK_DEVICE_MANAGER_H #define AMVK_DEVICE_MANAGER_H #ifdef __ANDROID__ #include "vulkan_wrapper.h" #else #include <vulkan/vulkan.h> #include <GLFW/glfw3.h> #endif #include <vector> #include <cstring> #include <unordered_set> #include <stdint.h> #include "state.h" #include "vulkan_utils.h" #include "macro.h" ...
#include <iostream> #include <pqxx/pqxx> using namespace std; using namespace pqxx; int main() { string db, user, pass, connect; // Get the info for the database to connect to cout << "Enter the name of the database: "; cin >> db; cout << "Enter the username: "; cin >> user; cout << "En...
#include <iostream> struct X { void operator()(int x) { std::cout << "X " << x << std::endl; } }; struct Y { void operator()(int y) { std::cout << "Y" << y << std::endl; } }; template<bool C, typename T, typename F> using Conditional = typename std::conditional<C, T, F>::type; void test() { Conditional<...
#include<stdio.h> int findMax(int *a, int row, int col, int *r, int *c) { int sum = 0; for (int i = 0; i < row -1; i ++) { int sum1 = 0; int *r1 = a + i * col; int *r2 = a + (i + 1) * col; for (int j = 0; j < col - 1; j ++) { sum1 = r1[j] + r2[j] + r1[j + 1] + r2[j +...
#include <iostream> using namespace std; /* → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → */ #define int long long int #define ld long double #define F first #define S second #define P pair<int,int> #define pb push_back #define endl '\n' /* → → → → →...
// Created on: 1997-12-24 // Created by: Xuan PHAM PHU // 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 ...
#include "StdAfx.h" #include "GtConvertString.h" GtConvertString::GtConvertString(void) { } GtConvertString::~GtConvertString(void) { } void GtConvertString::Format(gtchar* pcFormat, ...) { gtchar buffer[1024] = {0,}; va_list args; va_start( args, pcFormat ); #ifdef __GNUC__ gint ret = vsprintf(buffer, pcForma...
#define CATCH_CONFIG_MAIN #include "../external/catch2/catch.hpp" #include "../src/algorithm/frequency.hpp" #include <vector> #include <string> template <typename T, typename U> struct TestStruct { U val; std::unordered_map<T, size_t> actual; TestStruct(U val, std::unordered_map<T, size_t> actual) ...
#pragma once #include <list> #include "Enemy.h" class Trigger { public: Trigger() :m_inTrigList() {}; virtual ~Trigger() { m_inTrigList.clear(); }; virtual void Enter(Enemy* obj) { if(obj->GetEnemyNum() > 100) { std::cout << "This is a problem!" << std::endl; } m_inTrigList.push_back(obj); }; ...
#pragma once class Image { enum IMAGE_LOAD_KIND { LOAD_RESOURCE = 0, LOAD_FILE, LOAD_EMPTY, LOAD_END }; typedef struct tagImage { DWORD resID; HDC hMemDC; HBITMAP hBit; HBITMAP hOBit; int width; int height; BYTE loadType; tagImage() { resID = 0; hMemDC = NULL; hBit = NULL; hOBit...
#include <cstdio> #include <cctype> #include <iostream> #include <sstream> #include <vector> #include <stack> using namespace std; #include "ast.h" #include "types.h" #include "symtable.h" #include "emit.h" struct Node { string def; string token; vector<Node*> adj; }; Node *readTree() { stack<Node*> stk; ...
#include "gtest/gtest.h" #include <string> #include <vector> #include "ConstantType.h" #include "LexicalParser.h" namespace LexicalParserTests { TEST(ConstantsTests, PI_Test) { auto tokens = arithmetic_parser::GetTokens("PI"); ASSERT_EQ(tokens.size(), 1); auto token = tokens[0]; ASSERT_EQ(token->token_ty...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2001 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ /** @file opscreenpropertiescache.h * * Caching-class for scree...
#include <iostream> #include<conio.h> #include<stdio.h> using namespace std; int main() { //In ra man hinh Cac du lieu co trong file Khong Biet N FILE *FileIn=fopen("INPUT.txt","r"); int dem=0; while(!feof(FileIn))//Trong Khi khac ket Thuc file { int x; fscanf(FileIn,"%d",&x); ...
#ifndef BB_SHAREMEMORY_H #define BB_SHAREMEMORY_H #include <iostream> #include <cstring> #include <sys/shm.h> namespace bb{ struct ShareMemory{ key_t shmkey{}; int shmid{}; void *shmaddr{}; size_t shmsize{1024}; void openKey(const key_t &key=IPC_PRIVATE); void openId...
#ifndef LIGHT_H #define LIGHT_H #include "MyString.h" #include "Movable.h" #include "Mathlib.h" #include "NameGenerator.h" namespace HW { /** light position is always (0,0,0) in local space light direction is always (-1,-1,-1) in local space. */ class SceneManager; class Camera; struct light_struct{ float posit...
#include<stdio.h> #include"mpi.h" #include"matrix.h" #include"IterativeSolver.h" #include"InfinityNorm.h" #include"AnalyticSolver.h" #define DEFAULT_SIZE 64 #define DEFAULT_MAX_ITERATIONS 1000 double calculateEpsilon(int n) { return 0.008 / (n / 64); } void exchangeHaloNodes(matrix & m, int rank, i...
/* * binjson.h * * Created on: Jan 18, 2017 * Author: ondra */ #ifndef SRC_IMTJSON_BINJSON_H_ #define SRC_IMTJSON_BINJSON_H_ #include "value.h" #include <unordered_map> #include <memory> #include "base64.h" namespace json { ///Parse JSON from binary form /** * @tparam Fn function which returns next byte...
#ifndef SEPARATE_CHAINING_H #define SEPARATE_CHAINING_H #include <vector> #include <list> #include <string> #include <algorithm> #include <functional> #include <vector> using namespace std; int nextPrime(int n); // SeparateChaining Hash table class // // CONSTRUCTION: an approximate initial size or de...
#include "temperature.h" //************************* User Defined Variables ********************************************************// float CalibrationEC=1.38; //EC value of Calibration solution is s/cm //################################################################################## //----------- D...
#include"Floor.h" #include"TextPanel.h" #include<iostream> #include<cstdlib> using namespace std; Floor *Floor::f; /* Private constructor: prevents unwanted construction */ Floor::Floor() { this->chamberList.push_back(new Chamber(3, 3, 4, 26, 0)); this->chamberList.push_back(new Chamber(39, 3, 10, 37, 1)); this-...
#ifndef MAINWINDOW_H #define MAINWINDOW_H // Aldebaran includes. #include <alvision/alimage.h> #include <alcommon/alproxy.h> #include <alproxies/alvideodeviceproxy.h> #include <alvision/alvisiondefinitions.h> #include <alproxies/altexttospeechproxy.h> #include <alvalue/alvalue.h> #include <alproxies/almotionproxy.h> ...
// 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 ...
#include "ccl.hpp" std::tuple<cv::Mat, int> grassfire_4( cv::Mat img ) { cv::Mat img_label = cv::Mat_<int>( img.size(), 0 ); cv::Mat img_marked = cv::Mat_<uchar>( img.size(), 0 ); std::vector<std::tuple<int, int>> marker; std::tuple<int, int> cur_mark; unsigned int mark_lable = 0; for ( int i ...
#pragma once #include <map> #include <memory> namespace sbg { struct Group; struct GroupContainer { Group* group(std::string name); private: std::map<std::string, std::unique_ptr<Group>> _groups; }; }
#pragma once #include<string> using namespace std; class NameGenerator { public: NameGenerator(const string &prefix); string Generate(); string m_Prefix = "HW"; unsigned int m_NameGenCount = 0; };
// // softorchid.ino // #include <Servo.h> #include "ServoEaser.h" const int ledPin = 13; const int servoPin = 10; int servoFrameMillis = 20; // minimum time between servo updates Servo servo1; ServoEaser servoEaser; // configurable list of servo moves int myServoMovesCount0 = 9; ServoMove myServoMoves0[] = {...
#include "../headers/LetNode.hpp" #include "../headers/AstNode.hpp" #include <string> #include <sstream> using namespace std; LetNode::LetNode(string objectId, string type, Node *expr) { this->objectId = objectId; this->type = type; this->expr = expr; } LetNode::LetNode(string objectId, string type, Nod...
// maincode.cpp : 定义控制台应用程序的入口点。 // #include <comn.h> #include "contour_track.h" int main() { using namespace std; contr::contour_track ac("t.txt"); ac.begin_actions(); contr::contour_track::iso_lines_type lines = ac.get_all_iso_line(); for(size_t i=0;i<lines.size();i++) { for(size_t j=0...
// // Created by gurumurt on 4/6/18. // #ifndef OPENCLDISPATCHER_SELECTION_H #define OPENCLDISPATCHER_SELECTION_H #endif //OPENCLDISPATCHER_SELECTION_H #include <cstring> #include "../Environment.h"; #include "../globals.h"; class logical_kernel { public: string name = "logical"; string kernel_src; in...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; int a[1010],b[1010]; int main() { int n; while (scanf("%d",&n) != EOF && n) { for (int i = 0...
#include <chuffed/support/dijkstra.h> #include <chuffed/support/set_finder.h> #include <iostream> #include <map> #include <utility> using namespace std; // The label on each node counts the cost of its duration! (i.e. Duration included) // i.e. the label on each node says when will you be done with it. Dijkstra::D...
#include <fstream> #include "cp_2_opt.h" int main() { ofstream in_pix("input_pixels_regression_result_cp_2_opt.txt"); ofstream fout("regression_result_cp_2_opt.txt"); HWStream<hw_uint<32> > raw_update_0_read; HWStream<hw_uint<32> > cp_2_update_0_write; // Loading input data // cmap : { raw_update_0[ro...
#ifndef CHEKINADMIN_H #define CHEKINADMIN_H #include <QMainWindow> namespace Ui { class chekinadmin; } class chekinadmin : public QMainWindow { Q_OBJECT public: chekinadmin(QWidget *parent = 0); ~chekinadmin(); protected: void changeEvent(QEvent *e); private: Ui::chekinadmin *ui; private s...
/* * ulcd_progress_bar.cpp * * * */ #include "ulcd_progress_bar.h" /* * private defines * */ /* * private variables * */ /* * constructor * */ ulcd_progress_bar::ulcd_progress_bar(uLCD_4DLibrary* p_lcd, uint16_t foreground_color, uint16_t background_color, uint16_t x_origin, uint16_t y_origin, uint1...
/// 3. Una compañía quiere conocer el porcentaje total de ventas y los gastos totales /// atribuibles a cada vendedor. Cada vendedor se identifica por un número que va del 0 /// al 19. Para cada vendedor se guardan las ventas totales y sus gastos. Escribir un /// algoritmo que permita introducir las ventas y los gastos...
#pragma once #include "ofMain.h" #include "point.h" #include "ofxUI.h" #include "ofxMetaballs.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void exit(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); ...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include <cctype> #include <cstdio> #include <cstring> #include "var/String.hpp" using namespace var; String::String(){ set_capacity(min_size()-1); } String::String(size_t capacity){ set_capacity(capacity); } String::String(const char * s){ assign(s); } ...
long previousMillis = 0; const long INTERVAL_SEC = 1000; float tem; int val = 0; //int teram = 0; int i=0; // 초음파 센서 핀 설정 const int sonicTriggerPin1 = 27; const int sonicEchoPin1 = 26; const int sonicTriggerPin2 = 25; const int sonicEchoPin2 = 24; const int sonicTriggerPin3 = 23; const int sonicEchoPin3 = 22; const...
multiset<int> S; for(int i=0;i<n;i++){ auto it = S.upper_bound(vet[i]); // low for inc if(it != S.end()) S.erase(it); S.insert(vet[i]); } // size of the lis int ans = S.size(); //////////////////////////// see that later // https://codeforces.com/blog/entry/13225?#comment-180208 vi LIS(const vi &e...
#include <chuffed/globals/dconnected.h> #include <cstring> #include <iostream> using namespace std; #define DEBUG 0 FilteredLT::FilteredLT(GraphPropagator* _p, int _r, std::vector<std::vector<int> > _en, std::vector<std::vector<int> > _in, std::vector<std::vector<int> > _ou) : LengauerTarjan(_r, _en, _...
#ifndef wali_EXCEPTION_GUARD #define wali_EXCEPTION_GUARD 1 /*! * @author Nicholas Kidd */ #include "wali/Common.hpp" #include "wali/Printable.hpp" #include <string> #include <stdexcept> namespace wali { /* * @class Exception */ class Exception : public Printable { public: Exception(); ...
#pragma once #include <memory> namespace job { struct Job; } struct Furniture; namespace hydroponics { std::shared_ptr<job::Job> make_harvest_job(Furniture* table); std::shared_ptr<job::Job> make_plant_job(Furniture* table); }
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #include <map> #include <stack> #include <queue> #include <cstdio> #include <cstdlib> #include <cstring> #include <numeric> #include <bits...
/*************************************************************************** * Copyright (C) 2009 by Dario Freddi * * drf@chakra-project.org * * * * This pr...
// Created on: 1994-09-23 // Created by: Yves FRICAUD // Copyright (c) 1994-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 L...
#include "extensions/grpc_stream_demuxer/grpc_stream_demuxer.h" namespace Envoy { namespace Extensions { namespace GrpcStreamDemuxer { GrpcStreamDemuxer::GrpcStreamDemuxer(const std::string& subscription, const std::string& address, int port) : subscription_(subscription), address_(address), port_(port) {} void G...
#include "stdafx.h" #include "TestRunner.h" #include "TestBase.h" #include "StringUtilsTests.h" #include "Ai4wwTests.h" #include "QsoTests.h" #include "N6MU01.h" #include "CallsignTests.h" #include "StationTests.h" #include "CategoryTests.h" #include "ContestConfigTests.h" TestRunner::TestRunner() { m_tests.push_ba...
#pragma once #include <boost/variant/apply_visitor.hpp> #include <string> #include "compiler/ast.hpp" #include "print_ast.hpp" namespace parser { namespace ast { using namespace perseus::detail::ast; using namespace perseus::detail::ast::parser; } using namespace std::string_literals; class pr...
#include "Shade.h" using namespace std; bool Shade::init() { return true; } void Shade::initWithLevel(int level, int index) { this->level = level; this->index = index; if (level == 1) sp = Sprite::create("g1.png"); else if (level == 2) sp = Sprite::create("g2.png"); else if (level == 3) sp = Sprite::creat...
#include <vector> #include <d3dx9.h> enum FEATURE_PATTERN{ PATTERN_POINT = 1, PATTERN_LINE, PATTERN_POLYGON, PATTERN_CIRCLE }; class VoronoiPattern{ public: VoronoiPattern(FEATURE_PATTERN type, float depth, int slice, const std::vector<D3DXVECTOR3>& pos_set); virtual ~VoronoiPattern(); virtual void CreateBuff...
/*********************************************************************** h£ºNoiseMaterialManager ************************************************************************/ #pragma once namespace Noise3D { class /*_declspec(dllexport)*/ IMaterialManager :public IFactory<IMaterial> { public: IMateri...
#include<stdio.h> #include<conio.h> #include<graphics.h> #include<dos.h> #include<math.h> void main() { int gd=DETECT,gm; int x,y,x1,y1,x2,y2,dx,dy,p,run; do { initgraph(&gd,&gm,"C:\\TURBOC3\\BGI"); printf("Enter the value of (x1,y1)\n==> "); scanf("%d %d",&x1,&y1); print...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007, Gogul Balakrishnan, Akash Lal, Thomas Reps // University of Wisconsin, Madison. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provide...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "10856" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) #define MAXN 10000000 int table[MAXN+5]; void build(){ for(int i = 0 ; i < MAXN+5 ; i++ ) table[i] = 1; table[0] = table[1] = 0; for(int i = 2 ; i < MAXN+5 ; i+...
#include "Model.h" Model::Model(std::string path) { setPath(path); } void Model::setPath(std::string path) { this->path = path; } Model::Model() { } void Model::getUniform() { texture_slot = glGetUniformLocation(shader, "basic_texture"); if (texture_slot == -1) std::cout << "Variable 'basic_texture' not f...
#include "Fenetre_Reponse.hh" #include "Fenetre_Choix.hh" #include "Fenetre.hh" Fenetre_Reponse::Fenetre_Reponse() : message("Entrez votre nom"), gif("win_loss.gif"), bouton1("Continuer"), bouton2("test"), boiteV(false, 10), boiteH(false, 10) { } Fenetre_Reponse::Fenetre_Reponse(Glib::ustring titre, Glib::ustring m...
#include <iostream> #include <vector> using namespace std; int book[202]; int main() { int N, M; cin >> N >> M; std::vector<int> v; for (int i = 0; i < N; i++) { int tempBook; cin >> tempBook; v.emplace_back(tempBook); book[tempBook]++; } for (int i = 0; i < v.size(); i++) { if (book[v[i]] == 1) { ...
#pragma once #include <cstdint> #include "Keng/Graphics/FwdDecl.h" namespace keng::graphics { class GlyphInfo { public: size_t unicode; int horizontalBearingX; int horizontalBearingY; int verticalBearingX; int verticalBearingY; size_t width; size_...
#define CHL_NOT_STARTED 0 #define CHL_WAITING_4_SERVER 1 #define CHL_BUILDING_MESH 2 #define CHL_DONE 3 u16 faceInd [6] = {0,1,2 , 5,4,3}; u16 faceInd2[6] = {2,1,0 , 3,4,5}; bool mesh_builder_flag, laggy_server_flag; class Chunk; Chunk* getChunk(vector3di at,bool gen=false,bool mustBe...
// // Created by 송지원 on 2020-02-12. // #include <iostream> using namespace std; int main() { int M, N; bool isPrimeInt[1000001] = {true, }; cin >> M >> N; for (int i=2; i<=N; i++) { //기존 코드는 여기서 배열 안의 값이 "true"이면 continue 하여 패스하고, 값이 "false"일 경우에만 동작하게 하였음. //하지만 강의나 다른 사람들 코드를 보면 이...
#include "../include/Tools.h" #include "../include/Application.h" #include "../include/myImGui.h" using namespace CAE; void CAE::Tools::toolsPanel() { int pos = -47 + 8; for(auto tool = tools.begin(); tool != tools.end(); ++tool) { auto&[f, s] = *tool; ImGui::SetNextWindowBgAlpha(0.7f); ...
#include "Tank.h" //*Constructor*// Tank::Tank(){} //*Initiate*// void Tank::initiate() { speed = 5; GameObject::initiate((SCREEN_WIDTH / 2), (SCREEN_HEIGHT - 40), speed, 10, 12); setID(PLAYER); setAlive(true); } //*Overide update pure virtual function*// void Tank::update() { if(x < 0) x ...
#include "octonav/OctoGraph.hpp" #include <optional> using namespace std; using namespace octomap; // template class OctoGraph<OctoNode>; inline bool shiftKey(OcTreeKey &key, unsigned char dir); inline void changeDepth(OcTreeKey &key, int diff); tuple<OcTreeNode *, OcTreeKey, unsigned int> getNeighborSameOrHigher(co...
/* Copyright 2019 Abner Soares e Kallebe Sousa */ #ifndef DOMINIOS_HPP_ #define DOMINIOS_HPP_ #include <string> #include <vector> using std::string; /** * @brief Classe Domínio responsável por definir a estrutura básica das classes de cada domínio * @details * A classe Domínio é a classe base das classes de cad...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2012 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" #include "modules/dom/src/domenvironmen...
// // Created by Nikita Kruk on 02.08.18. // #include "SprSystemWithArbitraryStationaryVelocity.hpp" #include <iostream> SprSystemWithArbitraryStationaryVelocity::SprSystemWithArbitraryStationaryVelocity(AbstractParameterSet *parameter_set, ...
#include <iostream> #include "Graph.hpp" using namespace std; int main () { Graph graph; graph.txtInput("entradaProj3TAG.txt"); vector<Node> gr = graph.getGraph(); for(Node g : gr) { if(g.getTipo() == 0){ cout << "Professor " << g.getCodigo() << " tem " << g.getHabilitacoes() << ...
#include"Timeset.h" #include"parentMode.h" #pragma execution_character_set("utf-8") USING_NS_CC; #define H_PI 1.570796327f //#include"FlowWord.h" #include"HelloWorldScene.h" #include"parentstudy.h" #include "DropDownList.h" #include"introduction.h" Scene* Timeset::createScene(){ // 'scene' is an autorelease ...
/* you only have to complete the function given below. Node is defined as struct node { int data; node* left; node* right; }; */ void Postorder(node *root) { if(root!=NULL){ Postorder(root->left); Postorder(root->right); cout<<root->data<<" "; } }...
/* leetcode 404 * * * */ #include <vector> #include <deque> #include <algorithm> #include <list> using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ c...
#ifndef __FLAG_MANAGER_HH__ #define __FLAG_MANAGER_HH__ #include <gflags/gflags.h> #include <iostream> #include <fstream> #include <string> namespace tj { enum FilterType { GrayScale = 1, MeanShift = 2, Green = 3, Blue = 4, Red = 5, Revival = 6, Negative = 7, Emboss = 8, Sharp =...
#ifndef int_var_el_h #define int_var_el_h #include <chuffed/core/options.h> #include <chuffed/core/sat-types.h> class IntVarEL : public IntVar { int lit_min; int lit_max; int base_vlit; int base_blit; Lit getNELit(int v) const { return toLit(base_vlit + 2 * v); } Lit getEQLit(int v) const { return toLit(base_v...
#include<iostream> using namespace std; typedef unsigned long long int ll; void nhap(ll &k,ll &n,ll *&a){ cin>>k>>n; a=new ll [n+1];a [0]=0; } void xuat(ll n,ll *a){ for(ll i=1;i <=n;i++) cout<<a[i]<<" "; cout<<endl; } void backtring(ll k,ll n,ll *a,ll j){ for(ll i=1;i <=k;i++) if(i >a [j-1]){ a [j]=i;...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2009 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef _MODULE_DATABASE_OPSTORAGE_H #define _MODULE_DATABASE_OPSTO...
#include "UnitState.h" UnitState::UnitState(const std::string& name, int health, int maxHealth, int damage, bool isUndead) { std::cout << "\tcreating UnitState" << std::endl; this->name = name; this->hp = health; this->maxHp = maxHealth; this->dmg = damage; this->isUnDead = isUndead; } ...
// // Created by new on 2016/10/19. // #ifndef DD_SERVERS_BASECOINCONF_H #define DD_SERVERS_BASECOINCONF_H #include <string> #include "RedisAccess.h" class BaseCoinConf { public: BaseCoinConf(); ~BaseCoinConf(); /// <summary> /// 从redis读取coin config数据 /// </summary> /// <returns></returns> virtual...
#include "Defines.hh" #include "Exception.hh" #include "ReceiverClient.hh" #include "CUSocket.hh" #include "Help.hh" #include "IAlgorithm.hh" #include <regex> #include <algorithm> #include <iostream> //Initialization of the ressources and properties of client ReceiverClient::ReceiverClient() { try { //Crea...
/* -*- 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. ** */ #ifndef _URL2_PCOMM_ #define _URL2_PCOMM_ #include "modules/u...
#include <iostream> #include <ctstring/macros.hpp> int main(int, char**){ constexpr auto value = HOIST_STRING("Hello, World!"); std::cout << value << std::endl; return 0; }
/****************************************************** Main render functions/ Main loop *****************************************************/ #pragma once namespace Qwerty { //scene states enum Q_SCENE_STATE { WAITING_FOR_CONNECTION, //prompt for 'waiting for connection' CONNECTED_PROMPT, //prompt for ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2007 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" #ifdef _DEBUG #include <sys/timeb.h> /** * ...