text
stringlengths
8
6.88M
#include <AFMotor.h> //#include <PID_v1.h> #include "LedControl.h" //define of pins #define PHASE_PIN 22 #define LASER_PIN_L 52 #define LASER_PIN_R 53 #define BUSY_PIN 21 //define for movement #define MOT_R 3 #define MOT_L 4 #define V 160 #define Omega 240 #define T_turn 1500 #define T_straight 2000 //define for ...
#include "Inputs.h" #include "Solutions/AoC_1.h" #include "Solutions/AoC_2.h" #include "Solutions/AoC_3.h" #include "Solutions/AoC_4.h" #include "Solutions/AoC_5.h" #include "Solutions/AoC_6.h" #include "Solutions/AoC_7.h" #include "Solutions/AoC_8.h" #include "Solutions/AoC_9.h" #include "Solutions/AoC_10.h" #include ...
if (wheel_move){ if (wheel_move>0){ wheel_move--; i=0xD8; keyon[i]=TRUE; key[i]=TRUE; key_gotrelease[i]=FALSE; }else{ wheel_move++; i=0xD9; keyon[i]=TRUE; key[i]=TRUE; key_gotrelease[i]=FALSE; } } if (playinstrument){ txtset(t,"?"); t->d2[0]=25; //play MIDI keys txtset...
// //#include<iostream> //#include<string> //#include<stdio.h> //using namespace std; ///*nhap vao hoc sinh .thong tin bao gom: ngay sinh, ho ten ,ma so,diem toan ,ly. tinh diem trung binh // va xuat ra sinh vien do!*/ // //Qui tac: tao lop nho trc! moi goi dc lop do! // //tao class ngay sinh // class ngaysinh // { /...
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <map> #include <cstdio> #include <vector> #include <set> #include <algorithm> #include <sstream> #include <queue> #include <cctype> #include <cmath> #include <fstream> #include <iomanip> #include <set> #include <map> using namespac...
#include<iostream> #include<string> using namespace std; enum class MonsterType { ORGE, GOBLIN, SCELETON, ORC, TROLL }; struct Monster { MonsterType type; string name; double health; }; int main() { Monster monster = { MonsterType::GOBLIN, "Bern", 37.7 }; // Относится к структуре ...
#include "opencv2/core.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <iostream> using namespace cv; using namespace std; static void help(char* progName) { cout << endl << "This program demonstrated the use of the discrete Fourier transform ...
#ifndef MIRRORIMAGEEXPANDER_H #define MIRRORIMAGEEXPANDER_H #include "iimageexpander.h" class MirrorImageExpander : public IImageExpander { public: MirrorImageExpander(); QImage * expand(QImage *original, int expand) override; }; #endif // MIRRORIMAGEEXPANDER_H
#pragma once class ELevel { };
#pragma once #include <SFML/Graphics.hpp> #include "InfiniteGrid.hpp" #include "Wireworld.hpp" /** * @brief Base app class. * */ class Application { public: /** * @brief Init the app. * */ Application(); /** * @brief Main app loop, equivalent to main(). * * @return int Exit code of the program....
#include <string.h> #include <iostream> #include <communicating_tcp_socket.hpp> #include <echo_handler.hpp> namespace request_handler { void echo_handler::handle(server::net::communicating_tcp_socket socket) { char buffer[100]; int received = 1; socket_ = &socket; std::cout << "--- connection!\n"...
// variable.h #include <iostream> using namespace std; namespace expression{ class Variable{ struct Implement; public: Variable(std::shared_ptr<Implement>); Variable(double); Variable(string, const std::vector<Variable>&); ~Variable(); ...
/* 判断某一点/一个区域 是否属于 另一区域 2011 3 29 */ #ifndef IS_POINT_IN_RGN #define IS_POINT_IN_RGN #include <cmath> #include <vector> template <typename T> struct mVector //代表一个向量或一个坐标点 { public: T x,y; mVector() :x(0),y(0) {} mVector(T a,T b) { set(a,b); } void set(T a,T b) { x=a; ...
#include <cstdlib> #include <QDialog> #include <QWidget> #include <QDebug> #include <QMessageBox> #include <QString> #include "mainwindow.h" #include "ui_mainwindow.h" #include "dialog.h" #include "plotter.h" #include "sculptor.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui...
#include <iostream> using namespace std; class Dummy { private: int value; public: Dummy() { value = 0; } Dummy(int val) { value = val; } Dummy operator+(Dummy a) { cout << "Addition occured!" << endl; return Dummy(this->value + a.value); } ...
/* * LuaPool.h * * Created on: Jun 11, 2017 * Author: root */ #ifndef LUA_LUAPOOL_H_ #define LUA_LUAPOOL_H_ #include "LuaInterface.h" #include <deque> #include "../Smart_Ptr.h" #include "../Common.h" #include "../Memory/MemAllocator.h" using namespace std; namespace CommBaseOut { /* * 用于多线程频繁对同一个lua文件进行...
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_PAYMENT_INFORMATION_H_ #define COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_PAYMENT_INFORMATION_H_ #include <strin...
#include <iostream> using namespace std; int arr[1000]; int main(){ int n,i=0,count=0,len; cin>>n; while(n>1){ int namergi = n%2; if(namergi==1){ arr[i]=count; i++; } n/=2; count++; } cout<<i+1<<"\n"; for(int t=0;t<i;t++){ cout<<arr[t]<<" "; } cout<<count<<"\n"; ...
#include "ValidationError.h" namespace etw { ValidationError::ValidationError() {} }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 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 WIDGETS_UPDATE_SUPPORT #include "a...
#ifndef _DEMONPEGTOP_H #define _DEMONPEGTOP_H #include "Enemy.h" #include "Path.h" #include "Globals.h" enum state_pegtop { IDLE_PEGTOP, SHOT_PEGTOP, RETURN_SHOT_PEGTOP, FAREWELL_PEGTOP, DESPAWNING_PEGTOP }; class DEMONPEGTOP : public Enemy { private: iPoint original_pos; Path path; Animation fly; Animatio...
namespace siu { template< size_t SX, size_t SY, size_t SZ > inline ScaleBitMap< SX, SY, SZ >::ScaleBitMap( ) : mShape(), bm_() { } template< size_t SX, size_t SY, size_t SZ > inline ScaleBitMap< SX, SY, SZ >::~ScaleBitMap() { } template< size_t SX, size_t SY, size_t SZ > inline typename ScaleBitMap< ...
#include <string.h> #include <generic_handler.hpp> #include <communicating_tcp_socket.hpp> #include <handler_exception.hpp> namespace request_handler { generic_handler::generic_handler(){} void generic_handler::handle(server::net::communicating_tcp_socket socket) { } void generic_handler::check_commands(cha...
#ifndef COLLISIONMANAGER_H #define COLLISIONMANAGER_H #include <SFML/Graphics.hpp> #include "character.h" #include "room.h" #include "enemy.h" class CollisionManager { public: CollisionManager(Character & character, Room & room); //Empeche le personnage de sortir de la salle; void Lock(); //Gère le...
/** \file WalkRandom.hpp \author UnBeatables \date LARC2018 \name WalkRandom */ #pragma once /* * WalkRandom inherited from BehaviorBase. */ #include <BehaviorBase.hpp> /** \brief This class is responsable for robot's action when ball is lost and robot has already turned around to look f...
#include <stdlib.h> #include <iostream> using namespace std; struct node { int data; struct node* next; }; // void linkedlisttraversal(struct node* ptr){ // cout<<ptr->data; // } int main() { struct node* head; struct node* second; struct node* third; head=(struct node*)malloc(sizeof(struct node)); second=(s...
#include <iostream> #include <sstream> #include <vector> #include <list> #include <queue> #include <algorithm> #include <iomanip> #include <map> #include <unordered_map> #include <string> #include <set> #include <stack> #include <cstdio> #include <cstring> #include <climits> using namespace std; struct Node { int le...
/******************************** Name: Saiteja Yagni Class: CSCI 689/1 TA Name: Anthony Schroeder Assignment: 10 Due Date: 04/20/2016 *********************************/ #include "Shape.h" //Header file which contains defintion of Shape class #include "Shape2.h" #include "Shape3.h" #include...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2006 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** wonko */ #include "core/pch.h" #ifdef MDEFONT_MODULE #ifdef MDF_O...
#ifndef SHAPE_H #define SHAPE_H #include <cmath> #include <iostream> #include <iomanip> using namespace std; const double PI = acos(-1); class Shape { public: Shape(); ~Shape(); virtual double getCircumference() = 0; virtual void showInfo() = 0; virtual int getType() = 0; bool operator>(Shape* shape2); private:...
// space.h #ifndef SPACE_H #define SPACE_H #include "BlobCrystallinOligomer/shared_types.h" namespace space { using shared_types::distT; using shared_types::vecT; class CuboidPBC { public: CuboidPBC(); CuboidPBC(distT len); void set_len(distT len); ...
/* * Traits Implementation * Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com) * * @file: _/Traits.h */ #pragma once #include <type_traits> namespace _ { class null_type {}; //** Prevent a class from being copyable. */ class Noncopyable { Noncopyable (const Noncopyable&) = delete; Noncopyable& oper...
/* * Copyright 2016 Freeman Zhang <zhanggyb@gmail.com> * * 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 applic...
#include <ctype.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std ; extern double exponent_enlongator ( char expr[] ){ char temp[10000] = "" , base[5000] = "" ; int raisePower = 0 , bracket = 0 , start = 0 , end = 0 , power = 0 , power_end = 0 ; int indexForTemp = 0 ; strcpy ( t...
// Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with spe...
/* * 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. */ #ifndef MVFST_USE_LIBEV #include <quic/api/QuicBatchWriterFactory.h> #if !FOLLY_MOBILE #define USE_THREAD_LOCAL_BATCH_WRITER 1 ...
#include <vector> #include <cmath> #include "caffe/filler.hpp" #include "caffe/TEMP_LAYER/dxy_temp_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void DXYTempLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { //this-...
//======include header====== #include "Score.h" //===============C_tors=============== Score::Score(int score) : m_score(score) {}; //---------------------------------------------------------------------------- //===============Helpers=============== // each coin gains (2 * level) points to the score void Score::incr...
#pragma once #include <glm/ext.hpp> #include <vector> using std::vector; class PhysicsObject; class RigidBody; class Plane; struct CollisionInfo { bool bCollision = false; glm::vec2 collNormal; float fPenetration; }; class PhysicsScene { public: PhysicsScene(); ~PhysicsScene(); void ...
#include <Unixfunc.h> #include <iostream> using namespace std; /* 三.线程的退出与清理函数 pthread_canel 与 pthread_cleanup_ * int pthread_cancel(pthread_t __th) 取消子线程函数,此时资源必须手动清理. * void pthread_cleanup_push(void (*routine)(void *), void* arg) * void pthread_cleanup_pop(int execute) 以上为两个资源清理函...
/* This file is part of SMonitor. Copyright 2015~2016 by: rayx email rayx.cn@gmail.com SMonitor 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 Software Foundation, either version 3 of the License, or (at your option) any later ver...
// // Created by 钟奇龙 on 2019-04-16. // #include <iostream> using namespace std; class Node{ public: int data; Node *next; Node(int x):data(x),next(NULL){ } }; Node* getSmallestPreNode(Node *head){ if(!head) return NULL; Node *smallPre = NULL; Node *small = head; Node *pre = head; ...
// // SpellCorrector.h // SoundBoard // // Created by Gregory Klein on 3/14/15. // Copyright (c) 2015 Pure Virtual Studios, LLC. All rights reserved. // #ifndef __SoundBoard__SpellCorrector__ #define __SoundBoard__SpellCorrector__ #include <vector> #include <map> typedef std::vector<std::string> Vector; typedef ...
#include "autotuner_configuration_request_publisher.h" using namespace CAutoTunerConfigurationRequestPublisher; CModelStateRequestPublisher::CModelStateRequestPublisher() { } CModelStateRequestPublisher::~CModelStateRequestPublisher() { } bool CModelStateRequestPublisher::Initialize() { return true; } void CMo...
#ifndef COMPLEX_H_ #define COMPLEX_H_ #include <iostream> class Complex { public: Complex(double = 0, double = 0); Complex(const Complex&); double module() const; double re() const; double im() const; Complex& conjugate() const; Complex& operator=(const Complex&); Complex& operator+(const Complex&...
#include "chunk.h" #pragma once #include "../constants/vector.h" #include "../rendering/color.h" #include "../rendering/mesh.h" #include "axially_aligned/voxel.h" #include "intersection.h" #include "utility.h" #include "ray.h" #include "../utility/functional.h" #include "../utility/numerical.h" #include "../utilit...
// Copyright (c) 2013 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> using namespace std; typedef long long ll; #define INF 10e10 #define rep(i,n) for(int i=0; i<n; i++) #define r...
/* -*- 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. */ #ifndef CSS_MATCHCONTEXT_H #define CSS_MATCHCONTEXT_H #include "m...
// // GameEngineLogic.cpp for game engine logic in /home/deneub_s/cpp_indie_studio // // Made by Stanislas Deneubourg // Login <deneub_s@epitech.net> // // Started on Sat Jun 3 17:10:57 2017 Stanislas Deneubourg // Last update Sun Jun 18 12:17:16 2017 Stanislas Deneubourg // #include "GameEngine/GameEngine.hpp" ...
#include "TemperatureSensor.h" TemperatureSensor::TemperatureSensor() { currentTemperature = 20.0; } double TemperatureSensor::getTemperature(void) { // TODO: get temperature from real sensor currentTemperature += 25.0; return currentTemperature; }
#include "GnSystemPCH.h" #include "GnMemoryDefine.h" #include "GnMemoryManager.h" //void GnMeomeyAssert(const char* pcCondition,const gchar* pcFile // , int iLine, const gchar* pcFunction) //{ // GnLogA("%s:%d (%s) %s -- GnMemAssert failed.\n", pcFile, iLine, pcFunction, pcCondition); //} #ifdef GN_MEMORY_DEBUGGE...
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll as[100000+100]; main() { ll n; while(cin>>n) { ll i, hi, sum=0; for(i=1; i<=n; i++) { cin>>hi; as[i] = hi; if(i==1)sum = hi+1; else { if(a...
#include <gtest/gtest.h> #include <iostream> #include <limits> #include "interpolator.hpp" class my_interpolator : public interpolator<double, double> { public: virtual bool isValid(const double & y) const { return y != invalidValue(); } virtual double invalidValue() const { retu...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; -*- ** ** Copyright (C) 2002-now 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 SELFTEST #include "modules/dochand/w...
#ifndef _ZORK_MAP_ #define _ZORK_MAP_ #include <functional> #include "Zork_Def.hpp" #include "Object.hpp" #include "Container.hpp" #include "Room.hpp" #include <map> #include "rapidxml/rapidxml.hpp" using namespace std; using namespace rapidxml; string emptystr; Object NullObj(emptystr,emptystr,emptystr); class Map...
#include "CommandInfo.h" #include "PluginVersion.h" #include "WeatherMode.h" #include "FormHook.h" #if defined(NEWVEGAS) #define CommandPrefix "NVR" #define PASS_EXTRACT_ARGS EXTRACT_ARGS #elif defined(OBLIVION) #define CommandPrefix "OR" #elif defined(SKYRIM) #include "skse\skse_version.h" #include "skse\PapyrusVM.h" ...
// Created on: 1994-03-14 // Created by: Christian CAILLET // Copyright (c) 1994-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 ...
/* kamalsam */ #include<iostream> using namespace std; int func(char s,int &neg,int &valid,int &activate,int &x) { int val; switch(s) { case 'x': x++; case '*': case '=': valid=0; return 0; case '+': neg=0; valid=0; activ...
#include <cstdio> using namespace std; /// 3. Definir la estructura registro necesaria para almacenar los siguientes datos de /// cada uno de los empleados de una empresa: nombre, apellidos, número de la /// seguridad social, salario, dirección (calle, número, provincia y código postal). /// Para los empleados con ca...
// Copyright (c) 2007-2021 Hartmut Kaiser // // 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/config.hpp> #include <pika/itt_notify/thread_name.hpp> #include <p...
// Copyright (c) 2019 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 ...
// Ticket_ActiveXPropPage.cpp : CTicket_ActiveXPropPage 属性页类的实现。 #include "stdafx.h" #include "Ticket_ActiveX.h" #include "Ticket_ActiveXPropPage.h" #ifdef _DEBUG #define new DEBUG_NEW #endif IMPLEMENT_DYNCREATE(CTicket_ActiveXPropPage, COlePropertyPage) // 消息映射 BEGIN_MESSAGE_MAP(CTicket_ActiveXPropPage, COlePr...
#include <fstream> #include <iostream> #include <set> #include <string> #include <unordered_set> int main(int argc, char * argv[]) { if (argc != 2) { std::cerr << "usage: " << argv[0] << " <filename>\n"; return -1; } // open a file std::ifstream in(argv[1]); if (!in.is_open()) ...
#include <iostream> #include <cstdio> using namespace std; int main() { // Complete the code. int a; long b; char c; float d; double e; scanf ( "%d %ld %c %f %lf", &a,&b,&c,&d,&e); printf("%d\n", a); printf("%ld\n", b); printf("%c\n", c); printf("%.3f\n", d); printf("%.9...
// // Created by 송지원 on 2020/07/01. // #include <iostream> #include <queue> #include <utility> using namespace std; int d[3] = { -1, +1, 0}; int vis[100002]; int N, K; queue<pair<int,int>> Q; pair<int,int> cur; int nd; int main() { cin >> N >> K; Q.push({N, 0}); vis[N] = 1; while (true) { cur...
//--------------------------- #include<iostream> #include<cmath> using namespace std; double f(double x) { return 3*x+4*x*x+sin(x); } //函数形式 double Trape(double a,double b) { return (f(a)+f(b))*(b-a)/2; } //梯形公式 1次代数精度 double MidRect(double a,double b) { return (b-a)*f((a+b)/2); }...
#ifndef ART_RUNTIME_NATIVE_SAMSUNG_H_ #define ART_RUNTIME_NATIVE_SAMSUNG_H_ #include <jni.h> namespace art { void register_samsung_native_methods(JNIEnv* env); } // namespace art #endif // ART_RUNTIME_NATIVE_SAMSUNG_H_
#include <bits/stdc++.h> using namespace std; void pianifica(int R, int A[], int B[], int T[]) { // Trova il massimo tempo long long int maxT = INT_MIN; for (size_t i = 0; i < R; ++i) if (B[i] > maxT) maxT = B[i]; // Trova k; long long int minT = 0; while (minT + 1 < maxT)...
#include "SupportFunctions.h" #include <algorithm> int mcd(int a, int b) { int mcd = 0; int num1 = std::max(a, b); int num2 = std::min(a, b); do { mcd = num2; num2 = num1 % num2; num1 = mcd; } while(num2 != 0); return mcd; } int mcm(int a, int b) { int mcm = 0; int num1 = std::max(a, b); int num2 = s...
#include "../../include/time_leak/transition.hpp" using namespace std; time_leak::Transition::Transition(string id, bool high, TransitionType type) : Element(id) { this->transitionType = type; this->highT = high; } time_leak::Transition::TransitionType time_leak::Transition::GetTransitionType() { ret...
#include <QtGui> #include <QDebug> #include <cmath> #include <iostream> #include <stdio.h> #include "picview.h" #include "uirectangle.h" #include "uicoordinate.h" #include "uicurve.h" using std::cout; using std::endl; PicView::PicView(QWidget *parent) : QWidget(parent) { picNum = 0; pElement = NULL; bezierSelected =...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** 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 "co...
#include "stdafx.h" #include "CppUnitTest.h" #ifndef ELYSIUM_CORE_EXCEPTION #include "../../../Core/01-Shared/Elysium.Core/Exception.hpp" #endif using namespace Elysium::Core; using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace UnitTestCore { TEST_CLASS(UnitTestException) { pu...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> using namespace std; int TongChuSo(int n); int main() { freopen("labiec23.inp","r",stdin); freopen("labiec23.out","w",stdout); int nTest; int n,x,d1=0; scanf("%d",&nTest); w...
#ifndef CORE_DSTEMP_H #define CORE_DSTEMP_H #include "AbstractHandler.h" #define DS18B20_READ_TEMP 10 namespace DS18B20 { class Handler : public AbstractHandler { public: Handler(); virtual void loop() override; virtual void handle(uint16_t dataSize, uint8_t *data) override; ...
/* -*- mode: c++; tab-width: 4; c-basic-offset: 4 -*- */ group "layout.line"; require init; include "modules/layout/box/blockbox.h"; include "modules/layout/content/content.h"; html { //! <!doctype html> //! <html> //! <style type="text/css"> //! body { //! width: 500px; //! } //! div { //! float:right; //! } //!...
#pragma once #include <API/Code/Graphics/Framebuffer/Framebuffer.h> #include <API/Code/Graphics/Mesh/2D/FullscreenQuadMesh.h> #include <API/Code/Graphics/Material/Material.h> #include <API/Code/Graphics/Texture/Texture2D.h> #include <API/Code/Graphics/Shader/Shader.h> #include <API/Code/Graphics/Camera/Camera.h> /// ...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#include <iostream> #include <stdio.h> using namespace std; int main() { int x, y; int xa, xb, xc, ya, yb, yc; for(x = 100; x <= 1233; x++) { y = 1333 - x; xa = x % 10; yc = y / 100; ya = y % 10; xc = x / 100; xb = x / 10 % 10; yb = y / 10 % 10; if(xa == yc && ya == xc && xb == yb)...
/* BEGIN LICENSE */ /***************************************************************************** * SKFind : the SK search engine * Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr> * $Id: wildcardwordlist.cpp,v 1.36.2.4 2005/02/21 14:22:47 krys Exp $ * * Authors: Mathieu Poumeyrol <poumeyrol @at@ idm .do...
#include "include/openglscene.h" #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <string> #include <sys/time.h> #include <math.h> #include <QMouseEvent> #include <QImage> #include <QFileDialog> #include <glm/gtx/euler_angles.hpp> #include "Mesh/meshloader.h" #include "MeshSampl...
#include <iostream> #include <bitset> int main(){ int n; std::cin >> n; std::string binary = std::bitset<64>(n).to_string(); int ones = 0; int target = 0; for (int i = 0; i < binary.length(); i++) { if (binary[i] == '1') { ones += 1; if (ones > target) { ...
#include <LED13.h> #define LED_PIN 13; LED13 led = LED13(13); void setup() {} void loop() { led.blink(3000); }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2011-12 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef PLUGIN_UNIFIED_WINDOWED_H_ #define PLUGIN_UNIFIED_WINDOWED...
/* * gl.h * * Created on: Dec 13, 2011 * Author: ngk437 */ #ifndef WEBGL_H_ #define WEBGL_H_ #include "common.h" using namespace node; using namespace v8; namespace gl { void AtExit(); JS_METHOD(Init); JS_METHOD(Uniform1f); JS_METHOD(Uniform2f); JS_METHOD(Uniform3f); JS_METHOD(Uniform4f); JS_METHOD(Uni...
#ifndef PPLX_PPLX_UTILS_H #define PPLX_PPLX_UTILS_H #include <chrono> #include "pplx/pplxtasks.h" #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) && !CPPREST_FORCE_PPLX namespace Concurrency // since namespace pplx = Concurrency #else namespace pplx #endif { /// <summary> /// Creates a task that completes a...
#pragma once #include "CoreMinimal.h" #include "Engine/DataTable.h" #include "EnemySpawnRegionInfo.generated.h" // 적 스폰 지점 정보를 나타냅니다. USTRUCT(BlueprintType) struct ARPG_API FEnemySpawnRegionInfo : public FTableRowBase { GENERATED_USTRUCT_BODY() public: UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 MaxEnemyC...
#include <iostream> #include <tbb/parallel_reduce.h> #include <tbb/blocked_range.h> #include <algorithm> #include <cstdlib> #include <climits> #include <float.h> using namespace std; using namespace tbb; class MinIndexFinder { const float *const array; public : float value_of_min; size_t ind_of_min; void ope...
#pragma once #include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include "Window.h" #include "GameInfo.h" #include "Player.h" #include "Collider.h" class PowerUp { public: static std::vector < std::shared_ptr <PowerUp> > powerUp; PowerUp(sf::Vector2f pos, std::string name); static void create(sf::Vector2f pos...
#include "animation.h" namespace sge { namespace graphics{ Animation::Animation(int firstFrame, bool lock): m_SpriteSheet(new SpriteSheet(SPRITESHEET_COL, SPRITESHEET_ROW)), m_Frame(0) { addFrame(firstFrame); } Animation::~Animation() {} void Animation::addFrame(int indice) { m_Frames.push_back(m_S...
#include "mouse-widget.h" const QPoint MouseBodyBasePts[] = { {161, 364}, {43, 200}, {43, 200}, {46, 98}, {46, 98}, {117, 40}, {117, 40}, {161, 40} }; const QPoint MouseBodyCtrlPts[] = { {59, 364}, {47, 241}, {42, 197}, {46, 116}, {46, ...
#include "vnabusysignal.h" using namespace RsaToolbox; #include <cassert> QString toScpi(VnaBusySignal signal) { switch (signal) { case VnaBusySignal::Auto: return "AUTO"; case VnaBusySignal::Sweep: return "SWE"; case VnaBusySignal::Segment: return "SEGM"; case VnaBusySign...
/* * 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) */ #include <algorithm> #include <functional> #include <iostream> #include <utility> #i...
#include <sys/stat.h> #include <signal.h> #include "Configure.h" #include "Logger.h" #include "Util.h" #include "Protocol.h" #ifndef WIN32 #include <sys/time.h> #include <sys/resource.h> #include <unistd.h> #include <getopt.h> #endif Configure::Configure() : GameConfig(E_BULL_2017, E_MSG_SOURCE_SERVER) { max_table...
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of th...
// 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 "trapeze.h" #include <cmath> #include <cassert> trapeze::trapeze(const point& p1, const point& p2, const point& p3, const point& p4): p1_(p1), p2_(p2), p3_(p3), p4_(p4) {} trapeze::trapeze(std::istream& is){ is >> p1_.x >> p1_.y >> p2_.x >> p2_.y >> p3_.x >> p3_.y >> p4_.x >> p4_.y; assert(((p2_.x ...
/* * Program: Matching.h * Usage: Define align and match image methods -- RANSAC */ #ifndef MATCHING_H #define MATCHING_H #include "CImg.h" #include "SIFT.h" #include <vector> #define FeatureDescGap 1.0 #define InliersGap 500.0 using namespace std; using namespace cimg_library; struct Point{ int x, y; Point(){ ...
#include <iostream> using std::cout; using std::endl; using std::cin; #include <string> using std::string; #include <vector> using std::vector; #include <fstream> using std::ifstream; #include <sstream> int main() { int new_line = 1; int col = 1; string token; ifstream ifile("Text.txt"); while (std...