text stringlengths 8 6.88M |
|---|
#include <bits/stdc++.h>
using namespace std;
long long n,m,a;
int main()
{
scanf("%I64d %I64d %I64d",&n,&m,&a);
long long temp_wid_a = n/a;
long long temp_hei_a = m/a;
long long ans1 = 0,ans2=0,ans =0;
if(temp_wid_a*a == n)
ans1+=temp_wid_a;
else ans1+=temp_wid_a + 1;
if(temp_hei... |
/* =============================
* | Name: Abhishek Mantha |
* | Email: amantha@usc.edu |
* | GitHub: abmantha |
* | Date Submitted: 2/3/15 |
* | HW 2 |
* ==============================
*
* Filename: alistint.cpp
*
* Directions from bits.usc.edu/cs104/assignme... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
**
** Copyright (C) 1995-2007 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 <ddeml... |
///
/// @author Florian Feuerstein
///
/// @date 02/2017
///
/// @class ReconstructionError
///
/// @brief
///
#pragma once
#include <ComputerVisionLib/CameraModel/CameraModel.h>
#include <Eigen/Core>
#include <Eigen/Geometry>
namespace Cvl
{
class ReconstructionError
{
public:
static Eigen::Array2X... |
#include "client.h"
#include <stdlib.h>
#include <QDateTime>
#include <QHostInfo>
#include <QThread>
#include <QtDebug>
Client::Client() {
mySocket = new QTcpSocket(this);
qDebug() << "Initialized client with TCP socket.";
}
Client::~Client()
{
qWarning() << "Client is garbage now.";
}
void Client::connectA... |
#pragma once
class GtNumberString
{
protected:
gtstring mString;
public:
GtNumberString(void);
~GtNumberString(void);
void SetNumber(gtuint uiNumberLength, gint uiNumber, const gtchar* pcFrontString = NULL
, const gtchar* pcBackString = NULL);
inline gtstring& GetString() {
return mString;
}
};
|
#include <arba/evnt/version.hpp>
#include <arba/evnt/evnt.hpp>
#include <iostream>
class int_event
{
public:
int value;
};
int main()
{
evnt::event_manager event_manager;
event_manager.connect<int_event>([](int_event& event)
{
std::cout << "I received an int_event: " << event.value << std::end... |
/*=============================================================================
/*-----------------------------------------------------------------------------
/* [DebugSystem.cpp] デバッグシステム
/* Author:Kousuke,Ohno.
/*-----------------------------------------------------------------------------
/* 説明:デバッグシステム
===========... |
#include <SDL2/SDL.h>
#include <SDL2/SDL_system.h>
#include <SDL2/SDL_syswm.h>
#include <cstdio>
#include <cstring>
#include <bgfx/bgfx.h>
#include <bgfx/platform.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 600
struct DebugCallback : public bgfx::Callb... |
/*
* License does not expire.
* Can be distributed in infinitely projects
* Can be distributed and / or packaged as a code or binary product (sublicensed)
*
* Commercial use allowed under the following conditions :
* - Crediting the Author
*
* Can modify source-code
*/
#include <iostream>
/*
* File: t... |
#pragma once
#ifndef _CAMERA_
#define _CAMERA_
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <vector>
using namespace std;
class Camera {
public:
Camera(float zPos);
glm::mat4 getCameraView();
glm::vec3 getCameraPos();
void moveForward(float speed);
void moveBac... |
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> v{10, 5, 25, 100};
auto it = std::min_element(v.begin(), v.end());
std::cout << "min element is at " << *it << std::endl;
return 0;
}
|
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
using namespace std;
int stoi(string s){
int a;
stringstream stream1(s);
stream1 ... |
// Created on: 1995-11-08
// Created by: Christian CAILLET
// 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 ... |
#pragma once
#include "Core/Core.h"
#include "Common/GeomMath.h"
#include "Utils/Hashing.h"
namespace Rocket
{
using ShaderSourceList = Vec<std::pair<uint32_t, String>>;
Interface Shader
{
public:
virtual ~Shader() = default;
virtual bool Initialize(const ShaderSourceList& list) = 0;
virtual... |
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e3+3;
struct edge{
int w,v,next;
};
edge e[maxn];
int a[maxn],head[maxn],tot=0,dist[maxn],visit[maxn],n;
void add(int u,int v,int w){
e[tot].v=v;
e[tot].w=w;
e[tot].next=head[u];
head[u]=tot++;
}
queue<int>q;
void spfa(){
for(int... |
//============================================================================
// Name : UnorderedMultiset.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
... |
#include <stdio.h>
#include <stdint.h>
#include <vector>
#include <fstream>
#include <iostream>
#include <cmath>
#include <string>
#include <boost/lexical_cast.hpp>
#include "DEdvs/config.h"
#include "DEdvs/dedvs_auxiliary.h"
void normalizeDEvents(std::vector<dedvs::DEventExtF>* depth_events_float);
int main(int a... |
// Created on: 2018-03-15
// Created by: Stephan GARNAUD (ARM)
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of ... |
#include "Chassis.h"
#include <arduino.h>
void Chassis::move(){
if(rPower > 0){
digitalWrite(R1, HIGH);
digitalWrite(R2, LOW);
}else if(rPower < 0){
digitalWrite(R1, LOW);
digitalWrite(R2, HIGH);
}else{
digitalWrite(R1, LOW);
digitalWrite(R2, LOW);
}
... |
// Created on: 1995-09-18
// Created by: Bruno DUMORTIER
// 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 GN... |
#include<bits/stdc++.h>
using namespace std;
class base{
public:
void hello(){
cout << "b";
}
};
class de:private base{
};
int main(){
de d;
d.hello();
return 0;
}
|
// Project Euler: Largest Prime Factor #
// #####################################
// C++11
// The prime factors of 13195 are 5, 7, 13 and 29.
// What is the largest prime factor of the number 600851475143?
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
bool isFactor(long n, long i)
{
return n ... |
#include <iostream> // for standard library
#include "Sales_item.h" // for user defined classes
int main()
{
Sales_item item1;
Sales_item item2;
std::cout << item1.GetUnitsSold() << std::endl;
std::cin >> item1 >> item2; // read a pair of transactions
std::cout << item1 + item2 ... |
#include <iostream>
#include <iomanip>
using namespace std;
float pounds;
float user_input();
float conversion(float input);
int main() {
float input = user_input();
conversion(input);
return 0;
}
float user_input() {
// title of my converter
cout << "POUNDS TO KILOGRAMS CONVERTER" << endl;
/... |
/********************************
* Reef-Life Aquarium Controller *
* Versión 3.0.0 - 201506 *
* Funciones Generales *
********************************/
// Obtiene los decimales de un Float
// en un Long para poder convertirlo a String
long getDecimal(float val) {
int intPart = int(val);
long decP... |
#pragma once
#include "Node.h"
namespace DuiLib
{
struct ContactListItemInfo //好友列表信息 结构体
{
bool folder; //是否为根目录
//bool empty; //是否空
NodeType id;
CDuiString logo; //图标资源
CDuiString nick_name; //昵称资源
CDuiString description; //个性签名资源
CDuiString back_name; //备注名资源
CDuiString weixin_id... |
#pragma once
#include "myBook.h"
class Comics : public myBook{
private :
int numberring;
public :
Comics() :numberring(0) {
cout << "child class constructor" << endl;
}
//부모에서 정의한 void view() 내용을 자식 클래스가 고쳐쓴다.;
void view() { /*Override*/
//myBook::view();
cout << "제 목 : " << m_sTitle<<"("<< numberri... |
#include <iostream>
#include <cstdlib>
#include <ctime>
void quickSort(int *, const unsigned int);
int main()
{
std::srand(std::time(0));
const unsigned int tam = 100;
int arreglo[tam];
for (int i = 0; i < tam; i++)
{
arreglo[i] = 1 + std::rand() % 100;
}
std::cout << "Arreglo si... |
/*
* File: main.cpp
* Author: Daniel Canales
* I have 1 header files Stash
* For making my program neater and organized by catagory
* Created on July 14, 2014, 11:03 AM
*/
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <fstream>
#include "STATS.H"
using namespace std;
/*
*
*/
//functio... |
//
// Created by Stephen Clyde on 1/16/17.
//
#ifndef ANALYSTCOMPARER_RANKER_H
#define ANALYSTCOMPARER_RANKER_H
#include <fstream>
#include "Constants.h"
#include "Analyst.hpp"
// TODO: Define an Analyst class and import the definition
class Comparer {
private:
std::string m_outputFilename;
// TODO: def... |
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
class Solution {
public:
int trailingZeroes(int n) {
//基本思想:数学高效计算因子,时间复杂度O(logn)
//要想末尾产生0,该数必须有因子5,产生0的个数就是该数因子5的个数
//从1到n这n个数里面,计算每个数存在因子5的个数
//不断除以5, 是因为每间隔5个数有一个数可以被5整除, 然后在这些可被5整除的数中,
//每间隔5个数又有一个可以被25整除, 故要再除一次...直到结果为0, 表示没有... |
enum WiggleState{
WiggleStateBegin = 0,
WiggleStateUp = 1,
WiggleStateDown = 2
};
class Solution1 {
public:
int wiggleMaxLength(vector<int>& nums) {
if(nums.size() == 0) return 0;
WiggleState state = WiggleStateBegin;
int count = 1;
for(int i=1; i<nums.size(); ++i){
... |
//=====================================================
// File : f77_interface_base.hh
// Author : L. Plagne <laurent.plagne@edf.fr)>
// Copyright (C) EDF R&D, lun sep 30 14:23:25 CEST 2002
//=====================================================
//
// This program is free software; you can redistribute it and/or
... |
/*=========================================================================
University of Pittsburgh Bioengineering 1351/2351
Final project example code
Copyright (c) 2011 by Damion Shelton
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of... |
#include <iberbar/Base/Lua/LuaCModuleFunction.h>
void iberbar::CLuaCModuleFunction::onRegister( lua_State* pLuaState, int tb )
{
if ( tb < 0 )
{
const luaL_Reg* fn = fns;
while ( fn->name )
{
lua_pushcclosure( pLuaState, fn->func, 0 );
lua_setglobal( pLuaState, fn->name );
fn ++;
}
}
else
{
co... |
#pragma once
#include <Component.h>
namespace breakout
{
enum class EPowerUpType
{
None,
Speed,
Sticky,
PassThrough,
PadSizeIncrease,
Confuse,
Chaos,
};
class PowerUpComponent : public BaseComponent
{
public:
static EComponentType GetType()
{
return EComponentType::PowerUp;
};
EPowe... |
#pragma once
#include "user_defined_functions.h"
#include <stdio.h>
extern char NACK[10]; //defined in initACKNACK.cpp
void ConsolidateCommands(unsigned char *szCommand, int cntCommand)
{
/*
In this function,
INPUT:
Read string from the serial port, that contains many different packets.
OUTPUT:
Parse the strin... |
/********************************
* Reef-Life Aquarium Controller *
* Versión 3.0.0 - 201506 *
* Control de Peristalticas *
********************************/
//Inicio los parámetros para las Peristálticas
void initPeris() {
pinMode(periA, OUTPUT);
pinMode(periB, OUTPUT);
pinMode(periC, OUTPUT);
pin... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a, b, c, s, r;
while(cin>>a>>b>>c)
{
if(a==0 || b==0 || c==0)
cout<<"The radius of the round table is: 0.000"<<endl;
else{
s = (a+b+c) / 2;
r = sqrt((s-a)*(s-b)*(s-c) / s);
cout<<"The ra... |
#include "weapon_component.h"
#include "physics_component.h"
#include "engine.h"
#include "scene.h"
#include "..\\audio\audio_system.h"
#include "..\\core\timer.h"
void WeaponComponent::Destroy() {
owner_->GetScene()->GetEngine()->GetSystem<EntityEventDispatcher>()->Unsubscribe("collision", collision_handle_);
}
b... |
//顺序存储结构下实现直接选择排序,直接插入排序,冒泡排序的递归算法
#include<iostream>
using namespace std;
int R[100];
void selectsort(int n)// 从尾到头进行直接选择排序的递归算法
{
int i,max;
if (n==1) return ;
else
{
max=n;
for(i=n-1;i>0;i--)
if(R[max]<R[i])
max=i;
R[0]=R[max]; R[max]=R[n]; R[n]=R[0];
se... |
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2012 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef COMPOSE_DESKTOP_WINDOW_H
#define COMPOSE_DESKTOP_WINDOW_H
#if defined M2_SUPP... |
/*
19.08.04
LG codepro - Self Disinfection
*/
#include <iostream>
using namespace std;
int y[110]; // 살균대상의 y 좌표 배열
int x[110]; // 살균대상의 x 좌표 배열
int N; // 필터 한 변의 크기
int L; // LED의 범위(길이)
int M; // 살균대상의 개수
int sol; // 정답
void Input(void){
cin >> N >> L >> M;
for (int i = 0; i < M; i++)
... |
#include<cstdio>
#include<iostream>
using namespace std;
int main(){
int binary_search(int *data,int low,int high
,int be_searched,int &result);
int array[100];
for(int i=0;i<100;i++){
array[i]=i;
}
int be_searched;
scanf("%d",&be_searched);
int result;
binary_search(array,0,99,be_searched,result);
fpr... |
//
// Created by manout on 18-1-22.
//
#include "common_use.h"
#include <boost/format.hpp>
struct point
{
double x;
double y;
};
static vector<string> lines;
static void koch(int depth, point p1, point p2)
{
if (depth == 0)
return ;
point s, t, u;
double th = M_PI * 60 / 180;
s.x = (2 * p1.x + p2.x) / 3... |
#pragma once
#include <texture.h>
#include <string>
class Ball
{
private:
double x;
double y;
double x_vel;
double y_vel;
int size;
double max_vel;
Texture* texture;
public:
Ball(double x, double y);
Ball(double x, double y, double x_vel,... |
#include "perf_precomp.hpp"
CV_PERF_TEST_MAIN(videoio)
|
#include <iostream>
using namespace std;
//Ugugdul hadgalah
template <class T>
struct Node {
T val;
Node<T> *next;
};
template <class T>
class List {
private:
//Жагсаалтын эхлэлийг заана
Node<T> *first;
//Жагсаалтын төгсгөлийг заана
Node<T> *last;
public:
//Жагсаалтын төгсгөлд утга нэмнэ
... |
/*
* 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... |
// Copyright 2017 Google Inc. All rights reserved.
//
// 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, modify, ... |
#include<stdio.h>
int eh_multiplo(int a, int b);
int main(void) {
int a,b;
scanf("%d %d", &a,&b);
printf(eh_multiplo(a,b) ? "Sao Multiplos\n" : "Nao sao Multiplos\n");
return 0;
}
int eh_multiplo(int a, int b) {
if (a > b) {
return a % b == 0;
} else {
return b % a == 0;
... |
// Created on: 1993-03-24
// Created by: JCV
// Copyright (c) 1993-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 Lesser Gen... |
#include<iostream>
using namespace std;
typedef unsigned long long int ll;
int xuat(ll n){
// if(n>=1&&n<=2) return 1;
ll i,sum=0;
for(i=0;i<=n;i++){
sum=sum+i;
if(n-sum==1) return 1;
if (n <sum ) break;
}
return 0;
}
int main(){
ll n;
cin>>n;
cout<<xuat(n);
... |
#include "include/Widget/algaepropertywidget.h"
#include "ui_algaepropertywidget.h"
//-----------------------------------------------------------------------------------------------------------
AlgaePropertyWidget::AlgaePropertyWidget(QWidget *parent, AlgaeProperty _property) :
SphParticlePropertyWidget(parent, _... |
#include <string>
#include "SetCarryProc.h"
#include "HallManager.h"
#include "Logger.h"
#include "Room.h"
#include "Configure.h"
#include "ErrorMsg.h"
#include "AllocSvrConnect.h"
#include "GameCmd.h"
#include "ProcessManager.h"
#include "BaseClientHandler.h"
#include "json/json.h"
using namespace std;
SetCarryProc... |
// Created on: 1994-02-01
// Created by: Jean Yves LEBEY
// Copyright (c) 1994-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... |
#ifndef __OBJECTS_H__
#define __OBJECTS_H__
#include <stdint.h>
#include <ap_int.h>
#include <algorithm>
#include <utility>
using namespace std;
/*ECAL tower object definition*/
class Tower{
public:
Tower() : data(0) {;}
Tower(ap_uint<10> cluster_et, ap_uint<10> tower_et, ap_uint<3> peak_phi, ap_uint<3> ... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
//#define TEST
#define REAL
//#define WINDOWS
#define MAC
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::exit()
{
close();
... |
#include<bits/stdc++.h>
using namespace std;
void uniQuad(int arr[], int n, int k)
{
int m, l, h;
for(int i=0; i<=n-3; i++)
{
for(int j=i+1; j<=n-2; j++)
{
int m=k-(arr[i]+arr[j]);
l=j+1;
h=n-1;
while(l<h)
{
if(arr[... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2005-2010 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
*/
#ifndef LIRC_H
#define LIRC_H
// May be able to ... |
/*
kamalsam
*/
#include<iostream>
using namespace std;
int main()
{
long n,j,sum,pos,row,rem;
int i,t;
cin>>t;
for(i=1;i<=t;i++)
{
sum=0;
cin>>n;
for(j=1;sum<n;j++)
sum+=j;
j--;
sum-=j;
pos=n-sum;
row=j;
rem=(j-pos)+1;
... |
/*
* the declaration of the class rbtree
*
* author: dongbeibei
* time: 2013/6/26
*
*/
#ifndef _RBTREE_H
#define _RBTREE_H
#include "../base.h"
class RBTree
{
public:
//construct
RBTree();
//deconstruct
~RBTree();
//return if the RBTree is empty or not
bool Empty();
//find node who's key equals to key,... |
#include "interface_c.h"
#include "PacketBase.h"
#include "socket.h"
#include "log.h"
#include "timer_event.h"
#include "net.h"
#include "mysql_part.h"
#include "redis.h"
#include "timewheel.h"
#include <string.h>
#include <uuid/uuid.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket... |
/************************************************************************
* @project : $rootnamespace$
* @class : $safeitemrootname$
* @version : v1.0.0
* @description :
* @author : $username$
* @creat : $time$
* @revise : $time$
****************************************************************... |
#include "cpptest.h"
CPPTEST_CONTEXT("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadPoolManager.cpp");
CPPTEST_TEST_SUITE_INCLUDED_TO("core.threads.test.cpptest.TA_Thread_CppTest/core.thread.test.cpptest/ThreadPool/ThreadPoolManager.cpp");
class TestSuite_getNonBusyWorker_c2ff7... |
#include <iostream>
using namespace std;
//s(n)=1+1/2+...+1/n
double dequi(int n)//n=5->1/5+dequi(4)
{
if(n==1)
{
return 1;
}
return 1.0/n+dequi(n-1);
}
double khudequi(int n)
{
double Tong=1;
for(int i=2;i<=n;i++)
{
Tong+=1.0/i;
}
return Tong;
}
double dequiduoi(in... |
/*
text_loader.hpp
Purpose: Leverage the library tinyxml2 to store all of the game's constants
in a set of maps that can easily be accessed with functions.
@author Jeremy Elkayam
*/
#include "text_loader.hpp"
TextLoader::TextLoader(){
//cout<<"instantiating"<<endl;
load_strings();
//cout<<"g... |
#include <fstream>
#include "sobel_unrolled_16_opt.h"
int main() {
ofstream in_pix("input_pixels_regression_result_sobel_unrolled_16_opt.txt");
ofstream fout("regression_result_sobel_unrolled_16_opt.txt");
HWStream<hw_uint<512> > img_update_0_read;
HWStream<hw_uint<512> > sobel_unrolled_16_update_0_write;
... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <folly/Portability.h>
#include <folly/dynamic.h>
#include <quic/codec/Types.h>
#include <quic/logging/QLog... |
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/NewCouponMerchantStep1Page.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.app18_bundle.h>
#include <_root.app18_List_Items_Property.h>
#include <_root.BannerMerchant.h>
#include <_root.List.h>
#include <... |
// 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 "GnMeshPCH.h"
#include "GnGamePCH.h"
#include "GActorController.h"
#include "GAction.h"
#include "GInfoBasic.h"
#include "GActionAttack.h"
#include "GActionAttackCheck.h"
#include "GActionDie.h"
#include "GActionGage.h"
#include "GActionDamage.h"
#include "GAttackDamageInfo.h"
void GActorControl... |
// Copyright 2018 Benjamin Bader
//
// 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 agree... |
#include "stdafx.h"
#include "head.h"
bool connection()
{
while (true)
{
bank_connect();
}
} |
#ifndef AOC_8_H
#define AOC_8_H
#include <vector>
#include <string>
#include <iostream>
namespace AoC_8 {
std::vector<std::vector<std::vector<int>>> CreateImage(std::string imgData, int width, int height) {
std::vector<std::vector<std::vector<int>>> img = {};
for (size_t layerNo = 0; layerNo < img... |
#include "Func.h"
#include "Reference.h"
#include <DxLib.h>
Player Func::player;
void Func::SetPlayer(Player playerIn) {
player = playerIn;
}
void Func::DrawRotaGraphFWithRate(float x, float y, double exRate, double angle, int handle, int trans) {
DrawRotaGraphF(x * Ref::pxRate, y * Ref::pxRate, exRate, angle, h... |
#pragma once
#include "declspec.h"
#include <random>
namespace pure
{
class PUREENGINE_API Random
{
public:
Random();
~Random();
// Gets a random real number between given min and max.
float operator()(float min, float max) const;
// Gets a random real number between 0 and given max.
float operator()(... |
/*
* Copyright [2017] <Bonn-Rhein-Sieg University>
*
* Author: Torsten Jandt
*
*/
#pragma once
#include <mir_planner_executor/actions/executor_action.h>
class CombinedPerceiveAction : public ExecutorAction {
private:
ExecutorAction* default_perceive_;
ExecutorAction* cavity_perceive_;
pu... |
#include "Block.h"
Block::Block() {
id=1;
type = paper;
durability = 1;
points = 1 ;
damage = 0;
powerup = none;
buildBlock();
}
Block::Block(Ogre::SceneManager *newManager, Type t, int num) {
id = num;
type = t;
switch(type)
{
case(paper):
{
durability = 1;
points = 10;
break;
}
case(woo... |
#include"stdio.h"
#include"conio.h"
#include"Math.h"
void main(){
clrscr();
float a=2;
float b=10;
float c=2;
float squreRoot = sqrt(b*b-4*a*c);
printf("With Plus sign: %.2f",(b+squreRoot)/(2*a));
printf("\nWith Mius sign: %.2f",(b-squreRoot)/(2*a));
getch();
}
|
// Created on: 1992-09-22
// Created by: Gilles DEBARBOUILLE
// Copyright (c) 1992-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 th... |
// Find the number of pairs of prime and compiste numbers from given range
#include <iostream>
using namespace std;
bool prime(int n)
{
int c=0;
for(int i=1;i<=n;i++)
{
if(n%i==0)
c++;
}
if(c==2)
return true;
else
return false;
}
int main()
{
int t;
... |
#include <Windows.h>
#include "../inc/DetoursDll.h"
typedef struct _DetoursUnsandboxContext {
PVOID pImport;
PVOID pReal;
} DetoursUnsandboxContext;
static BOOL Unsandbox(_In_opt_ PVOID pContext, _In_ DWORD nOrdinal, _In_opt_ LPCSTR pszFunc, _In_opt_ PVOID* ppvFunc)
{
DetoursUnsandboxContext* context = reinterpret... |
#include "Line.h"
#include <cstdio>
static const size_t g_textNodeBufferLength = 80;
Line::Line()
{
_chars.reserve(80);
}
void Line::appendCharacter(char newCharacter)
{
_chars.push_back(newCharacter);
}
void Line::eraseFromPositionToEndOfLine(size_t position, Direction direction)
{
if (_chars.size() ==... |
/** Kabuki SDK
@file /.../Source/Kabuki_SDK/_Com/MIDI/Device.cpp
@author Cale McCollough
@copyright Copyright © 2016 Cale McCollough ©
@license Read accompanying /.../README.md or online at http://www.boost.org/LICENSE_1_0.txt
*/
#pragma once
#if _Win32
#include <WinDef.h>
#endif //< _W... |
//-----------------------------------------------------------------------------------------------------------
// GAME AESTHETICS: C++ Text Parser Part 2
//-----------------------------------------------------------------------------------------------------------
#include <iostream>
#include <cctype>
#include <string>
... |
class foo
{
/// "isStatic" : true
static int m;
/// "isStatic" : false
int b;
};
/// "internalContext" : { "localDeclarationCount" : 0}
void f(int);
/// "internalContext" : { "localDeclarationCount" : 1}
void f2(int a);
|
// Robert Fus
// CSCI 6626 - Object-Orientated Principles & Practices
// Program 9: Undo/Redo
// File: Stack.hpp
// 11/18/2019
#ifndef P2_SQUARE_STACK_HPP
#define P2_SQUARE_STACK_HPP
#include "Frame.hpp"
#include "tools.hpp"
template<class T>
class Stack : public vector<T> {
public:
Stack() = default;
... |
/*************************************************************************
> File Name: Console.h
> Project Name: Hearthstone++
> Author: Chan-Ho Chris Ohk
> Purpose: Console version of Hearthstone++ game.
> Created Time: 2017/10/08
> Copyright (c) 2017, Chan-Ho Chris Ohk
***********************************************... |
#include "core/pch.h"
#ifdef SELFTEST
#include "modules/img/src/ogifenc.h"
////////////////////////////////////////////////
// LzwStringLink //
////////////////////////////////////////////////
LzwStringLink::LzwStringLink()
{
str_len = 0;
id_nr = 0;
}
void LzwStringLink::SetString(co... |
#ifndef RepositionBaseExecutor_h
#define RepositionBaseExecutor_h
// standard includes
#include <signal.h>
#include <memory>
#include <sstream>
#include <stdlib.h>
// system includes
#include <Eigen/Dense>
#include <Eigen/StdVector>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/server/simple_... |
//
// ChoosePlayer.h
// GetFish
//
// Created by zhusu on 15/3/5.
//
//
#ifndef __GetFish__ChoosePlayer__
#define __GetFish__ChoosePlayer__
#include "cocos2d.h"
#include "ButtonWithSpriteManage.h"
#include "NoGold.h"
USING_NS_CC;
class ChoosePlayer : public CCLayer
{
public:
CREATE_FUNC(ChoosePlayer);
... |
#include "csubscriber.h"
#define CVUI_IMPLEMENTATION
#include "cvui.h"
CSubscriber::CSubscriber() :
nh_private("~"),
m_bInitialized ( false )
{
//IsInitialized();
}
void CSubscriber::run()
{
std::cout << "CSubscriber::run" << std::endl;
int hl = 110;
int sl = 25;
int vl = 25;
i... |
#include <iostream>
void initArray(int* array, int size) {
for (int i = 0; i < size; ++i) {
std::cout << "array[" << i << "]= ";
std::cin >> array[i];
}
}
void printArray(int* array, int size) {
std::cout << "Array: ";
for (int i = 0; i < size; ++i) {
std::cout << array[i] << ... |
/****************************************************************************
** Meta object code from reading C++ file 'editeconfig.h'
**
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
**
** WARNING! All changes made in this file will be lost!
*********************************************************... |
#include "basis.hpp"
#include <vector>
namespace spacetime {
using datastructures::DoubleTreeVector;
using datastructures::DoubleTreeView;
using space::HierarchicalBasisFn;
using Time::OrthonormalWaveletFn;
using Time::ThreePointWaveletFn;
template <template <typename, typename> class DblTreeIn,
template <... |
#include <iostream>
#include <string>
#include <cstdio>
#include <memory.h>
#include <string.h>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <climits>
typedef long long LL;
type... |
#ifndef HELPER_H
#define HELPER_H
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>
#include <stdarg.h>
#include <fstream>
#include <string>
#include <iostream>
#include <vector>
#include <mutex>
#include <ctime>
#include "hash/sha1.h"
#include "constants.h"
#in... |
#include <cstdlib>
#include <iostream>
#include "Population.h"
using namespace HWA2;
using namespace std;
int main(int argc, char* args[]){
Population population(10);
double fitness, bestFitness = 0;
int iterations = 0, itWithoutImprovement = 0;
while(itWithoutImprovement < 20){
// cout << "new iteration" << en... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.