text stringlengths 8 6.88M |
|---|
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
const char *ssid = "";
const char *password = "";
const char *host = "";
double temp_amb;
double temp_obj;
int led = 2;
char measure;
voi... |
#include <iostream>
#include <vector>
#include "Phonebook.h"
using namespace std;
// prototype
void DisplayMenu(void);
int selectPhonebook(void);
double enterNumber(void);
int main()
{
Phonebook office, home;
while (true)
{
DisplayMenu();
int option;
cin >> option;
if (option == 1)
{
int p_book = se... |
#include <iostream>
#include <cstring>
void solution(char* str, int strLength, int* alphabet)
{
for (int i = 0; i < strLength; i++)
alphabet[str[i] - 'a']++;
}
int main(void)
{
int alphabet[26] = { 0, };
char str[100];
scanf("%s", str);
solution(str, strlen(str), alphabet);
for (int i = 0; i < 26; i++)
pr... |
#include <algorithm>
#include <iostream>
#include <vector>
#include <stack>
class Node
{
public:
friend std::ostream& operator<<(std::ostream &, const Node &);
Node() : parent(nullptr)
{
}
void setKey(int x)
{
key = x;
}
void setParent(Node *theParent)
{
parent = ... |
#pragma once
#include "vector.h"
#include <cmath>
#include <iosfwd>
#include <utility>
#include "type_traits.h"
namespace sbg {
template<typename T>
struct Vector<1, T> {
static_assert(std::is_arithmetic<T>::value, "Vector must be aritmetic");
private:
using MathType = typename std::conditional<std::is_floating_p... |
//
// main.cpp
// PlayingWithWheels
//
// Created by Russell Lowry on 10/26/17.
// Copyright © 2017 Russell Lowry. All rights reserved.
//
#include <cstdio>
#include <queue>
#include <cmath>
#include <cstring>
using namespace std;
int N, n, s, t, f[10000], F;
queue<int> queueVar;
int dist[10000];
int bfs() {
... |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
ListNode* Solution::detectCycle(ListNode* head) {
// Do not write main() function.
// Do not read input, instead use the arguments to the function.
... |
#ifndef VECTORCHAPTER19_H
#define VECTORCHAPTER19_H
#include <iostream>
#include <memory>
#include <string>
#include "vector_base.h"
template <typename T, typename A = std::allocator <T>>
class vector: private vector_base<T, A>
{
//void set_sz(int sz_) {sz = sz_;}
A alloc;
int sz; // Размер
T* elem; // Указа... |
#include <stdio.h>
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace std;
/**
* Meat & Bones of creating sudoku puzzle
* Some function concepts based on http://stackoverflow.com/questions/15690254/how-to-generate-a-complete-sudoku-board-algorithm-error
*/
class puzzleGenerator{
private:
tile** puzzle;
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2006 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 SVG_SUPPORT
#include "modules/svg/src/... |
// Copyright (c) 2019 The NavCoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef NAVCOINPUSHBUTTON_H
#define NAVCOINPUSHBUTTON_H
#include <QIcon>
#include <QPushButton>
#include <QPainter>
#include <QSt... |
#include "treeface/math/MatUtils.h"
#include "treeface/math/Quat.h"
#include <treecore/FloatUtils.h>
#include <treecore/IntUtils.h>
namespace treeface
{
template<typename T>
T det3x3(const treecore::SimdObject<T, 4>& v0,
const treecore::SimdObject<T, 4>& v1,
const treecore::SimdObject<T, 4>& v2) n... |
#include <stdio.h>
#include <math.h>
#include <mpi.h>
#include <string.h>
#include <cstdlib>
/* compuate global residual, assuming ghost values are updated */
double compute_residual(double *lu, int lN, double invhsq){
int i,j;
double gres = 0.0, lres = 0.0, tmp, tmp_sqr;
for (i = 1; i <= lN; i++){
for(j=1;j<=lN... |
namespace elog
{
template<typename T>
Record& Record::operator<<(const T& data)
{
messageStream << data;
return *this;
}
}
|
#include "About.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
About w;
w.setAppName("About Window Test");
w.setVersion("1.0");
w.setDescription("This application tests the About window");
w.setContactInfo("My name\nMy location\nMy number\nMy email");
... |
#include "executive.h"
#include <iostream>
using namespace std;
int main(int argc, char const *argv[]) {
string filename = argv[1];
executive exec(filename);
return 0;
} |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
//
// Copyright (C) 2003-2007 Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
//
// Julien Picalausa
//
#ifndef WINDOWS_AUTHORIZATION_H
#define WI... |
/*Cho ma trận m hàng, n cột, đếm HCN*/
#include <bits/stdc++.h>
#define INFTY 100000000
using namespace std;
const int X[4] = {-1,1,0,0};
const int Y[4] = {0,0,-1,1};
int xMin, xMax;
int yMin, yMax;
int a[100][100];
int m, n;
void input(){
cin >> m >> n;
for (int i = 0; i < m; ++i)
for(int j = 0; j < n; j+... |
#include "game.h"
#include <random>
#include <iostream>
#include <sstream>
#include <algorithm>
namespace {
} // close anon
namespace smithers{
Game::Game()
{
build_deck();
}
const std::vector<Hand>& Game::deal_hands(int number_of_players )
{
std::vector<Card> all_cards;
for (int i=0; i< 2*number_... |
// Created on: 2001-09-11
// Created by: Julia DOROVSKIKH
// Copyright (c) 2001-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.1... |
// Created on: 1997-03-05
// Created by: Joelle CHAUVET
// Copyright (c) 1997-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... |
//Tran Nhan To - 58131391
#include<stdio.h>
#include<conio.h>
#include<iostream>
#include<fstream>
using namespace std;
ifstream f("input3.txt");
struct nv{
int manv;
char hoten[20];
char cv[20];
int hsl;
int hscv;
int thang;
int nam;
int luong;
int luongcb;
};
nv a[30];//du lieu luu nhan vien
int n;//so n... |
#include <bits/stdc++.h>
#define loop(i,s,e) for(int i = s;i<=e;i++) //including end point
#define pb(a) push_back(a)
#define sqr(x) ((x)*(x))
#define CIN ios_base::sync_with_stdio(0); cin.tie(0);
#define ll long long
#define ull unsigned long long
#define SZ(a) int(a.size())
#define read() freopen("input.txt"... |
#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... |
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main() {
vector <string> words;
for (string temp; cin >> temp; )
words.push_back(temp);
cout << "Number of words:" << words.size() << '\n';
cout << endl;
cout << "*********Before Sorting **********" << endl... |
#pragma once
#include "ScalarStorage.hpp"
#include <vector>
#include <memory>
template<class Type, class Tag>
struct ScalarStorageBuilder
{
ScalarStorageBuilder(std::size_t numConsts)
: m_storage(numConsts)
{}
Type & getSingleValueRef()
{
return m_storage[m_current++];
}
Array... |
// Created on: 1991-04-03
// Created by: Remi GILET
// 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 GNU Les... |
#include "redisClient.h"
redisClient::redisClient()
{
}
redisClient::~redisClient()
{
}
|
#ifndef SERIALIZER_H
#define SERIALIZER_H
#include <opencv2/opencv.hpp>
#include <fstream>
#include "structures.h"
#define CURR_ARCH_VERSION 1
class Serializer
{
static int arch_version;
public:
Serializer();
void static saveMats(std::vector<BannerInfo>& banners, std::string filename);
... |
#include "stdafx.h"
#include "QsoTokenType.h"
QsoTokenType::QsoTokenType(const string& qsoTokenType)
:
m_error(false),
m_tokenType(qsoTokenType),
m_minSize(0)
{
}
QsoTokenType::~QsoTokenType()
{
}
|
/* -*- 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 "modules/style/css_viewport.h"
#... |
/* -*- 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.
*/
#ifndef DESKTOP_FILECHOOSER_H
# define DESKTOP_FILECHOOSER_H
# i... |
/** Copyright (c) 2018 Mozart Alexander Louis. All rights reserved. */
#ifndef __BASE_MANAGER_HXX__
#define __BASE_MANAGER_HXX__
/**
* Includes
*/
#include "globals.hxx"
#include "utils/action/action_utils.hxx"
class BaseManager {
protected:
/**
* Constructor.
*
* @param layer ~ Reference to the main l... |
// Sandbox.cpp : Defines the entry point for the console application.
//
#include "core/maths.h"
#include "core/mesh.h"
#include "core/aabbtree.h"
#include "core/threadgroup.h"
#include "core/platform.h"
#include "external/glut/glut.h"
#include "scene.h"
#include "camera.h"
#include "integrators.h"
#include "memory... |
/*
* License does not expire.
* Can be distributed in infinitely projects
* Can be distributed and / or packaged as a code or binary product (sublicensed)
*
* Commercial use allowed under the following conditions :
* - Crediting the Author
*
* Can modify source-code
*/
/*
* File: LightRenderer.cpp
* Au... |
//
// main.cpp
// EX05_01
//
// Created by Eben Schumann on 11/1/16.
// Copyright © 2016 Eben Schumann. All rights reserved.
//
#include <iostream>
#include <cString>
using namespace std;
template <typename T>
int linearSearch(const T[], T, int);
int main(int argc, const char * argv[]) {
int testInt[10] = {1... |
// C++ program to detect and remove loop
#include <bits/stdc++.h>
using namespace std;
struct Node {
int key;
struct Node* next;
};
Node* newNode(int key)
{
Node* temp = new Node;
temp->key = key;
temp->next = NULL;
return temp;
}
void printList(Node* head)
{
while (head != NULL) {
cout << head->key << " ";... |
// https://stackoverflow.com/a/495056/5832619
template <typename T>
GraphNode<T>::GraphNode(const T& c_value) :value{c_value} {}
template <typename T>
const std::vector<GraphNode<T>*>& GraphNode<T>::get_neighbors() const {
return neighbors;
}
template <typename T>
void GraphNode<T>::add_neighbor(GraphNode<T>* no... |
// Created on: 1998-01-07
// Created by: Philippe MANGIN
// 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 GN... |
//This file is meant to organize learning of C++ past the basics
//-----------
// Keywords
//-----------
//auto: tells compiler to infer the type of a variable (type inference/deduction) [C++14]
auto dub{ 5.0 }; //works with literals
auto sum { add(5, 6) }; //works with function returns
... |
#include "precompiled.h"
#include "script/script.h"
#include "vfs/vfs.h"
#include "vfs/jsvfs.h"
namespace jsvfs
{
void init();
JSBool addPath(JSContext *cx, uintN argc, jsval *vp);
JSBool addFileWatch(JSContext *cx, uintN argc, jsval *vp);
JSBool listFiles(JSContext *cx, uintN argc, jsval *vp);
void jsWatchCallba... |
#include "GameOverProc.h"
int GameOverProc::doRequest(CDLSocketHandler* client, InputPacket* pPacket, Context* pt )
{
return 0;
}
int GameOverProc::doResponse(CDLSocketHandler* client, InputPacket* inputPacket, Context* pt )
{
int error_code = inputPacket->ReadShort();
string error_mag = inputPacket->ReadString()... |
#ifndef __mir_mobile__PlayerController__
#define __mir_mobile__PlayerController__
#include "publicDef/PublicDef.h"
class PlayerController: public Ref {
CC_SYNTHESIZE(unsigned int, m_playerNumber, PlayerNumber);
CC_SYNTHESIZE(unsigned int, m_hairNumber, HairNumber);
CC_SYNTHESIZE(unsign... |
//
// BitStream.cpp
// superasteroids
//
// Created by Cristian Marastoni on 31/05/14.
//
//
#include "NetTypes.h"
#include "BitStream.h"
#include "BitUtils.h"
#include "../Debug.h"
BitStream::BitStream() : mBitLeft(32), mBitBuf(0), mBitCount(0), mBitPos(0)
{
}
BitStream::BitStream(const uint8 *data, size_t size) :... |
#include "mat/mat_base.h"
CMatBase::CMatBase(int width, int height)
: m_xn(width)
, m_yn(height)
, m_sf(ImageSurface::create(FORMAT_ARGB32, g_factor * width, g_factor * height))
, m_pat(SurfacePattern::create(m_sf))
{
m_pat->set_matrix(g_mtr);
m_pat->set_extend(EXTEND_REPEAT);
return;
}
CMatBase::~CMatBase()
{... |
#include "Action.h"
Action::Action(QObject *parent) : QObject(parent)
{
}
Action::Action(const Action &other)
{
}
Action::~Action()
{
}
bool operator<(const Action &lhs, const Action &rhs) {
int comparableMenus = std::min(lhs.menus().size(), rhs.menus().size());
for (int i = 0; i < comparableMenus; i++) {
... |
#include "DropBrick.h"
DropBrick::DropBrick(D3DXVECTOR2 startPOS)
{
SetPosition(startPOS);
mStartPOS = startPOS;
RECT rect = { 1050,171,1083,188};
Brick = new Sprite("Resources/Aladdin.png", rect, 33, 17, D3DCOLOR_XRGB(255, 0, 255),D3DXVECTOR2(0.5,0.5),GameGlobal::mAladdintexture);
Brick->SetPosition(startPOS);... |
#include <iostream>
int main()
{
int a = 3, b = 4;
decltype(a) c = a; //c is an int c = 3. a = 3
decltype((b)) d = a; //d is a int& which references the integer a a = 3. d = a = 3
++c; //c now equals 4; a unchanged
++d; // a now equals 4.
std::cout << "a,b,c,d: "
... |
#ifndef __RECTANGLE__
#define __RECTANGLE__
#include "Interval.hpp"
class Rectangle{
Interval x_axis_bound;
Interval y_axis_bound;
public:
Rectangle(){}
Rectangle(const Interval& x_bound, const Interval& y_bound): x_axis_bound(x_bound), y_axis_bound(y_bound){}
const Interval& get_x_bound() const... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long t,i,a,sum,c,co,d;
scanf("%lld",&t);
while(t--){
scanf("%lld",&a);
if(a<=0){
cout<<0<<endl;
continue;
}
sum=0;
c=sqrt(a);
co=a;
for(i=1;i<=c;i++){
... |
#pragma once
#include "geo.h"
#include "log_duration.h"
#include <string_view>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <algorithm>
#include <iterator>
using namespace geo;
namespace detail {
struct Stop {
Stop() = default;
~Stop() = default;
... |
/*****************************************************************************************************************
* File Name : InorderSuccessorBST.h
* File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\sites\geeksforgeeks\trees\page05\InorderSuccessorBST.h
* Created on : Dec 25, 2013 :: 12:35... |
/** Kabuki SDK
@file /.../Source/Kabuki_SDK-Impl/_G2D/Pipeline.h
@author Cale McCollough
@copyright Copyright 2016 Cale McCollough ©
@license Read accompanying /.../README.md or online at http://www.boost.org/LICENSE_1_0.txt
@brief This file contains the _2D.Vector_f interface.
*/... |
uint8_t BitBoardToRankFile( const bitboard_t board )
{
// Optimization: Find First Set Bit Position (63=MSB, 0=LSB)
// C++: GCC: __builtin_clz
// MS : #include <intrin.h> // _BitScanReverse( &DWORD, val ); _BitScanReverse64( &output, val );
// Clang: http://clang.llvm.org/doxygen/lzcntintrin_8... |
/*
* IAModule_Thread.h
*
* Created on: 25 janv. 2012
* Author: adrien
*/
#ifndef IAModule_Thread_H_
#define IAModule_Thread_H_
#include <mqueue.h>
#include "Utils.h"
enum E_DIRECTION_BALLE {
COMING,
LEAVING,
STOPPED
};
class IAModule_Thread {
public:
IAModule_Thread();
virtual ~IAModule_Thread()... |
/*!
* \file messagedelegate.cpp
* \author Simon Coakley
* \date 2012
* \copyright Copyright (c) 2012 University of Sheffield
* \brief Implementation of message delegate
*/
#include <QtGui>
#include "./messagedelegate.h"
MessageDelegate::MessageDelegate(QStringList mts, QObject *parent)
: QItemDelegate(parent... |
// ~$ lscpu | grep Endian
// Byte Order: Little Endian
#include <cassert>
#include <iostream>
#include <iomanip> // std::setprecision
#include <fstream>
#include <vector>
unsigned char reverse(unsigned char b) {
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
... |
//
// Created by 송지원 on 2020/05/23.
//
#include <iostream>
#include <vector>
using namespace std;
int abs(int input) {
return input>0 ? input : input * (-1);
}
int get_max_val(vector<int> input) {
int max_val = -1;
vector<int> ::iterator it;
for (it=input.begin(); it!=input.end(); it++) {
if... |
#pragma once
#include <fstream>
#define TCP_SRV_PORT 2121
//#define UDP_SRV_PORT 2020 // pdf is error should be 2120
static const char *ponit[] = { "\x20\x20", "\xA8\x87", "\xA8\x86", "\xA8\x84", "\xA8\x83", "\xA8\x80" };// ¨‡¨†¨…¨‚¨€
class Common {
public:
// crc16
static unsigned short CalculateCheckSum(... |
/*
* interrupt.cpp
*
* Created: 03.05.2020 20:44:12
* Author: pavel
*/
#include "pins.h"
#include <avr/interrupt.h>
#include <avr/io.h>
int pulse_counter;
ISR (INT7_vect) {
pulse_counter++;
}
void interrupt_init(void){
// Прерывание INT0 по спадающему фронту
EICRA = (1<<ISC71) | (1<<ISC70... |
#include<iostream>
#include<memory>
#include "person.h"
#include "konto.h"
#include"bank.h"
using namespace std;
/**
string name;
vector<std::shared_ptr<Konto>> konten;
**/
Person::Person(string name){
this->name=name;
}
Person::Person(string name, vector<std::shared_ptr<Konto>>konten){
this->name=name;
this... |
//
// Utility.cpp
// GA
//
// Created by Tom den Ottelander on 19/11/2019.
// Copyright © 2019 Tom den Ottelander. All rights reserved.
//
#include "Utility.hpp"
using namespace std;
using namespace chrono;
using namespace nlohmann;
unsigned long long randcount = 0;
extern string dataDir;
/* ------------------... |
/**
* Copyright (C) 2017 Zach Laine
*
* 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)
*/
#ifndef YAML_CONFIG_HPP
#define YAML_CONFIG_HPP
#ifndef YAML_HEADER_ONLY
#define YAML_HEADER_ONLY 0
#endif
#if YA... |
//
// Copyright (c) 2019-2020 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
//
// Distributed under the MIT Software License
//
#include "rotor/supervisor.h"
#include "rotor/registry.h"
#include <assert.h>
using namespace rotor;
supervisor_t::supervisor_t(supervisor_config_t &config)
: actor_base_t(c... |
#pragma once
#include "Module.h"
#include "Globals.h"
#include "p2List.h"
#include "p2Point.h"
#include "SDL\include\SDL.h"
struct Sprite {
SDL_Texture* texture = nullptr;
SDL_Rect rect;
iPoint Position;
fPoint Angle;
};
class ModuleTextures : public Module
{
public:
ModuleTextures(Application* app, bool start_... |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n, m, row1, row2;
cin >> n >> m >> row1 >> row2;
--row1;
--row2;
int mat[1000][1000];
for (int i = 0; i < n; ++i)
for (int j = 0; j < m; ++j)
cin >> mat[i][j];
for (int i = 0; i < n; ++i) {
int tmp ... |
/***************************************************************************
* Copyright (C) 2009 by Dario Freddi *
* drf@chakra-project.org *
* *
* This pr... |
#ifndef CREATURE_H_
#define CREATURE_H_
#include <string>
#include <vector>
#include <iostream>
#include "Item.h"
#include "Attack.h"
using namespace std;
class Creature{
public:
string getName();
void setName(string);
Status getStatus();
void setStatus(Status);
string getDescription();
void setDescription(s... |
#pragma once
#include <bits/stdc++.h>
class AbstractDispatcher;
class Expression {
public:
Expression();
virtual void Accept(AbstractDispatcher& dispatcher) = 0;
virtual std::pair<std::string,std::pair<Expression*,Expression*>>* getIdentifier() = 0;
virtual ~Expression();
}; |
// Copyright (c) 2013 Nick Porcino, All rights reserved.
// License is MIT: http://opensource.org/licenses/MIT
/*
* MachineAssembler.h
* Lab
*
*/
#pragma once
#ifndef EXTERNC
# ifdef __cplusplus
# define EXTERNC extern "C"
# else
# define EXTERNC
# endif
#endif
#include <map>
#include <string>
#include <ve... |
/*
* arret.cpp
*
* Created on: 2016-09-24
* Author: etudiant
*/
#include "arret.h"
Arret::Arret(const std::vector<std::string>& ligne_gtfs)
: m_heure_arrivee(stoul(ligne_gtfs[1].substr(0, 2)),
stoul(ligne_gtfs[1].substr(3, 2)),
stoul(ligne_gtfs[1].substr(6, 2))),
m_heure_depart(stoul(lign... |
// -----------------------------------------------------------------------------
// G4_QPIX | EventAction.cpp
//
//
// * Author: Everybody is an author!
// * Creation date: 15 Aug 2019
// -----------------------------------------------------------------------------
#include "EventAction.h"
// Q-Pix includes
#inc... |
#include<X11/Xlib.h>
#include<X11/extensions/sync.h>
#include<X11/Xatom.h>
#include<epoxy/gl.h>
#include<epoxy/glx.h>
#include<climits>
#include<string>
#ifndef _OGL_WINDOW_H_
#define _OGL_WINDOW_H_
#define OGL_WINDOW_NONE 0X0000
#define OGL_WINDOW_EXPOSE 0X0001
#define OGL_WINDOW_SIZE 0X0002
#define OGL_WINDOW_FOC... |
class Rubbish1 : Strategic
{
scope = 2;
model = "\CA\misc\garbage_paleta";
mapSize = 2;
displayName = $STR_EPOCH_PILE_RUBBISH;
vehicleClass = "DayZ Epoch Misc";
};
class Rubbish1_DZE : Rubbish1
{
transportMaxMagazines = 80;
transportMaxWeapons = 20;
transportMaxBackpacks = 5;
};
class Rubbish2 : Strategic
{
... |
/**
* @file valknut/core/internal/float_types.hpp
*
* @brief This internal header declares fixed size floating types
*
* @note This is an internal header file, included by other library headers.
* Do not attempt to use it directly.
*/
/*
* Symbols Defined:
*
* VALKNUT_SINGLE_PRECISION : Def... |
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
void trans()
{
std::ifstream fin1("idname.txt"), fin2("jsname.txt");
std::string id, name, jsstr;
std::vector<std::string> ids, names;
while(fin1>>id)
{
fin1>>name>>name>>name>>name>>name>>name;
ids.push_back(id);
n... |
// -*- coding: utf-8
// vim: set fileencoding=utf-8
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Thomas Capricelli <orzel@freehackers.org>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser Gen... |
/*
* nbdkit-smb-plugin
* Copyright (C) 2020 Andreas Stöckel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any late... |
#include <iostream>
#include <cmath>
#include <stdlib.h>
using namespace std;
double f1(double x);
double f2(double x);
double aprox_succ(double start,double precision,double (*function)(double));
int it = 0;
double precision = 0.000001;
int main() {
cout << "Ecuatia a):\n";
cout << "Solutia este : " << aprox_succ(0... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 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 MODULES_HARDCORE_COMPONENT_OPTYPEDMESSAGE_H
#define MODULES_HA... |
class Offroad_DSHKM_Gue;
class Offroad_DSHKM_Gue_DZ: Offroad_DSHKM_Gue {
scope = 2;
crew = "";
typicalCargo[] = {};
class TransportMagazines {};
class TransportWeapons {};
displayName = "$STR_VEH_NAME_PICKUP_DSHKM";
vehicleClass = "DayZ Epoch Vehicles";
class Turrets;
class MainTurret;
class HitPoints;
class... |
#ifndef BOARD_DATA_INCLUDED
#define BOARD_DATA_INCLUDED
#include "bitBoard.hpp"
extern const char *BB81_ALL_ZERO;
extern const char *BB81_ALL_ONE;
const int BOARD_SQUARE_COUNT = 81;
const int BOARD_RANK_COUNT = 9;
const int BOARD_FILE_COUNT = 9;
const int DIGIT_COUNT = 9;
const int HOUSE_COUNT = 27;
extern const in... |
/*
* train_run.cpp
*
* Created on: 2017年4月2日
* Author: lcy
*/
#include "HOGFeature.hpp"
#include "SVMClassifier.h"
#include "DataProcess.hpp"
int main()
{
DataProcess proc1(20);
proc1.process(std::string("/home/lcy/workspace/KCF2/训练样本/35/大家好35/helloleft35-"),std::string("/home/lcy/workspace/KCF2/训练样本/35/... |
#include "../Headers/Point.hh"
#include <cmath>
// Default constructor: initializes the point to (0, 0, 0).
Point::Point() {
x_coord = 0;
y_coord = 0;
z_coord = 0;
}
// Initializes the point to (x, y, z).
Point::Point(double x, double y, double z) {
x_coord = x;
y_coord = y;
z_coord = z;
}
// Destructor... |
#include "Property.hpp"
#include <lib_config/YAMLConfiguration.hpp>
#include <iostream>
models::Property::Property(const std::string& name, const std::string& type, const std::string& doc, const std::string& configYML): TypedObject(name, type), DocumentedObject(doc)
{
libConfig::YAMLConfigParser parser;
value ... |
#include <bits/stdc++.h>
#include <windows.h>
#include <direct.h>
#include <fstream>
using namespace std;
bool fileExist(string Xfile)
{
DWORD file = GetFileAttributesA(Xfile.c_str());
if (file==INVALID_FILE_ATTRIBUTES)
return false;
else return (file & FILE_ATTRIBUTE_DIRECTORY);
}
void mkFolder(char p... |
#ifndef CORE_PACKET_H
#define CORE_PACKET_H
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include "CommandBytes.h"
class AbstractPacket {
protected:
uint8_t commandByte;
uint8_t dataSize;
uint8_t *data;
public:
virtual uint8_t getCommandByte() const;
virtual uint8_t *getData() c... |
#include "Material.h"
Material::Material()
{
}
Material::Material(Texture* diffuse) :
m_diffuse(diffuse)
{
}
Material::Material(glm::vec3 color) :
m_color(color)
{
}
char Material::getName()
{
return m_name;
}
Texture* Material::getDiffuse()
{
return m_diffuse;
}
Texture* Material::getNormal()
{
return m_... |
//
// testnewSet.cpp
// Homework 1
//
// Created by Hender Lin on 4/12/21.
//
#include "newSet.h"
#include <iostream>
#include <string>
#include <cassert>
|
#include <QtGui>
#include "StartWindow.h"
#include "LearnWindow.h"
#include "PassWindow.h"
#include "testdialog.h"
#include "quest.h"
StartWindow::StartWindow(QWidget *parent)
: QDialog(parent)
{
label=new QLabel(tr("Please select programm mode"));
EditModeButton=new QPushButton(tr("Admin mode"));
Le... |
#ifndef VnaReferenceMarker_H
#define VnaReferenceMarker_H
// RsaToolbox
#include "Definitions.h"
// Qt
#include <QObject>
#include <QScopedPointer>
namespace RsaToolbox {
class Vna;
class VnaTrace;
class VnaReferenceMarker : public QObject
{
Q_OBJECT
public:
explicit VnaReferenceMarker(QObject *parent =... |
#include <iostream>
#include <cstdio>
#include <string>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <vector>
typedef long long LL;
typedef long long ll;
typedef long double LD;
typedef long double ld;
using namespace std;
#define N 222222
struct Tp{
int x, y, z;
bool operator<(const Tp& t)con... |
#include "dds_uuid.h"
#include "circulate_objective_publisher.h"
CCirculateObjectivePublisher::CCirculateObjectivePublisher()
{
}
CCirculateObjectivePublisher::~CCirculateObjectivePublisher()
{
DDS_String_free(m_pDataInstance->id);
}
bool CCirculateObjectivePublisher::Initialize()
{
CDdsUuid uuid;
uuid.... |
#pragma once
#include <iostream>/* 입출력 클래스 */
#include <string> /* 문자열 클래스 */ |
#include "given.h"
double Given::GetConstEps() const
{
return M_PI / eps;
}
int32_t Given::GetSize() const
{
return N - 2;
}
int32_t Given::GetTestPointsNum() const
{
return TestPointsNum;
}
std::istream& operator>>(std::istream& input, Given& given)
{
double real, img;
input >> given.eps >> rea... |
#include "stdafx.h"
#include "MonAIPresetOpenSuper.h"
#include "../SuperMonsterSelect.h"
#include "../../GameCursor.h"
#include "MonAIPresetSave.h"
#include "MonAIPresets.h"
Preset* MonAIPresetOpenSuper::m_presets[6];
std::map<int, int> MonAIPresetOpenSuper::m_aimap;
bool MonAIPresetOpenSuper::m_isAllNone;
MonAIPre... |
/*
* Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com>
* Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com>
* Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com>
* Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com>
* Copyright (c) 2011 Guillaume Pinot <guillaume.pino... |
#include "SG_SocialHandler.h"
#include "Packets/MMO/Social/SocialPacketsResponse.h"
#include "Networking/General/SG_ServerBase.h"
void SG_SocialHandler::HandleMSN(const boost::shared_ptr<SG_ClientSession> Session)
{
MM_SC_MSN_RESP response;
MM_SC_MSN_RESP::initMessage<MM_SC_MSN_RESP>(&response);
memcpy(response.suc... |
#include "AUdpServer.hpp"
AUdpServer::AUdpServer(boost::asio::io_service &ioService, int port)
: started(false), _socket(ioService, boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), port))
{
}
bool AUdpServer::isStarted() const {
return this->started;
}
bool AUdpServer::start() {
if (this->isSta... |
//
// Project: A2BlackJack
// Created by: Ryan Purse
// Date: 23/11/2020
//
#include <iomanip>
#include "../../public/components/deck.h"
/*
* Returns a copy of a card in the deck
* Determines if the deck needs to be
* shuffled or not.
*/
playingCard drawCard(deck &cards) {
playingCard newCard = cards.deck[ca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.