text stringlengths 8 6.88M |
|---|
#include "Scene/Scene.h"
#include "Scene/SceneNode.h"
#include <queue>
#include <crossguid/guid.hpp>
using namespace xg;
using namespace Rocket;
void Scene::OnViewportResize(uint32_t width, uint32_t height)
{
m_ViewportWidth = width;
m_ViewportHeight = height;
}
void Scene::OnUpdateRuntime(Timestep ts)
{
}
void ... |
/*
* Copyright (c) 2016-2021 Morwenn
* SPDX-License-Identifier: MIT
*/
#include <forward_list>
#include <vector>
#include <catch2/catch.hpp>
#include <cpp-sort/probes/runs.h>
#include <cpp-sort/utility/size.h>
#include <testing-tools/internal_compare.h>
TEST_CASE( "presortedness measure: runs", "[probe][runs]" )
{
... |
#include <iostream>
#include <cstdlib>
#include "message.h"
using namespace std;
int main(){
Message m; //object call
m.sendmessage();
return 0;
}
/*
Note that when creating a make file, the object files are not portable across different systems. For example, Message.o,
will no... |
//
// OCXMLOptions.cpp
//
// Created by Wes Souza.
//
// ------------------------
// Copyright 2013 Zynga Inc.
//
// 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.apa... |
#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... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2009 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 XSLT_SUPPORT
#include "modules/xslt/src/xs... |
#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include "cocos2d.h"
#include "cocos-gree-ext.h"
USING_NS_CC;
USING_NS_CC_GREE_EXT;
class HelloWorld : public cocos2d::CCLayer, public cocos2d::gree_extension::CCGreePlatformDelegate
{
public:
// Method 'init' in cocos2d-x returns bool, instead of 'i... |
/* -*- 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 MODULES_UTIL_OPHASHTABLE_H
#define MODULES_UTIL_OPHASHTA... |
( English:'Scottish Gaelic';
Native:'Gàidhlig';
LangFile:'scottishgaelic.lang';
DicFile:'scottishgaelic.dic';
FlagID:'scotland';
Letters:'A,À,B,Ḃ,C,Ċ,D,Ḋ,E,È,F,Ḟ,G,Ġ,I,Ì,L,Ḻ,M,Ṁ,N,Ṉ,O,Ò,P,Ṗ,R,Ṟ,S,Ṡ,T,Ṫ,U,Ù';
LetterCount:'15,1,2,1,3,3,3,3,10,1,1,1,3,1,11,1,3,1,2,1,4,1,4,1,1,1,4,1,4,1,3,3,2,1';
LetterValue:... |
#include <iostream>
#include <cstring>
using namespace std;
typedef long long ll;
const int maxn = 100000 + 5;
int main() {
int T;
ll a[maxn];
cin >> T;
while(T--) {
int n , k;
cin >> n >> k;
for(int i = 0; i < n; i++) {
cin >> a[i];
}
//int b = a.strlen(); //n
int b;
b = a[... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<int> x = {11,4,2,-3,9,100};
for (vector<int>::iterator it = x.begin(); it != x.end(); it++) {
cout << *it << endl;
}
//sort function, taking iterator of the position to be sorted
sort(x.begin()+1,x.end(... |
#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>
using namespace std;
#define pb push_back
#define db(x) cout << '>' << #x << ':' << x << endl;
#define all(v) v.begin(), v.end()
#define pii pair<int, int>
#define mxN 1e7
#define newl cout << "\n"
#define vi vector<int>
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (en... |
#include "third_party/pcc_quic/pcc_monitor_interval_queue.h"
#include "third_party/quic/core/quic_time.h"
#include "third_party/quic/core/quic_types.h"
#include "third_party/quic/platform/api/quic_test.h"
using testing::StrictMock;
using testing::_;
namespace quic {
namespace test {
namespace {
// Number of bits per... |
#include "PhysicsMaterial.h"
float PhysicsMaterial::getDensityFromMaterial(const eMaterial material)
{
//All densities in kg.m-3
switch (material)
{
case eMaterial::HYDROGEN: return 0.0898f; break; //Lightest Gas
case eMaterial::HELIUM: return 0.179f; break;
case eMaterial::AEROGRAPHITE: return 0.2f; b... |
#include <iostream>
#include <fstream>
using namespace std;
int main() {
ifstream file;
string res = "";
file.open(R"(C:\Users\maksi\Desktop\pythonProject1\num.txt)");
if(file.is_open()) {
string s;
file >> s;
cout << s << endl;
cout << s.size() << endl;
for(int... |
/*-----------------------------文件--------------------
* 文件名:FindLightBox.cpp
* 作者: seafood
* 功能: 寻找装甲板上可能的灯条
------------------------------------------------------*/
//-----------------------------头文件引用和命名空间-------------------
#include "FindLightBlobs.h"
using namespace std;
using namespace cv;
//声明:
std::ve... |
#include <cstdlib>
#include <iostream>
#include <vector>
#include <cmath>
void read_integers(std::vector< int >& ints, int count)
{
int new_integer = 0;
for(int i = 0; i < count; ++i)
{
std::cin >> new_integer;
// TODO: Implement your solution here
ints.push_back(new_integer);
... |
#include "Renderer.h"
#include <iostream>
#define LOG(X) std::cout << X << std::endl
// Public functions.
Renderer::Renderer(int width, int height)
{
m_width = width;
m_height = height;
m_renderOutput = TGAImage(m_width, m_height, TGAImage::Format::RGB);
m_zBuffer = std::vector<float>(m_width * m_height);
st... |
/* WAP in C++ which will print the sum and average of 5 numbers
*
* Filename: sum.cpp
* Project : c plus plus
* Created Date: Tuesday, July 10th 2018, 7:09:53 pm
* Author: Prof. Aiman Kazi
*
* Copyright (c) 2018 Visual Labs
*
*/
#include <iostream>
using namespace std;
int main(int argc, cha... |
#ifndef INC_GPENGINE_GPMATH_VEC2_H
#define INC_GPENGINE_GPMATH_VEC2_H
#include<cmath>
namespace GPEngine
{
namespace GPMath
{
class Vec2
{
public:
//Components
float x,y;
//Contructors
Vec2();
Vec2(float _x ,float _y);
Vec2(float scalar);
Vec2(const Vec2 & other);
//Destructor
~Vec2();... |
/*
* Level2.cpp
*
* Created on: 2021. 9. 9.
* Author: dhjeong
*/
#include "Level2.h"
Level2::Level2() {
// TODO Auto-generated constructor stub
}
Level2::~Level2() {
// TODO Auto-generated destructor stub
}
|
#include<iostream>
using namespace std;
class Employee
{
protected:
int empno;
char name[30];
char desgination[40];
public:
void emp_info()
{
cout<<"Enter Employee id ";
cin>>empno;
cout<<"Enter Employee name ";
cin>>name;
cout<<"Enter Employee desgination ";
cin>>desgination;
cout<<"... |
#include "LinkedList.h"
#include "Node.h"
#include <iostream>
LinkedList::LinkedList()
{
}
void LinkedList::PushBack(const int _data)
{
Node* new_node = new Node(_data);
if (m_top_node == nullptr)
{
m_top_node = new_node;
}
else
{
m_cur_node = m_top_node;
while (m_cur_node->m_next != nullptr)... |
// exception.h
#pragma once
#include <format>
#include <source_location>
namespace leap {
namespace system {
class Exception {
public:
Exception(std::string&& m) noexcept
: message(std::move(m)) {
}
const char* what() noexcept { return message.c_str(); }
protected:
std::string message;
};
inline voi... |
#ifndef MEDIASEGMENT_H
#define MEDIASEGMENT_H
#include <QString>
namespace hls {
class MediaSegment
{
public:
MediaSegment();
float duration() const;
void setDuration(float duration);
QString uri() const;
void setUri(const QString &uri);
private:
float mDuration;
QString mUri;
};
}
#endif // MEDIA... |
#include "TestClass.hpp"
#include <type_traits>
static_assert(std::is_copy_constructible_v<success<TestClass<true, true, true, true>>> == true);
static_assert(std::is_copy_assignable_v<success<TestClass<true, true, true, true>>> == true);
static_assert(std::is_move_constructible_v<success<TestClass<true, true, true, t... |
// main21.cc is a part of the PYTHIA pythia.event generator.
// Copyright (C) 2018 Torbjorn Sjostrand.
// PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
// Please respect the MCnet Guidelines, see GUIDELINES for details.
// This is a simple test program.
// It illustrates how to feed in a s... |
#include<iostream>
#include<queue>
using namespace std;
/*
* Approach1: remove normally like in a queue. But when adding a new item add it to the front instead of back and hence the front acts like top of the stack
* To make pop operation costly use tail pointer.
*/
typedef struct Stack{
queue<int> q1;
queue<int> ... |
#include <iostream>
#include <iomanip>
using namespace std;
// structure definition
struct complexData {
double real; // real part
double image; // imaginary part
};
// Given input from keyboard
void inputComplex(complexData &);
// Output print to the screen
void printComplex(complexData &);
int main(void)... |
/* -*- 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.
*/
/*
Cross-module security manager: DOM
Lars T Hansen
Se... |
class Solution {
public:
void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) {
vector<int> temp;
int one = 0;
int two = 0;
while(one<m&&two<n){
if(nums1[one]<nums2[two]){
temp.push_back(nums1[one]);
++one;
}else{
temp.push_back(nums2[two]);
++two;
}
}
if(on... |
/*
* OctoMap - An Efficient Probabilistic 3D Mapping Framework Based on Octrees
* https://octomap.github.io/
*
* Copyright (c) 2009-2013, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modificat... |
#include "WordDisplayFormatter.h"
namespace view
{
const string WordDisplayFormatter::format(const set<string>* guessed, const set<string>* allWords)
{
stringstream sstream;
size_t maxForloop = allWords->size() - allWords->size()%3;
for (size_t i = 0; i < maxForloop; i+=3)
{
sstream << setw(C... |
#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>
typed... |
// Created on: 2002-04-12
// Created by: Alexander GRIGORIEV
// Copyright (c) 2002-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 <core/String.h>
#include <core/data/stack/push.h>
#include <core/sequence/concat.h>
#include <core/sequence/count.h>
#include <core/to.h>
#include <qt/QtCore/QDir>
#include <launcher/extends/core/To.h>
#include <launcher/desktopentry/get_desktop_entry_paths.h>
namespace launcher {
namespace desktopentry {
co... |
/* -*- 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.
*/
#include "core/pch.h"
#include "modules/util/OpLineParser.h"
#i... |
#ifndef SQUARE_H
#define SQUARE_H
#include "rectangle.h"
#include "shape.h"
using namespace std;
class Square : public Rectangle{
public:
Square(float);
void print_shape_info();
};
#endif |
// Created on: 1995-01-27
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-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... |
#include "sfmlApp.h"
#include "sfmlBitmap.h"
#include "sfmlDrawManager.h"
#include "sfmlController.h"
#include "view.h"
#include "mainView.h"
#include "appToolbar.h"
#include <SFML/Graphics/RectangleShape.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/Window/Event.hpp>... |
#pragma once
class MainReport
{
public:
MainReport();
void InitializeData();
void show();
private:
class Private;
friend class Private;
Private& d;
};
|
/*
Complete the bool_to_word (PHP: boolToWord ) method.
Given: a boolean value
Return: a 'Yes' string for true and a 'No' string for false
*/
using namespace std;
string bool_to_word(bool value)
{
string answer;
value == true ? answer = "Yes": answer = "No";
return answer;
}
|
#ifndef STAGE_H
#define STAGE_H
#include "background.h"
#include "demon.h"
#include<vector>
class Stage
{
private:
std::vector<Demon> lenemy;
Background listBackground[4];
public:
Stage();
};
#endif // STAGE_H
|
//Used 1D segment tree. Time-1.380s. Though it can be done with 2D segment tree, leading to a faster solution.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
class SegmentTree { // the segment tree is stored like a heap array
private:
ll mx[2004],mn[2004],A[2004];
... |
//: C15:StaticHierarchyNavigation.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
// Poruszanie sie w hierarchii klas
// za pomoca static_cast
#include <iostream>
#include <typeinfo>
using n... |
#ifndef APPLICATION_COMMANDCREATOR_H
#define APPLICATION_COMMANDCREATOR_H
#include <memory>
#include "Commands/BaseCmd.h"
#include "Commands/SendMessageCmd.h"
#include "Commands.h"
#include "Commands/AuthorizationCmd.h"
#include "Commands/ChatUpdateCmd.h"
#include "Commands/GetListChatsCmd.h"
#include "Commands/GetCh... |
/**
* created: 2013-4-7 22:35
* filename: FKTcpTask
* author: FreeKnight
* Copyright (C):
* purpose:
*/
//------------------------------------------------------------------------
#pragma once
//------------------------------------------------------------------------
#include "../FKBaseDefine.h"
#include "FKI... |
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... |
// pch.h: This is a precompiled header file.
// Files listed below are compiled only once, improving build performance for future builds.
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is upda... |
#include <iostream>
using namespace::std;
main()
{int a[100],n,i,j,d;
cout<<"Array size: ";
cin>>%d,&n;
cout<<"Elements: "
for(i=0;i<n;i++)
{cin>>%d,&a[i];}
for (int i = 0; i < n; i++)
{for (int j = 0; j < n; j++)
{if (a[j] > a[i])
{
int tmp = a[i];
a[i] = a[j];
a[j... |
//Copyright 2011-2016 Tyler Gilbert; All Rights Reserved
#include "hal/Pwm.hpp"
using namespace hal;
Pwm::Pwm(port_t port) : Periph(CORE_PERIPH_PWM, port){}
int Pwm::get_attr(pwm_attr_t & attr){
return ioctl(I_PWM_GETATTR, &attr);
}
int Pwm::set_attr(const pwm_attr_t & attr){
return ioctl(I_PWM_SETATTR, &attr);... |
#ifndef AST_HPP
#define AST_HPP
#include <iostream>
#include <vector>;
using namespace std;
class AST
{
public:
AST();
virtual ~AST();
protected:
private:
vector<string> Keyword_Array_Types= {"delete","redim"};
vector<string> Keyword_Conditional_Types= {"for","if","in","switch","e... |
#include <iostream>
#include <iterator>
#include <boost/filesystem.hpp>
void listContents(boost::filesystem::path dir)
{
if (!boost::filesystem::exists(dir))
return;
for(boost::filesystem::directory_iterator iter(dir);
iter != boost::filesystem::directory_iterator();
++iter) {
// if (iter->is_dire... |
#include "Node.h"
Node::Node() {
}
void Node::addChild(Node* child)
{
child->setParent(this);
m_children.push_back(child);
}
void Node::addComponent(Component* component)
{
component->setParent(this);
m_components.push_back(component);
}
void Node::input(float delta)
{
m_transform.update();
for (unsigned in... |
#include <cstdio>
using namespace std;
int main() {
double x, y;
scanf("%lf", &x);
y = 2*x -1;
printf("%.2lf\n", y);
return 0;
}
|
#include<iostream>
#include<cstdio>
#define MAX 70
#define getint(n) scanf("%d",&n)
#define putint(n) printf("%d\n",n)
#define ll long long int
using namespace std;
int main() {
int t,n,m,k,val;
getint(t);
while(t--) {
getint(n);
getint(m);
getint(k);
if ( n == 1 && m == 1)
val = 0;
else if ( n == 1 ||... |
#include "Error.h"
#include <iostream>
using namespace std;
/********************************************************************
**** FUNCTION Error
*********************************************************************
****DESCRIPTION: constructor.
****INPUT ARGS :None
****OUTPUT ARGS:None
****IN/OUT ARGS:None
***... |
#include "stdafx.h"
#include <stdlib.h>
#include <ppl.h>
using namespace concurrency;
#define MT
void __forceinline _max(const int n, const float* a, const float* b, float* y)
{
for (int i = 0; i < n; i++)
{
y[i] = max(a[i], b[i]);
}
}
void __forceinline _max(const int n, const float* a, const float* b, const ... |
/*
* This node is to keep communication with LicensePlateRecognition sensor
* Inputs:
* socket information from LPR sensor
* ROS message for cleaning up car pictures
* Outputs:
* ROS message about received LPR information
* ROS message on if LPR sensor is disconnected
*/
#include <fcntl.h>
#include ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-1999 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef _DOM_DOMIMPLEMENTATION_
#define _DOM_DOMIMPLEMENTATION... |
#ifndef convertability_hpp
#define convertability_hpp
namespace convertability {
template<class T, class U>
class Conversion {
typedef char Small;
class Big { char dummy[2]; };
static Small Test(U);
static Big Test(...); // the last in the list of conversion rules
static T MakeT();
public:
... |
//INITIALIZATION
//TIMER VARIABLES
bool startPauseTimer = 0;
double startTime = 0;
int pauseTime = 0;
int timerTime = 0;
double currentTime = 0;
bool first = 0;
bool pauseFirst = 0;
//GAME STATE VARIABLES
int phase = 1;
int pause = 0;
bool gameOver = 0;
bool settingsActive = false;
//BUTTONS VARIABLES
bool pressedPl... |
//单调队列模板题
//详见注释
#include<cmath>
#include<cstdio>
using namespace std;
int n,k;
int a[2000010];
int q[2000010],head[2000010];
void minn()//单调队列模板
{
int h=1,t=0;
for(int i=1;i<n;i++)//求第i-k到第i-1个数中最小值
{
while(q[t]>=a[i] && t>=h)//取出不可能成为最小值的元素
t--;
q[++t]=a[i];//插入... |
#include "Core/EntryPoint.h"
#include "Core/App/AppBase.h"
class CubeApp : public AppBase
{
void Init();
void Update();
void Release();
};
void CubeApp::Init()
{
AppBase::Init();
}
void CubeApp::Update()
{
AppBase::Update();
}
void CubeApp::Release()
{
AppBase::Release();
}
CubeApp app;
ENTRY_POINT(app, "Cub... |
#pragma once
#include "../Color/Color.h"
#include "../Texture/TexturePixelFormat.h"
#include "ImageBase.h"
#include "ImageFormat.h"
#include "ImageResizeFilter.h"
#include "../Dependencies/OpenGL.h"
#include <string>
#include <vector>
namespace ae
{
/// \ingroup graphics
/// <summary>
/// Store an array of pixel... |
/*
* 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... |
#ifndef CMPRO_SEQUENCE_CONVERT_H
#define CMPRO_SEQUENCE_CONVERT_H
#include "common_include.h"
#include "configure.h"
class SequenceConvert {
public:
SequenceConvert();
std::vector<std::vector<double> > newdata
(std::vector<double> new_value_,double new_dur_);
private:
double duration;
std::vector<... |
/*******************************************************************************
* filename: C_Mutation.hpp
* description: Pure virtual base class for mutating a network (singleton)
* author: Moritz Beber
* created: 2010-04-16
* copyright: Jacobs University Bremen. All rights reserved.
*************... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2009 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef PLATFORM_GADGET_UTILS_H
#define PLATFORM_GADGET_UTILS_H
... |
//
// Created by dwb on 2019-07-19.
//
#ifndef SAMPLE_CAR_H
#define SAMPLE_CAR_H
#include <iostream>
#include <string>
using namespace std;
class Car {
public:
Car(){
cout << "Car()" << endl;
m_name = "BMW";
m_age = 0;
}
explicit Car(const char *t_name){
cout << "Car(cons... |
#include <ncurses.h>
#include <time.h>
#include <dirent.h>
#include <wiringPi.h>
#include <pca9685.h>
#include <fstream>
#include <ctime>
#include <string>
#include <chrono>
#include "servo.h"
#include <stdio.h>
#include "../../raspicam/src/raspicam_still.h"
#include <unistd.h>
#include <iostream>
using namespace std;... |
class stupidBird
{
private:
int birdx, birdy;
int birdxCurrentPosition, birdyCurrentPosition;
char playerBird = '>';
public:
stupidBird(int x, int y)
{
birdx = x;
birdy = y;
birdxCurrentPosition = birdx;
birdyCurrentPosition = birdy;
}
void birdReset();
void moveBirdUp();
void moveBirdDown(unsigned i... |
#include <bhand/bh282_sim_robot.h>
namespace as64_
{
namespace bhand_
{
Bh282SimRobot::Bh282SimRobot(urdf::Model &urdf_model, const std::string &base_link,
const std::vector<std::string> &tool_link, double ctrl_cycle)
:RobotHand(urdf_model, base_link, tool_link, ctrl_cycle... |
// mst and maxcost dynamic
// uva 11354
#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <cstring>
#include <algorithm>
using namespace std;
#define clr(x) memset((x),0,sizeof(x))
#define x first
#define y second
#define sz(x) int(x.size())
#define all(x) (x).begin(),(x).end()
typedef pa... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
long t,temp=0;
cin>>t;
while(t--)
{
long n,time[100],mat[4][4]={0};
char alpha[100];
cin>>n;
for(long i=0;i<n;i++)
{
cin>>alpha[i]>>time[i];
}
for(long i=0;i<n;i++)
{
if(alpha... |
class ItemCopperBar
{
weight = 0.01;
};
class ItemCopperBar10oz
{
weight = 0.1;
}; |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define show(x) for(auto i: x){cout << i << " ";}
typedef long long ll;
const int mod = 1000000007;
struct mint {
ll x; // typedef long long ll;
mint(ll x=0):x((x%mod+mod)%mod){}
mint& operato... |
//
// Created by zhanggyb on 16-9-19.
//
#include "test.hpp"
#include <skland/gui/application.hpp>
#include <skland/gui/window.hpp>
#include <skland/gui/egl-widget.hpp>
using namespace skland;
Test::Test()
: testing::Test() {
}
Test::~Test() {
}
/*
*
*/
TEST_F(Test, slider_1) {
using skland::Window;
i... |
#include "labGraphicsWindow.h"
#include "interface/labCursorManager.h"
#include "src/mainToolbar.h"
#include "interface/ImGuizmo.h"
#include <imgui.h>
#include <imgui_internal.h> // for ImGuiContext
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <imgui_impl_glfw_gl3.h>
#include <string>
#include <iostream>
na... |
#ifndef MYQPLOT_H
#define MYQPLOT_H
#include "qcustomplot.h"
#include <QDebug>
#include <QPoint>
#include <QVector>
#include <QWidget>
// 最大线
#define MAX_ARG (10)
class MyQPlot : public QCustomPlot
{
Q_OBJECT
public:
MyQPlot(QWidget *parent = 0);
virtual ~MyQPlot();
void mouseMo... |
#include "../../gl_framework.h"
using namespace glmock;
extern "C" {
#undef glLinkProgram
void CALL_CONV glLinkProgram(GLuint program) {
}
DLL_EXPORT PFNGLLINKPROGRAMPROC __glewLinkProgram = &glLinkProgram;
}
|
// TODO: Convert this to sub-modules and add testing etc.
/*
// Start parallel generators.
g++ generator.cc -o /tmp/gen.out
for XX in $(seq -w 1 20); do sleep 1; (/tmp/gen.out>out.$XX.txt&) ; done
// Stop all generators.
killall gen.out
// See results.
cat out*.txt | sort -r -n | uniq | wc -l
// Clean up.
cat out*.t... |
#include "DoubleBit.h"
#include "DoubleBit.h"
using namespace std;
DoubleBit::DoubleBit(){
addr = 0;
totalCount = 0;
umap.clear();
}
bool DoubleBit::parseAndGetResult(unsigned long long addr,std::string behavior,int tableSize){
totalCount++;
unsigned long long temp = addr%tableSize;
// s... |
#pragma once
#pragma warning(disable:4312)
#include <QUrl>
#include <QDir>
#include <QMenu>
#include <QFile>
#include <QEvent>
#include <QDebug>
#include <QMutex>
#include <QLabel>
#include <QDialog>
#include <QString>
#include <QObject>
#include <QThread>
#include <QAction>
#include <QDateTime>
#include <QFileInfo>
#... |
/* -*- 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 LINK_OBJECT_STORE_H
#define LINK_OBJECT_STORE_H
class H... |
#include "ventadetallenode.h"
#include <cstddef>
VentaDetalleNode::VentaDetalleNode()
{
//ctor
ventaDetalle = NULL;
next = NULL;
}
VentaDetalleNode::VentaDetalleNode(VentaDetalle* ventaDetalle)
{
//ctor
this->setVentaDetalle(ventaDetalle);
next = NULL;
}
VentaDetalleNode::~Ve... |
//Brighter the image.
//To make a image brighter.
//Author:ShadowK
//email:zhu.shadowk@gmail.com
//2015.10.13
//Use Ctrl+M,Ctrl+O to fold the code.
#include <iostream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <cxcore.h>
#include <cv.h>
#include <highgui.h>
#include <vector>
#include <conio.h>
... |
/*
Problem : Return the Last word in a string
Input : I will do this without using String Library
Output : Library
Note:Dont modify original string Neglect Spaces at the right end and at left end if required .
->Create a new string and return it , Use dynamic memory allocation .
*/
#include <stdlib.h>
char * get_l... |
// inl1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <ctime>
#include <string>
using namespace std;
// randnum generates a random number between 1 and 36
int randnum() {
srand(time(0));
int n = rand() % 36 + 1;
return n;
};
/... |
/**
* @author Natalia Solar
* CSD415 Section: H21
* Homework Assignment 1
* A program that queries at least 8 process limits on your system, and prints the
* soft and hard values for each resource you chose.
*/
/* This demonstrates how to call getrlimit()
* getrlimit() takes two parameters:
* a resource ... |
#ifndef INC_CAMERA_H
#define INC_CAMERA_H
#include<glm/glm.hpp>
#include<memory>
class Camera
{
glm::mat4 view;
glm::vec3 position;
glm::vec2 mapSize;
public:
Camera(const glm::vec2& point);
void init(const glm::vec2& point);
void update(const glm::vec2&);
inline glm::mat4 getView()
{
return view;
}... |
/*
* Copyright (c) 2020 Stanislav Denisov (nxrighthere@gmail.com)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 3 with a static linking exception which accompanies this
* distribution.
*
* This ... |
#include <KeyboardListener.h>
#include <QRegularExpression>
#include <QThread>
#include <QtCore>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#ifdef Q_OS_LINUX
#include <linux/input.h>
#endif
using namespace Engine;
/**
* @brief KeyboardListene... |
#include <iostream>
#include <random>
#include <algorithm>
#include "game.h"
#include "gamesolver.h"
#include "cpu.h"
#include "ntuple.h"
using namespace std;
vector<pair<vector<int>,float>> trainingData;
NTupleNetwork network;
void generateTrainingData() {
cout << "generating data from games..." << endl;
G... |
#include "FragTrap.hpp"
std::string FragTrap::_atackNames[_atackNums] = {
"Miniontrap",
"Meat Unicycle",
"Funzerker",
"Mechromagician",
"Rubber Ducky"
};
FragTrap::FragTrap(const std::string &name)
: ClapTrap(name, "FR4G-TP"), _vhEnergyCast(_vhCastDefault)
{
_lvl = 1;
_hitPoints = 100;
_maxHitPoints = 100;
... |
/*
ID: andonov921
TASK: ttwo
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 <cm... |
//
// Created by cirkul on 27.11.2020.
//
#ifndef UNTITLED3_ANIMAL_H
#define UNTITLED3_ANIMAL_H
#include "Plant.h"
class Animal : public Creature {
protected:
Animal(Playground& pg, int i, int j) : Creature(pg, i, j) {
this->id = animal;
this->sex = rand() % 2;
this->movPt = 3;
... |
#pragma once
#include "Boot.h"
class SeaquenceController;
//各シーケンスを定義するクラス
class Seaquence : public Boot
{
public:
virtual ~Seaquence();
Boot* Update(Boot*);
virtual Boot* Update(SeaquenceController*) = 0;
};
|
/************************************************************************/
/*
Given an array of n distinct integers sorted in ascending order,
write a function that returns a Fixed Point in the array, if there is any Fixed Point present in array, else returns -1. Fixed Point in an array is an index i such that arr[i] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.