text
stringlengths
8
6.88M
#include<iostream> using namespace std; int board[100][100]; int row,col; int count=0; void initboard(int *q,int r,int c) { for(int i=0;i<r;i++) { for(int j=0;j<c;j++) { *(q+i*c+j)=0; } } } void display(int *q,int r,int c) { cout<<"---------------------------------"<<"\n"; ...
#ifndef OPAUTOUPDATEPI_H #define OPAUTOUPDATEPI_H #ifdef AUTO_UPDATE_SUPPORT class OpAutoUpdatePI { public: virtual ~OpAutoUpdatePI() {} static OpAutoUpdatePI* Create(); /* * Get OS name * * Name of the operating system as will be passed to the auto update * system. It should be of the form as show on ...
#include "Game.h" #include "DxLib.h" #include "Peripheral.h" #include "Scene.h" #include "TitleScene.h" #include <memory> const int screen_x_size = 512; const int screen_y_size = 480; Game::Game() { screen_size.width = screen_x_size; screen_size.height = screen_y_size; } void Game::operator=(const Game &) const { ...
/* Q. Write class Sales (Salesman_Name,Product_Name,Sales_Quantity,Target). Each salesman deals with seperate product and is assigned a target for month. At the end of the month his monthly sales is compared with target and commission is calculated. - If Sales_Quantity>Target Commission is 25% ...
// // texture.h // Total Control // // Created by Parker Lawrence on 8/7/15. // Copyright (c) 2015 Parker Lawrence. All rights reserved. // #ifndef __Total_Control__texture__ #define __Total_Control__texture__ #include <stdio.h> #include <string> #include <vector> #include <iostream> #include <fstream> #include <...
//$$---- Form CPP ---- //--------------------------------------------------------------------------- #include <vcl.h> #include <process.h> #pragma hdrstop #include "MainForm.h" #include "PredStart.h" #include "ExperimentNotes.h" #include "BuildProtocol.h" #include "CalcParams.h" #include "MinorChannel.h...
/* * main.cpp - Terrain Scene 02564_Framework * * Created by J. Andreas Bærentzen on 01/02/10. * Copyright 2010 __MyCompanyName__. All rights reserved. * */ #define SOLUTION_CODE #include <iostream> #include <QApplication> #include <QTimer> #include <QTime> #include <QDebug> #include <QMouseEvent> #include ...
#include "Camera.h" void Camera::Update(DWORD dt, CGameObject* simon) { if (isFollowSimon && !isAuto) { FollowSimon(simon); } } void Camera::FollowSimon(CGameObject* simon) { // Update camera to follow simon float cx, cy; simon->GetPosition(cx, cy); cam_x = CGame::GetInstance()->getCamPos_x(); pos_max =...
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct node { int x, y, idn; node *left; node *right; node *parent; }; node *make_node(int x, int y, int id) { auto *n = new node{}; n->x = x; n->y = y; n->idn = id; n->left = nullptr; n->right = n...
/** Constructs the JSON object corresponding to a measurement */ aJsonObject* constructRGBCMeasurement(String R, String G, String B, String C, String ColorTemp, String lux) { aJsonObject *root = aJson.createObject(); aJson.addStringToObject(root, "R", R.c_str()); aJson.addStringToObject(root, "G", G.c_str());...
void buzzerAlert() { motor(1, 50); delay(1000); motor(1, 0); }
#ifndef MANIPULATION_OPERATION_H #define MANIPULATION_OPERATION_H #include "../model/image.h" namespace manipulation { // Encapsulates a manipulation operation that could be applied to images. class Operation { public: // Applies the manipulation to a specific image. virtual void apply(model::Image *&image) = 0;...
//-------------------------------------------------------- // musket/include/musket/widget/label.hpp // // Copyright (C) 2018 LNSEAB // // released under the MIT License. // https://opensource.org/licenses/MIT //-------------------------------------------------------- #ifndef MUSKET_WIDGET_LABEL_HPP_ #define MUSKET_WI...
#include <iostream> #include "Shop.h" #include "SaleableItem.h" #include "Book.h" #include "CD.h" #include "DVD.h" #include <vector> using namespace std; void Shop::AddBook(const char* pTitle, unsigned int unitPricePence, unsigned int noOfPages) { Book *book = new Book(pTitle, unitPricePence, noOfPages); shar...
//==================================================================================== // @Title: BATTLE STAGE //------------------------------------------------------------------------------------ // @Location: /game/battle/include/cBattleStage.cpp // @Author: Kevin Chen // @Rights: Copyright(c) 20...
#ifndef _CUDA_TIMER_ #define _CUDA_TIMER_ #include "cuda_runtime.h" #include "device_launch_parameters.h" class CudaTimer { public: CudaTimer(); void start(); void stop(); float getTime(); private: cudaEvent_t m_start, m_stop; }; #endif
#include <iostream> #include <pangolin/pangolin.h> struct CustomType { CustomType() : x(0), y(0.0f) {} CustomType(int x, float y, std::string z) : x(x), y(y), z(z) {} int x; float y; std::string z; }; std::ostream& operator<< (std::ostream& os, const CustomType& o){ os << o.x <<...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/macros.h" #include "examples/window_manager/debug_panel_host.mojom.h" #include "examples/window_manager/window_manag...
// Created on: 1992-04-06 // Created by: Christian CAILLET // 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 ...
#pragma once #include <memory> // std::unique_ptr #include "GlobalHeader.h" // fa::OStream #include <utility> // std::move #include <type_traits> // std::is_same #include "NoteImpl.h" // fa::NoteImpl namespace fa { class DailyPlanImpl; } // END of namespace fa namespace fa { class PlanEntryInterfa...
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); #define inf 100000 /* * Complete the 'findCapitalCity' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: ...
#pragma once #include "common_def.h" #include "proto_buf.h" namespace fgs { bool Init(const char * config_file); bool Update(); bool Close(); bool Send2Client(unid_t sid, PB::proto_buf& pb); template < class PBTYPE > bool Send2Client(unid_t sid, PBTYPE& pb) { PB2STR(pb, data_str, re...
#include <iostream> using namespace std; int doStuff() { return 2 + 3; } int count_of_function_calls = 0; void fun() { count_of_function_calls++; } int main() { fun(); fun(); fun(); cout << "Function fun was called: " << count_of_function_calls << " times."; return 0; }
/* -*- 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. ** */ #include "core/pch.h" #ifdef PI_CAMERA // no need to update ...
// // ItemManage.h // GetFish // // Created by zhusu on 15/7/28. // // #ifndef __GetFish__ItemManage__ #define __GetFish__ItemManage__ #include "cocos2d.h" #include "Item.h" #include "ActorManage.h" USING_NS_CC; class ItemManage : public ActorManage { public: CREATE_FUNC(ItemManage); ItemManage();...
// Created on: 2019-07-08 // Copyright (c) 2019 OPEN CASCADE SAS // Created by: Oleg AGASHIN // // 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 publi...
#include <iostream> #include <vector> #include <climits> #include <unordered_set> using namespace std; #define N 1500 #define FASTIO \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); int nums[N]; int n; int sum3(int a, int sum, int in) { uno...
/** * “Experience is the name everyone gives to their mistakes.” – Oscar Wilde * * Prodip Datta * Dept. Of Computer Science & Engineering * Session: 2014-15 * email : prodipdatta7@gmail.com * Bangabandhu Sheikh Mujibur Rahman Science & Technology University, Gopalganj-8100. ...
#include <ros.h> #include <Stepper.h> #include <math.h> #include <geometry_msgs/Point.h> // type of message //change this to the number of steps on your motor #define STEPS 200 #define STEPS1 513 float theta1; float theta2; float X ; float Y ; double L2 = 76.2; // length of the link arms double L1 = 177....
#include<iostream> #include<ctime> #include<cmath> #include<queue> #include<vector> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #define N 301 #define eps 1e-5 using namespace std; static unsigned long rand_seed; void mysrand(unsigned long seed) { rand_seed = seed; } ...
#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; typedef long long LL; LL a[1010],b[1010]; bool cmp(LL a,LL b) { return a > b; } int main() { i...
// http://blog.csdn.net/q1204265228/article/details/42915067 //http://blog.csdn.net/x920405451x/article/details/39753305 #include<stdio.h> #include<stdlib.h> #include<string.h> #include<vector> #include<bitset> using namespace std; #define MAX 111 int m, ok, j, order[MAX], flag[MAX][MAX]; bitset<MAX> digit[MAX];//存放每...
/* ** InventoryModel.hpp for cpp_indie_studio in /home/jabbar_y/rendu/cpp_indie_studio/InventoryModel.hpp ** ** Made by Yassir Jabbari ** Login <yassir.jabbari@epitech.eu> ** ** Started on Wed Jun 14 16:41:35 2017 Yassir Jabbari ** Last update Wed Jun 14 16:41:35 2017 Yassir Jabbari */ #ifndef CPP_INDIE_STUDIO_INVEN...
#include "testMacros.h" #include "Group.h" #include "Clan.h" #include "exceptions.h" using namespace mtm; bool constractorClan() { Clan beta("Beta"); ASSERT_EXCEPTION(Clan(""), ClanEmptyName); Clan copy(beta); ASSERT_TRUE(copy.isFriend(copy)); ASSERT_TRUE(copy.getSize() == 0); return 1; } boo...
#ifndef __CURSES_LIBS_HPP_INCLUDED__ #define __CURSES_LIBS_HPP_INCLUDED__ #ifdef CURSES_HAS_PRAGMA_ONCE #pragma once #endif #include "containers.hpp" #include "noncopyable.hpp" #endif // __CURSES_LIBS_HPP_INCLUDED__
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* swapPairs(ListNode* head) { if(!head || !head->next) return head; ListNode *newHead = new ListNode(-1); ...
/* * ConstExpr.cpp * * Created on: May 12, 2016 * Author: bakhvalo */ #include "gtest/gtest.h" #include <type_traits> #include <array> // constexpr is a part of functions signature TEST(ConstExprUnitTest, constexpr_produces_const_objects) { constexpr int a = 0; (void) a; // a = 1; won't compile } TEST...
#include <iostream> #include <vector> #include <algorithm> #include <fstream> #include <queue> #include <unordered_set> #include <unordered_map> #include <stack> #include <cstdio> #include <cmath> #define INT_MIN (1<<31) #define INT_MAX (~INT_MIN) #define UNREACHABLE (INT_MAX>>2) #define INF (1e300) #define eps (1e-9) ...
#include <AFMotor.h> #include "LedControl.h" #include "DFRobotDFPlayerMini.h" // define of pins #define PHASE_PIN 22 #define LASER_PIN_L 52 #define LASER_PIN_R 53 // dfplayer #define BUSY_PIN 21 // led matrix #define DATA_PIN 38 #define CS_PIN 40 #define CLK_PIN 42 // define for intensity of the eyes #define INTENS...
#pragma once #include "PokemonObject.h" #include <vector> class Factory { public: static Factory& GetInstance() { static Factory instance; return instance; } Factory(); int ChoiceNumToPokeNum(int choice); int RandNumToPokeNum(int choice); pokemonObject CreatePokemon(int choose); void checkPokeStatisticsOrCo...
//自行构造和解密数字信封(非PKCS#7) #include <iostream> #include "getopt.h" #include <openssl\evp.h> #include <openssl\err.h> #include <openssl\rsa.h> #include <openssl\pem.h> #include <fstream> #include <string> /*e/--encrypt 数字信封加密(对称算法使用AES128-CBC) -d/--decrypt 数字信封解密 -k/--key 公钥或私钥文件(在加密时使用公钥,解密时使用私钥) -i/--input 输入文件 -o/--outp...
// Created on: 1993-11-17 // 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...
#include <arba/evnt/version.hpp> #include <gtest/gtest.h> #include <cstdlib> TEST(project_version_tests, test_version_macros) { ASSERT_EQ(ARBA_EVNT_VERSION_MAJOR, 0); ASSERT_EQ(ARBA_EVNT_VERSION_MINOR, 3); ASSERT_EQ(ARBA_EVNT_VERSION_PATCH, 0); ASSERT_STREQ(ARBA_EVNT_VERSION, "0.3.0"); }
#include "core/pch.h" //Core header files #include "modules/widgets/OpWidget.h" //Platform header files #include "adjunct/quick/managers/TipsManager.h" //Global objects and constant definations TipsManager::TipsManager() : m_tips_token(FALSE) { } TipsManager::~TipsManager() { TipsConfigManager::Destroy(m_tips_c...
#ifndef VnaChannel_H #define VnaChannel_H // RsaToolbox #include "Definitions.h" #include "BalancedPort.h" #include "VnaArbitraryFrequency.h" #include "VnaLinearSweep.h" #include "VnaLogSweep.h" #include "VnaSegmentedSweep.h" #include "VnaPowerSweep.h" #include "VnaCwSweep.h" #include "VnaTimeSweep.h" #include "VnaU...
#include "MemoryManager.h" #include <cassert> namespace keng::memory { MemoryManager::MemoryManager() { m_pools.emplace_back( 8, 10, 100000); m_pools.emplace_back(16, 10, 100000); m_pools.emplace_back(24, 10, 100000); m_pools.emplace_back(32, 10, 100000); m_pools.emplace_bac...
#pragma once #include <string> using namespace std; namespace nora { namespace net { namespace websocket { const string ws_magic_string = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; } } }
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 2006 - 2008 * * Web server implementation */ #ifndef WEBSERVER_ROBOTS_H_ #define WEBSERVER_ROBOTS_H_ #if defined(WEBSERVER_SUPPORT) #include "modules/webserver/webserver_resources.h" #include "module...
#include "stdafx.h" #include "Material.h" Jaraffe::Material Jaraffe::Material::m_pDefalutMaterial; Jaraffe::Material::Material() { m_Material.Ambient = XMFLOAT4(0.5f, 0.5f, 0.5f, 1.0f); m_Material.Diffuse = XMFLOAT4(0.5f, 0.5f, 0.5f, 1.0f); m_Material.Specular = XMFLOAT4(0.5f, 0.5f, 0.5f, 1.0f); m_Material.Reflec...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2008 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. */ #ifndef OP_PROTOBUF_OUTPUT_H #define OP_PROTOBUF_OUTPUT_H #ifdef PROT...
#include "Component.hpp" Elysium::Data::Model::Component::~Component() { } Elysium::Data::Model::Component::Component(Elysium::Data::Description::ComponentDescriptor* ComponentDescriptor) : Object(), _ComponentDescriptor(ComponentDescriptor) { }
/* =============================================================================== AAS_Find.cpp This file has all aas search classes. =============================================================================== */ #include "../../idlib/precompiled.h" #pragma hdrstop #include "../Game_local.h" #include "AI.h" #i...
#include "G_Particles_IO.h" #include <omp.h> #define ATT_LENGTH 20; g_particles_io::g_particles_io() { name ="fuck ok"; } g_particles_io::~g_particles_io() { } // int method settings void g_particles_io::GIO_setINTAttributeList( int arr[],int arraySize ) { per_int_attList.clear(); per_int_attList.resize(arrayS...
#pragma once // Node template <class T> class Node { private: int id; public: T* next; }; typedef struct _Node { struct _Node* next; } Node;
#include <iostream> using namespace std; struct Node { int data; struct Node *Next; }; struct Node *head = NULL; //Insert Function void insert(int no) { if (head == NULL) { struct Node *new_node = (struct Node *)malloc(sizeof(struct Node)); new_node->data = no; new_node->Next =...
#pragma once #include "menu/scrolling_menu_screen.hpp" #include "menu/main_menu_screen.hpp" #include <Thor/Input.hpp> class KeysMenuScreen : public ScrollingMenuScreen { private: bool selecting_key; string to_upper(string s); void add_opt(float xcor, string s, sf::Color color=sf::Color...
#pragma once #include <vector> #include <QString> using DevHandle = void*; enum RimDevType:unsigned {RimUnknown = 0, RimMouse, RimKeyboard, RimHid}; std::size_t getDevicesNumber(); QString getDeviceName(DevHandle); bool registerID(void*); struct devinfo{ QString name; QString typeName; DevHa...
//: C10:OverridingAmbiguity.cpp // Kod zrodlowy pochodzacy z ksiazki // "Thinking in C++. Edycja polska" // (c) Bruce Eckel 2000 // Informacje o prawie autorskim znajduja sie w pliku Copyright.txt #include "NamespaceMath.h" #include "NamespaceOverriding2.h" void s() { using namespace Math; using namespace ...
#include<bits/stdc++.h> using namespace std; int bc(int n) { int cnt=0; while(n){ if(n & 1 == 1) cnt++; n = n >> 1; } return cnt; } int func(int n1,int n2) { int c1 = bc(n1); int c2 = bc(n2); if(c1<=c2) return 0; return 1; } int main() { int n, a[...
// ------------------------------------------- // Line // ------------------------------------------- #include "Line.h" Line::Line(const string& line) { // Hint: some of string's member functions might come in handy here // for extracting words. string line_copy=line; vector<Word> words_of_line; string deli...
#include "ApplicationManager.h" #include "Actions\AddSmplAssign.h" #include "Actions\AddVarAssign.h" #include "Actions\AddSOAssign.h" #include "Actions\AddStart.h" #include "Actions\AddEnd.h" #include "Actions\AddRead.h" #include "Actions\AddWrite.h" #include "Actions\AddCondition.h" #include "Actions\AddConnector.h" #...
#include "objectValue.h" namespace json { std::size_t ObjectValue::size() const { return curSize; } const IValue * ObjectValue::itemAtIndex(std::size_t index) const { if (index < curSize) return (const IValue *)((*this)[index]); return getUndefined(); } bool ObjectValue::enumItems(const IEnumFn &fn)...
#include <Arduino.h> #include <unity.h> #include <BintrayClient.h> #include <WiFi.h> const BintrayClient bintray(BINTRAY_USER, BINTRAY_REPO, BINTRAY_PACKAGE); // void setUp(void) { // } // void tearDown(void) { // // clean stuff up here // } void test_wifi_connection(void) { const int RESPONSE_TIMEOUT_MS = 50...
#include "Task.h" #ifndef __TIMER__H__ #define __TIMER__H__ class Timer : public Task { public: Timer(void); ~Timer(void); void run(); float fps; float frameScalar; // scale vectors by this value to acheive frame-rate independant movement. float lastFrame; float frameDifference; float time...
#include "snake.h" #include "../client/engine.h" game::Snake::Snake(sf::RenderWindow *window, sf::Color snake_color){ color = snake_color; alive = true; screen = window; int x = rand.getRandomInt(window->getSize().x / 4, window->getSize().x * 3 / 4); int y = rand.getRandomInt(window->getSize().y / ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * 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. */ #ifndef DOM_DOMSTRINGLIST #define DOM_DOMSTRINGLIST #include "mod...
#include <iostream> #include <glm/gtc/matrix_transform.hpp> #include <GL/glew.h> #include <GL/gl.h> #include "Cube.hpp" #include "ShaderAttributes.hpp" //////////////////////////////////////////////////////////////////////////////// static std::vector<glm::vec3> generate_vertices(glm::vec3 pos, float x_len, float y_l...
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define FOR(a, b, c) for (int a = b; a <= c; ++a) #define FORW(a, b, c) for(int a = b; a >= c; --a) #define pb push_back #define SZ(a) ((int)a.size()) #define int long long const int N = 4e6; const int oo = 1e9; const int mod = 1e9 + 7;...
// Copyright (c) 2020 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) #include <pika/execution/algorithms/execute.hpp> #include <pika/testing.hpp> #include <cs...
#include <stdio.h> #include <iostream> #include <cstdlib> #include "RelOp.h" #include "Record.h" #include "Errors.h" #include "HeapFile.h" #define FOREACH_INPIPE(rec, in) \ Record rec; \ while (in->Remove(&rec)) #define FOREACH_INFILE(rec, f) \ ...
/* TouchKeys: multi-touch musical keyboard control software Copyright (c) 2013 Andrew McPherson This program 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 you...
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2016 RDK Management * * 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 ...
#include <Servo.h> #include "Timer.h" //http://github.com/JChristensen/Timer Servo servo; // create servo object to control a servo Timer t; class KeySequence { static const int LENGTH = 4; static const int TIMEOUT = 3000; int sequence[LENGTH]; int i; unsigned long last_click; p...
#include "stdafx.h" #include "Rect.h" namespace cvfn { Rect::Rect( int x, int y, int width, int height ) :X(x), Y(y), Width(width), Height(height) { } Rect::~Rect(void) { } }
#include"Vec3.hpp" #include"Vec2.hpp" namespace GPEngine { namespace GPMath { Vec3::Vec3() : x(0.0f), y(0.0f), z(0.0f) { } Vec3::Vec3( float _x, float _y, float _z ) : x(_x),y(_y),z(_z) { } Vec3::Vec3(float scalar) : x(scalar), y(scalar) ,z(scalar) { } Vec3::~Vec3() { } Ve...
/* * File: checker.h * * Description: This file contains the public function declarations for the * semantic checker for Simple C. */ # ifndef CHECKER_H # define CHECKER_H # include "Scope.h" Scope *openScope(); Scope *closeScope(); Symbol *defineFunction(const std::string &name, const Type &type); Symbol *dec...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <iomanip> #include <set> #include <climits> #include <ctime> #include <complex> #include <cmath> #include <string> #in...
/**************************************************************** * TianGong RenderLab * * Copyright (c) Gaiyitp9. All rights reserved. * * This code is licensed under the MIT License (MIT). * *****************************************************************/ #pragma once #include "Graphics/Core...
/** * created: 2013-4-6 22:47 * filename: FKCheckNameSvr * author: FreeKnight * Copyright (C): * purpose: */ //------------------------------------------------------------------------ #pragma once //------------------------------------------------------------------------ #include "../FKSvr3Common/FKCommonInc...
#include <iostream> using namespace std; struct node{ // Declararea listei dublu inlantuite int value; node *next, *prev; }; void display_info() // Functie care afiseaza meniul problemei { cout<<"\n1) Adaugare la inceputul listei"; cout<<"\n2) Adaugare la sfarsitul listei"; cout<<"\n3) Adaugare...
#include <iostream> #include <thread> #include <chrono> #include <mutex> #include <thread> #include "BigLexer.h" #include "SmallLexer.h" #include "DataReaderServer.h" #include "LineParser.h" #include "SymbolTable.h" #include "BlockParser.h" #include "DataSender.h" #include <fstream> using namespace std; // create mut...
#include <fstream> #include "jacobi2d_unrolled_2_opt.h" int main() { ofstream in_pix("input_pixels_regression_result_jacobi2d_unrolled_2_opt.txt"); ofstream fout("regression_result_jacobi2d_unrolled_2_opt.txt"); HWStream<hw_uint<64> > t1_update_0_read; HWStream<hw_uint<64> > jacobi2d_unrolled_2_update_0_write;...
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> using namespace std; int main() { freopen("labiec7.inp","r",stdin); freopen("labiec7.out","w",stdout); int n; scanf("%d",&n); for(int i=0;i<n;i++) { for(int j=0...
#include "../include/evaluator.hpp" //#define DEBUG 1 //usar junto com debug da main.cpp evaluator::evaluator (cv::String file_name, float a, float b){ this->index = 0; std::ifstream myfile(file_name.c_str()); std::string linex, liney, linefps; int x, y; std::getline(myfile, linefps); std::istringstream(linef...
#include "MinMaxHierarchy.h" #include <cmath> #include <thread> #include <functional> // Under this threshold stop processing in parallel #define PARALLEL_THRESHOLD 256 MinMaxHierarchy::MinMaxHierarchy(const ImageF& orig) : m_root(orig) { assert(orig.getWidth() == orig.getHeight()); const size_t size = orig.getWid...
#ifndef __residlerProcessor__ #define __residlerProcessor__ #include "BaseProcessor.h" #include "residlerParameterFormat.h" #include "sid_wrapper.h" namespace Steinberg { namespace Vst { namespace residler { //----------------------------------------------------------------------------- class residlerProcessor : pu...
#ifndef BOARD_COM_H #define BOARD_COM_H #include "FreeRTOS.h" #include "PID.h" #include <main.h> #include "drv_can.h" #include "referee.h" //#include "Infantry_Config.h" extern CAN_HandleTypeDef hcan1; extern referee_Classdef Referee; class C_BoardCom { public: void Update( uint8_t sourcePower...
#pragma once //////////////////////////////////////////////////////////////////////////////// #include <cellogram/common.h> #include <vector> #include <string> //////////////////////////////////////////////////////////////////////////////// namespace cellogram { namespace StringUtils { int cellogram_mkdir(const st...
// Created on: 1996-12-05 // Created by: Flore Lantheaume/Odile Olivier // Copyright (c) 1996-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 ...
#include<iostream> #define FOR0(i,n) for(i=0;i<n;i++) #define FOR(i,j,n) for(i=j;i<n;i++) #define FORD(i,j) for(i=j;i>=0;i--) #define MAX(a,b) (a)>(b)?(a):(b) using namespace std; int main() { int H[2002],W[2002],Mi[2002],Md[2002],i,testcases,n,curri,currd,maxi,maxd,j,k; scanf("%d",&testcases); FOR0(...
#include <cassert> #include <cfloat> #include <cmath> #include <cstdbool> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <array> #include <string> #include <unordered_map> #include <ap_int.h> #include <fcntl.h> #include <time.h> #include <un...
//Author: Angelo Gonzales & Avery Vanausdal //Assignment Number: Lab 3 //File Name: backwardsIterative //Course/Selection: COSC 2436 Section 003 //Due Date: 10/11/18 //Instructor: Ku, Bernard //Description: This program takes a text file name and runs that file // thr...
// // 14.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() { double initialBalance, total, monthlyCharge; int noOfChecks; cout<<"Please input your initial balance: "; ...
#ifndef WIDGET_H #define WIDGET_H #include <QWidget> #include <QGraphicsScene> #include <QGraphicsItem> #include <QTimer> #include <QPushButton> #include "figure.h" #include "star.h" QT_BEGIN_NAMESPACE namespace Ui { class Widget; } QT_END_NAMESPACE class Widget : public QWidget { Q_OBJECT public: Widget(Q...
#ifndef UTL_BIT_WINDOW_H #define UTL_BIT_WINDOW_H #include "utl/bit.h" #define BIT_WINDOW_EXP true namespace utl { template<class T = uint32_t> struct bit_window { bit_window() = default; bit_window(T seqn) : high{seqn} {} constexpr T latest() const { return high; } #if (BIT_WINDOW_EX...
/** * Copyright (c) 2021, Timothy Stack * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of condi...
#include <SFML/Graphics.hpp> #include <vector> #include "GameObject.h" #include "Player.h" #include "Obstacle.h" int main() { sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!"); sf::Texture playerTexture; playerTexture.loadFromFile("player.png"); sf::Texture obsTexture; obsTexture.loadFromFile("obst...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2005-2007 Opera Software ASA. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** ** Peter Krefting */ #include "core/pch.h" #include "modules/lo...
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* * !핵심은 두 가지! * !1부터 N까지 모든 수는 중복 없는 정수!, 따라서 오름차순으로 넣으면 1부터 N까지 삽입! * !stack의 top이 수열의 값보다 크면, 원하는 수열을 만들 수 없으므로(여러 번 pop해야 하므로) 불가! * series_i = answer_i = 0 인덱스를 따로 설정. * for(N만큼 반복) { * now(현재 데이터 값) * now를 stack에 push *...
// // GnSimpleArray.h // Core // // Created by Max Yoon on 11. 6. 17.. // Copyright 2011년 __MyCompanyName__. All rights reserved. // #ifndef __Core__GnTSimpleArray__ #define __Core__GnTSimpleArray__ template< class TAlloc, class DataType > class GnTSimpleArray { protected: DataType* mpArray; gtuint mAllocated...