text stringlengths 8 6.88M |
|---|
// CalculateThread.cpp : 实现文件
//
#include "stdafx.h"
#include "MultiThread1.h"
#include "CalculateThread.h"
#include "MultiThread1Dlg.h"
// CCalculateThread
IMPLEMENT_DYNCREATE(CCalculateThread, CWinThread)
CCalculateThread::CCalculateThread()
{
}
CCalculateThread::~CCalculateThread()
{
}
BOO... |
#ifndef LOGGER_H
#define LOGGER_H
#include "shoemanagercore_global.h"
#include <QString>
class SHOEMANAGERCORESHARED_EXPORT Logger
{
public:
enum Verboseness
{
Normal, ///< 排除 INFO 等级的调试信息, 仅记录 WARN, ERROR, FATAL
Detailed, ///< 全部调试信息:INFO, WARN, ERROR, FATAL
Exhaus... |
#include<vector>
#include<map>
#include<iostream>
using namespace std;
#define MAX 20
typedef int costtype;
typedef char vextype;
const int inf = 0x3f3f3f3f;
typedef char vextype;
typedef int costtype;
int n, m, p[MAX][MAX], t[MAX][MAX];
costtype a[MAX][MAX], d[MAX][MAX], dist[MAX];
map<vextype, int> mm;
... |
/*
更新到点的二维线段树,需要注意的两个地方是:
1.更新到点的时候,第一区间的祖先区间都要进行更新。
2.在更新第二区间时,因为对于该第二区间所属的第一区间而言,
第二区间的一个格子是代表了实际的一行格子
所以更新时是需要进行更优判断的。
*/
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#define N 4000
using namespace std;
int m;
struct TREE{
int maxLove[4*N]; //二维线段树
}mm[400];
struct P... |
// Created on: 1991-02-26
// Created by: Isabelle GRIGNON
// 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 G... |
#pragma once
#include "../../Toolbox/Toolbox.h"
#include "../Vector/Vector3.h"
#include "MatrixToolbox.h"
#include <string>
#include <iostream>
#include <array>
namespace ae
{
/// \ingroup math
/// <summary>Matrix with 4 lines and 4 columns.</summary>
/// <seealso cref="Matrix3x3" />
class AERO_C... |
#include "Zork_Def.hpp"
#include <vector>
#include "Object.hpp"
#include "Room.hpp"
#include "Container.hpp"
#include "Creature.hpp"
#include "Item.hpp"
#include "Map.hpp"
#include "main.hpp"
using namespace std;
vector<string> WordParser(const string &input)
{
vector<string> rtvl;
size_t found,pre;
string tmp;
p... |
#include <cstdio>
#include <iostream>
using namespace std;
void shuchu(int a[], int n) {
for (int i = 1; i <= n; i++)
printf("%d ", a[i]);
printf("\n");
}
void SelectSort(int a[], int n) {
cout << "-------Chosen-------" << endl;
int k = 0;
int temp;
for (int i = 1; i <= n; i++) {
... |
//==================================================================================================
// Name : lrmain.h
// Author : Ken Cheng
// Copyright : This work is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this
// ... |
/* ***** 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 <algorithm>
#include <fwTools/ProgressToLogger.hpp>
#include <f... |
#include "Scheme_values/Nil.hpp"
#include "Environment.hpp"
#include "Scheme_values/Scheme_value.hpp"
#include <memory>
Nil::Nil()
{
}
std::string Nil::as_string() const
{
return "nil";
}
|
// 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 Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with spe... |
#include <fstream>
#include <sstream>
#include <bcm2835.h>
#include <signal.h>
#include <unistd.h>
using namespace std;
using u16 = uint16_t;
string song;
std::string slurp(const char *filename)
{
std::ifstream in;
in.open(filename, std::ifstream::in | std::ifstream::binary);
std::stringstream sstr;
sstr << in... |
#include "FFT_F.h"
#include "memory.h"
#include <math.h>
#include <stdio.h>
#define _CRT_FUNCTIONS_REQUIRED
extern void fft(double pr[], double pi[], int n, double fr[], double fi[]);
////////////////////////////////////////////////////////
// 函数名称:
// FFT_fix64
// 函数功能:
// FFT运算
// 形参:
/... |
#ifndef SCENE_SEGMENTATION_NODE_H
#define SCENE_SEGMENTATION_NODE_H
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <sensor_msgs/PointCloud2.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/PoseArray.h>
#include <tf/transform_listener.h>
#include "mcr_scene_segmentation/clustered_p... |
vector<pii> g[maxn];
int v[maxn];
int dis[maxn];
void prim() {
memset(v,0,sizeof(v));
for(int i=1; i<=n; i++) {
dis[i]=INF;
}
dis[1]=0;
int ans=0;
for(int i=1; i<=n; i++) {
int mark=-1;
for(int j=1; j<=n; j++) {
if(!v[j]) {
if... |
#ifndef __NewprojectPlugin__
#define __NewprojectPlugin__
#include "plugin.h"
#include "NewProjectWizard.h"
#include "globals.h"
#include "event_notifier.h"
#include "dirsaver.h"
#include "buildmanager.h"
#include "cl_standard_paths.h"
#include "clZipReader.h"
#include "ZipDialog.h"
#include <wx/dir.h>
#include <wx/fi... |
#ifndef LINCOMB_H
#define LINCOMB_H
#include <iostream>
#include <stdlib.h>
#include <vector>
#include <math.h>
#include "dep_gui/matrix.h"
#define PI 3.14159265
using namespace std;
class timeFunction {
public:
virtual double out(double time) = 0;
virtual string type() = 0;
};
class step_: public timeFunctio... |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
string in,ss;
cin>>in;
bool start=false;
long q,i,prev,pos,l;
int a;
vector <vector<long>> state(52);
vector<long>::iterator it;
for( i=0; i<in.size();i++)
{
if(in[i]>=97&&in[i]<=122)
state[in[i]-97].... |
#pragma once
#ifndef GAME_H
#define GAME_H
//static definitions
#define WINDOW_HEIGHT 720
#define WINDOW_WIDTH 1440
#include "GameState.h"
#include "MenuState.h"
#include "StartPageState.h"
class Game
{
private:
//Variables
sf::RenderWindow* window;
sf::VideoMode videoMode;
sf::Event sfEvent;
s... |
/* ***** 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 ****** */
#ifndef _GDCMIO_DICOMFILESREADER_HPP_
#define _GDCMIO_DICOMFILESREADER_HPP... |
//reverse every k nodes. If the remaining nodes are less than k reverse 'em all
#include <iostream>
using namespace std;
//IDEA: reverse first k nodes. if length of the list is > k then kth node is gonna be head always else the ////last node is gonna be head
//after reversing nodes in group of k connect them
typedef... |
#ifndef CHAPTER8_WEIGHTED_GRAPH_EDGE
#define CHAPTER8_WEIGHTED_GRAPH_EDGE
#include <ostream>
template <typename Weight>
class Edge {
private:
int _vertex1;
int _vertex2;
Weight _weight;
public:
Edge(int v1, int v2, Weight w) : _vertex1(v1), _vertex2(v2), _weight(w){};
Edge() {}
~Edge();... |
#include "D:\source\repos\algorithms_and_data_structures\laboratory2\List.h"
#include <iostream>
using namespace std;
// hash functions//////////////////////////////////////////////////////////////////////////////////////////////////
int HashFunctionMultiplication(int k, int ts)
{
int N = ts; double A = 0.618033;... |
#ifndef GNCRITICALSECTION_H
#define GNCRITICALSECTION_H
#include "GnDebug.h"
#define GNMULTITHREADED
class GNSYSTEM_ENTRY GnCriticalSection
{
public:
GNFORCEINLINE GnCriticalSection();
GNFORCEINLINE ~GnCriticalSection();
GNFORCEINLINE void Lock();
GNFORCEINLINE void Unlock();
protected:
#if defined(GNMULTITHRE... |
// AnalysisView.cpp : CAnalysisView 类的实现
//
#include "stdafx.h"
// SHARED_HANDLERS 可以在实现预览、缩略图和搜索筛选器句柄的
// ATL 项目中进行定义,并允许与该项目共享文档代码。
#ifndef SHARED_HANDLERS
#include "Analysis.h"
#endif
#include "AnalysisDoc.h"
#include "AnalysisView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CAnalysisView
IMPLEMENT_DYNCR... |
#include <iostream>
using namespace std;
int main() {
int i, j;
int n;
cin >> n;
int arr[n];
for (i = 0; i < n; i++)
cin >> arr[i];
for (j = n-1; j >= 0; j = j -1)
cout << arr[j] << ' ';
return 0;
}
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "GameFramework/GameModeBase.h"
#include "HypoxiaGameMode.generated.h"
UCLASS(minimalapi)
class AHypoxiaGameMode : public AGameModeBase
{
GENERATED_BODY()
public:
AHypoxiaGameMode();
};
|
/*#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
using namespace std;
long long int fun(int n) {
if(n <= 50 && n > 1) return n * fun(n - 1);
if(n == 1) return
}
int main() {
long long int a[80];
a[1] = 1;
for(int i = 50; i >= 1; i--) ... |
//
// Created by 송지원 on 2020/08/13.
//
#include <iostream>
#include <stack>
#include <string>
using namespace std;
string str;
int N;
int strLen;
int CNT;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
while (true) {
stack<char> S;
N++;
CNT = 0;
cin >> str;
i... |
//By SCJ
//#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
void ext_gcd(int a,int b,int& d,int& x,int& y)
{
if(!b){d=a;x=1;y=0;}
else{ext_gcd(b,a%b,d,y,x);y-=x*(a/b);}
}
int main()
{
//ios::sync_with_stdio(0);
//cin.tie(0);
int a,b;
while(cin>>a>>b)
{
int x,y,d;
ext_gcd(a,b,d,... |
#include <iostream>
#include <string>
class Hash {
private:
static
const int tableSize = 6;
struct Item {
std::string name;
std::string phoneNum;
Item* next;
};
Item* hashTable[tableSize];
public:
int hashF... |
#include <stdio.h>
#include <errno.h>
#include <iostream>
#include <string>
//Allows usage of fopen() in MS Visual Studio:
#ifdef _MSC_VER
#pragma warning(disable:4996)
#endif
#define MAX_FILE_CHAR 2048
#define BUFFER_SIZE 128
/*
COMP-3473 Operating Systems Group Project
Ian Cuninghame, Kris Luszczynski
Lakehead ... |
#include "server.h"
#include <qdebug>
#include <iostream>
#include <QMessageBox>
using namespace std;
Server::Server(Dirigeable *dir, int port, QObject* parent): QObject(parent)
{
dirigeable = dir;
//on vérifie que le port est valide
if(port<1025 || port>65535)
port = 9999; // par défaut on uti... |
#pragma once
#include <string>
#include "Module.h"
#include "../Common/Types.h"
namespace OpenALRF
{
class ISystem : public IModule
{
protected:
OpenALRF::status_t SuggestedStatus;
public:
virtual OpenALRF::status_t CurrentStatus() const;
virtual void ChangeStatus(OpenALRF::status_t ANew... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Yngve Pettersen
**
*/
#include "core/pch.h"
#ifdef DATASTREA... |
#include "SettingDeviceAddDialog.hpp"
#include <QFormLayout>
#include "ShoeManagerNetwork.hpp"
#include "ShoeManagerNetworkResult.hpp"
#include "QUtilsFramLessMessageBox.hpp"
SettingDeviceAddDialog::SettingDeviceAddDialog(QWidget *widget)
: QUtilsFramelessForm(widget)
{
initLayout();
initConnect... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2013-2015 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
* ndn-cxx library is free software: you can redistribute it and/or modify it under the
... |
#ifndef AWS_NODES_FUNCTIONDEFINITION_H
#define AWS_NODES_FUNCTIONDEFINITION_H
/*
* aws/nodes/functiondefinition.h
* AwesomeScript Function Definition
* Author: Dominykas Djacenka
* Email: Chaosteil@gmail.com
*/
#include <list>
#include <string>
#include "statement.h"
#include "variable.h"
namespace AwS{
names... |
/*
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
*/
#pragma once
#ifdef _WIN32
#define PUSH_PLATFORM_WINDOWS 1
#elif __APPLE__
#include "TargetConditionals.h"
#if TARGET_IP... |
#include "hns-test.h"
#include "dns-proto.h"
#include <string>
#include <vector>
namespace hns {
namespace test {
TEST_F(DefaultChannelTest, GetServers) {
std::vector<std::string> servers = GetNameServers(channel_);
if (verbose) {
for (const std::string& server : servers) {
std::cerr << "Nameserver: " ... |
#include "MemoryManagement.h"
#if defined(OBLIVION)
#include "obse_common\SafeWrite.h"
static const UInt32 kCreateTextureHook = 0x007610D3;
#elif defined(NEWVEGAS)
#include "nvse\SafeWrite.h"
static const UInt32 kCreateTextureHook = 0x00E68DCD;
#endif
HRESULT __stdcall CreateTextureHook(LPDIRECT3DDEVICE9 pDevice, LPCV... |
#include <algorithm>
#include <iterator>
#include <memory>
#include <regex>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include "arch_graph_automorphisms.h"
#include "arch_graph_clus... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Lice... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow();
/********************************************************************************
**... |
#include <Windows.h>
#include <iostream>
#include <functional>
#include <random>
#include <ctime>
#include <list>
ATOM RegisterCustomClass(HINSTANCE& hInstance);
LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
void StartGame(HWND hWnd);
void EndGame(HWND hWnd);
LPCTSTR Title = L"Alkanoid";... |
#include<iostream>
#include<math.h>
#include <iomanip>
using namespace std;
int main(){
int n;
float mi = 0;
float sigma2 = 0;
cout << "Digite um número inteiro: ";
cin >> n;
float *values = new float[n];
for(int i=0; i < n; i++){
cout << "(" << i+1 << "/" << n << ") " << "Digite ... |
/*
book.h
*/
#ifndef book_h
#define book_h
#include <unordered_map>
#include <assert.h>
#include "limit.h"
#include "order.h"
//forward declaration
class Order;
class Limit;
class Book
{
public:
Book();
void AddOrder(int timestamp,char id, bool isBid, int price, int size);
void Redu... |
#ifndef RENDER_H
# define RENDER_H
# include "engine.h"
class Render;
typedef struct s_thread
{
int id;
FILE *f; // Already at the correct cursor location
long count; // In number of particles
Render *dad;
} t_thread;
class Render
{
public:
int width;
int height;
... |
// Copyright (c) 2007-2021 Hartmut Kaiser
//
// 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)
#pragma once
#include <pika/config.hpp>
#include <cstddef>
#include <cstdint>
#... |
#include <cstdio>
#include "parse.h"
int digitValue(char c) {
if (isdigit(c))
return c - '0';
else
return tolower(c) - 'a' + 10;
}
bool parseInt(string s, int &res) {
if (s.length() == 0) return false;
int base = 10;
if (s.size() >= 2 && s[0] == '0' && tolower(s[1]) == 'x') {
base = 16;
s ... |
// Simple test of the NavServerDll.
// system includes
#include <iostream>
// project includes
#include "NavServer.h"
#include "com_abacogroup_dbmap_wms_tile_NavionicsDriver.h"
// private output functions
using namespace std;
// -----------------------------------------------------------------------... |
#include <iostream>
using namespace std;
int size(char a[]);
int main() {
char a[1000];
cin.getline(a, 1000);
cout << size(a) << endl;
cin.get();
return 0;
}
//判断是否重复并返回最小索引
int size(char a[]) {
int first_index = 0;
int j = 0;
int temp[26];
for (int i = 'a'; i <= 'z'; i++) {
int num_of_char = 0;
for (... |
#include "Pointer.h"
#include "hge_test.h"
int Pointer::getNumb()
{
return numb;
}
void Pointer::setNumb(int numb)
{
this->numb = numb;
}
int Pointer::getCurNumb()
{
return numb_current;
}
void Pointer::setCurNumb(int numb)
{
numb_current = numb;
}
int Pointer::getGoal()
{
return goal_numb;
}
void Pointer::setGoal... |
#pragma once
#ifndef MAIN_SCREEN_H
#define MAIN_SCREEN_h
#include "Screen.h"
#include "Utils.h"
#include "Texture.h"
class MainScreen: public Screen
{
private:
Texture *menu[Menu::TOTAL_MENU];
Menu actualOption{Menu::NEW_GAME};
Menu previousOption{Menu::NEW_GAME };
TTF_Font* font;
SDL_Color red;
SDL_Color sele... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Battipaglia.h"
#include "ShipAIController.h"
#include "BattipagliaPawn.h"
AShipAIController::AShipAIController(const FObjectInitializer & OI) : Super(OI)
{
PrimaryActorTick.bCanEverTick = true;
}
void AShipAIController::Possess... |
#pragma once
#include "Sprite.hpp"
#include <SFML/Graphics.hpp>
#include <string>
#include <map>
#include <set>
enum class WallFlags : int {
COLLIDE = 0x01,
DOOR = 0x02,
SECRET = 0x04,
};
struct Wall {
union {
unsigned value;
struct {
unsigned north : 6;
unsigned east : 6;
unsigned south : 6;
... |
#include <iostream>
#include <cmath>
#include <climits>
using namespace std;
int main() {
static int len1 = 0;
cin >> len1;
int arr1[len1];
for (int i = 0; i < len1; ++i) {
cin >> arr1[i];
}
static int minvalue = INT_MAX;
if (len1 == 1) {
minvalue = 0;
} else if (len1 ... |
#pragma once
#include <queue>
#include <mutex>
#include <GLFW/glfw3.h>
#include <glad/glad.h>
enum class EventType { Key, MouseMove, MouseButton, WindowClose, WindowResize };
struct Event
{
EventType category;
union {
struct Key { int keycode, scancode, action, mods; } Key;
struct MouseMove { double x, y; } Mo... |
#include "mVector.h"
vector<int> buildVector(string in)
{
auto values = split(in.substr(1, in.length() - 2), ',');
vector<int> vec;
for (string s : values)
{
vec.push_back(parseInt(s));
}
return vec;
}
void printVector(vector<int> vec)
{
cout << "(";
if(vec.size()==0){
... |
/******************************************************************************
* *
* Copyright 2018 Jan Henrik Weinstock *
* *
... |
#ifndef TABULEIRO_H
#define TABULEIRO_H
#include "triangulo.h"
#include "vertice.h"
#include "triangulo.h"
#include "plano.h"
class Plano;
class Tabuleiro
{
private:
Plano *base, *parede_norte, *parede_sul;//, *parede_leste, *parede_oeste;
Vertice *pos, vertices_elipse_oeste[15], vertices_elipse_leste[15];
... |
#ifndef PROPERTYTABLES_H
#define PROPERTYTABLES_H
#include <vector>
struct PropertyTables {
std::vector<std::vector<double>> lambda;
std::vector<std::vector<double>> density;
std::vector<std::vector<double>> capacity;
};
void getTable(std::vector<std::vector<double>> &table,
const std:... |
#ifndef BINARY_DECRYPT_INCLUDED
#define BINARY_DECRYPT_INCLUDED
#include "aes256.h"
extern "C" {
extern CryptoPP::byte *Executable;
extern unsigned ExecLen;
}
class BinaryDecrypt {
Cipher::AES256_decryptor Dec;
public:
BinaryDecrypt(const std::string &Psw):
Dec(Psw) {}
void retrieveBinary() {
Dec.dec... |
#include <iostream>
#include <vpp/vpp.hh>
using namespace vpp;
template <typename V, typename U>
bool equals(image2d<V>& v, image2d<U>& u)
{
int eq = true;
pixel_wise(v, u) | [&] (V& a, U& b) { if (a != b) eq = false; };
return eq;
}
template <typename V>
void print(image2d<V>& v)
{
for (int r = 0; r < v.nr... |
// **************************************
// File: KLISTVIEW.h
// Copyright: Copyright(C) 2013-2017 Wuhan KOTEI Informatics Co., Ltd. All rights reserved.
// Website: http://www.nuiengine.com
// Description: This code is part of NUI Engine (NUI Graphics Lib)
// Comments:
// Rev: 2
// Creat... |
#ifndef _RaseProcess_H_
#define _RaseProcess_H_
#include "IProcess.h"
class RaseProcess :public IProcess
{
public:
RaseProcess();
virtual ~RaseProcess();
virtual int doRequest(CDLSocketHandler* clientHandler, InputPacket* inputPacket,Context* pt) ;
virtual int doResponse(CDLSocketHandler* clientHandler, Inp... |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/////////////*/
int decimalPrecision = 2; // decimal places for all values shown in LED Display & Serial Moni... |
#ifndef SUBSTATE_H
#define SUBSTATE_H
#include "Globals.h"
class SubState
{
public:
virtual void init(sf::RenderWindow &window) = 0;
virtual void update(sf::RenderWindow &window, float dt) = 0;
virtual void draw(sf::RenderWindow &window) = 0;
virtual void handleEvents(sf::RenderWindow &window, sf::Event &event) =... |
#include <bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
#define tests int t; cin >> t; while(t--)
#define vll vector<ll>
#define vi vector<int>
#define pb push_back
using namespace std;
struct segTree {
int size = 1;
vll tree;
void init(int n) {
while(size < n) {
size *= 2;
}
tree.... |
#pragma once
#include <glfw/glfw3.h>
#include <glm/glm.hpp>
#include <vector>
class InputHandler
{
public:
static void update();
static void initCallbacks(GLFWwindow* window);
// GET AND SET CURSOR POSITION
static glm::vec2 getCursorPosition();
static void setCursorPosition(GLFWwindow* window, glm::vec2 newPosi... |
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#ifndef THUNK_HH
#define THUNK_HH
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <unordered_map>
#include <limits>
#include <regex>
#include <chrono>
#include <sys/types.h>
#include <crypto++/base64.h>
#in... |
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include "main.h"
#include "main-1.h"
#include "main-2.h"
#define N 100
MON mmm[N]; /* массив-таблица */
int n = 0; /* количество элементов в массиве */
/**** главная функция ****/
int main(void) {
setlocale(LC_A... |
#include "AudioMarkupNavigator.h"
#include "AudioMarkupNavigatorDialog.h"
AudioMarkupNavigator::AudioMarkupNavigator()
{
}
AudioMarkupNavigator::~AudioMarkupNavigator()
{
}
bool AudioMarkupNavigator::requestMarkerId(int& markerId)
{
AudioMarkupNavigatorDialog audioNavigatorDlg;
if (audioNavigatorDlg.exec() == QD... |
#ifndef CPP_2020_RANDOM_FOREST_DECISION_TREE_H
#define CPP_2020_RANDOM_FOREST_DECISION_TREE_H
#include <iostream>
#include <fstream>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include <map>
#include <algorithm>
#include <memory>
#include <cmath>
#include <numeric>
#include <cstdlib>
#inc... |
/****************************************
@_@
Cat Got Bored *_*
#_#
*****************************************/
#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);
#d... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2002 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_TRAVERSAL_H
#define DOM_TRAVERSAL_H
#ifdef DOM2_T... |
#include "mutiplex/InetAddress.h"
#include <arpa/inet.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <assert.h>
#include <stdexcept>
#include "Debug.h"
namespace muti
{
InetAddress::InetAddress(const std:... |
#include <iostream>
#include <string>
int main() {
//std::string x,y;
int x,y;
std::cin >> x;
std::cin >> y;
//x negativ, y negativ
if (x < 0 && y < 0){
std::cout << 3;
}
//x negativ, y positiv
else if (x < 0 && y > 0){
std::cout << 2;
... |
#ifndef ___DEFINE_HPP___
#define ___DEFINE_HPP___
#define FINLINE __forceinline
#define MINLINE __inline
#define NINLINE
#define FCALL __vectorcall
#define CCALL __cdecl
#define PRIVATE static
#define PUBLIC
#define RCAST(type, target) reinterpret_cast<type>(target)
#define SCAST(type, target) static... |
#ifndef HEADER_CURL_HTTP_H
#define HEADER_CURL_HTTP_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| ... |
#pragma once
#include"Anyinclude.h"
#include"Collider.h"
class ObjColli
{
public:
ObjColli(sf::Texture* texture, sf::Vector2f size, sf::Vector2f position);
~ObjColli();
void Draw(sf::RenderWindow& window);
sf::Vector2f GetPosition() { return body.getPosition(); }
sf::FloatRect GetGlobalbound() { return body.get... |
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define fn(i ,st, n) for(int i = st; i < n; i++)
ll gcd(ll a, ll b){if(b == 0) return a; return gcd(b, a % b);}
ll _power(ll a, ll n, ll mod) {ll p = 1;while (n > 0) {if(n%2) {p = p * a; p %= mod;} n >>= 1;a *= a; a %= mod;} return p % mod;}
ll _modI... |
/*
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
*/
#pragma once
#include <cstddef>
namespace Push
{
template<typename T>
struct TypeID
{
static constexpr size_t v... |
#include <algorithm>
#include "Log.hpp"
#include "CommunicationPair.hh"
using namespace boost::asio;
CommunicationPair::CommunicationPair()
{
this->_counter = 0;
}
CommunicationPair::CommunicationPair(const CommunicationPair &other)
{
this->_first = other.getPair().first;
this->_second = other.getPair().second... |
#include "../pch.h"
#include "Texture.h"
#include <WICTextureLoader.h>
#include <DDSTextureLoader.h>
Texture::Texture()
{
}
Texture::~Texture()
{
m_texture.Reset();
}
bool Texture::Initialize(std::shared_ptr<Graphics> graphics, wchar_t* fileName)
{
m_Graphics = graphics;
if (!LoadFromFile(fileName)) {
return f... |
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <climits>
#include <ctime>
#include <complex>
#include <cmath>
#include <string>
#include <cctype>
#inc... |
//
// Created by legen on 06-Jan-20.
//
#include "stivaString.h"
bool SStack::isEmpty() {
return first==nullptr;
}
void SStack::push(std::string val){
if(first==nullptr)
{
first=new nodeS;
first->inf=val;
first->next= nullptr;
}
else
{
nodeS *p=new nodeS;
... |
//
// Clock.h
// Odin.MacOSX
//
// Created by Daniel on 04/06/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#ifndef __Odin_MacOSX__Clock__
#define __Odin_MacOSX__Clock__
#include "NumericTypes.h"
namespace odin
{
namespace core
{
/// \brief Manages the elapsed time from the creation of t... |
class Solution {
public:
vector<int> searchRange(vector<int>& nums, int target) {
int l=0, r=nums.size()-1;
int mn = -1, mx = -1;
while(l<=r){
int m = (l+r) / 2;
if(nums[m] == target){
mn = m;
r = m - 1;
}
else i... |
#include "Assets.h"
std::map<std::string, SpriteInfo> Assets::sprites;
void Assets::loadAssets()
{
sprites["ammocrate"] = SpriteInfo("Content/Textures/ammocrate.png");
sprites["grassblock"] = SpriteInfo("Content/Textures/grass_block.png");
sprites["tilegrassblock"] = SpriteInfo("Content/Textures/grass_blo... |
#include <iostream>
#include "options.h"
#include "integrator.h"
#include "int_euler.h"
#include "int_rungekutta2.h"
#include "int_rungekutta4.h"
#include "int_rungekutta5.h"
#include "int_rungekutta7.h"
#include "parameter.h"
#include "tbp1D.h"
#include "rtbp1D.h"
#include "tbp3D.h"
#include "rtbp3D.h"
... |
#ifndef userList_h
#define userList_h
#include "user.h"
const int Max_Users = 50;
typedef tUser *tUserPtr;
typedef tUserPtr tArrayUsers[Max_Users];
typedef struct
{
tArrayUsers list;
int counter;
}tUserList;
void initialize(tUserList &users); //Initialize a list of users
bool load(tUserList &users, std::string d... |
#ifndef apso_h
#define apso_h
#include <vector>
#include <algorithm>
#include <iostream>
#include "../tiny-dnn/tiny_dnn/tiny_dnn.h"
using tiny_dnn::vec_t;
class AdaptiveSwarmParameters{
public:
unsigned seed;
double inirtiaWeight;
double maxInirtiaWeight;
double minInirtiaWeight;
double loc... |
#include "BuildParser.h"
#include "Build.h"
#include "ReturnCode.h"
#include "Logging.h"
#include "File.h"
#include <string>
#include <tinyxml/tinyxml.h>
#include <boost/regex.hpp>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
//-----------------------------------------------------------------... |
#include "../inc/pac.hpp"
//#include "../inc/Game.hpp"
int main(int argc, char **argv)
{
std::string line;
char *text;
int i = 0;
int j = 0;
std::vector<char*> readed;
if (argc == 2 && argv[1])
{
int count = 0;
std::ifstream map (argv[1]);
if (map.is_open())
{
... |
#include "IBOR.h"
#include "Curve.h"
void IBOR::adjustCurveToPriceFairly(Curve& c) const
{
double marketDF = 1.0/(1.0+m_rate*m_expiry/100);
c.setDiscountFactorToLaterPoint(m_expiry,marketDF);
}
|
#pragma once
#include "../../../GameComponents/Animation.h"
#include "../../Entity.h"
#include "../../Apple/Apple.h"
class ManThrowBowl:public Entity
{
public:
ManThrowBowl(vector<D3DXVECTOR2> listpos);
~ManThrowBowl();
Animation* ThrowAnimate;
Animation* mCurrentAnimate;
bool AllowThrow = true;
void Update(Entit... |
/**
* @file mini_sdp/util.cc
* @brief
* @version 0.1
* @date 2021-01-07
*
* @copyright Copyright (c) 2021 Tencent. All rights reserved.
*
*/
#include <cstring>
#include "util.h"
namespace mini_sdp {
std::vector<StrSlice> StrSplit(const char* data, size_t len, char chr, bool is_remove_space) {
std::vect... |
#pragma once
#include"stdfax.h"
class Barrier_method
{
private:
vector_2d X0;
double r, C, eps;
void input(string Filename);
double F(double X, double Y, double Rk);
public:
int Num_iteration = 0;
int Num_calculation = 0;
Barrier_method(string Filename);
Barrier_method(vector_2d X, double R, double c, do... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.