text
stringlengths
8
6.88M
// // Memory.cpp // RNN // // Created by Daniel Solovich on 12/16/17. // Copyright © 2017 Daniel Solovich. All rights reserved. // #include "Memory.hpp" void Memory::putMemoryInBackup() { Matrix<double> firstLayerMemory, secondLayerMemory; firstLayerMemory = FileProcessing::readDataFromFile("/Users/libo...
// // Created by yulichao on 2020/8/17. // #ifndef CMAKE_LEARN_MYLIB_H #define CMAKE_LEARN_MYLIB_H class myLib { public : myLib(); }; #endif //CMAKE_LEARN_MYLIB_H
/* SPDX-License-Identifier: LGPL-2.1 */ /* * Copyright (C) 2017 VMware Inc, Yordan Karadzhov <ykaradzhov@vmware.com> */ /** * @file KsAdvFilteringDialog.hpp * @brief GUI Dialog for Advanced filtering settings. */ #ifndef _KS_ADV_FILTERING_DIALOG_H #define _KS_ADV_FILTERING_DIALOG_H // Qt #include <QtWid...
#include <iostream> #include <set> using namespace std; int main() { long long n; long long n_snowflakes; long long code_snowflakes; set <long long> set_snowflakes; cin>>n; while(n>0){ cin>>n_snowflakes; while(n_snowflakes>0){ cin>>code_snowflakes; ...
//使用while循环将50~100数相加 #include <iostream> using namespace std; int main() { int sum=0,val=50; while(val<=100){ sum+=val; val++; } cout << sum <<endl; return 0; }
/** * Copyright (C) 2017 Alibaba Group Holding Limited. 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 * * ...
 /// @file LutMap.cc /// @brief LutMap の実装ファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2013 Yusuke Matsunaga /// All rights reserved. #include "LutMap.h" BEGIN_NAMESPACE_YM ////////////////////////////////////////////////////////////////////// // クラス LutMap /////////////////////////////////////...
#include <cassert> #include <iostream> #include <algorithm> #include <list> #include <vector> #include <sstream> int gcd(int a, int b) { assert(a > 0 && b > 0); while((a %= b)) std::swap(a, b); return b; } template<class Iter> int gcd(Iter first, Iter last) { int r = 0; for(;first != last ...
#pragma once #include "dualList.h" class task3 { private: int cityCount; dualList* adjacencyList; dualList* price; int* result; int resultSize; int from, to; struct City { char* name; size_t nameSize; }; City* numberName; public: void readList(char*); ...
// by thaiph99 #include <bits/stdc++.h> using namespace std; #define ll long long int #define FOR(i, a, b) for (int i = a; i <= b; i++) #define FORR(i, a, b) for (int i = a; i >= b; i--) #define iosb \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); const i...
class Solution { public: bool wordPattern(string pattern, string str) { map<char,vector<int>> m1; map<string,vector<int>> m2; for(int i = 0; i < pattern.size(); i++) m1[pattern[i]].push_back(i); vector<string> s; int cur = 0; int n = str.size(); fo...
#include "stdafx.h" #include "scene1.h" scene1::scene1() { } scene1::~scene1() { } HRESULT scene1::init() { IMAGEMANAGER->addImage("startScene", "images/startScene.bmp", WINSIZEX, WINSIZEY, true, RGB(255, 0, 255)); _introText = IMAGEMANAGER->addImage("introtext", "images/introtext.bmp", 0, 0, 200, 25, true, RGB...
/* ID: khurana2 PROG: friday LANG: C++ */ #include <iostream> #include <fstream> using namespace std; bool is_leap_year(unsigned short year) { bool ret; if (year % 4 != 0) ret = false; else if (year % 100 == 0 && year % 400 != 0) ret = false; else ret= true; return ret;...
/** * @File mcts_alg/mcts_search_engine.h * @Brief file_description * Details: * @Author guohainan * @Version v0.0.1 * @date 2017-09-08 22:52:13 */ #ifndef mcts_alg__MCTS_SEARCH_ENGINE_H__ #define mcts_alg__MCTS_SEARCH_ENGINE_H__ #include <memory.h> #include <math.h> #include "gomoku/gomoku_simulator.h" #inclu...
// // Created by zander on 2017/12/30. // #include "include/GLSLProgram.h" //initialize in selfde volgorde as verklaar in header GLSLProgram::GLSLProgram() : _num_attributes(0), _program_id(0), _vertex_shader_id(0), _fragment_shader_id(0) //die is 'n initialization list soos hier onder in comments net vinniger want d...
/* * ===================================================================================== * * Filename: static.cpp * * Description: * * Version: 1.0 * Created: 10/04/2013 09:03:37 PM * Revision: none * Compiler: gcc * * Author: Shuai YUAN (galoisplusplus),...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#ifndef MEMENTO_H #define MEMENTO_H #include "component.h" #include <vector> class Memento { public: Memento(std::vector<Component *> components); protected: std::vector<Component *> _state; friend class Room; }; #endif // MEMENTO_H
class Solution { public: int removeDuplicates(vector<int>& nums) { int p = 0, c = 0; if (nums.size() <= 1) return nums.size(); for (auto iter = nums.begin()+1; iter != nums.end(); ++iter) { if (*iter != nums[p]) { nums[++p] = ...
#include "lr_3_methods.h" #include "lr_3_methods.cpp" int main(int argc, char *argv[]) { bool flag_step=false; bool flag_gui=false; for(int i=1;i<argc;i++) { if(!strcmp("gui",argv[i])) flag_gui=true; if(!strcmp("step",argv[i])) flag_step=true; if(!strcmp(...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "DamageableMesh.generated.h" class UDestructibleComponent; UCLASS() class LAMPANDMESH_API ADamageableMesh : public AActor { GENERATED_BODY() public: // ...
#include "DbfRead.h" #include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #include <vector> #include <string> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <sys/mman.h> CDbfRead::CDbfRead(const std::string &strFile) : m_nRecordNum...
#ifndef RANDOM_H_ #define RANDOM_H_ #include <random> namespace StaticNet { namespace Random { static std::random_device rd; static std::mt19937 mt(rd()); template <class T> T rand(); } } #endif
#include<iostream> using namespace std; struct Produto { string name; double price; }; double price(Produto* produtos, int length, string name, int quant) { for (int i = 0; i < length; i++) { if (produtos[i].name == name) { // cout << "produtos[i].name = " << produtos[i].name << " == ...
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <string.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <iostream> #include <sstream> using namespace std; int main(int argc, char *argv[]) { if (argc != 4) { std::cerr<<"ERROR: ./client <...
#ifndef _TNA_VKBUFFER_TOOLS_H_ #define _TNA_VKBUFFER_TOOLS_H_ value #include "../vertex.h" #include "../../common.h" #include "vkrenderer.h" namespace tna { /** * \brief Creates a VKBuffer * * \param size The size of the buffer to create * \param usage The usage flags of the buffer * \param properties The...
#ifndef OPERATEURIFT_H #define OPERATEURIFT_H #include "../headers/operateur.h" #include "../headers/pile.h" #include "../headers/entier.h" #include "../headers/expressionmanager.h" /// /// \brief Effectue un IF THEN /// class OperateurIFT : public Operateur { friend class ExpressionManager; private: /// ...
#pragma once #include "Core/AppItems/mvTypeBases.h" //----------------------------------------------------------------------------- // Widget Index // // * mvChild // * mvGroup // * mvCollapsingHeader // * mvTreeNode // //----------------------------------------------------------------------------- n...
#pragma once #include <iostream> #include <vector> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/core/core.hpp> using namespace std; using namespace cv; template <typename T> class Array2D { public: // ���� Array2D() { } Array2D(int col, int row, T value);...
#pragma once #include "resource.h" #include "others/EditNumber.h" #include "others/viskoe/PropertyGrid.h" #include "data/ZonalSetup.h" #include "LocationDlgBase.h" class CZonalLocationDlg : public CDialogImpl<CZonalLocationDlg> , public CLocationDlgBase<CZonalLocationDlg> , public WTL::CDia...
const int LED1 = 5; const int LED2 = 6; int ledState1 = 0; int ledState2 = 0; unsigned long previousMillis1 = 0; unsigned long previousMillis2 = 0; const long interval1 = 100; const long interval2 = 500; void setup() { pinMode(LED1, OUTPUT); pinMode(LED2, OUTPUT); } void loop() { unsigned long currentMilli...
class Solution { private: vector<vector<int>> result; vector<int> path; void backtracking(vector<int>& nums,vector<bool>& used){ if(path.size()==nums.size()){ result.push_back(path); return; } for(int i=0;i<nums.size();++i){ if(i>0 && num...
#ifndef CAMERA_H #define CAMERA_H class Camera{ private: float pos[3]; float front[3]; float up[3]; float right[3]; public: Camera(float x, float y, float z); void Move(float x, float y); float *getPos(); }; int checkIntersection(float a, float b,float c,float d, float p, float q,float...
// // Created by troels on 10/27/16. // #ifndef VMMEF_HDF5FILE_H #define VMMEF_HDF5FILE_H #include <string> #include <H5Cpp.h> #include "FECEvent.h" class Pedestal; class SRSRawFile; class HDF5File { private: H5::H5File* file; uint events; H5::Group imageGroup; public: HDF5File(std::string fileName);...
#include <iostream> using namespace std; class Queue { private: int size; int front; int rear; int *arr; public: Queue(); Queue(int); ~Queue(); void enQueue(int); int deQueue(); void display(); }; Queue::Queue() { size = 10; front = rear = 0; arr = new int[size]; } Queue::Queue(int size) { this->size =...
#include "port.h" #include <iostream> int main() { Port p1; Port p2("Tsingtao", "Beer", 30); std::cout << p1 << std::endl; std::cout << p2 << std::endl; Port p3 = p2; p3.Show(); p3 += 3; p3.Show(); VintagePort vp1("Harbin", 50, "hb", 1992); vp1.Show(); VintagePort vp2; ...
/* * nrf24l01.cpp * * Created: 04.08.2015 21:37:23 * Author: KOSHELEV */ #include "nrf24l01.h" nrf24l01::nrf24l01() :pin (Gpio::B) , irq_(intrpt::INTRPT0 , intrpt::FallEdge) { pin.setDirPin (ce_); init (); } uint8_t nrf24l01::wr_reg (uint8_t r_n_reg , uint8_t mask1, uint8_t mask2) { char SR=SREG;//сохран...
// Screen.cpp : 이 파일에는 'main' 함수가 포함됩니다. 거기서 프로그램 실행이 시작되고 종료됩니다. // #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <conio.h> #include <Windows.h> using namespace std; void draw(char* loc, const char* face) { strncpy(loc, face, strlen(face)); } void gotoxy(int x, int y) { COORD pos = { x,y }; SetCo...
#include <stdio.h> #include <stdlib.h> #include <string> #include <iostream> #include <vector> #include <queue> #include <pcap.h> #include <netinet/ip.h> #include <arpa/inet.h> #include <cstring> #include <iostream> #include <map> #include <iostream> // std::cout #include <sstream> // std::ostringstream #inclu...
// // Created by Nitish Mohan Shandilya on 9/2/20. // https://leetcode.com/discuss/interview-question/373006 unordered_map<string, string> buildSongToGenreMap(unordered_map<string, vector<string>>& genreSongs) { unordered_map<string, string> songToGenreMap; for (auto genreSong : genreSongs) { const str...
/* * Copyright (c) 2014, Julien Bernard * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DIS...
#ifndef ECHO_SERVER_H #define ECHO_SERVER_H #include <cstdint> #include <exception> #include <stdexcept> #include <netinet/in.h> #include <sys/socket.h> #include <map> #include "client_manager.h" class echo_server { // FIXME: public: constexpr static uint16_t DEFAULT_PORT = 8668; // AF_INET IPv4...
/********************************************************** * License: The MIT License * https://www.github.com/doc97/TxtAdv/blob/master/LICENSE **********************************************************/ #ifdef __cplusplus extern "C" #include <lua.hpp> #else #include <lua.h> #include <lualib.h> #include <lauxlib.h> #...
#include <bits/stdc++.h> #define ll long long using namespace std; typedef tuple<ll, ll, ll> tp; typedef pair<ll, ll> pr; const ll MOD = 1000000007; const ll INF = 1e18; template <typename T> void print(const T &t) { std::copy(t.cbegin(), t.cend(), std::ostream_iterator<typename T::value_type>(std::co...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
#include<cmath> #include<iostream> #include<cstdlib> #include<cstdio> #include<vector> #include<cstring> #include<fstream> #include<map> #include<string> #include<random> #include<algorithm> #include "ClusterElm.h" #define sys_size 10000 //xy座標の長さ #define cell 50 using namespace std; //メッシュに区切った時の正方形の面積 void solve(...
class Solution { public: string removeDuplicates(string s) { stack<char> st; string res; for (char c : s) { if (st.empty()) st.push(c); else if (st.top() == c) st.pop(); // remove adjacent duplicates else st.push(c); } whi...
#pragma once #include <glm/glm.hpp> enum class Color { RED, ORANGE, YELLOW, GREEN, BLUE, WHITE }; class Square { public: mutable glm::vec3 vertices[6]; // top left triangle then bottom right triangle of each square // for triangles, I'm going to start at the right angle and go clockwise. Color color; public: Squ...
// Face class used for the face normalization program.. #include <cv.h> using namespace cv; class Face{ public: Face(); Face( const Face& ); float operator - ( const Face& ); Face( int,int, int,int, int,int, int,int, int,int ); Face& operator = ( const Face& ); void print( const ...
#include<iostream> using namespace std; void cutWire(int rate[], int n) { int numWiresUsed; int wires[n+1]; int val[n+1]; int lastWire[n+1]; val[0] = 0; int i, j; for (i = 1; i<=n; i++) { int max_val = -1; int best_wire_len = -1; for (j = 0; j < i; j++) { if(max_val <rate[j] + v...
#include "Error.h" #include <cassert> //Macro magic to get strings for each GLenum error #define SOLAR_GL_ERRORS_STRINGIFY_HELPER(X) #X #define SOLAR_GL_ERROR_STRINGIFY(X) SOLAR_GL_ERRORS_STRINGIFY_HELPER(X) namespace solar { namespace openGL { std::string TranslateError(errors err) noexcept { //Helper map ...
#ifndef __CLUCK2SESAME_TESTS_PLATFORM_POWERMANAGEMENT_POWERMANAGEMENTMOCKS_INC #define __CLUCK2SESAME_TESTS_PLATFORM_POWERMANAGEMENT_POWERMANAGEMENTMOCKS_INC extern initialisePowerManagementMocks extern calledInitialisePowerManagement extern calledPollPowerManagement extern calledPreventSleep extern calledEnsur...
#include <iostream> #include<iostream> #include<eigen3/Eigen/Core> #include<eigen3/Eigen/Geometry> using namespace std; #define PI (3.1415926535897932346f) int main(int argc, char **argv) { /**** 1. 旋转向量 ****/ cout << endl << "********** AngleAxis **********" << endl; //1.0 初始化旋转向量,沿Z轴旋转45度的旋转向量 ...
#pragma once /** * Algorithms - sorting * merge_sort.hpp * Purpose: Performs merge sort on an array * * @author Prabhsimran Singh * @version 1.0 11/09/18 */ namespace al { template <typename T> void merge(T *, T *, const int &, const int &, const int &); template <typename T> void msort(T *, T *, const int &,...
#pragma once #include "sqlite3.h" #include "TradosUnit.h" #define DB_FILENAME "trados.db" class CTradosStorage { public: static CTradosStorage* Create(void); ~CTradosStorage(void); long long InsertIntoTableTU(const TradosUnit& tu); long long InsertIntoTablePairs(const std::wstring& xmlLang, const ...
#include "Memory.h" Memory::Memory(const int size) { m_size = size; } void Memory::setSize(const int size) { m_size = size; } int Memory::getSize() const { return m_size; }
#include<iostream> #define N 6 #define MAXVALUE 101 using namespace std; template<class T> class Queue { public: int front; int rear; int size; T* key; Queue() { size = N; key = new T[size]; front = 0; rear = 0; } ~Queue() { delete[] key; } bool isFull() { if ((rear + 1) % size == front) r...
/* Suman Kumar*/ // #ifdef LOCAL // #include "bits/stdc++.h" // #else // #include <bits/stdc++.h> // #endif // find sum of distance of each node in tree from all other nodes #include <iostream> #include <iomanip> #include <sstream> #include <cstring> #include <vector> #include <deque> #include <queue> #include <set...
#pragma once #include <tudocomp/meta/ast/Node.hpp> namespace tdc { namespace meta { namespace ast { /// \brief Error type for type conversion related errors. class TypeMismatchError : public std::runtime_error { public: inline TypeMismatchError( const std::string& msg, const std::string& expected...
#include <stdio.h> #pragma warning (disable:4996) const int size = 111; int map[size][size]; int visited[size][size]; int queue[111111][2]; // 배열의 크기때문에 틀렸던 거임. int front = 0, rear = 0; // 우, 좌, 하, 상 const int dSize = 4; int dirX[dSize] = { 0, 0, 1, -1 }; int dirY[dSize] = { 1, -1, 0, 0 }; int main(){ int n, m...
#include <iostream> #include "test/test.h" #include "test/treeleaftest.h" #include <vector> int main() { std::vector<Test *> tests; tests.push_back(new TreeLeafTest()); for(auto i=tests.begin(); i!=tests.end(); ++i){ std::cout << (*i)->getName() << " : " << ((*i)->test() ? "Not passed" : "Passed") <...
#include <algorithm> #include <iostream> #include <vector> using namespace std; void quicksort(vector<int> &nums, int low, int high) { if (low < high) { int i = low, j = high, temp = nums[low]; while (i < j) { while (i < j && nums[j] >= temp) j--; //先 //从右向左找第一个小于temp的数,因为在j--的过程...
#pragma once #include <SFML/Graphics.hpp> #include "MathLibrary.h" #include "Scene.h" #include "Camera.h" #include <vector> using namespace std; class Tracer; class Scene; class vec3; class mat4; class Camera; class Application { public: Application(); ~Application(); bool onCreate(); bool onUpdate(); bool onDest...
#include "ui_screenwidget.h" #include "screenwidget.h" #include "config.h" #include "window.h" #include "gamewidget.h" #include "network/connection.h" #include "game/gamestruct.h" #include "gameengine/glwidget.h" #include <QtDebug> #include <QPainter> #include <QOpenGLTexture> #include <QMouseEvent> Scr...
 /// @file GbmSatEngineEnum.cc /// @brief GbmSatEngineEnum の実装ファイル /// @author Yusuke Matsunaga (松永 裕介) /// /// Copyright (C) 2013, 2014 Yusuke Matsunaga /// All rights reserved. #include "GbmSatEngineEnum.h" BEGIN_NAMESPACE_YM ////////////////////////////////////////////////////////////////////// // クラス GbmSatEn...
#include "ConcreteSubject.h" #include <iostream> void ConcreteSubject::addObserver(std::shared_ptr<Observer> observer) { std::cout << "[ConcreteSubject] addObserver()" << std::endl; m_observers.push_back(observer); } void ConcreteSubject::deleteObserver(std::shared_ptr<Observer> observer) { std::cout << ...
#pragma once #include <allegro.h> class Obstaculo { protected: float pos_x; float pos_y; float vel_y; float pos_y_aux; BITMAP* buffer; BITMAP* bmp; public: Obstaculo(); virtual ~Obstaculo(); virtual void Set_obst(float pos_x, float pos_y, BITMAP* b...
#include "FileWalker.h" #include <Windows.h> #include <iostream> FileWalker::FileWalker(const std::string& rootDir, std::function<void(const std::string&)> handler) : rootDir(rootDir) , handler(handler) { } void FileWalker::addExtensions(const std::vector<std::string>& extensions) { for (const std::string& extensi...
// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em // with input from pivot_msg:msg/Pivot.idl // generated code does not contain a copyright notice #ifndef PIVOT_MSG__MSG__DETAIL__PIVOT__TRAITS_HPP_ #define PIVOT_MSG__MSG__DETAIL__PIVOT__TRAITS_HPP_ #include "pivot_msg/msg/detail/pivot__struct.hpp" #i...
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int** arr = new int*[n]; for(int i=0;i<n;i++) { arr[i] = new int[n]; for(int j=0;j<n;j++) { cin >> arr[i][j]; } } for(int i=0;i<n;i++) { if(i%2==0) { for(int j=0;j<n;j++) { cout << arr[j][i] << " "; } cout...
/* * Copyright (C) 2007-2015 Frank Mertens. * * Use of this source is governed by a BSD-style license that can be * found in the LICENSE file. * */ #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> // gethostname #include <netdb.h> // getaddrinfo, freeaddrinfo, getnameinfo #include <errno.h> #in...
#include "stdafx.h" #include "TouchedHandleLayer.h" #include "SoundFactory.h" #include "wordFactory.h" TouchedHandleLayer::TouchedHandleLayer() { } TouchedHandleLayer::~TouchedHandleLayer() { } TouchedHandleLayer* TouchedHandleLayer::create(StudyScene* studyScene) { auto ret = new (std::nothrow) TouchedHandleLayer...
#ifndef BASESCREENSFACTORY_H #define BASESCREENSFACTORY_H #include "basefragment.h" #include <QString> class BaseScreensFactory { public: BaseScreensFactory(); virtual ~BaseScreensFactory(); virtual BaseFragment* create(QString tag) = 0; virtual QString createStart() = 0; }; #endif // BASESCREENSF...
#ifndef APPLIANCEFACTORY_H #define APPLIANCEFACTORY_H #include "factory.h" #include "appliance.h" class ApplianceFactory: public Factory { public: ApplianceFactory(); Appliance *create(std::string name); }; #endif // APPLIANCEFACTORY_H
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) #define ok() puts(ok?"Yes":"No"); using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<bool> vb; typedef vector<vb> vvb; typedef set<int> si; ty...
/* Created by Guanzheng Xu This file creats S bus from case files. */ #ifndef MAKESBUS_H #define MAKESBUS_H #include <vector> #include "index.h" #include "mpc.h" using std::vector; VectorXcd makeSbus(mpc &MPC) { //---------------------- construct gbus matrix ----------------------- // gubus matrix is a matrix...
#ifndef GM2_FIELD_CORE_INCLUDE_SHIM_TRANSFORMS_HH_ #define GM2_FIELD_CORE_INCLUDE_SHIM_TRANSFORMS_HH_ /*===========================================================================*\ author: Matthias W. Smith email: mwsmith2@uw.edu file: shim_transforms.hh about: Contains coordinate transformation functions that ...
extern float BMI[6]; using namespace std; void anolyze() { ofstream test1("file.out.out",ios::trunc); int i; for(i=0;i<5;i++) { if(BMI[i]>=10 && BMI[i]<15) { ofstream test1("file.out.out",ios::app); test1<<fixed<<setprecision(2)<<BMI[i]<<" "<<"Very severely underweight"<<endl; } if(BMI[i]>=15 && BM...
#pragma once #include <map> #include <vector> #include <iostream> #include <fstream> #include <string> using namespace std; #include "DException.h" std::wstring a2w(const std::string& source); #define DT_INTERFACE __declspec(dllexport)
/* d64view - a d64 disk image viewer Copyright (c) 2002,2003,2016 Michael Fink */ /*! \file about.hpp \brief about dialog about dialog shown in the "Help -> About" dialog. */ // include guard #ifndef d64view_about_hpp_ #define d64view_about_hpp_ // needed includes #include "canvas.hpp" #include "versio...
#include "_player.h" local_s g_Local; player_s g_Player[ABSOLUTE_PLAYER_LIMIT]; cPlayers g_Players; void cPlayers::UpdateLocalEntity() { player_info_t info; IClientEntity* pLocalEntity = g_pClientEntList->GetClientEntity( g_pEngine->GetLocalPlayer() ); if ( !pLocalEntity ) return; if ( g_pEngine->GetPlayerInf...
#ifndef POINT_H #define POINT_H #include <iostream> #include <string> #include <vector> #include "../Object/object.h" class Point : public Object { private: //std::string label; float x; float y; public: Point() : x(0), y(0){}; Point(std::string in_label, float in_x, float in_y); Poin...
#ifndef GL2PIXELSHADER_H #define GL2PIXELSHADER_H #include "ipixelshader.h" #include "gl2.h" class IDataStream; class GL2PixelShader : public IPixelShader { public: GL2PixelShader(); virtual ~GL2PixelShader(); virtual void* GetHandle() { return &m_PixelShader; } virtual bool GetRegister( const HashedString& Par...
// Copyright Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ========================================================================...
#include <iostream> #include <vector> using namespace std; int main (){ vector <int> myvector; myvector.push_back(4); myvector.push_back(30); myvector.push_back(40); myvector.push_back(50); myvector.push_back(60); myvector.push_back(6); myvector.push_back(7); myvector.push_back(24); my...
#include "dtccmtest.h" #include <QtWidgets/QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); QString strText; for (int i=0;i<argc;i++) { strText = QString::fromLatin1(argv[i]); if (strText.contains("PlatformType")) { } } dtCCMTest w; w.show(); return a.exec(); }
#include <algorithm> #include <cstdlib> #include <iostream> #include <fstream> #include <string> #include <tudocomp_stat/StatPhase.hpp> #include <tudocomp/util/STXXLStatExtension.hpp> #include <tudocomp/compressors/lcpcomp/compress/PLCPStrategy.hpp> #include <tudocomp/compressors/lcpcomp/decompress/PLCPDecompGenerator....
/////////////////////////////////////////////////////////////////////// // Text.cpp /////////////////////////////////////////////////////////////////////// #include "Text.hpp" /////////////////////////////////////////////////////////////////////// mr::Text::Text(std::string thePath) : mFont(new sf::Font), mText(new...
#include <SPI.h> #include "Adafruit_MAX31855.h" #define THERMOCOUPLE_DO (3) #define THERMOCOUPLE_CS (4) #define THERMOCOUPLE_CLK (5) #define HEATING_ELEMENT_RELAY_PIN (8) Adafruit_MAX31855 thermoCouple(THERMOCOUPLE_CLK, THERMOCOUPLE_CS, THERMOC...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
bool check(int src,int tgt,unordered_map<int,vector<int>> &al,unordered_map<int,bool> &vis) { vis[src]=true; bool ans=false; for(auto it:al[src]) { if(it==tgt) return ans=true; if(!vis[it]) ans=check(it,tgt,al,vis); if(ans) return ans; } ...
#include "log.h" #include "dominio.h" #include "servicio.h" #include "interfaz.h" #include "util.h" #include "configuracion.h" #include "servicioRedireccionamiento.h" #include "servicioDominio.h" #include "servicioRedireccionamientoExt.h" #include "servicioRedireccionamientoSub.h" #include "servicioMultidominio.h" #inc...
/** * @file DoublyLinkedList.cpp Implementation of a DoublyLinkedList for music. * * @brief * Implementation of DoublyLinkedList for music, where a Node is * used to store the list pointers. * * @author Erik Mellum * @date 9/2/2013 */ #include "DoublyLinkedList.h" using namespace std; /** * Default Con...
#include "matrice.h" #include <iostream> #include <math.h> using namespace std; matrice::matrice() { nbl = nbc = 1; T = new double * [nbl]; T[0] = new double[nbc]; } matrice::matrice(int nbl, int nbc) { this->nbl = nbl; this->nbc = nbc; T = new double * [nbl]; for (int i...
/** * Copyright (C) 2017 Alibaba Group Holding Limited. 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 * * ...
/*************************************** Author : jt Mail : zhuiyitaosheng@gmail.com ***************************************/ #include <iostream> //#include <string> #include <vector> //#include <initializer_list> //#include <cstddef> //#include <exception> //#include <stdexcept> //#include <cctype> //#include <new>...
#include <stdio.h> #include <stdlib.h> #define SIZE 10 int main(void) { int s[SIZE]; int j; for (j = 0; j < SIZE; j++) { s[j] = 2 + 2 * j; } printf("%s%13s\n", "Element", "Value"); for (j = 0; j < SIZE; j++) { printf("%7d%13d\n", j, s[j]); } system("pause"); return 0; }
#include<stdio.h> #include<stdlib.h> int getMax(int); int main(){ int n[10]; int ncount=0; int count=0; int i=0; for(;i<10;++i){ scanf("%d",n+i); if(n[i]==0){ ncount=i; break; } } for(i=0;i<ncount;++i){ // printf...
#include<bits/stdc++.h> using namespace std; void merge(vector<int>& arr,int low,int mid,int high,int& count) { int n1 = mid-low+1; int m1 = high-(mid+1)+1; int i=0; int L[n1]; int R[m1]; int j=0; int k=low; for(int i=low;i<=mid;i++) { L[i-low]=arr[i]; } for(int i=mid+1;i<=high;i++) { R[i-(mid+1)] = ar...
#include <iostream> using namespace std; unsigned mytimes() { static int va=-1; va++; return va; } int main() { cout<<"请输入一个字符:"<<endl; char ss; while (cin>>ss) cout<<"执行mytimes的次数为:"<<mytimes()<<endl; return 0; }