text
stringlengths
8
6.88M
/* * main.cpp * Author: Ulises Olivares * uolivares@unam.mx * June 12, 2020 */ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string> #include "exploracion.h" //A* #include "tree.h" //Nodos #include "dijkstra.h" //Dijkstra #include "bell-ford.h" //Bellman-Ford #include <tclap/CmdLine.h> #i...
#pragma once void initializer(const char* title) { // Just for fun std::cout << "Performing " << title << ".." << std::endl; } void swap(int &a, int &b) { // swap function int temp = a; a = b; b = temp; } void get_array(int arr[], int n) { // Get input from user for(in...
// // Copyright Jason Rice 2016 // 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 NBDL_DETAIL_COMMON_TYPE_HPP #define NBDL_DETAIL_COMMON_TYPE_HPP #include<type_traits> namespace nbdl { namespace detail...
/* this is the solution of beakjoon #1991 https://www.acmicpc.net/problem/1991 */ #include <iostream> using namespace std; int A[27][2]; void preorder(int x){ if(x==-1)return; cout<<(char)(x+'A'); preorder(A[x][0]); preorder(A[x][1]); } void inorder(int x){ if(x==-1)return; inorder(A[x][0]); cout<<(char)(x+...
#include<bits/stdc++.h> const int maxN = 1e5+1; using namespace std; int ar[maxN]; pair<int,int>st[4*maxN]; pair<int,int> combine(pair<int,int> a,pair<int,int> b) { if(a.first<b.first) return a; if(b.first<a.first) return b; return {a.first,(a.second+b.second)}; } void buildtree(int si,int...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.UI.Notifications.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_b0d63b78_78ad_5e31_b6d8_e32a0e16c447 #define WI...
#include<stdio.h> #include<malloc.h> struct node{ int data; struct node *next; }; int push(struct node **,int); int printList(struct node *); int NodeFromLast(struct node *,int); int push(struct node **head_ref,int new_data){ struct node *temp=(struct node *)malloc(sizeof(struct node )); temp->data=new_d...
/* vim:tabstop=4:expandtab:shiftwidth=4 * * Idesk -- Timer.h * * Copyright (c) 2005, FixXxeR (avelar@gmail.com) * based from Timer.cc (vdesk project) by MrChuoi <mrchuoi at yahoo dot com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitte...
//udppeer_test.cpp #include <iostream> #include <chrono> #include <sys/socket.h> #include <arpa/inet.h> #include <string.h> #include <unistd.h> using namespace std; int main(int argc, char** argv) { if(argc < 2){ cout<<"usage: cmd [local port]\n"; return 0; } int port = atoi(argv[1]); sockaddr_in addr; me...
/********************************************************** * License: The MIT License * https://www.github.com/doc97/TxtAdv/blob/master/LICENSE **********************************************************/ #include "catch.hpp" #include "ResponseMatch.h" namespace txt { TEST_CASE("ResponseMatch - isMatch", "[ResponseM...
#include "stdafx.h" #include "Resource.h" #include <iostream> #include <string> using std::string; using std::cout; using std::endl; Resource::Resource(std::string name):name(name) { cout << "constructor resourse " << name << endl; } Resource::~Resource() { cout << "destructor resourse " << name << e...
#include "include/photocell.h" void photocellInitial(Chain *ptrchain){ sensorPin[0]= ptrchain->sensorPin.sensorLeftPin; sensorPin[1]= ptrchain->sensorPin.sensorRightPin; waitUpThre = ptrchain->waitUpThre; sensorRange[0]= ptrchain->sensorRange.left; sensorRange[1]= ptrchain->sensorRange.right; } boolean wait...
#include<bits/stdc++.h> #define int long long using namespace std; signed main() { int T; cin >> T; while(T--) { int n, k; scanf("%lld%lld",&n,&k); if(n-k>=2) printf("No\n"); else printf("Yes\n"); } }
#include<bits/stdc++.h> using namespace std; struct node { int data; int count = 0; struct node* left = NULL; struct node* right = NULL; }; typedef struct node Node; Node* newnode(int data) { Node* temp = new Node(); temp->data=data; return temp; } int insert(Node*& root,int data) { if(root==NULL) { root...
#pragma once #include <functional> #include <map> #include <queue> #include <vector> #include <memory> #include "messaging/Messages.hpp" namespace cobalt { namespace messaging { typedef std::shared_ptr<Message> MessagePtr; typedef std::function<void(MessagePtr)> Subscriber; class MessageBus { public: Me...
// MyAccountDlg.cpp : implementation file // #include "stdafx.h" #include "MyAccount.h" #include "MyAccountDlg.h" #include "afxdialogex.h" #include "MyDlg.h" #include "DialogModify.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CAboutDlg dialog used for App About class CAboutDlg : public CDialog { public: CAbo...
#ifndef CLIENT_H #define CLIENT_H #include <QWidget> #include <QSqlTableModel> namespace Ui { class client; } class client : public QWidget { Q_OBJECT public: explicit client(QWidget *parent = nullptr); ~client(); void sendSignal(); QSqlDatabase db; signals: void mySignal(); private slots:...
// // main.cpp // hw5 // // Created by Christopher Chandler on 3/9/16. // Copyright © 2016 Christopher Chandler. All rights reserved. // #include <iostream> #include <list> #include "MultiLL.h" int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; std::list<i...
#include "ContactForceDist.h" ContactForceDist::ContactForceDist():VECNUM(1024){ cylArray = 0; planeArray = 0; collCal = 0; TargetID = 0; } ContactForceDist::~ContactForceDist(){ } void ContactForceDist::Associate(CylinderArray* cyArray){ cylArray = cyArray; } void ContactForceDist::Associa...
/* * Copyright (c) 2013, Hernan Saez * 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 cond...
#include<bits/stdc++.h> using namespace std; typedef long long ll; void ipop(){ #ifndef ONLINE_JUDGE freopen("../input.txt","r",stdin); freopen("../op.txt","w",stdout); #endif } void solve(){ ll n,m; cin>>n>>m; vector<ll>a(n+1,0); for(ll i=1;i<=n;i++) cin>>a[i]; for(ll i=1;i<n;i++) a[i]+=a[i-1]; ll ans=...
#include<cstdio> #include<iostream> #include<vector> using namespace std; bool isToeplitzMatrix(char matrix[4][4]) { for(int i = 1; i < 3; i++) for(int j = 1; j < 4; j++) { if(matrix[i][j] != matrix[i-1][j-1]) return false; } return true; } int main() { char a[4][4]= { {1...
#include <ros/ros.h> #include <move_base_msgs/MoveBaseAction.h> #include <actionlib/client/simple_action_client.h> #include <std_msgs/UInt8.h> typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient; int main(int argc, char** argv){ ros::init(argc, argv, "side_parking"); ros::NodeHan...
#ifndef BULLET_H #define BULLET_H #include "movable.h" class Bullet : public Movable { public: Bullet(int x, int y); Bullet(int x, int y, double raw_theta); void move(int to_x = 0, int to_y = 0); private: }; #endif
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; vector<int> a(n),b(n); for(int i=0;i<n;i++) { cin>>a[i]; } for(int i=0;i<n;i++) { cin>>b[i]; } so...
#ifndef JULIAN_H #define JULIAN_H #include "date.h" namespace lab2 { class Julian : public Date_impl { public: Julian(); Julian(const Date& src); Date& operator=(const Date& src); Julian(int year, int month, int day); ~Julian(); private: bool is_leap_year(int year) ...
/******************************************************************************** ** Form generated from reading UI file 'dialog.ui' ** ** Created by: Qt User Interface Compiler version 5.10.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! *******************************************...
#include "CLog.h" #include "CDateTime.h" #include "CAutoLock.h" #include <sys/stat.h> using namespace Util; CLog::CLog() { } void CLog::bind(const std::string& dirName, FILE* pFileHandle) { mkdir(dirName.c_str(), 0754); std::string fileName = dirName + "/" + CDateTime().asString("YYYY-MM-DD") + ".log"; ...
#include<iostream> #include<cstdlib> #include<cstdio> #include<vector> #include<cstring> #include<fstream> #include<map> #include<string> #define MAX_V 10000 using namespace std; int V; vector<int> G[MAX_V]; //グラフの隣接リストを表現 vector<int> rG[MAX_V]; //辺の向きを逆にしたグラフ vector<int> vs; //帰りがけ順の並び. backtrackするごとに入れる。 bool used...
#include <cosmos/cosmos.hpp> #include <data/encoding/ascii.hpp> #include <abstractions/script/pow.hpp> #include <abstractions/script/pay_to_address.hpp> #include <abstractions/pattern/pay_to_address.hpp> #include <abstractions/crypto/address.hpp> #include <iostream> namespace cosmos::bitcoin { namespace pow {...
// // Created by steven on 2020-09-22. // #ifndef A1_CELL_H #define A1_CELL_H #include <tuple> #include "glm/glm.hpp" #include "GL/glew.h" // Include GLEW - OpenGL Extension Wrangler #include "../Framework/Renderer.h" #include <mutex> #include "tbb/spin_mutex.h" #define UP 0 #define UP_RIGHT 1 #define UP_LEFT 2 #def...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Security.Authentication.Identity.Provider.2.h" WINRT_EXPORT namespace winrt { namespace Windows::Security::Authentication::Identity::Provider { struct WINRT_EBO SecondaryAu...
#include <utility> #include <algorithm> #include <iostream> #include <vector> #include <map> #include <string.h> int main() { static const std::vector<const char*> values{"a", "b", "c", "d"}; int c = std::any_of(values.begin(), values.end(), [](const char* v) { return strcmp(v, "a") != 0; });...
// // main.cpp // Quazy Quaves // // Created by Lee Mulvey on 2019-03-31. // Copyright © 2019 Lee Mulvey. All rights reserved. // #include "game.h" int main( int argc, char* args[] ) { Game game; return 0; }
/*====================================================================* - Copyright (C) 2001 Leptonica. 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 c...
#ifndef MEM_H #define MEM_H #include "reg_def.h" #include <cstdio> class MEM { public: unsigned char type; ERROR_NUM err_no; MEM(); void set_Reg(unsigned int arg_rd, unsigned long long arg_alu, unsigned long long arg_data); void set_pc(REG arg_pc); void set_c...
#pragma warning(default:4996) #include "std_lib_facilities.h" #include "Image.h" #include "ImageIOBase.h" #include "ImageIOFactory.h" #include "ImageFilter.h" #include "ThresholdImageFilter.h" #include "StatisticsImageFilter.h" #include "MaskImageFilter.h" #include "ConvolutionImageFilter.h" #include "Complem...
#ifndef _IRIN_SERVICE_HEADER_H_ #define _IRIN_SERVICE_HEADER_H_ #include "server/http-response.h" #include "services/content-service.h" #include "services/proxy-service.h" #include <vector> class IrinService { public: IrinService(std::vector<std::string> proxy_uris, std::unique_ptr<ContentService> &conte...
#include<bits/stdc++.h> using namespace std; #define maxN 100001 vector<int>adj[maxN]; void dfs(int node,int des,vector<int>x) { x.push_back(node); if(node==des) { for(int i=0;i<x.size();i++) cout<<x[i]<<" "; cout<<"\n"; return; } for(int child:adj[node]) ...
#include<iostream> using namespace std; typedef int TypeValue; int m,n; int data[80][80]; TypeValue dp[80][80]; TypeValue process(int row) { for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { for(int k=i;k<j;k++) { dp[i][j]=max(dp[i][k]+dp[k+1][j]+data[ } } } return 0; } int main() { }
#pragma once // // ART.h // PianoPlayer // // Created by Ben Smith on 10/10/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // #include "artCategory.h" #include <vector.h> #include "OSCSend.h" #define RECENCY_DECAY_RATE 0.99 // how quickly the recency vector decays. This is how quickly ideas be...
#include<iostream> #include<cstdlib> #include<conio.h> using namespace std; class node { private: char data; node* next; friend class stack; friend class queue; }; class stack { private: node *head; public: void push(char data); char pop(); int empty(void); void init(); }; class queue { private: node *fro...
//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2006-2010 MStar Semiconductor, Inc. // All rights reserved. // // Unless otherwise stipulated in writing, any and all information contained // herein regardless in any format shall remain the sole proprietary of ...
#include<bits/stdc++.h> using namespace std; int merge(int start,int middle,int end,int arr[],int n) { int sizetemp1=middle-start+1; int sizetemp2=end-middle; int temp1[sizetemp1],temp2[sizetemp2]; for(int i=0;i<sizetemp1;i++) { temp1[i]=arr[start+i]; } for(int i=0;i<sizetemp2;i++) { ...
#pragma once #include "BaseAnimation.h" #include <functional> namespace GraphicsEngine { class GeneralAnimation : public BaseAnimation { public: using UpdateFunctionType = std::function<void(const Common::Timer&, float)>; public: GeneralAnimation(float startInMilliseconds, float durationInMilliseconds, con...
// // Created by Tidesun on 2019-04-25. // #include "bfb_calculator.hpp" BFBCalculator::BFBCalculator(Graph _g,double _costThreshold, char _baseDir, char _extendingDir){ algorithm = nullptr; g = _g; costThreshold = _costThreshold; baseDir = _baseDir; extendingDir = _extendingDir; } void BFBCalculat...
#include "imageDownloader.h" ImageDownloader::ImageDownloader() { //ctor } ImageDownloader::~ImageDownloader() { //dtor } /* Method to download a URL to a specified file */ bool ImageDownloader::DownloadFile(wxString url, wxString destination) { wxLogMessage(_T("NOAADOPPLER: Downloading File: %s"), u...
//20M19118 //module load intel-mpi //compile with mpicxx mpi_openmp_simd_code.cpp -fopenmp -march=native -O3 -std=c++11 //mpirun -np 4 ./a.out #include <immintrin.h> #include <bits/stdc++.h> #include <mpi.h> #include <omp.h> using namespace std; int main(int argc, char** argv) { int size, rank; MPI_Init(&argc...
#include "stdafx.h" #include "Hook.h" #include "disasm.h" /* Author:火哥 QQ:471194425 群号:1026716399 */ void __declspec(naked) HookHeadDispatch() { } int Hook::CopyMemcpy(void * desc, void *src, size_t size) { char * tempSrc = (char *)src; char * tempDesc = (char *)desc; while (size-- != 0) { *tempDesc++ = *tem...
/* Multipurpose RC controller. This implementation will be specifically for a * quadcopter with an arduino receiver and MultiWii FLight Controller. * Guillermo Colom 1 - GND 2 - VCC 3.3V !!! NOT 5V 3 - CE to Arduino pin 9 4 - CSN to Arduino pin 10 5 - SCK to Arduino pin 13 6 - MOSI to Arduino pin...
// // Created by zyx on 19-6-4. // #include "Detector.h" Detector::Detector(bool traceResultOn, bool traceDebugOn, bool colorOn) { radonAngleRange = 63; radonOperation = radon::RT_SUM; beginPoint = cv::Point(-1, -1); traceResultOn_ = traceResultOn; traceDebugOn_ = traceDebugOn; colorOn_ = colorOn; } Detect...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
#pragma once #include <spdlog/spdlog.h> #include <chrono> #include <fstream> #include <iostream> namespace days { enum class day { day_1 = 1, day_2, day_3, day_4, day_5, day_6, day_7, day_8, day_9, day_10, day_11, day_12, day_13, day_14, day_15, day_16, day_17, day_18, day_19, ...
#ifndef __URIMAGE_H__ #define __URIMAGE_H__ #include "png.h" class urImage { protected: png_structp png_ptr; png_infop info_ptr; png_uint_32 width; png_uint_32 height; int bit_depth, color_type, interlace_type, channels; png_bytep buffer; public: png_uint_32 getWidth() { return width; } png_uint_32 getHeight(...
/* NO WARRANTY * * BECAUSE THE PROGRAM IS IN THE PUBLIC DOMAIN, THERE IS NO * WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE * LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE AUTHORS * AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT * WARRANTY OF ANY KIND, EITHER E...
class Solution { public: int maximumSwap(int num) { string orgVal = to_string(num); string maxVal = orgVal; sort(maxVal.begin(), maxVal.end(), greater<char>()); int left = 0; int right = maxVal.length() - 1; while(left < right) { while(left < right && org...
//************************************************************ // Ryan Copenhaver // COP2000.0M1 // Project 2: Average Rainfall // This program averages rainfall from three months entered by // the user. //************************************************************ #include <iostream> #include <string> // Needed fo...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once WINRT_EXPORT namespace winrt { namespace ABI::Windows::Data::Pdf { struct IPdfDocument; struct IPdfDocumentStatics; struct IPdfPage; struct IPdfPageDimensions; struct IPdfPageRenderOptions; ...
#if !defined(AFX_CONFIGDIALOG_H__1BD101C2_420D_11D5_B612_002018BA6D85__INCLUDED_) #define AFX_CONFIGDIALOG_H__1BD101C2_420D_11D5_B612_002018BA6D85__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // ConfigDialog.h : Header-Datei // #include "resource.h" #include "SnapDialog.h" #include "...
#include "melsec.h" #include <QString> #include <QTimer> #include <QDebug> RxMelsec::RxMelsec(): nPort(5002) ,nC(0),plcAddr(1) // кноструктор, треба уточнити { // теймер для періодичної відправки запитів //connSend=new QTimer(this); //connSend->setInterval(1000); //connect(connSend,SIGNAL(timeout()...
#include <bits/stdc++.h> using namespace std; void check(double a[], double b[], int n){ int dem = 0; for (int i=0; i<n; ++i){ if (a[i]<b[i]){ dem ++; } } if (dem != 0){ cout << "No"; } else cout << "Yes"; } void giamDan (double a[], double n){ double tg=0...
#pragma once #include "../Vector2.h" #include "../MathExtender.h" class Profile { public: Profile(); virtual void GetOffsetAndHeading(Vector2& offset, Vector2& heading); }; class PointProfile : public Profile { public: PointProfile(); void GetOffsetAndHeading(Vector2& offset, Vector2& heading); }; class Circle...
//ros #include <ros/ros.h> #include <ros/package.h> #include <image_transport/image_transport.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/image_encodings.h> //tinyxml #include "tinyxml2.h" //opencv #include <opencv2/opencv.hpp> #include <opencv2/aruco.hpp> #include <opencv2/core.hpp> #include <opencv2/c...
#ifndef RECTHREAD_H #define RECTHREAD_H #include <QFile> #include <QAudioInput> #include <QVariant> #include <QAudioDeviceInfo> class WavPcmFile; class AudioInfo; class QAudioFormat; class RecThread : public QObject { Q_OBJECT public: explicit RecThread(QAudioFormat format); ~RecThread(); void run()...
#include "GV.h" static int font[2];//フォント用 static char *fonttype;//フォントタイプ static int place_x = 260;//文字のx座標 static int start_y = 250, start_x_size = 150, start_y_size = 30;//startの座標 static int record_y = 310, record_x_size = 150, record_y_size = 30; //recordの座標 static int close_y = 370, close_x_size = 150, close_y_s...
#ifndef __FORCEMANAGER_H__ #define __FORCEMANAGER_H__ #include <map> #include "types.h" #include "primitive.h" #include "body.h" #include "force_generator.h" namespace physics { class ForceManager { public: ~ForceManager(); typedef map<int, ForceGenerator *> MapGenerators; // This compare method is...
#include "autoTile.h" #include "pointVector.h" #include "coordTransform.h" using namespace Gdiplus; void Autotile::drawLU(POINT l, POINT r, POINT u, POINT d, POINT lu) { if (ID == u && ID == l) { if (ID == lu) { cellData[0].x = 2; cellData[0].y = 4; } else { cellData[0].x = 4; cellData[0].y = ...
// // FocusingView.h // iPet // // Created by KimSteve on 2017. 7. 3.. // Copyright © 2017년 KimSteve. All rights reserved. // 화면에 포커싱되는 효과를 주는 view #ifndef FocusingView_h #define FocusingView_h #include "../Base/SMView.h" class ShapeCircle; class ShapeSolidRect; class ShapeArcRing; class OnFocusingListener; c...
#include <bits/stdc++.h> using namespace std; int pai[1001]; int posto[1001]; int find(int x){ if(pai[x] != x) pai[x] = find(pai[x]); return pai[x]; } void unio(int a, int b){ a = find(a); b = find(b); if(a == b) return; if(posto[a] >= posto[b]){ pai[b] = a; if(p...
/************************************************************************ created: Tue Feb 28 2006 author: Paul D Turner <paul@cegui.org.uk> *************************************************************************/ /*************************************************************************** * Copyrig...
#include <stdio.h> #include <list> #include <string> using namespace std; list<int> li; int T, Q; int main() { freopen("input.txt", "r", stdin); scanf("%d", &T); while(T--){ li.clear(); scanf("%d", &Q); while (Q--) { char input[10]; int combination[101]; scanf("%s", input); string tmp(input); ...
#include "dvdtypes.h" char DVDTypeToCode(DVDType type) { switch(type) { case ComedyDVD: { return 'F'; } case DramaDVD: { return 'D'; } case ClassicDVD: { return 'C'; } default: { ...
#include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> const char* wifissid = "IU13-Conference Center"; const char* wifipass = ""; String url = "http://wp-of-things.pw/wp-json/wp/v2/posts/?per_page=1"; void setup() { Serial.begin( 74880 ); Serial.println(); Serial.println(); Serial.printf( "Conne...
#ifndef GLOBALS_H #define GLOBALS_H namespace globals { const float SCREEN_WIDTH = 640; const float SCREEN_HEIGHT = 480; const float SPRITE_SCALE = 2.0f; } namespace sides { enum Side { TOP, BOTTOM, LEFT, RIGHT, NONE }; inline Side getOppositeSide(Side side) { return side == TOP ? BOTTOM : si...
#include <cstdio> int main() { int n = 0; typedef struct{ char name[15]; char no[15]; int score; } Student; // BETTER: 设计一个最外边界就不需要init判断了 int max = -1, maxId = 0, min = 101, minId = 0; scanf("%d", &n); Student stu[n]; for(int i = 0; i < n; i++) { scanf("%s %s %d", stu[i].name, s...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; #define pb push_back #define all(x) x.begin(), x.end() #define rep(i, a, b) for(ll i = a; i < b; ++i) #define rsz(x, n) x.resize(n) using pi = pair<int, int>; #define f first #define s second void setIO(string name = "cowco...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QFileDialog> #include <QMessageBox> #include "family.h" #include "about.h" #include "help.h" QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(Q...
#include "service.hpp" bool service::RegisterAndStart(const std::wstring& driver_path) { const static DWORD ServiceTypeKernel = 1; const std::wstring driver_name = intel_driver::GetDriverNameW(); const std::wstring servicesPath = L"SYSTEM\\CurrentControlSet\\Services\\" + driver_name; const std::wstring nPat...
// This file has been generated by Py++. #ifndef FalagardPropertyBaseVerticalTextFormatting_hpp__pyplusplus_wrapper #define FalagardPropertyBaseVerticalTextFormatting_hpp__pyplusplus_wrapper void register_FalagardPropertyBaseVerticalTextFormatting_class(); #endif//FalagardPropertyBaseVerticalTextFormatting_hpp__pypl...
#include "../headers/director.h" #include <exception> #include <iostream> double director::dir_base_bonus_salary = 400; double director::dir_bonus_bonus_salary = 1.5; // da aggiungere al bonus di base del contratto full time int director::dir_bonus_vac_day = 1; director::director(): worker(), level1() {} director::d...
#include <Snow/Application.h> #include <Snow/GUI/GUI.h> #include <Snow/Graphics/Renderer.h> #include <Snow/Input/Input.h> #include <Snow/Core/Time.h> #include "Resources.h" namespace Snow { Application::Application() { window = std::make_unique<Snow::Impl::Window>(); window->on_window_closed([=]()...
#ifndef _chnkload_hpp #define _chnkload_hpp 1 #include "chnkload.h" #ifdef __cplusplus #include "chunk.hpp" #include "shpchunk.hpp" #include "obchunk.hpp" #include "bmpnames.hpp" #include "projload.hpp" #if 0 extern BOOL copy_to_mainshpl (Shape_Chunk *shape, int list_pos); extern BOOL copy_to_mainshp...
#ifndef PERSONPAGE_H #define PERSONPAGE_H #include <QMainWindow> #include <QDialog> namespace Ui { class personpage; } class personpage : public QMainWindow { Q_OBJECT public: explicit personpage(QWidget *parent = 0); ~personpage(); void init(); QString pgname; private slots: void on_pushB...
#ifndef VERTEXBUFFER_H #define VERTEXBUFFER_H #include <GxGraphics/GxGraphicsResource.h> #include <GxGraphics/GxVertexBuffer.h> #include <pcx/buffer.h> #include <pcx/datastream.h> class VertexBuffer : public Gx::GraphicsResource { public: VertexBuffer(); VertexBuffer(Gx::GraphicsDevice &device, unsigned byte...
#ifndef FASTCG_VULKAN_BUFFER_H #define FASTCG_VULKAN_BUFFER_H #ifdef FASTCG_VULKAN #include <FastCG/Graphics/Vulkan/Vulkan.h> #include <FastCG/Graphics/BaseBuffer.h> namespace FastCG { class VulkanGraphicsContext; class VulkanGraphicsSystem; class VulkanBuffer : public BaseBuffer { public: ...
// This file has been generated by Py++. #include "boost/python.hpp" #include "generators/include/python_CEGUI.h" #include "ImageCodec.pypp.hpp" namespace bp = boost::python; struct ImageCodec_wrapper : CEGUI::ImageCodec, bp::wrapper< CEGUI::ImageCodec > { ImageCodec_wrapper(::CEGUI::String const & name ) :...
// Copyright (C) 2017 Elviss Strazdins // This file is part of the Ouzel engine. #include "SoundResource.h" #include "SoundData.h" #include "Stream.h" namespace ouzel { namespace audio { SoundResource::SoundResource() { } SoundResource::~SoundResource() { } ...
#include "RobTest.h" #include "../EngineLayer/PeptideSpectralMatch.h" #include "../EngineLayer/CommonParameters.h" #include "../EngineLayer/Ms2ScanWithSpecificMass.h" #include "../EngineLayer/ProteinParsimony/ProteinParsimonyEngine.h" #include "../EngineLayer/ProteinParsimony/ProteinParsimonyResults.h" #include ...
#ifndef MENU_CHICKFILA_TESTS #define MENU_CHICKFILA_TESTS #include "gtest/gtest.h" #include "../../composite/menu_component.hpp" #include "../../composite/menu_burger/header/menu_items_chickfila.hpp" #include "../../composite/menu_burger/header/menu_chickfila.hpp" #include <iostream> using namespace std; TEST(MenuTes...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.ApplicationModel.UserDataTasks.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_cdb5efb3_5788_509d_9be1_71ccb8a3362a #define W...
#include "Shader.h" const std::string Shader::IMPORT_DIRECTIVE = "%%import"; const std::string Shader::SHADER_DIRECTORY = "./assets/shader/"; void Shader::handleError(std::string name,GLuint shaderId) { GLint maxLength = 0; glGetShaderiv(shaderId, GL_INFO_LOG_LENGTH, &maxLength); // The maxLength includes the NUL...
#ifndef _EXAMPLE_OPENCV_H #define _EXAMPLE_OPENCV_H #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using namespace cv; void example_opencv(); #endif
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QMessageBox> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); m_db = QSqlDatabase::addDatabase("QSQLITE"); //соединение объекта базы данных // с СУБ...
#include <LiquidCrystal.h> #include <Keypad.h> LiquidCrystal lcd(32, 33, 34, 35, 36, 37); //RS, E, DB4, DB5, DB6, DB7 const byte ROWS = 4; // Four rows const byte COLS = 3; // Three columns // Define the Keymap char keys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'*','0','#'} }; char key; ...
// file : liblava/app/app.hpp // copyright : Copyright (c) 2018-present, Lava Block OÜ // license : MIT; see accompanying LICENSE file #pragma once #include <liblava/frame.hpp> #include <liblava/block.hpp> #include <liblava/app/forward_shading.hpp> #include <liblava/app/camera.hpp> #include <liblava/app/gui.h...
#define HEATER_PIN 26 //A3/T1 #define TANK_PIN 19 //A6/JP6 #define SWITCH_PIN 22 //A7/JP7 #define RELAY_PIN 16 //D12/C #define TEMPERATURE_SAMPLES 5 // max adc: 305 #define NUMTEMPS 19 short temptable[NUMTEMPS][2] = { {1, 341}, {17, 150}, {33, 120}, {49, 103}, {65, 91}, {81, 81}, {97, 73}, {113...
// bodymove.cpp : Defines the Body Motion Actions // #include "stdafx.h" #include "bodymove.h" #include "freewilltools.h" #define _USE_MATH_DEFINES #include <math.h> #define DEG2RAD(d) ( (d) * (FWFLOAT)M_PI / 180.0f ) #define RAD2DEG(r) ( 180.0f * (r) / (FWFLOAT)M_PI ) /////////////////////////////////...
#pragma once #include "QtSql\qsqldatabase.h" class StoryDB { public: static bool init(); static QSqlQuery doQuery(const QString &query); private: static bool bInitialized; };
#include"Header.h" void GSF(cx_mat * TI,cx_mat * TIp,ofstream & Fidelity,ofstream &Nonlocal,ofstream &OrderFile,ofstream &Spectrum ,ofstream&VNE,double&J,ofstream&Nonlocal1) { int Xl=Xi[1]; cx_mat Help0; cx_mat Help1; cx_mat Help2; Help0=trans(TIp[0])*TI[0]; complex<double> s; s=0; s=Help0(0,0); Fidelity<<setprecision ...
#pragma once #include <string> #include <unordered_map> #include <algorithm> #include <vector> #include <iostream> enum HTTPMETHOD { HTTPMETHOD_GET_COMMON, HTTPMETHOD_POST, HTTPMETHOD_OTHER, HTTPMETHOD_GET_PARAERROR }; struct httpMethodStr { HTTPMETHOD httpMethod; std::string dir; std::unordered_map<std::strin...