text stringlengths 8 6.88M |
|---|
// Created on: 2007-05-14
// Created by: data exchange team
// Copyright (c) 2007-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... |
#pragma once
#include <vector>
#include <set>
#include <Core/Exception.h>
#include <Lattice2D.h>
/*
* Class that computes topological order of vertices in a lattice
* The lattice/graph must be a directed acyclic graph (DAG).
* else it throws an exception
*/
namespace PyMesh
{
namespace LatticeAlgorithms
{
namespa... |
#include <nan.h>
#include "webp/encode.h"
#include "webp/decode.h"
#include "./util.hpp"
void Util::formatWebPConfig(WebPConfig *config, v8::Local<v8::Object> obj)
{
if (!(obj->Get(Nan::New<v8::String>("lossless").ToLocalChecked())->IsUndefined()))
config->lossless = obj->Get(Nan::New<v8::String>("lossle... |
#include "mouselabel.h"
MouseLabel::MouseLabel(QWidget* parent):
QLabel(parent)
{
}
void MouseLabel::mousePressEvent(QMouseEvent *ev)
{
this->x = ev->x();
this->y = ev->y();
emit Mouse_Pressed();
}
void MouseLabel::mouseDoubleClickEvent(QMouseEvent *ev)
{
emit Mouse_DoubleClick(... |
#include "Configurator.h"
#include <QFile>
#include <QMap>
#include <QPair>
#include <QString>
#include <QTextStream>
// :: Constants ::
const QString CONFIG_FILE_NAME = "config.ini";
const QString HOST_NAME_KEY = "HOST_NAME";
const QString PORT_KEY = "PORT";
const QString DEFAULT_HOST_NAME = "localhost";
#ifdef... |
#ifndef _Configure_H
#define _Configure_H
#include <time.h>
#include <unistd.h>
#include <string>
#include "Typedef.h"
typedef struct _checkHost
{
char host[32];
short port;
}checkHost;
#define MAX_ALLOC_NUM 8
class Configure
{
public:
static Configure* getInstance() {
static Configure * configure = NULL;
... |
//
// Motor.h
// SAD
//
// Created by Marquez, Richard A on 4/9/15.
// Copyright (c) 2015 Richard Marquez. All rights reserved.
//
#pragma once
#include <Arduino.h>
class Motor {
private:
int enablePin;
int controlPin1;
int controlPin2;
public:
Motor(int enablePin = -1, int controlPin1 = -1, i... |
/*
* LSST Data Management System
* Copyright 2014-2015 AURA/LSST.
*
* This product includes software developed by the
* LSST Project (http://www.lsst.org/).
*
* 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... |
#include "StdAfx.h"
#include "HappyDay.h"
CHappyDay::CHappyDay(void)
{
}
CHappyDay::~CHappyDay(void)
{
}
int CHappyDay::Hello(void)
{
printf("happy day123\n");
return 0;
}
|
//
// Created by tudom on 2019-12-21.
//
#pragma once
#include <boost/preprocessor/stringize.hpp>
#define LIBNM_INCLUDE_HEADER(header) \
BOOST_PP_STRINGIZE(../include/libnm/header)
#define LIBNM_INCLUDE_HEADER_N(header) \
BOOST_PP_STRINGIZE(../../include/libnm/header)
|
#include <iostream>
#include <algorithm>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int N, K;
cin >> N >> K;
int a[N];
for (int i = 0; i < N; ++i) cin >> a[i];
string S;
cin >> S;
S.push_back('$');
vector<ll> damage... |
#define _ALLOW_MSC_VER_MISMATCH
#include "LimitedCounter.h"
#include "RoundupCounter.h"
using namespace std;
void UseCounter(Counter *counter, int increment) {
for (int i = 0; i < increment; i++) {
counter->operator++();
//++(*counter);
}
}
int main() {
LimitedCounter counterA(0, 5);
RoundupCounter counterB(0... |
#ifndef YL_BAAR_CONSUMERMGR
#define YL_BAAR_CONSUMERMGR
#include <ndn-cxx/face.hpp>
#include <thread>
#include <mutex>
#include <string>
#include <vector>
#include <map>
#include "consumer.h"
using namespace ndn;
class ConsumerMgr
{
public:
ConsumerMgr();
~ConsumerMgr();
private:
static ConsumerMgr* pConsumerMgr... |
#pragma once
#include "../../Toolbox/Toolbox.h"
#include "../Vector/Vector3.h"
namespace ae
{
/// \ingroup math
/// <summary>
/// 3D sphere represented by a center and a radius.
/// </summary>
class AERO_CORE_EXPORT Sphere
{
public:
/// <summary>Build a sphere with a center and a... |
#ifndef CLIENTAFFICH_H
#define CLIENTAFFICH_H
#include <QDialog>
namespace Ui {
class clientaffich;
}
class clientaffich : public QDialog
{
Q_OBJECT
public:
explicit clientaffich(QWidget *parent = 0);
~clientaffich();
private slots:
void on_personneview_activated(const QModelIndex &index);
... |
#pragma once
#include "GlobalHeader.h"
#include "Nutrient.h" // fa::NutrientType
#include <mylibs/container.hpp> // pl::HashMap
#include <utility> // std::pair
#include <initializer_list> // std::initializer_list
#include <iterator> // std::inserter
namespace fa {
//! a table of nutrients
class Nutri... |
#include<bits/stdc++.h>
using namespace std;
main()
{
char main[500], op[500], s1[500];
while(cin>>main)
{
int i, len, count=1, a, b;
len = strlen(main);
for(a=0; a<len; a++)
{
s1[a] = main[a];
}
s1[a] = '\0';
while(count>=1)
{
... |
/*
* 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 <quic/QuicConstants.h>
#include <quic/codec/ConnectionIdAlgo.h>
#include <quic/codec/QuicReadCodec.h>
#inc... |
#pragma once
#include <string>
#include <map>
#include <vector>
#include "Geometry.h"
class Camera;
enum class RectType {
anchor,
attack,
damage
};
struct ActionRect {
RectType rt;//アクションタイプ
Rect rc;//アクション矩形
};
///切り抜き情報
struct CutInfo {
Rect rc;//切り抜き矩形
Position2 center; //中心点
int duration;//表示時間
std::ve... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2011-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 MAC_OPENGL_CONTEXT_H__
#define MAC_OPENGL_CONTEXT_H__
c... |
/*****************************************************************************************************************
* File Name : NaivePatternMatching.h
* File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\tutorials\nptel\DSAndAlgo\lecture17\NaivePatternMatching.h
* Created on : Jan 15, 2014 :: ... |
#include "debouncer.h"
#define MAX_TEMP 30
#define MIN_TEMP 10
#define DEFAULT_TEMP 23
DebouncedEncoder::DebouncedEncoder(int clockPin, int dataPin) :
encoder(clockPin, dataPin),
reading(DEFAULT_TEMP),
oldPosition(0),
changed(false),
lastChangeTime(millis()) {
}
void DebouncedEncoder::update() {... |
#include "Maizefield.h"
#include "repast_hpc/Properties.h"
#include "repast_hpc/SharedContext.h"
#include "repast_hpc/SharedDiscreteSpace.h"
#include "repast_hpc/GridComponents.h"
#include "repast_hpc/Random.h"
#include <string>
#include <vector>
#include <boost/mpi.hpp>
#include <stdio.h>
MaizeField::MaizeField(rep... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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 "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
ofSetFrameRate(60);
ofSetWindowTitle("openFrameworks");
ofBackground(239);
ofSetLineWidth(2);
ofEnableDepthTest();
}
//--------------------------------------------------------------
void ofAp... |
/* -*- 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.
**
*/
#include "core/pch.h"
#include "mod... |
class Solution {
public:
void reverseWord(string &s, int i, int j){
while(i < j){
swap(s[i], s[j]);
++i;
--j;
}
}
void reverseWords(string &s) {
int n = s.size(), i = 0, j = 0;
//reverseWord(s, 0, n-1);
reverse(s.begin(), s.end());
... |
#pragma once
#include <list>
#include <Poco/Mutex.h>
#include <Poco/SharedPtr.h>
#include "loop/StoppableRunnable.h"
#include "loop/StoppableLoop.h"
#include "util/Loggable.h"
namespace BeeeOn {
class LoopRunner : public StoppableLoop, public Loggable {
public:
typedef Poco::SharedPtr<LoopRunner> Ptr;
LoopRunne... |
/**
\file Avoid.hpp
\author UnBeatables
\date LARC2018
\name Avoid
*/
#pragma once
/*
* Avoid inherited from BehaviorBase.
*/
#include <BehaviorBase.hpp>
/**
\brief This class is responsable for robot`s behavior of avoiding bumping in other robots.
*/
class Avoid : public BehaviorBase
{
priva... |
/*******************************************************************************
* filename: C_RobustFunctionalNetwork.hpp
* description: Derived class for robust functional networks
* author: Moritz Beber
* created: 2010-07-05
* copyright: Jacobs University Bremen. All rights reserved.
************... |
#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... |
//
// Player.cpp
// Polygons
//
// Created by Italo Ricardo Geske on 2021/05/16.
// Copyright © 2021 Italo Ricardo Geske. All rights reserved.
//
#include <stdio.h>
#include "Player.h"
Player::Player() {
name = "";
}
Player::Player (std::string name, bool isPlayer) {
this->name = name;
this->isPlaye... |
#include <time.h>
#include <iostream>
#include <map>
#include <vector>
#include <set>
#include <string>
#include <cstring>
#include <fstream>
#include <cstdio>
using namespace std;
const double P=3.0;//平均每个桶装的元素个数的上限 ,实测貌似1.0效果比较好
int E;//目前使用了哈希值的前 E 位来分组
int R;//实际装入本哈希表的元素总数
int N;//目前使用的桶的个数
/*
操作过程中,始终维护两个性质
1. ... |
/*
This file is part of the VRender library.
Copyright (C) 2005 Cyril Soler (Cyril.Soler@imag.fr)
Version 1.0.0, released on June 27, 2005.
http://artis.imag.fr/Members/Cyril.Soler/VRender
VRender is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as pub... |
/*Header file for cc_tic_tac_toe::game_node.*/
#ifndef __CC_TIC_TAC_TOE_GAME_NODE__
#define __CC_TIC_TAC_TOE_GAME_NODE__
#include "cc/tic_tac_toe/board.h"
#include <set>
namespace cc_tic_tac_toe {
class GameNode {
public:
GameNode();
~GameNode();
const Board& get_board() {
return board_;
}
void set_... |
#ifndef VECTOR2_HPP
#define VECTOR2_HPP
#include "Configuration.hpp"
#include "Math.hpp"
#include <iosfwd>
namespace mm
{
template <typename T = precision_t>
struct v2_t
{
T x;
T y;
T lengthSq() const;
T length() const;
T angle() const;
v2_t<T> normalize() const;
v2_t<T> rotate(T radi... |
// Copyright (c) 2019, tlblanc <tlblanc1490 at gmail dot com>
#ifndef VALUE_PARSER_H_
#define VALUE_PARSER_H_
#include <stddef.h>
#include <stdint.h>
#include <chrono>
#include <functional>
#include <string>
using ParseFunc = std::function<bool(const char *s,
size_t len,
... |
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/epoll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <iostream>
#include <thread>
#include <msg_exception.hpp>
#include <worker.hpp>
#include <epoll_event_listener.hpp>
namespace event {
void epoll_event_list... |
#include "RogueState.h"
RogueState::RogueState(const std::string& name, int health, int damage) : UnitState (name, health, health, damage) {}
RogueState::~RogueState() {}
|
#include <iostream>
#include <vector>
#include <sstream>
#include <cmath>
#include <algorithm>
using namespace std;
vector<size_t> it;
vector<vector<size_t>> ss;
size_t d, k, mod;
void dfs(size_t v, stringstream &res) {
while (it[v] < ss[v].size()) {
dfs(ss[v][it[v]++], res);
}
res << v % d;
}
i... |
/*
* RotatingService.cpp
*
* Created on: 30/11/2019
* Author: frank
*/
#include "RotatingService.h"
RotatingService::RotatingService(MotorDc *motor) {
this->motorA = motor;
}
void RotatingService::motorTurnOn(){
this->motorA->setPortA(1);
this->motorA->setPortB(0);
this->motorA->setDutyCicle(this->mo... |
#include<bits/stdc++.h>
using namespace std;
void kSortedArray(int input[],int n,int k){
priority_queue<int> pq;
for(int i=0;i<k;i++){ //Push first k elements into the priority queue.
pq.push(input[i]);
}
int j = 0; //Determines the element to this index.
for(int i=k;i<n;i++){
i... |
void GetNext(char* p,int next[])
{
int pLen = strlen(p);
next[0] = -1;
int k = -1;
int j = 0;
while (j < pLen - 1)
{
//p[k]表示前缀,p[j]表示后缀
if (k == -1 || p[j] == p[k])
{
++k;
++j;
next[j] = k;
}
else
{
... |
//===-- client/tcp-data-client.hh - TcpDataClient class ---------*- C++ -*-===//
//
// ODB Library
// Author: Steven Lariau
//
//===----------------------------------------------------------------------===//
///
/// \file
/// TcpDataClient class definition
///
//===------------------------------------------------------... |
//使用するヘッダーファイル
#include "GameL\DrawFont.h"
#include "GameL\WinInputs.h"
#include "GameL\SceneManager.h"
#include "GameL\DrawTexture.h"
#include "SceneMain.h"
#include "GameHead.h"
#include "ObjED.h"
//使用するネームスペース
using namespace GameL;
//イニシャライズ
void CObjED::Init()
{
m_y = 0.0;
m_key_flag = true;
}
//アクション
void C... |
/****************************************************************************
** Meta object code from reading C++ file 'CLoginDialog.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.3.2)
**
** WARNING! All changes made in this file will be lost!
********************************************************... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2008 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Adam Minchinton
*/
#ifndef RESOURCE_FOLDERS_H
#define ... |
#include "stdafx.h"
#include "MapTool.h"
MapTool::MapTool()
{
}
MapTool::~MapTool()
{
}
|
#include <RHReliableDatagram.h>
#include <SPI.h>
#include <RH_RF69.h>
#if defined(__AVR_ATmega32U4__) // Feather 32u4 w/Radio
#define RFM69_CS 8
#define RFM69_INT 7
#define RFM69_RST 4
#define LED 13
#define radio() rf69(RFM69_CS, RFM69_INT)
#else
#define RFM69_RST 0
#define LED 13
#define radio() rf69
#endif
#define... |
#include<iostream>
using namespace std;
int main() {
int i,j,n;
int opc;
cout<<"Elija una opcion: 1.Linea, 2-Rectangulo, 3-Triangulo"<<endl;
cin>>opc;
switch (opc) {
case 1:
cout<<"Ingrese la longitud de la linea: "<<endl;
cin >> n;
for(i=1; i<=n; i++){
cout << "*";
}
cout << "" << endl;
bre... |
#include "Token.h"
Token::Token(std::string type, std::string val) : type(std::move(type)), val(std::move(val)) {}
const std::string &Token::getType() const {
return type;
}
void Token::setType(const std::string &type) {
this->type = type;
}
const std::string &Token::getVal() const {
return val;
}
voi... |
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <fstream>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
struct Shape {
virtual std::string str() const = 0;
};
struct Circle : Shape {
float radius;
Circle() {}
Circle(float radius)
... |
// Copyright (c) 2016 Agustin Berge
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <pika/config.hpp>
#include <pika/iterator_support/traits/is_range.hpp>
#includ... |
#include "VnaSweepTest.h"
// RsaToolbox
#include "Test.h"
using namespace RsaToolbox;
// Qt
#include <QTest>
VnaSweepTest::VnaSweepTest(QObject *parent) :
VnaTestClass(parent)
{
}
VnaSweepTest::VnaSweepTest(RsaToolbox::ConnectionType type, const QString &address, QObject *parent) :
VnaTestClass(type, addr... |
//
// Created by Vladimir on 3/30/2020.
//
#ifndef COP_3530__ALGORITHMS__TREE_H
#define COP_3530__ALGORITHMS__TREE_H
// Class declarations go here, and is implemented in the .cpp file
class tree {
};
#endif //COP_3530__ALGORITHMS__TREE_H
|
#include <iostream>
#include <vector>
int main() {
std::vector<char> text;
std::vector<char> newText;
char buffer;
std::cout << "enter your text, for stop ener 0" << std::endl;
do {
std::cin >> buffer;
text.insert(text.end(), buffer);
} while ('0' != buffer);
unsigned int si... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software ASA 1999-2005
*
* Library for standalone builds of the HTML5 parser.
* NOTE! Some parts are specific to MS Windows.
*/
#include "core/pch.h"
#include "modules/util/uniprntf.h"
#include "modules/util/ad... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2007-2012 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 SCOPE_SUPPORT
#include "modules/sc... |
#include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
vector<vector<int>> res;
vector<vector<int>> permute(vector<int>& nums) {
//基本思想:典型的递归回溯法,递归回溯找寻所有可能结果保存到res
//对于每一个当前位置i,我们可以将其于之后的任意位置交换,然后继续处理位置i+1,直到处理到最后一位。
Recursion(nums, 0);
return res;
}
void Recursion(vector<int> num... |
#ifndef CURRENTDATE_H
#define CURRENTDATE_H
#include <QDialog>
namespace Ui {
class currentDate;
}
class currentDate : public QDialog
{
Q_OBJECT
public:
explicit currentDate(QWidget *parent = nullptr);
~currentDate();
bool if_closed();
QVariant date_fin();
private slots:
void onEdit_Pushed(... |
#include "pit.h"
#include <iostream>
using namespace std;
void Pit::percept(int player_index, int size, bool has_gold){
int side_length = sqrt(size);
if(player_index == 0 && (index == player_index + 1 || index == player_index + side_length || index == player_index + side_length + 1)){
cout << "\tYou f... |
#include "StdAfx.h"
#include "FEBattleField.h"
#include <algorithm>
using namespace std;
FEBattleField::FEBattleField(int numberOfPlayers, int height, int width, FEStatViewer* statViewer) : Dungeon(height, width)
{
activeUnit = nullptr;
cursorX = 0;
cursorY = 0;
moveCounter = 0;
flashCounter = 0;
currentTurn =... |
#include "test.h"
TEST_BOTH(01_creation_destruction) {
// Checks simple reference counting of a variable
Float value(1234);
(void) value;
}
TEST_BOTH(02_fill_and_print) {
/// Checks array initialization from a given pointer, jitc_memset(), and stringification
jitc_log(Info, " int8_t: %s", full<Ar... |
#ifndef _GUARD_BLOCK_SYSTEM_H
#define _GUARD_BLOCK_SYSTEM_H
#include <initializer_list>
#include <ostream>
#include <vector>
#include "perm.h"
#include "perm_group.h"
#include "perm_set.h"
namespace cgtl
{
class BlockSystem
{
friend std::ostream &operator<<(std::ostream &os, BlockSystem const &bs);
public:
str... |
// 两种操作 m = s; s = s +s
// s = s + m
// 从一个初始字符串'a'长到固定长度需要多少次运算
#include <iostream>
#include <queue>
#include <map>
using namespace std;
typedef pair<int,int> pii;
map<pair<int,int> , int > mp;
int main()
{
int n;
cin>>n;
queue<pii> q;
q.push(make_pair(1, 1));
mp[make_pair(1,1)]=0;
wh... |
#pragma once
#include "Cell.h"
class WaterCell : public Cell
{
public:
WaterCell() : Cell(char(178)) {}
virtual ~WaterCell() {}
WaterCell(size_t Row, size_t Column) : Cell(Row, Column, char(178)) {}
WaterCell(const WaterCell& other) : Cell(other) {}
virtual Cell* Clone() const { return new WaterCell(*this); }
}; |
#include "vwindow.h"
#include "ui_vwindow.h"
vWindow::vWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::vWindow)
{
ui->setupUi(this);
//connect signals/slots
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(closeDB()));
connect(ui->tableView, SIGNAL(pressed(QModelIndex)), this, SLOT(chooseTable(QM... |
/*
* main2.cpp
*
* Created on: Dec 1, 2019
* Author: lucas
*/
#include <list>
#include "mbed.h" // Librería mbed
#include "FreeRTOS.h" // Definiciones principales de FreeRTOS
#include "task.h" // Funciones para el control de las tareas
#include "semphr.h" // Semaforos y mutex
#include "defini... |
#ifndef BLOCKCHAIN_BLOCK_H
#define BLOCKCHAIN_BLOCK_H
#include <cstdint>
#include <iostream>
#include <ctime>
#include <sstream>
#include <vector>
#include <iterator>
#include "Transaction.h"
using namespace std;
class Block {
public:
string previousHash;
Block(vector<Transaction> transactions);
string ... |
#include "QFrameLessWidget_Alime.h"
#include <QLayout>
#include <QPushButton>
#include <QListWidget>
#include <QLabel>
#include <QProgressBar>
CLASSREGISTER(QFrameLessWidget_Alime)
QFrameLessWidget_Alime::QFrameLessWidget_Alime(QWidget *parent)
: Alime_ContentWidget(parent)
{
QHBoxLayout* contentLayout = new ... |
#include <bits/stdc++.h>
using namespace std;
#define f first
#define s second
#define pb push_back
#define rep(i, begin, end) \
for (__typeof(end) i = (begin) - ((begin) > (end)); \
i != (end) - ((begin) > (end)); i += 1 - 2 * ((beg... |
/* -*- Mode: c++; tab-width: 4; 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.
*
* @author Arjan van Leeuwen (arjanl)
*/
#ifndef MOCK_CUPS_FUNCTIONS_H
#define MOCK_CU... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
**
** Copyright (C) 1995-2007 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef VEGAIMAGE_H
#define VEGAIMAGE_... |
/* -*- 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.
*/
#include "core/pch.h"
#include "adjunct/desktop_util/file_chooser... |
// RotatedEllipseIntersectDlg.cpp : implementation file
//
#include "stdafx.h"
#include "RotatedEllipseIntersect.h"
#include "RotatedEllipseIntersectDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////... |
#include "eccezioni.h"
string eccezioni::to_string_error() const{
return error;
}
|
#include <cstddef>
#include <cstdio>
#include "macs.hpp"
#include "macs-internals.hpp"
using namespace macs;
using namespace macs::internals;
using namespace macs::types;
namespace macs
{
namespace internals
{
shader *basic_vertex_shader;
program *basic_pipeline;
}
}
shader::shader(typ... |
#include "stdafx.h"
#include "TypeInQuestion.h"
#include "TypeInQuestionView.h"
#include "TypeInQuestionState.h"
using namespace qp;
CTypeInQuestionView::CTypeInQuestionView(ITypeInQuestionStatePtr const& questionState, std::ostream & outputStream, std::istream & inputStream)
:CQuestionView(questionState, out... |
#pragma once
#include <string>
std::string say_hello();
std::string say_goodbye(); |
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
const int ena = 9;
const int in1 = 8;
const int in2 = 7;
const int enb = 3;
const int in3 = 5;
const int in... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2005 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 XPATH_SUPPORT
#include "modules/xpath/src/... |
/* -*- Mode: c++; tab-width: 4; 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/hardcore/mem/mem_man.h"
#include "modules/dis... |
#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 "CMessageEventMediator.h"
CMessageEventMediator::CMessageEventMediator(QObject *parent)
: QObject(parent)
{
}
CMessageEventMediator::~CMessageEventMediator()
{
}
|
#include "CancelEvent.h"
CancelEvent::CancelEvent(int et, int id):Event(et,id)
{
}
void CancelEvent::setTimestep(int t)
{
Timestep =t>0?t:0;
}
int CancelEvent::getTimestep() const
{
return Timestep;
}
void CancelEvent::setID(int d)
{
OrderID =( d > 0 && d < 1000) ? d : 0;
}
int CancelEvent::GetID() const
{
re... |
#pragma once
#include<string>
#include"communication.h"
#include"../../json/include/json.h"
class dataImpl
{
public:
dataImpl(){}
std::string querySwitch();
bool parseSwitch(const std::string& message);
bool putPowerInfo(int power);
std::string getPowerInfo(int power);
private:
std::string toStr(int num);
priva... |
#include "error_form.h"
using namespace mmcomplex;
void error_form::show_error(error_code code)
{
edit_message->Text = L"Код ошибки: " + code + L"\r\n";
switch (code)
{
case LISTINIMISSING:
edit_message->Text += "Файл list.ini не найден!";
break;
}
}
void error_form::button_ok_Click(System::Object^ sender,... |
#pragma once
#include <maya/MPxCommand.h>
namespace NeoBards
{
class ThirdClass : public MPxCommand
{
public:
ThirdClass();
~ThirdClass();
MStatus doIt(const MArgList& args);
static void* creator();
private:
};
ThirdClass::ThirdClass()
{
}
ThirdClass::~ThirdClass()
{
}
}
|
#pragma once
#include <Windows.h>
#include <string>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include "CHSOggVorbisReader.hpp"
template<typename T=char> struct THSOggVorbisCommentDataTemplate {
std::basic_string<T> Name;
std::basic_string<T> BaseName;
std::basic_string<T> Value... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
using namespace std;
const int maxn = 100 + 6;
int a[maxn];
int b, e;
int k;
int main() {
int m;
cin >> m;
while(m--) {
int cnt = 0;
cin >> b >> e;
for(int i = b; i <= e; i++) {
int num, c;
while(!num) {
c =... |
#include "Npc.h"
#include "Map.h"
#include "Globals.h"
#include <algorithm>
#include "NPCManager.h"
#include "ObjectManager.h"
Npc::Npc(unsigned int a_id, unsigned int a_tileId, const std::string& a_path, unsigned int zone)
: m_currentState{NONE}, m_nextState{EXPLORING}, m_id{a_id}, m_goal{}, m_hasGoal{false},... |
// Created on: 2004-05-11
// Created by: Sergey ZARITCHNY <szy@opencascade.com>
// Copyright (c) 2004-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 Publ... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*- */
#ifndef ES_TYPEDARRAY_BUILTINS_H
#define ES_TYPEDARRAY_BUILTINS_H
#include "modules/ecmascript/carakan/src/object/es_typedarray.h"
class ES_ArrayBufferBuiltins
{
public:
static BOOL ES_CALLING_CONVENTION c... |
class Solution {
public:
int jumpFloor(int number) {
if(number < 2){
return number;
}
int n1 = 1;
int n2 = 2;
for(int i=3; i<=number; ++i){
int temp = n1+n2;
n1 = n2;
n2 = temp;
}
return n2;
}
};
|
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
#include <iostream>
// Add to class vector:
// Create objects of type double
// Copy objects with assignment and initialization
// Any quanity of elements
// Safe memory used and clean
// Use [] to access to element
class vector
{
int sz; // Number of elements
double* elem; // Pointer to first element
public:
e... |
#include "prac4.h"
#include "ui_prac4.h"
#include"speech.h"
prac4::prac4(QWidget *parent) :
QDialog(parent),
ui(new Ui::prac4)
{
ui->setupUi(this);
}
prac4::~prac4()
{
delete ui;
}
void prac4::on_pushButton_clicked()
{
hide();
speech s;
s.setModal(true);
s.e... |
#ifndef PLANILLA_H
#define PLANILLA_H
using namespace std;
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
class Planilla {
string resultado;
string datosSalida;
string lineaPersonas;
string lineaNomina;
string lineaHorasTrabajadas;
int idEmpleadoPersonas;
s... |
/**
* created: 2013-4-6 23:47
* filename: FKEncDec
* author: FreeKnight
* Copyright (C):
* purpose:
*/
//------------------------------------------------------------------------
#pragma once
//------------------------------------------------------------------------
#include <stdlib.h>
#include "FKMd5Ex.h"
#i... |
#include "stackdbl.h"
StackDbl::StackDbl()
{
}
StackDbl::~StackDbl()
{
}
bool StackDbl::empty() const
{
return list_.empty();
}
void StackDbl::push(const double& val)
{
list_.insert(0, val);
}
double const & StackDbl::top() const
{
return list_.get(0);
}
void StackDbl::pop()
{
if( ! list_.empty() ){... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.