text
stringlengths
8
6.88M
/****************************************************************************/ /* C++ library for creating a level (i.e., strongly connected component) */ /* Written by SCHULZ Quentin, quentin.schulz@utbm.fr , Nov. 2013 */ /****************************************************************************/ #if...
#include "graph.h" #include <memory> namespace POICS{ NodeSet::NodeSet(int _num_nodes, int _num_score_elmts): num_nodes(_num_nodes), num_score_elmts(_num_score_elmts){ int n = _num_nodes*_num_score_elmts; scores = new double[n]; std::fill_n(scores, n, 0.0); } NodeSet::~NodeSet(){ delete[] scores; } void...
#include "CustomSplitForTree.h" using namespace std; QStringList splitForTree(QString stringTree){ QString st = stringTree; auto i = 0; QStringList out={}; QString tmp=""; for(;i<st.length();i++){ if (st[i] == ')' || st[i] == '(') out.push_back(QString(st[i])); ...
/* * SPDX-FileCopyrightText: 2008 Till Harbaum <till@harbaum.org> * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "osm_api.h" #include "osm_api_p.h" #include "appdata.h" #include "diff.h" #include "map.h" #include "misc.h" #include "net_io.h" #include "notifications.h" #include "osm.h" #include "osm2go_...
#include <iostream> #include <string> using namespace std; //动态分配的数组,new出来在堆上 void dynamicArray(){ size_t size = 10; //当size为0时,new一个动态数组依然成功,但是返回的指针不指向任何对象,不能用*操作 int *a1 = new int[size]; //未初始化的数组,内置无初始化,类调默认构造 int *a2 = new int[size](); //初始化后的数组,内置为0,类调默认构造 const string *s = new const string[10](); //const动...
#include "iostream" using namespace std; /** * @brief Clase Node_Rr : Estructura de datos : Nodo Simpre * */ class Node_Rr{ private: string memory_address; /**< dirección de memoria */ string name; /**< nombre */ string value; /**< valor*/ string type; /**< tipo */ public: Node_Rr *siguiente; /**...
#include <cstdio> #include <iostream> using namespace std; typedef long long ll; const int maxn = 105; // 第i个点左边的标记下标为i,右边的标记下标为i+1 int n, energy[maxn], dp[2 * maxn][2 * maxn] = { 0 }, ans = 0; // #define DEBUG int main() { #ifdef DEBUG freopen("d:\\.in", "r", stdin); freopen("d:\\.out", "w", stdout); #endif ...
/* * File: StataHeader.h * Author: adrianmo * */ #ifndef STATAHEADER_H #define STATAHEADER_H #include <string> #include <stdint.h> #include <map> #include <sstream> using namespace std; #define ST_STRL 32768 #define ST_DOUBLE 65526 #define ST_FLOAT 65527 #define ST_LONG 65528 #define ST_INT 65529 #de...
#include <iostream> using namespace std; int main() { char str[20]; cin >> str; str[4] = '\0' str[7] = '\0' cout << str << "years " << str + 5 << "month " << str + 8 << "days" << endl; return 0; }
#include "uart.h" #include <stdio.h> static void uart_in_hook(struct avr_irq_t * irq, uint32_t value, void * param) { uart* p = (uart*)param; p->fifo_buffer.push(value); } uart::uart(struct avr_t* avr){ // disable the stdio dump, as we are sending binary there uint32_t f = 0; avr_ioctl(avr, AVR_IOCTL_UART_G...
/*! * \file KaiXinApp_GetProfileDetail.cpp * \author pengzhixiong@GoZone * \date 2010-10-8 * \brief 解析与UI: 获取用户信息详情 * * \ref CopyRight * =======================================================================<br> * Copyright ? 2010-2012 GOZONE <br> * All Rights Reserved.<br> * The file is...
#include "FFVideoPlyer.h" #include <QFileDialog> #include <QMessageBox> #include <iostream> #include <list> #include "MyFFmpeg.h" #include <WinUser.h> #include <QMenuBar> #include <QTextCodec> #include <QTextStream> #include <QtCore> #include <QSound> #include<QRadioButton> #include"safety.h" #pragma comment(lib, "Use...
#ifndef SHADERTYPE_H #define SHADERTYPE_H namespace revel { namespace renderer { enum class ShaderType { VERTEX, FRAGMENT, GEOMETRY, TESS_EVALUATION, TESS_CONTROL, UNKNOWN }; } // ::revel::renderer } // ::revel #endif // SHADERTYPE_H
/*! * \file * \author David Saxon * \brief Inline definitions for internal UTF-8 utility functions. * * \copyright Copyright (c) 2018, The Arcane Initiative * All rights reserved. * * \license BSD 3-Clause License * * Redistribution and use in source and binary forms, with or without * ...
// // Created by Terry on 15/9/11. // #ifndef AI_WORD_H #define AI_WORD_H #include "utfstring.h" #include <string> using namespace std; class word { public: utfstring *utfword; char *word_type; bool is_new_char; double word_probability; public: word(utfstring *a_utfword); word(utfstr...
#include<bits/stdc++.h> using namespace std; bool compare(pair<int,double> a,pair<int,double> b) { return a.second > b.second; } double knapsack(int n,int W,int* weight,int* value) { if(n==0 || W==0) { return 0; } double* temp = new double[n]; for(int i=0;i<n;i++) { temp[i]=(double)value[i]/weight[i]; }...
//inicializace knihoven #include <ThingSpeak.h> #include <ESP8266WiFi.h> #include <Wire.h> #include <HTU21D.h> HTU21D myHTU21D(HTU21D_RES_RH12_TEMP14); //jménoa heslo k wifi const char* ssid = "IoT"; const char* pass = "17091991"; //číslo kanálu na thingspeaku najdete jako channel ID, jeto 6 mís...
#include "platform.h" #include "script-functype.h" #include <map> #include <string.h> #include <math.h> #include <stdio.h> #include <ctype.h> namespace Script { namespace mdpx { #define DEFINE_FUNC(__params, __type, __name) s_fnmap[ std::string(#__name) ] = s_efnmap[__type] = FuncInfo{#__name, __type, FUNCTION ## ...
#include "Patcher_ShowCombatPower.h" #include "../Addr.h" #include "../FileSystem.h" //----------------------------------------------------------------------------- // Static variable initialization bool CPatcher_ShowCombatPower::showMaxHP = false; bool CPatcher_ShowCombatPower::showCombatPower = false; wchar_t CPatc...
#ifndef PLAYER_H #define PLAYER_H #include "raylib.h" class Player{ public: Vector2 prev, pos, vel, acc; bool grounded; Rectangle rect; Player(Vector2 _pos); void refreshRect(); float bottom(); void handleEvents(); void update(float gravity); ...
#pragma once #include "datatypes.hpp" namespace roboshape { void invert_normals(pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr &output_normals, std::vector<roboshape::Primitive> &primitive_borders, uint32_t primitive_border_index) { auto current_primitive_borders = primitive_borders[primitive_bo...
#include <iostream> #include <vector> #include <fstream> using namespace std; struct A { int x; string str; friend ostream & operator <<(ostream & os, A &a){ return os<<a.x<<a.str; } friend istream & operator >>(istream & is, A &a){ return is>>a.x>>a.str; } ch...
#ifndef GLOBAL_FUNCTIONS #define GLOBAL_FUNCTIONS #define _USE_MATH_DEFINES #include <math.h> #include <vector> #include "../include/GLSLProgram.h" #include "../libs/glm/glm/gtx/rotate_vector.hpp" #include "GlobalConstants.h" static struct GlobalFunctions { void rotateXPointVector(std::vector<PointVector>& vector...
/*********************************************************************** created: Fri Jul 8 2005 author: Paul D Turner <paul@cegui.org.uk> *************************************************************************/ /*************************************************************************** * Copyright...
#include <cybermed/cybCore.h> #include <cybermed/cybViewMono.h> #include <cybermed/cybMouseInterator.h> #include <cybermed/cybOBB.h> #include <cybermed/cybCollisionManager.h> #include <cybermed/mf/mfReaderModel.h> #include <string> #include <cstring> #include <iostream> #include <unistd.h> #include <sys/time.h> using...
#if !defined(REALTIMECLOCK_H) #define REALTIMECLOCK_H #include "LocalTypes.h" #include "RtcTime.h" #include "RtcAlarm.h" class I2CBus; namespace rtc { enum class RtcClockState { Unknown, Running, TimeInvalid }; class RealTimeClock { public: virtual bool Initialize() = 0...
/* * FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU. * Copyright (c) 2006 Christian Walter <wolti@sil.at> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:...
/* Copyright (c) 2019 Stefan Kremser This software is licensed under the MIT License. See the license file for details. Source: github.com/spacehuhn/SimpleCLI */ #include "cmd_error.h" #include <stdlib.h> // malloc, memcpy #include <string.h> // strlen, strcpy // ===== CMD Parse Error ===== // // Construct...
/* 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...
#ifndef GAMEMANAGER_H #define GAMEMANAGER_H #include "Game.h" #include <QList> #include <QPair> typedef QMap <int, Game> PlayingGames; typedef QMap <QString, Game> OpenedGames; class GameManager { public: GameManager(); void addPlayingGame(int id, ClientIterator firstPlayer, ClientIterator secondPlayer, int t...
#include<bits/stdc++.h> using namespace std; bool ispalindrome(string s) { int i = 0, j = s.size() -1; while(i<j){ if(s[i]!=s[j])return false; i++,j--; } return true; } int main(){ int n, m; cin >> n >> m; vector<string>s(n); unordered_map<string,int>m1; for(int ...
class Solution { private: int recu(TreeNode *root, int value) { if (root == nullptr) return 0; int new_val = value * 10 + root->val; if (root->left == nullptr && root->right == nullptr) return new_val; return recu(root->left, new_val) + recu(root->right,...
#ifndef _RIFLEMAN_H #define _RIFLEMAN_H #include "../../FrameWork/Animation.h" #include "../../FrameWork/IComponent.h" #include "../../FrameWork/Scene/PlayScene.h" #include "../Enemies/BaseEnemy.h" #include "../../FrameWork/GameTime.h" #include "../../FrameWork/StopWatch.h" #include "../Object/Explosion.h" #include "...
/************************************************************************* > File Name : SecCertificateRequestErrorVerfication.cpp > Author : YangShuai > Created Time: 2016年08月17日 星期三 16时17分12秒 > Description : ************************************************************************/ #include<cstring...
#pragma once #include <landstalker-lib/patches/game_patch.hpp> #include <landstalker-lib/constants/offsets.hpp> #include <landstalker-lib/constants/item_codes.hpp> #include "../../logic_model/hint_source.hpp" #include "../../logic_model/randomizer_world.hpp" class PatchRecordBookSaveOnUse : public GamePatch { privat...
/* * UAE - The Un*x Amiga Emulator * * cpuopti.c - Small optimizer for cpu*.s files * Based on work by Tauno Taipaleenmaki * * Copyright 1996 Bernd Schmidt */ #include "sysconfig.h" #include "sysdeps.h" #include <ctype.h> struct line { struct line *next, *prev; int delet; char *data; };...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once WINRT_EXPORT namespace winrt { namespace ABI::Windows::System::UserProfile { struct IAdvertisingManagerForUser; struct IAdvertisingManagerStatics; struct IAdvertisingManagerStatics2; struct ...
/* * Copyright (C) 2007-2015 Frank Mertens. * * Use of this source is governed by a BSD-style license that can be * found in the LICENSE file. * */ #include <flux/syntax/SyntaxDebugFactory> #include <flux/syntax/syntax> namespace flux { namespace syntax { int RuleNode::matchNext(ByteArray *text, int i, Token *...
// This MFC Samples source code demonstrates using MFC Microsoft Office Fluent User Interface // (the "Fluent UI") and is provided only as referential material to supplement the // Microsoft Foundation Classes Reference and related electronic documentation // included with the MFC C++ library software. // Lice...
#include "ArduinoCommHandler.h" #include <Wire.h> float x1 = 0.0; byte* x1Pointer =(byte*) &x1; //ukazatel na float pretypovany na ukazatel na byte (prvni byte floatu) float x2 = 0.0; byte* x2Pointer =(byte*) &x2; //ukazatel na float pretypovany na ukazatel na byte (prvni byte floatu) float x3 = 0.0; byte* x3Pointer ...
// // Copyright (C) 2017 Ruslan Manaev (manavrion@yandex.com) // This file is part of the Modern Expert System // #include "pch.h" #include "program_layer.h" #include "nlohmann/json.hpp" #include "utility/logger.h" using namespace concurrency; using namespace mes_core; using namespace modern_expert_system; using na...
#ifndef __PRODUCER_PARAMS_H__ #define __PRODUCER_PARAMS_H__ #include <stdint.h> #include <string> using namespace std; class CProducerParam { public: CProducerParam(); ~CProducerParam(); bool initial(string &strConfDir); bool get_hostip(); public: string m_strBusiSvrPath; string m_strBroker...
#include<iostream> #include<map> using namespace std; // // map查找和统计 // find(key) // count(key) void printMap(map<int,int> &m) { for(map<int,int>::iterator it = m.begin();it!=m.end();it++) { cout<<"key:"<<(*it).first<<" value:"<<it->second<<endl; } cout<<endl; } void test01() { //创建map容...
#include <iostream> using namespace std; void unique(int a[],int n){ int xorsum=0; for(int i=0;i<n;i++){ xorsum=xorsum^a[i]; } cout<<xorsum; } int main() { int a[]={1,2,3,3,1}; int n=sizeof(a)/sizeof(a[0]); unique(a,n); return 0; }
#ifndef __QUATERNION_H__ #define __QUATERNION_H__ #include "types.h" #include "vector3.h" namespace physics { class Quaternion { public: ffloat r; ffloat i; ffloat j; ffloat k; public: Quaternion() : r(0), i(0), j(0), k(0) { } Quaternion(const ffloat _r, const ffloat ...
// This file is part of Cantera. See License.txt in the top-level directory or // at https://cantera.org/license.txt for license and copyright information. #ifndef CT_EIGEN_SPARSE_H #define CT_EIGEN_SPARSE_H #include "cantera/base/config.h" #if CT_USE_SYSTEM_EIGEN #include <Eigen/Sparse> #else #include "cantera/ext/E...
#include <iostream> #include <ios> #include <fstream> int main(int argc, char **argv) { std::ios::sync_with_stdio(false); if (argc != 2) { return 0; } std::ifstream f(argv[1]); while (true) { int x; f >> x; if (f.fail()) { break; } if (x ...
#include <iostream> using namespace std; void printArr(int *arr, int arrSize){ for(int i=0; i<arrSize; ++i, arr++){ cout << *arr << '\t'; } cout << endl; } void printArrVer2(int *arr, int arrSize){ for(int i=0; i<arrSize; ++i){ cout << *(arr+i) << '\t'; } cout << endl; } int su...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "../base.h" #include "Windows.ApplicationModel.UserDataTasks.0.h" #include "Windows.Foundation.0.h" #include "Windows.System.0.h" #include "Windows.Foundation.1.h" #include "Windows.Fo...
//--------------------------------------------------------------------------- #ifndef StrategyH #define StrategyH //--------------------------------------------------------------------------- using namespace std; #include <vector> #include "..\..\Common\sitHoldem.h" #include "..\..\..\util\clTree.h" #include "HandsGr...
/* 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...
// ============================================================== // RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and OpenCL // Version: 2019.2 // Copyright (C) 1986-2019 Xilinx, Inc. All Rights Reserved. // // =========================================================== #include "checkAxis_2.h" ...
#include <iostream> using namespace std; class Complex { public: double real, imag; void Print() { cout << real << "," << imag ; } Complex(double r,double i):real(r),imag(i) { } Complex AddOne() { this->real ++; //等价于 real ++; this->Print(); //等价于 Print return * this; } }; ...
// Utilities for interacting with a spectrum shield #include "WProgram.h" #include "spectrum.h" const byte c_pinSpectrumStrobe = 4; const byte c_pinSpectrumReset = 5; const byte c_apinSpectrumLeft = 0; const byte c_apinSpectrumRight = 1; int rgSpectrum[c_cBands]; void SetupSpectrum() { // Set the ...
// This file has been generated by Py++. #ifndef Vertex_hpp__pyplusplus_wrapper #define Vertex_hpp__pyplusplus_wrapper void register_Vertex_class(); #endif//Vertex_hpp__pyplusplus_wrapper
#include<bits/stdc++.h> #include<string.h> using namespace std; void removeConsecutiveDuplicates(char *s) { if(*s == '\0') return ; if( *s == *(s+1) ) { int i; for(i = 1 ; s[i] != '\0'; ++i){ s[i-1] = s[i]; } s[i-1] = s[i]; removeConsecutiveDuplicates(s); } removeConsecutiveDuplicates(s+1); } int ...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.UI.Xaml.Interop.2.h" WINRT_EXPORT namespace winrt { namespace Windows::UI::Xaml::Interop { template <typename H> struct impl_BindableVectorChangedEventHandler : implements<...
#include "DupRemove.h" void dupRemove(LinkedList list) { list.dupRemove(); cout << "Hi!" << "\n"; list.data(); } void DupRemove::run() { LinkedList list; list.data(); //cout << "Type in a key and I, the almighty Levi will remove it from the linked list.\n"; //getline(cin, input); string input; do { cout...
#include "tracker.h" #include "nn_matching.h" #include "linear_assignment.h" using namespace std; //#define MY_inner_DEBUG #ifdef MY_inner_DEBUG #include <string> #include <iostream> #endif tracker::tracker(/*NearNeighborDisMetric *metric,*/ float max_cosine_distance, int nn_budget, float max_iou_distance, int max_a...
#include <ivex/Extraction.hpp> #include <catch2/catch.hpp> using namespace ivex; TEST_CASE("Extraction") { // Empty }
class ISplitter { public: virtual void split()=0; virtual ~ISplitter(){} }; class BinarySplitter:public ISplitter { }; class TxtSplitter:public ISplitter { }; class PictureSplitter:public ISplitter { }; class VideoSplitter:public ISplitter { };
#include "MaximumProductSubarray.hpp" using namespace std; int MaximumProductSubarray::maxProduct(vector<int> &nums) { int n = nums.size(); if (n == 0) return 0; vector<int> a(n, 0); vector<int> b(n, 0); a[0] = b[0] = nums[0]; for (int i = 1; i < n; i++) { int v1 = nums[i]; ...
#include "edge.hpp" #include "node.hpp" #include "graphwidget.hpp" #include <QtGui/QGraphicsScene> #include <QtGui/QGraphicsSceneMouseEvent> #include <QtGui/QPainter> #include <QtGui/QStyleOption> Node::Node(GraphWidget *graphWidget, qreal radius) : m_graphWidget(graphWidget) , m_radius(radius) { setFlag(Ite...
#include <iostream> using namespace std; int i = 0; int fun(int n) { static int k=2; k++ return (++k)*(n++); } int main() { int k=5; { int i = 2; k+=fun(i); } k+=fun(i); cout<<k<<endl; return 0; }
#pragma once #include <QOpenGLWidget> #include <QVector3D> #include <QPushButton> #include <QRadioButton> #include "polygon3p.h" class MyGLWidget : public QOpenGLWidget { Q_OBJECT QPushButton *makeNew = nullptr; QRadioButton *onlyVisible = nullptr; QVector<polygon3p> endPolygons{}; QVector<polyg...
#include "PosicionUsuario.hpp" PosicionUsuario::PosicionUsuario(double* lat,double* lon ,int* id ) {//Contructor lat es latitud lon longitud id es idusuario latitud = *lat; longitud = *lon; usuario_id = *id; } PosicionUsuario::PosicionUsuario(std::string* rpl){ Json::Reader readerJson; Json::Value...
#include<stdio.h> #include<stdlib.h> /* 13130110075_Í▄Ë╬practice1 2ú« Implement priority queue. */ typedef struct Node{ int key; int value; struct Node* next; }; int showQueue(Node*); Node* insert(Node*,Node*); Node* maximum(Node*); Node* extract_max(Node**); Node* increase_key(Node*,Node*,int); Node* getNode(No...
#include<bits/stdc++.h> using namespace std; #define ll long long double area, r; int main() { ll m, n,i ,j, p; cin>>n>>m; vector<pair<double, ll>>v; for(i=0;i<n;i++) { double x, y; cin>>x>>y>>p; v.push_back({ sqrt(x*x+y*y) , p}); } sort(v.begin(), v.end()); ...
#pragma once #include<iostream> #include<windows.h> #include<map> #include<functional> #include<string> #include<sstream> #include<memory> class WindowManager; class Window; class winApp; enum fullScreen { WINDOW, FULLSCREEN }; class WindowManager { public: static Window & Instance(); static Window * pointer(); ...
#include "drake/examples/allegro_hand/allegro_common.h" namespace drake { namespace examples { namespace allegro_hand { const double AllegroHandMotionState::velocity_thresh_ = 0.07; void SetPositionControlledGains(Eigen::VectorXd* Kp, Eigen::VectorXd* Ki, Eigen::VectorXd* Kd) { *Kp ...
#include<bits/stdc++.h> #include<stdio.h> using namespace std; #define ll long long int main() { ll m,n,t,b,c,d,i,j,k,x,y,z,l,q,r; cin>>n; for(i=0; i<n; i++) { cin>>k>>x; cout<<(x+9*(k-1) )<<endl; } return 0; }
#include "stdafx.h" #include "Casa.h" void Casa::actualizarMatrizModelo() { modelo = mat4(1.0f); modelo = translate(modelo, coordenadas); modelo = rotate(modelo, -1.5708f, vec3(0.0f, -0.10f, 0.0f)); modelo = scale(modelo, vec3(10.0f, 6.0f, 6.0f)); } vec3 Casa::getCoordenadas() { return coordenadas; } Casa::Casa...
#include <bits/stdc++.h> using namespace std; int main(){ int t; scanf("%d",&t); while (t--){ int n; scanf("%d",&n); int a[n]; for (int i=0;i<n;i++){ scanf("%d",&a[i]); } long long int sum = 0; int c =1; for (int i=0;i<n;i++){ sum+=((c-n)*a[i]); c+=2; } cout << sum << endl; } return 0...
#include "patch_secret_arg.hpp" #include <landstalker-lib/model/world.hpp> #include <landstalker-lib/model/map.hpp> #include <landstalker-lib/model/entity.hpp> #include <landstalker-lib/model/item.hpp> #include <landstalker-lib/tools/game_text.hpp> #include <landstalker-lib/constants/entity_type_codes.hpp> #include <l...
#ifndef SERVERWORKER_H #define SERVERWORKER_H #pragma once // #include "server_worker_base.h" #include <rpos/robot_platforms/slamware_core_platform.h> #include <sensor_msgs/LaserScan.h> #include <std_srvs/Empty.h> #include <std_msgs/Float64.h> #include <nav_msgs/GetMap.h> #include <nav_msgs/Path.h> #include <geometr...
#include <iostream> #include <string> #include <map> using namespace std; int main() { int t; int odd = 0; int *n; int index = 0; int flag = 0; int lastIndex = -1; string s; map<char, int> word; map<char, int>::iterator p; cin >> t; for(int i = 0; i < t ; i++) { odd = 0; cin >> s; ...
/** * REXUS PIOneERS - Pi_1 * pipes.h * Purpose: Class definition for implementation of pipes class for data * communication between processes * * @author David Amison * @version 1.0 10/10/2017 */ #ifndef PIPES_H #define PIPES_H #include <string> #include <cstring> #include <stdint.h> #include <error.h> //...
#include <irtkImage.h> #include <abcdPointDistanceMap.h> char *input_name = NULL, *output_name = NULL; char *pointFileName = NULL; void usage() { cerr << "Usage: mask_point_distance_map [in] [out] <options>\n"; cerr << "Where <options> are one or more of the following:\n"; cerr << "\t -pointsFile file VTK fo...
/* 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 <fstream> #include <string> #include <map> #include <algorithm> #include "checker.h" #include "exception.h" #include "pseudoformatter.h" void Checker::check_if_declaration_block_is_over() { if( env.section.top() != S_CODE && ( env.declaration_depth.size() == 0 || env.declar...
#pragma once #include <QString> #include "FunctionTreeNodeWithOperand.h" #include "FunctionTreeNodeWithOperation.h" class Function { private: QString functionString; FunctionTreeNode* functionTreeRoot; void plotTreeFromFunctionString(); bool isElementLeftBracketSymbol(QChar element); bool isEl...
#include "Task.h" #include "../pathfinding/pathfinder.h" #include "../config/Config.h" using namespace Task; EntityManager* Action::entityManager = NULL; LevelManager* Action::levelManager = NULL; void Action::preRun() { if (entityName != "") entity = &entityManager->getEntity(entityName); if (targetName != "") ...
#include <stdio.h> #include <stdlib.h> typedef struct { int num; double fact; }numbers_t; int is_prime(int num, int i)//i is a divisor { if (i == 1) { return 1; } else if (num%i==0) { return 0; } else { is_prime(num, i + 1); } } double fact(int num) { if (num == 1) { return 1; } else { return...
/* 1953. 탈주범 검거 다시풀기 */ #include <iostream> #include <vector> #include <queue> using namespace std; typedef pair<int, int> pii; typedef long long ll; int T, N, M, R, C, L, board[50][50], cnt = 0; bool visited[50][50]; bool dir[4]; int dr[4] = {-1,0,1,0}; int dc[4] = {0,1,0,-1}; bool movable(int dir, int t) { i...
// Copyright (c) 2019, Alliance for Sustainable Energy, LLC // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this...
#pragma once #include <iostream> #include <string> using namespace std; class Node { public: // 생성자 Node(string w = "", string m = "", Node* l = nullptr, Node* r = nullptr) : word(w), mean(m), left(l), right(r) { } // 단어설정 : 단어, 뜻을 입력 bool setKeyword(string w, string m) { word = w; mean = m; }; // 단어 반환 string g...
#include <iostream> #include <fstream> #include <algorithm> #include <vector> void printVec(std::vector<std::string> vec){ for (size_t i = 0; i < vec.size(); i++){ std::cout << vec[i] << std::endl; } } int main(int argc, char ** argv){ std::vector<std::string> vec; std::string str; std::if...
// This file has been generated by Py++. #include "boost/python.hpp" #include "generators/include/python_CEGUI.h" #include "MCLGridRef.pypp.hpp" namespace bp = boost::python; void register_MCLGridRef_class(){ { //::CEGUI::MCLGridRef typedef bp::class_< CEGUI::MCLGridRef > MCLGridRef_exposer_t; M...
#ifndef FU_GEN_PIPELINE_EDGE_H #define FU_GEN_PIPELINE_EDGE_H class IPipelineEdgeListener { public: virtual void OnClicked() = 0; virtual void OnEndpointDeleted() = 0; virtual void OnDeleted() = 0; // IPipelineEdgeListener() {} virtual ~IPipelineEdgeListener() {} }; class FuGenPipelineEdge; class IPipelineEd...
/// @file Logging.h /// /// Wrapper for log4cxx /// /// @copyright (c) 2012 CSIRO /// Australia Telescope National Facility (ATNF) /// Commonwealth Scientific and Industrial Research Organisation (CSIRO) /// PO Box 76, Epping NSW 1710, Australia /// atnf-enquiries@csiro.au /// /// This file is part of the ASKAP softwar...
//------------------------------------------------------------------------------ // OrbitState //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool. // // Copyright (c) 2002 - 2015 United States Government as represented by the...
#include <vector> #include <string> #include <algorithm> using namespace std; int solution(int n, vector<vector<int>> board) { int answer = 0; /*숫자 1부터 n*n의 숫자까지의 좌표값을 담아줄 배열 arr을 만들어 준다. arr[0][0]과 arr[0][1]은 처음 시작점을 나타내주기 위해 0,0 으로 설정한다*/ int arr[n*n+1][2]; arr[0][0] = 0; arr[0][1] = 0;...
#include "parser.h" #include "ast.h" #include "ast_format.h" #include "token.h" #include <optional> #include <variant> #include <spdlog/spdlog.h> namespace wcc { static void syntax_error(const char* got_before, const char* expected, const char* got_after, size_t line, ...
#include <iostream> using namespace std; void mergesort(int*, int, int, int(*)(int, int)); // 합병 정렬 함수 int compare(int, int); // 합병 정렬의 비교 콜백으로 사용할 함수 int main(void) { int arr[] = { 4, 7, 2, 1, 9, 5, 10, 8, 6, 3 }; // 무작위 배열 정의 int i, size = sizeof(arr) / sizeof(int); mergesort(arr, 0, size - ...
#ifndef ROSE_AsmFunctionIndex_H #define ROSE_AsmFunctionIndex_H #include <algorithm> #include <ostream> #include <vector> #include "callbacks.h" /** Functions indexed by entry address. * * This class is designed to be a highly-configurable way to print a table describing known functions. The way it works is * ...
// SPDX-License-Identifier: Apache-2.0 // Copyright (C) 2021 YADRO #pragma once #include "variable.hpp" /** * @brief Parsers of the non-volatile partition on BIOS flash. */ namespace nvram { /** * @brief Parse dump of firmware volume with NV variables. * * @param[in] file Path to the file to parse * * @retur...
//--------------------------------------------------------------------------- #ifndef Unit7H #define Unit7H //--------------------------------------------------------------------------- #include <Classes.hpp> #include <Controls.hpp> #include <StdCtrls.hpp> #include <Forms.hpp> #include <ExtCtrls.hpp> #include <jpeg.hpp...
// MFCSingleToolBarView.cpp : implementation of the CMFCSingleToolBarView class // #include "stdafx.h" // SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail // and search filter handlers and allows sharing of document code with that project. #ifndef SHARED_HANDLERS #include "MFCSingleToo...
#include <iostream> #include <fstream> using namespace std; ifstream f("date.in"); struct Node { double x; double y; bool convex; bool principal; Node(double a = 0, double b = 0): x(a), y(b), convex(true), principal(true) {}; }; struct Edge { Node A; Node B; }; bool peSegment(Node A, No...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "../base.h" #include "Windows.Devices.Spi.Provider.0.h" #include "Windows.Foundation.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Devices::Spi::Provider { struct __de...