text
stringlengths
8
6.88M
#include "gb_int.h" #include "gb_cpu.h" #include "gb_memory.h" void Interrupt::vblank(void) { mem->write_short_to_stack(cpu->registers.sp, cpu->registers.pc); cpu->registers.sp -= 2; // jump to vblank irq cpu->registers.pc = 0x0040; } void Interrupt::lcdc_stat(void) { mem->write_short_to_stack(cpu->register...
#include "odb/mess/request.hh" #include <cstdint> #include <string> #include <type_traits> #include <vector> #include "odb/mess/db-client.hh" #include "odb/mess/request-handler.hh" #include "odb/server/fwd.hh" // @xtra I had issues of ambigious call using enable_uf #define RAW_SERIAL(Ty) ...
// BHNavigator.cpp: implementation of the CBHNavigator class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "BrowserHooker.h" #include "BHNavigator.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ...
#include <vector> class ParkingLot { public: class ParkingSpace {}; private: std::vector<ParkingSpace> spaces; };
#include "modes.h" namespace lab { // the timing mode emits timing updates with the current time // whenever the mode's update() is called. // // things like the timeline listen to the timing mode and update // their status accordingly // extern event<void(std::chrono::steady_clock::time_point&)> evt_timing_up...
#include "inputhandler.hpp" #include "messages.hpp" InputHandler::InputHandler(fea::MessageBus& bus, fea::InputHandler& handler): mHandler(handler), mBus(bus) { } std::vector<Action> InputHandler::process() { std::vector<Action> actions; fea::Event event; while(mHandler.pollEvent(event)) { ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2009 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" #include "modules/dom/src/domenvironme...
#ifndef ROOM_H_ #define ROOM_H_ #include <QMainWindow> #include <string> #include <map> #include <string> #include <vector> #include "item.h" using namespace std; using std::vector; class Room { private: string description; string itemDescription; map<string, Room*> exits; strin...
/* 191216 - 백준 #7576 : 토마토 */ #include <iostream> #include <queue> using namespace std; #define MAX 1000+1 int M, N; int arr[MAX][MAX]={0,}; int visited[MAX][MAX]={0,}; typedef struct { int x; int y; int day; }POS; queue<POS> q; int front = -1; int rear = -1; int days = 0; int riped = 0; in...
#include <iostream> #include <unordered_set> #include "jump_mesh.hpp" #define SimpleMesh JumpMesh using namespace std; void print_header() { cout << "\n\t\tSIMPLE_MESH TEST\n" << endl; cout << "All tests should print 1 if successful." << endl; cout << "When mesh graphic is output, it needs visual confirmation.\n\n...
/* * Copyright (c) 2017-2018 Morwenn * SPDX-License-Identifier: MIT */ #include <algorithm> #include <functional> #include <iterator> #include <vector> #include <catch2/catch.hpp> #include <cpp-sort/adapters.h> #include <cpp-sort/fixed_sorters.h> #include <cpp-sort/sorters/merge_sorter.h> #include <cpp-sort/sorters/...
#include<<constream.h>> class Physics and technology(){ public: void computer tech(){ cout<<"computer tech" <<endl; } void electronics(){ cout<<"electronic " <<endl; } void telecom(){ cout<<"telecommunication" <<endl; } void lab(){ cout<<"labortory" <<endl; } }; class IIT:Physics and technolog...
#ifndef BATTLE_H #define BATTLE_H #include "Scene.h" #include "Arena.h" #include "xil_types.h" class Battle : public Scene { public: Battle(uint32_t axi_arena_base_addr, uint32_t axi_bomber_info_base_addr, Scene *endgame, uint8_t id); void Init(uint8_t info) override; void HandleInput(uint8_t key) overrid...
class Category_603 { duplicate = 486; }; class Category_638 { duplicate = 486; };
#include <TimerOne.h> #include <avr/pgmspace.h> #include "pitches.h" //#include "songs.h" #include "songs2.h" #include <avr/sleep.h> const int PowerLedPin = 15; // the number of the LED pin const int ledPin = 2; // the number of the LED pin const int anode_pins[] = {9, 10, 11, 5, 6, 7, 8, 12}; // アノードに接続す...
#include <iostream> #include <conio.h> using namespace std; struct Nodo{ int valor; Nodo *Anterior; Nodo *Siguiente; }; void agregar(int); void mostrar(); void mostrar_an(); struct Nodo *lista=NULL; int main(int argc, char** argv) { int option,agreg,num; while(option!=3){ cout<<":-:-:LISTA DOBLEMEMNTE ENLAZADA:-:-:"<...
#include "stdafx.h" #include "Prof-UIS.h" extern "C" __declspec(dllexport) HWND WINAPI UISalPageContainerCreate(HWND parentWindow, UINT controlID, int x, int y, int width, int height, DWORD pageContainerStyle, DWORD windowStyle) { // access parent window CWnd* parentWindowClass = NULL; if (parentWindow != NULL) { ...
#include <gtest/gtest.h> #include "shoc/ecc/crc.h" using namespace shoc; static constexpr auto test_data = "123456789"; static constexpr auto test_size = 9; template<class T, T poly, T init, T xorout, bool refin, bool refout> static constexpr auto check_fast_and_slow(T exp) { EXPECT_EQ(exp, (crc_slow<T, poly, in...
#include <sstream> #include "gtest/gtest.h" #include "opennwa/Nwa.hpp" #include "opennwa/NwaParser.hpp" #include "Tests/unit-tests/Source/opennwa/fixtures.hpp" #include "Tests/unit-tests/Source/opennwa/class-NWA/supporting.hpp" using namespace opennwa; #define NUM_ELEMENTS(array) (sizeof(array)/sizeof((array)[0])...
#include "widget.h" #include <QVBoxLayout> Widget::Widget(QWidget *parent) : QWidget(parent) { le = new QLineEdit(this); btn = new QPushButton("OK", this); QVBoxLayout *vbox = new QVBoxLayout; vbox->addWidget(le); vbox->addWidget(btn); setLayout(vbox); connect(btn, SIGNAL(clicked()), ...
#include <string.h> #include "base/base.h" #include "mysqlengine.h" MysqlEngine::MysqlEngine(const std::string & host, uint16_t port) : m_Host( host ), m_Port( port ), m_DBHandler( NULL ){} MysqlEngine::~MysqlEngine(){} void MysqlEngine::selectdb(const std::string & database) { m_Database = database; ...
#include "global.h" int main() { init(); parse(); return 0; }
 // 4.13.1View.cpp: CMy4131View 类的实现 // #include "pch.h" #include "framework.h" // SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的 // ATL 项目中进行定义,并允许与该项目共享文档代码。 #ifndef SHARED_HANDLERS #include "4.13.1.h" #endif #include "4.13.1Doc.h" #include "4.13.1View.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CMy4131View IMPLEME...
// Created on: 1998-04-21 // Created by: Stephanie HUMEAU // Copyright (c) 1998-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 G...
//////////////////////////////////////////////////////////////////////////////// #pragma once #include <cellogram/common.h> #include <cellogram/point_source_detection.h> #include <Eigen/Dense> #include <vector> //////////////////////////////////////////////////////////////////////////////// namespace cellogram { clas...
#include<iostream> using namespace std; class Terms { public: int coeff; int exp; }; class Poly { private: int n; Terms *t; public: Poly(int n) { this->n = n; t = new Terms[n]; } ~Poly(){ delete [] t; } Poly operator+(Poly &p); friend ist...
#include <iostream> #include "Connector.h" #include "Keyboard.h" namespace Control { const short default_axis_1_key_up = KEY_LEFT; const short default_axis_1_key_down = KEY_RIGHT; const short default_axis_2_key_up = KEY_UP; const short default_axis_2_key_down = KEY_DOWN; const short default_axis_3_key_up = KEY_Q; c...
// Created on: 1993-01-11 // Created by: CKY / Contract Toubro-Larsen ( Arun MENON ) // 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 ...
#include "hardware.h" #include "util.h" #include <string> #include <fstream> #include <stdlib.h> #include <unistd.h> #include <linux/kernel.h> #include <sys/sysinfo.h> #include <sys/utsname.h> namespace libzinlidac { // throws a `SysconfError` both if the implementation does not impose a limit, and in case of an erro...
#include <algorithm> #include <iostream> #include <queue> #include <string> #include <vector> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0); int t; std::cin >> t; for (int i = 0; i < t; ++i) { int m, n, k; std::cin >> m >> n >> k; ...
/* Petar 'PetarV' Velickovic Algorithm: Quickselect */ #include <stdio.h> #include <math.h> #include <string.h> #include <iostream> #include <vector> #include <list> #include <string> #include <algorithm> #include <queue> #include <stack> #include <set> #include <map> #include <complex> #define MAX_N 1000001 using n...
#pragma once #include "EGLRenderSystem.h" #include <sstream> #include "FrameListener.h" #include "Timer.h" #include "Logger.h" #include <thread> #include <chrono> #include "App_SSS.h" #include "Config.h" using namespace std; class PCFrameWork { public: PCFrameWork() { rendersys = NULL; } void Init() { Config:...
/* -*- 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.h" #include "modules/doc/imageprogresshandler....
#include <stdio.h> void Print_Factorial ( const int N ); int main() { int N; scanf("%d", &N); Print_Factorial(N); return 0; } void Print_Factorial ( const int N ){ if ( N < 0 ) { printf("0\n"); return ; } unsigned long long res = 1; for(unsigned int i = 2; i < N+1; i++){ res *= i; } ...
#include "Team.h" #include "BaseEntity.h" #include "GamePlay.h" #include "Timer.h" int Team::m_iNextValidId = 0; Team::Team() : m_iCurrentDmgUpgrade(0), m_iCurrentHpUpgrade(0), m_fFactorUpDmg(/*theTuning.GetFloat("Tower_FactorUpgradeDamage")*/0.4f), m_fFactorUpHp(/*theTuning.GetFloat("Tower_FactorUpgra...
/*******************************************************************\ Module: Author: Daniel Kroening, kroening@kroening.com \*******************************************************************/ #include <std_types.h> #include "c_types.h" #include "config.h" /******************************************************...
// Copyright 2021 The XLS Authors // // 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 applicable law or agreed t...
#include "stdafx.h" #include "Totem.h" Totem::Totem(int pos) : totemCondition(IDLE), attackTimer(0, 3), lazerTimer(0, 1), damageTimer(0, .1f), isAttack(false), isAlive(true), i(1) // attackTimer : 5초동안 가만히 있다가 // lazerTimer : 1초동안 레이저 파바ㅏㅏ바ㅏ박 { enemyType = TOTEM; health = 150; totemAttack = new ...
#include "serialization.h" #include "assertion.h" #include <fstream> void SaveJson(const nlohmann::json& data, const std::string& name) { std::ofstream file(name); if (!file) { THROWERROR("Cannot open file " + name); } file << data; } nlohmann::json LoadJson(const std::string& name) { nlohmann::json res; s...
#include <iostream> #include <fstream> #include <array> #include <vector> #include <cstdlib> #include <ctime> #include <climits> struct Point { int x, y; Point() : Point(0, 0) {} Point(int x, int y) : x(x), y(y) {} bool operator==(const Point& rhs) const { return x == rhs.x && y == rhs.y; }...
#include "subject.hpp" #include <iomanip> class ProgressBar : public Observer { public: void update(int val) { // progress logic std::cout << "\rProgress: ["; for (int i=0; i<val; i++) std::cout << "#"; std::cout << std::setw(11 - val) << "]"; std::cout << std::flush; } }; class Termina...
#include "RenderTarget.h" #include "VertexArray.h" #include "Texture2D.h" #include "Buffer.h" #include "OpenGLDebug.h" #include <iostream> RenderTarget::RenderTarget(glm::ivec2 dimensions) { _bound = false; _dimensions = dimensions; _fboID = 0; _rboID = 0; clearAttachments(); GLfloat rectVerts[] = { 1.0f, -1...
/*********************************************************** Starter code for Assignment 3 This code was originally written by Jack Wang for CSC418, SPRING 2005 implements light_source.h ***********************************************************/ #include <cmath> #include "light_source...
#pragma once #include"Anyinclude.h" class Menu { public: Menu(float width, float height); ~Menu(); void draw(sf::RenderWindow& window); void Moveup(); void Movedown(); int GetPressedItem() { return selectedItem; } int selectedItem = 0; private: sf::Texture menuTexture[Max_Items]; sf::Sprite menupic[Max_Item...
// BEGIN CUT HERE // PROBLEM STATEMENT // Our alarm system is intended to keep intruders from // entering at the front door // of a square room, crossing the room, and then exiting // through the back door. It // consists of noise sensors located at various points on the // floor of the room. // Each sensor has its ...
#include "stdafx.h" #include "Random.h" using namespace pure; using namespace std; Random::Random(): m_rd(), m_mez(m_rd()) { } Random::~Random() { } float Random::operator()(float min, float max) const { uniform_real_distribution<> rand(min, max); return (float)rand(m_mez); } float Random::operator()(float ma...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- // // Copyright (C) 1995-2004 Opera Software AS. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. #ifndef BT_DOWNLOAD_H #define BT_DOWNLOAD_H // ------------------...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #inc...
#ifndef GAME_H #define GAME_H #include <common/scene.h> #include <common/client.h> #include <common/server.h> class Game : public Scene { public: Game(); ~Game(); void Initialize(); int port; int updatenumber; Client client; sf::Vector2f prevPosition; virtual void Update(sf::Event event); voi...
#include<iostream> #include<utility> #include<vector> using namespace std; int main(){ int n, e, u, v, ans; cin >> n >> e; vector <pair<int, int>> nodes = vector <pair<int, int>>(n); //first is root second is num of childern for(int i = 0; i < n; i++){ nodes[i].first = -1; node...
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*- // // Copyright (C) 1995-2007 Opera Software ASA. All rights reserved. // // This file is part of the Opera web browser. It may not be distributed // under any circumstances. // // Patricia Aas // #include "core/pch...
// // main.cpp // Recursividad // // Created by Daniel on 21/08/14. // Copyright (c) 2014 Gotomo. All rights reserved. // #include <iostream> using namespace std; #include<iostream> int MCD; int euclides(int m, int n); int main(int argc, const char *argv[]){ int m,n; cout<<"Entre un numero"<<endl; c...
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i = 1; i <= n+1; i++){ int p = pow(i, 3); int result = p + 2*i; cout<<result<<" "; } return 0; }
// Created on: 1993-01-11 // Created by: CKY / Contract Toubro-Larsen ( TCD ) // 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 /...
#include <chrono> #include <iostream> #include <thread> using namespace std; #include "pbaf_protocol_service.h" int main(int argc, char** args) { if(argc < 3) { cout << "Usage: hang <host> <port>" << endl; return 1; } pbaf_server serv; serv.address = string(args[1]); serv.port = atoi(args[2]); pbaf_proto...
// Created on: 2001-02-26 // Created by: Peter KURNEV // Copyright (c) 2001-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 as ...
#include "include/InitApp.h" Functions InitApp::funs = Functions(); Reduces InitApp::reduces = Reduces(); /* E→E+T E→E-T E→T T→T*T' T→T/T' T→T^T' T→T%T' T→T' T'→-T' T'→F! T'→F F→fun(G) F→F' F→num F'→(E) F'→|E| G→G,E G→E */ Reduces& InitApp::load_reduces(Reduces& rs) { rs["E→E+T"] = [](vector<Symbol> symbols) -> Symb...
#pragma once #include <iostream> namespace sj { enum LOG_LEVEL { LL_DEBUG, LL_TRACE, LL_INFO, LL_ERROR, LL_FATAL, }; class logger { public: static logger & GetInstance() { static logger _instance; return _instance;...
class server { private: /* data */ public: server(/* args */); ~server(); }; server::server(/* args */) { } server::~server() { }
#include "stdafx.h" #include "material.h" #include <cassert> vec3 material::reflect(const vec3 & in, const vec3 & normal) { return in - 2 * (in * normal) * normal; } bool material::refract(const vec3 &in, const vec3 &n, float ni_over_nt, vec3 &refracted) { vec3 uv = in.normalized(); float dt = uv * n; float disc...
/*Assignment 2 for CS 1337.013 *Programmer: Medha Aiyah *Description: This file is used to program the constructors, destructors, and the member functions for the Question * class and the Trivia Game class. */ #include <iostream> #include "assignment2.h" using namespace std; //This Question constructor...
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/xml_parser.hpp> #include <boost/foreach.hpp> #include "PascalAnnotation.h" #include "ImageDatabase.h" using namespace std; static const char *SIGNATURE = "ImageDataset"; // Image Database class ImageDatabase::ImageDatabase(): _positivesCoun...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* MateriaSource.cpp :+: :+: :+: ...
#include<bits/stdc++.h> using namespace std; int main() { int t, m, n, i; unsigned long long num1; unsigned long long num2; unsigned long long sum; while(cin>>m>>n) { num1 = 1; num2 = 1; for(i=1; i<=m; i++) { num1 = num1*i; } for(i=1; i...
#include "stdafx.h" #include "FullTimeEmployee.h" // Functions' declaration double FullTimeEmployee::calculatePay() const { return weekSalary; } void FullTimeEmployee::print() const { Employee::print(); cout << "Weekly Salary: $"<< FullTimeEmployee::calculatePay()<< endl; } FullTimeEmployee::~...
// Created on: 1997-04-01 // Created by: Christian CAILLET // Copyright (c) 1997-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 ...
#include <iostream> int main() { char slash; char probel; int year; int day; int month; std::cout << "Enter the date 'yyyy dd/mm'" << std::endl; std::cin >> year >> probel >> day >> slash >> month; while (year < 0 || year > 2018 ) { std::cout << "The year can be a number from 0 to 2018" << std::endl; std...
#include <SDL.h> #include <SDL_image.h> #include <SDL_ttf.h> #include <SDL_mixer.h> #include <stdio.h> #include <string> #include <cmath> #include <BaseTsd.h> #include <random> #include <iostream> #include <vector> #include <ostream> #include <sstream> class LWindow { public: //Intializes internals LWindow()...
/* kamalsam */ #include<iostream> using namespace std; int main() {int t,k;long a,b,v;cin>>t;while(t--){cin>>k>>a>>b;while(a!=b){if(a>b){v=a;a=(a/k);if(v%k>1)a++;}else{v=b;b=(b/k);if(v%k>1)b++;}}cout<<a<<endl;}return 0;}
#pragma once #define STOP_CRITERION 0.001 #include"matrix.h" class AnalyticSolver { public: void static analyticSolution(matrix &m, int iterations); double static validate(matrix &m1, matrix &m2); };
// Copyright (c) 2023 ETH Zurich // // 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) /// \file parallel/algorithms/transform_xxx.hpp #pragma once #include <pika/config.hpp> ...
#include <Arduino.h> int decimalPrecision = 2; // decimal places for all values shown in LED Display & Serial Monitor int ThermistorPin = A2; // The analog input pin for measuring temperature float voltageDividerR1 = 10000; // Resistor value in R1 for voltage dev...
/* leetcode 260 * * * */ #include <string> #include <unordered_set> #include <algorithm> #include <map> using namespace std; class Solution { public: vector<int> singleNumber(vector<int>& nums) { int dif = 0, a = 0, b = 0; for(int num: nums) { dif = dif ^ num; } int d...
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include ...
#pragma once #include <vector> enum TaskPriority { TP_ENGINE = 10, TP_GAME = 5 }; class Task { friend class Kernel; public: Task(void); ~Task(void); virtual bool init() { return true; }; virtual void pause() { }; virtual bool stop() { return true; }; private: virtual void run() {}; ...
#include"food.h" Food::Food() { x = 5; y = 6; } void Food::printfood() { gotoxy(x*2, y); cout << "★"; } void Food::creatfood() { x = rand() % high + 1; y = rand() % with + 1; } void Food::textfood(Snakecoor *head) { int T = 0; Snakecoor *p=head; while (T < Max) { if (x == head->x&&y == head->y) T++; e...
// Copyright (c) 2016-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/async_base/traits/is_laun...
#include <stdio.h> int main() { int sas, nar, menor, maior; printf("Digite o primeiro valor: "); scanf("%d", &sas); printf("Digite o segundo valor: "); scanf("%d", &nar); if (sas <= nar) { menor = sas; maior = nar; } else { menor = nar; maior = sas; } printf("Os numeros em ordem crescente ficam: ...
// Created on: 1998-04-02 // Created by: Christian CAILLET // Copyright (c) 1998-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 ...
/* -*- Mode: c++; tab-width: 4; 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. * * @author Michal Zajaczkowski */ #ifndef _ST_ADDITIONCHECKER_H_INCLUDED_ #define _ST_A...
/******************************************************************************************************//** * @file filefilterwindow.cpp * @brief 后缀名过滤 源文件 * * 后缀名过滤 * 配置后缀名 保存配置 恢复配置 自定义后缀名 * @author coolweedman * @version V1.00 * @date 2016-7-13 ********...
// Created on: 1999-06-17 // Created by: data exchange team // Copyright (c) 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 ...
#include <iostream> using namespace std; //It is probably a good idea to implement Stack as a module, //like the example from the lecture was done. //3ICE: No thanks :) class Stack { private: struct Cell { int data; Cell* next_ptr; }; Cell* first_ptr; public: //3ICE:...
#include <stdio.h> #include "peconv.h" using namespace peconv; #define VERSION "0.4" #define PARAM_RAW_TO_VIRTUAL "/r2v" #define PARAM_OUT_FILE "/out" #define PARAM_BASE "/base" #define PARAM_IN_FILE "/in" #define PARAM_REALIGN_RAW "/vraw" typedef struct { std::string in_file; std::string out_file; ULON...
#pragma once #include <string> using std::string; using std::to_string; enum LogLevel { LOG_INFO, LOG_OK, LOG_WARNING, LOG_ERROR }; void logger(LogLevel level, string message);
/* * Stopping Times * Copyright (C) Leonardo Marchetti 2011 <leonardomarchetti@gmail.com> */ template <typename FP> Functor1D<FP>::Functor1D(){} template <typename FP> Functor1D<FP>::~Functor1D(){} template <typename FP> FP Functor1D<FP>::operator()(FP x){ return 0.0; }
#include <iostream> #include <vector> using namespace std; void pass_by_value(int x) { x = 99; cout << "inside PbV function x = " << x << endl; } //notice the different in the definition void pass_by_reference(int &x) { x = 10000; cout << "inside PbR function x = " << x << endl; } int main() { cout << "Pa...
class BankAccount{ private: double balance; public: BankAccount(){ balance = 0; } }
/* * Copyright (C) 2011 Thomas Kemmer <tkemmer@computer.org> * * http://code.google.com/p/stlencoders/ * * 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, inclu...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*- * * Copyright (C) 1995-2006 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. */ #ifdef WBXML_SUPPORT #ifndef WBXML_H ...
#include "Number.h" namespace lispc { Number::Number(int val) : isInteger(true), intValue(val), doubleValue((double)val) {} Number::Number(double val) : isInteger(false), intValue((int)val), doubleValue(val) {} Number::Number(const Number& other) : isInteger(other.isInteger), intValue(other.intVal...
// Pg1_raycast_psdeo.cpp : // CSC-561 Computer Graphics Programming Assignment 1 // Defines the entry point for the application. #include "tiny_obj_loader.h" #include "stdafx.h" #include "Pg1_raycast_psdeo.h" #include <stdlib.h> #include <cstdio> #include <cstdlib> #include <cassert> #include <iostream> #include <sstr...
//knapsack problem codechef #include<iostream> #include<vector> #include<algorithm> #include<stdio.h> using namespace std; long long cost[200000+10]; int main() { int n,w,c,m,W = 0; //Separate one and two for even and odd casses vector<int> one,two,One,Two; scanf("%d",&n); for(int i = 0;i<n;i++) { scanf("%d %d"...
#include <Windows.h> #include <iostream> #include "Person.h" #include "Globals.h" Person::Person() { infected = false; infectious = false; timesInfected = 0; strain = 0; } Person::~Person() { } void Person::update(float transmission) { if (!infected) { if (transmission > infectionRate && timesInfected < 1...
#include<iostream> #include<string> using namespace std; enum department_t {cleaning, marketing, management, service, sales}; //labels int main() { string nameArr[10] = {"Taka", "Tom", "Hannah", "Alex", "Fred", "Nick", "Ethan", "Mario", "Shelly", "Paul"}; double salaryArr[10] = {52000, 53000, 100000, 20000...
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #ifndef cmExprParserHelper_h #define cmExprParserHelper_h #include "cmConfigure.h" // IWYU pragma: keep #include <string> #include <vector> #include "cm_kwiml.h" class ...
#ifndef ACTION_H #define ACTION_H class action { public: action(); }; #endif // ACTION_H
#include <iostream> int main() { /* 1.variable declaration like java <TYPE> <NAME> = <VALUE> * 2.Always initialize variables if you can. * 3.Name must start with a letter * 4.Google-style: snake_case */ int a = 3; int max_counter = 2; // Most common variable types: bool this_is_fun = false...
#include <iostream> #include <malloc.h> #include <string.h> using namespace std; typedef struct node *typeptr; struct node { int angka; typeptr kiri, kanan; }; typeptr root, p, b; void buatPohon() { typeptr ptb; ptb = NULL; root = ptb; } int ptbKosong() { if (root ==...
// Created on: 2011-10-14 // Created by: Roman KOZLOV // Copyright (c) 2011-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 ...