text
stringlengths
8
6.88M
#include "jit4ptx.h" #include "string_operations.hpp" #include <cuda.h> #include <cuda_runtime.h> #include <Windows.h> #include <string> // Check if a file exists inline bool file_exists(const std::string& name) { if (FILE* file = fopen(name.c_str(), "r")) { fclose(file); return true; } el...
#include <iostream> #include "ListaS.h" using namespace std; int main() { ListaS A; A.inserta(1); A.inserta(10); A.inserta(0); A.inserta(5); A.inserta(15); A.muestraTusDatos(); cout << endl; A.borra(-1); A.muestraTusDatos(); cout << endl; A.borra(0); A.muestraTu...
#include<bits/stdc++.h> using namespace std; int main() { int tast, n, r; while(cin >> tast) { while(tast--) { cin >> n; r = n/2; cout << r << " " << n-r << endl; } } return 0; }
#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-6 #define pi acos(-1.0) using namespace std; typedef long long L...
#include <stdio.h> #include <iostream> #include <math.h> #include <algorithm> #include <memory.h> #include <set> #include <map> #include <queue> #include <deque> #include <string> #include <string.h> #include <vector> typedef long long ll; typedef long double ld; typedef unsigned long long ull; const ld PI = acos(-1.)...
#include <assert.h> #include <math.h> #include <algorithm> #include <climits> #include <functional> #include <iostream> #include <numeric> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long using namespace std; int n; vector<vector<int>> adj; struct Solution {...
//program to print all natural numbers from 1 to n as asked by user #include<iostream> using namespace std; //function to print natural numbers int natural(int p,int q) { if(q>p) return 1; else { cout<<q<<endl; natural(p,++q); return 0; } } //initiating driver function int main() { //declar...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @author Arjan van Leeuwen (arjanl) */ #ifndef TOOLKIT_UI_SETTINGS_H #define TOOLKIT...
/* https://www.acmicpc.net/problem/1009 */ #include <iostream> using namespace std; int main(void) { int testCase; cin >> testCase; int** arr = new int*[testCase]; for (int i = 0; i < testCase; i++) { arr[i] = new int[3]; cin >> arr[i][0] >> arr[i][1]; int tmp = arr[i][0]; for (int j = 1; j < arr[i][1]...
/* XMRig * Copyright 2010 Jeff Garzik <jgarzik@pobox.com> * Copyright 2012-2014 pooler <pooler@litecoinpool.org> * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> * C...
//put global includes in 'BasicIncludes' #include "BasicIncludes.h" #include "rand.h" #include "Camera.h" #include "Input.h" #include "Object.h" #include "navMesh.h" #include "Landscape.h" #include "Character.h" #include "Skybox.h" //Function List void Update(double); void GetPositions(); void DecrementTimers(); void...
/* * Copyright (C) 2013 Tom Wong. All rights reserved. */ #ifndef __GT_RECV_BUFFER_H__ #define __GT_RECV_BUFFER_H__ #include "gtobject.h" #include <QtCore/QtGlobal> class QAbstractSocket; GT_BEGIN_NAMESPACE class GT_SVCE_EXPORT GtRecvBuffer : public GtObject { public: explicit GtRecvBuffer(); ~GtRecvBuffe...
#ifndef MYPROJECTMAIN_H #define MYPROJECTMAIN_H #include "BaseEngine.h" #include "header.h" class MyProjectMain : public BaseEngine { public: /** Constructor */ MyProjectMain() : BaseEngine( 6 ) {} int initialTime, finalscore, previoushighscore, numObjects, currentZombies; bool bitten, spawnLock; // Do a...
// 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 "gtest/gtest.h" #include "CryptoNoteCore/Account.h" #in...
#pragma once #include <stdexcept> #include "cow_resource.hpp" #include "Surface.hpp" #include "Texture.hpp" #include "SDL.h" namespace SDL { // C++ wrapper around SDL_Window* using RAII ref counting. struct Renderer { Renderer() {} explicit Renderer(SDL_Renderer* ptr) : res(ptr) {} Renderer(Renderer...
// // Created by gaoxiang on 19-5-4. // #include "myslam/visual_odometry.h" #include <chrono> #include "myslam/config.h" namespace myslam { VisualOdometry::VisualOdometry(std::string &config_path) : config_file_path_(config_path) {} bool VisualOdometry::Init() { // read from config file if ...
#include <iostream> #include <stdlib.h> #include <time.h> using namespace std; void wait() { cout << endl; system("pause"); } struct element { int data; element* next; }; // двусвязный список struct el2 { int data; el2* next; // указатель на след. элемент el2* tail; // указатель на пред. элемент }; struct...
// Copyright (c) 2016 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 ...
#ifndef __ModuleSceneAir_H__ #define __ModuleSceneAir_H__ #include "Module.h" #include "Globals.h" #define NUM_LAYERS 20 struct SDL_Rect; struct SDL_Texture; struct _Mix_Music; struct Mix_Chunk; class ModuleSceneAir : public Module { private: //Background variables int x = 0; int y = 0; //Layers int xLayer...
#include<bits/stdc++.h> using namespace std; int main() { int in = 0; int out = 0; int t, number; cin>>t; while(t--) { cin>>number; if(number>=10 && number<=20) { in++; } else { out++; } } cout<<in<<" in"<<"...
#include<bits/stdc++.h> using namespace std; int binarySearch(int a[], int n, int key) { int start=0, end=n-1, mid=(start+end)/2; while(start<=end && a[mid]!=key) { if(key<a[mid]) end = mid-1; else start = mid+1; mid = (start+end)/2; //if(a[mid]==key...
// // Spring.hpp // w05_h01_strings // // Created by Kris Li on 10/5/16. // // #pragma once #include "ofMain.h" #include "Particle.hpp" class Spring{ public: Spring(); void set(Particle * _A, Particle * _B); void update(); void draw(); float k; float restDist; P...
#include "utility.h" TextFile::TextFile( const QString& fname, const QIODevice::OpenMode& mode ) { if( !fname.isEmpty() ) { open( fname, mode ); } } TextFile::~TextFile() { file.close(); } bool TextFile::open( const QString& fname, const QIODevice::OpenMode& mode ) { bool rv;...
/*Данный алгоритм это реализация метода оптимизации хука-дживса. Он использовался в моей дипломной работе на тему: "Разработка программы оптимизации параметров системы виброудароизоляции конструкции радиоэлектронной аппаратуры" Собственно этот алгоритм и отвечал за оптимизацию. И являлся частью методов класса отвечающ...
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> // Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU L...
#ifndef HXX_IFPARSE #define HXX_IFPARSE #include <vector> #include <fstream> #include "searchpool.hpp" namespace read { enum error : unsigned short { err_not_open = 1, err_parsing_failed = 2 }; using namespace std; search::SearchPool read(const string& path, vector<string>* terms) { ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2009 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef COCOA_DROPDOWN_WINDOW_H #define COCOA_DROPDOWN_WINDOW_H ...
// Aldvm: Ethereum C++ client, tools and libraries. // Copyright 2014-2019 Aldvm Authors. // Licensed under the GNU General Public License, Version 3. #include "ExtVMFace.h" #include <dvmc/helpers.h> namespace dev { namespace dvm { static_assert(sizeof(Address) == sizeof(dvmc_address), "Address types size mismatch")...
// // Created by 张哲华 on 2019/2/28. // #include "GyroFetcher.h"
#include "stdafx.h" #include <iostream> #pragma comment (lib, "..\\Debug\\LP_asm01a.lib") extern "C" ///связ. по типу С, чтобы обойти декорирование в языке С++ при объявлении и определении функций { int _stdcall getmax(int*, int); int _stdcall getmin(int*, int); } int main() { int mas[10] = { -10, 15, ...
//Program Name: Standard Input Stream #include <iostream> #include <string> using std::cin; using std::cout; using std::endl; using std::string; int main() { string name; cout << "Who dare disturb my slumber?"; cin >> name; cout << "Oh, Hello " << name << "!" << endl; }
// Particle Swarm Optimization clear a = [1 2 3 4 5 6]; // %ff = 'testfunctions'; % Objective Function ff = 3; // % Initializing variables popsize = 10; //% Size of the swarm npar = 2; //% Dimension of the problem maxit = 10; %100; //% Maximum number of iterations c1 = 1; //% cognitive parameter c2 = 4-c1; //% socia...
/* 03 Task 2 - Area and Perimeter of Rectangle Write a program, make a Class Rectangle. For a given numbers the program should calculate the area and the perimeter of the Rectangle. I made the task with static Rectungle member and one two static function */ #include <iostream> class Rectungle { public: double ...
#include <SoftwareSerial.h> SoftwareSerial mySerial = SoftwareSerial(0,1); int counter = 0; void setup() { String msg = "AT"; mySerial.begin(9600); Serial.begin(9600); Serial.println("Sending message to serial port"); } void loop() { Serial.println("Start"); delay(1000); //delay(3000); }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <sys/stat.h> #include <semaphore.h> #include <sys/types.h> #include <sys/mman.h> #include <unistd.h> #include <errno.h> using namespace std; #define INTVAL 1 #define ERR -1 #define SHMBUFFLEN 256 sem_t *sem; int shmfd; pid_t pid...
/* replay Software Library Copyright (c) 2010-2019 Marius Elvert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, ...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 2010 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 SYNC_HAVE_PASSWORD_MANAGER #include "mod...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @author Manuela Hutter (manuelah) */ #include "core/pch.h" #...
/* * This file is part of Lua API++ library (https://github.com/OldFisher/lua-api-pp) * distributed under MIT License (http://opensource.org/licenses/MIT). * See license.txt for details. * (c) 2014 OldFisher */ #ifndef LUA_VALUE_HPP_INCLUDED #define LUA_VALUE_HPP_INCLUDED #include "luapp_basetypes.hxx" namespace lua...
#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; const int maxn = 1e...
// API_06_ListCtrlEx.cpp : 애플리케이션에 대한 진입점을 정의합니다. // #include "framework.h" #include "API_06_ListCtrlEx.h" #define MAX_LOADSTRING 100 #define WM_SENDMEMBER WM_USER +1 // 전역 변수: HINSTANCE hInst; // 현재 인스턴스입니다. WCHAR szTitle[MAX_LOADSTRING]; // 제목 표시줄 텍스트입니다. WCHAR szWi...
/******************************************************************************* * filename: C_RandomPatternInitialiser.cpp * description: Implementation of 'RandomPatternInitialiser' class * author: Moritz Beber * created: 2010-06-10 * copyright: Jacobs University Bremen. All rights reserved. *****...
//--------------------------------------------------------------------------- #pragma hdrstop #include "SourceData.h" //--------------------------------------------------------------------------- #pragma package(smart_init) //=========================================================================== void ClassM...
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen ( Kiran ) // 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...
// Definition for singly-linked list. struct SinglyListNode { int val; SinglyListNode *next; SinglyListNode(int x) : val(x),next(NULL) {} };
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTargetSourcesCommand.h" #include <sstream> #include "cmGeneratorExpression.h" #include "cmMakefile.h" #include "cmMessageType.h" #include "cmPolicies.h" #incl...
/* * Events.h * * Created on: Oct 5, 2014 * Author: thuannq */ hfhhgghgghh #ifndef EVENTS_H_ #define EVENTS_H_ #define INFINITE 0xFFFFFFFF #include <pthread.h> class CEvents { public: CEvents(bool bAutoReset = true); ~CEvents(); // int setEvent(); int resetEvent(); bool waitSingleFor...
#include <iostream> using namespace std; struct Node { int data; Node* next; }; Node* newNode(int data) { Node* node = (struct Node*) malloc(sizeof(struct Node)); node->data = data; node->next = NULL; } void insertNode(Node **head,int data) { Node *node = newNode(data); if(!*head) { ...
// Created on: 1993-03-10 // Created by: JCV // 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 GNU Lesser Gen...
// // Created by 송지원 on 2020/05/20. // #include <cstdio> using namespace std; int main() { int n; scanf("%d", &n); printf("%d", n); return 0; }
// Created on: 1993-01-09 // Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN) // 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 i...
// Created on: 1998-01-17 // Created by: Julia GERASIMOVA // 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...
// Copyright 2017 Elias Kosunen // // 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
#include <math.h> #include <array> #include <ctime> #include <random> #include <fstream> #include <cstring> #include "ZArray.h" using namespace std; // Constructors ZArray::ZArray() : GrowArray() {}; // Defaults to zero ZArray::ZArray(int i) : GrowArray(i) {}; ZArray::ZArray(int i, int j) : GrowArray(i, j) {}; //...
// // IrPartition.h // fast_convolution // // Created by Ying Zhan on 1/22/16. // Copyright (c) 2016 Ying Zhan. All rights reserved. // #ifndef __fast_convolution__IrPartition__ #define __fast_convolution__IrPartition__ #include <iostream> #include "vector" #include "cmath" #include "complex" //#include "/Users/c...
#pragma once namespace breakout { enum struct EComponentType : int { None = 0, Sprite = 1, Transform = 2, Movement = 3, Player = 4, PlayerBall = 5, Collider = 6, Particles = 7, SpriteColor = 8, PowerUp = 9, Timer = 10, Health = 11, MAX, }; class BaseComponent { public: int m_compone...
#include "menu.h" #include "ui_menu.h" #include <QPixmap> #include <QPalette> #include <QBitmap> menu::menu(QWidget *parent) : QWidget(parent), ui(new Ui::menu) { //音乐播放 effect = new QSoundEffect (this); effect->setLoopCount(QSoundEffect::Infinite); effect->setSource(QUrl...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* PresidentialPardonForm.cpp :+: :+: :+: ...
#include <bits/stdc++.h> using namespace std; using ll=long long; const int maxn=2000005; struct node{ int l,r,id; node(int a=0,int b=0,int c=0):l(a),r(b),id(c){} }; int pos[maxn]; ll a[maxn]; ll cnt[maxn]; int block; int n,t; vector<node> query; ll ans[maxn]; ll res; template<class T>in...
// // Created by Алексей Ячменьков. // #include "vecc.h" //------------------------------------------------------------------------------------------------ template<typename T, typename A> vector_base<T,A>::vector_base() :elem(alloc.allocate(0)), sz(0), space(0) {} //------------------------------------------------...
#ifndef __Image_h__ #define __Image_h__ // #include <gl/glut.h> // causes error in redefinition of exit() typedef unsigned int GLuint; // An instance of an image hung on a wall somewhere. class Image { public: GLuint textureId; int width, height; // original dimensions, in pixels void inline ini...
#include "stdafx.h" #include "Game.h" #include "MoveButton.h" #include "MoveData.h" #include <iostream> #include <iomanip> Game::Game() { guiInitialized=false; cameraWorks=false; automaticColors=true; r=g=b=0; cameraControl=false; showMask=-1; } Game::~Game() { } bool Game::configure() { ...
// Created on: 1993-04-14 // Created by: Modelistation // 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 GNU ...
#include <iostream> using namespace std; int main() { // int mang[]={1,5,9}; // int *controint=0; // cout<<"\n "<<mang[0]<<" "<<&mang[0]; // controint=&mang[0]; // cout<<"\n "<<*controint<<" "<<controint<<" "<<&controint; // controint=mang;//vi tri dau tien cua mang[0]==mang // cout<<"\n "<<*cont...
#include <systemc.h> #include <tester.h> #include <iostream> #include <fstream> #include <stdlib.h> void tester::testing() { bool t_reset_n; unsigned int t_addr_in_1, t_addr_in_2, t_addr_out, t_opcode; //wait(rand() % 10 + 1, SC_NS); wait(); while(1) { if (in_file >> t_opcode >> t_addr_in_1 >> t_addr_in_2 >>...
/* -*- 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. ** ** Jan Borsodi */ #ifndef SCOPE_TRANSPORT_H #define SCOPE_TRANSPORT_H ...
#include <fstream> #include "jacobi2d_unrolled_4_opt.h" int main() { ofstream in_pix("input_pixels_regression_result_jacobi2d_unrolled_4_opt.txt"); ofstream fout("regression_result_jacobi2d_unrolled_4_opt.txt"); HWStream<hw_uint<128> > t1_update_0_read; HWStream<hw_uint<128> > jacobi2d_unrolled_4_update_0_writ...
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*- * * Copyright (C) 1995-2002 Opera Software ASA. All rights reserved. * * This file is part of the Opera web browser. It may not be distributed * under any circumstances. */ #ifndef XSLT_KEY_H #define XSLT_KEY_H #ifdef XSLT_SUPPORT #include "mod...
#include<iostream> int fib( unsigned int num, int& count, int fibFirst = 0, int fibSecond = 1) { ++ count; if( 0 == num ) { return fibFirst; } if( 1 == num ) { return fibSecond; } return fib ( num - 1, count , fibSecond, fibFirst + fibSecond ) ; } int main() { unsigned int index = 0; int co...
// // This file contains the C++ code from Program 5.10 of // "Data Structures and Algorithms // with Object-Oriented Design Patterns in C++" // by Bruno R. Preiss. // // Copyright (c) 1998 by Bruno R. Preiss, P.Eng. All rights reserved. // // http://www.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs...
#include "demo_scene_manager.h" ////=========================================================================== //! @file demo_scene_manager.cpp //! @brief デモシーン管理用クラス //=========================================================================== //----------------------------------------------------------------------...
#pragma once #ifndef OBJECT3D_H #define OBJECT3D_H #include "Posizione.h" class Object3d { public: Object3d(); Object3d(int id1, bool visible1, Posizione pos1); void setPosizione(Posizione pos); Posizione getPosizione(); bool isVisible(); void setVisible(bool visible1); void setIdTe...
// // e_board.cpp // unblockme_solver // // Created by Alexander G Anderson on 12/16/13. // Copyright (c) 2013 Alexander G Anderson. All rights reserved. // #include "e_board.h" void EBoard::intialize_static(int _L_X, int _L_Y) { L_X = _L_X; L_Y = _L_Y; } /* Builds expanded board from a compressed board ...
class Category_604 { duplicate = 488; }; class Category_642 { duplicate = 488; };
#pragma once #include <SDL2/SDL.h> class Game; class Event { public: Event(); ~Event(); void HandlingEvent( Game& ); private: void handle_event_type( SDL_Event&, Game& ); void handle_event_keydown( SDL_Event&, Game& ); void handle_event_keyup( SDL_Event&, Game& ); void handle_event_mouse_button_down( SDL_...
#include "physicengine.h" #include <algorithm> #include <iostream> #include "abstractphysicpoint.h" using namespace std; namespace sbg { void PhysicEngine::add(shared_ptr<Entity> object) { if (object->has<AbstractPhysicPoint>()) { _objects.insert(move(object)); } } void PhysicEngine::remove(weak_ptr<Entity> ob...
#ifndef TEAMSPRITE_H #define TEAMSPRITE_H #include <SFML/Graphics.hpp> #include "CharacterSprite.h" #include "Team.h" #include <vector> #include <iostream> #include <sstream> #include <string> using std::vector; using std::string; using std::stringstream; using std::cout; using std::endl; class TeamSprite { publ...
// Copyright Vladimir Prus 2002-2004. // 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/program_options/config.hpp> #include <map> #include <stdex...
#ifndef _NETFUND_CONVERT_H_20100313 #define _NETFUND_CONVERT_H_20100313 #include <YouMeCommon/CrossPlatformDefine/PlatformDef.h> #ifdef WIN32 #include <winsock2.h> #else #include <netinet/in.h> #endif //_LINUX_OS_ #ifdef WIN32 #define H2N64(x) ((((x) & 0x00000000000000ff) << 56) | \ (((x) & 0x000000000000...
// Created on: 1993-03-10 // Created by: JCV // 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 GNU Lesser Gen...
/**************************************************************************** ** Copyright (C) 2017 Olaf Japp ** ** This file is part of FlatSiteBuilder. ** ** FlatSiteBuilder 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 S...
#include <iostream> using namespace std; void a() { std::cout << "Func a!" << std::endl; } void b() { std::cout << "Func b! " << std::endl; } void callf(void ()) { f(); } int main(int argc, const char *argv[]) { void (*p)() = &b; callf(p); (*p)(); p = a; p(); callf(p); return 0; }
#pragma once namespace Jaraffe { namespace Component { class Light : public BaseComponent { // **************************************************************************** // Constructor/Destructor) // ---------------------------------------------------------------------------- public: Light(); virtual ~Light(); /...
/*********************************************************\ * Copyright (c) 2012-2018 The Unrimp Team * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including wit...
// // OpenGLPage.xaml.cpp // Implementation of the OpenGLPage.xaml class. // #include "pch.h" #include "OpenGLPage.xaml.h" using namespace TestOpenGL; using namespace Platform; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Windows::Graphics::Display; using na...
#ifndef AOC_25_H #define AOC_25_H namespace AoC_25 { int A() { return -1; } int B() { return -1; } } #endif
// // zSpriteManage.cpp // GetFish // // Created by zhusu on 15/7/30. // // #include "zSpriteManage.h" // // zSpriteManage.cpp // // Created by zs on 14-4-28. // // #include "zSpriteManage.h" #include "Actor.h" zSpriteManage* zSpriteManage::create(const char *name) { zSpriteManage* pRet = new zSpriteManag...
#ifndef CABAL_NUMERICALEXPR_H #define CABAL_NUMERICALEXPR_H #include "Expr.h" class NumericalExpr : public Expr { private: char op; double num1; double num2; public: explicit NumericalExpr(char op, double num1, double num2) : op(op), num1(num1), num2(num2) {}; }; #endif //CABAL_NUMERICALEXP...
#include "stdafx.h" #include "ClubMgr.h" #include "Club.h" #include "Station.h" #include "StringUtils.h" #include "TextFile.h" ClubMgr::ClubMgr() { } ClubMgr::~ClubMgr() { for (auto& pair : m_clubMap) { Club* club = pair.second; delete club; } m_clubMap.clear(); } // Add a station to a cl...
#include "led.h" #include "show.hpp" #include <opencv2/opencv.hpp> #include <boost/asio.hpp> #include <thread> #include <mutex> #include <chrono> #include <random> #if defined(WIN32) #define EXPORT __declspec(dllexport) #elif defined(MAC) #define EXPORT __attribute__((visibility("default"))) #else #defin...
#ifndef __END_SCENE_H__ #define __END_SCENE_H__ #include "cocos2d.h" class End : public cocos2d::Scene { public: virtual bool init() override; static cocos2d::Scene* scene(); // a selector callback void menuCloseCallback(Ref* sender); void toStartScene(Ref* sender); // implement the "static create()" method...
#include"ObjectLocator.hpp" ObjectLocator::ObjectLocator(double contour_threshold) { this->contour_threshold = contour_threshold; } std::vector<cv::Rect> ObjectLocator::DetectObjects(cv::Mat &frame) { std::vector<std::vector<cv::Point>> contours; cv::findContours(frame,contours,CV_RETR_EXTERNAL,CV_CHAIN_AP...
#pragma once #include <mutex> // 定义在这里,不用去引用 struct AVPacket; struct AVFormatContext; struct AVCodecParameters; class XDemux { public: //打开媒体文件,或者流媒体 rtmp http rstp virtual bool Open(const char* url); //空间需要调用者释放 ,释放AVPacket对象空间,和数据空间 av_packet_free virtual AVPacket* Read(); //只读视频,音频丢弃空间释放 virtual AVPacket *...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * Copyright Opera Software 2005, do not distribute. */ #define ENABLE_OP_KEY_CANCEL NO #define ENABLE_OP_KEY_BACKSPACE YES #define ENABLE_OP_KEY_TAB YES #define ENABLE_OP_KEY_CLEAR YES #...
// // GActionDamage.cpp // Core // // Created by Max Yoon on 11. 7. 13.. // Copyright 2011년 __MyCompanyName__. All rights reserved. // #include "GnGamePCH.h" #include "GActionDamage.h" #include "GFileList.h" GActionDamage::GActionDamage(GActorController* pController) : GAction( pController ), mpsMeshO...
#include "Vna.h" #include "RsibBus.h" #include "VisaBus.h" using namespace RsaToolbox; #include <QDebug> #include <QString> #include <QtTest> #include <QSignalSpy> class test_VnaCorrections : public QObject { Q_OBJECT public: test_VnaCorrections(); private: Vna vna; VnaCorrections corrections; ...
#include <iostream> #include <boost/multiprecision/gmp.hpp> #include <boost/multiprecision/cpp_int.hpp> using namespace std; using namespace boost::multiprecision; int main() { //Try switching mpz_int and cpp_int and see which is faster mpz_int x; //cpp_int x; x = 3; for (int i = 0; i < 4; i++) x = pow(x,100);...
#include <iostream> using namespace std; int sugarCal(int sugar) { int box = 0; while(true) { if(sugar % 5 == 0) { box += sugar / 5; } } return box; } int main(){ int sugar; cin >> sugar; cout << sugarCal(sugar) << endl; return 0...
#pragma once #include "Minecraft.h" class ScreenChooser; class LevelRenderer; class GameRenderer; class ParticleEngine; class ExternalServerFile; class Textures; class Font; class LocalPlayer; class MinecraftInputHandler; class Gui; class UIDefinitionStore; class Options; class MusicManager; class MobEffectsLayout; c...
// // Created by roy on 12/13/18. // #ifndef PROJECTPART1_OPENSERVERCOMMAND_H #define PROJECTPART1_OPENSERVERCOMMAND_H #include "Command.h" #include <string> #include <vector> #include "DataReaderServer.h" using namespace std; /** * Open server command implements command, therefore can be executed. * The executi...