text
stringlengths
8
6.88M
//Created by: Mark Marsala, Marshall Farris, Ethan Thai, and Johnathon Franco Sosa //Date: 5/4/2021 //Header file for csv.cpp #ifndef CSV_H #define CSV_H #include "analyzeWav.h" /** * Class that takes the file inputted and analyzes it */ class Csv { std::string inFile; AnalyzeWav* object; public: /** * Prints o...
// Copyright (c) 2007-2021 Hartmut Kaiser // // 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) #pragma once #include <pika/config.hpp> #include <pika/errors/try_catch_exceptio...
#ifndef CONSOLE_H_INCLUDED #define CONSOLE_H_INCLUDED #include "Window.h" #include "MathLib.h" #include "String.h" #include "Log.h" #include "TextBox.h" #include "TextImputBox.h" #include "CommandParser.h" class Console : public WindowCore{ public: Log pastCommands; Log commandLog; TextBox textBox; ...
#ifndef ROOTCHOICE_H #define ROOTCHOICE_H #include <QDialog> #include <QtWidgets> #include "LearnWindow.h" namespace Ui { class RootChoice; } class RootChoice : public QDialog { Q_OBJECT public: explicit RootChoice(QWidget *parent = 0); ~RootChoice(); public slots: void DataEditPress(); void...
#include "Menu.h" #include <QFileDialog> MMenu::MMenu(WindowInfo *win) : winInfo(win) { CreateAction(); CreateMenu(); } MMenu::~MMenu() { } void MMenu::CreateAction() { //创建打开文件动作 fileOpenAction = new QAction(QIcon::fromTheme("打开文件", QIcon(":/menu/Resources/Open.png")), QStringLiteral("&打开文件..."), w...
#include <QMessageBox> #include "newuser.h" #include "usertype.h" #include "ui_newuser.h" #include "logintype.h" newuser::newuser(QWidget *parent) : QDialog(parent), ui(new Ui::newuser) { ui->setupUi(this); } newuser::~newuser() { delete ui; } //void newuser::on_buttonBox_rejected()...
#include "GroupsResultsModel.h" #include "GroupsResultsColumnIndex.h" #include "NamedValues/NamedValues.h" // :: Type definitions :: using Node = Tree::Node<NamedValues>; using NodePtr = Tree::NodePtr<NamedValues>; using NodePtrs = Tree::NodePtrs<NamedValues>; // :: Constants :: const QString NAME_HORIZONTAL_HEA...
#include <iostream> #include <stack> using namespace std; int s[10][10]; struct { int x; int y; } v[81]; int num,ok; int isok(int i,int n) { for(int j=1; j<10; j++) { if(s[v[n].x][j]==i || s[j][v[n].y]==i) return 0; } int x = (v[n].x%3==0)?v[n].x/3*3-2:v[n].x/3*3+1; int...
#include <bits/stdc++.h> #include "Treap.h" #include "BST.h" #include "AVL.h" using namespace std; int main() { srand(time(0)); int number_of_test_files = 5; for (int i = 0; i < number_of_test_files; i++) { string file_name = "test_case_"; file_name += ('0' + i); file_name += ".txt"; freopen...
#pragma once #include "BaseService/BaseService.h" class User; class UsersService : public BaseService { Q_OBJECT public: UsersService(QObject *parent = nullptr); public: void getUsers() const; void removeUser(int userId) const; signals: void usersGot(const QList<User> &users); void userRemoved...
//$$---- Thread HDR ---- //--------------------------------------------------------------------------- #ifndef RecordThrdH #define RecordThrdH //--------------------------------------------------------------------------- #include <Classes.hpp> #include <time.h> #include "MainForm.h" //----------------------...
// KC Text Adventure Framework - (c) Rachel J. Morris, 2012 - 2013. zlib license. Moosader.com #ifndef _MISSIONWRAPPER #define _MISSIONWRAPPER #include <string> #include <vector> #include "BaseLuaWrapper.h" class MissionWrapper : public BaseLuaWrapper { public: void Init(lua_State* state); std::string ...
#include "x_test_pch.h" #include "x_test.h" #include "x/x_platformfactory.h" #include "x/x_graphicsfactory.h" TestApp::TestApp() { } TestApp::~TestApp() { } void TestApp::setGraphics(x::x_Graphics* pGraphics) { x::x_App::setGraphics(pGraphics); } void TestApp::setPlatform(x::x_Platform* pPlatform) { x::x_App::s...
/** * created: 2013-4-9 17:15 * filename: FKGameGatewayClientSession * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #pragma once //------------------------------------------------------------------------ #include "../FKSvr3Common...
#include <stdlib.h> // For seeding random and rand() #include <time.h> // For grabbing time (to seed random) #include "Game.h" #include "Vertex.h" #include "Input.h" #include "imgui.h" #include "imgui_impl_dx11.h" #include "imgui_impl_win32.h" #include "WICTextureLoader.h" // Needed for a helper functio...
#include <bits/stdc++.h> using namespace std; #define llint long long #define pb push_back int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); llint v, e; cin >> v >> e; llint t = 1; while (v != 0 || e != 0) { llint arr[v+1]; for (int i = 1; i <= v; i++) cin >> arr[i]; llint sum = 0; fo...
// Created on: 2015-07-10 // Created by: Irina KRYLOVA // 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 publ...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rep1(i, n) for(int i = 1; i <= (int)(n); i++) #define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;} #define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;} typedef long l...
/* * File: main.cpp * Author: Elijah De Vera * Created on January 14, 2021, 12:36 PM * Purpose: Compatible signs */ //System Libraries #include <iostream> //Input/Output Library using namespace std; //User Libraries //Global Constants, no Global Variables are allowed //Math/Physics/Conversion...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <vector> #include <algorithm> #define pb push_back using namespace std; int s[111][111]; int d[111][111]; int printed; vector <int> path; void input() { s[1][2] = 1; s[1][...
/* * Copyright (c) 2014-2017 Detlef Vollmann, vollmann engineering gmbh * * 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) */ #ifndef TEST_CLASSES_HH_SEEN_ #define TEST_CLASSES_HH_SEEN_ #include "trompeloeil.h...
// Generated by gencpp from file seagull_autopilot_msgs/AutopilotCommand.msg // DO NOT EDIT! #ifndef SEAGULL_AUTOPILOT_MSGS_MESSAGE_AUTOPILOTCOMMAND_H #define SEAGULL_AUTOPILOT_MSGS_MESSAGE_AUTOPILOTCOMMAND_H #include <string> #include <vector> #include <map> #include <ros/types.h> #include <ros/serialization.h> #...
#include "aeGraphicsAPI.h" #include "aePrerequisitesGraphics.h" #include <aeImage.h> #include <aeMath.h> namespace aeEngineSDK { aeGraphicsAPI::aeGraphicsAPI() { m_pDepthStencil = nullptr; m_pRenderTarget = nullptr; m_pData = nullptr; } aeGraphicsAPI::aeGraphicsAPI(const aeGraphicsAPI & Reference) { *thi...
#include "limit.h" Limit::Limit( Order * order, Book * book ) { price = order->price; volume = order->size; parent=NULL; left=NULL; right=NULL; head=order; tail=order; order->parentLimit = this; this->book = book; } Limit * Limit::Remove(){ assert(volume==0); Limit * x = ...
#include "task.h" #include <QHttpMultiPart> #include <QHttpPart> #include <QFile> #include <QFileInfo> #include <QTextStream> #include <stdexcept> Task::Task(const QString& access_token, const std::vector<std::pair<QString, QString>>& groups, const QString& message, int interval, ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-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 SPEED_DIAL_CONFIG_CONTROLLER_H #define SPEED_DIAL_CONFIG_...
#include <cstdint> #include <odb/server/vm-api.hh> #pragma once namespace mvm0 { class CPU; class VMApi : public odb::VMApi { public: VMApi(CPU &cpu); odb::VMInfos get_vm_infos() override; odb::VMApi::UpdateInfos get_update_infos() override; void get_reg(odb::vm_reg_t idx, odb::RegInfos &infos, bool val_...
#include "cpptest.h" CPPTEST_CONTEXT("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/src/Thread.cpp"); CPPTEST_TEST_SUITE_INCLUDED_TO("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/src/Thread.cpp"); class TestSuite_getCurrentState : public CppTest_TestSuite { public: ...
#include <bits/stdc++.h> using namespace std; const int lim = int(1e5 + 1); typedef pair<int, int> P; //個数、数字 vector<P> odd(lim), eve(lim); int main(){ int n; cin >> n; for(int i=0; i<n; i++){ int num; cin >> num; if(i%2 == 0){ eve[num].first++; ...
#ifndef __RED_BLACK_TREE_H__ #define __RED_BLACK_TREE_H__ #ifndef NULL #define __NULL_IS_DEFINED__ #define NULL (nd*)0 #endif//NULL /* Header File Info 작성 시작 : 2017 - 04 - 08 오후 8시 53분 작성자 : Stoads */ /* RED-BLACK TREE의 성질 1. 모든 노드는 검은색 혹은 빨간색을 갖는다 2. 루트는 항상 검은색이다 3. 모든 NULL LEAF는 검은색이다 4. 어떤 노드 n이 빨간색이면, n의 두 자식...
#include "DualVNH5019MotorShield.h" DualVNH5019MotorShield md; const int buttonPin = 3; const int OpenTimeMS = 4000; const int CloseTimeMS = 7000; const int maxCloseCurrentMA = 5000; const int maxOpenCurrentMA = 5000; int buttonState = 0; int initButtonState = 0; void stopIfFault() { if (md.getM1F...
#include <gtest/gtest.h> #include "../src/enclave/MultiMap.h" #include "../src/enclave/logging.h" #include "../src/enclave/Index.h" #include "../src/server/Disk.h" #include "../src/enclave/version_number.h" #include "credb/event_id.h" namespace credb { class PrimitivesTest : public testing::Test { }; TEST(Primiti...
#include <iostream> #include <iomanip> using namespace std; int main (){ int temp_gasto, velocidade; double km ; cin >> temp_gasto; cin >> velocidade; km = velocidade * temp_gasto; cout << fixed << setprecision(3) << km/12 << endl; return 0; }
#include "pch.h" #include "Animation.h" #include "..\System\AnimationSystem.h" #include "Core\ComponentFactory.h" #include "Core\FileArchive.h" #include "Animation\AnimationManager.h" #include "Renderer\DebugRenderer.h" #include "Core\Entity.h" #include "Core\TimeManager.h" #include "Renderer\DevTextRenderer.h" #inclu...
#include "f3lib/io/WldReader.h" #include "f3lib/utils/BinaryFileReader.h" #include <cassert> using namespace f3::types; f3::World* f3::io::readWld(const std::string& filename) { std::ifstream fh; fh.open(filename, std::ifstream::in); if (!fh.is_open()) { return nullptr; } f...
#include<iostream> using namespace std; int main() { int N,temp; bool start; cin>>N; while(true) { start=false; for(int i=0;i<N;i++) {cin>>temp;if(temp){if(start)cout<<" ";cout<<temp;start=true;}} if(!start)cout<<"0"; cout<<endl; cin>>N; if(!N)break; } }
#ifndef CAFFE_UTIL_PRUNE_H_ #define CAFFE_UTIL_PRUNE_H_ #include <boost/filesystem.hpp> #include <iomanip> #include <iostream> // NOLINT(readability/streams) #include <string> #include "caffe/common.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/util/format.hpp" #incl...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
/* * Computational Geometry library based on Coach Mohamed Mahmoud Abdel-Wahab's * library (fegla on Topcoder) */ #include <iostream> #include <cstdio> #include <cstdlib> #include <complex> #include <vector> #include <algorithm> #include <stack> using namespace std; typedef complex<double> point; #define sz(a) ((...
// // nehe36.cpp // NeheGL // // Created by Andong Li on 10/19/13. // Copyright (c) 2013 Andong Li. All rights reserved. // #include "nehe36.h" const char* NEHE36::TITLE = "NEHE36"; GLfloat NEHE36::sleepTime = 0.0f; int NEHE36::frameCounter = 0; int NEHE36::currentTime = 0; int NEHE36::lastTime = 0; char NEHE36:...
#ifndef MAINCOMPONENT_H_INCLUDED #define MAINCOMPONENT_H_INCLUDED #include "../JuceLibraryCode/JuceHeader.h" #include "AcidHeader.h" using namespace AcidR; class MainContentComponent : public Component, //main superclass for displaying stuff in main window public File...
#include "Germany.hpp" /***************************************************************** * default constructor * The default constructor initializes the name to the country and the * checkpoint variables to false. ******************************************************************/ Germany::Germany() { name = "...
#include <StandardCplusplus.h> #include <functional-vlpp.h> #include <functional-bot.h> #include "build.gamefabricator.h" void serializeFreeMemory(const char *description); uint16_t freeMemory(); static EventLoop eventloop; static void buildMachine(GameFabricator &fabricator) { fabricator.build4ButtonPanel();...
/**************************************************************************** ** Meta object code from reading C++ file 'process.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.13.2) ** ** WARNING! All changes made in this file will be lost! ******************************************************...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include "heapfileLib.h" RecordIterator::RecordIterator(Heapfile *heapfile) { // initialize offsets to starting page dirEntryPtr = sizeof(DirEntry); recordPtr = 0; maxDirEntries = heapfile->page_size / sizeof(DirEntry); currPageSlot = 0; currPageMaxSlo...
#include <iostream> #include <string> using namespace std; int main(){ string ad, soyad, il; cout << "gerekli bilgileri veriniz:"; cin >> ad; cin >> soyad; cin >> il; cout << "\n"; string Bilgiler[3] = {ad , soyad , il}; for(int i=0; i<3;i++){ cout << Bilgiler[i] << endl; ...
#include"alpha/alpha.hpp" int main(int argc, char **argv) { auto ALPHA_ROOT = std::getenv("ALPHA_ROOT"); if (!ALPHA_ROOT) std::cout << "# environment variable ALPHA_ROOT is not registered"; else { std::ifstream ifs(std::string(ALPHA_ROOT) + "/scripts/main.a"); if (!ifs.is_open()) std::cout ...
#include "mainwindow.h" #include "ui_mainwindow.h" #include "QtSerialPort/QtSerialPort" #include "QList" #include "QTimer" //таймаут ком-потра 1 секунда #define COM_TIMEOUT 500 //частота дискретизации, кГц #define Fs 100000 //кол-во отсчетов #define SAMPLES 256 #define V_REF 3.3 QSerialPort *seria...
// // Created by Vasili Siachko on 15.12.2019. // #include <iostream> #include "Cube.h" Cube::~Cube() { } double Cube::GetLength() { return length; }
/* -*- 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. */ #ifndef OP_DROP_DOWN_H #define OP_DROP_DOWN_H #define DROPDOWN_...
#pragma once #include "GameNode.h" // 선택창을 만드는데 필요한 헤더 #include <commdlg.h> #include "TileMap.h" //// 메인 화면 640 * 640 //#define TILESIZE 32 //#define TILEX 20 //#define TILEY 20 // //#define TILESIZEX TILEX * TILESIZE //#define TILESIZEY TILEY * TILESIZE // //// 지형 속성 //// 밟을 때 사운드 나게 하거나, //// 이동할 수 없는 지역, //// 타...
#ifndef PLOTOBJECT_H #define PLOTOBJECT_H #include <utility> #include <string> #include <sstream> #include <vector> #include <armadillo> namespace Matlab { typedef std::vector<double> Vec; enum Color { blue, green, red, cyan, magenta, yellow, black, white, ...
#pragma once #include "OPENGL_Include.h" #include <vector> using namespace std; void CreateVertexBuffer(vector<float>& data,GLuint& vbo); void CreateVertexBuffer(vector<int>& data, GLuint& vbo); void CreateIndexBuffer(vector<unsigned int>& data, GLuint& vbo); void AttachVBOtoVAO_float(GLuint vbo, GLuint vao,int in...
// Fill out your copyright notice in the Description page of Project Settings. #include "Point.h" #include "Shape.h" #include "NewPointsGetter.h" void Point::Split(const FVector& P0, const FVector& n, NewPointsGetter& newPoints, UShape& shapeAbove, UShape& shapeBelow, int& numInside) { m_LinkedPoint1 = nullptr; m_L...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef OPML_IMPORTER_H #define OPML_IMPORTER_H #include "adjunct/m2/src/...
#include <iostream> using namespace std; int* mergesort(int P[],int l,int r) { int *C; if(r==l+1) { C=new int[1]; C[0]=P[l]; return C; } int* A,*B; int a=0,b=0,c=0,asize,bsize; A=mergesort(P,l,(l+r)/2); B=mergesort(P,(l+r)/2,r); asize=(l+r)/2-l; bsize=r-(l+r)/2; C=new int[r-l]; while(a<asize&&b<bsize...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2005 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ /** \file * \brief Declare the global opera object for the memor...
// // Created by hamon_e on 10/15/17. // #pragma once #include <string> namespace WinTools { bool addToStartUp(std::string const &name, std::string const &args); }
// Copyright (c) 2020 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 ...
/***************************************************************************** * * FlatDBSettings.cpp * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...
#include<iostream> using namespace std; int linear_search(int arr[],int n,int key) { int comparisons=0; for(int i=0;i<n;i++) { comparisons++; if(arr[i]==key){ cout<<"Present "; return comparisons; } } cout<<"Not present "; return comparisons; } i...
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef long long L...
/**************************************************************************** * directory.cpp * 1. contains the implementation of the Directory class functions ****************************************************************************/ #include "directory.hpp" /**************************** Public Functions *****...
#pragma once #include "plbase/PluginBase.h" #include "CVector.h" #include "CRGBA.h" #include "CVector2D.h" #include "CSprite2d.h" // Thanks to Wesser for radar-related things enum eBlipAppearance : char { BLIP_FLAG_FRIEND, // It selects BLIP_COLOUR_BLUE. If unset toghether with BLIP_FLAG_THREAT, any color. BLIP_FLA...
// Created on: 1992-11-05 // Created by: Remi LEQUETTE // Copyright (c) 1992-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 it under // the terms of the GNU ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2011-12 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifndef UNIX_OPPLUGINIMAGE_H_ #define UNIX_OPPLUGINIMAGE_H_ #incl...
#ifndef CSOFTUPDATEWIDGET_H #define CSOFTUPDATEWIDGET_H #include <QWidget> #include "common.h" class CTableWidget; class CSoftUpdateWidget : public QWidget { Q_OBJECT public: CSoftUpdateWidget(QWidget *parent = 0); ~CSoftUpdateWidget(); Q_SIGNALS: void upgradeNotify(SMonitor::Type type = SMonitor::Upgrade); v...
#include <iostream> #include "head.h" int main() { String s1 = "hello"; if (!strcmp(s1.text(), "hello")) { printf("hi"); } getchar(); return 0; }
#ifndef __JOYSTICK__ #define __JOYSTICK__ #include "cocos2d.h" USING_NS_CC; enum JoystickEnum { DEFAULT, D_UP, D_DOWN, D_LEFT, D_RIGHT, D_LEFT_UP, D_LEFT_DOWN, D_RIGHT_UP, D_RIGHT_DOWN }; class Joystick : public Layer { public: /** 啟動搖杆器 */ void Run(); /** 清除數據 */ ...
#pragma once #include <glm/gtc/matrix_transform.hpp> #include <glm/gtx/transform.hpp> class AAWorld { public: AAWorld(); ~AAWorld(); static glm::vec3 getForwardVector(); static glm::vec3 getUpVector(); private: static glm::vec3 up; static glm::vec3 forward; };
/*********************************************************************** class:NoiseMesh Desc: encapsule a Mesh class that can be ***********************************************************************/ #include "Noise3D.h" using namespace Noise3D; IMesh::IMesh(): mRotationX_Pitch(0.0f), mRotationY...
// Programmable-Air // Author: tinkrmind // https://github.com/orgs/Programmable-Air // http://opensoftmachines.com/ // // Cycles through pressure // Demo video: https://vimeo.com/291361549 // // PCB v0.3/v0.4/v0.5 #include "programmable_air.h" #define DEBUG 1 int state = UN_KNOWN; int atmospheric_pressure = 508; i...
/** * @file mmul_v2.cc * @author Gerbrand De Laender * @date 11/03/2021 * @version 1.0 * * @brief E091103, Master thesis, HLS testing * * @section DESCRIPTION * * Matrix multiplication with combined streaming of matrix A and B. * */ #include <hls_stream.h> #include <ap_axi_sdata.h> #includ...
#ifndef PERSONAGEM_H #define PERSONAGEM_H #include <iostream> #include <string.h> using namespace std; using std::string; using std::ostream; class Personagem { friend ostream &operator<<(ostream &, const Personagem &); public: Personagem(); ~Personagem(); void diminuirSp(); int ge...
#include<vector> #include"matrix01.h" int main() { std::vector<std::vector<int>> v1 = { {11, 12, 13, 14}, {21, 22, 23, 24}, {31, 32, 33, 34} }; std::vector<std::vector<int>> v2; v2.resize(4, std::vector<int>(3, 1.)); szeMatrix::Matrix<int> m1(v1); szeMatrix::Matrix<int> m2(v2); szeMatri...
// // File: WLTrieNode.h // // Description: A TrieNode implementation // Student Name: Joe Klimm // UW Campus ID: 9044659226 // email: jwklimm@wisc.edu #include "Util.h" #include <vector> #ifndef WL_WLTRIENODE_H #define WL_WLTRIENODE_H /*! \brief WLTrieNode - an implementation of a Trie Node data structure * ...
#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()...
//算法:DP,多重背包 /* 多重背包 未优化版30,优化版100 详见注释 */ #include<cstdio> #include<cctype> #include<algorithm> using namespace std; const int MARX = 1e5+10; //============================================================= int n,m,num; int v[MARX],w[MARX],s[MARX];//单个价值,质量,总数量 int v1[MARX],w1[MARX];//拆分后价值,质量 int f[...
#include <iostream> #ifndef POSITION_H #define POSITION_H class Position { public: int idx; int ln; int col; std::string fn; std::string ftxt; Position(int idx, int ln, int col, std::string fn, std::string ftx) : idx(idx), ln(ln), col(col), fn(fn), ftxt(ftx) {}; Position advance(char curr_cha...
#include "pch.h" #include "IBehavior.h" #include "Core/BehaviorFactory.h" namespace Hourglass { IBehavior* IBehavior::Create( StrID name ) { return BehaviorFactory::GetFreeBehavior( name ); } IBehavior * IBehavior::AssembleRoot( StrID name ) { return BehaviorFactory::GetAssembledRoot( name ); } }
#ifndef TOPICDETECTER_H #define TOPICDETECTER_H #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #ifdef __CINT__ #pragma link C++ class vector<vector<int> >; #endif #include <map> //#include "TFile.h" //#include "TTree.h" #include "math.h" using namespace std; cl...
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/NewCouponMerchantStep3Page.g.uno. // WARNING: Changes might be lost if you edit this file directly. #include <_root.app18_bundle.h> #include <_root.app18_List_Items_Property.h> #include <_root.app18_List_Selected_Property.h> #include <_root.app1...
#include <iostream> #include <ANN.h> using namespace std; using namespace ANN; int main() { cout << "hello ANN!" << endl; cout << GetTestString().c_str() << endl; return 0; }
#include "ScrollView.h" #include "ScrollViewScene.h" #include"beforezoo.h" float ScrollView::WINDOW_WIDTH = 480; float ScrollView::WINDOW_HEIGHT = 320; float ScrollView::LOC_HEIGHT = 400; void ScrollView::setWindow(float w, float h, float l) { WINDOW_WIDTH = w; WINDOW_HEIGHT = h; LOC_HEIGHT = l; } Sc...
/* * 题目:690. 员工的重要性 * 链接:https://leetcode-cn.com/problems/employee-importance/ * 知识点:bfs, dfs */ /* // Definition for Employee. class Employee { public: int id; int importance; vector<int> subordinates; }; */ class Solution { private: int bfs(vector<Employee*> &employees, unordered_map<int, int> &...
#include "bricks/threading/semaphore.h" #include "bricks/threading/mutex.h" #include "bricks/threading/timedtry_internal.h" #if BRICKS_ENV_MINGW #include <pthread.h> #endif #include <semaphore.h> #define BRICKS_SEMAPHORE CastToRaw<sem_t>(semaphoreHandle) namespace Bricks { namespace Threading { Semaphore::Semaphor...
// Created on: 1993-07-08 // Created by: Jean Yves LEBEY // 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 it under // the terms of the GN...
// // BoatCList.hpp // GAME2 // // Created by ruby on 2017. 11. 11.. // Copyright © 2017년 ruby. All rights reserved. // #ifndef BoatCList_hpp #define BoatCList_hpp #include <iostream> using namespace std; class BoatC; class BoatCList{ BoatC * head; int size; public: // constructor BoatCList() { ...
//Date: 5/14/13 #include "ShaderManager.h" ShaderManager* ShaderManager::m_instance = NULL; map<string, Shader*> ShaderManager::m_shaders; ShaderManager::ShaderManager() { m_instance = this; } ShaderManager::~ShaderManager() { if(!m_shaders.empty()) { map<string, Shader*>::iterator it = m_shaders.begin(); fo...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 2009 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. * * @file MessageConsoleDialog.h * * This file contains the class is t...
// Copyright (c) 2012-2017 The Cryptonote developers // 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. #include "crypto/crypto.cpp" #include "crypto-tests.h" bool che...
/* -*- 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. */ #ifndef DOM_EXTENSIONS_SPEEDDIALCONTEXT_H #define DOM_EXTENSIONS_SP...
#include "metadata.h" namespace MC { namespace Protocol { namespace Msg { Metadata::Metadata() { //_pf_packetId = static_cast<int8_t>(); _pf_initialized = false; } Metadata::Metadata(int8_t _item) : _pf_item(_item) { //_pf_packetId = static_cast<int8_t>(); _pf_initialized = true; } size_t Metadata::serialize(...
// you can use includes, for example: // #include <algorithm> // you can write to stdout for debugging purposes, e.g. // cout << "this is a debug message" << endl; #include <algorithm> int solution(vector<int> &A) { // write your code in C++14 (g++ 6.2.0) int L = A.size(); int sol = 0; sort(A.begin(),A...
#include "mumble_data.h" #include <algorithm> #include <functional> #include <string> /** * @brief Construct a new Mumble Data:: Mumble Data object * attaches to the given MumbleMessageProvider * @param prov MumbleMessageProvider to get incomming messages from */ MumbleData::MumbleData(MumbleMessageProvider * pro...
// // 12.cpp // REVIEW BAGUS // // Created by Mikha Yupikha on 16/10/2016. // Copyright © 2016 Mikha Yupikha. All rights reserved. // #include <iostream> using namespace std; int main() { int const cost = 99; int quantity; float totalAfterDisc; cout<<"Please input the quantity of package sold: ";...
#pragma once //////////////////////////////////////////////////////////////////////////////// #include <cellogram/common.h> #include <Eigen/Dense> //////////////////////////////////////////////////////////////////////////////// namespace cellogram { /// /// Extrude a 2D mesh into a volumetric tet-mesh. Assumes the i...
/* * op_addition.cpp * * Created on: 2 mars 2014 * Author: droper */ #include <iostream> #include <stdio.h> #include "op_addition.h" op_addition::op_addition() { } op_addition::~op_addition() { } void op_addition::display(std::ostream &out, int mode) { if (mode == DISPLAY_F) { out << getValue(); r...
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<algorithm> #include<cstdlib> using namespace std; int num[10005]; int main(){ int n; scanf("%d",&n); int sum=0; for(int i=0;i<n;i++){ scanf("%d",&num[i]); sum+=num[i]; } sort(num,num+n)...
// // Created by manout on 18-2-27. // #include <queue> #include <string> #include <iostream> using std::queue; using std::string; using std::vector; /** 连通块问题 * 这里假设上下左右相邻即为连通 *   假设是在矩阵中求 @ 连通个数 * */ using Map = std::vector<std::string>; static std::vector<std::vector<int>> flag; static int dfs(Map& map...