text
stringlengths
8
6.88M
#include "LogicHelper.h" #include "BBox.h" LogicHelper::LogicHelper() { } void LogicHelper::init(AvatarEntity* avatar1, AvatarEntity* avatar2, BBoxAtlas* bboxAtlas, int difficulty, bool commonOnly, GameInfo* gameInfo) { m_logicInfo.Init(true); m_logicInfo.SetMaxXPos(550); m_logicInfo.SetMinXPos(0); m_avatar1 = a...
/* -*- Mode: c++; tab-width: 4; 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. */ #ifndef REGION_CHECKER_H #define REGION_CHECKER_H #ifdef AUTO_UPDATE_SUPPORT #includ...
#pragma once #include <math.h> class Vector3 { private: float m_x; float m_y; float m_z; public: Vector3(); Vector3(float x, float y, float z); Vector3 operator+ (const Vector3& other); Vector3 operator- (const Vector3& other); Vector3 operator* (float factor); float operator*(const Vector3 & other); Ve...
// // ofxTwistedRibbon.h // example // // Created by Atsushi Tadokoro on 8/14/14. // // #pragma once #include "ofMain.h" class ofxTwistedRibbon { public: ofxTwistedRibbon(int length = 1000, ofColor color = 0xcccccc, float thickness = 10.0); void update(ofVec3f position); void update(ofVec3f positi...
#include <bits/stdc++.h> using namespace std; int t,n,m,block; string a,b; void findans(){ int ans[50][50],alen = a.length(),blen = b.length(); for(int i = 0; i <= alen; i++){ for(int j = 0; j <= blen; j++){ if(i == 0 || j == 0) ans[i][j] = 0; else if(...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2006 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @author: karie * */ #ifndef _DESKTOP_BOOKMARK_H_ #define _DE...
#pragma once #include "texture.hpp" namespace leaves { namespace pipeline { template <> struct texture_traits<texture_rt> : texture_traits_base { static constexpr bool is_texture_2d() noexcept { return true; } static constexpr bool is_texture_rt() noexcept { return true; } static constexpr ob...
// // Texture.hpp // Neverland // // Created by Admin on 20.07.2021. // #pragma once #include <string> class Texture { private: unsigned int m_RendererID; public: Texture(const std::string &path); ~Texture(); void bind(unsigned int slot = 0) const; void unbind() const; };
#include <glog/logging.h> #include "gtest/gtest.h" #include "wali/util/DisjointSets.hpp" #include <string> namespace wali { namespace util { template class DisjointSets<std::string>; typedef DisjointSets<std::string> StringSets; typedef std::vector<std::set<std::string> > St...
#ifndef _GetIdleTableProc_H_ #define _GetIdleTableProc_H_ #include "BaseProcess.h" class Table; class Player; class GetIdleTableProc : public BaseProcess { public: GetIdleTableProc(){}; virtual ~GetIdleTableProc(){}; virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context*...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // Copyright (C) 1995-2004 Opera Software AS. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. #ifndef BT_P2PFilePart_H #define BT_P2PFilePart_H // ------------...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#pragma once #include <replay/vector2.hpp> #include <cmath> namespace replay { class planar_direction { public: planar_direction() : planar_direction(0.f) { } explicit planar_direction(float angle) : m_angle(angle) { } float angle() const { return m_angle; } v...
#include <stdio.h> #include <octomap/MapCollection.h> #include <octomap/math/Utils.h> #include "testing.h" using namespace std; using namespace octomap; using namespace octomath; OcTree* generateSphereTree(point3d origin, float radius){ OcTree* tree = new OcTree(0.05); point3d point_on_surface = origin; point_on...
// Created on: 2000-08-17 // Created by: Andrey BETENEV // Copyright (c) 2000-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 a...
#include "com_abacogroup_dbmap_wms_tile_NavionicsDriver.h" #include "NavServer.h" #include "malloc.h" /* * Class: com_abacogroup_dbmap_wms_tile_NavionicsDriver * Method: init * Signature: (Ljava/lang/String;)V */ JNIEXPORT void JNICALL Java_com_abacogroup_dbmap_wms_tile_NavionicsDriver_init (J...
#include <iostream> #include <stdlib.h> using namespace std; void process(char** list, char* chest, int words_partiton, int start_idx) { // 로테이팅 char changer; changer = chest[words_partiton * 4 - 1]; for (int s = words_partiton * 4 - 2; s >= 0; s--) { chest[s + 1] = chest[s]; } chest[0] = changer; // 리스팅 i...
/////////////////////////// // Filename: TextClass.h ////////////////////////// #pragma once #include "FontClass.h" #include "FontShaderClass.h" class TextClass { private: struct SentenceType { ID3D11Buffer *vertexBuffer, *indexBuffer; int vertexCount, indexCount, maxLength; float red, green, blue; }; stru...
/* * main.cpp * * Created on: Jun 9, 2016 * Author: g33z */ #include <iostream> #include "Tablet.h" #include "SmartPhone.h" #include "CellPhone.h" using namespace std; int main() { SmartPhone sp(299.90,4515626,42,5.5,true,9,"Android"); CellPhone cp(45,6135489,98,2.3,false,12); Tablet t(179.9,53154,70,11...
#ifndef RESOURCEMANAGER_H #define RESOURCEMANAGER_H #include <SFML/Graphics.hpp> #include <map> class ResourceManager { public: ~ResourceManager(); static ResourceManager& instance(); bool loadTexture(sf::String name); sf::Texture* getTexture(sf::String name); void removeTexture(sf::String name); private: Reso...
#pragma once #include <unordered_map> #include <string> #include <vector> #include <algorithm> #include <fstream> #include <iostream> // DEBUG #include <SFML/Graphics.hpp> #include "tile_map.hpp" typedef int TileID; typedef sf::Image Tile; bool equal(Tile const& a, Tile const& b){ sf::Vector2u size_a = a.getSi...
#ifndef B1RunAction_h #define B1RunAction_h 1 #include "G4UserRunAction.hh" #include "G4Parameter.hh" #include "globals.hh" class G4Run; class G4DMRunAction : public G4UserRunAction { public: G4DMRunAction(); virtual ~G4DMRunAction(); virtual void BeginOfRunAction(const G4Run*); virtual v...
#include <iostream> #include <fstream> #include <string> #include "mpi.h" using namespace std; int rankProc; int sizeProc; void generateMatrix(int size, string name) { int range = 10000; ofstream out; out.open(name); out << size << endl; for (auto i = 0; i < size; i++) out << rand() % range << " "; out.clos...
#include "utils.hpp" #include "fief_ptts.hpp" #include "battle_ptts.hpp" #include "mail_ptts.hpp" #include "plot_ptts.hpp" namespace pc = proto::config; namespace nora { namespace config { namespace { void check_fief_building_ptt(const pc::fief_building& ptt) { ...
#pragma once #ifndef __COMMONWINDOW_H_ #define __COMMONWINDOW_H_ #include <richedit.h> #include <gdiplus.h> #include <base64.h> namespace PPSHUAI { namespace COMMONWINDOW { class CAnimationDisplayer : public Gdiplus::Image { public: CAnimationDisplayer(const WCHAR* filename, BOOL useEmbe...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Булевый тип данных. Простая задачка // V 1.0 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include<iostream> using namespace std; int main() { cout << boolalpha; cout << "Попадёт ли человек на ...
// Copyright (c) 2012-2017 The Cryptonote developers // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <cstddef> #include <fstream> #include <iomanip> #include...
#pragma once #include <chrono> #include <boost/asio.hpp> #include <boost/bind.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include "PlayerManager.h" using namespace boost::asio; using boost::asio::io_service; //毫秒级定时器, 每隔30毫秒触发一次, 更新玩家的位置信息 class SvcTimer { public: SvcTimer(io_service& ios, PlayerMana...
#include "math.hpp" #include <cmath> #include <cfloat> #define M_PI 3.14159265358979323846 // pi float DegToRad(float x) { return x * ((float)M_PI / 180.f); } float RadToDeg(float x) { return x * (180.f / (float)M_PI); } float DistancePointToLine(FVector Point, FVector LineOrigin, FVector Dir) { FVector ...
#include "renderarea.h" #include <QPainter> RenderArea::RenderArea(QWidget *parent) : QWidget(parent) { } void RenderArea::paintEvent(QPaintEvent *event) { QPainter painter(this); QColor color1(255, 250, 250); painter.setBrush(color1); painter.drawRect(0, 0, width()-1, height()-1); QColor colo...
//----------------------------------------------------------------------------------------------------------- // GAME AESTHETICS: Array Review part 4 //----------------------------------------------------------------------------------------------------------- #include <iostream> using namespace std; int main() { /...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ncurses.h> #include <string> #include <math.h> using namespace std; int n, val[111][111]; int sum1, sum2, min1, min2; void input() { scanf("%d", &n); for (int i = 0; i < n; i++) for (int j = 0...
#include "strategy.h" #include <fstream> #include "kdb_function.h" #include <stdlib.h> using namespace std; using namespace kdb; kdb::Connector kdbConnector; string m_kdbScript = "TRE_IAD_V2T1_[IC_IH_A50]_K60V50B50N0d5S1d5_HIT_Long.q"; int m_ShortLongInitNum = 0; int m_ReadShortLongInitNum = 0; int m_ReadShortLongSi...
#include <cstdio> void test(int arr[10]) { arr[0] = 10; } int main() { int arr[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; test(arr); printf("arr[0] = %d\n", arr[0]); }
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> v; for(int i=0; i<n; i++){ int a; cin >> a; if(i%2 == 0) v.push_back(a); else v.insert(v.begin(), a); } if(n%2 == 1) reverse(v.begin(), v.end()); for(int i=0;...
// Created on: 2016-10-14 // Created by: Alexander MALYSHEV // Copyright (c) 1999-2016 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...
#include <iostream> using namespace std; #include <string> class quew{ public: string data; quew *next; void insert(string data,quew **front,quew **rear) { quew *ptr=new quew; ptr->data=data; ptr->next=NULL; if(*front==NULL) { *front=ptr; *rear=ptr; } else{ (*rea...
const int leftPlayPin = 0; const int leftFilterPin = 1; const int leftFxPin = 2; const int leftFxWetPin = 3; const int rightPlayPin = 4; const int rightFilterPin = 5; const int rightFxPin = 6; const int rightFxWetPin = 7; //Analogue Read values int leftPlayPinVal; int leftFilterPinVal; int l...
#include<iostream> #include<cstdio> #include<queue> #include<cstring> #define getint(a) scanf("%d",&a) #define emptyq(q) while(!q.empty()) q.pop() #define yes printf("YES\n") #define no printf("NO\n") using namespace std; struct interval { int x,y; }; int adjlist[100][100]; int c[100],counter=0,visited[100]; interva...
class Solution { public: vector<string> generateParenthesis(int n) { vector<string> ret; if(n < 1){ return ret; } string cur = ""; dfs(ret,cur,0,0,n); return ret; } void dfs(vector<string> &ret,string cur,int leftNum,int rightNum,int n){ if...
#include "IProcess.h" #include "Configure.h" #include "HallManager.h" #include "Logger.h" #include "ErrorMsg.h" #include "AllocSvrConnect.h" #include "CoinConf.h" #include "ProtocolServerId.h" #include "Util.h" #include "Player.h" #include "RedisLogic.h" #include "GameApp.h" #include "MySqlAgent.h" #include "RoundAgent...
/* Input/Output manipulation tools. 2013, Tivins <https://github.com/tivins> */ #ifndef V_IO_H #define V_IO_H #include <cstdio> #include <cstdlib> #ifdef DEBUG # define vDebug(s) fprintf(stdout," > "s"\n") # define vDebugf(s,...) fprintf(stdout," > "s"\n",__VA_ARGS__) # define vError(s) fprint...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
/* * This node is to control transfer area doors in avoid of illegal entry * Inputs: * ROS message for open&close&stop doors installed at outside and inside * Outputs: * hardware GPIO operation */ #include "lib_security_door.h" #define F_OPEN 15 #define F_CLOSE 22 #define F_STOP 18 #def...
/* * Copyright (c) 2021 Morwenn * SPDX-License-Identifier: MIT */ #include <cstddef> #include <functional> #include <iterator> #include <type_traits> #include <utility> #include <catch2/catch.hpp> #include <cpp-sort/sorter_facade.h> #include <cpp-sort/sorter_traits.h> #include <cpp-sort/utility/as_function.h> #inclu...
/* class Player An abstract player (human or computer) of the game with a fleet of Ships and two Boards. The primary Board records the locations of their Ships and their opponent's guesses, while the tracking Board holds their own guesses. class Human : public Player ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2010 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 SCOPE_COOKIE_MANAGER #include "modules/...
#include "fullscreen_quad.h" FullscreenQuad::FullscreenQuad(State& state): mState(state), mDescriptorSet(VK_NULL_HANDLE), mImageInfo(nullptr) { } void FullscreenQuad::init() { TextureDesc textureDesc(FileManager::getResourcePath("texture/statue.jpg")); mImageInfo = TextureManager::load( mState, ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) 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 M2_SUPPORT #include "opml_importer.h" #incl...
/* #define MQTT_SERVER_IP "*****" #define MQTT_USERNAME "*****" #define MQTT_PASSWORD "*****" #define MQTT_CLIENT_NAME "*****" #define MQTT_SERVER_PORT ***** #define WIFI_SSID "*****" #define WIFI_PASS "*****" */ #define WIFI_SSID "xxxxxx" #define WIFI_PASS "xxxxx...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #inc...
#include "point.h" Point::Point(unsigned int _r_index, unsigned int _c_index): r_index(_r_index), c_index(_c_index){ } Point Point::getNext(Point lowest, Point highest){ if(r_index < lowest.r_index || r_index > highest.r_index) return Point(0,0); if(c_index < lowest.c_index || c_index > highest.c_index) return ...
// Copyright (c) 2017 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 ...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #include "gtapplication.h" using namespace Gather; int main(int argc, char *argv[]) { int result = 0; if (1) { GtApplication application(argc, argv); if (!application.isTheOnlyReader()) return 0; result = applica...
#include <iostream.h> #include <conio.h> #include <fstream.h> class item{ private: int item_no; char item_name[20]; int stock; public: item(int i){ item_no=i; } void getData(); void showData(); void write(); void read(); void update(); }; void item::getData(){ cout << "Enter name of item no. " << item_n...
#pragma once #include "../abstractElementGenerator.h" namespace robots { namespace generator { /// Class for IfBlock element class IfBlockGenerator: public AbstractElementGenerator { public: IfBlockGenerator(FuncOrientedGenerator* gen, qReal::Id const &elementId): AbstractElementGenerator(gen, elementId) { } pro...
#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...
//知识点: 扩展欧几里得exgcd/线性不定方程 /* 题解地址:https://www.luogu.org/blog/koishikoishi/solution-p1292 由题意, 则有: ans = -ax1 + by1 (x,y ∈ Z) 欲使此不定方程有解 则 ans = k*gcd(a,b) (k∈ Z) 而要求ans的 最小 非负整数解 故ans = gcd(a,b) 用扩展欧几里得 解不定方程 gcd = ax1 + by1 得到了 一组 合理的x与y的解 然后使 x*=-1,a*=-1; 原方程转化为: ax1 + by1 = (-a)*(-x1) + by1...
//PreMadeItem.cpp #include<iostream> #include"PreMadeItem.h" #include <iostream> #include <iomanip> #include <sstream> using namespace std; PreMadeItem::PreMadeItem(std::string name, std::string size):IceCreamItem(size){ this->name = name; if(size == "small"){ IceCreamItem::price = 4.00; }else if(...
#include <iostream> using namespace std; int main () { float sum,x,n=6; while(n<=19){ x=1/n; sum=sum+x; n=n+1; } cout <<sum ; return 0; }
#include <jni.h> #include "ball_graph.h" #include "aes/licence.h" #include "native_log.h" GLint mTextureId = -1; jboolean isHaveLicence = JNI_FALSE; GLint viewWidth = 0; GLint viewHeight = 0; GLint onSurfaceCreated(jboolean singlePic) { glClearColor(0, 0, 0, 0.0); glClearDepthf(1.0); glEnable(GL_DEPTH_TES...
// 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) #include <pika/modules/execution.hpp> #include <pika/testing.hpp> #include <pika/executio...
#ifndef __FOOBAR_TYPES_H__ #define __FOOBAR_TYPES_H__ #include <vector> #include <unordered_map> #include <utility> #include <string> namespace foobar { typedef size_t size_type; typedef std::pair<std::string, size_type> vote_count; namespace internal { typedef std::vector<const std::string *> ptr_vector; typedef st...
/* * **************************************************************************** * * * * * Copyright 2008, xWorkshop Inc. * * * All rights reserved. * *...
// Created on: 2013-07-12 // Created by: Anton POLETAEV // Copyright (c) 2013-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 a...
#include <SPI.h> #include <nRF24L01.h> #include <RF24.h> #include "I2Cdev.h" #include "MPU6050.h" #include "Wire.h" //AccelGyro// MPU6050 accelgyro; int16_t ax, ay, az; /*-----( Declare Constants and Pin Numbers )-----*/ #define CE_PIN 40 #define CSN_PIN 53 #define buttonPin 42 const uint64_t pipe = 0xE8E8F0F0E1LL; /...
#include <algorithm> #include <iostream> #include <string> #include <locale> #include <vector> using namespace std; int main(){ int n; cin >> n; string s; cin.ignore(); getline(cin, s); int ans = 0; int count = 0; for(char c : s){ if(c == ' '){ ans = max(ans, count); count = 0; }else{ if(isupper...
// // Created by jean_j on 21.01.17. // #ifndef GGJ17_PARSER_HH #define GGJ17_PARSER_HH #include <string> #include <fstream> #include <iostream> #include <vector> #include <rapidxml_utils.hpp> #include <rapidxml.hpp> #include "CollideBox.hh" #include <SFML/Graphics.hpp> #include "Sprite.hh" #include "Constants.hh" #i...
//////////////////////////////////////////////////////////////////////////////////////////////////// // NoesisGUI - http://www.noesisengine.com // Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved. //////////////////////////////////////////////////////////////////////////////////////////////////// ...
// -*- c++ -*- /****************************************************************************** ** recyclealloc.h ** ** Arena allocator with some modest recycling of freed resources. ** MIT license ** *****************************************************************************/ #ifndef _RECYCLE_ALLOC_H #defi...
#ifndef CampsiteDB_h #define CampsiteDB_h #include "Campsite.h" class CampsiteDB { public: //constructor CampsiteDB( std::string filename ); //member methods int get_record_count( ); int get_current_index( bool write = false ); Campsite get_next_sequential( ); Campsite get_at_index( int...
#include <queue> #include "Memory.h" #include "CPU.h" #ifndef SIMULATOR_SCHEDULER_H #define SIMULATOR_SCHEDULER_H class LongTerm { //Takes in disk //Put PID into ready queue //Get start address of 1st process //Get end address //Load that into RAM }; class ShortTerm { //Get top value of ready_queue //That...
#include <iostream> #include<math.h> int a,b; float c; //prototipuri void aria(); void diagonala(); //main //colectare date ...etc int main(){ printf("Introduceti lungimea(a) dreptunghiului: "); scanf("%d", &a); printf("Introduceti latimea(b) dreptunghiului: "); scanf("%d", &b); printf("Introduceti o poten...
/* * MoveBindingsTest.cpp * * Created on: Oct 14, 2016 * Author: bakhvalo */ #include "gtest/gtest.h" #include <type_traits> #include <iostream> using namespace ::testing; int foo(int &&x) { return x; } TEST(MoveBindingsTest, binding_references) { foo(5); int x = 5; // foo(x); compiler error - can't...
#include <gtest/gtest.h> #include <NDT/Tensor.h> namespace { using namespace NDT; TEST(TensorSliceCopyTest, Test2D) { float data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; Tensor<2, float, HostResident> tensor({3, 3}, data); TensorView<2, float, HostResident> tensorView = tensor.SubTensor({1,1},{2,2}); ...
int potenciometroX_pin=A0; int potenciometroY_pin=A1; int mapValueX=0; int mapValueY=0; void setup(){ Serial.begin(115200); } void loop(){ int sensorValueX=analogRead(potenciometroX_pin); sendDataX(sensorValueX); int sensorValueY=analogRead(potenciometroY_pin); sendDataY(sensorValueY); delay(100); }...
/** * (C) Copyright Projet SECRET, INRIA, Rocquencourt * (C) Bhaskar Biswas and Nicolas Sendrier * * (C) 2014 cryptosource GmbH * (C) 2014 Falko Strenzke fstrenzke@cryptosource.de * * Botan is released under the Simplified BSD License (see license.txt) * */ #include <botan/internal/code_based_key_gen.h> #inc...
#include "stickman.h" stickman::stickman() { for(int i = 0; i < 20; i++) { shapes[i] = new block(); shapes[i]->updateMesh(10, 40, 10); shapes[i]->updateMaterial(0, 0, 255); } } void stickman::update() { float value_y = shapes[NUI_SKELETON_POSITION_FOOT_LEFT]->position.y - shapes[NUI_SKELETON_POSITION_HAND_LE...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef DOM_EVENTSOURCE_H #define DOM_EVENTSOURCE_H #ifdef E...
// Created on: 2002-04-29 // Created by: Alexander KARTOMIN (akm) // Copyright (c) 2002-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 ver...
/* -*- 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. */ #ifndef SPEED_DIAL_DRAG_HANDLER_H #define SPEED_DIAL_DRAG_HANDLER...
#ifndef CPP_2020_RANDOM_FOREST_CSV_WRITER_H #define CPP_2020_RANDOM_FOREST_CSV_WRITER_H #include <string> #include <sstream> #include <vector> #include <iostream> #include <fstream> class CsvWriter { std::ofstream log_file; public: explicit CsvWriter(const std::string& filename); void add_line(const std:...
#include "Vector3.h" template<typename T> Vector3D<T>::Vector3D() :x(0.0), y(0.0), z(0.0) {} //Default Constructor template<typename T> Vector3D<T>::Vector3D(const T x, const T y, const T z) : x(x), y(y), z(z) {} //Constructor template<typename T> void Vector3D<T>::SetX(const T x) noexcept { x = x; } //Set x tem...
#include <bits/stdc++.h> using namespace std; #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) #define MAXN 100 #define INF 0x3f3f3f3f #define DEVIATION 0.00000005 string mon[12] = { "JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" }; string week[7] = { "SUN", "MON",...
#pragma once struct TestObjectListItem { DataFoundation::stcObjectLink anObject; INT32 theType; }; class TestObjectList { private: TestObjectList (); ~TestObjectList (); public: UINT32 GetLength () const; HRESULT Insert (UINT32* p_pulIndex, TestObjectListItem* p_p...
//--------------------------------------------------------------------------- #ifndef UpdateTabStatusProcH #define UpdateTabStatusProcH //--------------------------------------------------------------------------- #include "BaseProcess.h" class UpdateTabStatusProc:public BaseProcess { private: virtual int doReques...
// Created on: 2003-02-04 // Created by: data exchange team // Copyright (c) 2003-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...
// This is a sample code that constructs general kinetic terms! #include <iostream> #include <cmath> #include <string> #include <sstream> #include <complex> #include "generic_inverters.h" #include "generic_vector.h" #include "verbosity.h" using namespace std; // For now, define the length in a direction. #define 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. * * @author Alexander Remen (alexr@opera.com) */ #ifndef QUICK_WRA...
// JazzMusuicans.cpp // JazzMusicians.cpp : This file contains the 'main' function. Program execution begins and ends there. // write code here //#include "pch.h" #include "stdafx.h" #include "JazzMusicians.h" #include <string> #include <fstream> JazzMusicians::JazzMusicians(string filename) { // read...
#include <iostream> #include<bits/stdc++.h> using namespace std; typedef unsigned long long ull; //solved. int main() { //ull temp = (ull) pow(2,49); vector<ull> b(51); b[1] = 1; b[2] = 4; for(int i=3;i<51;i++){ b[i] = (ull) pow(2,i-1) + 2*b[i-1]; } int t; cin>>t; while(t--){ int n; ...
#pragma once namespace aeEngineSDK { class AE_GRAPHICS_EXPORT aeRenderer : public Module<aeRenderer> { protected: aeInputLayout* m_pInputLayout; aeVertexShader* m_pVertexShader; aePixelShader* m_pPixelShader; aeGraphicsAPI* m_pInstance; private: aeRenderer(); aeRenderer(const aeRenderer&); aeRenderer...
#ifdef QUICK // -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- // should this whole module be #ifdef QUICK ? /* Strings referenced in adjunct/quick/. * * Comment lines of both forms valid in C++ are ignored. Preprocessor * directives are allowed: the #if-ery around each string tag should reflect the * #if-ery...
#include "valid_thinker.h" #include "utils.h" Response ValidThinker::decideResponse(int guess) const { int number = vtracker.oneValid(); if (number == guess && vtracker.numValid() > 1) number = vtracker.otherValid(); return findResponse(number, guess); }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef MODULES_GADGET_OPGADGETUPDATE_H #define MODULES_GADGET_O...
#include "TritSet.h" #include "TritsBits.h" #include <iostream> //0 - T //1 - F //2 - U using namespace tritset; using namespace tritsBits; int main(int argc, char* argv[]) { TritSet set(1000); if (U == set[0]) { std::cout << "eq" << std::endl; } return 0; }
#include <iostream> #include <string> #include <fstream> #include <cmath> #define ROWS 9 #define COLS 9 using namespace std; struct coord { int x; int y; bool operator!=(const coord &rs) { return (rs.x != x || rs.y != y); }; int dist() { return (y - x); }; coord() { x = 0; y = 0; }; coord(int a, int b...
#pragma once #include <QWidget> #include "GenericParameter.h" class GenericVisualComponent : public QWidget { Q_OBJECT public: explicit GenericVisualComponent(const GenericParameter & param, QWidget * pParent = nullptr); virtual ~GenericVisualComponent() { } GenericVisualComponent(const GenericVisualComponent...
#pragma once #include "ofMain.h" class Tri { public: Tri(); ~Tri() {}; void setup( ofVec3f p0, ofVec3f p1, ofVec3f p2, ofColor c); void update(); void draw(); void drawWireframe(); void drawMidPt(); ofVec3f getMidPt(); ofVec3f pt0, pt1, pt2; ofVec3f mid; ofColor col; ofColor debugCol; ofVboMesh me...
#include "cpptest.h" CPPTEST_CONTEXT("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/WorkItemQueue/WorkItemQueueProcessor.cpp"); CPPTEST_TEST_SUITE_INCLUDED_TO("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/WorkItemQueue/WorkItemQueueProcessor.cpp"); class TestSuite_WorkIt...