text
stringlengths
8
6.88M
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #ifndef __GT_FT_SERVER_H__ #define __GT_FT_SERVER_H__ #include "gtserver.h" GT_BEGIN_NAMESPACE class GtFTSession; class GtFTServerPrivate; class GT_SVCE_EXPORT GtFTServer : public GtServer { Q_OBJECT public: explicit GtFTServer(QObject *parent = 0...
#include <iostream> #include <string> #include <cstdlib> #include <locale> using namespace std; // prototipo de funcion o pre-funcion void formatoString( string , char* ) ; // documentacion sobre constexpr: https://es.cppreference.com/w/cpp/language/constexpr constexpr unsigned int str2int(const char* str...
#ifndef __lily_gui_wScrollBar_h__ #define __lily_gui_wScrollBar_h__ namespace iberbar { // Minimum scroll bar thumb size #define LILY_GUI_SCROLLBAR_MINTHUMBSIZE 8 // Delay and repeat period when clicking on the scroll bar arrows (ms) #define LILY_GUI_SCROLLBAR_ARROWCLICK_DELAY 330 #define LILY_GUI_SCROLLBAR_ARR...
inline int hashcode(const int *v) { int s = 0; for(int i=0; i<k; i++) s=((s<<2)+(v[i]>>4))^(v[i]<<10); s = s % M; s = s < 0 ? s + M : s; return s; }
static bool ValueChanged = 0; void ReadBinaryMain() { if (digitalRead(PINValueChanged) != ValueChanged) { //there is something new at the input pins #if defined(DEBUGMODE) Serial.println("ReadBinary: Reading new values on Binary-Port"); #endif ValueChanged = !ValueChanged; ReadButton(); ReadValues.ne...
#define _USE_MATH_DEFINES // Use constants in cmath #include "../include/drift_diffusion.h" double Drift_diffusion::G(void) { double tmp_G_scaled; tmp_G_scaled = grid_scaled.Gi_scaled[current_i_position]; return tmp_G_scaled; }
#pragma once class Station; class HtmlReporter { public: HtmlReporter(); virtual ~HtmlReporter(); bool GenerateHtmlReports(map<string, Station*> &stationMap, map<string, Station*> &missingStationsMap, const string& htmlFolder); private: void Creat...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2008-2011 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef OPVIEWPORTCONTROLLER_H #define OPVIEWPORTCONTROLLER_H #i...
#ifndef NODE_H_ #define NODE_H_ #include <vector> #include <algorithm> //fill #include <iostream> template <class T> class node { public: /* nodo de grado n puede tener hasta n hijos y n-1 claves reserva espacio para n teclas para que el vector no cambie de tamaño en desbordamiento */ node(unsigned int dgr...
#include <assert.h> #include <getopt.h> #include <limits.h> #include <pthread.h> #include <atomic> #include <stdlib.h> #include <stdio.h> #include <sys/time.h> #include <time.h> #include "timer.h" #include "rapl.h" //#define DEFAULT_DURATION 10000 //#define DEFAULT_INITIAL 256 #define ...
class Solution { public: bool isSafe(int grid[N][N], int i, int j, int n) { for(int k=0 ; k<N ; k++) { if(grid[i][k] == n || grid[k][j] == n) return false; } int s = sqrt(N); int rs = i - i%s; int cs = j - j%s; ...
#include "Qwerty3D-PC.h" void Mainloop(); using namespace Qwerty; //Main Entry int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { //init 3D rendering gMainApp.Init3D(hInstance,Mainloop); //connect to remote mobile head tracking app with MQTT gMainApp.InitConnection(...
// // proj_05.cpp // // Created by Kristjan von Bulow. // Copyright © 2018 Kristjan von Bulow. All rights reserved. // // beaufort cipher, http://practicalcryptography.com/ciphers/classical-era/beaufort/ #include<iostream> using std::cout; using std::cin; using std::endl; #include<string> using std::string; #inclu...
#include "time_dialog.h" #include <QLabel> #include <QHBoxLayout> TimeDialog::TimeDialog( void ) { layout = new QHBoxLayout; label = new QLabel(); layout->addWidget( label ); setLayout( layout ); } TimeDialog::~TimeDialog( void ) { delete layout; delete label; } void TimeDialog::changeTime( int time ) { labe...
#ifndef CHILD_H_INCLUDED #define CHILD_H_INCLUDED #include <iostream> #define firstC(L) L.first #define last(L) L.last #define infoC(L) L->infoC #define next(L) L->next #define prev(L) L->prev using namespace std; struct infotypeC{ string nama; char jenisKl; int umur; int noThn; }; ...
#pragma once #include "bricks/io/streamnavigator.h" namespace Bricks { class Data; } namespace Bricks { namespace IO { class StreamReader : public StreamNavigator { public: StreamReader(Stream* stream, Endian::Enum endianness = Endian::Native); u16 ReadInt16(Endian::Enum endian = Endian::Unknown); u32 Read...
#include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { //基本思想:左右乘积列表,L[i]是i左侧所有数字的乘积,R[i]是i右侧所有数字的乘积 //索引i处的值为L[i-1]*R[i+1],时间复杂度O(n)空间复杂度O(n) vector<int> res; vector<int> L(nums.size(), 1); vector<int> R(nums.s...
#pragma once #include "stdafx.h" #include<vector> #include<set> #include<cmath> #include<cstdlib> struct Edge { //polaczenie int cost; //koszt polaczenia do xy int x; int y; Edge(int xx, int yy, int costt) :x(xx), y(yy), cost(costt) {} };
#include <experimental/tuple> template<class F, class...Args> auto forward_capture(F &&f, Args &&...args) { return [f = std::forward<F>(f), tup = std::make_tuple(std::forward<Args>(args)...)] { return std::experimental::apply(f, tup); }; }
//javier Alvarez Reyes #include <iostream> #include<string> #include <sstream> #include <cstdlib> using std::string; using namespace std; #include <iomanip> using std::setw; class tarea { public: tarea(); void A(); void B(); void C(); void D(); void E(); void F(); void G(); }; tarea::tarea() { } void ...
// // Created by chris on 21/08/2017. // #ifndef MINECRAFT_CLONE_BLOCK_H #define MINECRAFT_CLONE_BLOCK_H #include <vector> #include <tuple> #include "IMG/lodepng.h" #include "TextureRegion.h" #include "TextureStitching.h" #include "Model.h" enum class BlockSide { RIGHT, LEFT, TOP, BOTTOM, FRON...
/** * @author shaoDong * @email scut_sd@163.com * @create date 2018-09-03 07:39:07 * @modify date 2018-09-03 07:39:07 * @desc 字典序问题 */ #include <iostream> #include <vector> using namespace std; void swap(int *a, int *b) { long long t; t = *a; *a = *b; *b = t; } int main() { int n, t; int ...
#ifndef _MANIPULATOR_H_ #define _MANIPULATOR_H_ #include "WPILib.h" class Jaguar; class Joystick; class Encoder; class Manipulator { private: Jaguar *m_pManJag; Solenoid *m_pSolOpen, *m_pSolClose; PIDController *m_pPosController; public: Manipulator(void); Manipulator(int _manJagPort, int _aChannel, int _bCh...
#include<iostream> #include<climits> using namespace std; void swap(int *x,int *y); class minheap{ int heap_size; int capacity; int *harr; public: minheap(int size); void printarray(); int left(int i){return (2*i+1);} int right(int i){return (2*i+2);} int parent(int i){return (i-1)/2;} ...
/*************************************************************************** * Copyright (c) 2021, Thorsten Beier * * * Copyright (c) 2021, QuantStack * * ...
#pragma once #include "component.h" #include "../../graphic/renderable/sprite.h" namespace sge { namespace entity { namespace component { class SpriteComponent : public Component { public: graphics::Sprite* sprite; public: SpriteComponent(graphics::Sprite* sprite); static ComponentType* getSta...
#include "precompiled.h" #include "sound/sound.h" #include "sound/jssoundmanager.h" using namespace sound; using namespace script; namespace jsscript { inline jsval to_jsval(JSContext* cx, Sound* arg) { return OBJECT_TO_JSVAL(arg->getScriptObject()); } inline jsval to_jsval(JSContext* cx, FMOD::C...
#pragma once #include "../CorrelationValue/CorrelationValue.h" #include "Serializable/Object/SerializableObject.h" class GroupCorrelations: public SerializableObject { public: // :: Serializable :: virtual QJsonObject toJson() const override; virtual void initWithJsonObject(const QJsonObject &json) over...
#include <iostream> int main() { string s = ""; int n = 10000; for (int i = 0; i < n; i++) { s += "hello"; } }
#include <bits/stdc++.h> using namespace std; int main() { //Declaring variabels int input,temp=0, answer=0; string FileName; cin>>input; //for loop to input the string for(int i= 0 ; i<input;i++) { cin>>FileName; //check if there are x in the string and store in temp if(FileName[i]=='x') { temp++; ...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ncurses.h> using namespace std; int main() { int input; std::ifstream infile; infile.open("labiec4.inp"); infile >> input; while(!infile.eof()) { printf("%d ", input); in...
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ #ifndef SCHEDULER_H_ #define SCHEDULER_H_ #include <string> #include <vector> #include <deque> #include <list> #include <memory> #include <chrono> #include <unordered_set> #include <unordered_map> #include "loop.hh" #include "engine.hh" #i...
#include "PhilipsWaveModel.h" #include <math.h> using namespace std PhilipsWaveModel::PhilipsWaveModel(){ L = 0; A = 0; vector<PhilipsWave> X; WaveList = X; }
#include <iostream> #include <string> #include <stdlib.h> #include "customerListType.h" using namespace std; void customerListType::searchCustomerList(string num, bool& found, nodeType<customerType>* &current) const { found = false; //set found to false current = first; //...
#ifndef POINT_H #define POINT_H #include "vector.hpp" namespace geometry { /** * @brief The Point* class * @details Simple 2-dimension point */ class Point : public Object { public: Point(); ~Point(); /** * @brief Point * @param x,y Point* coordinates - \f$(x, y)\f$ */ Point(Float ...
#ifndef WIDGETAUDIOVIEW_HH_ #define WIDGETAUDIOVIEW_HH_ #include <pgwidget.h> #include "AudioInputController.hh" /** Class for a scrolling view of audio. This abstract class doesn't know how * the audio is actually drawn, it just handles the scrolling by blitting * previously drawn surface and asking to redraw som...
#include<iostream> #include<stdio.h> #include<vector> #include<cstring> #include<fstream> #include<algorithm> #include<list> #define Context_Size 100 using namespace std; class QA_Node{ public: char* context; list<QA_Node*> link; bool is_q; QA_Node(const char* _c, bool _q):is_q(_q){ context = new char(st...
class Category_623 { class 1Rnd_Bolt_Tranquilizer { type = "trade_items"; buy[] = {2,"ItemSilverBar"}; sell[] = {1,"ItemSilverBar"}; }; class 1Rnd_Bolt_Explosive { type = "trade_items"; buy[] = {4,"ItemSilverBar"}; sell[] = {2,"ItemSilverBar"}; }; class 12Rnd_Quiver_Wood { type = "trade_items"; buy...
#include "PassedTestPreview.h" // :: Constants :: const QString ID_JSON_KEY = "id"; const QString NAME_JSON_KEY = "name"; const QString NUMBER_OF_PASSES_JSON_KEY = "numberOfPasses"; // :: Lifecycle :: PassedTestPreview::PassedTestPreview(int id, const QString &name, uint numberOfPasses) { setId(id); setNa...
// MouseGeniusDlg.cpp : 实现文件 // #include "stdafx.h" #include "MouseGenius.h" #include "MouseGeniusDlg.h" #include "afxdialogex.h" #include <locale.h> #ifdef _DEBUG #define new DEBUG_NEW #endif static const CString g_strLButtonDown = _T("左键按下"); static const CString g_strLButtonUp = _T("左键弹起"); stati...
// // Created by pierreantoine on 11/01/2020. // #include <boost/test/unit_test.hpp> #include "src/reference.h" using symbol::reference; BOOST_AUTO_TEST_CASE(ReferenceEquality) { reference r1("filename", 1, 1, 0); reference r2("filename", 1, 1, 0); reference r3("other filename", 1, 1, 0); BOOST_CHEC...
class Solution1 { public: void wiggleSort(vector<int>& nums) { vector<int> temp = nums; int n = nums.size(); sort(temp.begin(),temp.end()); int j = (n-1)/2; int k = n-1; for(int i=0; i<n; ++i){ nums[i] = i % 2 == 0 ? temp[j--]:temp[k--]; } } };...
/* * MsgDefineMacro.h * * Created on: Jun 11, 2017 * Author: root */ #ifndef MSGDEFINEMACRO_H_ #define MSGDEFINEMACRO_H_ #define NORMAL_MSG_SEND_SIZE (1024*32) #define DEF_MSG_SIMPLE_DECLARE_FUN_H(x) void On_MSG_SIMPLE_##x(Safe_Smart_Ptr<CommBaseOut::Message> &message) #define DEF_MSG_SIMPLE_DEFINE_FUN(t,...
#ifndef TREEFACE_VERTEX_TEMPLATE_H #define TREEFACE_VERTEX_TEMPLATE_H #include "treeface/base/Common.h" #include "treeface/misc/TypedTemplate.h" #include "treeface/misc/TypedTemplateWithOffset.h" #include <treecore/ClassUtils.h> #include <treecore/IntTypes.h> #include <treecore/RefCountObject.h> namespace treecore ...
//===- RemoteMemoryManager.h - LLI MCJIT recording memory manager ------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------...
#ifndef _CGetCheating_h_ #define _CGetCheating_h_ #pragma once #include <string> #include "CHttpRequestHandler.h" class CGetCheating : public CHttpRequestHandler { public: CGetCheating(){} ~CGetCheating(){} virtual int do_request(const Json::Value& root, char *client_ip, HttpResult& out); private: }; #...
#include "pointcloud_painter.h" #include <iostream> namespace wimgui { void pointcloud_painter::clear() { } void pointcloud_painter::gl_paint(view3d& view) { if(auto vertices = vertex_pointer.lock()) { ImRect canvas = view.get_content_rectangle(); gltool::state state; state.save_current_state(); state.ac...
#pragma once #include "structs.hh" namespace SQLiteWrapper { class ResultSet { public: explicit ResultSet(const std::vector<Row>& _rows); ResultSet() = delete; const bool canFetch() const noexcept; const Row& fetch(); void rollback() noexcept; const int getIdx() const noexcept; const std::ve...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Magnus Gasslander */ #if !defined UNICODE_BIDIUTILS_H && defi...
#ifndef POINT_RENDERER_H #define POINT_RENDERER_H #include "PhotonBox/component/ObjectRenderer.h" class PointRenderer : public ObjectRenderer { public: void render() override { } }; #endif // POINT_RENDERER_H
#pragma once #include <vector> #include <QDebug> #include <QXmlStreamReader> #include <QXmlStreamWriter> #include "neuron.hpp" #include "util.hpp" class Brain { public: Brain(int neuronCount, int externalInputPerNeuronCount); Brain(int neuronCount, int externalInputPerNeuronCount, QXmlStreamReader & xml); ...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cmath> #define INF 1000000000 #define REP(i,n) for(int i=0; i<n; i++) #define REP_R(i,n,m) for(int i=m; i<n; i++) #define MAX 100 using ...
#include "Keng/Memory/Memory.h" #include "MemoryManager.h" namespace keng::memory { void* Api::Allocate(std::size_t size) { return MemoryManager::Instance().Allocate(size); } void Api::Deallocate(void* pointer) { return MemoryManager::Instance().Deallocate(pointer); } }
/**************************************************************************** ** Meta object code from reading C++ file 'gui_main.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.8.0) ** ** WARNING! All changes made in this file will be lost! ************************************************************...
// Libmorton Tests // This is a program designed to test and benchmark the functionality offered by the libmorton library // // Jeroen Baert 2015 // Utility headers #include "libmorton_test.h" #include "libmorton_test_2D.h" #include "libmorton_test_3D.h" using namespace std; using namespace std::chrono; using namespa...
#pragma once #include "QsoTokenType.h" // Class for parsing name tokens class NameToken : public QsoTokenType { public: NameToken(); virtual ~NameToken(); virtual bool Parse(const string& token); virtual QsoTokenType* Clone() { return new NameToken(); } };
#include<cstdio> #include<stack> #include<iostream> using namespace std; char a,b;//a为当前字符,b为前一个字符 stack<int> s; int x=0,flag=0,cc=0; int main() { do { a=getchar(); if(a>='0' && a<='9')//为数字 x=x*10+a-'0'; else if(b>='0' && b<='9')//数字输入完毕,压入栈 { s.push(x%100000);...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> using namespace std; typedef long long ll; #define INF 10e17 // 4倍しても(4回足しても)long longを溢れない #define rep(i,n) f...
#include <bits/stdc++.h> using namespace std; typedef struct node *typeptr; struct node{ int info; typeptr next; }; typeptr first, last; int listKosong() { if(first==NULL) return(true); else return(false); } void listBaru() { typeptr list; list=NULL; first=list; last=list; ...
// Created on: 2017-05-26 // Created by: Andrey GOLODYAEV // Copyright (c) 2017 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as p...
//Zach Akin-Amland //CSCI 2270- Data Structures Final //April 19,2021 - April 27,2021 #ifndef MINIGIT_H #define MINIGIT_H #include<vector> #include<iostream> using namespace std; struct singlyNode{ string fileName; // Name of file in current directory string fileVersion; // Name of ...
#include "space/triangulation_view.hpp" #include <cmath> #include <map> #include <set> #include "datastructures/multi_tree_view.hpp" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "space/initial_triangulation.hpp" #include "space/triangulation.hpp" using namespace space; using namespace datastructures; ...
#pragma once #include <string> #include <sstream> #include "stdint.h" namespace mysk { #ifdef _UNICODE typedef wchar_t tchar; typedef std::wstring tstring; typedef std::wstringstream tstringstream; #else typedef char tchar; typedef std::string tstring; typedef std::stringstream t...
#include <iostream> #include <cmath> #include <cstdlib> #include <chrono> #include <mpi.h> #ifdef __cplusplus extern "C" { #endif float f1(float x, int intensity); float f2(float x, int intensity); float f3(float x, int intensity); float f4(float x, int intensity); #ifdef __cplusplus } #endif float ...
// Sharna Hossain // CSC 111 // Final Project | tic_tac_toe.cpp #include <iostream> #include <iomanip> using namespace std; const int SIZE = 3; void initialize_board(char(*board)[SIZE][SIZE]); void print_board(char[SIZE][SIZE]); void print_instructions(); char check_winner(char[SIZE][SIZE]); int main() { // Ini...
#ifndef USERPREFERENCESWINDOW_H #define USERPREFERENCESWINDOW_H #include <QColorDialog> #include <QFormLayout> #include <QWidget> #include <QMainWindow> #include <QDoubleSpinBox> #include <QCheckBox> #include "MainWindow.h" /** * @brief Application's display preferences edition window */ class UserPreferencesWindo...
#include<iostream> #include<vector> #include<string> using std::string; using std::vector; using std::cin; using std::cout; using std::endl; int main() { vector<string> v; string s; while(cin >> s) v.push_back(s); for(auto i : v) cout << i << endl; return 0; }
#pragma once #include "flying.h" class Blast : public Flying { private: bool pointInAsteroid(float x, float y, float assx, float assy, float width, float height); public: Blast(void); Blast(float,float,float); ~Blast(void); void draw(void); void update(void); bool collisionWithAsteroid(float,float,...
#pragma once #include "component/cameracomponent.h" namespace jscomponent { }
#pragma once #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <iomanip> #include <sstream> #include "Dictionary.h" using namespace std; class Board { friend class Dictionary; public: void board(int nlines, int ncol); string board(ifstream& ...
#include "serializer.h" bool writeMatBinary(std::ofstream& ofs, const BannerInfo& in_banner) { if(!ofs.is_open()){ return false; } cv::Mat in_mat = in_banner.image; // serialize image (cv::Mat) if(in_mat.empty()){ int s = 0; ofs.write((const char*)(&s), sizeof(i...
#include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include "MainFrame.h" #include "Resources.hpp" #include "Locale.hpp" #include "config.h" class MyApp: public wxApp { public: virtual bool OnInit(); virtual int OnExit(); }; wxIMPLEMENT_APP(MyApp); bool MyApp::OnInit() { Resources res; ...
/*========================================================================= Program: Visualization Toolkit Module: TestGPURayCastTransfer2DYScalars.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. ...
#include <gtest/gtest.h> #include "vector.h" TEST(GivenNumberAndSaturationValues, whenNumberIsSaturated_SaturatedValuesAreCorrect) { double num1{100}; double num2{5}; double num3{30}; double min_value{10}; double max_value{90}; EXPECT_EQ(max_value, phys::saturateNumber(num1,min_value,max_value...
#include <Adafruit_NeoPixel.h> #include <LightSignal.h> #include <LightParameter.h> LightSignal Strip(16, 6, NEO_GRBW + NEO_KHZ800); LightParameter Pattern[2]; void setup() { Serial.begin(115200); Strip.begin(); int* a = new int[9] {0, 1, 2, 3, 4, 5, 6, 7, 8, }; Pattern[0].initialize( RAINBOW_CYCLE, FORWARD, 0, 700...
#pragma once #include "DataTypes\vec.h" #include "DataTypes\define.h" class tranformCoord { public: tranformCoord(){}; ~tranformCoord(){}; Vec3f tranfrom(Vec3f pt){ arrayVec3f xyz = { Vec3f(1.0, 0.0, 0.0), Vec3f(0.0, 1.0, 0.0), Vec3f(0.0, 0.0, 1.0) }; Vec3f ptTrans = pt - m_tranf; Vec3f ptOut; for (int i ...
#include "Mother.h" #include <iostream> int main(){ Mother m; //Mother Created m.sayHi(); Daughter d; d.sayHi(); std::cout<<d.getSomeVar()<<std::endl; m.~Mother(); // Killing mother d.~Daughter();// Killing Daughter // Killing Mother return 0; }
#ifndef wali_MERGE_FN_FACTORY_GUARD #define wali_MERGE_FN_FACTORY_GUARD 1 /** * @author Nicholas Kidd */ #include "wali/Common.hpp" #include "wali/MergeFn.hpp" #include <string> namespace wali { class MergeFnFactory { public: MergeFnFactory(); virtual ~MergeFnFactory(); virtual wali::me...
// -*- LSST-C++ -*- /* * LSST Data Management System * Copyright 2013-2015 AURA/LSST. * * This product includes software developed by the * LSST Project (http://www.lsst.org/). * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publ...
// Copyright (c) 2015 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special ...
/* * File: Disco.h * Author: raul * * Created on 21 de enero de 2014, 11:01 */ #ifndef DISCO_H #define DISCO_H #include "ObjetoCuadrico.h" class Disco : public ObjetoCuadrico { public: Disco(); Disco(GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint rings); void dibuja(); private: ...
#include "ConfigUtil.h" #include "DefaultConstant.h" ConfigUtil* ConfigUtil::instance = nullptr; ConfigUtil* ConfigUtil::getInstance() { if (ConfigUtil::instance == nullptr) { ConfigUtil::instance = new ConfigUtil(); ConfigUtil::instance->init(); } return ConfigUtil::instance; } void ConfigUtil::init() { #defi...
#pragma once //======include section====== #include "Location.h" #include <vector> #include <cstdlib> class Monster { public: //c-tor Monster(Location& location); // getters Location get_location(); char get_deleted_it(); int get_smartnes(); int get_next_path(); int get_path_size(); // setters void set_de...
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved #include "sys/Dir.hpp" using namespace sys; #if defined __link Dir::Dir(link_transport_mdriver_t * driver){ dirp = 0; _driver = driver; } #else Dir::Dir(){ dirp = 0; } #endif int Dir::open(const char * name){ #if defined __link dirp = link_opendir(driver...
class MG36; class MG36_DZ: MG36 { displayName = $STR_DZ_WPN_MG36_NAME; magazines[] = { 100Rnd_556x45_BetaCMag, 30Rnd_556x45_G36, 30Rnd_556x45_Stanag, 20Rnd_556x45_Stanag, 60Rnd_556x45_Stanag_Taped }; }; class MG36_camo; class MG36_Camo_DZ: MG36_camo { displayName = $STR_DZ_WPN_MG36_CAMO_NAME; magazi...
/* ** EPITECH PROJECT, 2019 ** BABEL ** File description: ** Database */ #ifndef DATABASE_H # define DATABASE_H #ifdef _WIN32 #define WINVER 0x0A00 #define _WIN32_WINNT 0x0A00 #include <SDKDDKVer.h> #endif #include <sqlite3.h> #include <iostream> #include <string> class Database { public: ...
/* How to use: first call init method, with number of input with umbral input inclusive. then call setRankSynapses with w0 = - theta, one by one of each neuron i= 0,1,2,3...and so on. next call rankThresshold to get the activation function array */ #include <stdio.h> #include "layer.h" #include "neuron.h" #include <a...
#pragma once #include <vector> #include "../glm/gtc/matrix_transform.hpp" #include "primitive.h" class Furniture : public Primitive { public: std::vector<int*>* primitives; std::vector<glm::mat4*>* worldTransforms; std::vector<glm::mat4*>* localTransforms; std::vector<glm::mat4*>* inverses; void computeInverses(...
#ifndef ANIMATION_H #define ANIMATION_H #include <SFML/Graphics.hpp> class Animation { public: Animation(); Animation(sf::Texture* texture, sf::IntRect startFrame, int length, int speed); ~Animation(); void update(sf::Time time, sf::Vector2f position); void render(sf::RenderWindow& window); sf::Sprite& getSprite...
#include <iostream> void func1() noexcept { return; } void func2() { return; } int main() { func1(); func2(); auto q1 = noexcept(func1()); auto q2 = noexcept(func2()); std::cout << "q1 = " << q1 << "\n" << "q2 = " << q2 << std::endl; auto s = R"("World"!)"; std::co...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2007 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch_system_includes.h" #ifdef VEGA_BACKENDS_US...
// Created on: 1993-01-11 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA ) // Copyright (c) 1993-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify...
#include "binarySearchTree.h" using namespace std; int Count; BSTree::BSTree(Vint d) { l = nullptr; r = nullptr; p = nullptr; root = nullptr; srand(time(0)); for (int i = 0; i < d.size(); i++) { treeInsert(d[i]); } } void BSTree::inorderTreeWalk(BSTree *x) { if (x != nullptr) { inorderT...
#include "../../include/actors/HeadOfSnake.h" HeadOfSnake::HeadOfSnake(const Rectangle& rect, SDL_Texture* tex):Actor(rect, tex) { setSpeed(Vec(1.0f, 1.0f)); } HeadOfSnake::~HeadOfSnake() { } void HeadOfSnake::addFirstElement(const shared_ptr<Actor>& firstElement) { if(bodyElements.empty()) { bodyElements.push_...
// Created on: 2013-09-20 // Created by: Denis BOGOLEPOV // Copyright (c) 2013-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 ...
/****************************************** * AUTHOR : Abhishek Naidu * * NICK : abhisheknaiidu * ******************************************/ #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define all(n) n.begin(),n.end() #define pii ...
#include "welcomescreen.h" #include "ui_welcomescreen.h" #include "QDebug" #include "basesettings.h" #include "unistd.h" //BaseSettings bsw; WelcomeScreen::WelcomeScreen(QWidget *parent) : QDialog(parent), ui(new Ui::WelcomeScreen) { ui->setupUi(this); } WelcomeScreen::~WelcomeScreen() { delete ui; }...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- ** ** Copyright (C) 2004-2011 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #include "core/pch.h" #ifdef _EMBEDD...
#include <iostream> #include <random> #include <time.h> #include <array> #include <Windows.h> #include <vector> using namespace std; struct OBJ { COORD at; char self; }; const int GRIDSIZE_X{ 40 }; //Length const int GRIDSIZE_Y{ 20 }; // Height const int PERCENT = 35; // percent of alive cells to dead cells const ...
#include "cMethod.h" double SimpleLinearIteration::phi(double x) { return pow(1+x,1.0/3); } double SimpleLinearIteration::iterationFunction() { double range[2] = { 1, 2 }; assert(range[0] < range[1]); double x0 = range[0] + (range[1] - range[0]) / 2; double x1 = phi(x0); double error = abs(x1 - x0); ...