text stringlengths 8 6.88M |
|---|
#include<PA9.h>
#include<stemmer.h>
#include<exceptions.h>
#include<similarities.h>
#include<iostream>
#include<fstream>
#include<unordered_set>
#include<map>
using std::map;
using std::unordered_set;
using std::cout;
using std::endl;
using std::ifstream;
int WrongFormat(char* arg0)
{
cout << "Usage: " << arg0 << " ... |
#ifndef LIGHTIMAGE_HISTOGRAM_H
#define LIGHTIMAGE_HISTOGRAM_H
#include "../../core/include/core.hpp"
namespace li {
class Histogram {
public:
Histogram();
Histogram(Image &_im);
~Histogram();
Image Render(int _width, int _height);
int channles;
int *data;
... |
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
// sequence functions
void factorial_loop();
int factorial(int n);
int fib(int n);
void fib_loop();
int main() {
int n;
int choice;
//asks which function you would like to do
cout << "Enter an action choice." << endl;
co... |
#ifndef MATH_MAX_ELEMENT_HPP
#define MATH_MAX_ELEMENT_HPP
#include <cassert>
namespace Math
{
template<class FwIterator, class Compare>
FwIterator maxElement(FwIterator _begin, FwIterator _end, Compare cmp)
{
assert(_begin != _end);
FwIterator maxElem = _begin++;
while (_begin !=... |
#ifndef MIDIPARSER_H
#define MIDIPARSER_H
#include "RtMidi.h"
#include <QDebug>
#include <QObject>
#define CC 0b1011
#define NOTE_ON 0b1001
#define NOTE_OFF 0b1000
using namespace std;
class MidiParser : public QObject {
Q_OBJECT
public:
MidiParser(QObject *parent = 0, int = 0, int = 0);
virtual ~MidiParser(... |
// Created on: 1999-04-14
// Created by: Roman LYGIN
// Copyright (c) 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 Lesser ... |
#include "qkcore.h"
#include "qkutils.h"
#include <QDebug>
using namespace Qk;
using namespace QkUtils;
int Frame::flags(QByteArray frame, bool raw)
{
int flags = 0;
int i=0;
if(raw)
i++;
flags = (frame[i] & 0xFF) +
((frame[i+1] & 0xFF) << 8);
return flags;
}
QByteArray Fra... |
#include "board.h"
#include <iostream>
#include <fstream>
using namespace hw2;
using namespace std;
// used with fileparser class
void board::generate_from_file(){
// establish board is running
setRunning(true);
// safely getting user input
string filename, line;
int r, c;
int i=-1;
... |
/** Kabuki SDK
@file /.../Source/Kabuki_SDK-Impl/_Id/EmailAddress.h
@author Cale McCollough <http://calemccollough.github.io> <http://calemccollough.github.io>
@copyright Copyright © 2016 Cale McCollough
@license http://www.apache.org/licenses/LICENSE-2.0
@brief This file contain... |
/*
Copyright (c) 2014 Mircea Daniel Ispas
This file is part of "Push Game Engine" released under zlib license
For conditions of distribution and use, see copyright notice in Push.hpp
*/
#pragma once
#include "Input/Touch.hpp"
namespace Push
{
class TouchListener
{
public:
TouchListener();... |
#pragma once
#include <Poco/SharedPtr.h>
#include <Poco/Timespan.h>
#include <Poco/JSON/Object.h>
#include "gwmessage/GWRequest.h"
#include "model/DeviceCriteria.h"
#include "model/DevicePrefix.h"
namespace BeeeOn {
/**
* @brief This message is used to request searching for a device
* by criteria. This is a kind ... |
#pragma once
#include "Character.h"
#include "NonPlayer.h"
#include "Playable.h"
class NPC :
public Character, NonPlayer
{
};
|
#include <bits/stdc++.h>
using namespace std;
long F(int n) {
if (n == 0) return 0;
if (n == 1) return 1;
return F(n-1) + F(n-2);
}
long myF(int n)
{
if (n == 0) return 0;
if (n == 1) return 1;
long sum=0,f=1,a;
for(int i=1;i<n;i++)
{
a=f;
f=sum+f;
sum=a;
}
... |
/*
* Copyright 2019 LogMeIn
*
* 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 w... |
// Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
#include "DynamicObjectMagicRayView.h"
#include "Core.h"
#include "DynamicObjectMagicRayModel.h"
void DynamicObjectMagicRayView::initView(DynamicObjectModel* dynamicObjectModel)
{
m_dynamicObjectModel = dynamicObjectModel;
//Obtain the atlas key looking up where the mesh is. Could be any mesh.
m_atlasKey = Core::s... |
#pragma once
#include <Windows.h>
#include "allocators.h"
class Heap
{
HANDLE Handle;
bool Destroy;
public:
Heap(HANDLE h, bool destroy) : Handle{ h }, Destroy{ destroy }
{
}
~Heap()
{
if (Destroy)
{
auto r = HeapDestroy(Handle); //TODO test
}
}
};
class Committed;
class ComittedAllocator
{
bool ... |
#include "Weapon.h"
#include "Tech.h"
#include "UnitType.h"
#include "Upgrade.h"
#include "..\EnumMapping.h"
namespace BroodWar
{
namespace Api
{
BWAPI::WeaponType ConvertWeapon(Weapon^ weapon)
{
if(weapon == nullptr)
return BWAPI::WeaponType();
return *(weapon->instance);
}
Weapon^ ConvertWeapon... |
#ifndef intersection2d_h
#define intersection2d_h
#include <vector>
#include <tr1/memory>
#include <Eigen/Core>
using Eigen::Vector2d;
//TODO: It might be possible to make it a template, given the address of a constant pointer to k.
class Intersection2d {
public:
Intersection2d(double position, double rotation, ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2010 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 "modules/database/ps_commander.h... |
#include <bits/stdc++.h>
using namespace std;
#define TESTC ""
#define PROBLEM "499"
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 300
int main(int argc, char const *argv[])
{
#ifdef DBG
freopen("uva" PROBLEM TESTC ".in", "r", stdin);
freopen("uva" PROBLEM ".out", "w", stdout);
#endi... |
/* -*- 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.
*/
#include "core/pch.h"
#ifdef SUPPORT_DATA_SYNC
#include "modules... |
#include "RunActionMessenger.hh"
#include "RunAction.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
RunActionMessenger::RunActionMessenger(RunAction* RunAct)
:runAct(RunAct)
{
runActDir = new G4UIdirectory("/CCFCF/run/");
runActDir->SetGuidance("Run Action control.");
rootNameCmd = new G4... |
//
// Created by 钟奇龙 on 2019-05-01.
//
#include <iostream>
#include <vector>
using namespace std;
class Node{
public:
int data;
Node *left;
Node *right;
Node(int x):data(x),left(NULL),right(NULL){}
};
Node* posorderFind(Node *root,vector<int> &record){
if(!root){
record[0] = 0;
recor... |
#include "Inheritance.h"
int Base::PublicMethodBase()
{
return 0;
}
int Base::CallProtectedMethod()
{
return ProtectedMethodBase();
}
int Base::CallPrivateMethod()
{
return PrivateMethodBase();
}
int Base::ProtectedMethodBase()
{
return 0;
}
int Base::PrivateMethodBase()
{
return 0;
}
int A::PublicMethodBase... |
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <algorithm>
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
using namespace std;
int lengthOfLastWord(const char *s){
string str = s;
if(str.l... |
#include "LeagueImageAnalyzer.h"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/superres.hpp"
#include <ctime>
#include <math.h>
#include <algorithm>
#include <string>
#include <thread>
#include "LeagueConstants.h"
#include "LeagueItemData.h"
#include "LeagueEventDatabase.h"
#include "C... |
#pragma once
#include <new>
struct NewHandlerObject
{
public:
NewHandlerObject(std::new_handler handler) :handler(handler){};
~NewHandlerObject()
{
std::set_new_handler(handler);
};
private:
NewHandlerObject(const NewHandlerObject& handlerObject){};
NewHandlerObject* operator=(const NewHandlerObject& handlerO... |
#ifndef _Анимация_Н
#define _Анимация_Н
#include "TinyXML/tinyxml.h"
#include <SFML/Graphics.hpp>
using namespace sf;
class анимация
{
public:
std::vector<IntRect> кадр, кадр_перевёрнутый;
double ТекКадр, скорость;
bool зеркало, ПроигАнимацию , повтор;
Sprite картинка;
анимация() {
ТекКадр = 0;
ПроигАнимацию ... |
#include "defines.h"
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stdlib.h>
#include <string.h>
class sortHandler{
public:
int idx;
const std::vector<std::vector<float>> *data;
const std::vector<int> *idxs;
sortHandler(const std::vector<std::vector<float... |
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <map>
#define pb push_back
#define inf 100000000
using namespace std;
int b[111];
bool d[111];
int pre[111];
int s[111][111];
int n,nduong;
int bd,kt,human;
int itest;
void input(){
int u... |
/*
* ServerManager.h
*
* Created on: Jun 27, 2017
* Author: root
*/
#ifndef SERVERMANAGER_H_
#define SERVERMANAGER_H_
#include "./Network/Service_Handler.h"
#include "./Network/InetAddress.h"
#include "Smart_Ptr.h"
#include "./Network/NetWorkConfig.h"
#include <map>
#include "define.h"
#include "Common.h"
... |
#ifndef GRID_H
#define GRID_H
#include<vector>
#include<string>
#include<set>
#include"vec2.h"
#include <Eigen/Dense>
namespace cellogram
{
namespace PointsUntangler
{
class Grid;
class Mesh;
void meshToGrid(Mesh &m, Grid &g, bool verbose);
class Grid{
public:
bool verbose = false;
/* data per grid cell (... |
#ifndef VIRUS_H
#define VIRUS_H
#include <QObject>
#include <QGraphicsRectItem>
#include "bio.h"
class Virus : public QObject, public QGraphicsRectItem, public Bio
{
Q_OBJECT
private:
enum Direction {LEFT, RIGHT, UP, DOWN};
enum Direction direction;
float velocity;
int moveCnt;
int sizeCnt;
... |
// Created on: 2015-09-21
// Copyright (c) 2015 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 as published
// by the Free Software... |
// TextEditorView.h: CTextEditorView 클래스의 인터페이스
//
#pragma once
class CTextEditorView : public CView
{
protected: // serialization에서만 만들어집니다.
CTextEditorView() noexcept;
DECLARE_DYNCREATE(CTextEditorView)
// 특성입니다.
public:
CTextEditorDoc* GetDocument() const;
// 작업입니다.
public:
// 재정의입니다.
public:
virtual voi... |
#include<iostream>
#include <string>
#include<algorithm>
#include <utility>
#include <cstdlib>
using namespace std;
void y_sort(pair<int,int> arr[], int N) {
pair<int, int> arr_temp[50];
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
if (arr[i].second > arr[j].second) {
arr_temp[0] = arr[i]... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
#define INF 10e17 // 4倍しても(4回足しても)lon... |
//---------------------------------------------------------------------------
#ifndef MFSManagerH
#define MFSManagerH
// bugfix 2006-06-15 未考虑 压缩后的文件 CompressedOfSize 比 未压缩的 FileSizeLow 还大,发生复制越界
// 1029行:
// 原始: pMfsHandle->lpData = new BYTE[pMfsHandle->iSizeOfData];
//
// 修改: pMfsHandle->lpData = new B... |
/* cppbuch/k1/intlimits.cpp
Beispiel zum Buch von U. Breymann: Der C++ Programmierer; 4. Aufl. Hanser 2015
Diese Software ist freie Software. Website: http://www.cppbuch.de/
*/
#include <cstddef>
#include <iostream>
#include <limits> // hier sind die Bereichsinformationen
using namespace std;
int main() {
cout <<... |
#pragma once
#include <OGLML/Sprite.h>
#include <OGLML/QuadRender.h>
#include <glew.h>
namespace oglml
{
template<size_t MAX_INSTANCE_RENDERING>
class SpriteInstanced
{
public:
SpriteInstanced();
~SpriteInstanced() = default;
void CollectSpriteData(const Sprite& sprite);
void DrawInstanced();
void Cle... |
#include "../../idlib/precompiled.h"
#pragma hdrstop
#include "../Game_local.h"
#include "../Weapon.h"
class rvWeaponMachinegun : public rvWeapon {
public:
CLASS_PROTOTYPE( rvWeaponMachinegun );
rvWeaponMachinegun ( void );
virtual void Spawn ( void );
virtual void Think ( void );
void Save ( id... |
#include "ServiceConfig.h"
CServiceConfigUI::CServiceConfigUI()
{
m_pService = static_cast<CEditUI*>(m_pm.FindControl(TEXT("service")));
m_pPort = static_cast<CEditUI*>(m_pm.FindControl(TEXT("port")));
m_pSql = static_cast<CEditUI*>(m_pm.FindControl(TEXT("sql")));
m_pUserName = static_cast<CEditUI*>(m_pm.FindCont... |
#include "BooksDB.h"
#include <ctime>
#include <fstream>
std::wstring convert(LPWSTR str) {
return std::wstring(str);
}
BOOL IsDots (const std::wstring &strName)
{
return strName == L"." || strName == L".." ;
}
BOOL IsDir (const WIN32_FIND_DATA &fdFile)
{
return (fdFile.dwFileAttributes & FILE_ATTRIBUTE_... |
/** Underscore
@file /.../Source/Kabuki_SDK-Impl/_Game/UserList.cpp
@author Cale McCollough <http://calemccollough.github.io>
@copyright Copyright © 2016 Cale McCollough
@license http://www.apache.org/licenses/LICENSE-2.0
*/
#include <vector>
using namespace _Id;
UserList::UserList ()
{... |
/********************************
* Reef-Life Aquarium Controller *
* Versión 3.0.0 - 201506 *
* Control de Leds *
********************************/
//Inicio los parámetros para el encendido de los LEDS
void initLeds() {
pinMode(ledA, OUTPUT);
pinMode(ledB, OUTPUT);
pinMode(ledC, OUTPUT);
... |
#include "item.hpp"
int main(int argc, char* argv[])
{
Q_INIT_RESOURCE(example);
Item item;
item.go();
return 0;
}
|
//存储自动站文件
//最后修改 2011年1月10日
#ifndef READ_AWS_FILE
#define READ_AWS_FILE
#include <comn.h>
#include <string-trans.h>
#include <mysql.h>
#ifdef _DEBUG
#pragma comment(lib,"D:/Program Files/MySQL/MySQL Server 5.1/lib/debug/libmysql.lib")
#else
#pragma comment(lib,"D:/Program Files/MySQL/MySQL Server 5.1/... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef GADGET_UPDATE_DIALOG
#define GADGET_UPDATE_DIALOG
#ifde... |
#ifndef VULKANLAB_ENGINE_H
#define VULKANLAB_ENGINE_H
#include <memory>
#include "Loop.h"
#include "../Events/Event.h"
#include "../Scene/SceneManager.h"
#include "../Network/Network.h"
class Viewport;
class Renderer;
class Window;
class Engine {
public:
Engine();
~Engine();
/**
* Start the engi... |
#pragma once
class CRollupBar : public CWnd
{
public:
void SetRollupCtrl( int i, CRollupCtrl* pCtrl, const char* sToolTip );
CTabCtrl m_tabCtrl;
std::vector<CRollupCtrl*> m_Controls;
CImageList m_tabImageList;
}; |
//
// Created by JACK on 11/9/2015.
//
#ifndef CEF06_AVERAGE_H
#define CEF06_AVERAGE_H
#include "Institution.h"
class Average : public Institution {
string name;
int graduate;
string location;
public:
Average();
Average(string,int,string);
Average& operator=(const Average&);
~Average();
virtual void get_descr... |
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define maxn 200005
struct node {
int x;
int y;
} num[maxn];
int m;
int cnt=0;
ll gao(int t){
ll res=1;
for(int i=1;i<=t;i++){
int temp=i;
while(temp%2==0&&cnt>0){
temp/=2;
cnt--;
... |
#include<bits/stdc++.h>
#define rep(i,n) for (int i =0; i <(n); i++)
using namespace std;
using ll = long long;
int main(){
int N;
cin >> N;
vector<int>A(N);
rep(i,N)cin >> A[i];
int sum = 0;
rep(i,N)sum += A[i];
int ans = 100000000;
for(int i = 0; i < N... |
#pragma once
/*
It's a class which encapsulate the IP header for a UNIX platform.
*/
#include "IIPHeader.hh"
#include <netinet/ip.h>
class CUIPHeader : public IIPHeader
{
protected:
void *_tmpData;
struct iphdr _sysHeader;
void *_optionsFields;
unsigned int _sizeOptionsFields;
unsigned int _size... |
/*
* Copyright (C) 2011-2016 Intel Corporation. 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 li... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software ASA 2009-2011
*
* WebGL GLSL compiler -- Cg/HLSL backend
*
*/
#ifndef WGL_CGBUILDER_H
#define WGL_CGBUILDER_H
#include "modules/webgl/src/wgl_glsl.h"
#include "modules/webgl/src/wgl_ast.h"
#include "mod... |
#include <stdio.h>
#include<conio.h>
/*----------
*INSERT_SORT
*
* args
* A[] int[],the number of A arrary
* len int ,A length
*
------------*/
void insert_sort(int A[],int len){
int i,j,key;
//printf("A length %d\n",len); //output arrary length
for(j=1;j<len;j++){
key=A[j];
i=j-1... |
//
// Copyright(c) 2016-2017 benikabocha.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
//
#include "MMDMorph.h"
namespace saba
{
}
|
#include "../Solution.h"
// 官方解法 动态规划
struct Status
{
int a, b, c;
};
Status dfs2(TreeNode *node)
{
if (node == nullptr)
{
return {INT_MAX / 2, 0, 0};
}
auto [la, lb, lc] = dfs2(node->left);
auto [ra, rb, rc] = dfs2(node->right);
int a = lc + rc + 1;
int b = min(a, min(la + rb... |
#include <iostream>
#include <vector>
#include <ctime>
#include <algorithm>
#include <limits>
#include <array>
using namespace std;
long long solve(int, int);
int main() {
clock_t start = clock();
//long long result = solve(10000000, 1000);
long long result = solve(100000000, 100000);
clock_t end = clock();
co... |
/*
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, ... |
#pragma once
#include "GameObject.h"
class ParticleEmitterComponent;
class Sparkler : public GameObject
{
public:
Sparkler(DirectX::XMFLOAT3 position = {}, DirectX::XMFLOAT4 color = {1.f, 1.f, 1.f, 1.f}, float lifeTime = 1.f, std::wstring assetFile = L"./Resources/Textures/Sparkle.png", float size = 2.f, flo... |
#pragma once
#include "FEBattleField.h"
//AIs should extend this abstract class
struct FEMoveOrder
{
FEUnit* unitToMove;
int endX;
int endY;
FEUnit* attackTarget;
};
class FEBattleField;
class FEAIInterface
{
public:
FEAIInterface(void);
virtual ~FEAIInterface(void);
//this function takes a list of units that... |
#include<bits/stdc++.h>
#include<ext/pb_ds/priority_queue.hpp> // pb_ds may be unavailable in some contests
using namespace std;
vector<int> v[1000],w[1000];// Adjacent List
struct node
{
int v;
int dist;
bool operator<(const node & b)const
{
return dist>b.dist;
}
};
int dist[1000];
bool flag[1000];
using Heap... |
#ifndef _iDistrict_HG_
#define _iDistrict_HG_
#include "iPlayer.h"
#include <sProtocols.h>
#include <set>
class iDistrict
{
public:
virtual ~iDistrict() {}
// begin of iDistrict
virtual bool AddPlayer(iPlayer* user) = 0;
virtual bool RemovePlayer(iPlayer* user) = 0;
virtual bool Actioon() = 0;
// end of iDistr... |
#include <iostream>
#include <set>
#include <list>
#include <map>
int main()
{
std::list<int> lists;
lists.push_back(5);
std::list<int>::iterator it;
it = lists.begin();
lists.push_back(4);
lists.push_front(3);
it = lists.begin();
std::cout << *(it) << std::endl;
std::multiset<int... |
/*Дні тижня пронумеровані: 1 - пн , 2 - вт ,..., 7 - нд. Дано число К,
яке лежить в діапазоні 1 - 365. 1 січня - вівторок. Знайти номер дня.
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Enter K\n";
int k;
cin >> k ;
int n = (k + 1)%7;
cout << "Day number: " << n << endl;
r... |
//
// Created by 钟奇龙 on 2019-05-01.
//
#include <iostream>
using namespace std;
class Node{
public:
int data;
Node *left;
Node *right;
Node(int x):data(x),left(NULL),right(NULL){}
};
bool isBSTNode(Node *root,Node *target){
if(!root) return false;
if(root == target) return true;
return root-... |
#include "iir.h"
#include "iir_base.h"
////////////////////////////////////////////////////////
// 名称:
// IIR_PATH3_HPInit_HP2
// 功能:
// 设置高通滤波器系数
// 参数:
// 无???
// 返回值:
// 无
////////////////////////////////////////////////////////
Sub_AutoField IIR_PATH3_HPInit_HP2
{
RSP -= 40 * MMU_BASE;
... |
#pragma once
#include <iostream>
#include <vector>
#include <string>
#include <Poco/SharedPtr.h>
#include <Poco/Dynamic/Var.h>
namespace BeeeOn {
class Locale;
class Translator {
public:
typedef Poco::SharedPtr<Translator> Ptr;
virtual ~Translator();
/**
* Format the message identified by given key. This me... |
/** InsanePixels ************************************************************************************/
/* */
/* SOLUTION: InsaneWare */
/* PROJECT: Runtime */
/* FOLDER: Core/Windows */
/* FILE: InpixWindowsApplication.h */
/*... |
#ifndef PARENT_H_INCLUDED
#define PARENT_H_INCLUDED
#include <iostream>
#include "child.h"
using namespace std;
#define nil NULL
#define nextP(P) (P)->nextP
#define first(L) (L).first
#define info(P) (P)->info
#define child(P) P->child
typedef struct infotypeP;
struct infotypeP{
string namaLapas... |
// Created on: 2005-02-14
// Created by: Alexey MORENOV
// Copyright (c) 2005-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 a... |
#pragma once
#include "ofMain.h"
class MathUtils
{
public:
// -------------------------------------------
static float step(float a, float x)
{
return (float) (x >= a);
}
// -------------------------------------------
static float linearStep( float _edge0, float _edge1, float _t )
{
// Sca... |
#pragma once
#include "Basic_Window.hh"
#include "Fenetre_Debat.hh"
#include "Fenetre_Entry.hh"
#include <gtkmm/image.h>
#include <gtkmm/label.h>
#include <gtkmm/box.h>
#include <gtkmm/button.h>
class Fenetre_Choix : public Basic_Window
{
public:
Fenetre_Choix();
Fenetre_Choix(Glib::ustring titre, Glib::ustring n... |
#ifndef SUBDIR_TEST
# error Expected SUBDIR_TEST
#endif
int main(int, char**)
{
return 0;
}
|
#include <iostream>
using namespace std;
void add(int arr1[],int arr2[],int m,int c[])
{
if(m>=0)
{
c[m]=arr1[m]+arr2[m];
cout<<c[m]<<" ";
add(arr1,arr2,m - 1,c);
}
}
int main()
{
int m;
cout<<"Enter the size of arrays:" ;
cin>>m;
int arr1[m];
int c[m]={0};... |
#ifndef GNEXTRADATA_H
#define GNEXTRADATA_H
class GnExtraData : public GnObject
{
GnDeclareRTTI;
GnDeclareAbstractStream;
public:
static const guint32 NULL_TYPE = GUINT32_MAX;
protected:
guint32 mID;
guint32 mType;
public:
inline GnExtraData() : mType( NULL_TYPE ) {
}
inline guint32 GetID() {
return mID... |
#pragma once
class Monster;
class MonsterAction:public GameObject
{
public:
//アクションの仮想関数。これを継承したアクションは基本的にこれだけを使う
//me: アクションを使うもんすたー
virtual bool Action(Monster* me) { return false; };
//アクションを行う対象のモンスターの設定をする
//num: 対象モンスターのnum
void Settarget(int num);
//void Resettarget();
//直接モンスターを設定する
//mon: 対象モンスター
... |
/*This class exists to work as a message passing system between objects and subsystems of the game.
*It will wrap both the information that is to be sent and the type of event it is.
*/
#ifndef EVENT_H
#define EVENT_H
#define ARG_SIZE 16 //can't be less than 8.
#define ARG_COUNT 4 //can't be less than 1.
#include <... |
#include "BattleSystem.h"
#include "ObjectManager.h"
#include "../../Base/Source/Main/Engine/System/SceneSystem.h"
#include "../Audio/Audio_Player.h"
BattleSystem::BattleSystem()
{
}
BattleSystem::~BattleSystem()
{
}
// Initialising Here
void BattleSystem::Init()
{
SelectedTroop = NULL;
SelectedEnemyTroop = NULL;
... |
#include "Ollie.h"#
Ollie:: Ollie() {
health = 50;
armour = 30;
speed = 250;
}
|
//
// main.cpp
// AlgoritmosDeBusqueda
//
// Created by Daniel on 25/08/14.
// Copyright (c) 2014 Gotomo. All rights reserved.
//
#include <iostream>
#include "Busqueda.h"
#define N 10
using namespace std;
void imprimirMatriz(int** a);
/*template <typename T>
bool busquedaSequencial(T a[], T buscar);
template <... |
#include <stdio.h>
int main() {
for (size_t i = 1; i <= 100; i++) !((i % 3 ? 0: printf("Fizz")) | (i % 5 ? 0 : printf("Buzz"))) ? printf("%d \n", i): printf("\n");
}
|
#define pwm_a 5
#define pwm_b 6
#define motor_direito_a 10
#define motor_direito_b 9
#define motor_esquerdo_a 7
#define motor_esquerdo_b 8
byte velocidade = 255;
char bt;
void setup() {
Serial.begin(9600);
pinMode(motor_direito_a, OUTPUT);
pinMode(motor_direito_b, OUTPUT);
pinMode(motor_esquerdo_a, OUTPUT);
... |
// Copyright 2018 Benjamin Bader
//
// 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 agree... |
#include<bits/stdc++.h>
using namespace std;
#define maxn 100005
int a[maxn];
int yuchu[maxn];
int yuchu1[maxn];
int gcd(int a,int b){
if(!a)return 1;if(!b)return a;
if(a<0) a=-a; for(int t;b;t=a%b,a=b,b=t);
return a;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int T;
... |
#include <bits/stdc++.h>
using namespace std;
int n,c;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);
cin >> c;
for(int i = 0; i < c; ++i){
cin >> n;
int s=(n*n*n*n-6*n*n*n+23*n*n-18*n+24)/24;
cout << s << '\n';
}
return 0;
}
|
/*
Copyright (c) 2014 Mircea Daniel Ispas
This file is part of "Push Game Engine" released under zlib license
For conditions of distribution and use, see copyright notice in Push.hpp
*/
#pragma once
#include "Core/Hash.hpp"
#include "Core/Resource.hpp"
#include "Render/Texture.hpp"
#include <cstdint>
namespace Push... |
#include <Light.h>
Light::Light() {
this->position = vec3(0.0f, 0.0f, 0.0f);
this->ambient = vec3(1.0f, 1.0f, 1.0f);
this->diffuse = vec3(1.0f, 1.0f, 1.0f);
this->specular = vec3(1.0f, 1.0f, 1.0f);
this->direction = vec3(0.0f, 0.0f, 0.0f);
this->attenuation = vec3(0.9f, 0.8f, 0.7f);
this->isActive = true;
this... |
#include "MyObject.h"
#include <QDebug>
void MetaObject::active(MyObject *sender, int idx)
{
//qDebug() << "idx=================" << idx;
Connection c = sender->connections[idx];
c.receiver->metacall(c.slotID);
}
MyObject::MyObject()
{
}
MyObject::~MyObject()
{
}
void MyObject::My_connect(MyObject *se... |
#ifndef _MT_RAND_H
#define _MT_RAND_H
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <vector>
class mt_rand {
public:
mt_rand(int seed);
~mt_rand();
unsigned int rand(uint low, uint high);
// Adapted from Helpers/array.php:mt_shuffle
template <typename T>
void bad_shuffle(T *array, ... |
#include"conio.h"
#include"stdio.h"
void main(void){
clrscr();
int base=2;
int y=1, i=1, x;
printf("Enter Value: ");
scanf("%d", &x);
while(i<=x){
y*=base;
if(y==x)
break;
i++;
}
printf("%d", i);
getch();
}
|
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <fstream>
#include <algorithm>
#include <boost/iterator/iterator_facade.hpp>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
struct Node {
std::string value;
Node *next{nullptr};
Node(std::str... |
#include "StdAfx.h"
#include "GcScreenMeshPropEntity.h"
#include "GcPropertyGridNumberPair.h"
#include <memory>
GcScreenMeshPropEntity::GcScreenMeshPropEntity(void)
{
Init();
}
GcScreenMeshPropEntity::~GcScreenMeshPropEntity(void)
{
}
bool GcScreenMeshPropEntity::Init()
{
GcPropertyGridProperty* pGroup = NULL;
p... |
#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>
#inc... |
#include <iostream>
#include "MainMenu.h"
#include "Game.h"
/// <summary>
/// @author Peter Lowe
/// @version 1.0
/// @date May2016
///
/// </summary>
MainMenu::MainMenu()
{
}
MainMenu::~MainMenu()
{
}
|
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ribbon = new ofxTwistedRibbon();
}
//--------------------------------------------------------------
void ofApp::update(){
ofVec3f position;
float radius = sin(ofGetElapsedTimef()) * 50 + 200;
float... |
#include <iostream>
#include <vector>
#include <queue>
#include <functional>
#include "TreeNode.h"
#include "BinarySearchTree.h"
using namespace std;
bool is_binary_search_tree(
const TreeNode<int>* node, int* min = nullptr, int* max = nullptr) {
if (!node) {
return true;
}
auto value =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.