text
stringlengths
8
6.88M
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- ** ** Copyright (C) 2000-2012 Opera Software ASA. 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" #if defined(_N...
#include "GamePch.h" #include "AI_PositionCarrier.h" void AI_PositionCarrier::Init( hg::Entity* entity ) { hg::Entity* player = hg::Entity::FindByTag(SID(Player)); Vector3 playerPos = player->GetPosition(); hg::Entity* boss = hg::Entity::FindByName(SID(FinalBossRadial)); const float top = 81.0f; const float mi...
#include <iostream> using namespace std; class Car { private: int fuelGauge; public: Car(int fuel) :fuelGauge(fuel) {} void showCarState()const { cout << "잔여 연료량: " << fuelGauge << endl; } }; class Truck : public Car { private: int freightWeight; public: Truck(int fuel, int weight) :Car(fuel), freightWeight(w...
// 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 "InvalidTargetFinder.h" #include "CLArguments.h" #include <fstream> #include <iostream> #include "Helpers.h" InvalidTargetFinder::InvalidTargetFinder() { //ctor } InvalidTargetFinder::~InvalidTargetFinder() { //dtor } void InvalidTargetFinder::Go() { if(cppag::CLArguments::GetSingleton().NumArgu...
#include <iostream> #include <arrow/api.h> #include <arrow/io/api.h> #include <arrow/ipc/api.h> int main() { auto read_options = arrow::ipc::IpcReadOptions::Defaults(); read_options.use_threads = false; auto input_file = arrow::io::ReadableFile::Open("hello.arrow").ValueOrDie(); auto reader = arrow::i...
#ifndef IDENSITYCUBEGENERATOR_H #define IDENSITYCUBEGENERATOR_H #include "UberCube.h" #include "Ogre.h" class IDensityCubeGenerator { public: virtual void GenerateDensityCube(UberCube* uberCube, Ogre::Vector3 source, Ogre::Vector3 destination) = 0; }; #endif
#ifndef SHADER_H #define SHADER_H #include <string> #include <GL/glew.h> #include <mesh.h> #include <transform.h> #include <camera.h> #include <glm/gtc/type_ptr.hpp> // Shader helper function declarations std::string LoadShader(const std::string& fileName); void CheckShaderError(GLuint shader, GLuint flag, bool isPro...
/** * \file xmlparser.cpp implementation of xml parser functions * * See LICENSE for copyright information. */ #include <string.h> #include "xmlparser.hpp" #include <expat.h> using std::string; using xmlpp::parser; using xmlpp::delegate; using xmlpp::Attr; static void XMLParser_xmlSAX2StartElement (void *ctx, ...
#ifndef VIEW_HPP #define VIEW_HPP #include <iostream> // std::cout #include <string> // std::string #include <limits> #include "Game.hpp" #include "StringCards.hpp" template <typename T> class View { private : public : // CONSTRUCTEURS ================================================ // View(){ ...
#include "Version_test.h" #ifndef ACCOUNT_H #define ACCOUNT_H #include <string> class Account { public: #if defined(DEFAULT_FCNS) && defined(IN_CLASS_INITS) Account() = default; #else Account(): amount(0.0) { } #endif Account(const std::string &s, double amt): owner(s), amount(amt) { } void ...
#ifndef COMPARISON_H #define COMPARISON_H #include "review.h" #include "product.h" #include "datastore2.h" #include <cstring> using namespace std; struct productNameComp { bool operator()(const Product* lhs,const Product* rhs) { return lhs->getName() < rhs->getName(); } }; struct productReviewComp { DataStore2* ...
#include<iostream> #include<map> #include<bits/stdc++.h> using namespace std; int main() { map<int,vector<int> > Map; /*Map.insert({0,3}); Map.insert({0,2}); Map.insert({2,3});*/ Map[0].push_back(3); Map[-1].push_back(4); Map[0].push_back(3); //Map.insert(0,push_back(4)); map<int,vector<int> > :: iterator...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_accessor_ButtonEntryMyCoupon_ShopPlace.h> #include <_root.ButtonEntryMyCoupon.h> #include <Uno.Bool.h> #include <Uno.Object.h> #include ...
/* -*- 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 DOM_EXTENSIONS_CONTEXTS_H #define DOM_EXTENSIONS_CONTEXTS_H...
#include "stdafx.h" #include "Prof-UIS.h" #include "CUIExtPageNavigatorWnd.h" extern "C" __declspec(dllexport) HWND WINAPI UISalPageNavigatorCreate(HWND parentWindow, HWND messageWindow, UINT message, UINT controlID, int x, int y, int width, int height, DWORD windowStyle) { // access parent window CWnd* parentWindow...
#include "_pch.h" #include "ViewObjPropList.h" #include "whPGFileLinkProperty.h" using namespace wh; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- //--------------------------------------------------------...
/* Copyright 2016 Vladimir Lysyy (mrbald@github) 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 ...
#include "SDL.h" #undef main #include <iostream> #include "Game.h" #include "MainMenuState.h" int main(int argc, char* argv[]) { int const FPS = 60; int const frameDelay = 1000 / FPS; Uint32 frameStart; int frameTime; Game game; game.init("Eight Minute Empire", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERE...
#include<bits/stdc++.h> #define FAST1 ios_base::sync_with_stdio(false); #define FAST2 cin.tie(NULL); using namespace std; #define ll long long #define pb push_back ll dp[100005]; ll freq[100005]; int main(){ FAST1; FAST2; int n,mx=0; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; fre...
#include <iostream> #include <stdlib.h> using namespace std; int main(){ int n, m, resp; cout<<"Ingrese el numero de columnas de la matriz: "; cin>>n; cout<<"Ingrese el numero de filas de la matriz: "; cin>>m; float matriz[n][m]; for (int i = 0; i < n; i++){ for (int j = 0; j < m; ...
#pragma once #include"ProductionManager.h" #include"ParserState.h" #include<iomanip> #include"token.h" #include<vector> #include"SyntaxTree.h" class BottomUpParser { public: BottomUpParser(set<string>terminators, set<string> nonTerminators, vector<vector<string>> productions,string begin="S1",string end="$",string n...
/* * Copyright (c) 2016-2021 Morwenn * SPDX-License-Identifier: MIT */ #include <algorithm> #include <forward_list> #include <iterator> #include <vector> #include <catch2/catch.hpp> #include <cpp-sort/probes/max.h> #include <cpp-sort/utility/size.h> #include <testing-tools/distributions.h> #include <testing-tools/in...
//wtp QuickSort #include <iostream> using namespace std; int partition(int arr[], int start, int end) { int pivot = arr[end]; int pIndex = start; for (int i = start; i < end; i++) { if (arr[i] < pivot) { int temp = arr[i]; arr[i] = arr[pIndex]; arr[p...
#include "chunk.h" #include "world/world.h" Chunk::Chunk(World *world, const VectorXZi &location) : _world(world), _location(location) { } void Chunk::load() { if (_isLoaded) { return; } for (int y = 0; y < CHUNK_HEIGHT; ++y) for (int z = 0; z < CHUNK_SIZE; ++z) for (int x = 0; x...
/* -*- 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" #include "modules/pi/OpWindow.h" #include ...
// Created on: 1997-12-15 // Created by: Philippe MANGIN // Copyright (c) 1997-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 GN...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin>>n; long long arr[n]; for(long long i=0;i<n;i++)cin>>arr[i]; long long count=0,count2=0; for(long long i=0;i<n;i++){ if(arr[i]==0)continue; else{ i++; count++; count2++; if(arr[i]==1){ ...
#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...
/***************************************************************************************************************** * File Name : arrayRotation.h * File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\sites\geeksforgeeks\arrays\page08\arrayRotation.h * Created on : Jan 3, 2014 :: 6:48:44 PM * Au...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 2011-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef VEGADISPATCHTABLE_H #define V...
//Phoenix_RK /* https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/ We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a distance K from the target node. The answer can be returned in any order. Example 1: ...
#include "Fixed.hpp" Fixed::Fixed() : _value(0) { std::cout << "Default constructor called\n"; } Fixed::Fixed(const Fixed &toCopy) { std::cout << "Copy constructor called\n"; *this = toCopy; } Fixed &Fixed::operator=(const Fixed &toCopy) { std::cout << "Assignation operator called\n"; _value = toCopy.getRawBits...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@tiliae.eu * * ~~~~~~~~ * * Lice...
#include <iostream> #include <iomanip> #include <algorithm> #include <cstdlib> #include <cstring> #include <ctime> #include <algorithm> #include "config.h" #include "base.h" void LOG(string message, unsigned char ll) { if (LOG_LEVEL & ll) { cerr << message << endl; } } void displayBI(t_bint* a, t_size...
/* * Copyright (c) 2016-2017 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_DETAIL_MINMAX_ELEMENT_AND_IS_SORTED_H_ #define CPPSORT_DETAIL_MINMAX_ELEMENT_AND_IS_SORTED_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #i...
/* Copyright (c) 2016-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt */ #include "TestSetupActionsTests.h" #include "ProcessActionTests.h" using namespace Ishiko; TestSetupActionsTests::TestSetupActionsTests(const TestNumber& num...
#include "interface/graph/graphNode.h" #include "labrender_graphNodeFactory.h" #include <string> constexpr int PassNodeId = 1; #if 0 { "name": "PostProcessAndBlit", "type" : { "run": "PostProcess", "draw" : "quad" }, "depth" : { "test": "always", "write" : "no", "clear_buffer" : "no" }, "shader" : { "vertex_shader_p...
//--------------------------------------------------------------------------- #ifndef GetMemberProcH #define GetMemberProcH //--------------------------------------------------------------------------- #include "IProcess.h" class GetMemberProc:public IProcess { virtual int doRequest(CDLSocketHandler* client, Input...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> #include <vector> using namespace std; int main() { string str = ""; vector<string> v; //vector<string>::iterator it; cout << "Type: " << endl; int number = 0; string longest = ""; while ((cin >> str) && str != "stop") { if (str.length() >...
/***************************************************************************************** * * * owl * * ...
// Created on: 1992-11-18 // 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 ...
/* E. Zanotti 20151004 tp#01 Tipos de variables */ #include<iostream> #include<string> using namespace std; int main() { unsigned a,b; bool b1,b2; char c1,c2; double d1,d2; string s1; string s2; cout<<"Ingrese dos numeros enteros..\n"; cin>>a; cin>>b; cout<<"Suma="; ...
#include "buttonworkerform.hpp" #include "ui_buttonworkerform.h" ButtonWorkerForm::ButtonWorkerForm(QWidget *parent) : WorkerForm(parent), ui(new Ui::ButtonWorkerForm) { ui->setupUi(this); } void ButtonWorkerForm::timerEvent(QTimerEvent *event) { ui->pushButton->setGeometry((ui->pushButton->x()+25) % ...
#include <stdio.h> #include <GL/gl.h> #include <GL/glut.h> #include <vector> #include <iostream> #include <unistd.h> //#include "PortalSpace2d2.h" #include "Hyperbolic2d.h" #include <Eigen/Core> using Eigen::Matrix2d; using Eigen::Vector2d; //It might be a good idea to have a separate matrix for rotation and for the d...
#include <SDL2/SDL.h> #include <SDL2/SDL_mixer.h> #include "game.hpp" Game::Game() : fullscreen(false) { SDL_Init(SDL_INIT_EVERYTHING); SDL_CreateWindowAndRenderer(640, 480, this->windowFlags(), &window, &renderer); SDL_SetWindowTitle(window, "Pickin' Sticks"); Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 409...
#include <iostream> #include "ListMap.hpp" int main() { cs202::ListMap<int, int> map; std::string command; while (std::cin >> command) { if (command == "put") { int key; std::cin >> key; int val; std::cin >> val; map.put(key, val); } else if (command == "get") { i...
#ifndef Renderer_h__ #define Renderer_h__ #include "../middleware/includes/gl/glew.h" #include "../middleware/includes/gl/glfw3.h" #include "Shaders/shader.hpp" #include "Model.h" #include <memory> #include "FirstPersonCamera.h" #include"KeyFrameAnimationShader.h" #include"md2model.h" #include "Model3D.h" #include "S...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <set> #include <climits> #include <ctime> #include <cmath> #include <string> #include <cctype> #include <cstring> #inc...
#include <iostream> #include <queue> #include <tuple> #include <vector> using namespace std; const int INF = 1 << 30; const int dx[4] = {-1, 0, 0, 1}; const int dy[4] = {0, -1, 1, 0}; int main() { int N, M, sx, sy, l, r; cin >> N >> M >> sx >> sy >> l >> r; --sx, --sy; string S[N]; for (int x = ...
#include "Servo.h" Servo loadServo; // Servo positions, which depend on color input int pos; int pos_min = 90; int pos_max; // Getting incoming color from serial String incoming = ""; int color; // 0 is blue, 1 is orange, 2 is yellow void setup() { Serial.begin(9600); loadServo.attach(9); loadServo.write(90);...
// // nehe27.h // NeheGL // // Created by Andong Li on 10/6/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #ifndef __NeheGL__nehe27__ #define __NeheGL__nehe27__ #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include <GLUT/glut.h> #include "utils.h" #include "SOIL.h" #include <iostream> #include <...
#include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #include <numeric> typed...
#pragma once #include <iberbar/Renderer/RenderCommand.h> #include <functional> namespace iberbar { namespace Renderer { class __iberbarRendererApi__ CRenderCallbackCommand : public CRenderCommand { public: CRenderCallbackCommand(); void SetProc( std::function<void()> Func ) { m_Func = Func; } v...
//#include "stdafx.h" #include "block.h" Block::Block(float startX, float startY) { position.x = startX; position.y = startY; //block.setTexture(AssetManager::GetTexture("C:/Users/Alex/Desktop/IP Bomberman/Bomberman/Assets/block.png")); }
#ifndef CUSTOMBUTTON_H #define CUSTOMBUTTON_H #include<QPushButton> #include<QMouseEvent> #include<QDebug> class CustomButton : public QPushButton { Q_OBJECT public: CustomButton(QWidget *parent); protected: void mousePressEvent(QMouseEvent *event); }; #endif // CUSTOMBUTTON_H
void Manual(){ if(control1 == 'B'){ digitalWrite(RELAY1, HIGH); } else if(control1 == 'b'){ digitalWrite(RELAY1, LOW); } else if(control1 == 'C'){ digitalWrite(RELAY2, HIGH); } else if(control1 == 'c'){ digitalWrite(RELAY2, LOW); } else if(control1 == 'D'){ ...
#include<iostream> #include<vector> using namespace std; class Solution { public: int strStr(string haystack, string needle) { int len1 = haystack.size(), len2 = needle.size(); int i = 0; int j = 0; vector<int> next; //如果模式串和主串都为空,也匹配了,返回0 if (len1 == 0 && len2 == 0) return 0; //如果主串为空,模式串不为空,匹配不了返回-1...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright 2005-2012 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Peter Krefting */ #include "core/pch.h" #ifdef WEBSERVER_SUPPORT...
/*============================================================================== Project: Bulk Synchronous Farm (BSF) Theme: BSF Skeleton Module: Problem-Implementation.cpp (Implementation of the Problem) Prefix: PI Author: Nadezhda A. Ezhova Supervisor: Leonid B. Sokolinsky This source code is a part of BSF Ske...
#pragma once #include <complex> #include <cmath> #include <Image.h> const int SIZE_FFT = 28; const float PI2 = 6.28318530718f; using namespace std::complex_literals; // output onlt Frequency static void FTransform(const Image& image, Image& result) { assert(image.IsSquare() && result.GetH() == image.GetH()); asser...
#include<iostream> #include<cstdio> #include<map> #include<vector> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; int n; string st[110]; bool cmp(string a,string b) { return a.size() < b.size(); } void revense(string &a,string &b) { b = "...
/* -*- 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 DESKTOP_ACCESSIBILITY_EXTENSION_H #define DESKTOP_ACCESSIB...
#include "point.hpp" #include "components/room.hpp" #include "components/ai/ai.hpp" #include "job/jobprovider.hpp" #include "hydroponics/hydroponics.hpp" #include "hydroponics/hydroponicsai.hpp" #include <memory> using namespace ecs; using namespace job; using namespace ai; namespace hydroponics { Ent* make_hyd...
#ifndef EXC_HPP #define EXC_HPP #define REPORT { printf("Invalid\n"); return; } #include "tokenscanner.hpp" #include "tool.h" #include "bookingSystem.h" #include "vector.hpp" #include <string> using std::string; /*UP_DATE 0516 nextToken()的返回值改成了String 保留了firstToken的返回值为string */ void EXECUTOR(ticke...
#include "UnitCommand.h" using namespace BroodWar::Api; namespace BroodWar { namespace Api { namespace Client { UnitCommand::UnitCommand(BWAPIC::UnitCommand command) { instance = new BWAPIC::UnitCommand(command); } UnitCommand::~UnitCommand() { delete instance; } UnitCommand::!Uni...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <map> #include <vector> #include <algorithm> #include <math.h> #define pb push_back using namespace std; struct congviec { int order; float t, s, avg; }; vector <congviec> cv; void input() { int n...
#include <ExtraButton.h> #define rPin 3 #define gPin 5 #define bPin 6 #define nextPin A5 #define lvlPin A4 ExtraButton nextBtn(nextPin); ExtraButton levelBtn(lvlPin); void setup() { pinMode(rPin, OUTPUT); analogWrite(rPin, 255); pinMode(gPin, OUTPUT); analogWrite(gPin, 255); pinMode(bPin, OUTPUT); ...
#include <iostream> #include <sstream> #include <omp.h> #include <vector> #include <chrono> int main(int argc, char** argv) { if(argc > 1) { std::stringstream ss; ss << argv[1]; int numThreads; ss >> numThreads; omp_set_num_threads(numThreads); } #pragm...
// Created on: 1998-08-04 // Created by: Christian CAILLET // Copyright (c) 1998-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 ...
#ifndef _MSC_VER # define winexport #else # ifdef autoexport_EXPORTS # define winexport # else # define winexport __declspec(dllimport) # endif #endif class Hello { public: static winexport int Data; void real(); static void operator delete[](void*); static void operator delete(void*); };
#include "HighScoreFileReader.h" namespace fileio { HighScoreFileReader::HighScoreFileReader(string& file):file(file) { //ctor } HighScoreFileReader::~HighScoreFileReader() { //dtor } void HighScoreFileReader::loadFile() { string line; ifstream myfile (this->file); if (myfile.is_open()) { ...
/*==================================================================== Copyright(c) 2018 Adam Rankin 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 without limitati...
#include<bits/stdc++.h> #define rep(i, s, n) for (int i = (s); i < (int)(n); i++) #define INF ((1LL<<62)-(1LL<<31)) /*オーバーフローしない程度に大きい数*/ #define MOD 1000000007 using namespace std; using ll = long long; using Graph = vector<vector<int>>; using pint = pair<int,int>; const double PI = 3.14159265358979323846; ...
/* * Math functions which will be used in the procedure of generating MED points. */ # ifndef MATHFUNCTIONS_H_ # define MATHFUNCTIONS_H_ # include <RcppEigen.h> # include <unordered_set> // [[Rcpp::depends(RcppEigen)]] // [[Rcpp::plugins(cpp11)]] using namespace Rcpp; using namespace RcppEigen; using namespace Eigen...
// Created on: 2018-06-10 // Created by: Natalia Ermolaeva // Copyright (c) 2018-2020 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....
#include <iostream> using namespace std; int main() { int n; cout << " Enter n" << endl; cin >> n; int candies[100]; cout <<" Enter candies" << endl; for(int i= 0; i< n; i++){ cin >> candies[i]; } int extraCandies, max=0; cout << "Enter extracandies" << endl; cin >> extraCandies; ...
#pragma once #include <vector> using namespace std; class ship { private: vector<int> x; vector<int> y; int rotation; vector<char> symbol; int hp; public: ship(int, int, int, int); int getX(int); int getY(int); int getRotation(); char getSymbol(int); void setSymbol(int, char); int getHP(); int getSize(); ...
// BSD 3-Clause License // // Copyright (c) 2020-2021, bodand // 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, th...
#include "compiler/iterators.hpp" #include "compiler/token_definitions.hpp" #include <boost/test/unit_test.hpp> #include <boost/spirit/home/lex/tokenize_and_parse.hpp> #include <sstream> #include <vector> static bool tokenize( const std::string& source, std::vector< perseus::detail::token >& out_tokens ) { std::s...
#include <Arduino.h> #include <SPI.h> #define CS_PIN 5 #define SCK_PIN 18 #define MISO_PIN 19 #define MOSI_PIN 23 #define LEN_ID 4 #define GET_CHIP_ID 0x9F void chipInit(); void chipGetId(); byte chipId[4]; void setup() { // put your setup code here, to run once: Serial.begin(9600); delay(3000); chipInit(); chi...
#ifndef POINT_H #define POINT_H class Point { public: unsigned int r_index; unsigned int c_index; Point(unsigned int _r_index = 1, unsigned int _c_index = 1); Point getNext(Point lowest, Point highest); friend bool operator==(const Point& lhs, const Point& rhs){ return lhs.r_index == rhs.r_index && lhs...
/******************************** Name: Saiteja Yagni Class: CSCI 689/1 TA Name: Anthony Schroeder Assignment: 04 Due Date: 02/18/2016 *********************************/ #include"process_data.h"//User defined header file whic contains the function prototype for the function that is used in this source ...
#include "update_app.h" #include <QDebug> #include <QMessageBox> #include "utility/encryption.h" #include <json.hpp> #include "utility/raii.hpp" #include "update_widget.h" #include "utility/file.hpp" using json = nlohmann::json; APP_REGISTER(update_app) bool update_app::run() { auto args = this->arguments (); ...
#include <stdio.h> void selection_sort(int arr[], int num) { int temp = 0; int min_index; for(int i = 0; i < num; i++) { min_index = i; for(int j = i + 1; j < num; j++) { if(arr[j] < arr[min_index]) { min_index = j; } } ...
#include <iostream> using namespace std; int main() { int arr[10],n,c=0,i,xc; cout<<"Enter the number of students"; cin>>n; cout<<"\nEnter the no. of candies each student got"; for(i=0;i<n;i++) { cin>>arr[i]; } i=0; c=arr[i]; for(i=1;i<n;i++) { if(arr[i]>c) ...
#ifndef INFO_HPP #define INFO_HPP #include "util/camera.hpp" namespace Screen { int W = 960; int H = 540; } namespace Cam { bool lbutton_down = false; f32 mouse_sensitivity = 0.5f; bool firstMouse = true; float lastx = Screen::W / 2.0f; float lasty = Screen::H / 2.0f; Camera instan...
#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 ...
#ifndef SCALARFIELD_H #define SCALARFIELD_H #include <stdlib.h> // Needed to pass a function to this class when constructing the initial grid of scalars in initialise #include <boost/function.hpp> // This could cause problems, as uint's are popular typedefs typedef unsigned int uint; /** * Construct a spacial scal...
// Created on: 1992-11-24 // Created by: Didier PIFFAULT // 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 GN...
//Phoenix_RK /* https://leetcode.com/problems/longest-continuous-increasing-subsequence/ Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Input: [1,3,5,4,7] Output: 3 Explanation: The longest continuous increasing subsequence is [1,3,5], its le...
#pragma once #include "Types.h" #include "Renderer.h" class Object { public: std::string objectId; Rect objectRect; Rect objectSpriteRect; Object(); virtual void Update(); virtual void Draw(); ~Object(); };
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2009-2011 * * WebGL GLSL compiler -- standalone shell. * */ #include "core/pch.h" #include "modules/webgl/src/wgl_base.h" #include "modules/webgl/src/wgl_context.h" #include "modules/webgl/src/wgl_le...
#pragma once #include <QtWidgets/QWidget> #include "ui_Xplay.h" class Xplay : public QWidget { Q_OBJECT public: Xplay(QWidget *parent = Q_NULLPTR); ~Xplay(); // 定时器 刷新滑动条 void timerEvent(QTimerEvent* e) override; // 窗口尺寸变化 void resizeEvent(QResizeEvent* e) override; // 双击全屏 void mouseDoubleClickEv...
#include "Student.h" Student::Student() { } Student::~Student() { } //Input Student's Information from keyboard void Student::Input() { cout << "Fullname: "; cin.get(sName, 31, '/n'); cout << "Gender(0: male, 1: female): "; cin >> Gender; } //Split Fullname into First name and Last name void Studen...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * Copyright Opera Software 2007, do not distribute. */ #define ENABLE_OP_KEY_F1 YES #define ENABLE_OP_KEY_F2 YES #define ENABLE_OP_KEY_F3 YES #define ENABLE_OP_KEY_F4 YES #define ENABLE_OP_KEY_F5 YES #define ENABLE_OP_KEY_F6 YES #define ...
#pragma once #include <unordered_map> #include <list> template <typename K, typename V> class LRUCache { private: using iterator = typename std::unordered_map<K, V>::iterator; size_t _capacity; std::unordered_map<K, V> _kv; ...
// Created on: 2004-11-24 // Created by: Edward AGAPOV // Copyright (c) 2004-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...
#include "Camera.h" Camera::Camera(float xRotation, float yRotation, float zRotation, const Vertex& position) { _xRot = xRotation; _yRot = yRotation; _zRot = zRotation; _position = position; } Camera::Camera() { _xRot = 0; _yRot = 0; _zRot = 0; _position = Vertex(0, 0, -50); } float Camera::GetXRotation() co...
/* This file is part of the VRender library. Copyright (C) 2005 Cyril Soler (Cyril.Soler@imag.fr) Version 1.0.0, released on June 27, 2005. http://artis.imag.fr/Members/Cyril.Soler/VRender VRender is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...