text stringlengths 8 6.88M |
|---|
#ifndef MODULEFILE_H
#define MODULEFILE_H
class
ModuleFile {
const char* const fname;
ModuleFile(const char* const fname);
public:
static ModuleFile
from(const char* const fnameIn);
const char* get() const;
};
#endif |
#pragma once
#include <vector>
#include <thread>
#include <threadpool/task.h>
#include <threadpool/worker.h>
#include <threadpool/queue.h>
namespace threadpool {
class ThreadPool {
public:
~ThreadPool() {
stop();
}
void start(size_t threadsCount) {
threads_.clear();
for (size_t i... |
#include<iostream>
using namespace std;
class complex{
float re,im;
public:
complex()
{
re=0;
im=0;
}
void input()
{ cout<<"enter real part"<<"\n";
cin>>re;
cout<<"enter imaginary part"<<"\n";
cin>>im;
}
void display()
{
cout<<re<<"+"<<"i"<<im;
}
complex operator+(complex c2);
complex ope... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) Opera Software ASA 2002 - 2011
*
* Bytecode compiler for ECMAScript -- overview, common data and functions
*
* @author Jens Lindstrom
*/
#include "core/pch.h"
#include "modules/ecmascript/... |
#include <vector>
using namespace std;
// 21-02-15
// My Solution (87%)
// empty arry error
vector<int> solution(vector<int> &A, int K) {
if ( A.size() <=0 ) return A; // (100%)
if ( K%A.size()==0 ) return A;
for(unsigned int i=0; i<K%A.size(); i++) {
int num=A.back();
A.pop_back();
... |
// Copyright (c) 2015 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 special ... |
#include <stdio.h>
#include<stdlib.h>
/*Programa que pide al usuario n numeros y llena un vector los organiza en orden
ascendente y los muestra con punteros*/
int main() {
int tam,aux;
int *vec;
printf("Ingrese tamaņo del Vector: ");
scanf("%d",&tam);
vec=new int[tam];
printf("Ingrese Elementos del vecto... |
#include <bits/stdc++.h>
#define MAX 100002
#define WHITE 0 //not_visited
#define GRAY 1 //being visited
#define BLACK 2 //finish visit
using namespace std;
list<int>LISTA[MAX];
char MARC[MAX] = {}, ciclo = false;
int cont = 0;
void DFS(int v);
int main()
{
map<string, int>mapa;
string p1, p2;
int pp = 1;
... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyStructs.h"
#pragma once
#include "GameFramework/Actor.h"
#include "BoltBlock.generated.h"
//就是拿在手上和扔出去的方块
UCLASS()
class FIGHTWITHBLOCK_API ABoltBlock : public AActor
{
GENERATED_BODY()
public:
// Sets default values for t... |
//
// shelpers.cpp
// ShellProgram
//
// Created by Quincy Copeland on 2/3/19.
// Copyright © 2019 Quincy Copeland. All rights reserved.
//
#include "shelpers.hpp"
/*
text handling functions
*/
bool splitOnSymbol(std::vector<std::string>& words, int i, char c) {
if(words[i].size() < 2){ return false; }
... |
int brightness = 0; // how bright the LED is
int fadeAmount = 3;
int sensorLimit = 250;
char val = '0';
const int red1 = 11;
const int red2 = 23;
const int red3 = 24;
const int red4 = 26;
const int red5 = 28;
const int red6 = 30;
const int red7 = 32;
const int red8 = 34;
const int red9 = 36;
const int green1 = 2... |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <memory.h>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <deque>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long... |
#ifndef __TANK_H__
#define __TANK_H__
#include "Graphic.h"
enum Dir { UP, DOWN, LEFT, RIGHT };
class Tank
{
public:
virtual void Display() = 0;
virtual void Move() = 0;
protected:
int m_x;
int m_y;
COLORREF m_color;
Dir m_dir;
int m_step;
};
#endif
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2011 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#include "core/pch.h"
#include "modules/security_manager/includ... |
/*
* PrintService.cpp
*
* Created on: 10/12/2019
* Author: Jean
*/
#include <PrintService.h>
PrintService::PrintService() {
// TODO Auto-generated constructor stub
}
void PrintService::print( mkl_LCD lcd,
Contador *ContadorSeg,
Contador *ContadorSegD,
Contador *ContadorMin,
C... |
#include <ostream>
#include <type_traits>
template<typename T, typename Class, template<typename, typename> typename C>
std::ostream& print_container(std::ostream& os, C<T, Class>& values) {
if constexpr (std::is_same<C<T, Class>, std::stack<T, Class>>::value) {
os << "{ ";
while (!values.empty()) ... |
#include "hill_climber.h"
void HillClimber::draw(
sf::RenderTarget& target,
sf::RenderStates states
) const {
texture.loadFromImage(result);
sprite.setTexture(texture);
states.transform *= getTransform();
target.draw(sprite, states);
}
double HillClimber::pixel_similatity(
const sf::Color &a,
const sf::Color... |
//
// Created by 钟奇龙 on 2019-05-01.
//
#include <iostream>
#include <string>
#include <queue>
using namespace std;
class Node{
public:
int data;
Node *left;
Node *right;
Node(int x):data(x),left(NULL),right(NULL){}
};
string serialByPreOrder(Node *root){
if(!root) return "#!";
string res = to_s... |
/*
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/Arguments.hpp"
#include <iostream>
namespace Push
{
Arguments::Arguments(int argc, char** argv)
{
fo... |
#pragma once
#include "Drawable.h"
#include "Hitbox.h"
#include "includes.h"
class Tile : public Drawable
{
public:
Tile();
Tile(int,std::string);
Tile(int,std::string,std::string);
Tile(int,sf::Texture&);
Tile(int,sf::Texture&,sf::Texture&);
void addWall(std::string);
void deleteWall();
void setWalkable(bool);... |
// RAVEN BEGIN
// bdube: note that this file is no longer merged with Doom3 updates
//
// MERGE_DATE 9/30/2004
#ifndef __GAME_WEAPON_H__
#define __GAME_WEAPON_H__
/*
===============================================================================
Player Weapon
======================================================... |
#include <iberbar/RHI/D3D9/CommandContext.h>
#include <iberbar/RHI/D3D9/Types.h>
#include <iberbar/RHI/D3D9/Device.h>
#include <iberbar/RHI/D3D9/Buffer.h>
#include <iberbar/RHI/D3D9/Shader.h>
#include <iberbar/RHI/D3D9/ShaderState.h>
#include <iberbar/RHI/D3D9/ShaderVariables.h>
#include <iberbar/RHI/D3D9/VertexDecla... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2010 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 ENCODINGS_HAVE_TABLE_DRIVEN &&... |
/*
* @Description:
* @Author: Ren Qian
* @Date: 2020-02-29 03:32:14
*/
#ifndef LIDAR_LOCALIZATION_MAPPING_VIEWER_VIEWER_FLOW_HPP_
#define LIDAR_LOCALIZATION_MAPPING_VIEWER_VIEWER_FLOW_HPP_
#include <deque>
#include <ros/ros.h>
// subscriber
#include "lidar_localization/subscriber/cloud_subscriber.hpp"
#include "l... |
#include "RedisFactory.h"
#include "ConsistentHash.h"
using namespace tinyredis;
CRedisMap::CRedisMap(const VEC_REDIS_PARAM_t& vecParam)
{
for (VEC_REDIS_PARAM_t::const_iterator c_iter = vecParam.begin(); c_iter != vecParam.end(); ++c_iter)
{
CRedisClient* pNew = NULL;
if (c_iter->m_strIp.size() > 0) {
pNew... |
// ::wali::wpds::fwpds
#include "wali/wpds/fwpds/FWPDS.hpp"
// ::wali::wpds::ewpds
#include "wali/wpds/ewpds/EWPDS.hpp"
// ::wali::wpds
#include "wali/wpds/WPDS.hpp"
#if defined(USE_AKASH_EWPDS) || defined(USING_AKASH_FWPDS)
#include "wali/wpds/ewpds/ERule.hpp"
#endif
// ::wali::wfa
#include "wali/wfa/WFA.hpp"
#include... |
/* -*- 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.
**
** Alexander Remen (alexr)
*/
#ifndef WEBMAILMANAGER_H
#define WE... |
// Select your favorite One
//#define CLASSIC
#define MY_APP
// Include API header
#include "rq.h"
#include <iostream>
// Code to Build redqueen.exe
#ifdef CLASSIC
int main( int argc, char *argv[ ] )
{
if( 2 <= argc )
{
for( auto i = 2; i < argc; ++i )
{
if( 0 == strcmp( argv[ i ], "-preview" ) ) { rqS... |
/*
* PI
*/
constexpr double pi() { return std::atan(1)*4; } |
#include <iostream>
#include <vector>
#include <string>
enum AST_Type {
AST_NODE,
AST_EXP,
AST_ID,
AST_BEXP,
AST_UEXP
};
struct AST_Node {
virtual ~AST_Node() {}
virtual std::string prettyPrint() {return "ERROR";}
virtual AST_Type getType() {return AST_NODE;}
};
struct AST_Expression ... |
//
// OCXMLOptions.h
//
// Created by Wes Souza.
//
// ------------------------
// Copyright 2013 Zynga Inc.
//
// 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.apach... |
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");
double x, y, a, b, z, phi;
int choose;
cout << "Введите значение z: " << endl;
cin >> z;
if (z > 0) x = 1 / pow(z, 2) + 2 * z;
else x = 1 - pow(z, 3);
cout << "Введите значение a: " << endl;
cin >> a;
cout <<... |
// Copyright (c) 2011 Alexander Poluektov (alexander.poluektov@gmail.com)
//
// Use, modification and distribution are subject to 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)
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#i... |
// Created on: 1996-11-07
// Created by: Laurent BUCHARD
// Copyright (c) 1996-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... |
#include <iostream>
#include <string>
int main(){
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
std::string a = "qwertyuiopasdfghjklzxcvbnm";
char b;
std::cin >> b;
if (b != 'm'){
for (int i = 0; i < 26; ++i)
if (a[i] == b)
std::cout << a[i+1];
}
else
std::cout << 'q'... |
#include <algorithm>
#include <chrono>
#include <iostream>
#include <vector>
using namespace std::chrono;
void getVectorInitTime() {
std::vector<int> vec(1000);
auto start = high_resolution_clock::now();
for (int i = 0; i < vec.size(); ++i) {
vec[i] = i;
}
auto stop = high_resolution_cloc... |
#include "GnMeshPCH.h"
#include "GnSQLiteQuery.h"
GnSQLiteQuery::GnSQLiteQuery(sqlite3_stmt* pStatement, bool bEof)
: mpStatement( pStatement ), mEof( bEof )
{
#if ( GNUSE_OS == PLATFORM_IOS )
mColumnCount = sqlite3_column_count( pStatement );
#endif
}
gint GnSQLiteQuery::GetFieldDataType(gint iNumColumn)
{
#if ( ... |
#include <string>
#include "NotifyProc.h"
#include "PlayerManager.h"
NotifyProc::NotifyProc()
{
this->name = "NotifyProc";
}
NotifyProc::~NotifyProc()
{
}
int NotifyProc::doRequest(CDLSocketHandler * /*clientHandler*/, InputPacket * /*inputPacket*/, Context * /*pt*/)
{
return 0;
}
int NotifyProc::doResponse(CD... |
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int x,y,i;
void primepro() {
cout << "Type a number: ";
cin >> x;
for(i=1; i<x; i++) {
if(x % i == 0) {
cout << x << " is a composite number." << endl;
break;
} else {
cout << x ... |
#include <iostream>
#include "core/types.h"
#include "core/shader.h"
using namespace std;
uint32_t g_screenWidth = 600;
uint32_t g_screenHeight = 600;
struct Particle
{
Vec2 x0,x1;
Vec2 v0;
};
Particle g_particle;
FILE* g_file;
int g_frame;
bool g_step = false;
bool g_pause = false;
float sqr(float x) { return... |
#include <stdio.h>
#include <stdlib.h>
struct queue
{
int x;
struct queue *next;
};
typedef struct queue Q;
typedef struct queue Q2;
void enqueue(Q **list,int w)
{
Q *p,*temp;
temp=(Q*)malloc(sizeof(Q));
temp->x=w;
temp->next=NULL;
p=*list;
if(p==NULL) {
*list=temp;
}
... |
// MIT License
//
// Copyright (c) 2021 Ferhat Geçdoğan All Rights Reserved.
// Distributed under the terms of the MIT License.
//
#include <iostream>
#include <vector>
#include "../libs/curl4cpp/curl4.hpp"
int main(int argc, char** argv) noexcept {
if(argc < 2) {
std::cout << "Tuc - TinyUrl CLI\n" <<
... |
#pragma once
// Unit 2 WinPCap.pdf
// http://tlc.cuc.edu.cn/Course/Course/showAction/id/30 ¿Î³Ì×ÊÁÏ
// P21-26
class PacketCapture
{
pcap_if_t* alldevs;
pcap_if_t* d;
pcap_t* adhandle;
int no = 0;
char errbuf[PCAP_ERRBUF_SIZE];
public:
~PacketCapture();
int retrieveDeviceList();
int selectAdapter();
int getOrd... |
#ifndef SHOOTOUT_H
#define SHOOTOUT_H
#include <iostream>
using namespace std;
class Agent;
class Item {
protected:
const int id;
static int ID;
public:
Item();
virtual ~Item();
int getID() const;
};
//armors
class Armor:public Item {
protected:
int weigth;
int protection;
public:
... |
#include "Component.hpp"
#include "Entity.hpp"
Component::Component(Entity* parent)
: p(parent), active(true)
{}
bool Component::isActive() const
{
return false;
}
void Component::setActive(bool active)
{
active = active;
} |
#include <algorithm>
#include <array>
#include <concepts>
#include <optional>
#include <string_view>
#include <typeinfo>
template <size_t max_length>
class String {
public:
std::array<char, max_length> symbols;
size_t len;
constexpr String(const char* string, size_t length) : symbols(), len(length) {
... |
#include "Utilities.h"
#include <hgevector.h>
#include <stdlib.h>
#include <math.h>
void Trace( Pos* pos,const Pos& dst,float spd)
{
if(!((*pos)==dst))
{
hgeVector v( dst.x - pos->x , dst.y - pos->y);
v.Normalize();
if(!(abs(dst.x-pos->x) < spd && abs(dst.y-pos->y) < spd))
{
pos->x += v.x*spd;
pos->y ... |
#pragma once
#ifndef _MULTIRECTANGLE_H
#define _MULTIRECTANGLE_H
#include "common.h"
#include "opencv2/core.hpp"
/*
* A class that is able to specify multiple rectangles.
* When this class gets read in from a string, it assumes all the
* separate rectangles are the same size and are all some fixed
* step away fro... |
/* Copyright 2014-2016 Tyler Gilbert, Inc; All Rights Reserved
*
*/
#ifndef UI_EVENT_HPP_
#define UI_EVENT_HPP_
namespace sys {
class SignalEvent;
};
namespace ui {
class Button;
class ListItem;
/*! \brief Event Class
* \details This class defines actionable events (such as
* button presses) that occur within a... |
/*
replay
Software Library
Copyright (c) 2010-2019 Marius Elvert
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 without limitation the rights
to use, copy, mod... |
/*
Name:
Copyright:
Author: Xiaodong Xiao
Date: 2019/10/30 20:11:06
Description: ac
*/
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
int kases; cin >> kases;
while (kases--) {
cin >> str;
int cnt = 0;
int ans = 0;
for (int i = 0; i < str.size(); ++i) {
if (str[i] == 'O') ans... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
int tamanoX=650;
int tamanoY=500;
QImage lienzo = QImage(tamanoX,tamanoY,QImage::Format_RGB32);
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
v... |
#include <bits/stdc++.h>
using namespace std;
#define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0)
#define MAXN 1000000
int table[MAXN+10];
int main(int argc, char const *argv[])
{
string str;
int num;
int lhs,rhs;
int kase = 1;
while( cin >> str ){
memset(table, 0, sizeof(table));
for(int i = 0 ... |
#pragma once
#include "Task.hpp"
namespace models
{
class ModelRepository
{
public:
void registerSpecializedModel(Task model);
bool getModel(const std::string &modelName, Task &model);
};
}
|
#pragma once
#include <map>
#include <string>
#include <ctime>
#include <cstdlib>
#include <iostream>
#include "fstream"
#include <SFML/Graphics.hpp>
class Flashcards
{
private:
Flashcards();
std::map<std::string, std::string> all_words; //contains all words
std::map<std::string, std::string> correct_words;... |
#ifndef usersideConfiguration_h
#define usersideConfiguration_h
#include <Arduino.h>
#include <MyWebserver.h>
#include <configurationSaver.h>
class Configurator{
MyWebserver myServer;
ConfigurationSaver configurationSaver;
public:
void letConfigure(String (&adresses)[5]);
void save();
void... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2012 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#ifndef CANVASWEBGLRENDERBUFFER_H
#define CANVASWEBGLRENDERBUF... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "CSWeapon.generated.h"
class ACSCharacter;
class USkeletalMeshComponent;
class UDamageType;
class UParticleSystem;
UENUM(BlueprintType)
enum class EWeaponSta... |
//
// AABB.h
// Odin.MacOSX
//
// Created by Daniel on 10/10/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#ifndef Odin_MacOSX_AABB_h
#define Odin_MacOSX_AABB_h
#include "Vector3.h"
namespace odin
{
namespace math
{
namespace shape
{
class AABB
{
... |
/********************************************************************************
** Form generated from reading UI file 'dvrnvrplaybackdialog.ui'
**
** Created by: Qt User Interface Compiler version 5.8.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
******************************... |
////////////////////////////////////////////////////////////////////////////////
#include "convex_hull.h"
#include <cellogram/delaunay.h>
#include <cellogram/navigation.h>
#include <igl/edges.h>
#include <igl/boundary_loop.h>
#include <igl/triangle/cdt.h>
#include <igl/triangle/triangulate.h>
#include <geogram/basic/ge... |
#include <iostream>
class Car {
private:
int _speed, _direction;
public:
Car();
Car(int speed, int direction);
~Car();
};
Car::Car() : _speed(0), _direction(0) {
std::cout << "The car has been constructed (0mph:0degrees)\n";
}
Car::Car(int speed, int direction) : _speed(speed), _direction(direction) {
st... |
// Copyright (c) 2018 Mozart Alexander Louis. All rights reserved.
// Includes
#include "tmx_object.hxx"
#include <random>
#include "utils/archive/archive_utils.hxx"
TmxObject::TmxObject(const TMXTiledMap& map, const ValueVector& info) {
// Get center point of calculation
const auto div = Globals::getScreenPositi... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
#define INF 10e10
#define rep(i,n) for(int i=0; i<n; i++)
#define r... |
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)
#define for1(i,n) for(int i=1;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)
const int INF = 1<<29;
const int MOD=1073741824;
#define pp pair<ll,ll>
typedef long long int ll;
bool... |
#include<iostream>
using namespace std;
class time{
public:
static int n;
time():id(++n){
Hr=Min=Sec=0;
cout<<"\nCreated <"<<id;cout<<"> ";display();cout<<"\n";
}
time(int h, int m,int s):id(++n){
Hr=h;Min=m;Sec=s;
cout<<"\nCreated <"<<... |
#include "world.h"
#include <math.h>
World::World(RGB c)
{
background = c;
}
void World::AddObject(Object * obj)
{
objects.push_back(obj);
}
void World::AddLight(PointLight light)
{
lights.push_back(light);
}
HitInfo World::TraceRay(Ray3 ray)
{
HitInfo result;
Vec3 normal;
result.HitObject = NULL;
doub... |
#include <string>
class Resource {
private:
string _name;
int _amount;
public:
Resource(string name);
Resource(string, int initialAmount);
int add(int amount);
int getAmount();
}; |
#include "stdafx.h"
#include "Window.h"
#include "GameNode.h"
#include "IsoMap.h"
POINT Window::ptMouse = POINT{ 0,0 };
CTRL Window::_currentCTRL = CTRL_DRAW;
Window::Window()
{
m_backBuffer = new Image();
m_backBuffer->Init(SUBWINSIZEX, SUBWINSIZEY);
}
Window::~Window()
{
SAFE_DELETE(m_backBuffer);
}
void Win... |
#include "foo.h"
int foo()
{
return 1477;
}
|
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2009 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* Espen Sand
*/
#include "core/pch.h"
#include "adjunct/quick/Ap... |
// siglus.cc
// 5/25/2014 jichi
//
// Hooking thiscall: http://tresp4sser.wordpress.com/2012/10/06/how-to-hook-thiscall-functions/
#include "engine/model/siglus.h"
#include "engine/enginecontroller.h"
#include "engine/enginedef.h"
#include "engine/enginehash.h"
#include "engine/enginesettings.h"
#include "engine/engine... |
// Project_3.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include "ShennonFano.h"
int main()
{
system("chcp 1251");//Установка кодовой страницы
setlocale(LC_ALL, "ru_RU.UTF-8");
//wcout.imbue(locale("rus_rus.866"));
std::wstring test_string = L"Ле... |
/* XMRig
* Copyright (c) 2014-2019 heapwolf <https://github.com/heapwolf>
* 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 ... |
#include "ticket.h"
std::ostream &operator << (std::ostream &os, const Seat &s) {
os << s.type << ' ' << s.num + station::INITIAL_QUANTITY << ' ' << s.price;
return os;
}
std::ostream &operator << (std::ostream &os, const ticket &t) {
os << t.tID << ' ' << t.from << ' ' << t.Date << ' ' << t.leave << ' '
<< t.to... |
#include "Snowflakes.h"
#include "../engine/Math.h"
#include <ctime>
Snowflake::Snowflake(gfx::Canvas* canvasToSet, float sizeToSet, float opacityToSet, int distortionOffsetToSet) :
Primitive (canvasToSet, 1, Color(255,255,0)) {
_opacity = opacityToSet;
_size = sizeToSet * _opacity;
_weight = _... |
//
// Created by gurumurt on 7/2/18.
//
#ifndef OPENCLDISPATCHER_ORDERED_AGGREGATION_H
#define OPENCLDISPATCHER_ORDERED_AGGREGATION_H
#endif //OPENCLDISPATCHER_ORDERED_AGGREGATION_H
#include "include/headers.h"
#include "include/Environment.h"
#include "include/data_api.h"
#include "include/kernel_api.h"
#include "i... |
#pragma once
#include"ProductionStack.h"
#include<unordered_map>
#include"ProductionManager.h"
#include<fstream>
class ParserState
{
public:
ParserState(int state_ID);
virtual ~ParserState();
void init();
virtual ParserState* transfer(string input);
virtual void calFollowSet(ProductionStack& p, set<ProductionStack... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: board_manager.h
* Author: raphael
*
* Created on May 23, 2020, 9:35 AM
*/
#ifndef BOARD_MANAGER_H
#define BOARD_MA... |
#include "EditShape.h"
void EditShape::move(ofVec2f dir) {
if (Mask::selShape > -1) {
MaskElem& elem = Mask::elems[Mask::selShape];
if (Mask::selPoints.size() > 0) {
for (vector<vector<int>>::iterator it = Mask::selPoints.begin(); it != Mask::selPoints.end(); ++it) {
MyPoint& point = elem.points[(*it)[0]]... |
/*
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 "Core/Path.hpp"
#include "Core/Singleton.hpp"
namespace Push
{
class Settings : public Singleton<Settings... |
//使用するヘッダーファイル
#include"GameL\DrawTexture.h"
#include"GameL\WinInputs.h"
#include"GameL\SceneManager.h"
#include"GameL\HitBoxManager.h"
#include "GameL\Audio.h"
#include"GameHead.h"
#include"ObjBoss2.h"
//使用するネームスペース
using namespace GameL;
extern bool m_start_boss;
CObjBoss2::CObjBoss2(float x, float y)
{
m_px = x... |
#include "PassedTest.h"
#include "JsonArraySerialization.h"
// :: Constants ::
const QString SCALES_JSON_KEY = "scales";
// :: Lifecycle ::
PassedTest::PassedTest(int id) : PassedTestPreview() {
setId(id);
}
// :: Serializable ::
QJsonObject PassedTest::toJson() const {
auto json = PassedTestPreview::... |
/**
* Copyright (c) 2022, Timothy Stack
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of condi... |
/**
* Peripheral Definition File
*
* IWDG - Independent watchdog
*
* MCUs containing this peripheral:
* - STM32F1xx
* - STM32F2xx
* - STM32F4xx
* - STM32L1xx
*/
#pragma once
#include <cstdint>
#include <cstddef>
namespace io {
struct Iwdg {
/** Key register
*/
struct Kr {
Kr(const uint32_t ... |
//
// Amina Shaikym 201627535
//
#include "am_pm_clock.h"
am_pm_clock::am_pm_clock():
hours {12},
minutes{0},
seconds{0},
am{true}{}
am_pm_clock::am_pm_clock(unsigned int hrs, unsigned int mins,
unsigned int secs, bool am_val):
hours(hrs),
minutes(mins),
seconds(secs),
am(am_val){}
am_pm_... |
#include<iostream>
#include<stack>
#include<string>
#include"Task_2.cpp"
using namespace std;
printInfix(Node x)
{
Node l;
Node r;
l=x->left;
r=x->
if(!isOperator(l.p))
}
int main()
{
printInfix(main3());
return 0;
}
|
#ifndef MYTABLEWIDGET_H
#define MYTABLEWIDGET_H
#include <QObject>
#include <QtCore>
#include <QtGui>
#include <QtWidgets>
#include "NoFocusDelegate.h"
class myTableWidget : public QTableWidget
{
Q_OBJECT
public:
explicit myTableWidget(QWidget *parent = 0);
QTableWidgetItem * itemSetting(int... |
#pragma once
#include <SWI-Prolog.h>
#include <initializer_list>
#include <map>
#include <ostream>
#include <string>
#include <vector>
class PrologTermHolder;
class PrologAtom;
class PrologString;
class PrologVariable;
class PrologList;
class PrologFunctor;
namespace std {
template<> struct std::less<PrologTermHo... |
#include "ThrowProcess.h"
#include "HallHandler.h"
#include "Logger.h"
#include "Configure.h"
#include "GameServerConnect.h"
#include "PlayerManager.h"
#include "GameCmd.h"
#include "ProcessManager.h"
#include "RobotDefine.h"
#include <string>
using namespace std;
ThrowProcess::ThrowProcess()
{
this->name = "ThrowPro... |
#include <stdint.h>
#include "crc32c.h"
namespace leveldb {
namespace crc32c {
uint32_t Extend(uint32_t init_crc, const char* data, size_t n)
{
return crc32c_append(init_crc, (const unsigned char *)data, n);
}
} // namespace crc32c
} // namespace leveldb
|
#include <bits/stdc++.h>
using namespace std;
struct tNode{
int data;
tNode *left;
tNode *right;
tNode(int x):data(x),left(NULL),right(NULL){}
};
class Solution{
public:
//方法1 破坏原树(递归方法)
tNode* mirror(tNode *root){
if(!root){
return root;
}
tNode *left = mir... |
#include "yascos.hpp"
|
#include "LR.h"
int main()
{
string trainPath = "..\\example\\horseColic\\testSet_train.txt";
string testPath = "..\\example\\horseColic\\testSet_test.txt";
string testSavePath = "..\\example\\horseColic\\testSet_test_result.txt";
Logistic loghorse;
loghorse.dataLoad(loghorse.dataTrain, trainPath);//train
loghor... |
// Created on: 2014-10-08
// Created by: Kirill Gavrilov
// Copyright (c) 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 pu... |
/**********************************************************************
*Project : EngineTask
*
*Author : Jorge Cásedas
*
*Starting date : 24/06/2020
*
*Ending date : 03/07/2020
*
*Purpose : Creating a 3D engine that can be used later on for developing a playable demo, with the engine as static library
*
***... |
#include <vector>
class hash_node
{
public:
int key;
hash_node(int hashcode);
hash_node* next;
};
class hashtable
{
private:
bool is_chained;
int table_size;
int num_entries;
int num_collisions;
std::vector<std::vector<int>> table;
public:
hash... |
#include <stdio.h>
#include <stdlib.h>
#include <map>
#include <tuple>
#include <cstddef>
#include <limits>
#ifndef INCLUDES
#define INCLUDES
#include "Move.h"
#endif
class Zobrist{
public:
std::map<std::tuple<int,int,int>,uint64_t> hash_map; // stores a hashcode for each possible move
int total_playouts;
st... |
#pragma once
#include <NxPhysics.h>
namespace scene
{
class SceneBSP;
}
namespace entity
{
class Entity;
}
namespace physics
{
void CreateBSPEntity(const string& name, const scene::SceneBSP* scene, entity::Entity* entity);
} |
#include<iostream>
using namespace std;
int main()
{
int num,sum=0;
cout<<"Enter the num"<<endl;
cin>>num;
if(num<1)
cout<<"it is not a natural number";
for(int i=1;i<=num;i++)
{
sum+=i;
}
cout<<"Sum of natural number is "<<sum;
return(0);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.