text stringlengths 8 6.88M |
|---|
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <set>
#include <stack>
#include <cstdio>
#include <cstring>
#include <climits>
#include <cstdlib>
... |
#include "launch_cpp03.hpp"
#include "shared_storage_requirements_calculator.hpp"
#include "host_marshal.hpp"
#include <iostream>
#include <numeric>
template<typename Function>
void launch(std::size_t num_blocks, std::size_t num_threads_per_block, Function f)
{
detail::host_marshal(num_blocks, num_threads_per_block,... |
#define CATCH_CONFIG_MAIN
#include "../external/catch2/catch.hpp"
#include "../src/math/is_divisible.hpp"
#include <vector>
#include <string>
struct TestStruct
{
int val1;
int val2;
bool actual;
TestStruct(int val1, int val2, bool actual)
: val1(val1), val2(val2), actual(actual)
{
}
... |
// -----------------------------------------------------------------------------
// TrackingAction.cpp
//
//
// * Author: Everybody is an author!
// * Creation date: 4 August 2020
// -----------------------------------------------------------------------------
#include "TrackingAction.h"
// Q-Pix includes
#inclu... |
#include "FirstPersonCamera.h"
#include <SFML/Graphics.hpp>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
LaiEngine::FirstPersonCamera::FirstPersonCamera(const glm::vec3 & pos)
{
position = pos;
}
void LaiEngine::FirstPersonCamera::Update(const float dt)
{
position += velocity * dt;
velocity *= ... |
#include "Soldier.h"
//*Constructor*//
Soldier::Soldier(int x, int y)
{
speed = 2;
GameObject::initiate(x, y, speed, 20, 20);
setID(ENEMY);
}
//*Overide update pure virtual function*//
void Soldier::update()
{
y += speed;
if(y < 0 )
setAlive(false);
}
//*Overide render pure virtual function*... |
/*Returns an array of all n-bit gray codes sequence.
You are required to complete below method. */
vector <string> generateCode(int N)
{
// only gravity will pull me down
// Generate Grey Code Sequences
vector<string> res;
res.push_back("0");
res.push_back("1");
if(N==1)
return re... |
#include "crossword_board.hpp"
#include <stdexcept>
#include <cassert>
#include <sstream>
#include <iostream>
// ----------------- Crossword Clue --------------------------------
/**
* Creates an empty clue.
*/
crossword_clue::crossword_clue()
: num_(-1), text_(), x_(-1), y_(-1)
{
}
/**
* Constructor
*/
crosswor... |
#include "EngineUtil.h"
using namespace HW;
namespace HW
{
std::set<string> FileUtil::valid_shader_path;
std::set<string> FileUtil::valid_scene_path;
}
std::string ReadFiletoString(string filename)
{
string valid_file_name = FileUtil::getSceneFileValidPath(filename);
std::ifstream file(valid_file_name.c_str(), std... |
#include "src/SCPIParser/SCPIParser.h"
#include <MD_AD9833.h>
#include <SPI.h>
struct scpi_parser_context ctx;
scpi_error_t default_status(struct scpi_parser_context* context, struct scpi_token* command);
scpi_error_t identify(struct scpi_parser_context* context, struct scpi_token* command);
//scpi_error_t get_freque... |
#include "CascadeMessenger.hh"
#include "PrimaryGeneratorCascade.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
#include <string>
#include <fstream>
#include <experimental/filesystem>
#include <mutex>
namespace fs = std::experime... |
#include "Client.h"
#define BUFFER_SIZE (1024 * 4)
#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#pragma comment (lib, "AdvApi32.lib")
Client::Client(ConnectType type, const std::string& host, unsigned port) :
m_HostName(host),
m_ConnectPort(port),
m_Status(Status_Idle)
{
i... |
#include <iterator>
#include "gtest/gtest.h"
#include "cpplinq/linq.hpp"
#include "boost/iterator/counting_iterator.hpp"
#include <complex>
//If we list all the natural numbers below 10 that are
//multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
//Find the sum of all the multiples of 3 or ... |
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
// System.String
struct String_t;
// System.String[]
struct StringU5BU5D_t4054002952;
// System.Collections.Generic.Dictionary`2<System.String,System.Int32>
struct Dictionary_2_t19742... |
#pragma once
////////////////////////////////////////////////////////////////////////////////
#include <cellogram/common.h>
#include <geogram/basic/geometry.h>
#include <geogram/mesh/mesh.h>
#include <Eigen/Dense>
#include <vector>
////////////////////////////////////////////////////////////////////////////////
names... |
/* -*- 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 VECTOR_H
#define VECTOR_H
#include "modules/search_engin... |
#include <string>
#include<iostream>
#ifndef STUDENT_H
#define STUDENT_H
using namespace std;
struct PlaceOfLiving
{
string City;
string Country;
string Street;
};
struct Student
{
string ID;
string FirstName;
string LastName;
string Department;
string email;
PlaceOfLiving Addres;
string Birthday;
};
vo... |
#pragma once
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <opencv2/opencv.hpp>
class DepthToPointCloud
{
public:
DepthToPointCloud(int width, int height, double fx, double fy, double cx, double cy, double factor);
~DepthToPointCloud() {}
pcl::PointCloud<pcl::PointXYZ>::Ptr convert(const cv... |
#include <MDEC.h>
#include <FixedPointMaths.h>
mdec::mdec()
{
// instantiate FIFOs
}
// interface functions
void mdec::wordFromDMA(word in)
{
// if MDEC isn't expecting a parameter, prepare command
if (opcode == 0)
setupCommand(in);
// otherwise send parameter and execute
e... |
#include <ros.h>
#include <std_msgs/String.h>
#include <Arduino.h>
#include "Encoder.h"
Encoder left(3, 2); //motor place number = 3
Encoder right(18, 19); //motor place number = 4
char odom_str[50];
int left_motor_a = 5;
int left_motor_b = 6;
int left_motor_en = 4;
int right_motor_a = 7;
int right_moto... |
#include <QLineEdit>
#include <QLabel>
#include <QTextBlock>
#include <QTextEdit>
#include <QPushButton>
#include <QComboBox>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <qnetworkrequest.h>
#include <QDebug>
#include <QSettings>
#include <QCompleter>
#include <QLayout>
#include <QJs... |
/* -*- 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<stdio.h>
int fun(int n){
if(n==1)
return 1;
else
return n+fun(n-1);
}
int main(){
int b;
while(~scanf("%d",&b)){
printf("%d\n",fun(b));
}
return 0;
}
|
#include <NewSoftSerial.h>
#include <AFMotor.h>
const int DOORSENSOR_CLOSED=A0;
const int DOORSENSOR_OPEN=A1;
const int MODE_pin=A2;
const int MANUALOPEN_pin=A3;
const int IR_pin = 4;
const int IR_cutoff=175;
int printed_already;
//RF reader is connected to RX pin 0 for serial input
const int OPEN=1;
const int CLO... |
#include <iostream>
using namespace std;
/* Each new term in the Fibonacci sequence is generated by adding the previous two terms.
* By starting with 1 and 2, the first 10 terms will be:
* 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
*
* Find the sum of all the even-valued terms in the sequence which do not exceed four ... |
#include"conio.h"
#include"stdio.h"
void main(void)
{
clrscr();
int a=0,b=1;
printf("%d,%d,",a,b);
for(int i=1; i<=10; i++)
{
a+=b;
b+=a;
printf("%d,%d,",a,b);
}
getch();
} |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string>
#include <cstdlib>
#include <vector>
#include <algorithm>
using namespace std;
namespace Mahjong {
enum MahjongFan {
Mahjong,
PongDragon,
PongPrevailingWind,
PongPlayerWind,
AnimalTile,
Anima... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2007-2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef POSIX_LOGGER_H
#define POSIX_LOGGER_H __FILE__
#include "... |
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* 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
* ... |
//
// Created by Mirco Altenbernd on 16.10.19.
//
#ifndef ARGOS3_EXAMPLES_BOT_H
#define ARGOS3_EXAMPLES_BOT_H
#include <argos3/core/simulator/loop_functions.h>
#include <argos3/plugins/robots/loot-bot/simulator/lootbot_entity.h>
#include "bot_at.h"
using namespace argos;
using namespace std;
class Bot : public BotAt... |
/*
* enfermedad.h
*
* Copyright (C) Juan F. Huete y Carlos Cano
*/
#ifndef __ENFERMEDAD_H
#define __ENFERMEDAD_H
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
//! Clase enfermedad, asociada al TDA enfermedad
/*! Enfermedad::Enfermedad, Enfermedad::setName, Enfermedad::setID, Enf... |
#include <iostream>
#include "tree.hpp"
BBTree::BBTree() {
this->size = 0;
root = nullptr;
std::cout << "Default constructor works!" << std::endl;
}
BBTree::BBTree(BBTree& tr) {
std::cout << "Copy constructor works!" << std::endl;
}
BBTree::BBTree(BBTree&& tr) {
std::cout << "Move constructor wor... |
/*Heap sort header.*/
#ifndef __CC_ALGO_SORTING_HEAP_SORT__
#define __CC_ALGO_SORTING_HEAP_SORT__
#include "cc/shared/generic_array.h"
namespace cc_algo_sorting {
void heap_sort(void* base, size_t member_count, size_t member_size,
cc_shared::CompareFuncType comparer);
} // cc_algo_sorting
#endif /... |
/// \file
/// \brief Creates point cloud map using ICP.
///
/// PARAMETERS:
///
/// PUBLISHES:
/// /fused (sensor_msgs/PointCloud2): concatenated point cloud
/// SUBSCRIBES:
/// /camera/depth/color/points (sensor_msgs/PointCloud2): camera point cloud data
/// BROADCASTS:
///
/// SERVICES:
///
#incl... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <map>
using namespace std;
typedef long long ll;
#define INF 10e17 // 4倍しても(4回足しても)long longを溢れない
#de... |
#include "blocker.h"
#include <QCoreApplication>
#include <QWidget>
#include <QGridLayout>
#include <QCloseEvent>
#include <QMessageBox>
#include <QFile>
#include <QFileDialog>
#include <QPushButton>
#include <QMenu>
#include <QAction>
#include <QLineEdit>
#include <QSpinBox>
#include <QTimer>
#include <QLabel>
#inclu... |
#include <iostream>
#include <chrono>
#include <future>
/*
* Must be compiled with -pthread option
* http://www.cplusplus.com/forum/beginner/218875/
*
*/
using namespace std;
using namespace chrono;
microseconds run_task() {
auto start = high_resolution_clock::now();
cout << "Printing from within run fun... |
#include "VeritasEngine.h"
#include "Bindable.h"
IVContext* Bindable::GetContext(VeritasEngine& in)
{
return in.pContext.Get();
}
IVDevice* Bindable::GetDevice(VeritasEngine& in)
{
return in.pDevice.Get();
}
IVSwapChain* Bindable::GetSwapChain(VeritasEngine& in)
{
return in.pSwap.Get();
} |
#include "PluginProcessor.h"
#include "PluginEditor.h"
//==============================================================================
AudioPluginAudioProcessorEditor::AudioPluginAudioProcessorEditor (AudioPluginAudioProcessor& p)
: AudioProcessorEditor (&p), processorRef (p), player_view(p.player->getThumbn... |
// #define EIGEN_TAUCS_SUPPORT
// #define EIGEN_CHOLMOD_SUPPORT
#include <Eigen/Sparse>
// g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/linux/ -L/home/gael/Co... |
/**
* @file integer_divide_test.cc
* @author Gerbrand De Laender
* @date 17/12/2020
* @version 1.0
*
* @brief E091103, Master thesis, HLS testing
*
* @section DESCRIPTION
*
* Test bench for 'integer_divide.cc'.
*
*/
#include <stdio.h>
void integer_divide(unsigned char N, unsigned char D, u... |
/**
* Copyright (c) 2021, Timothy Stack
*
* 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
* list of condi... |
/*****************************************************************************************************************
* File Name : postorder.h
* File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\tutorials\nptel\DSAndAlgo\lecture07\postorder.h
* Created on : Dec 30, 2013 :: 5:34:17 PM
* Author ... |
#include <iostream>
using namespace std;
int main()
{
int *num;
num = new int[6];
int num2;
for (int i=0;i<=5;i++)
num[i] = i;
num2 = num;
cout << num2 << endl;
delete [] num;
num2 = num;
cout << num2;
return 0;
} |
#include <stdio.h>
main()
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a+b>c && a+c>b && c+b>a)
printf("YES");
else printf("NO");
// system("pause");
}
|
#include "stdafx.h"
#include "AISelect.h"
#include "PMMonster.h"
#include "AIMSelect.h"
#include <string>
#include "SuperMonsterSelect.h"
#include "pvpModeSelect.h"
#include "../GameCursor.h"
#include "IconAI.h"
#include "../AIEdit/VisualAIOpen.h"
AISelect::~AISelect()
{
DeleteGO(m_back);
for (auto ia : m_icons)
{... |
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/app18.unoproj.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.app18_accessor_CollapsibleEntry_Description.h>
#include <_root.CollapsibleEntry.h>
#include <Uno.Bool.h>
#include <Uno.Object.h>
#include <Uno... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cmath>
#define INF 1000000000
#define REP(i,n) for(int i=0; i<n; i++)
#define REP_R(i,n,m) for(int i=m; i<n; i++)
#define MAX 55
using n... |
#include <string>
#include "include/year.hpp"
#include "include/helpers.hpp"
using namespace std;
Year::Year(string date) {
this->date = date;
setMonths(date);
}
Year::Year() {}
Year::~Year() {}
Month Year::getMonth(int mon) {
return months.at(mon -1);
}
void Year::setMonths(string date) {
... |
/**************************************************************************
** Copyright (C) 2010-2017 Toshinobu Hondo, Ph.D.
** Copyright (C) 2013-2017 MS-Cheminformatics LLC, Toin, Mie Japan
*
** Contact: toshi.hondo@qtplatz.com
**
All rights reserved.
Redistribution and use in source and binary forms, with or witho... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDataAssemblyUtilities.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This ... |
#include <iostream>
#include "binaryTree.hpp"
int main() {
BinaryTree tree;
int chack = 0;
int value = 0;
while (chack != 5) {
switch (chack) {
case 1:
std::cout << "Mutqagrel arjeq@ -> ";
std::cin >> value;
tree.insert(value);
... |
/**
* Functions for setup BSS memory
* (zero and uninitialized static variables)
*/
#pragma once
// bss
extern unsigned __bss_start;
extern unsigned __bss_end;
/** Zero static variables with zero or undefined value
*/
inline void zero_bss() {
unsigned *dst = &__bss_start;
while (dst < &__bss_end) {
... |
//
// Created by jean_j on 21.01.17.
//
#ifndef GGJ17_COLLIDEBOX_HH
#define GGJ17_COLLIDEBOX_HH
#include <SFML/System/Vector2.hpp>
#include "Pos.hh"
class CollideBox {
public:
CollideBox(const sf::Vector2f &pos, int width, int height, double rotation);
~CollideBox();
const sf::Vector2f &getPos() const;
void ... |
#include "Assignment2Test.h"
#include "Camera.h"
#include "Pyramid.h"
#include "Cylinder.h"
#include "KeyboardController.h"
#include "R2D2.h"
#include "SweepPath.h"
#include "Sweep.h"
#include "Propeller.h"
#include "Robot.h"
#include "Animation.h"
#include "Cube.h"
#include "Terrain.h"
#include "Xwing.h"
#include "Ani... |
#include <U8glib.h>
//**************************************************
// Change this constructor to match your display!!!
U8GLIB_SSD1306_128X64 u8g(12, 11, 10, 9, 8); // D0=13, D1=11, CS=10, DC=9, Reset=8
//**************************************************
#include <NMEAGPS.h>
#include <GPSport.h>
#include <Stre... |
#include <Arduino.h>
#include "a_car.h"
//循迹传感器黑为0,白为1
//定位传感器黑为1,白为0
static float integer_error = 0;
bool Digital_Read(int sensor)
{
if (digitalRead(sensor))
return false;
return true;
}
void Track_Sensor_Init()
{
pinMode(X_sensor1, INPUT);
pinMode(X_sensor2, INPUT);
pinMode(X_sensor3, INPUT);
pi... |
#include <bits/stdc++.h>
using namespace std;
long long int a,b,c,d,r;
map<long long int,long long int> arr;
int N;
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0);
cin >> a >> b;
for(int i=1;i<=a;i++){
cin >> c;
if(b <= 0){
cout << (i-1);
return 0;
} ... |
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
//input and deal with
int n;
cin>>n;
if(n==0){
return 0;
}
vector<string> output;
for(int i=0;i<n;++i){
int integer;
cin>>integer;
if(integer==1||integer... |
#include <cstdio>
#include <stdlib.h>
#include <string.h>
#include "Analyzer.h"
#include "OnlyStringColorer.h"
#include "TokenColorer.h"
#include "TokenInfo.h"
#include "ColorText.h"
/* The first parameter argv is an input file, the second parameter is a way of working. Output is in stdout*/
int
main (int arg... |
#ifndef WALI_UTIL_DISJOINT_SETS_HPP
#define WALI_UTIL_DISJOINT_SETS_HPP
#include "wali/Common.hpp"
#include "wali/util/details/Partition.hpp"
#include "wali/util/map_at.hpp"
#include <boost/bimap/bimap.hpp>
#include <boost/shared_ptr.hpp>
#include <map>
#include <string>
#include <sstream>
namespace wali
{
namesp... |
// Created on: 1994-03-03
// Created by: Joelle CHAUVET
// Copyright (c) 1994-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... |
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistribution... |
#include <atlbase.h>
#include "hardware.h" |
#include <iostream>
#include <vector>
#include <iomanip>
#include <string>
#include <math.h>
#define MAXS(a,b) ((a>b)?a:b)
#define MINS(a,b) ((a<b)?a:b)
#define MAX_PRECISION 32
using namespace std;
typedef uint32_t u32;
typedef int32_t i32;
typedef uint64_t u64;
typedef int64_t i64;
namespace newtypes {... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <boost/iterator/iterator_facade.hpp>
#include <quic/QuicConstants.h>
#include <quic/QuicException.h>
#incl... |
// Created on: 1993-03-31
// Created by: NW,JPB,CAL
// 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 GNU Les... |
#pragma once
#include "cocos2d.h"
USING_NS_CC;
class MainMenu:public Layer
{
public:
MainMenu(void);
virtual ~MainMenu(void);
static Scene * createScene();
CREATE_FUNC(MainMenu);
virtual bool init() override;
virtual void menuCallBack(Ref * obj);
};
|
#ifndef STRONGTYPE_H
#define STRONGTYPE_H
#include "type.h"
class StrongType
{
public:
/* @brief constructor
*/
StrongType(const double &value, const Type::Enum &type=Type::NoType);
const double &get_value() const {return _value;}
const Type::Enum &get_type() const {return _type;}
void set... |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i++)
#define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;}
#define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;}
typedef long l... |
//
// Created by fab on 01/03/2020.
//
#include <glad/glad.h>
#include <stb/stb_image.h>
#include <iostream>
#include "../../../../headers/rendering/renderer/opengl/Texture2D.hpp"
bool Texture2D::loadFrom(const char *path, ETextureType type, unsigned int flagWrapS, unsigned int flagWrapT, unsigned int flagMinFilter,
... |
class Solution {
public:
int countPrimes(int n) {
/*
if(n <= 2)
return 0;
if(n == 3)
return 1;
if(n <= 4)
return 2;
int count = 2;
int i = 7;
for(i; i < n; i += 6) {
count += isPrime(i);
... |
#ifndef RDDLPARSER_PSTREAM_H
#define RDDLPARSER_PSTREAM_H
#include<fstream>
#include<string>
class PStream{
public:
PStream() = default;
PStream(const char* name);
PStream(std::string& name);
PStream& operator<<(bool val);
PStream& operator<<(short val);
PStream& operator<<(unsigned short val);
PStream& operat... |
#pragma once
#include "GameFramework/Actor.h"
#include "Components/TextRenderComponent.h"
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "GameUserWidget.h"
#include "TimerManager.h"
#include "SingleScore.h"
#include "CountDown.generated.h"
UCLASS()
class PROJECT_API ACountDown : public AActor
{
G... |
#pragma once
#include <iostream>
#include <cmath>
#include <assert.h>
namespace math {
const float PI = 3.14159265359;
int clamp(int x, int min, int max);
template <typename T>
class Matrix {
public:
Matrix(int n, int m) {
_nRows=m;
_nCols=n;
... |
/****************************************************************************
** 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... |
/**
* Copyright (C) Omar Thor, Aurora Hernandez - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
*
* Written by
* Omar Thor <omar@thorigin.com>, 2018
* Aurora Hernandez <aurora@aurorahernandez.com>, 2018
*/
#ifndef DMTK_ALGORI... |
#include "LogSystem.h"
LogSystem::Garbage LogSystem::_garbage;
std::string LogSystem::_path = "";
std::ofstream LogSystem::_logFile; |
//
// CubeMap.h
// Odin.MacOSX
//
// Created by Daniel on 27/10/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#ifndef __Odin_MacOSX__CubeMap__
#define __Odin_MacOSX__CubeMap__
#include <string>
#include "Texture.h"
#include "RenderLib.h"
#include "Vector4.h"
namespace odin
{
namespace resource
{... |
#include <SDL2/SDL.h>
#include <glad/glad.h>
#include "common/app.h"
#include "common/gl-exception.h"
int main(int argc, char *argv[]) {
App app;
glClearColor(1, 0, 1, 1);
// ------------------ Vertex Buffer
unsigned int vbo;
{
float vertices[] = {
-0.5f, -0.5f, 0.0f,
... |
// FileRecv.cpp : 实现文件
//
#include "stdafx.h"
#include "Talk2Me.h"
#include "FileRecv.h"
#include "afxdialogex.h"
// CFileRecv 对话框
IMPLEMENT_DYNAMIC(CFileRecv, CDialogEx)
CFileRecv::CFileRecv(CWnd* pParent /*=NULL*/)
: CDialogEx(CFileRecv::IDD, pParent)
, m_fileName(_T(""))
, m_fromId(_T(""))
{
m_fileLength = ... |
// LIBRARY DECLARATION
#include <ESP8266WiFi.h>
#include <DHT.h>
#include <Servo.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define DHTPIN D0
#define DHTTYPE DHT11
DHT dht (DHTPIN, DHTTYPE);
int pirPin=D3; //the digital pin connected to the pirsensor's output
/... |
#pragma once
class QString;
enum AnswerOptionsType {
UNDEFINED,
UNIQUE,
GENERAL
};
QString answerOptionsTypeToString(const AnswerOptionsType &answerOptionsType);
AnswerOptionsType answerOptionsTypeFromString(const QString &string);
|
#include <iostream>
#include <stdlib.h>
using namespace std;
#define EXPECTED_ARG_COUNT 1
int main(const int argc, const char * argv[])
{
int rc = 0;
if (argc != EXPECTED_ARG_COUNT+1)
{
cerr << "Error: Expected " << EXPECTED_ARG_COUNT << " arguments; received " << argc-1 << "; ignoring extraneous ... |
int nck[3010][3010];
void init_nck(){
for(int i = 0 ;i < 3010;i++){
nck[i][0] = 1;
for(int j = 1;j <= i;j++){
nck[i][j] = nck[i - 1][j] + nck[i - 1][j - 1];
if(nck[i][j] >= mod)
nck[i][j] -= mod;
}
}
}
int add(int a, int b) {
if (a + b >= mod) return a + b - mod;
return a + b;
}
int sub(int a, in... |
#include "mlir/Dialect/Omtalk/IR/OmtalkDialect.h"
#include "mlir/Dialect/Omtalk/IR/OmtalkOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/Transforms/InliningUtils.h"
using namespace mlir;
using namespace mlir:... |
//Напишите функцию, которая переворачивает словарь : ключи становятся значениями, а значения — ключами.
//Сделайте перевёрнутый словарь.
#include <iostream>
#include <map>
using namespace std;
map<string, string> BuildReversedMap(const map<string, string>& m) {
//формируем перевернутый словарь -- rev_m
//ме... |
/**
* Scale class.
* This scales an object.
* @author Chris Brenton
* @date 2012/05/17
*/
#ifndef _SCALE_H
#define _SCALE_H
#include "geom/geometry.h"
#include "geom/transform.h"
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/matrix_inverse.hpp"
#include <stdio.h>
class Scale : ... |
// Created on: 1991-08-07
// Created by: Laurent PAINNOT
// Copyright (c) 1991-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... |
#include "Principal.h"
#include <stdio.h>
#include <iostream>
using std::cout;
using std::endl;
using std::cin;
// Separamos os arquivos Main em Principal pela seguinte razão:
// Todos os objetos criados serão instanciados pela classe Principal
// e todos os valores necessários para sua execução estarão disponíveis
... |
#include <iostream>
#include <memory>
#include "config.h"
#include "logger.h"
#include "world.h"
int
main(int argc, char** argv)
{
std::shared_ptr<sim::core::World> world{};
try {
std::cerr << "Parsing command-line arguments..." << std::endl;
auto config = std::make_shared<sim::core::Simulat... |
#include <Ethernet.h>
#include <SPI.h>
#include <DHT.h>
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
int temperature;
int humidity;
int illumination;
const String formkey = "1VUP2pFvFs6kKgLB1PQXpckbaRijRBB5yeGsVykUByY4"; //Replace with your Key
byte mac[] = { 0x90,0xA2,0xDA,0x00,0x55,0x8D}; //... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2002-2010 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"
#include "modules/dom/src/domevents/domevent... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
*
* Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Anders Karlsson (pugo)
*/
... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MenuSystem/COOP_PauseMenu.h"
#include "Components/Button.h"
bool UCOOP_PauseMenu::Initialize()
{
bool Success = Super::Initialize();
if (!Success) { return false; }
if (Resume_BTN == nullptr) { return false; }
Resume_BTN->On... |
#pragma once
#ifndef BUBBLESORT_H
#define BUBBLESORT_H
#include <vector>
class BubbleSort
{
public:
BubbleSort();
~BubbleSort();
int bubbleSort(std::vector<int> &vec);
};
#endif |
#include <vector>
#include <string>
template<typename T>
class addable {
T val;
public:
addable(T v) : val{v} {}
template<typename U>
T add(U x) const {
if constexpr (std::is_same_v<T, std::vector<U>>) {
auto copy (val);
for (auto& n : copy)
n += x;
... |
/*
TouchKeys: multi-touch musical keyboard control software
Copyright (c) 2013 Andrew McPherson
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 version 3 of the License, or
(at you... |
#pragma once
#include "config.h"
class Camera {
public:
Camera();
~Camera();
void set(float upX, float upY, float upZ,
float directionX, float directionY, float directionZ,
float positionX, float positionY, float positionZ);
void setPreset(int id);
void lookAt(glm::v... |
MetaData ResizeModule::getMetaData() const
{
DataDescriptionMap input = {{"image", DataDescription(MATRIX, "the image to resize.") } };
DataDescriptionMap output = {{"image", DataDescription(MATRIX, "the result image.") }};
ParamDescriptionMap params = {
{"width", ParamDescription("new width") },
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.