text stringlengths 8 6.88M |
|---|
/*
* ulcd_label.h
*
*
*
*/
#ifndef ULCD_LABEL_H
#define ULCD_LABEL_H
#include "ulcd_component.h"
//#include <iostream>
#include <string>
#include "uLCD_4DLibrary.h"
/*
* public types
*
*/
typedef enum
{
ulcd_font_size_1 = 1,
ulcd_font_size_2 = 2,
ulcd_font_size_3 = 3,
ulcd_font_size_4 = ... |
#include <iostream>
#include <string>
class X {
private:
int m;
public:
X(int i=0)
: m{i}
{}
int mf(int i)
{
int old = m;
m = i;
return old;
}
};
X var{7};
int user(X var, X *ptr)
{
int x = var.mf(7);
int y = ptr->mf(9);
// int z = var.m;
//
... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* MateriaSource.hpp :+: :+: :+: ... |
/home/mikcy/Documents/Coding/SimpleAlgorithmJudge/Client/acm_gui/jsoncpp.cpp |
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <memory.h>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
#include <numeric>
#include <sstream>
typ... |
#ifndef APPLICATION_REGISTRATE_H
#define APPLICATION_REGISTRATE_H
#include <QObject>
#include <QMessageBox>
#include <CallbacksHolder/Callback/BaseCallback.h>
#include <Controller/Controller.h>
#include "ui/RegistrateWidget/registratewidget.h"
#include "ui/UserData/UserData.h"
// Callback for Registrate
class Regi... |
// Created on: 1999-03-11
// Created by: data exchange team
// 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 ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#include "core/pch.h"
#if defined(_N... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2004-2006 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve N. Pettersen
*/
#ifndef __LONGBATCH_TLS_H__
#define __... |
#ifndef COMMUNITYFUNDDISPLAYDETAILED_H
#define COMMUNITYFUNDDISPLAYDETAILED_H
#include <QWidget>
#include <consensus/dao.h>
#include <wallet/wallet.h>
#include <QDialog>
#include <QAbstractButton>
namespace Ui {
class CommunityFundDisplayDetailed;
}
class CommunityFundDisplayDetailed : public QDialog
{
Q_OBJECT
... |
// Created by: Peter KURNEV
// 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 General Public License version 2.1 as published
// by the Free S... |
#pragma once
#include <string>
#include <fstream>
#include <vector>
constexpr int FPGA_RB_IGNORE_BYTES_CONTROL = 48;
constexpr int FPGA_RB_IGNORE_BYTES_DATA = 44;
enum {
FPGA_WR_FLAG_FULL_BS = 0,
FPGA_WR_FLAG_PARTIAL_BS = 1
};
enum {
FPGA_RB_FLAG_TYPE_CONTROL = 0,
FPGA_RB_FLAG_TYPE_DATA = 1
};
class FPGAMa... |
#pragma once
class Monster;
enum Motion
{
en_front,
en_rotate,
en_left,
en_right,
};
enum Form
{
enAdhesion,
enFixed,
};
class MonsterEffect :public GameObject
{
public:
~MonsterEffect();
void init(const wchar_t* path,Motion motion,Monster* me,CVector3 offset,CVector3 scale);
void Update() override final;
v... |
#ifndef TREEFACE_NODE_PRIVATE_H
#define TREEFACE_NODE_PRIVATE_H
#include "treeface/scene/SceneNode.h"
#include "treeface/scene/SceneObject.h"
#include "treeface/scene/guts/Utils.h"
#include "treeface/math/Mat4.h"
#include <treecore/AlignedMalloc.h>
#include <treecore/HashSet.h>
#include <treecore/RefCountHolder.h>
#... |
#include "am_pm_clock.h"
am_pm_clock::am_pm_clock():
hours(12),
minutes(0),
seconds(0),
am(1)
{};
am_pm_clock::am_pm_clock(unsigned int hrs, unsigned int mins,
unsigned int secs, bool am_val):
hours(hrs),
minutes(mins),
seconds(secs),
am(am_val)
{};
am_pm_clock::... |
#include "StdAfx.h"
#include "Gt2DMesh.h"
GnImplementRTTI(Gt2DMesh, GtObject);
Gt2DMesh::Gt2DMesh(void)
{
}
Gt2DMesh::~Gt2DMesh(void)
{
}
|
#include <iostream>
#include <vector>
using namespace std;
void rotate_matrix(vector<vector<int>>& matrix) {
for (int r = 0; r < (matrix.size() / 2); r++) {
for (int c = r; c < (matrix.size() - r - 1); c++) {
// Upper left to upper right
int up_right = matrix[c][matrix.size() - r ... |
#include "HungryCondition.h"
|
#include <string>
#include "../headers/MethodNode.hpp"
#include "../headers/ClassNode.hpp"
#include "../headers/AstNode.hpp"
using namespace std;
MethodNode::MethodNode() = default;
void MethodNode::setName(string name) {
this->name = name;
}
void MethodNode::setRetType(string returnType) {
this->returnType... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 2009-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"
#ifdef MEDIA_... |
#include <iostream>
#include <list>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
struct item {
int exp;
double coe;
item(int e, double c):exp(e), coe(c){}
};
bool operator< (const item& a, const item& b) {
return a.exp > b.exp;
}
item operator* (const item& a, const item& b... |
// https://codeforces.com/problemset/problem/687/A
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
vector<vector<int>> edges(10001);
int n, m, u, v;
bool colors[100001];
int markColor(int src, int color)
{
queue<int> q;
colors[src] = color;
q.push(src);
while (... |
// BEGIN CUT HERE
// PROBLEM STATEMENT
// Given a positive integer number, concatenate one or more
// copies of number to create an integer that is divisible by
// k. Do not add any leading zeroes. Return the least
// number of copies needed, or -1 if it is impossible.
//
// DEFINITION
// Class:ConcatenateNumber
... |
// Created on: 1993-01-09
// Created by: CKY / Contract Toubro-Larsen ( Arun MENON )
// 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 ... |
#include "CharacterObject.h"
#include <DxLib.h>
#include <cassert>
#include "Camera.h"
#include "Game.h"
//アニメーションの変更
void CharacterObject::ChangeAction(const char * name)
{
_nowName = name;
_nowCutIdx = 0;
_frame = 0;
}
//アニメーションのフレームを1進める
bool CharacterObject::ProceedAnimationFrame()
{
if ((signed)_frame < _ac... |
#include<iostream>
using namespace std;
long long int mem[10000001] = {0};
long long int k;
long long int func(long long int n) {
if(n<12) {
return n;
}
else if(n == 12) {
return 13;
}
else if(n<1000000) {
if(mem[n]!=0){
return mem[n];
}
}
k =... |
#pragma once
class AIEditnode;
class AIEditNodeInequ;
class AIEditNodeOrder;
class AIEditLine;
class AIEditNodeButton;
class AIEditNodeProcess;
class AIEditNodeNum : public GameObject
{
public:
~AIEditNodeNum();
bool Start() override final;
void Update() override final;
void Order();
void FontsConfirmation();
... |
/*
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/CoreConfig.hpp"
namespace Push
{
namespace CoreConfig
{
inline... |
//---------------------------------------------------------------------------
#ifndef TFrmMainH
#define TFrmMainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Dialogs.hpp>
#i... |
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(2, 3); // RX | TX
const int potPin = A0; // potentiometer
const int pwmOutPin = 10; // PWM output
int potentiometerValue; //range from 0 to 1023
int pwmValue; //range from 0 to 255
int speedPercentage; //range from 0 to 100
int motorValue; //range from 0 to 180
void... |
#include "_pch.h"
#include "CtrlExecAct.h"
using namespace wh;
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
CtrlActExecWindow::Ct... |
#include <iostream.h>
#include <conio.h>
void main (){
clrscr(); // Weight Convertor
int op;
float gm, kg, pd;
cout <<"\n\n\t\tSoftware for Conversion of Weight";
cout <<"\n\n\t1. Gram into Kilogram";
cout <<"\n\n\t2. Kilogram into Gram";
cout <<"\n\n\t3. Pounds into Kilogram";
cout <<"... |
int speakerpin = 12; //스피커가 연결된 디지털핀 설정
int note[] = {262,294,330,349,392,440,494,523}; //도레미파솔라시도
void setup() {
int elementCount = sizeof(note) / sizeof(int);
for (int i=0; i < elementCount; i++) //note를 play
{
tone(speakerpin,note[i],500);
delay(100);
}
}
void loop() {
}
|
// Created on: 1992-01-24
// Created by: Remi LEQUETTE
// 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 GNU ... |
//
// sendmsgtests.hpp
// AutoCaller
//
// Created by Micheal Chen on 2017/7/18.
//
//
#ifndef sendmsgtests_hpp
#define sendmsgtests_hpp
#include "cocos2d.h"
#include "testbase/BaseTest.h"
DEFINE_TEST_SUITE(SendMsgTests);
class SendTextMsgTest : public TestCase
{
public:
virtual bool init() override ;
CR... |
/*
My IR Remote codes, see this video to find out the codes for your remote: https://youtu.be/ftdJ0R_5NZk
PLAY: FFA25D
EQ: FF22DD
CH+: FFE21D
CH-: FF629D
VOL+: FFC23D
VOL-: FF02FD
0: FFE01F
PREV: FFA857
NEXT: FF906F
1: FF6897
2: FF9867
3: FFB04F
4: FF30CF
5: FF18E7
6: FF7A85
7: FF10EF
8: ... |
// Created on: 1993-02-24
// Created by: Laurent PAINNOT
// 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
// the terms of the GN... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
#include "GameSeaquence.h"
#include "GameSeaquenceController.h"
//派生クラスの挙動に任せる
Boot* GameSeaquence::Update(Boot* p){
GameSeaquenceController* controller = dynamic_cast<GameSeaquenceController*>(p);
return Update(controller);
}
GameSeaquence::~GameSeaquence()
{
}
|
#ifndef STACK
#define STACK
#include "Vector.hpp"
class Stack : private Vector {
public:
Stack();
Stack(const int, const int);
Stack(const Stack&);
Stack(Stack&&);
void push1(const int);
void pop1();
void printStack() const;
};
#endif
|
#ifndef MUSICCONFIG_H
#define MUSICCONFIG_H
#include <QDialog>
#include <QSlider>
#include <QPushButton>
namespace Ui {
class MusicConfig;
}
class MusicConfig : public QDialog
{
Q_OBJECT
public:
explicit MusicConfig(int bgMusicVolume,int jumpMusicVolume,int launchMusicVlume,
... |
#include "stdafx.h"
#include "Callsign.h"
#include "StringUtils.h"
#include "Qso.h"
Callsign::Callsign(Qso *qso)
:
QsoItem(qso),
m_callsign(),
m_prefix(),
m_suffix(),
m_isCanada(false),
m_isUSA(false)
{
}
Callsign::Callsign(const Callsign& c)
:
QsoItem(c),
m_callsign(c.m_callsign)... |
/*
** EPITECH PROJECT, 2018
** main
** File description:
** main
*/
#include "Manager.hpp"
int test_hud();
int main(int ac, char **av)
{
try {
if (ac == 3) {
auto man = std::make_shared<Manager>();
if (man->init(av[1], atoi(av[2]))) {
man->spectateGame();
}
} else if (ac == 1) {
auto man = std::... |
#include "CCDirector.h"
#include "GreeJniHelper.h"
#include <jni.h>
#include "jni/Java_org_cocos2dx_lib_Cocos2dxGreePlatform.h"
using namespace cocos2d;
using namespace cocos2d::gree_extension;
extern "C" {
void loadCodeJni(){
JniMethodInfo t;
if(JniHelper::getStaticMethodInfo(t, "net/gree/asdk/api/FriendCode"... |
/* -*- 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.
*
* @author Arjan van Leeuwen (arjanl)
*/
#include "core/pch.h"
#... |
/* -*- 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.
*/
/**
On Compiling this file COMPILING_ENCODINGS_CHARCONV_TESTS... |
#include <ros/ros.h>
#include <sensor_msgs/JointState.h>
#include <crustcrawler_core_msgs/EndEffectorCommand.h>
#include <crustcrawler_core_msgs/EndEffectorState.h>
#include <crustcrawler_core_msgs/EndpointState.h>
#include <std_msgs/Float64.h>
#include <actionlib_msgs/GoalStatusArray.h>
#include <eigen3/Eigen/Core>
#i... |
friend Stonewt operator*(double x, const Stonewt & s);
Stonewt operator*(double x, const Stonewt & s)
{
return Stonewt(mult * s.pounds);
}
|
#pragma once
#include "GcTemplateDockable.h"
class GcActorTemplateDockable : public GcTemplateDockable
{
public:
GcActorTemplateDockable(void);
~GcActorTemplateDockable(void);
Gt2DActorPtr mpsCurrentObject;
protected:
virtual void ReciveNotiyfiMessage(WPARAM wParam, LPARAM lParam);
Gt2DActor* GetActorObject(CSt... |
class Solution {
public:
bool dfs(vector<vector<char> > &board, vector<vector<bool> > &visited,
string &word, int count, int i, int j){
if(i > board.size() || j > board[0].size() || i < 0 || j < 0){
return false;
}
if(visited[i][j] || board[i][j] != word[count]){
... |
// Created by: Peter KURNEV
// Copyright (c) 2010-2014 OPEN CASCADE SAS
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This file is part of Open CASCADE Techn... |
/*
ID: washirv1
PROG: dualpal
LANG: C++
*/
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
bool isPal(string s)
{
for (int f = 0, b = s.length() - 1; f < b; f++, b--)
{
if (s[f] != s[b])
return false;
}
return true;
}
void convert(int base, int num, string &re... |
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <algorithm>
#include <memory.h>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <string>
#include <string.h>
#include <vector>
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const ld PI = acos(-1.)... |
#include <iostream>
#include <fstream>
using namespace std;
struct StudentData
{
int fn;
char name[100];
};
struct SubjectData
{
int code;
char name[100];
char teacher[100];
};
struct GradeData
{
int studentFn, subjectCode;
int d,m,y;
double value;
};
void createStudents ()
{
ifstream i... |
//
// Created by archtao on 2021/5/31.
//
#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;
void GetNext(string, int*); // 获取next数组
void GetNextVal(string, int*); // next数组优化
... |
// <copyright header>
#include "modules/hardcore/keys/opkeys.h"
/* static */ const uni_char*
OpKey::ToString(OpKey::Code key)
{
switch (key)
{
// <key to string>
}
return NULL;
}
/* static */ OpKey::Code
OpKey::FromString(const uni_char* str)
{
// <string to key>
return OP_KEY_FIRST;
}
/* static */ BOOL
OpKey... |
/********************************************************************************
** Form generated from reading UI file 'rigidpropertywidget.ui'
**
** Created by: Qt User Interface Compiler version 5.7.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
*******************************... |
/****************************************************************************
** Copyright (C) 2017 Olaf Japp
**
** This file is part of FlatSiteBuilder.
**
** FlatSiteBuilder 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 S... |
// ConsoleLog.cpp : implementation file
//
#include "stdafx.h"
#include "BHMonitor.h"
#include "ConsoleLog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConsoleLog
C... |
#ifndef VULKANLAB_MATERIAL_H
#define VULKANLAB_MATERIAL_H
#include "../Assets/Asset.h"
class Shader;
class Material : public Asset {
public:
/**
* Material constructor.
* @param name
*/
Material(const char *name);
/**
* Material destructor.
*/
~Material();
/**
* Re... |
//
// FILE: radar.h
// AUTHOR: Rob Tillaart
// VERSION: see RADAR_LIB_VERSION
// PURPOSE: pan tilt radar framework
// URL:
//
// Released to the public domain
//
#ifndef Radar_h
#define Radar_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#include "SoftwareSerial.h"
#else
#include "WProgr... |
# include <iostream>
using namespace std;
class Human
{
int age;
string Name;
public:
Human(string Name="UnNamed",int age=0): Name(Name) , age(age){ };
void Tellme()
{
cout<<Name<<endl<<age<<endl;
}
friend void Display(Human man);
};
void Display(Human man)
{
cout<<man.Name<<endl<<ma... |
#pragma once
#include <map>
namespace HW
{
// a wrapper for map list iterator .
template<typename Tkey,typename Tval>
class mapIterator
{
typedef typename std::map<Tkey,Tval>::iterator IterType;
IterType iter;
public:
// should never be used.
mapIterator(){}
// constructor
mapIterator(const IterType &i... |
//: C13:ArrayOperatorNew.cpp
// Kod zrodlowy pochodzacy z ksiazki
// "Thinking in C++. Edycja polska"
// (c) Bruce Eckel 2000
// Informacje o prawie autorskim znajduja sie w pliku Copyright.txt
// Operator new dla tablic
#include <new> // Definicja size_t
#include <fstream>
using namespace std;
ofstream trace(... |
#include <iostream>
#include <string>
using namespace std;
int main() {
int first_number = GetInputNumber();
char operator = GetInputOperator();
int second_number = GetInputNumber();
int running_total = 0;
if (operator == '+') {
running_total = first_number + second_number;
}
if (operator == '%') {
... |
#ifndef SMART_PTR_H
#define SMART_PTR_H 1
#include <cstddef>
#include <utility>
#include "hf2_control_block.hpp"
namespace HF2 {
/// Skaláris okospointer alaposztály
template<class T>
class Abstract_SmartPointer {
protected:
/// Pointer kontrollblokkra
ControlBlock<T>* ctrl_;
/// "új" pointer inicializálás
exp... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <memory.h>
using namespace std;
typedef unsigned long long ULL;
int A[555][555];
int minim[555][555][555];
int main() {
freopen(".in", "r", stdin);
int a, b, n, m;
cin >> a >> b >> n >> m;
for (int i = 1; i <= n; ++i) {
for... |
//
// C++ Implementation: wrapper
//
// Description:
//
//
// Author: Jally <jallyx@163.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "wrapper.h"
#include "deplib.h"
/**
* 写出数据.
* @param fd 文件描述符
* @param buf 缓冲区
* @param count 缓冲区有效数据长度
* @return 成功写出的数据长度
*/
... |
#include <iostream>
#include <boost/make_shared.hpp>
#include <boost/program_options.hpp>
namespace po = boost::program_options;
#include <bs/frame_range.hpp>
#include <bs/utils.hpp>
#include <bs/adaptive_median.hpp>
#include <options.hpp>
#include <run.hpp>
//
// options_t::options_t is specific to each example:
/... |
#include "stdafx.h"
#include "Vector2d.h"
Vector2d::Vector2d()
{
this->x = 0;
this->y = 0;
}
Vector2d::Vector2d(double x, double y)
{
this->x = x;
this->y = y;
}
Vector2d::Vector2d(double x0, double x1, double y0, double y1)
{
this->x = x1 - x0;
this->y = y1 - y0;
}
Vector2d::Vector2d(const Vector2d& vector)... |
#pragma once
class AI_SpiderBotBehavior : public Hourglass::IAction
{
public:
void LoadFromXML(tinyxml2::XMLElement* data);
void Init(hg::Entity* entity);
IBehavior::Result Update(hg::Entity* entity);
IBehavior* MakeCopy() const;
private:
// Test if ready to jump
bool SpiderJump_CheckCondition(hg::Entity* en... |
#include "space.h"
#include <time.h>
#include <cmath>
#include <thread>
space::space(unsigned int number_of_planets){
srand( time(0) );
zoom = 1;
generate(number_of_planets);
start();
}
space::space(){
zoom = 1;
srand( time(0) );
}
void space::generate(unsigned int number_of_planets){
std::lock_guard<std... |
#include "window.h"
Window::Window(int w, int h)
: w(w), h(h) , shaderManager("shaders/", ".glsl", true)
{
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
std::cerr << "SDL_Init() failed" << std::endl;
assert(0);
}
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
... |
#ifndef GETSEARCHBIN_H
#define GETSEARCHBIN_H
#include "units.hh"
#include "TypeDefinitions.h"
#include "PhotonTools.h"
#include "SusyAnaTools/Tools/NTupleReader.h"
#include "SusyAnaTools/Tools/customize.h"
#include "SusyAnaTools/Tools/searchBins.h"
#include "SusyAnaTools/Tools/SB2018.h"
#include "SusyAnaTools/Tools/S... |
#ifndef THIRDPERSONCONTROLLER_H
#define THIRDPERSONCONTROLLER_H
#include <btBulletDynamicsCommon.h>
#include "BulletDynamics/Character/btKinematicCharacterController.h"
#include "BulletCollision/CollisionDispatch/btGhostObject.h"
#include "math.h"
#include "Ogre.h"
#include "BtOgrePG.h"
#include "CollisionFilter.h"
cla... |
#include "bits/stdc++.h"
using namespace std;
void show (vector < int > v )
{
for_each (v.begin(), v.end(),[](int x)
{
cout<<x<<" ";
});
cout<<endl;
}
int main ()
{ // v.size()= O(1)
vector < int > v (10,2); // intialize with 2
// size vs empty
bool is_nonempty_notgood = (v.size() >= 0);
bool is_nonempty_... |
void phase1(){
String str = serial_read();
if (str.length() > 0) {
serial_write_debug("MSG = ");
serial_write_debug(str);
}
/* The ESP has sent the MOV_1 command.
* Arduino will command the motors to move the robot
* following the black line.
* When the movement has ended, send END_MOV_1 to ... |
//By SCJ
//#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define maxn 10005
int f[maxn],p[maxn];
pair<int,int> ans[maxn*2];
void sp(int aa,int bb)
{
int d=(bb-aa+1)/2;
// cout<<" aa="<<aa<<" bb="<<bb<<endl;
for(int i=0;i<d;++i)
{
int a=aa+i,b=bb-d+i+1;
// cout<<" a="<<a<<" ... |
// Problem No. 05 => 1. Merge Overlapping Subintervals
class Solution {
public:
vector<vector<int>> merge(vector<vector<int>>& intervals) {
vector<vector<int>> mergedIntervals;
if(intervals.size() == 0){
return mergedIntervals;
}
sort(intervals.begin(), intervals.end());... |
/************************************************************************/
/*
17、有一个由大小写组成的字符串,现在需要对他进行修改,将其中的所有小写字母排在
大写字母的前面(大写或小写字母之间不要求保持原来次序),如有可能尽量选择时间和空
间效率高的算法 c 语言函数原型 void proc(char *str) 也可以采用你自己熟悉的语言
*/
/************************************************************************/
/**************************... |
#include <iostream>
#include <queue>
#include <deque>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <math.h>
#include <string.h>
#include <bitset>
#include <cmath>
using namespace std;
int C = 0;
int calc(int r, int c)
{
return (r - 1) * C + c;
}
... |
/*
RC Remote Echo:
ECHO a Remote RC Controller
by Rick Anderson (ricklon)
*/
#include <Arduino.h>
#include <SoftPWMServo.h>
const int PIN_KILL = 23;
const int PIN_THR = 12;
const int PIN_STR = 13;
const int PIN_AUX = 23;
#define STR 0
#define THR 1
#define KILL 2
#define AUX 3
//Setup RC Controller
const... |
#ifndef UI_ACTION_INSTANTACTIONS_PLACE_H_
#define UI_ACTION_INSTANTACTIONS_PLACE_H_
#pragma once
namespace ui
{
class UILIB_API Place : public InstantAction
{
public:
static Place* Create(const CPoint& left_top);
virtual void Update(float time) override;
virtual Place* Reverse() const override;
virtual Pl... |
/*====================================================================
Copyright(c) 2018 Adam Rankin
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 limitati... |
#ifndef NODODT_H
#define NODODT_H
#include <iostream>
using namespace std;
template <typename T>
class NodoDT
{
private:
NodoDT<T>* anterior;
NodoDT<T>* siguiente;
T valor;
public:
NodoDT<T>(T v, NodoDT<T>* ant = NULL, NodoDT<T>* sig = NULL){ // Constructor por om... |
#include <iostream>
#include <vector>
#include "Player.h"
#include "Warrior.h"
#include "Priest.h"
#include "Mage.h"
Type getCharacterType();
Race getCharacterRace();
std::string getCharacterName();
int main()
{
Type type;
Race race;
char choice;
std::string name;
Player* playerPtr; // = new Warrior("Brad", HUMA... |
#include "AABB.h"
AABB::AABB(const glm::vec2 & pPosition, const glm::vec2 & pSize)
:
mPosition(pPosition),
mSize(pSize)
{
}
AABB::AABB(float pX, float pY, float pWidth, float pHeight)
:
mPosition(pX,pY),
mSize(pWidth,pHeight)
{
}
AABB::~AABB()
{
}
void AABB::init(const glm::vec2 & pPosition, const glm::vec... |
#ifndef MYFACEWIDGET_H
#define MYFACEWIDGET_H
#include <QListWidget>
#include <QInputDialog>
#include <QDialog>
#include <QFormLayout>
#include <QLabel>
#include <QList>
#include <QDialogButtonBox>
#include <QIntValidator>
#include <QDropEvent>
#include <sstream>
#include <string>
#include <math.h>
#include <QMessageBo... |
//
// main.cpp
// Stack_LinkedList
//
// Created by 王宗祥 on 2020/11/27.
//
#include <iostream>
using namespace std;
class StackNode {
private:
int data;
StackNode* next;
public:
StackNode() :data(0), next(nullptr) {};
StackNode(int data) :data(data), next(nullptr) {};
StackNode(int data, StackNo... |
#pragma once
#include <tuple>
#include <string>
#include <vector>
#include <gsl/span>
#include <boost/filesystem.hpp>
//#include <sndfile.h> // SF_VIRTUAL_IO
#include "PticaGovorunCore.h" // PG_EXPORTS
#include "ClnUtils.h"
#include "TranscriberUI/FileWorkspaceWidget.h"
namespace PticaGovorun {
#if PG_HAS_LIBSNDFILE
... |
#include <core/types.h>
#include <core/maths.h>
#include <core/platform.h>
#include <graphics/rendergl/glutil.h>
#ifndef WIN32
#include <opengl/opengl.h>
#endif
#include <iostream>
using namespace std;
const uint32_t kHeight = 600;
const uint32_t kWidth = 600;
const float kWorldSize = 4.0f;
const float kZoom = kWo... |
// 问题的描述:打印两个链表的公共值
// 给定两个升序的链表,且链表中无重复元素。打印两个链表的公共值部分
// 同时遍历,相等就打印
// 测试用例有3组:
// 1、空链表(至少一个为空链表)
// 输入:NULL NULL
// 输出:NULL
// 2、非空链表
// 输入:{1,2,3,4,5,6,7} {2,4,6,8,10}
// 输出:2,4,6
// 3、非空链表
// 输入:{1,3,5,7} {2,4,6,8}
// 输出:NULL
#include <iostream>
#include <vector>
using namesp... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 2003-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 USER_JA... |
// Created on: 1993-02-05
// Created by: Jacques GOUSSARD
// 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
// the terms of the G... |
#pragma once
#include "typedefs.h"
class EquilFns
{
public:
#if ASSETSTATE
vector<vector<vector<vector<vector<vector<vector<VecDoub>>>>>>> value_fn;
vector<vector<vector<vector<vector<vector<vector<VecDoub>>>>>>> consumption;
vector<vector<vector<vector<vector<vector<vector<vector<VecDoub>>>>>>>> policy_fn... |
#include "dataDNA.h"
void dataDNA::addDna(Dna* newDna)
{
m_mapIdDna.insert(std::pair<size_t, Dna*>(Dna::getId(),newDna));
m_mapNameDna.insert(std::pair<std::string, size_t>(newDna->getName(), Dna::getId()));
}
void dataDNA::delDna(size_t id)
{
m_mapNameDna.erase(m_mapIdDna[id]->getName());
delete m... |
#include "stdafx.h"
#include "CNetMessage.h"
#include <QByteArray>
CNetMessageWrapper::CNetMessageWrapper()
{
}
CNetMessageWrapper::~CNetMessageWrapper()
{
}
//根据输入信息得到NetMessage bDecode - true 解密msgBuffer信息 netMessage中的buffer需要手动释放
bool CNetMessageWrapper::GetNetMessage(const char* inputBuffer, unsigned long bufLe... |
/*
* CharactorLogin.h
*
* Created on: Jun 17, 2017
* Author: root
*/
#ifndef CHARACTORMGR_CHARACTORLOGIN_H_
#define CHARACTORMGR_CHARACTORLOGIN_H_
#include "Network/MessageHandler.h"
#include "MsgDefineMacro.h"
#include "ServerMsgDefine.h"
using namespace CommBaseOut;
class CharactorLogin : public Messag... |
#pragma once
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#define PI 3.14159265358979323846
class Bone_Animation
{
public:
Bone_Animation()... |
#ifndef SUBCALLBACK_H
#define SUBCALLBACK_H
#include <mqtt/subscriber/sub_action_listener.h>
#include <mqtt/subscriber/subscriber.h>
#include <deque>
#include <iostream>
#include <mqtt/xorcipher.h>
/*
* subCallback
*/
class SubCallback : public virtual mqtt::callback,
public virtual mqtt::iactio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.