text stringlengths 8 6.88M |
|---|
#include <cinttypes>
#include <cstdio>
#include <iostream>
#define MAX 93
uint64_t fib(uint64_t n)
{
static uint64_t f1 = 1, f2 = 1;
if (n <= 2)
return f2;
if (n >= MAX)
{
std::cerr << "Cannot computer for n > 93";
return 0;
}
uint64_t temp = f2;
f2 += f1;
f1 ... |
#include "systemc.h"
#include "tester.h"
#include <iostream>
#include <fstream>
void tester::tester_func(){
unsigned int t_data1,t_data2,t_control;
while(1){
if (infile >> t_data1 >> t_data2 >> t_control)
{
out1.write(t_data1);
out2.write(t_data2);
ctrl.write(t_control);
... |
//
// KSymtable.hpp <Keepi>
//
// Made by Julien Fortin
// contact <julien.fortin.it@gmail.com>
//
#ifndef __KSYMTABLE_HPP__
#define __KSYMTABLE_HPP__
#include <map>
#include <iostream>
#include "KObject.hpp"
class KSymtable
{
private:
std::map<std::string, KObject*> __symtable;
KSymtable(const KSymtable&);
... |
/*
===========================================================================
Copyright (C) 2017 waYne (CAM)
===========================================================================
*/
#pragma once
#ifndef ELYSIUM_CORE_DATA_IDBCOMMAND
#define ELYSIUM_CORE_DATA_IDBCOMMAND
#ifndef ELYSIUM_CORE_OBJECT
... |
/* -*- Mode: c++; indent-tabs-mode: nil; c-file-style: "gnu" -*-
*
* Copyright (C) 1995-2005 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser. It may not be distributed
* under any circumstances.
*/
#ifndef XPNUMERICEXPR_H
#define XPNUMERICEXPR_H
#include "modules/xpath/... |
// CryptWindows.h: interface for the CCryptWindows class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CRYPTWINDOWS_H__6BECC471_57F7_11D4_B7F5_0050DA34A2BA__INCLUDED_)
#define AFX_CRYPTWINDOWS_H__6BECC471_57F7_11D4_B7F5_0050DA34A2BA__INCLUDED_
#if _MSC_VER > 1000
#pragma ... |
// Q 22
#include "stdio.h"
#include "conio.h"
void main(void)
{
int a,b,fact,n;
clrscr();
printf("Put the value = ");
scanf("%d",&a);
fact=1;
for(b=a; b>=1; b--)
{
fact=fact*b;
}
printf("%d is %d\n",a,fact);
getch();
} |
// 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.... |
// Scintilla source code edit control
/** @file LexVB.cxx
** Lexer for Visual Basic (include VB6) and VBScript.
** Changes by Zufu Liu <zufuliu@gmail.com> 2011/08
** - Updated ColouriseVBDoc, updated number format checking, added preprocessor handling
** - rewrited FoldVBDoc fucntion, fixed folding bug... |
#include <iostream>
#include <array>
int main() {
using type = float;
std::array<type, 7> v, L;
v[0] = 282.029877;
v[1] = 102.204384;
v[2] = 31.318350;
v[3] = 23.661867;
v[4] = 17.634819;
v[5] = 4.794288;
v[6] = 4.236803;
L[0] = -0.066980;
L[1] = -0.042629;
L[2] = 0.356... |
#include "Game.h"
#include "InputHandler.h"
#include <Windows.h>
#include <sstream>
InputHandler* InputHandler::s_pInstance = nullptr;
InputHandler::InputHandler()
{
m_mousePosition = new Vector2D(0, 0);
for (int i = 0; i < 3; i++)
{
m_mouseButtonStates.push_back(false);
}
}
void InputHandler::clean()
{
}
b... |
// Visual Micro is in vMicro>General>Tutorial Mode
//
/*
Name: GardenConrtonSensor1.ino
Created: 10.06.2021 10:57:35
Author: Bartosz Gumula
*/
// Define User Types below here or use a .h file
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ArduinoJson.h>
#include <ArduinoJson... |
#pragma once
#include "SSSPipeline.h"
#include "AppFrameWork2.h"
#include <sstream>
using namespace std;
class App_SSS :public App{
public:
bool shutdown = false;
bool use_huawei_head = false;
int head_index = 0;
float modelscale = 0.003;
Vector3 modelTranslate = Vector3(-1.6,0.5,-1.6);
vector<SceneNode*> ligh... |
/**今年暑假不AC */
//“今年暑假不AC?”
//“是的。”
//“那你干什么呢?”
//“看世界杯呀,笨蛋!”
//“@#$%^&*%...”
//
//确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。
//作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,
//比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生,以及王小丫的《开心辞典》等等,
//假设你已经知道了所有你喜欢看的电视节目的转播时间表,你会合理安排吗?(目标是能看尽量多的完整节目)
///**Input*/
//输入数据包含多个测试实例,每个测试实例的第一行只有一个整数... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
//
// Copyright (C) 2003-2007 Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
//
// Julien Picalausa
//
#include "core/pch.h"
#include "WindowsOpC... |
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
int main(int argc, char *argv[])
{
cv::VideoCapture cap;
cap.open(0);
if (!cap.isOpened()) {
std::cerr << "err openning camera" << std::endl;
return -1;
}
cv::namedWindow("camera capture");
while (1) {
cv::Mat stream;
cap >> ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; 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.
*/
#include "core/pch.h"
#ifndef NO_CARBON
#ifdef MACGOGI
#include ... |
#include <vector>
#include <iostream>
using namespace std;
int main(){
vector<int> v;
v.push_back(9);
v.push_back(8);
v.insert(v.begin(),10);
for(vector<int>::iterator it = v.begin(); it!=v.end(); ++it){
cout<<*it<<endl;
}
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int>pos, neg;
main()
{
ll n;
while(cin>>n)
{
ll i, x, sum_pos=0, sum_neg=0, lst_pos, lst_neg;
for(i=0; i<n; i++)
{
cin>>x;
if(x>0)
{
lst_pos = i;
... |
/*
* Copyright 2019 LogMeIn
*
* 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 w... |
#include "../command.hpp"
void scale(const double depth, const double breadth) {
response::vacuous();
}
|
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int N;
cin >> N;
int current_block = 1;
while(current_block <= N)
{
if(current_block != 1)
cout << endl;
int case_c = 1;
int n, m;
while(cin >> n >> m)
{
int cnt =... |
#include <iostream>
#include <string>
template<typename T>
struct X {
int m1 = 7;
T m2;
X(T const& x) : m2{x} {}
void mf1() {}
void mf2();
};
template<typename T>
void X<T>::mf2() {}
template<typename T>
struct Vector_iter {};
template<typename T>
class Vector {
public:
using value_type = T... |
// Created on: 1995-10-25
// 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 ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 1995-2009 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 GEOLOCATION_SUPPORT
#include "mod... |
#include <simplecpp>
main_program{
initCanvas();
Turtle t1, t2, t3;
t2.left(120);
t3.left(240);
repeat(8){
t1.forward(100);
t2.forward(100);
t3.forward(100);
t1.left(360.0/8);
t2.left(360.0/8);
t3.left(360.0/8);
}
wait(5);
}
|
/*
* controller.cpp
* Control the game, move pieces, etc.
*
* @author Yoan DUMAS
* @versionn 1.0
* @date 20/12/2013
*/
#include <iostream>
#include <stdlib.h>
#include "controller.h"
#include "factory.h"
#include "draughtpiece.h"
#include "clickablelabel.h"
Controller::Controller(QWidget * parent) :
QMai... |
#include "Cube.h"
// public
Cube::Cube()
{
mVertexData.clear();
mIndexData.clear();
}
Cube::~Cube()
{
mIndexData.clear();
mVertexData.clear();
}
void Cube::Initialize()
{
mInstanced = false;
mTessellated = false;
mInputLayoutSize = sizeof(IL_PosTexNor);
InitializeData();
InitializeBuffer();
}
void Cube... |
#include <iostream>
using namespace std;
#include <stdlib.h>
#include<conio.h>
double avg=0;//统计总分和加平均分权
const int mathp=4;//数学学分
const int cppp=5;//C++学分
const int sum=70;//设置总学分
class Student
{
private:
int num;
char *name;
char *sex;
char *phone;
char *rphone;
double math;
double ... |
#pragma once
#include <string>
class UDPReceiver
{
public:
UDPReceiver(uint16_t port, const std::string& networkInterface="", const std::string& multicastGroup="" , int timeout = 1000 );
virtual ~UDPReceiver();
virtual int receive(uint8_t *buffer, uint32_t bufferSize);
private:
int _timeout;
int... |
#pragma once
#include "qwidget.h"
class CHisto : public QWidget
{
Q_OBJECT
public:
CHisto(QWidget *parent);
~CHisto();
private:
//Pour ne pas commencer a tracer en 0,0
QPoint m_commencer;
int * m_nTab;
int m_nMaxi ;
int m_nCoul ; // 0 = Noir, 1= Red, 2 = Green, 3= Bleu
public:
void setHisto( int * Tab, in... |
class LandRover_CZ_EP1;
class LandRover_CZ_EP1_DZE: LandRover_CZ_EP1 {
scope = 2;
displayname = "$STR_VEH_NAME_MILITARY_OFFROAD_DESERT";
vehicleClass = "DayZ Epoch Vehicles";
crew = "";
typicalCargo[] = {};
class TransportMagazines {};
class TransportWeapons {};
class Turrets {};
transportMaxWeapons = 15;
tra... |
#pragma once
#include <QAbstractListModel>
#include "Entities/Statistics/PassedTest/PassedTest.h"
class PassedTestModel : public QAbstractListModel {
Q_OBJECT
public:
explicit PassedTestModel(const PassedTest &passedTest, QObject *parent = nullptr);
// :: QAbstractListModel ::
int rowCount(const Q... |
#include <iostream>
#include <queue>
using namespace std;
/* → → → → → → → → → → → → → → → → → → → → → → → → → → → →
→ → → → → → → → → → → → → → → → → → → → → → → → → → → → */
#define int long long int
#define ld long double
#define F first
#define S second
#define P pair<int,int>
#define pb push_back
#define endl '... |
/*
* 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: web_client_main.cpp
* Author: ssridhar
*
* Created on October 11, 2017, 1:06 PM
*/
#include "namespace.h... |
#pragma once
#include "Viruss.h"
#include <list>
#include "FluViruss.h"
#include "DengueViruss.h"
using namespace std;
class Patient
{
private:
int m_resistance;
list <Viruss*> m_virusList;
int m_state;
public:
Patient();
Patient(int, list <Viruss *>, int);
~Patient();
void InitResistance();
void DoStart();
... |
#include "stdafx.h"
#include "TypeInQuestion.h"
BOOST_AUTO_TEST_SUITE(TypeInQuestionSuite)
using namespace qp;
using namespace std;
BOOST_AUTO_TEST_CASE(Construction)
{
set<string> answers = { "First answer", "Second answer" };
CTypeInQuestion quest("Question description", answers);
BOOST_REQUIRE_EQ... |
//
// Created by arnito on 4/06/17.
//
#ifndef BEAT_THE_BEAT_QUOTE1ACTOR_HPP
#define BEAT_THE_BEAT_QUOTE1ACTOR_HPP
#include "../Actor.h"
#include "../entities/Quote.h"
class Scene;
class Quote1Actor : public Actor{
public:
Quote1Actor(int playerId,Quote &q, Scene &s);
~Quote1Actor();
void update(const sf... |
#include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
const char* MySSID = "ssid"; // Local Network SSID
const char* MyPASSWORD = "password"; // Local Network Password
const String PART_ID = "3";
/*****************************************************/
const char* WIFI_SSID = "MyWiFi";
const char... |
#include <cmath>
#include "trm/binary.h"
/**
* Returns main-sequence radius given a mass. Completely crude
* at the moment just uses R = M in solar units. Needs to be updated
* for anything critical.
* \param m mass of star (solar masses)
* \return Radius of star (solar radii)
*/
double Binary::mr_main_sequence(... |
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution1 {
public:
int permuteUnique(vector<int>& nums) {
int res=1;
for(int i=1;i<=nums.size();i++)
res*=i;
sort(nums.begin(),nums.end());
int cnt=1,sum=1;
for(int i=1;i<nums.size();i++)
{
if(nums[i]==nums[i-1])
{... |
/* leetcode 125
*
*
*
*/
#include <string>
#include <unordered_set>
#include <algorithm>
using namespace std;
class Solution {
public:
bool isPalindrome(string s) {
if(s.size() == 0) {
return true;
}
for (int l = 0, r = s.size() - 1; l < r; l++, r--) {
if (!isalnu... |
#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;
typedef long long L... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/video.hpp>
#include <opencv2/video/background_segm.hpp>
#include "opencv2/bgsegm.hpp"
#include <vector>
#include <open... |
#include <Command.h>
/*
Testing the command class for serial control
*/
const char trigPin = 3;
const char echoPin = 2;
Command startTrig = Command('i', trigPin, 'o');
Command startEcho = Command('i', echoPin, 'i');
Command trigLow = Command('w', trigPin, 'l');
Command trigHigh = Command('w', trigPin, 'h');
Comm... |
#ifndef AS64_STD_DYNAMICAL_MOVEMENT_PRIMITIVE_H
#define AS64_STD_DYNAMICAL_MOVEMENT_PRIMITIVE_H
#include <dmp_lib/DMP/DMP_.h>
#include <dmp_lib/GatingFunction/SigmoidGatingFunction.h>
namespace as64_
{
namespace dmp_
{
class DMP : public DMP_
{
public:
DMP(int N_kernels, double a_z, double b_z,
std::shared... |
#ifndef HTML5ELEMENT_H
#define HTML5ELEMENT_H
class HTML5Element
{
public:
#include "modules/logdoc/src/html5/elementtypes.h"
#include "modules/logdoc/src/html5/attrtypes.h"
enum Ns
{
HTML,
MATH,
SVG,
XLINK,
XML,
XMLNS,
WML
};
private:
};
#endif // HTML5ELEMENT_H
|
#include "TranscoderManager.h"
#include "MessageManager.h"
#include <iostream>
#include <string>
#include <vector>
#define LENGTH_OF_LISTEN_QUEUE 20
using namespace std;
int threadNum=0;
unsigned int _stdcall handleMessage(void *params) {
InfoNode *node = (InfoNode *)params;
MessageList *list = node... |
#include "thm_string.h"
#include <iostream>
using namespace std;
thm_string::thm_string()
{
cout << "Thm_String: Default Constructor called" << endl;
l = {};
}
thm_string::thm_string(char *str)
{
cout << "Thm_String: Constructor called with char *" << endl;
l = {};
for(int i = 0; str[i] != '\0... |
#include "sea_lion.h"
using namespace std;
SeaLion::SeaLion(){
age = 0;
cost = 700;
offspring_size = 1;
base_food_cost = 80;
revenue = 140;
} |
using namespace std;
#include <vector>
#include <unordered_map>
class CrackWalls
{
public:
CrackWalls();
~CrackWalls();
void findWays(int);
long long findPoses(int);
private:
vector<string> ways;
void getWays(int, char *, int);
unordered_map<int, vector<int>> poses;
unordered_map<string, long lon... |
#include "utils.hpp"
double toDouble(const json &node)
{
string str = node.dump();
return stod(str.substr(1, str.size() - 2));
}
|
#include<iostream>
int main () {
int year = 0;
char space;
int month = 0;
char dash;
int day = 0;
std::cout << "Input Winnie's Birthday (ex. 2018 09-01) : ";
std::cin >> year >> space >> day >> dash >> month;
if ( year != 2018 ) {
std::cout << " You should enter 2018 " << std::endl;
std::cin >> year ... |
/**
* Copyright 2015 ViajeFacil
* @author Hugo Ferrando Seage
* @author David Jiménez Cuevas
* @author Estefanía Ortego García
*
* Los negos: una compañía crea negos, son los encargados de gestionar
* los paquetes y billetes aéreos, que le darán a los owners y estos
* a las oficinas correspondientes.
*/... |
#include "dialog.h"
#include <QBitmap>
#include <QDebug>
#include <QKeyEvent>
#include <QDateTime>
#include <QValidator>
#include "ui_dialog.h"
#include "Hardware/Motion/Motion.h"
#include "thread/rx_thread.h"
#include "Hardware/NRF24L01/NRF24L01.h"
#include "inputpara.h"
#include "singl_motion.h"
extern u8 buf[32];
... |
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
scanf("%d",&t);
int h,m,s;
s=t%60;
m=((t-s)/60)%60;
h=(t-s-m*60)/3600;
printf("%d:%d:%d",h,m,s);
return 0;
}
|
#include <iostream>
#include <vector>
#include <stack>
#include <cstring>
#define MAX 20001
int n, m, ID[MAX], ID_idx, GROUP[MAX], GROUP_idx;
bool finished[MAX];
std::vector<int> link[MAX];
std::stack<int> stk;
void push_link(int x, int y)
{
if(x < 0)
{
x = -x + m;
}
if(y < 0)
{
y =... |
#include <iostream>
#include "ListaST.h"
#include "Hora.h"
#include <stdlib.h>
using namespace std;
int main()
{
ListaST<Hora> A,B;
Hora horaUsuario;
int n;
cout << "Numero de horas a guardar: ";
cin >> n;
for(int i = 0;i<n;i++){
Hora H;
H.pideleAlUsuarioTusDatos();
A... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 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 MODULES_OTL_PAIR_H
#define MODULES_OTL_PAIR_H
/// A simple, ... |
// Pong.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "pong.hpp"
#include "menu.hpp"
#include "main.h"
int windowWidth;
int windowHeight;
sf::Font font;
int main(int argc, char** argv)
{
windowWidth = 800;
windowHeight = 600;
font.loadFromFile("arial.ttf");
//Appl... |
#include "Config.h"
#include <vector>
#include <iostream>
using namespace std;
bool interpolateD(const Config& config, const char * path,
float p, double& out){
float start, end;
Setting& setting = config.lookup(path);
if(setting.lookupValue("from",start)
&& setting.lookupValue("to",... |
/**********************************************************************************
head.h
This file contains the class definition, attributes, and methods of the Head.
The Head consists of all the mechanical systems as well as all the sensors and
electronics (excluding the LCD user interface). The functions i... |
/*
* File: Reader.h
* Author: ovoloshchuk
*
* Created on March 9, 2011, 12:36 PM
*/
#ifndef _READER_H
#define _READER_H
#include "Object.h"
#include "DataContainer.h"
#include <fstream>
#include <map>
#include <string>
class Reader {
public:
Reader(char *filename);
Reader(const Reader& orig);
voi... |
#include <Unixfunc.h>
#include <iostream>
using namespace std;
int sendFd(int sfd, int fd)
{
struct msghdr msg;
memset(&msg, 0, sizeof(msg));
struct iovec iov[2];
char buf1[10] = "hello";
char buf2[10] = "world";
iov[0].iov_base = buf1;
iov[0].iov_len = 5;
iov[1].iov_base = buf2;
iov[1].iov_len = 5;
msg.msg_i... |
/*
* syslog.cpp
*
* Created on: Dec 12, 2012
* Author: suntus
*/
#include "syslog.h"
SysLog::SysLog() {
}
SysLog::~SysLog() {
}
|
//
// Created by 송지원 on 2019-11-13.
//
#include "iostream"
using namespace std;
const int DIV_NUM = 10007;
long long D[1001][11];
int main () {
long long result = 0;
int i, j, k, N;
for (j=0; j<=9; j++) {
D[1][j] = 1;
}
cin >> N;
for (i=2; i<=N; i++) {
for (j=0; j<=9; j++)... |
#ifndef TP_PPROJECT_EMPLOYEEOPTIONS_H
#define TP_PPROJECT_EMPLOYEEOPTIONS_H
#include <iostream>
#include "BaseUserOptions.h"
class EmployeeOptions : public BaseUserOptions {
public:
~EmployeeOptions() override = default;
// Get log
void getLog(const LogUpdates& logUpdates, int globalId,
... |
/*
Name : Aman Jain
Date : 11-07-2020
Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s.
Time Complexity :O(logn)
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll binaryStrings(ll n, ll dp[]){
if(n<1)
return ... |
#include "corridor_navigation/corridor_navigation_ros.h"
#include <ros/console.h>
int main(int argc, char **argv)
{
if (ros::console::set_logger_level(ROSCONSOLE_DEFAULT_NAME, ros::console::levels::Debug))
{
ros::console::notifyLoggerLevelsChanged();
}
ROS_DEBUG("Starting corridor navigation ... |
//
// Created by griha on 09.12.17.
//
#pragma once
#ifndef MIKRONSST_HSM_ENCODING_HPP
#define MIKRONSST_HSM_ENCODING_HPP
#include <stdlib.h>
#include <string>
namespace griha { namespace hsm {
inline std::wstring to_wstr(const std::string &src) {
std::wstring ret(src.size(), L' ');
ret.resize(... |
#pragma once
#include "utils/time_utils.hpp"
#include "utils/exception.hpp"
#include <chrono>
#include <mutex>
using namespace std;
using namespace chrono;
namespace nora {
enum class gid_type {
ROLE,
NOTICE,
MAIL,
LEAGUE,
GLADI... |
#include "Particle.h"
Particle::Particle() = default;
Particle::Particle(const int id) : life(0), id(id), temperature(0)
{
isBurning = false;
solid = false;
color = sf::Color::Black;
}
|
// Wed Aug 24 15:46:50 EDT 2016
// Evan S Weinberg
// Include file for CR-M
// WARNING!!!
// MULTISHIFT CR IS A PARTICULARLY UNSTABLE ALGORITHM.
// TECHNICALLY, ONE SHOULD MONITOR CONVERGENCE BY LOOKING FOR \zeta_n < 1.
// On a more mathematical level, CR appears to generate a Krylov space in
// Ab, instead of in b (w... |
// #include "base.h"
// Graph::Graph(){
// int n = LENGTH(chars);
// ch2int = new map<char, int>();
// int2ch = new map<int, char>();
// for(int i=0; i<n; i++){
// ch2int->insert(pair<char, int>(chars[i], i));
// int2ch->insert(pair<int, char>(i, chars[i]));
// }
// }
... |
#include "NextDate.h"
#include "gtest/gtest.h"
class NextDateTest : public testing::Test{
protected:
//virtual void Setup();
//virtual void TearDown();
};
TEST_F(NextDateTest, BoundaryValueTesting)
{
EXPECT_EQ(TellNextDate(1812,1,1),"1812/1/2");
EXPECT_EQ(TellNextDate(1812,1,15),"1812/1/16");
EXPECT_EQ(TellNextDa... |
#include "basis.hpp"
#include "hierarchical_basis.hpp"
#include "orthonormal_basis.hpp"
#include "three_point_basis.hpp"
namespace Time {
bool Element1D::Refine() {
if (is_full()) return false;
make_child(/* parent */ this, /* left_child */ true);
make_child(/* parent */ this, /* left_child */ false);
return... |
#pragma once
#include <cstdint>
namespace OpenFlight
{
//------------------------------------------------------------------------------
struct Color3f
{
Color3f() : mRed(0.0), mGreen(0.0), mBlue(0.0) {}
Color3f(float iR, float iG, float iB) : mRed(iR), mGreen(iG), mBlue(iB) {}
floa... |
class ACE_Module;
class ACE_ModuleInteraction;
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_Actions {
class ACE_MainActions {
displayName = CSTRING(MainAction);
distance = 4;
condition = QUOTE(true);
... |
#ifndef SCROLLING_BG_H
#define SCROLLING_BG_H
#include "game.hpp"
#include <sgfx/image.hpp>
#include <sgfx/primitives.hpp>
#include <chrono>
#include <memory>
#include <string>
class scrolling_bg final : public game_object {
public:
scrolling_bg(game_proxy proxy, std::string const& image) : img_{sgfx::load_rl... |
//: C12:OverloadingUnaryOperators.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
#include <iostream>
using namespace std;
// Funkcje niebedace funkcjami skladowymi:
class Integer {
long... |
#include "Resource.h"
Resource::Resource(String name) {
_name = name;
_amount = 0;
}
Resource::Resource(String name, int initialAmount) {
_name = name;
_amount = initialAmount;
}
int Resource::add(int amount) {
_amount += amount;
return _amount;
}
int Resource::getAmount() {
return _amount;
} |
#include "gb_dbg.h"
#include "gb_memory.h"
#include "gb_util.h"
#include <iostream>
void Debug::run(void) {
// check events
stopped |= check_breakpoints();
stopped |= check_watchpoints();
stopped |= step_resume;
step_resume = false;
// drop into debugger prompt for break/watch/step
while (stopped) {
... |
// Created on: 1995-04-26
// Created by: Modelistation
// 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 GNU ... |
#pragma once
#include "render_component.h"
#include "..\\external\SDL2-2.0.10\include\SDL.h"
class Texture;
class SpriteAnimationComponent : public RenderComponent {
public:
SpriteAnimationComponent() {}
bool Create(const Name& name, Entity* owner, const Name& texture_name, const vector2& origin = vector2::zero)... |
// Hero's Inventory 3.0
// Demonstrates iterators
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void weapons()
{
vector<string>::iterator myIterator;
vector<string>::const_iterator iter;
vector<string> weapons;
weapons.push_back("longsword");
weapons.push_back("shor... |
/*
@project: @@PROJECT@@
@repo: https://github.com/Alexandra-Miller/@@PROJECT@@
@creator: Alexandra Marie Miller
@description
@description
@dependencies: bash
*/
/* =================== CONSTANTS ========================================== */
/* =================== FUNCTIONS =====================================... |
/********************************************************************************
** Form generated from reading UI file 'mainwindow.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 "TrustchainBuilder.hpp"
#include <Tanker/Entry.hpp>
#include <Tanker/Errors/AssertionError.hpp>
#include <Tanker/Groups/GroupEncryptedKey.hpp>
#include <Tanker/Groups/Manager.hpp>
#include <Tanker/Identity/Delegation.hpp>
#include <Tanker/Serialization/Serialization.hpp>
#include <Tanker/Share.hpp>
#include <... |
#pragma once
#ifndef _MOUSE_STATE_H
#define _MOUSE_STATE_H
#include "Keys.h"
#include "../maths/MathCore.h"
class MouseState
{
private:
bool mouseLButton;
bool mouseRButton;
bool m_keepMouseOnScreen;
bool m_wrapMouseAroundScreen;
POINT pt;
bool m_init;
Vector2 m_mousePosition;
Vector2 m_prevMousePosition;
pub... |
// SettingWnd.h: interface for the CSettingWnd class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SETTINGWND_H__DE96A50E_45B2_4D1F_85E6_9570518EC1CE__INCLUDED_)
#define AFX_SETTINGWND_H__DE96A50E_45B2_4D1F_85E6_9570518EC1CE__INCLUDED_
#if _MSC_VER > 1000
#pragma ... |
#pragma once
#include "Vector4.h"
#include "BasicLogicDefinitions.h"
class StaticObjectModel
{
public:
typedef struct {
float left,top,
right,bottom;
} Rect;
enum StaticObjectState {
STATIC_OBJECT_CANNOT_BE_COLLECTED,
STATIC_OBJECT_TO_BE_COLLECTED,
STATIC_OBJECT_COLLECTED
};
//The below is a simplifica... |
/**********************************************************
//
// Wih (Wireless Interface Hockey)
//
// puck.cpp (パッククラス)
//
// Copyright (C) 2007,
// Masayuki Morita, Kazuki Hamada, Tatsuya Mori,
// All Rights Reserved.
**********************************************************/
#include "puck.h"
... |
// Created on: 1995-03-08
// 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... |
/****************************************************************
* TianGong RenderLab *
* Copyright (c) Gaiyitp9. All rights reserved. *
* This code is licensed under the MIT License (MIT). *
*****************************************************************/
#pragma once
#include <chrono>
namespace T... |
#ifndef __VIVADO_SYNTH__
#include <fstream>
using namespace std;
// Debug utility
ofstream* global_debug_handle;
#endif //__VIVADO_SYNTH__
#include "bxy_ur_4_opt_compute_units.h"
#include "hw_classes.h"
struct blurx_blurx_update_0_write0_merged_banks_3_cache {
// RAM Box: {[0, 1920], [0, 1079]}
// Capacity: 2... |
#include <iostream>
#include <vector>
#define MAX 10001
#define MOD (long long)1e12
typedef long long ll;
std::vector<ll> dp[MAX];
ll Get(int i, int j)
{
if(dp[i].size() <= j)
{
return 0;
}
return dp[i][j];
}
int main()
{
dp[0].push_back(0);
dp[1].push_back(1);
for(int i = 2; i < MAX... |
#pragma once
#include <atomic>
inline namespace arba
{
namespace evnt
{
class event_info
{
inline static std::size_t generate_type_index_()
{
static std::atomic_size_t index = 0;
return index++;
}
public:
template <class event_type>
inline static std::size_t type_index()
{
... |
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo2;
int potpin0 = 0; // address analog pin to read data from the potentiometer
int potpin1 = 1; // potentiometer address
//int heartbeat = 2; // replace potpin2 with heartbeat if you want to add a heart beat sensor
int val0; /... |
#ifndef NESTED_INTEGRATION_STD_LIST_ITERATE_HPP
#define NESTED_INTEGRATION_STD_LIST_ITERATE_HPP
#include <list>
#include "nested/integration/std/detail/iterate.hpp"
#include "nested/integration/iterate.hpp"
namespace nested
{
namespace integrate
{
namespace iterate
{
template<typename State, typen... |
// Created on: 1995-07-24
// Created by: Modelistation
// 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 GNU ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.