text
stringlengths
8
6.88M
// ************************************** // File: KTimer.h // Copyright: Copyright(C) 2013-2017 Wuhan KOTEI Informatics Co., Ltd. All rights reserved. // Website: http://www.nuiengine.com // Description: This code is part of NUI Engine (NUI Graphics Lib) // Comments: // Rev: 2 // Created:...
#define STB_IMAGE_RESIZE_IMPLEMENTATION #include "stb/stb_image_resize.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb/stb_image_write.h" #include <filesystem> #include <iostream> #include <vector> #include "Generator.hpp" int main( int argc, char** argv ){ if( argc < 2 ){ std::cout << "Usage: " << argv[0]...
//#include "../../lexertl/debug.hpp" #include "../../lexertl/generator.hpp" #include "../../lexertl/lookup.hpp" #include "../../lexertl/memory_file.hpp" int main(int argc, char *argv[]) { enum {eoi, word, ws, newline}; lexertl::rules rules_; lexertl::state_machine sm_; rules_.insert_macro("ws", "[ \t]...
#include <QDebug> #include "Connector.h" #include "NameLabel.h" #include "TcpBus.h" #include "Vna.h" using namespace RsaToolbox; #include <QString> #include <QtTest> #include <QSignalSpy> #include <QScopedPointer> class test_Vna : public QObject { Q_OBJECT public: test_Vna(); private: Vna vna; QS...
#include "Bike.h" #include <iostream> using namespace std; Bike::Bike() : Vehicle(2, 2) { cout << "ctor bike " << wheels << " " << capacity << endl; } Bike::Bike(const Bike& bike) : Vehicle::Vehicle(bike) { this->wheels = bike.wheels; this->capacity = bike.capacity; cout << "cctor bike " << wheels <...
#ifndef CoinConf_H #define CoinConf_H #include "hiredis.h" #include "CDL_TCP_Handler.h" #include "CDL_Timer_Handler.h" #include "Packet.h" #include "Player.h" class Player; class CoinConf; class RedisRTimer:public CCTimer { public: RedisRTimer(){} ; virtual ~RedisRTimer() {}; inline void init(CoinConf* redissr...
#include<bits/stdc++.h> using namespace std; struct frac{ int num; int dem; double dValue = double(num)/double(dem); }; int gcd(int x, int y){ while(x*y != 0){ if(x > y) x %= y; else y %= x; } return x + y; } frac simplify(frac f){ int cd = gcd(f.num, f.dem); return frac{f.num/cd,...
#include<bits/stdc++.h> using namespace std; int main(){ int n,k; double l,v1,v2; cin>>n>>l>>v1>>v2>>k; int p=(n-1)/k+1; double t=l/((double)p*v2-(v2-v1)/(v2+v1)*v2*((double)p-1)); cout<<setiosflags(ios::fixed)<<setprecision(10)<<(l-v2*t)/v1+t; return 0; }
#ifndef MAINWIDGET_H #define MAINWIDGET_H #include <QWidget> #include <QPalette> #include <QPushButton> #include <QLabel> namespace Ui { class MainWidget; } class MainWidget : public QWidget { Q_OBJECT public: explicit MainWidget(QWidget *parent = 0); ~MainWidget(); //声明槽函数 public slots: void ...
#include <plot_lib/utils.h> namespace as64_ { namespace pl_ { void Semaphore::notify() { std::lock_guard<decltype(mutex_)> lock(mutex_); // ++count_; count_ = true; condition_.notify_one(); } void Semaphore::wait() { std::unique_lock<decltype(mutex_)> lock(mutex_); // Handle spurious wake-ups. while...
#include <iostream> #include <algorithm> #include <fstream> #include <complex> #include <vector> #include <math.h> using namespace std; typedef complex<double> cld; typedef long long ll; const int M = 16; const int N = 1 << M; const int MOD = 786433; const double PI = acos(-1.); cld roots[N], a[N], b[N], f[M + 3][N]...
////////////////////////////////////////////////////////////////////// ///Copyright (C) 2011-2012 Benjamin Quach // //This file is part of the "Lost Horizons" video game demo // //"Lost Horizons" is free software: you can redistribute it and/or modify //it under the terms of the GNU General Public License as published ...
#ifndef CTICKTIMER_H #define CTICKTIMER_H #include <Windows.h> #include <QtGlobal> #include <QDebug> class CTickTimer { public: CTickTimer() { QueryPerformanceFrequency(&_perfFreq); } void Start() { QueryPerformanceCounter(&_perfStart); } bool Timeout(qint64 ms) { LARGE_INTEGER perfNow; ...
#ifndef CALGROUPSMODEL_H #define CALGROUPSMODEL_H #include "VnaModel.h" #include <QAbstractListModel> namespace RsaToolbox { class CalGroupsModel; typedef QSharedPointer<CalGroupsModel> SharedCalGroupsModel; class CalGroupsModel : public QAbstractListModel { Q_OBJECT public: explicit CalGroupsModel(QObjec...
/********************************************************************************************************************** * @file rambler/Connection/TCPStream_Winsock2.hpp * @date 2014-07-18 * @brief <# Brief Description #> * @details <# Detailed Description #> ****************************************************...
//#include "stdafx.h" #include <iostream> #include "cuda_runtime.h" #include "device_launch_parameters.h" #include"mat.h" #include <stdio.h> #include<stdlib.h> #include<cmath> #include "mclmcr.h" #include"matrix.h" //#include <opencv2/core/core.hpp> //#include<opencv2/highgui/highgui.hpp> //#include<complex.h> #inclu...
#ifndef ENTERPRISE_MANAGEMENT_SYSTEM_OPERATORSTAFF_H #define ENTERPRISE_MANAGEMENT_SYSTEM_OPERATORSTAFF_H #endif //ENTERPRISE_MANAGEMENT_SYSTEM_OPERATORSTAFF_H #pragma once #include "BaseStaff.h" class OperatorStaff : public BaseStaff { public: int resolveFailureRate; //故障解决率 int workEfficiency; //工作效率 i...
#include "predict_true.h" #include "pi_to_pi.h" #include <math.h> /***************************************************************************** * OPTIMIZATION STATUS * Done: Base implementation, unit test * ToDo: Start optimizing ****************************************************************************/ void...
// Copyright 2011 Yandex #ifndef LTR_SCORERS_DECISION_TREE_SCORER_H_ #define LTR_SCORERS_DECISION_TREE_SCORER_H_ #include <string> #include "ltr/scorers/scorer.h" #include "ltr/learners/decision_tree/decision_tree.h" using std::string; namespace ltr { namespace decision_tree { class DecisionTreeScorer : public Sco...
#ifndef DECK57_HPP #define DECK57_HPP #include "Deck56.hpp" class Deck57: public Deck56{ public : Deck57(); }; #endif
#ifndef CLASSIFIER_H #define CLASSIFIER_H #include <iostream> #include <sstream> #include <fstream> #include <math.h> #include <vector> #include <map> #include <algorithm> using namespace std; class GNB { public: //vector<string> possible_labels = {"left","keep","right"}; vector<string> possible_labels; map<stri...
/* -*- 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 DESKTOP_WINDOW_MODEL_ITEM_H #define DESKTOP_WINDOW_MODEL_...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2009-2010 * * WebGL GLSL compiler -- validating the shaders. * */ #include "core/pch.h" #ifdef CANVAS3D_SUPPORT #include "modules/webgl/src/wgl_base.h" #include "modules/webgl/src/wgl_ast.h" #include...
// Project 17 - LCD message board #include <LiquidCrystal.h> //LiquidCrystal(rs, rw, enable, d4, d5, d6, d7) LiquidCrystal lcd(2, 3, 4, 9, 10, 11, 12); void setup() { Serial.begin(9600); lcd.begin(2, 20); lcd.clear(); lcd.setCursor(0,0); lcd.print("Evil Genius"); lcd.setCursor(0,1); lcd.print("Rules...
// Created by: Peter KURNEV // 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 Lesser General Public License version 2.1 as published // by the Free S...
#include <ionir/passes/pass.h> namespace ionir { BooleanType::BooleanType() : Type(ConstName::typeBool, TypeKind::Boolean) { // } void BooleanType::accept(Pass &pass) { pass.visitBooleanType(this->dynamicCast<BooleanType>()); } }
/* XMRig * Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> * C...
#include<iostream> #include<cstdlib> #include<ctime> using namespace std; struct node { int data; node *left, *right; }*root; typedef node* nodeptr; void insert(int, nodeptr&); void inOrder(nodeptr); void deleteNode(nodeptr&, int); int main() { srand(time(NULL)); root = NULL; for(int i=0; i<10; i++) ...
#include<bits/stdc++.h> #define rep(i,n) for (int i =0; i <(n); i++) using namespace std; using ll = long long; using Graph = vector<vector<int>>; const double PI = 3.14159265358979323846; const ll MOD = 1000000007; const int INF = 1e9; const int dx[4] = {1,0,-1,0}; const int dy[4] = {0,1,0,-1}; int main(...
#pragma once #include <vector> #include <memory> #include <algorithm> #include "Utils/ArrayView.hpp" #include "Nodes/OperationNode.hpp" #include "Nodes/ConstNode.hpp" #include "Nodes/VariableNode.hpp" #include "ConstStorage.hpp" #include "VariableStorage.hpp" #include "NodeBuilders/NodeBuilder.hpp" //BNN_TYPE using O...
#include "Result.h" #include <algorithm> #include <assert.h> #include "Common.h" #include <math.h> //#include <mutex> //std::mutex g_result_mutex; CResult::CResult(): m_nNum(10) { m_oOrderList.push_back(std::make_pair(RO_FACTOR, MB_ASC)); m_oOrderList.push_back(std::make_pair(RO_CLOSE, MB_ASC)); m_oOrder...
/* common definition */ #ifndef H_COMMON_H #define H_COMMON_H namespace P_RVD { /* the type for manipulating indeces */ typedef unsigned int t_index; typedef int signed_t_index; /* for glut */ typedef unsigned int uint; /* find the min value */ template <class T> T inline geo_min(T& a, T& b) { retu...
#include "httpworker.h" QHttpWorker::QHttpWorker(QObject *parent) : QObject(parent), _isWorking(false), _isPaused(false), _namanager(nullptr), _found_pos(nullptr), _id(0) { } QHttpWorker::~QHttpWorker() { qDebug()<<_id<<" Destroyed"; } void QHttpWorker::start() { if (!_isWorking){ ...
#include "Utilities.h" #include "Mesh.h" #include "Sphere.h" #include "Plane.h" #include "Cuboid.h" #include "Camera.h" #include "Ray.h" #include "MatrixStack.h" #include "Image.h" #include <vector> #include <iomanip> #include <iostream> #include <time.h> #include <ctime> #include <math.h> int main() { Image img...
#include "stdafx.h" #include "energyDoc.h" using namespace std; energyDoc::energyDoc() { init(); } energyDoc::~energyDoc() { } void energyDoc::updateRealtime() { } void energyDoc::draw(BOOL mode[10]) { if (bitSetSpace) { glColor3f(1, 0, 0); bitSetSpace->drawBoundingBox(); } if (mode[1] && surObj) { gl...
#ifndef ATTACH_H #include "Attach.h" #endif // ! ATTACH_H void testing::example_1() { // implementation of the code needed to test operation of slot solver // example taken from paper "Guiding and confining light in void nanostructure", Opt. Lett., 29 (11), 2004 double ns, nh, wh, ws, wl; wl = 1550; // wavelen...
#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...
#include "SqlGrammer.h" map<int, string> GrammerParameter::typeMap; void GrammerNode::addInfo(string st) { infos.push_back(st); } void GrammerNode::showInfo() { cout << "type:" << GrammerParameter::getType(type) << endl; for (string s : infos) { cout << s << endl; } cout << endl; } PhyPlanN...
#include "CKobuki.h" #include "Helpers.h" #include <vector> #include <iostream> #pragma warning( push ) #pragma warning( disable : 4838) int CKobuki::checkChecksum(unsigned char* data) { unsigned char chckSum = 0; if (data == NULL) { return -1; } for (int i = 0; i < data[0] + 2; i++) { ...
#include "shape.h" shape::shape() { //ctor } shape::~shape() { //dtor }
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #include <map> #include <stack> #include <queue> #define MAX_S 60000000000 #define INF (1<<30) using namespace std; class PerfectSequen...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; string st; bool check(int l,int r) { //cout << l << " " << r << endl; whi...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <set> #include <ctime> #include <cmath> #include <string> #include <cctype> #include <cstring> #include <algorithm> #i...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Yngve Pettersen ** */ #ifndef __SSLCIPHER_H #define __SSLCIP...
#pragma once #include "Keng/Core/ISystem.h" #include "Keng/FileSystem/FwdDecl.h" #include "Keng/ResourceSystem/FwdDecl.h" #include "Keng/ResourceSystem/IResource.h" namespace keng::resource { class IResourceSystem : public core::ISystem { public: static const char* SystemName() { return "KengResou...
// Created on: 1995-10-19 // Created by: Andre LIEUTIER // 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 GNU...
#include<iostream> #include <typeinfo> #define OK 1 #define ERROR 0 #define OVERFLOW -2 using namespace std; typedef int QElemType; typedef struct QNode { QElemType data; struct QNode *next; } QNode ,*QueuePtr; typedef struct { QueuePtr front; QueuePtr rear; } LinkQueue; int InitQueue(LinkQueue &Q) { try { Q.fr...
#include "CompilationEngine.h" #include "JackTokenizer.h" #include "SymbolTable.h" #include <algorithm> #include <fstream> #include <string> #include <vector> #include <assert.h> CompilationEngine::CompilationEngine(std::string inputFile, JackTokenizer* jt, SymbolTable* st){ int dotPosition = inputFile.find('.'); ...
#ifndef OPTIONS_HH #define OPTIONS_HH #include <vector> #include <string> #include <list> #include <map> #include <sstream> #include <getopt.h> typedef int ARGSPEC; //possible values are: required_argument, optional_argument, no_argument class OptionSpec; //apparently I need this struct Flag { char shortopt; st...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #include "core/pch.h" #include "modules/dom/src/domglobaldata.h"...
// // main.cpp // Project1 // // Created by christopher kha on 1/11/19. // Copyright © 2019 christopher kha. All rights reserved. // //#include "Game.h" // //int main() //{ // // Create a game // // Use this instead to create a mini-game: Game g(3, 4, 2); // Game g(7, 8, 25); //// Game g(1, 2, 2); //...
#include "camera.h" static_func void CameraUpdate(camera &cam, vec3 dPos, vec2 dLook) { // Position cam.pos += cam.speed * dPos; // Look Dir cam.yaw += dLook.X * cam.sens; if (cam.yaw > 360.0f) cam.yaw -= 360.0f; else if (cam.yaw < 0.0f) cam.yaw = 360.0f - cam.yaw; cam.pitch += dLook.Y * cam.sens; cam...
#include "comn.h" #include "http-deal.h" int main() { using namespace std; CInternetSession session(_T("Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2) Gecko/20100115 Firefox/3.6"), 1, PRE_CONFIG_INTERNET_ACCESS, NULL, NULL, INTERNET_FLAG_DONT_CACHE ...
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Counts Zeros Xor Pairs int t, n, x; cin >> t; while (t--) { cin >> n; map<int, int> freq; for(int i=0; i<n; i++) { cin >> x; freq[x]++; } ...
// Created on: 2015-07-16 // Created by: Irina KRYLOVA // Copyright (c) 2015 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 publ...
/* particle_object.cpp Component from a basic example of a particle animation Adaped from the particle animation tutorial from: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/particles-instancing/ Iain Martin November 2014 */ #pragma once #include "wrapper_glfw.h" #inclu...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN) // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify i...
#include "../stdafx.h" CNetMgr::~CNetMgr() { for (auto &it : mSessionVec) { if (it) delete it; } } void CNetMgr::OnConnection(ISession* pSession) { CSession* session = new CSession(pSession); if (session) mSessionVec.push_back(session); } void CNetMgr::update() { for (auto &it : mSessionV...
#include "sched.h" #include "schedproc.h" #include <assert.h> #include <minix/com.h> #include <timers.h> #include <machine/archtypes.h> #include <sys/resource.h> /* for PRIO_MAX & PRIO_MIN */ #include "kernel/proc.h" /* for queue constants */ #define SCHEDULE_CHANGE_PRIO 0x1 #define SCHEDULE_CHANGE_QUANTUM 0x2 #defin...
#include <bits/stdc++.h> using namespace std; long long int f,dias,valor,i; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> f; i = 0; valor = f; while(true){ if((valor-1)%11 == 0){ cout << i << " " << valor; return 0; } valor += valor; ...
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define FOR(a, b, c) for (int a = b; a <= c; ++a) #define FORW(a, b, c) for(int a = b; a >= c; --a) #define pb push_back #define SZ(a) ((int)a.size()) #define int long long const int N = 2e2; const int oo = 1e9; const int ...
#ifndef HROCKER_H #define HROCKER_H #include <iostream> #include "cocos2d.h" using namespace cocos2d; //枚举型:用于标识摇杆与摇杆的背景 typedef enum{ tag_rocker, tag_rockerBG, }tagForHRocker; class HRocker : public Layer { public: //创建摇杆,摇杆图片,摇杆背景图片,起始坐标 static HRocker* createHRocker(const char* rockerImag...
/*============================================================================== Project: Bulk Synchronous Farm (BSF) Theme: BSF Skeleton Module: BSF-Code.cpp (Problem Independent Code) Prefix: BI Author: Nadezhda A. Ezhova Supervisor: Leonid B. Sokolinsky This source code is a part of BSF Skeleton ============...
#include <cstdio> #include <cstdlib> #include <ctime> #include <vector> #include <GL/glew.h> #include <glfw3.h> #include <common/controls.hpp> #include <common/shader.hpp> #include <customs/shapes.hpp> #include <customs/things.hpp> using namespace glm; GLFWwindow* window; GLfloat random (GLfloat min, GLfloat max) { ...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; const int maxn = 150000 + 100; struct per { char nam[210];int v,ord; bool...
#include <iostream> #include "src/dining_philosophers.h" int main(int argc, char** argv) { std::cout << "\e[1;32mAdding philosophers...\e[0m\n"; add_phil("Plato", 1, 3); add_phil("Kant", 2, 2); add_phil("Nietzsche", 3, 1); std::cout << "\e[1;32mPhilosophers added. Starting dinner...\e[0m\n"; ...
// algorithm.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "../libalgorithm/algorithm.h" /* //最大子组问题 int find_max_cross_subarray(int a[], int *low, int *high) { int mid, i; int sum, lsum, rsum, lidx, ridx; mid = (*low + *high) / 2; sum = 0; lsum = 0x80000000; for (i = mid; i >= *low; i--) { sum += a[...
/*! \file */ //Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #ifndef ISP_HPP_ #define ISP_HPP_ /*! \brief In-circuit Serial Programming * */ namespace isp {} #include "isp/LpcIsp.hpp" using namespace isp; #endif /* ISP_HPP_ */
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #include <map> #include <stack> #include <queue> #include <stdio.h> #include <string.h> using namespace std; vector<int> prime; vector<i...
/* ** MenuController.cpp for cpp_indie_studio in /home/jabbar_y/rendu/cpp_indie_studio/MenuController.cpp ** ** Made by Yassir Jabbari ** Login <yassir.jabbari@epitech.eu> ** ** Started on Sat May 06 13:52:58 2017 Yassir Jabbari // Last update Wed Jun 14 10:48:19 2017 Stanislas Deneubourg */ #include "Model/MenuMod...
#include <cstdio> #include <iostream> #include <vector> #include <string> #include <stack> #include <unordered_map> #include <unordered_set> #include <queue> #include <algorithm> #define INT_MAX 0x7fffffff #define INT_MIN 0x80000000 using namespace std; int trap(int A[],int n){ //Left high int left[n],right[n]; i...
#pragma once #include "Singleton.h" class HGE; class CSceneManager; class CGameEngine : public CSingleton<CGameEngine> { public: CGameEngine(); ~CGameEngine(); void RunEngine(); private: //Íâ°üº¯Êý static bool FrameFunc(); static bool ReaderFunc(); bool Init(); void Release(); ...
// Fill out your copyright notice in the Description page of Project Settings. #include "FightWithBlock.h" #include "HerosBase.h" #include "BlockBase.h" // Sets default values AHerosBase::AHerosBase() { // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need...
/* -*- 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. */ #include <core/pch.h> #ifdef EXTENSION_SUPPORT #include "modules/...
#include "PlikTekstowy.h" bool PlikTekstowy::czyPlikJestPusty() { bool pusty = true; fstream plikTekstowy; plikTekstowy.open(pobierzNazwePliku().c_str(), ios::app); if (plikTekstowy.good() == true) { plikTekstowy.seekg(0, ios::end); if (plikTekstowy.tell...
// 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....
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 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_UTIL_OPDATA_UTF8_H #define MODULES_UTIL_OPDATA_UTF8_H...
#include "myUtils.h" #include<iostream> #ifdef _WIN32 #include <direct.h> #include <conio.h> #define GetCurrentDir _getcwd #else #include<dirent.h> #include <unistd.h> #define GetCurrentDir getcwd #include "patch_namespace.h" #endif #include "Mat_to_binary.h" #include "dirent.h" extern string Sys_la...
#pragma once #define _USE_MATH_DEFINES #include <cmath> #define M_PI 3.14159265358979323846 namespace LAB33 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace Syste...
/* Demo_03_Main.cpp */ #include <boost/mpi.hpp> #include "repast_hpc/RepastProcess.h" #include "Model.h" int main(int argc, char** argv){ std::string configFile = argv[1]; // The name of the configuration file is Arg 1 std::string propsFile = argv[2]; // The name of the properties file is Arg 2 //std::cout<<"...
#include "util.h" #include <set> #include <string> #include <iostream> int main(int argc, char *argv[]) { std::cout << "Hello!" << std::endl; std::string test = "data"; std::cout << test << std::endl; std::cout << test.length() << std::endl; std::set<std::string> subWords = parseStringToWords(test); std::c...
#include "afxwin.h" #include<map> #include<vector> #include<string> #define BUFFER_LENGTH 1024 #define DB_LENGTH 50 #define MSG_LOGIN 0//登陆 #define MSG_LOGIN_RP 1//登陆回复 #define MSG_SEARCH 2//查找会话目标ID是否存在 #define MSG_SEARCH_RP 3 #define MSG_SEARCH_ERROR 4//无 #define MSG_ABROAD 5//无 #define MSG_ABROAD_RP //无 #define M...
#pragma once #include "Keng/Core/System.h" #include "Keng/Graphics/IGraphicsSystem.h" #include "Keng/WindowSystem/IWindowSystem.h" #include "Keng/ResourceSystem/IResourceSystem.h" namespace simple_quad_sample { class SimpleQuadSystem : public keng::core::System< keng::core::ISystem, SimpleQuadSystem, ...
#include "TestsService.h" #include <QJsonArray> #include <QJsonValue> #include "Entities/ShortTestInfo/ShortTestInfo.h" #include "Entities/Test/Test.h" #include "Requester/Requester.h" #include "JsonArraySerialization.h" // :: Constants :: const QString GET_TESTS_API = "tests"; const QString GET_TEST_API = "tests/...
int i=0; void setup() { Serial.begin(57600); } void loop(){ Serial.println("Teste Formula SAE UFPB"); Serial.println(i); i++; delay(50); }
// Open-closed Principle // entities should be open for extension, but closed for modification #include <iostream> #include <string> #include <vector> enum class Color { Red, Green, Blue }; enum class Size { Small, Medium, Large }; struct Product { std::string name; Color color; Size size; }; ...
#include<stdio.h> #include <malloc.h> #include<conio.h> struct node { int num; struct node *next; }; void display(struct node *p) { struct node *q; q = p; while (q != NULL) { printf("%d \n", q->num); q = q->next; //count++; } } void append(struct node **q, int num) { struct node *temp, *r; if (*q == NU...
#pragma once #include "MySqlDBAccess.h" class MySqlDBAccessMgr { public: MySqlDBAccessMgr(); ~MySqlDBAccessMgr(); void Init(); MySqlDBAccess* DBMaster(); MySqlDBAccess* DBSlave(); MySqlDBAccess* DBRouting(); private: //std::map <std::string, MySqlDBAccess*> m_db_access_map; MySqlDBAccess *m_db_master_conn;...
#include "CQEnum_Pch.hpp" #include "CQEnum.hpp" namespace CQSL { namespace CQEnum { // // Gets the next token and makes sure it's the indicated value. Can either throw or // return false if not found. If it indicates there must be an equal sign, then we // always throw if we find the token but not the equals. // b...
// Gaddis 1009-1010 #include <iostream> #include <cstdlib> #include <memory> using namespace std; // Exception for index out of range struct IndexOutOfRangeException { const int index; IndexOutOfRangeException(int ix) : index(ix) {} }; template <class T> class SimpleVector { unique_ptr<T[]> aptr; int ...
//=========================================================================== //! @file model_obj.cpp //=========================================================================== // 解決シダいけす void ObjModel::tmpInitialize(Vertex* vertices, u32* indices, u32 verticesCount, u32 indicesCount) { //----------------------...
#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> #include <sstream> #define rep(i, n) for(int i ...
/* ======================================================================== DEVise Data Visualization Software (c) Copyright 1992-1996 By the DEVise Development Group Madison, Wisconsin All Rights Reserved. ======================================================================== Under no circumstances ...
#ifndef __QUEUE_H__ #define __QUEUE_H__ /* =============================================================================== Queue template =============================================================================== */ template< class type, int nextOffset > class idQueueTemplate { public: idQueueTemplate...
#include <iostream> using namespace std; #define row 10 #define col 10 #define agent 3 int shiljuuleh(int x, int y, int a[row][col]){ //4 tal niilber oloh int x1,maxs=0,max2=0; int y1=y,shilj1=-10; if(x>0){ x1=x-1; } //cout<<"x1ni "<<x1<<endl; for(int i=0; i<2; i++){ if(y1>0 ...
#ifndef BIDIRECTIONAL_IMPL_H #define BIDIRECTIONAL_IMPL_H #include "bidirectionallist.h" template<> inline void BidirectionalList::push_back(const int & val) { ListItem * item = new IntegerListItem(val); push_back_impl(item); } template<> inline void BidirectionalList::push_back(const float & val) { List...
#pragma once #include <stdint.h> #include <memory> #include "MPGUID.h" class MatchUser { public: MatchUser(double fRating = 1500.0f); virtual ~MatchUser(); public: double RoundRating(double places); double GetRating()const; void SetRating(double fRate); private: MPGUID m_uid; double m_fRating; ...
#include<iostream> #include<string> #include<stdio.h> #include<stdlib.h> using namespace std; //ham kiem tra string bool kiemtra(string chuoi) { int length=chuoi.length(); for(int i=0;i<length;i++) { if(chuoi[i]>'9'||chuoi[i]=='.') { return false; break; } ...
#include "Spaceship.h" #include "Definitions.h" #include "audio/include/SimpleAudioEngine.h" using namespace CocosDenshion; USING_NS_CC; // Initialize instance (sprite) bool Spaceship::init() { // Super init first if (!Sprite::initWithFile("Spaceship.png")) return false; this->setPosition(ORIGIN.x + V_SIZE.wid...
/**************************************************************************************************************** ** Created: June 21st 2020 * ** Author: Sysadmin * ** How much will I earn in a year depending on what happens. ...