text stringlengths 8 6.88M |
|---|
#include "clipboard/clipboard_helper.h"
ClipboardHelper::ClipboardHelper(){
this->clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
}
void ClipboardHelper::copy2Clipboard(gchar* value) {
gtk_clipboard_set_text(this->clipboard, value, strlen(value));
}
|
#include "staticcube.hpp"
StaticCube::StaticCube()
{
std::vector<std::vector<std::vector<int>>> vect(SIZE_X,std::vector<std::vector<int>>(SIZE_Y,std::vector<int>(SIZE_Z,0)));
_static_cube = vect;
vect.clear();
}
StaticCube::~StaticCube()
{
}
void StaticCube::print_My_static_cube()
{
std::cout<<_static_cube[... |
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=//
// Сравнение строк или символов.
// V 1.0
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=//
#include<iostream>
#include<string>
using namespace std;
int main() {
cout << "Enter a first char: ";
... |
/*
camera - class representing an object parsed from .obj files with triangularized faces, also has definition of Face
*/
#pragma once
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include "Vector3.h"
#define NAME_TOKEN "o"
#define VECTOR_TOKEN "v"
#define NORMAL_TOKEN "vn"
#... |
// size_capacity.cpp
// Vector size versus capacity
// A vector's size is the number of elements that it contains and the capacity is the maximum number of elements
// the vector can contain before reallocation.
// The capacity grows in this way so that the user does not have to be actively involved in memory realloca... |
#ifndef _BIVARIATE_POLYNOMIAL_
#define _BIVARIATE_POLYNOMIAL_
#include "Polynomial.h"
class BivariatePolynomial
{
private:
double ** MatrixRepresentation;
int matrixDimension;
int degy,degx;
void Parse(char str[]);
void InitDegs();
public:
double ** getMatrix()
{
return this->Matrix... |
#ifndef DHDEVICE_H
#define DHDEVICE_H
#include <iostream>
#include <QString>
#include <QStandardItem>
#include "dhsdk/dhnetsdk.h"
#include "dhsdk/dhconfigsdk.h"
#include "dhsdk/utility/dhmutex.h"
#include "dhsdk/utility/Profile.h"
#include "camera.h"
#include <opencv2/opencv.hpp>
#include "base64.hpp"
extern voi... |
/**
* created: 2013-4-6 23:09
* filename: FKOutput
* author: FreeKnight
* Copyright (C):
* purpose:
*/
//------------------------------------------------------------------------
#pragma once
//------------------------------------------------------------------------
#include <assert.h>
#include <stdio.h>
#inc... |
#include <iostream>
#include <sstream>
#define CATCH_CONFIG_MAIN
#include "../../../../catch2/catch.hpp"
#include "../Task2. HTML Decode/Decode.h"
SCENARIO("Decode of empty string gives empty string")
{
REQUIRE(Decode("").empty());
}
SCENARIO("Decode string without encoded words gives the same string")
{
REQUIRE(... |
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1e5;
int readInt ()
{
bool minus = false;
int result = 0;
char ch;
ch = getchar();
while (true)
{
if (ch == '-') break;
if (ch >= '0' && ch <= '9') break;
ch = getchar();
}
if (ch ... |
//
// Topping.hpp
// TEST
//
// Created by ruby on 2017. 10. 13..
// Copyright © 2017년 ruby. All rights reserved.
//
#ifndef Topping_hpp
#define Topping_hpp
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
class Topping{
// node field
Topping * next;
// data field
str... |
#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;
int main()
{
int n,u,d;
while (scanf("%d%d%d",&n,&u,&d) != EOF && n)
{
int ans = 0;
while ... |
#include <LiquidCrystal.h>
LiquidCrystal lcd(11, 10, 9, 8, 7, 6);
/*
* <Alert Machine>
* 제작 -
* 상황용 - Serial Monitor
* 현장용 - LCD Monitor
*
*/
int echo = 12;
int trig = 13;
int red = 5;
int yellow = 4;
int green = 3;
int blue = 2;
int arr[6] = {5,4,3,2,12,13};
String title = "Enemy Alert ... |
#include<iostream>
#include<conio.h>
#include<string>
int mainn()
{
string name;
name="khalid";
cout<<name;
getch();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
using ii= pair<ll,ll>;
#define F first
#define S second
#define MP make_pair
#define PB push_back
ll maze[1000][1000];
ll gr[1000][1000];
vector<ii> v[1000001];
ll dist[1000001];
class prioritize {
public: bool operator() (ii p1,ii p2){
... |
#pragma once
#include <cstring>
inline constexpr unsigned int _e(const char *s) {
return *s ? 0 : (*s << 1) ^ _e(s+1);
}
inline constexpr unsigned int operator "" _e (const char *s, const size_t) {
return _e(s);
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 FORMS_TEMPBUFFER8_H
#define FORMS_TEMPBUFFER8_H
/**
... |
#pragma once
#include "GcPropertyEntity.h"
#include "GcPropertyGridCtrl.h"
class GcCollectionEntities
{
protected:
typedef GtTCStringMap<GcPropertyEntityPtr>::Iterator EntitiesIter;
typedef GtTCStringMap<GcPropertyEntityPtr>::Entry Entry;
GtTCStringMap<GcPropertyEntityPtr> mEntities;
GcPropertyGridCtrl* mpRootPro... |
/*****************************************************************
* Copyright (C) 2017-2018 Robert Valler - All rights reserved.
*
* This file is part of the project: DevPlatformAppCMake.
*
* This project can not be copied and/or distributed
* without the express permission of the copyright holder
******... |
#include<stdio.h>
#include<stdlib.h>
struct node{
int data;
struct node* next;
};
void reverse(struct node **head){
struct node *current =*head;
struct node *prev=NULL;
struct node *next=NULL;
while (current != NULL)
{
// Store next
next = current->next;
c... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* AMateria.hpp :+: :+: :+: ... |
vector<int> Solution::solve(vector<int> &A) {
int n = A.size();
vector<int> ans;
if (n == 1)
{
A[0] *= A[0];
return A;
}
int left = -1;
int right = -1;
for (int i = 0; i < n; i++)
{
if (A[i] >= 0) {
left = i;
break;
}
}
... |
#include "CocosGameScene.h"
#include "GameOverScene.h"
#include "CocosSpaceship.h"
#include "CocosPillar.h"
#include "Definitions.h"
USING_NS_CC;
Scene* CocosGameScene::createScene()
{
const auto scene = Scene::createWithPhysics();
// scene->getPhysicsWorld()->setDebugDrawMask(PhysicsWorld::DEBUGDRAW_ALL);
const ... |
#include "core.h"
template<typename Type>
Type sum(int size, int sizec, Type** array, bool& triger)
{
Type _sum = 0;
bool neg;
triger = false;
for (int j = 0; j < sizec; j++)
{
neg = false;
Type _sum_2 = 0;
for (int i = 0; i < size; i++)
{
if (array[i][j] < 0)
neg = true;
_sum_2 += array[i][j];
... |
#include "FenPrincipale.h"
#include "FenCodeGenere.h"
FenPrincipale::FenPrincipale() : QWidget()
{
setGeometry(800, 800, 800, 1000);
//Définition de la classe
m_defClasse = new QGroupBox(QString::fromUtf8("Définition de la classe"), this);
m_infosClasse = new QFormLayout(m_defClasse);
m_nomClasse... |
/* Header file for random number utilities.*/
#ifndef __CC_SHARED_RAND_UTILS__
#define __CC_SHARED_RAND_UTILS__
namespace cc_shared {
// Generate random number in provided range, both inclusive.
int rand_range(int lo, int hi);
} // cc_shared
#endif // __CC_SHARED_RAND_UTILS__
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n, day;
float x;
cin>>n;
while(n--)
{
cin>>x;
day = 0;
while(x>1)
{
x = x/2.0;
day++;
}
cout<<day<<" dias\n";
}
return 0;
}
|
#include <iostream>
#include <vector>
#include <string>
#include <time.h>
#include <set>
using namespace std;
class ChocolateBar
{
public:
bool check(string letters)
{
set<char> word;
char work;
for (int i=0; i<letters.size(); ++i) {
work = letters.at(i);
if (word.find(work) != word.end()){
return f... |
#include <iostream>
#include <conio.h>
#include <stdio.h>
#define MAX 100
using namespace std;
int main()
{
int input[MAX][MAX];
int m,n;
int rows[MAX];
int columns[MAX];
cout<<"Enter M,N: ";
cin>>m>>n;
for(int i=0;i<m;i++)
{
rows[i]=0;
}
for(... |
#include <bits/stdc++.h>
using namespace std;
typedef double ld;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int,int>ii;
const int MAXN=1111;
const int INF=0x7f7f7f7f;
int cases; |
#include <avltree.hxx>
#include "test.hxx"
class AVLTreeTest
: public Test {
protected:
AVLTreeTest()
: tree_()
{}
AVLTree<int> tree_;
};
TEST_F(AVLTreeTest, perform) {
for (int i = 1; i <= 512; ++i) {
tree_.insert(i);
}
// {
// std::vector<int> data{};
// sorter_.perform(data.begin(), dat... |
#ifndef SCHEME_VALUES_NIL_HPP
#define SCHEME_VALUES_NIL_HPP
#include "Utils.hpp"
#include <memory>
#include <string>
class Scheme_value;
class Environment;
class Nil
{
public:
Nil();
std::string as_string() const;
};
#endif // SCHEME_VALUES_NIL_HPP
|
// Created on: 2011-08-05
// Created by: Sergey ZERCHANINOV
// 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... |
#include "Pinyin.h"
namespace wpp {
namespace lang {
char Pinyin::DATA[][50] = {
"\x07\x30 ling2",
"\x00\x4E yi1",
"\x01\x4E ding1 zheng1",
"\x02\x4E kao3",
"\x03\x4E qi1",
"\x04\x4E shang4 shang3",
"\x05\x4E xia4",
"\x07\x4E wan4 mo4",
"\x08\x4E zhang4",
"\x09\x4E san1",
"\x0A\x4E shang4 5:shang5 shang3",
... |
#include "Assembly.h"
#include "Variable.h"
#include <fstream>
#include <iostream>
// Starts the assembly writing process after writing in assembly
void Parsed::MakeAssembly ()
{
for (auto &Statement : this -> Classified) // Ok so get this shit ID
{
if (Statement.Variable)
{
Variable Var;
try
{
V... |
#include "articulonode.h"
#include <cstddef>
ArticuloNode::ArticuloNode()
{
//ctor
articulo = NULL;
next = NULL;
}
ArticuloNode::ArticuloNode(Articulo* articulo)
{
//ctor
this->setArticulo(articulo);
next = NULL;
}
ArticuloNode::~ArticuloNode()
{
//dtor
}
ArticuloNo... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
long N;
int slove(long N) {
std::vector<int> v;
int total = N;
int i = 9;
int relt = 0;
while (i <= 100000) {
v.push_back(i);
i *= 9;
}
i = 6;
while (i <= 100000) {
v.push_back(i);
i *= 6;
}
sort(v.be... |
#pragma once
#include <d3d11.h>
class GraphicsEngine
{
public:
GraphicsEngine();
~GraphicsEngine();
// Initialize the graphics engine and DirectX 11 Device
bool init();
// Release all the resources loaded
bool release();
static GraphicsEngine* get();
protected:
private:
ID3D11Device* m_d3d_device = nullpt... |
#include "Detector.hpp"
namespace RoboDodge
{
Detector::Detector(VideoCapture* icapture, float isurfaceX, float isurfaceY)
{
surfaceX = isurfaceX;
surfaceY = isurfaceY;
capture = icapture;
namedWindow("RoboDodge2d Detector", WINDOW_AUTOSIZE);
Mat firstFrame;
capt... |
#include <iberbar/RHI/D3D11/ShaderReflection.h>
iberbar::RHI::D3D11::CShaderReflectionType::CShaderReflectionType()
: m_Members()
{
}
const iberbar::RHI::IShaderReflectionMember* iberbar::RHI::D3D11::CShaderReflectionType::GetMemberByIndex( int nIndex ) const
{
assert( nIndex >= 0 && nIndex < (int)m_Members.si... |
#pragma once
#include "texture.h"
#include "sprite.h"
#include "singleton.h"
#include "named_vector.h"
#include <cinttypes>
struct ObjectBuffer {
uint32_t VAO = 0;
uint32_t VBO = 0;
uint32_t EBO = 0;
void Bind() const;
static void Unbind();
};
class BuffersImpl : public Singleton {
public:
ObjectBuffer Spri... |
#pragma once
#include <QLabel>
#include <QDate>
#include "ToDoWidgets/todowidget.h"
#include "Priority/priority.h"
#include <QDebug>
class TaskWidget : public ToDoWidget
{
public:
TaskWidget(importanceDegree taskImportance = lightly);
TaskWidget(const TaskWidget& other);
TaskWidget& operator=(const Tas... |
// Created on: 2011-03-06
// Created by: Sergey ZERCHANINOV
// 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... |
// Copyright (c) 2007-2021 Hartmut Kaiser
// Copyright (c) 2016 Agustin Berge
//
// 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>
#in... |
#define analogPin 15
#define AMOSTRAS 50
int Pressao;
int numbersI[AMOSTRAS];
int analogR;
void setup() {
pinMode(analogPin, INPUT);
Serial.begin(115200);
}
void loop() {
analogR = analogRead(analogPin)*100;
Pressao = filtroMediaMovel();
Serial.print(analogR);
Serial.print(" ");
Serial.println(Pres... |
#include "SimulatorFactory.h"
SimulatorFactory::SimulatorFactory(json &_project_json, json &_simulation_json){
project_json = _project_json;
simulation_json = _simulation_json;
// Aqui se podrian determinar los parametros globales que seran usados inter training
loadScenario();
}
SimulatorFactory::SimulatorFactor... |
#include "vertexinterface.h"
VertexInterface::VertexInterface(int xx, int yy, int zz)
{
}
VertexInterface::~VertexInterface()
{}
VertexInterface::VertexInterface()
{}
|
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int n;
int matrix[20][20];
int ret = 987654321;
vector<int> teamRed;
vector<int> teamBlue;
void calculate()
{
int powerRed = 0;
int powerBlue = 0;
/* _DEBUG */
if (teamRed.size() != teamBlue.size())
{
cout << "Te... |
#include <ObjectPoolManager.h>
using namespace breakout;
ObjectPoolManager::ObjectPoolManager()
{
}
ObjectPoolManager::~ObjectPoolManager()
{
}
ObjectPoolManager& ObjectPoolManager::Get()
{
static ObjectPoolManager objectPoolManager;
return objectPoolManager;
} |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<ll,ll>
#define N 200005
#define PI 3.1415926535
int main()
{
long q,k;
cin>>q>>k;
vector<long long> v3;
while(q--)
{
long n,x,y;
long long p;
cin>>n;
switch(n)
{
... |
#pragma once
#include <string>
#include <uv.h>
#include "lock.h"
#include "common_def.h"
#define UDP_BUF_MAX_SIZE (1000)
namespace sj
{
unid_t Sockaddr2Unid(const sockaddr * addr)
{
return *(unid_t *)addr;
}
std::string GetErrorInfo(int err_code)
{
if (err_code == 0)
{
... |
#include "Resource.h"
#include <rend/rend.h>
//! The Texture class. The class where images for meshes and GUI are stored
/*!
This class is for any images you need for texturing a Mesh or desplaying GUI.
Texture is a child of Resource so please use the Resources class to load one in.
*/
class Texture : public Resour... |
#include <iostream>
#include <cryptopp/osrng.h>
#include <cryptopp/sha.h>
#include <exception>
#include <sstream>
#include <cstring>
#include "converter.h"
#include "pbkdf2.h"
namespace
{
byte first2lastBit( const byte & b )
{
byte out= b & ((byte) 1 );
out <<= 7;
... |
#pragma once
#include <iostream>
#include <opencv2/opencv.hpp>
#include <vector>
#include <fstream>
#include <string>
void get_data_and_name(cv::Mat&data, std::vector<std::string>&feature_name_v,const std::string path = "./data/featureFolder/"); |
#pragma once
#ifndef _PROJECT_RASTERIZATION_
#define _PROJECT_RASTERIZATION_
#include "../Project.h"
#include <vector>
#define POINT_SIZE 7
#define WIN_W 105
#define WIN_H 105
using namespace std;
struct Line {
int A, B, C;
Line(int x1, int y1, int x2, int y2) {
A = y2 - y1;
B = x1 - x2;
C = x2 * y1 - x1 * y2... |
#ifndef VNAPULSEGENERATORTEST_H
#define VNAPULSEGENERATORTEST_H
#include <GenericBus.h>
#include <VnaPulseGenerator.h>
#include <VnaTestClass.h>
#include <QObject>
#include <QString>
class VnaPulseGeneratorTest : public RsaToolbox::VnaTestClass
{
Q_OBJECT
public:
explicit VnaPulseGeneratorTest(RsaToolbox::Co... |
// Created on: 1992-08-26
// Created by: Remi GILET
// 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 Les... |
// particle.cpp
#include <iostream>
#include "BlobCrystallinOligomer/particle.h"
namespace particle {
using std::cout;
Particle::Particle(int index, int type, vecT pos, Orientation ore,
CuboidPBC& pbc_space):
m_ore {ore},
m_trial_ore {ore},
m_index {index},
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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.
**
*/
#ifndef COREVIEW_LISTENERS_H
#define COREVIEW_LISTENERS_H
clas... |
// MainFrm.h : CMainFrame
//
#include "SideDialog.h"
#pragma once
class CMainFrame : public CFrameWnd
{
protected: // serialization
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
//
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
// virtual void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hSysMenu);
//... |
// https://stackoverflow.com/a/495056/5832619
template <typename T>
TreeNode<T>::TreeNode(const T& c_value) :value{c_value} {}
template <typename T>
TreeNode<T>* TreeNode<T>::get_left() const {
return children.first;
}
template <typename T>
TreeNode<T>* TreeNode<T>::get_right() const {
return children.second... |
#ifndef RVMESH_H
#define RVMESH_H
#include "rvbody.h"
class RVMesh : public RVBody
{
public:
RVMesh();
~RVMesh() override;
void initializeBuffer() override;
void draw() override;
void setVertices(QVector<RVVertex> *vertices);
void setIndices(QVector<uint> *indices);
protected:
QVector<R... |
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
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 a... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2008 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#include "core/pch.h"
#if defined(_NA... |
#pragma once
#include "../../Toolbox/Toolbox.h"
#include "../Renderer/Renderer.h"
#include "Attachement/FramebufferAttachement.h"
#include "../Texture/Texture.h"
#include <unordered_map>
#include <memory>
#include <stack>
namespace ae
{
/// \ingroup graphics
/// <summary>
/// Offscreen render target.
/// </summ... |
#include "odb/server_capi/server-app.h"
#include <cassert>
#include "odb/server/server-app.hh"
// extern "C" {
void odb_server_app_init(odb_server_app_t *app, odb_api_builder_f api_builder,
void *arg) {
auto cxx_app = new odb::ServerApp([api_builder, arg]() {
odb_vm_api_data_t data;
... |
//
// Created by pierreantoine on 11/01/2020.
//
#pragma once
#include <cstdlib>
typedef struct ast *astptr;
typedef struct symbol *symbolptr;
typedef struct symlist *symlistptr;
extern int yylineno;
void yyerror(const char *s, ...);
extern int yylex (void);
struct symbol
{
char *name;
double value;
... |
// Plot BSM Z' Monte-Carlo kinematics.
//
// Created by Samvel Khalatyan, Apr 14, 2011
// Copyright 2011, All rights reserved
#ifndef BSM_MC_ZPRIME_KINEMATICS
#define BSM_MC_ZPRIME_KINEMATICS
#include <string>
#include <boost/shared_ptr.hpp>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Fram... |
#ifndef CREATESOLVER_H_
#define CREATESOLVER_H_
#include <iostream>
#include <sstream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string>
#include <vector>
using namespace std;
//From MineSweeperSolver.cpp.
struct mssv{
string test_dir;
string lang_def;
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*-
**
** Copyright (C) 2009-2010 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_WW_OBJECT_H
#define D... |
#include <iostream>
using std::cout;
using std::endl;
int cubo(int);
int cubo2(int *);
void convertirMayusculas(char *);
void convertirMayusculas2(char *);
void imprimir(const char *);
int main()
{
int *aPtr;
char palabra[] = {'H', 'o', 'l', 'a', '\0'};
convertirMayusculas(palabra);
cout << palabra ... |
#include <iostream>
int main(void)
{
int num1, num2;
while (scanf("%d %d", &num1, &num2) != EOF)
{
printf("%d\n", num1 + num2);
}
return 0;
} |
#ifdef WIN32
#include <windows.h>
#endif
#include "../mde.h"
#include <string.h>
#include <stdio.h>
#define MDE_SCREEN_W 800
#define MDE_SCREEN_H 600
void InitTest(MDE_Screen *screen);
void ShutdownTest();
void PulseTest(MDE_Screen *screen);
class TestWindow : public MDE_Screen
{
public:
TestWindow();
~TestWindow... |
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
#define int long long int
#define ld long double
#define F first
#define S second
#define P pair<int,int>
#define pb push_back
#define endl '\n'
const int N = 1e5 + 5;
vector <int> Graph[N];
bool visited[N] = {false};
ve... |
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* 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
* ... |
//
// nehe02.h
// NeheGL
//
// Created by Andong Li on 8/28/13.
// Copyright (c) 2013 Andong Li. All rights reserved.
// implement NeHe tutorials lesson 1
//
#ifndef NEHE02_H
#define NEHE02_H
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
#include <iostream>
#include <stdlib.h>
#include <s... |
#define cpoi const Point&
typedef double ld;
const ld pi=acos(-1);
const ld EPS=1e-6;
inline int sgn(ld a){return a<-EPS?-1:a>EPS;}
struct Point{
ld x,y;
Point(){}
Point(ld a,ld b):x(a),y(b){}
bool operator<(cpoi p)const{
int c=sgn(x-p.x);
if(c){return c==-1;}
return sgn(y-p.y)=... |
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
typedef long long LL;
typedef unsigned long long ULL;
#define PI 3.141592653589... |
#ifndef MINER_OWNED_STATES_H
#define MINER_OWNED_STATES_H
//------------------------------------------------------------------------
//
// Name: MinerOwnedStates.h
//
// Desc: All the states that can be assigned to the Miner class
//
// Author: Mat Buckland 2002 (fup@ai-junkie.com)
//
//---------------... |
#include <bits/stdc++.h>
using namespace std;
const int inf = 1e7;
int main(){
int n, m;
cin >> n >> m;
vector<int> dist(n+1, inf);
vector<vector<pair<int,int>>> graph(n+1);
for(int i=0;i<m;i++){
int u,v,w;
cin >> u >> v >> w;
graph[u].push_back({v,w});
graph[v].push_back({u,... |
#ifndef TEST_GTE_H
#define TEST_GTE_H
// used for testing GTE
#include <GTE.h>
#include <Memory.h>
namespace test
{
class GTEtestbench
{
private:
gte *device;
word instruction;
public:
GTEtestbench(gte *test_device) : device(test_device), instruction(0) {}
// construct instruction
... |
#include <iostream>
#include "utils.hpp"
#include "simObj.hpp"
int main(int argc, char const *argv[])
{
simObj so;
so.run();
return 0;
}
|
#include "ch.h"
#include "hal.h"
#include "stm32f4xx_conf.h"
#include "comm_usb.h"
#include "bno055.h"
#include "controller.h"
#include "chprintf.h"
#include <stdio.h>
#include <string.h>
#include "math.h"
int main(void) {
halInit();
chSysInit();
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
R... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2008 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 "platforms/mac/util/LanguageCodes... |
#pragma once
#include "framework.h"// <string> <cstring> <string.h>
class Carcls{
private :
char* m_cpName;
int Speed;
int fuelGauge;
int hashV;
static bool isFuelEmpty(int fuel);
public :
static int CarCnt; // static member != instance member
/* 데이터 초기화 : 생성자 (Constructor) */
Carcls();
Carcls(const ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2008 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author spoon / Patricia Aas (psmaas)
*/
#include "core/pch.h"... |
/////////////////////////////////////////////
//Lab0.cpp
//Eron Lake
//ejlake@ucsc.edu
//CMPS104A
//Program for introduction/refresher on c++/c
//////////////////////////////////////////////
//include statements
#include <iostream>
#include "myclass.h"
//main function
int main()
{
MyClass new_man;
//prints "Hello... |
/*
Petar 'PetarV' Velickovic
Data Structure: Trie
*/
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <co... |
#pragma once
namespace worldlib
{
//////////////////////////////////////////////////////////////////////////////
/// \file SFC.hpp
/// \brief Contains various functions for working with the SFC.
///
/// \details Please note that while there are routines for getting data from a ROM, there are no routines for setting i... |
//
// Created by 钟奇龙 on 2019-04-15.
//
#include <iostream>
#include <map>
using namespace std;
class Node{
public:
int data;
Node *next;
Node *random;
Node(int x):data(x),next(NULL),random(NULL){
}
};
Node* copyListWithRand(Node *head){
map<Node*,Node*> node_map;
Node *cur = head;
wh... |
// RsaToolbox
#include "Vna.h"
using namespace RsaToolbox;
// Qt
#include <QCoreApplication>
#include <QDir>
void main()
{
Vna vna(ConnectionType::VisaTcpConnection, "127.0.0.1");
// Start from instrument preset
vna.preset();
vna.pause();
// Channel must have harmonically-
// spaced frequ... |
/* Link list Node
struct Node
{
int data;
struct Node* next;
Node(int x){
data = x;
next = NULL;
}
};
*/
/*You are required to complete below method*/
Node* deleteNode(Node *head,int x)
{
// only gravity will pull me down
// Delete a Node in Single Linked List
No... |
#ifndef HEADER_CURL_ADDRINFO_H
#define HEADER_CURL_ADDRINFO_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* ... |
#include <iostream>
using namespace std;
void combination(int member[],int k,int n)
{
if(k==-1){
for(int i=0;i<n;i++)
{
if(member[i])cout<<i+1;
}
cout<<endl;
}else
{
member[k]=1;
combination(member,k-1,n);
member[k]=0;
combination... |
#ifndef IMGTABLE_H
#define IMGTABLE_H
#include <Fl/Fl_Table.h>
class ImgTable : public Fl_Table
{
public:
/** Default constructor */
ImgTable(int X, int Y, int W, int H, const char* l = 0);
/** Default destructor */
virtual ~ImgTable();
Fl_Color cell_bgcolor; // color of cell's bg color
Fl_Color cel... |
//此题为并查集的模板题,
//在模板的基础上添加了判断是否为敌人的dd数组
//如果输入的x,y为敌人,则他们分别加入数组中
//储存的y,x的敌人所在的集合
//同时敌人数组赋值为x,y;
#include<cstdio>
#include<iostream>
using namespace std;
int pre[2010];//存老大
int dd[2010];//存敌人
int find(int x)
{
if(pre[x]==x)
return x;
else
return pre[x]=find(pre[x]);
}
void join(int x,int y... |
// Created on: 1992-11-10
// Created by: Jacques GOUSSARD
// 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 G... |
#ifndef PQUEUE_ADT_
#define PQUEUE_ADT_
template<class T>
class PQueueADT
{
public:
virtual bool isEmpty() const = 0;
virtual bool enqueue(const T& newEntry) = 0;
virtual bool dequeue(T& FrontEntry) = 0;
virtual bool peek(T& FrontEntry) const = 0;
virtual ~PQueueADT() { }
};
#endif |
#include "User.h"
#include "Value.h"
#include "Use.h"
using namespace LLVM;
User::User(llvm::User *base)
: base(base)
, Value(base)
{
}
inline User ^User::_wrap(llvm::User *base)
{
return base ? gcnew User(base) : nullptr;
}
User::!User()
{
}
User::~User()
{
this->!User();
}
Value ^User::getOperand(unsigned i)
{
... |
#include "DynamicObjectFactory.h"
#include "DynamicObjectMagicRayModel.h"
#include "DynamicObjectMagicRayView.h"
#include "DynamicObjectMagicRayLogicCalculator.h"
#include "DynamicObjectMagicRayController.h"
//08/09/12the creation is simplistic at the moment because I only create magic rays. More magic TO_DO
DynamicOb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.