text
stringlengths
8
6.88M
#ifndef QMYWIDGETACTION_H #define QMYWIDGETACTION_H #include <QWidgetAction> #include <QObject> #include <QCheckBox> #include <QWidget> #include <QHBoxLayout> namespace FastCAEDesigner { class QFWidgetAction : public QWidgetAction { Q_OBJECT public: QFWidgetAction(QWidget *parent = 0); ~QFWidgetAction();...
#ifndef QEMUCSD_TESTS_H #define QEMUCSD_TESTS_H #include <cstddef> #include <cmath> #include <cstdint> #endif //QEMUCSD_TESTS_H
class Solution { public: double myPow(double x, int n) { if(x==0) return 0; if(n==0) return 1; double temp=myPow(x,n/2); if(n%2==0) return (temp*temp); else { if(n>0) return (x*temp*temp); els...
#pragma once #include "Perceptron.h" #include <array> #define DEFAULT_PERCEPTRON_TRESHOLD 1 template <int dimension> class SinglePerceptronNetwork { float learning_step{}; Perceptron<dimension> perceptron = Perceptron<2>{DEFAULT_PERCEPTRON_TRESHOLD}; public: SinglePerceptronNetwork() = default; exp...
#include <iostream> using namespace std; void main() { int N; float f; cout << "실수 입력: "; cin >> f; N = f+0.5; cout << "반올림 정수 출력: " << N; }
#include "mainwidget.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication mainApp(argc, argv); MainWidget *mainWidget = new MainWidget; mainWidget->show(); mainWidget->run(); return mainApp.exec(); }
#include "SpriteWithHue.h" void xRotateMat(float mat[3][3], float rs, float rc); void yRotateMat(float mat[3][3], float rs, float rc); void zRotateMat(float mat[3][3], float rs, float rc); void matrixMult(float a[3][3], float b[3][3], float c[3][3]); void hueMatrix(GLfloat mat[3][3], float angle); void premultiplyAlp...
/* * Copyright (C) 2015 The Android Open Source Project * * 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 app...
/* 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 <iostream> #include <thread> using namespace std; mutex mtx; //全局互斥锁对象,#include <mutex> // 打印机 void printer(const char *str) { mtx.lock(); //上锁 while (*str != '\0') { std::cout << *str; str++; this_thread::sleep_for(chrono::seconds(1)); } // cout << endl; mtx...
#include "room.h" #include "house.h" #include "devicefactory.h" #include "appliancefactory.h" #include "lightfactory.h" #include <iostream> #include <algorithm> using namespace std; Room::Room(std::string roomName) { _name = roomName; cout << "Added " << _name << endl; } Room::~Room() { } void Room::addCom...
#include <limits.h> #include <iostream> #include <map> #include <queue> #include <fstream> using Graph = std::map<char, std::map<char, int>>; bool breadthFirstSearch(Graph& graph, char start, char end, std::map<char, char>& path, std::ofstream& oFile); void FordFulkersonAlgorithm(Graph& graph, char start, c...
//--------------------------------------------------------------------------- #ifndef CalcSitEV_H #define CalcSitEV_H //--------------------------------------------------------------------------- #include "..\..\Common\sitHoldem.h" using namespace std; struct tpSitRes { short _nbPl[CN_PLAYER],_cnPl; std::vector <c...
// ***************************************************************** // 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 UTILS_H #define UTILS_H class Utils{ public: Utils(); void clear(); //std::ifstream::pos_type filesize(const char* filename); }; #endif
#include "sqlite_set.h" #include "ui_sqlite_set.h" sqlite_set::sqlite_set(QWidget *parent) : QDialog(parent), ui(new Ui::sqlite_set) { ui->setupUi(this); } sqlite_set::~sqlite_set() { delete ui; } void sqlite_set::on_toolButton_clicked() { } void sqlite_set::on_toolButton_2_clicked() { QStr...
#include <LiquidCrystal.h> //Define os pinos que serão utilizados para ligação ao display LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int ThermistorPin = A0; int Vo; float R1 = 10000; // value of R1 on board float logR2, R2, T; float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741; //steinhart-hart coeficients fo...
#pragma once #include <type_traits> namespace dsn { namespace detail { /// \brief Implementation of dsn::countof template <typename Tin> constexpr std::size_t countof() { using T = typename std::remove_reference<Tin>::type; static_assert(std::is_array<T>::value, "countof() only works with...
/* 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 "article.h" #include <iostream> Article::Article():Note(), texte(""){} Article::Article(const QString& id, const QString& titre, const QString& text) : Note(id, titre),texte(text){} Note::NoteType Article::getType() const{ return ARTICLE; } void Article::setTexte(const QString& t){ texte=t; } ...
#include <iostream> #include "FiguraGeometrica.h" #include "Quadrado.h" #include "Triangulo.h" #include "Circulo.h" using namespace std; int main(){ int Base, Altura, Raio; string Figurx; cout << "Este programa calcula a area de Figuras geometricos" << endl; while(true){ cout << "...
#include "LevelState.h" #include "CreditState.h" #include "GameStateHandler.h" inline OBB m_ConvertOBB(BoundingBoxHeader & boundingBox) //Convert from BBheader to OBB struct { OBB obj; obj.ext[0] = boundingBox.extension[0]; obj.ext[1] = boundingBox.extension[1]; obj.ext[2] = boundingBox.extension[2]; ...
#include "ZoomController.h" #include "Dynamics.h" #include <cocos2d.h> const float ZoomController::MIN_ZOOM = 1.0f; const float ZoomController::MAX_ZOOM = 6.0f; const float ZoomController::REST_VELOCITY_TOLERANCE = 0.1f; const float ZoomController::REST_POSITION_TOLERANCE = 0.1f; const float ZoomController::REST_ZOOM_...
#ifndef __SL_potential_hpp__ #define __SL_potential_hpp__ #include"header/BBFMM2D.hpp" #define REAL double using namespace std; using namespace Eigen; class myKernelGxx: public kernel_Base { public: virtual double kernel_Func(Point r0, Point r1){ //implement your own kernel here double dx = -(r1.x - r0...
#include<stdio.h> #include<string.h> #include<malloc.h> int main() { char *str[100]; int n,i; scanf("%d",&n); for(i=0;i<n;i++) { scanf(str } return 0; }
/******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** ** Created by: Qt User Interface Compiler version 5.12.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ***************************************...
#include "days.hpp" #include "day9.hpp" #include <range/v3/all.hpp> #include <deque> template<> auto days::solve<days::day::day_9, days::part::part_1>(std::istream &input) -> std::string { return preamble_finder<25>::solve_part1(input); } template<> auto days::solve<days::day::day_9, days::part::part_2>(std::ist...
/* 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...
// // hwLight.cpp // HamsterWheel // // Created by OilyFing3r on 2014. 9. 2.. // Copyright (c) 2014년 OilyFing3rWorks. All rights reserved. // #include "hwLight.h" float Light::getIntensity(void) const { return intensity; } void Light::setIntensity(float intensity) { this->intensity = intensity; } static ...
#include "xmlreader.h" #include "helper.h" #include "tinyxml2/tinyxml2.h" #include <cstdlib> using tinyxml2::XML_SUCCESS; using tinyxml2::XMLElement; using tinyxml2::XMLNode; namespace POICS{ class POICS_API XMLMapReaderImpl : public XMLMapReader { private: tinyxml2::XMLDocument doc; public: XMLMapReaderImpl...
///////////////////////////////////////////////////////////////////////// //// Ftdc C++ => C Adapter //// Author : cpaistwb@126.com //// Generated at 2018/3/27 ///////////////////////////////////////////////////////////////////////// #pragma once #include "USTPFtdcTraderApi.h" #include "enums.h" #include ...
#pragma once // standard library // assert #include <cassert> // memcpy, memset #include <cstring> #include <string> // user define head #include "Util.h" START_NAMESPACE constexpr int SmallBufferSize = 4000; constexpr int LargeBufferSize = 4000 * 1000; template <size_t SIZE> class LogBuffer { public: usin...
#include<bits/stdc++.h> using namespace std; int solve1(vector<int>& arr,int left,int right,int k) { if(left > right) { return -1; } int mid = (left+right)/2; if(k > arr[mid]) { return solve1(arr,mid+1,right,k); } else if(k < arr[mid]) { return solve1(arr,left,mid-1,k); } return mid; } int solve2(vec...
#pragma once #include <cctype> #include <cstdint> #include <string> #include <thread> #include "Util.h" START_NAMESPACE namespace ThisThread { extern __thread int t_cachedTid; extern __thread char t_tidString[32]; extern __thread size_t t_tidStringSize; extern __thread const char* t_threadName; ...
/*************************************************************************** # Copyright (c) 2020, NVIDIA CORPORATION. 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...
#ifndef CSHAPE_H #define CSHAPE_H #include "../Header/Angel.h" #include "TypeDefine.h" typedef Angel::vec4 color4; typedef Angel::vec4 point4; #define FLAT_SHADING 0 #define GOURAUD_SHADING 1 // GPU 的計算必須傳更多的參數進入 Shader //#define LIGHTING_WITHCPU #define LIGHTING_WITHGPU //#define PERVERTEX_LIGHTING // 當模型有執行...
/* * Author : BurningTiles * Problem : Digit Pairs * File : B.cpp */ #include <iostream> using namespace std; inline int max(int a, int b, int c){ return (a>b && a>c)? a : (b>a && b>c)? b : c; } inline int min(int a, int b, int c){ return (a<b && a<c)? a : (b<a && b<c)? b : c; } in...
//************************************************************************** //** //** 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 <gtest/gtest.h> #include "../engine/tasking/tasking.h" #include "../engine/tasking/atomic_counter.h" #include <chrono> #include <thread> #include <stdlib.h> namespace tna { constexpr uint32_t num_threads = 1; /** * Creates one asynchronous task per thread, where each task stores its therad id in the *...
#include "Person.h" #include <iostream> using namespace std; #include <string.h> Person::Person(int day, int month, int year, char* name){ Inicializate(day, month, year, name); } Person::Person(){ Inicializate(0, 0, 0); } void Person::Inicializate(int day, int month, int year, char* nam...
#include "notepadwindow.h" #include "notepad.h" #include <QAction> #include <QMenu> #include <QMenuBar> #include <QToolBar> #include <QStyle> NotepadWindow::NotepadWindow() { auto notepad = new Notepad; setCentralWidget(notepad); auto menu = menuBar()->addMenu(tr("&File")); // QMenu* auto open_act = men...
#ifndef _List_h_ #define _List_h_ class PCB; class PCBList{ private: struct Elem{ PCB* pcb; Elem* next; Elem(PCB* pcb_):pcb(pcb_){ next=0; } }; Elem* first; Elem* last; public: PCBList(); ~PCBList(); void insert(PCB* pcb); PCB* removeFirst(); PCB* remove(...
class Solution { public: int missingNumber(vector<int>& nums) { int x = 0; for(int i = 0; i < nums.size(); i++) x = x^i^nums[i]; x ^= nums.size(); return x; } };
/** * MeterFeeder Library * * by fp2.dev */ #pragma once #include <string> #include "ftd2xx/ftd2xx.h" #include "constants.h" namespace MeterFeeder { /** * A Mind-Enabled Device MMI (mind-matter interaction) generator. * It's a USB device that is a quantum random number generator. * The meas...
//The following program computes //the probability for dice possibilities #include <iostream> #include <random> #include <ctime> using namespace std; const int sides = 6; int main(void){ const int n_dice = 2; uniform_int_distribution<unsigned> u(1,6); default_random_engine e(time(0)); cout << "\nEnter number of t...
#include<bits/stdc++.h> using namespace std; int main() { int m,n,i,b; cin>>n; int a[n]; for(i=0;i<n;i++) { cin>>a[i]; } if(n%2) { if(a[0]%2 and a[n-1]%2) { cout<<"Yes"<<endl; } else cout<<"No"<<endl; } else c...
#include <memory> #include <list> #include <string> #include <map> #include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/nonfree/nonfree.hpp> #include "../LibGuessSignature/GuessEvalEasy.h" #include "../LibGuessSignature/GuessSvmOneVsAll.h" #include "../LibGuessSignature/GuessSvmOneVsOne.h" #inc...
#include "arduinoFFT.h" /* * Open Source Project by Nikodem Bartnik * https://nikodembartnik.pl/ * https://github.com/nikodembartnik * https://www.youtube.com/user/nikodembartnik * Feel free to make it even better * And don't forget to share with others :) */ #define SAMPLES 128 //Must be a power of 2...
/* 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 "Pagamento.h" #include <iostream> #include <string> double Pagamento::getValorPagamento(){ return valorPagamento; } std::string Pagamento::getNomeDoFuncionario(){ return nomeDoFuncionario; } void Pagamento::setValorPagamento(double valorPagamento){ this->valorPagamento = valorPagamento; } void Pagame...
#include<bits/stdc++.h> using namespace std; string countAndSay(int n) { string prev = "1"; string curr = "1"; for (int i = 2; i <= n; i++) { curr.clear(); int lastIndex = 0; // index where the prev(diffrent) number was last seen for (int j = 0; j < prev.size(); j++) {...
#ifndef GAMETIME_H #define GAMETIME_H #include <Windows.h> class GameTimer { public: //the delta time of the app static float deltaTime; static bool Initialize(); static void Update(); private: //the start time static LONGLONG start; //ticks per second static float frequencySeconds; }; #endif
#include<bits/stdc++.h> using namespace std; int main(){ char s[300005]; scanf("%s",s); long long ans = 0; int n = strlen(s); for(int i = 0; i < n; i++){ if( (s[i]-'0') % 4 == 0) ans ++; } for(int i = 0; i < n - 1; i ++){ if( ((s[i] - '0')*10 + (s[i+1] - '0')) % 4 == 0){ ...
#include <stdio.h> #define MAXSIZE 6 void InsertionSort(int* arr) { for(int i=1; i<MAXSIZE; i++) //key does not includet arr[0] { int key = arr[i]; int shift_index = i-1; while(arr[shift_index]>key && shift_index>=0) { arr[shift_index+1] = arr[shift_index]; shift_index--; } arr[sh...
#include <stdio.h> #include <yaml.h> #include <string> #include <string.h> #include <iostream> int main(void) { FILE *FileHandler = fopen("public.yaml", "r"); yaml_parser_t Yamlparser; yaml_event_t Yamlevent; /* New variable */ /* Initialize parser */ if(!yaml_parser_initialize(&Yamlparser)) fputs("F...
// @copyright 2017 - 2018 Shaun Ostoic // Distributed under the MIT License. // (See accompanying file LICENSE.md or copy at https://opensource.org/licenses/MIT) #pragma once #include "../access_token.hpp" #include <distant/detail/tags.hpp> #include <distant/support/winapi/token.hpp> namespace distant::security { n...
#include "hotplate.h" #include <sys/time.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <math.h> const int plateHeight = 1024; const int plateWidth = 1024; float** plate1; float** plate2; bool** lockedCells; float** lockedValues; /* Return the current time in seconds, usin...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.UI.Xaml.Interop.1.h" WINRT_EXPORT namespace winrt { namespace Windows::UI::Xaml::Interop { struct BindableVectorChangedEventHandler : Windows::Foundation::IUnknown { Bi...
/*********************************************************************** created: Thu Jul 7 2005 author: Paul D Turner <paul@cegui.org.uk> *************************************************************************/ /*************************************************************************** * Copyright...
#include <iostream> using namespace std; int main() { string s = "I am the bone of my sword. "; int n = 5; cout << s << endl; string s2 = "Steel is my body and fire is my blood. "; cout << s2 << endl; string s3 = s + s2; cout << s3 << endl; cout << s + s2 << endl; }
/** MIT License Copyright (c) 2019 mpomaranski at gmail 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...
#include "../../include/online/inet_address.h" namespace keyword_suggestion { InetAddress::InetAddress(const struct sockaddr_in &addr) : addr_(addr) {} InetAddress::InetAddress(int port, const std::string &ip) { ::memset(&addr_, 0, sizeof(addr_)); addr_.sin_family = AF_INET; addr_.sin_port = htons(port); add...
/* https://leetcode.com/problems/longest-substring-without-repeating-characters/ Example 1: nums1 = [1, 3] nums2 = [2] The median is 2.0 Example 2: nums1 = [1, 2] nums2 = [3, 4] The median is (2 + 3)/2 = 2.5 */ class Solution { public: double findMedianSortedArrays(vector<int> &nums1, vector<int> &nums2) {...
#ifndef CCONSOLE_H #define CCONSOLE_H #include "CWindow.h" class CConsole : public CWindow { public: CConsole(); virtual ~CConsole(); protected: private: }; #endif // CCONSOLE_H
#ifndef __MODULESCENEWIN_H__ #define __MODULESCENEWIN_H__ #include "Module.h" #include "Animation.h" #include "Globals.h" struct SDL_Texture; class ModuleScenewin : public Module { public: ModuleScenewin(); ~ModuleScenewin(); bool Start(); update_status Update(); bool CleanUp(); public: SDL_Texture* graphics2...
#include <iostream> #include <set> using namespace std; int main() { int n; long long total_cost=0; multiset<int>bill_amounts; int n_bills; int bill_amount; multiset<int>::iterator it_end; multiset<int>::iterator it_begin; while(cin>>n && n!=0){ for(int i=n; n>0; n...
/*************************************************************************** dialogolibreria.cpp - description ------------------- begin : abr 21 2004 copyright : (C) 2004 by Oscar G. Duarte email : ogduarte@in...
#pragma once #include <string> #include <vector> #include "drake/geometry/scene_graph.h" #include "drake/multibody/multibody_tree/multibody_plant/multibody_plant.h" #include "drake/multibody/multibody_tree/multibody_tree_indexes.h" #include "drake/multibody/multibody_tree/parsing/sdf_parser_common.h" namespace drake...
#include "testlib.h" #include <set> #include <vector> #include <string> #include <map> #include <iostream> #include <memory.h> using namespace std; const int N = 100000; const int M = 1000000; bool used[N]; int main() { registerValidation(); int n = inf.readInt(1, N); inf.readEoln(); int sumk = 0; ...
float temp; int tempPin = A0; int sensorThres = 400; void setup() { //lcd.begin(16, 2); //lcd.setCursor(0, 0); pinMode(7, OUTPUT); pinMode(6, OUTPUT); pinMode(5, OUTPUT); pinMode(9, OUTPUT); pinMode(8, OUTPUT); pinMode(A1, INPUT); //delay(1000); Serial.begin(9600); } void loop() { int analogS...
#include "pacman-main.h" // OUR VERSION of PACMAN is a tile-based game. // The original one wasn't really tile-based, // but this one is. // Tile-based games are nice because we can // make levels with a simple .txt file, // one character per block. See lvl1.txt. //////////////////////////////////////////...
#ifndef BOOST_NUMERIC_BINDINGS_TRAITS_UBLAS_SYMMETRIC_ADAPTOR_H #define BOOST_NUMERIC_BINDINGS_TRAITS_UBLAS_SYMMETRIC_ADAPTOR_H #include <boost/numeric/binding/lapack/driver/syev.hpp> #include <boost/numeric/binding/traits/ublas_symmetric.hpp> namespace boost { namespace numeric { namespace ublas { /* template<ty...
#ifndef CPOINT_H #define CPOINT_H #include "Defs.h" #include <QVector> class CPoint { private: QVector<double> params; WORD groupNr; double alpha; double distance; public: CPoint(QVector<double> params); CPoint(); void setParams(QVector<double> params); void setGroup(WORD groupNr); ...
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string a,b; cin>>a>>b; if(a.length() >b.length() ) { string temp = a; a = b; b = temp; } int i= 0, j = 0 , flag = 0; while(i...
#include <gtest/gtest.h> #include "kth_cprog_template_container.hpp" #include "counter_class.hpp" TEST(Vector, ConstructorDefault) { EXPECT_NO_THROW({ Vector<int> int_vector; }); } TEST(Vector, ConstructorCopy) { const size_t size = 4; Vector<int> int_vector1(size); int_vector1[1] = 13; int_vector1[2...
#include "./utils/test_utils.hpp" #include <string> #include <vrm/pp/utils.hpp> #include <vrm/pp/eval.hpp> #include <vrm/pp/bool.hpp> #include <vrm/pp/arithmetic.hpp> int main() { #define TEMP_TEST_TEN 10 #define TEMP_TEST_TEN_TX() 10 TEST_ASSERT_OP(10, ==, 10); TEST_ASSERT_OP(10, ==, VRM_PP_DEFER(10)); T...
#include <iostream> using namespace std; int main() { int first; cout << "Enter the first number:"; cin >> first; int second; cout << "Enter the second number:"; cin >> second; int big = 0; for (int i = 1; i <= first && i <= second; i++) { if (first % i == 0 && second % i ==...
#ifndef SLP_FUNC_H_ #define SLP_FUNC_H_ #define eta 0.015 const int op_nodes=10; const int image_size=784; using namespace std; void slp_func(float (&weights_ARR_in)[10][784], double image[784], float (&weights_ARR_out)[10][784], int image_number, int outcome);//, int image_size, int op_nodes); #endif
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // # DARK PLUGIN - POWERED BY FIRE TEAM // # GAME SERVER: 99.60T (C) WEBZEN. // # VERSÃO: 1.0.0.0 // # Autor: Maykon // # Skype: Maykon.ale //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // # O Sen...
#include <iostream> using namespace std; // Fixed coin values const int COINS_PER_DOLLAR = 100; const int VALUE_OF_PENNY = 1, VALUE_OF_NICKEL = 5, VALUE_OF_DIME = 10, VALUE_OF_QUARTER = 25; // number of specific coins per dollar const int PENNIES_PER_DOLLAR = 100, NICKELS_PER_DOLLAR = 20, DIMES_PER_DOLLAR = 10, QUART...
// This file has been generated by Py++. #include "boost/python.hpp" #include "generators/include/python_CEGUI.h" #include "TreeItem.pypp.hpp" namespace bp = boost::python; struct TreeItem_wrapper : CEGUI::TreeItem, bp::wrapper< CEGUI::TreeItem > { TreeItem_wrapper(CEGUI::TreeItem const & arg ) : CEGUI::Tre...
/************************************************************ ** File Name: RPSGame.hpp ** Author 1: Nathaniel Bennet ** Author 2: Aaron Berns ** Author 3: Juan Du ** Author 4: Christopher Dubbs ** Author 5: Chieko Duncans ** Author 6: Molly Johnson ** Author 7: Armand Reitz ** Date: 02/06/2016 ** CS 162 Group Project ...
//////////////////////////////////////////////////////////////////////////////// // // (C) Andy Thomason 2016 // // example of FBX file decoder and encoder // //////////////////////////////////////////////////////////////////////////////// #include <gilgamesh/mesh.hpp> #include <gilgamesh/scene.hpp> #include <gilgames...
// // Skill.h // Boids // // Created by Yanjie Chen on 3/9/15. // // #ifndef __Boids__Skill__ #define __Boids__Skill__ #include "cocos2d.h" #include "./skill/SkillNode.h" enum eSkillState { SkillStateLoading = 1, SkillStateReady = 2, SkillStateCasting = 3 }; class UnitNode; class Skill : public coco...
/* Project: Stereo-vision-client Author: Ben Description: */ // Global includes #include <QtGui/QApplication> // Local includes #include "gui.h" #include "Engine/engine.h" #include "Engine/DataTransciever/dataTransciever.h" #include "Engine/fileEngine.h" #ifndef _WIN32 #ifndef __linux__ #error You are using a...
#if VERBOSE >= 3 #define debug_message(VAR) std::cout<<VAR<<std::flush; #define verbose3(VAR) std::cout<<VAR<<std::flush; #endif #if VERBOSE < 3 #define debug_message(VAR) #define verbose3(VAR) #endif #if VERBOSE >= 2 #define verbose2(VAR) std::cout <<VAR<<std::flush; #endif #if VERBOSE < 2 #define verbose2(VAR) ...
//O(N) and O(1) space // if a element counts more than N/2 times // count of other elements should be less than N/2; // so the diff (count(candidate)-others) > 0 right // so we will first find the candidate for majority element // then we will check whether it can be majority element int majorityElement(ve...
#ifndef __MF_NODE_EXPRESSION_ASSIGNMENT_H__ #define __MF_NODE_EXPRESSION_ASSIGNMENT_H__ #include <cdk/nodes/expressions/BinaryExpression.h> #include "SemanticProcessor.h" namespace mayfly { namespace node { namespace expression { /** * Class for describing the lower-than-or-equal operator *...
#include <iostream> #include "Consultor.h" #include "Funcionario.h" using namespace std; int main(){ string matm, name; float sal; int j; Consultor c1; Funcionario f1; cout << "Digite a matricula: "; cin >> matm; f1.setMatricula(matm); cout << endl; cout << "Digite o nome:...
/* Copyright (c) 2005-2015, 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<iostream> using namespace std; main() {int n,s; float m,a; cin>>n; if(n>=10&&n<=99){ s=n/10; a=n-s*10; s=m; if(a>m) m=a; cout<<m; if(n%11==0||n%22==0||n%33==0||n%44==0||n%55==0||n%66==0||n%77==0||n%88==0||n%99==0){ cout<<"ekeui ten"; } } else cout<<"kate terdyntz";}
// // Created by 梁栋 on 2019-05-09. // #include <iostream> #include <unordered_map> using namespace std; class DLinkNode{ // 双向链表 public: int val; int k; DLinkNode* pre; DLinkNode* next; DLinkNode(){ pre = NULL; next = NULL; val = 0; } DLinkNode(int v){ val...
#include "Vector.h" #include "Trace.h" template <class T> vector<T>::vector(int size) { TRACE(dummy, "vector<T>::vector(int)"); v = new T[size]; sz = size; cout << " count = " << ++count << endl; } template <class T> vector<T>::~vector() { TRACE(dummy, "vector<T>::~vector"); cout << " cou...
#include "Graphics/Camera.h" #include "ThirdParty/Catch/catch.hpp" TEST_CASE("View transform can transform world space coordinates to camera space coordinates.", "[Camera][ViewTransform]") { // CREATE THE COORDINATES TO TRANSFORM. // These form a basic triangle. MATH::Vector4f top_coordinate(0.0f, 1.0f, 0....
//************************************************************************** //** //** 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 ...
/*************************************************************************** Copyright (c) 2020 Philip Fortier 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, or...
#include <iostream> #include "ListADT.hpp" using namespace std; int main(){ ListADT list; list.insert(3,0); list.insert(5,0); list.insert(4,2); list.remove(1); std::cout << "Size of List: " << list.size() << std::endl; list.printList(); return 0; }
#include "OptimisedMinimum.h" double OptimisedMinimum :: dfdx(double x) { return 4*x*x*x + 8*x - 32; } double OptimisedMinimum :: d2fdx2(double x) { return 12*x*x + 8; } OptimisedMinimum :: OptimisedMinimum(double leftB, double rightB, double epsilon) { a = leftB; b = rightB; eps = epsilon; } dou...
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), le...
/******************************************************************* * CS 307 Programming Assignment 2 * Author: Benjmin hoang * Desc: traffic simulation * Date: 4/15/2017 * I attest that this program is entirely my own work *******************************************************************/ #include "...