text
stringlengths
8
6.88M
#include "sentence.h" using namespace std; //repackage words into a class `sentence` class sentence { private: language german; language english; int tense = 0; int numTenses = 3; //change this if more tenses are added enum sentenceCases { nominative, accusative, dative,...
// // FILE IntMouse.cpp // // DESCRIPTION IntelliMouse support routines // // CREATED DG[31] 18.feb.1998 // // // COMMENTS Emulation exceptions is listed below: // "HKEY_CURRENT_USER\Control Panel\Microsoft Input Devices\Mouse\Exceptions" #include "core/pch.h" #include "IntMouse.h" #include "platforms/wi...
/* * Copyright (c) 2017 Ensign Energy Incorporated * All Rights Reserved. * * NOTICE: All information contained herein is, and remains * the property of Ensign Energy Incorporated and its suppliers, * if any. The intellectual and technical concepts contained * herein are proprietary to Ensign Energy Incorpor...
#include <iberbar/RHI/OpenGL/CommandContext.h> #include <iberbar/RHI/OpenGL/Buffer.h> #include <iberbar/RHI/OpenGL/ShaderProgram.h> #include <iberbar/RHI/OpenGL/ShaderState.h> #include <iberbar/RHI/OpenGL/ShaderVariables.h> #include <iberbar/RHI/OpenGL/Texture.h> #include <iberbar/RHI/OpenGL/Types.h> #include <iberbar...
#include <iostream> #include <string> #include <vector> #include <cstdlib> #include <map> using namespace std; typedef enum DANWEI {yi = 100000000, wang = 10000, qian = 1000, bai = 100, shi = 10} DANWEI; int main() { string num; map<char, char> shuzi { {'0', 'a'}, {'1', 'b'}, {'2', 'c'}, {'3', 'd'}, {...
#include "Xsection.h" #include "matrix_elements.h" #include "integrator.h" #include "minimizer.h" #include "sampler.h" #include "predefine.h" #include <fstream> #include "random.h" #include "approx_functions.h" template<> Xsection<HS2HS, 2, double(*)(const double, void*)>:: Xsection(std::string Name, std::string c...
//Source.cpp #include <iostream> #include "Matrix.h" using namespace std; int main() { int Row1, Col1, Row2, Col2; cout << "Matrix A:" << endl; cout << "Row = "; cin >> Row1; cout << "Col = "; cin >> Col1; Matr a(Row1, Col1); cin >> a; cout << "Matrix B:" << endl; cout << "Row = "; cin >> Row2; cout << "C...
// // EPITECH PROJECT, 2018 // zappy // File description: // Image.cpp // #include "Image.hpp" Image::Image(irr::gui::IGUIImage *img, int id) { _id = id; image = img; } Image::~Image() { } int Image::getId() const { return _id; } void Image::setText(const wchar_t *str) { image->setToolTipText(str); } void Ima...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * 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 wit...
#include <SimpleTimer.h> #include <Wire.h> SimpleTimer timer; // pin assignments [RED, GREEN, BLUE, AMBER, YELLOW] int buttonPins[][5] = {{10, 0, 0}, {11, 0, 0}, {12, 0, 0}, {13, 0, 0}, {14, 0, 0}}; // {pin, currBtnState, lastBtnState} unsigned long btnLastDebounce[] = {0, 0, 0, 0, 0}; int buzzerPins[] = {5, 6, 7, 8, ...
#include "obj.hpp" using namespace stlset; Vec3::Vec3() : Vec3(0.0, 0.0, 0.0) { } Vec3::Vec3(float x, float y, float z) { this->setX(x); this->setY(y); this->setZ(z); } Vec3::~Vec3() { } float Vec3::distance(const Vec3 &r) const { return sqrt(pow(this->getX() - r.getX(), 2) + pow(this->getY() - r.g...
#ifndef OBJECT_H #define OBJECT_H #include <glad/glad.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> class Object { public: glm::vec3 Position; glm::vec3 Offset; glm::vec3 Scale; glm::vec3 Min, Max; bool Collision; int verticesNum, bufLength; float* vertices; Object(...
#pragma once #include <QAbstractTableModel> #include <envire_core/items/ItemBase.hpp> #include <vector> #include <mutex> namespace envire { namespace viz { /**A simple model to display information about ItemBase in a QTableView */ class ItemTableModel : public QAbstractTableModel { Q_OBJECT public: ItemTab...
#include <ctime> // time_t #include <array> #include <locale> // std::wstring_convert #include <codecvt> // std::codecvt_utf8_utf16 #include <ctime> // time_t, strftime #include <string> #include <sstream> #include <functional> #include <boost/utility/string_view.hpp> #include "CoreUtils.h" #include "assertImpl.h" nam...
#include <stdio.h> #include "class_string.h" #include "class_int.h" #define MAX_CH (8) #define RATS_TAG_SIZE (8) #define OW_INSERT_AT (0x1392) #define OW_LIMIT (0x41DE) #define MISC_INSERT_AT (0x6800) #define MISC_LIMIT (0x1800) #define LEVEL_INSERT_AT (0x13A8) #define LEVEL_LIMIT (0x41C8) class AddMusic { public...
#pragma once struct sUI { wchar_t name[256] = { 0 }; CVector2 dimensions = { 0,0 }; CVector3 pos = CVector3::Zero(); CVector3 scale = CVector3::Zero(); CQuaternion rot = CQuaternion::Identity(); }; struct UIkeyFrame { int num = 0; CVector3 pos = {0,0,0}; CVector3 scale = { 0,0,0 }; CQuaternion rot = { 0,0,0,...
#include <cstdlib> #include <iostream> #include "trm/constants.h" #include "trm/subs.h" #include "trm/binary.h" /** jdotgr computes the rate of change of * orbital angular momentum divided by the orbital * angular momentum (Jdot/J) for two stars in a * circular orbit. * \param m1 mass of star 1 (solar masses) ...
#include "WindowMessageBox.hh" #include <pgrichedit.h> WindowMessageBox::WindowMessageBox(const PG_Widget *parent, const std::string &title, const std::string &message, const std::string &button) : WindowChild(p...
#include "Q03.h" #include <iostream> using namespace std; BSTree::~BSTree() { if(root != nullptr) { destroy(root); } } BSTNode* BSTree::getRoot() { return root; } // 前序递归 void BSTree::preOrder(BSTNode* node) { if(node != nullptr) { cout << node->key << " "; preOrder...
// // CryptClient.hpp for cpp_spider in sources/client // // Made by Benoit Hamon // Login <benoit.hamon@epitech.eu> // // Started on Sun Oct 08 17:52:53 2017 Benoit Hamon // Last update Wed Oct 11 01:01:18 2017 Benoit Hamon // #pragma once #include "IModuleCommunication.hpp" #include "ssl/CryptRSA.hpp" #include "...
/* * Reel.h * Definition of a class to control the reel * Author: Alex St. Clair * January 2018 * * This file defines an Arduino library (C++ class) that controls * the reel. It inherits from the Technosoft class, which implements * communication with the Technosoft motor controllers. * * Un...
#ifndef TOPCONTROLLERS_HH #define TOPCONTROLLERS_HH class UMLRTController; struct UMLRTCommsPort; struct UMLRTSlot; enum CapsuleInstanceId { InstId_Top, InstId_Top_d1, InstId_Top_p1, InstId_Top_p2, InstId_Top_p3, InstId_Top_p4, InstId_Top_p5, InstId_Top_p6 }; extern UMLRTController * ...
/* * 题目:1723. 完成所有工作的最短时间 * 链接:https://leetcode-cn.com/problems/find-minimum-time-to-finish-all-jobs/ * 知识点:状态压缩+动态规划 */ class Solution { public: int minimumTimeRequired(vector<int>& jobs, int k) { int n = jobs.size(); // sum[i] 表示子集 i 所需要的总工作时间 vector<int> sum(1 << n, 0); for (...
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "fssimplewindow.h" #include "cmudef.h" #include <string.h> #define _CRT_SECURE_NO_WARNINGS MONSTER::MONSTER() :TimeLag(2000) { XLoc=0; // MonsterScreenX YLoc=300; // MonsterScreenY state=0; ID=-1; ELocX=799; // ExitScreenX ELocY=380; // ExitS...
/*Implementation of mutex module.*/ #include "cc/shared/mutex.h" #include "cc/shared/common.h" namespace cc_shared { Mutex::Mutex() : lock_(new(std::nothrow) pthread_mutex_t) { // TODO(anirban): Measure how long it takes to init and deinit the mutex // initialization attribute. Then make a call if mutexattr ...
#pragma once #include <math.h> #include <vector> class Point { public: long double PI = 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482...
/*1004*/ #include <iostream> #include <fstream> #include <vector> #include <string> #include <algorithm> using namespace std; vector<string> Table; vector<int> Count_string; int string_in_table(const string &s) { for (int i = 0; i < Table.size(); i++) { if (s == Table[i]) return i; } retu...
#include <cstdio> #include <cstdlib> void OpenFile1(const char* file) { FILE* f = fopen(file, "r"); if (f != nullptr) { // File exists, handle error } else { if (fclose(f) == EOF) { // Handle error } f = fopen(file, "w"); if (f == nullptr) { // Handle error } // Write to file if ...
#include "Stack.hpp" // Array Stack template <class T> class ArrayStack { private: vector<T> items; public: void push(T const&); void pop(); T top() const; bool isEmpty() const { return items.empty(); } }; template <class T> void ArrayStack<T>::push(T const& elem) { items.push_back(elem); } template <cla...
#pragma once #include "GateUserManager.h" class GateIocp : public CIocp { public: GateIocp(); ~GateIocp(); // CIocp을(를) 통해 상속됨 virtual VOID OnIoRead(VOID * object, DWORD dataLength) override; virtual VOID OnIoWrote(VOID * object, DWORD dataLength) override; virtual VOID OnIoConnected(VOID * object) override; vi...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2012 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @author Alexander Remen (alexr@opera.com) */ #ifndef MESSAGE_...
#ifndef SHOC_HASH_SHA2_H #define SHOC_HASH_SHA2_H #include "shoc/util.h" namespace shoc { constexpr int SHA2_WORD64_FLAG = 0x1000; enum Sha2Type { SHA_224 = 224, SHA_256 = 256, SHA_384 = 384 | SHA2_WORD64_FLAG, SHA_512 = 512 | SHA2_WORD64_FLAG, SHA_512_224 = 224 | SHA2_WORD64_FLA...
#include "libstatic.h" int libstatic::Class::method() const { return 0; } int libstatic::Class::method_exported() const { return 0; } int libstatic::Class::method_deprecated() const { return 0; } int libstatic::Class::method_deprecated_exported() const { return 0; } int libstatic::Class::method_excluded() ...
#include <bits/stdc++.h> using namespace std; int main(){ int N, H; cin >> N >> H; /* こんな使い方できるの? */ vector<int> h(N); for(int i = 0; i < N; i++) { int tmp; cin >> tmp; h[i] = tmp; } vector<int> dp(1 << N); /* dp[i]の値は、組み合わせの数を表す。 iの数値は二進数で...
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <algorithm> using namespace std; struct Student { string name; unsigned int id; }; // ***** TODO ***************************************************************** // Implement a comparator function here. The function sho...
#ifndef ASTAR_H #define ASTAR_H #include <vector> #include <iostream> #include <Eigen/Dense> namespace astar { struct Lattice { Lattice() : _check(false), _g(0.0), _h(0.0) {} double _x; double _y; double _z; bool _check; int _row; int _col; double _g; double _h; }; // struct Lattice typedef st...
// Name: Zehua Liu // ID: 001086969 // Homework 02 Problem 1 #include<iostream> #include<random> using namespace std; void merge(int A[], int p, int q, int r) { // Get the length of the two halves int n1 = q - p + 1; int n2 = r - q; // Define 2 arrays for the 2 halves and reserve a place at the end for both int...
// Copyright (c) 2005-2017 Hartmut Kaiser // Copyright (c) 2011 Bryce Adelstein-Lelbach // // SPDX-License-Identifier: BSL-1.0 // 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) #include <pika/config.hpp> #i...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<algorithm> #include<cmath> using namespace std; const int INF = 1e9 + 7; struct e{ int to,dist; }; vector<e> edge; vector<int> G[100100]; bool p...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* RobotomyRequestForm.cpp :+: :+: :+: ...
#include "list.hpp" List::List() : m_head(nullptr) {} List::List(const List& object) { Node* current = object.m_head; while (nullptr != current) { push_back(current->m_value); current = current->m_next; } } List::~List() { clear(); } int List::getSize() const { ...
#include <iostream> #include <vector> #include <cstdio> #include <string> #include <algorithm> #include <stack> #include <map> #include <set> #include <cassert> #include <iterator> #include <string.h> #ifndef __SuffStructures__ #define __SuffStructures__ namespace NStringStructures { namespace NSuffStructures { ...
#include "ShortBuffer.h" ShortBuffer::ShortBuffer(int _bs) { buffer = NULL; index = -1; capacity = _bs; chageCapacitySize(capacity); } ShortBuffer::~ShortBuffer() { if (buffer != NULL) { delete [] buffer; } } void ShortBuffer::chageCapacitySize(int _bs) { capacity = _bs; if (buffer != NULL)...
#ifndef _PLAYER_DATA_H #define _PLAYER_DATA_H /********************************************************** // // Wih (Wireless Interface Hockey) // // player_data.h (プレイヤーの位置座標管理クラス) // // Copyright (C) 2007, // Masayuki Morita, Kazuki Hamada, Tatsuya Mori, // All Rights Reserved. *********************...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
/** *AUTHOR:Harsh Agrawal* *Birla Institute of Technology,Mesra* **/ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int N=2e5+1; #define for0(i,e) for(ll i=0;i<e;i++) #define for1(i,e) for(ll i=1;i<e;i++) #define forx(i,x,e) for(ll i=x;i<e;...
// Fill out your copyright notice in the Description page of Project Settings. #include "Cogliati.h" #include "MyCogliatiProjectile.h" #include "GameFramework/ProjectileMovementComponent.h" AMyCogliatiProjectile::AMyCogliatiProjectile(const class FObjectInitializer& PCIP) : Super(PCIP) { PrimaryActorTick.bCanEverTi...
#include <iostream> #include <cstdio> #include <algorithm> #include <memory.h> #include <vector> #include <queue> using namespace std; typedef unsigned long long ULL; const int N = 25555; int st[N]; int D[N]; int was[N]; int ff[111111], ffideal[111111]; vector<pair<int, int> > g[N]; vector<int> f[N]; int W[N], WT; ...
/********* Rui Santos Complete project details at https://randomnerdtutorials.com Based on the NTP Client library example *********/ #include <WiFi.h> #include <NTPClient.h> #include <WiFiUdp.h> #include "freertos/FreeRTOS.h" #include "esp_wifi.h" #include "esp_wifi_types.h" #include "esp_system.h" #include "esp...
//知识点:bfs/树状结构 /* 对称二叉树的定义: 1. 二叉树; 2. 将这棵树所有节点的左右子树交换, 新树和原树对应位置的结构相同且点权相等。 欲判断以一个点为根的树 为对称二叉树 则必须使同深度 , 从外层数 层数相同的点 结构对称(即同时存在 或 同时不存在) , 且点权值相同 则:可以通过两个队列,来枚举 同深度 , 从外层数 层数相同的点 现将根节点的左右儿子放入队列 每次取出队首元素 然后判断他们的儿子 是否结构对称 (即: 左儿子对右儿子,右儿子对左儿子) 点权值是否相等 如果相等,将相互对应的儿子加入队列 不相等,结束循环, 递归...
#pragma GCC optimize("Ofast") #include <algorithm> #include <bitset> #include <deque> #include <iostream> #include <iterator> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <unordered_map> #include <unordered_set> using namespace std; void abhisheknaiidu()...
#include "xr_log.h" #include "xr_file.h" namespace { const uint32_t LOG_BUF_SIZE = 81920; //每条日志的最大字节数 const uint32_t RING_BUF_SIZE = 4194304; //环形缓冲大小(2的整数次幂) const char *s_log_color[] = {"\e[1m\e[35m", "\e[1m\e[33m", "\e[1m\e[34m", "\e[1m\e[31m", "\e[1m\e[32m", "\e[1m\e[36m", "\e[1m\e[1m", "\e[1m\e[...
#pragma once #include <Dot++/lexer/Tokenizer.hpp> #include <Dot++/lexer/TokenInfo.hpp> #include <Dot++/parser/Parser.hpp> #include <deque> #include <istream> namespace dot_pp { template<class ConstructionPolicy> class Parser { public: Parser(ConstructionPolicy& constructor); void...
#ifndef BASE_MENU_H #define BASE_MENU_H #include "iterator.h" #include <string> class BaseMenu { public: BaseMenu(std::string newName, std::string newDescr) : _name(newName), _description(newDescr) { } std::string getName() { return _name; } virtual void setIsVegetarian(bool) { throw std...
class Solution { public: int myAtoi(string str) { if(str.empty()) return 0; int index = 0; while(str[index] == ' ') index++; if(str[index] != '+' && str[index] != '-' && !(str[index] >= '0' && str[index] <= '9')){ return 0; } bool positive = true; ...
// Demonstrate template class #include <iostream> #include <string> // template class has template type(s) listed in angle brackets <> // Best to implement template classes in header files if providing as part of a library. template<typename T> class Person { public: Person(const T& field, const std::string &name) ...
#include "basictexture.h" #include <stdexcept> #include <boost/filesystem.hpp> #include <opencv2/opencv.hpp> BasicTexture::BasicTexture(const std::string &file) { loadFromFile(file); } BasicTexture::~BasicTexture() { glDeleteTextures(1, &_id); } void BasicTexture::bindTexture() const { glBindTexture(GL_T...
//Pour commit ! #include "projetajout.h" ProjetAjout::ProjetAjout(QWidget *fenetre): QDialog(fenetre) { setWindowTitle("Ajout Tache"); setFixedSize(600,300); h1Layout=new QHBoxLayout; lid=new QLabel("idenetificateur", this); id = new QLineEdit(this); id->setFixedSize(300, 20); h1Layout->ad...
/* * File: Sensor.cpp * Author: vitaliy * * Created on July 15, 2017, 8:21 PM */ #include "Area.hpp" #include "Sensor.hpp" #include <iostream> using namespace std; Sensor::Sensor() { this->id = 0; this->name = ""; } Sensor::Sensor(int value, string s): id(value), name(s){} Sensor::Sensor(int valu...
#include<iostream> using namespace std; int main() { // Знаковый тип данных int signedVar = -10; cout << "Значение переменной: " << signedVar << endl; // Беззнаковый тип данных unsigned usignedVar = 10; cout << "Значение беззнакового типа данных: " << usignedVar << endl; cout << "Введите то...
// Copyright (C) 2014, 2015, 2016 Alexander Golant // // This file is part of csys project. This project 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 3 of the License, or // (at your...
#pragma once #include "bricks/core/returnpointer.h" #include "bricks/imaging/colour.h" namespace Bricks { namespace Imaging { namespace InterlaceType { enum Enum { None = 0, Adam7 }; } class Image { public: virtual u32 GetWidth() const = 0; virtual u32 GetHeight() const = 0; virtual void SetSize...
/* * Copyright 2016 Freeman Zhang <zhanggyb@gmail.com> * * 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 applic...
/* * Copyright (c) 2020 sayandipde * Eindhoven University of Technology * Eindhoven, The Netherlands * * Name : image_signal_processing.cpp * * Authors : Sayandip De (sayandip.de@tue.nl) * Sajid Mohamed (s.mohamed@tue.nl) * * Date : March 26, 2020 * * Function ...
#include <assert.h> #include <math.h> #include <algorithm> #include <climits> #include <functional> #include <iostream> #include <numeric> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long using namespace std; int n, m; vector<string> words; string key; struc...
#pragma once #include <string> namespace Color { typedef enum { FORECOLOR_BLACK, FORECOLOR_DARKBLUE, FORECOLOR_DARKGREEN, FORECOLOR_DARKCYAN, FORECOLOR_DARKRED, FORECOLOR_DARKPURPLE, FORECOLOR_DARKYELLOW, FORECOLOR_LIGHTGRAY, FORECOLOR_RESET = 7, FORECOLOR_DARKGRAY, FORECOLOR_L...
#pragma once namespace iberbar { namespace LuaCppNames { static const char s_ClassName_Ref[] = "CRef"; static const char s_ClassName_Ref_FullName[] = "iberbar.CRef"; } }
#include "stdafx.h" #include "NetworkSensor.h" #include "sensorData/sensorData.h" struct Calibration { unsigned int m_DepthImageWidth; unsigned int m_DepthImageHeight; unsigned int m_ColorImageWidth; unsigned int m_ColorImageHeight; ml::SensorData::CalibrationData m_CalibrationDepth; ml::SensorData::Calibrat...
#include "encryptor.h" encryptor::encryptor(std::vector<size_t> const& shifts) : shifts(shifts) {} bool is_alpha(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); } std::string encryptor::encrypt(const std::string& message) { std::string res; for (size_t i = 0, counter = 0; i < message.s...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2009 - 2010 * * WebGL GLSL compiler -- pretty printer for AST. * */ #include "core/pch.h" #ifdef CANVAS3D_SUPPORT #include "modules/webgl/src/wgl_printer_console.h" #include "modules/webgl/src/wgl_...
/* SoftwareSerial.h (formerly NewSoftSerial.h) - Multi-instance software serial library for Arduino/Wiring -- Interrupt-driven receive and other improvements by ladyada (http://ladyada.net) -- Tuning, circular buffer, derivation from class Print/Stream, multi-instance support, porting to 8MHz processors, vari...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define FOR(i,n) for(ll i=0;i<n;i++) #define FOR1(i,n) for(ll i=1;i<n;i++) #define FORn1(i,n) for(ll i=1;i<=n;i++) #define FORmap(i,mp) for(auto i=mp.begin();i!=mp.end();i++) #define vll vector<ll> #define vs vector<string> #define pb(x) push_...
#pragma once class GameCamera3D :public GameObject { public: ~GameCamera3D(); bool Start() override; };
/* * File: main.cpp * Author: Tom * * Created on 19 January 2012, 8:29 PM */ #include <cstdlib> #include <iostream> #include <string> #include <fstream> using namespace std; int main(int argc, char** argv) { string current = "1"; string previous = "1"; string temp; int term = 2; whil...
#include "Shower.h" #include "Platy.Game.Core/Util/Util.h" #include <Util/Util.h> namespace Platy { namespace Game { Shower::Shower( const float& aParticleMaxSize, const EOrientation anOrientation, const sf::Vector2f& aPosition, const sf::Color& aColor, const size_t& aParticleCount, const float...
#include <pybind11/pybind11.h> namespace py = pybind11; #include "oineus_persistence_bindings.h" #include <oineus/oineus.h> PYBIND11_MODULE(_oineus, m) { m.doc() = "Oineus python bindings"; init_oineus_common<int>(m); init_oineus<int, float>(m, "_float"); init_oineus<int, double>(m, "_double"); ...
#include <stdio.h> #include<iostream> #include <string.h> int main(){ int n=0,g=0,a=0; int garbage=0; char c; printf("輸入數字:\n"); while(1){ c=getchar(); if((c==' ')||(c=='\n') ){ if(garbage==1){ g++; //printf("g\n"); } else{ n++; //printf("n\n"); } garbage=0; ...
#include "FileMemMapper.h" FileMemMapper::FileMemMapper() { MappedFileBase = nullptr; hFile = 0; hFileMapping = 0; filesize = 0; } FileMemMapper::FileMemMapper(const char* file, DWORD dwDesiredAccess = (FILE_READ_ACCESS | FILE_WRITE_ACCESS)) { MappedFileBase = nullptr; hFile = hFileMapping = 0; filesize = 0; o...
#include <iostream> #include <math.h> #include <algorithm> #include <SFML/Graphics.hpp> using namespace std; using namespace sf; #define int long double int maxi = 200; int max_len = 2; const int window_W = 1920; const int window_H = 1080; const int A = 1; const int B = 1; const int C = -0.0085; const int D = 0.71; c...
/* -*-C++-*- */ /* * Copyright 2016 EU Project ASAP 619706. * * 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 appl...
#include <stdio.h> #include <malloc.h> #include <iostream> #include <list> #include <queue> #include <stack> using namespace std; class Graph { int V; //No. of vertices list<int> *adj; //list's array public: Graph(int V){ this->V = V; adj = new list<int>[V]; //adj = (list<int>*...
#include <jni.h> #include <string> #include <time.h> #include <stdlib.h> using namespace std; extern "C" JNIEXPORT jstring JNICALL Java_com_shady_finalc_MainActivity3_bad( JNIEnv* env, jobject /* this */) { srand ( time(NULL) ); //initialize the random seed const string arrayNum[4] = {"OMG!", ...
/* Author: Mincheul Kang */ #ifndef OMPL_BASE_HARMONIOUS_SAMPLER_ #define OMPL_BASE_HARMONIOUS_SAMPLER_ #include "ompl/geometric/planners/PlannerIncludes.h" #include "ompl/base/SpaceInformation.h" #include <string> #include <map> #include "ompl/util/RandomNumbers.h" #include <Eigen/Dense> #include <Eigen/Core> #incl...
#ifndef SANDBOX_H #define SANDBOX_H #include "util/callbacks.hpp" #include "util/colors.hpp" #include "resources/Sun.hpp" #include "pncraft.hpp" class SandBox { void set_callbacks() { //callbacks defined in util/callbacks.hpp glfwSetFramebufferSizeCallback(window, framebuffer_size_callback); ...
/*! * \file mpre.cpp * \author Simon Coakley * \date 2012 * \copyright Copyright (c) 2012 University of Sheffield * \brief Implementation of mpre */ #include <QtGui> #include "./mpre.h" Mpre::Mpre(QString n, QString o, int v, bool enabled, bool neg) { myName = n; myOp = o; myValue = v; myEnabled ...
#pragma once /* It's a class which encapsulate the TCP header with a custom header for a UNIX platform. */ #include "ITCPHeader.hh" #include <netinet/tcp.h> class CUTCPHeader : public ITCPHeader { protected: struct TCPHeaderCustom { uint32_t addressSource; uint32_t addressDest; uint8_t placeHold...
/** @file @author Nicholas Gillian <ngillian@media.mit.edu> @version 1.0 @section LICENSE GRT MIT License Copyright (c) <2012> <Nicholas Gillian, Media Lab, MIT> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"...
#include "Node.h" Node::Node() { m_name = ""; m_distance = 0; m_count_review = 0; m_mid = m_left = m_right = nullptr; } void Node::SetLeft(Node *left) { m_left = left; } Node *Node::GetLeft() { return m_left; } Node *Node::GetRight() { return m_right; } void Node::SetValue(std::string name, float distance,...
#pragma once class ShadowMap { public: ShadowMap(); ~ShadowMap(); CMatrix GetLighViewMatrix() const { return m_lightViewMatrix; } CMatrix GetLightProjMatrix() const { return m_lightProjMatrix; } void ClearShadowCasters() { m_shadowCasters.clear(); } void ClearACaster(SkinModel* casterModel) { m_s...
/* * ft_calib.h * Modified By Chuan QIN, July 2019 * Logs: * * Remove the require for IMU sensor, the TF of manipulator is used instead. * * The base frame's inclination to ground is not required, only the local gravity acceleration is required (usually 9.81) * * In order to accelerate the calibratio...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "StucchiProjectile.h" #include "MyStucchiProjectile.generated.h" /** * Class created for STEP 5 of Tools exam */ UCLASS() class STUCCHI_API AMyStucchiProjectile : public AStucchiProjectile { GENERATED_BODY() UPR...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <quic/observer/SocketObserverInterface.h> #include <utility> namespace quic { SocketObserverInterface::WriteEvent::Bu...
#ifndef INFORMATIONCLASS #define INFORMATIONCLASS #include <QGroupBox> #include <QGroupBox> #include <QString> #include <QDebug> #include <QJsonObject> #include <QJsonArray> #include <QJsonDocument> #include <dialogclass.h> namespace Ui { class informationClass; } class informationClass : public QGroup...
// Project 24 - Hypnotizer int enable1Pin = 11; int in1Pin = 10; int in2Pin = 9; int speeds[] = {80, 100, 160, 240, 250, 255, 250, 240, 160, 100, 80, -80, -100, -160, -240, -250, -255, -250, -240, -160, -100, -80}; int i = 0; void setup() { pinMode(enable1Pin, OUTPUT); pinMode(in...
#include <iostream> #include "./a.h" int funA(int x, int y){ std::cout << "funA(" << x << ", " << y << ")" << std::endl; return x*y; }
#include "CustomGameScene.h" #include "GameOverScene.h" #include "CustomSpaceship.h" #include "CustomPillar.h" #include "CustomPhysics/CustomPhysics.h" #include "Definitions.h" USING_NS_CC; Scene* CustomGameScene::createScene() { return CustomGameScene::create(); } // Initialize instance bool CustomGameScene::init(...
/**************************************************************************** ** ** Copyright (C) 2010 Instituto Nokia de Tecnologia (INdT) ** ** This file is part of the Rask Browser project. ** ** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free So...
( English:'Irish'; Native:'Gaeilge'; LangFile:'irish.lang'; DicFile:'irish.dic'; FlagID:'ie'; Letters:'A,Á,B,Ḃ,C,Ċ,D,Ḋ,E,É,F,Ḟ,G,Ġ,I,Í,L,M,Ṁ,N,O,Ó,P,Ṗ,R,S,Ṡ,T,Ṫ,U,Ú'; LetterCount:'11,5,2,2,3,3,3,1,4,2,1,1,3,1,8,5,5,3,1,5,4,3,1,1,5,4,1,3,2,2,3'; LetterValue:'1,1,3,3,2,2,2,4,1,3,4,10,2,4,1,1,1,2,5,1,1,2,8,1...
#pragma once #include "worker.h" #include "mailbox.h" #include "Queue.h" #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <iostream> #include <thread> using namespace std; class Server { public: Server()...
/***************************************************************** * Copyright (C) 2017-2018 Robert Valler - All rights reserved. * * This file is part of the project: DevPlatformAppCMake. * * This project can not be copied and/or distributed * without the express permission of the copyright holder *************...