text stringlengths 8 6.88M |
|---|
#ifndef WHITEBLOCK2_H
#define WHITEBLOCK2_H
#include<QObject>
#include<QGraphicsPixmapItem>
class Whiteblock2 : public QObject , public QGraphicsPixmapItem
{
Q_OBJECT
public:
Whiteblock2();
int gettype();
private:
int type;
public slots:
void move();
};
#endif // WHITEBLOCK2... |
//
// Created by fab on 06/04/2020.
//
#ifndef DUMBERENGINE_CUBEDEBUG_HPP
#define DUMBERENGINE_CUBEDEBUG_HPP
#include <glm/vec3.hpp>
#include "../rendering/renderer/opengl/Vbo.hpp"
#include "../rendering/helper/Shader.hpp"
class CubeDebug
{
private:
Vbo* vbo;
Shader shader;
glm::vec3 position;
glm::v... |
#include<bits/stdc++.h>
#define rep(i,n) for (int i =0; i <(n); i++)
using namespace std;
using ll = long long;
int main(){
//1の位が1以上で一番小さいものを最後に注文する
vector<int>A(5);
rep(i,5)cin >> A[i];
int min_num = 9;
int itr;
rep(i,5){
int a = A[i];
while(a>= 10){
... |
#include <stdio.h>
#include <android/log.h>
#include "CallStack.h"
#define LOG_TAG "unwind"
extern void funcA();
int main(int argc, char* argv[])
{
mapinfo* mi;
__android_log_print(ANDROID_LOG_INFO, LOG_TAG,"Hello, World!!\n");
funcA();
return 0;
}
|
#include "canvas_body.h"
canvas_body::~canvas_body()
{
}
bool canvas_body::init()
{
this->setScene(scene_.get());
return true;
}
void canvas_body::on_selection_changed()
{
const auto items = scene_->selectedItems ();
if (items.size () != 1)
{
emit selection_changed (nullptr);
}
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* 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.
*/
#ifndef _STATIC_PLUGIN_H_INC_
#define _STATIC_PLUGIN_H_INC_
#ifde... |
#include <iostream>
#include <cstdio>
#include <cassert>
using namespace std;
int main(){
int x;
cin >> x;
assert(x >= 1 and x <= 1000);
for(int i=1; i <= x; i+=2){
cout << i << "\n";
}
return 0;
} |
//这个题不怎么理解 还没有例子
class Solution {
public:
int maxProfit(vector<int>& prices) {
int sum = 0;
for(int low = 0,high = 1;low<prices.size()-1&&high<prices.size();){
if(prices[low]<prices[high]){
sum += prices[high] - prices[low];
}
low = high;
++high;
}
return sum;
}
}; |
#pragma once
#include "bricks/core/autopointer.h"
#include "bricks/audio/audiobuffer.h"
namespace Bricks { namespace Audio {
template<typename T = s16>
class AudioCodec : public Object
{
protected:
u32 channels;
u32 samplerate;
s64 samples;
u32 bitrate;
s64 position;
AudioCodec(u32 channels = 0, u32 ... |
#include "mylinkedlist.h"
#include "mynode.h"
/*!
* \brief MyLinkedList::MyLinkedList Linked List to manage students.
*/
MyLinkedList::MyLinkedList()
{
root = NULL;
size = {0};
}
/*!
* @brief MyLinkedList::insertNode inserts an object of MyNode
* @param actualNode the actual Node
* @param newNode ... |
#ifndef GAME_H
#define GAME_H
#include <QGraphicsScene>
#include "bio.h"
#include "cell.h"
#include "enemy.h"
#include "virus.h"
#include "feed.h"
class Bio;
class Cell;
class Enemy;
class Virus;
class Feed;
class Game : public QObject
{
Q_OBJECT
private:
Bio * player;
QList<Bio *> bios;
QGraphicsSc... |
#include "BattleButton.h"
#include "../../Base/Source/Main/Engine/System/SceneSystem.h"
#include "../../Base/Source/Main/Engine/System/RenderSystem.h"
#include "../../Mains/Application.h"
#include "../../Game/Systems/BattleSystem.h"
BattleButton::BattleButton()
{
}
BattleButton::~BattleButton()
{
}
void BattleButto... |
#include <iostream>
#include "Numero.h"
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop n max*/
int main(int argc, char** argv) {
Numero A,B(4);
B.muestraTusDatos();
A.pideleAlUsuarioTusDatos();
A.muestraTusDatos();
return 0;
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#include "core/pch.h"
#ifdef DAPI_VCARD_SUPPORT
#include "mod... |
#include "matrix_vector.hpp"
vector matrix_vector_multiply(
matrix& m,
vector& v)
{
vector result;
result[0] = 0.0f;
result[1] = 0.0f;
result[2] = 0.0f;
result[3] = 0.0f;
for (int i = 0; i < 3; ++i) {
result[0] += m[i][0] = v[0];
result[1] += m[i][1] + v[1];
res... |
#define RGB(r,g,b) SColor(255,r,g,b)
#define GREY(x) SColor(255,x,x,x)
#define C_NONE SColor(0,0,0,0)
|
// http://oj.leetcode.com/problems/clone-graph/
/**
* Definition for undirected graph.
* struct UndirectedGraphNode {
* int label;
* vector<UndirectedGraphNode *> neighbors;
* UndirectedGraphNode(int x) : label(x) {};
* };
*/
class Solution {
unordered_map<int, UndirectedGraphNode *> visited;
... |
#pragma once
#include <iosfwd>
#include <string>
namespace BeeeOn {
class Printable {
public:
virtual void print(const std::string &text, bool newline = true) = 0;
};
/**
* Printable wrapper around std::ostream.
*/
class IOSPrintable : public Printable {
public:
IOSPrintable(std::ostream &out);
void print(con... |
#include "stdafx.h"
#include "PrimMatrixAlgorithm.h"
#include <climits>
#include <iostream>
/*
Solution - > zbior wierzcholkow ktore nie znajduja sie w Kolejce
Sasiedzi -> zbior wierzcholkow w kolejce ktorzy maja ustawiona wartosc ceny/wagi na inna niz +oo
Wierzcholki pozostale -> wierzcholki w kolejce ktore maja usta... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2006 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* psmaas - Patricia Aas Oct 2005
*/
#ifndef HISTORY_MODEL_H
#defi... |
#include <fstream>
#include "mp_32_opt.h"
int main() {
ofstream in_pix("input_pixels_regression_result_mp_32_opt.txt");
ofstream fout("regression_result_mp_32_opt.txt");
HWStream<hw_uint<1024> > in_update_0_read;
HWStream<hw_uint<512> > mp_32_update_0_write;
// Loading input data
// cmap : { in_update... |
// consoleGl.cpp : définit le point d'entrée de l'application.
//
#include "consoleGl.h"
using namespace std;
int main()
{
int* screen[][3] = { {0}, {0}, {0} };
for (int i = 0; i <= 2; i++)
{
for (int y = 0; y < 2; y++)
{
cout << screen[i][y];
}
cout << "\n";
}
return 0;
}
|
#pragma once
/*
GridRepresentation is responsible for knowing how to convert from pixel coordenates
to a map representation(grid) index.
// TODO
As it is, there is only enough grid to represent what the window is rendering,
anything outside of the rendered window is going to abort the program
*/
class GridRepre... |
/* TRABALHO FINAL GCC117 - ARQUITETURA DE COMPUTADORES 1
PROFESSOR: Andre Vital Saude
GRUPO: Fábio Junio Rolin de Oliveira
Kaio Vinícius de Morais Silva
Otávio de Lima Soares
Sérgio Henrique Menta Garcia
FONTE: https://github.com/SergioHenrique19/academics_codes/tree/master... |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/bind.h"
#include "base/macros.h"
#include "examples/bitmap_uploader/bitmap_uploader.h"
#include "examples/wm_flow/app/embedder.mojom.h"
#in... |
#include "Wind.h"
#include "Temperature.h"
#include <string>
#include <iostream>
#include <stdlib.h>
#include "internClass.h"
class weatherMeasurement {
temperature temperature;
wind wind;
public:
void getWeatherMeasurement();
void printWeatherMeasurement();
// void copyWeatherMeasuremen... |
/*
* Copyright (C) 2013 Tom Wong. All rights reserved.
*/
#ifndef __GT_SVC_UTIL_H__
#define __GT_SVC_UTIL_H__
#include "gtcommon.h"
#include <QtCore/qendian.h>
#include <QtNetwork/QAbstractSocket>
#include <google/protobuf/message.h>
GT_BEGIN_NAMESPACE
class GT_SVCE_EXPORT GtSvcUtil
{
public:
static bool syncW... |
#include "CommunicationUtils.h"
// Escribe chars de buff hasta escribir size o fallar
// Retoran el numero de bytes escritos
unsigned int writeBytes(int sock_fd, const char *buff, unsigned int size){
unsigned int total = 0;
unsigned int res = 0;
while( total < size ){
res = write(sock_fd, buff + total, size - tot... |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e2;
bool visit[maxn];
void E_sieve(){
for(int i=2;i*i<maxn;i++){//跟试除法一样所以i*i即可
if(!visit[i]){
for(int j=i*i;j<maxn;j+=i)visit[j]=true;//前面的部分已优化,所以j=i*i开始
}
}
}
int main(){
E_sieve();
for(int i=2;i<maxn;i++)if(!visit[i])cout<<i<<" ";
}
|
#include <iostream>
#include <vector>
using namespace std;
int binary_search(const vector<string>& vec, string val, int start, int end) {
if (start <= end) {
int mid = start + ((end - start) / 2);
if (val == vec.at(mid)) {
return mid;
} else if (vec.at(mid) == "") {
... |
#include "Starter.h"
int main(int argc, char **argv) {
std::unique_ptr<Starter> starter = std::make_unique<Starter>(argc, argv);
return 0;
} |
std::vector<std::string> txtToVector(std::string filename); |
#include "QuestionManager.h"
//------------------------------------------------
//コンストラクタ・デストラクタ
QuestionManager::QuestionManager( ) {
LoadQuestion( );
}
QuestionManager::~QuestionManager( ) {
}
//------------------------------------------------
//------------------------------------------------
//--------------... |
#pragma once
#pragma unmanaged
#include <BWAPI\UnitType.h>
#include <BWAPI\WeaponType.h>
#pragma managed
#include "IIdentifiedObject.h"
#include "Enum\WeaponType.h"
#include "Enum\DamageType.h"
#include "Enum\ExplosionType.h"
#include "Enum\Targets.h"
using namespace System;
using namespace System::Collections::Ge... |
#pragma once
#include "bricks/core/autopointer.h"
#include "bricks/io/stream.h"
namespace Bricks { namespace IO {
class Substream : public Stream
{
private:
AutoPointer<Stream> stream;
u64 offset;
u64 position;
u64 length;
public:
Substream(Stream* stream, u64 offset);
Substream(Stream* stream, u64 o... |
#include <iostream>
#include <queue>
using namespace std;
struct Point {
int i;
int j;
bool hasGram;
};
int n, m, t;
int matrix[101][101];
bool visited[101][101] = {
false,
};
bool visited_hasGram[101][101] = {
false,
};
int dir_i[4] = {0, 1, 0, -1};
int dir_j[4] = {1, 0, -1, 0};
int ans = 0;
int main... |
/*
* File: Cilindro.cpp
* Author: raul
*
* Created on 21 de enero de 2014, 11:19
*/
#include "Cilindro.h"
Cilindro::Cilindro() {
}
Cilindro::Cilindro(GLdouble baseRadius, GLdouble topRadius, GLdouble height, GLint slices, GLint stacks) : ObjetoCuadrico() {
_baseRadius = baseRadius;
_topRadius = topR... |
/******<CODE NEVER DIE>******/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FastIO ios_base::sync_with_stdio(0)
#define IN cin.tie(0)
#define OUT cout.tie(0)
#define CIG cin.ignore()
#define pb push_back
#define pa pair<int,int>
#define f first
#define s second
#define FOR(i,n,m) for(int i... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2004-2008 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 _BASIC_SSL_LISTENER_H
#define _B... |
/*
* WalkerState.h
*
* Created on: Aug 20, 2015
* Author: ushnish
*
Copyright (c) 2015 Ushnish Ray
All rights reserved.
*/
#ifndef WALKERSTATE_H_
#define WALKERSTATE_H_
namespace core{
template <class T>
class WalkerState
{
public:
int DIM;
int particleCount;
PtclMap<T>* Rcurr;
vect<T> dQ;
long ... |
#include "kernel.h"
float* dt_host;
DtKernelArgs* dtArgs;
RKKernelArgs* RKArgs[3];
FluxKernelArgs* fluxArgs[3];
collBCKernelArgs* BCArgs[3];
|
#include <iostream>
#include <fstream>
#include <opencv2/core/utility.hpp>
#include "opencv2/video.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include "cmath"
using namespace cv;
using namespace std;
void imgProcess(Mat img, Mat &rectImg, vector<RotatedRect> &arrayRect) {
namedWindow("... |
#include "SystemMenu.h"
SystemMenu::SystemMenu() {
//从文件中读取数据
SM.readDatas();
}
SystemMenu::~SystemMenu() {
}
//主界面菜单
void SystemMenu::mainUI() {
cout << "-----------------------------------" << endl;
cout << "欢迎登陆,企业员工信息管理系统!" << endl;
cout << "【1】添加信息" << endl;
cout << "【2】修改信息" << endl;
... |
#ifndef RECIEVER_H
#define RECIEVER_H
class Reciever {
public:
Reciever();
~Reciever();
void Action();
};
#endif // !RECIEVER_H
|
#ifndef _PARTICLESYSTEM_H_
#define _PARTICLESYSTEM_H_ 1
#include "Point.h"
#include "Vector.h"
#include "Snow.h"
class ParticleSystem {
public:
// CONSTRUCTORS / DESTRUCTORS
ParticleSystem();
ParticleSystem(int num);
// MISCELLANEOUS
vector< Snow* > Snows; // a collection of the Snow... |
/**********************************************************************
*Project : EngineTask
*
*Author : Jorge Cásedas
*
*Starting date : 24/06/2020
*
*Ending date : 03/07/2020
*
*Purpose : Creating a 3D engine that can be used later on for developing a playable demo, with the engine as static library
*
***... |
// Created on: 1998-08-26
// Created by: Julia GERASIMOVA
// Copyright (c) 1998-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 "network/heading_message.h"
#include "core/i_move_component.h"
#include <portable_iarchive.hpp>
#include <portable_oarchive.hpp>
namespace network {
HeadingMessageSenderSystem::HeadingMessageSenderSystem()
: MessageSenderSystem()
{
}
void HeadingMessageSenderSystem::Init()
{
MessageSenderSystem::Ini... |
/******************************************************
Main render functions/ Main loop
*****************************************************/
#pragma once
namespace Qwerty
{
class RenderModule
{
public:
RenderModule();
~RenderModule();
bool Init3D(HINSTANCE hInstance, void(mainLoopFunc()));
void... |
class ApplicationGTK
{
public:
int execute();
}; |
#include "BaseService.h"
#include "Requester/Requester.h"
#include "Configurator/Configurator.h"
BaseService::BaseService(QObject *parent/*= nullptr*/)
: QObject(parent) {}
Requester *BaseService::makeRequester() const {
Requester *requester = new Requester(Configurator::getHostName(),
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2008 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#ifndef EXTERNALSSL_H_
#define EXTERNA... |
// call by value
// This example --> call by reference
#include <stdio.h>
void swap(int *x, int *y){
int tmp;
tmp = *x;
*x = *y;
*y = tmp;
}
int main(){
int a, b;
scanf("%d %d", &a, &b);
swap(&a, &b);
printf("%d %d\n", a , b);
}
|
#include "FFmpegInit.h"
#define __STDC_CONSTANT_MACROS
extern "C"
{
#include "libavdevice/avdevice.h"
#include "libavformat/avformat.h"
};
void InitFFmepg()
{
// Initialize libavformat and register all the muxers, demuxers and protocols.
av_register_all();
avformat_network_init();
// Register devices
avdevic... |
/* -*- 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 MODULES_HARDCORE_OPERA_MODULE_H
#define MODULES_HARDCORE... |
#include "decryptor.h"
decryptor::decryptor(std::string const& alphabet) : alphabet(alphabet) {}
std::vector<size_t> decryptor::kasiski_exam(const std::string& encrypted) {
auto distances = get_distances(get_positions(encrypted));
std::vector<std::pair<size_t, size_t>> delim_count(23);
for (size_t del = 3... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: carlos
* GitHub repository: https://github.com/carlosguevara1854/Graph_BP
* Created on 18 de juli... |
/**
* @author shaoDong
* @email scut_sd@163.com
* @create date 2018-08-31 08:30:01
* @modify date 2018-08-31 08:30:01
* @desc 给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。
* 找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。
*/
#include <iostream>
#include <vector>
using names... |
#ifndef XBEE_H
#define XBEE_H
#include <QObject>
/// Use Qt5 Serial Port
#include <QtSerialPort/QtSerialPort>
class XBee : public QObject
{
Q_OBJECT
public:
// Construct with Filename
explicit XBee(QObject *parent = 0,QString uartFileName = "/dev/ttyUSB0", QString pan = "2001", QString destinationHigh ... |
#include "../include/Button.h"
Button::Button()
{
//ctor
}
void Button::setPosition(sf::Vector2i buttonPosition, sf::Vector2i buttonDimension)
{
m_buttonPosition = buttonPosition;
m_buttonDimension = buttonDimension;
m_buttonSprite.setPosition(buttonPosition.x, buttonPosition.y);
m_bu... |
#pragma once
class MemoryManagerSwitcher;
class IMemoryManager {
public:
virtual void Delete(void*) = 0;
virtual void* Alloc(size_t size) = 0;
IMemoryManager* prev;
}; |
// 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... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MemoryMatrixProva.h"
#include "MemoryMatrixProvaGameModeBase.h"
#include "MatrixPlayerController.h"
AMemoryMatrixProvaGameModeBase::AMemoryMatrixProvaGameModeBase() {
PlayerControllerClass = AMatrixPlayerController::StaticCla... |
/*
Suppose you have a string, S, made up of only 'a's and 'b's. Write a recursive function that checks if the string was generated using the following rules:
a. The string begins with an 'a'
b. Each 'a' is followed by nothing or an 'a' or "bb"
c. Each "bb" is followed by nothing or an 'a'
If all the rules are followed ... |
String sendFinalResults(int num_correct, int num_questions) {
int num_wrong = num_questions - num_correct;
int perc_corr = (int)(num_correct * 100) / num_questions;
int perc_wrong = (int)(num_wrong * 100) / num_questions;
String ptr = "";
ptr += "<!DOCTYPE html>";
ptr += "<html>";
ptr += " <head>";
... |
/* -*- 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.
*/
#include "core/pch.h"
#include "modules/widgets/OpSlider.h"
#in... |
#include "LatencyAnalyzer.h"
#include <math.h>
void LatencyAnalyzer::audioDeviceIOCallback(const float **inputChannelData, int numInputChannels, float **outputChannelData, int numOutputChannels,
int numSamples)
{
inRms = 0.f;
for (int i=0; i<numSamples; i++)
inRms += powf(inputChann... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "MenuSystem/MenuWidget.h"
#include "COOP_PauseMenu.generated.h"
UCLASS()
class COOPGAME_API UCOOP_PauseMenu : public UMenuWidget
{
GENERATED_BODY()
protected:
virtual bool Initialize() ove... |
#include "stdafx.h"
#include <iostream>
#include "KruskalMatrixAlgorithm.h"
KruskalMatrixAlgorithm::KruskalMatrixAlgorithm(Graph2 & graph):graph(graph), edgesPriorityQueue()
{
numberOfVertices = graph.getNumberOfVertices();
numberOfEdges = 0;
groups = new int[numberOfVertices];
solutions = new solutionMember[num... |
template<size_t N>
struct Raw {
int adc[N];
int id;
};
struct CondRaw {
int fc2adc;
};
template<size_t N>
struct RawWithTime {
int adc[N];
int tdc[N];
int id;
};
template<size_t N>
struct Digi {
float fc[N];
int id;
};
template<size_t N>
struct DigiWithTime {
float fc[N];
int ... |
#include <Tanker/Groups/Verif/UserGroupAddition.hpp>
#include <Tanker/Crypto/Crypto.hpp>
#include <Tanker/Device.hpp>
#include <Tanker/Groups/Group.hpp>
#include <Tanker/Trustchain/Actions/UserGroupAddition.hpp>
#include <Tanker/Verif/Errors/Errc.hpp>
#include <Tanker/Verif/Helpers.hpp>
#include <cassert>
using name... |
/*
* File: main.cpp
* Author: Elijah De Vera
* Created on January 14, 2021
* Purpose: Calculating trig functions
*/
//System Libraries
#include <iostream> //Input/Output Library
#include <iomanip> // precision
#include <math.h> // trig functions
using namespace std;
//User Libraries
//Global C... |
#include "../../SylvesterMatrix.h"
#include "../../Polynomial.h"
#include "../../BivariatePolynomial.h"
#include "../../ProblemSolver.h"
#include "../../Matrix.h"
#include <gtest/gtest.h>
using namespace Eigen;
using namespace std;
class ProblemSolverTests : public ::testing::Test {
protected:
SylvesterMatrix * SM... |
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<bits/stdc++.h>
#include<queue>
#include<stack>
#define FOR0(i,n) for(i=0;i<n;i++)
#define FOR(i,j,n) for(i=j;i<n;i++)
#define FORD(i,j,k) for(i=j;i>=k;i--)
#define pb push_back
in... |
#ifndef SHOETCPSERVER_H
#define SHOETCPSERVER_H
#include "ShoeManagerTcpSocket.hpp"
#include "shoemanagernetwork_global.h"
class ShoeManagerTcpServerPrivate;
class SHOEMANAGERNETWORKSHARED_EXPORT ShoeManagerTcpServer:public QObject
{
Q_OBJECT
public:
ShoeManagerTcpServer(QObject* parent=NULL);
... |
#include <iostream>
#include <string>
int main() {
std::string str;
std::cout << "nermuceq text\n";
getline(std::cin, str);
char* begin;
char* eNd;
int size = str.size();
for (int i = 0; i < size / 2; ++i) {
begin = & str.at(0);
eNd = & str.at(size - 1);
char res;
... |
#include<stdio.h>
int a,b,c,s;
main()
{
scanf("%d %d %d",&a,&b,&c);
if(a==5) { s=s++; }
if(b==5) { s=s++; }
if(c==5) { s=s++; }
printf("%d",s);
}
|
#include "SendMessageCmd.h"
#include <utility>
SendMessageCmd::SendMessageCmd(int numRequest, const std::optional<std::string>& error,
const std::string& body)
: BaseCmd(numRequest, error, body) {}
void SendMessageCmd::execute(std::shared_ptr<CallbacksHolder> holder) {
std... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4; c-file-style:"stroustrup" -*-
*
* 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.
*
* Espen Sand
*/
#include "core/pch.h"
#include "FavIconM... |
#include "AppleBreakState.h"
AppleBreakState::AppleBreakState(D3DXVECTOR3 pos)
{
this->pos = pos;
}
void AppleBreakState::Update(float dt)
{
}
AppleBreakState::~AppleBreakState()
{
}
AppleState::StateName AppleBreakState::GetNameState()
{
return AppleState::Breaking;
} |
// CDTry1View.h : CCDTry1View 类的接口
//
#pragma once
#include "string"
class CCDTry1View : public CView
{
protected: // 仅从序列化创建
CCDTry1View();
DECLARE_DYNCREATE(CCDTry1View)
// 特性
public:
CCDTry1Doc* GetDocument() const;
// 操作
public:
void MyPaintPicture();
// 重写
public:
virtual void OnDraw(CDC* pDC); // 重写以... |
#include "slimproto.h"
//#define ADAFRUIT_VS1053
// Default volume
#define VOLUME 80
responseBase::responseBase(WiFiClient * pClient) {
vcClient = pClient;
}
responseBase::~responseBase() {
}
reponseHelo::reponseHelo(WiFiClient * pClient) : responseBase(pClient) {
}
void reponseHelo::sendR... |
#include "threadclass.h"
ThreadClass::ThreadClass(int id)
{
this->id = id;
}
void ThreadClass::runm()
{
qDebug() << "currentThread" << QThread::currentThread();
for(int i=0 ; i<5 ; i++)
{
qDebug() <<this->thread() << "classid :"<< id <<"number of counter" <<i;
}
}
|
// Created on: 1995-09-13
// Created by: Marie Jose MARTZ
// 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 <iostream>
#include <cstdlib>
#include <string>
#include <stdlib.h>
#include "restaurant_system.h"
using namespace std;
void LoginMenu();
void InitMenu();
int main()
{
RestaurantSystem restaurantSystem;
do
{
string input;
LoginMenu();
cout << "Choose your user type: ";
... |
/* -*- 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.
*/
#ifndef WINDOWCOMMANDER_TABSAPINOTIFICATIONHELPER_H
#define WINDO... |
#include <string>
#include <iostream>
#include <vector>
using namespace std;//using namespace std;
class node;
typedef node * item;
class node {
public:
int priority;
item left, right;
int c; //размер дерева (правое + левое + корень)
int data;
item leftest;//the leftes child in a tree
item rightest;//the righ... |
#include<iostream>
using namespace std;
bool isPrime(int n){
int m=n/2;
for(int i=2;i<m;i++){
if(n%i==0){
//out<<"Given No. is not a Emirp Number"<<endl;
return false;
}
}
return true;
}
bool chkEmirp(int n){
if(isPrime(n)==false){
return false;
}
int rev=0;
while(n!=0){
int d = n%10... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PlayerState.h"
#include "CSPlayerState.generated.h"
/**
*
*/
UCLASS()
class UE4COOP_API ACSPlayerState : public APlayerState
{
GENERATED_BODY()
protected:
/** Begin... |
//
// BoatB.cpp
// GAME2
//
// Created by ruby on 2017. 11. 11..
// Copyright © 2017년 ruby. All rights reserved.
//
#include "BoatB.hpp"
void BoatB::move() {
if (getX() > standardX && getY() > standardY) moveLeft();
else if (getX() < standardX && getY() > standardY) moveUp();
else if (getX() > standar... |
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <memory.h>
#include <cmath>
#include <string>
#include <cstring>
#include <queue>
#include <vector>
#include <set>
#include <deque>
#include <map>
#include <functional>
#include <numeric>
#include <ss... |
//----------------------------------------------------------------
// VehicleSpline.h
//
// Copyright 2002-2004 Raven Software
//----------------------------------------------------------------
#ifndef __GAME_VEHICLESPLINECOUPLING_H__
#define __GAME_VEHICLESPLINECOUPLING_H__
class rvVehicleSpline : public rvVehicle {... |
#include <iostream>
#include <string>
#include <xercesc/framework/MemBufInputSource.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/PlatformUt... |
class Solution {
public:
vector<string> summaryRanges(vector<int>& nums) {
vector<string> res;
if(nums.size() == 0) return res;
int left = 0;
int i=0;
for(; i<nums.size()-1; ++i){
if(nums[i]+1 != nums[i+1]){
string s = "";
if(i == l... |
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <boost/format.hpp>
#include <string.h>
#include "logging.hpp"
#include "pid_file.hpp"
namespace sp
{
bool pid_file::open(std::string pid_path)
{
fd_ = ::open(pid_path.c_str(), O_RDWR | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
if (fd_ == -1)... |
/******************************************************************************
* *
* Copyright 2019 Jan Henrik Weinstock *
* *
... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
// only gravity will pull me down
// Maximum value in a bitonic array
int t;
cin >> t;
long long n, ans;
while (t--) {
cin >> n;
vector<long long> a(n);
cin >> a[0];
int flg=0;
for(int i=1; i<... |
#include "llvm/Pass.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/raw_ostream.h"
#include <vector>
#include <set>
#include <queue>
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
using namespace llvm;
... |
#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... |
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <unistd.h>
#include <ctype.h>
#include "TVector3.h"
#include "TFile.h"
#include "TTree.h"
#include "TRandom3.h"
#include "TH1D.h"
#include "TVectorT.h"
#include "Nuclear_Info.h"
#include "Cross_Sections.h"
#include "helpers.h"
using n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.