text stringlengths 8 6.88M |
|---|
#include "PlayerCharacter.h"
#include "AnimInstance/PlayerCharacterAnimInst/PlayerCharacterAnimInst.h"
#include "Component/ZoomableSpringArm/ZoomableSpringArmComponent.h"
#include "Component/CharacterMovementHelper/CharacterMovementHelperComponent.h"
#include "Component/PlayerInteract/PlayerInteractComponent.h"
APl... |
#include "Tuning.h"
Tuning::Tuning(int tuning) { this->setTuning(tuning); }
Tuning::~Tuning() {}
void Tuning::generateEqualTemperament(float degree) {
this->currentTuning.clear();
for (float i = 0.f; i <= degree; i++)
this->currentTuning.push_back(pow(2.f, i / degree));
}
float Tuning::getFreqFromMIDI(int s... |
/*
* 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.
*/
#include <quic/QuicConstants.h>
#include <quic/api/QuicPacketScheduler.h>
#include <quic/flowcontrol/QuicFlowController.h>
#inclu... |
/**************************************************************
* File Name : myplaylistitem.cpp
* Author : ThreeDog
* Date : Wed Jun 07 15:04:46 2017
* Description : 播放列表的条目类
*
**************************************************************/
#include "myplaylistitem.h"
#include <QFileInfo>
#includ... |
#pragma once
#include "LoadBalancing-cpp/inc/Client.h"
#include "BaseView.h"
#define PLAYER_UPDATE_INTERVAL_MS 500
using namespace ExitGames::Common;
using namespace ExitGames::LoadBalancing;
struct LocalPlayer
{
LocalPlayer();
int x;
int y;
int z;
unsigned long lastUpdateTime;
};
class LoadBalancingListener :... |
// File: main.cpp
// Date: 09/10/2014
// Description: Manage the entree point function
// Author: roboticslab - UC3M
// http://roboticslab.uc3m.es/
#include "Humabot.hpp"
#include <cstdlib>
using namespace webots;
int main(int argc, char **argv)
{
Humabot *controller = n... |
#ifndef FIELD_H
#define FIELD_H
#include <QObject>
#include "Array.h"
class Sight;
class Object;
class Force;
class QTimer;
class Field : public QObject
{
Q_OBJECT
public:
class Event;
class MoveEvent;
class CrashEvent;
class ForceEvent;
private:
static Field* field;
Field(void);
Field(const Field&);
virt... |
#include <iostream>
#include <algorithm>
using namespace std;
long factors[1001] = { 0 };
long pos[1001];
void preCalcDivisors() {
long count = 0;
long n = 0;
long divisors = 1;
for (long j = 1; j <= 1001; j++) {
count = 0;
n = j;
divisors = 1;
for (long i = 2; i*i <= n; i++) {
count = ... |
#ifndef __DE__EMITTER_H__
#define __DE__EMITTER_H__
#include <map>
#include <functional>
#include <string>
namespace de {
struct __nodata {};
template <class T = struct __nodata>
class Emitter
{
typedef std::function< void(T) > event_cb;
typedef std::multimap<std::string, event_cb> mm_t;
mm_t consumers;
... |
#define BOOST_TEST_MODULE GraphLaplacian
#include <boost/test/unit_test.hpp>
#include <utility>
#include <vector>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/numeric/ublas/assignment.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/matrix.... |
// Touchboard.h
#ifndef _TOUCHBOARD_h
#define _TOUCHBOARD_h
#include "Config.h"
#include "Output.h"
#include "PinConfig.h"
#ifndef TEENSY
#include "CapacitiveSensor.h"
#endif
#include <EEPROM.h>
#include <FastLED.h>
#define CALIBRATION_SAMPLES 75
#define CALIBRATION_DETECTION_THRESHOLD 8
#define CALI... |
/*
* File: test.cpp
* Author: Richard Fussenegger
* Author: Markus Deutschl
*
* Created on November 19, 2012, 10:50 PM
*/
#include <iostream>
#include <list>
#include <vector>
#include "skiplist.h"
using namespace std;
int main() {
/** Iterator and random key variable. */
int i = 0, randKey;
/*... |
#include <cstring>
#include <ostream>
#include <string>
#include <sstream>
#include <vector>
#include "profile_util.h"
#include "timer.h"
void debug_timer_dump(char const *timer)
{
if (!TIMER_EXISTS(timer)) {
debug("TIMER (" + std::string(timer) + "): never invoked");
return;
}
std::ostream *os = TIMER... |
#include<stdio.h>
#include<string.h>
char s[200000000];
int main()
{
int len;
scanf("%s",&s);
len = strlen(s);
if (len<=3)
{
if (len==3)
printf("%c%c%c\n",s[0],s[1],s[2]);
else if (len==2)
printf("%c%c\n",s[0],s[1]);
else printf("%c\n",s[0]);
}
... |
#include<iostream>
using namespace std;
class Node {
/*class Node to create a pointer
*that points to next element of the queue and data
*that has to be stored in the node */
public:
int data;
Node* next;
Node() { //constructor.
data = 0;
next = NULL;
}
};
class Stack {
/*
* Class for Stack da... |
/**
* Write a program to calculate sum of n numbers using thread library.
*
*/
#include <cstdlib>
#include <iostream>
#include <pthread.h>
using namespace std;
long long sum;
void *runner(void *number);
int main(int argc, char **argv)
{
if (argc != 2)
{
cerr << "Usage: ./main <upper>" << endl;
exit... |
/*
* 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.
*/
#include <quic/dsr/Types.h>
namespace quic {
WriteStreamFrame sendInstructionToWriteStreamFrame(
const SendInstruction& send... |
//------------------------------------------------------------------------------
/*
This file is part of Beast: https://github.com/vinniefalco/Beast
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
Portions of this file are from JUCE.
Copyright (c) 2013 - Raw Material Software Ltd.
Please visi... |
#include<bits/stdc++.h>
using namespace std;
#define maxn 55
typedef long long ll;
ll dp[maxn][5];
ll ans[maxn];
void init(){
ans[1]=2;
ans[2]=3;
dp[2][0]=1;
dp[2][1]=1;
dp[2][2]=1;
for(int i=3;i<52;i++){
dp[i][0]=dp[i-1][0]+dp[i-1][2];
dp[i][1]=dp[i-1][0]+dp[i-1]... |
//算法:数论
//先将输入x,y进行质因数分解
//然后比较分解后每一个质数的出现次数:
//如果xx[i]<yy[i],ans*=2;
//如果xx[i]>yy[i],证明给出数据不合法,没有答案
#include <cstdio>
#include <cmath>
#include <algorithm>
const int N = 1050;
int xx[N],yy[N];
void split(int x,int *s)//拆分
{
int n=sqrt(x);
for(int i=2;i<=n;i++)
while(x%i==0)
x/=i,s[i]++;
i... |
#ifndef DPREVIEWWINDOW_H
#define DPREVIEWWINDOW_H
#include <QAbstractNativeEventFilter>
#include <QQuickItem>
#include <QMutex>
#include <QPointer>
class DPreviewWindow : public QQuickItem
{
Q_OBJECT
Q_DISABLE_COPY(DPreviewWindow)
Q_PROPERTY(quint32 xid READ xid WRITE setXid NOTIFY xidChanged)
public:
... |
// Created on: 2001-01-06
// Created by: OCC Team
// Copyright (c) 2001-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 publ... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
// version1
/*
std::vector<int> countBits(int num)
{
std::vector<int> ret;
for (int i = 0; i <= num; ++i) {
int count = 0;
int n = i;
while (n > 0) {
if ((n & 1) == 1) {
++count;
... |
/***************************************************************************
* Copyright (C) 2009 by Dario Freddi *
* drf@chakra-project.org *
* *
* This pr... |
#ifndef _CBankGetMoney_h_
#define _CBankGetMoney_h_
#pragma once
#include "CHttpRequestHandler.h"
#include <string>
class CBankGetMoney : public CHttpRequestHandler
{
public:
CBankGetMoney(){}
~CBankGetMoney(){}
virtual int do_request(const Json::Value& root, char *client_ip, HttpResult& out);
private:... |
//链式前向星
//ST<int,MAXN<<1> st;
int dfn[MAXN<<1];//欧拉序列,即dfs遍历的顺序,长度为2*n-1,下标从1开始
int id[MAXN];//点i在dfn中第一次出现的位置
int stamp;
void dfs(int u,int pre,int dep) {
dfn[++stamp]=u;
st.data[stamp]=dep;
id[u]=stamp;
for(int i=head[u]; ~i ;i = edge[i].next) {
int v=edge[i].to;
if(v==pre)continue;
... |
#include "mainwindow.h"
#include <QApplication>
#include <QtSql/QSqlDatabase>
#include <iostream>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
// qDebug() << QCoreApplication::libraryPaths ();
// QSqlDatabase db = QSqlDatab... |
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
using namespace cv;
int main(int, char**)
{
const char* gst = "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)120/1 ! \
nvvidconv flip-method=0 ! video/x-raw, ... |
/* -*- 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.
*
* @author Arjan van Leeuwen (arjanl)
*/
#ifndef GTK_SKIN_ELEMENT_H
#define GTK_SKIN_... |
#pragma once
#include <core/encoding/Utf8.h>
namespace launcher {
namespace cli {
namespace error {
struct BatOption {
using Superset = core::encoding::Utf8;
Superset option;
operator Superset const&() const noexcept {
return option;
}
operator Superset &() noexcept {
return op... |
#include "Statistica.h"
#include "Util.h"
#include "Pisica.h"
#include "Caine.h"
#include "Iepure.h"
#include "testoasa.h"
#include "papagal.h"
#include "iguana.h"
#include "corb.h"
#include "caracatita.h"
#include "peste.h"
#include "porumbel.h"
#include "sarpe.h"
#include "foca.h"
Statistica* Statisti... |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
int arr[3];
char ABC[4];
for(int i = 0; i < 3; i++)
{
scanf("%d", &arr[i]);
}
for (int i = 0; i < 3; i++)
{
scanf(" %c", &ABC[i]);
}
sort(arr, arr + 3);
for (int i = 0; i < 3; i++)
{
... |
#include <string>
#include <algorithm>
#include <cctype>
#include <iostream>
#include <numeric>
#include <exception>
class Kata {
public:
std::string encrypt(std::string text);
std::string decrypt(std::string encryptedText);
private:
const static int a = 0;
const static std::string code;
};
const std::str... |
#pragma once
#include "afxwin.h"
#include <iphlpapi.h>
// MyTrafficDlg 对话框
class MyTrafficDlg : public CDialogEx
{
DECLARE_DYNAMIC(MyTrafficDlg)
public:
MyTrafficDlg(CWnd* pParent = NULL); // 标准构造函数
virtual ~MyTrafficDlg();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_TRAFFIC_DIALOG };
... |
#pragma once
#include "cdll_int.h"
#include "globalvars_base.h"
struct edict_t;
class CBotCmd
{
public:
int command_number;
int tick_count;
QAngle viewangles;
float forwardmove;
float sidemove;
float upmove;
int buttons;
byte impulse;
int weaponselect;
int weaponsubtype;
int random_seed;
short mousedx;
s... |
#include<Arduino.h>
#include<AntaresESP8266HTTP.h> // Inisiasi library HTTP Antares
#define ACCESSKEY "017c7e810b75e05b:0932f32db0c81348" // Ganti dengan access key akun Antares anda
#define WIFISSID "TP-LINK 2" // Ganti dengan SSID WiFi anda
#define PASSWORD "asdf1234" // Ganti dengan password WiF... |
/*********************************************************\
* 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... |
#ifndef CAR_H
#define CAR_H
#include <string>
#include "driver.h"
class SteeringWheel{
};
class Car{
Driver *dere;
SteeringWheel s_wheel; //composition is demonstrated here
std::string car_type;
public:
Car(std::string ct, Driver *driver = NULL) :
dere(driver), car_type(ct){}
Car(Driver *drive... |
/******************************************
* AUTHOR : Abhishek Naidu *
* NICK : abhisheknaiidu *
******************************************/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define all(n) n.begin(),n.end()
#define pii ... |
#include<iostream>
#include<map>
#include<cstring>
#define hashmap map<char,node*>
using namespace std;
class node
{
public:
char data;
bool isTerminal;
hashmap h;
node(char d)
{
data=d;
isTerminal=false;
}
};
class trie
{
public:
node *root;
trie()
{
root=new node(' ');;
}
void insert(string s)
{
... |
/*
* 题目:2. 两数相加
* 链接:https://leetcode-cn.com/problems/add-two-numbers/
* 知识点:链表
*/
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
ListNode *tHead = new ListNode(-1);
ListNode *cur = tHead;
// 处理相加
int add = 0;
while (l1 && l2) {
... |
/*
compute the Restricted Voronoi Diagram
and Update the seeds
with Cuda to accelerate the program
starting time : 2016.7.25
*/
#include "Command_line.h"
#include "Mesh.h"
#include "Mesh_io.h"
#include "Points.h"
using namespace P_RVD;
int main(int argc, char** argv)
{
std::vector<std::string> filenames;
if... |
//kadane algorithm
class Solution {
public:
int maxSubArray(vector<int>& nums)
{
int a=0,m=INT_MIN;
for(int x : nums)
{
a += x;
m = max(a,m);
a = max(a,0);
}
return m;
}
};
|
//====================================================================================
// @Title: GAME MANAGER
//------------------------------------------------------------------------------------
// @Location: /prolix/framework/include/cGame.h
// @Author: Kevin Chen
// @Rights: Copyright(c) 2011 V... |
// Created on: 1993-01-29
// Created by: Isabelle GRIGNON
// 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 G... |
#include"functions.h"
#include"stamping.h"
int AinverseB(vector<vector<double> > &Ad,vector<vector<double> > &Bd,vector<vector<double> > &Cd)
{
int sizeA=Ad.size();
int Nd=sizeA;
int colB=(Bd[0]).size();
int NRHSd=colB;
int LDAd =Nd;
int LDBd=Nd;
int IPIVd[Nd];
int INFOd;
double ad[LDAd*Nd],bd[LDBd*NRHSd];
i... |
#ifndef SOLUTION_H
#define SOLUTION_H
#include <iostream>
#include <vector>
#include "utils.h"
#include "mTree.h"
#include "mList.h"
#include "mNode.h"
using namespace std;
class Solution
{
public:
//#4 findMedianSortedArrays
double findMedianSortedArrays(vector<int> &nums1, vector<int> &nums2);
//#5 longestPal... |
/*
* Scythe Statistical Library Copyright (C) 2000-2002 Andrew D. Martin
* and Kevin M. Quinn; 2002-present Andrew D. Martin, Kevin M. Quinn,
* and Daniel Pemstein. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify under the terms of the GNU General Public License a... |
/*
ID: stevenh6
TASK: stall4
LANG: C++
*/
#define problemname "stall4"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using db = double;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using vi = vector<int>;
using vb = vector<bool>;
using ... |
/*
* 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.
*/
#include <quic/congestion_control/TokenlessPacer.h>
#include <quic/congestion_control/CongestionControlFunctions.h>
namespace q... |
/*
* Copyright (C) 2013 Tom Wong. All rights reserved.
*/
#include "gtabstractdocument.h"
#include <QtCore/QString>
GT_BEGIN_NAMESPACE
GtAbstractPage::GtAbstractPage()
{
}
GtAbstractPage::~GtAbstractPage()
{
}
GtAbstractOutline::GtAbstractOutline()
{
}
GtAbstractOutline::~GtAbstractOutline()
{
}
void* GtAbstrac... |
/************************************
* sort_lib.h
* Header for sorting library
* Author : Aditya Patwardhan
*/
#ifndef __SORT_LIB_H__
#define __SORT_LIB_H__
#include <iostream>
#include <vector>
/*
* APIs for sorting arrays
*/
namespace sortLib
{
class MySortLib
{
public:
void quickSort(s... |
#include <stdio.h>
#include <stdlib.h>
/*NUMERO DE TENTATIVAS ESTA COM ERRO*/
main ()
{
int senha, tentativas;
tentativas = 0;
printf ("Informe a senha: \n");
scanf ("%d", &senha);
if (senha==1234)
{
printf ("ACESSO PERMITIDO\n");
tentativas = tentativas + 1;
... |
#ifndef GAME_PLAYERACTIONLISTENER_HPP
#define GAME_PLAYERACTIONLISTENER_HPP
#include "playeractions.hpp"
namespace Game
{
class PlayerActionListener: public PlayerActions
{
};
};
#endif
|
#include<bits/stdc++.h>
using namespace std;
#define maxn 1005
int dp[maxn][maxn];
string a,b;
int lcs(int i,int j){
if(i==-1||j==-1) return 0;
if(dp[i][j]!=0) return dp[i][j];
if(i>=0&&j>=0&&a[i]==b[j]){
dp[i][j]=lcs(i-1,j-1)+1;
return dp[i][j];
}
if(i>=0&&j>=0&&a[i]!=b... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; 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"
#ifdef M2_SUPPORT
#ifdef _BITTORRENT_SUP... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyCharacter.h"
// Sets default values
AMyCharacter::AMyCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTi... |
#ifndef _D3D_SAMPLE_WIN_H_
#define _D3D_SAMPLE_WIN_H_
#include "d3dsamplebase.h"
#include "win32nativewindow.h"
#include "nativeappbase.h"
GRAPHIC_BEGIN_NAMESPACE(Graphic)
class D3DSampleWin final : public D3DSampleBase
{
public:
virtual LRESULT HandleWin32Message(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar... |
#pragma once
#include "calculateproteinprobability.h"
class CCalProteinProbUnique :
public CCalculateProteinProbability
{
public:
CCalProteinProbUnique(CListMassPeptideXcorr* pLMX,CListProtein* pLP):CCalculateProteinProbability(pLMX,pLP){};
void calculateProteinProbability();
~CCalProteinProbUnique(void);
};
|
/*--------------------------------------------------------------------
Project: Restaurant Check
File: main.cpp
Kathryn Brusewitz
--------------------------------------------------------------------*/
#include <iostream> // Defines objects and classes used for stream I/O
#include <iomanip>... |
//
// L-Systems example (D0L Systems as described in Prusinkiewicz et al.
// "L-systems: from the Theory to Visual Models of Plants"
// Created by J. Andreas Bærentzen on 08/02/12.
// Copyright 2012 __MyCompanyName__. All rights reserved.
//
#include <iostream>
#include <fstream>
#include <vector>
#include <stack>... |
#ifndef CtaBanc_h
#define CtaBanc_h
using namespace std;
class CtaBanc {
public: //constructores
CtaBanc(); //constructor por default
CtaBanc(string,double); //establece cada parametro (no tipo) de la clase
//metodos de acceso
string getNombre();
double get... |
/* -*- 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.
*/
#ifndef MODULES_UTIL_OPAUTOPTR_H
#define MODULES_UTIL_OPAUTOPTR_H... |
//@bref: 工作线程池,协调进行工作。
//@func: process() ,handler实现process()方法,工作线程通过调用process进行处理。
//@func: init()方法初始化线程池相关资源。
//@func:append() 方法实现将handler指针加入线程池。
//
#ifndef MINI_SERVER_THREAD_POOL_H
#define MINI_SERVER_THREAD_POOL_H
#include <queue>
#include <cstdio>
#include <exception>
#include <new>
#include <stdint.h>
#in... |
#ifndef BUFFERWINDOW_H
#define BUFFERWINDOW_H
#include <QWidget>
namespace Ui {
class BufferWindow;
}
class BufferWindow : public QWidget
{
Q_OBJECT
public:
explicit BufferWindow(QWidget *parent = 0);
~BufferWindow();
private:
Ui::BufferWindow *ui;
int cnt;
int id;
void showEvent(QShowE... |
#include "Product.h"
template<typename CodeType> Product<CodeType>::Product()
:m_tPdCode(T(0)), m_sPdName("(NULL)"), m_nPdPrice(0){}
template<typename CodeType> CodeType Product<CodeType>::getCode() {
return m_tPdCode;
} |
#include "MyWinThread.h"
MY_IMPLEMENT_DYNAMIC(CMyWinThread, CMyCmdTarget)
CMyWinThread::CMyWinThread()
{
MyOutPutDebugString(_T("CMyWinThread::CMyWinThread()"));
}
CMyWinThread::~CMyWinThread()
{
MyOutPutDebugString(_T("CMyWinThread::~CMyWinThread()"));
}
BOOL CMyWinThread::InitInstance()
{
return FAL... |
#include "router_hal.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void printMAC(macaddr_t mac) {
printf("%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3],
mac[4], mac[5]);
}
uint8_t packet[2048];
bool cont = false;
// 10.0.0.1 ~ 10.0.3.1
in_addr_t addrs[N_IFACE_ON_BOARD] = {... |
class Solution {
public:
TreeNode* trimBST(TreeNode* root, int L, int R) {
if(root==NULL) return NULL;
if(root->val<L)
{
root->left=NULL;//Left subtree will not have potential nodes-change it to NULL-So left traversal avoided
return trimBST(root->right,L,R);
}
else if(root->val>R)
{
... |
#include "stdafx.h"
#include "StatsData.h"
#include "DijkstraMatrixAlgorithm.h"
#include "DijkstraListAlgorithm.h"
#include "BelmannFordMatrixAlgorithm.h"
#include "BelmannFordListAlgorithm.h"
#include "PrimMatrixAlgorithm.h"
#include "PrimListAlgorithm.h"
#include "KruskalMatrixAlgorithm.h"
#include "KruskalListAlgori... |
#include <FastLED.h>
#include <ADC.h>
#include <Audio.h>
#include <SoftwareSerial.h>
#include <Adafruit_Pixie.h>
#include "Adafruit_Trellis.h"
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM9DS0.h>
#include <Adafruit_Simple_AHRS.h>
#include <math.h>
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))
#define POTEN... |
/*******************************************************************************
* filename: C_PatternInitialiser.hpp
* description: Singleton class that initialises the ideal pattern
* author: Moritz Beber
* created: 2010-06-09
* copyright: Jacobs University Bremen. All rights reserved.
***********... |
#include <iostream>
#include <limits>
#include <ctime>
#include "database.h"
void help()
{
std::cout << "HELP:\n"
<< "\tinsert key v m\n"
<< "\t\tshort: i\n"
<< "\t\tif key exists updates record, otherwise adds record\n"
<< "\tget key\n"
<< "\t\tshort: g\n"
<< "\t\tgets record with given key\n"
<< "\tge... |
//
// Connection.h
// superasteroids
//
// Created by Cristian Marastoni on 03/06/14.
//
//
#include "NetTypes.h"
#include "NetTime.h"
#include "Reliability.h"
#include "../IpAddress.h"
class SocketLayer;
class BitStream;
class Channel;
class NetPacket;
class EndPoint;
class EndPointListener;
struct NetMessageHead... |
#pragma once
#include <vector>
#include <string>
#include <random>
#include <ncurses.h>
using namespace std; //Boo hiss
class Map {
vector<vector<char>> map;
vector <pair<int,int>> m;
bool exit = false;
public:
static const char EXIT = 'E';
static const char HERO = 'H';
static const char MONSTER = 'M';
s... |
#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define pb push_back
#define mp make_pair
typedef long long ll;
map<int,int> m;
int ans;
int binary_search(int* a, vector<int> &b,int n,int x,int max,int min) {
int low, high, mid,f=0,g=0,l=0,e=0,o=0;
low = 1;
high = n;
ans=0;
vecto... |
#pragma once
#include "ServiceConfig.h"
#include "SimpleLogger.h"
#include "PageBaseUI.h"
#include "MsgTip.h"
#include "Stdafx.h"
#include <json/json.h>
#include <fstream>
#include <sstream>
#define FILE_NAME "\\..\\data\\etc\\vas-manager.conf"
class CServiceConfigUI :public CPageBaseUI
{
public:
CServiceConfigUI()... |
#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <algorithm>
#define INT_MAX 0x7fffffff
#define INT_MIN 0x80000000
using namespace std;
bool helper(vector<vector<char>> &board, vector<vector<bool>> &... |
#include "stdafx.h"
#include "LevelSerializer.h"
//#include "xml/WXXMLHandler.h"
//#include "xml/WXXMLAttributes.h"
/*!
\brief
Handler class used to parse the Scene XML files using SAX2
*/
class SceneXMLHandler : public WX::XMLHandler
{
public:
/*****************************************************... |
#include "alistint_sol.h"
AListInt::AListInt() :
_size(0), _cap(10)
{
_data = new int[_cap];
}
AListInt::AListInt(int cap) :
_size(0), _cap(cap)
{
_data = new int[_cap];
}
AListInt::~AListInt()
{
delete [] _data;
}
bool AListInt::empty() const
{
return _size==0;
}
int AListInt::size() const
{
return... |
#include "config.h"
#include "base.h"
#include "boolean.h"
#include "mul.h"
#include "div.h"
#include "exceptions.h"
#include "barrett.h"
#include "modular.h"
void pow_mod(t_bint* a,
t_bint* b,
t_bint* n,
t_size sizeA,
t_size sizeB,
t_size sizeN) {
i... |
#include "pch.h"
#include "animation.h"
animation::animation(int x, int y, char s) {
this->x = x;
this->y = y;
end_char = s;
}
void animation::draw_animation(char field[10][10]) {
} |
/*****************************************************************************************************************
* File Name : NthNodeFromEnd.h
* File Location : C:\Users\AVINASH\Desktop\CC++\Programming\src\sites\geeksforgeeks\linkedlist\page05\NthNodeFromEnd.h
* Created on : Dec 17, 2013 :: 11:39:02 P... |
#include <iostream>
#include <set>
#include <string>
using namespace std;
class SetStringer {
public:
void insert(double x) { m_set.insert(x); m_cached = false; }
const string & str() & {
if (m_cached) { return m_string; }
m_string.clear();
for (const auto & x : m_set) {
m_stri... |
/***********************************************************************
qwertyScreen :
encapsulation of screen physical description/mesh descriptor
*************************************************************************/
#include "Screen.h"
qwerty::Screen::Screen()
{
//device related param must be... |
// Shortest path algorithm using stl
#include <bits/stdc++.h>
#define ASCII_CAP 65 //Capital letter A
#define COL_WIDTH 15
using namespace std;
enum Algorithm{SHP, SDP, STP, FTP, MGP};
// Convert capital letter to int
int ctoi(char a){
return (int)a - ASCII_CAP;
}
class Graph{
// number of vertices
int v;
... |
/********************************************************************************
** Form generated from reading UI file 'SVP.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!
***********************************************... |
/*! @file SDPSDcrystal.cc
@brief Implements sensitive part (Crystals) of simulation.
@date March,2015
@author D. Flechas (dcflechasg@unal.edu.co)
*/
/* no-geant4 classes*/
#include "SDPSDcrystal.hh"
#include "PSDcrystalHit.hh"
/* geant4 classes*/
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#i... |
#include <cstdio>
#include <algorithm>
class Elephant{
private:
int index, Weight, Smart;
public:
Elephant();
Elephant(int, int, int);
//~Elephant();
int get_index();
int get_Weight();
int get_Smart();
bool operator < (Elephant X) const{
if(Weight != X.Weight) return We... |
#ifndef _SPRITE_AI_ENGINE_H_
#define _SPRITE_AI_ENGINE_H_
class VertexInterface;
class CharacterInterface;
#include "observerlist.h"
#include "ailist.h"
namespace {
class SpriteAIengine
{
public:
SpriteAIengine();
~SpriteAIengine();
virtual bool movep(VertexInterface*);
virtual void move(VertexInterface*)... |
// [[Rcpp::depends(rstan)]]
// [[Rcpp::depends(RcppEigen)]]
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::plugins(cpp11)]]
#include <RcppArmadillo.h>
#include <stan/math.hpp>
#include <Eigen/Dense>
#include <RcppEigen.h>
#include <Rcpp.h>
using namespace arma;
using namespace std;
using Eigen::Matrix;
using Eigen::D... |
/*
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 <cstdint>
namespace Push
{
namespace RenderConfig
{
inline constexpr size_t MaxTextures()
... |
#include <iostream>
#include <ctime>
using namespace std;
void speed(void);
int main()
{
clock_t time = clock();
speed();
time = clock()-time;
cout<<ends<<time<<endl;
return 0;//·µ»Ø
} |
#include "Util.h"
#include <BWAPI.h>
#include "BWAPI\Player.h"
using namespace System::IO;
using namespace System::Runtime::InteropServices;
extern BWAPI::GameWrapper BWAPI::Broodwar;
namespace BroodWar
{
double DoubleToDouble(double d)
{
return d;
}
int IntToInt(int i)
{
return i;
}
BWAPI::Unitset T... |
/*
-------------------------------------------
Student: Malik Sheharyaar Talhat talhat@sheridan.desire2learn.com
StudentID: 991435266
-------------------------------------------
*/
/*
* File: Node.h
* Author: Malik Sheharyaar Talhat talhat@sheridan.desire2learn.com
*
* Created on April 5, 2019, 5:08... |
// Question => Form the biggest number from the numeric string
// We will the sort the string in decreasing order and that will be the maximum number
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string str = "764535644223489";
sort(str.begin(), str.end(), greater<... |
#include"Array.hpp"
#include<array>
#include<stdio.h>
using namespace std;
int main()
{
Array<int, 3> arr1;
Array<int, 3> arr2;
arr1.fill(3);
arr2.fill(1);
printf("%d %d %d\n", arr1[0], arr1[1], arr1[2]);
printf("%d %d %d\n", arr2[0], arr2[1], arr2[2]);
arr1.swap(arr2);
printf("%d %d %d\n", arr1[0], arr1[1], ar... |
//
// Entity.cpp
// Odin.MacOSX
//
// Created by Daniel on 15/10/15.
// Copyright (c) 2015 DG. All rights reserved.
//
#include "Entity.h"
#include "RenderLib.h"
namespace odin
{
Entity::Entity() :
m_drawable(nullptr)
{
}
Entity::Entity(render::Drawable& drawable, render::Render... |
#include <conio.h>
#include <iostream.h>
void main () {
int a;
clrscr();
for(int i=1; i<=10; i++) {
for(int j=1; j<=10-i; j++)
cout <<" ";
for(int k=1; k<=i+i; k++)
cout <<"*";
cout <<"\n";
}
for(i=1; i<=10; i++) {
a=i*2;
for(int j=1; j<=22-a; j++... |
#include "NhanVienSanXuat.h"
#include "NhanVienVP.h"
int main(void)
{
cout << "Nhap so nhan vien can quan li: ";
int n;
cin >> n;
cin.ignore();
NhanVien **danhSachNhanVien = new NhanVien*[n];
for (int i = 0, ans; i < n; i++)
{
cout << "-->Nhap nhan vien thu " << i + 1 << endl;
cout << "Nhap 1 neu la nhan vi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.