text
stringlengths
8
6.88M
/************************************************************************ * @project : $rootnamespace$ * @class : $safeitemrootname$ * @version : v1.0.0 * @description : * @author : $username$ * @creat : $time$ * @revise : $time$ ****************************************************************...
/* * Copyright (C) 2007,2008 Alex Shulgin * * This file is part of png++ the C++ wrapper for libpng. PNG++ is free * software; the exact copying conditions are as follows: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions a...
// ========================================================================== // $Id: g_Vector.cpp 3389 2012-10-19 08:23:25Z jlang $ // Wrapper code to interface g_plane // ========================================================================== // (C)opyright: // // Jochen Lang // SITE, University of Ottawa // ...
/**************************************************************** * TianGong RenderLab * * Copyright (c) Gaiyitp9. All rights reserved. * * This code is licensed under the MIT License (MIT). * *****************************************************************/ #pragma once #include <iostream> namespace...
/* 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...
/* leetcode 39 * * * */ #include<stdio.h> #include<cstring> #include<iostream> #include<algorithm> // std::sort #include<cstring> #include<vector> #include<set> #include<string> #include<map> #include<queue> #include<stack> #include<deque> #include<unordered_set> #include<unordered_map> using namespace std; class ...
#include <stdlib.h> #include <iostream> #include <fstream> #include <memory> #include <typeinfo.h> #include <msxml6.h> #include <vector> #include <exception> #include <Psapi.h> #include <algorithm> #include <map> #include "ConfigSetting.h" #include "stdafx.h" #import "msxml6.dll" namespace JNIBridge { namespace Confi...
#ifndef CModifyIdMessage_H #define CModifyIdMessage_H #include "CMessage.h" #include <QObject> //Ãŵê±àºÅ×¢²á class CModifyIdMessage : public CMessage { Q_OBJECT public: CModifyIdMessage(CMessageEventMediator* pMessageEventMediator, QObject *parent = 0); ~CModifyIdMessage(); virtual bool packedSendMessage(NetMe...
#include <Main.h> int main() { ConcreteRenderController* renderController = new ConcreteRenderController(); renderController->infinity(); renderController->finish(); } float getFrameTimeSeconds() { return (float)ConcreteRenderController::getFrameTimeSeconds(); } vec2 getMousePosition() { return Mouse::getPositi...
#include "widget.h" #include <QApplication> #include <QDebug> //需求,为了传火箭类中的对象,保证只有一个对象实例 class ChairMan { //构造函数私有化 private: ChairMan(){ qDebug()<<"ChairMan"; } ChairMan(const ChairMan& p){} public: static ChairMan * getInstance() { return singleChairMAN; } private: static...
#ifndef TP_PPROJECT_BASECOMMAND_H #define TP_PPROJECT_BASECOMMAND_H #include <iostream> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> #include "src/server/lib/CompanyServer/MainServerLogic/MainLogic/Controller/Controller.h" /* * Base command class */ class BaseCommand { pub...
#include <Inventor/Win/SoWin.h> #include <Inventor/Win/viewers/SoWinExaminerViewer.h> #include "Mesh.h" #include "Painter.h" int main(int, char ** argv) { HWND window = SoWin::init(argv[0]); SoWinExaminerViewer * viewer = new SoWinExaminerViewer(window); //make a dead simple scene graph by using the Coin library...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: Ui::MainWindow *ui; public slots: void SetLabelChange(); public:...
#include <iostream> #include <queue> #include <vector> using namespace std; #define MOD 1000003 // a x + b y = gcd(a, b) // ax = 1 // ax = 1 mod b long long extgcd(long long a, long long b, long long &x, long long &y) { long long g = a; x = 1; y = 0; if (b != 0) g = extgcd(b, a % b, y, x), y -...
// // Copyright 2015 Google Inc. // // 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 ...
#ifndef SHOEMANAGERNETWORKRESULT_HPP #define SHOEMANAGERNETWORKRESULT_HPP #include "shoemanagernetwork_global.h" #include <QString> #include <QJsonObject> #include <QNetworkReply> #include <QJsonParseError> class SHOEMANAGERNETWORKSHARED_EXPORT ShoeManagerNetworkResult : public QObject { Q_OBJECT pu...
#include<iostream> #include<stack> #include<algorithm> #include<vector> using namespace std; class MyQueue { public: /** Initialize your data structure here. */ MyQueue() { //基本思想:使用两个栈,入队O(n),出队O(1) //当栈push新进来一个元素val,则将栈里原来的所有元素依次出栈,val入栈,重新依次入栈,这样就使得新元素val位于栈底了而且原来元素顺序不变 } /** Push element x to t...
#include <Arduino.h> #include <Ethernet.h> #include <Streaming.h> #include <SFEMP3Shield.h> // for debugging // #define DEBUG_RADIO // size of buffer #define MP3BUF_SIZE 65536 // must be a multiple of 32 // bytes in buffer to begin the reproduction (50 to 100% of MP3BUF_SIZE) #define MP3BUF_REFILL (65536/8)*7 #defi...
#include "heater.h" #include "arduinoIO.h" heaterSim::heaterSim(int heaterPinNr, adcSim* adc, int temperatureADCNr, float heaterStrength) { this->heaterPinNr = heaterPinNr; this->adc = adc; this->temperatureADCNr = temperatureADCNr; this->heaterStrength = heaterStrength; this->temperature = 20; } ...
/********************************** * Manchester Sampling Based Decode * Arduino Uno * pin 2 as external interrupt **********************************/ #define inputPin 2 #define debugLedPin 7 #define scopePin 6 int volatile pinRead = 0; unsigned long startTime = 0; unsigned long times[40]; boolean isReceiving ...
#ifndef GNCHARFUNCTIONS_H #define GNCHARFUNCTIONS_H #include <wchar.h> #include <string.h> #include <stdio.h> #include "GnSystemDefine.h" //GNFORCEINLINE gsize GnStrlen(const gchar* GNRESTRICT str); // //GNFORCEINLINE gchar* GnStrcpy(gchar* GNRESTRICT dest, const gchar* GNRESTRICT src, size_t destSize...
#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; ...
#ifndef TRANSITION #define TRANSITION #include <string> #include <iostream> #include <map> #include "element.hpp" #include "../../include/time_leak/place.hpp" class Place; namespace time_leak { class Transition : public time_leak::Element<Place> { public: enum TransitionType { ...
/*...Part - 01...*/ #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <stack> #include <queue> #include <deque> #include <iterator...
#pragma once #include "Productos.h" class Nodo { public: Productos* producto; Nodo* IZQUIERDA = nullptr; Nodo* DERECHA = nullptr; Nodo* ABAJO = nullptr; Nodo* ARRIBA = nullptr; public: Nodo(Productos* produc); Nodo(); };
/* +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://w...
#include <iostream> #include <stack> #include <forward_list> using namespace std; template <typename T> class MyStack : public stack<T> { private: forward_list<T> min_list {}; public: void push(const T& val) { if (min_list.empty() || (val < min_list.front())) { mi...
#include "../inc/SEOpenGLRenderService.h" #include "../inc/SEOpenGLRenderObject.h" #include "../inc/SEOpenGLCamera.h" #include "../inc/SEOpenGLLight.h" #include "../inc/SEOpenGLPrimitive.h" #include "../inc/SEDebugTools.h" #include "../inc/SEMath.h" #include <stdexcept> USEDUMPFLAG; int SEOpenGLRenderService::start...
/** * @copyright (c) 2020, Kartik Venkat, Nidhi Bhojak * * @file test.cpp * * @authors * Part 1: * Kartik Venkat (kartikv97) ---- Driver \n * Nidhi Bhojak (nbhojak07) ---- Navigator\n * * @version 1.0 * * @section LICENSE * * BSD 3-Clause License * * * All rights reserved. * Redistribution and use...
// http://oj.leetcode.com/problems/unique-binary-search-trees-ii/ /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // Should really care about how function returns. class Solution...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...
#include "transfert.h" Transfert::Transfert() { } Transfert::Transfert(int ID_client_t,QString Type,QString Position,QString Date_T,QString Equipe) {this->ID_client_t=ID_client_t; this->Type=Type; this->Position=Position; this->Date_T=Date_T; this->Equipe=Equipe; } bool Transfert:: AjoutTransfert(Transfert *TR) ...
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; ll t, n, occur[1000001], temp, eleCount, sameEleCount; vector<int> a; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> t; for (int i = 0; i < t; i++) { cin >> n; ...
int ledNumber[] = { 0,1,2,3,4,5,6,7}; int rowNumber[] = { 10,9,8}; int levelNumber[] = { A3,A1,A2,13,A4,A0,12,A5}; int oc = 11; void setup() { pinMode(oc, OUTPUT); for(int i = 0; i<8;i++){ pinMode(ledNumber[i],OUTPUT); } for(int i = 0; i<3;i++){ pinMode(rowNumber[i],OUTPUT); ...
//--------------------------------------------------------------------------- #ifndef FrmSetupH #define FrmSetupH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> //---------------------------------...
#pragma once #include "ofMain.h" #include "bson/bsonobjbuilder.h" class ofxBson: public ofBaseFileSerializer { protected: class BSONArrayNode; class BSONObjNode; class BSONGUIDNode; class BSONObjWithGUIDNode; class BSONNode { public: ofxBson* bson; static ofBuffer emptyBuffer; weak_ptr<BS...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright 2002-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 */ #ifndef PC_DOC_H #define PC_DOC_H #include "mo...
#ifndef DOUBLYLINKEDLIST_H #define DOUBLYLINKEDLIST_H #include "ListNode.h" #include <stdlib.h> using namespace std; template <typename E> //.h class DoublyLinkedList{ public: int size; ListNode<E>* front; ListNode<E>* back; DoublyLinkedList(); ~DoublyLinkedList(); void insertFront(E dat...
/****************************************************************************** * This file is part of the Geometric harmonization project * * * * (C) 2014 Azamat Shakhimardanov *...
// // Created by igor on 12/11/19. // #include <iostream> #include "OpenGL_CallBack.h" //Definição de variáveis int width; int height; bool fullScreen = false; bool animate = false; bool pause = false; float xCamera = 0; float yCamera = -2; bool perspective = true; float zdist = 4.0; float rotationX = 0; float rotati...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** 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" #include "mo...
// // include: normal_estimation.h // // last update: '18.xx.xx // author: matchey // // memo: // #ifndef NORMAL_ESTIMATION_H #define NORMAL_ESTIMATION_H #include <Eigen/Core> #include "perfect_velodyne/point_types.h" namespace perfect_velodyne { using VPoint = PointXYZIRNormal; using VPointCloud = pcl::PointClou...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #include <math.h> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional>...
#ifndef VnaTimeSweep_H #define VnaTimeSweep_H // RsaToolbox #include "Definitions.h" // Etc // Qt #include <QObject> #include <QScopedPointer> namespace RsaToolbox { class Vna; class VnaChannel; class VnaTimeSweep : public QObject { Q_OBJECT public: explicit VnaTimeSweep(QObject *parent = 0); VnaTime...
#ifndef PERL_REGEX #define PERL_REGEX #include <string> #include <boost/regex/icu.hpp> #include <boost/container_hash/hash.hpp> namespace moses { namespace tokenizer { typedef UChar32 char_type; typedef std::vector<char_type> string_type; void StrToUChar(std::string const &str, string_type &vec); void UCharToStr(...
#include "view.h" #include <QDebug> #include <QMouseEvent> #include <QtMath> View::View(Scene* scene) { this->scene = scene; setScene(scene); centerOn(0, 0); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setFrameStyle(0); // ...
#include "MetaDataCache.hpp" using namespace Elysium::Data::Description; Elysium::Data::Caching::MetaDataCache::MetaDataCache() : Elysium::Core::Object() { } Elysium::Data::Caching::MetaDataCache::~MetaDataCache() { } void Elysium::Data::Caching::MetaDataCache::Register(EntityDescriptor * EntityDescript...
#ifndef CMESSAGEFACTORY_H #define CMESSAGEFACTORY_H #include "../SMonitorServer/CNetMessage.h" #include <QObject> #include "CMessageEventMediator.h" class CNetClt; class CMessage; class CLogininMessage; class CRegisterIdMessage; class CMessageEventMediator; class CRequestXmlMessage; class CModifyIdMessage; class CSoft...
#include <iostream> #include <vector> using namespace std; //write your class here //the class should be named "ArrayPQ" template <typename T> class ArrayPQ { protected: vector<T> x; public: size_t size() {return x.size(); } bool empty() {return x.empty(); } T top() {return x.back(); } voi...
#include "TcpServer.h" namespace chatty { namespace net { void TcpServer::start() { // acceptor_.bind(); acceptor_.listen(); // acceptor_.setRead acceptChannel_(acceptor.fd()); acceptChannel_.setReadCallBack(std::bind(&acceptor::accept, this)); } } // namespace net } // namespace ch...
// Created on: 1993-08-11 // Created by: Bruno DUMORTIER // 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...
#pragma once #include <iberbar/RHI/D3D11/Headers.h> #include <iberbar/RHI/Types.h> namespace iberbar { namespace RHI { namespace D3D11 { class CDevice; class CStateCache { public: CStateCache( CDevice* pDevice ); ~CStateCache(); void SetBlendFactor( const float Factor[4], uint32 Sample...
#include "stdafx.h" #include <SFML/Graphics.hpp> #include "map.h" #include "View.h" #include <sstream> #include <string> #include "mission.h" #include <iostream> using namespace sf; class Player { // класс Игрока private: float x, y; public: float w, h, dx, dy, speed; //координаты игрока х и у, высота ширина, ускоре...
#include "../../headers/server/Server.h" int count = 0; void *clientThread(void *arg); void runServer(int port) { int re = 0; int server_sck = socket(AF_INET, SOCK_STREAM, 0); errorHandler(server_sck, (char *)"Initialize server socket failed"); sockaddr_in addr; addr.sin_family = AF_INET; a...
/* * 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 <glog/logging.h> #include <fizz/crypto/Utils.h> #include <folly/init/Init.h> #include <folly/io/async/HHWheelTimer.h> #...
// // GnIListCtrl.h // Core // // Created by Max Yoon on 11. 7. 27.. // Copyright 2011년 __MyCompanyName__. All rights reserved. // #ifndef Core_GnIListCtrl_h #define Core_GnIListCtrl_h #include "GnInterfaceGroup.h" #include "GnIListCtrlItem.h" class GnIListCtrl : public GnInterfaceGroup { public:...
#include "List.hpp" List::List(int n) { int i; root = NULL; for(i = 0; i < n; i++){ Node* node = new Node(i); node->edges.resize(1); node->edges[NEXT] = NULL; cout << "inserting " << node->val << endl; Insert(node); } size = i; } List::~List() { Node* next, *cur; cout << "dtor has ...
#include <iostream> #include "vector.h" using namespace std; template <class T> void print(const vector<T> &vec) { for (int i = 0; i < vec.size(); ++i) cout << " ," << vec[i] << ", "; cout << "\n"; } string str(int n) { return string(1, '0' + n); } int main() { int n = 10; ...
const int LED = 4, dotlen=200; char* letters[] = { ".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", // A-I ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", // J-R "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.." // S-Z }; char* numbers[] = {"-----", ".----", "..---", "...--", ".......
 // 3.23实验View.h: CMy323实验View 类的接口 // #pragma once class CMy323实验View : public CView { protected: // 仅从序列化创建 CMy323实验View() noexcept; DECLARE_DYNCREATE(CMy323实验View) // 特性 public: CMy323实验Doc* GetDocument() const; // 操作 public: int N; CArray<CRect, CRect> ca; bool set; CRect m_window; CRect cr; // 重写 pub...
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<string>> partition(string s) { auto isPalin = [&](const string str) { if (str.length() == 1) return true; int x = 0, y = str.size() - 1; while (x < y) { if (str[x] != str[y]) return fa...
#include <iostream> #include <sstream> #include <vector> #include <list> #include <queue> #include <algorithm> #include <iomanip> #include <map> #include <unordered_map> #include <unordered_set> #include <string> #include <set> #include <stack> #include <cstdio> #include <cstring> #include <climits> #include <cstdlib> ...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #include "gtfttemp.h" #include "gtftmessage.pb.h" #include <QtCore/QDebug> #include <QtCore/QDir> GT_BEGIN_NAMESPACE class GtFTTempPrivate { Q_DECLARE_PUBLIC(GtFTTemp) public: explicit GtFTTempPrivate(GtFTTemp *q); ~GtFTTempPrivate(); public: ...
#undef UNICODE #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winsock2.h> #include <ws2tcpip.h> #include <stdlib.h> #include <stdio.h> #include <iostream> // Need to link with Ws2_32.lib #pragma comment (lib, "Ws2_32.lib") // #pragma comment (lib, "Mswsock.lib") #define DEFAULT_BUFLEN 3 #define DEFAULT_...
// // normal_esti_coarse2fine_ps.cpp // pm_stereo // // Created by KaiWu on Sep/9/16. // Copyright © 2016 KaiWu. All rights reserved. // #include "normal_esti_coarse2fine_ps.hpp" #include "mex.h" using Eigen::Matrix; using Eigen::Matrix2i; using Eigen::Matrix2d; using Eigen::MatrixXi; using Eigen::Vector2i; using...
/* * Copyright (c) 2016-2019 Morwenn * SPDX-License-Identifier: MIT */ #include <algorithm> #include <forward_list> #include <iterator> #include <list> #include <vector> #include <catch2/catch.hpp> #include <cpp-sort/sorters/counting_sorter.h> #include <testing-tools/distributions.h> TEST_CASE( "counting_sorter tes...
/* * 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...
#pragma once #include <PA9.h> #define PLAYER_PROFILE_MAX_NAMELENGTH 16 #define PLAYER_PROFILE_EXP_FOR_LVLUP 10 class PlayerProfile{ private: char m_name[PLAYER_PROFILE_MAX_NAMELENGTH+1]; //+1 for terminating 0 s8 m_nameLength; u8 m_level; u16 m_experience; //m_playtime; //m_lastsaved; publ...
#ifndef Shop_h #define Shop_h #include "DVD.h" #include "SaleableItem.h" #include <vector> #include <memory> using namespace std; class Shop { public: void AddBook(const char* pTitle, unsigned int unitPricePence, unsigned int noOfPages); void AddDVD(const char* pTitle, unsigned int unitPricePence...
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "ThirdPersonProyect.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, ThirdPersonProyect, "ThirdPersonProyect" );
// // Moon.hpp // w04_h01_moons // // Created by Kris Li on 9/29/16. // // #pragma once #include "ofMain.h" class Moon : public ofPoint { public: void set(float _dist, float _intAngle); void update(float _step, ofPoint _center); void draw(); float radius; float angle; };
#ifndef ASTNODE_H #define ASTNODE_H #include <vector> #include <string> #include <iostream> #include <tuple> #include <algorithm> #include <utility> #include <map> #include "ClassNode.hpp" #include "FieldNode.hpp" #include "Node.hpp" using namespace std; class StringNode { private: string s; StringNode *pa...
#include "ai.h" #include <sstream> #include <iostream> #include <cstring> #include <cstdlib> #include "G_Global_IO.h" #include <fstream> using namespace std; // global variables for procedural string GIO_loadPath; float GIO_radius; int numPt; // recursive function that creates random cloud with fractal clumping stati...
// Created on: 1997-10-31 // Created by: Joelle CHAUVET // 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 GNU...
#pragma once #include <stdexcept> namespace CCC { template<class T> class Expected { public: explicit Expected(T* _r) : result(_r), gotResult(_r) { if (!gotResult) ex = std::runtime_error("Object not found!"); } explicit Expected(T& _r) : Expected<T>(&_r) {} Expected() = delete; const bool isValid() ...
#include <iostream> #include <GL/glew.h> #include <GL/gl.h> #include "Display.hpp" #include "DisplaySettings.hpp" #include <imgui/imgui.h> #include <imgui/imgui_impl_opengl3.h> #include <imgui/imgui_impl_sdl.h> //////////////////////////////////////////////////////////////////////////////// Display::Display() { ...
#include "bits/stdc++.h" using namespace std; // Program to check wheather a number is prime or not // T(n)=O(N) bool is_prime(int n){ if(n==1) return false; for(int i=2;i<n;i++) { if(n%i==0) return false; } return true; } // T(N)=O(sqrt(N)) bool is_prime_opt(int n){ if (n==1) return false; for (int i=2...
#include <stdio.h> #define MAX_N 100 /* given an image represented by an N*N matrix, where each pixel in the image is 4 bytes.write an method to rotate the image by 90 degrees.can you do this in place? rotate the image clockwise my solution.swap the data in i line with the data in i row. after all data have been...
#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 <numeric> #include <stdio.h> #include <string.h> #define INF (1<<30) #define LI...
#include<iostream> #include<stdio.h> #include "p1.cpp" using namespace std; int main() { FILE *f; int a,b,val,i f=fopen("testresults.txt","r"); if(f==NULL) { cout<<"error\n"; } else{ i=0; while(!feof(f)) { fscanf(f,"%d %d %d",&a,&b,&val); if(div(a,b)==val) cout<<"Test Case"...
#include "GnMainPCH.h" #include "GnRenderFrame.h" GnRenderFrame::GnRenderFrame() { } GnRenderFrame::~GnRenderFrame() { } void GnRenderFrame::Draw() { GnRenderer* renderer = GnRenderer::GetRenderer(); renderer->BeginFrame(); ElementIterator iter = mList.GetIterator(); GnRenderViewSet* step; while( iter.Valid() ...
#include "CComplex.h" CComplex::CComplex(double real, double image) :m_real(real) , m_image(image) { } double CComplex::Re() const { return m_real; } double CComplex::Im() const { return m_image; } double CComplex::GetMagnitude() const { return sqrt(pow(m_real, 2) + pow(m_image, 2)); } double CComplex::GetAr...
#include <iostream> #include <vector> using ll=long long; using namespace std; const int maxn =200005; vector<int> v; int n,k; int main(){ cin>>n>>k; for(int i=1;i<=n;i++) v.emplace_back(i); int pos=0; for(int i=0;i<k;i++){ int x; cin>>x; pos=(pos+x...
#include<iostream> #include "windows.h" #include "cstdlib" #include <ctime> int main() { setlocale(LC_ALL, "Russian"); int i = 0; std::string loading = "#"; srand(time(NULL)); std::cout << "Взлом NASA"; Sleep(2000); do { if (i >= 100) { system("cls"); std::cout << "ИДЕТ ВЗЛОМ - "; std::cout << ...
#include <octomap/octomap.h> #include <octomap/ColorOcTree.h> #include "testing.h" using namespace std; using namespace octomap; void print_query_info(point3d query, ColorOcTreeNode* node) { if (node != NULL) { cout << "occupancy probability at " << query << ":\t " << node->getOccupancy() << endl; cout << ...
/*=============================================================== * Copyright (C) 2017 All rights reserved. * * FileName:HMMProbability.cpp * creator:yuliu1@microsoft.com * Time:12/02/2017 * Description: * Notice: * Updates: * ================================================================*/ #inclu...
#include <iostream> #include <boost/mpl/int.hpp> /** * @brief static computation of factorial (compilation time) * @return the factorial of X */ template<int X> int factorial() { using namespace boost::mpl; return X * factorial< int_<X>::prior::value >(); } /** * @brief specialization for factorial<1>() ...
// // main.cpp // DogAndGopher // // Created by Russell Lowry on 11/27/17. // Copyright © 2017 Russell Lowry. All rights reserved. // #include <iostream> #include <stdio.h> #include <math.h> #include <sstream> #include <iomanip> using namespace std; int main(int argc, const char * argv[]) { int number; ...
// ComplexCalculator.h : main header file for the COMPLEXCALCULATOR application // #if !defined(AFX_COMPLEXCALCULATOR_H__26CAE571_198C_4BCB_B6F9_5B0D04FBD9A4__INCLUDED_) #define AFX_COMPLEXCALCULATOR_H__26CAE571_198C_4BCB_B6F9_5B0D04FBD9A4__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 ...
#pragma once #include <iberbar/Poster/Elements/ElementBase.h> namespace iberbar { namespace Poster { class CElementImage; IBERBAR_UNKNOWN_PTR_DECLARE( CElementImage ); class __iberbarExports__ CElementImage : public CElementBase { public: CElementImage(); public: virtual void RenderSelf( CSu...
// Copyright 2012 Yandex #ifndef LTR_LEARNERS_DECISION_TREE_CONDITIONS_LEARNER_H_ #define LTR_LEARNERS_DECISION_TREE_CONDITIONS_LEARNER_H_ #include <vector> #include "ltr/data/data_set.h" #include "ltr/interfaces/parameterized.h" #include "ltr/learners/decision_tree/condition.h" #include "ltr/utility/shared_ptr.h...
/* Name: SquareWaveGen.ino Created: 30.07.2018 17:32:03 Author: Павел Unfortunately, timer approach can hardly provide ~200kHz, PWM can provide up to 8MHz but is too complex for this purpose. Better stick to arduino-based NOP bit-banger (see below). */ #define USE_TIMER_BASED 0 #if USE_TIMER_BASED #include ...
// Motor Y es el de los leds // Motor X es el del enfoque del portamuestras (eje z del portamuestras) #define Y_DIR_PIN 61 // poner número del pin de dirección #define Y_STEP_PIN 60 // poner número de pin de conexión al motor #define Y_ENABLE_PIN 56 // poner número de pin de poner en marcha #define FIN_CARRERA_1 3 //...
#include<bits/stdc++.h> using namespace std; const int maxn=10000; const double pi=acos(-1.0); const double eps=1e-8; //double类型的数,判断符号 int cmp(double x){ if(fabs(x)<eps) return 0; if(x>0) return 1; return -1; } //二维点类,可进行向量运算 //计算平方 inline double sqr(double x){ return x*x; } struct poin...
class EpochDeathBoardDialog { idd = -1; movingenable = 0; class Controls { class RscText_1000: RscText { idc = -1; x = 0.283659 * safezoneW + safezoneX; y = 0.224978 * safezoneH + safezoneY; w = 0.432681 * safezoneW; h = 0.550044 * safezoneH; colorBackground[] = {0,0,0,0.7}; }; class RscTex...
#include<iostream> #include<conio.h> using namespace std; main() { int x=89; cout<<x; }
/* Given a string S, find and return all the possible permutations of the input string. Note 1 : The order of permutations is not important. Note 2 : If original string contains duplicate characters, permutations will also be duplicates. Input Format : String S Output Format : All permutations (in different lines) Samp...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define FOR(i,n) for(ll i=0;i<n;i++) #define FOR1(i,n) for(ll i=1;i<n;i++) #define FORn1(i,n) for(ll i=1;i<=n;i++) #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define mod 1000000007; using namespace std; int main() { ...
#include <bits/stdc++.h> #include <bitset> #include <assert.h> #include <stdint.h> #include <unistd.h> #include <iostream> #include <algorithm> #include <stdlib.h> #include <cmath> #include <assert.h> #include <omp.h> #include "kvec.h" typedef struct { int n; int m; int *a; //id of points ...