text
stringlengths
8
6.88M
#include <iostream> #include "antlr4-runtime.h" #include "gen/fichierAntlrLexer.h" #include "gen/fichierAntlrParser.h" #include "RI/BuildIR.h" #include "Programme.h" #include "Constructor.h" #include "dotexport.h" using namespace antlr4; using namespace std; //int main(int , const char **) { int main(int argc, char...
// Copyright (c) 2021 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 // by the Free Software Foundation, with special ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2000 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef COMPLEX_ATTR_H #define COMPLEX_ATTR_H class TempBuffer; ...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 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.engine"; include "adjunct/m2/src/e...
#include <unordered_map> #include <string> #include <iostream> using namespace std; #ifndef MAXSCSI #define MAXSCSI 24 #endif #ifndef BLOCKSIZE #define BLOCKSIZE 2048 /*1MB, 2048sectors*/ #endif #ifndef EXPIREDHOUR #define EXPIREDHOUR 168 /*7 days*/ #endif #ifndef STARTTIME #define STARTTIME 1514736000 /*2018-01-0...
/* * LSST Data Management System * Copyright 2014-2015 AURA/LSST. * * This product includes software developed by the * LSST Project (http://www.lsst.org/). * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free...
#ifndef GAMMA_H #define GAMMA_H #include "TypeDefinitions.h" #include "ZInvisible/Tools/PhotonTools.h" #include "SusyAnaTools/Tools/NTupleReader.h" #include "SusyAnaTools/Tools/customize.h" #include "SusyAnaTools/Tools/searchBins.h" #include "ZInvisible/Tools/ScaleFactors.h" #include "ZInvisible/Tools/ScaleFactorsttBa...
#ifndef CLUE_PIECE_H #define CLUE_PIECE_H #include "Clue.h" #include <string> #include <vector> /* * Represents the component on the board that contains clues */ class CluePiece : public BoardPiece { public: /* * Creates the clue piece */ explicit CluePiece(const std::string &); /* * Provides a string desc...
#include <cstdio> #include <cstdlib> #include <iostream> #include "net/Socket.hpp" #include "net/ServerSocket.hpp" #include "net/NetAddress.hpp" int main(int argc, char **argv) { net::Socket *sock = new net::Socket("teamspeak.wavycolt.com", 13531); sock->send(std::string("PING")); //char buf[13000]; ...
#include <mqtt/subscriber/sub_action_listener.h>
#include <iostream> #include <vector> #include <unordered_map> #include <string> // Great solution. Instead of brute force rotating the sequence // create a signture (encoded as difference between adjacent elements) // so abc get encoded as "bb" and ccc get encoded as "aa" // Then every new string is added to a hash m...
#include <conio.h> #include <iostream.h> void main () { clrscr(); int units,bill; cout <<"\n\n\t\tELECTRICITY BILL CALCULATOR"; cout <<"\n\n\n\nEnter the consumed units: "; cin >>units; if (units <=100) { bill=(units*2); cout <<"\nThe total bill is Rs: "; cout <<bill; } else if (uni...
/* leetcode 137 * * * */ #include <string> #include <unordered_set> #include <algorithm> #include <map> using namespace std; class Solution { public: #if 0 // hash map int singleNumber(vector<int>& nums) { map<int, int> maps; for (auto num: nums){ if(maps.find(num) == maps.end())...
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<(n);i++) #define for1(i,n) for(int i=1;i<=n;i++) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define FORD(i,a,b) for(int i=(a);i>=(b);i--) const int INF = 1<<29; const int MOD=1073741824; #define pp pair<ll,ll> typedef long long int ll; bool...
#include "ScpiParser.h" // RsaToolbox #include "General.h" using namespace RsaToolbox; // Qt #include <QRegExpValidator> /*! * \brief The ScpiParser class uses standard * SCPI conventions to parse incoming data. * * Most SCPI commands have the following format: * `<Menu1><Index1>:...:<MenuN><IndexN> <Paramete...
#include "SnowDisplacement.h" #include "ComputeInfos.h" #include <API/Code/Maths/Functions/MathsFunctions.h> #include <API/Code/Debugging/Error/Error.h> #include <API/Code/UI/Dependencies/IncludeImGui.h> #include <API/Code/Aero/Aero.h> SnowDisplacement::SnowDisplacement( Uint32 _TextureSize, ae::Texture& _HeightMap,...
//连个朴素算法都么想,就开始在网上搜了 结果发现是个回溯法 //看了看别人的算法 大概知道回溯法是个啥了 然后发现自己以前隐约用过 //然后发现 别人的算法有个重复的地方 然后就给他改了改 果然 时间减少一半 //这大概就是学长说要借鉴别人的算法的原因吧 如果闭门造车 估计要卡死在这道题上了 //清华的题卡住不前 大概有一部分原因就是清华的题不好找答案 //根据别人的做了些优化 83% 12MS class Solution { public: vector<vector<int> > combinationSum(vector<int> &candidates...
// https://practice.geeksforgeeks.org/problems/lowest-common-ancestor-in-a-binary-tree/1 #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* left; Node* right; Node(int d){ this->data = d; this->left = NULL; this->right = NULL; } }; Node* ...
#ifndef _PARAMS_ #define _PARAMS_ #ifndef GLOBALS_H_ #define GLOBALS_H_ #include "cocos2d.h" using namespace cocos2d; #if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8 || CC_TARGET_PLATFORM == CC_PLATFORM_IOS ) #define SCALE_FACTOR 0.3 #else // this value is multiplied by the size of the sprite // o...
#ifndef __SEEVENTHANDLER_H__ #define __SEEVENTHANDLER_H__ class SEEventHandler { public: typedef enum { GLUI_EH, GLUT_EH, NUM_EHS } tEventHandler; protected: }; #endif
// Copyright Lionel Miele-Herndon 2020 #include "BTTask_Shoot.h" UBTTask_Shoot::UBTTask_Shoot() { }
#include "dynamicstack.h" #include <iostream> using std::cout; int main(){ DynamicStack<int> ds; for(int i=0; i!=5; ++i) ds.push(i*i*i); for(auto i : ds) std::cout << i << '-'; std::cout << '\n'; }
#ifndef HEADER_CURL_PRINTF_H #define HEADER_CURL_PRINTF_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (...
#include "Player.h" player::player(QString nm) { name = nm; for (int i = 0; i < 5; i++) { diff_dice[i] = true; } } double player::get_combination() { int i, j, k = 0, set = 0, pair = 0; double value = 0, player_priority = 0; dice el[5]; for (i = 0; i < 5; i++) { el[i].editvalue(eleme...
#include "SphinxModel.h" #include <iostream> #include <QString> namespace PrepareSphinxTrainDataNS { using namespace PticaGovorun; void run() { SphinxTrainDataBuilder bld; ErrMsgList errMsg; if (!bld.run(&errMsg)) { auto msg = combineErrorMessages(errMsg).toStdWString(); std::wcerr << msg << std::end...
#ifndef UTILS_H #define UTILS_H #include <android/log.h> #include <core/Godot.hpp> #include <core/String.hpp> #include <core/Variant.hpp> #include <gen/Mesh.hpp> #include <gen/Node.hpp> #include <gen/Object.hpp> #define LOG_TAG "GAST" #define ALOG_ASSERT(_cond, ...) \ if (!(_cond)) __android_log_assert("conditio...
#include "tpltn.h" int main() { // инициализация указателя (pointer) на тип int нулевым значением int* pInteger = nullptr; int t = 40; int DogsAge = 10; int *pDogsInt = &DogsAge; int i = 8; int& r = i; // r == 8 // переменная-указатель хранит адрес ячейки памяти переменной 't' int* p2Int = &t; // вывод адр...
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby ...
#include<iostream> #include<stack> #include<string> //13+3*=12 only for digit not for char using namespace std; bool isOperand(char c) { //if((c>='a' && c<='z') || (c>='A' && c<='Z') || if((c>='0' && c<='9')) return true; return false; } bool isOperator(char c) { if(c=='*' || c=='/' || c=='+' || c=='-') retu...
#include "leaderboardwindow.h" #include "MainWindow.h" LeaderboardWindow::LeaderboardWindow(QWidget *parent) : QMainWindow(parent) { leaderboardWidget = new QWidget(); //LAYOUT PRINCIPAL layoutLeaderboard = new QGridLayout(); //BACKGROUND DE LINTERFACE /*QPixmap bkgnd("./Image/Background.jpg"); bkgnd = bkgnd.s...
#include <iostream> #include "queue.h" using namespace std; int main(){ cout<<"Hello!"<<endl<<"Adding 4, then removing 4 patients:"<<endl; Queue patients; patients.add_to_end("Jack"); patients.print(); patients.add_to_end("Jill"); patients.print(); patients.add_to_end("Ann"); ...
/* Ebike lighting control using arduino nano clone */ #include "Light.h" Light tail; Light head; //modes const int OFF = 0; const int ON = 1; const int FLASHING = 2; //button control constants const int DEBOUNCE_DELAY = 15; const int HOLDDOWN_DELAY = 250; //LED fading constants const int FADE_INCREMENT = 1...
#include <iostream> using namespace std; int numberofOne(bool a[], int low, int high) { if (high >= low) { int mid = low + (high - low)/2; if ((mid == high || a[mid+1] == 0) && (a[mid] == 1)) { return mid+1; } if (a[mid] == 1) { ...
#include "Chtml.h" int main() { Chtml H("A:\\text.txt"); H.read(); H.write(); return 0; }
#include <iostream> #include <vector> class BinaryTree { private: BinaryTree* m_left; int m_value; BinaryTree* m_right; int rlevel = 0; int llevel = 0; BinaryTree* root; std::vector<int> arr; public: BinaryTree(); void add (int, BinaryTree*); void remove (int, BinaryTree*); ...
#pragma once #include <queue> #include <ionshared/misc/util.h> #include <ionir/construct/construct.h> #include <ionir/tracking/symbol_table.h> #include <ionir/misc/type_factory.h> namespace ionir { // TODO: Implement concepts to ensure T is or derives of Construct. template<typename T = Construct> class S...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Animation/AnimInstance.h" #include "PlayerAnimInstance.generated.h" /** * */ UCLASS() class ANIMATIONTEST_API UPlayerAnimInstance : public UAnimInstance { GENERATED_BODY() public: virt...
#include "AppScreen.h" #include "JvGame/JvH.h" #include "LogoState.h" static JvGame* jvgame=NULL; #ifdef WIN32 static void key_handler( UINT message,WPARAM wParam, LPARAM lParam ) { KEYCODE keychar=NONE; switch (wParam) { case VK_UP: keychar = ACODE; break; case VK_DOWN: keychar = DOWNCODE; break; case ...
#include <avr/io.h> #include <avr/interrupt.h> #include <stdio.h> #include <SDL/SDL.h> #include "../../Marlin/configuration.h" #include "../../Marlin/pins.h" #include "../../Marlin/fastio.h" AVRRegistor __reg_map[__REG_MAP_SIZE]; uint8_t __eeprom__storage[4096]; sim_ms_callback_t ms_callback; unsigned int __bss_end;...
#include <bits/stdc++.h> using namespace std; int main(){ string c; string b; cin>>c; int s=0,t; cin>>t; int p=0; while(t--){ cin>>b; for (int i = 0; i < c.size(); i++) { for (int j = 0; j < b.size(); j++) { if(c[i]==b[j]){ i++; p++; } if(p=...
// BEGIN CUT HERE // PROBLEM STATEMENT // Unjumpers is a puzzle played on a board consisting of 100 // squares in a straight line. Pawns are placed in a certain // pattern on the board, and your goal is to see which other // patterns can be created starting from that position. There // are 3 legal moves in Unjumpe...
// // GItemInfo.h // Core // // Created by Max Yoon on 11. 8. 12.. // Copyright 2011년 __MyCompanyName__. All rights reserved. // #ifndef Core_GItemInfo_h #define Core_GItemInfo_h class GItemInfo : public GnMemoryObject { GnDeclareSingleton(GItemInfo); public: static const gtuint mscNumMaxItem = 6...
// Created on: 1993-10-18 // Created by: Christophe MARION // Copyright (c) 1993-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 ...
#define DEBUG_TYPE "IProfiler" #include "llvm/Module.h" #include "llvm/Analysis/Passes.h" #include "llvm/Analysis/LoopPass.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Function.h" #include "llvm/BasicBlock.h" #include "llvm/Support/Debug.h" #include "l...
#include "triangle.h" void draw_point(Mat& img, Point2f fp, Scalar color) { circle(img, fp, 2, color, CV_FILLED, CV_AA, 0); } // Draw delaunay triangles void draw_delaunay(Mat& img, Subdiv2D& subdiv, Scalar delaunay_color) { std::vector<Vec6f> triangleList; subdiv.getTriangleList(triangleList); //获得三角剖分的三角形 std...
#include <time.h> #include "math.h" #include <stdlib.h> #include <stdio.h> #include <sstream> /* Contains information about a particular lidar data point in polar and * Cartesian coordinates */ typedef struct lidar_dist { float ang_rad; float range; double dist_x; double dist_y; } lidar_dist; typedef struct ...
/* * FlipFlop.h * Jean Cleison Braga Guimaraes */ #ifndef FLIPFLOP_H_ #define FLIPFLOP_H_ #include <stdint.h> class FlipFlop { protected: uint32_t dataa; bool cin; public: FlipFlop(); void setDataA(uint8_t dt); void enable(); void disable(); bool flipFlop(); bool apagaLed(); }; #endif /* FLIPFLO...
/* Copyright 2021 University of Manchester Licensed under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http: // www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
#ifndef ALGAE_H #define ALGAE_H //-------------------------------------------------------------------------------------------------------------- #include "SPH/algaeproperty.h" #include "SPH/basesphparticle.h" //--------------------------------------------------------------------------------------------------------...
#include "MainWindow.h" MainWindow::MainWindow(): commandPage(this) { set_default_size(450, 500); set_title("Command GUI"); set_border_width(10); tabs.set_show_tabs(false); tabs.set_show_border(false); Gtk::Box *mainPage = new Gtk::Box; mainPage->set_orientation(Gtk::ORIENTATION_VERTICAL...
// // Moto.h // Apuntadores // // Created by Daniel on 22/09/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #ifndef __Apuntadores__Moto__ #define __Apuntadores__Moto__ #include <iostream> #include "Auto.h" class Moto : public Auto{ public: Moto() {} virtual void Corre(); friend std::ostrea...
/* * CharactorLogin.cpp * * Created on: Jun 17, 2017 * Author: root */ #include "CharactorLogin.h" #include "../ServerManager.h" #include "Log/Logger.h" #include "define.h" #include "../MessageBuild.h" #include "../MsgCommonClass.h" #include "SvrConfig.h" #include "MessageStruct/ServerReturnInt.pb.h" #includ...
// Created on: 1992-04-07 // Created by: Christian CAILLET // Copyright (c) 1992-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the ...
#include "XmlLog.h" static void setText(TiXmlElement*& element, const char* str) { TiXmlText* text = new TiXmlText(str); element->LinkEndChild(text); } static void setLinkNode(TiXmlElement*& father,TiXmlElement*& child, const char*str) { father->LinkEndChild(child); setText(child, str); } static cha...
#include <stdio.h> #include <string.h> using namespace std; char a[100000][100000]; int n; int main() { scanf("%d",&n); for (int i = 0; i < n; ++i) { getchar(); scanf("%[^\n]",a[i]); printf("%s\n", a[i]); } }
// Jakins, Christopher // cfj2309 // 2019-10-2 #include <fstream> #include <iostream> #include <regex> using namespace std; void processToken( string token ) { std::regex GeePea("([!\?][!\?])*((PP*PEA)|(gg*gee)|((g|P)+))"); std::regex Shake("(\\([M-W]([M-W][M-W])*[\\|-])|(\\|[M-W]([M-W][M-W])*[\\(-])|(-[M-W]([M-...
#include "debug.h" #include "WindowGameTimer.h" #include <conio.h> #include "GmoteBaseManager.h" GmoteBaseManager::GmoteBaseManager(void) { mGmote = NULL; } GmoteBaseManager::~GmoteBaseManager(void) { } bool GmoteBaseManager::init(void) { ASSERT(mGmote == NULL); mGmote = new Gmote; mGmote->init(...
// DisplayDialog.cpp : 实现文件 // #include "stdafx.h" #include "OgreEditor.h" #include "DisplayDialog.h" // CDisplayDialog 对话框 IMPLEMENT_DYNCREATE(CDisplayDialog, CDialog) CDisplayDialog::CDisplayDialog(CWnd* pParent /*=NULL*/) : CDialog(CDisplayDialog::IDD, pParent) { } CDisplayDialog::~CDisplay...
// 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 <bits/stdc++.h> #define MAX 2003 using namespace std; vector<int>lista[MAX]; int pre[MAX], low[MAX], pilha[MAX], sc[MAX], scnum, N, kk, verts; int iniciar(); void tarjan(int v); int main() { int e, v1, v2, p; while(scanf("%d %d", &verts, &e) && (verts || e)) { for(int i=0;i<e;i++) {...
#include <iostream> #include <queue> #include <deque> #include <algorithm> #include <string> #include <vector> #include <stack> #include <set> #include <map> #include <math.h> #include <string.h> #include <bitset> #include <cmath> using namespace std; int tc, n; vector<pair<int, int>> point; int visited[103]; bool p...
#ifndef Display_h #define Display_h #include "ComicBST.h" // BST ADT #include "Comic.h" #include "Hash.h" #include "Stack.h" #include <iostream> #include <iomanip> #include <string> using namespace std; //By Matthew Dumanig //************************************* void primaryKeySearchManager(Hash* hashtable); //by ...
#include "cwindicators.h" #include <array> // TaMA //ENUM_DEFINE(TA_MAType_SMA, Sma) = 0, //ENUM_DEFINE(TA_MAType_EMA, Ema) = 1, //ENUM_DEFINE(TA_MAType_WMA, Wma) = 2, //ENUM_DEFINE(TA_MAType_DEMA, Dema) = 3, //ENUM_DEFINE(TA_MAType_TEMA, Tema) = 4, //ENUM_DEFINE(TA_MAType_TRIMA, Trima) = 5, //ENUM_DEFINE(TA_MAType_...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <quic/server/handshake/DefaultAppTokenValidator.h> #include <quic/QuicConstants.h> #include <quic/api/QuicSocket.h> #in...
#include <bits/stdc++.h> #define Pii pair<int,int> using namespace std; int n; Pii a[100]; bool mark[100] = {false}; void input(){ cin >> n; for(int i = 0; i < n; ++i) cin >> a[i].first >> a[i].second; sort(a,a+n); } int main(){ freopen("XEPO.inp", "r", stdin); freopen("XEPO.out", "w", stdout); inpu...
#include <EventManager.h> #include <ColliderComponent.h> using namespace breakout; EventManager::EventManager() { } EventManager::~EventManager() { } EventManager& EventManager::Get() { static EventManager eventManager; return eventManager; } MulticastDelegate<const ColliderComponent&, const ColliderComponent...
#include <iostream> #include <cstdlib> #include <ctime> void allocedArray(char**& array, int row, int column) { array = new char*[row]; for (int i = 0; i < row; ++i) { array[i] = new char[column]; } } void deleteArray(char**& array, int row) { for (int i = 0; i < row; ++i) { delete...
#include<bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back int main() { ll v,i,j; cin>>v; // example 5 ll a[v][v]; for(i=0;i<v;i++) { for(j=0;j<v;j++) { cin>>a[i][j]; } } /* INPUT FORMAT 0 2 0 6 ...
#ifndef GAMECONTROLLER_H #define GAMECONTROLLER_H #include "mainmenu.h" #include "tictacscreen.h" #include "winnerscreen.h" //#include <QMovie> class GameController { public: GameController(); MainMenu *mainmenuScreen; TicTacScreen *tictacscreen; WinnerScreen *winnerscreen; // QMovie *movie; ...
#pragma once #include "base_trie_decl.hpp" class trie final : public base_trie { public: class sub_trie; trie(); trie(trie const& other); trie(trie&&) = default; trie(std::initializer_list < std::pair<key_type, value_type> > init_list); template<class InputIterator> trie(InputIterator first,...
#pragma once #include "scrThread.h" class GtaThread : public rage::scrThread { class PushState { public: PushState(rage::scrThread* thread); ~PushState(); private: rage::scrThread* prevThread; }; public: virtual ~GtaThread() = default; PushState Push() { return PushState{ this }; }; rage::eThreadStat...
#include "util/glutil.h" class IndexBuffer { public: IndexBuffer(const ui32* data, const ui32& count); ~IndexBuffer(); void bind() const; void unbind() const; ui32 Addr() const { return this->ID; }; inline ui32 get_count() const { return this->count; }; private: ui32 ID; ui32 count; }; ...
class Solution { public: int minMutation(string start, string end, vector<string>& bank) { unordered_set<string> bankSet(bank.begin(), bank.end()); if(bankSet.count(end) == 0) return -1; unordered_set<string> startSet({start}), endSet({end}); int mut = 1; while(!startSet.emp...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> using namespace std; const int maxn = 210; i...
#include "FileNetworkManager.h" qint64 MAX = 5; FileNetworkManager::FileNetworkManager(QString address, QPair<QString, QString> tokenPair, QObject *parent) : QNetworkAccessManager(parent), m_address(address), m_tokenPair(tokenPair) { connect(this, SIGNAL(finished(QNetworkReply *)), this, SLOT...
#include <iostream> #include "Product.h" #include "Book.h" #include "Software.h" using namespace std; int main() { const int SIZE = 8; //pointers to each class Product *product[SIZE]; Software *software; Book *book; double price = 0.0; cout << "Enter the price of the book" << endl; cin >> price; book = n...
#include <TimerOne.h> #include "LPD6803.h" //Example to control LPD6803-based RGB LED Modules in a strand // Original code by Bliptronics.com Ben Moyes 2009 //Use this as you wish, but please give credit, or at least buy some of my LEDs! // Code cleaned up and Object-ified by ladyada, should be a bit easier to use /...
//: C08:ConstPointer.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 // Wskazniki do stalych jako argumenty funkcji // i zwracane przez nie wartosci void t(int*) {} void u(const int* cip)...
/** Aerial Device class Author : Mitchell Scott (misc4432@colorado.edu) Project : Rofous Version : 0.1 Date : January 31, 2020 **/ #include <Transformer.hpp> using namespace std; #ifndef __Aerial_Device_H__ #define __Aerial_Device_H__ class Aerial_Device { private: float p; int nProps; float mass; ...
#include "TextTTF.h" #include"cocos2d.h" CCScene* TextTTF::scene() { CCScene* scene = CCScene::create(); TextTTF* layer = TextTTF::create(); scene->addChild(layer); return scene; } bool TextTTF::init() { //初始化父类层 CCLayer::init(); //得到窗口的尺寸 CCSize winSize = CCDirector::sharedDirector()->getWinSize(...
#include <string.h> #include <stdio.h> #include <iostream> using std::cout; using std::endl; using std::cin; #include "Pessoa.h" Pessoa::Pessoa(int diaNa, int mesNa, int anoNa, char* nome) { Inicializa(diaNa, mesNa, anoNa, nome); } Pessoa::Pessoa() { Inicializa(0,0,0); } void Pessoa::Inicializa(int diaNa, ...
//Напишите функцию, которая принимает на вход вектор времени ответа и вычисляет медиану этого вектора. //Вектор может быть неотсортированным. #include <algorithm> #include <iostream> #include <vector> using namespace std; pair<bool, double> CalcMedian(vector<double>& samples) { // верните {true, медиана}, если ...
#ifndef ACCOUNTCREATION_H #define ACCOUNTCREATION_H #include <QDialog> #include <QtSql/QSqlDatabase> #include <QtSql/QSqlError> #include <QtSql/QSqlTableModel> #include <QTableView> #include <QMessageBox> #include <QSqlQuery> #include <QtSql/QSqlDriver> namespace Ui { class AccountCreation; } class A...
// 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....
/* -*- 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 DOM_RANGE_H #define DOM_RANGE_H #ifdef DOM2_RANGE #i...
#include "opencv2/opencv.hpp" #include <vector> #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <cmath> #include <conio.h> #include <chrono> using namespace std; using namespace cv; //功能:给定图像中的一组点(x, y) 两种方法进行拟合曲线,并将曲线画在图上 //2、多项式拟合+绘制 一组点进行拟合 void PointFittingXX(vector<Point>& ...
#pragma once #ifndef GLOBAL_H #define GLOBAL_H //CORE COMPONENT INCLUDES #include <Windows.h> #include <SDL.h> #include "glew.h" #include "SOIL.h" //BUILT IN C++ INCLUDES #include <iostream> #include <string> #include <vector> //COMMON STRUCTS THAT ARE GLOBALLY ACCESSIBLE struct ScreenResolution {int Width, Height;...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 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 M2_SUPPORT //# include "modules/prefs/storage/pfmap.h" ...
#pragma once #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/transform.hpp> #include "AAObject.h" class AACamera : public AAObject { public: AACamera(const char * name); ~AACamera(); //setters void setWorldProjectionMatrix(glm::mat4 projectionMatrix); //getters const glm::mat4 getWorldTransformation...
#include <bits/stdc++.h> using namespace std; int n, m, s1 = 0, s2 = 0; int main() { scanf("%d%d", &n, &m); s2 = ((m + 1) * (n + 1) * m * n) / 4; for(; m >= 1 && n >= 1; m--, n--) s1 += m * n; printf("%d %d", s1, s2 - s1); return 0; }
/*! * @copyright © 2017 Felipe R. Monteiro <rms.felipe@gmail.com> * Francisco Félix <frfelix7@gmail.com> * * @brief Implementação dos métodos da classe mkl_UARTInterrupt. * * @file mkl_UARTInterrupt.cpp * @version 1.0 * @date 1 Dezembro 2017 * * @section HARDWARES &...
#include<stdio.h> #include<conio.h> #include<math.h> void Convert_8(char*, char*); void Set(char*,char*); int binary_decimal(char *binary,int ,int); int Length(char *bp){ int count; for (count = 0; bp[count] != '\0'; count++); return count; } void main(){ char temp[50]; char Binary[50]; char Octal[50]; gets_s(B...
#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...
#include <cmath> #include "../vector3.h" #include "../border.h" /****************************/ /* definizione del contorno */ /****************************/ class Moebius: public Border { public: /* t va da 0 a 4\pi */ double R; double r; Moebius(): R(1.0), r(0.4) {} vector3 border_function(double t) ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author mzdun */ #include "core/pch.h" #include "adjunct/qui...
#pragma once #include "../Engine/Component/IComponent.h" class PlayerComp; class MainMenu : public hg::IComponent { public: enum GameState { MAIN_MENU, LOAD_OPTION, LOAD_MENU, OPTION, LOADING, RUNNING, PAUSE, GAMEOVER, WIN, }; public: void InitGame(); virtual int GetTypeID() const { return s_Typ...
/** * @file Command.h * @author Krzysztof Ciba (Krzysztof.Ciba@NOSPAMagh.edu.pl) * @date 23/11/2006 * @brief template Command class definition */ #ifndef COMMAND_H #define COMMAND_H #include <stdlib.h> #include <sstream> #include <algorithm> #include <vector> #include <complex> #ifndef STRINGPARSE_H #include...
#include <iostream> #include <iomanip> #include <string> #include <map> #include <random> #include <cmath> #include <numeric> #include <algorithm> #include <functional> #include <fstream> #include <string_view> #include <vector> #include <bitset> #include <time.h> using namespace std; using big = unsigned long long i...
#include "stdafx.h" #include "Link.h" Link::Link(Neuron * _from, Neuron * _to, double _weigh) { from = _from; to = _to; weigh = _weigh; } void Link::process() { to->inputs.push_back((from->output)*weigh); } Link::~Link() { }
// Copyright 2015 Stef Pletinck // License: view LICENSE file // SFML includes #include <SFML/Graphics.hpp> // C++ includes // My includes #include "../headers/tile.h" EpTile::EpTile(const sf::Texture& texture) { baseSprite.setTexture(texture); } EpTile::~EpTile() { } void EpTile::Draw(int x, int y, sf::RenderW...