text
stringlengths
8
6.88M
#ifndef SSAT_H #define SSAT_H #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; #endif
/* -*- 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. * * @author Tomasz Jamroszczak tjamroszczak@opera.com * */ #inc...
#include "shoosewindow.h" #include "ui_shoosewindow.h" ShooseWindow::ShooseWindow(QWidget *parent) : QDialog(parent), ui(new Ui::ShooseWindow) { ui->setupUi(this); } ShooseWindow::~ShooseWindow() { delete ui; } void ShooseWindow::on_realMapButton_clicked() { secWindow = new SecWindow(this); ...
#include "ArrayItem.h" #include "generalArray.h" //this is release 3 void test_array(int array_size, basic_item* ref_item, char data_entry_method, int field, bool direction) { basic_sort_criteria srt_crt(true); general_array test_array; int search, searchtype; switch (field){ case HEIGHT: ...
void Solution::sortColors(vector<int> &A) { int r = 0, b = A.size() - 1; int i = 0; while (i < A.size()) { if (!A[i]) swap(A[r++], A[i++]); else if (A[i] == 2) swap(A[b--], A[i]); else i++; } }
#include "StartGameProc.h" #include "Logger.h" #include "HallManager.h" #include "Room.h" #include "ErrorMsg.h" #include "GameUtil.h" #include "AllocSvrConnect.h" #include "GameApp.h" #include "ProtocolServerId.h" #include "GameCmd.h" #include "ProcessManager.h" REGISTER_PROCESS(CLIENT_MSG_START_GAME, StartGameProc) ...
//前往"pitchyaw.h"了解更多 #include "pitchyaw.h" Motor_C610 Turnplate[1] = {Motor_C610(1)};//拨盘电机 Motor_C620 FriMotor[4] = {Motor_C620(2),Motor_C620(3),Motor_C620(4),Motor_C620(7)}; Motor_GM6020 GrimalMotor[2] = {Motor_GM6020(1),Motor_GM6020(2)};//0为yaw,1为pitch /*测试用*/ myPID Yaw[2]; myPID Pitch[2]; ...
class Solution { public: unordered_set<string> dict; int dp[302]; bool helper(string s, int i){ if(i == s.length()){ return true; } if(dp[i] != -1) return dp[i]; for(int j = i; j < s.length(); j++){ ...
#include <iostream> using namespace std; int main() { int K,o(0); cin>>K; while(true){ if (8<=K&&K<100)break;}; K=K-8; for(int i=0;i*5<=K;i++) for(int j=0;2*j<=K-5*i;j++) for(int k=0;k<=K-5*i-2*j;k++) { if(k+2*j+5*i==K) o++; } cout<<o; ...
#include "initialBlockGenerator.h" #include <QString> #include <QByteArray> using namespace qReal; using namespace robots::generator; void InitialBlockGenerator::generateBodyWithoutNextElementCall() { for (int i = 1; i <= 4; i++) { //4 - number of ports on nxt robot QString const curPort = "port_" + QString::nu...
#include "XAudioPlayer.h" #include <QAudioFormat> #include <QAudioOutput> #include <QIODevice> XAudioPlayer* XAudioPlayer::Get() { static QTAudioPlayer audioplayer; return &audioplayer; } XAudioPlayer::XAudioPlayer() { } XAudioPlayer::~XAudioPlayer() { } QTAudioPlayer::QTAudioPlayer() { m_nSampleRate = 44100; ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-1999 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" #include "modules/dom/src/domenvironmen...
#include "include/Widget/timeline.h" #include <iostream> //------------------------------------------------------------------------------------ TimeLine::TimeLine(int duration, QObject *parent) : QTimeLine(duration, parent) { connect(this, &TimeLine::frameChanged, [this](int frame){ // m_savedState = sta...
#include "gamecell.h" #include <QMouseEvent> GameCell::GameCell(CellBrush* cellBrush, int row, int column) { this->cellBrush = cellBrush; this->row = row; this->column = column; setCellHidden(); this->setFlags(this->flags() & ~Qt::ItemIsSelectable); } void GameCell::setCellHidden() { this->set...
#ifndef RunAction_h #define RunAction_h 1 #include "G4UserRunAction.hh" #include "globals.hh" #include "RootSaver.hh" class G4Run; class EventAction; class RunActionMessenger; class RunAction : public G4UserRunAction { public: RunAction( EventAction* evAct ); virtual ~RunAction(); //! Called at the beginning o...
//************************************************************************************************************* // // イージング処理[easings.h] // Author : Sekine Ikuto // //************************************************************************************************************* #pragma once #ifndef _EASINGS_H_ #d...
/* You are given a N*N maze with a rat placed at maze[0][0]. Find and print all paths that rat can follow to reach its destination i.e. maze[N-1][N-1]. Rat can move in any direc­tion ( left, right, up and down). Value of every cell in the maze can either be 0 or 1. Cells with value 0 are blocked means rat cannot enter...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) 1995-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 BLOCKFILE_H #define BLOCKFILE_H #include "adjunct/m2/sr...
//******************************************** // Student Name : // Student ID : // Student Email Address: //******************************************** // // Instructor: Sai-Keung WONG // Email: cswingo@cs.nctu.edu.tw // wingo.wong@gmail.com // // National Chiao Tung University, Taiwan // Computer Science // Da...
/* * This is a C++ class: CbaseBall * 描述球的基本特性 * */ #ifndef CBASEBALL_HPP_INCLUDED #define CBASEBALL_HPP_INCLUDED enum color{ RED, BLUE }; class CbaseBall{ public: CbaseBall(); CbaseBall(const color icolors,const char iballID); ~CbaseBall(); public: color colors; int ballID; }; #end...
//-*- mode: c++ -*- #ifndef _LIL_MATRIX_SYM_PERM_H_ #define _LIL_MATRIX_SYM_PERM_H_ template<class el_type> void lilc_matrix<el_type> :: sym_perm(std::vector<int>& perm) { vector<idx_vector_type> m_idx_new(m_n_cols); vector<elt_vector_type> m_x_new(m_n_cols); int i, j, pi, pj; el_type px; vector<int> pinv(m_n_c...
// // solver.cpp // unblockme_solver // // Created by Alexander G Anderson on 12/16/13. // Copyright (c) 2013 Alexander G Anderson. All rights reserved. // #include "solver.h" Solver::Solver() { // Initialize the starting board Node n_start = Node(); L_X = 6; L_Y = 6; CBoard & start = n_sta...
#pragma once #include<iostream> using namespace std; #include "Instruction.h" #pragma once #ifndef I_Ins #define I_Ins struct I_Instruction : Instruction { I_Instruction() { type = "I Type Instruction"; } void executeType(std::string word) { rs1 = Helper::Decimal(word.substr(12, 5)); rd = Helper::Decimal(word.sub...
#include <string.h> #include <assert.h> #include <ctype.h> #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" using namespace Scintilla; static inline bool ...
// // main.cpp // CPP11 // // Created by Keisuke Matsumura on 2015/03/19. // Copyright (c) 2015年 Keisuke Matsumura. All rights reserved. // #include <iostream> #include <vector> template<typename T> void f(T&& param) { } int main(int argc, const char * argv[]) { return 0; }
//: C03:Static.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt // Uzycie w funkcji zmiennych statycznych #include <iostream> using namespace std; void func() { static int i = 0; cout ...
#include <iostream> #include <fstream> using namespace std; #define DEBUG false int add_numbers(int &x, int y){ // x=x+y return x+=y; } int main(){ int num1=5; int num2=300; int *ptr = &num2; cout << "Value of num2 is: " << num2 << endl; cout << "Value of ptr is: " << ptr << endl; num2 = 9999; cout << "Va...
#ifndef HW_AAC_ENCODE_H #define HW_AAC_ENCODE_H #ifdef __cplusplus extern "C" { #endif #include "media/NdkMediaCodec.h" #ifdef __cplusplus } #endif #include "logimp.h" #include "HwMediaEncoder.h" class CHwAacEncoder: public CHwMediaEncoder { public: CHwAacEncoder(AMediaCodec *pCodec, StreamEncodedataParameter *Par...
#pragma once #include "PDU.h" class IP : public PDU { protected: BYTE m_VersionIHL;//4+4 BYTE m_DifferentiatedServices; WORD m_Totallength; WORD m_Identification; WORD m_UnusedDFMFFragmentoffset;//1+1+1+13 BYTE m_Timetolive; BYTE m_Protocol; WORD m_Headerchecksum; DWORD m_Sourceaddress; DWORD m_Destinationa...
class Category_50 { class bulk_17Rnd_9x19_glock17 {type = "trade_items";buy[] = {2,"ItemGoldBar"};sell[] = {1,"ItemGoldBar"};}; class bulk_15Rnd_9x19_M9SD {type = "trade_items";buy[] = {2,"ItemGoldBar"};sell[] = {1,"ItemGoldBar"};}; class bulk_30Rnd_9x19_MP5SD {type = "trade_items";buy[] = {3,"ItemGoldBar"};sell[] =...
#include "function.h" snake Snake1[400] = { 0 }, Snake2[400] = { 0 }; food Food; int Snake1Len = 1, Snake2Len = 1; int Snake1_EatCount = 0; int Snake2_EatCount = 0; int temp; int Flag1 = 4; int Flag2 = 3; int hour = 6, mi = 59, sec = 59; char ch1, ch2; void ShowInterface(){ int i, j, k; for(i = 0; i < 74; i++){...
#pragma once #include <iostream> #include "StateMachine.h" #include "MinerStates.h" #include "BaseGameEntity.h" using namespace std; class Miner : public BaseGameEntity { public: Miner(string name, int id):BaseGameEntity(id) { Name = "Miner " + name; m_pStateMachine = new StateMachine<Miner>(this); m_pStateMa...
/* Name : Aman Jain Date : 11-07-2020 Question-> Given a “2 x n” board and tiles of size “2 x 1”, count the number of ways to tile the given board using the 2 x 1 tiles. A tile can either be placed horizontally i.e., as a 1 x 2 tile or vertically i.e., as 2 x 1 tile. Algorithm= Solving the recurrence -> T(n)=T(n-2)+T...
/* -*- 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. * */ #ifndef PIXELSCALER_H #define PIXELSCALER_H #ifdef PIXEL_SCA...
/* -*- 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 OP_PAGECONTROL_H #define OP_PAGECONTROL_H #include "modu...
#include <chuffed/branching/branching.h> #include <chuffed/core/engine.h> #include <chuffed/core/propagator.h> #include <chuffed/ldsb/ldsb.h> #include <chuffed/vars/modelling.h> #include <cassert> #include <cstdio> #include <iomanip> class GracefulGraph : public Problem { public: int const m; // size of cliques...
/** * Copyright (c) 2022, Timothy Stack * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of condi...
#pragma once struct ID { union { s32 pos; // The position in the list. s32 next_free; // For when it's dead. }; s32 uid; // Unique identifier, totes unique. bool operator== (ID &that) const { return this->pos == that.pos && this->uid == that.uid; } }; template <typename T> struct Pile { s32 next_free;...
#pragma once #include "Node.h" #include <vector> /* ÖÕ½á·ûÀà */ class Terminator : public Node { public: Terminator(string node_name); Terminator(int node_id, string node_name, string node_value); ~Terminator(); virtual set<string> calFirstSet(set<string> called_stack); };
#include <iostream> //I supposed, that fib(0) = 0; fib(1) = 1 int fib(int num, int& count) { ++count; if( 0 == num) { return 0; } if( 1 == num) { return 1; } return fib(num-1, count) + fib(num-2, count); } int main() { int number; int count = 0; std::cout << "Ente...
#include <iostream> using namespace std; string f2(int x){ string res = ""; while(x > 0){ res = char(x % 2 + 48) + res; x = x / 2; } return res; } int main(){ int a,i; cin >> a >> i; int one = (1 << 20) - 1; int one_2 = (1 << i) - 1; int x = (one << (i + 1)) + one_2; ...
// // Created by Seçkin KÜKRER on 6.02.2021. // #include "Vatandas.h" std::ostream &operator<<(std::ostream &os, Vatandas const &vatandas_) { os << "Ad Soyad: " << vatandas_.isim << std::endl << "Dogum Yeri: " << vatandas_.dogumYeri << std::endl << "Dogum Yili: " << vatandas_.dogumYili << std::endl;...
#include<windows.h> #include<stdio.h> #include<vector> #include<iostream> #include<stdlib.h> #include<fstream> #include<math.h> #define DRAW_BSPLINE_STEP 10 #define E 0.000000000000000000000001 #define MAX 20 using namespace std; struct Point3D { double x; double y; double z; }; class Point3 { public: double x...
#include "views/mainview.hpp" #include "city.hpp" #include "views/viewstack.hpp" #include "views/mapview.hpp" #include "views/helpview.hpp" #include "views/unitview.hpp" #include "views/announceview.hpp" #include "views/designview.hpp" #include "views/defaultlayout.hpp" #include "job/joblist.hpp" #include "entities/...
/******************************************************************************************************//** * @file codestatistics.cpp * @brief 目录代码递归统计 源文件 * * 递归扫描自定目录, 过滤后缀名, 获取文件名 * 统计有效代码行数/注释行/空行/总行数 * @author coolweedman * @version V1.00 * @date 2016...
/** * Copyright (c) 2017, Timothy Stack * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of condi...
#include <iostream> #include "josephus.h" int main() { JosephusRing ring(2, 2); ring.append(Person("Jorn", 25)); ring.append(Person("Tom", 30)); ring.append(Person("Jerry", 35)); ring.append(Person("Mike", 40)); vector<Person> ring_sort = ring.ringSort(); for (auto i : ring_sort) { cout << i << ...
bool str1mark[1000]; int main() { int T; cin>>T; while(T--) { string s1,s2; cin>>s1>>s2; memset(str1mark,false,sizeof(str1mark)); for(int a=0;a<s1.length();a++) str1mark[(int)s1[a]] = true; int isPos = 0; for(int b=0;b<s2.length();b++) { ...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @author Arjan van Leeuwen (arjanl) */ group "m2.store.asyncstorereader"; require M2...
// // 1874.cpp // baekjoon // // Created by 최희연 on 2021/06/22. // #include <iostream> #include <stack> #include <vector> using namespace std; int main(){ int n; cin>>n; int tmp; vector<int> v; vector<char> v2; for(int i= 0 ;i<n;i++){ scanf("%d", &tmp); v.push_back(...
//知识点:区间DP,高精度 /* By:Luckyblock 感谢zlycerqan的强大高精 可以发现,两行之间没有影响, 每一行相对独立 由于只能从 区间的首或尾 取数 则 一个区间状态[l,r], 可以由[l-1,r] 或者 [l,r+1]转移而来 并且 取走 k个数之后, 剩下的m-k个数 一定是相邻的 则: 设f[i][l][r] 为第i行, 还剩下 [l,r]未被取走 能达到的最大价值和 由上, f[i][l][r] 可由状态f[i][l-1][r] 与 f[i][l][r+1]转移而来 状态转移方程式: f[i][l][r] = max(f[i][l-1][r] + ma...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define show(x) for(auto i: x){cout << i << " ";} typedef long long ll; /* 判定式を指定できるめぐる式二分探索 */ /* input: arr:行列、callback:判定方法の関数ポインタ、 userQuery:判定に使用するための引数(省略可)*/ /* output: 条件を満たす要素の最小値(全て満たさなければ...
#include <ros/ros.h> #include <std_msgs/Float64.h> #include <pcl/visualization/cloud_viewer.h> class Parameter { public: int count; int maxCount; bool stop; bool send; bool change; Parameter(); }; Parameter::Parameter() { this->count=0; this->maxCount=0; this->stop=false; th...
#include "03_StackAndQueue/07_LinkedQueue/LinkedQueue.h" #include "demo_func.h" using namespace std; void print_linked_sq(void *e) { cout << *((elemType_que_lq *)e) << " "; } void test_LinkedQueue_demo() { int ret = OK; linkedque_t que_l_sq = {0}; cout << "function [linkedQue_init] test begin..." << endl; { ...
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmMessenger.h" #include "cmDocumentationFormatter.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" #if !defined(CMAKE_BOOTSTRAP) # include "cmsys/...
#ifndef STANDARD_H #define STANDARD_H #include <vector> #include "../interpreter.h" void init_io(std::map<std::string, NFunction*> &native); void init_arithmetic(std::map<std::string, NFunction*> &native); //output functions Val write(Env* e, Store* s, std::vector<Expression*> args, int line, std::string file); //...
#pragma once #include <string> namespace ionir { class NameMangler { public: static std::string internal(const std::string &id); }; }
#include <iostream> #include <stdio.h> #include <YThreadPool.h> #include <unistd.h> void func(void *arg); INT32 main() { YThreadPool *pool = new YThreadPool; T_YTHREAD_POOL_TASK tTask; tTask.pTaskHandel = func; while(1) { char *cmd = new char(); *cmd = getchar(); getchar(); if(*cmd ...
#pragma once #include "Game.hpp" #include "Map.hpp" SDL_Texture *loadingScreen; void loadScreen() { SDL_Rect rectWall; rectWall.w = Game::TILE_SIZE; rectWall.h = Game::TILE_SIZE; for (int row = 0; row < Game::MAP_HEIGHT; row++) { for (int col = 0; col < Game::MAP_WIDTH; col++) { ...
// ----------------------------------------------------------------------------- // G4_QPIX | PrimaryGeneration.cpp // // Class for the definition of the primary generation action. // * Author: Everybody is an author! // * Creation date: 14 Aug 2019 // -------------------------------------------------------------...
#ifndef DATA_H #define DATA_H #include "source.h" #include "receiver.h" class Data { public: Data(char*,char*); float*** read_model(); Source read_source(); vector<Receiver> read_receivers(); float getDh() {return dh;}; const char* name; const int computation_ID; int out_sparse; bool isAdjoint; private: float...
#include "Mezo.h" #include "iostream" using namespace genv; Mezo::Mezo(int x, int y):Widget(x,y){ } Mezo::~Mezo(){ } int Mezo::xmeret() { return pxmeret; } int Mezo::ymeret() { return pymeret; } void Mezo::rajzol(){ gout << move_to(x(),y()) << color(125,125,125) << box(xmeret(),ymeret()); gout << m...
#include "quad.h" Quad::Quad(const Color& c, const glm::vec3& first, const glm::vec3& second, const glm::vec3& third, const glm::vec3& fourth, ClockWise vertexOrder) :_vertices{ { Vertex(first, c), Vertex(second, c), Vertex(third, c), Vertex(fourth, c) } } {} Quad::Quad(const Color& c, const glm::vec3& first, const ...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including wit...
#include "addfrd.h" #include <QIcon> #include <QFont> #include <QString> AddFrd::AddFrd(QWidget *parent) : QWidget(parent) { this->resize(400,200); this->setMaximumSize(400,200); this->setMinimumSize(400,200); this->setWindowTitle(QString("添加好友")); this->setWindowIcon(QIcon(":/img/logo.png")); ...
// Copyright (c) 2007-2016 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <pika/execution.hpp> #include <pika/future.hpp> #include <pika/init.hpp>...
/*! \file */ //Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #ifndef SGFX_GFX_HPP_ #define SGFX_GFX_HPP_ #include <sgfx/sg_types.h> #include "Bitmap.hpp" #include "Pen.hpp" #include "../var/Item.hpp" namespace sgfx { /*! \brief Gfx Map Class * \details This class is a wrapper for a sg_map_t data structur...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
#include "device.h" #include <stdio.h> #include <stdlib.h> #include <net/if.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <netinet/in.h> #include <linux/if_ether.h> #include <linux/if_packet.h> #include <string.h> #include <unistd.h> #include <linux/wireless.h> #include<QDebug> #include<ifaddrs.h> #include...
#include <iostream> using namespace std; class insan{ protected: int boy; int kilo; char *adres; public: int yemek(){ kilo++; } }; class calisan:public insan{ public: int maas; int zam(int x){ maas+=x; kilo=100; } void printKilo(){ cout<<kilo<<endl; } }; int main() { insan...
#include <iostream> #include <fstream> #include <conio.h> #include <stdlib.h> #include <string.h> #include <list> #include <bitset> #include <vector> using namespace std; unsigned int g1, g2, g3; void f(unsigned char jan, unsigned char jac, unsigned char jbn, unsigned char jbc, bool r) { static int A[99][9], b, c, d, ...
#pragma once class LobbyUser : public CMultiThreadSync<LobbyUser> { public: LobbyUser(); ~LobbyUser(); private: WCHAR m_ID[ID_SIZE]; DWORD m_UID; BOOL IsLogin; Room* m_Room; BOOL m_IsReady; public: BOOL Begin(DWORD _UID); BOOL End(); BOOL Reload(); inline VOID SetID(WCHAR _ID[32]) { CThreadSync Sync; _tc...
/* -*- 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. */ #ifndef PI_DEVICE_API_OPSUBSCRIBERINFO_H #define PI_DEVICE_API_...
// Copyright (C) 2014, 2015, 2016 Alexander Golant // // This file is part of csys project. This project 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...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- // // Copyright (C) 2003-2007 Opera Software AS. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. // // Julien Picalausa // #ifndef REPLACE_FILE_OPERATION_H #define R...
#include "Widget.h" #include "ui_Widget.h" #include <QCursor> #include <QMessageBox> Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); ui->pushButton->installEventFilter(this); startTimer(10); } void Widget::timerEvent(QTimerEvent *) { if (buttonCoor...
//===-- llvm/CodeGen/PseudoSourceValue.cpp ----------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//洛谷 1855 榨取kkksc03 //真是一道神奇的题目 #include <bits/stdc++.h> using namespace std; const int maxn = 110; const int maxm = 210; int n, m, t, a[maxn], b[maxn], f[maxm][maxm]; int main() { cin >> n >> m >> t; for (int i = 1; i <= n; i++) scanf("%d%d", &a[i], &b[i]); f[0][0] = 0; for (int i = 1; i <= n; i++) { for (in...
// WinUICPPXamlIslandSample.cpp : Defines the entry point for the application. // #include "framework.h" #include "WinUICPPXamlIslandSample.h" #include <winrt/windows.ui.xaml.hosting.h> #include <windows.ui.xaml.hosting.desktopwindowxamlsource.h> using namespace winrt; using namespace Windows::UI::Xaml; u...
// 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....
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, // but are changed infrequently #pragma once #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/gpu/gpu.hpp" #include "ComputerVisionFrameworkNative.h" ...
#ifndef STAGE_H #define STAGE_H namespace gnGame { // ステージの基底クラス class IStage { public: virtual ~IStage() = default; private: int a = 10; }; } #endif // !STAGE_H
#ifndef WGF_HELPERS_H_INCLUDED #define WGF_HELPERS_H_INCLUDED #include <string> namespace Helpers { /** * * \brief removes spaces and tabs from the beginning and the end of a string * * \param string string to trim * * \return string without spaces and tabs at beginning and end ...
#include "../inc.h" #include "material.h" #include "Itrackable.h" #ifndef CLASS_BASE_SURFACE #define CLASS_BASE_SURFACE namespace Z_3D_LIB_FOR_EGE { class _base_surface; class _base_surface : public _material, Itrackable { typedef _base_surface _Tself; typedef double _Titem; typedef _affine_vector _Td...
#ifndef GUOBJECTS_H #define GUOBJECTS_H #include "FNames.h" #include "StructsSDK.h" using namespace std; int32 GetObjectCount() { if (isUE423) { return Read<int32>(getRealOffset(Offsets::GUObjectArray) + Offsets::FUObjectArrayToTUObjectArray + Offsets...
#include <iostream> using namespace std; namespace ece309{ class IntInf{ private: int value; bool pos_inf; bool neg_inf; public: IntInf(int v = 0, bool p = false, bool n = false ) { value = v; pos_inf = p; neg_inf = n; ...
#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 <iostream> using namespace std; int main() { int n,n1=0,n2=1,nt; cout << "Enter the no. of terms"; cin >> n; for (int i=1; i< n; i++){ cout << n1 << endl; nt = n1 + n2; n1 = n2; n2 = nt; } return 0; }
#include<stdio.h> #include<stdlib.h> #define SIZE 10 //스택 구조체 typedef struct stack { int arr[SIZE]; int top; }; void stack_init(stack *pstack) { //pstack이라는 주소값을 받아옴 , 스택의 기본값 -1로 지정 pstack -> top = -1; } //스택이 비어있는지 체크 bool isEmpty(stack *pstack) { //pstack이라는 주소값을 받아옴, 스택값 -1일 경우 비어있다 if (...
#include "window.h" #include "ui_window.h" #include "gridlabel.h" #include <QFileDialog> #include <QMessageBox> #include <QLabel> #include <QFile> #include <QTextStream> Window::Window(QWidget *parent) : QWidget(parent), ui(new Ui::Window), editable(false), curGrid(nullptr) { ui->setupUi(this); ...
#pragma once #include "../../../Utils/Utils.h" class OverlayText_t; class IVDebugOverlay { public: virtual void AddEntityTextOverlay(int ent_index, int line_offset, float duration, int r, int g, int b, int a, const char *format, ...) = 0; virtual void AddBoxOverlay(const Vector &origin, const Vector &mins, const Ve...
//Xbee library #include <XBee.h> //Deipara library #include <Deipara.h> // This library contains functions to set various low-power states for the ATmega328 #include <avr/sleep.h> //RHT03 library #include <DHT22.h> // This variable is made volatile because it is changed inside an interrupt function // Keep track of h...
#include<stdio.h> #include"const.h" #include"data_structure.h" extern int money, ridersnum; extern struct rider riders[7]; void buy_riders() { while (money >= 400&&ridersnum<7) { ridersnum++; money -= PRICE; riders[ridersnum - 1].x = initialx; riders[ridersnum - 1].y = initialy; riders[ridersnum...
// 21-02-16 // My Solution 1 (11%) // wrong answer int solution(int X, int Y, int D) { // write your code in C++14 (g++ 6.2.0) int ans=0, sum=X; while(sum<Y) { sum+=D*ans; ans++; } return ans; } // My Solution 2 (55%) O(Y-X) // Timeout Error int solution(int X, int Y, int D) { ...
//--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "FrmPlugin.h" #include "PluginManager.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TPluginFrm *PluginFrm; //-...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; // Author: Tatparya Shankar long double getF1( int p, int q, int a, int b ) { double f1 = ( p - a ) / ( q + b ); return f1; } long double getF2( int p, int q, int a, int b ) { double f2 = ( ...
#include "GamePlay.h" #include "BaseEntity.h" #include "Projectile.h" #include "EntityManager.h" #include "Wall.h" #include "ObjectType.h" #include "Params.h" //#include "ListEntityManager.h" #include "Timer.h" #include "Team.h" #include "TeamManager.h" #include "Ship.h" #include "WeaponSystem.h" #include ...
// BEGIN CUT HERE // PROBLEM STATEMENT // // Little Lisa has been invited to a holiday party with her // friends. So that everyone receives a gift, the host of // the party has decided to give presents through a "Yankee // swap". // // In this version of a Yankee swap (which may differ from // the version that y...
////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007, Gogul Balakrishnan, Thomas Reps // University of Wisconsin, Madison. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the ...
/* Author: Y Liu (Simone) Project: C++ Banking System */ #include <vector> #include <iostream> #include <string> #include "Customer.h" #include "Account.h" #include "Checking.h" #include "Saving.h" #include "BusinessChecking.h" #include "BusinessSaving.h" #include "Credit.h" using namespace std; ...