text stringlengths 8 6.88M |
|---|
/* Adventure 1
by Nathan Moehring */
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <thread>
#include <chrono>
#include <string>
using namespace std;
int main() {
//Intro and setup
cout << " Welcome, player!\n Enter debug mode (y/n)?\n >>> ";
string user_input;
cin >> user_inp... |
//
// ofxIldaPolyProcessor.h
// ofxILDA demo
//
// Created by Memo Akten on 21/05/2013.
// Modified by Omer Shapira http://omershapira.com
//
/**
* TODO:
* * Create a path resampler based on curvature
* * Create a polygon connector
*/
#pragma once
#include "ofxIldaPoly.h"
namespace ofxIlda {
class Poly... |
#include <wiringPi.h>
#include <iostream>
#include <math.h>
#include <fstream>
#include <string>
#include <ctime>
typedef unsigned char uchar;
typedef unsigned int uint;
const int ADC_CS = 0;
const int ADC_CLK = 1;
const int ADC_DIO = 2;
uchar get_ADC_Result(void) {
uchar i;
uchar dat1=0, dat2=0;
... |
//FONDAMENTI DI INFORMATICA, elaborato
//----------------------------librerie
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm> //libreria che contiene algoritmi standard già pronti
//per essere usati(funzioni già pronte)
... |
#include "GrafoMatriz.h"
// agregar vertice
void GrafoMatriz::agregarVertice(QString v)
{
// si hay campo y v no est'a en el grafo
if (cantidadVertices < max && indexOfVertice(v) == -1){
vertices[cantidadVertices] = v;
cantidadVertices++;
}
}
// index de un vertice
int GrafoMatriz::indexOf... |
#pragma once
#include "Component.h"
#include "Animation.h"
#include "Enums.h"
#include "Constants.h"
/*
Animator is responsible for holding the current animation of a GameObject
and pass the correct sprite sheet position to be rendered to SpriteRenderer,
based on the GameObject's state.
*/
class Orientation;
cl... |
//
// Created by gurumurt on 10/15/18.
//
#ifndef OPENCLDISPATCHER_POLICY_H
#define OPENCLDISPATCHER_POLICY_H
#endif //OPENCLDISPATCHER_POLICY_H
#include <iostream>
#include <bitset>
#include <boost/chrono.hpp>
#include <iomanip>
#include <map>
#include <vector>
#include <list>
#include "agents.h"
using namespace st... |
/**
* @file CLUtils.h
* @author Krzysztof Ciba (krzysztof.Ciba@NOSPAMagh.edu.pl)
* @date 04/12/2006
* @brief Variuos utility classes, exceptions etc.
*/
#ifndef CLUTILS_H
#define CLUTILS_H
// begin of CLUE chunk
namespace CLUE {
/**
* @class CLUException
* @author Krzysztof Ciba (Krzysztof.Ciba@NOSPAMagh.e... |
#ifndef _DEMON_H
#define _DEMON_H
#include "Enemy.h"
#include "Path.h"
#include "Globals.h"
enum state_demon {
IDLE_DEMON,
CIRCULAR_ATTACK,
FIRE_WHEELS,
SHOT_FIRE_WHEELS,
CIRCULAR_ATTACK_2
};
class DEMON : public Enemy {
private:
iPoint original_pos;
Path path;
Animation idle;
Animation circular_shot;... |
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <algorithm>
#include <sstream>
#include <set>
#include <cmath>
#include <map>
#include <stack>
#include <queue>
#include <stdio.h>
#include <string.h>
using namespace std;
class AdditionGame {
public... |
/*
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: Tiffany Huang
*/
#include <random>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <math.h>
#include <iostream>
#include <sstream>
#include <string>
#include <iterator>
#include "particle_filter.h"
using namespace std;
... |
// SPDX-FileCopyrightText: 2021 Samuel Cabrero <samuel@orica.es>
//
// SPDX-License-Identifier: MIT
#include <Arduino.h>
#include <SPI.h>
#include <Buzzer.h>
#include <Comm.h>
#include <WiFi.h>
#include <Log.h>
#include <UMailer.h>
#include "config.h"
#include "keys.h"
static void deadLed() {
while (1) {
delay(10... |
//**************************************************************************
//
// File......... : ConfigReader.h
// Project...... : VR
// Author....... : Liu Zhi
// Date......... : 2018-10
// Description.. : head file of the class Confi... |
#include <iostream>
#include "Fraction.h"
using namespace std;
void Fraction::display() const { // 인쇄하기
cout << numerator;
cout << "/";
cout << denominator;
}
|
#pragma once
#include "q_A.h"
class q_publ : public q_A {
public:
void calc();
void print();
void new_k(int num);
void new_a(elem*value);
void new_b(elem*value);
};
|
// Created on: 1992-09-01
// 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... |
#include <vector>
#include <unordered_set>
#include <string>
class TwentyFourSolver {
public:
std::vector<std::string> Solve24(std::vector<int>& nums) {
double eps = 1e-6;
std::vector<char> ops{'+', '/', '-', '*', '^'};
std::vector<std::string> output;
std::vector<std::st... |
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Registro.h"
#include "DLaborales.h"
#include "Clases.h"
#include "TablasDatos.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma re... |
// Temporary interface for testing
#include "boardrep.hxx"
#include "movegen.hxx"
#include "moves.hxx"
#include "search.hxx"
#include <iostream>
#include <string>
using namespace std;
MoveRep ReadMove( Position& );
void DisplayBoard( const Position& );
void WriteSquare( int );
string WriteNotation( MoveRep, Positi... |
/***********************************************************************
h£ºIRenderer
desc: transfer data to Graphic memory
and use gpu to render
************************************************************************/
#pragma once
namespace Noise3D
{
//some interfaces must be i... |
/** @file
* IPRT - C++ Memory Resource Management.
*/
/*
* Copyright (C) 2006-2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of t... |
#define ACR_FLASHLIGHT class FlashLight\
{\
color[] = {0.9, 0.9, 0.7, 0.9};\
ambient[] = {0.1, 0.1, 0.1, 1.0};\
position = "flash dir";\
direction = "flash";\
angle = 30;\
scale[] = {1, 1, 0.5};\
brightness = 0.1;\
}
#define ACR_M203 muzzles[] = {this, M203Muzzle};\
handAnim[] = {"OFP2_ManSkeleton","\fhq_reming... |
#pragma once
#include <cstddef>
#include <string>
#include <vector>
#include "../ConfigStructs.h"
namespace ESP
{
void render() noexcept;
void drawGUI() noexcept;
json toJSON() noexcept;
void fromJSON(const json& j) noexcept;
void scheduleFontLoad(std::size_t index) noexcept;
bool loadSchedul... |
#include <bits/stdc++.h>
using namespace std;
struct tNode{
tNode *left;
tNode *right;
int data;
tNode(int x):data(x),left(NULL),right(NULL){}
};
class Solution{
public:
//µÝ¹é
bool judge(tNode *root1,tNode *root2){
if(!root1 && !root2){
return true;
}
if(!ro... |
#include "qt-tools/msg_event.h"
msg_event::~msg_event()
{
}
|
#pragma once
#include "vector.h"
#include "colors.h"
class Vertex
{
public:
vec4f pos;
vec4f normal;
vec4f color;
public:
Vertex() = default;
/*Vertex(const vec4f& pos)
:
pos(pos)
{}
Vertex(const vec4f& pos, const Vertex& src)
:
color(src.color),
pos(pos)
{}*/
Vertex(const vec4f ... |
//Turns the DEFINE_GUID for EventTraceGuid into a const.
#define INITGUID
//#include <Winsock2.h>
//#include <WS2tcpip.h>
//#pragma comment(lib, "ws2_32.lib")
#pragma warning(disable:4996)
#include <windows.h>
#include <stdio.h>
#include <wbemidl.h>
#include <wmistr.h>
#include <evntrace.h>
#include... |
#pragma once
namespace SensoresLeituras {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Sumário para MyForm
/// </summary>
public r... |
// Copyright (c) 2007-2021 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <pika/config.hpp>
#include <functional>
#include <type_tr... |
#pragma once
#include "plbase/PluginBase.h"
#include "CVector.h"
#pragma pack(push, 4)
class PLUGIN_API CCrimeBeingQd
{
public:
unsigned __int32 m_dwCrimeType;
unsigned __int32 m_dwCrimeId;
unsigned __int32 m_dwStartTime;
CVector m_vCoors;
unsigned __int8 m_bAlreadyReported;
unsigned __int8 m_... |
#ifndef DISPLAY_H
#define DISPLAY_H
class Display
{
public:
Display();
virtual ~Display();
protected:
private:
};
#endif // DISPLAY_H
|
// Created on: 1997-03-26
// 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 ... |
#pragma once
#include <iberbar/Utility/Platform.h>
namespace iberbar
{
class Ascii_6Bit
{
public:
// encodes ASCII characters to 6bit encoding
static constexpr unsigned char encoding_table[] = {
/* ..0 ..1 ..2 ..3 ..4 ..5 ..6 ..7 ..8 ..9 ..A ..B ..C ..D ..E ..F */
... |
#include <d3d11.h>
#include <dxgi.h>
#include <engine/std.h>
#include <SDL2/SDL_syswm.h>
#include <core/render_context.h>
struct PlatformPacket {
IDXGISwapChain *swap_chain;
ID3D11Device *device;
ID3D11DeviceContext *device_context;
ID3D11RenderTargetView *render_target_view;
ID3D11Debug *debug_interface;
ID3D11... |
#include "stdafx.h"
#include "Model.h"
bool Model::_isInputLayoutCreated = false;
bool Model::_isInputLayoutSetted = false;
Model::Model() { }
void Model::OnInitRenderer(ComPtr<ID3D11Device> d3dDevice) {
// Input Layout
if (!_isInputLayoutCreated) {
D3D11_INPUT_ELEMENT_DESC inputElementDesc[]{
{ "POSITION", ... |
#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;
const int INF = 1 << 28;
int tree[801000];
void push(int p)
{
tree[p] = max(tree[p*2],tree[p*2+1])... |
#include <iostream>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/Event.h"
class Dummy : public edm::EDAnalyzer {
public:
explicit Dummy(const edm::ParameterSet&);
~Dummy();
private:
int counter;
... |
#pragma once
#include "SDL.h"
#include "SDL_image.h"
class Entity {
public:
Entity(float p_x, float p_y, float p_currentFrameW, float p_currentFrameH);
Entity(float p_x, float p_y, SDL_Texture* p_tex);
Entity(float p_x, float p_y, SDL_Texture* p_tex, int hit_P, int score);
float getX();
float getY... |
// SettingWnd.cpp: implementation of the CSettingWnd class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "BrowserHooker.h"
#include "SettingWnd.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#def... |
#include "Graphics/Image.h"
#include <stb_image.h>
#include <iostream>
bool Image::loadFromFile(const char* filename)
{
m_image = stbi_load(filename, &m_width, &m_height, &m_channels, 0);
if (!m_image)
{
fprintf(stderr, "Couldn't load %s\n", filename);
return false;
}
return true;
}
int32_t Image::width() ... |
// Created on: 1993-03-24
// Created by: Philippe DAUTRY
// 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 <cmath>
#include <specex_psf.h>
#include <specex_psf_proc.h>
#include <specex_spot.h>
#include <specex_message.h>
#include <specex_image_data.h>
#include <specex_fits.h>
#include <specex_trace.h>
static void _AddRow2(specex::FitsTable& table,const string& PARAM, unbls::vector_double& coeff, int legdegx, int ... |
#include "encoder.h"
#include <iostream>
serpent::encoder::encoder(std::string const& key) {
if (key.size() > 32 || key.size() < 8) {
throw std::runtime_error("Wrong key size");
}
std::bitset<256> real = convert_key(key);
generate_keys(real, keys);
}
std::bitset<128> serpent::encoder::encode(... |
/*Code to read the sensor data in digital counts,
and convert it to uva intensity (mW/m^2),
and then serially packet the data and serially send it to the NSL bus
The EM (Engineering model and realterm is used to view data.
Data is two bytes in mW/m^2 appended with zeroes to make the packet to be 35 bytes for
Seria... |
#ifndef SRC_DATA_H
#define SRC_DATA_H
#include <cstring>
#include <string>
#include <utility>
#include <vector>
#include "src/lock.h"
#include "src/sampler.h"
#include "src/util.h"
#include "src/word_table.h"
static const size_t BUF_SIZE = 102400;
enum WeightType { WEIGHT_FREQ = 0, WEIGHT_INDGREE = 1 };
template <... |
#pragma once
#include "Constantes.h"
/* Beginning program parameter
*/
namespace Param
{
const int screen_width = 1024; // screen width
const int screen_height = 1024; // screen height
const int texture_width = 2048; // texture width
const int texture_height = 2048; // texture height
const int MirrorBounce = 6; ... |
//By SCJ
//#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define maxn 200005
#define MOD 1000000007
int P[maxn]={1},dep[maxn];
vector<int> G[maxn];
bool used[maxn];
int cnt=0,circle;
void traval(int v)
{
used[v]=1;cnt++;
for(int i:G[v])
if(used[i]==0) traval(i);
}
void dfs(int v,... |
#include <windows.h> // Include all the windows headers.
#include <windowsx.h> // Include useful macros.
#include <commctrl.h>
#include <strstream>
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment (lib,"Gdiplus.lib")
// Paint Tool library
#include "h\canvas.h"
#include "h\line.h"
#include "h\rectangle.h"... |
#include <SD.h>
#include <SparkFun_ADXL345.h>
ADXL345 adxl = ADXL345();
int TAPS[120]={0};
void setup()
{
int x, y, z, inc;
Serial.begin(9600);
Serial.println("Initializing SD card...");
if (!SD.begin(10))
Serial.println("Card failed, or not present");
else {
Serial.println("card initialized.")... |
/******************************************************/
// THIS IS A GENERATED FILE - DO NOT EDIT //
/******************************************************/
#line 1 "/Users/gkujawsk/Documents/PlatformIO/Projects/enc/src/enc.ino"
/*
* Project enc
* Description:
* Author:
* Date:
*/
#include "Particl... |
/*
** MenuInGameModel.hpp for cpp_indie_studio in /home/jabbar_y/rendu/cpp_indie_studio/MenuInGameModel.hpp
**
** Made by Yassir Jabbari
** Login <yassir.jabbari@epitech.eu>
**
** Started on Mon May 08 16:15:32 2017 Yassir Jabbari
// Last update Wed May 31 14:36:59 2017 Stanislas Deneubourg
*/
#ifndef CPP_INDIE_STU... |
#ifndef CPP_FASTREADER_H
#define CPP_FASTREADER_H
#include <iostream>
#include <string>
#include "Seq.h"
class Reader {
protected:
/**
* Pointeur sur fichier, permet de lire le fichier
*
* @property
*/
std::istream *file_ptr;
public:
/**
* Retourne si un charactere donnée est un... |
/**
* @file AudioDevice.h
* @brief Header file for Engine::AudioDevice
*
* @author Gemuele (Gem) Aludino
* @date 09 Dec 2019
*/
/**
* Copyright © 2019 Gemuele Aludino
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated ... |
// Created on: 1993-12-02
// Created by: Jacques GOUSSARD
// 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 G... |
#ifndef Factura_h
#define Factura_h
using namespace std;
class Factura{
public:
Factura();
int getNumArt();
int getCant();
string getNombre();
double getPrecio();
void setNumArt(int);
void setCant(int);
void setNombre(string);
void s... |
// ********************* Match in bipartite graph **********************
const int maxn = 1010;
int who[maxn];
bool was[maxn];
vector<int> g[maxn];
bool go(int v){
if (was[v]) return false;
was[v] = 1;
for (int p : g[v]) {
if (who[p] < 0 || go(who[p])) {
who[p] = v;
return t... |
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int n, i, j, m, count=1,a[10000];
cout << "Enter 2 no";
cin >> i >> j;
for (n=i; n<=j; n++)
{
m = n;
while(m!=1)
{
if (m%2==0)
{
m = m/2;
}
else
{
m = 3*m+1;
}
count=count+1;
cout ... |
//知识点:模拟,字符串
/*
按照题目要求模拟即可。
一直找减号,找到了一个减号,就再找他两侧的字符。
按照题目给出的参数产生需要填充的字符串,
用earse函数擦除原来的减号,在用insert 函数插入其中即可。
特别的,如果两侧的字符无法向其中填充字符串,
就向其中填充被删掉的减号
*/
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;
//=======================================================
int p1,p2,p3;
strin... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2012 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Kajetan Switalski
**
*/
#ifndef _HTTP_REQUESTS_HANDLER_H_
#def... |
//
// Application0.h
// Odin.MacOSX
//
// Created by Daniel on 21/09/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#ifndef __Odin_MacOSX__Application0__
#define __Odin_MacOSX__Application0__
#include "System.h"
#include "EventManager.h"
#include "IOManager.h"
#include "Scene.h"
#include "TriangleShape.h"... |
#include "gtest/gtest.h"
TEST(placeholder_tests, placeholder) {
ASSERT_TRUE(true);
}
|
#include "ATM.h"
#include <iostream>
void ATM::menu1()
{
system("clear");
std::cout << "欢迎来到钱多多银行!!!" << std::endl;
std::cout << "请选择您需要办理的业务:" << std::endl;
std::cout << "1: 开户" << std::endl;
std::cout << "2:登录" << std::endl;
std::cout << "q: 退出" << std::endl;
}
void ATM::menu2()
{
system... |
/*
Author : AMAN JAIN
DATE: 03-07-2020
PROGRAM -> Prims Algo
Time Complexity of the below program is O(V^2).
*/
#include<bits/stdc++.h>
using namespace std;
int minnode(int node[], bool visited[], int V){
int min =INT_MAX,index;
for(int i =0 ;i<V; i++){
if(visited[i]==false && node[i]<min){
... |
#include "Application.h"
//Include GLEW
#include <GL/glew.h>
//Include GLFW
#include <GLFW/glfw3.h>
//Include the standard C++ headers
#include <stdio.h>
#include <stdlib.h>
#include "../../Engine/System/SceneSystem.h"
#include "../../Engine/System/RenderSystem.h"
#include "../../Engine/System/LuaSystem.h"
#includ... |
#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... |
/*!
*@brief アニメーションクリップ。
*/
#pragma once
//////////////////////////////////////////////////////////////////////
// 各種構造体
//////////////////////////////////////////////////////////////////////
/*!
*@brief アニメーションクリップのヘッダー。
*/
struct AnimClipHeader {
std::uint32_t numKey; //!<キーフレームの数。
std::uint32_t numAnimationEv... |
#include <conio.h>
#include <iostream.h>
void main () {
clrscr();
int i=1;
do {
int j=0;
do{
cout <<"*";
j++;
}while(j<i);
cout<<endl;
i++;
}while (i<10);
getch();
}
|
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <strings.h>
#include <string.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <unistd.h>
#include <iostream>
//域套接字定义
#define SOCKET_PATH "./domainsocket"
#define MSG_SIZE 2048
int main(){
int socket_fd,accept_fd;
... |
class SUV_DZ: SUV_Base_EP1 {
crew = "";
scope = 2;
vehicleClass = "DayZ Epoch Vehicles";
typicalCargo[] = {};
class TransportMagazines {};
class TransportWeapons {};
class HitPoints : HitPoints {
class HitLFWheel:HitLFWheel {
armor = 0.15;
material = -1;
name = "wheel_1_1_steering";
passthrough = 0... |
#include "Dog.h"
#include <stdexcept>
#include <string>
using namespace std;
Dog::Dog(string breed)
{
if (breed != "Poodle" && breed != "poodle")
{
this->breed = breed;
}
else
{
throw runtime_error("Poodle? That's not a real dog!"); // pass string into the constructor of the runtime_error object
}
}
string... |
#include "Constraints_o.h"
Constraints_o::Constraints_o()
{
}
void Constraints_o::init(int width, int height)
{
safe_intervals.resize(height);
for(int i = 0; i < height; i++)
{
safe_intervals[i].resize(width);
for(int j = 0; j < width; j++)
{
safe_intervals[i][j].resize... |
#include "jni_internal.h"
#include "mirror/class-inl.h"
#include "samsung.h"
namespace art {
//----------------------------------------------------
// dalvik.system.PathClassLoader
static jobject PathClassLoader_openNative(JNIEnv* env, jobject javaThis) {
// Ignore Samsung native method and use the default PathCla... |
class CfgDebriefing {
class NotWhitelisted {
title = "$STR_NotWhitelisted_Title";
subtitle = "$STR_NotWhitelisted_SubTitle";
description = "$STR_NotWhitelisted_Descript";
pictureBackground = "";
picture = "";
pictureColor[] = {0,0.3,0.6,1};
};
class Blacklist... |
// Created on: 1992-08-26
// Created by: Jean Louis FRENKEL
// 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... |
#ifndef H_STOCKREADER
#define H_STOCKREADER
#include "stdafx.h"
class StockReader {
public:
StockReader(string inFileName = "StockInput.txt");
Stock* read();
int getCount();
void setFileName(string);
string getFileName();
private:
string fileName;
int count;
void findLineCount();
};
#endif |
#include "PhotonBox/resource/Material.h"
#include "PhotonBox/resource/FrameBuffer.h"
#include "PhotonBox/resource/CubeMap.h"
#include "PhotonBox/resource/Shader.h"
#include "PhotonBox/resource/Texture.h"
#ifdef PB_MEM_DEBUG
#include "PhotonBox/util/MEMDebug.h"
#define new DEBUG_NEW
#endif
Material::~Material()
{
fo... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2005 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/util/OpRegion.h"
// == Op... |
//Bibliotecas de Funções
#include <conio.h>
#include <stdio.h>
#include <math.h>
#include <locale.h>
int main()
{
setlocale(LC_ALL,"Portuguese");
//Declração de Variaveis
int A,B,X;
//Variaveis de Entrada
printf("Informe um valor para a variavel A:");
scanf("%d",&A);
printf("Informe um ... |
//使用算法:DFS+回溯
//先用筛法求出素数
//再向各位置填数, 如果满足此数与前一个数和为素数,则填入
//当填到第n个数时,判断他与第一个数是否和为素数
//如果和为素数,就找到了一组解,输出.
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
bool zhi[50]={1,1};//筛法求素数
bool use[30];
int ans[30];
int n,tot,n1;
void zzz();
void dfs(int k);
void print();
int main()
{
... |
/*
* rt.cpp
*
*
* author: Thomas Blackwell
* CS Username: tablackw
* email: tablackwell@email.wm.edu
*
* Much of the same code as before, but modified to work with C++, and to
* fit the new components introduced.
*/
#include <iostream>
#include "rt.hpp"
#include "obj.hpp"
#include "Light.hpp"
// Reads in spheres ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2012 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Kajetan Switalski
**
*/
#include "core/pch.h"
#ifdef USE_SPD... |
/*
* RobotMotionMapUpdater.cpp
*
* Created on: Feb 5, 2014
* Author: Péter Fankhauser
* Institute: ETH Zurich, Autonomous Systems Lab
*/
#include "elevation_mapping/RobotMotionMapUpdater.hpp"
// Kindr
#include <kindr/rotations/RotationEigen.hpp>
#include <kindr/phys_quant/PhysicalQuantitiesEigen.hpp>
#inc... |
#include "ProtoMessage.h"
ProtoMessage::ProtoMessage() : body_length_(0), pmd_(0), param_(0)
{
}
ProtoMessage::ProtoMessage(google::protobuf::Message &message) : body_length_(0), pmd_(0), param_(0)
{
const google::protobuf::Descriptor *descriptor = message.GetDescriptor();
std::cout << "send Message ... |
// Created on: 2001-10-01
// Created by: Julia DOROVSKIKH
// 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... |
#include "Types.h"
#include "MemUtils.h"
#include <memory>
bool OpenALRF::operator==(const Command & a, const Command & b)
{
return (a.Module == b.Module) && (a.Action == b.Action) && (a.ExecutionTime == b.ExecutionTime) && (a.param1 == b.param1) && (a.param2 == b.param2) && (a.param3 == b.param3);
}
bool OpenALRF... |
#include "AssetsFactory.h"
#include "Config.h"
#ifdef USING_D3DX
/*************Texto***********/
#include "TextD3D11.h"
/************Modelos**********/
#include "ModelD3DX.h"
/************Sprites**********/
#include "SpriteDX.h"
#else
/*************Texto***********/
#include "TextGL.h"
/************Modelos**********/
... |
/* -*- 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.
*/
#ifndef MODULES_UTIL_SIMSET_H
#define MODULES_UTIL_SIMSET_H
#inc... |
/*
* File: thimble.cpp
* This is the main file - Everything happens here.
*
*/
#include <avr/wdt.h>
#include "thimble.hpp"
#include "stepper.hpp"
#include "coordsystem.hpp"
#include "gcodeinterpreter.hpp"
void setup();
void loop();
String input = "";
GcodeStack gcs;
ShiftRegister shiftregister;
StepperState... |
#ifndef GNSIMPLESTRING_H
#define GNSIMPLESTRING_H
#include "GnTCharFunctions.h"
class GNSYSTEM_ENTRY GnSimpleString : public GnMemoryObject
{
public:
GnSimpleString();
GnSimpleString(const gchar* pStr);
GnSimpleString(GnSimpleString& str);
~GnSimpleString()
{
if( mpHandle )
GnFree(mpHandle);
}
operator con... |
void pickasong (int pick)
{
switch (pick)
{
case 1:
tmrpcm.play("song1.wav");
while (tmrpcm.isPlaying()) {
delay(250);
}
break;
case 2:
tmrpcm.play("song2.wav");
while (tmrpcm.isPlaying()) {
delay(250);
}
break;
case 3:
tmrpcm.play("song3.wav");
while (tmrpcm.isPlaying()) {
delay(250... |
#include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
using namespace std;
struct TreeNode {
int val;
TreeNode* left;
TreeNode* right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode* left, TreeNode* right)... |
#ifndef BASE_KEY_TAP_LISTENER_HPP
#define BASE_KEY_TAP_LISTENER_HPP
#include "AbstractGestureListener.hpp"
/*
* Abstract class that is designed to be base class for implementing concrete KeyTap listeners.
* @author: Grzegorz Mirek
*/
class BaseKeyTapListener : public AbstractGestureListener {
protected:
void onGes... |
#include "qItemC.hpp"
class QItemC_Local : public QObject
{
Q_OBJECT
public:
QItemC_Local(){};
~QItemC_Local(){};
};
void QItemC::go()
{
QItemC_Local localObject;
}
// We need AUTOMOC processing
#include "qItemC.moc"
|
#ifndef LEFTISTHEAP_H_
#define LEFTISTHEAP_H_
//
// This file contains the C++ code from Program 11.7 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... |
#include <ros/ros.h>
#include <ros/package.h>
#include <memory>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <exception>
#include <io_lib/io_utils.h>
#include <dmp_lib/DMP/DMP_pos.h>
#include <dmp_lib/GatingFunction/LinGatingFunction.h>
#include <dmp_lib/GatingFunction/ExpGatingF... |
const byte pwm_left = 5; // ENBpin from motor driver to 6th pin of arduino mega -- left motor
const byte pwm_right = 6;
#include <SoftwareSerial.h>
int i = 0 ;
SoftwareSerial mySerial(11, 10); //rx,tx
void setup() {
// put your setup code here, to run once:
pinMode(31,OUTPUT); //IN1 from motor driver to 28th pin of ... |
// Created on: 1992-09-30
// Created by: Gilles DEBARBOUILLE
// 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 th... |
#pragma once
#include "../simpleElementGenerator.h"
namespace robots {
namespace generator {
class FunctionGenerator: public SimpleElementGenerator {
public:
FunctionGenerator(FuncOrientedGenerator* gen, qReal::Id const &elementId): SimpleElementGenerator(gen, elementId) {
}
protected:
virtual void generateBody... |
#include<cstdio>
#include<cstring>
using namespace std;
int main(){
//input
char date[15];
fscanf(stdin,"%s",&date);
//output
for(int i=6;i<10;++i){
fprintf(stdout,"%c",date[i]);
}
fprintf(stdout,"-");
for(int i=0;i<5;++i){
fprintf(stdout,"%c",date[i]);
}
retur... |
/* -*- 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.
*
* @author Manuela Hutter (manuelah)
*/
#include "core/pch.h"
#i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.