text
stringlengths
8
6.88M
// // PokedexText.hpp for PokedexText in /home/roby_t/perso/test // // Made by Tristan Roby // Login <roby_t@epitech.net> // // Started on Fri Jan 23 14:28:01 2015 Tristan Roby // Last update Sun Jan 25 22:53:45 2015 Tristan Roby // #ifndef POKEDEXTEXT_HPP_ #define POKEDEXTEXT_HPP_ #include "Pokemon.hh" #include...
#include <iostream> #include <utility> // std::swap #include <math.h> using namespace std; typedef long long ll; #include <string> #include <stdio.h> #include <iostream> #include <vector> void solve(int K, int C, int S) { if (C*S < K) { cout << "IMPOSSIBLE" << endl; return; } vector<ll...
extern "C" { #include "DebugText.h" } #include <stdlib.h> #include <sys/socket.h> /* for socket(), connect(), send(), and recv() */ #include <arpa/inet.h> /* for sockaddr_in and inet_addr() */ #include <netinet/tcp.h> #include <string.h> /* for memset() */ #include <unistd.h> /* for close() */ #include <sys...
/* * Packetiser.h * * Created on: 6 Apr 2011 * Author: two * * this will do all the Muxing/Container/PAcketising of the stream(s) * All will hold the gory details of the lot, muha ha ha ha ha ha ha * well hopefully it's not that gory :S * * This is designed to work with my IOBuffer class. */ #...
// Scintilla source code edit control /** @file StyleContext.h ** Lexer infrastructure. **/ // Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org> // This file is in the public domain. #ifndef STYLECONTEXT_H #define STYLECONTEXT_H namespace Scintilla { // All languages handled so far can treat al...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2002 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #ifndef OPTOOLTIP_H #define OPTOOLTIP_H #include "modules/har...
#include <iostream> using namespace std; // ex) N: 10011000, M: 011, i: 3, j: 1, ans: 10010110 int setBit(int N, int M, int i, int j) { unsigned int top = (~0) << (i + 1); // 11110000 unsigned int bottom = (1 << j) - 1; // 00000001 int mask = top | bottom; // 11110001 return (N & mask) | (M << j); } i...
#pragma once #ifdef _DEBUG #include <iberbar/RHI/Headers.h> namespace iberbar { namespace RHI { class ITexture; class IShaderProgram; class __iberbarRHIApi__ ITestDraw { public: ITestDraw() {} virtual ~ITestDraw() {} virtual void Draw() = 0; virtual void SetShaderProgram( IShaderProgram* pSh...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional>...
// ----------------------------------------------------------------------------- // G4_QPIX | RunAction.h // // // * Author: Everybody is an author! // * Creation date: 15 Aug 2019 // ----------------------------------------------------------------------------- #ifndef RUN_ACTION_H #define RUN_ACTION_H #include ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2006-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 SVG_SUPPORT #include "modules/s...
#include <iostream> #include <stdio.h> #include <math.h> using namespace std; int main() { double x1,y1,x2,y2, dis; cin >> x1 >> y1 >> x2 >> y2; dis = sqrt(pow(x2-x1, 2)+pow(y1-y2, 2)); printf("%.4f\n", dis); return 0; }
#include<iostream> #include<vector> #include<math.h> using namespace std; class Solution { public: int firstMissingPositive(vector<int>& nums) { //简化版:索引作为哈希表 int n=nums.size(); for(auto& num:nums) { if(num<=0) num=n+1; } for(auto num:nums) { int tmp=abs(num); if(tmp<=n) nums[tmp-1]=-abs...
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "FirstPersonProject.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, FirstPersonProject, "FirstPersonProject" );
// Created on: 1992-02-11 // Created by: Christian CAILLET // Copyright (c) 1992-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 ...
#ifndef SG_CLIENT #define SG_CLIENT #pragma once #include <string> #include <vector> #include "sg_constructor.h" #include <boost/smart_ptr/shared_ptr.hpp> class SG_Client { public: SG_Client(); void UpdateLastKeepAlive(); std::string SessionKey; time_t LastKeepAlive; //Client Settings std::string ClientVersio...
/* XMRig * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com> * * 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 * ...
#include "ConsoleGameEngine.h" #include <fstream> #include <strstream> #include <algorithm> using namespace std; struct vec3d { float x = 0; float y = 0; float z = 0; float w = 1; // Need a 4th term to perform sensible matrix vector multiplication }; struct triangle { vec3d p[3]; wchar_t sym; short col; }; ...
#include <iostream> #include <vector> using namespace std; void exch(vector<int> &arr,int i,int j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } // void shell_sort(vector<int> &arr) { int length = arr.size(); int h = 1; while(h < length / 3) h = 3*h + 1; while(h >= 1) // ...
#ifndef NUMEROTELEFONICO_H #define NUMEROTELEFONICO_H #include <iostream> #include <string> class NumeroTelefonico { friend std::ostream &operator<<(std::ostream &, const NumeroTelefonico &); friend std::istream &operator>>(std::istream &, NumeroTelefonico &); private: std::string codigoArea; ...
void setup() { // put your setup code here, to run once: pinMode(A0,INPUT); Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: int soil= analogRead(A0); Serial.print("the soil moisture is"); Serial.println(soil); float soilper = 100-(1023-soil)/1023 *100;// if we do not...
//=========================================================================== //! @file app_main.cpp //! @brief アプリケーションメイン処理 //=========================================================================== // tmp namespace { f32 oldTime; u32 count; f32 deleteTime; f32 frameRate; } // namespace #include <mmsystem.h> /...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <algorithm> using namespace std; bool comp(int a, int b) { return a > b; } int main(void) { int T, N, M, Temp; scanf("%d", &T); while (T--) { bool bFinishFlag = false; int Result = 0; vector<pair<int, bool>> v; vector<in...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "10819" #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 int budget,...
int LED=11; int BUTTON=7; void setup() { for(;LED>8;LED--){ pinMode(LED,OUTPUT); } pinMode(LED,OUTPUT); pinMode(BUTTON,INPUT); Serial.begin(9600); } void loop() { LED=11; if(digitalRead(BUTTON)==HIGH){ for(;LED>8;LED--){ digitalWrite(LED,HIGH); delay(200); digitalWrite(LED,LOW); } } }
#pragma once #include <GLAD/include/glad/glad.h> #include <GLFW/include/GLFW/glfw3.h> #include "ProjectileObject.h" #include <vector> #include <SeetyDog/Events/Event.h> #include "GameObject.h" #include "Texture2D.h" #include "SpriteRenderer.h" class BallObject : public GameObject { public: // Ball state GLfloat...
#include "core/pch.h" #include "adjunct/quick/widgets/FavoritesCompositeListener.h" #include "adjunct/quick/windows/BrowserDesktopWindow.h" #include "adjunct/quick/widgets/OpAddressDropDown.h" #include "adjunct/quick/hotlist/HotlistManager.h" #include "adjunct/quick/managers/SpeedDialManager.h" #include "modules/widg...
#include <Arduino.h> const int pinRelay = 2; const int pinLed = 1; #ifdef NEO #include <Adafruit_NeoPixel.h> const int numLeds = 16; Adafruit_NeoPixel pixels = Adafruit_NeoPixel(numLeds, pinLed, NEO_GRB + NEO_KHZ800); #endif void LoopRelay(); void LoopLed(); void OnLed(); void OffLed(); void OnRelay(); void OffRelay();...
class m107_TWS_EP1 { weight = 14.3; }; class M24_des_EP1 { weight = 7; }; class M110_TWS_EP1 { weight = 7.7; }; class M110_NVG_EP1 { weight = 7.5; }; class BAF_AS50_scoped { weight = 13; }; class BAF_AS50_TWS { weight = 13.2; }; class BAF_LRR_scoped { weight = 5.6; }; class BAF_LRR_scoped_W { weight = 5.6; }; ...
#pragma once #include<malloc.h> template<class T,size_t N> class Array { typedef T value_type; typedef size_t size_type; typedef value_type* iterator; public: Array()//构造函数 { char* ptr = (char*)malloc(N*sizeof(value_type)); _start = (iterator)(ptr + 2 * sizeof(size_type)); _end = _start + N; _finish = _sta...
#if not define _MAP_HPP_ #define _MAP_HPP_ #define WIDTH 10 #define HEIGHT 20 #include "Block.hpp" class Map{ public: Map(){ for(int i=0;i<WIDTH+2;i++){ for(int j=0;j<HEIGHT+2;j++){ if(i==0 || i==WIDTH+1){ map_[i][j]=1; continue; } if(j==0 || j==HEIGHT+1){ map_[i][j]=1; cont...
// #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 eb emplace_back #define rep(i, begin, end) for (__typeof(end) i = (begin) -...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2007 - 2008 * */ #ifndef WEBSERVER_USER_MANAGEMENT_H_ #define WEBSERVER_USER_MANAGEMENT_H_ class WebserverAuthSession; class WebserverAuthenticationId; class WebserverAuthUser; class WebSubServer; clas...
#include "bufferwindow.h" #include "ui_bufferwindow.h" #include "global.h" #include <QPropertyAnimation> #include <QDebug> #include <QCloseEvent> BufferWindow::BufferWindow(QWidget *parent) : QWidget(parent), ui(new Ui::BufferWindow) { ui->setupUi(this); //去掉标题栏 setWindowFlags(Qt::FramelessWindowH...
#ifndef UTILS_H #define UTILS_H #include <string> using std::string; #include "DataStructure.h" int parseInsertStatement(const string& target, Row& insertRow); #endif
#ifndef note_cpp #define note_cpp #include "note.h" #include<QDebug> #endif /************************************************************** *** editNote() *** ***************************************************************/ void Article::editNote(){ ArticleEditeur* e =...
#define LDR_1 A1 #define LDR_2 A3 #define LDR_3 A2 #define LED_rouge 11 #define LED_verte 12 #define LED_jaune 10 #define bouton_pause 8 #define bouton_attaque 7 #define bouton_down 6 int tension_LDR_1, tension_LDR_2, tension_LDR_3; int tension_LDR_1_prev, tension_LDR_2_prev, tension_LDR_3_prev; int tolerence_LDR_1, t...
#pragma once #include <Poco/JSON/Object.h> #include "gwmessage/GWMessage.h" #include "gwmessage/GWResponse.h" namespace BeeeOn { /** * @brief Represents an acknowledgement, that a response of the given id * and status has been really delivered. It is intended to handle unreliable * network connections. * * The...
/* Include headers */ #include "threads.h" /********************* Member Function of class Threads_ **************************/ /* Function for thread creation */ int8_t Threads_ :: create( pthread_attr_t *attr ){ /* Local variable to store returned value */ int ret; /* Create thread */ ret = pth...
#ifndef __WINDOW__ #define __WINDOW__ #include <SDL2/SDL.h> #include <string> #include <assert.h> /* Clase wrapper para SDL_Window. La idea es enmascarar * todas las llamadas a las funciones de SDL detrás * de funciones nuestras con nombres más amigables. */ class Window { public: Window(); ~Window(); bool Cre...
/* * @lc app=leetcode id=78 lang=cpp * * [78] Subsets * * https://leetcode.com/problems/subsets/description/ * * algorithms * Medium (53.94%) * Likes: 2134 * Dislikes: 53 * Total Accepted: 389.4K * Total Submissions: 722.1K * Testcase Example: '[1,2,3]' * * Given a set of distinct integers, nums, ...
#include "hhAnalysis/multilepton/interface/EvtHistManager_hh_4l.h" #include "tthAnalysis/HiggsToTauTau/interface/histogramAuxFunctions.h" // fillWithOverFlow(), fillWithOverFlow2d() EvtHistManager_hh_4l::EvtHistManager_hh_4l(const edm::ParameterSet &cfg) : HistManagerBase(cfg) { central_or_shiftOptions_["numElectro...
/* * functionstocomplete.cpp * * Created on: Sep 10, 2017 * Author: keith */ //============================================================================ // TODO add necessary includes here //============================================================================ //==================================...
#include<bits/stdc++.h> using namespace std; int find_missing(int a[], int n){ int i; cout<<"The repeating element is "; for(i=0;i<n;i++){ if(a[abs(a[i])-1]>0) a[abs(a[i])-1]= -a[ abs(a[i])-1]; else cout<<abs(a[i])<<endl; } cout<<"Missing element is "; for(i=0;i<n;i++){ if(a[i]>0){ cout<<(i+1)...
/** * @file   OgreApplication.cpp * @brief  包含OgreApplication类的具体实现 */ #include "ogreapplication.h" #include <OgreException.h> #include <OgreLogManager.h> #include <OgreRoot.h> #include <QDir> #include <QFileInfo> #include <QDebug> #include <map> /** * @brief OgreApplication类的构造函数 * @param argc,argv * @note * 构造对话框窗口...
#include "pch.h" #include "GameObjectData.h"
#include "gwmessage/GWUnpairResponse.h" using namespace std; using namespace Poco; using namespace Poco::JSON; using namespace BeeeOn; GWUnpairResponse::GWUnpairResponse(): GWResponse(GWMessageType::UNPAIR_RESPONSE) { } GWUnpairResponse::GWUnpairResponse(const Object::Ptr object): GWResponse(object) { } void GWUn...
#include <cstdlib> #include <stdio.h> #include <stdlib.h> #include <cstring> #include <string> #include "helpers.h" // flags #define FLAG_Z 7 #define FLAG_N 6 #define FLAG_H 5 #define FLAG_C 4 int main() { //------------------------------DEFINE HARDWARE STUFF HERE---------------------------------------------- ...
//翼周りの流れのシミュレーション #include<iostream> #include<cstdio> #include<cmath> #include<complex> #include<vector> using namespace std; double PI = 3.141592; FILE *gid; complex<double> cv,ca,cgama,ccent,small_z,large_z,cf_potential,cf_pressure; double a = 0.6; double v0 = 1.0; double c025 = 0.5; double gama = 5.0; double x_z...
/* ======================================================================== DEVise Data Visualization Software (c) Copyright 1992-1996 By the DEVise Development Group Madison, Wisconsin All Rights Reserved. ======================================================================== Under no circumstances ...
#include<bits/stdc++.h> using namespace std; int tsum; bool vis[3][50]; int T; int mp[10][10]; bool flag=false; void eight(int cur,int sum){ if(cur==9){ tsum=max(tsum,sum); // cout<<"tsum="<<tsum<<"\n"; return; } for(int i=1;i<=8;i++){ if(!vis[0][i]&&!vis[1][...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <iomanip> #include <set> #include <climits> #include <ctime> #include <complex> #include <cmath> #include <string> #in...
#include<iostream> #include<cmath> class Fraction { private: int numerator, denominator; public: Fraction() { numerator = 1; denominator = 1; } Fraction(int n, int d ) { numerator = n; if (d==0) { std::cout << "ERROR: ATTEMPTING TO DIVIDE BY...
// Created on: 1995-03-15 // Created by: Laurent PAINNOT // Copyright (c) 1995-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...
#error // Audio backends shall implement this interface. #include <demo-data.hpp> #ifdef CAPTURE float audioGetDuration(); #else void audioStart(); float audioGetTime(); bool audioIsFinished(); #endif
$NetBSD$ * put inclusion of asiolink on top so that std::map dos not conflict with map in net/if.h on illumos --- src/bin/dhcp4/tests/parser_unittest.cc.orig 2020-08-24 16:36:38.000000000 +0000 +++ src/bin/dhcp4/tests/parser_unittest.cc @@ -6,9 +6,9 @@ #include <config.h> +#include <dhcpsrv/parsers/simple_par...
namespace credb { namespace trusted { template <class T, class... Args> PageHandle<T> BufferManager::shard_t::new_page(page_no_t page_no, Args &&... args) { m_lock.write_lock(); check_evict(); auto page = new T(m_buffer, page_no, std::forward<Args>(args)...); auto meta = new internal_page_meta_t(page...
#include "pch.hpp" #include <catch/catch.hpp> #include "generate.hpp" using namespace yama; TEST_CASE("test distribution", "[generate]") { yama::random_t random {1011}; constexpr int n = 2500000; auto const range = yama::closed_integral_interval<> {0, 99}; constexpr int weight = 0; auto const...
/* ........eWorld ReSearch 2004 ........Alessandro Polo ........http://www.ewgate.net ........===================== ........This software is freeware. Source code is Open Source. ........Keep Author's Credits if you use any part of this software. ........===================== ........Project State: Completed ........Pr...
#ifndef MESSAGE_TYPE_H #define MESSAGE_TYPE_H namespace Platy { namespace Game { enum class EMessageType { //////////////// // Game related //////////////// GAME_OVER, VICTORY, TILE_FLAGGED, TILE_UN_FLAGGED, TOGGLE_PAUSE, PAUSE, //////////////// // Mouse //////////////// ...
#pragma once #include <map> #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> class ResourceLoader { public: static sf::Texture *GetTexture(const std::string &name); static sf::Image *GetImage(const std::string &name); static sf::SoundBuffer *GetSoundBuffer(const std::string &name); static void ShutDown()...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2005 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" LayoutPool::LayoutPool(unsigned short size)...
// // Created by gurumurt on 4/11/18. // #ifndef OPENCLDISPATCHER_DAG_QUERY_H #define OPENCLDISPATCHER_DAG_QUERY_H #endif //OPENCLDISPATCHER_DAG_QUERY_H #include "headers.h" #include "globals.h" #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graph_traits.hpp> #include <boost/graph/dijkstra_shortest...
class Solution { public: vector<int> largestDivisibleSubset(vector<int>& nums) { sort(nums.begin(),nums.end()); vector<int> dp(nums.size(),0); vector<int> parent(nums.size(),0); vector<int> res; int maxLen = 0,startIndex = 0; for(int i=nums.size()-1; i>=0; --i){ ...
#pragma once #include <mutex> #include <set> #include <map> #include <vector> #include <exception> #include <iostream> #include <d3dcompiler.h> #include <d3d11_1.h> #include <directxmath.h> #include <directxcolors.h> #include <cmath> #include <fstream> namespace RLGM { const double M_PI = std::acos(-1); struct Pos...
#pragma once class CMyUsbDevice { public: CMyUsbDevice(void); ~CMyUsbDevice(void); int getUsbDeviceInfo(CStringArray &strDevsInfo); int getUsbDeviceName(CString &strDevsInfo, CString &name); int formatVisaUsbDeviceName(CString &strDevsInfo, CString &name); };
#include "router_hal.h" #include <stdint.h> #include <stdlib.h> #include <stdio.h> extern bool validateIPChecksum(uint8_t *packet, size_t len); in_addr_t addrs[N_IFACE_ON_BOARD] = {0}; uint8_t packet[1024]; int main(int argc, char *argv[]) { int res = HAL_Init(0, addrs); if (res < 0) { return res; } whil...
// Copyright (c) 2018 Mozart Alexander Louis. All rights reserved. // Includes #include "language_engine.hxx" #include "utils/archive/archive_utils.hxx" // Singleton Declaration atomic<LanguageEngine*> LanguageEngine::instance_; mutex LanguageEngine::instance_mutex_; LanguageEngine::LanguageEngine() : language_c...
#ifndef WINDOW_H #define WINDOW_H #include <glad/glad.h> #include <GLFW/glfw3.h> class window { public: GLFWwindow* ptr; float h = 600.0f; float w = 800.0f; float delta_time = 0.0f; window(int width, int height, const char* name); window(const char* name); void handle_input(); void update_time(); private: fl...
// Created on: 1999-11-17 // Created by: Andrey BETENEV // Copyright (c) 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 Less...
#include <stdio.h> #include <conio.h> void start(); void showRectangular(); void showSquare(); void showDiagonal(); void showScalarDiagonal(); void showUnitary(); void showAddition(); void showSubtraction(); void showScalarMultiplication(); void showMultiplication(); void showTranspose(); void showSymetric(); void sho...
#pragma once #ifndef SWAP_H #define SWAP_H class Swap { public: Swap() {}; ~Swap() {}; void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; }; }; #endif
class Solution { public: //Function to check if brackets are balanced or not. bool ispar(string x) { stack<char> st; for(int i =0;i<x.length();i++){ if(x[i]=='{'||x[i]=='['||x[i]=='('){ st.push(x[i]); } else { if(st.size...
/* https://www.acmicpc.net/problem/1110 */ #include <iostream> #include <cstdlib> using namespace std; int main(void) { int initNum; scanf("%d", &initNum); int initA = initNum / 10; int initB = initNum % 10; int length = 0; int aA = initNum / 10; int aB = initNum % 10; int bA = (aA + aB) / 10; int bB = (aA ...
#pragma once #include <chrono> #include <librdkafka/rdkafkacpp.h> #include <memory> struct MessageMetaData { std::chrono::milliseconds Timestamp{0}; RdKafka::MessageTimestamp::MessageTimestampType TimestampType{ RdKafka::MessageTimestamp::MessageTimestampType:: MSG_TIMESTAMP_NOT_AVAILABLE}; int6...
#include "stdafx.h" #include "CalProteinProbUnique.h" CCalProteinProbUnique::~CCalProteinProbUnique(void) { } void CCalProteinProbUnique::calculateProteinProbability() { double dProbability=1.0; for (CMassPeptideXcorr* pPeptideXcorr:m_pProtein->m_vSupportPeptide) { dProbability=dProbability*(1-pPeptideXcorr->...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#include "dataprocessor.h" #include "math.h" #define REALTIMEDATABUFFERCOUNT 3600//realTimeDataBuffer 数据个数 #define GETDATATIMEDEFAULT 1//默认读取数据间隔 单位:second #define SAVEDATATIMEDEFALT 1//默认存储数据间隔 单位:second #define MONITORTIMEDEFALT 10//默认监控计算间隔 单位:second #define PROPORTIONDEFAULT 4.0//默认调节限制比例 #def...
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * File: main.c * * MATLAB Coder version : 3.3 * C/C++ source code generated on : 24-Apr-2018 18:23:19...
/** * created: 2013-4-8 15:44 * filename: FKMisc * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include "../Include/FKMisc.h" #include "../Include/FKStringEx.h" #include "../Include/Dump/FKDumpErrorBase.h" #include "../Include/F...
//! Namespace that handles necassary includes and various functions #pragma once #include "GL/glew.h" #include <Windows.h> #include "GLFW/glfw3.h" #include <glm/vec3.hpp> // glm::vec3 #include <glm/vec4.hpp> // glm::vec4 #include <glm/mat4x4.hpp> // glm::mat4 #include <glm/gtc/matrix_transform.hpp> namespace Utilit...
// // Created by jglrxavpok on 04/09/2020. // #pragma once #include "Vec3.h" #include "Ray.h" #include "Intersectable.h" #include "intersectables/IntersectableGroup.h" #include "intersectables/Sphere.h" #include "colors.h" #include <random> #include <curand_kernel.h> constexpr double PI = 3.1415926535897932385; __...
#ifndef OTROS_H_INCLUDED #define OTROS_H_INCLUDED using namespace std; enum tipopalabra{ cand = 0, dic = 1 }; #endif
#include"Player.h" #include"TextPanel.h" #include<string> #include<sstream> #include<iostream> Player::Player(int x, int y, std::string type, int hp, int atk, int def, bool isVisible) :Character(x, y, '@', type, hp, atk, def) { this->isVisible = isVisible; this->gold = 0; this->stopwander = false; this->stopdeath ...
// ListEndLexeme.cpp #include <parser/Exceptions.h> #include <parser/lexemes/ListEndLexeme.h> #include <parser/lexemes/NameLexeme.h> namespace parser { ListEndLexeme::ListEndLexeme( const StringConstIterator& iStart, const std::string& document ) : begin_{ iStart } , end_{ document.end() } { ...
#include "stdafx.h" #include "RBF.h" // // Created by antoine on 14/06/2017. // #include <cstdlib> #include <vector> #include <cfloat> #include <iostream> class MatrixXd; NAIVE_RBF::NAIVE_RBF(int nbExamples, double gamma, double* X, int inputSize, double* Y) { assert(nbExamples > 0); assert(gamma > 0); assert(inpu...
#include <cmath> #include <string> namespace xlsxconverter { namespace utils { inline std::string dtos(double n) { static double PRECISION = 0.0000000000001; // handle special cases if (std::isnan(n)) { return "nan"; } else if (std::isinf(n)) { return "inf"; } else if (n == 0.0) { ...
// // Created by strobe on 4/19/20. // #pragma once #include <stack> #include <vector> template<typename GraphType> class Path { public: Path(GraphType& graph, int sourceVertex) : graph(graph) { setVisitedFrom(graph.getNumVertex()); this->sourceVertex = sourceVertex; // path finding ...
/* -*- 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. * * @author Alexander Remen (alexr@opera.com) * */ #ifndef ATTACH...
/* Main controller for "GardenLab" observatory/weather station. This Arduino Mega 2560 sketch supports the following operations: Monitoring solar battery system voltage and current draw Measure: Temperature Humidity Barometric Pressure Wind Speed Wind Direction ...
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2012-2013. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #include <gdcmSurfaceReader.h> #include <gdcmSurfaceHelper.h> #include <f...
#include<iostream> #include<cstring> using namespace std; int rec[15]; int num[15]; int main() {int t,n,now,k,i; cin >> t; while (t--) {cin >> n; memset(num,0,sizeof(num)); now=k=n%10;i=0; while (!num[now]) {num[now]=1; rec[i++]=now; now=now*k%10; } cout << rec[(n-1)%i] <<...
#pragma once #include "No.h" #include "Aresta.h" #include <iostream> #include <string> #include <fstream> #include <vector> #include <set> #include <stack> #include <map> using namespace std; class Grafo { private: Grafo(vector<string> ids, vector<tuple<int, int, int>>* arestas); // construtor auxiliar usado no c...
#include "UnionFind.h" UnionFind::UnionFind(int size) { this->size = size; for (int i = 0; i < size; i++) { id.push_back(i); } } bool UnionFind::Connected(int a, int b) { return id[a] == id[b]; } void UnionFind::Union(int a, int b) { if (!Connected(a, b)) { int aId = Find(a); int bId = Find(b); for (...
#pragma once #include "constants.h" class Control { public: Control(); Control(SDL_Texture* font_input); ~Control(); SDL_Texture* font; SDL_Texture* scoreTexture; SDL_Texture* numbersTexture; SDL_Rect scoreRect = { 5,5, 30, 30 }; SDL_Rect numberRect0 = { 95, 5, 21, 36 }; SDL_Rect numberRect1 = { 120, 5, 21,...
#include<bits/stdc++.h> using namespace std; #define PI 3.1415926535897932 int main(){ //n=1 ~ n=100 までの1/nの総和で良いのかね?? double tmp=0; for (int i=1;i<101;++i) { //printf("~ 1/%d = %-7lf\n",i,tmp+(1/(i*1.0))); printf("~ 1/%3d = %-7lf\n",i,tmp+(1/(i*1.0))); tmp+=1/(i*1.0); } re...
#pragma once #ifndef EULER_UTILITY_H_ #define EULER_UTILITY_H_ #include "BaseHeader.h" #include "vfiMaxUtil.h" class eulerUtility : public vfiMaxUtil { private: protected: vector<vector<vector<vector<vector<VecDoub>>>>> valueFnDeriv; public: eulerUtility(const State& current, const StochProc& stoch, const EquilFn...
JerryCan[] = { {Loot_MAGAZINE, 1, ItemJerryCan}, {Loot_MAGAZINE, 1, ItemJerryCanEmpty} }; FuelCan[] = { {Loot_MAGAZINE, 1, ItemFuelcan}, {Loot_MAGAZINE, 1, ItemFuelcanEmpty} }; FuelBarrel[] = { {Loot_MAGAZINE, 1, ItemFuelBarrel}, {Loot_MAGAZINE, 1, ItemFuelBarrelEmpty} };
#pragma once #include <iostream> #include <iomanip> #include <string> #ifndef COMPLEXNUMBER_H #define COMPLEXNUMBER_H class ComplexNumber { public: ComplexNumber(); ComplexNumber(double Rm, double Im); double& get_Rm(); double& get_Im(); void set_Rm(double Rm); void set_Im(double Im); void rand_value(); friend...
#ifndef ROBOT_H #define ROBOT_H #include <vector> //////////////////////////////////////////////////////////////////////////////// typedef enum { ATCH_LINK, ATCH_BASE, } attatchment; typedef enum { JOINT_REVOLUTE, JOINT_PRISMATIC, } joint_type; typedef struct Link { float length; attatchment atch; } Link; ...