text stringlengths 8 6.88M |
|---|
#pragma once
#include "bricks/core/object.h"
namespace Bricks {
namespace ValueType {
enum Enum {
Pointer,
Boolean,
Byte,
Int16,
Int32,
Int64,
Float32,
Float64,
Float = Float32,
Double = Float64
};
}
class Value : public Object
{
protected:
u8 data[0x08];
ValueType::Enum ty... |
#ifndef POINT_H
#define POINT_H
// PCL
#ifdef COMPILE_PCL
#include <pcl/point_types.h>
#endif
// Eigen
#include <Eigen/Dense>
// Local
#include "tools/exception.h"
template<typename T>
class Point
{
public:
enum{
X = 0,
Y = 1,
Z = 2
};
~Point()
{
deallocate();
}... |
#include<bits/stdc++.h>
#define rep(i,n) for (int i =0; i <(n); i++)
using namespace std;
using ll = long long;
const double PI = 3.14159265358979323846;
const ll MOD = 998244353;
int main(){
vector<int>A(4);
rep(i,4)cin >> A[i];
sort(A.begin(), A.end());
if(A[0] + A[3] == A[1] + A[2] ||... |
#include <iostream>
#include "ABB.h"
#include "NodoABB.h"
using namespace std;
int main()
{
ABB A;
A.inserta(16);
A.inserta(23);
A.inserta(18);
A.inserta(3);
A.inserta(5);
A.inserta(14);
A.entreorden();
cout << endl << "Numero nodos con un hijo: " << A.numeroNodos() << endl;
... |
#include "WidgetControllerWidget.h"
#include "Actor/Controller/PlayerController/BasePlayerController.h"
#include "Components/CanvasPanel.h"
#include "Components/CanvasPanelSlot.h"
#include "Components/GridSlot.h"
#include "Widget/ClosableWnd/MessageBoxWnd/MessageBoxWnd.h"
#include "Widget/ClosableWnd/ClosableWnd.h"
... |
#pragma once
#ifndef LIGHT_H
#define LIGHT_H
class Light
{
};
#endif |
#include "BookInfo.h"
BookInfo::BookInfo():m_nPrice(0){ m_sTitle = string(); m_sAuthor = string(); m_sCompany = string(); }
BookInfo::BookInfo(const char* const title, const char* const author, const char* const company, int price) :
m_sTitle(title),m_sAuthor(author),m_sCompany(company),m_nPrice(price){}
BookInfo::Bo... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 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 ACCESSIBILITY_EXTENSION_SUPPORT
#i... |
#include <iostream>
#include<stdio.h>
#include<string.h>
#include <vector>
#include <string>
#include <cctype>
#include<math.h>
using namespace std;
|
// Copyright 2019 Erik Teichmann <kontakt.teichmann@gmail.com>
#include <vector>
#include "test/catch.hpp"
#include "test/harmonic_oscillator_ode.hpp"
#include "include/sam/system/euler_system.hpp"
#include "include/sam/observer/position_observer.hpp"
TEST_CASE("integrate simple system") {
// Integrate correctly c... |
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2019, The TurtleCoin Developers
// Copyright (c) 2019, The Karbo Developers
//
// This file is part of Karbo.
//
// Karbo is free software: you can redistribute it and/or modify it under
// the terms of the GNU Lesser Genera... |
#include <cmath>
#include <iostream>
using namespace std;
const int INF = 1 << 30;
int main() {
int N, M;
cin >> N >> M;
int a[N][M];
for (int i = 0; i < N; ++i) {
for (int j = 0; j < M; ++j) {
cin >> a[i][j];
}
}
if (N == 1) {
int ans = INF;
for ... |
#pragma once
#include "shape/Shape.h"
#include "shape/ElevationMap.h"
#include <typelib/typelib.h>
namespace siu {
/**
* Битовая карта с возможностью масштабирования (м-биткарта).
*/
template< size_t SX, size_t SY, size_t SZ >
class ScaleBitMap {
public:
/**
* Ссылки на масштабируемую битовую карту.
*/... |
#if !defined(FILEDOWNLOAD_HPP)
#define FILEDOWNLOAD_HPP
#include "http/response/HttpResponse.hpp"
class FileDownload : public HttpResponse
{
public:
FileDownload(ResponseContext& ctx, BufferChain& writeChain, struct stat *file);
~FileDownload();
};
#endif // FILEDOWNLOAD_HPP
|
#include<iostream>
using namespace std;
typedef unsigned long long int ll;
void nhap(ll &n,bool *&was,int *&a){
cin>>n;
was=new bool[n+1];
a=new int[n+1];
for(ll i=0;i<=n;i++) was[i]=true;
}
void xuat(ll n,int *a){
for(ll i=1;i<=n;i++) cout<<a[i];
cout<<endl;
}
void backtracking(ll n,bool *wa... |
#pragma once
#include <aeMath.h>
#include "aePrerequisitesGraphics.h"
namespace aeEngineSDK
{
enum struct AE_FRUSTUM_DETECTIONS : uint8
{
AE_FRUSTUM_OUT,
AE_FRUSTUM_INTERSECTION,
AE_FRUSTUM_IN
};
class AE_GRAPHICS_EXPORT aeFrustum
{
public:
aeFrustum();
aeFrustum(const aeFrustum& F);
aeFrustum(cons... |
#ifndef MATAILLE_H
#define MATAILLE_H
#include <QDialog>
#include <QSize>
#include "ui_MaTaille.h"
class CMaTaille : public QDialog
{
Q_OBJECT
public:
CMaTaille(QWidget *parent, int Largeur, int Hauteur);
~CMaTaille();
QSize getDim ();
bool IsModifier;
private:
Ui::CMaTaille ui;
double m_proportion;
int m_nL... |
#include<vector> // vector
#include<iterator> //iterators
#include<iostream> //cin cout
#include<algorithm> // sort
using namespace std;
int main ()
{
// create a vector to hold numbers typed in
vector<int> v;
cout << "Please enter numbers (ctrl-D) ends sequence" << endl;
istream_iterator<int> start (cin); //input i... |
#ifndef SPECEX_PSF_PROC__H
#define SPECEX_PSF_PROC__H
#include <string>
namespace specex {
// loading routines
void load_psf_work(specex::PSF_p psf);
}
#endif
|
#ifndef _GAME_H_
#define _GAME_H_
#include <SDL.h>
#include <vector>
#include "TextureManager.h"
#include "GameStateMachine.h"
class GameObject;
class Game
{
public :
bool init( const char* title, int xpos, int ypos, int width, int height, bool fullscreen );
void render();
void update();
void handleEvents();... |
#include <cassert>
#include <map>
#include <regex>
#include <set>
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
namespace {
static const std::set<std::string> GetValidSymbolsSet() {
const std::vector<std::string> valid_symbols = {
"AA", "AA0", "AA1", "AA2", "AE", "AE0", "AE1", ... |
//min element after any number of operation.
#include<iostream>
#include<stack>
// 1=push, 2=pop(), 3=min()
using namespace std;
int main()
{
stack<int> mainstack;
stack<int> auxistack;
int n,opn,data,temp,i,c=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&opn);
switch(opn)
{
case 1:
{
scanf("%... |
/*
* Copyright (c) 2012 Oleg Linkin MaledictusDeMagog@gmail.com
*
* 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 ... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Triad National Security, LLC. This file is part of the
// Tusas code (LA-CC-17-001) and is subject to the revised BSD license terms
// in the LICENSE file found in the top-level directory of this distribution.
//
////... |
#include "printHelp.h"
#include "tokenStream.h"
#include "keys.h"
void Token_stream::putback (Token t)
{
if (full)
error("putback() into a full buffer");
buffer = t;
full = true;
}
Token Token_stream::get ()
{
if (full)
{
full = false;
return buffer;
}
char ch;
cin >> ch;
switch (ch)
... |
#include "Mesh.h"
// BASE MESH CONSTRUCTOR
Mesh::Mesh() :
m_vbo(0),
m_vao(0),
m_ibo(0),
m_size(0)
{
}
// MESH OVERLOAD PASSING IN VERTEX AND INDEX ARRAYS
Mesh::Mesh(std::vector<Vertex> vertices, std::vector<unsigned int> indices) {
generateMesh(vertices, indices);
}
// DESTRUCTOR
Mesh::~Mesh() {
if (m_vbo) gl... |
/**
* Copyright (c) 2007-2012, Timothy Stack
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of ... |
#include <windows.h>
struct S {
~S() { SetLastError(2); }
};
void foo() {
S s;
}
int main(int, const char**) {
foo();
return GetLastError()-2;
}
|
#ifndef FLYWEIGHT_H
#define FLYWEIGHT_H
#include<iostream>
#include<string>
class Flyweight {
public:
virtual ~Flyweight();
virtual void Operation(const std::string &extrinsicState);
std::string GetIntrinsicState();
protected:
explicit Flyweight(std::string intrinsicState);
private:
std::string _intrinsicState;
};... |
#include "stdafx.h"
#include "Prof-UIS.h"
// constants
#define CONTROLBAR_CLASSNAME "CExtControlBar"
#define CONTROLBAR_AUTOHIDEBUTTON_CLASSNAME "CExtBarNcAreaButtonAutoHide"
#define CONTROLBAR_CLOSEBUTTON_CLASSNAME "CExtBarNcAreaButtonClose"
#define CONTROLBAR_EXPANDBUTTON_CLASSNAME "CExtBarNcAreaButto... |
//--------------------------------------------------------------------------------------
// File : s3d_hdr.h
// Desc : HDR File Module.
// Copyright(c) Project Asura. All right reserved.
//--------------------------------------------------------------------------------------
#pragma once
//-------------------... |
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <tuple>
#include <algorithm>
#include <types.hpp>
#include <property.hpp>
#include <model.hpp>
#include <shaderman.h>
Material1::~Material1()
{
for (uint i = 0; i < this->Materials.size(); i++)
for (uint j = 0; j < this->Materials[i].s... |
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <glog/logging.h>
#include "server.h"
#include "proto/machine_study.pb.h"
using namespace std::placeholders;
static void readcb(int fd, char* buf, int len)
{
net::Coder coder;
coder.decoding(buf, len);
printf("ms... |
#pragma once
using BNN_TYPE = float;
struct NodeBuilder
{
virtual ~NodeBuilder() = default;
};
|
#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define MAX 50004
typedef long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
while(t--) {
int n;
cin>>n;
int arr[n],gcd;
... |
#ifndef SHOOTER_H
#define SHOOTER_H
#include "aggressor.h"
#include "movable.h"
class Shooter :
public Aggressor,
public Movable
{
void updateGunPos();
protected:
XY _gun_pos;
public:
Shooter(XY pos, XY size, int hp, double velo_value, int attack_frequency, Team *my_team, GameManager *game... |
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include<globals.hh>
#include<G4VUserDetectorConstruction.hh>
#include<G4VSolid.hh>
#include<G4LogicalVolume.hh>
#include<G4VPhysicalVolume.hh>
#include<G4Material.hh>
class World {
protected:
G4VSolid *solid;
G4LogicalVolume *logi... |
#include "module/config.h"
#include <fstream>
#include <iostream>
using namespace std;
int loadDataFromFile() {
ifstream fin("/usr/lib/work-more/cfg/list.txt");
int i = 0;
string str;
while (getline(fin, str)) {
if (i >= 50) {
break;
}
cout << "===" << str << endl;
}
return 0;
}
int loadListData(char... |
#pragma once
enum MonsterID;
class MonsterBox
{
public:
bool isGot(MonsterID id);
void GetMonster(MonsterID id);
static MonsterBox& GetInstance() {
static MonsterBox instance;
return instance;
}
private:
void initFile();
void LoadMyBox();
int m_monsters[30] = { 0 };
};
static MonsterBox& IMonsterBox() {
... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "Engine/UserDefinedEnum.h"
#include "MyEnums.generated.h"
/**
*
*/
UCLASS()
class FIGHTWITHBLOCK_API UMyEnums : public UUserDefinedEnum
{
GENERATED_BODY()
};
UENUM(BlueprintType)
enum class ECamp: uint8
... |
#include<bits/stdc++.h>
using namespace std;
class BinaryTreeNode{
public:
int data;
BinaryTreeNode* left;
BinaryTreeNode* right;
BinaryTreeNode(int data){
this -> data = data;
this -> left = NULL;
this -> right = NULL;
}
};
class BST{
... |
#ifndef POINTLISTFILE_H
#define POINTLISTFILE_H
#include <QObject>
#include <deque>
#include <map>
#include <vector>
#include "abstractmanager.h"
//#include "routestruct.h"
#include "computional.h"
#define MAXNODENUMBER 1000
class PointListFile : public QObject
{
Q_OBJECT
public:
PointListFile(QObject *parent =0);... |
/* https://www.codechef.com/SEPT14/problems/CHEFLR/ */
#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);
#define endl "\n"
#define gc getchar_unlocked
#define ONLINE_JUDGE freopen("iceparticle.in","r",stdin);
#define terminate exit (EXIT_FAILURE)
#define os_iterator ostream_it... |
#include <iostream>
#include <string>
#include <vector>
#include <set>
using namespace std;
const int MAX_CHARS = 256;
// This function returns true if str1 and str2 are ismorphic
bool areIsomorphic(string str1, string str2)
{
int m = str1.length(), n = str2.length();
// Length of both strings must be same for o... |
#ifndef DERIVATIVE_H // To make sure you don't declare the function more than once by including the header multiple times.
#define DERIVATIVE_H
#include "mujoco.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#ifdef __cplusplus
extern "C" void worker(const mjModel* m, const mjData... |
#pragma once
#include "Keng/Graphics/FwdDecl.h"
#include "Keng/ResourceSystem/IResource.h"
namespace keng::graphics
{
class IEffect : public resource::IResource
{
public:
virtual void AssignToPipeline() = 0;
virtual void InitDefaultInputLayout() = 0;
virtual ~IEffect() = default;
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2011 Opera Software ASA. 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 GEOLOCATION_SUPPORT
#include "modules/... |
class Category_492 {
class UralRefuel_TK_EP1_DZ {
type = "trade_any_vehicle";
buy[] = {7,"ItemGoldBar10oz"};
sell[] = {3,"ItemGoldBar10oz"};
};
class V3S_Refuel_TK_GUE_EP1_DZ {
type = "trade_any_vehicle";
buy[] = {7,"ItemGoldBar10oz"};
sell[] = {3,"ItemGoldBar10oz"};
};
class KamazRefuel_DZ {
type = ... |
#include <iostream>
#include <chrono>
#include <functional>
#include <atomic>
#include <iomanip>
#include <memory_resource>
#include "threadpool.hpp"
using namespace std::chrono;
namespace mjs {
using namespace vks;
class MinimalJobSystem {
ThreadPool m_pool;
uint32_t m_thread_count = 0;
... |
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <limits.h>
#include <iostream>
#define BUFSZ PIPE_BUF
int main(int argc, char *argv[]) {
FILE* fp;
int count;
char buf[BUFSZ];
char command[150];
sprintf(command, "ps -ef | gre... |
#include "Includes.h"
#include <iostream>
using namespace std;
int main() {
printf("Selecciona un problema de UVa por su ID\n");
int id;
scanf("%d", &id);
switch(id) {
case 11571:
printHello();
break;
case 11057:
uva11057Main();
break;
... |
#include "aDDict.h"
#define fullscr false
//inner truth
char *s2s = new char[256];
/* sprintf(ss,"%d",texgenmenu);
MessageBox( 0, ss, "HelloWorld", MB_OK );*/
bool aCid=false;
int music_len,music_pos;
unsigned int memopen(char *name) { return 1; }
void memclose(unsigned int handle) {}
int memread(void *buffer,... |
// Created on: 1992-02-03
// Created by: Christian CAILLET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the ... |
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <opencv2/highgui/highgui.hpp> // TODO: opencv3?
#include <cv_bridge/cv_bridge.h>
#include <ctime>
#include <cstdlib>
#include <string>
#include <dynamic_reconfigure/server.h>
#include <ltu_actor_inputprocess_camadjust/CamPubConfig.h>
#include <v... |
#include <string>
#include <iostream>
#include <time.h>
#define LEN 100
#define SIZE 80
using namespace std;
typedef long long int lint;
lint L[SIZE];
lint ipow(lint x, lint n)
{
lint i, ret = 1;
for (i = 0; i < n; i++)
ret *= x;
return ret;
}
lint f(lint n) {
return ipow(7, n) * (19 * n + ... |
#include<cstdio>
using namespace std;
int pre[30010];
int find(int x)
{
if(pre[x]==x) return x;
else return pre[x]=find(pre[x]);
}
void join(int x,int y)
{
int r1=find(x);
int r2=find(y);
if(r1!=r2)
pre[r1]=r2;
}
int main()
{
int n,m;
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++)
pre[i]=i... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software ASA. 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 "adjunct/quick/widgets/OpPagebar.... |
#include <iostream>
#include "TestExecutive.h"
/*int main(int argc, char * argv[])
{
argc = 5;
argv[0] = "Upload";
argv[1] = "Category3";
argv[2] = "..\\files\\";
argv[3] = "*.h";
argv[4] = "*.cpp";
std::cout << "Upload function" << std::endl;
MsgClient c1;
//c1.cparguments(argc, argv);
std::thread t1(
[&]... |
#include "../include/quaternaryMask.h"
//#define DEBUG 1
void quaternaryMask::setMask(int blackLMax, int whiteLMin, int greenHMean, int greenHVar, int greenSMin){
this->blackLMax = blackLMax;
this->whiteLMin = whiteLMin;
this->greenHMean = greenHMean;
this->greenHVar = greenHVar;
this->greenSMin =... |
#include "../include/BulletManager.h"
#include "../include/EnemyManager.h"
#include "../include/Player.h"
#include "../include/Bullet.h"
#include "../include/Enemy.h"
#include "../include/Map.h"
#include "../include/GameScene.h"
#include "../include/Map.h"
#include "../include/MapBlock.h"
#include "../include/Camera.h"... |
#include <GL/glut.h>
#include "Pavimento.h"
Pavimento::Pavimento() {
}
Pavimento::Pavimento(double l1, double l2) {
lunghezza = l1;
larghezza = l2;
}
double Pavimento::getLarghezza() {
return larghezza;
}
void Pavimento::setLarghezza(double l) {
larghezza = l;
}
double Pavimento::getLunghez... |
#include<bits/stdc++.h>
using namespace std;
main()
{
long long k, r, i;
while(cin>>k>>r)
{
i=1;
while(((k%10)!=0)&&((k%10)!=r))
{
k+=(k/i);
i++;
}
cout<<i<<endl;
}
return 0;
}
|
#ifndef OBJ_P_HPP
#define OBJ_P_HPP
#include <QObject>
class ObjPrivate : public QObject
{
Q_OBJECT
public:
ObjPrivate();
~ObjPrivate();
};
#endif
|
//
// Note.cpp
// DrumConsole
//
// Created by Paolo Simonazzi on 08/03/2016.
//
//
#include "../JuceLibraryCode/JuceHeader.h"
#include "SoundFromFile.hpp"
#include "MyMemoryMappedAudioFormatReader.cpp"
#define IDXCHECK(x, y) ((x)<0?0:((x)>(y)?(y):(x)))
SoundFromFile::SoundFromFile() {
/*
for (int idx=0... |
#include <iostream>
using namespace std;
int main() {
int js = 0, jp = 0, jf = 0;
int jchui = 0, jbu = 0, jjian = 0;
int ychui = 0, ybu = 0, yjian = 0;
char j, y;
int n;
cin >> n;
while(n--) {
cin >> j >> y;
if(j == y) {
jp++;
if(j == 'C') {
jchui++;
ychui++;
}
if(j == 'B') {
jbu++... |
// Created on: 1993-01-09
// Created by: CKY / Contract Toubro-Larsen ( TCD )
// 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
/... |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i++)
#define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;}
#define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;}
typedef long l... |
#include "Uc3App.h"
void Uc3App::setupScene()
{
Ogre::SceneManager * ogreManager = OgreFramework::getSingletonPtr()->m_pSceneMgr;
ogreManager->createLight("Light")->setPosition(75,75,75);
Ogre::Plane floorPlane(Ogre::Vector3::UNIT_Y, 0);
Ogre::MeshManager::getSingleton().createPlane("ground", Ogre::ResourceGroup... |
#include <cstdlib>
#include <cstdint>
#include <cmath>
#include <fstream>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <utility>
#include <tuple>
#include <limits>
#include <vector>
#include <string>
#include <ostream>
#include "flow_complex.hpp"
template <typename nt, typename st>
FC::flow... |
#include "Pt.h"
Pt::Pt(int size, sf::RenderWindow* window) {
this->x = 0.f;
this->y = 0.f;
setRadius(size);
setFillColor(sf::Color(255, 255, 255, 127));
for (int i = 0; i < 720; i++)
{
rays[i] = Ray(this->x, this->y, (float)i);
}
}
//Updating pos every frame
void Pt::posUpdate(sf::... |
/*
Copyright 2021 University of Manchester
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 agreed to in writing, s... |
#include <iostream>
using namespace std;
int possiblepaths(int m, int n)
{
if (m == 1 || n == 1)
return 1;
return possiblepaths(m - 1, n) + possiblepaths(m, n - 1);
}
int main()
{
int m, n;
cout<<"Enter m & n\n";
cin>>m>>n;
int out;
out=possiblepaths(m,n);
cout<<"p... |
//
// Created by Alex on 06/09/2018.
//
#include "Asset.h"
//// Constructors ////
Asset::Asset() = default;
Asset::Asset(std::string ID_, Asset::DataSource Source_) : ID(ID_)
{
if (Source_ == QUANDL) {
std::vector<std::string> DataDownload = QuandlDownload(ID);
Header = TimeSeriesHeaderReader(Dat... |
/* -*- 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 UNIX_DESKTOP_FILE_CHOOSER_H
#define U... |
#include "UserRole.h"
#include <QString>
// :: Constants ::
const QString JSON_USER_ROLE_USER = "User";
const QString JSON_USER_ROLE_ADMIN = "Admin";
const QString USER_ROLE_USER_STRING = "Пользователь";
const QString USER_ROLE_ADMIN_STRING = "Администратор";
// :: Public functions ::
QString userRoleToJson(Use... |
#pragma once
#include "Visitor.h"
#include "Table.h"
#include "Frame.h"
#include "Wrappers.h"
#include <assert.h>
#include <vector>
namespace Translate {
// Вспомогательная структура для хранения информации о фрагментах
struct CFragment {
CFragment( const Frame::CFrame* _frame, const IRTree::IStm* _rootStm, std::... |
#include <fstream>
#include "harris_mini_opt.h"
int main() {
ofstream in_pix("input_pixels_regression_result_harris_mini_opt.txt");
ofstream fout("regression_result_harris_mini_opt.txt");
HWStream<hw_uint<32> > img_update_0_read;
HWStream<hw_uint<32> > harris_mini_update_0_write;
// Loading input data
//... |
#include "tgaimage.h"
#include "geometry.h"
bool is_steep(int, int, int, int);
void line(int x0, int y0, int x1, int y1, TGAImage &image, TGAColor color) {
bool steep = is_steep(x0, x1, y0, y1);
if (steep) {
std::swap(x0, y0);
std::swap(x1, y1);
}
if (x0 > x1) {
std::swap(x0, x1);
std::swap(y... |
//
// Created by 송지원 on 2020/05/22.
//
#include <iostream>
#include <string.h>
using namespace std;
int main() {
char stra[51];
char strb[51];
int lena, lenb;
int min = 50;
scanf("%s%s", stra, strb);
lena = strlen(stra);
lenb = strlen(strb);
for (int i=0; i<=lenb - lena; i++) {
... |
#include <bits/stdc++.h>
using namespace std;
//const int maxn = 100 + 5;
//int a[maxn]; n;
/*void quicksort(int l, int r) {
int t, temp;
if(l > r) return;
temp = a[l]; // temp是基准数
while(l != r) {
while(l < r && a[r] >= temp) l--;
while(l < r && a[l] <= temp) r++;
if(r < l) {
t = a[r];
... |
/*
* robot_info.cpp
* Copyright: 2018 Shanghai Yikun Electrical Engineering Co,Ltd
*/
#include "yikun_common/cluster_manager/robot_info.h"
namespace yikun_common {
RobotInfo::RobotInfo(const Robot robot)
: robot_(robot)
{
db_ = boost::make_shared<DbHelper>(robot_.addr,"yk");
cluster_db_ = boost::make_share... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; 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"
#ifdef M2_SUPPORT
#include <time.h>
#inc... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 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 Tomasz Jamroszczak tjamroszczak@opera.com
*
*/
#ifndef D... |
#include <iostream>
#include <algorithm>
#include <random>
#include "../src/NeuralNetwork.hpp"
#include "../src/Trainer.hpp"
using namespace nanoNet;
int main() {
NeuralNetwork network;
network.addLayer({2, 8, {ActivationFunction::Which::Relu}});
network.addLayer({8, 1, {ActivationFunction::Which::Linea... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int m=n;
n=(n*2)-1;
int I;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
//cout<<m-abs(m-1-i)-1<<j<<" ";
if(m-abs(m-1-i)-1<=j && m-abs(m-1-i)-1+j<n)
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
*
* 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"
#ifdef VEGA_SUPP... |
#ifndef wali_witness_WITNESS_WRAPPER_GUARD
#define wali_witness_WITNESS_WRAPPER_GUARD 1
/**
* @author Nicholas Kidd
*/
#include "wali/Common.hpp"
#include "wali/MergeFn.hpp"
#include "wali/wpds/Wrapper.hpp"
namespace wali
{
namespace witness
{
/**
* @class WitnessWrapper
*/
class WitnessWrapp... |
//không phải mình làm
#include <iostream>
#include <string>
#include <cmath>
#include <math.h>
#include <stdio.h>
using namespace std;
class PhanSo
{
protected:
int tu, mau;
public:
PhanSo() { tu = 0; mau = 1; };
PhanSo(int x, int y)
{
tu = x; mau = y;
kiemtra();
}
PhanSo(const PhanSo&a)
{
tu = a.tu;
mau... |
#include <iostream>
using namespace std;
void f(int xval)
{
int x;
x = xval;
cout<<"&x is: "<<&x<<endl;
}
void g(int yval)
{
int y;
cout<<"&y is: "<<&y<<endl;
}
int main()
{
f(7);
g(11);
//địa chỉ của hai biến x và y là giống nhau.
// vì khi f chạy xong biến x sẽ được thu hồi và sau đó chươ... |
#include "gtest/gtest.h"
#include "../../../../options/Option.hpp"
#include "../../../../options/OptionPut.hpp"
#include "../../../../binomial_method/case/Case.hpp"
#include "../../../../options/OptionCall.hpp"
#include "../../../../libs/cache/OptionsFunction.h"
#include "../../../../libs/cache/OptionsCache.h"
#include... |
/**
* Peripheral Definition File
*
* PWR - Power control
*
* MCUs containing this peripheral:
* - STM32F0xx
*/
#pragma once
#include <cstdint>
#include <cstddef>
namespace io {
struct Pwr {
/** Power control register
*/
struct Cr {
Cr(const uint32_t raw=0) { r = raw; }
struct Bits {
... |
#include "BSerialPort.h"
#include <stdio.h>
#ifndef LINUX
BSerialPort::BSerialPort() :
hSerial(NULL)
{
}
BSerialPort::~BSerialPort()
{
Close();
}
int BSerialPort::Open(const char *devname)
{
printf("BSerialPort::Open(%s)\n", devname);
hSerial = CreateFile(devname, // //"COM1"
GENERIC_... |
#ifndef ZOOM_H
#define ZOOM_H
#include "..\Statements\Statement.h"
#include "..\ApplicationManager.h"
#include "Action.h"
class Zoom : public Action
{
private:
char type; //Position where the user clicks to add the stat.
//static int G;
image i;
Point Position;
public:
Zoom(ApplicationManager *pAppManager,char... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll as[1000010];
main()
{
ll n;
while(cin>>n)
{
ll i, ans=0, ans2=0, c=0;
for(i=1; i<=n; i++)
{
cin>>as[i];
if(i<=2)ans++;
else
{
if(as[i-1]+as[i-2]==as[i]... |
/*******************************************************************************************
Programme: main.cpp
Acteur: Kponaho Anne-Laure Magnane
Date de création: 07/04/21
But du programme: Programme principal qui fait appel aux fonctions servant *
*a implementer le jeu*
**************************************... |
#pragma once
#include "ofApp.h"
class ofDisplay : public ofBaseApp{
public:
void setup();
void update();
void draw();
// Pointer to main window
shared_ptr<ofApp> main;
// Which display am I?
int display;
// ofxSyphonServer displayOneServer;
// ofxSyphonClient mCli... |
#pragma once
#include <DxLib.h>
#include <stdio.h>
const int QUESTION_MAX = 20; //最大問題数(一つの問題集の中の)
const int QUESTION_ELEMENT = 256; //問題文の一行の最大文字数
const int CHOICES_ELEMENT = 100; //選択肢の一行の最大文字数
enum Difficulty { //問題の難易度
EASY,
BASIC,
HARD,
DIFFICULTYMAX
};
struct q_load {
FILE* fp; ... |
#include "../Commands/HTTP.h"
#include "../../_CPlugin_Helper.h"
#include "../Commands/Common.h"
#include "../../ESPEasy_Log.h"
#include "../../src/DataStructs/ControllerSettingsStruct.h"
#include "../../ESPEasy_fdwdecl.h"
#include "../../ESPEasy_common.h"
String Command_HTTP_SendToHTTP(struct EventStruct *event, ... |
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<conio.h>
#include<dos.h>
#include<math.h>
void main()
{
int gd=DETECT,gm;
int x,y,r,x1,y1,p,run;
do
{
initgraph(&gd,&gm,"C:\\TURBOC3\\BGI");
printf("Enter the value of r\n==> ");
scanf("%d",&r);
printf("Enter the value of (x1,y1)\... |
#pragma once
#define DECLARE_COMPONENT_POOL(type,size) \
static const uint32_t s_kMax##type##s = size;\
type m_##type##s[size]; \
ComponentPool<type> m_##type##Pool
#define INIT_COMPONENT_POOL(type) ComponentPoolInit( SID(type), m_##type##s, &m_##type##Pool, s_kMax##type##s )
#include "Component\ICo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.