text stringlengths 8 6.88M |
|---|
#pragma once
#include "..\Common\Pch.h"
#include "..\Graphic\Direct3D.h"
#include "..\System\DirectInput.h"
class Camera
{
public:
Camera();
~Camera();
void Initialize();
void Update(FLOAT delta);
void UpdateReflection(FLOAT height);
void SetBuffer();
// Get, Set 함수
D3DXVECTOR3 GetPosition();
FLOAT ... |
#include <EventsStorage.h>
#include <cassert>
using namespace breakout;
EventsStorage::EventsStorage()
{
}
EventsStorage::~EventsStorage()
{
}
EventsStorage& EventsStorage::Get()
{
static EventsStorage eventStorage;
return eventStorage;
}
void EventsStorage::Init()
{
}
void EventsStorage::Put(BaseEvent& eve... |
// Copyright 2017 Elias Kosunen
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
#pragma once
#include "PrimaryRecord.h"
#include <vector>
#include <string>
namespace OpenFlight
{
class AncillaryRecord;
class ColorPaletteRecord;
class CommentRecord;
class LightPointAnimationPaletteRecord;
class LightPointAppearancePaletteRecord;
class LightSourcePaletteRecord;
class M... |
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
//undefined macro initialized with 0
//#define P 5
#define ISEQUAL(x,y) x==y
int main(){
#if ISEQUAL(P,0)
cout<<"success\a"<<endl;
#else
cout<<"failure\a"<<endl;
#endif
return 0;
}
|
#ifndef RECEIVER_H
#define RECEIVER_H
#include "port/port.h"
#include "protocol/receiverprotocol.h"
#include <QObject>
class Receiver : public QObject
{
Q_OBJECT
public:
Receiver();
~Receiver();
void init (int dataBits, int parity, int stopBits, int baud);
public slots:
void run();
private:
... |
#include <stdio.h>
#include<stdlib.h>
int main() {
int matriz[100][100];
int *direccion=&matriz[0][0];
int filas,columnas;
int i,j,x,b;
int num1,num2;
printf("Ingrese tamaņo de la matriz\n");
printf("Filas: ");
scanf("%d",&filas);
printf("\nColumnas: ");
scanf("%d",&columnas);
printf("\nIngrese ele... |
#ifndef CMPRO_DPL_CPP
#define CMPRO_DPL_CPP
#include "../include/cmpro/deep_process.h"
int main(){
DeepProcess learning_method;
learning_method.loop_process();
return 0;
}
#endif |
#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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <bits... |
#include<bits/stdc++.h>
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
#define INF ((1LL<<62)-(1LL<<31)) /*オーバーフローしない程度に大きい数*/
#define MOD 1000000007
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using pint = pair<int,int>;
const double PI = 3.14159265358979323846;
... |
#include "linalg.h"
#include <iostream>
#include <immintrin.h>
#include <cmath>
#include <cassert>
#include <immintrin.h>
#include "fastrand.h"
#include "typedefs.h"
#include <stdint.h>
#include <string.h>
//! ------------------------------------------------------- //
//! ---------- Linear Algebra Utility Functions ... |
/*
* szukaj_bin.cpp
*/
#include <iostream>
using namespace std;
void wypelnij(int tab[], int roz) {
srand(time(NULL)); // INICJACJIA generatora liczb pseudolosowych
for(int i = 0; i < roz; i++) {
//~cout << rand() << endl;
tab[i] = rand() % 101;
}
}
void drukuj(int tab[], int roz) {
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2007 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef OUTPUTCONVERTER_H
#define OUTPUTCONVERTER_H
#include "m... |
#include <bits/stdc++.h>
using namespace std;
int G,N,i,j;
int GCD ( int a, int b )
{
int c;
while ( a != 0 ) {
c = a;
a = b%a;
b = c;
}
return b;
}
int main()
{
while(scanf("%d",&N)!=EOF){
if(N==0) break;
G=0;
for(i=1;i<N;i++)
for(j=i+1;j<=N;j++)
{
G+=GCD(i,j);... |
//
// Param.cpp for Param in /home/paumar_a/projet/git/AW_like
//
// Made by cedric paumard
// Login <paumar_a@epitech.net>
//
// Started on Sat Jul 26 17:43:53 2014 cedric paumard
// Last update Mon Aug 4 17:30:14 2014 cedric paumard
//
#include "Param.hh"
#include <fstream>
#include <sstream>
#include <iostrea... |
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define FOR(i,n) for(ll i=0;i<n;i++)
#define FOR1(i,n) for(ll i=1;i<n;i++)
#define FORn1(i,n) for(ll i=1;i<=n;i++)
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define mod 1000000007;
using namespace std;
int main() {
... |
#include <asio.hpp>
#include <iostream>
#include "../include/sender.hpp"
using asio::ip::tcp;
int main() {
asio::io_context io_context;
Sender sender(io_context, "127.0.0.1", "3000");
// An explanation of the API
// data_ready(): returns true if a message is available, otherwise false
// get_msg(): gets an... |
#include<stdio.h>
int main()
{
int i,n,max,sum;
float aug;
for(i=0;i++)
scanf("%d",&i);
for(i=0;i++)
{
sum+=i;
aug=s
}
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
**
** Copyright (C) 2003 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Morten Stenshorne
*/
#ifndef X11_OPFILEC... |
//Phoenix_RK
/*
https://leetcode.com/problems/pascals-triangle-ii/
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle.
*/
class Solution {
public:
vector<int> getRow(int rowIndex) {
vector<int> res(rowIndex+1);
res[0]=res[rowIndex]=1;
... |
//
// cross_validation.cpp
// BPNN
//
// Created by Lnrd on 2018/7/14.
// Copyright © 2018年 LNRD. All rights reserved.
//
#include "cross_validation.hpp"
void cross_validate(BPNN& net, vector<sample>& v){
time_t start,stop;
random_shuffle(v.begin(), v.end());
vector<double> max;
vector<double> min... |
template<typename T> struct Kruskal{
struct edge{
int u,v;
T c;
edge(){}
edge(int x,int y,T z):u(x),v(y),c(z){}
};
vector<edge>e;
void clear(){e.clear();}
void addedge(int u,int v,T c){e.emplace_back(edge(u,v,c));}
T query(int n){
Dsu dsu;int cnt=0;T tot=0... |
#include<bits/stdc++.h>
using namespace std;
char str[1000][1000];
int m, n;
void dfs(int x, int y)
{
if(x<0 || y<0 || x==m || y==n)return;
if(str[x][y]!='@')return;
if(str[x][y]=='@')str[x][y]='*';
dfs(x, y+1);
dfs(x, y-1);
dfs(x+1, y);
dfs(x-1, y);
dfs(x+1, y+1);
dfs(x+1, y-1);
... |
// Copyright 2011 Yandex
#ifndef LTR_CROSSVALIDATION_VALIDATION_RESULT_H_
#define LTR_CROSSVALIDATION_VALIDATION_RESULT_H_
#include <string>
#include <vector>
#include "ltr/scorers/scorer.h"
using std::string;
using std::vector;
namespace ltr {
namespace cv {
/**
* For every split of crossvalidation do... |
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>
#include <sstream>
bool parseArgs (int argc, char **argv, std::string& fnme,
int& width, int& height)
{
if (argc != 4) {
std::cout << "Usage: yuvtest yuvClip width height\n\n" << std::endl;
return false;
}
fnme =... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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
**
*/
#ifndef _URL_LHN_H_
#define _URL_LHN_H_
... |
using namespace std;
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <netinet/in.h>
#include <unistd.h>
#include <sys/socket.h>
#define PORT 8080
class connection {
int socket_file_descriptor, domain, protocal;
char communication_type;
int connection_optional_level, connection_optional_... |
//program to print the pattern
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int i,j,n=1;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
cout<<n;
n++;
}
cout<<"\n";
}
return 0;
}
|
#include "VanzatorAnimale.h"
#include <typeinfo>
#include "VanzatorClienti.h"
#include "animal.h"
#include "sarpe.h"
#include "iguana.h"
#include "caine.h"
#include "Pisica.h"
#include "Iepure.h"
#include "caracatita.h"
#include "corb.h"
#include "papagal.h"
#include "foca.h"
#include "peste.h"
#include "... |
//
// Created by manout on 18-3-4.
//
#ifndef ALOGRITHMS_RBTREE_H
#define ALOGRITHMS_RBTREE_H
template <typename Key, typename Value>
class RBTree
{
public :
using key_type = Key;
using key_refer = Key&;
using const_key_refer = const Key&;
using key_pointer = Key*;
using const_key_pointer = const... |
#include "Teki.hpp"
#include "Barrage.hpp"
#include "Bullet.hpp"
#include "CollisionCircle.hpp"
#include "define.hpp"
#include "Central.hpp"
#include "TitleScene.hpp"
#include "UseDxLib.hpp"
namespace game {
Teki::Teki()
:m_barrage(std::make_unique<Barrage>(200)),
m_collision(std::make_unique<CollisionCircle>(G... |
/**************************************************************************************
* File Name : ChatBox.cpp
* Project Name : Keyboard Warriors
* Primary Author : JeongHak Kim
* Secondary Author :
* Copyright Information :
* "All content 2019 DigiPen (USA) Corporation, all rights reserv... |
#ifndef CSoftInstallMessage_H
#define CSoftInstallMessage_H
#include "CMessage.h"
#include <QObject>
//Ãŵê±àºÅ×¢²á
class CSoftInstallMessage : public CMessage
{
Q_OBJECT
public:
CSoftInstallMessage(CMessageEventMediator* pMessageEventMediator, QObject *parent = 0);
~CSoftInstallMessage();
virtual void packedSe... |
#ifndef Interactions_h
#define Interactions_h 1
class Interactions {
public:
Interactions();
~Interactions();
public:
void AddComptonInteractionPerVolume(G4int pos, G4int vol);
void globalTimePerVolume(G4int pos, G4double gtime);
void localTimePerVolume(G4int pos, G4double ltime);
void Analysis(void);
vo... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
... |
#include<bits/stdc++.h>
using namespace std;
char c[1000];
int cont;
int main()
{
while(gets(c))
{
for(int i=0;c[i];i++)
{
if(isalpha(c[i]) && !isalpha(c[i+1]))
cont++;
}
cout<<cont<<endl;
cont=0;
}
}
|
#ifndef _NFA_H_
#define _NFA_H_
#include <string>
#include <memory>
namespace my_regex{
// 如果VS版本是2015
// 则字符用utf32表示,省的麻烦
#if _MSC_VER < 1900
typedef char my_char;
typedef std::string my_string;
#else
typedef char32_t my_char;
typedef std::u32string my_string;
#endif
class nfa_node;
typedef std::shared_ptr<nfa_nod... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef WINDOWSCOMMON_PLUGINWINDOW_H
#define WINDOWSCOMMON_PL... |
#include <functional>
#include <queue>
#include <vector>
#include <iostream>
#include <map>
using namespace std;
vector<int> twoSum(vector<int>& nums, int target) {
map<int,int> index;
for(int i=0; i<nums.size(); ++i)
{
index[nums[i]] = i;
cout << nums[i] << "==>" << i << endl;
}
f... |
// C++ equivalent for exon_ChIP_extract_from_TagAlign.py
//
// Takes a config file with only one window parameter which is the number of
// base pairs before and after the locations that will be counted.
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include <iostre... |
/*
Write a recursive function to convert a given string into the number it represents. That is input will be a numeric string that contains only numbers,
you need to convert the string into corresponding integer and return the answer.
Input format :
Numeric string S (string, Eg. "1234")
Output format :
Corre... |
#include "pch.h"
#include "followingEnemy.h"
followingEnemy::followingEnemy()
{
m_hasColided = false;
reachedEdge = true;
scorpionSpawnPos = XMVectorSet(0.0f, 0.0f, 0.0f, 0.0f);
}
void followingEnemy::init(bool colidable, int wvpCBufferIndex, Model* mdl, Player *player)
{
initializeDynamic(colidable, false, wvpCB... |
#ifndef ZOO_SCENE_
#define ZOO_SCENE_
#include "cocos2d.h"
#include "ui\UIScale9Sprite.h"
class ZooScene : public cocos2d::Layer
{
public:
static cocos2d::Scene* createScene();
virtual bool init();
CREATE_FUNC(ZooScene);
void timer(float t);
void pretimer(float t);
bool onTouchBegan(cocos2d::Touch... |
#include "ComputeMovingAverage.hpp"
std::vector<double> ComputeMovingAverage (const std::vector<double> & Values, std::vector<double>::size_type p)
{
/////////////////////////////////////////////////////////////////////
/// Your implementation for question 5
std::vector<double>::size_type N = Values.size();
// o... |
/***********************************************************************
h:NoiseLightManager
************************************************************************/
#pragma once
namespace Noise3D
{
//灯光类型
enum NOISE_LIGHT_TYPE
{
NOISE_LIGHT_TYPE_DYNAMIC_DIR = 0,
NOISE_LIGHT_TYPE_... |
#include<iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter a number:";
cin>>n;
while(n>=10)
{
n/=10;
}
cout<<"First digit="<<n;
return 0;
}
|
//
// Created by jeremyelkayam on 10/14/20.
//
#pragma once
#include "entity.hpp"
#include <SFML/Audio.hpp>
class SpecialItem : public Entity {
protected:
bool active, consumed;
//The amount of time this special item has existed in seconds.
float age;
//The amount of time after which this special item wil... |
#include "../../gl_framework.h"
using namespace glmock;
extern "C" {
#undef glAttachShader
void CALL_CONV glAttachShader(GLuint program, GLuint shader) {
}
DLL_EXPORT PFNGLATTACHSHADERPROC __glewAttachShader = &glAttachShader;
}
|
/*
ID: andonov921
TASK: preface
LANG: C++
*/
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <algorithm>
#include <sstream>
#include <climits>
#include <fstream>
#include ... |
#include<stdio.h>
#include<conio.h>
int KthSmallest(int*, int*, int);
void main(){
int arr1[50];
int size1;
int arr2[50];
int size2;
int k;
scanf_s("%d%d%d", &size1, &size2,&k);
if (k <= (size1 + size2)) {
for (int i = 0; i < size1; i++)
scanf_s("%d", &arr1[i]);
for (int i = 0; i < size2; i++)
scanf... |
#pragma once
#include <vector>
typedef unsigned int uint;
typedef int DATA;
bool CheckSetAvail(std::vector<DATA> &myArray, uint pos, DATA data);
void ResetArray(std::vector<DATA> &myArray, uint pos, DATA data);
bool ArrayFull(std::vector<DATA> &myArray);
bool SetData(std::vector<DATA> &myArray, const std::vector<ui... |
#ifndef HEAP_H
#define HEAP_H
class Heap{
private:
int *m_pData;
unsigned int m_size;
private:
unsigned int getLeftChildIndex(unsigned int index);
unsigned int getRightChildIndex(unsigned int index);
void swapNodeValue(unsigned int firstNodeIndex, unsigned int secondNodeIndex);
bool nodeHasALeftChild(unsigne... |
/*
* 方法一:小根堆
*/
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
/*struct cmp{
bool operator ()(ListNode *l1,ListNode *l2){
return l1->val < l2->val;
}
};*/
class Solution1 {
public:
List... |
#include <stdio.h>
int main() {
int controlador = 1, resp;
float num1, num2, soma;
while (controlador < 6) {
printf("\nBem vindo, digite dois numeros para soma: ");
printf("\nSoma %d de 6.", controlador);
printf("\n\nNumero um: ");
scanf("%f", &num1);
printf("\nNumero dois: ");
scanf("%f", &num2);
... |
#include "Types.h"
using namespace OpenFlight;
//------------------------------------------------------------------------------
//--- Matrix4f
//------------------------------------------------------------------------------
Matrix4f::Matrix4f()
{
mInternalStorage = isRowMajor;
mData[0][0] = 1; mData[0][1] = 0... |
#include "Player.h"
#include "Logger.h"
#include "IProcess.h"
#include "HallHandler.h"
#include "GameCmd.h"
#include "ProcessFactory.h"
int pase_json(Json::Value& value, const char* key, int def)
{
int v = def;
try{
v = value[key].asInt();
}
catch(...)
{
v = def;
}
return v;
}
void Player::init()
{
time... |
#include "asteroid.hpp"
#include "game.hpp"
#include "player.hpp"
#include "scrolling_bg.hpp"
#include "spawn_point.hpp"
#include <sgfx/key.hpp>
#include <sgfx/primitives.hpp>
#include <chrono>
int main(int argc, char* argv[])
{
using namespace sgfx;
auto g = game{};
g.spawn<scrolling_bg>("img/bg.rle")... |
#include <fstream>
#include <sstream>
#include <dirent.h>
#include <time.h>
#include <math.h>
#include <stdlib.h>
#include "saltyreader.h"
void ComputeMMR (bool winner, signed short one_mmr, signed short two_mmr, unsigned short one_games, unsigned short two_games, signed short *new_one_mmr, signed short *new... |
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Player.h"
#include "Entity.h"
#include "Bullet.h"
#include <vector>
#include <ostream>
#include "Fighter.h"
#include <string>
#include "Explosion.h"
#include "Powerups.h"
#include "Nscorepowerup.h"
#include "Scorepowerup.h"
using namespace std;
int main()
{
... |
//It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl.
//She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster.
// But the radiator is small, so it can hold only one thing at a time.
//
//Jane wants to perform drying in the minimal ... |
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
#define maxn 1000005
int a[maxn];
int main()
{
int n;
while(scanf("%d", &n) && n){
int x, ans = 0; //用哈希
memset(a, 0, sizeof(a));
for(int i = 0; i < n; i++){
scanf("%d", &x);
a[x]++; ... |
#ifndef None_HPP
#define None_HPP
#include <QObject>
// Object source comes without any _moc/.moc includes
class NonePrivate;
class None : public QObject
{
Q_OBJECT
public:
None();
~None();
private:
NonePrivate* const d;
};
#endif
|
#include "GeoPosition.h"
#include "Route.h"
#include "HttpAgent.h"
#include <QJsonDocument>
#include <QJsonObject>
namespace wpp
{
namespace qt
{
//#ifndef Q_OS_IOS
//GeoPosition(QObject *parent = 0)
// : QObject(parent), geoSource(0),
// receiver(0), method(0), m_delegate(0)
//{
// qDebug() << "GeoPosition()...";... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2005 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#ifndef XPVALUE_H
#define XPVALUE_H
#include "modules/xpath/src/xpdefs.h... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
using namespace std;
const int maxn = 44722;
int prime[maxn + 10],vis[maxn + 10],m;
int cou[maxn + 10];... |
#include <bits/stdc++.h>
using namespace std;
#define TESTC ""
#define PROBLEM "1225"
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
int main(int argc, char const *argv[])
{
#ifdef DBG
freopen("uva" PROBLEM TESTC ".in", "r", stdin);
freopen("uva" PROBLEM ".out", "w", stdout);
#endif
int table[10... |
#include "Road.hpp"// change this to Road
#include "Animal.hpp"
#include "Tortoise.hpp"
#include "Hare.hpp"
#include "Elephant.hpp"
#include "Duck.hpp"
#include "Competition.hpp"
//#include "Road.cpp" // delete this if it doesnot work
#include<iostream>
#include<string>
using namespace std;
int main()
{
Competition ... |
#include<cstdio>
#include<cstring>
using namespace std;
bool e[1048576];
int main()
{
int n;
scanf("%d",&n);
while(1)
{
int d,i;
scanf("%d",&d);
if(d==-1)
break;
else
scanf("%d",&i);
int d1=d,ans=1;
while(i>0)
{
while(d1>1)
{... |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll t, n, k,a[5001], ans, incmnm, incmxm;
int findAnswer(ll index,ll i,ll currentAnswer[], ll mnm,ll mxm){
if(index == k){
// cout << currentAnswer<< mnm << mxm;
// currentAnswer[] /= (mnm * mxm);
... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.p... |
#include "Background.h"
#include <iostream>
void Background::sort(int* tab)
{
int tmp;
for (int i = 0; i < sizeof(tab); i++) {
for (int j = 0; j < sizeof(tab) - 1; j++) {
if (tab[i] > tab[j]) {
tmp = tab[i];
tab[i] = tab[j];
tab[j] = tmp;
... |
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <algorithm>
#include <std_msgs/Int32.h>
#include <s... |
#include "../include/Coin.h"
#include "../include/Camera.h"
#include "../include/TextureManager.h"
#include "../include/CoinScoreManager.h"
#include "../include/AudioManager.h"
namespace gnGame {
Coin::Coin(const Vector2& _pos)
: Item()
, collider()
{
this->transform.setPos(_pos);
this->sprite.setTexture(Te... |
#include <vector>
// #include <chuffed/Vec.h>
#include <chuffed/core/propagator.h>
#include <chuffed/globals/mddglobals.h>
#include <chuffed/mdd/MDD.h>
#include <chuffed/mdd/mdd_prop.h>
#include <chuffed/mdd/opts.h>
#include <chuffed/mdd/weighted_dfa.h>
#include <chuffed/mdd/wmdd_prop.h>
// #include <chuffed/mdd/case.h... |
/**
* 2016 Mohd Fahmi Noorain
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* DISCLAIMER
*
... |
#include "iostream"
#include "Y.h"
using namespace std;
void Y::func(int n){
cout<<"in Y n="<<n<<endl;
} |
#include <chuffed/core/propagator.h>
#include <chuffed/core/sat.h>
#include <chuffed/vars/int-var.h>
extern std::map<IntVar*, std::string> intVarString;
IntVarSL::IntVarSL(const IntVar& other, vec<int>& _values) : IntVar(other), values(_values) {
initVals();
// handle min, max and vals
int l = 0;
while (values[l... |
/* vi: set et sw=4 ts=4 cino=t0,(0: */
/*
* Copyright (C) 2012 Alberto Mardegan <info@mardy.it>
*
* This file is part of minusphoto.
*
* minusphoto is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either... |
// Created on: 2013-12-20
// Created by: Denis BOGOLEPOV
// Copyright (c) 2013-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 ... |
#define CATCH_CONFIG_MAIN
#include "../external/catch2/catch.hpp"
#include "../src/array/contains.hpp"
#include <vector>
#include <string>
#include <array>
template <typename T>
struct TestStruct
{
std::vector<T> val;
T findVal;
bool actual;
TestStruct(std::vector<T> val, T findVal, bool actual)
... |
#include<iostream>
void achman (int *, int);
void nvazman(int *,int);
int foo (int,int*,int, void (*funkcia)(int *,int) );
int main() {
int chap = 5;
int array [5];
std::cout<<"Mutqagreq 5 hat tiv ";
for(int i = 0; 5 > i; ++i){
std::cin>> array[i];
}
int* arg = &array[0];
... |
#pragma once
#include "Element.h"
class q_A {
elem *a;
elem *b;
int k;
public:
q_A();
~q_A();
void del();
void add(int user_value);
void print_queue();
int calc();
void copy_queue(q_A &op1);
q_A *merge(q_A *op1);
elem *get_a();
elem *get_b();
int get_k();
void set_k(int num);
void set_a(elem *value);
... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <iostream>
#include <stdint.h>
#include "ros/ros.h"
#include "node_robot_msgs/robot_info_report.h"
#include "node_robot_msgs/agent_feedback.h"
using namespace std;
class Robot_monitor
{
public:
Robot_monitor(... |
#ifndef _LAMP_H
#define _LAMP_H
#include "common_defines.h"
class Lamp
{
public:
Lamp();
~Lamp();
void startup(int _row, int _col, int _num, string _name);
string getName() { return(name); }
void serializeJson(Writer<StringBuffer>* writer);
bool setState(LampState _newState);
LampState getState() { re... |
#pragma once
#include <unordered_set>
/// CRTP template to maintain a global set of all instances.
///
/// Inheritance from this class should probably be private with `friend struct global_set<Derived>`.
template<class Derived>
struct global_set {
using set_t = std::unordered_set<Derived*>;
using iterator = typen... |
#include "GameSetupState.h"
#include "GameplayState.h"
#include "SDL.h"
#include "SDL_image.h"
#include <iostream>
#include <vector>
#include "Game.h"
#include "MapLoader.h"
#include "Map.h"
#include "Player.h"
#include "ImGui/imgui.h"
#include "ImGui/imgui_sdl.h"
#include "Cards.h"
#include "PlayerStrategies.h"
#incl... |
/***************************************************************************
* Copyright (C) 2009-2010 by Dario Freddi *
* drf@chakra-project.org *
* *
* This pr... |
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2012-2013.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#ifndef _GDCMIO_DICOMSERIESWRITER_HPP_
#define _GDCMIO_DICOMSERIESWRITER_H... |
//
// Core.hpp
// GLFW3
//
// Created by William Meaton on 08/12/2015.
// Copyright © 2015 WillMeaton.uk. All rights reserved.
//
#ifndef Core_hpp
#define Core_hpp
#include "Runner.hpp" //This file is required.
class Core : public BaseCore{
public:
Core(){};
~Core();
void draw();
void update();
... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_pushButtonCalc_clicked();
void on_lineEditNumberOfLiters_... |
class Category_668 {
duplicate = 543;
};
class Category_671 {
duplicate = 543;
}; |
/*
* Task.cpp
*
* Created on: Jun 10, 2017
* Author: root
*/
#include "Task.h"
#include <stdlib.h>
#include "../Log/Logger.h"
#include "../Memory/MemAllocator.h"
namespace CommBaseOut
{
Task::Task():m_flag(false),m_count(0),m_pID(0)
{
}
Task::~Task()
{
if(m_pID)
{
DELETE_BASE(m_pID, eMemoryArray);
... |
/*
** EPITECH PROJECT, 2019
** OOP_indie_studio_2018
** File description:
** main
*/
#include "FileNotFoundException.hpp"
#include "Game.hpp"
#include <iostream>
int main(int ac, char **av)
{
if (ac > 1) {
std::cout << av[1] << " is not necessary" << std::endl <<"USAGE: ./bomberman port" << std::endl;
... |
#include "consts.h"
#include "paths.h"
#include "serialization.h"
#include "assertion.h"
#include <nlohmann/json.hpp>
#include <fstream>
void ConstsImpl::Load() {
DOUT() << "Loading Constants" << std::endl;
std::ifstream file(Paths::Assets + "consts.json");
if (!file.good()) {
THROWERROR("Can't open " + Paths... |
//#include<string>
//
//namespace HW{
// string UpcaseString(const string& string){
// const char* str = string.c_str();
// int length = string.length();
// char dif = 'a' - 'A';
// char*newStr = new char[length + 1];
// //memcpy(newStr, string.c_str(), length + 1);
// for (int i = 0; i < length; i++){
// if (n... |
#include <Servo.h>
//DC motor pin
int motorA = 6;
int motorB = 5;
//button input pin
int button1 = 8;
int button2 = 9;
int button3 = 10;
//button input state
int stateA;
int stateB;
int stateC;
//Servo declaration
Servo myservo;
//Feature creep
int launchCode = 0;
int lAngle = 0;
int lSpeed = 0;
void setup() {
... |
// Created on: 2008-01-20
// Created by: Alexander A. BORODIN
// Copyright (c) 2008-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... |
#include "precompiled.h"
#include "texture/texture.h"
#include "texture/texturecache.h"
#include "render/render.h"
#include "render/rendergroup.h"
#include "render/dx.h"
namespace texture
{
};
using namespace texture;
DXTexture::DXTexture(const std::string& name)
: texture(NULL), name(name), is_transparent(false), u... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2009 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef _MODULE_DATABASE_SEC_POLICY_H_
#define _MODULE_DATABASE_SE... |
#ifndef MATERIALBUFFER_H
#define MATERIALBUFFER_H
#include <Buffers/UniformBuffer.h>
#include <glm/glm.hpp>
class CMaterialBuffer final : public CUniformBuffer
{
public:
CMaterialBuffer();
void setDiffuseColor(const glm::vec3 &color) const;
void setSpecularColor(const glm::vec3 &color) const;
void s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.