text stringlengths 8 6.88M |
|---|
/*1074*/
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <list>
#include <queue>
#include <set>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef vector<string> VString;
typedef ve... |
#include <LedControl.h>
#define VrX A0
#define VrY A1
#define SW 2
#define BUZZER 7
/*
pin CLK = 10;
pin CS = 9;
pin DIN = 8;
*/
LedControl lc = LedControl(10, 8, 9, 1);
int YemX, YemY;
int Sutun[64], Satir[64];
int posX = 0, posY = 0, a = 0;
int xPozisyon = 0, yPozisyon = 0;
int BaslangicX = 4, BaslangicY = 4;
c... |
//Armed Boats
class Category_48 {
class RHIB_DZE {type = "trade_any_boat";buy[] = {4000,"worth"};sell[] = {2000,"worth"};};
class RHIB_DZ {type = "trade_any_boat";buy[] = {-1,"worth"};sell[] = {2000,"worth"};};
class RHIB2Turret_DZE {type = "trade_any_boat";buy[] = {8000,"worth"};sell[] = {4000,"worth"};};
class ... |
#include "aeMath.h"
namespace aeEngineSDK
{
/*************************************************************************************************/
/* Constructors */
/***********************************************************************************... |
// Project 5
int redPin = 4;
int yellowPin = 3;
int greenPin = 2;
int buttonPin = 5;
int state = 0;
void setup()
{
pinMode(redPin, OUTPUT);
pinMode(yellowPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop()
{
if (dig... |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include "mpi.h"
const int CIRCLE1 = 2;
const int CIRCLE2 = 3;
const int SIZE = 16;
const int EXIT_SIZE = 4;
struct ComplexMatrix
{
int real[16][16];
int imaginary[16][16];
int size;
};
void printMatrix(ComplexMatrix cm) {
for (int i = 0; i < cm.size; i++)
{
... |
/*
* NodeController.cpp
*
* Created on: Jan 27, 2016
* Author: emad6932
*/
#include "NodeController.h"
using namespace std;
NodeController::NodeController()
{
// this->myNode.setValue(5);
// this->stringArrayNode.setValue("words are fun");
notHipsterInts = new CTECArray<int>(5);
numbers = new CtecList<i... |
#include <iostream>
using namespace std;
struct CTPYKTYPA {
int data;
CTPYKTYPA* next;
};
/*void joker(CTPYKTYPA* head, int v)
{
CTPYKTYPA *Current = head;
auto *Item = new (CTPYKTYPA);
Item->data = v;
Item->next = nullptr;
if (head->data % 2 == 0) {
Item->next = head;
he... |
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
#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>
#inc... |
/*
* 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... |
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QStandardPaths>
#include "appcore.h"
AppCore::AppCore(QObject *parent) : QObject(parent)
{
this->dataLocation = QStandardPaths::standardLocations(QStandardPaths::DataLocation)[0];
this->config = new AppConfig();
QDir dataDir(this->dataLocatio... |
#include <iostream>
#include "ShortBufferContainer.h"
int main(void){
short data[1024];
for(int i=0; i<1024; i++){
data[i] = i;
}
ShortBufferContainer ct(2);
ct.addBuffer(data, 122);
std::cout << ct.getCurrentBufferIndex() << ", " << ct.getCurrentBuffer()->getIndex() << std::endl;
ct.addBuffer(d... |
#pragma once
#include "basecombatcharacter.h"
class CBaseObject : public CBaseCombatCharacter
{
public:
NETVAR(m_iHealth, int, "CBaseObject", "m_iHealth");
NETVAR(m_iMaxHealth, int, "CBaseObject", "m_iMaxHealth");
NETVAR(m_bHasSapper, bool, "CBaseObject", "m_bHasSapper");
NETVAR(m_iObjectType, int, "CBaseObject", ... |
#include "CImg.h"
#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace cimg_library;
using namespace std;
/*
* CImgProcessor is the class for Exercise One
*/
class CImgProcessor{
public:
// Input the image path, load the target image
CImgProcessor(string path_){
img.load(path_.c_str... |
#include "tipo.h"
#include <sstream>
Tipo::Tipo()
{
tipID = 0;
nombre = "";
}
Tipo::Tipo(sql::ResultSet* rs)
{
this->fillObject(rs);
}
Tipo::~Tipo()
{
}
void Tipo::setNombre(string nombre)
{
this->nombre = nombre;
}
string Tipo::getNombre()
{
return this->nombre;
}
void Tipo::setTi... |
/* -*- coding: utf-8 -*-
!@time: 2019/11/21 20:59
!@author: superMC @email: 18758266469@163.com
!@fileName: 0000_main.cpp
*/
#include "findIf_func.cpp"
int main(int argc, char *argv[]) {
fun(argc, argv);
} |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2009 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
/** \file
*
* \brief Declare internal structures for mmap
*
* Thi... |
#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int count_difference(int a){
int hash[15] = {0};
int result = 0;
for(int i=0;i<4;++i){
if(a==0){
++hash[0];
}else{
int temp = a - a/10*10;
++hash[temp];
a /= 10;
... |
#include <iostream>
#include <random>
#include <vector>
#include <algorithm>
#include <chrono>
using namespace std::chrono;
using namespace std;
#ifndef _GLIBCXX_MAP_H
#define _GLIBCXX_MAP_H
enum blocks{ EXIT = 17, ENTRY, VENDING, DROP };
enum maps{ BUILDING = 0, HOSPITAL, LABYRINTH};
class Map{
double roomX, roomY;
... |
#include<cstdio>
#include<stdlib.h>
#include<malloc.h>
#include<queue>
#include<iostream>
#include<stack>
#include<conio.h>
using namespace std;
struct node
{
int a;
struct node *left;
struct node *right;
};
void insert(struct node **ptr,int data)
{
if((*ptr) == NU... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
#define INF 0x3f3f3f3f
#define eps 1e-8
#define pi acos(-1.0)
using namespace std;
typedef long long L... |
//Name: Dan Haub
//Student ID#: 2315346
//Chapman Email: haub@chapman.edu
//Course Number and Section: CPSC 350-01
//Assignment: 4 - Registrar Simulation
#ifndef GEN_DOUBLE_LIST_NODE_H
#define GEN_DOUBLE_LIST_NODE_H
template<class T>
class GenDoubleListNode{
public:
GenDoubleListNode();
... |
#include "animal.h"
#include "tiger.h"
#include "sea_lion.h"
#include "bear.h"
#include "zoo.h"
#include <iostream>
#include <cstdlib>
using namespace std;
Zoo::Zoo(){ //TODO// Finish this constructor
bank_balance = 100000;
tiger_count = 0;
sea_lion_count = 0;
bear_count = 0;
cout << "Welcome to ... |
/** Kabuki SDK
@file /.../Source/Kabuki_SDK-Impl/include/_App/WindowGroup.h
@author Cale McCollough
@copyright Copyright 2016 Cale McCollough ©
@license http://www.apache.org/licenses/LICENSE-2.0
*/
#pargma once
#include <vector>
#include
namespace _App
{
/** Class that stores a group... |
//
// Created by danl on 19.06.2020.
//
#include <iostream>
#include "Physics.h"
btRigidBody* Physics::createRigidBody(float mass, const btTransform& startTransform, btCollisionShape* shape)
{
bool isDynamic = (mass != 0.f);
btVector3 localInertia(0, 0, 0);
if (isDynamic)
shape->calculateLocalIne... |
/*
* @Description: voxel filter 模块实现
* @Author: Ren Qian
* @Date: 2020-02-09 19:53:20
*/
#include "lidar_localization/models/cloud_filter/voxel_filter.hpp"
#include "glog/logging.h"
namespace lidar_localization {
VoxelFilter::VoxelFilter(const YAML::Node& node) {
float leaf_size_x = node["leaf_size"][0].as<f... |
#pragma unmanaged
#include <stddef.h>
#pragma managed
#include "Position.h"
#include "TilePosition.h"
#include "WalkPosition.h"
namespace BroodWar
{
namespace Api
{
BWAPI::Position ConvertPosition(Position^ position)
{
if (position == nullptr)
return BWAPI::Positions::N... |
#include "Linked_List.h"
#ifndef SIMPLE_LIST_H
#define SIMPLE_LIST_H
template <typename T>
class Simple_List {
public:
//Constructor
Simple_List() {
head_ptr = nullptr;
}
//Copy constructor
Simple_List(const Simple_List& other) {
//copy the junk over
head_ptr = copy_list(other.head_ptr);
}
//Destru... |
//
// Created by payaln on 27.02.2019.
//
#include "StepAction.h"
StepAction::StepAction(TrackAction* tr) : track(tr) {}
void StepAction::UserSteppingAction(const G4Step *step) {
if (step->GetPostStepPoint()->GetPhysicalVolume() != nullptr) {
if (step->GetPostStepPoint()->GetPhysicalVolume()->GetName() ==... |
#include <iostream>
#include <string>
using namespace std;
int main()
{
int n,i,a,b,count;
cout<<"enter the limits";
cin>>a>>b;
for(i=a;i<b;i++)
{
count=0;
for(n=2;n<i;n++)
{
if(i%n==0)
count++;
}
if(count==0)
cout<<i<<endl;
}
return 0;
}
|
/*
Copyright (C) 2018, Accelize
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 writing, software
dist... |
#include <Dot++/lexer/TokenizerStatesPack.hpp>
#include <Dot++/Exceptions.hpp>
#include <Dot++/lexer/TokenizerState.hpp>
namespace dot_pp { namespace lexer {
const TokenizerStateInterface& TokenizerStatesPack::operator[](const TokenizerState state) const
{
// ordered by frequency of use
switc... |
/*
* IOBuffer.cpp
*
* Created on: 29 Mar 2011
* Author: two
*/
#include "IOBuffer.h"
#include <iostream>
using namespace std;
int ioBufferWriteFunc(void *opaque, uint8_t *buf, int buf_size)
{
/*
* Copy and write the buffer into the list!
*/
ioBufferContext* bufcon = (ioBufferContext*)opaque;
uint8... |
#ifndef UTILS_HPP_
#define UTILS_HPP_
std::unique_ptr<std::string> get_file_contents(const char *filename);
std::unique_ptr<std::string> get_gl_error_str(const char *function_name);
#endif // UTILS_HPP_
|
#include <iostream>
#include <queue>
using namespace std;
int w, h;
int matrix[51][51];
bool visited[51][51] = {
false,
};
queue<pair<int, int>> q;
int ans;
/* 시계방향 회전 */
const int dir_i[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
const int dir_j[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int main()
{
ios_base::sync_with_stdio... |
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2012-2013.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
#include <boost/algorithm/string/trim.hpp>
#include <fwTools/dateAndTime.... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2002 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... |
#include "mainview.h"
#include "ui_mainview.h"
MainView::MainView(QWidget *parent) :
QDialog(parent),
_ui(new Ui::MainView)
{
_ui->setupUi(this);
// Setup Hand Recongition Class
_detector = new HandDetector();
// Setup Mouse Controller Class
_mouse = new MouseController();
// Setup ch... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 100
#define INF 0x3f3f3f3f
#define DEVIATION 0.00000005
int main(int argc, char const *argv[])
{
int kase;
scanf("%d",&kase);
int D,I;
while( kase-- ){
scanf("%d %d",&D,&I);
int ans = 1... |
#pragma once
#include <string>
#include <vector>
class RedisAccess;
class MySqlAgent;
namespace MySqlLogic
{
struct CardRoomPlayerInfo
{
int uid; // 玩家id
int index; //uid索引
std::string name; // 玩家昵称
int score; // 玩家输赢金币数量,>0表示赢,<0表示输
};
/// </summary>
/// 添加房间历史记录,创建房间时调用! RedisLogic::addPa... |
#include <algorithm>
#include <cctype>
#include <iostream>
#include <pqxx/pqxx>
#include <string>
#include "util.h"
using namespace pqxx;
int
main(int argc, char* argv[])
{
if(argc != 2) {
std::cerr << "Usage: " << argv[0] << " SEARCH_TERM" << std::endl;
}
const std::string searchTerm {argv[1]};
std::string lo... |
//Normalize main function
int normalize_main(int argc, char *argv[])
{
//Display help
bool show_help = false;
//Has parameters
bool cover_input_has = false, cover_output_has = false, algorithm_has = false;
//String parameters
string cover_input_file, cover_output_file, algorithm;
//Cover num
int cove... |
#ifndef INC_3PC_RANDOM_H
#define INC_3PC_RANDOM_H
#include <random>
class Random {
private:
std::mt19937 eng;
public:
Random();
explicit Random(unsigned seed);
template<typename T>
T randomBetween(T begin, T end) {
static_assert(std::is_arithmetic<T>::value, "Arguments must me integer o... |
/*
#include <gecode/driver.hh>
#include <gecode/int.hh>
#include <gecode/search.hh>
#include <gecode/gist.hh>
*/
#include "gecode/gecode/driver.hh"
#include "gecode/gecode/int.hh"
#include "gecode/gecode/search.hh"
#include "gecode/gecode/gist.hh"
using namespace Gecode;
// steps to compile
// add to path: export LD... |
//Created by: Mark Marsala, Marshall Farris, and Johnathon Franco Sosa
//Date: 5/4/2021
//Reading and writing for an 8 bit stereo wav file
//Even numbers are left buffer, odd numbers are right buffer
#include <string>
#include <fstream>
#include <iostream>
#include "stereo8.h"
using namespace std;
Stereo8::Stereo8(s... |
#include <iostream>
#include <gromacs/trajectoryanalysis.h>
#include "assembly.h"
int main(int argc, char *argv[])
{
return gmx::TrajectoryAnalysisCommandLineRunner::runAsMain<assembly>(argc,argv);
} |
#include "mo_led.h"
#include <stdio.h>
using namespace std;
#define MODE_HEARTBEAT 1 //!< heartbeat operation
#define MODE_GPIO 2 //!< gpio operation
#define MODE_TIMER 3 //!< timer operation
#define MODE_NONE 4 //!< none operation
#define BLINKY_TIME 500 /*500ms*/
#define RUNNING_LED_NAME "led-run"
#defi... |
#pragma once
#include <vector>
class NameGenerator
{
public:
NameGenerator(void);
~NameGenerator(void);
std::vector<std::string> places;
std::vector<std::string> descriptors;
std::string name;
int numPlaces;
int numDescriptors;
std::string GenerateNewName();
void ReadPlaces(char* placeFile);
void ReadDe... |
// Created on: 1992-10-21
// Created by: Christian CAILLET
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the ... |
#include <iostream>
#include <math.h>
int main() {
int maxValueOfChar = pow(2, sizeof(char) * 8.0) - 1;
int minValueOfChar = (-1) * maxValueOfChar - 1;
std::cout << "Max value of char: " << maxValueOfChar << std::endl
<< "Min value of char: " << minValueOfChar << std::endl;
int maxValueO... |
#pragma once
#include <string>
#include <utility>
#include <vector>
// Result = (word, distance)
using result_t = std::pair<std::string, int>;
class IDictionaryBase
{
public:
// Reset the dictionary with this set of words
virtual void init(const std::vector<std::string>& word_list) = 0;
};
class IDictionary : p... |
// vec_eigen_pair.cpp
// Mike Lujan
// July 2010
#include "vec_eigen_pair.h"
#include "comm/comm_low.h"
#include "io_kentucky.h"
#include "io_eigensystem.h"
#include <string>
#include <stdio.h>
#define print0 if( get_node_rank() == 0) printf
namespace qcd
{
template<typename genvector>
void read_single_vector(FILE* ... |
#pragma once
template <typename T>
class SingletonBase {
protected:
static T* instance;
SingletonBase() {};
~SingletonBase() {};
public:
static T* GetSingleton();
void ReleaseSingleton();
};
template<typename T>
T* SingletonBase<T>::instance = NULL;
template<typename T>
T* SingletonBase<T>::GetSingleton() {
i... |
# include <iostream>
using namespace std;
int main () {
float a, b, c;
cout << "Please enter 3 number: ";
cin >> a;
cin >> b;
cin >> c;
if(a < b && a < c) {
cout << a << endl;
} else if (a < b && c < a) {
if (b < c) {
cout << b << endl;
} else {
... |
#include<bits/stdc++.h>
using namespace std;
main()
{
long int i, sum=0, len, p, power, num1;
char number[100];
while(gets(number))
{
if(strcmp(number, "0")==0)break;
len = strlen(number);
p = len;
//cout<<len;
for(i=0; i<len; i++)
{
power = pow... |
#include<iostream>
#include "../Shoikoth/Person.hpp"
#include "../Shoikoth/Date.hpp"
#include "Property.hpp"
using namespace std;
class SellingReport
{
protected:
Date sellingDate;
Property soldProperty;
Vendor boughtFrom;
Customer soldTo;
double profit;
public:
};
|
#include "Consumables.h"
Consumables::Consumables()
{
}
Consumables::~Consumables()
{
}
void Consumables::Init()
{
}
void Consumables::Update(double dt)
{
}
int Consumables::UseHealthPot(int HP)
{
HP += 50;
return HP;
}
int Consumables::UseManaPot(int Mana)
{
Mana += 10;
return Mana;
}
float Consumables::U... |
#include "OI.h"
#include <frc/WPILib.h>
#include <commands/BallCommandIn.h>
#include <commands/BallCommandOut.h>
OI::OI()
{
frc::Joystick yoke{0};
frc::Joystick xbox{1};
xboxRB.ToggleWhenPressed(new BallCommandIn);
xboxLB.ToggleWhenPressed(new BallCommandOut);
}
double OI::XboxVertL()
{
return ... |
#include "block_statement.h"
#include "visitor.h"
BlockStatement::BlockStatement(Block *_block) : block(_block) {}
void BlockStatement::Accept(AbstractDispatcher& dispatcher) {
dispatcher.Dispatch(*this);
}
BlockStatement::~BlockStatement() { delete block; } |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
string multiply(string num1, string num2) {
//简化版
int l1 = num1.size();
int l2 = num2.size();
string res(l1 + l2, '0');
for(int i=l1-1; i>=0; i--) {
for(int j=l2-1; j>=... |
#pragma once
#include "Ghost.h"
class Blinky : public Ghost
{
public:
bool directions[4];
Blinky();
void Update();
int RandomDirection();
void Move(int _velocity);
void Animate();
void AnimatePowerUp();
void SetInitialPosition(int _x, int _y);
void SetNewAnimation(int _animation);
void SetNewAnimationPowerUp(... |
#pragma once
#include <vector>
#include <gl/glew.h>
struct VertexBufferElement
{
unsigned int type;
unsigned int count;
unsigned char normalized;
static unsigned int GetSizeOfType(unsigned int type)
{
switch(type)
{
case GL_FLOAT: return 4;
case GL_UNSIGNED_INT: return 4;
case GL_UNSIGNED_BYTE: retu... |
/* -*- 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_LSEXCEPTION
#define DOM_LSEXCEPTION
#ifdef DOM3_L... |
#ifndef ALGO2_LABO_CLASE5_ALGORITMOS_H
#define ALGO2_LABO_CLASE5_ALGORITMOS_H
#include <utility>
#include <iterator>
#include <vector>
template<class Contenedor>
typename Contenedor::value_type minimo(const Contenedor& c){
auto it2 = c.begin();
for(auto it = c.begin(); it != c.end(); it++){
if (*it < ... |
#include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<unordered_map>
#include<unordered_set>
#define ll long long
#define MAX 10000000
using namespace std;
int main()
{
double min,max,step;... |
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
using namespace std;
class Solution {
public:
char findTheDifference(string s, string t) {
//基本思想:哈希表HashMap
char res;
vector<int> Maps(26,0),Mapt(26,0);
for(auto c:s)
Maps[c-'a']++;
... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*- */
#ifndef ES_GLOBAL_BUILTINS_H
#define ES_GLOBAL_BUILTINS_H
class ES_GlobalBuiltins
{
public:
static BOOL ES_CALLING_CONVENTION parseInt(ES_Execution_Context *context, unsigned argc, ES_Value_Internal *argv, ... |
#pragma once
#include <map>
class Environment
{
public:
virtual ~Environment() = default;
/// trace levels
enum class TraceLevel
{
Error = 0,
Warning = 1,
Info = 2,
Debug = 3
};
std::map<TraceLevel, std::string> traceLevels = {
{TraceLevel::Error, "Error: "},
{TraceLevel::Warning, ... |
#include "dds_uuid.h"
#include "drilling_calibration_state_publisher.h"
CDrillingCalibrationStatePublisher::CDrillingCalibrationStatePublisher()
{
}
CDrillingCalibrationStatePublisher::~CDrillingCalibrationStatePublisher()
{
DDS_String_free(m_pDataInstance->id);
}
bool CDrillingCalibrationStatePublisher::Initial... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2003 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 _BMP_SUPPORT_
#include "modules... |
#ifndef __WPP__QT__IOS_H__
#define __WPP__QT__IOS_H__
#include <QString>
namespace wpp
{
namespace qt
{
class IOS
{
public:
static void excludeICloudBackup(const QString& path);
static void documentsDirectoryExcludeICloudBackup();
};
}//namespace qt
}//namespace wpp
#endif
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*
* @author Arjan van Leeuwen (arjanl)
*/
#include "core/pch.h"
... |
/* BEGIN LICENSE */
/*****************************************************************************
* SKCore : the SK core library
* Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr>
* $Id: output.h,v 1.6.2.2 2005/02/17 15:29:21 krys Exp $
*
* Authors: Mathieu Poumeyrol <poumeyrol @at@ idm .dot. fr>
*
* ... |
#include "hmi_message_publisher/can_node.h"
#include <glog/logging.h>
using namespace HMI::SL4::hmi_message_publisher;
int main(int argc, char** argv)
{
ros::init(argc, argv, "hmi_message_publisher_can_node");
ros::NodeHandle nh("~");
auto use_threat_obstacle_topic = nh.getParam("use_threat_obstacle_topic"... |
#include "stdafx.h"
#include "ParticlepropertyView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CParticleProperty
IMPLEMENT_DYNCREATE(CParticlePropertyView, CView)
... |
template <typename... TArgs>
struct System : BaseSystem
{
public:
using TYPE = ComponentList<TArgs...>;
void set(ComponentManager& components)
{
BaseSystem::components = &components;
(BaseSystem::components->enable<TArgs>(),...);
}
protected:
/*auto get() -> std::generator<decltype(components->values<TArgs...>... |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Person
{
public:
int a;
// 静态成员变量不能在类内初始化,类内只能声明,定义全局
// 声明的作用只是限制静态成员变量的作用域
static int b; // 静态成员变量,在编译阶段就分配内存,存在静态全局区
void show()
{
cout << a << " " << b << endl;
}
static void static_show() /... |
#include "lib_security_door.h"
using namespace std;
door_ctx::door_ctx()
{
state_run = false;
state_quit = false;
p_open = NULL;
p_close = NULL;
p_middle = NULL;
cmd = 0;
last_cmd = 0;
for (int i = 0; i < 5; i++) {
pin[i] = NULL;
}
p_open = new door_open;
p... |
operator double() const;
Vector::operator double() const
{
return mag;
}
// 内联形式
operator double()
{
return mag;
}
|
// https://oj.leetcode.com/problems/valid-number/
class Solution {
public:
bool isNumber(const char *s) {
if (*s == 0) {
return false;
}
bool last_digit = false;
bool has_exp = false;
bool has_dot = false;
while (*s != 0 && *s == ' ') { // headi... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#ifdef MEDIA_HTML_... |
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int A[n],B[n];
for(int i=0;i<n;i++)
cin>>A[i];
int j=0;
for(int i=0;i<n-1;i++)
{
if(A[i+1]!=A[i])
B[j+1]=A[i];
}
B[j+1]=A[n-1];
for(int i=0;i<j;i++)
{
A[i]=B[i];
... |
//===- OR1KDisassembler.cpp - Disassembler for OR1K -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#ifndef ACCOUNTREGISTERWIDGET_HPP
#define ACCOUNTREGISTERWIDGET_HPP
#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QFormLayout>
#include <QVBoxLayout>
#include <QStackedLayout>
class AccountRegisterWidget : public QWi... |
#include "GameOver.h"
#include "Title.h"
#include "SeaquenceController.h"
GameOver::GameOver()
{
std::cout << "GameOver" << std::endl;
mCount = 0;
}
GameOver::~GameOver()
{
}
Boot* GameOver::Update(SeaquenceController*){
Boot* next = this;
if (mCount == 60){
next = new Title;
}
++mCount;
return next;
} |
#pragma once
#include "plbase/PluginBase.h"
#include "eWeaponType.h"
#pragma pack(push, 4)
class PLUGIN_API CWeapon
{
public:
eWeaponType m_Type;
unsigned __int32 m_dwState;
unsigned __int32 m_dwAmmoInClip;
unsigned __int32 m_dwTotalAmmo;
unsigned __int32 m_dwTimeForNextShot;
unsigned __int8 field_14;
unsigned... |
/*
Copyright (c) 2014 Mircea Daniel Ispas
This file is part of "Push Game Engine" released under zlib license
For conditions of distribution and use, see copyright notice in Push.hpp
*/
#include "Core/Variant.hpp"
namespace Push
{
Variant::Variant()
: m_pointer(nullptr)
, m_copy(Copy<void>)
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2003 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
*/
#ifndef SECURITY_PROTOCOLS_DIALOG_H
#define SECURITY_PROTOCOLS_DI... |
/*
Initial author: Convery (tcn@ayria.se)
Started: 2019-09-13
License: MIT
*/
#include <Stdinclude.hpp>
#include "../Common/Common.hpp"
namespace Tencent
{
// These should probably be fetched in the background.
std::unordered_map<uint32_t, std::wstring> Widestrings
{
{ 14, L"Appname" }... |
/* -*- coding: utf-8 -*-
!@time: 2019-12-23 07:25
!@author: superMC @email: 18758266469@163.com
!@fileName: 0023_Post.cpp
*/
#include <selfFun.h>
class Solution {
private:
static bool judge(vector<int> sequence, int start, int root) {
if (root <= start) {
return true;
}
... |
#include <math.h>
#include <stdlib.h>
#include <array>
#include <ctime>
#include <random>
#include "Irid.h"
using namespace std;
// Constructors
Irid::Irid() : GrowArray() {} // Defaults to zero
Irid::Irid(int i) : GrowArray(i) {}
Irid::Irid(int i, int j) : GrowArray(i, j) {}
// Destructor
Irid::~Irid() {}
// Ir... |
#include <opencv2/opencv.hpp>
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <iterator>
#include <string>
#include <vector>
using namespace std;
using namespace cv;
#ifndef BHUMAN_ISH_H
#define BHUMAN_ISH_H
class bhuman_ish
{
public:
bhuman_ish();
vector<KeyPoint> run(Mat frame);
v... |
#define NOMINMAX
#include <Windows.h>
#include "vulkan.h"
#include "./models/Boy01_Head_GeoMesh.vulkan.h"
#include "./shaders/vert.h"
struct LoopThreadParams
{
HINSTANCE hInstance;
HWND hWnd;
};
DWORD WINAPI LoopThread(LPVOID lpParam)
{
auto& params = *(LoopThreadParams*)lpParam;
auto& hWnd = params.hWnd;
auto&... |
/** \file RendererOps.cpp
* \author Eduardo Pinho ( enet4mikeenet AT gmail.com )
* \date 2013
*/
#include "RendererOps.h"
#include "MathUtils.h"
#include <math.h>
using namespace derplot;
using namespace math;
using namespace op;
RendererOperation::~RendererOperation()
{
}
int ViewPort::onDispatch( RendererProgr... |
//
// Ship.cpp
// GetFish
//
// Created by zs on 14-12-9.
//
//
#include "Ship.h"
#include "Fish.h"
#include "Common.h"
#include "Tools.h"
#include "GameScene.h"
//#include "AudioController.h"
#define Z_HOOK 999
#define Z_TURN 1000
Ship* Ship::create(int type,int ID ,const char* name)
{
Ship* s... |
int btn = 2;
int led = 11;
int teller;
long currentTid;
long tidsLimit;
int ledStatus = LOW;
void setup() {
Serial.begin(9600);
pinMode(btn, INPUT);
pinMode(led, OUTPUT);
}
void loop() {
int knappVerdi = digitalRead(btn);
if (knappVerdi == 1){
delay(200);
Serial.println("Trykket");
if... |
// Автор: Николай Левшин
#include "RegisterMap.h"
namespace RegisterAllocation {
CRegisterMapBuilder::CRegisterMapBuilder( int k, const CInterferenceGraphBuilder::CInterferenceGraph& interferenceGraph ) :
k( k ),
sourceInterferenceGraph( interferenceGraph )
{}
void CRegisterMapBuilder::Build() ... |
#ifndef ODBCSTATEMENT_HH
#define ODBCSTATEMENT_HH
#include <memory>
#include <cstring>
#include <nan.h>
#include "ODBCConnection.hh"
#include "ConnectionAwareStatement.hh"
#include "SafeUnwrap.hh"
namespace NC {
using NC::ConnectionAwareStatement;
using NC::SafeUnwrap;
class ODBCStatement final : public Nan::Ob... |
#include <iostream>
#include "calendar.h"
int main() {
int roky[5] = {1000, 2000, 2002, 2004, 2014};
for (int i = 0; i < 5; i++) {
printf("Rok %d %s prestupny \n", roky[i], jePrestupny(roky[i]) == 1 ? "je" : "neni");
}
for (int i = 1; i <= 12; i++) {
printf("Mesic %d je %s sudy\n", i, j... |
#include<stdio.h>
int main()
{
int e[10][10], k, i, j, n, m, t1, t2, t3;
int inf = 99999999; //用inf存储一个我们认为的无穷值
//读入n和m,n表示顶点个数,m表示边的条数
scanf("%d %d", &n, &m);
//初始化
for(i = 0; i <= n; i++)
for(j = 0; j <= n; j++)
if(i == j)
e[i][j] = 0;
else
e[i][j] = inf;
//读入边
for(i = 1; i <= m; i++)
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.