text stringlengths 8 6.88M |
|---|
// ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and OpenCL
// Version: 2019.2
// Copyright (C) 1986-2019 Xilinx, Inc. All Rights Reserved.
//
// ===========================================================
#ifndef _checkAxis_0_HH_
... |
#pragma once
#include "Position.h"
namespace Shim
{
namespace CNC
{
enum ErrorCode
{
SHIM_SUCCESS=0,
SHIM_ALREADY_INITED,
SHIM_NOT_INITED,
SHIM_SAME_NAME_EXIST,
SHIM_MAX_AXIS_OVER,
};
typedef struct _CNC_INFO
{
double LoopTime_sec;
unsigned long NumAxis;
double G00_Feedrate;
dou... |
#include <stdio.h>
#include <string.h>
#include <vector>
using namespace std;
struct node
{
int data;
node *lchild;
node *rchild;
};
node *newNode(int data)
{
node *newNode = new node;
newNode->data = data;
newNode->lchild = NULL;
newNode->rchild = NULL;
return newNode;
}
void insert... |
//
// Created by Alex Shaver on 8/30/17.
//
#ifndef FACTORYEXAMPLE_BETA_H
#define FACTORYEXAMPLE_BETA_H
#include <string>
class Beta {
public:
void printFromAlphaOfType(const std::string& alphaType);
};
#endif //FACTORYEXAMPLE_BETA_H
|
#include <iostream>
#include <stdio.h>
#include <fstream>
#include "opencv2/highgui/highgui.hpp"
#include "mono_odometry.h"
using namespace std;
using namespace cv;
int main(int argc, char** argv)
{
// class input parameters - feature options
MonoVisualOdometry::parameters param;
/* not needed for optical flo... |
#pragma once
#include "../MetaMorpheusEngineResults.h"
#include <string>
#include <vector>
#include <cmath>
#include <tuple>
#include "stringbuilder.h"
//C# TO C++ CONVERTER NOTE: Forward class declarations:
namespace EngineLayer { namespace Calibration { class LabeledDataPoint; } }
#include "../MetaMorpheusEngine.... |
#include <cstdio>
#include <math.h>
#include <cstring>
#include <iostream>
using namespace std;
int main()
{
int n,t,i,j,sum0,sum1,sum2,sum3,sum4,sum5,sum6,sum7,sum8,sum9;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
sum0=0,sum1=0,sum2=0,sum3=0,sum4=0,sum5=0,sum6=0,sum7=0,sum8=0,sum9=0;
... |
#include <iostream>
#include <iomanip>
#include <sstream>
#include <list>
#include <iterator>
const int pageWidth = 78;
typedef std::list<std::string> WordList;
typedef void (*PrintLineFunction)( const std::string );
enum class Alignment {
Left,
Right,
Center,
Justify
};
WordList splitTextIntoWords( ... |
// ------------------------------------------------------------------------------------------------
#include "Handle/ResultSet.hpp"
// ------------------------------------------------------------------------------------------------
#include <cstdio>
#include <cstring>
#include <cstdlib>
// ---------------------------... |
#include "stdafx.h"
#include "MapCommand.h"
#include <sstream>
MapCommand::MapCommand()
{
}
MapCommand::~MapCommand()
{
}
void MapCommand::Run(list<string>* parameters, Game * game)
{
Array2D* dungeon = game->getLevel()->dungeon;
int width, height;
width = dungeon->get_x_size();
height = dungeon->get_y_size... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#include <iostream>
using namespace std;
//default arguments for a function
int f(int a=0, int b=11, int c=0);
int perim (int a = 0, int b = 0 , int c = 0 , int d = 0);
int main (){
cout << "Hello world" << endl;
return 0;
}
// default args are only applied if the function is called without putting them in
... |
#define BOOST_TEST_MODULE "dsn::event::channel_queue"
#include <dsnutil/event/channel_queue.hpp>
#include <boost/test/unit_test.hpp>
namespace {
struct DummyEvent {
};
}
BOOST_AUTO_TEST_CASE(singleton_instance)
{
auto ptr = dsn::event::channel_queue<DummyEvent>::instancePtr();
BOOST_CHECK(ptr != nullptr);
... |
/*
프로그램 설명 : 커널 오브젝트 공유 예제
*/
#include <stdio.h>
#include <tchar.h>
#include <Windows.h>
int _tmain1(int argc, TCHAR* argv[])
{
STARTUPINFO si = { 0, };
PROCESS_INFORMATION pi;
si.cb = sizeof(si);
TCHAR command[] = _T("Operation2.exe");
CreateProcess
(
NULL, command, NULL, NULL, TRUE , 0,
NULL, NULL, &si... |
#include <map>
#include <ostream>
#include <stdexcept>
#include <string>
#include "player.h"
#include "game.h"
#include "util.h"
using std::bad_cast;
using std::endl;
using std::find;
using std::invalid_argument;
using std::map;
using std::out_of_range;
using std::runtime_error;
using std::stoi;
namespace lab3 {
... |
// Filename: dnaDoor.h
// Created by: shochet (27Jun00)
//
////////////////////////////////////////////////////////////////////
#ifndef DNADOOR_H
#define DNADOOR_H
//
#include "dnaNode.h"
#include "dnaBuildings.h"
#include "pandaNode.h"
#include "nodePath.h"
#include "luse.h"
#include "pvector.h"
///////////////////... |
//IOBinario2.cpp
#include <iostream>
#include <fstream>
using namespace std;
#include "Alumno.cpp"
int main(int argc, char const *argv[]){
//Alumno alum(1,"Jaime",100);
ofstream archivoEscritura;
const int SALIR = 0;
int id;
string nombre;
double promedio;
archivoEscritura.open("Alumnos.dat", i... |
#include "Controls.h"
#include <FastCG/Platform/Application.h>
#include <FastCG/Input/Key.h>
#include <FastCG/Input/InputSystem.h>
#include <imgui.h>
using namespace FastCG;
FASTCG_IMPLEMENT_COMPONENT(Controls, Behaviour);
void Controls::OnUpdate(float time, float deltaTime)
{
if (InputSystem::GetKey(Key::ESCAPE)... |
void ApplicationClerk(int myLine){
int id = 0;
bool InBribeLine = false;
while(true){
senatorWaitLock->Acquire();
if(hasSenator){
if(isFirst){
isFirst=FALSE;
cout<<"senator data received by applicaiton clerk["<<myLine<<"]"<<endl;
... |
#ifndef FIXED_H
# define FIXED_H
# include <iostream>
class Fixed {
private:
static const int _bits;
int _fpValue;
public:
Fixed(void);
~Fixed(void);
Fixed(const Fixed& cop);
Fixed(int const val);
Fixed(const float f);
int ... |
#include "CWEInputManager.h"
#include "CWEKeyboard.h"
#include "CWEMouse.h"
#include "CWEGraphicManager.h"
#include "CWEError.h"
#include "CWEUsefullyMacro.h"
namespace CWE
{
//コンストラクタ
Input::Input():
mpDevice(0), mPadsNum(0), mUsingPadsNum(0), mSettingPadNumber(0),
mKeyboard(Keyboard::GetInstance()),
mMouse(Mouse... |
#include "FTPClient.hpp"
#include "FTPCodes.hpp"
void sendCommandToControlConnection(FTPConnection &controlConnection, std::string commandAndArguments)
{
if(commandAndArguments.find("\r\n") == std::string::npos)
commandAndArguments += "\r\n";
controlConnection.writeLine(commandAndArguments);
}
std::string receiv... |
#include<iostream>
using namespace std;
template <typename T, typename A1, typename A2>
T * factory(A1 &&a1, A2 &&a2)
{
return new T(std::forward<A1>(a1), std::forward<A2>(a2));
}
template <typename T, typename ... Args>
T * factory2(Args&& ... args)
{
return new T(std::forward<Args>(args)...);
}
struct W
... |
/*
* Copyright (c) 2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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/LICE... |
#include <bits/stdc++.h>
using namespace std;
//given an int, finds if it is beautiful for provided k
int isB(int a, int k){
//first: find the reversed int
//there is no easy way to reverse an int, but there is predefined method to reverse a string
//1. convert int to string
string st = to_string(a);
... |
// Copyright ⓒ 2020 Valentyn Bondarenko. All rights reserved.
#include <StdAfx.hpp>
#include <Log.hpp>
#include <spdlog\version.h>
#include <FileSystem.hpp>
namespace be::utils
{
Log::Log() :
spd_logger(spdlog::basic_logger_st("BondEngine"s,
FileSystem::getUserDataDirect... |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int p1[n],p2[n],q1[n],q2[n],r1[n],r2[n];
int ans1[n],ans2[n];
for(int i=0;i<n;i++){
cin>>p1[i]>>p2[i]>>q1[i]>>q2[i];
}
for(int i=0;i<n;i++){
r1[i]=q1[i]-p1[i];
r2[i]=q2[i]-p2[i];
... |
/*
* Copyright 2018 Roman Katuntsev <sbkarr@stappler.org>
*
* 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 ap... |
// DAQROUTINES.CPP
//
// uses 32bit enh API
//
// This file contains functions created for the Daq* examples
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <math.h>
//#include "..\Cinclude\daqx.h"
//#include "..\Cinclude\daqroutines.h"
#include "daqx.h"
#inc... |
#include <func_proto.h>
#include <boost/asio.hpp>
bool is_port_open(unsigned short port_num)
{
using namespace boost::asio;
using ip::tcp;
io_service svc;
tcp::acceptor a(svc);
boost::system::error_code ec;
a.open(tcp::v4(), ec) || a.bind({ip::address::from_string("127.0.0.1"), port_num}, ec)... |
// Copyright 2020 JD.com, Inc. Galileo 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 requ... |
/*
* Copyright 2017 Roman Katuntsev <sbkarr@stappler.org>
*
* 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 ap... |
// ========================================================================
// COSC363: Computer Graphics (2021); CSSE, University of Canterbury.
//
// FILE NAME: Main.cpp
// CREATOR: Michael Woodard
// STUDENT CODE: mdw85
// STUDENT ID: 24643695
// =======================================================... |
#include "Options.h"
#include <cmath>
#include <iostream>
using namespace std;
double normalCDF(double x)
{
return 0.5*erfc(-x * sqrt(0.5));
}
double Phi(double d)
{
const double Pi = 3.1415926535;
return exp(-d*d / 2) / sqrt(2 * Pi);
}
double N(double x)
{
double gamma = 0.2316419; double a1... |
#include <iostream>
using namespace std;
struct nod{
int info;
nod* next;
}*prim,*ultim;
void push(int x){
if(ultim==NULL)
{
nod *p = new nod;
p->info=x;
p->next=NULL;
prim=ultim=p;
}
else
{
nod *p = new nod;
p->info=x;
p->next=prim;
prim=p;
}
}
int pop()
{
int x;
nod *p = ... |
// Amstrong number..
#include<stdio.h>
main()
{
int r,i,n,sum=0,fact,temp;
printf("enter the number:");
scanf("%d",&n);
temp=n;
while(n>0)
{
r=n%10;
fact=1;
for(i=1;i<=r;i++)
{
fact=fact*i;
}
sum=sum+fact;
n=n/10;
}
if(sum==temp)
printf("\n strong number");
else
... |
#ifndef INVENTORY_ORDER_SERVICE_H
#define INVENTORY_ORDER_SERVICE_H
#include "order_status.h"
namespace inventory {
struct Order;
struct RepositoryService;
struct OrderService {
virtual ~OrderService() = default;
OrderStatus fulfill(const Order&);
private:
virtual RepositoryService& getRepos() = 0;
};
} /... |
#ifndef AST_REWRITE_FRAGMENT_COLLECTOR_TRAVERSAL_C
#define AST_REWRITE_FRAGMENT_COLLECTOR_TRAVERSAL_C
// #include "rose.h"
#include "rewrite.h"
// ####################################################################
// Functions for AST_FragmentIdentificationInheritedAttributeType class
// ###########################... |
#include "proto_parser.h"
#include "proto_printer.h"
#include "proto_validator.h"
#include <CORE/BASE/config.h>
#include <CORE/BASE/logging.h>
#include <CORE/UTIL/stringutil.h>
#include <CORE/types.h>
#include <fstream>
#include <map>
#include <set>
using core::types::EnumDef;
using core::types::FieldDef;
using core... |
#include <string.h>
#include <iostream>
#include "com_aubo_aubojdr_RobotDrv.h"
#include "internal/util.h"
#include "rsdef.h"
#define ARM_DOF 6
// namespace aubojdr {
JNIEXPORT jint JNICALL Java_com_aubo_aubojdr_RobotDrv_initialize(JNIEnv *env,
jobjec... |
#ifndef CAMERA_H
#define CAMERA_H
struct SDL_Rect;
class Player;
class Camera {
public:
static SDL_Rect camera;
static void update(float elapsedTime, Player& _player);
static SDL_Rect getCamera();
};
#endif |
////////////////////////////////////////////
//
// SondeDHT : Sonde monocapteur qui remonte temperature et humidite
//
////////////////////////////////////////////
//
// Cette sonde est construite à base d'un ESP8266, d'une alimentation de 3V ou 5V
// et d'un capteur DHT11, DHT21, DHT22.
//
//
// La section variables ... |
# include <iostream>
# include <iomanip>
# include <cmath>
using namespace std;
struct Point {
double x, y;
Point(double x = 0, double y = 0): x(x), y(y) {}
};
struct Flipper {
double y;
Point f;
Flipper(double yi = 0, double xf = 0, double yf = 0): y(yi) { f = Point(xf, yf); }
};
inline double ... |
/*
** EPITECH PROJECT, 2019
** main.cpp
** File description:
** Main for plazza
*/
#include "Reception.hpp"
#include "Log.hpp"
#include <vector>
#include <math.h>
#include <chrono>
#include <thread>
#include <fstream>
#include "Write.hpp"
#include "Read.hpp"
std::vector<std::string> parse_command(std::string command)... |
#ifndef PLAYER_H
#define PLAYER_H
#include<string>
using namespace std;
class Player{
private:
string Name;
int Age;
string Country;
public:
Player();
Player(string,int,string);
void Accept();
void Display();
int getAge();
string getName();
};
#endif
|
#include<iostream>
using namespace std;
int main()
{
char ch;
cin>>ch;
do
{
cout<<"Hello ";
cin>>ch;
}while(ch!='x');
return 0;
} |
#pragma once
#include "Shape.h"
#include "Material.h"
class Sphere :public Shape{
private:
MVec3 center;
float radius;
Material *material;
public:
Sphere(const MVec3& _center, const float& _radius,Material *_material) :center(_center), radius(_radius), material(_material){}
virtual bool hit(Ray ray, float _min, ... |
#ifndef MYSERVER_H
#define MYSERVER_H
#include <QtWebSockets/QWebSocketServer>
#include <QtWebSockets/QWebSocket>
class MyServer : public QObject
{
Q_OBJECT
public:
MyServer(QObject *parent = Q_NULLPTR);
void startServer();
signals:
public slots:
void incomingConnection();
protected:
private:
QW... |
#include "maintest.h"
double __stdcall plus4(double i)
{
return i+4;
}
|
// This file is subject to the terms and conditions defined in 'LICENSE' in the source code package
#include "render/spritemap_generator.h"
#include <algorithm>
#include <map>
#include "core/convert.h"
#include "core/logger.h"
#include "core/resource_guard.h"
#include "data/prototype_manager.h"
using namespace jact... |
//
// GameOver.cpp
// tower
//
// Created by wangpeng on 15/8/18.
//
//
#include "GameOver.h"
#include "UICallBack.h"
#include "Game.h"
// on "init" you need to initialize your instance
bool GameOver::init()
{
if (!MyLayer::init()) {
return false;
}
this->loadCsb("restart/Layer.csb");
re... |
#include "Header.h"
int ChefDeProjet::nombreDeChefDeProjet_ = 0;
int Programmeur::nombreDeProgrammeur_ = 0;
int GraphicDesigner::nombreDeGdesigner_ = 0;
int SoundDesigner::nombreDeSdesigner_ = 0;
int GameDesigner::nombreDeGameDesigner_ = 0;
int LevelDesigner::nombreDeLevelDesigner_ = 0;
int Secretaire::nombreDeSecreta... |
#include <iostream>
void doubleNumber(int num) { num = num * 2; };
int main() {
int num = 35;
doubleNumber(num);
std::cout << num; // Should print 70
return 0;
}
// void doubleNumber(int& num)
|
#pragma once
#include <GL/glew.h>
#include <string>
GLuint LoadShaders(const std::string vertexShaderFileName, const std::string fragmentShaderFileName);
|
#pragma once
#include <glm/glm.hpp>
#include "Square.hpp"
enum class FaceType {
FRONT, UP, BACK, DOWN, LEFT, RIGHT
};
class Face {
public:
Square squares[9]; // top left, top center, top right, center left, center center, center right, bottom left, bottom center, bottom right
float rotationAngle;
public:
Face()... |
const int Len = 40;
class sword
{
private:
char fullname[Len];
int enchantment;
public:
sword(const char *n = "FaceStabber Deluxe", int e = 0);
int reset();
void reenchant(int e);
void showSword();
};
|
//#include <iostream>
//
//using namespace std;
//
//class CStu
//{
//public:
// int a;
// CStu(int a)
// {
// this->a = a; //this是指向当前对象的指针CStu *,所以可以通过this指针访问成员
// this->Show(); //this指针不是成员
// //this作用域是在类内部(类的成员函数内起作用),系统默认传递给函数(非静态函数)的隐含参数
// cout << "构造函数\n";
// }
// void Show()
// {
// cout << a << endl;
/... |
#ifndef TREND_H
#define TREND_H
#include <QtCore>
#include <QWidget>
#include <QTime>
#include <QSize>
#include <QSizePolicy>
#include <QPoint>
class QVBoxLayout;
class TrendChart : public QWidget
{
public:
// TrendChart(QWidget *parent); // конструктор
TrendChart(QWidget *parent,int timeLen=3600,int Interva... |
/* Find the missing number in Arithmetic Progression
Examples:
Input: arr[] = {2, 4, 8, 10, 12, 14}
Output: 6
Input: arr[] = {1, 6, 11, 16, 21, 31};
Output: 26
*/
#include <iostream>
#include <vector>
#include <limits>
int findMissingUtil(std::vector<int>& vec, int diff)
{
size_t low = 0;
size_t ... |
/*
* Copyright (C) 2016 Konstantin Tokavev <annulen@yandex.ru>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of condi... |
#include <iostream>
#include <vector>
#include <limits.h>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) {
ListNode dummy(INT_MIN);
ListNode *cur = &dummy;
wh... |
#ifndef LTUI_SCREEN_SERVICE_H
#define LTUI_SCREEN_SERVICE_H
#include "./view.hpp"
#include "ftxui/component/screen_interactive.hpp"
#include <memory>
namespace ltui {
class screen_service {
public:
screen_service();
void render(std::shared_ptr<view> view_instance);
private:
ftxui::ScreenInteractive _screen;
... |
#include <unistd.h>
#include <ch.h>
#include <hal.h>
#include <uavcan_stm32/uavcan_stm32.hpp>
#include <uavcan/protocol/NodeStatus.hpp>
#include <lwip/api.h>
#include <src/can_bridge.h>
#include <cvra/Reboot.hpp>
#include <cvra/motor/control/Velocity.hpp>
#include <cvra/Reboot.hpp>
#include <cvra/motor/config/VelocityP... |
#pragma once
/******************************************************************************
file: VertexBuffer.h
brief: none
date: 8/18/2020 9:42:27 PM
author: Evie Brown
email: evie@eviebrown.com
******************************************************************************/
#include "Bindable.h"
class V... |
#include "over.hpp"
namespace doodle {
Over::Over() {
ge::data->config.load("./res/config/defaults.config");
ge::data->config.setGroup("");
SDL_Rect playBounds;
SDL_Rect gameOverBounds;
int scale;
ge::data->config.get(GE_VAR_STR(menusheet));
ge::data->confi... |
#include <iostream>
#include "../sensors/mbed.h"
#include "../util.h"
using namespace std;
int main() {
MMBED mbed;
int stat = 0;
int m1, m2, m3, m4, s;
mbed.get_status(stat);
cout << stat << endl;
mbed.set_setpoints(1000,2000,500,8000);
while(stat) {
mbed.get_data(m1,m2,m3,m4,s);
cout << m1 << ", " << m2 ... |
// num_7.cpp: From "The Bank", #7
// Eric Farkas, CUS 1144 MWF 7:00AM
// 1.23.02
// a)Write a main function to read an indeterminate number of integers from the keyboard
// and print out those in the range from 5 to 10 (inclusive). Use a for loop (no while loops).
// Question 'A'
#include <fstream.h>
void main()
{
... |
#pragma once
#include "RResource.h"
class BPrimitive;
class RBaseShaderPass: public RShaderPass
{
public:
virtual void ConfigureLight(RShader* InPixelShader, RShader* InVertexShader, BRenderingBatch* InBatch);
virtual TString GetName() {
return "Base";
}
virtual bool ShouldCompile(RVertexProt... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "Fraction.h"
#include <QLineEdit>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public slots:
void plusEvent();
void timesEvent();
public:
explicit MainWindow(QWidget ... |
#include "stdafx.h"
#include "PixelShader.h"
using namespace Common;
using namespace GraphicsEngine;
using namespace std;
const PixelShader PixelShader::s_null = PixelShader();
PixelShader::PixelShader(ID3D11Device* d3dDevice, const std::wstring& filename)
{
// Read data from pixel shader file:
vector<char> fileD... |
#include "primitivefunctions.h"
using namespace PrimitiveFunctions;
sExpression * PrimitiveFunctions::T = new sExpression("T");
sExpression * PrimitiveFunctions::NIL = new sExpression("NIL");
sExpression * PrimitiveFunctions::ERR = new sExpression("**Error**");
sExpression * PrimitiveFunctions::CAR(sExpression * inp... |
#include "parameditoutput.h"
#include "ui_parameditoutput.h"
#include <QDebug>
#include "helpdialog.h"
ParamEditOutput::ParamEditOutput(QWidget *parent) :
QWidget(parent),
ui(new Ui::ParamEditOutput)
{
ui->setupUi(this);
mConfig = 0;
}
ParamEditOutput::~ParamEditOutput()
{
delete ui... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "inout.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->outputText->setReadOnly(true);
ui->OutSetPlot->setChecked(true);
ui->MTestSum->setChecked(true);
ui->MTestPai... |
/*
* reviewjson.cc
*
* Created on: Mar 23, 2016
* Author: jessie
*/
#include <reviewjson.h>
Register_Class(reviewjson)
reviewjson::reviewjson() {}
reviewjson::reviewjson(const Json::Value r) {
// TODO Auto-generated constructor stub
root = r;
//pCoord = p;
}
reviewjson::reviewjson(const revi... |
const int pinAnalogComBit = 0;
const int pinPwmLight = 3;
const int pinInButton = 2;
const int numpresses = 4;
const int resettime = 400;
const int debounce = 30;
int sensitivity;
int presses;
long lastpress;
int pr0;
int pr1;
int pr2;
int lightmode;
long laston;
boolean combit;
long time1;
const int light1 = 255;
cons... |
#include "Menu.h"
Menu::Menu(sf::RenderWindow * window)
{
this->window = window;
this->Frame = 0;
column = 0; line = 0;
width = 800; height = 600;
count = 10;
speed = 0.15;
for (int i = 0; i < count; i++)
this->Frames.push_back(sf::IntRect(column + width * i, line, width, height));
this->Texture_.loa... |
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
#include <ctime>
#include <fstream>
#include <iostream>
#include <vector>
#include <raspicam/raspicam_cv.h>
#include <raspicam/raspicam.h>
#include <raspicam/raspicamtypes.h>
#include "opencv2/imgproc/imgproc.hpp"
#include <fstream>
#include <stdlib.h>
#i... |
#include"Rose.h"
#include<cstdio>
Rose::Rose(int petal, int color) :LivesInterface(LivesInterface::Origin::EUROPE, getSpeciesString()) {
this->petal = petal;
this->color = color;
}
Rose::~Rose() {}
int Rose::getPetal() {
return this->petal;
}
int Rose::getColor() {
return this->color;
}
void Ro... |
#include "NotImplementedException.h"
using namespace Common;
NotImplementedException::NotImplementedException() :
logic_error("Not Implemented")
{
}
|
#include "board.h"
board::board()
{
}
board::~board()
{
}
int board::checkBoard()
{
int maxCell_pur = 0; //当前单个格子最大值
int score_pur = 0; //当前总得分
int BlankCell = 16; //空格子的个数
step++;
//遍历当前棋盘
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
if (BOARD[i][j] != 0)
{
score_pur += BOARD... |
/*
* SonarReturnData.hpp
*
* Created on: 11 Jun 2018
* Author: Thomas Maters
* Email : thomasmaters@hotmail.com (TG.Maters@student.han.nl)
*/
#ifndef SRC_SONARRETURNDATA_HPP_
#define SRC_SONARRETURNDATA_HPP_
#include "../DataBuffer.hpp"
#include "SensorMessage.hpp"
#include "SonarReturnDataP... |
#include "헤더2.h"
int main() {
add();
printf("%d\n", myValue);
return 0;
}
|
#pragma once
#import "..\..\..\bin\slefole.dll"
class DECLSPEC_UUID("1536F043-EE2D-4A57-BE9B-9596EADF468E") Pack1;
class CPack1;
#include "Pack1.h"
|
// Copyright 2016 The TensorFlow Authors. All Rights Reserved.
// Modifications copyright (C) 2019 Uber Technologies, Inc.
//
// 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:/... |
#pragma once
#include "ofMain.h"
#include "Viiva.h"
#include "tiedosto.h"
#include "Soitin.h"
#include "Vaiheet.h"
/* ViivaPankki
* Varasto-luokka viivoille.
* ViivaPankki hllinnoi viivojen tallennusta ja latausta sekä
* uuden viivan pankkiin lisäämistä. Luokka pyrkii poistamaan tarpeen
* säilyttää Viiva tyyppis... |
#include "util.hpp"
#define xstr(s) str(s)
#define str(s) #s
using namespace cv;
void finalize_mat( cv::Mat * frame ){
delete frame;
frame = NULL;
}
//assume ownership
XPtrMat cvmat_xptr(cv::Mat *frame){
XPtrMat ptr(frame);
ptr.attr("class") = Rcpp::CharacterVector::create("opencv-image");
return ptr;
}
... |
#include <iostream>
using namespace std;
int notae,nota,notaf;
int main()
{
cout <<"Ingresar nota acumulada: ";
cin >> nota;
cout <<"Ingresar nota Examen: ";
cin >> notae;
notaf=notae+nota;
if ((notaf>=57)and (notaf<=59))
{
notaf=60;
cout<<notaf << " Aprobado\n";
}
... |
//
// Created by zlc on 2021/5/23.
//
#ifndef _MY_SLAM_GMAPPING_RANGEREADING_H_
#define _MY_SLAM_GMAPPING_RANGEREADING_H_
#include <vector>
#include "../utils/point.h"
namespace GMapping
{
// 激光传感器数据类
class RangeReading
{
public:
// 均匀角度的激光雷达数据
// RangeReading(unsigned int n_beams, const double* d);
/... |
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n,a,b,c;
cin>>n>>a>>b>>c;
int x[] = {a,b,c};
sort(x,x+3);
int max =0;
for(int i=0; i < x[0]; i++)
{
for(int j=0; j < x[0]; j++)
{
for(int k=0; k<= n/x[0]; k++)
{
if( i*x[2] + j*x[1] + k*x[0] == n &... |
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace MedIS {
/// <summary>
/// Сводка для HistoryAddPageControl
/// </summary>
public ref ... |
#include "uae/types.h"
#include "sysconfig.h"
#include "sysdeps.h"
#define LSB_FIRST
extern void write_log(const char *, ...);
extern void activate_debugger(void);
#define MIN(a, b) ((a) > (b) ? (a) : (b))
#define osd_printf_debug write_log
#define fatalerror write_log
#define logerror write_log
#define tag() "X"
... |
/***************************************************
实现的生产者和消费者模型。
生产者线程一直在后台执行。当有作业需求时则执行,没有作业需求时直接放弃当前cpu时间片
在消费者数量低于ELEM_MIN_REMAIN是激活生产者流水线作业,生产PRE_CREATE_BASE;
生产过程中,主线程如果有消费需求则自己生产(如果触发,说明后台的生产者线程拥挤或被注销了)。
因为确认AutoReleasePool是不支持多线程清理,所以使用了手动release,同时将elem的create函数改名为createWithAutoRealse
整个游戏逻辑的主要性能瓶颈在于:
1、短时间生... |
//knapsack 0-1 by dp
#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
int wt[N], val[N];
int dp[N][N];
int knapsack(int n, int w)
{
if (n <= 0)
{
return 0;
}
if (w <= 0)
{
return 0;
}
if (dp[n][w] != -1)
{
return dp[n][w];
}
if (wt[n ... |
#ifndef KINOVA_FAKE_JOINT_TRAJECTORY_CONTROLLER_H
#define KINOVA_FAKE_JOINT_TRAJECTORY_CONTROLLER_H
#include <ros/ros.h>
#include <control_msgs/FollowJointTrajectoryAction.h>
#include <sensor_msgs/JointState.h>
#include <std_msgs/Duration.h>
#include <std_msgs/Float32.h>
#include <geometry_msgs/Vector3.h>
#include <k... |
#include <iostream>
#include <string>
bool isLetter(char ch) {
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
}
int main()
{
int j = 0;
int max_length = 0;
std :: string max_string = "";
std :: cout << isLetter('a');
std :: cout << isLetter('4');
std :: cout << isLetter('s');
std :: cout << is... |
#include <iostream>
using namespace std;
int main()
{
// Simple As given
int rows = 5, cols = 9;
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= (cols); j++)
{
if (j % 2 == 0)
{
cout << "*";
}
else
{
... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#ifndef SRC_SHA256IDGENERATOR_HPP_
#define SRC_SHA256IDGENERATOR_HPP_
#include "immutable/idGenerator.hpp"
#include "immutable/pageId.hpp"
#include <string>
class Sha256IdGenerator : public IdGenerator {
public:
virtual PageId generateId(std::string const& content) const
{
std::string pom = "printf \"... |
#ifndef _LIBRARY_H_
#define _LIBRARY_H_
#include <cstring>
#include <iostream>
void numero(int [], const std::string& );
//contador de numeros
void letraM(int [], const std::string& );
//contador de letras maiusculas
void letram(int [], const std::string& );
//contador de letras minusculas
void imprimir(int [], int []... |
#pragma once
#include "iobj.h"
class cTimer :
public cBaseObject
{
public:
virtual void Init();
virtual void Update();
virtual void Render();
virtual void Release();
public:
short nType;
IObj* pOwner;
bool IsOn;
bool IsRepeat;
float fCoolTime;
float fElapTime;
void Setting( float fCoolTime );
public:
c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.