text
stringlengths
8
6.88M
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QDebug> #include <QThread> #include <QTimer> #include <QTime> #include <QFile> #include "vector" Q_DECLARE_METATYPE(cv::Point) Q_DECLARE_METATYPE(vector<vector<cv::Point> > ) MainWindow::MainWindow(QWidget * parent) : QMainWindow(parent), ui(new U...
#include "Entity.h" #include "SDL.h" #include "SDL_image.h" Entity::Entity(float p_x, float p_y, SDL_Texture* p_tex) { x = p_x; y = p_y; tex = (p_tex); currentFrame.x = 0; currentFrame.y = 0; currentFrame.w = 40; currentFrame.h = 5; } Entity::Entity(float p_x, float p_y, float p_currentFrameW...
#include "StdAfx.h" #include "GamePlayState.h" #include <ObjectManager/Enemy/EnemyManager.h> #include <ObjectManager/Enemy/EnemyObject.h> #include <ObjectManager/Stage/StageManager.h> #include <ObjectManager/Bullet/BulletManager.h> /*------------------------------------------- コンストラクタ -----------------------...
#include<bits/stdc++.h> using namespace std; int main() { // only gravity will pull me down // Subarray with given sum int t; cin >> t; while (t--) { int n, s; cin >> n >> s; vector<int> a(n); for(int i=0; i<n; i++) cin >> a[i]; int curr_sum=...
// Use single slot for everything, let R3F weight handle load class M136 : CA_LauncherMagazine { type = 256; }; class Javelin : CA_LauncherMagazine { type = 256; }; class AT13 : CA_LauncherMagazine { type = 256; }; class PG7V : CA_LauncherMagazine { type = 256; }; class PG7VL : PG7V { type = 256; }; class PG...
#include <iostream> #include <cstdlib> #include <string> #include "huffman.cpp" using namespace std; int main(int argc, char *argv[]){ if(argc != 3){ cout << "Error: Compression needs two arguments\nfirst arg is the file to compress, second arg is the compressed file name\n"; return -1; } Htree file; c...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Простой пример цикла выбора меню // V 1.0 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include <iostream> using namespace std; int main() { int choose = 1; do { cout << "Пожалуйста, вы...
#include "Command.hpp" using namespace std; IORedirection::IORedirection(string src, const char * dst, RedirectionType type) : _src(src), _dst(dst), _type(type), _stopper(""), _heredoc("") {} IORedirection::IORedirection(const char * src, const char * dst, RedirectionType type) : _src(src), _dst(dst), _type(type),...
#include "pch.h" #include "Bed.h" #include "GameObject.h" Bed::Bed() : m_OnDayOverEvent(std::make_unique<DayOverEvent>()) { m_type = InteractableType::bed; PopulateInteractables(); } void Bed::PopulateInteractables() { // TODO this pair is used just for testing, change it std::pair<ItemType, InteractionFuncTo...
#line 133 "LandAndSea.cpp" #include <string> #include <vector> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <map> #include <set> #include <cassert> #include <list> #include <deque> #include <queue> #include <...
//Abstract base class BankUser member-function definition (except pure virtual function) #include <sstream> #include "BankUser.h" using namespace std; BankUser::BankUser(const string& first, const string& last) : firstName(first), lastName(last) {} void BankUser::setFirstName (const string& first) {firstName = f...
//Particle Thermostat //Brandon Mutari //Library Inludes #include "HIH61XX/HIH61XX.h" //Temperature and humidity sensor #include "Adafruit_LEDBackpack/Adafruit_LEDBackpack.h" //LED matrices //Define address of temperature sensor HIH61XX hih(0x27); //Setup global variables double tempF = 0.0; double hum = 0.0; double...
#pragma once #include "Assertion.hpp" #include "FiniteStateMachine.hpp" #include <fstream> #include <list> #include <map> namespace SVParser { class InputSequenceGenerator; } extern int yyparse(SVParser::InputSequenceGenerator& FSM); namespace SVParser { struct AssertionStatus { size_t slack; Assertion* tar...
#include <iostream> using namespace std; int main(){ int x, c=0; cin >> x; while (x%2==0){ x=x/2; c++; } cout << c; return 0; }
/* @lc app=leetcode.cn id=25 lang=cpp * [25] K 个一组翻转链表 */ // @lc code=start /** Definition for singly-linked list. */ #include<iostream> #include<algorithm> using namespace std; // struct ListNode { // int val; // ListNode *next; // ListNode(int x) : val(x), next(NULL) {} // }; class Solution { public...
/******************************************************************************* * filename: C_Evolution.cpp * description: Implementation of 'Evolution' class * author: Moritz Beber * created: 2010-06-11 * copyright: Jacobs University Bremen. All rights reserved. ***********************************...
#include <iostream> #include <fstream> using namespace std; char getTile(int x, int y, unsigned char data[], int size, int w, int h); int writeBytes(int offset, unsigned char data[]); // class Landtype{ // public: // Hongkong();// How do I know what kind of parameters do I need here // Jungle(); // DisneyMov...
//#include <stdio.h> //#include <string.h> #include "pico/stdlib.h" //#include "hardware/spi.h" //#include "hardware/gpio.h" //#define BTN 14 // GPIO number, not physical pin //#define LED 25 // GPIO of built-in LED void freq_input_rise_isr(uint gpio, uint32_t events) { static uint32_t cnt = 0; uint32_t factor = 1...
#include<bits/stdc++.h> using namespace std; int f[100000],prime[100000],phi[100000],n,ans=0; void readit(){ scanf("%d",&n); } void getphi(){ int tot=0; phi[1]=1; for (int i=2;i<=n;i++){ if (!f[i]){ prime[++tot]=i; phi[i]=i-1; } for (int j=1;j<=tot&&i*prime[j]<=n;j++){ f[i*prime[j]]=1;...
#include <bits/stdc++.h> #define loop(i,s,e) for(int i = s;i<=e;i++) //including end point #define pb(a) push_back(a) #define sqr(x) ((x)*(x)) #define CIN ios_base::sync_with_stdio(0); cin.tie(0); #define ll long long #define ull unsigned long long #define SZ(a) int(a.size()) #define read() freopen("i...
#ifndef _MAPA1_H_ #define _MAPA1_H_ #include "Jogador.h" #include "Cenario.h" #include "Tanque.h" #include "Peixe.h" class Menu; /* A classe Mapa1 representa um conjunto de várias telas. Um conceito de cenário mais amplo, a localidade do jogador no mundo do jogo. O mundo do jogo seria composto por vários Mapas e...
#include "LambdaExpression.h" namespace lispc { LambdaExpression::LambdaExpression(Expression* body, std::vector<Symbol>& parameters, Environment* env) : body(body), params(parameters), env(env) {} LambdaExpression::~LambdaExpression() { } bool LambdaExpression::is_atom() const { return true; } bool Lambd...
#ifndef __CHATTY_EPOLL_POLLER_H__ #define __CHATTY_EPOLL_POLLER_H__ #include <sys/epoll.h> #include <unordered_map> #include <vector> #include "Poller.h" namespace chatty { namespace net { class Channel; class EPollPoller : public Poller { public: EPollPoller(EventLoop *loop); void updateChan...
#pragma once #include <iostream> #include <iomanip> #include <algorithm> #include <cstdlib> #include <cstring> #include <ctime> #include "config.h" #include "base.h" #include "boolean.h" #include "arithmetics.h" #include "mul.h" #include "div.h" #include "modular.h" #include "bigint.h" using namespace std; namespace...
#include "model.h" Model::Model(SDL_Surface *s, int x, int y) { this->x = x; this->y = y; this->surface = SDL_DisplayFormat(s); setColorKey(0); } Model::Model() {} Model::~Model() {} void Model::setSurface(SDL_Surface *s) { this->surface = s; } void Model::setX(int x) { this->x = x; } void Model::setY(int...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> using namespace std; typedef long long ll; #define INF 10e10 #define rep(i,n) for(int i=0; i<n; i++) #define r...
// // WordStats1.cpp // TopFrequent // // Created by Steven on 20/5/18. // Copyright © 2018 tengx. All rights reserved. // #include <stdio.h> #include "WordStats.hpp" bool WordStats::Skip() { scanf("%*[^a-z||A-Z]"); return true; } bool WordStats::Load(string& f) { char _word[MAX_LENGTH]; Word w; ...
#include <vector> #include <iostream> #include "SpeechProcessing.h" #include "PhoneticService.h" #include "AppHelpers.h" #include "WavUtils.h" namespace SegmentsLoaderRunnerNS { using namespace PticaGovorun; void loadSegmentsTest() { auto speechProjDir = toBfs(AppHelpers::configParamQString("speechProjDir", ""))...
#pragma once //======include section====== #include "Location.h" #include "macros.h" // Will store tiles for alphaStar algorithm class Tile { public: // c-tors Tile(Location& location, char value, int index_of_father, enum Moves move, int h_value); Tile(); // operator functions bool operator==(Tile& tile) cons...
#include<iostream> int preDecrease( int &i) { i = i - 1; return i; } int postDecrease( int &i) { int j = i; i - 1; return j; } int main() { int i = 5; // std::cout << preDecrease(i); std::cout << postDecrease(i); return 0; }
#include <iberbar/Utility/DateTime.h>
#pragma once #include "value.h" namespace json { class Object; class Array; ///Stores a reference to a JSON variable /** * Reference to value. It acts like ordinary Value, in exception you can actually assign a value to it. * The objects remembers the source of the value, and assigning to the variable causes, tha...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll calcComb(int a, int b); ll mod = 1000000007; ll modpow(ll a, int p); int main(){ int N, K; cin >> N >> K; ll ans; for (int i = 1; i <= K ; i++) { ans = calcComb(N-K+1, i); ans %= mod; ans *= calcComb(K...
#pragma once #include <cstdint> #include <optional> #include <type_traits> #include "SDK/Platform.h" class CSPlayer; class Entity; class ItemSystem; class PlantedC4; class PlayerResource; class WeaponSystem; template <typename T> class UtlVector; struct ActiveChannels; struct Channel; struct GlobalVars; struct Vect...
/*********************************************************\ * 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 <bits/stdc++.h> using namespace std; long long int mino = INT_MAX,maxo = INT_MIN,promed,N,act; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> N; for(int i=0;i<N;i++){ cin >> act; promed+= act; if(act < mino) mino = act; if(act > maxo) maxo = act; ...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
#ifndef SHOEMANAGERNAMESPACE_H #define SHOEMANAGERNAMESPACE_H #include "shoemanagercore_global.h" namespace ShoeManager { typedef enum ShoeMessageType { PacketType_Login = 0x01, // 登录 PacketType_Login_Disallow = 0x44, // 禁止 PacketType_HearBeat = 0x08, // 心跳包 PacketTy...
#pragma once namespace aeEngineSDK { class AE_GRAPHICS_EXPORT aeShader : public aeGraphicsResource { protected: aeShader(); SHADER_DATA* m_pData; friend class aeGraphicsAPI; public: aeShader(const aeShader& S); virtual ~aeShader(); virtual void Release(); }; }
#ifndef SAFEUNWRAP_HH #define SAFEUNWRAP_HH #include <nan.h> #include "errors.hh" namespace NC { template<typename JsT> struct SafeUnwrap { static JsT* Unwrap(v8::Local<v8::Object> self) { if (!Nan::New(JsT::js_constructor)->HasInstance(self)) { std::string msg {"Argument should be derived f...
/**************************************** Cat Got Bored *****************************************/ #include <bits/stdc++.h> #define FOR(i, s, e) for(int i=s; i<e; i++) //excluding end point #define loop(i, n) for(int i=0; i<n; i++) //n times #define loop(n) for(int i=0;i<n;i++) // n times #define getint(n) s...
#include <iostream> #define INF 987654321 using namespace std; int matrix[6][6]; int n; int nearest[6]; int dist[6]; int ans = 0; void primSetting() { // index 1을 기준으로 distance 를 짠다. for (int i = 1; i <= n; i++) { nearest[i] = 1; dist[i] = matrix[1][i]; } } void prim() { /* ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 ** */ #include "core/pch.h" #ifdef DATASTREAM...
#include <iostream> #include <cstdio> #include <algorithm> #include <climits> using namespace std; typedef long long LL; const int N = 111111; int h[N], a[N], hn = 0, n, S[N]; int get(int x) { ++x; int sum = 0; while (x) { sum += S[x]; x &= x - 1; } return sum; } void add(int x...
#include "treeface/math/Mat4.h" #include <stdio.h> using namespace treecore; namespace treeface { static_assert( sizeof(Mat4f) == sizeof(float)*16 , ""); static_assert( sizeof(Mat4f::DataType) == sizeof(float)*4, ""); static_assert( sizeof(Mat4f::DataType::DataType) == sizeof(float)*4, ""); template<> float Mat4<f...
#include "Ground.h" #include <DxLib.h> const int screen_x_size = 512; const int ground_line = 480-(16+8)*2; Ground::Ground() { } Ground::~Ground() { } int Ground::GetCurrentGroundY() const { return ground_line; } void Ground::DebugDraw() { DxLib::DrawLine(0, ground_line, screen_x_size, ground_line, 0xff0000); }
#include"hash.h" #include<vector> //const int dimension = 150; Hash::Hash(ifstream &input, int mode) { // di defualt ho mode==0 e mi limito a indivuare il numero di occorenze per ogni pattern (poi dopo effettuerò la scrematura con get_pattern) if (mode == 0) { string pattern; while (getline(input, pattern)) ...
#include "File.h" #include "TextReader.h" #include "CLArguments.h" File::File(const std::string& filename) : mPath(cppag::CLArguments::GetSingleton().MatchPath(filename)) { //ctor } File::~File() { //dtor } std::string File::GetContent() const { cppag::TextReader textReader(mPath); if(!textReader...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2020 Karbo developers // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://...
#include<vector> using std::vector; #include<iostream> #include<algorithm> #include<memory> using std::shared_ptr; #include<string> using std::string; #include<stack> using std::stack; #include<queue> using std::priority_queue; #include<unordered_map> using std::unordered_map; #include<list> using std::list; /* Impleme...
#include <glog/logging.h> #include "gtest/gtest.h" #include "wali/util/details/Partition.hpp" namespace wali { namespace util { namespace details { TEST(Partition, Basic0) { Partition p; EXPECT_FALSE(p.AreEquivalent(1,2)); } TEST(Partition, Basic1) { Partition p; p.SetEquivalent(1,2); ...
#pragma once namespace studio { class PreviewWindow { public: static void draw(); }; }
/* Copyright (c) 2016, Los Alamos National Security, LLC All rights reserved. Copyright 2016. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the...
#include "tests.hpp" #include <iostream> using namespace std; bool test_matching(); bool test_matchingArea(); bool test_matchingPatch(); bool test_matchingPatchArea(); int main () { NEW_F(test_matching); NEW_F(test_matchingArea); NEW_F(test_matchingPatch); NEW_F(test_matchingPatchArea); //NEW_F(Tester::test...
#include<bits/stdc++.h> using namespace std; char str[110][10100]; int s[110][10100]; int ds[110][20200]; int ans[105][20200]; int finans[20200]= {0}; int main() { int n,m; scanf("%d%d",&n,&m); bool flag=false; for(int i=1; i<=n; i++) { scanf("%s",str[i]); bool flags=false; ...
#include "MsgQueue.h" extern iberbar::IO::CMsgQueue* iberbar::IO::g_pMsgQueues = nullptr; iberbar::IO::CMsgQueue::CMsgQueue( std::pmr::memory_resource* pMemoryRes ) : m_Queue_SocketWrite( std::pmr::polymorphic_allocator<USocketWriteMsg>( pMemoryRes ) ) , m_Queue_SocketRead( std::pmr::polymorphic_allocator<USock...
#include <bits/stdc++.h> using namespace std; int main() { vector<int>value[105], my[105]; int tam[105], n, num, qnt[105]={}, v; bool fg; scanf("%d", &n); for(int i=1;i<=n;i++) { scanf("%d", &tam[i]); for(int j=0;j<tam[i];j++) { scanf("%d", &num); value[num].p...
#include <algorithm> #include <functional> #include <iostream> #include <numeric> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long using namespace std; string s; struct Solution { int n; ll solve() { n = s.length(); vector<int> dp(n); int cur...
#include "commons.h" #include "my_signal.h" #include <string.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <fcntl.h> #include <sys/types.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/shm.h> #include <syslog.h> int myPipe[2]; void sign...
#ifndef QuickWidgetManager_H #define QuickWidgetManager_H #include "platforms/mac/embrowser/EmBrowserQuick.h" class QuickWidgetManager { public: static EmBrowserStatus CreateQuickMenu(IN const EmBrowserChar * title, IN const char * name, IN EmQuickMenuKind kind, OUT EmQuickMenuRef * menu); static EmBrowserStatus Di...
// ================================================================================================================================= // * target // * to handle coordinate // * tested compiler version // * g++ (Rev1, Built by MSYS2 project) 7.2.0 // * reference // * https://ezoeryou.github.io/cpp17book/index.html ...
/* =========================================================================== Copyright (C) 2017 waYne (CAM) =========================================================================== */ #pragma once #ifndef ELYSIUM_GRAPHICS_SURFACEFORMAT #define ELYSIUM_GRAPHICS_SURFACEFORMAT #endif namespace Elysiu...
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll t; cin>>t; while(t--){ ll n; cin>>n; if(n==0){ cout<<0<<endl; continue; } vector<ll> toys(n); for(ll i=0;i<n;i++){ cin>>toys[i]; } if(n==1){ cout<<toys[0]<<endl; continue; } if...
// Created on: 1992-11-19 // Created by: Remi LEQUETTE // 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 GNU ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2006-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Jens Lindstrom / Lars T Hansen / Johannes Hoff / Morten Rollan...
#ifndef CREADTHREAD_H #define CREADTHREAD_H #include <QThread> #include "cticktimer.h" class CSerialPortPrivate; class CReadThread : public QThread { Q_OBJECT public: explicit CReadThread(CSerialPortPrivate *sp, QObject *parent = 0); void setCharTimeout(qint64 us); signals: public slots: protected: ...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Intern.hpp :+: :+: :+: ...
// // Created by ali-masa on 3/20/20. // #include "../../PlatformIndependentConcurrency/concurrency_abstract_factory.cpp" #include "../../PlatformIndependentConcurrency/linux_concurrency_abstract_factory.cpp"
#include<iostream> #include<stdlib.h> #include<string.h> using namespace std; typedef struct Stack { char *arr; int top1; int top2; }Stack; Stack *stack; void createstack(int n) { stack->arr = (char *)malloc(sizeof(char)*n); stack->top1 = -1; stack->top2=n; } void push1(char m) { if(...
#pragma once #include <DirectXLib.h> #include <vector> #import <msxml6.dll> // アニメーションフレーム. class Frame { public: string imagePath; // 画像ファイルパス string soundPath; // 音楽ファイルパス long x; // 表示位置(X座標) long y; // 表示位置(Y座標) long w; // 画像幅 long h; // 画像高さ long gap; // フレーム間待機時間 }; typede...
/*********************************************************\ * 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...
/* kamalsam */ #include<stdio.h> int main() { long long int m,n,i,row; int rem; scanf("%lld",&m); for(i=0;i<m;i++) { scanf("%lld",&n); if(n==1) printf("poor conductor\n"); else { n-=1; rem=n%5; if(rem==0) ro...
// // Created by 张哲华 on 19/09/2017. // #ifndef VIDEOSTABLE_THREADCOMPENSATION_H #define VIDEOSTABLE_THREADCOMPENSATION_H #include <thread> #include <cmath> #include "ThreadContext.h" #include <opencv2/opencv.hpp> #include <vector> #include <list> namespace threads { class ThreadCompensation { public: ...
#ifndef Pila_h #define Pila_h using namespace std; template <class T> class Pila{ private: T arr[15]; int tope; public: Pila(); void meter(T num); void sacar(); void observa(); }; template <class T> Pila <T>::Pila(){ tope=0; } template <class T> void Pila <T>::meter(T nuevo){ if (tope<15...
#include"graphics.h" void graphics::Init(HWND hwnd) { mhwnd = hwnd; hdc = GetDC(mhwnd); PIXELFORMATDESCRIPTOR pfd; ZeroMemory(&pfd, sizeof(pfd)); pfd.nSize = sizeof(&pfd); pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; pfd.iPixelType = PFD_TYPE_RGBA; pfd.cColorBits...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2007 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #include "core/pch.h" #include "adjunct/desktop_util/desktop_util_module.h" #ifdef DES...
#include "gtest/gtest.h" #include <string> #include <vector> #include "ArgumentsParsing.h" #include "CmdOption.h" namespace ArithmeticalParserTests { using OptionsMap = std::map<arithmetic_parser::CmdOption, arithmetic_parser::OptionInput>; TEST(ArgumentsParsingInvalidDataTests, EmptyInput) { int argc = 1; c...
// http://oj.leetcode.com/submissions/detail/5069805/ class Solution { public: void reverseWords(string &s) { if (s == "") { return; } int len = s.size(); string reversed = ""; list<string> li; for (int i = 0; i < len; ) { wh...
#pragma once #include <utility> #include <type_traits> #include <tuple> #include <functional> #include "apply_from_tuple_cpp11.hpp" namespace test { namespace detail { template<typename Function, typename... Args> struct closure { explicit closure(const Function &f, const Args&... args) : f(f), args(a...
#pragma once #include "scene.hpp" #include "config/options_ptts.hpp" #include "utils/service_thread.hpp" #include "utils/time_utils.hpp" #include <boost/asio.hpp> #include <string> #include <memory> using namespace std; namespace ba = boost::asio; namespace nora { namespace dbcache { class d...
#ifndef OPERATORS_H #define OPERATORS_H #include <vector> #include <iostream> #include <stdexcept> #include <cmath> using namespace std; float operator*(const vector<float>& U, const vector<float>& V){ try{ if(U.size() != V.size()){ throw string("ERREUR : Dimension incompatible !"); ...
#include <iostream> using namespace std; void f(int t[],int n) { int maks; int mini; if(t[0]<t[1]) { maks=t[1]; mini=t[0]; }else { maks=t[0]; mini=t[1]; } for(int i=0,j=1;j<n;i+=2,j+=2) { if(t[i]>t[j]) { ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2009-2011 * * WebGL GLSL compiler -- AST building framework and classes. * */ #ifndef WGL_BUILDER_H #define WGL_BUILDER_H #include "modules/webgl/src/wgl_base.h" #include "modules/webgl/src/wgl_ast....
#ifndef BLOCK_H #define BLOCK_H #include "globals.h" class cube{ public: void drawCube(); void transform(const char transformation, cube& Mcube, int amount,bool draw = true); void flipDown(); void flipLeft(); void flipRight(); void flipUp(); void rotateCube90(int numRotations); unsigned int cubeMatr...
#ifndef SDUZH_NET_INET_ADDRESS_H #define SDUZH_NET_INET_ADDRESS_H #include <stdint.h> #include <string> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> namespace reactor { namespace net { class InetAddress { public: typedef std::string string_t; InetAddress(); InetAddress(const string_t &...
// // CloudsVisionSystem.cpp // // Created by Patricio Gonzalez Vivo on 7/23/13. // // #include "CloudsVisionSystem.h" using namespace ofxCv; using namespace cv; string CloudsVisionSystem::getSystemName() { return "VisionSystem"; } void CloudsVisionSystem::selfSetup() { currentMode = OpticalFlow; curFlow ...
/**************************************************************** File Name: phase1.C Author: Tian Zhang, CS Dept., Univ. of Wisconsin-Madison, 1995 Copyright(c) 1995 by Tian Zhang All Rights Reserved Permission to use, copy and modify this software must be granted by the author a...
/* -*- 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. */ #include "core/pch.h" #ifdef GADGET_SUPPORT #include "adjunct/q...
#include "treeface/post/PostProcess.h" namespace treeface { } // namespace treeface
#include <stdio.h> /*枚举每个元素 该元素与前面的元素比较,找到小的即可 该元素与后面的元素比较,找到大的即可 上面两项为真,即说明当前元素可以作为三元组的中心*/ void Triple(){ int n,ans=0; scanf("%d",&n); int data[1000]; for(int i=0;i<n;i++) scanf("%d",&data[i]); for(int j=1;j<n-1;j++) { int hasSmall=0; for(int i=0;i<j;i++) { if(data[i]<data[j]) { ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch.h" #ifdef CSS_TRANSITIONS #include "modul...
// Copyright (c) 2005-2021 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) #pragma once #include <pika/config.hpp> #include <chrono> #include <cstdint> n...
#include <stdio.h> #include <bits/stdc++.h> #define LMAX 305 #define MAX(a,b) a>b?a:b using namespace std; int k, n, m; int a[LMAX][LMAX]; int x; int sum[LMAX][LMAX]; int ans; int v[LMAX]; int calc() { bool ok = 1; int s = 0; int maxx = 0; for (int i=1; i<=n; ++i) { if (s > maxx) ...
#include <iostream> #include <vector> #include "utils.h" using namespace std; int main() { /* code here */ return 0; }
#ifndef __EXECLOCATOR_H__ #define __EXECLOCATOR_H__ #include <dax/Types.h> #include <dax/Extent.h> #include <dax/cont/arg/ExecutionObject.h> #include <dax/math/Precision.h> #include <dax/cont/ArrayHandle.h> #include <dax/cont/UniformGrid.h> #include "BinPoints.h" #include "MapPointToBucket.h" using namespace dax::co...
/* * Copyright (c) 2020, Mohamed Ammar <mamar452@gmail.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, thi...
/****************************************************************************/ /* Program: Project 2 - Magic Tricks with Cards */ /* Version: 4 */ /* Autor: Alberto Rodríguez - Rabadán Manzanares */ /* D...
#include<windows.h> #include<graphics.h> #include<stdio.h> #define border 50 int main() { //Delgetsnii full hemjeeg ni awah DWORD Width = GetSystemMetrics(SM_CXSCREEN); DWORD Height = GetSystemMetrics(SM_CYSCREEN); initwindow(Width/2,Height/1.5); //Mouse cursoriin bairlal zaana POINT cursorPosition...
/* Copyright (c) 2019-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt */ #include "TestNumberTests.hpp" using namespace Ishiko; TestNumberTests::TestNumberTests(const TestNumber& number, const TestContext& context) : TestSeque...