text
stringlengths
8
6.88M
#include "unknown_pong.h" //Initializes SDL and handles all errors bool Unknown_pong::initSDL(std::string title, int width, int height) { bool success = true; if (SDL_Init(SDL_INIT_VIDEO) < 0) { //TODO: Probably will be replaced by SDL_INIT_EVERYTHING Logger::logErrorSDL("Failed to initialize SDL!"); success = f...
#include <stdio.h> // DirectX 12 specific headers. #include <d3d12.h> #include <dxgi1_6.h> #include <d3dcompiler.h> #include <DirectXMath.h> #if !defined(NDEBUG) && !defined(_DEBUG) #error "Define at least one." #elif defined(NDEBUG) && defined(_DEBUG) #error "Define at most one." #endif #if defined(_WIN64) #if defi...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2005 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 XSLT_SUPPORT #include "modules/xslt/src/xs...
/* 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...
#ifndef Core_GActionFollows_h #define Core_GActionFollows_h class GnIProgressBar; class GActionFollows : public GAction { public: enum eFollowType { eShadow, }; private: GLayer* mpActorLayer; Gn2DMeshObjectPtr mpsFollowMesh; GExtraData::eExtraType mFollowExtraType; public: GActionFollows(GA...
/* * libcurl class * * @author fl@lekutech * @date 2020-07-21 * @copuleft GPL 2.0 */ #include "libcurl.h" std::stringstream jsonout; error* libcurl::err = 0; bool libcurl::init(CURL*& conn, std::string url) { CURLcode code; conn = curl_easy_init(); if(NULL == conn) { std::cout << stderr ...
#include<iostream> #include<vector> #include<fstream> #include "omp.h" #include<cmath> #include<sys/time.h> #include <algorithm> using namespace std; struct timeval start, end; int vCount, nEdges, sourceNode; struct Edge { public: int source; int destination; int weight; }; void print_shortest_path(...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#if defined(_WIN32) #include "winsock2.h" #endif #include <thread> #include <mutex> #include <algorithm> #include "udp_manager.h" #include "main_thread.h" #include "protocol.h" #include "interface.h" #include "path.h" bool on_checkip(const char* remote_ip, const int &remote_port) { file_server_thread::get_instance...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #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> #inc...
#ifndef CORE_IR_H #define CORE_IR_H #include "AbstractHandler.h" #include "../lib/IRremote/IRremote.h" namespace IR { class Handler : public AbstractHandler { IRrecv *irrecv; decode_results results; public: Handler(); virtual void handle(uint16_t dataSize, uint8_t *data) ove...
#include <cstdlib> #include <iostream> #include <cmath> #include "TFile.h" #include "TTree.h" #include "TH1D.h" #include "TGraphAsymmErrors.h" #include "TRandom3.h" #include "AccMap.h" #include "fiducials.h" #include "Nuclear_Info.h" #include "Cross_Sections.h" using namespace std; double sq(double x) { return x*...
/*************************************************************************/ /* Copyright (C) Network Accessing Control -USTC, 2013 */ /* */ /* File Name : common/KWhiteList.h */ /* Pricipal Aut...
#ifndef APPLICATIONCLASS_H #define APPLICATIONCLASS_H // MY INCLUDES // #include "WindowClass.h" #include "InputClass.h" #include "DirectXClass.h" #include "CameraClass.h" #include "SphereModelClass.h" #include "SunClass.h" #include "PlanetClass.h" #include "EarthClass.h" #include "LightClass.h" #include "EarthShade...
#pragma once #include <chrono> #include <iostream> class Timer{ private: std::chrono::time_point<std::chrono::high_resolution_clock> startTimePoint; public: Timer(); ~Timer(); void Stop(); };
#include <iostream> #include <cstdlib> using namespace std; struct c { int value; c * next; }; int main() { c * head = NULL; c * p2 = NULL; int i = 0; cout << "输入几个数以空格键分开,以任意字母结尾即可"<<endl; //构造链表 while (true) { int temp; cin >> temp; if (!cin) break; if (head == NULL) { head = new c; p2 = hea...
#include <iostream> #include <vector> #include <queue> using namespace std; #define MaxNode 10 typedef struct { int value[MaxNode][MaxNode]; int n; int m; }Graph; void DFS(vector<int> &flag, Graph &G, int node) { flag[node] = 1; cout << " " << node; for (int i=0; i<G.n; ++i) { if (G.va...
#include "bigint.hpp" #include <cstring> #include <sstream> #include <iostream> //*** Input & output ***************************************** std::ostream& operator<<(std::ostream &out, const BigInt &right){ out << right.asString(); return out; } std::istream& operator>>(std::istream &in, BigInt &right){ std::st...
// Created on: 1992-09-28 // Created by: Remi GILET // 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 Les...
//=========================================================================== //! @file scene_sea2.h //! @brief デモシーン 海2 //=========================================================================== //--------------------------------------------------------------------------- //! 初期化 //--------------------------------...
#pragma once #ifndef BINARYTREE_HPP_INCLUDE #define BINARYTREE_HPP_INCLUDE namespace bt { #include "common.hpp" typedef int Key; typedef void* type; typedef struct _Node { Key key; type value; struct _Node *parent; struct _Node *leftChild; struct _Node *rightChild; }Node, *pNode; typedef struct _Bi...
///**************************************************************************** // * * // * Author : lukasz.iwaszkiewicz@gmail.com * // * ~~~~~~~~ * ...
/*************************************************** * Mir Ali Talpur * Vector4.cpp * 4/1/2015 ***************************************************/ #include "Vector4.h" #include "Vector3.h" #include <math.h> #include <iostream> #include <cstring> /*************************************************** * Vector4() * ...
#ifndef LOGINWIDGET_H #define LOGINWIDGET_H #include <QWidget> #include <QMainWindow> #include <QStackedWidget> #include <QLineEdit> #include <QStyle> #include <QDebug> #include <QMovie> #include <iostream> #include <memory> #include <ChatObjects/UserInfo.h> #include <Controller/Controller.h> #include <CallbacksHolde...
#pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <deque> #include <iostream> #include <iterator> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; void abhisheknaiidu()...
//==================QUESTIONS=======来源于 LeetCode 565========================================= /* A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {A[i], A[A[i]], A[A[A[i]]], ... } subjected to the rule below. Suppose the first element in...
#include "elog/appenders/console_appender.hpp" #include <iostream> namespace elog { ConsoleAppender::ConsoleAppender(Formatter& formatter): RawAppender(formatter) { } void ConsoleAppender::write(const std::string& line) { std::cout << line << std::endl; std::cout.flush(); } }
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; const int INF = 1e9; int x[100100],h[100100],f[100100][3]; int main() { int n; scanf("%d",&n); ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 OP_SPEEDDIAL_SEARCH_WIDGET_H #define OP_SPEEDDIAL_SEARCH_W...
#include "MxGPUQueryManager.h"
// Meteorologist Report.cpp : This file contains the 'main' function. Program execution begins and ends there. // Valeria Benetti 2183227 #include <iostream> #include <fstream> using namespace std; int main() { // Adding const ints for month and days const int month = 3, day = 30; // Creating a 3x30 Array...sli...
# Copyright (C) 2012-2016 O.S. Systems Software LTDA. # Copyright (C) 2013-2022 Martin Jansa <martin.jansa@gmail.com> QT_MODULE ?= "${BPN}" QT_MODULE_BRANCH ?= "5.15" QT_MODULE_BRANCH_PARAM ?= "branch=${QT_MODULE_BRANCH}" # each module needs to define valid SRCREV SRC_URI = " \ ${QT_GIT}/${QT_MODULE}.git;name=${Q...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@tiliae.eu * * ~~~~~~~~ * * Lice...
// Copyright (c) 1991-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 Lesser General Public License version 2.1 as published ...
/* -*- 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/unicode/unicode.h" #inc...
// // Created by msagebaum on 3/31/18. // #include <util.h> #include <iostream> #include <cmath> #include <settings.h> #include <Statistics.h> #include "../include/Track.h" void Track::read(rapidxml::xml_node<>* trackSeg) { DataPoint point; for(rapidxml::xml_node<>* curPnt = trackSeg->first_node("trkpt"); curPnt;...
#ifndef BEAT_THE_BEAT_GAME_H #define BEAT_THE_BEAT_GAME_H #include "Utils.h" #include "Inputs.h" #include "Stave.h" class Game { public: static Game* getInstance(); ~Game(); void init(); private: static Game* _instance; Game(); Game(const Game&); Game& operator=(const Game&); enum GameState { Uninitia...
//Declaración de constantes const int led = 13; //Da el nombre “led” para el pin 13 const int tiempoEncendido = 50; //En milisegundos const int tiempoApagado = 50; //En milisegundos //La estructura “setup()” se ejecuta una sola vez cada que la tarjeta Arduino es //energizada o después de que el botón de reinicio es pr...
/****************************************************************************** * $Id$ * * Project: libLAS - http://liblas.org - A BSD library for LAS format data. * Purpose: LAS header writer implementation for C++ libLAS * Author: Howard Butler, hobu.inc@gmail.com * ***************************************...
#include<cstdio> #include<iostream> #include<string> #include<cstring> #include<queue> using namespace std; class point{ public: int x; int y; point(int a=0,int b=0){ x=a; y=b; } bool friend operator == (point a, point b){return (a.x == b.x) && (a.y == b.y);} }; int b...
#include "utils.hpp" namespace serpent { std::bitset<32> cshr(std::bitset<32> const& val, size_t shift) { assert(shift < 32); std::bitset<32> res; size_t cur = 0; for (size_t i = shift; i < 32; i++) { res[cur++] = val[i]; } for (size_t i = 0; i < shift; i++) { res[cur++] = val[...
/* * Assignennt 2, COMP 5421, summer 2016 * Federico O'Reilly Regueiro 40012304 * Concordia University * * Line Editor implementation file */ #include "LineEditor.h" LineEditor::LineEditor (const string& filename) { this->filename = filename; openHelper(); } void LineEditor::run () { displayEnte...
/* -*- 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 ** */ #ifndef __SMC_MAN_H__ #define __SMC_MAN_...
#include "stdafx.h" #include "cam.h" #include <math.h> #include "specmath.h" #include <cassert> cam::cam(vec3 look_from, vec3 look_to, float aspectRatio, float fov, float aperture, float focus_dist) { orig = look_from; float theta = fov / 180.0f * specmath::PI; float half_width_over_dist = tan(theta * 0.5); float...
#include <cstdlib> #include <iostream> #include "uuidpp.h" int main(int argc, char *argv[]) { uuid u; while (std::cin >> u) if (u) std::cout << u << std::endl; return EXIT_SUCCESS; }; //
#ifndef CBT_NODES_SEQUENCE_HPP #define CBT_NODES_SEQUENCE_HPP /* Models AND over return status, * returns first failure, or abort, otherwise success. * * however, abort is not contagious in this case due to short circuiting. * that is, we dont continue processing just to check if any abort. */ #include "cbt/behavi...
// // Ellipse.h // closedFrameworks // // Created by Charles Ringer on 27/03/2016. // Copyright © 2016 WillMeaton.uk. All rights reserved. // #ifndef Ellipse_h #define Ellipse_h #include "Vector2D.h" namespace Graphics{ class Ellipse{ private: //Center point Math::Vector2D cp; //x ...
#include <sgfx/color.hpp> #include <sgfx/primitives.hpp> #include <sgfx/window.hpp> #include <algorithm> #include <numeric> #include <random> #include <utility> #include <vector> template <typename Container, typename Dest, typename F> void transform(Container const& container, Dest dest, F f) { std::transform(be...
/*First enter RGC irrespective of the order,then enter L,the dependent sources and then dependent sources */ #include<complex> #include<iostream> #include<string> #include<vector> #include<sstream> #include<cctype> #include"stdio.h" #include"stdlib.h" #include<fstream> #include<cmath> #include<cstring> #include<ctime> ...
#include "produceregz.h" #include <thread> #include "bnlogif.h" #include "algo/aes_algo.h" //begin cipher by liulijin add #include "config.h" #include <vector> #include <algorithm> //end cipher by liulijin add static const size_t NDN_MAX_PACKET_SIZE = 7000; static const size_t DATA_EMPTY_ITEM_SIZE = 300; static c...
#include "PwmRelay.h" #include <iostream> #include <sstream> #include <Arduino.h> using namespace Codingfield::Brew::Actuators; PwmRelay::PwmRelay(Relays::Relay* relay, Relays::States idleState, Relays::States activateState) : actualRelay{relay}, ...
#ifndef BMI_H #define BMI_H #include<string> using namespace std; class BMI{ public: void setmass(double num); void sethigh(double num); double getmass(); double gethigh(); double bmivalue(); string category(double ...
#include<bits/stdc++.h> using namespace std; struct tree{ int l,r,mi; }; struct que{ int l,r; }; tree tr[500000]; que q[200000]; int a[200000],ans[200000],m,n; void readit(){ scanf("%d%d",&m,&n); for (int i=1;i<=m;i++) scanf("%d",a+i); for (int i=1;i<=n;i++) scanf("%d%d",&q[i].l,&q[i].r); } v...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define FOR(i,n) for(ll i=0;i<n;i++) #define FOR1(i,n) for(ll i=1;i<n;i++) #define FORn1(i,n) for(ll i=1;i<=n;i++) #define FORmap(i,mp) for(auto i=mp.begin();i!=mp.end();i++) #define vll vector<ll> #define vs vector<string> #define pb(x) push_...
// monomer.h #ifndef MONOMER_H #define MONOMER_H #include <memory> #include <vector> #include "BlobCrystallinOligomer/ifile.h" #include "BlobCrystallinOligomer/particle.h" #include "BlobCrystallinOligomer/shared_types.h" #include "BlobCrystallinOligomer/space.h" namespace monomer { using ifile::MonomerData; ...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Player/MMOCharacter.h" #include "MMOMob.generated.h" UCLASS() class MMOPROJECT_API AMMOMob : public AMMOCharacter { GENERATED_BODY() public: // Sets default values for this character's pr...
#ifndef FIT_MANAGER_H #define FIT_MANAGER_H #include "TH1.h" class FitManager { public: FitManager(); ~FitManager(); std::vector<TH1D *> GenerateProjections(TList *histList, float low_proj, float high_proj, float low_fit, float high_fit); std::vector<TH1D *> CloneProjections(std::vector<TH1D *> histVe...
// Created on: 2013-04-06 // Created by: Kirill Gavrilov // Copyright (c) 2013-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 ...
#pragma once #include <bits/stdc++.h> class AbstractDispatcher; class Literal { public: Literal(); virtual void Accept(AbstractDispatcher& dispatcher) = 0; virtual ~Literal(); }; class CharacterLiteral : public Literal { public: char val; CharacterLiteral(char _val); void Accept(AbstractDisp...
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** Commercial License Usage ** Licensees holding valid commercial Qt...
#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 10e17 // 4倍しても(4回足しても)long longを溢れない #define rep(i,n) f...
//算法:DP //本题为简单的有向无环图,注意是单向图 //状态转移方程式: //f[i]=max(f[i],f[j]+w[i]),其中j为可以到达i的点。 //即:i点能挖到的最大地雷数=能到达i点的点能挖到的最大地雷数+i点地雷 //注意用pre存路径 #include<cstdio> using namespace std; int n,ans,ans1; int w[25],f[25],pre[25]; bool map[25][25]; void pr(int k)//递归输出路径 { if(pre[k]==k) { printf("%d ",k); r...
#include <imageprocessing/ConnectedComponent.h> #include <util/rect.hpp> #include <sopnet/slices/Slice.h> #include "SetDifference.h" double SetDifference::operator()(const Slice& slice1, const Slice& slice2, bool normalized, bool align) { const util::rect<double>& bb = slice1.getComponent()->getBoundingBox(); util...
// // Created by Michael on 6/21/2015. // #include <math.h> #include <stdio.h> #include "orthotropic_lamina.h" void OrthotropicLamina::calculate_elastic_constants(void) { this->material.calculate_elastic_constants(); double to_radians = 0.01745329251994329576923690768489; double c = cos(this->orientati...
#include <algorithm> #include <climits> #include <functional> #include <iostream> #include <numeric> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long using namespace std; int n, m, mod = 998244353; vector<int> a, b; struct Solution { int solve() { ll r...
#include<iostream> using namespace std; class linklist { private: struct node { int data; node * link; }*p; public: linklist(); void addatend(int item); void addatbeg(int item); void addafter(int loc, int item); void display(); int count(); void del(int nu...
// // Created by xpl on 2021/6/24. // #include "AudioChannel.h" #include "Log.h" extern "C" { #include <libavutil/time.h> } AudioChannel::AudioChannel(int channelId, JavaCallHelper *helper, AVCodecContext *avCodecContext, const AVRational &base) : BaseChannel(channelId, helper, avCodecCont...
#include <string> #include "caffe/data_transformer.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/util/rng.hpp" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui_c.h> #include <opencv2/imgproc/imgproc.hpp> #include "caffe/blob.hpp" namespace caff...
// // Text.h // Odin.MacOSX // // Created by Daniel on 08/10/15. // Copyright (c) 2015 DG. All rights reserved. // #ifndef __Odin_MacOSX__Text__ #define __Odin_MacOSX__Text__ #include "Drawable.h" #include "Font.h" #include "Vector4.h" #include "RenderStates.h" #include <string> namespace odin { namespace r...
#include "Data/Database.h" using namespace m2::server; Database::Database(const std::string& rootDir) : Users(rootDir) , Dialogs(rootDir + "Dialogs/") {} bool Database::CreateUser(uuids::uuid Uid, const std::string &PublicKey) { return Users.CreateUser(Uid, PublicKey) ? true : false; } bool Database::Crea...
/************************************************************************************** * File Name : Object.cpp * Project Name : Keyboard Warriors * Primary Author : Doyeong Yi * Secondary Author : Jookyung Lee * Copyright Information : * "All content 2019 DigiPen (USA) Corporation, all rig...
#include "client.h" #include "contracts.h" #include <ctime> #include <thread> #include <chrono> #include <iostream> #include <memory> // constructor CClient::CClient() : m_pClientSocket(new EClientSocket(this, &m_readerOSSignal)) {} bool CClient::connect(std::string addr, int port) { printf("Conne...
//============================================================================= // DxUtil.h by Frank Luna (C) 2005 All Rights Reserved. // Edited by Kenji Shimojima // // Contains various utility code for DirectX applications, such as, clean up // and debugging code. //==================================================...
// Test driver #include <iostream> #include <fstream> #include <string> #include <cctype> #include <cstring> #include <cstdlib> #include "unsorted.h" #include "tools.hpp" using namespace std; void PrintList(ofstream& outFile, UnsortedType& list); bool IsThere2(ItemType& item, bool& found, UnsortedType& list); int m...
// // Created by cirkul on 27.11.2020. // #include "Animal.h" Animal *Animal::spawn(Playground &pg, int i, int j) { return nullptr; } void Animal::move() { std::vector<Playground::Cell *> cells; for (int i = this->i - 1; i <= this->i + 1; ++i) { for (int j = this->j - 1; j <= this->j + 1; ++j) { ...
#include <iostream> #include <ModuleLoader.h> #include <ModuleFile.h> #include <Module.h> int main() { std::cout << "Hello World from APP1!" << std::endl; void(*say_hello)(); try { ModuleLoader loader; auto module1 = loader.load(ModuleFile::from("libmodule1.dylib")); auto module2 = loader.load(ModuleFile::fro...
/* * Created by Peng Qixiang on 2018/4/23. */ /* * 大家都知道斐波那契数列, * 现在要求输入一个整数n,请你输出斐波那契数列的第n项。 * n <= 39 * */ # include <iostream> # include <vector> using namespace std; int FibonacciRecursion(int n) { //效率太低 if(n < 0){ return -1; } else if(n <= 1){ return n; } else{ ...
// // nehe24.cpp // NeheGL // // Created by Andong Li on 10/5/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #include "nehe24.h" const char* NEHE24::TITLE = "NEHE24"; GLfloat NEHE24::sleepTime = 0.0f; int NEHE24::frameCounter = 0; int NEHE24::currentTime = 0; int NEHE24::lastTime = 0; char NEHE24:...
#include "StdAfx.h" #include "StopWatch.h" StopWatch::StopWatch(void) { LARGE_INTEGER performanceFrequency; QueryPerformanceFrequency(&performanceFrequency); ticsPerMilliSec = performanceFrequency.QuadPart / 1000; } StopWatch::~StopWatch(void) { } void StopWatch::startCounting(void) { QueryPerformanceCounter(&...
/* * cDiInfo - An application to get information via the Windows SetupDi... APIs * Charles Machalow - MIT License - (C) 2016 * Registry.h - Windows Registry interfacing header file */ #pragma once // Local includes #include "Strings.h" // STL includes #include <string> // WinApi includes #include <Windows.h> // Se...
#include "stdafx.h" #include "CSoftUploadMessage.h" #include "Markup.h" #include "CMessageEventMediator.h" #include "CMessageFactory.h" #include "databasemanager.h" CSoftUploadMessage::CSoftUploadMessage(CMessageEventMediator* pMessageEventMediator, QObject *parent) : CMessage(pMessageEventMediator, parent) { m_bAdd...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 1995-2003 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Morten Stenshorne */ #ifndef SELECT...
#include<iostream> using namespace std; class base{ public: virtual void fun1(){ cout<<endl<<"In BASE::fun1\n"; } }; class derived1:public base{ public: void fun1(){ cout<<endl<<"In DERIVED 1::fun1\n"; } virtual void fun2(){ cout<<endl<<"In DERIVED 1::fun2\n"...
#ifndef STRAT_GAME_GRAPHICS_HH #define STRAT_GAME_GRAPHICS_HH #include "Config.hh" #include "util/Math.hh" #include "Sim.hh" #include "Map.hh" #include "Input.hh" #include "opengl/OBJ.hh" #include "opengl/TextureManager.hh" #include "opengl/ProgramManager.hh" #include "opengl/Framebuffer.hh" #include <entityx/entity...
// Tries to place N Queens on an NxN Chessboard without each of them // being attacked // ITERATIVE (BRUTE FORCE) METHOD // Note: no chessboard array is used! N^2 increase in space is not good lol // Compile with: gcc 8queens.cpp -o queens -lm -O #include <iostream> #include <fstream> #include <cmath> #in...
//==================================================================================== // @Title: CURSOR //------------------------------------------------------------------------------------ // @Location: /prolix/interface/include/cCursor.cpp // @Author: Kevin Chen // @Rights: Copyright(c) 2011 Vis...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/NavBarLogo.g.uno. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Fuse.Animations.IResize.h> #include <Fuse.Binding.h> #include <Fuse.Controls.Image.h> #include <Fuse.IActualPlacement.h> #include <Fuse.IN...
// List of script functions allowed to be sent from client via remoteExec class Functions { // RemoteExec modes: // 0- turned off // 1- turned on, taking whitelist into account // 2- turned on, ignoring whitelist (default, because of backward compatibility) mode = 2; // Ability to send jip messages: 0-disabled, ...
#include "Matrix.h" #include <string> const string CANNOT_OPEN = "Не удалось открыть"; const string FOR_READING = "для чтения"; optional<vector<double>> ReadNumbers(const string& fileName) { // переделал на copy vector<double> numbers; ifstream file(fileName); if (!file.is_open()) { cout << CANNOT_OPEN << " "...
class FirstCommonNode { public: ListNode* walkNStep(ListNode* p, int k) { ListNode* cur = p; while (cur != nullptr && k--) { cur = cur->next; } return cur; } ListNode* FindFirstCommonNode(ListNode* pHead1, ListNode* pHead2) { if (pHead1 == nullptr || pHead2 == nullptr) { return nullptr; } Lis...
#include <vector> #include <string> namespace gb_util { std::vector<std::string> split(const std::string& s, char delim); std::string get_console_line(void); unsigned short stous(std::string const &str, size_t *idx = 0, int base = 10); }
// Файл util.h с реализацией вспомогатеьлных утилит #include "util.h" // Запись строки символов в указанный файл void str2file(std::string &str, std::string fileName) { std::ofstream out; // поток для записи out.open(fileName); // окрываем файл для записи if (out.is_open()) { out << str; ...
/******************* 첫번째 시도 : 시간 초과 두번째 시도 : 통과 ********************/ #include <iostream> #include <algorithm> #include <vector> using namespace std; vector<int> v_b, v_t, vResult; int main(void) { int N, H; int tempA, tempB; cin >> N >> H; for (int i = 0; i < N / 2; i++) { cin >> tempA >> tempB; v...
// // Created by Yujing Shen on 29/05/2017. // #include "../../include/nodes/ReluNode.h" namespace sjtu{ ReluNode::ReluNode(Session *sess, const Shape &shape) : SessionNode(sess, shape) { } ReluNode::~ReluNode() { } Node ReluNode::forward() { const Tensor X = _port_in...
// --------------------------------------------------------------------------- #ifndef ReaderH #define ReaderH // --------------------------------------------------------------------------- class Reader { public: char readerName[20]; int readerID; char addres[20]; char phone[20]; }; #endif
/************************************************************************/ /* 两个字符串A、B。从A中剔除存在于B中的字符。比如A=“hello world”,B="er", * 那么剔除之后A变为"hllowold"。空间复杂度要求是O(1),时间复杂度越优越好。*/ /************************************************************************/ #include <string> #include <bitset> using namespace std; class Solu...
#include "helpers.h" double sq(double x) { return x*x; } int clas_sector(double phi_deg) { while (phi_deg < -30.) phi_deg+=360.; while (phi_deg > 330.) phi_deg-=360.; int sec = (phi_deg+30.)/60.; return sec; }
// Copyright 2011 Yandex #ifndef LTR_SCORERS_SCORER_H_ #define LTR_SCORERS_SCORER_H_ #include <boost/lexical_cast.hpp> #include <vector> #include <string> #include "ltr/interfaces/aliaser.h" #include "ltr/data/object.h" #include "ltr/feature_converters/feature_converter.h" #include "ltr/interfaces/serializable_funct...
#ifndef TREEFACE_SCENE_H #define TREEFACE_SCENE_H #include "treeface/base/Common.h" #include "treeface/math/Vec4.h" #include <treecore/RefCountObject.h> #include <treecore/RefCountHolder.h> namespace treecore { class Result; class var; } // namespace treecore namespace treeface { class GeometryManager; class Mater...
/* * Copyright (c) 2016, The Regents of the University of California (Regents). * 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 a...