text stringlengths 8 6.88M |
|---|
#include <iostream> //Accessing system libary iostream.
using namespace std; //Abillity to use cin, cout, etc.
int main() { //Main body
cout << "Welcome to computer science!/n" << endl; //prints char in "".
return 0; //Return 0 if program works
}
|
#include<iostream>
using namespace std;
class sample{
private:
int i;
public:
virtual void display(){
cout<<"\n In the SAMPLE class \n";
}
//virtual void display()=0;
};
class example{
private:
int i;
public:
void display(){
cout<<"\n In the EXAMPLE class\n";
... |
#include <array>
#include "gayboy.hpp"
namespace gb {
namespace {
bool compareLogo() {
std::array<unsigned char, 48> logo {
0xCE, 0xED, 0x66, 0x66, 0xCC, 0x0D, 0x00, 0x0B,
0x03, 0x73, 0x00, 0x83, 0x00, 0x0C, 0x00, 0x0D,
0x00, 0x08, 0x11, 0x1F, 0x... |
//
// Created by cirkul on 27.11.2020.
//
#ifndef UNTITLED3_SHEEP_H
#define UNTITLED3_SHEEP_H
#include "Herbivorous.h"
class Sheep : public Herbivorous {
Sheep(Playground& pg, int i, int j) : Herbivorous(pg, i, j) {
this->name = sheep;
this->size = middle;
this->escChance = 10;
th... |
#include <iostream>
#include "queue.hpp"
Queue::Queue() {
int size = 0;
int* queue = nullptr;
int countForPop = 0;
std::cout << "Default constructor works!" << std::endl;
}
Queue::Queue(Queue& que) {
std::cout << "Copy constructor works!" << std::endl;
this->queue = new int[que.size+5];
th... |
#include "stdafx.h"
#include "../MonsterBox/MonsterBox.h"
#include "DungeonGame.h"
#include "../GameData.h"
#include "DungeonSelect.h"
#include "../GameCursor.h"
#include "DungeonData.h"
#include "MonsterDrop.h"
#include <random>
#include "DropEgg.h"
#include "../Monster/Monsters/Armor.h"
#include "../Monster/Monsters/... |
#include "mainwindow.h"
static const int windowSizeX = 650;
static const int windowSizeY = 300;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), isChanged(false), isClosing(false)
{
try
{
settings = std::make_shared<Settings>();
settings->load();
notes = std::make_sha... |
// BEGIN CUT HERE
// PROBLEM STATEMENT
// Return the smallest positive integer that has exactly k
// divisors. If this number is greater than 1018, return -1
// instead.
//
// DEFINITION
// Class:NumberOfDivisors
// Method:smallestNumber
// Parameters:int
// Returns:long long
// Method signature:long long smallestNu... |
#include "Upgrade.h"
#include "UnitType.h"
#include "Race.h"
#include "..\EnumMapping.h"
#include "..\Util.h"
using namespace BroodWar;
namespace BroodWar
{
namespace Api
{
Upgrade^ ConvertUpgrade(BWAPI::UpgradeType upgrade)
{
return gcnew Upgrade(upgrade);
}
BWAPI::UpgradeType ConvertUpgrade(Upgrade^ ... |
// 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 <pika/futures/traits/future_tra... |
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
long long _count;
class graph
{
public:
int v;
list<int> *adj;
graph(int v)
{
this->v = v;
adj = new list<int>[v];
}
void dfs(int v, bool visited[])
{
_count++;
visited[v] = 1;
list<... |
////////////INCLUDE COLOUR CODE///////////////////
#ifndef _COLORS_
#define _COLORS_
#define RST "\x1B[0m"
#define KRED "\x1B[31m"
#define KGRN "\x1B[32m"
#define KYEL "\x1B[33m"
#define KBLU "\x1B[34m"
#define KMAG "\x1B[35m"
#define KCYN "\x1B[36m"
#define KWHT "\x1B[37m"
#define FRED(x) KRED x RST
#define FG... |
/***************************************************************************
* Copyright (c) 2021, Thorsten Beier * *
* Copyright (c) 2021, QuantStack *
* ... |
/*********************************************************\
* 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... |
#include <stdio.h>
#include<string.h>
#include<algorithm>
#define MAX 1000000000
using namespace std;
struct edge
{
int u,v,w;
};
edge e[250010];
int fa[510];
int m,n;
bool cmp(const edge &p1,const edge &p2)
{
return p1.w<p2.w;
}
int find(int x)
{
int fx,xx;
fx=x;
while(fa[fx]!=fx) fx=f... |
#include "App.h"
#include <string>
#include <iostream>
#include "Magazine.h"
#include "Book.h"
#include "Schoolbook.h"
using namespace std;
Command App::string_to_command(string command)
{
if (command == "printAll")
{
return PRINT_ALL;
}
if (command == "add")
{
return ADD_PUBLICATION;
}
if (command == "del... |
#include <iostream>
#include <string>
class Veggie {
public:
Veggie(const std::string& name);
~Veggie();
void tellUs();
protected:
std::string myName;
};
Veggie::Veggie(const std::string& name) {
myName = name;
}
Veggie::~Veggie() {
std::cout << myName << " - good bye!" << std::endl;
}
void Veggie::t... |
// Copyright 2019 Erik Teichmann <kontakt.teichmann@gmail.com>
#ifndef TEST_HELPER_HPP_
#define TEST_HELPER_HPP_
#include <vector>
#include <string>
void FillArgv(std::vector<std::string> args, char* argv[]) {
for (unsigned int i = 0; i < args.size(); ++i) {
// simply casting the data like
// argv[i] = con... |
#include <initializer_list>
#include <iostream>
#ifndef MY_VECTOR_H
#define MY_VECTOR_H
namespace mvec {
using valueType = int;
using sizeType = size_t;
struct Count {
sizeType size;
};
class myVectorIterator;
class myVector
{
public:
// construction & clean-up
myVector(); //default con... |
#include <iostream>
#include <cstdio>
using namespace std;
#define MAX 100005
#define min(a,b) ((a)<(b)?(a):(b))
int t, n, q;
int arr[MAX];
int tree[3*MAX];
void segment_tree(int root, int start, int last){
if( start == last){
tree[root] = arr[start];
return;
}
int mid = s... |
#include <iostream>
using namespace std;
void insertionSort(int[], int);
int main() {
int myArray[] = { 24, 67, 50, 8, 29, 116, 125, 48, 110, 82, 145, 6, 63, 59, 80, 26, 105, 33, 15, 129 };
int arraySize = size(myArray);
insertionSort(myArray, arraySize);
cout << endl;
for (int i = 0; i < arraySize; ... |
#ifndef uuid_guard_749f57a6_a1336058_14a62898_c4731a4a
#define uuid_guard_749f57a6_a1336058_14a62898_c4731a4a
#include <string>
namespace tul{
struct Uuid{
Uuid();
Uuid(const Uuid& obj);
Uuid(unsigned long first, unsigned long second);
bool operator ==(const Uuid& rhs) const;
bool operator !=(const Uuid& rhs) ... |
/******<CODE NEVER DIE>******/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FastIO ios_base::sync_with_stdio(0)
#define IN cin.tie(0)
#define OUT cout.tie(0)
#define CIG cin.ignore()
#define pb push_back
#define pa pair<int,int>
#define f first
//#define s second
#define FOR(i,n,m) for(int... |
#pragma warning (disable:4996)
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <ctime>
#include <cmath>
#include <string>
#include <cctype>
#include <cs... |
#ifndef TEXT_HPP_
#define TEXT_HPP_
#include <windows.h>
#include <string>
#include <vector>
#include <cstring>
inline std::wstring AnsiToWide(const std::string str)
{
std::wstring ret;
int src_len = int(str.size());
int dest_len = MultiByteToWideChar(CP_ACP, 0, str.c_str(), src_len, NULL, 0);... |
/// "toString" : "struct myTemplate",
/// "kind" : "Type"
template<class T>
struct myTemplate {};
/// "toString" : "struct myTemplateChild",
/// "kind" : "Type"
struct myTemplateChild : myTemplate<int> { };
/*This example used to crash while building the type of Bar*/
/// "type" : { "toString" : "Bar" }
template <typ... |
#pragma once
#include "math.h"
class Camera
{
public:
Vec3 pos; // Pozycja kamery
Vec3 dir; // Kierunek widzenia
Vec3 up; // Kierunek w górę
Vec3 right; // Kierunek w prawo
double width; ... |
#include "parser_main.h"
#ifndef __PARSER_TABLE__
#define __PARSER_TABLE__
/**
* An extension to the parser class designed for parsing Wikimarkup
* tables - specifically, for turning them into data.frames
* (and turning data.frames into wikimarkup tables!)
*/
class table_parser : public parser{
private:
... |
#ifndef MOUSECLICKED
#define MOUSECLICKED
#include "glut.h"
class MouseClicked
{
private:
bool isPunch = false;
public:
static MouseClicked* Instance();
bool getisPunch() { return isPunch; }
void mouse(int, int, int, int);
private:
MouseClicked()
{
}
virtual ~MouseClicked()
{
}
};
#endif
|
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
#pragma once
#include "utils/ptts.hpp"
#include "proto/config_mail.pb.h"
using namespace std;
namespace pc = proto::config;
namespace nora {
namespace config {
using mail_ptts = ptts<pc::mail>;
mail_ptts& mail_ptts_instance();
void mail_ptts_set_funcs();
... |
/* XMRig
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 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
* ... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Triad National Security, LLC. This file is part of the
// Tusas code (LA-CC-17-001) and is subject to the revised BSD license terms
// in the LICENSE file found in the top-level directory of this distribution.
//
////... |
//
// Created by tony on 2017/05/27.
//
#include <iostream>
#include "Player.h"
Player::Player(): _iHp(0), _iArmor(0), _sName(""), _sWeapon(""), _pY(0), _Px(0) {
std::cout << "A player was created\n";
}
Player::Player(std::string name, int hp, int armor, std::string weapon): _sName(name), _iHp(hp), _iArmor(armor), ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-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"
#include "modules/util/objfactory.h"
#inc... |
/*
* =====================================================================================
*
* Filename: instructions.cpp
*
* Description: Instructions execution for MIPS Super-scalar processor
*
* Version: 1.0
* Created: Wednesday 14 November 2012 07:59:45 IST
* Revision: no... |
#pragma once
#ifndef __WINDOWHEADER_H_
#define __WINDOWHEADER_H_
#include <windows.h>
#include <commctrl.h>
#include <olectl.h>
#include <ocidl.h>
#include <ole2.h>
#include <tchar.h>
#include <math.h>
#include <oleacc.h>
//#pragma comment(lib, "oleacc.lib")
/////////////////////////////////////////... |
#include "../precomp.hpp"
#if defined(ENABLE_TORCH_IMPORTER) && ENABLE_TORCH_IMPORTER
#if defined(TH_DISABLE_HEAP_TRACKING)
#elif (defined(__unix) || defined(_WIN32))
#include <malloc.h>
#elif defined(__APPLE__)
#include <malloc/malloc.h>
#endif
#include "THGeneral.h"
#endif
|
/*
* This file is part of OctoMap - An Efficient Probabilistic 3D Mapping
* Framework Based on Octrees
* http://octomap.github.io
*
* Copyright (c) 2009-2014, K.M. Wurm and A. Hornung, University of Freiburg
* All rights reserved. License for the viewer octovis: GNU GPL v2
* http://www.gnu.org/licenses/old-licen... |
#include <Servo.h>
#include <NewPing.h>
#include <SoftwareSerial.h>
Servo leftServo;
Servo rightServo;
Servo topServo; //mini servo for hc-04
#define TRIGGER_PIN 6
#define ECHO_PIN 7
#define MAX_DISTANCE 100 //max distance hc-04 will display
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);
unsigned int time;
in... |
// 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<iostream>
#include"execute.hpp"
#include"main_control.hpp"
#include"alu.hpp"
#include"myARMSim.h"
using namespace std;
extern inter_stage_buffer_EX_MEM B3;
extern inter_stage_buffer_ID_EX B2;
void execute()
{
string opcode=B2.opcode;
//cout<<"helllllllllllllllooooooooooin execute"<<endl;
//cout<<"eeeeeee... |
#include <iostream>
#include <conio.h>
#include "list_relasi.h"
#include "list_child.h"
#include "list_parent.h"
#include "aplikasi.h"
using namespace std;
address_child PC = nil;
address_child Pcari;
infotype_child XC;
infotype_child x;
List_child LC;
address_parent PP = nil;
address_parent cariP;
infotype_parent X... |
/** Copyright (c) 2018 Mozart Alexander Louis. All rights reserved. */
#ifndef __IVORY_HXX__
#define __IVORY_HXX__
/**
* Entity File for Ivory
*/
#define __IVORY_ENTITY_FILE__ "entities/llumas/ivory.plist"
/**
* Includes
*/
#include "entities/llumas/base_lluma.hxx"
class Ivory : public BaseLluma {
public:
/*... |
#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
int i,j,m,n,k=0,l;
int mo[100],no[100];
int **outar[100]={};
int **out;
char **in;
while(1)
{
cin>>n>>m;
if(m==0&&n==0)
break;
in=(char**)calloc(n,sizeof(char*));
out=(int**)calloc(n,sizeof(int*));
for(i=0;i<n;i++... |
#include "lock.h"
#include "RPCServer.hpp"
extern RPCServer *server;
LockService::LockService(uint64_t _MetaDataBaseAddress)
: MetaDataBaseAddress(_MetaDataBaseAddress){}
LockService::~LockService(){}
uint64_t LockService::WriteLock(uint16_t NodeID, uint64_t Address) {
int workerid = server->getIDbyTID();
uin... |
/****************************************************************************
** Meta object code from reading C++ file 'CSystemTrayIcon.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.3.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************... |
/*
* Copyright (c) 2016, The Regents of the University of California (Regents).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the a... |
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "AttributeSet.h"
#include "CSAttributeSet.generated.h"
/**
*
*/
UCLASS()
class UE4COOP_API UCSAttributeSet : public UAttributeSet
{
GENERATED_BODY()
public:
UCSAttributeSet();
... |
/**
* @file matmul.cc
* @author Gerbrand De Laender
* @date 24/01/2020
* @version 1.0
*
* @brief E091103, Master thesis, HLS testing
*
* @section DESCRIPTION
*
* Matrix multiplication.
*
*/
#include <hls_stream.h>
#include <ap_axi_sdata.h>
#include "matmul.h"
#include "stream.h"
#define M... |
#include "rvlight.h"
RVLight::RVLight(QVector3D position, QColor ambient, QColor diffuse, QColor specular):
m_position(position), m_ambient(ambient), m_diffuse(diffuse), m_specular(specular)
{
}
QVector3D RVLight::position() const
{
return m_position;
}
void RVLight::setPosition(const QVector3D &position)
{... |
/*
UTF-8 managing tools.
2013, Tivins <https://github.com/tivins>
*/
#include "unicode.h"
#include <cstdlib>
namespace v {
/**
* @brief Gets the char length in bytes.
* byte must be the first char of an ASCII or UTF-8 sequence.
*/
int utf8_char_len(char byte) {
unsigned char uc = (unsigned char) byte ;
... |
// Created on: 1995-12-08
// Created by: Jacques GOUSSARD
// Copyright (c) 1995-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... |
/* -*- 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.
*/
/**
* @file OpSecurityInfoParser.h
**/
#ifndef OPSECURITY_INFO... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <Eigen/Core>
#include <Eigen/Geometry>
using namespace std;
using namespace Eigen;
int main(int argc, char** argv) {
Quaterniond q1(0.35, 0.2, 0.3, 0.1), q2(-0.5, 0.4, -0.1, 0.2);
q1.normalize();
q2.normalize();
Vector3d t1(0.3, ... |
#ifndef SHADER_H
#define SHADER_H
#include <iostream>
#include <string>
#include <unordered_map>
#include <glm/glm.hpp>
#include "commun.h"
#include "resource.h"
class shader
{
uint _id;
public:
shader(std::string path);
~shader();
void use();
void set_float(const std::string& name,con... |
#include "stdafx.h"
#include "CalProteinProbSiblingSP.h"
CCalProteinProbSiblingSP::~CCalProteinProbSiblingSP(void)
{
}
void CCalProteinProbSiblingSP::calculateProteinProbability()
{
double dProbability=1.0;
for (CMassPeptideXcorr* pPeptideXcorr:m_pProtein->m_vSupportPeptide)//Loop SupportPeptide
{
int iPepti... |
#ifndef SDUZH_BASE_DATETIME_H
#define SDUZH_BASE_DATETIME_H
#include <string>
#include <time.h>
namespace reactor {
class Timestamp
{
public:
static const int kMicroSecondsPerSecond = 1000000; // 10^6
Timestamp(int64_t microseconds): microseconds_(microseconds) {}
int64_t microseconds() const { return ... |
// Sharna Hossain
// CSC 111
// Lab 20 | linear_search.cpp
#include <iostream>
using namespace std;
void output(int, int);
int linearSearch(int arr[], int size, int query)
{
for (int index = 0; index < size; index++)
{
if (arr[index] == query) return index;
}
return -1;
}
int main()
{
//... |
#ifndef WINDOW_H
#define WINDOW_H
#include <Common.h>
class CWindow
{
public:
CWindow(int width, int height, const std::wstring &title);
CWindow(CWindow &&other) = default;
virtual ~CWindow() = default;
virtual void Init();
virtual void Update(float deltaTime);
virtual void Render();
... |
#ifndef SPAN_HPP
# define SPAN_HPP
# include <iostream>
# include <vector>
# include <exception>
# include <algorithm>
class Span
{
private:
unsigned int _size;
std::vector<unsigned int> _numVec;
Span();
public:
class ValuesPoolAreFool : public std::exception
{
public:
virtual const char *what() cons... |
#include "check-co-call.h"
#include "diagnostic-core.h"
#include <string>
std::string funcNameStr(function* f) {
const char* name = function_name(f);
std::string callName(name);
return callName;
}
int is_funcall(std::string funcName, gimple stmt) {
if (is_gimple_call(stmt)) {
tree fn_decl = gimple_call_... |
#include "SimSystems.hh"
#include "SimState.hh"
#include "SimComponents.hh"
#include "util/Print.hh"
static bool waterInteraction(SimState &state, PhysicsState::Handle physicsState, const fvec3 &shipPoint, fixed tickLengthS) {
const Map &map(state.getMap());
Water &water(state.getWater());
if (shipPoint... |
// An interface for stack implementation
#ifndef HOH_STACK_INTERFACE_H_
#define HOH_STACK_INTERFACE_H_
#include <stdint.h>
namespace hoh_data_structure {
// Exception class thrown by Push() when stack is full
class FullStack {};
// Exception class thrown by Pop() when stack is empty
class EmptyStack {};
template... |
#include <iostream>
#include <math.h>
#include <stdio.h>
using namespace std;
int main() {
double a, b, c, res, res1, res2;
cin >> a >> b >> c;
res = (b*b)-4*a*c;
if (res < 0 || a == 0) {
cout << "Impossivel calcular" << endl;
return 0;
}
res1 = (-b+sqrt(res))/(2*a);
res2 = ... |
#include <stdio.h>
#include "Camera.hpp"
#include "Matrix.hpp"
bool DEBUG = false;
Camera::Camera() {
setDefaultCamera();
}
void Camera::setDefaultCamera(void) { // make default camera
eye.x = -10, eye.y = 0, eye.z = 0.0;
ref.x = 10, ref.y = 0, ref.z = 0.0;
viewup.x = 0.0, viewup.y = 1.0, viewup.z =... |
#pragma once
#include "Commonheader.h"
#include "InputManager.h"
//シーケンスの元クラス(派生クラスのUpdateを更新していく)
class Boot
{
public:
virtual ~Boot(){} //なにもしないのでこれでいい
virtual Boot* Update(Boot*) = 0;
};
|
#include <vector>
class Triangle {
private:
class Node {
private:
int value;
Node* left;
Node* right;
public:
Node(int);
void set_left(Node* l) { left = l; }
void set_right(Node* r) { right = r; }
int get_value() { return value; }
Node* get_... |
#include <iostream>
#include <cstdio>
#include <math.h>
using namespace std;
int main(){
double A,B,C;
scanf("%lf %lf %lf",&A,&B,&C);
double aTri = (A * C)/2;
double aCir = 3.14159 * pow(C,2);
double aTrap = (A + B)/2 * C;
double aSq = pow(B,2);
double aRect = A * B;
printf("TRIANGULO: %.3lf\n",aTri);
printf("... |
#pragma once
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include "Application.h"
using glm::vec2;
using glm::vec3;
using glm::vec4;
using glm::mat4;
class Camera
{
// camera pos and rot in world space
mat4 worldTransform;
// inverse of world transform;
mat4 viewTransform;
// near and far planes
mat4 project... |
#ifndef AD_GRAPHSWRITERSTRATEGY_H
#define AD_GRAPHSWRITERSTRATEGY_H
#include "FileWriterStrategy.h"
#include <iostream>
#include <fstream>
using namespace std;
class GraphsWriterStrategy : public FileWriterStrategy {
private:
ofstream *file = nullptr;
public:
~GraphsWriterStrategy() override;
void c... |
template <typename... TArgs>
struct ComponentList
{
public:
static ComponentMap get_map()
{
ComponentMap map;
auto ids = { id<TArgs>()... };
for (auto&& x : ids)
{
if(x >= 0) map.set(x);
}
return map;
}
private:
template <typename T> static enable_if_component<T,int> id() { return T::ID; }
templ... |
/*
* CharLogin.cpp
*
* Created on: Jun 29, 2017
* Author: root
*/
#include "CharLogin.h"
#include "Log/Logger.h"
#include "Network/Message_Facade.h"
#include "MessageCommonRet.h"
#include "../MessageBuild.h"
#include "MessageStruct/ServerReturnInt.pb.h"
#include "MessageStruct/ServerReturn2Int.pb.h"
#include... |
#include <iostream>
#include "vector_sort.h"
#include "vector_erase.h"
#include "lower_bound.h"
#include "maps.h"
#include "sets.h"
int main() {
sets();
return 0;
} |
#include "ray.h"
ray::ray(const vector3 origin, const vector3 direction) :
_origin(origin),
_direction(direction),
_distance_traveled(0)
{}
ray::ray(const ray&& r) noexcept
{
_origin = r._origin;
_direction = r._direction;
}
auto ray::operator=(ray&& r) noexcept -> ray&
{
_origin = r._origin;
_direction = r._... |
#pragma once
#include <Allocator.h>
namespace breakout
{
class LinearAllocator : public Allocator
{
public:
LinearAllocator(const size_t size);
~LinearAllocator() override;
void* allocate(const size_t size) override;
void deallocate(void* p) override final;
virtual voi... |
//------------------------------------------------------------------------------
// Author: Mr. Lynn Barnett
// Student ID: *20360727
// E-Mail: barnettlynn@gmail.com
// Course: CMSC 2613, Programming II
// CRN: 21256, Spring, 2014
// Project: p01
// Due: January 24, 2014
// Account: tt044
//---------------------... |
//
// Created by biega on 19.03.2018.
//
#include <iostream>
#include "inputvalidator.h"
int InputValidator::symbolTest(std::vector <std::string> tab){
for(int i=0;i<tab.size();i++){
for(int j=0;j<tab[i].length();j++){
if(tab[i][j]!='U' && tab[i][j]!='#' && tab[i][j]!='H' && tab[i][j]!... |
/*
Copyright 2021 University of Manchester
Licensed under the Apache License, Version 2.0(the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http: // www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
// Copyright Epic Games, Inc. All Rights Reserved.
/*===========================================================================
Generated code exported from UnrealHeaderTool.
DO NOT modify this manually! Edit the corresponding .h files instead!
========================================================================... |
/* UVA374 Big Mod */
#include<iostream>
using namespace std;
int pow(int b,int exp, int m)
{
if(exp == 0)
return 1%m;
if(exp == 1)
return b%m;
if(exp % 2 == 0)
return pow(b*b % m, exp/2 ,m);
else
return b*pow(b, exp-1, m)%m;
}
int main()
{
int b,p,m;
while(cin... |
// Copyright (c) 2021 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>
#if defined(PIKA_HAVE_GPU_SUPPORT)
# include <pik... |
#include "qmlqmqtt_plugin.h"
#include "qmlqmqtt.h"
#include <qqml.h>
void QmlQmqttPlugin::registerTypes(const char *uri)
{
// @uri QmlQmqtt
qmlRegisterType<QmlQmqtt>(uri, 1, 0, "QmlQmqtt");
}
|
#include <stdio.h>
#include <windows.h>
int main()
{
int i = 0, i2 = 0;
int arr[5];
char buff[3];
FILE *fr, *fw;
if ((fr = fopen("INPUT.txt", "r")) == NULL)
{
puts("Couldn't open file\n");
system("pause");
exit(1);
}
while(feof(fr)==0)
{
buff[i++] = g... |
// Copyright (c) 2020 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 ... |
//
// EPITECH PROJECT, 2018
// zappy
// File description:
// ScrollBar.hpp
//
#ifndef ScrollBar_HPP
#define ScrollBar_HPP
#include "include.hpp"
#include <vector>
class ScrollBar
{
public:
ScrollBar(irr::gui::IGUIScrollBar *ScrollBar, int id);
ScrollBar();
~ScrollBar();
void setPos(int pos);
int getPos(void) c... |
/* -*- 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/windowcommander/src/Wind... |
/********************************************************
Scene4 : debugging camera path
(free roaming to watch historical pos)
*******************************************************/
#include "Qwerty3D-PC.h"
using namespace Noise3D;
void Qwerty::Scene_DebuggingCameraPos::Init(Noise3D::IScene* pScene, Noi... |
#pragma once
#include "utils/ptts.hpp"
#include "proto/config_sundries.pb.h"
using namespace std;
namespace pc = proto::config;
namespace nora {
namespace config {
using sundries_ptts = ptts<pc::sundries>;
sundries_ptts& sundries_ptts_instance();
void sundries_... |
int64_t pow_Mod(int64_t x, int64_t n)
{
int64_t answer = 1;
int64_t now_pow = x;
while(n > 0)
{
if((n & 1 )== 1)
{
answer *= now_pow;
answer %= MODULO;
}
now_pow *= now_pow;
now_pow %= MODULO;
n >>= 1;
}
return answer;
}
int64_t fact(int64_t x)
{
int64_t answer = 1;
while(x > 0)
{
answer... |
#include <stdio.h>
#include<stdlib.h>
/*programa que usa una funcion para almacenar numeros en un arrglo dinamico
posteriormente en otra funcion buscar un numero en particular*/
void leer_arreglo();
void buscar();
int *v1;
int num;
int main() {
leer_arreglo();
return 0;
}
void leer_arreglo(){
printf("Ingrese... |
#include"iostream"
using namespace std;
int main()
{
int a,b,c[100],i;
cout<<" enter two numbers : ";
cin>>a>>b;
cout<<"Enter array values: ";
for(i=0;i<a;i++)
{
cin>>c[i];
}
cout<<c[b-1];
}
|
#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <algorithm>
#include <sequtils.h>
using namespace std;
void print(int elem)
{
cout << elem << ' ';
}
int square(int x) { return x * x; }
int main(int argc, char *argv[])
{
vector<int> col;
set<int> v;
cout << "For each testing " ... |
#include "RenderObject.h"
namespace Game
{
bool RenderObject::load(const char *path)
{
mObjLoader.loadObj(path, mMeshTransform);
}
MeshTransform &RenderObject::getMesh()
{
return mMeshTransform;
}
}
|
//Nanthana Thanonklin
//countHits.h
// countHits.h includes the prototype of countHits function so we
// can include from our main program,
// includes asteroid.h so we can use our definition(Asteroid)
#ifndef countHits_h
#define countHits_h
#include "asteroid.h"
#include <vector>
int countHits(std::vector<Astero... |
#ifndef CLIENT_H
#define CLIENT_H
#include <QWidget>
#include <QAbstractSocket>
class QTcpSocket;
class QFile;
namespace Ui {
class Client;
}
class Client : public QWidget
{
Q_OBJECT
public:
explicit Client(QWidget *parent = 0);
~Client();
private slots:
void on_loginButton_... |
/* Copyright 2015-2016 Whitewood Encryption Systems, Inc. */
#include "stdafx.h"
#include "config_parse.h"
#include "networksource.h"
#include "filesource.h"
#ifdef WNR_QRNG
#include "qrngsource.h"
#endif
#include "drbg.h"
#include "utilities.h"
#include "internal.h"
#include "wnr.h"
#include <libconfig.h>
#include <st... |
/*
ID: stevenh6
TASK: preface
LANG: C++
*/
#include <string>
#include <fstream>
using namespace std;
ofstream fout ("preface.out");
ifstream fin ("preface.in");
int n;
int I, V, X, L, C, D, M = 0;
int main()
{
fin >> n;
int Im10[] = {0, 1, 2, 3, 1, 0, 1, 2, 3, 1};
int Vm10[] = {0, 0, 0, 0, 1, 1, 1, 1,... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-1999 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
*/
#include "core/pch.h"
#include "modules/dom/src/domenvironmen... |
#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;
int f[10100],v[510]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.