text
stringlengths
8
6.88M
// // Created by 송지원 on 2020/05/20. // #include <cstdio> using namespace std; int main () { long input; scanf("%ld", &input); printf("%ld", -1 * input); return 0; }
/** * Copyright 2015 ViajeFacil * @author Hugo Ferrando Seage * @author David Jiménez Cuevas * @author Estefanía Ortego García * Se definen las funciones de la ventana grafica dialogNego, * se muestra qué hará cada botón o campo que aparezca (en la ventana gráfica). */ #include "./ui_dialogNego.h" #includ...
#include <algorithm> #include <cppunit/extensions/HelperMacros.h> #include <Poco/Exception.h> #include <Poco/JSON/JSONException.h> #include "cppunit/BetterAssert.h" #include "gwmessage/GWMessage.h" #include "gwmessage/GWGatewayRegister.h" #include "gwmessage/GWGatewayAccepted.h" #include "gwmessage/GWRequest.h" #inc...
// Created on: 1993-07-07 // Created by: Jean Yves LEBEY // 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 GN...
#include "StdAfx.h" #include "GToolAssistFunction.h" #include "MainFrm.h" #include "ChildFrm.h" #include "GameDesignView.h" CGameDesignView* GetActiveView() { CMainFrame* pActivFrame = (CMainFrame*)AfxGetMainWnd(); CChildFrame* childFrame = (CChildFrame*) pActivFrame->GetActiveFrame(); if( childFrame ) { CView...
// Robert Fus // CSCI 6626 - Object-Orientated Principles & Practices // Program 9: Undo/Redo // File: Frame.hpp // 11/18/2019 #ifndef P2_SQUARE_FRAME_HPP #define P2_SQUARE_FRAME_HPP #include "Board.hpp" #include "tools.hpp" #include "Square.hpp" class Board; class Frame { public: Frame() = default; Frame(Bo...
#include <iostream> #include <vector> #include <algorithm> class leakyrelu { public: double _alpha; leakyrelu(double alpha = 0.01) { _alpha = alpha; } vector <double> forward(vector <double> input) { transform(input.begin(), input.end(), input.begin(), [&](double input){ return (_alpha...
#include "Car.h" Car::Car(bool isEngineTurned, int currentSpeed, Gear currentGear) { m_isEngineTurned = isEngineTurned; m_currentSpeed = currentSpeed; m_currentGear = currentGear; if (currentSpeed == 0) { m_currentDirection = Direction::Stop; } switch (currentGear) { case Gear::Back: m_currentDirection ...
// BasicETWConsumer.cpp : Defines the entry point for the console application. // #define INITGUID #include "stdafx.h" #include <Windows.h> #include <stdlib.h> #include <initguid.h> #include <tdh.h> #include <evntrace.h> #pragma comment(lib,"tdh.lib") #define LOG_FILE_PATH L"C:\\Users\\AchinBha\\Sky...
/**************************************************************************** ** Resource object code ** ** Created by: The Resource Compiler for Qt version 5.9.4 ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ static const unsig...
#include "B1PrimaryGeneratorAction.hh" #include "G4LogicalVolumeStore.hh" #include "G4LogicalVolume.hh" #include "G4Box.hh" #include "G4RunManager.hh" #include "G4ParticleGun.hh" #include "G4ParticleTable.hh" #include "G4IonTable.hh" #include "G4ParticleDefinition.hh" #include "G4SystemOfUnits.hh" #include "Randomize....
/* -*- Mode: c++; tab-width: 4; 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. * * @author */ #ifndef _MACAUFILEUTILS_H_INCLUDED_ #define _MACAUFILEUTILS_H_INCLUDED_ ...
#ifndef _GetRoomInfoProcess_H_ #define _GetRoomInfoProcess_H_ #include "../IProcess.h" class Table; class Player; class GetRoomInfoProcess : public IProcess { public: GetRoomInfoProcess(){}; virtual ~GetRoomInfoProcess(){}; virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,C...
#include <algorithm> #include <functional> #include <iostream> #include <numeric> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; int n; vector<int> nums; struct Solution { int solve() { if (n == 1 || n % 2 == 0) return -1; int res = 0; for (int...
#include <QFileDialog> #include <QDebug> #include <QHBoxLayout> #include <QLabel> #include <QMimeData> #include <QUrl> #include <QFileInfo> #include <QDragEnterEvent> #include <QDragLeaveEvent> #include <QDropEvent> #include "FileChooserButton.h" FileChooserButton::FileChooserButton(QString label, QWidget* parent = 0)...
#include <iostream> using namespace std; int main() { std::ios::sync_with_stdio(false); int T,P[100000],A,B,i,sum,minsum,ans; cin>>T; while(T>0) { cin>>A>>B; for(i=0;i<A;i++) cin>>P[i]; ans=0; sum=0; while(ans<A) { if((sum+P[ans])<=B) { sum+=P[ans]; ans++; } else break; } ...
#include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <cmath> using namespace std; class UndoHistory { public: int minPresses(vector <string> lines) { set<string> list; string buff = ""; int cnt = -2; int posHist,posBuff; for (int lp=0; lp<lines.size(); ++lp) { ...
// // Triangle.h // GLFW3 // // Created by William Meaton on 07/12/2015. // Copyright © 2015 WillMeaton.uk. All rights reserved. // #ifndef Triangle_h #define Triangle_h #include "Vector2D.h" namespace Graphics{ class Triangle{ Math::Vector2D v1, v2, v3; public: Triangle(const Math::Vector2D &v1, const M...
template<typename T> void out(T const& t);
#include "Concat.h" #include "../Auxiliaryfunctions.h" std::string Concat::getNewName(std::vector<size_t> idsDna, dataDNA& containerDna,const std::string& paramater) { size_t count = 1; std::string NewdnaName; if (paramater!="@@") { NewdnaName = paramater.substr(1); if(containerDna.i...
#pragma once #include <string> /** * Simple wrapper around spdlog library */ class Logger { public: /** * Initializes spdlog logger * @param logPath where log files will be saved * @param verbose if true logs will be printed to console * @param logName name of log file */ static void...
#include <vector> #include <string> #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include <sstream> #include <set> #include <cmath> #include <map> #include <stack> #include <queue> #include <stdio.h> #include <string.h> #include <numeric> #define L_INF (1) #define INF ...
#include "Utils.h" Utils::Utils() { } StructSettings::Settings Utils::loadSettingsFromFile() { checkSettingsFileExistence(); QFile lSettingsFile(QCoreApplication::applicationDirPath() + QDir::separator() + "config.json"); lSettingsFile.open(QIODevice::ReadOnly | QIODevice::Text); QString lSettingsData = lSett...
#ifndef __ModuleSceneTemple_H__ #define __ModuleSceneTemple_H__ #include "Module.h" #include "Animation.h" #include "SDL_mixer/include/SDL_mixer.h" #pragma comment(lib,"SDL_mixer/libx86/SDL2_mixer.lib") struct SDL_Texture; class ModuleSceneTemple : public Module { public: ModuleSceneTemple(); ~ModuleSceneTemple()...
/* Copyright (c) 2006-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/test-framework/blob/main/LICENSE.txt */ #ifndef _ISHIKO_CPP_TESTFRAMEWORK_CORE_TESTHARNESS_HPP_ #define _ISHIKO_CPP_TESTFRAMEWORK_CORE_TESTHARNESS_HPP_ #include "TestContext.hpp" #include "TestSeque...
#include "Snake.h" #include <time.h> #include <Windows.h> #include <conio.h> #define WALL cout<<"¡ö" Snake snake; static int Grade = 1; /**************************************Main***************************************/ int main() { Menu(); return 0; } /***************************************************...
#ifndef MULT_H #define MULT_H #include "Mult.h" Mult::Mult() { value1 = 0; value2 = 0; } Mult::Mult(Base* input1, Base* input2) { value1 = input1; value2 = input2; } double Mult::evaluate() { return (value1->evaluate() * value2->evaluate()); } #endif
// BEGIN CUT HERE // PROBLEM STATEMENT // // John thinks 4 and 7 are lucky digits, and all other digits // are not lucky. A lucky number is a number that contains // only lucky digits in decimal notation. // // // // You are given ints a and b. Return the number of lucky // numbers between a and b, inclusive. ...
#include <bits/stdc++.h> using namespace std; const int N = 220; const int P = 1e9 + 7; int a[N], b[N], c[N], d[N], e[N], dp[N]; long long s[N]; void solve(int *c, int m, long long n, int *a) { static int b[N + N]; memset(a, 0, sizeof(a[0]) * m); a[0] = 1; for (int i = 59; i >= 0; i--) { if (...
#include <stack> #include "../headers/MemoryManagerSwitcher.h" #include "../headers/StdMemoryManager.h" #include "../headers/IMemoryManager.h" //#include "../cpps/stdOperators.cpp" void MemoryManagerSwitcher::pushManager(IMemoryManager* man) { man->prev = recManager; recManager = man; } void MemoryManagerSwitcher::...
#include "BaseWindow.h" // for whatever reason this is not in my header files, still works though. #define WM_MENUCOMMAND 0x0126 #include <map> #include "..\RobotException.h" std::map<HWND, BaseWindow*> windowMap; bool BaseWindow::classCreated = false; const char szClassName[ ] = "BaseWindow"; BaseWindow::BaseWind...
#include "Sim.hh" #include "Map.hh" #include "util/Profiling.hh" Sim::Sim(const GameSettings &settings) : state(settings) { } void Sim::runTick(const std::vector<Order> &orders) { PROFILE(tick); for (auto &order : orders) { if (state.isOrderValid(order)) state.runOrder(order); } ...
#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...
/** * created: 2013-4-7 0:01 * filename: FKEncDec * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #include <wchar.h> #include "../Include/Endec/FKEncDec.h" #include <string.h> #include "../Include/Dump/FKDumpErrorBase.h" //-------...
//////////////////////////////////////////////////////////////////////////////////////////////////// // NoesisGUI - http://www.noesisengine.com // Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved. //////////////////////////////////////////////////////////////////////////////////////////////////// #ifnd...
/* Copyright (c) 2015, Vlad Mesco 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 conditions and the follo...
/********************************************************************* ** Author: Christopher Matian ** Date: July 5th, 2017 ** Description: A small program that takes the sum of five numbers and outputs their averages. *********************************************************************/ #include <iostream> using ...
#include <bits/stdc++.h> using namespace std; int main() { int a; float b,c,d,e; scanf("%d",&a); while(a--){ scanf("%f %f %f",&b,&c,&d); e=sqrt((b*b)+(c*c)); printf("%0.2f %0.2f\n",d-e,d+e); } return 0; }
#pragma once #include "Piece.h" #include <vector> class PieceManager final { public: // Determines the first two tetromino sequences static void InitGame(); // Gives the piece in storage and moves onto the next piece static Piece GetNextPiece(bool removeFromList = true); // Replaces the current piece with t...
#ifndef BPUCK2_H #define BPUCK2_H class BPuck2Manager; class BPuck2 { public: BPuck2(BPuck2Manager *puckManager, unsigned int puckID); virtual ~BPuck2(); unsigned int getID() { return m_puckID; } bool awake(); int setPropertyUInt32(unsigned char puckProperty, unsigned int value, bool verify...
#pragma once #include "skfind/backend/native/native.h" namespace mysk { const TCHAR TAB_NAME_WORDLIST[] = _T("WordList"); const TCHAR TAB_NAME_RESULTS[] = _T("Results"); const TCHAR TAB_NAME_CONTENT[] = _T("Content"); enum QueryMode { QUERY_MODE_INDEX_HWDLIST, QUERY_MODE_INDEX_PHRVERB, QUER...
/* * Copyright 2019 LogMeIn * * 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 w...
#include <iostream> #include <math.h> bool prime( int num ) { for( int i = 2; i <= sqrt(num); ++i ) { if( 0 == num % i ) { return false; } } return true; } bool primeDivisors( int num1, int num2 ) { int n = 0; bool flag = true; for (int i = 2; i <= num1; ++i) { ...
#pragma once #include <windows.h> #include <time.h> #include <iostream> static HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); //--------------------------------------------------------------------------------------- enum Direction { Up, Down, Left, Right, None }; //char MapCell { Empty, Wall }; enum State { Idl...
#ifndef SCREEN_H #define SCREEN_H #include <SDL.h> namespace pawstef { class Screen { public: const static int screenWidth = 800; const static int screenHeight = 600; private: SDL_Window *window; SDL_Renderer *renderer; SDL_Texture *texture; Uint32 *buffer1; Uint32 *buffer2...
// Example 7.6 gtkmm // 2020 by Oleksiy Grechnyev #include <gtkmm/application.h> #include "./HelloWorld.h" int main(int argc, char** argv) { auto app = Gtk::Application::create(argc, argv, "org.hell"); HelloWorld hw; return app->run(hw); }
// Copyright (C) 2012 - 2013 Mihai Preda #include "Decompile.h" #include "Value.h" #include "VM.h" #include "Proto.h" #include "Object.h" #include "String.h" #include "StringBuilder.h" #include <stdio.h> #include <string.h> #include <assert.h> #define _(n) #n static const char *opNames[] = { #include "opcodes.in...
#include <iostream> #include <queue> typedef long long ll; using namespace std; int main() { int t, n, k; cin >> t; while(t--) { cin >> n >> k; priority_queue<ll> maxPQ; ll num; for(int i=0; i<n; ++i) { cin >> num; maxPQ.push(num); } ll tot = 0; for(int i=1; i<=k; ++i) ...
#include "precompiled.h" #include "shader/shader.h" #include "shader.h" using namespace shader; StdShader::StdShader(const char* name) : Shader(name) { } StdShader::~StdShader() { } bool StdShader::load(const char* filename) { return false; } void StdShader::setTexture(int type, texture::DXTexture* texture) { } ...
#include "Globals.h" #include "Application.h" #include "ModuleWindow.h" #include "Pinball.h" #include "ModuleRender.h" #include "ModuleInput.h" #include "ModuleFadeToBlack.h" #include "ModuleSceneIntro.h" #include "ModulePhysics.h" #include "ModuleAudio.h" #include "Colliders.h" #include "ModulePlayer.h" #include "Mod...
// Test Message Manager Widget // // Copyright (C) 2008 // Center for Perceptual Systems // University of Texas at Austin // // jsp Mon Aug 11 20:51:55 CDT 2008 #include <QApplication> #include <iostream> #include "test_message_manager_widget.h" using namespace flying_dragon; using namespace std; int main (int argc,...
// Copyright (c) 2021 ETH Zurich // // 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.hpp> #include <pika/execution_base/any_sender.hpp> #include <pika...
/* Copyright (c) 2014 Mircea Daniel Ispas This file is part of "Push Game Engine" released under zlib license For conditions of distribution and use, see copyright notice in Push.hpp */ #pragma once #include "Core/Enum.hpp" #include "Render/Color.hpp" #include "Render/Shader.hpp" #include "Render/Texture.hpp" #includ...
#include "cpptest.h" #include "core/threads/src/IWorkItem.h" CPPTEST_CONTEXT("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadPoolSingletonManager.cpp"); CPPTEST_TEST_SUITE_INCLUDED_TO("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadPoolSingl...
/* * @lc app=leetcode.cn id=241 lang=cpp * * [241] 为运算表达式设计优先级 */ // @lc code=start class Solution { public: bool isOperation(char c){ return c=='+' || c=='-' || c=='*'; } vector<int> diffWaysToCompute(string input) { vector<int> numList; vector<char> opList; int num = 0...
#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 double eps = 1e-6; struct point { double x,y; }; point a[1010],b[10001...
#include "stdafx.h" #include "enemy.h" HRESULT enemy::init() { IMAGEMANAGER->addImage("利厚青扁", "image/enemy.bmp", 104, 68, true, RGB(255, 0, 255)); IMAGEMANAGER->addImage("利秋扁", "image/enemy1.bmp", 50, 70, true, RGB(255, 0, 255)); IMAGEMANAGER->addFrameImage("利气惯", "image/enemyExplosion.bmp", 350, 44, 8, 1); time =...
#pragma once #include <SFML/Graphics.hpp> #include <time.h> #include <windows.h> #include <iostream> #include <thread> #include "Window.h" #include "Background.h" #include "GameInfo.h" #include "LevelManager.h" #include "LevelEvent.h" #include "Shoot.h" #include "Player.h" #include "Explosion.h" #include "Particle.h" ...
#if !defined(__GMOTE_H__) #define __GMOTE_H__ #include "Commthread.h" #include "Motioner.h" #if 0 // 옛날 샘플 포맷 struct Sample { bool mLowBattery; float mAccelX, mAccelY, mAccelZ; bool mButtonUp, mButtonDown, mButtonLeft, mButtonRight; bool mButtonSelect, mButtonExtra; int mGyro; Sample() ...
#include "../src/WaveModel.h" #include <cassert> int main(){ WaveModel vague = WaveModel(); assert(vague.getWindDirection().size() == 3); assert(vague.getAlign().size()==2); assert(vague.getIntensity()==0); assert(vague.getWaveLength()==0); assert(vague.getHeightAjust()==0); assert(vague.getTime() ==0); Dvec...
// Loads an obj model and renders it with shaders. // Necessitates some more modern OpenGL usage. // C headers #include <stdio.h> #include <unistd.h> #include <inttypes.h> #include <errno.h> #include <string.h> #include <libgen.h> // C++ headers #include <vector> // Project headers #define SILKIE_GL_THREE_PLUS // ...
/* -*- 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 __FL_BYTES_H__ #define __FL_BYT...
#include "Utils.h" Ren::Vec2f Gui::MapPointToScreen(const Vec2i &p, const Vec2i &res) { return (2.0f * Vec2f((float)p[0], (float)res[1] - p[1])) / (Vec2f)res + Vec2f(-1, -1); }
#pragma once #include "envoy/registry/registry.h" #include "extensions/grpc_stream_demuxer/grpc_stream_demuxer_factory.h" namespace Envoy { namespace Extensions { namespace GrpcStreamDemuxer { class GrpcStreamDemuxerFactoryImpl : public GrpcStreamDemuxerFactory { public: /** * TODO (vmunukutla): Pass in GrpcSt...
#include "../../headers/handlers/ClientHandler.h" #include "../../headers/parser/Parser.h" void* parsingThread(void* arg); void clientHandler(ClientData* client) { std::cout << "-------------------------------------->>" << std::endl; char* buf = (char*)calloc(sizeof(char), MAX_MESSAGE_SIZE); checkConne...
#include <iostream> #include <gsl/gsl_sf_gamma.h> #include <gsl/gsl_integration.h> #include "levinBase.h" #include "levinIteration.h" #include "levinFunctions.h" #include <vector> #include <fstream> using namespace std; // dummy struct struct integral_params{ int a = 1; }; double F(double chi0, void* pp) { re...
#pragma once #include "Preamble.h" #include "LinearTheory.h" class MyChiSquared { public: MyChiSquared( mat xin, mat yin, mat ein); void setParameters( mat params ); double evaluate(); private: Linear function; mat xMatrix, yMeasured; mat inverseErrorMatrix; };
// // Created by micky on 15. 5. 20. // #ifndef JUDGESERVER_JUDGESERVER_H #define JUDGESERVER_JUDGESERVER_H #include <map> #include <tuple> #include <bsoncxx/builder/stream/document.hpp> #include <bsoncxx/builder/basic/document.hpp> #include <bsoncxx/json.hpp> #include <mongocxx/client.hpp> #include <mongocxx/uri.hpp...
// Copyright (c) 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.1 as published // by the Free Software Foundation, with special ...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> #include <map> using namespace std; typedef long long ll; #define INF 10e17 // 4倍しても(4回足しても)long longを溢れない #de...
#ifndef SELECTOR_H #define SELECTOR_H #include <SFML/Graphics.hpp> #include <SFML/Window.hpp> #include <SFML/System.hpp> #include <iostream> #include "GameDimens.h" #include "Animation.h" using namespace std; class Selector : public sf::Sprite { public: Selector(std::string name="selector.png")...
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll a[100000], b[100000]; main() { ll n, m; while(cin>>n>>m) { ll i, x, j; for(i=0; i<n; i++)cin>>a[i]; j=0; for(i=0; i<m; i++) { cin>>x; if(x>=a[j] && j<n)j++; } i...
/* Stack header by Alan Agon */ #include "node.h" class Stack { public: //Constructors Stack(); Stack(int c); //Return the capacity of this stack int capacity(); //Return the number of items in this stack int size(); //Add data to the stack void push(int d); //Remove data from the stack int pop(); ...
/** * @file robot_motion_handler.cc * * @copyright 2017 3081 Staff, All rights reserved. * * @author Zijing Mo <zijingmo888@gmail.com> */ /******************************************************************************* * Includes ******************************************************************************/ #...
#include <iostream> template<typename T> T adder(T v) { std::cout << __PRETTY_FUNCTION__ << std::endl; return v; } template<typename T, typename ... Args> T adder(T first, Args... args) { std::cout << __PRETTY_FUNCTION__ << std::endl; return first + adder(args...); } // // Tuple definition // templat...
#ifndef RGB_H #define RGB_H #include <Arduino.h> class RGB{ private: byte _r; byte _g; byte _b; byte _l; public: RGB(); RGB(byte,byte,byte); RGB(byte,byte,byte,byte); RGB hex2rgb(uint32_t); RGB hsl2rgb(uint16_t, uint8_t, uint8_t); uint8_t hsl_convert(float c, float t1, floa...
// Created on: 2012-11-13 // Created by: Peter KURNEV // Copyright (c) 2012-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 ...
// Copyright ©2016 Black Sphere Studios // For conditions of distribution and use, see copyright notice in "bss_util.h" #ifndef __C_UBJSON_H__BSS__ #define __C_UBJSON_H__BSS__ #include "cDynArray.h" #include "cStr.h" #include "bss_util.h" #include "variant.h" #include "cSerializer.h" #include <sstream> #include <istr...
#include "Detection.h" using namespace cv; using namespace std; Detection::Detection(): rect(Rect(0,0,0,0)), response(0) {} Detection::Detection(Rect rect, float response): rect(rect), response(response) {} double Detection::area() const { //return width * height; return rect.area(); } double Detec...
#include <iostream> #include <queue> void test0() { std::priority_queue<int> q; q.push(15); q.push(4); q.push(10); std::cout << "top = " << q.top() << std::endl; } int main() { test0(); return 0; }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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. */ #include "core/pch.h" #ifdef OPERA_AUTH_SUPPORT #include "module...
#include <Ogre.h> #include <OIS/OIS.h> #include "EndState.h" #include "PlayState.h" #include "GameManager.h" #include "StartState.h" using namespace Ogre; using namespace OIS; EndState EndState::mEndState; void EndState::enter() { //mGUI = new BetaGUI::GUI("Font/Magic36", 50); //mGUI ->injectMouse(<pointer x>, <...
#include "arete.h" #include "sommet.h" #include "graphe.h" #include "mainwindow.h" #include <QGraphicsScene> #include <QGraphicsSceneMouseEvent> #include <QPainter> #include <QStyleOption> #include <QLinearGradient> #include <QDebug> #include <QApplication> Sommet::Sommet(Graphe *graphe, qreal id) : graph(graphe)...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2009-2011 * * WebGL compiler -- string representations (JString derived.) * */ #ifndef WGL_STRING_H #define WGL_STRING_H #include "modules/webgl/src/wgl_base.h" /** A JString-like/lite implementatio...
/** * Copyright (c) 2017 Darius Rückert * Licensed under the MIT License. * See LICENSE file for more information. */ #pragma once #include <glm/glm.hpp> #include <string> #include <vector> struct ObjMaterial{ std::string name; glm::vec4 color = glm::vec4(0,1,0,0); float Ns = 0.2f; //specular ...
#pragma once #include "MazeGenerator.h" #include "Direction.h" class Maze { public: Maze(void); ~Maze(void); void newMaze(int width, int height); // Create new maze (input size?) bool isValidMove(float x, float y, Direction face); // Collision detection int getWidth(); int getHeight(); int **getMaze(); void...
/* * ==================================================================== * appuifwmodule.cpp * * Python API to Series 60 application UI framework facilities * * Implements currently (16.03.05) following Python types and functions: * * Application (an implicit instance "app" always present) * unicode full_name()...
#if _MSC_VER > 1000 #pragma once #endif #ifndef __DBGSession_h_ #define __DBGSession_h_ #include "windows.h" #include <tchar.h> #include "dbgeng.h" #include "DebugEventCallbacks.hpp" #include "IOCallbacks.hpp" /* * This class is used to host the main debugging loop in a separate thread. * The main ...
/* * CRedisInterface.h * * Created on: Oct 11, 2017 * Author: root */ #ifndef REDIS_CREDISINTERFACE_H_ #define REDIS_CREDISINTERFACE_H_ #include <string> #include <stdarg.h> #include "RedisConnPool.h" using namespace std; namespace CommBaseOut { class CRedisInterface { public: CRedisInterface(); ~...
// // main.cpp // Tarea3Ejercicio2 // // Created by Daniel on 07/10/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include <iostream> #include "ListaEnlazada.h" int main(int argc, const char * argv[]) { int n, m; float temp; std::cout<<"Escoga el tamano de la primera lista: "; st...
/** * @author: Karthick < karthikn2099@gmail.com > * @github: https://github.com/karthikn2098 * @date: 15/01/2018 */ #include <iostream> using namespace std; void fizzBuzz1(int N) { for( int i = 1 ; i <= N ; i++ ) { if( (i % 3 == 0) && (i % 5 == 0) ) { cout << "FizzBuzz "; } ...
#include "Texture.h" #include "VertexArray.h" #include "VertexBuffer.h" #include "IndexBuffer.h" #include "VertexBufferLayout.h" #include "Shader.h" #include "Renderer.h" #include <gL\glew.h> #include <gl\glfw3.h> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> class Fish { vector<float>...
#include "MainWindow.h" #include "ui_MainWindow.h" #include <QPainter> #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); setWindowIcon(QIcon("://app.ico")); startTimer(100); } void MainWindow::timerEvent(QTimerEvent *) {...
// Created on: 2003-11-12 // Created by: Alexander SOLOVYOV // Copyright (c) 2003-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...
/************************************************************************ Class Name: qStateManager Date: 10/30/02 Purpose: This is a derived class of the Function Manager. It maintains a stack of function pointers, and runs whatever function is currently on the top of the stack. **************************************...
#include <iostream> #include <algorithm> #include "thread_group.hpp" #include "async.hpp" #include "../time_invocation/time_invocation.hpp" inline void saxpy(float a, float *x, float *y, std::size_t n) { int i = test::this_thread_group::get_id() * test::this_thread_group::size() + test::this_thread::get_id(); if(...
/* * Copyright (c) 2014-2017 Detlef Vollmann, vollmann engineering gmbh * * 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) */ #ifndef CIRCLE_HH_SEEN_ #define CIRCLE_HH_SEEN_ #include "pathBase.hh" namespace ex...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- // // Copyright (C) 2003-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 UNIX_LAUNCH_PI_H #define UNIX_LAUNCH_PI_H #includ...
#pragma once #include "net/conn.hpp" #include "net/stream.hpp" #include "net/server.hpp" #include "utils/client_process_base.hpp" #include "proto/processor.hpp" #include "proto/ss_base.pb.h" #include "proto/ss_log.pb.h" #include <map> #include <memory> #include <boost/core/noncopyable.hpp> using namespace std; namesp...
#include "SalesMan.h" SalesMan::SalesMan() { } void SalesMan::init() { cout << "请输入销售员的姓名:"; cin >> _name; cout << "请输入销售人员当月的销售额:"; cin >> monthSaleAmount; rate = 0.04; } void SalesMan::calcSalary() { _salary = monthSaleAmount * rate; } void SalesMan::disInfo() { cout << "姓名:" << _name << endl; cout << "工号...