text
stringlengths
8
6.88M
#include "forgetpass.h" #include "ui_forgetpass.h" forgetpass::forgetpass(QWidget *parent) : QWidget(parent), ui(new Ui::forgetpass) { ui->setupUi(this); } forgetpass::~forgetpass() { delete ui; } void forgetpass::closeEvent(QCloseEvent * event) { ui->userid->clear(); ui->pas...
// // main.cpp // HashTable // // Created by Georgiy danielyan on 5/10/15. // Copyright (c) 2015 Goga. All rights reserved. // // Hash Table Tutorial by PaulProgramming. // Followed along and replicated the code. // Hash Table and methods work properly. #include "Hash.h" int main(){ Hash Hashy; Ha...
#include<iostream> #include<string> #include<vector> using namespace std; class Solution { public: vector<vector<string>> solveNQueens(int n) { vector<vector<int>> attack(n, vector<int>(n, 0)); //皇后攻击范围 vector<vector<string>> reses; //最后结果集合 vector<string> res; //单个结果 for(int i=0; i<n; i++) { res....
#include "wali/domains/binrel/ProgramBddContext.hpp" #include <cstdlib> #include <ctime> #include <string> #include <sstream> #include <map> using namespace std; using namespace wali; using namespace wali::domains::binrel; int main(int argc, char ** argv) { bool dbg = false; long totalCombine = 5e2; long exten...
#ifndef _MSG_0X36_BLOCKACTION_STC_H_ #define _MSG_0X36_BLOCKACTION_STC_H_ #include "mcprotocol_base.h" namespace MC { namespace Protocol { namespace Msg { class BlockAction : public BaseMessage { public: BlockAction(); BlockAction(int32_t _x, int16_t _y, int32_t _z, int8_t _byte1, int8_t _byte2, int16_t _blockId);...
#include "Mesh.h" Quad::Quad() { V00.x = 0.0; V00.y = 0.0; V01.x = 0.0; V01.y = 0.0; V10.x = 0.0; V10.y = 0.0; V11.x = 0.0; V11.y = 0.0; } Quad::Quad(const Quad &inQuad) { V00.x = inQuad.V00.x; V00.y = inQuad.V00.y; V01.x = inQuad.V01.x; V01.y = inQuad.V01.y; V10.x = inQuad.V10.x; V10.y = inQuad.V10.y; V11.x ...
// // Created by manout on 17-7-1. // #include "all_include.h" #include <opencv2/core.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/opencv.hpp> #include <iostream> #define use_filter2D #define w 400 using std::cin; using std::cout; using std::endl; //显示一个图像 int show_img(con...
#include "stdafx.h" #include "FreqToken.h" FreqToken::FreqToken() : QsoTokenType("freq") { m_minSize = 5; // minimum number of characters when writing out as a string } FreqToken::~FreqToken() { } bool FreqToken::Parse(const string& token) { m_token = token; return true; }
// Created on: 1998-01-29 // Created by: Laurent BOURESCHE // 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 ...
//glrenderer.cpp //Fleshes out low-level rendering functions defined in renderer.hpp //Created by Lewis Hosie //16-11-11 //Dependencies: GL (obviously), GLEW #include "glrenderer.hpp" #include "fileio.hpp" #ifdef E_INCLUDE_GLRENDERER #include <sstream> glrenderer::glrenderer(const realwindow& thewin) : thewin(thewin...
#include <iostream> using namespace std; /* compiles == true */ /* this thing prints array ints in reverse order #interviewsuccess */ int figure_out_if_i_am_good_enough_to_program() { int yes_or_no; cin >> yes_or_no; return yes_or_no; } void fight_imposters_syndrome_and_just_keep_going(int the_pressure_i...
#pragma once #include "../Indicator/Indicator.h" #include "Serializable/Object/SerializableObject.h" #include "Tree.h" class NamedValue; class IndicatorGroup : public SerializableObject { public: // :: Lifecycle :: virtual ~IndicatorGroup() noexcept = default; // :: Serializable :: virtual QJsonO...
// // Created by manout on 18-2-25. // #include <tar.h> #include <algorithm> #include <iostream> __always_inline int equation(int x, int y, int z) { return x * x + y * y + z * z; } __always_inline int min(int x, int y, int z) { return std::min(std::min(x, y), std::min(y, z)); } int solve_equation() { f...
#ifndef int_view_h #define int_view_h #include <chuffed/core/sat-types.h> #include <chuffed/core/sat.h> #include <chuffed/vars/int-var.h> #include <cassert> // y = (-1)a*x + b // affine: type = 1*minus + 2*scale + 4*offset template <int type = 0> class IntView { public: IntVar* var; int a; int b; IntView(IntV...
/* Copyright 2021 University of Manchester 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 agreed to in writing, s...
/************************************************************************/ /* File name : BkGnuPGDef.h */ /************************************************************************/ /* Contents : Becky! GNU Privacy Guard プラグイン 共通定義 */ /* ...
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string s; cin>>s; int n=s.length(); stack<int> s1; for(int i=0;i<=n;i++) { s1.push(i+1); if(i==n || s[i]=='I') { while(!s1.empty()) { cout<<s1.top(); s1.pop(); } } } cout<<endl; } return 0; } ...
#ifndef HEADER_CURL_CONNCACHE_H #define HEADER_CURL_CONNCACHE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
#ifndef SOCKS6MSG_EXCEPTION_HH #define SOCKS6MSG_EXCEPTION_HH #include <stdint.h> #include <stdexcept> namespace S6M { class BadVersionException: public std::runtime_error { uint8_t version; public: BadVersionException(uint8_t version) : runtime_error("Unsupported protocol version"), version(version) {} uin...
/* -*- 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 LINK_MANAGER_DIALOG_H #define LINK_MANAGER_DIALOG_H #...
#include "dirgraph.h" using namespace std; class DirectedDFS { private: vector<bool> marked; private: void dfs(Digraph &G,int v) { marked[v] = true; list<int> *l = G.adj_vertex(v); for(int w : *l) { if(! marked[w]) dfs(G,w); } } pub...
#include <string> #include <iostream> using namespace std; bool IsPalindrome(const string& s) { string s_rev(s.rbegin(),s.rend()); return s == s_rev; } int main() { do { cout << "Enter a string: <q to quit> "; string s; getline(cin, s); if(s=="q"||s=="Q") break; cout << (IsPalindrome(s) ? "It's a pa...
/** Underscore @file /.../Source/Kabuki_SDK-Impl/_Id/Entity.h @author Cale McCollough @copyright Copyright 2016 Cale McCollough © @license Read accompanying /.../README.md or online at http://www.boost.org/LICENSE_1_0.txt @brief This file contains the _2D.Vector_f interface. */ #...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include <cstdio> #include "sgfx/Gfx.hpp" using namespace sgfx; void GfxMap::set_dim(const Dim & dim){ data()->size.h = dim.h(); data()->size.w = dim.w(); } void GfxMap::set_shift(const Point & p){ data()->shift.x = p.x(); data()->shift.y = p.y(); } vo...
// Problem - NHAY on SPOJ #include <bits/stdc++.h> using namespace std; #define ll long long ll n,m,lps[5000001]; string a,b; void computelps() { ll i,len; lps[0]=0; i=1; len=0; while(i<n) { if(a[i]==a[len]) { len++; lps[i]=len; i++; ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2005 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef SVGGRADIENT_H #define SVGGRADIENT_H #ifdef SVG_SUPPORT #ifdef ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2006 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef SCOPE_CONSOLE_LOGGER_H #define SCOPE_CONSOLE_LOGGER_H #ifdef ...
#include <bits/stdc++.h> using namespace std; unsigned long long int N,ini,fin,uno=1,dos,i; unsigned long long int fibo[100]; int posi = -1; int main() { fibo[1] = fibo[2] = 1; for(i=3; i<=93; i++){ fibo[i] = fibo[i-1] + fibo[i-2]; } cin >> N; for(i=1; i<=93; i++){ if(N == fibo[i])...
#include<iostream> #include<algorithm> #include<vector> #include<unordered_map> using namespace std; class Solution { public: int subarraySum(vector<int>& nums, int k) { //基本思想:暴力超时,双重循环遍历所有可能的连续子序列,这道题不能用滑动窗口,因为元素存在负数 int res=0,sum=0; for(int i=0;i<nums.size();i++) { su...
#pragma once #include <vector> #include <ionir/construct/construct.h> namespace ionir { template<class T = Construct> class ConstructBuilder { private: std::vector<Construct> parts; public: ConstructBuilder() : parts({}) { // } [[nodiscard]] st...
/************************************************************* This sketch is cutomized for M5Stack + USB Host Shield + FTDI. USB_Host_Shield_2.0: https://github.com/felis/USB_Host_Shield_2.0 *************************************************************/ #include <M5Stack.h> #include "M5StackUpdater.h" #include...
#include <iostream> #include <collections/shaders.hpp> shaderShadowMap::shaderShadowMap(void) { const std::string vs_source = #include <collections/shaders/shadowmapvs.glsl> ; const std::string fs_source = #include <collections/shaders/shadowmapfs.glsl> ; this->shaders.resize(2); shaders[0] = ShaderMan::creat...
#include"DetectorConstruction.hh" #include"SensitiveDetector.hh" #include<G4NistManager.hh> #include<G4Box.hh> #include<G4Tubs.hh> #include<G4LogicalVolume.hh> #include<G4PVPlacement.hh> #include<G4SDManager.hh> #include<G4VisAttributes.hh> #include <G4SystemOfUnits.hh> using namespace std; #define Mat(x) (G4NistMan...
#include<iostream> #include<list> #include<conio.h> using namespace std; class graph { int V; list<int> *adj; int DFSUTIL(int v,bool visited[],int count); public: void DFS(int v); graph(int V); void add_edge(int v,int w); ...
#include "Md5Utils.h" #include <stdio.h> #include <stdlib.h> #include "../VFS/GUtMd5.h" #include <assert.h> #include <fstream> void HashToString(const unsigned char hash[16], char str[16*2+1]) { for(int i = 0; i < 16; ++i) sprintf(&str[i*2], "%02x", (int)hash[i]); str[16*2] = '\0'; } void StringToHash(c...
#include "Socio.hpp" Socio::Socio(string nome, string email) { // Sem necessidade de implementação. } Socio::~Socio() { // Sem necessidade de implementação. } void Socio::cadastraCliente(string nome, string email){ ofstream insereSocio; insereSocio.open("doc/cadastroSocios.txt", ios::app); insereSocio << n...
// 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 ...
#include <iostream> #include <boost/asio/ip/tcp.hpp> #include <boost/asio/strand.hpp> #include <boost/make_shared.hpp> #include <boost/bind.hpp> #include "SG_ServerBase.h" #include "SG_Config.h" #include "SG_ClientSession.h" #include "Tools/SG_DataConverter.h" #include "Packets/PacketBaseMessage.h" #include "Tools/SG_...
#ifndef CHAINE_HPP #define CHAINE_HPP #include <cstring> class Chaine { private: char* _donnees; unsigned int _taille; public: Chaine(); Chaine(const char*); Chaine(const Chaine&); ~Chaine(); void debug() const; unsigned int taille()const; char get(unsigned int i); const Chaine& opera...
/*********************************************************************** h£ºHash table (spatial hashing) which can be used in vertex-clustering scenarios, like vertex-welding , mesh simplification based on vertex clustering ************************************************************************/ #pragm...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup" -*- * * Copyright (C) 1995-2006 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_H #define XSLT_H #ifdef XSLT_SUPPORT #inc...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2009-2011 * * WebGL GLSL compiler -- dumping output. * */ #ifndef WGL_PRINTER_STDIO_H #define WGL_PRINTER_STDIO_H #ifdef WGL_STANDALONE #include "modules/webgl/src/wgl_printer.h" class WGL_StdioPri...
#define _USE_MATH_DEFINES #include <cmath> #include <iostream> #ifndef TRIANGLE_H #define TRIANGLE_H #include "Shape.h" class Triangle: public Shape { protected: double height; double base; public: Triangle( int newX = 0, int newY= 0, int newSize = 0, double h = 0, double b = 0) : Shape(newX,newY,newSize) , heigh...
#pragma once #include "../../system.hpp" #include <memory> namespace sbg{ struct CollisionEntity; struct ResultData; struct CollisionTester : Clonable { virtual std::pair<std::unique_ptr<ResultData>, bool> test(std::shared_ptr<const CollisionEntity> self, std::shared_ptr<const CollisionEntity> other) const = 0; ...
/******************************************************************************************* * Student: Vikram Singh StudentID: 11491025 * * Class: CptS 122, Fall 2016; Lab Section 5 * * Programming Assignment: Programming ...
// ************* Bridges, articulations points and blocks ************** const int inf = 0x3f3f3f3f; const int maxn = 1 << 10; const int maxe = maxn * maxn; vector<int> g[maxn]; int low[maxn], was[maxn], num[maxn], comp_num[maxn], cur; int n; vector<int> is_bridge[maxn], back[maxn], comp[maxn]; pair<int, int> stck[maxe...
bool visited[MAXN]; int dfs(int u, int fa){//树的直径 visited[u]=1; int fi=0,se=0; for (int i=head[u];~i;i=edge[i].next){ int v=edge[i].to; if(v==fa) continue; int d=dfs(v,u)+1; if(d>fi) se=fi,fi=d; else if(d>se)se=d; } if(fi+se>ans) ans=fi+se; return f...
// Created on: 2000-08-22 // Created by: Andrey BETENEV // Copyright (c) 2000-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 a...
#ifndef STATUS_TEXT_TEST_H #define STATUS_TEXT_TEST_H class StatusTextTest { public: StatusTextTest() = default; ~StatusTextTest() = default; void Update(const float& someDeltaTime); private: float myTextTimer; }; #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> #include <numeric> typed...
#define _CRT_SECURE_NO_WARNINGS #include "BaseElement.cpp" #include "BitmapFont.cpp" #include "ButtonBase.cpp" #include "ButtonImage.cpp" #include "ButtonText.cpp" #include "Cursor.cpp" #include "EditBox.cpp" #include "Frame.cpp" #include "Image.cpp" #include "LinearLayout.cpp" #include "TypeMesh.cpp" #in...
#include<cstdio> #include<iostream> #include<vector> #include<set> using namespace std; vector<int> v[]; int main() {int a,b,k=0; while (1) {v.clear(); cin >> a >> b; if ((a < 0) && (b < 0)) break; while ((a) && (b)) { } printf("Case %d is not a tree.",++k); } return 0; }
/* * Copyright (c) 2017-2021 Morwenn * SPDX-License-Identifier: MIT */ #include <functional> #include <string> #include <catch2/catch.hpp> #include <cpp-sort/comparators/partial_less.h> #include <cpp-sort/comparators/total_less.h> #include <cpp-sort/comparators/weak_less.h> #include <cpp-sort/utility/branchless_trai...
#ifndef _SBRP_STRUCT_DEF_H #define _SBRP_STRUCT_DEF_H struct SearchSpace { int i; int k; int r; }; class VRPNeighborElement { public: double val; int position; }; int VRPNeighborCompare (const void *a, const void *b); int VRPNeighborCompare2 (const void *a, const void *b); #endif
// Created on: 1997-10-22 // Created by: Philippe MANGIN / Sergey SOKOLOV // Copyright (c) 1997-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 // th...
class Category_575 { class Skin_Bandit1_DZ { type = "trade_items"; buy[] = {2,"ItemGoldBar"}; sell[] = {1,"ItemGoldBar"}; }; class Skin_Bandit2_DZ { type = "trade_items"; buy[] = {2,"ItemGoldBar"}; sell[] = {1,"ItemGoldBar"}; }; class Skin_BanditW1_DZ { type = "trade_items"; buy[] = {2,"ItemGoldBar...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 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/domcallstate.h...
// http://oj.leetcode.com/problems/swap-nodes-in-pairs/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *swapPairs(ListNode *head) { if (head == nullptr || head->...
#include <boost/range/counting_range.hpp> #include <boost/range/algorithm_ext/push_back.hpp> #include <boost/range.hpp> #include <queue> #include <stack> #include "../parallel/tbb.h" // for task_group template<class T> hera::ws::dnn::KDTree<T>:: KDTree(const Traits& traits, HandleContainer&& handles, double _wassers...
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); float a;//катет 1 float b; // катет 2 float S; // площа прямокутного трикутника cout << "перший катет= "; cin >> a; cout << "Другий катет= "; cin >> b; S = 1./2 * a * b; // обчислення площі трикутника cout << "Площа = " << S; r...
#include <algorithm> #include <cmath> #include <cstdlib> #include <iostream> #include <vector> // #include <chuffed/circuit/FDNNF.h> #include <chuffed/globals/mddglobals.h> #include <chuffed/mdd/CFG.h> #include <chuffed/mdd/CYK.h> #include <chuffed/mdd/MDD.h> // #include <chuffed/globals/circglobals.h> // #include <chu...
// // // IMService.hpp // MyCppGame // // Created by 杜红 on 2017/1/22. // // #ifndef IMService_hpp #define IMService_hpp #include <stdio.h> #include "YIM.h" #include <string> using namespace std; struct Msg{ public: unsigned long long msgID = 0; //消息ID,自己发送的没有消息ID string sender =""; //发送者 ...
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; struct Cliente { string nombre; int gastos; int piezas; }; //Obtiene el precio de N piezas con cierto codigo int obtenerPrecio(int codigo, int piezas) { int precioBase = 0; switch (codigo) { case 1: precioBase =...
/** \file bluetooth.h \brief */ /* * (C) 2013 Uwe Lippmann * * 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 the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * ...
#include "List.h" //#include <string> //using namespace std; struct Student { int id; float score; Student(int _id, float _score) : id(_id), score(_score){} Student(){} friend bool operator !=(const Student &left, const Student &right); }; bool operator !=(const Student &left, const Student &right) { return (le...
#include "bricks/imaging/colour.h" namespace Bricks { namespace Imaging { const ColourTypeMask::Enum PixelDescription::bitDepthMap[] = { ColourTypeMask::Unknown, ColourTypeMask::Intensity, ColourTypeMask::Palette, ColourTypeMask::Red, ColourTypeMask::Green, ColourTypeMask::Blue, ColourTypeMask::Alpha }...
#include <stdio.h> #include <stdlib.h> #include <malloc.h> #if defined(__GNUG__) #define _msize malloc_usable_size #endif #include <execinfo.h> #include <iostream> #include <tr1/unordered_map> #include <tr1/unordered_set> #include <boost/thread/recursive_mutex.hpp> #include <fstream> #include <map> #include <vector> ...
//====================================================================== // Name: Game_Engine.cpp // Author: Will Blades // Function: Implements Game_Engine class //====================================================================== #include "Game_Engine.h" // Name: Engine() // Function: Default Construct...
#include<bits/stdc++.h> using namespace std; int main() { long long int l1,r1,l2,r2,k; cin>>l1>>r1>>l2>>r2>>k; long long int ml=max(l1,l2); long long int mr=min(r1,r2); if(ml<=mr) { long long int ans=mr-ml+1; if(k>=ml&&k<=mr) { ans--; } cout<...
<template> <div> <img /> </div> </template><script> export default { el: '#example', data: { message: 'hello' }, computed: { reversedMessage: function () { return this.message.split('').reverse().join('') } } } </script><style> <...
#include "hotelwindow.h" #include "ui_hotelwindow.h" #include "cadastro.h" #include "remover.h" HotelWindow::HotelWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::HotelWindow) { ui->setupUi(this); } HotelWindow::~HotelWindow() { delete ui; } void HotelWindow::on_pushButton_cadastro_clicked(...
#ifndef _MAC_HOST_QUICK_MENU_H_ #define _MAC_HOST_QUICK_MENU_H_ #include "platforms/mac/quick_support/MacQuickMenu.h" #include "platforms/mac/embrowser/EmBrowserQuick.h" #include "modules/util/adt/opvector.h" class MacHostQuickMenu; class MacHostQuickMenuBar : public MacQuickMenu { public: virtual ~MacHostQuick...
#include "RandomSeeds.h" Seeds creatRandomSeeds(int xsize, int ysize, int NumPoints) { srand((int)time(0)); Seeds RandomSeeds; for (int k = 0; k < NumPoints; k++) { int x = random(xsize); int y = random(ysize); Pixel point(x, y); RandomSeeds.push_back(point); } return RandomSeeds; }
class bulk: CA_Magazine { scope = 2; count = 1; type = 256; displayName = $STR_EPOCH_BULK_NAME; model = "\z\addons\dayz_communityassets\models\crate.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_crate.paa"; descriptionShort = $STR_EPOCH_BULK_DESC; }; class bulk_empty: bulk { displayName = $S...
#include "TagManager.h" TagManager::TagManager(World *world) { _world = world; } TagManager::~TagManager() { clear(); _entitiesByTag.clear(); } void TagManager::add(Entity *entity, std::string tag) { Entity *targetEntity = _entitiesByTag[tag]; if (targetEntity == NULL) { targetEntity = entity; } } void Tag...
#ifndef LAYOUTCONFIG_H #define LAYOUTCONFIG_H #include <qfile.h> #include <qdir.h> #include <qdatastream.h> #include <qwidget.h> #include <iostream> #include <qgroupbox.h> #include <qpushbutton.h> #include <map> #include <vector> #include "mainwindow.h" class MainWindow; extern QString callFuncNumber; using namespace...
#include "GamePlayDemo.h" //#include "Timer.h" //#include "Team.h" //#include "TeamManager.h" #include "Ship.h" //#include "SensoryMemory.h" //#include "TargetSystem.h" //#include "Weapon.h" //#include "WeaponSystem.h" #include "Wall.h" //#include "MapSelection.h" //#include "cocos-ext.h" //#include "UISc...
#pragma once enum ParseType { COUNT_OCCURENCES, REPLACE_OCCURENCES };
/** * created: 2013-4-6 23:18 * filename: FKLogger * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include "../Include/FKLogger.h" #include "../Include/FKTime.h" #include <time.h> #include "../Include/Dump/FKDumpErrorBase.h" #inc...
// Author : chenwj // time : 2017/1/16 // Copyright :All rights reserved by chenwj @copyright 2017 ~ 2018. // // Use of this source code is governed by a BSD-style license // that can be found in the License file. //////////////////////////////////////////////////////////////////////// #include "coder.h" #include <...
#include <iostream> using namespace std; int yearday(int year); int monthday(int month,int year); int main() { int date,tian,year,month,day; char da[9]; cin>>date>>tian; year=date/10000; month=(date-year*10000)/100; day=date%100; for (int i = 1; i < month; ++i) { tian=tian+monthday(i...
#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> #include <numeric> #include <sstream> typ...
#include <stdio.h> int main(void) { printf("Я Оксана Боярко.\nСтудентка группы ЗПИ-ЗП73, кафедра АПЕПС, КПИ.\nВариант №3. \n"); return 0; }
// // Created by faris on 4/26/2020. // #ifndef FINALPROJECT_TSHAPE_H #define FINALPROJECT_TSHAPE_H #include <Box2D/Box2D.h> #include <vector> #include <cinder/gl/gl.h> #include <mylibrary/Shape.h> using namespace ci; class TShape : public Shape{ public: TShape(b2World* world, const vec2 &pos); b2Body* m_body;...
#ifndef TIME_HPP #define TIME_HPP #include <iostream> float to_total_seconds(float minutes, float seconds, float ms); class Time { public: Time(); Time(float total_seconds); Time(int minutes, int seconds, int ms = 0); int get_minutes() const; int get_seconds() const; int get_ms() const; f...
#include <stdio.h> #include "gcc-plugin.h" #include "tree.h" int plugin_is_GPL_compatible; static void dump_enum_type (tree enum_type, tree enum_name) { printf ("\"%s\":\n", IDENTIFIER_POINTER (enum_name)); /* Process all its enumerators. */ for (tree v = TYPE_VALUES (enum_type); v != NULL; v = TREE_CHAIN (v...
// Copyright (C) 2012 - 2013 Mihai Preda #pragma once #include "value.h" #include "Vector.h" #include "Index.h" class GC; struct NameValue; class Map { Vector<Value> vals; Index index; Map(); void grow(); void setVectors(Vector<Value> *keys, Vector<Value> *vals); void setArrays(Value *...
#include "Kosaraju.h" #include "Bellman_Ford.h" #include "Johnson.h" int main(int argc, char **argv){ demo_Kosaraju(); demo_Bellman_Ford(); demo_Johnson(); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long i,j,a,k,arr[1000],m; while(scanf("%lld",&a)!=EOF){ if(a==0) break; m=0; k=a; if(a<0){ printf("%lld = -1 x",a); a=a*-1; } else printf("%lld =",a); for(i=2;i<=sq...
class USP_DZ : Colt1911 { scope = 2; displayName = $STR_DZ_WPN_USP_NAME; descriptionShort = $STR_DZ_WPN_USP_DESC; model = "\RH_de\RH_usp.p3d"; picture = "\RH_de\inv\usp.paa"; begin1[] = {"\RH_de\sound\usp.wss",0.794328,1,800}; soundBegin[] = {"begin1",1}; reloadMagazineSound[] = {"\RH_de\sound\usp_reload.wss"...
#include "Device.h" #include "SwapChain.h" #include "Keng/WindowSystem/IWindow.h" #include "Resource/Texture/DeviceTexture.h" #include "DepthStencil.h" #include "Keng/GraphicsCommon/WindowRenderTargetParameters.h" #include "RenderTarget/WindowRenderTarget.h" #include "EverydayTools/Exception/ThrowIfFailed.h" namespace...
#include "Paddle.h" /* Constructor for the paddle. Initialize all parameters and update the model matrix */ Paddle::Paddle(std::string name, unsigned int width, unsigned int height, float x, float y, glm::vec3 color) : Square(name, color, glm::mat3(1), true) { this->width = width; this->height = heigh...
/* * draughtpiece.cpp * The draught pieces to move on the gameboard. * * @author Yoan DUMAS * @versionn 1.0 * @date 18/12/2013 */ #include <QPainter> #include "draughtpiece.h" DraughtPiece::DraughtPiece(const position_t & inPosition, const color_t & inColor, const state_t & inState) : Piece(inPosition, i...
#include <iostream> #include <fstream> #include <cstdlib> #include <ctime> #include "board_normal.h" #include "board_torus.h" #include "board_mirror.h" #include "game.h" using namespace hw2; using namespace std; // main declares game object and runs the game int main(int argc, char *argv[]){ game game; ...
/* * Copyright 2016 Freeman Zhang <zhanggyb@gmail.com> * * 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 applic...
#include "Primary.h" #include <wx/filedlg.h> #include <wx/msgdlg.h> #include <wx/listbox.h> #include <wx/clipbrd.h> using namespace sdindex; // Binding buttons to their functionality wxBEGIN_EVENT_TABLE(Primary, wxFrame) EVT_DIRPICKER_CHANGED(1, on_dir_changed) EVT_BUTTON(2, on_load_clicked) EVT_BUTTON(3, on_sav...
/******************************************************************************* * * Workshop 6 example 1 * * 1) Create a function called printDblArray() that prints a given array of doubles * as a row of elements. Use comma (,) as a delimiter. Enclose the output seq in * curly brackets. * * 2) Create ...
#include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Utilities/interface/EDPutToken.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #inc...
// Approach 1- Concatation: // new = "" // new += string[n-1] // n-- // return new==string // Space - O(n) // Time - O(n^2) , because new is also iterating itself in the loop. // Approach 2- Array/Vector: // new = [] // new.append(string[n-1]) // n-- // string s(new) // return s==string // new.join => converts a...
#include "SoundManager.hpp" #include <iostream> SoundManager::SoundManager() { std::map<SoundType, std::string> unloadedSounds; unloadedSounds.emplace(SoundType::BEEP, "assets/beep.ogg"); unloadedSounds.emplace(SoundType::PEEP, "assets/peep.ogg"); unloadedSounds.emplace(SoundType::PLOP, "assets/plop.og...