text
stringlengths
8
6.88M
/* primitive_short.cpp -*- C++ -*- Rémi Attab (remi.attab@gmail.com), 12 Apr 2014 FreeBSD-style copyright and disclaimer apply Short reflection */ #include "primitives.h" #include "primitives.tcc" /******************************************************************************...
// // StormTrooper.h // emptyExample // // Created by Leytzher on 2/15/15. // // #ifndef __emptyExample__StormTrooper__ #define __emptyExample__StormTrooper__ #include <stdio.h> #include "ofMain.h" class StormTrooper{ public: StormTrooper(); void setup(); void update(); void draw(); ofPoint pos; ofPoint v...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
// // OperateLayer.hpp // CatchGirl // // Created by xin on 16/4/6. // // #ifndef OperateLayer_hpp #define OperateLayer_hpp #include <stdio.h> #include "cocos2d.h" #include "ui/CocosGUI.h" USING_NS_CC; using namespace ui; class OperateLayer:public Layer{ public: CREATE_FUNC(OperateLayer); virtual boo...
/* * SPDX-FileCopyrightText: (C) 2016-2017 Daniel Nicoletti <dantti12@gmail.com> * SPDX-License-Identifier: BSD-3-Clause */ #include "postunbuffered.h" PostUnbuffered::PostUnbuffered(QObject *parent) : QIODevice(parent) { } #include "moc_postunbuffered.cpp"
// // Created by wiktor on 04.05.18. //
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // callRMultinom IntegerVector callRMultinom(NumericVector x); RcppExport SEXP IPTM2_callRMultinom(SEXP xSEXP) { BEGIN_RCP...
/** * @file SystemTimePrompt.h * Defines the SystemTimePrompt class. * @date Apr 29, 2014 * @author: Alper Sinan Akyurek */ #ifndef SYSTEMTIMEPROMPT_H_ #define SYSTEMTIMEPROMPT_H_ #include "MessageHeader.h" #include "MessageEnder.h" namespace TerraSwarm { /** * System Time Prompt message sent from t...
#include <iostream> using namespace std; extern int sumar(int a,int b); //define que se espera recibir una instruccion que esta en otro archivo int main(int argc, char const *argv[]) { system("cls"); cout<<sumar(5,7); cout<<endl; return 0; }
#pragma once namespace { static const std::string path = "/var/tmp/"; }//namespace static const std::string LOCAL_USER = getenv("USER"); namespace ENVIRONMENT_PATH { namespace TO_FILE { static const std::string REGISTERED= path + "messenger/configuration/REGISTERED"; static const std::string LOGGED = path + "messeng...
//////////////////////////////////////////////////////////////////////////////// // // 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 ...
//Jason Strange //CmpInt inherits from comparable and item to perform functions on priority and submission times #pragma once #include "Comparable.h" #include "Item.h" #include <string> using namespace std; class Comparable; class Item; class CmpInt: public Comparable, public Item{ private: int p,s; s...
#pragma once namespace transprecision_floating_point { template<typename T, typename U> struct comparison_operators { __host__ __device__ static bool equal_to(T lhs, U rhs) { return lhs == rhs; } __host__ __device__ static bool not_equal_to(T lhs, U rhs) { return !equal_to(lhs, rhs); } __host__ __device__ st...
// // cbor.cpp // // Copyright © 2020 by Blockchain Commons, LLC // Licensed under the "BSD-2-Clause Plus Patent License" // #include "cbor.hpp" #include <algorithm> #include "utils.hpp"
#include "SARibbonPannel.h" #include "SARibbonToolButton.h" #include <QApplication> #include <QResizeEvent> #include <QAction> #include <QIcon> #include <QDebug> #include <QGridLayout> #include <QFontMetrics> #include <QPainter> #include <QApplication> #include <QDesktopWidget> #include "SARibbonCategory.h" #include "...
int rbyte[10]; void setup() { Serial.begin(57600); delay(2500); } int i = 0; byte a; int f1 = 0; bool Start = false; void loop() { if(Start) { if(Serial.available()>0) { for(i=0;i=10;i++) { rbyte[i]=Serial.read(); Serial.write(rbyte[i]); delay(1); } } } } void se...
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <queue> using namespace std; /* 统计哪些词仅仅出现了1次 没有出现 出现了 出现了2+次 找第一个只出现了两次的字符 */ class Solution{ private: vector<int> cnt; // #char vector<int> id2char; // char appear sequence vector<int> char2id; int id; ...
/****************************************************************************** * Program Filename: configuration.h * Author: Kelvin Watson (OSU ID 932540242) * Date: 11 January, 2015 * Description: (Assignment 1, CS 162) Interface for configuration.cpp. Contains the declaration for the configuration class, ...
#include <iostream> using namespace std; template <class T, class S> struct nodo {T clave; S descrip; nodo<T,S> * sig; }; int main(){ nodo<int,char> *p = new nodo <int, char>, *q = new nodo <int, char>; p->clave = 2; p->descrip = 's'; p->sig = q; q->clave = 3; q->descrip ='F'; q->sig ...
#pragma once #ifndef WOTPP_FLAGS #define WOTPP_FLAGS #include <cstdint> #include <misc/fwddecl.hpp> namespace wpp { enum: flags_t { WARN_PARAM_SHADOW_VAR = 0b000000000000000001, WARN_PARAM_SHADOW_PARAM = 0b000000000000000010, WARN_FUNC_REDEFINED = 0b000000000000000100, WARN_VAR_REDEFINED = 0b0000...
#ifndef ZOMBIE_H #define ZOMBIE_H class zombie { }; #endif // ZOMBIE_H
#ifndef UI_H #define UI_H #include <QApplication> #include <QWindow> #include <QMainWindow> #include <QWidget> #include <QFile> #include <QTextStream> #include <QGridLayout> #include <QVBoxLayout> #include <QHBoxLayout> #include <QLabel> #include <QPushButton> #include <QFont> #include <QSpacerItem> #include <QDebug> ...
#ifndef NECESSITY_H #define NECESSITY_H #include "GroceryItem.h"; class Necessity : public GroceryItem { public: Necessity(float price) : GroceryItem(price) {} double accept(iVisitor& visitor) override { return visitor.visit(this); } }; #endif // !NECESSITY_H
#pragma once #include <SDL2/SDL.h> #include <SDL2_image/SDL_image.h> #include <stdio.h> #include <string> class Texture { public: Texture(); Texture(std::string path); ~Texture(); //Loads image at specified path bool loadFromFile( std::string path ); //Deallocates texture void free(); //Set color modu...
#include<iostream> #include<math.h> using namespace std; static int arr[10][2]; int pow(int a,int b) { if(b==0) return 1; int s=a; for(int i=1;i<b;i++) s=s*a; return s; } bool iseven(int a) { if(a%10==0) return true; int p=1,q=a; int m=(int)log10(a); while(q) ...
#include<iostream> using namespace std; const int MAX_CITY_COUNT = 500; const int MAX_INT = 0x7fffffff; int cities[MAX_CITY_COUNT]; int dist[MAX_CITY_COUNT][MAX_CITY_COUNT]; int pathCounts[MAX_CITY_COUNT]; int teamSizes[MAX_CITY_COUNT]; int ShortestPath(int citySum, int from, int to) { int length[MAX_CITY_COUNT]; ...
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** 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 ...
// // Compiler/Language/MiniJava/ContextBuilder.h // // 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 r...
#include<iostream> using namespace std; void countingSort(int input_array[], int range , int size){ int count_array[range]={0}; int output_array[size]={0}; // counting the elements for(int i=0;i<size;i++){ count_array[input_array[i]]++; } // c.c.f for(int i=1;i<range;i++){ count_array...
/* Source: http://lua-users.org/wiki/LunaFive 20.12.2018 Edited: Spacing, indentation, includes by Daniel Riissanen 20.12.2018 Edited: Combine with some of Lunar's code: http://lua-users.org/wiki/CppBindingWithLunar 21.12.2018 Modify and customize functions */ #pragma once #ifdef __cplusplus #include <lua.hpp...
#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define ll long long #define pii pair<int,int> #define all(x) begin(x), end(x) #define loop(i,n) for(int i=0; i<n; i++) #define rep(i,a,b,c) for(int i=a; i<b; i+=c) #define tc(t) int t; cin>>t; ...
#include "gui\Singularity.Gui.h" namespace Singularity { namespace Gui { #pragma region Methods void ListPanel::AddListElement(ListBoxElement* element) { element->Set_Visible(this->Get_Visible()); this->AddChildControl(element); if (element->Get_Text() == "") element->Set_Enabled...
/// L 大力模拟不要怂,但题目没保证没前导0 #include <stdio.h> int main() { int n; scanf("%d", &n); n = n-n%10000 + n/100%10*1000 + n%10*100 + n/10%10*10 + n/1000%10; long long res = 1LL; for(int i=0; i<5; i++) res = res*n%100000; printf("%05I64d\n", res); return 0; }
/* * Copyright 2016-2017 Flatiron Institute, Simons Foundation * * 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 ...
#include<iostream> using namespace std; int SoDaoNguoc(int n){ int SoDao = 0; while(n > 0){ SoDao = SoDao*10 + n%10; n = n/10; } return SoDao; } bool KiemTraSoDoiXung(int n){ if (SoDaoNguoc(n)==n) return true; else return false; } int main(){ int n; cin >> n; int a,b,j, dem=0; for (in...
/************************************************************* * > File Name : P2897.cpp * > Author : Tony * > Created Time : 2019/08/26 12:40:43 * > Algorithm : [DataStructure]stack **************************************************************/ #include <bits/stdc++.h> using names...
#include<stdio.h> #include<windows.h> #include<conio.h> #include<stdlib.h> #include<list> using namespace std; // Librería ya generadas de las teclas #define ARRIBA 72 #define IZQUIERDA 75 #define DERECHA 77 #define ABAJO 80 // Ubicar la tecla en la posición cartesiana x,y void gotoxy(int x,int y) { HANDLE hco...
#ifndef DETECT_H #define DETECT_H /******************************************************************** // 这个类为一个抽象类,在以后可以增加不同的Detect来检查两个文件的相 // 似度。 // ********************************************************************/ class Detect { public: Detect() {} virtual ~Detect() {} virtu...
/* 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...
/* * Note: accel func, speed */ // defines pin numbers for motor1 const int stepPin1 = 3; const int dirPin1 = 2; const int MS1_1 = 4; const int MS2_1 = 5; const int MS3_1 = 6; //defines pin numbers for motor2 const int stepPin2 = 8; const int dirPin2 = 9; const int MS1_2 = 10; const int MS2_2 = 11; const int ...
Node* convert(Node* head) {          int count = 0;     for (Node* p = head; p != NULL; p=p->next) { count++; }     int b1Index = count/2;          Node* b = head;     for (int i = 0; i < b1Index; i++) b = b->next;     Node* a = head;          Node* a1 = head; Node* b1 = b;     a = a1->next;  //a2     b = b1->next;  /...
#include <Pn532NfcReader.h> #include <PN532_HSU.h> #include <PN532.h> #include <SPI.h> #include <PN532_SPI.h> #include <NfcAdapter.h> // MPT_readerUno/readerUno.ino uint32_t tagId3 = 0xFF; uint32_t readerId = 0x02; uint16_t * tokenDesejado; bool tagReadyToContinue = false; // --------------------------In...
#pragma once #define DEBUG_MODE #include <cstddef> #include "../../hlt/log.hpp" static std::uint8_t width = 1; static std::uint32_t color = 0xFFFFFF; static std::uint16_t dash; class Gizmos { public: template <typename T, typename U> static void line (T const & start, U const & end) { #ifdef DEBUG_MODE...
#pragma once #include <SDL.h> #include <SDL_image.h> #include <string> // forward declarations class Sprite; class Rect; class Point; // various renderer related enumerators enum class BlendMode { NONE, BLEND, ADD, MOD }; enum class RenderFlip { NONE, HORIZONTAL, VERTICAL, }; /* encapsulates SDL...
// Copyright 2020 JD.com, Inc. Galileo 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 requ...
//************************************************************************** //** //** See jlquake.txt for copyright info. //** //** 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 ...
#include <Servo.h> #include <SoftwareSerial.h> SoftwareSerial bt(12, 11); // RX,TX Servo servos[8]; /* Front Servo0 - Servo2 |--| Servo4 - Servo6 Servo1 - Servo3 |--| Servo5 - Servo7 */ uint8_t pos[8]; uint8_t cpos[8]; int8_t s1 = -10; int8_t s3 = -10; int8_t s7 = +20; uint8_t f...
/* Find merge point of two linked lists Node is defined as struct Node { int data; Node* next; } */ //here, the implemented method in O(m+n): http://www.geeksforgeeks.org/write-a-function-to-get-the-intersection-point-of-two-linked-lists/ int getSize(Node *head){ int ans = 0; whil...
#include <bits/stdc++.h> using namespace std; #define MAX_NM 1000010 int N, M, ans, Jack[MAX_NM], Jill[MAX_NM]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int k,m; while ((cin >> N >> M), (N || M)) { for (int i = 0; i < N; i++) cin >> Jack[i]; for (int j = 0; j < M; j++) cin >> Jill[j...
#pragma once // CRecordDialog dialog class CRecordDialog : public CDialog { DECLARE_DYNAMIC(CRecordDialog) public: CRecordDialog(CWnd* pParent = NULL); // standard constructor virtual ~CRecordDialog(); CString saveFileBox; CString saveFileBox2; bool m_check_saveFileBox; bool m_check_saveFileBox2; // Dialo...
#pragma once namespace ResLibraryData { }
#include <iostream> #include <vector> using namespace std; void quicksort(vector<int>& v, int low, int high) { if (low < high) { int i = low, j = high, pivot = v[low]; while (i < j) { while (i < j && v[j] >= pivot) { //while中须判断i<j --j; } if (i < ...
#ifndef __TABLE_FUNCTION_HPP__ #define __TABLE_FUNCTION_HPP__ #include <jflib/templates/map.hpp> namespace jflib { namespace templates { /** \brief Timeserie template base on a std::map * * This timeserie template is an associative unique * container. For each key there is one and only one value. */ templat...
#include "Setup_2014_EPT.h" #include "base/std_ext/math.h" #include "base/Logger.h" #include "detectors/Trigger.h" #include "detectors/CB.h" #include "detectors/PID.h" #include "detectors/TAPS.h" #include "detectors/TAPSVeto.h" #include "detectors/EPT.h" #include "calibration/modules/Time.h" #include "calibration/mo...
#ifndef MMATH_H #define MMATH_H #include <cmath> namespace MMath{ static const double M_PI = acos((long double) -1); static const double PI = M_PI; static const double DEG_OVER_RAD = 180.0 / M_PI;//в градусы static const double RAD_OVER_DEG = M_PI / 180.0;//в радианы static const float M_PI_FLOAT = static_cast<f...
// HTTPReader.cpp: implementation of the CHTTPReader class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "HTTPReader.h" #include <string.h> #include <tchar.h> #pragma comment(lib,"wininet") CHTTPReader::CHTTPReader(LPCTSTR lpszServerName,bool bUseSSL) : m_h...
#include "matrix_graph.hpp" void push_front(std::vector<int>& arr, int data) { arr.push_back(0); for (size_t i = arr.size() - 1; i > 0; --i) { arr[i] = arr[i - 1]; } arr[0] = data; } void MatrixGraph::AddEdge(int from, int to) { liste_d_adjacence_[from].push_back(to); // push_front(ad...
#include <iostream> #include<string> using namespace std; int main(){ int char_array_size; cin>>char_array_size; char word[char_array_size]; int yes=0,no=0; for(int i=0; i<char_array_size; i++){ cin>>word[i]; } for(int i = 0; i<char_array_size-1; i++){ if(word[i]=='S' && word[i+1]=='F') y...
#include<bits/stdc++.h> using namespace std; int bit[100100], vet[100100]; int n; int soma(int pos){ int s = 0; while(pos > 0){ s+=bit[pos]; pos-=(pos & -pos); } return s; } void atualiza(int pos){ while(pos<=n){ bit[pos]++; pos+=(pos & -pos); } } int main(){ ios_base::sync_with_stdio(false); cin.t...
/************************************************************* Author : qmeng MailTo : qmeng1128@163.com QQ : 1163306125 Blog : http://blog.csdn.net/Mq_Go/ Create : 2018-03-28 14:41:48 Version: 1.0 **************************************************************/ #include <cstdio> #include <iostream> #include <str...
#include"boost/date_time/posix_time/posix_time.hpp" #include<iostream> #include<vector> #include<string> int main(int argc,char** argv){ std::vector<boost::posix_time::time_duration> vd; vd.push_back( boost::posix_time::milliseconds(10) ); vd.push_back( boost::posix_time::microseconds(10) ); vd.push_back( b...
#include "clock.h" using namespace std; int main() { // Constructor Clock c; Clock d(12, 34, 56); Clock e("12:34:56"); Clock f(c); // << overload cout << c << endl; c = c+d; cout << "Addition: " << c << endl; c = c-d; cout << "Subtraction: " << c << endl; cout << "String constructor (should ...
#include<iostream> using namespace std; //initialization --> array and top=-1. Both are declared as global int arr[100],top=-1; //Function to push an element into the stack void push(int ele) { if(top>=5) { cout<<"Overflow"; } else{ top++; arr[top] = ele; } } //Function to pop element from he stack. Functi...
#include "Skeleton.h" const int Skeleton::nextJoint = 4; const int Skeleton::numberOfColumns = 60; const int Skeleton::numberOfJoints = 15; /************************************************ ** Constructors *************************************************/ Skeleton::Skeleton(void) { this->data = mat(0,0); } Skele...
/* Fichier : passgrid.cc Auteur : THAI Jean-François MAIN4 Date : 08/10/16 contient les méthodes de la classe PassGrid */ #include "passgrid.hh" #include "path.hh" #include <iostream> #include <string> #include <fstream> using namespace std; PassGrid::PassGrid(std::size_t h, std::size_t w):longueur_(h), largeur_(w)...
#pragma once #include <array> namespace GraphicsEngine { class InputHandler { public: InputHandler(); template<typename VirtualKey, typename = std::enable_if_t<std::is_enum<VirtualKey>::value || std::is_integral<VirtualKey>::value>> void OnKeyDown(VirtualKey key); template<typename VirtualKey, typename ...
#ifndef CALLBACKHANDLER_H #define CALLBACKHANDLER_H #include "LOpenGL.h" #include "GameWorld.h" class CallbackHandler { private: CallbackHandler() {} CallbackHandler(const CallbackHandler&); CallbackHandler& operator=(const CallbackHandler&); private: static GameWorld* m_pGameWorld; public: ~Cal...
#include "TestBedApp.h" #include <stdio.h> #include <string> #include <vector> TestBedApp* App = NULL; int main( int argc, char* args[] ) { App = new TestBedApp(); App->Initialize("TestBed", 1280,720); App->LoadContent(); App->Run(); return 0; }
/*#pragma once #include <GameEngine.h> class DemoApp3 : public GameEngine { virtual void Initialize() override; virtual void Update(GameTime&) override; virtual void Render() override; };*/
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "base.h" WINRT_WARNING_PUSH #include "internal/Windows.Foundation.3.h" #include "internal/Windows.Foundation.Collections.3.h" #include "internal/Windows.Globalization.NumberFormatting...
//Uva p10130 //Undefined_Error //Dept. ICE, NSTU-11 Batch #include<bits/stdc++.h> using namespace std; #define ll long long #define SZ 100005 #define MX 100000000 #define sfint(a) scanf("%d",&a) #define sfint2(a,b) scanf("%d%d",&a,&b) #define sfint3(a,b,c) scanf("%d%d%d",&a,&b,&c) #define forlp0(i,n) for(int i=0;i<n;i...
/* // Copyright 2007 Alexandros Panagopoulos // // This software is distributed under the terms of the GNU Lesser General Public Licence // // This file is part of Be3D library. // // Be3D is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public Licen...
// ***************************************************************** // This file is part of the CYBERMED Libraries // // Copyright (C) 2007 LabTEVE (http://www.de.ufpb.br/~labteve), // Federal University of Paraiba and University of São Paulo. // All rights reserved. // // This program is free software; you can redist...
#ifndef INEXOR_TEST_NET_DUPLEX_MC_TEST_HEADER #define INEXOR_TEST_NET_DUPLEX_MC_TEST_HEADER #include "gtest/gtest.h" #include "test/net/SimplexMCTest.h" #include "net/net.h" template<typename T_other> class DuplexMCTest_SwapProvider : public SimplexMCTest_Provider { public: T_other *other; DuplexMCTest_SwapProvi...
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main(){ int t; cin >> t; while(t--){ ll a, b, x, y, n; cin >> a >> b >> x >> y >> n; ll c1 = max(x, a - n); ll c2 = max(y, b - n); if( c1 > c2) swap(x,y), swap(a,b); ll tmp = min(n,a-...
#include "headerFiles/akinatorHeader.h" const char open_bracket = '{'; const char close_bracket = '}'; const char* default_filename = "base.txt"; const char* variants_yes[] = {"y", "ye", "yes", "yeah"}; const size_t amount_yes = 4; const char* variants_no[] = {"n", "no", "nope"}; const size_t amount_no = 3; const size...
#include<iostream> using namespace std; int main() { int t; cin>>t; for( int i=0; i<t; i++) { int n; cin>>n; int p_prev = 0,c_prev =0; int p,c; int flag = 0; for( int i=0; i<n; i++) { cin>>p>>c; if(p - p_prev >= c - c_prev && c - c_prev >=0) flag++; p_prev...
#include "tag.h" const int Tag::AND = 256, Tag::BASIC = 257, Tag::BREAK = 258, Tag::DO = 259, Tag::ELSE = 260, Tag::EQ = 261, Tag::FALSE = 262, Tag::GE = 263, Tag::ID = 264, Tag::IF = 265, Tag::IND...
/* 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...
// Application main form file. // Original file name: App_KaiXinMainForm.h // Generated by TOPS Builder:Project wizard,Date:2010-8-24 #ifndef __App_KaiXin_MainForm_H__ #define __App_KaiXin_MainForm_H__ #include "TG3.h" class TMainForm : public TWindow { public: TMainForm(TApplication * pApp); ~TMainForm(void...
// testOpenGL.cpp : model design of a car using openGL // #include <stdio.h> #include <math.h> #include <stdlib.h> //#include <gl\glut.h> #include <GL/glut.h> static int shoulder = 0,elbow = 0,num,num2,checkImageWidth,checkImageHeight,texName; void LoadTex(); // points for Bezier curves GLfloat...
#include "FoundationPch.h" #include "Foundation/Reflect/Version.h" #include "Foundation/Reflect/Data/DataDeduction.h" REFLECT_DEFINE_OBJECT( Helium::Reflect::Version ); using namespace Helium; using namespace Helium::Reflect; void Version::PopulateComposite( Reflect::Composite& comp ) { comp.AddField( &Version::...
#include "mydataobject.h" #include <QDebug> MyDataObject::MyDataObject(QObject *parent) :QObject(parent) { } MyDataObject::MyDataObject(const QString &name, const QString &color, QObject *parent) :QObject(parent) ,m_name(name) ,m_color(color) { } QString MyDataObject::getName() const { ...
#ifndef DETAILSDOCKWIDGET_H #define DETAILSDOCKWIDGET_H #include <QDockWidget> #include <detailsviewmodel.h> namespace Ui { class DetailsDockWidget; } class DetailsDockWidget : public QDockWidget { Q_OBJECT public: Q_INVOKABLE DetailsDockWidget(QtMvvm::ViewModel *viewModel, QWidget *parent = nullptr); ~DetailsDo...
// Swap two variables in a function called swap. Make two versions // void swap (int& a int& b) // void swap (int* a, int*b) #include <iostream> void swap(int& a, int& b) { std::cout << "Swapping reference variables" << std::endl; printf("Start - A: %i, B: %i \n", a, b); int temp = a; a = b; b = t...
/* 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...
#include <stdlib.h> #include <iostream> #include <vector> #include "TFile.h" #include "TTree.h" #include "TStopwatch.h" #include "TString.h" #include "AngraMCPulse.h" #include "PulseTree.h" #include "AngraMCMixer.h" using namespace std; int main(int argc, char **argv) { std::cout << "Hello Mixer!" << std::endl; ...
#ifndef BOARD_HPP #define BOARD_HPP #include "NumberTile.hpp" #include <Godot.hpp> #include <Node2D.hpp> #include <PackedScene.hpp> #include <vector> #include <InputEvent.hpp> #include <RandomNumberGenerator.hpp> using std::vector; namespace godot { class PackedScene; class Panel; class MatrixIndex; ...
#include <iostream> #include <cmath> // Pn=n(3n−1)/2 - pentagonal number using namespace std; //this function test if number is pentagonal int pentagonal (int a) { int test=sqrt(2*a/3); int T[3]; for (int i=0;i<3;i++) { T[i]=(test-1+i)*(3*(test-1+i)-1)/2; } if (a!=T[0] && a!=T[...
#include "CYdLidar.h" #include <iostream> #include <string> #include <signal.h> #include <memory> #include <unistd.h> #include <thread> #include <GL/glut.h> #include <cmath> //using namespace std; using namespace ydlidar; CYdLidar laser; static bool stopPlease = false; struct ViewData { LaserScan scan; }; ViewDat...
#include<iostream> #include<algorithm> #include<functional> #include<set> #include<vector> #include<queue> using namespace std; const int MAX_POINT_NUMBER=100000; class edge { public: int dest,ori; int length; }edge; bool operator> (const edge &a,const edge &b) const { return a.length<b.length; } vector<edge>g[...
#pragma once #include <iostream> int readIntFromConsole(std::string message) { int number; std::cout << message; std::cin >> number; return number; } double readDoubleFromConsole(std::string message) { double number; std::cout << message; std::cin >> number; return number; }
#include "datastore.h" #include "mydatastore.h" #include "product.h" #include "user.h" #include "util.h" #include <string> #include <set> #include <vector> #include <map> #include <sstream> #include <iostream> using namespace std; MyDataStore::MyDataStore() { } MyDataStore::~MyDataStore() { std::map<std::st...
#ifndef __FILE_VECN_INTERFACE__ #define __FILE_VECN_INTERFACE__ #include "logging.h" #include "static_check.h" #include "vecn_interface_base.h" namespace Common { template <typename T, int d> class ele_set : public ele_set_base<T> { public: virtual T &at(int i) = 0; virtual T const &at(int i) const = 0; ...
#include "RegisterDialog.h" #include <QMessageBox> #include <QBuffer> #include <QMouseEvent> #include <QLayout> #include <QDataStream> #include <QRegExp> #include <QDebug> #include <QTcpSocket> #include <QUdpSocket> #include <QCryptographicHash> #include <QTimer> #include <qmath.h> RegisterDialog::RegisterDialog(QWidge...
#pragma once //----------------------------------------------------------------------------------------// //struct struct _DROP_CHAOS { BYTE index[6]; BYTE id[6]; BYTE level[6]; BYTE skill[6]; BYTE luck[6]; BYTE addopt[6]; BYTE addoptex[6]; BYTE addoptanc[6]; }; //---------------------------------------------...
#include "Helper.h" #include <fstream> #include <cassert> std::vector<char> readFile(const std::string& filename) { std::ifstream file(filename, std::ios::ate | std::ios::binary); //ate makes it so you start reading at the end of the file handy for knowing filesize. if (!file.is_open()) { assert(0 && "Failed to o...
#include "StdAfx.h" #include "FrmExitConf.h"
class Solution { public: vector<int> singleNumbers(vector<int>& nums) { // 位运算 int x = 0, y = 0, n = 0, m = 1; for (int num : nums) // 遍历异或。我们需要的是结果的第一个不为零的数字在第几位。这代表着两个不同数字在哪一位开始是不同的 // 注:位数是从右往左数的 n ^= num; while ((n & m) == 0) // 循环左移,计算 m。这个数值就代...
#ifndef CONSOLE_H #define CONSOLE_H #include <method.h> #include <QString> #include <QFileDialog> class console{ public: console(); void Console(bool flagCase_1, bool flagCase_2,int *flagError,string *result, string *analize, QString data); method *Method; }; #endif // CONSOLE_H