text
stringlengths
8
6.88M
#include "TankRobot.h" USB Usb; BTD Btd(&Usb); PS4BT PS4(&Btd, PAIR); Tank_Robot::Tank_Robot() { HBridge_Motor motor0 = HBridge_Motor(4, 5, 6); HBridge_Motor motor1 = HBridge_Motor(7, 8, 9); controller = HBridge_Controller(motor0, motor1); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OU...
#include "il2cpp-config.h" #include "class-internals.h" #include "codegen/il2cpp-codegen.h" // Metadata Definition System.Runtime.InteropServices._FieldBuilder extern TypeInfo _FieldBuilder_t2099_il2cpp_TypeInfo; extern Il2CppImage g_mscorlib_dll_Image; extern const Il2CppType _FieldBuilder_t2099_0_0_0; extern const I...
// mathematical operator #include <stdio.h> int main(){ int a=10; int b=20; bool p; p = a > b; printf("%d\n", p); }
/***************************************************************************************** * * * owl * * ...
#pragma once #include <string> namespace pure { class Printable { public: virtual ~Printable() { } virtual std::string toString() const = 0; }; }
#include <iostream> using namespace std; int main() { int N, Q, l; cin >> N >> Q >> l; int a[N + 2]; for (int i = 1; i <= N; ++i) cin >> a[i]; bool cutted[N + 2]; fill(cutted, cutted + N + 2, false); for (int i = 1; i <= N; ++i) { if (a[i] > l) cutted[i] = true; } int a...
#pragma once namespace game { class Player; Player* createPhysXPlayer(D3DXVECTOR3& size); }
// Created on: 1991-01-28 // Created by: Remi Lequette // 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 ...
#include "world_init.hpp" #include "tiny_ecs_registry.hpp" Entity createBackground(RenderSystem *renderer, vec2 pos, TEXTURE_ASSET_ID background) { auto entity = Entity(); // Store a reference to the potentially re-used mesh object Mesh &mesh = renderer->getMesh(GEOMETRY_BUFFER_ID::SPRITE); r...
/* cfdtd3d.cpp General purpose 3D Electromagnetic Wave Simulation Copyright (c) 2011, Bin Guo All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source ...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> using namespace std; const int dx[4] = { 0,0,-1,1 }; const int dy[4] = { -1,1,0,0 }; int N; int nHome[25][25] = { 0, }; bool cChecked[25][25] = { false, }; int nCnt; int nNumofSection[25 * 25] = { 0, }; void DFS(int x, int y) { cChecked...
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers // // This file is part of Bytecoin. // // Bytecoin 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 3 of t...
/* * Ordre_Thread.h * * Created on: 27 janv. 2012 * Author: adrien */ #ifndef ORDRE_THREAD_H_ #define ORDRE_THREAD_H_ #include <mqueue.h> #include "Utils.h" class Ordre_Thread { public: Ordre_Thread(); virtual ~Ordre_Thread(); /* Lance un nouveau thread */ void Launch(); protected: /* Identifiant ...
#pragma once #include "Graph.hpp" #include "Series_executor.hpp" #include <list> #include <cmath> #include <string> #include "XY_CLR.h" #include <msclr/marshal_cppstd.h> namespace MarsColonisation { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespac...
#include "vertex_array_object.h" #include "error.h" #include <GL/glew.h> #include <GLFW/glfw3.h> #include <algorithm> namespace { struct VertexArrayObjectMaker : public VertexArrayObject { VertexArrayObjectMaker(const std::vector<VertexArrayObject::Attribute>&& attributes) :VertexArrayObject(std::move(attrib...
// // Created by 송지원 on 2019-10-25. // #include "iostream" using namespace std; int main() { int n, i, j; cin >> n; for (i=0; i<n; i++) { for (j=0; j<n-1-i; j++) cout << " "; for (j=0; j<i+1; j++) cout << "*"; cout << endl; } for (i=n-2; i>-1; i--) { for (j=0; j<n-1...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #define SIZE 1000 using namespace std; int main() { int a[SIZE]={0}; int sum=0,i,n; cin>>n; for(i=0;i<n;i++) cin>>a[i]; for(i=0;i<n;i++) sum+=a[i]; cout<<sum; ret...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // 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 <Arduino.h> #include "MPU9250.h" //Test Routine Program - By Stezipoo //#include <SoftPWMServo.h> #include <Servo.h> #define DEBUG_SERIAL 1 const int PIN_STR = 9; const int PIN_THR = 7; const int PIN_IN_STR = 13; const int PIN_IN_THR = 12; Servo ServoSTR; Servo ServoTHR; //imu unit object MPU9250 ottoIM...
#ifndef PITCH_YAW_H #define PITCH_YAW_H #include "FreeRTOS.h" #include "PID.h" #include <main.h> #include "motor.h" #include "mpu6050_config.h" #define on 1 #define off 0 extern CAN_HandleTypeDef hcan1; extern CAN_HandleTypeDef hcan2; extern MPUData_Typedef MPUData; /*pitchyaw_test below*/ extern M...
#ifndef AS64_GMP_N_DOF_H_ #define AS64_GMP_N_DOF_H_ // N-DoF GMP class // Generalized movement primitive. #include <gmp_lib/GMP/GMP.h> #include <gmp_lib/utils.h> namespace as64_ { namespace gmp_ { class GMP_nDoF { // =================================== // ======= Public Functions ======== // ===================...
#include <stdio.h> #include <string.h> #include "pico/stdlib.h" #include "hardware/spi.h" #include "hardware/gpio.h" #include <math.h> #include "pi.h" using u8 = uint8_t; using u16 = uint16_t; #define PIN_SCK 2 #define PIN_MOSI 3 #define PIN_MISO 4 #define PIN_CS 5 #define PULSE 18 #define ALARM 0 #define SAM...
#pragma once namespace tests::sort { void test_merge(); void test_binary_insertion(); void test_all(); }
#pragma once using namespace std; using namespace DirectX; using namespace Microsoft::WRL; class Shader; class Texture; struct ObjectParams { ComPtr<ID3D11ShaderResourceView> baseColor; ComPtr<ID3D11ShaderResourceView> normal; ComPtr<ID3D11ShaderResourceView> height; ComPtr<ID3D11ShaderResourceView> roughness; }...
#include <stdio.h> #include <SDL.h> //Screen dimension constants const int SCREEN_WIDTH = 800; const int SCREEN_HEIGHT = 600; const int delta = 16; // 16 miliseconds const SDL_Color HOT_PINK = {255,39,210}; //#include <iostream> #include <cstdlib> #include <unistd.h> #include <vector> #include "Components/Ball.h"...
/** * created: 2013-4-8 15:07 * filename: FKCheckNameSvrWorkThread * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include "FKCheckNameSvr.h" //------------------------------------------------------------------------ unsigned int...
//Phoenix_RK /* https://leetcode.com/problems/find-numbers-with-even-number-of-digits/ Given an array nums of integers, return how many of them contain an even number of digits. */ class Solution { public: int findNumbers(vector<int>& nums) { int dcount=0; int result=0; for(in...
#include <iostream> #include <vector> #include <map> #include <set> #include <string> #include <bitset> #include <queue> #include <algorithm> #include <functional> #include <cmath> #include <cstdio> #include <sstream> #include <stack> #include <fstream> #include <istream> using namespace std; class MonochromaticBoard...
#include "Dragwidget.h" Dragwidget::Dragwidget(QWidget* parent, QString addNom, int addVolume, int addId) : QWidget(parent) { nom = addNom; volume = addVolume; id = addId; this->setCursor(Qt::PointingHandCursor); } void Dragwidget::mouseMoveEvent(QMouseEvent* event) { if (!(event->buttons() & Qt::LeftButt...
// Created on: 1994-06-01 // Created by: Modelistation // 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 ...
#include "ModelException.hpp" const char * ModelException::what() const noexcept { return "Errore sconosciuto Modello"; } const char * ModelBoxNotOpenException::what() const noexcept { return "Si è cercato di effettuare un'operazione a box chiuso"; } const char * ModelBoxNotClosedException::what() const noexcept...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2005 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef XSLT_OUTPUTBUFFER_H #define XSLT_OUTPUTBUFFER_H #ifdef XSLT_SUPP...
#include <iostream> #include <string> #include <algorithm> #include <functional> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <tuple> #include <numeric> #include <cmath> #include <iomanip> #include <climits> #define rep(i, n) for(int i = 0; i < (int)(n); i...
#ifndef THREADPOOL_H #define THREADPOOL_H #include "PoolThread.cpp" class SafeQueue; class ThreadPool { private: //this dynamic array will contains the threads PoolThread** threads; int th_size; //safequeue for the tasks SafeQueue queue; public: //constructor with the number of threads ThreadPool(int n); //d...
#include "store.hpp" #include <string> void Main::createAccount(string db) { string connect = "dbname = " + db + " user = movie_guest password = password hostaddr = 127.0.0.1 port = 5432"; string connect1 = "dbname = " + db + " user = movie_customer password = password hostaddr = 127.0.0.1 port = 5432"; co...
/* -*- 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. ** ** OpClipboard.h -- platform-specific implementation of clipboard....
/* * Copyright (C) 2017 Open Source Robotics Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
//Enunt: Verifica daca e triunghi -> daca da calculeaza aria // Sursa de pe net: CONDITIA DE EXISTENTA A UNUI TRIUNGHI // (a > 0)AND(b > 0)AND(c > 0) AND(a + b > c) AND(b + c > a) AND(c + a > b) #include <iostream> #include <string> #include <windows.h> class Triunghi { private: int a, b, c; bool poatefi = false; ...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "11661" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) int main(int argc, char const *argv[]) { #ifdef DBG freopen("uva" PROBLEM TESTC ".in", "r", stdin); freopen("uva" PROBLEM ".out", "w", stdout); #endif char load,t...
#include<bits/stdc++.h> using namespace std; //HEAPIFY FUNCTION void heapify(int arr[], int n, int i) { int largest = i; //INITIALIZE LARGEST AS ROOT int l = 2*i + 1; //LEFT=2*I+1 int r = 2*i + 2; //RIGHT=2*I+1 //LEFT CHILD LARGER THAN ROOT if (l < n && arr[l] > arr[largest]) { largest = l;...
#include "Arduino.h" #include <CapacitiveSensor.h> const byte SEND = A4; const byte RECEIVE = A5; CapacitiveSensor sensor = CapacitiveSensor(SEND, RECEIVE); // 10 megohm resistor between pins 4 & 2, pin 2 is sensor pin, add wire, foil const byte ANODE_PINS[8] = {13, 12, 11, 10, 9, 8, 7, 6}; const byte ...
#pragma once class CDirectInputDeviceKeyboard8A : public IDirectInputDevice8A { private: DIDEVICEINSTANCEA* keyboardDeviceInfo; ULONG refCount; public: CDirectInputDeviceKeyboard8A() { refCount = 1; keyboardDeviceInfo = new DIDEVICEINSTANCEA(); ZeroMemory(keyboardDeviceInfo, sizeof(DIDEVICEINSTANCEA)); ...
// // C++ Interface: CoreThread // // Description: // 程序中的核心线程类,实际上也被设计成了所有底层核心数据的中心点, // 所有数据的更新、查询、插入、删除都必须通过本类接口才能完成。 // ----------------------------------------------------- //2012.02:把文件传送的核心数据全部放在CoreThread类。 // prlist不变,增加ecsList来存放好友发来文件. //------------------------------------------------------ // Author: cwll ...
#include "Game.h" #include "MenuState.h" #include "GameOverState.h" #include "HexaState.h" #include "PauseState.h" #include "InputHandler.h" #define DELAY_TIME 600 const std::string HexaState::s_hexaID = "HEXA"; void HexaState::update() { if (m_HexaManager->GameOver()) { TheGame::Instance()->getStateMachine()->...
// // main.cpp // 1194 // // Created by Pedro Neves Alvarez on 7/10/17. // Copyright © 2017 Pedro Neves Alvarez. All rights reserved. // #include <iostream> #include <string> void post_from_pre_in(std::string pre, std::string in) { int in_root_index = in.find(pre[0]); if (in.substr(0, in_root_index)....
// #include <boost/multiprecision/cpp_int.hpp> // using boost::multiprecision::cpp_int; #include <bits/stdc++.h> using namespace std; // ¯\_(ツ)_/¯ #define f first #define s second #define p push #define mp make_pair #define pb push_back #define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i !=...
/* -*- 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. */ #include "core/pch.h" #ifdef NEARBY_ELEMENT_DETECTION #include ...
#ifndef PLANETA_H #define PLANETA_H #include <math.h> #define dt 1 #define G 1 #include <fstream> class Planeta { double posx,posy; double velx,vely; double acelx,acely; double Masa; double radio; public: Planeta(); void Asignar(float pi, float pyi, float vxi, float vyi,float m, float rad...
#include "FormRegularGrid.h" #include "../../lidar-build/ui_FormRegularGrid.h" FormRegularGrid::FormRegularGrid(QWidget *parent) : QWidget(parent), ui(new Ui::FormRegularGrid) { ui->setupUi(this); connect(ui->numRows, SIGNAL(valueChanged(int)), this, SIGNAL(numRowsChanged(int))); connect(ui->numCols, SIGNAL(valu...
#include <iostream> using namespace std; void quick(int *, int *); main() { int A[] = {12, 6, 5, 7, 10 ,11, 3, 1, 9}; for(int i=0; i<9; i++) cout << &A[i] << "\t"; cout << endl; quick(A, &A[8]); for(int i=0; i<9; i++) cout << A[i] << "\t"; cout << endl; } void quick(int *I, int *F) { int *i=I, *f=F, ...
#pragma once #include <torch/torch.h> namespace OptimExplorer::networks { namespace mnist { struct Net : public torch::nn::Module { Net() { fc1 = register_module("fc1", torch::nn::Linear(784, 64)); fc2 = register_module("fc2", torch::nn::Linear(64, 32)); fc3 = register_module("fc3", torch::nn::Linear...
#pragma once #include"iGameState.h" #include"AudioComponent.h" class WinState : public iGameState { private: MovementComponent* m_cameraMovementComponentPtr; AudioComponent* m_audioComponent; std::pair<std::string, int> m_score[10]; int m_nrOfHighScore; int m_ownTime; //Sound const std::wstring winSound = L"So...
//: C12:AutomaticTypeConversion.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt // Konstruktor umozliwiajacy konwersje typow class One { public: One() {} }; class Two { public: Two(...
#ifndef GAME_H #define GAME_H #include<Model/Card.h> #include<memory> #include<vector> using CardPtr = std::shared_ptr<Card>; class Game { public: Game(); void setCard(CardPtr card); void setFlip(int flipped);// because CardColor getColor(int color); std::string getText(int text); bool isFlipped...
#include <iostream> #include <vector> #include <utility> #include <queue> using namespace std; int n, m; class Node{ public: int inDegree; vector<pair<int, int>> unitCosts; //first : unitNode / second : cost; vector<pair<int, int>> next; //first : nextNode / second : cost; Node(){ inDegree = 0;...
#ifndef CBT_BEHAVIOR_RETURN_HPP #define CBT_BEHAVIOR_RETURN_HPP #include <cbt/behavior/continuation.hpp> #include <cbt/behavior/status.hpp> namespace cbt { struct behavior; /* * the return type of functions used to walk up and down the behavior tree. * used to avoid relying on unreliable tail-call optimizations. * ...
#pragma once #include "EverydayTools/Array/ArrayView.h" #include "Keng/FileSystem/FwdDecl.h" namespace keng::filesystem { class IFile : public core::IRefCountObject { public: virtual size_t TryRead(size_t offset, size_t bytes, edt::DenseArrayView<uint8_t> destination) = 0; virtual void Rea...
#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> #include <numeric> #include <ss...
#pragma once #include "GcEditorPropertyPage.h" #include "afxwin.h" // GcEditorSequenceMain 대화 상자입니다. class GcEditorSequenceMain : public GcEditorPropertyPage { DECLARE_DYNAMIC(GcEditorSequenceMain) public: enum { IDD = IDD_SEQUENCE_PAGE1 }; protected: CEdit mEtID; CEdit mEtSequenceName; CEdit mEtSequenctFileNa...
#ifndef __CCrystalTextBuffer_INL_INCLUDED #define __CCrystalTextBuffer_INL_INCLUDED #include "CCrystalTextBuffer.h" CE_INLINE BOOL CCrystalTextBuffer::IsModified() const { return m_bModified; } #endif
// // Created by Lee on 2019-04-23. // #ifndef UBP_CLIENT_CPP_VER_THUMBNAILVIEWER_H #define UBP_CLIENT_CPP_VER_THUMBNAILVIEWER_H #include "PhotoThumbnail.h" #include <vector> #include <QWidget> #include <QStackedWidget> #include <src/api/PhotoManager.h> #include <src/model/PhotoGroup.h> class ThumbnailViewer : p...
#include <iostream> #include <map> #include <vector> #include <cppunit/Exception.h> #include <cppunit/Message.h> #include <cppunit/SourceLine.h> #include <cppunit/Test.h> #include <cppunit/TestFailure.h> #include <cppunit/TestResultCollector.h> #include "cppunit/TapOutputter.h" using namespace std; using namespace C...
#define _WIN32_WINNT 0x0500 #include "Game.h" #include "GameBattleState.h" #include "MenuState.h" #include "CreditState.h" #include "GameoverState.h" #include "windows.h" #include <iostream> Game::Game(int width, int height, std::string title) { HWND hwnd = GetConsoleWindow(); //ShowWindow(hwnd, SW_H...
/* * TransporterService.cpp * * Created on: 11 Mar 2011 * Author: two */ #include "TransporterService.h" TransporterService::TransporterService() { // TODO Auto-generated constructor stub m_eTransportID = TRANSPORT_NONE; m_nPortListen = 0; } int TransporterService::getListeningPort() { /* * Return...
#include<iostream> using namespace std; bool isSafe(int arr[][12],int i,int j,int n) { for(int k=0;k<i;k++) { if(arr[k][j]==1) { return false; } } int x=i,y=j; while(x>=0 && y>=0) { if(arr[x][y]==1) { return false; } x--;y--; } x=i,y=j; while(x>=0 && y<n) { if(arr[x][y]==1) { return f...
#ifndef CLIENTENODE_H #define CLIENTENODE_H #include "cliente.h" class ClienteNode { public: ClienteNode(); ClienteNode(Cliente*); virtual ~ClienteNode(); void setCliente(Cliente*); Cliente* getCliente(); void setNext(ClienteNode*); ClienteNode...
#include "Watched.h" #include <string> using namespace std; Watched::Watched(const string& name ) { _name = name; } const string& Watched::name() { return _name; }
#include "Projectile.h" #include "Fire.h" #include "UObject/ConstructorHelpers.h" #include "Components/StaticMeshComponent.h" #include "Engine/StaticMesh.h" #include "GameFramework/PlayerState.h" #include "GameFramework/Character.h" #include "Kismet/GameplayStatics.h" // Sets default values AProjectile::AProjectile() ...
#include "SaleItem.h" //default constructor should never be used, but it's there SalesRecord::SalesRecord() { Day=0; Month=0; Year=0; Register=0; SaleAmount=0.0; StoreID=0; } //constructor with the number of threads as a parameter SalesRecord::SalesRecord(int ThreadID) { //random day between 1-30 Day=RandomInt(...
/* * AUTHORS: Matthew Healy <mhealy@mst.edu> * Cody Roberts <cargy9@mst.edu> * * COURSE: CS3800 - Intro. to Operating Systems * INSTRUCTOR: Michael Gosnell <gosnellm@mst.edu> * DESCRIPTION: An impementation of the "Dining Philosophers" problem, * shown as philosop...
#include <chuffed/globals/dtree.h> #include <iostream> #include <stack> using namespace std; #define DEBUG 0 DTreePropagator::DTreePropagator(int _r, vec<BoolView>& _vs, vec<BoolView>& _es, vec<vec<edge_id> >& _in, vec<vec<edge_id> >& _out, vec<vec<int> >& _en) : DReachabilityPro...
/* * header.h * Copyright: 2018 Shanghai Yikun Electrical Engineering Co,Ltd */ #ifndef HEADER_H #define HEADER_H #include <iostream> #include <stdlib.h> #include <string> #include <cstring> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <...
#pragma once struct VisualAIState { std::string file; int num = 0; CVector4 col = CVector4::White; int mark = 0; }; class VisualAIOpen { public: //visualAIを開く static std::vector<VisualAIState> openVAs(); static CVector4 Red() { return mRed; } static CVector4 Blu() { return mBlu; } static CVector4...
#include "predefine.h" #include <cmath> #include <boost/math/tools/roots.hpp> #include "simpleLogger.h" char HS2HS[] = "HS2HS"; // Hard+Soft <--> Hard+Soft char HS2QQbar[] = "HS2QQbar"; // hard+light --> heavy flavor pair char HS2HHS[] = "HS2HHS"; // hard+soft --> hard+hard+soft char HHS2HS[] = "HHS2HS"; // hard+soft ...
#ifndef ETW_CONFIG_NO_CONSISTENCY_CHECK_H_ #define ETW_CONFIG_NO_CONSISTENCY_CHECK_H_ #include "ConsistencyValidatorInterface.h" namespace etw { class NoConsistencyCheck : public ConsistencyValidatorInterface { public: NoConsistencyCheck(); int validateOption(ConfigurationInterface *cfg, OptionInterface *op); }; ...
#ifndef __READ_CONFIG_H__ #define __READ_CONFIG_H__ #include <string> #include <fstream> using namespace std; class CReadCfg { public: CReadCfg(); ~CReadCfg(); bool ReadConfig(const string& key, string& value); bool ReadConfig(const string& key, int& value); bool AnalyseLine(const string& line, string& key, st...
#ifndef AS64_gmp_lib_UTILS_H #define AS64_gmp_lib_UTILS_H //#define GMP_DEBUG_ //#define WSoG_DEBUG_ //#define GMP_NDOF_DEBUG_ //#define GMPo_DEBUG_ namespace as64_ { namespace gmp_ { enum UPDATE_TYPE { POS = 0, VEL = 1, ACCEL = 2 }; struct Phase { double x, x_dot, x...
#include "ljb.h" #include "ljjz.h" void degree(AdjList G); int main() { AdjList g; creat(&g,6,6); degree(g); return 1; } void degree(AdjList G){ ArcNode *p; int i; for(i=0;i<G.numV;i++) { int count=0; p=G.Vertex[i].firstarc; while(p) { count++; p=p->nextarc; } ...
#pragma once #include <string> #include <vector> #include <memory> #include "VertexArray.h" #include "IndexBuffer.h" #include "Camera.h" #include "Texture.h" #include "Renderer.h" class Mesh { public: Mesh(){} Mesh(std::vector<Vertex>& vertices, std::vector<unsigned int>& indices); ~Mesh(); void Add...
/** * Copyright (C) Omar Thor, Aurora Hernandez - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * * Written by * Omar Thor <omar@thorigin.com>, 2018 * Aurora Hernandez <aurora@aurorahernandez.com>, 2018 */ #ifndef DMTK_ELEMEN...
// Author: Kirill Gavrilov // Copyright (c) 2015-2019 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 So...
#include "LqHttpMdl.h" #include "LqHttp.hpp" #include "LqHttpPth.h" #include "LqHttpAtz.h" #include "LqWrkBoss.hpp" #include <string> LqHttpMdl Mod; LQ_EXTERN_C LQ_EXPORT LqHttpMdlRegistratorEnm LQ_CALL LqHttpMdlRegistrator(LqHttp* Reg, uintptr_t ModuleHandle, const char* LibPath, void* UserData) { LqHttpPth...
#include "position.h" #include "spriteaiengine.h" Position::Position(int xx, int yy, int zz) { _vertex.setx(xx); _vertex.sety(yy); _vertex.setz(zz); } Position::~Position() {} int Position::getx() { return _vertex.getx(); } int Position::gety() { return _vertex.gety(); } int Position::getz() { return _vertex.g...
#ifndef EVENTMANAGER_H #define EVENTMANAGER_H #include <memory> #include "gnLib.h" namespace gnGame { namespace { // 最大の数 constexpr int EventMaxSize = 1; } class Player; class EventObject; using EventPtr = std::shared_ptr<EventObject>; // 敵のポインタ using EventList = std::vector<EventPtr>; // イベントの...
/************************************************************* Motor Shield Stepper Demo by Randy Sarafan For more information see: https://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/ *************************************************************/ int delaylegnth = 30; void setup() { //establish mot...
#include "stdafx.h" #include "GameNode.h" GameNode::GameNode() { } GameNode::~GameNode() { } HRESULT GameNode::Init() { SetTimer(g_hWnd, 1, 10, NULL); return S_OK; } void GameNode::Release() { KillTimer(g_hWnd, 1); INPUT->ReleaseSingleton(); } void GameNode::Update() { //InvalidateRect(g_hWnd, NULL, TRUE);...
#include <bits/stdc++.h> using namespace std; long long int a; int main() { cin >> a; if(a<0 || a >14){ cout << "Are you kidding me?"; } else if(a<7){ cout << "Acido"; } else if(a>7){ cout << "Base"; } else { cout << "Neutro"; } return 0; }
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
#include <iostream> #include <cmath> using std::cout; //************************************************************ //#define EXACT_COMPARE class Vector3{ public: // Constructors. //Vector3() : x(0.0), y(0.0), z(0.0) {} Vector3() = default; Vector3(double x, double y, double z) : x(x), y(y), z(z) {} // Leng...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long long arr[1000000]={0},n,i,j,k,x; cin>>n; for(i=0;i<n;i++){ ...
#include "inverse.h" #include "../../core/concurrency.h" #include "../../core/types.h" namespace manipulation { namespace filter { void Inverse::apply(model::Image *&image) { core::parallelFor(0, image->pixelsCount(), [&image](unsigned p) { int x = p % image->width(); int y = p / image->width(); image-...
#pragma once class AIEditNodeMass :public GameObject { public: ~AIEditNodeMass(); bool Start() override final; void Update() override final; private: SpriteRender * m_spriteRender = nullptr; };
// Fill out your copyright notice in the Description page of Project Settings. #include "FightWithBlock.h" #include "BoltBlock.h" #include "MyCharacter.h" #include "BlockBase.h" #include "PoisonCPP.h" #include "NET/UnrealNetwork.h" // Sets default values ABoltBlock::ABoltBlock() { // Set this actor to call Tick() e...
#include <iostream> #include <algorithm> using namespace std; int main() { int a[3]; for (int i = 0; i < 3; ++i) cin >> a[i]; sort(a, a + 3); int rack = a[2] - (a[0] + a[1]); cout << max(0, rack + 1) << endl; return 0; }
#include <ros/ros.h> #include <ros/package.h> #include <vector> #include <string> #include <geometry_msgs/Pose.h> #include <sensor_msgs/JointState.h> #include <visualization_msgs/Marker.h> #include "narms_utils.h" std::string g_robot; void possessionCB(const std_msgs::String::ConstPtr& msg) { g_robot = msg->data;...
#include <map> #include <cstdio> int main() { std::map<int, int> v{ {1,2}, {3,4}, {5,6}, {7,8}, {9,10}}; if (auto it (v.find(6)); it != v.end()) { printf("yes\n"); } else { printf("no\n"); } }
// Created on: 1998-04-17 // Created by: Andre LIEUTIER // 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...
/* -*- 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. ** */ #ifndef SVG_MEDIA_MANAGER_H #define SVG_MEDIA_MANAGER_H #ifdef SVG...
#pragma once class IFile; class VFS { public: static void SetPackage(const char* name); static IFile* Open(const char* name); };
// AnalysisView.h : CAnalysisView 类的接口 // #pragma once class CAnalysisView : public CListView { protected: // 仅从序列化创建 CAnalysisView(); DECLARE_DYNCREATE(CAnalysisView) // 特性 public: CAnalysisDoc* GetDocument() const; // 操作 public: // 重写 public: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); CListCtrl listC...