text
stringlengths
8
6.88M
//////////////////////////////////////////////////////////////////////////////// // // (C) Andy Thomason 2012-2014 // // Modular Framework for OpenGLES2 rendering on multiple platforms. // namespace octet { /// Scene containing a box with octet. class example_rollercoaster : public app { // scene for drawing bo...
#include <iostream> #include <armadillo> #include <cmath> #include <vector> #include "Body.h" #include "Universe.h" #include "../../lib/lib.h" using namespace arma; using namespace std; int main(int argc, char *argv[]) { bool useVerlet = true; if (argc < 5) { cout << "Usage: ./main.x h tmax N check_for_ej...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 2011-2011 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Jonny Rein Eriksen ** */ #include "...
// Created on: 1999-03-22 // Created by: Xuan PHAM PHU // Copyright (c) 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 Lesse...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" /** * Desc£ºÅäÖĂÊư¾Ư¼ÓÔØÆ÷ * Author£º StevenZhai * Date£º 2018-1-2018/01/23 * Time£º11£º43 */ class GameObjectLoader { public: GameObjectLoader(); ~GameObjectLoader(); public: //bool LoadCon...
// 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 "TransferCmd.h" #include "Common/Base58.h" #include "Common/StringTools.h" #include "CryptoNoteCore/Crypt...
/////////////////////////////////////////////////////////////////////// // SizeFileMgr.cpp - Find sizes of files matching specified patterns // // // // Jim Fawcett, CSE687 - Object Oriented Design, Fall 2018 // ////////////////////////////////...
/* -*- 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. */ #include "core/pch.h" #include "LinkStyleDialog.h" # include "mo...
#include <bits/stdc++.h> using namespace std; const int maxn = 1010; int n, m; /** * Heap[] 存储的是堆 * mapper 存储值为i的节点在Heap[]中的下标 */ int Heap[maxn]; map<int, int> mapper; /** * 建堆操作,将temp调整到堆中正确的位置 * temp是要插入到堆中的值,idx是它所在的下标 */ void addNode(int temp, int idx) { while (idx > 1 && temp < Heap[idx / 2]) {...
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ==========================================================...
#ifndef SIMGRAPHICS_EXAMPLES_FRAMEWORK_H #define SIMGRAPHICS_EXAMPLES_FRAMEWORK_H #include "include/SimRoot.h" #include "include/SimRenderDevice.h" #include "SimExamples/SimVertex.h" #include <d3dx9.h> #include <DxErr.h> const D3DCOLOR WHITE = D3DCOLOR_XRGB(255, 255, 255); const D3DCOLOR RED = D3DCOLOR_XRGB(255, 0, ...
#include <bits/stdc++.h> using namespace std; int N, a,b,ini,fin,med,resp,e,f,meno,maxo; int arr[1005]; int main() { cin >> N; for(int i=1; i<=N;i++){ cin >> arr[i]; } cin >> a >> b; meno = min(a,b); maxo = max(a,b); for(int i=1; i<=N;i++){ if (arr[i] >= meno && arr[i] <= maxo)resp++; } cout << re...
// Created on: 1992-11-25 // Created by: Julia DOROVSKIKH // 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 G...
#ifndef CPROFILEDB_H #define CPROFILEDB_H #include <YouMeCommon/CrossPlatformDefine/PlatformDef.h> #include <SqliteOperator.h> const XString s_szProfileTableName[] = { __XT("settings")}; const XString CREATE_TABLE_SETTINGS = \ __XT("create table settings(key text,value text)"); const XString szProfileC...
#include "Config.hpp" #include <algorithm> using namespace std; using namespace libconfig; const char *confFile = CONFIG_FILE_NAME; static Setting &openConfFile(Config &cfg); static Setting &openConfFile(Config &cfg) { // Read the file. If there is an error, report it and exit. try { cfg.readFile(confFile); ...
#include "kinect.hpp" using namespace mik; // Saves 10 frames to disk int main(int, char*[]) { Kinect kinect(KinectConfig{}); // Default config kinect.save_frames(10); // saves frames in both kinect and GestureNet formats return 0; }
#include "graph.h" #include <cstdlib> #include <stdio.h> // I pledge on my honor that I have abided by the Stevens Honor System // Conner Zeigman Daniel Kramer struct Graph::Node{ Node* next; int vert; float weight; }; Graph::Graph(int n, int rep){ type = rep; if (n < 1){ numVertices = ...
// Created on: 2016-04-07 // Copyright (c) 2016 OPEN CASCADE SAS // Created by: Oleg AGASHIN // // 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 publi...
#include <Rcpp.h> #include <RcppParallel.h> using namespace RcppParallel; // [[Rcpp::depends(RcppParallel)]] struct getElement : public Worker { // input vector to read from const std::vector< std::string > myVector; // output vector to write to std::vector< std::string > retVector; std::string my...
// // Created by manout on 18-5-6. // #include <bits/stdc++.h> using namespace std; int numberOf1(int n) { size_t tmp = static_cast<size_t>(n); tmp = - ((tmp >> 1) & 033333333333) - ((tmp >> 2) & 011111111111); tmp = (tmp + (tmp >> 3)) & 030707070707; return static_cast<int>(tmp %...
#ifndef WIDGETWAVE_HH_ #define WIDGETWAVE_HH_ #include "WidgetAudioView.hh" /** A scrollable view of the audio wave. */ class WidgetWave : public WidgetAudioView { public: /** * \param parent Parent widget. * \param rect Rectangle area of the widget. * \param audio_input Source of audio data. * ...
#ifdef DEBUG #define _GLIBCXX_DEBUG #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<bits/stdc++.h> using namespace std; int main(){ FILE* in = fopen("input.txt", "w"); srand(time(NULL)); //fprintf(in, "%d\n", 50000000 ); //fprintf(in, "%d\n", 9878 ); for (long long i = 0; i < 50000 ; i++) { fprintf(in, "1 %d %d\n", rand(),rand() ); } // for (long...
#ifndef __PAGEACTLIST_H #define __PAGEACTPLIST_H #include "CtrlWindowBase.h" //#include "MAct.h" #include "VActCtrlPanel.h" namespace wh{ //--------------------------------------------------------------------------- class ModelPageActList : public IModelWindow { std::shared_ptr<MActArray> mWhModel = std::make_share...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #include "core/pch.h" #ifdef _PLUGIN_SUPPORT_ #include "modules...
#include <iostream> #include <cstdlib> using namespace std; int main (int argc, char* argv[]){ int a; int b; if (argc > 1){ a = atoi(argv[1]); b = atoi(argv[2]); }else{ cout << "Enter the first number: "<< endl; cin >> a; cout << "Enter the second number: ...
#ifndef TIGER_H #define TIGER_H #include "animal.h" using namespace std; class Tiger : public Animal{ private: protected: public: //! Template for function header, DO NOT TOUCH /****************************************************** ** Function: ** Description: ...
/* access the sample web page at http://esp32fs.local edit the page by going to http://esp32fs.local/edit */ #include <Wire.h> #include <ESP.h> #include <WiFi.h> #include <WiFiClient.h> #include <WebServer.h> #include <ESPmDNS.h> #include <Arduino.h> #include <WiFiClientSecure.h> #include <WebSocketsServer.h> #inc...
#include "utils/functions.hpp" #include <cppunit/extensions/HelperMacros.h> #include <string> namespace nora { namespace test { class functions_test : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(functions_test); CPPUNIT_TEST(test); CPPUNIT_TEST_SUITE_END();...
// // updater.h // auto updater // // Created by FancyZero on 13-4-18. // // #ifndef __auto_updater__updater__ #define __auto_updater__updater__ #include <iostream> #include <string> #include <vector> class download_manager; struct file_list_item { file_list_item() :compressed(false) { }...
#pragma once namespace aeEngineSDK { class AE_GRAPHICS_EXPORT aeInputLayout : public aeGraphicsResource { protected: aeInputLayout(); INPUTLAYOUT_DATA* m_pData; friend class aeGraphicsAPI; friend class aeRenderer; public: aeInputLayout(const aeInputLayout& S); virtual ~aeInputLayout(); void Releas...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef PREF_ACCESSORS_H #define PREF_ACCESSORS_H /** * @file ...
#ifndef __CHATTY_BUFFER_H__ #define __CHATTY_BUFFER_H__ namespace chatty { namespace net { class Buffer {}; } // namespace net } // namespace chatty #endif // __CHATTY_BUFFER_H__
/* * Copyright (c) 2021 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_FIXED_MERGE_EXCHANGE_NETWORK_SORTER_H_ #define CPPSORT_FIXED_MERGE_EXCHANGE_NETWORK_SORTER_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #includ...
#include<bits/stdc++.h> using namespace std; main() { int n, reverse=0, temp; scanf("%d",&n); temp=n; while(temp!=0) { reverse = reverse*10; reverse = reverse+temp%10; temp = temp/10; } if(n==reverse) printf("%d is Palindrome.\n",n); else printf("T...
// // Created by abel_ on 23-08-2021. // #include <bits/stdc++.h> using namespace std; int main() { map<string,int> m; int n; cin >> n; for (int i = 0; i < n; i++) { string s; cin >> s; m[s]++; } for(auto pr : m){ cout << pr.first << " " << pr.second << endl; ...
// RsaToolbox #include "Vna.h" using namespace RsaToolbox; // Qt #include <QCoreApplication> #include <QDir> #include <QVector> void main() { Vna vna(ConnectionType::VisaTcpConnection, "127.0.0.1"); // Start from instrument preset vna.preset(); vna.pause(); // Channel 1 interface // Opt...
/** * Functions related to integral images * * @version $Version: 2018.11.13$ * @copyright Copyright (c) 2004-present, Mauricio Villegas <mauricio_ville@yahoo.com> * @license MIT License */ #include "intimg.h" #include <stdlib.h> #include <stdio.h> #include <math.h> int malloc_II1( int imW, int imH, II1*** _II...
#ifndef CLASSTABLE_H #define CLASSTABLE_H #include <QStandardItemModel> #include <QColorDialog> #include "hmldefinitions.h" class ClassTableModel : public QStandardItemModel { Q_OBJECT public: ClassTableModel(QObject *parent = 0); ~ClassTableModel(); QStringList getClassNames(); bool textAlreadyExist...
#pragma once #include "SceneManager.h" #include "Button.h" class Menu : public SceneManager { private: Button playButton; Button soundButton; Button rankingButton; Button exitButton; public: Menu(); void Update(bool * _keys, Vec2 _mousePosition); PlayerRankingInfo GetPlayerRankingInfo(); void Dr...
#include <octomap/octomap.h> #include "testing.h" using namespace std; using namespace octomap; using namespace octomath; int main(int /*argc*/, char** /*argv*/) { float res = 0.01f; OcTree tree(res); EXPECT_EQ(tree.size(), 0); tree.prune(); EXPECT_EQ(tree.size(), 0); point3d singlePt(-...
#include<bits/stdc++.h> using namespace std; main() { int t; while(cin>>t) { int i, a; for(i=1; i<=t; i++) { cin>>a; if(360%(180-a)==0)cout<<"YES"<<endl; else cout<<"NO"<<endl; } } return 0; }
#include "rules.h" rules::rules() { } rules::rules(float width, float height) { if (!font.loadFromFile("arial.ttf")) { //handle error } menu[0].setFont(font); menu[0].setColor(sf::Color::Red); menu[0].setString("Press 'A' key to return to menu" ); menu[0].setPosition(sf::Vector2f(0, 500)); menu[0].se...
#include <iostream> using namespace std; int main() { long long a1, b1, a2, b2, t; cin >> t; for (int i = 0; i < t; i++) { cin >> a1 >> b1 >> a2 >> b2; if (a1 != b2) cout << a1 << " " << b2 << endl; else cout << a1 << " " << b2 - 1 << endl; } }
#include <iostream> #include <cstdio> #include <memory.h> #include <assert.h> #include <algorithm> #include <cmath> #include <set> #include <stack> #include <cstdlib> #include <vector> using namespace std; struct Tp { int x, y; } man[2222]; int n, m, k, s; int b[22][22]; struct Te { int x, y, f, c; } e[22222...
#include "settings.h" #include "ui_settings.h" bool bold = false; bool italic = false; bool underline = false; QColor color; Settings::Settings(QWidget *parent) : QDialog(parent), ui(new Ui::Settings) { ui->setupUi(this); } Settings::~Settings() { delete ui; } void Settings::on_fontName_currentInde...
#include <iostream> #include <fstream> #include <cstdlib> #include <cstdio> #include <iomanip> #include <cmath> #include <algorithm> #include <sstream> #include <cstring> #include <fstream> #include <vector> #include <string> using namespace std; #ifdef USE_CUBLAS #include <cuda_runtime.h> #include "cublas_v2.h" #incl...
#include <iostream> #include <map> #include <set> #include <string> #include <vector> using namespace std; map<char, int> hand = {{'R', 0}, {'S', 1}, {'P', 2}}; class BIT { public: // 要素数N、値vで初期化 explicit BIT(int N, int v) : V_NUM(N) { data.resize(N); fill(data.begin(), data.end(), v); } ...
#include "graphimpl.h" #include "coveragecalculator.h" #include <string> #include <iostream> #include <regex> #include <string> struct Data { bool mIsRed; }; bool checkIsRed(const Data & data) { return data.mIsRed; } bool isSmaller(const size_t & w1, const size_t & w2) { return w1 < w2; } template<typ...
#include <iostream> #include <sstream> #include <vector> #include <list> #include <queue> #include <algorithm> #include <iomanip> #include <map> #include <unordered_map> #include <unordered_set> #include <string> #include <set> #include <stack> #include <cstdio> #include <cstring> #include <climits> #include <cstdlib> ...
////////////////////////////////////////////////////////// // main.cpp // // FluidSimulation2D // // // // Created by nana on 6/4/15. // // Copyright (c) 2015 na...
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; // Author: Tatparya Shankar // Return sum of digits of a number int getSumOfDigits( int n ) { int dig; int sum = 0; while( n > 0 ) { dig = n % 10; sum += dig; n /= 10; } return sum; } void...
#ifndef _CS2420_DFS_GRAPH_H #define _CS2420_DFS_GRAPH_H #include "graph.h" #include <algorithm> namespace cs2420 { enum class VColor { WHITE, GREY, BLACK }; struct VertexAttr { VColor color = VColor::WHITE; int strime = 0; int ftime = 0; }; class DepthFirstSearch { public: DepthFirstSearch(Graph& g) : g(g), a...
/* -*- 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 LOG_SENDER_H #define LOG_SENDER_H class Upload_OpStri...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define show(x) for(auto i: x){cout << i << " ";} #define showm(m) for(auto i: m){cout << m.x << " ";} typedef long long ll; typedef pair<int, in...
#include "board.h" #include "resource.h" #include <string> using std::string; using std::to_string; board::board(logger *l) { _log = l; // Allocate 18 regions for (int i =0; i<=18; i++) { region *r = new region(); r->id(i); _regions.push_back(r); } _log->debug("regions allocated"); } void boa...
// // Created by 송지원 on 2020/06/03. // //#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int n, x, t; cin >> n >> x; while (n--) { cin >> t; if (t<x) cout << t << ' '; } }
#include "PimplTest.h" #include "Pimpl.h" using namespace common::util::tests; class TestClass { public: TestClass() { } explicit TestClass(int value1, const QString& value2 = QString()) : impl_(value1, value2) { } int getValue() const { return impl_->value1_; } ...
#ifndef PERSONAJE_H #define PERSONAJE_H #include <iostream> using namespace std; class Personaje { public: int vida; int ataque; void logica(); void dibujar(); Personaje(); virtual ~Personaje(); protected: private: }; #endif // PERSONAJE_H
#ifndef A_HPP #define A_HPP #include <iostream> class A { public: A(char d); A(const A&); virtual ~A(); A& operator=(const A&); void show(); private: char data; }; #endif
/* XMRig * Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com> * * 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 * ...
#pragma once #include <QThread> #include <list> #include <mutex> class XDecode; struct AVPacket; class XDecodeThread : public QThread { public: XDecodeThread(); virtual ~XDecodeThread(); public: //数据传入队列处理 virtual void Push(AVPacket* pkt); //Seek位置的时候需要将当前队列的数据清空 virtual void Clear(); //清理资源,关闭线程 virtual vo...
#ifndef POISSON_RGB_H #define POISSON_RGB_H #include "filter.h" #include "poissonSolverRGB.h" class PoissonRGB : public Filter { public: PoissonRGB(); FILTER_API void apply(); FILTER_API void connected(); FILTER_API void disconnected(); FILTER_API void reloadShaders(); FILTER_API inline unsigned int nbI...
#ifndef M01_ENUMS_AND_DEFS_HPP #define M01_ENUMS_AND_DEFS_HPP // Frontend connection initial buffer size. #define M01_FRONTEND_CONN_INITIAL_BUF_SIZE 128 // Custom [M01 app] object type enumeration. // Every user object assigned to uv's [handle->data] // must have fist field [M01ObjType user_obj_type]. typedef enu...
 #include <iostream> using namespace std; struct Rect { //Create a structure int length; int width; Rect(int length, int width) { this -> length = length; this -> width = width; } int area() { return length * width; } }; void print(int * arr, int size) { //print the array for (int i = 0; ...
// Created on: 2009-04-06 // Created by: Sergey ZARITCHNY // Copyright (c) 2009-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...
#include<bits/stdc++.h> using namespace std; main() { int test, amount, total=0; string word; scanf("%d",&test); getchar(); while(test--) { cin>>word; if(word=="donate") { scanf("%d",&amount); total+=amount; } else printf(...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2006 - 2011 * * Web server implementation */ #include "core/pch.h" #ifdef WEBSERVER_SUPPORT #include "modules/viewers/viewers.h" #include "modules/webserver/src/resources/webserver_file.h" #include "...
#include "messages.h" RectObject::RectObject(const QString &text, qreal x, qreal y, qreal width, qreal height, QBrush brush, QGraphicsItem *parent) : QGraphicsObject(parent) , m_text(text) , m_rect(x, y, width, height) , m_pen(brush.color().lighter(), 3.0) , m_brush(brush) { se...
#ifndef STRAT_GAME_MAP_HH #define STRAT_GAME_MAP_HH #include "util/Fixed.hh" #include <entityx/entityx.h> #include <glm/glm.hpp> #include <cstring> #include <cassert> #include <vector> struct GridPoint { glm::ivec2 pos; size_t height; mutable bool dirty; GridPoint() : height(0), ...
#include<iostream> #include<cstdlib> using namespace std; struct node{ int data; struct node* next; }; struct node *head; void insert(int data) { struct node *newnode=(struct node*)malloc(sizeof(struct node)); newnode->data=data; newnode->next=NULL; struct node *temp=head; if(head==NULL) { head=ne...
#pragma once #using <mscorlib.dll> #include "llvm/IR/GlobalValue.h" #include "Constant.h" namespace LLVM { ref class PointerType; ref class Module; ref class Value; public ref class GlobalValue : public Constant { public: enum class LinkageTypes { ExternalLinkage = 0, AvailableExternallyLinkage, LinkOnceAny...
#include <fstream> #include "cp18_1_opt.h" int main() { ofstream in_pix("input_pixels_regression_result_cp18_1_opt.txt"); ofstream fout("regression_result_cp18_1_opt.txt"); HWStream<hw_uint<16> > raw_update_0_read; HWStream<hw_uint<16> > cp18_1_update_0_write; // Loading input data // cmap : { raw_upd...
//: C15:PureVirtualDefinitions.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 // Definicje czysto wirtualnych funkcji // klasy podstawowej #include <iostream> using namespace std; class P...
// Created on: 1999-11-26 // Created by: Andrey BETENEV // Copyright (c) 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 Less...
#include "TriangleMesh.h" #include <iostream> #include "ObjLoader.h" using namespace std; using namespace CGLA; using namespace GLGraphics; namespace Mesh { vector<GLuint> TriangleMesh::convert_sub_meshes_to_triangle_indices(DrawCall &drawCall, bool removeDegenerate){ vector<GLuint> indices = drawCall.indices; ...
#include <iostream> #include <iomanip> int main() { const int tArreglo = 11; int n[tArreglo] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; std::cout << "Distribucion Calificaciones" << std::endl; for (int i = 0; i < tArreglo; i++) { if (i == 0) std::cout << "0-9"; else if (i == ...
#include "utils.hpp" #include "activity_ptts.hpp" #include "actor_ptts.hpp" #include "rank_ptts.hpp" #include "lottery_ptts.hpp" #include "item_ptts.hpp" #include "quest_ptts.hpp" #include "recharge_ptts.hpp" #include "shop_ptts.hpp" #include "utils/time_utils.hpp" #include "mail_ptts.hpp" #include "origin_ptts.hpp" n...
#include "CityDetails.h"
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ncurses.h> #include <string> using namespace std; int n, sum, mul, s[100]; float ave; int input() { scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &s[i]); } void solve() { sum =...
#include "FileDownload.hpp" FileDownload::FileDownload(ResponseContext& ctx, BufferChain& writeChain, struct stat *file) : HttpResponse(ctx) { int fd; if ((fd = open(_route.c_str(), O_RDONLY)) != -1) { setLastModified(file); setContentType(); setCharset(); _contentLength = fil...
// Copyright (c) 2020 Thomas Heller // // 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_base/receiver.hpp> #include <pika/execution_base/sender.hpp> #...
/** * 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...
#ifndef __MATH_FFT_H__ #define __MATH_FFT_H__ /* =============================================================================== Fast Fourier Transform =============================================================================== */ // complex number typedef struct { float re; float im; } cpxFloat_t; class ...
#include<bits/stdc++.h> using namespace std; int main(){ double a=0.5, b=10.5; int c=215,d; char e='A'; printf("%lf + %lf = %lf dayo!\n",a,b,a+b); d=c+11; printf("c is %d!! add 11 de %d dayo!!\n",c,d); printf("e is \"%c\" dayo!!!\n",e); }
#include<string.h> #include<iostream> #include<vector> using namespace std; static int diffMax = 100; // for sake of learning, im not using std max lib :( int getMax(vector<int> arr) { int max = 0; for(int i = 0; i < arr.size(); i++) { if(max < arr[i]) max = arr[i]; } ret...
#pragma once #include "../Component.h" #include <glm/glm.hpp> class Camera : public Component { public: Camera(float fov, float aspect, float zNear, float zFar); ~Camera() {}; glm::mat4 getViewMatrix(); glm::mat4 getProjectionMatrix(); glm::mat4 getViewProjectionMatrix(); void input(float delta); virtual ...
/* * Copyright(c) 2017-2019 WindSoul Network Technology, Inc. All rights reserved. */ /** * Desc: 游戏逻辑相关的常量 * Author: * Date: 2018-04-23 * Time: 21:17 */ #ifndef __LogicConstants_H__ #define __LogicConstants_H__ #include "CoreMinimal.h" #include <DataContainer.pb.h> namespace LogicConstants { //*****************...
/** CS 460 Final Project MCmain.cpp Purpose: Approximate Pi using Leibniz' Formula @author Marcus Corbin @version 1.0 01/04/2020 */ // Includes #include <iostream> #include <cstdlib> #include <math.h> #include <stdlib.h> #include <pthread.h> // Standard Namespace using namespace std; // Global Vari...
#include<iostream> #include<vector> using namespace std; long int s,d,sum; vector<long int> output; long int sum5(int j) { long int sm=0; for(int i=0;i<5;i++,j--) { sm+=output[j]; } return sm; } void build5() { int i; for(i=0;i<5;i++) output.push_back(s); for(i=4;i>=0;i--) { output[...
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct node{ bool is; char s[105]; node * next[128]; }nod[500005],*root; int num,n; char s[10005]; node * cre() { node * p = &nod[num++]; for(int i=0;i<128;++i) p->next[i] = NULL; p->is = NULL; ...
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "blueprintresolver.h" #include "featureexecutor.h" #include "properties.h" #include "matchdata.h" #include "matchdatalayout.h" #include "feature_resolver.h" #include <vespa/vesp...
#include <NetworkModel/NetworkModel/IOCP/IOCP.hpp> #include <Functions/Functions/MySQL/MySQL.hpp> #include "CharacterProcessor.h" #include "../RESULT.h" extern FUNCTIONS::MYSQL::CMySQLPool g_DBPool; void PACKET::CHARINFO::PacketProcessor(FUNCTIONS::CIRCULARQUEUE::QUEUEDATA::CPacketQueueData* const Data) { using name...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <sstream> #include <string.h> #include <queue> #include <vector> #include <set> #include <map> typedef long long LL; typedef unsigned long long ULL; #defin...
#ifndef BG_H #define BG_H #include <QImage> #include <QRect> class Bg { public: Bg(); ~Bg(); public: void resetState(); //spawn QRect getRect(); void setRect(QRect); QImage & getImage(); QImage image; QRect rect; int position; }; #endif
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. ** */ #ifndef VEGA3DDEVICE_H #define VEGA3DDEVICE_H #ifdef VEGA_SUP...
#include "demon.h" const sf::IntRect Demon::DOWN[4] = {sf::IntRect(19,12,77,93), sf::IntRect(16,132,77,211), sf::IntRect(21,247,82,330), sf::IntRect(19,351,77,429)}; const sf::IntRect Demon::DIE[6] = {sf::IntRect(15, 886, 90, 984), sf::IntRect(146, 886, 220, 986), ...
#include<iostream> #include<math.h> using namespace std; typedef unsigned long long int ll; bool kt(ll n){ if(sqrt(n) == (ll)sqrt(n)) return true; else return false; } int main(){ ll n; cin >> n; if(kt(n)) cout << "yes"; else cout << "no"; return 0; }
/* Overview: Dijkstra's shortest path algorithm has been used to find the shortest path and for second shortest path Yen's algorithm has been used in the assignment which is also the modification of Dijkstra's algorithm. For Dijkstra set class has been used to keep track of the repeatation of ...
// // FileVarObj.h // Landru // // Created by Nick Porcino on 2014 01/1. // // #pragma once #include "LandruVM/VarObj.h" namespace Landru { class FileVarObj : public Landru::VarObj { public: FileVarObj(const char* name); virtual ~FileVarObj(); size_t size() const; uint8...