text stringlengths 8 6.88M |
|---|
#include <iostream>
#include <vector>
using namespace std;
vector<pair<int, int>> t;
pair<int, int> combine(pair<int, int> a, pair<int, int> b) {
if (a.first < b.first) {
return a;
} else if (a.first > b.first) {
return b;
}
return make_pair(a.first, a.second + b.second);
}
void set(... |
#include <stdio.h>
#include <stdlib.h>
template<typename T>
T max(const T arr[], int size) {
T maxElem=arr[0];
for (int i=0;i<size;i++)
if(arr[i]>maxElem)
maxElem=arr[i];
return maxElem;
}
int main(){
int a[] = {1,2,4,8,7};
int b = max(a,sizeof(a)/sizeof(int));
printf("最大数组元素:%d... |
/**
* @file orbitSimStruct.h
* @brief This file contains all structures definition used by the orbit Simulator.
* @author Giuseppe Romeo
* @date Created: Nov 15, 2005
*
* $Header: /nfs/slac/g/glast/ground/cvs/orbitSim/orbitSim/orbitSimStruct.h,v 1.2 2008/09/25 17:20:28 vernaleo Exp $
*/
#ifndef orbitSimStruct... |
#include <iostream>
int main()
{
std::cout << (char)30 << (char)30 << (char)30 << (char)30 << (char)30 << (char)30 << (char)30 << (char)176 << 'E' << std::endl;
std::cout << (char)30 << (char)30 << (char)30 << (char)30 << (char)30 << (char)5 << (char)5 << (char)176 << (char)176 << std::endl;
std::cout << (char)30 <... |
/*
I did a brute force approach.
I found, manually, the move to make the least amount of moves and used this program to prove it.
I go thorught my steps and them find alternate moves along the way to see if there a shorter path
*/
#include "stdafx.h"
#include <cstdlib>
#include <iostream>
#include "board.h"
#include... |
#include<stdio.h>
#include<conio.h>
int main()
{
int arr[5],i;
int *p=arr;
printf("Enter five numbers separated by space:");
scanf("%d%d%d%d%d",p,p+1,p+2,p+3,p+4);
printf("Your numbers are:\n");
for(i=0;i<5;i++)
printf("%d\n",arr[i]);
getch(... |
#include "userinfo.h"
UserInfo::UserInfo()
{
}
int UserInfo::ID()
{
return m_id;
}
void UserInfo::ID(int id)
{
m_id = id;
}
QString UserInfo::Name()
{
return m_name;
}
void UserInfo::Name(QString name)
{
m_name = name;
}
void UserInfo::NickyName(QString nicky_name)
{
m_nicky_name = nicky_name;... |
/***************************************************************************
Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
2010-2020 DADI ORISTAR TECHNOLOGY DEVELOPMENT(BEIJING)CO.,LTD
FileName: UDPDemuxer.h
Description: Provides a "Listener" socket for UDP. Blocks on a local IP & port,
... |
/***************************************************************************
Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
2010-2020 DADI ORISTAR TECHNOLOGY DEVELOPMENT(BEIJING)CO.,LTD
FileName: OSCodeFragment.cpp
Description: Provide OS abstraction for loading code fragments(.so/dll).
... |
#include "pch.h"
#include "Mesh.h"
Mesh::Mesh()
{
}
Mesh::~Mesh()
{
if (positions_) delete[] positions_;
}
/////////////////////////////////////////////////////////////////////////////////////////////////
Cube_mesh::Cube_mesh(XMFLOAT3 xmf3Center, XMFLOAT3 xmf3Extents) : Mesh()
{
vertices_ = 8;
float fx = xmf3Ex... |
#ifndef EFECTO_COLISION_RECOGEDOR_H
#define EFECTO_COLISION_RECOGEDOR_H
#include "../../interfaces/efecto_colision_recogedor_i.h"
#include "../jugador.h"
#include "../sistemas/contador_tiempo.h"
namespace App_Juego_Logica
{
class Efecto_colision_recogedor:
public App_Interfaces::Efecto_colision_recogedor_I
{
/////... |
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include "opencv2/core/core.hpp"
using namespace cv;
using namespace std;
int main()
{
VideoCapture vid(0);
int i, j;
Mat temp, a;
/* createTrackbar("Low", "Vid", &x, 1000);
createTrackbar("High", "V... |
#ifndef DeviceBuzzer_h
#define DeviceBuzzer_h
#include "Arduino.h"
#include "../ArduinoJson/ArduinoJson.h"
#define BUZZER_PIN 13 // D7 => 13
namespace ART
{
class ESPDevice;
class DeviceBuzzer
{
public:
DeviceBuzzer(ESPDevice* espDevice);
~DeviceBuzzer();
static void create(DeviceBuzzer* (&deviceB... |
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <string>
//#include "config.h"
//#include "sshbuf.h"
#include "sftp-common.h"
#include "sftp-pgsql-plugin-store.h"
//:#define SSHDIR "/etc/ssh"
int main(int argc, char ** argv)
{
int home_dir_handle;
int rc = sftp_cf_open_dir(1, "/home/mskel... |
//**************************************************************************
//**
//** See jlquake.txt for copyright info.
//**
//** This program 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 ... |
//
// CotrollerLayer.cpp
// CatchGirl
//
// Created by xin on 16/4/6.
//
//
#include "CotrollerLayer.hpp"
#include "MapLayer.hpp"
#include "OperateLayer.hpp"
#include "Hrocker.hpp"
#include "PropertyManager.hpp"
#include "BaseRole.hpp"
bool CotrollerLayer::init(){
auto roleMap = FileUtils::getInstance()->g... |
#pragma once
#include "AnimationBlendTo.h"
class AnimationBlendTest
{
public:
static void Test()
{
TestName();
TestNonMatching();
TestMatching();
TestBlend();
}
static void TestName()
{
Strip* pStrip = new Strip(1, 33);
AnimationBlendTo iAnimation(pStrip);
AssertEqual(iAnimatio... |
#define _CRT_SECURE_NO_WARNINGS
#include "gkfn.h"
#include "utility.h"
#include <string.h>
#define PRTRST 1
char elements[5][10] = { "SO2", "CO", "O3", "NO2", "PM10" };
// time deley
GKFN::~GKFN() {
int i;
for (i = 0; i < DIM; i++) {
delete m[i];
delete Si[i];
}
delete s; delete hn; delete ek; delete c... |
// TODO(dkorolev): Test ScopeGuard and MakeScopeGuard as well.
#include "util.h"
#include "../3party/gtest/gtest.h"
#include "../3party/gtest/gtest-main.h"
static const char global_string[] = "magic";
TEST(Util, CompileTimeStringLength) {
const char local_string[] = "foo";
static const char local_static_string[... |
// This file has been generated by Py++.
#ifndef DragContainer_hpp__pyplusplus_wrapper
#define DragContainer_hpp__pyplusplus_wrapper
void register_DragContainer_class();
#endif//DragContainer_hpp__pyplusplus_wrapper
|
#include <iostream>
#include <cstring>
using namespace std;
template <typename T> void show(T *, int);
template <>
void show<char *>(char **, int);
template <typename T> T maxn(T *, int);
template <>
char * maxn<char *>(char **, int);
int main(void)
{
int arr_int[6] = {1, 2, 3, 4, 5, 6};
double arr_flt[4] =... |
#include "pch.h"
#include "State.h"
void State::SetContext(StateContext* context)
{
m_Context = context;
}
State::~State()
{
}
|
#pragma once
/// @file
/// Provides access to Python deprecation utilities from C++.
#include "pybind11/pybind11.h"
#include "drake/bindings/pydrake/pydrake_pybind.h"
namespace drake {
namespace pydrake {
/// Deprecates an attribute `name` of a class `cls`.
/// This *only* works with class attributes (unbound memb... |
/**
* ****************************************************************************
* Copyright (c) 2018, Robert Lukierski.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributi... |
#ifndef _camaraCPP_
#define _camaraCPP_
#include "camaraOrtho.h"
camaraOrtho::camaraOrtho(){
ortogonal = false;
examinar = false;
esferica = false;
}
void camaraOrtho::cambiarEsferica(){
reset();
esferica = !esferica;
}
camaraOrtho::camaraOrtho(float x, float y, float z, float m_x, float m_y, float m_z, flo... |
#include "BullyProcess.h"
#include "IdsGenerator.h"
#include <time.h>
#include <unistd.h>
#include "MessageRouter.h"
#include <boost/interprocess/ipc/message_queue.hpp>
#include <iostream>
#include <vector>
BullyProcess::BullyProcess():
StateMachine(ST_MAX_STATES)
{
m_Id = IdsGenerator::getInstance()->getUniqu... |
#include <ESP8266WiFi.h>
#include <Wire.h> //I2C needed for sensors
const char* ssid = "Netwok";
const char* password = "*****";
const int vane = A0;
const byte anemometer = 14;
unsigned int counter = 0;
unsigned int RPM = 0;
unsigned int winddir = 0.0;
const unsigned long period = 2500;
const float pi = 3.1415926... |
#ifndef MAGVIEW_H
#define MAGVIEW_H
#include <QWidget>
#include <QWidget>
#include <QtGui>
namespace Ui {
class Magview;
}
class Magview : public QWidget
{
Q_OBJECT
public:
explicit Magview(QWidget *parent = 0);
~Magview();
void setmagyaw(const qreal &value);
protected:
void paintEvent(QPaint... |
#include "world.hpp"
#include "constants.hpp"
#include <SFML/Graphics.hpp>
#include <iostream>
#include "miscFunctions.hpp"
#include "plane3d.hpp"
#include <assert.h>
World::World ():
window (sf::VideoMode (800, 600), "Game", sf::Style::Titlebar | sf::Style::Close)
{
exists = true;
// Set up the spriteM... |
/*
* msg
*/
#ifndef MSG_H_
#define MSG_H_
class Msg {
public:
// unicode
static void Error(const wchar_t *msg, ... );
static void Warning(const wchar_t *msg, ... );
static void Info(const wchar_t *msg, ... );
// ansi
static void Error(const char *msg, ... );
static void Warning(const char *msg,... |
#ifndef WBPENEG_H
#define WBPENEG_H
#include "wbpeunaryop.h"
class WBPENeg : public WBPEUnaryOp
{
public:
WBPENeg();
virtual ~WBPENeg();
DEFINE_WBPE_FACTORY( Neg );
virtual void Evaluate( const WBParamEvaluator::SPEContext& Context, WBParamEvaluator::SEvaluatedParam& EvaluatedParam ) const;
};
#endif // WBPENE... |
#include "iter.h"
bool ContOctree::Iter::at_leaf() const { return !at_node; }
bool ContOctree::Iter::at_bottom() const { return level == 0; }
bool ContOctree::Iter::at_top() const { return level == top_level; }
|
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
for (int i = 0; i <10 ; i++)
{
//incremento//
cout<<i<<" ";
}
cout<<endl;
cout<<endl;
for (int i = 9; i >=0 ; i--)
{
//decremento//
cout<<i<<" ";
}
cout<<endl;
cou... |
#pragma once
#include "analysis/physics/Physics.h"
#include "analysis/utils/Fitter.h"
#include "analysis/utils/particle_tools.h"
#include "analysis/plot/PromptRandomHist.h"
#include "base/WrapTTree.h"
#include "root-addons/cbtaps_display/TH2CB.h"
#include "TLorentzVector.h"
namespace ant {
namespace analysis {
name... |
#ifndef EXPORTCURVEDIALOG_H
#define EXPORTCURVEDIALOG_H
#include <QDialog>
#include <QMovie>
#include "qstring.h"
#include "exportCurveThread.h"
namespace Ui {
class ExportCurveDialog;
}
class ExportCurveDialog : public QDialog
{
Q_OBJECT
public:
explicit ExportCurveDialog(QWidget *parent = 0);
~ExportCurveDi... |
/*
* SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "common.h"
#include "controller.h"
#include "dispatchtypepath_p.h"
#include "utils.h"
#include <QBuffer>
#include <QDebug>
#include <QRegularExpression>
using namespace Cutelyst;
Di... |
/*******************************************************************************
* Cristian Alexandrescu *
* 2163013577ba2bc237f22b3f4d006856 *
* 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ... |
#include <iostream>
#include <mpi.h>
#include <vector>
#include <future>
using namespace std;
int N = 5;
bool pred(vector<int> &v)
{
return (v[0] % 2 == 0) && (v[v.size() - 1] % 2 == 0);
}
vector< pair<int, int> > splitWorkload(int n, int t) {
vector< pair<int, int> > intervals;
int index = 0;
int step = n / t... |
// Copyright [2015] <lgb (LiuGuangBao)>
//=====================================================================================
//
// Filename: kvStore.cpp
//
// Description: key/value 数据库
//
// Version: 1.0
// Created: 2015年03月16日 14时46分37秒
// Revision: none
// Compiler: gcc
//
// ... |
#include "TCPServer.h"
#include <chrono>
#include <pthread.h>
TCPServer::TCPServer(const uint16_t port, _handler_function handler) : port(port), handler(handler) {};
TCPServer::~TCPServer(){
if(_status == status::up){
stop();
}
}
void TCPServer::setHandler(_handler_function handler){this->handler = h... |
/*************************************************************
* > File Name : P2419.cpp
* > Author : Tony_Wong
* > Created Time : 2019/11/13 07:14:00
* > Algorithm :
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
inli... |
/*
YAHA SE MAT CHAPNA BC. IIIT KA HU. COPYCASE AAYEGA.
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
#define rep(i,l,r) for(int i=l;i<r;i++)
#define rep2(i,r,l) for(int i=r;i>l;i--)
#define sz(a) (int)a.size()
#define mp(a,b) make_pair... |
/*
* Plan.h
*
* Created on: Jun 21, 2015
* Author: colman
*/
#ifndef PLAN_H_
#define PLAN_H_
#include "wayPoint.h"
#include "Behavior.h"
#include "Globals.h"
class Plan {
public:
Plan(vector<wayPoint*> *Wplst);
vector<PositionState*> _plan;
virtual ~Plan();
};
#endif /* PLAN_H_ */
|
// https://codility.com/programmers/lessons/4-counting_elements/perm_check/
// you can use includes, for example:
// #include <algorithm>
#include <algorithm> // std::find
#include <vector>
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
int solution(vector<in... |
#include <iostream>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <string>
#include <queue>
#include <deque>
#include <vector>
#include <stack>
#include <map>
#include <regex>
#include <math.h>
#define MAX 11
#define INF 987654321
using namespace std;
typedef pair<int, int> pii;
struct ground
{
... |
#include <iostream>
#include <string>
#include "Encryptor.h"
using namespace std;
string min (string ms){
for (int i = 0; i <ms.length();i++){
ms[i]=tolower(ms[i]);
}
return ms;
};
int main() {
string ms;
int key;
cout<<"Ingrese una oracion"<<endl;
getline(cin, ms);
ms=min(ms);... |
#pragma once
#include <iostream>
#include<string>
void hello(std::ostream& out, const std::string& helloee, const int times);
|
#include <cstdio>
#include <cstring>
int month[13][2] = {
{0, 0},
{31, 31},
{28, 29},
{31, 31},
{30, 30},
{31, 31},
{30, 30},
{31, 31},
{31, 31},
{30, 30},
{31, 31},
{30, 30},
{31, 31}};
bool isLeap(int y)
{
return (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0);... |
#ifndef LINEAR_PROBE
#define LINEAR_PROBE
#include<iostream>
using namespace std;
template<typename K, typename V, typename T>
class LinearProbe : public HashTable<K, V, T> {
private:
HashEntry<K, V> **entry;
public:
LinearProbe(K key):HashTable(key)
{
this->entry = new HashEntry*[this->size];
for(int... |
#include <bits/stdc++.h>
using namespace std;
bool isPal(long long int);
int main()
{
freopen("in", "r", stdin);
freopen("out", "w", stdout);
vector<long long int> pre;
for(long long int i=1; i<=10000000; i++)
{
if(isPal(i) && isPal(i*i)) pre.push_back(i);
}
int T;
cin>>T;
for(int tt=1; tt<=T; tt++)
... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve(){
ll n;
cin>>n;
vector<ll>a(n);
for(int i=0;i<n;i++){
cin>>a[i];
}
ll ans=0;
for(ll i=1;i<n;i++)
ans=max(ans,a[i]*a[i-1]);
for(ll i=0;i<n-1;i++)
ans=max(ans,a[i]*a[i+1]);
cout<<ans<<"\n";
}
int main() {
#ifndef ONLIN... |
/*
Copyright (c) 2014 NicoHood
See the readme for credit to other people.
HoodLoader2 NoUSB Blink example
This sketch demonstrates how to use HoodLoader2 without USB Core.
This might be useful to keep ram/flash usage at a very low level.
Select Tools->USB Core->No USB functions to get rid of the USB Core.
B... |
/*
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 "UpAndOutEurCall.h"
#include <cmath>
#include <vector>
using namespace std;
UpAndOutEurCall::UpAndOutEurCall(double B, double S0, double K, double r, double sigma, double T)
{
m_S0 = S0;
m_K = K;
m_r = r;
m_sigma = sigma;
m_T = T;
m_B = B;
}
double N(double x)
{
double gamma = 0.231... |
#include <benchmark/benchmark.h>
#include "PerformanceTestsUtil.hpp"
#include <deus/unicode_view_impl/ASCIIImpl.hpp>
//------------------------------------------------------------------------------
// SHORT
//------------------------------------------------------------------------... |
#if (defined HAS_VTK && defined HAS_CONTRIB)
#include <stdio.h>
#include <string.h>
#include <irtkImage.h>
#include <irtkEigenAnalysis.h>
#include <irtkTransformation.h>
// Minimum norm of an eigenvector
#define MIN_NORM 0.01
// vtk includes
#include <vtkPoints.h>
#include <vtkPointData.h>
#include <vtkStructuredGr... |
/*********************************************************************
Matt Marchant 2014 - 2016
http://trederia.blogspot.com
xygine - Zlib license.
This software is provided 'as-is', without any express or
implied warranty. In no event will the authors be held
liable for any damages arising from the use of this soft... |
/*
* @lc app=leetcode.cn id=127 lang=cpp
*
* [127] 单词接龙
*/
// @lc code=start
class Solution {
public:
// int ladderLength(string beginWord, string endWord, vector<string>& wordList) {
// unordered_set<string> s;
// for (auto i : wordList) s.insert(i);
// queue<pair<string, int>> q;
... |
#ifndef SIMULATIONMODEL_H
#define SIMULATIONMODEL_H
#include "ModelBase.h"
#include "CustomParameterModel.h"
#include "Common.h"
namespace FastCAEDesigner
{
class SimulationModel : public CustomParameterModel
{
Q_OBJECT
public:
SimulationModel(QString nameEng, QString nameChn, QString iconName, QObject *paren... |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const ll MOD = 1000000007;
const ll INF = 1e18;
template <typename T> void print(const T &t) {
std::copy(t.cbegin(), t.cend(),
std::ostream_iterator<typename T::value_type>(std::co... |
// This file has been generated by Py++.
#include "boost/python.hpp"
#include "generators/include/python_CEGUI.h"
#include "PropertySet.pypp.hpp"
namespace bp = boost::python;
void register_PropertySet_class(){
{ //::CEGUI::PropertySet
typedef bp::class_< CEGUI::PropertySet, bp::bases< CEGUI::PropertyRe... |
/**
* Copyright (C) 2017 Alibaba Group Holding Limited. 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
*
* ... |
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
const int MAX_M=10;
const int MAX_N=100;
const int MAX_STEP=MAX_M*MAX_N;
int m,n;
bool reversed;
bool light[MAX_M][MAX_N];
bool _light[MAX_M][MAX_N];
bool __light[MAX_M][MAX_N];
int dfsArray[MAX_STEP][2],dfsStep;
int ans=-1;
int process(int i... |
//
// Copyright Jason Rice 2016
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
//
#include "../game.hpp"
#include <catch.hpp>
TEST_CASE("Move tile to left.", "[tiles][game_apply_move]")
{
tiles::game x{... |
#pragma once
#include "WShape.h"
class WCircle : public WShape
{
protected:
int Radius;//圆的半径
public:
WCircle();
WCircle(int x, int y,int r);
void Draw(CDC*pDC);
bool IsMatched(CPoint pnt);
void Serialize(CArchive& ar);
void SetAttribute(int nX, int nY, COLORREF nBoderColor, int nBoderType, int BoderWidth, COLOR... |
#pragma once
#include <GL/freeglut.h>
#include <math.h>
#include <time.h>
#define PI 3.141592
#define FPS_TIME 60
// 비트연산 동시키 입력
#define DIR_X_CCW 0x01 // 반시계
#define DIR_Y_CCW 0x02
#define DIR_Z_CCW 0x04
#define DIR_X_CW 0x08 // 시계
#define DIR_Y_CW 0x10
#define DIR_Z_CW 0x20
struct Shape {
float rotate = 0;
... |
#include "Vector2.h"
Vector2::Vector2( )
{
m_posX = 0;
m_posY = 0;
}
Vector2::Vector2( int newX, int newY )
{
m_posX = newX;
m_posY = newY;
}
|
#include "secret_handshake.h"
namespace secret_handshake {
std::vector<std::string> commands(int num) {
std::vector<unsigned int> digitArray;
std::vector<std::string> stringArray;
while (num > 0) {
unsigned int res = num % 2;
num /= 2;
digitArray.push_back(res);
}
for (int i = 0; i < digitArray.s... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QVector>
#include <QtMath>
#include <QSpinBox>
#include <QSpinBox>
#include <QRandomGenerator>
#include <QtGlobal>
#include <QAbstractButton>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class Mai... |
#pragma once
struct GENS
{
short Index;
BYTE Rate;
short gen;
};
class cGens
{
public:
void ClearNewGensHealthBar();
void InsertNewGensHealthBar(short Index, BYTE Rate, short gen);
GENS* GetNewGensHealthBar(short Index);
static void DrawGensHealthBar();
static void DrawGensHealthBarOri();
};
extern cGens Ge... |
#include "heap.h"
#include <iostream>
class HeapNode{
int v;
int dist;
public:
HeapNode(int v_, int dist_):v(v_), dist(dist_){}
};
int main(){
MinHeap<int> minheap(12);
minheap.insert(3);
minheap.insert(6);
minheap.insert(9);
minheap.insert(7);
minheap.insert(4);
minheap.insert(13);
minheap.... |
#define NOMINMAX
#include "GSPlay.h"
#include "Shader.h"
#include "Texture.h"
#include "Model.h"
#include "Camera.h"
#include "Font.h"
#include "Sprite2D.h"
#include "Sprite3D.h"
#include "Text.h"
#include "GameButton.h"
#include "AnimationSprite.h"
#include <string>
#include "Application.h"
GSPlay::GSPlay()
{
}
G... |
#ifndef MINITSC_ACTOR_HPP
#define MINITSC_ACTOR_HPP
/**
* Actor class. An actor is an entity in the level that somehow
* interacts with the player (or even does no interaction).
* Basically every level object is an actor. Not actors are
* graphics like the time display as they’re not level elements.
*
* This is a... |
#include "stru_cor.h"
#include "dao_cor.h"
#include <iostream>
#include <map>
#include <string.h>
using namespace std;
int coridMaker = 22222;
int getDashCnt(const char *content, char ch)
{
int cnt = 0;
for (int i = 0; i < strlen(content); ++i)
{
if (content[i] == ch)
{
cnt++;
... |
/***************************************************************************
Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
2010-2020 DADI ORISTAR TECHNOLOGY DEVELOPMENT(BEIJING)CO.,LTD
FileName: OSMutex.h
Description: Provide a abstraction mutex class.
Comment: copy from Darwin Str... |
/* checksum.h
* CSCE 612 - 600 Spring 2017
* HW3 reliable data transfer
* by Mian Qin
*/
#include "stdafx.h"
class Checksum
{
public:
DWORD crc_table[256];
Checksum();
DWORD CRC32(unsigned char *buf, size_t len);
};
|
#include "sede.h"
#include <iostream>
using namespace std;
Sede::Sede(string nombre_sede,int tiempo_sede)
{
this->nombre_sede = nombre_sede;
this->tiempo_sede = tiempo_sede;
}
|
#include "weapon.hpp"
/*
Construct a weapon by having a vector of bullets with a given keyword
A weapon will have a given delay time between shooting with the weapon
A specific cooldown will be used based on the given keyword.
*/
// this is for player only
Weapon::Weapon():
keyword("single"), shootCooldownSe... |
/*!
* \file onlyserial.ino
*
*
* \date 2015/03/15
*
* \author Matthias Schibli (based on sketch from Sven Burkart and Christian Leder)
*
* \brief decode Piksi position, baseline and time
\details
-
*/
#include <SPI.h>
#include <Wire.h>
#include <Time.h>
const unsigned... |
//
// BOJ_17143_RE_RE_RE.cpp
// Algorithm
//
// Created by 박세은 on 2020/06/02.
// Copyright © 2020 박세은. All rights reserved.
//
/*
2020.06.02
17143. 낚시왕 다시풀기3
40분
*/
#include <iostream>
#include <vector>
using namespace std;
struct fish_info
{
int r, c, speed, dir, size;
bool alive = true;
fis... |
#include "IVectorImpl.h"
//add error logging!
/*IVector::vector_ptr IVectorImpl::createVector(opt::Logger const& l) {
opt::ReturnCode err;
STATIC_CONSTRUCTOR(IVectorImpl, l);
}*/
IVector* IVector::createVector(uint size)
{
return IVectorImpl::createVector(size);
}
IVector* IVector::copyVector(const IVecto... |
/*
* Copyright (C) 2007-2015 Frank Mertens.
*
* Use of this source is governed by a BSD-style license that can be
* found in the LICENSE file.
*
*/
#include <flux/Singleton>
#include <flux/Process>
#include <flux/User>
#include <flux/IoMonitor>
#include <flux/SignalMaster>
#include "exceptions.h"
#include "Error... |
/// @file GbmSatEngineBinary.cc
/// @brief GbmSatEngineBinary の実装ファイル
/// @author Yusuke Matsunaga (松永 裕介)
///
/// Copyright (C) 2013, 2014 Yusuke Matsunaga
/// All rights reserved.
#include "GbmSatEngineBinary.h"
BEGIN_NAMESPACE_YM
//////////////////////////////////////////////////////////////////////
// クラス Gb... |
/*************************************************************************
> File Name : CertificateRequestError.cpp
> Author : YangShuai
> Created Time: 2016年07月29日 星期五 21时32分23秒
> Description :
************************************************************************/
#include<cstring>
#include"Its... |
#pragma once
#include <iterator>
#include "CIL/defs.h"
#include "CIL/error.h"
#include "CIL/point.h"
namespace cil {
class CIL_EXPORTS MatConstIterator {
public:
typedef uchar* value_type;
typedef ptrdiff_t difference_type;
typedef const uchar** pointer;
typedef uchar* reference;
typedef std::random_acc... |
#ifndef PIZZAREPOSITORY_H
#define PIZZAREPOSITORY_H
#include "../main.h"
#include "OrderRepository.h"
class PizzaRepository
{
private:
OrderRepository OrderRepo;
int total;
int totalPizza;
int totalDrink;
int totalSides;
string phoneNr;
vector<string> listOfToppings;
vector<string> lis... |
/* traits.h -*- C++ -*-
Rémi Attab (remi.attab@gmail.com), 22 Mar 2015
FreeBSD-style copyright and disclaimer apply
Traits container
*/
#include "reflect.h"
#pragma once
namespace reflect {
/******************************************************************************/
/* T... |
#include "MyForm.h"
System::Void ImageProcessor::MyForm::monochromeTint_Click(System::Object^ sender, System::EventArgs^ e) {
saveCurrentImage();
this->monochromeTint->Hide();
this->customTint->Hide();
this->chooseMonoTintColor->Show();
}
System::Void ImageProcessor::MyForm::chooseMonoTintColor_Click(System::O... |
//
// Created by Valery on 19.01.2019.
//
#ifndef FUNCTION_MYFUNCTION_H
#define FUNCTION_MYFUNCTION_H
#include <iostream>
#include <algorithm>
#include <memory>
const size_t BUFF_SIZE = 16;
const size_t BUFF_ALIGN = 16;
template<typename T>
struct myFunction;
template<typename Ret, typename ... Args>
struct myFunc... |
#include "Graph.h"
Graph::Graph()
{
}
void Graph::AddNode(GraphNode* a_pNode)
{
m_aNodes.push_back(a_pNode);
}
void Graph::RemoveNode(GraphNode* node)
{
//loop through every node in the vector
for (int i = 0; i < m_aNodes.size(); i++)
{
//looping through every edge in each node
for (int j = 0; j < m_aNodes[i]... |
#pragma once
#include <vector>
#include <string>
namespace vazgen {
class ProtoMessage
{
public:
struct Field
{
std::string m_attribute;
std::string m_type;
std::string m_name;
int m_number = 1;
};
struct Enum
{
std::string m_name;
using Value = st... |
#ifndef ASIO_UDP_SERVER_HPP
#define ASIO_UDP_SERVER_HPP
class udp_connection : public asio_connection
{
public:
udp_connection(boost::asio::io_service & io_service, std::unique_ptr<deviceDescription> description)
: asio_connection(io_service, std::move(description))
{
}
};
class ... |
// Reference - https://www.geeksforgeeks.org/find-whether-path-two-cells-matrix/?ref=rp
#include<bits/stdc++.h>
using namespace std;
class Graph
{
int V ;
list < int > *adj;
public :
Graph( int V )
{
this->V = V ;
adj = new list<int>[V];
}
void addEdge (int s , int d)
{
... |
#include "MoveModifier.h"
MoveModifier::MoveModifier(void)
{
}
MoveModifier::~MoveModifier(void)
{
}
void MoveModifier::Update(ParticleCollection* c, float delta)
{
for (int i = 0; i < c->Count(); i++)
{
Particle* p = c->Particles[i];
p->Position += p->Velocity * delta;
c->Particles[i] = p;
}
}
|
/*
* Landscape.cpp
*
* Created on: 10 сент. 2017 г.
* Author: Соня
*/
#include "Landscape.h"
Landscape::Landscape(const String &filename) {
//Msg::Error(L"%s", filename.c_str());
mesh.LoadFromFile(filename);
}
Landscape::~Landscape() {
// TODO Auto-generated destructor stub
}
|
//
// StickerControlView.h
// iPet
//
// Created by KimSteve on 2017. 5. 19..
// Copyright © 2017년 KimSteve. All rights reserved.
//
#ifndef StickerControlView_h
#define StickerControlView_h
#include "../Base/SMView.h"
#include "../Base/SMButton.h"
class DashedRoundRect;
class StickerControlListener {
public:
... |
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <sstream>
#include <cassert>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <ctime>
#include <algorithm>
using namespace std;
// is sushkov using his mac or not?
const int MAC = 0;
// 123: 98291669
// 123_86%of4: 9... |
/*
* Copyright (c) 2013 William Linna <william.linna@kapsi.fi>
*
* 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 use,
... |
#include "../Include/Application.h"
#include "../Include/World.h"
#include "../Include/Window.h"
#include<iostream>
Window* window;
World* world;
int curPosX, curPosY;
int motionPosX, motionPosY;
int mShapeStatus;
int mLineWidthStatus;
int mColorStatus;
Application::Application()
: isPreviewing(false)
{
world =... |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
vector<long long int>sagar;
void ck()
{
sagar.push_back(2);
sagar.push_back(3);
sagar.push_back(5);
sagar.push_back(7);
sagar.push_back(11);
sagar.push_back(13);
sagar.push_back... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.