text stringlengths 8 6.88M |
|---|
#pragma once
#ifndef PLAYER_H
#define PLAYER_H
#include <GameObject.h>
#include <Rigidbody.h>
namespace NoHope
{
class Player : public GameObject
{
public:
Player(int x, int y, int width, int height, Texture *texture, Shader *shader, b2World* world);
~Player();
//void Init(Vec2 position, float angle, Vec2 s... |
#include <iostream>
#include <algorithm>
using namespace std;
using ll=long long;
const int maxn = 2005;
int n, k;
ll p;
ll a[maxn];
ll b[maxn];
bool check (ll x);
int main () {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cin >> n >> k >> p;
for (int i ... |
#pragma once
#include <string>
#include <cstdint>
#include <vector>
#include <utility>
#include <boost/variant/recursive_variant.hpp>
#include <boost/optional/optional.hpp>
#include "iterators.hpp"
#include "token_definitions.hpp"
#include "function_manager.hpp"
// TODO: separate these into multiple files so you ca... |
vector<pii> edges[MAXN];
//接受的图为vector<pii>,同时需要修改feach
int sccn[MAXN];
int dfn[MAXN];
int low[MAXN];
int dfc,cscc;
stack<int> S;
void tarjan(int now)
{
low[now]=dfn[now] = ++dfc;//增加时间戳
S.push(now);//在堆栈中放入点
feach(edges[now],i)
{
int to = i->x;
if(!dfn[to])
tarjan(to),low[now] = min(low[now],lo... |
#include <bits/stdc++.h>
using namespace std;
#define For(x) for(int i = 0; i < x; i++)
#define For2(x) for(int j = 0; j < x; j++)
#define For3(x) for(int k = 0; k < x; k++)
#define Forv(vector) for(auto& i : vector)
#define Forv2(vector) for(auto& j : vector)
#define show(vector) for(auto& abcd : vector){cout<<abcd<<"... |
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include <QMessageBox>
#include "processlist.h"
#include "about.h"
#include "globals.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJE... |
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
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 a... |
#pragma once
#include "common.h"
#include "operations/operations.h"
#include "streams/constantstream.h"
#include "tablestring.h"
NAMESPACE_BEGIN(NAMESPACE_BINTABLE)
class BinTableStringSkipOperation :public ReadWriteOperation {
public:
BinTableStringSkipOperation();
void operator()() override;
};
... |
class VolhaLimo_TK_CIV_EP1;
class VolhaLimo_TK_CIV_EP1_DZE: VolhaLimo_TK_CIV_EP1 {
scope = 2;
displayname = "$STR_VEH_NAME_GAZ_BLACK";
vehicleClass = "DayZ Epoch Vehicles";
fuelCapacity = 100;
class HitPoints;
class HitLFWheel;
class HitLBWheel;
class HitRFWheel;
class HitRBWheel;
class HitFuel;
class HitEng... |
#include "qfile.h"
qFile::qFile(void)
{
}
qFile::~qFile(void)
{
}
|
#include "common.h"
#include "RequestChannel.h"
#include "MQreqchannel.h"
#include <mqueue.h>
using namespace std;
/*--------------------------------------------------------------------------*/
/* CONSTRUCTOR/DESTRUCTOR FOR CLASS R e q u e s t C h a n n e l */
/*-----------------------------------------------------... |
#include<bits/stdc++.h>
#include"print.h"
using namespace std;
void randomNumberGeneration()
{
string s;
cout<<"Enter the file name to create: ";
cin>>s;
ofstream f(s);
int n;
cout<<"Enter n: ";
cin>>n;
f<<n;
f<<endl;
for(int i=0;i<n;i++)
{
f<<rand()<<" ";
}
};
|
// Created on: 1999-05-13
// Created by: data exchange team
// Copyright (c) 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 ... |
#include"ybFileHangle.h"
NS_YB_BEGIN
bool FileHandle::Open(const char* name)
{
if (0 == yb_fopen(&fp, name, "rb"))
return true;
else
return false;
}
bool FileHandle::Create(const char* name)
{
if (0 == yb_fopen(&fp, name, "wb"))
return true;
else
return false;
}
bool FileHandle::Append(const char* name)
{
... |
/****************************************************************************
* *
* Author : lukasz.iwaszkiewicz@gmail.com *
* ~~~~~~~~ *
* Date... |
/* -*- 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.
*
*/
#include "core/pch.h"
#if defined(CRYPTO_ENCRYPTED_FILE_SUPPO... |
#ifndef PD443X_h
#define PD443X_h
#include "Arduino.h"
class PD443X
{
public:
PD443X(int Adr0,int Adr1,int Adr2,int CE,int RST,int WR,int latch,int clock,int data);//set pinout
void SendByte(char a,byte column); //send individually ascii to individually digit on display
void ClrDisp();//clear displ... |
#pragma once
#include <iberbar/Lua/LuaBase.h>
namespace iberbar
{
class __iberbarLuaApi__ CLuaDevice
: public CRef
{
public:
CLuaDevice();
~CLuaDevice();
public:
void Initial();
void AddLuaPath( const char* strFile );
CResult ExecuteFile( const char* strFile );
CResult ExecuteSource( const char*... |
#include <iostream>
#include <queue>
#include <deque>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <math.h>
#include <string.h>
#include <bitset>
#include <cmath>
using namespace std;
string str = "";
bool judge(char c)
{
for (int i = 0; i < 3; ... |
#include <OGLML/Particles.h>
#include <OGLML/Texture2D.h>
#include <OGLML/Shader.h>
#include <OGLML/QuadRender.h>
#include <glew.h>
#include <cassert>
using namespace oglml;
Particles::Particles()
{
glGenBuffers(1, &m_colorsVBO);
glGenBuffers(1, &m_offsetsVBO);
}
void Particles::SetNumber(std::size_t size)
{
a... |
// Copyright (c) 2020 ETH Zurich
//
// 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 <pika/functional/detail/tag_fallback_inv... |
//忘记纪录了 啥都没有 下次做再看看吧
//hash 12ms 58.80%
class Use_for_quicksort{
public:
int compare;
int store_one;
};
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
int length = nums.size();
Use_for_quicksort* hash = new Use_for_quicksort[30000];
Use_for_quicksort... |
#pragma once
#include <spdlog/common.h>
#ifdef SPDLOG_JSON_LOGGER
#include <spdlog/details/log_msg_buffer.h>
#include <spdlog/json.h>
namespace spdlog {
class logger;
namespace details {
class SPDLOG_API executor
{
private:
struct context
{
logger *lgr;
log_msg_buffer msg;
bool lo... |
#ifndef CELL_H
#define CELL_H
namespace Minesweeper {
class Cell {
private:
bool _isVisible = false;
bool _hasMine = false;
bool _isMarked = false;
int _numOfMinesAround = 0;
public:
bool isVisible() const;
bool hasMine() const;
bool isMarked() const;
int numOfMinesAround() const;
void inc... |
static char val = LOW;
void blink(){
val = !val;
}
void setup() {
pinMode(PC13, OUTPUT);
pinMode(PA0, INPUT_PULLUP);
attachInterrupt(0, blink, FALLING);
}
void loop() {
digitalWrite(PC13, val);
}
|
#pragma once
#include "entities/entity.hpp"
#include "city.hpp"
struct Position : ecs::ComponentCRTP<ecs::Component::Position, Position> {
Position(Point p) : pos(p) { }
inline City& city() { return *pos.city; }
inline int x() const { return pos.x; }
inline int y() const { return pos.y; }
inline Point as_p... |
#include "Storage-TTL.hh"
#include "Checksum.hh"
#include "TypeOfService.hh"
#include "Timestamp.hh"
#include "IPCoverTiming.hh"
#include "AlgorithmManager.hh"
#include "Format.hpp"
#include <regex>
#include <iostream>
//Initialization of the ressources and properties of Algorithm Manager command
AlgorithmManager::Alg... |
#include <cmath>
#include <iostream>
#include <fstream>
#include <specex_spot.h>
#include <specex_trace.h>
#include <specex_linalg.h>
#include <specex_message.h>
#include <specex_spot_array.h>
#include <specex_vector_utils.h>
#include <specex_unbst.h>
specex::Trace::Trace(int i_fiber) :
fiber(i_fiber)
{
synchron... |
#pragma once
#include <QWidget>
class Alime_ContentWidget;
using ContentWidgetCreator=
std::function<Alime_ContentWidget*(QWidget*)>;
class Alime_ContentWidget : public QWidget
{
Q_OBJECT
public:
Alime_ContentWidget(QWidget* parent = Q_NULLPTR);
QString GetTitle();
QString GetIcon();
int GetSh... |
/*
========================================================================
DEVise Data Visualization Software
(c) Copyright 1992-1996
By the DEVise Development Group
Madison, Wisconsin
All Rights Reserved.
========================================================================
Under no circumstances ... |
/*
* Copyright 2016 Bonn-Rhein-Sieg University
*
* Author: Santosh Thoduka
* Based on code by: Sergey Alexandrov
*
*/
#include <ros/ros.h>
#include <tf/transform_listener.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/PCLPointCloud2.h>
#include <pcl/conversions.h>
#include <pcl/co... |
/***********************************************************
File name: Adeept6LegSpiderRobot.ino
Description: In the example code provided, the robot supports 2 working modes:
remote control and automatic obstacle avoidance.
Under the remote control mode, you can make the bot stand, squat, go forward and backward,... |
//知识点:并查集
/*
本题中有三种生物 ,
故也有三种关系
简单维护两个并查集并不可取
所以试着维护三个并查集:
开三倍空间的并查集 ,
1~n , 存同类
n+1~2*n , 存猎物
2*n+1~3*n 存天敌
如果x和y是同类 ,
则将 x,y并集 ,
将x+n,y+n(即x,y的猎物)并集 ,
将x+2*n,y+2*n(即x,y的天敌)并集
如果x是y的敌人 ,
则将 x和y的敌人y+2*n并集 ,
将x的猎物x+n 和 y的敌人y+2*n 并集 ,
将x的敌人x+2*n和y的猎物y+n并集.
每次查询时,查询x,y和对方的猎物,敌人关系
是否... |
#ifndef MAP_H_
#define MAP_H_
#include "Figure.h"
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include "livingFigure.h"
typedef std::string string;
class Map {
public:
Map(bool ignoreInvisibility);
Map(std::string filename);
virtual ~Map();
void addCollisionFigure(Figure *figure);
... |
#pragma once
#ifdef __APPLE__
#include <SDL/SDL.h>
#else
#include <SDL.h>
#endif
#include "../Core.h"
namespace gfx {
SDL_Color getPixel (int x, int y, int width, int height, SDL_Surface* screen) {
SDL_Color color ;
Uint32 col = 0 ;
if ((x>=0) && (x<800) && (y>=0) &&... |
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
int query(char t, int v) {
cout << t << " " << v + 1 << endl;
int res;
cin >> res;
return res - 1;
}
void answer(int v) {
cout << 'C' << " " << (v < 0 ? -1 : v + 1) << endl;
}
void solve() {
int n;
... |
/**
* @file kdtree.cpp
* Implementation of KDTree class.
*/
#include <utility>
#include <algorithm>
#include <cmath>
#include <stdlib.h>
#include <math.h>
using namespace std;
template <int Dim>
bool KDTree<Dim>::smallerDimVal(const Point<Dim>& first,
const Point<Dim>& second, int ... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define N 100
/*
write a method to replace all spaces in a string with '%20'
my solution:
firstly,i thought how to make the movement least.but the program is to complicated.
so , I sacrificed the space,copyed all the chars in original to the temp array... |
#pragma once
#include <SFML/Audio.hpp>
class Music
{
public:
static sf::Music backgroundMusic;
static void playMusic();
};
|
#include<iostream>
#include <string>
using namespace std;
struct Tree
{
int num_pass;;
string surname;
Tree *left, *right;
} *root;
int kol = 0;
int i = 0;
int *data_num = new int[100];
string *name = new string[50];
Tree *Del_Info(Tree **root, int pas)
{
Tree *Del, *Prev_del, *T, *Prev_t;
Del = *root;
Prev... |
// you can use includes, for example:
// #include <algorithm>
// you can write to stdout for debugging purposes, e.g.
// cout << "this is a debug message" << endl;
int solution(vector<int> &A) {
// write your code in C++14 (g++ 6.2.0)
double avg_2=0;
double avg_3=0;
double g_min=((double)A[A.size()-1]... |
#include <iostream>
#include <cstring>
using namespace std;
// Calculate number of set bits in number!
// time is O(no of bits)
int countSetBits(int n) {
int count = 0;
while(n>0) {
count+= (n&1);
n = n >> 1;
// cout << count;
}
return count;
}
// Here Time will be O(no of set... |
/*********************************************************\
* Copyright (c) 2012-2018 The Unrimp Team
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without
* restriction, including wit... |
/* XMRig
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* 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
* ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 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"
#ifdef MEDIA_HTML_... |
#include "AssetsDataBase.h"
#include "AssetsFactory.h"
void CAssetsDatabase::LoadSprite( Sprites::E sprite )
{
if( !m_sprites.count(sprite) )
if ( auto pSprite = CAssetsFactory::CreateSprite( sprite ) )
{
m_sprites[sprite] = pSprite;
}
}
void CAssetsDatabase::LoadModel( Models::E model )
{
if ( !m_models.c... |
#include "StdAfx.h"
#include "Missile.h"
CMissile::CMissile(void)
{
live=false;
type=0;
x=0;
y=0;
live_time=0;
speed_x=0;
speed_y=0;
angle=0;
distance=0;
gravity=0;
type2=0x0;/////////// 1 좌우 벽튕 중력 유도(스무스) 유도 속도sin 각도+- 직선
/////////// 2 점점가속도
init_missile(... |
#ifndef _CS2420_GRAPH_H
#define _CS2420_GRAPH_H
#include <iostream>
#include <list>
#include <string>
#include <vector>
#include <sstream>
namespace cs2420 {
class Graph {
protected:
const int v;
int e = 0;
std::list<int> *adj;
public:
Graph(int v) : v(v), adj(new std::list<int>[v]{}){}
int V() { return v... |
/*
struct Node {
int data;
struct Node *next;
Node(int x) {
data = x;
next = NULL;
}
};
*/
// function should insert node at the middle
// of the linked list
Node* insertInMiddle(Node* head, int x)
{
// only gravity will pull me down
// Insert in Middle of Linked List
Node* tmp=head;
Node* st=he... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "NeuralNetworkWidget.h"
#include "NeuralNetwork/Manager/NeuralNetworkManager.h"
#include "Libraries/GeneticFL.h"
#include "GeneticAIGameModeBase.h"
void UNeuralNetworkWidget::NativeConstruct()
{
Super::NativeConstruct();
Manage... |
#include"db.h"
db::~db()
{
if(sqlite3_close(sdb)==0);
// return 0;
//else return 1;
}
int db::openDB(char filename[128])
{
if(sqlite3_open(filename,&sdb)==0)
return 0;
else return 1;
}
int db::creatDB(char filename[128])
{
if(sqlite3_open(filename,&sdb)==0)
return 0;
else return 1;
}
int db::creatTab()
{
i... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.... |
#ifndef OPENMM_GKNPFORCEIMPL_H_
#define OPENMM_GKNPFORCEIMPL_H_
/* -------------------------------------------------------------------------- *
* OpenMM-GKNP *
* -------------------------------------------------------------------------- */
#include "GKN... |
//
// Created by Yujing Shen on 29/05/2017.
//
#ifndef TENSORGRAPH_MOMENTUMOPT_H
#define TENSORGRAPH_MOMENTUMOPT_H
#include "../SessionOptimizer.h"
namespace sjtu{
class MomentumOpt: public SessionOptimizer
{
public:
MomentumOpt(Session*, Dtype lr, Dtype momentum = 0.9f);
virtual ~Momentu... |
/*
* Copyright 2016 Freeman Zhang <zhanggyb@gmail.com>
*
* 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 applic... |
#ifndef JACOBI_H
#define JACOBI_H
#include <coefficients/coefficients.h>
#include <settings/settings.h>
#include <matrix/matrix.h>
/*!
\file
\brief This function the system of linear differential equations using
Jacobi approach
*/
/**
Solves the system of linear differential equations and computes the Temperature
at... |
#include "IocpServer.h"
// Server startup
int main()
{
std::cout << "Hello Server!\n";
IocpServer server(IocpServer::ListenType_IPC, "12345");
server.Run([&server](const LSocket& socket, const char* data, DWORD size) {
std::string dataStr = std::string(data, size);
std::cout << "server rec... |
#include "BSP.h"
#ifndef __Sensor_H
#define __Sensor_H
class Sensor {
//SystemClock systemClock;
public:
// Constructor
Sensor();
// Destructor
virtual ~Sensor();
uint16_t getValue();
Boolean getTurnOn();
v... |
#pragma once
#include "TestDB.h"
#pragma warning(push)
#pragma warning(disable:4100) // unreferenced formal parameter
#pragma warning(disable:4127) // conditional statement is const
#pragma warning(disable:4244) // type conversion: possible data loss
#pragma warning(disable:4245) // signed/unsigned mismatch
#inc... |
#include "TrustchainBuilder.hpp"
#include <Helpers/UniquePath.hpp>
#include <Tanker/DeviceKeys.hpp>
#include <Tanker/EncryptedUserKey.hpp>
#include <Tanker/Entry.hpp>
#include <Tanker/Errors/Errc.hpp>
#include <Tanker/GhostDevice.hpp>
#include <Tanker/Serialization/Serialization.hpp>
#include <Tanker/Trustchain/Server... |
#ifndef __MINIDUMP_H_
#define __MINIDUMP_H_
#include <windows.h>
class CMiniDumper
{
public:
CMiniDumper(bool bPromptUserForMiniDump = true);
~CMiniDumper(void);
private:
static LONG WINAPI UnhandledExceptionHandler(struct _EXCEPTION_POINTERS *pExceptionInfo);
void SetMiniDumpFileName(t... |
#ifndef JNI_REFLECTION_UTILITY_H
#define JNI_REFLECTION_UTILITY_H
#include <jvmti.h>
#include <string>
/**
* Global JVMTI instance
*/
extern jvmtiEnv *jvmti;
void initialize(JNIEnv *env);
void throwError(JNIEnv *env, const std::string &message);
void throwError(JNIEnv *env, const std::string &errorClassName, ... |
/**
* @file Nonlocal.hpp
*
* @brief This header contains a mixin that disallows objects being allocated
* on the stack, forcing them to be used in dynamic memory
*
* @author Matthew Rodusek (matthew.rodusek@gmail.com)
* @date June 10, 2015
*/
#ifndef VALKNUT_CORE_NONLOCAL_HPP_
#define VALKN... |
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <algorithm>
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
... |
#include "static_shader.h"
namespace sloth {
StaticShader::StaticShader()
:Shader(STATIC_VERTEX_FILE, STATIC_FRAGMENT_FILE)
{
getAllUniformLocation();
connectTextureUnit();
}
void StaticShader::connectTextureUnit()
{
glProgramUniform1i(m_ID, m_LocDiffuseMap, 0);
glProgramUniform1i(m_ID, m_LocSpeculateM... |
// Copyright 2012 Yandex
#ifndef LTR_LEARNERS_LINEAR_LEARNER_LINEAR_LEARNER_H_
#define LTR_LEARNERS_LINEAR_LEARNER_LINEAR_LEARNER_H_
#include <Eigen/Dense>
#include <logog/logog.h>
#include <string>
#include <vector>
#include "ltr/utility/shared_ptr.h"
#include "ltr/learners/learner.h"
#include "ltr/scorers/linear_... |
#ifndef TREEFACE_SCENE_GRAPH_MATERIAL_H
#define TREEFACE_SCENE_GRAPH_MATERIAL_H
#include "treeface/scene/Material.h"
#include "treeface/math/Mat4.h"
#include <treecore/Identifier.h>
#define GLEW_STATIC
#include <GL/glew.h>
namespace treeface {
class SceneGraphMaterial: public Material
{
friend class MaterialMa... |
#include <iostream>
struct Rect {
int width;
int heigth;
Rect( int x, int y ) { // constructor
width = x;
heigth = y;
}
int area( int, int );
};
int Rect::area( int width, int heigth) {
return width * heigth;
}
// A function to merge the two half into a sorted data.
void merge(int arr[], int l... |
#include "SatSolver.h"
using namespace std;
void SatSolver::checkInvariant(){
#ifndef NDEBUG
// check sizes.
if(_model.size() > _numVar){
cout << "model too big :" << _model.size() << " " << _numVar << endl;
printModel();
cout << endl;
assert(false);
}
assert(_used.si... |
#include <cstdio>
using namespace std;
int main(){
const int N=5;
typedef int vecto[N];
vecto Urna;
int nota;
printf("Introduzca nota Mates, Quimica, Lengua, Historia y Economia: ");
for(int i=0; i<N;i++){
scanf("%d", ¬a);
Urna[i] = nota;
}
for(int i=0; i<N;i++){
switch... |
// avr-libc library includes
#include <avr/io.h>
#include <avr/interrupt.h>
#define LEDPIN 2
#define INPUTPIN 3
void setup()
{
pinMode(LEDPIN, OUTPUT);
pinMode(INPUTPIN, INPUT);
// initialize Timer1
cli(); // disable global interrupts
TCCR1A = 0; // set entire TCCR1A registe... |
//
// AcidResampler.cpp
// SRXvert
//
// Created by Dennis Lapchenko on 06/05/2016.
//
//
#include "AcidResampler.h"
using namespace AcidR;
AcidResampler::AcidResampler()
{
}
AcidResampler::~AcidResampler()
{
}
bool AcidResampler::resample(AcidAudioBuffer *inputBuffer, AcidAudioBuffer *outputBuffer, double newS... |
#include "SVP.h"
SVP::SVP(QWidget *parent)
: QMainWindow(parent)
{
ui = new Ui::SVPClass();
ui->setupUi(this);
connect(ui->buttonRedraw, SIGNAL(clicked()), this, SLOT(buttonRedrawClicked()));
connect(ui->buttonVar, SIGNAL(clicked()), this, SLOT(buttonVarClicked()));
integrator = new RungeKuttaIntegrator(nullp... |
#pragma once
#include <string>
#include <vector>
#include <embree2/rtcore.h>
#include "Material.h"
class TriangleMesh
{
// Embree Data
unsigned geomID = RTC_INVALID_GEOMETRY_ID;
RTCScene scene = nullptr;
// Vertex Streams
struct Normal* n = nullptr;
struct TextureCoord* uv = nullptr;
public:
TriangleMesh() ... |
#ifndef __SERVER_NET_TCP_SERVER_SOCKET_H_INCLUDED__
#define __SERVER_NET_TCP_SERVER_SOCKET_H_INCLUDED__
#include <netdb.h>
#include <communicating_tcp_socket.hpp>
namespace server {
namespace net {
class tcp_server_socket : public generic_socket {
public:
explicit tcp_server_socket();
voi... |
// ArdcodeCreator.h - Creates code for arduino
#ifndef NEOPIXELCODECONVERTER_h
#define NEOPIXELCODECONVERTER_h
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <LightParameter.h>
using namespace std;
/** \class NeoPixelCodeConverter
* \brief Responsible for creating code for th... |
#ifndef NOTIFYPROVIDER_H
#define NOTIFYPROVIDER_H
#include <QObject>
#include <logmonitor.h>
#include <SMSReciever.h>
#include <QDateTime>
#include <CenRepObserver.h>
#include <qcontactfetchrequest.h>
#include <QSettings>
#include <const.h>
#include <QDebug>
#include <e32base.h>
QTM_USE_NAMESPACE
con... |
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdlib>
using namespace std;
class Cell
{
public :
int row;
int column;
};
class mazeSolver
{
public:
int rows, cols;
Cell start, finish;
bool isPath;
vector<Cell> path;
void toSolve(bool **maze);
bool solve_recursive(bool **maze, ... |
#include <YunClient.h>
#include <Console.h>
#include <Bridge.h>
#include <BridgeServer.h>
#include <Mailbox.h>
#include <BridgeSSLClient.h>
#include <HttpClient.h>
#include <FileIO.h>
#include <Process.h>
#include <BridgeClient.h>
#include <YunServer.h>
#include <SPI.h>
#include <YunClient.h>
#include <IPStack.h>
#incl... |
// OgreEditorDoc.cpp : implementation of the CTerrainEditorDoc class
//
#include "stdafx.h"
#include "OgreEditor.h"
#include "OgreEditorDoc.h"
#include "Editor.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// COgreEditorDoc
IMPLEMENT_DYNCREATE(COgreEditorDoc, CDocument)
BEGIN_MESSAGE_MAP(COgreE... |
#ifndef NMOS_SDP_UTILS_H
#define NMOS_SDP_UTILS_H
#include "bst/optional.h"
#include "cpprest/basic_utils.h"
#include "sdp/json.h"
#include "sdp/ntp.h"
#include "nmos/did_sdid.h"
#include "nmos/rational.h"
#include "nmos/vpid_code.h"
namespace nmos
{
struct sdp_parameters;
// Sender helper functions
nam... |
#include "libnet.h" |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GeneticAI.h"
#include "UObject/NoExportTypes.h"
#include "Population.generated.h"
class USpecimen;
class ANeuralNetworkManager;
/**
*
*/
UCLASS()
class GENETICAI_API UPopulation : public UObject
{
GENERATED_BOD... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; 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 BOOLVECTOR_H
#define BOOLVECTOR_H
#include "modules/se... |
#ifndef DATABASE_H
#define DATABASE_H
#include <iostream>
#include <string>
#include <vector>
#include "scientist.h"
#include <fstream>
#include <cstdlib>
#include <QCoreApplication>
#include <QtSql>
#include "computer.h"
class database
{
public:
database();
bool getDatabase();
vector<Scientist> createSciV... |
// Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs
// Copyright (c) 2018-2023 Conceal Network & Conceal Devs
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.... |
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "codegen/il2cpp-codegen.h"
#include "il2cpp-object-internals.h"
template ... |
#include <cstring>
#include <cstdlib>
#define NSCORE 1
#include "nebstructs.h"
#include "nebcallbacks.h"
#include "nebmodules.h"
#include "nebmods.h"
#ifdef HAVE_ICINGA
#include "icinga.h"
#else
#include "nagios.h"
#endif
#include "objects.h"
#include "broker.h"
#include "neberrors.h"
#include "module.h"
std::shared... |
#include <Poco/RegularExpression.h>
#include <Poco/TextConverter.h>
#include <Poco/UTF8Encoding.h>
#include "model/DeviceDescription.h"
using namespace BeeeOn;
using namespace Poco;
using namespace Poco::Net;
using namespace std;
static const RegularExpression NAME_PATTERN(
"[^\\p{L}\\p{Nd} \\.:!?()/,\\-_#''$€¥£©®+... |
/*
* This sketch sends data via HTTP GET requests to api.thingspeak.com service.
*
* You need to get API write Key at api.thingspeak.com and paste them
* below. Or just customize this script to talk to other HTTP servers.
*
*/
#include <ESP8266WiFi.h>
#include <DHT.h>
#define DHTPIN D2 //dht pin connected... |
//: C04:Scoperes.cpp
// Kod zrodlowy pochodzacy z ksiazki
// "Thinking in C++. Edycja polska"
// (c) Bruce Eckel 2000
// Informacje o prawie autorskim znajduja sie w pliku Copyright.txt
// Okreslenie zasiegu globalnego
int a;
void f() {}
struct S {
int a;
void f();
};
void S::f() {
::f(); // Ina... |
#include <iostream>
using namespace std;
int main()
{
int t,n,m,sorted[10000];
long long minsalary[10000],companyoffer[10000][2],sortedpos[10000],companycount,salarycount,totaljob,pos;
string qual[100000];
bool flag;
cin>>t;
for(int k=0;k<t;k--)
{
cin>>n>>m;
for(int i=0;i<n;i++)
... |
/*
* Service_Handler.h
*
* Created on: Jun 11, 2017
* Author: root
*/
#ifndef NETWORK_SERVICE_HANDLER_H_
#define NETWORK_SERVICE_HANDLER_H_
#include <map>
#include <vector>
#include "../define.h"
#include "../Smart_Ptr.h"
#include "../Common.h"
#include "../Thread/Task.h"
#include "InetAddress.h"
#include ... |
/**
* ============================================================================
*
* Copyright (C) 2018, Hisilicon Technologies Co., Ltd. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
... |
//使用するヘッダーファイル
#include"GameL\DrawTexture.h"
#include"GameL\WinInputs.h"
#include"GameL\SceneManager.h"
#include"GameL\DrawFont.h"
#include"GameL\UserData.h"
#include"GameHead.h"
#include"ObjRanking.h"
#include"SceneMain.h"
//使用するネームスペース
using namespace GameL;
//イニシャライズ
void CObjRanking::Init()
{
m_key_flag = fal... |
/*
* This is a minimal example, see extra-examples.cpp for a version
* with more explantory documentation, example routines, how to
* hook up your pixels and all of the pixel types that are supported.
*
*/
/*-------------------------------------------------------------------------
Spark Core library to control... |
#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 ... |
#if !defined is_float_h
#define is_float_h
// for boost::true_type and boost::false_type
#include <boost/type_traits/integral_constant.hpp>
namespace et {
template<typename T> struct is_float : public boost::false_type {};
template<> struct is_float<float> : public boost::true_type {};
te... |
#include<bits/stdc++.h>
using namespace std;
main()
{
char s1[200], s2[]="hello";
while(cin>>s1)
{
int i,j=0;
int len = strlen(s1);
for(i=0; i < len; i++)
{
if(s1[i]==s2[j])
j++;
}
if(j==5)
cout<<"YES"<<endl;
el... |
#include "common.h"
#include <sys/shm.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
int main(){
//定义共享内存结构体
struct ShmEntry *entry;
//1、申请共享内容,参数为key,size和shmfig[IPC_CREAT|(IPC_CREAT|IPC_EXCL)],返回一个共享内存的id
int shmid = shmget((key_t)1111,sizeof(struct ShmEn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.