text
stringlengths
8
6.88M
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include <stdint.h> #include "il2cpp-class-internals.h" #include "codegen/il2cpp-codegen.h" #include "il...
/* * Copyright (C) 2016 liberty-developer * https://github.com/liberty-developer * * This Program 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 2, or (at your option) * any later...
//Probelms with numbers higher than 255, there is a roll over. char ibyte; int i = 0; int f1 = 4; // 0 - 750 int f2 = 5; int a1 = 256; // 0 - 4095 int table[3]; void setup() { Serial.begin(57600); delay(2500); table[0] = f1; table[1] = f2; table[2] = a1; } void loop() { if(true)//Serial:available vali...
#include <vector> #include <boost/test/unit_test.hpp> #include <epecur/track.hpp> using namespace std; BOOST_AUTO_TEST_SUITE( track_test ) BOOST_AUTO_TEST_CASE( check_proper_iteration_func ) { const int CHAMBERS_COUNT = 4; vector<int> count(CHAMBERS_COUNT); count[0] = 3; count[1] = 3; count[2] = 3; count[3] ...
/* * SPDX-FileCopyrightText: 2020 Rolf Eike Beer <eike@sf-mail.de> * * SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once #include "osm2go_platform.h" #include <color.h> #include <QDialog> #include <QPixmap> #include <QPointer> #include <QWidget> class icon_item; struct pos_area; class presets_items; cl...
/* ArdOSC 2.1 - OSC Library for Arduino. -------- licence ----------------------------------------------------------- ArdOSC The MIT License Copyright (c) 2009 - 2011 recotana( http://recotana.com ) All right reserved */ #include <stdlib.h> #include "OSCCommon/OSCClient.h" #include <Ethernet2.h> ...
#include<bits/stdc++.h> using namespace std; int n, a[1000010], b[1000010]; int main(){ scanf("%d",&n); for(int i=0;i<n;i++) scanf("%d",&a[i]), a[i]-=i; priority_queue<int> pq; pq.push(a[0]); int ans = 0; for(int i=1;i<n;i++){ b[i-1] = pq.top(); if(b[i-1]>a[i]){ ans += b[i-1]-a[i]; pq.pop()...
/* Copyright 2017 Istio Authors. All Rights Reserved. * * 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 applicab...
#include "Character.hpp" Character::Character() { } Character::Character(std::string name) : _name(name) { int i = -1; while (++i < 4) this->_inventory[i] = NULL; } Character::~Character() { int i = 0; while (_inventory[i] && i < 4) { delete this->_inventory[i]; this->_inventory[i] = NULL; i++; } } C...
/******************************************************************************* * Cristian Alexandrescu * * 2163013577ba2bc237f22b3f4d006856 * * 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ...
#pragma once #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #include <algorithm> #include <limits> #include <tuple> #include "CrosslinkSpectralMatch.h" #include "Crosslinker.h" #include "../PrecursorSearchModes/MassDiffAcceptor.h" #include "../CommonParameters.h" #include "../...
/* SH_LoginDialog.cpp */ #include "include\SH_LogInDialog.h" /* Constructor */ SH_LogInDialog::SH_LogInDialog(QWidget *parent, Qt::WindowFlags) : QDialog(parent) { // Set-up window //this->setWindowFlags(Qt::FramelessWindowHint); //this->setWindowFlags(Qt::SubWindow); this->setFixedSize(400, 100); //this->setPa...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Storage.Compression.2.h" WINRT_EXPORT namespace winrt { namespace Windows::Storage::Compression { struct WINRT_EBO Compressor : Windows::Storage::Compression::ICompress...
#ifndef GHOST_H_ #define GHOST_H_ #include "dead.h" #include "../../Items/pill.h" namespace haunted_house { class Human; class Ghost: public Dead{ public: Ghost(); Ghost(std::string name); ~Ghost(){}; Ghost(const Character &d); //TODO How to copy and assign?? bool steal(); }; } #endif
#ifndef AUTRENDPLOT_H #define AUTRENDPLOT_H #include <QWidget> #include <QColor> #include <QPen> #include <QPainter> #include <QObject> // Клас малювання самого графіка class TrendPlot: public QWidget { Q_OBJECT public: TrendPlot(QWidget *p=nullptr); ~TrendPlot(); inline QSize sizeHint() const {retu...
#ifndef MYINTERACTORSTYLE_H #define MYINTERACTORSTYLE_H #include <QObject> #include "graphicsanalyse_global.h" #include "vtkRenderer.h" #include "vtkEventQtSlotConnect.h" #include "vtkWidgetEvent.h" #include "vtkCallbackCommand.h" #include "vtkRenderWindowInteractor.h" #include <vtkSmartPointer.h> #include "string.h"...
/** * @file * @author gorg * @version 0.0 * @date Wed 12 Nov 2014 11:22:03 PM CET * @section LICENCE * * This program 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 2 of * the License...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.ApplicationModel.CommunicationBlocking.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_cdb5efb3_5788_509d_9be1_71ccb8a3362a #...
#include "ImageLoader.hh" void ImageLoader::Compute() { sf::Texture texture; if (!texture.loadFromFile(in_file->GetData())) { std::string msg = "Failed to open file " + in_file->GetData(); logger.LogE() << msg; throw msg; } texture = LimitTextureSize(texture); SetData(out_size, texture.getSize()); SetData...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include "threadbehavior.h" #include <QTimer> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); ThreadBehavior tbehavior; QTimer tim...
#include "itensor/all.h" #include <iostream> // std::cout, std::fixed #include <iomanip> // std::setprecision #include <typeinfo> using namespace itensor; using namespace std; int main() { auto q = QN("Nb=",2); auto q1 = QN("Nb=",3); auto q2 = QN("Nb=",4); //auto b = QN({0,3}); //auto b1 = QN({1,3}); //auto ...
//A sorted linked list implementation of a min-priority queue //(c) 2021 Max Goren - MaxGCoding.com //Distributed under the MIT License. (See Bottom) template <typename item_t> class pq { public: const int itemMIN = -66642069; const int itemMAX = 66642069; class node { public: int priority; ...
#pragma once #include <iostream> #include <memory> #include "utils.hpp" #include "replay_memory.hpp" #include "qlog.hpp" #include "msg.pb.h" #include "zmq_base.hpp" #include "bounded_vector.hpp" template<class RM> class ReplayMemoryClient : public ZMQBase { public: const std::string uuid; std::string sub_endpoint...
// // Created by wqy on 19-11-17. // #ifndef VERIFIER_BEAGLEMODEL_H #define VERIFIER_BEAGLEMODEL_H #include "BeagleModule.h" #include "BeagleProperty.h" #include <list> using std::list; namespace esc { class BeagleModel { private: list<BeagleModule*> modules; list<BeagleProperty*> properties; ...
#pragma once #include "cbaseshader.h" class cAlphaShader : public cBaseShader { public: virtual void Setting( LPDIRECT3DTEXTURE9 pTexture, D3DXMATRIXA16* pWorld); public: cAlphaShader(void); ~cAlphaShader(void); };
#include<bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) using namespace std; int main(){ fastio; string str,aux=""; bool pal=true; cin>>str; for(int i=0;i<str.size();i++){ if((str[i]=='a' ) || (str[i]=='e') || (str[i]=='i') || (str[i]=='o') || (str[i]=='u')){ a...
#include <stdio.h> #include <iostream> #include <algorithm> using namespace std; int max(int a, int b) { if (a > b) { return a; } return b; } int main(int argc, char const *argv[]) { while (true) { int nodesElements[20001]; fill_n(nodesElements, 20001, -1); int noInputsA; scanf("%d", &noInputsA);...
//////////////////////////////////////////////////////////////////////////////// // // 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 ...
/*-------------------------------------------------------------- Program: brake_sensor Description: Reads value of sensor attached to arduino board Hardware: Arduino Uno with digital sensor Date: 21 January 2016 Author: Ryan Trumpore ---------------------------------------------...
// // MrCrash - crash info reporting tool // Copyright (C) 2005-2014 Michael Fink // /// \file ModuleInfo.hpp Module info // #pragma once // includes #include <memory> #include <ulib/win32/SystemTime.hpp> namespace Debug { /// \brief module infos /// data is shared between copies of this object class ModuleInfo { pu...
//===------ AccessEnforcementOpts.cpp - Optimize access enforcement -------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
#include <iostream> using namespace std; int n; int a[52][52]; int f[26][26]; int solve (int x, int y) { if (f[x][y] > 0) return f[x][y]; if (x<=0 || y<=0) return 0; else { int t1 = solve (x-1, y); int t2 = solve (x-1, y-1); f[x][y] = max (...
#define sensorPin A0 #define key 195 uint8_t data_buffer[300]; uint8_t byte_buffer; uint8_t byte_buffer_1; bool isSync = false; bool isKeyDetected = false; bool currentState; uint16_t threashold = 500; int counter; unsigned long t0 = 0; unsigned long t1 = 0; unsigned long time_lo = 0; unsigned long time_mid = 0; unsi...
#include <bits/stdc++.h> using namespace std; int main() { double a; int b, c, d, e, f, n; int h, i, j, k, l, m; scanf("%lf", &a); h=a/100; a=a-h*100; i=a/50; a=a-i*50; j=a/20; a=a-j*20; k=a/10; a=a-k*10; l=a/5; a=a-l*5; m=a/2; a=a-m*2; b=a/1.00; ...
#ifndef CUSTOM_H_INCLUDED #define CUSTOM_H_INCLUDED #include <cstdio> #include "data.h" using namespace std; STUD *pStArr = new STUD [students_ammount]; int students_init_flag = 0; void InitStudents(); void PrintStudents(); void SaveListOfStudents(); void ProcessListOfStudents(); void InitStudents(){ if (stu...
/* ======================================================================== Name : TraceManagerApplication.cpp Author : DH Copyright : All right is reserved! Version : E-Mail : dh.come@gmail.com Description : Copyright (c) 2009-2015 DH. This material, including documentatio...
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ vector<int> guild; int N, fear, answer = 0; cin >> N; for(int a = 0; a < N; a++){ cin >> fear; guild.push_back(fear); } /*guild 벡터의 오름차순 정렬*/ sort(guild.begin(), guild.end()); i...
/* 15685. 드래곤커브 다시풀기 규칙을 찾자. */ #include <iostream> #include <vector> using namespace std; int T, x, y, d, g; int dr[4] = {0,-1,0,1}; int dc[4] = {1,0,-1,0}; bool board[101][101]; vector<int> dir; int main() { cin >> T; for(int i = 0; i < T; i++) { cin >> y >> x >> d >> g; dir.cl...
#include "Shape.hpp" // TODO ... Shape::Shape() { _appearance=(Node*) 0; _geometry=(Node*) 0; } Shape::~Shape() { delete _appearance; delete _geometry; } Node* Shape::getAppearance() { return _appearance; } Node* Shape::getGeometry() { return _geometry; } void Shape::setAppearance(No...
#define ENTITY_NAME Thing entity_begin() entity_field(vec2, position) entity_field(f32, speed) entity_field(u32, health) entity_field(u32, damage) entity_end(64)
#ifndef ARTICLE_H #define ARTICLE_H #include <SFML/Graphics.hpp> #include "enumController.h" class GameWindow; class ComputerDesktop; class Textures; class Article { public: Article(); Article(GameWindow* gameWindowP, ComputerDesktop* desktopP, int x, int y, articles type); void render()...
#pragma once #include "SI.hpp" namespace Tools { namespace Math { namespace Unit { enum class UnofficialSI : char { minute = static_cast<char>(SI::candela) + 1, hour, day, radian, degree, }; } } }
dp[0...n][j] 当在i的条件下循环完j 则已得到d[i][w]值 即在w的容量下装i个物品的最优 对于第i+1个物品,对已有的d[i][0...w]数组的所有值进行遍历,如果有新的值大于原来的d[i][w],更新d[i+1][w]为新的值,否则 d[i+1][w]的值就是原来d[i][w]的值 对 max(dp[i-1][j], dp[i-1][j-w[i]] + v[i])的解释 (比较的是 ...
#include <gtest/gtest.h> #include "hs_sfm/homography/homography2d_vector_function.hpp" #include "hs_sfm/homography/homography2d_synthetic_data_generator.hpp" namespace { template <typename _Scalar> class TestHomography2dVectorFunction { public: typedef _Scalar Scalar; typedef int Err; typedef hs:...
#include "category.h" QString Category::getName() const { return name; } void Category::setName(const QString &value) { name = value; } Category::Category() { name = QString("New category"); }
/* * Interface Main * @author Patricio Ferreira <3dimentionar@gmail.com> */ #ifndef GAME_MAIN_H #define GAME_MAIN_H #include <QGuiApplication> namespace game_main { class Main { protected: QGuiApplication* app; QQmlApplicationEngine* engine; public: Main(QGu...
#include "../../../log.h" #include "../../../error.h" #include "../vkrenderer.h" #include "imgui_impl_vulkan.h" #include "../../../gui/imgui_impl_glfw.h" namespace tna { static void check_vk_result(VkResult err) { if (err == 0) return; TNA_LOG_ERROR(TNA_ERROR::E_RENDERER_GUI_ERROR, "GUI error"); } void ...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "codeedit.h" #include <QString> #include <QDir> #include <QFileDialog> #include <fstream> #include <sstream> #include <QDebug> #include <QProcess> using namespace std; static QProcess *proc = new QProcess(); MainWindow::MainWindow(QWidget *parent) : QMa...
#include"iostream" using namespace std; class link{ struct node{ int data; node *next; node *prev; }; public: node *head=NULL; node *tail=NULL; void insert(){ cout<<"enter the number of elements you want to add : "; int i,n,x; cin>>n; for(i=0;i<n;i++){ cin>>x; node *temp=new node; temp->pre...
/* Copyright 2018 Istio Authors. All Rights Reserved. * * 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 applicab...
#include "PanelGame.h" #include "imgui/imgui.h" #include "Application.h" #include "ModuleRenderer3D.h" #include "ModuleWindow.h" #include "ModuleGui.h" #include "ModuleCamera3D.h" #include "ComponentCamera.h" #include "ComponentTransform.h" #include <algorithm> #include "Event.h" PanelGame::PanelGame(std::string na...
namespace diy { struct Master::IExchangeInfoDUD: public IExchangeInfo { struct Message { std::array<int,2> msg; mpi::request request; }; using IExchangeInfo::IExchangeInfo; inline bool all_done() override; /...
#include<iostream> using namespace std; int max(int a, int b) { return (a > b ? a : b); } int dp[1001]; int value[101]; int times[101]; void func() { int T, M; while (cin >> T >> M) { for (int i = 1;i <= M;i++) { cin >> times[i] >> value[i]; } for (int i = 0;i <= T;i++) { dp[i] = 0; } for (int i = ...
// // Created by 王润基 on 2017/4/8. // #include "Vector3.h" #include "Geometry.h" template<class T> Vector3<T> Vector3<T>::operator+(Vector3<T> const &b) const { return Vector3(x + b.x, y + b.y, z + b.z); } template<class T> Vector3<T> Vector3<T>::operator-(Vector3<T> const &b) const { return Vector3(x - b.x, ...
#pragma once #include <cstddef> #include <functional> #include <iostream> #include <vector> #include <realm/util/identifier.hpp> #include <realm/util/type_traits.hpp> namespace realm { /** * @brief Memory layout * Describes a particular layout of memory. Inspired by Rust's alloc::Layout. * @ref https://doc.rust-l...
//////////////////////////////////////////////////////////////////////////////// // // 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 "DoorProduct.h" #include <iostream> void KoreaDoor::makeAssemble() { std::cout << "[KoreaDoor] makeAssemble()" << std::endl; } void USADoor::makeAssemble() { std::cout << "[USADoor] makeAssemble()" << std::endl; }
#ifndef REGISTRATIONWINDOW_H #define REGISTRATIONWINDOW_H #include <QWidget> #include "linqedinadmin.h" namespace Ui { class registrationwindow; } class registrationwindow : public QWidget { Q_OBJECT public: explicit registrationwindow(LinQedInAdmin* ad, QWidget *parent = 0); ~registrationwindow(); pri...
#include"system.h" #include<cmath> int System::getK(){ return this->K; } int System::getRa(){ return this->Ra; } int System::getRb(){ return this->Rb; } void System::setK(int tmpK){ this->K = tmpK; } void System::setRa(int tmpRa){ this->Ra = tmpRa; } void System::setRb(int tmpRb){ ...
#include <algorithm> #include <vector> using namespace std; class Solution { public: int distributeCandies(vector<int>& candies) { sort(candies.begin(), candies.end()); int sz = candies.size(); candies.erase(unique(candies.begin(), candies.end()), candies.end()); return min((int)candies.size(), sz /...
/** * @file Ant-chain.cc * @brief hadd like tool to concatenate TTrees in ROOT files using TChains. * * Creates a TChain in the output file for each TTree found in the first input file * and uses AddFile() to add each input file to each TChain. */ //Ant #include "base/Logger.h" #include "base...
#pragma once #include <vector> #include "Scene.h" #include "Agent.h" #include "Image.h" class PathFollowingScene : public Scene { public: PathFollowingScene(); ~PathFollowingScene(); void update(float dtime, SDL_Event *event); void draw(); const char* getTitle(); private: std::queue<Vector2D> path; std::vector...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Projectile/Arrow/Arrow.h" #include "ArrowPlague.generated.h" /** * Plague arrow capable of killing an enemy */ UCLASS() class SUNSHINE_API AArrowPlague : public AArrow { GEN...
#include <stdio.h> #include <algorithm> #include <vector> using namespace std; // 普通方法:vector,普通数组:MLE const int maxn = 100001; // 剪枝方法:高内存题STL更优,但用vector还是TLE vector<int> heap; int n = 1; void downAdjust(int low, int high) { int f = low; int s = f * 2; while (s <= high) { if (s + 1 <= high &&...
/*************************************************************************** * Filename : Mesh.h * Name : Ori Lazar * Date : 30/10/2019 * Description : An abstract interface declaration for a mesh object, currently * used to auto generate primitives. .---. .'_:___". |__ --==| [ ...
/** * Copyright 2019 Utkarsh Bhatt * Author : Utkarsh Bhatt * Date : 09/10/2019 (9th October 2019) * Struct : Singular Queue * Using : Internal Linked List * Type : Generic (Templated) */ #ifndef INCLUDE_QUEUELL_HPP_ #define INCLUDE_QUEUELL_HPP_ #include <sstream> #include <iostream> #inclu...
#include "Log.h" #include "../Memory/Memory.h" namespace Log { void Init(std::string logFileName) { g_pLogManager = new LogManager(); g_pLogManager->Init(logFileName); } void WriteLog(std::string tag, std::string str) { g_pLogManager->WriteLog(tag, str); } void Destroy() { SAFE_DELETE(g_pLogManager); ...
//Copyright (C) 2011 by Ivan Fratric // //Permission is hereby granted, free of charge, to any person obtaining a copy //of this software and associated documentation files (the "Software"), to deal //in the Software without restriction, including without limitation the rights //to use, copy, modify, merge, publish, di...
#ifndef VECTORMODEL_H #define VECTORMODEL_H #include "ModelBase.h" #include "Common.h" namespace FastCAEDesigner { class VectorModel : public ModelBase { Q_OBJECT public: VectorModel(QString nameEng, QString nameChn, QString iconName, QObject *parent); ~VectorModel(); virtual ModelBase* CreateChildModel...
// // en_jump_stay.cpp // CRsim // // Created by Ji on 14-10-3. // Copyright (c) 2014年 lj. All rights reserved. // #include "en_jump_stay.h" EnJsHop::EnJsHop() : JsHop() { init_seq(); } EnJsHop::EnJsHop(int cur_avai_n) : JsHop(cur_avai_n) { init_seq(); } EnJsHop::EnJsHop(int cur_chan_n, vI &avai) : JsHo...
#include "Motores.h" #ifndef WIRING_H #include <Arduino.h> #endif int sentido=0; Motores::Motores() { } Motores::Motores(int mm1_a,int mm1_b,int mm1_pwm,int mm2_a,int mm2_b,int mm2_pwm) { configurar(mm1_a,mm1_b,mm1_pwm,mm2_a,mm2_b,mm2_pwm); } void Motores::configurar(int mm1_a,int mm1_b,int mm1_pwm,int mm2_a...
#include <String.h> #include <DHT.h> #define DHTPIN A0 DHT dht(DHTPIN, DHT11); //unsigned int set_point=20; //char arr[3] = {0}; int x = 0; unsigned char recv; unsigned int set_point = 30; void check_serial(); void setup() { //gprsSerial.begin(9600); // the GPRS baud rate Serial.begin(9600); // the GPRS baud...
/* 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...
// This file has been generated by Py++. #include "boost/python.hpp" #include "generators/include/python_CEGUI.h" #include "ElementEventArgs.pypp.hpp" namespace bp = boost::python; struct ElementEventArgs_wrapper : CEGUI::ElementEventArgs, bp::wrapper< CEGUI::ElementEventArgs > { ElementEventArgs_wrapper(CEGUI:...
#include "Button.h" Button::Button(GameWindow* passed_gamewindow, int x, int y, int w, int h, string passed_buttonText, string buttonpath, float* passed_CameraX, float* passed_CameraY, int passed_frameX, int passed_frameY, int fontsize) { frameX = passed_frameX; frameY = passed_frameY; gamewindow = passed...
#ifndef OPTICALFLOW_SLAM_ALGORITHM_BASE_COMPONENT_FEATURE2D_H_ #define OPTICALFLOW_SLAM_ALGORITHM_BASE_COMPONENT_FEATURE2D_H_ #include "algorithm/common_include.h" #include "algorithm/base_component/include/mappoint3d.h" #include "algorithm/base_component/include/frame.h" namespace OpticalFlow_SLAM_algorithm_opticalf...
#ifndef RESIDUAL_CHECK_HPP #define RESIDUAL_CHECK_HPP #include <vector> #include "Epetra_FEVector.h" #include "Teuchos_CommandLineProcessor.hpp" #include "Teuchos_StandardCatchMacros.hpp" #include "Teuchos_RCPDecl.hpp" #include "BelosConfigDefs.hpp" #include "BelosLinearProblem.hpp" #include "BelosEpetraAdapter.hpp" ...
#include <SoftwareSerial.h> SoftwareSerial mySerial(3,4); int input; void setup(){ mySerial.begin(9600); int WLed = 0; int BLed = 1; pinMode(WLed, OUTPUT); pinMode(BLed, OUTPUT); } void loop(){ int WLed = 1; int BLed= 0; if (mySerial.available()){ input = mySerial.read(); } if (input == '...
// // Compiler/AST/ExpressionLiteral.cpp // // Brian T. Kelley <brian@briantkelley.com> // Copyright (c) 2007, 2008, 2011, 2012, 2014 Brian T. Kelley // // Chris Leahy <leahycm@gmail.com> // Copyright (c) 2007 Chris Leahy // // This software is licensed as described in the file LICENSE, which you should have received a...
// Copyright 2019 Apex.AI, 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 i...
#include <iostream> using namespace std; int main(void) { int year, month, day; cout << "Input any year from 1900: " << endl; cin >> year; cout << "Input number of month(1-12): " << endl; cin >> month; cout << "Input number of day of the month: " << endl; cin >> day; cout << endl; month -= 2; if (month <=...
#include "Mesh.h" #include <stdexcept> using namespace revel::renderer; namespace revel { namespace geo { Mesh::Mesh() : m_PrimitiveType(PrimitiveType::TRIANGLES) , m_WindingOrder(WindingOrder::COUNTER_CLOCKWISE) , m_Attributes() , m_pIndices(std::make_shared<Indices<u32>>()) { } void Mesh::add_ver...
// Copyright ⓒ 2020 Valentyn Bondarenko. All rights reserved. #include <StdAfx.hpp> #include <MainMenu.hpp> namespace be::game { void MainMenu::render_ui() { ImGui::SetNextWindowPos({ 80, 250 }, ImGuiCond_::ImGuiCond_Once); ImGui::Begin("Main Menu", (bool*)false, ImGuiWindowFlags_...
#include "pch.h" #include <iostream> #include <string> #include <boost/lexical_cast.hpp> #include <vector> #include<fstream> using namespace std; class Document; //class IMachine { // virtual void print(Document& doc) = 0; // virtual void fax(Document& doc) = 0; // virtual void scan(Document& doc) = 0; //}; // //str...
/* * Copyright (c) 2021 Huawei Device Co., Ltd. * 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 applica...
#ifndef UNTITLED1_LINE_H #define UNTITLED1_LINE_H #include "point.h" class Line { public: Point m_p1; Point m_p2; public: Line(Point p1, Point p2); }; #endif //UNTITLED1_LINE_H
#include <string> #include <vector> #include <algorithm> using namespace std; vector<int> solution(vector<int> heights) { vector<int> answer; int n = heights.size(); for (int i = heights.size() - 1; i > 0; i--) { int j = n-1; while (1) { if (j < 0) { answer.push_back(0); n--; break; } ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
// // Created by 邓岩 on 2019/6/11. // /* * 1、问题描述 学生信息包括:学号、姓名、性别、年龄、班级等信息 小学生除了包括学生所有信息外,还包括英语、数学和语文成绩。 中学生除了包括小学生所有信息外,还包括地理、历史成绩。 大学生除了包括学生所有信息外,还包括专业、英语、程序设计和高等数学等课程。 设计一个程序能够对学生成绩进行管理,应用到继承、抽象类、虚函数、虚基类、多态和文件的输入/输出等内容。 2、功能要求 (1)添加功能:程序能够添加不同学生的记录,提供选择界面供用户选择所要添加的类别,要求学号要唯一,如果添加了重复学号的记录时,则提示数据添加重复并取消添加。 (2...
#pragma once #include "car.h" #include "speedometer.h" Car::Car(int num) { number = num; action = "parked"; } int Car::main(void) { speedometer speed(number); speed.Resume(); for (int i = 0; i < 1000; i++) { if (brakes) { speed.decrement(); } if (accelerate) { speed.increment(); } std::cout << "...
#include <iostream> #include <limits> using namespace std; int main(){ int a = numeric_limits<int>::min(); int b = numeric_limits<int>::max(); cout << a-1 << endl; cout << b+1 << endl; }
#include<stdio.h> #include "job_generator.h" #include<iostream> #include<vector> #include<list> int main() { Job_Generator *job_gen = new Job_Generator(); task *t0 = new task(1, 50,100); task *t2 = new task(2, 20,500); task *t3 = new task(3, 40,200); task *t4 = new task(4, 90,800); task *t1 = new task(5, ...
#include <Tone.h> //Library to help with tone #include <math.h> //Library to perform math operations like e^x //Sensor Pins #define SLEP 7 //Left Sensor Echo Pin #define SLTP 6 //Left Sensor Trigger Pin #define SREP 4 // Right Sensor Echo Pin #define SRTP 5 //Right Sensor Trigger Pin //Button Pins #define L...
// // Copyright Jason Rice 2017 // 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_SQL_DB_CONCEPT_TABLE_ENTITY_HPP #define NBDL_SQL_DB_CONCEPT_TABLE_ENTITY_HPP #include <nbdl/concept/Entity.hpp> #in...
#include <iostream> #include <Windows.h> #include <process.h> #include <conio.h> #include "Stack.h" using std::cout; using std::cin; using std::endl; CRITICAL_SECTION cs; void Add_items(void* stack) { Stack& st = *(Stack*)stack; std::string Text; cout << "Enter text: "; cin >> Text; EnterCriticalSection(&cs); ...
// // Created by ivan on 6/9/18. // #include "../include/mathGL_graphics.h" #include <cmath> #include <list> #include <string> /** * * Example of plotting two arguments function f(x) = e^(x^2/100) * cos(5*x), * using animation and saving to file * x[-10,10] Dots amount: 1000 * */ double f(const double &x) { ...
#include "process.h" #include <iostream> using namespace std; process::process() { } process::process(string pid, int at, int bt, int p) { set_PID(pid); set_arrival_time(at); set_burst_time(bt); set_priority(p); } process::~process() { } void process::set_PID(string pid) { PID = pid; } string process::get_P...
/* * UAE - The Un*x Amiga Emulator * * Win32 uaenet emulation * * Copyright 2007 Toni Wilen */ #include <winsock2.h> #include <Ws2tcpip.h> #include <Iphlpapi.h> #include "sysconfig.h" #include "sysdeps.h" #include <stdio.h> #define HAVE_REMOTE #define WPCAP #define PCAP_DONT_INCLUDE_PCAP_BPF_H #include "pcap.h" #in...
// // Created by julien@macmini on 2019-12-11. // #include "NativeApp.h" NativeApp::NativeApp() {} NativeApp::~NativeApp() {} int NativeApp::getBeastNumber() { return beast.getNumber(); }
# ifndef JAVABACKENDCOMPILER_BYTECODES_H # define JAVABACKENDCOMPILER_BYTECODES_H /* iconst_<i> */ #define ICONST_0 0x03 #define ICONST_1 0x04 #define ICONST_2 0x05 #define ICONST_3 0x06 #define ICONST_4 0x07 #define ICONST_5 0x08 /* iload_<i> */ #define ILOAD_0 0x1a #define ILOAD_1 0x1b #define ILOAD_2 0x1c #defin...