text stringlengths 8 6.88M |
|---|
#pragma once
#include <vector>
#include <complex>
#include "given.h"
//typedef std::complex<double> cmpx;
typedef std::vector<std::vector<cmpx>> Matrix;
cmpx KernelK(cmpx kappa, cmpx ConstA0, cmpx ConstA1, double ConstEps, int K, int J, int N);
void Enter_Data ( cmpx kappa, double ConstEps, Matrix& M);
cmpx Fun_Gn(... |
#pragma once
#include "../../Graphics/Mesh/3D/PlaneMesh.h"
#include "../../UI/Dependencies/IncludeImGui.h"
namespace ae
{
namespace priv
{
namespace ui
{
inline void PlaneMeshToEditor( ae::PlaneMesh& _PlaneStatic )
{
ImGui::Text( "Plane Mesh" );
... |
#include <ParticlesSystem.h>
#include <EntityComponentSystem.h>
#include <ParticlesComponent.h>
using namespace breakout;
void ParticlesRenderSystem::Init()
{
}
void ParticlesRenderSystem::Update(float dtMilliseconds)
{
auto& particlesComponents = EntityComponentSystem::Get().GetAllComponentsByType<ParticlesCompo... |
#include <cstdlib>
#include <cstring>
#include <getopt.h>
#include <iostream>
#include <string>
#include "gmock/gmock.h"
#include "dbg.h"
#define USAGE "USAGE: TEST [OPTIONS]\n" \
" -h display this message\n" \
" -o TESTCASE only run the testcase TESTCASE\n" \
" -... |
//
// Created by 钟奇龙 on 2019-04-15.
//
#include <iostream>
#include <stack>
using namespace std;
class Node{
public:
int data;
Node* next;
Node(int x):data(x),next(NULL){
}
};
bool isPalindrome(Node *head){
stack<Node*> s;
Node *cur = head;
while(cur){
s.push(cur);
cur = c... |
/*
File: VLMath.h
Function: Various math definitions for VL
Author(s): Andrew Willmott
Copyright: Copyright (c) 1995-1996, Andrew Willmott
*/
#ifndef __VL_MATH__
#define __VL_MATH__
// --- Inlines ----------------------------------------------------------------
#ifdef __SGI__
#include <ieeefp.h>
#d... |
// 0920_5.cpp : 定义控制台应用程序的入口点。
//给定一个日期,输出这个日期是该年的第几天。
#include <iostream>
using namespace std;
int LeapYear(int year)
{
int x = year % 4;
int y = year % 100;
int z = year % 400;
if (x == 0 && y != 0)
return 1;
else if (z == 0)
return 1;
else
return 0;
}
int main()
{
int year, month, day;
char x;
whil... |
/*
* This file contains the the line follower
* The line follower doenst follow lines
* The line follower avoids driving through black lines
*
*
* Creation date: 2019 07 29
* Author: Taha Tekdemir
*/
#include "steering.h"
#include "lineTracking.h"
#include "LineFollower.h"
extern SteeringInterface steering;... |
#include <string.h>
#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#define n5 3
using namespace std;
int lis(int arr[], int n){
int lis[n];
lis[0] = 1; //base case
for(int i = 1; i < n; i++){ //to calculate values that entered user
lis[i] = 1;
for(int j = 0; j... |
#ifndef FACTUREFORNISSEUR_H
#define FACTUREFORNISSEUR_H
#include <QDialog>
namespace Ui {
class facturefornisseur;
}
class facturefornisseur : public QDialog
{
Q_OBJECT
public:
explicit facturefornisseur(QWidget *parent = 0);
~facturefornisseur();
private slots:
void on_AjoutePB_clicked();
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2010 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#include "core/pch.h"
#include "adjunct/desktop_util/adt/finali... |
#include "Status.h"
#include <iostream>
#include <string>
using namespace std;
Status::Status(){}
string Status::getStatus(){
return status;
}
void Status::setStatus(string status){
this->status = status;
}
string Status::getObject(){
return object;
}
void Status::setObject(string object){
this->object = object;... |
#include <iostream>
#include <iomanip>
#include "boost/math/distributions/students_t.hpp"
void two_samples_t_test_equal_sd(
double Sm1, // Sm1 = Sample Mean 1.
double Sd1, // Sd1 = Sample Standard Deviation 1.
unsigned Sn1, // Sn1 = Sample Size 1.
double Sm2, // Sm2 = Sample Mean... |
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)
#define for1(i,n) for(int i=1;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)
const int INF = 1<<29;
const int MOD=1073741824;
#define pp pair<ll,ll>
typedef long long int ll;
bool... |
// 以下の ifdef ブロックは DLL から簡単にエクスポートさせるマクロを作成する標準的な方法です。
// この DLL 内のすべてのファイルはコマンドラインで定義された BKGNUPG_EXPORTS シンボル
// でコンパイルされます。このシンボルはこの DLL が使用するどのプロジェクト上でも未定義でなけ
// ればなりません。この方法ではソースファイルにこのファイルを含むすべてのプロジェクトが DLL
// からインポートされたものとして BKGNUPG_API 関数を参照し、そのためこの DLL はこのマク
// ロで定義されたシンボルをエクスポートされたものとして参照します。
#ifdef BK... |
/*
struct TreeNode {
int val;
struct TreeNode *left;
struct TreeNode *right;
TreeNode(int x) :
val(x), left(NULL), right(NULL) {
}
};*/
class Solution {
public:
void Mirror1(TreeNode *pRoot) {
if(!pRoot){
return;
}
queue<TreeNode*> Q;
Q.push(pRoot);
while... |
//
// Created by tonell_m on 22/01/17.
//
#include <Constants.hh>
#include <PhysicsEngine.hh>
#include "Character.hh"
Character::Character(int x, int y, PhysicsEngine* engine) : _pos(sf::Vector2f(PLAYER_START_X, PLAYER_START_Y))
{
//TODO: init sprites and colliders
this->body = engine->createRectangle(x, y, CHARACT... |
#ifndef _GAPP_H
#define _GAPP_H
#include <iostream>
#include <string>
#include <SDL/SDL.h>
#include <SDL/SDL_Image.h>
#include "Surface.h"
#include "Event.h"
#include "TicTacToe.h"
#define INIT_SURFACE(surf, img) if ((surf = Surface::load(#img)) == NULL) { \
std::cerr << "Could not load surface: " << #surf << "... |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
private:
priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>> pq;
public:
ListNode* mergeKLists(vector<ListNode*>& ... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 1995-2010 Opera Software AS. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef HTML5ATTRCOPY_H
#define HTML5... |
#ifndef BINARY_SEARCH_TREE_H
#define BINARY_SEARCH_TREE_H
#include "dsexceptions.h"
#include <iostream> // For NULL
#include <iomanip> // To set the width for the line numbers for words
using namespace std;
// AVLTree class
//
// CONSTRUCTION: with ITEM_NOT_FOUND object used to signal failed finds
//
// ************... |
//
// main.cpp
// Author: Michael Bao
// Date: 9/9/2015
//
#include "shared/algorithms/cluster/kmeans/dlib/DlibKmeansInterface.h"
#include "shared/algorithms/features/surf/dlib/DlibSURFInterface.h"
#include "shared/algorithms/ml/svm/dlib/DlibMulticlassSVMInterface.h"
#include "shared/utility/parse/simple/ImageLabelPar... |
#include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
using namespace std;
int f[110][110],a[110],s[110];
int main() {
int t;
scanf("%d",&t);
f... |
#include "hypothetical.hpp"
#include <algorithm>
#include <boost/format.hpp>
#include <worker/visitor/properties.hpp>
#include <worker/visitor/grid.hpp>
namespace svg {
namespace _hypo {
boost::format circle(visitor::Position const & p,
char const * const color) {
return boost:... |
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
int main(){
int t;
cin >> t; //testcases
for(int i = 0; i < t; i++){
int n,x; // n = price of dress x = no. of dresses
cin >> n >> x;
vector<int>dress;
for(int i = 0; i < n; i++){
int c;
cin >> c;
dress.push_back(c);
}
... |
#include <windows.h>
LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);
ATOM InitApp(HINSTANCE);
BOOL InitInstance(HINSTANCE,int);
char szClassName[]="base";
int WINAPI WinMain(HINSTANCE hCurInst,HINSTANCE hPrevInst,LPSTR lpsCmdLine,int nCmdShow){
MSG msg;
BOOL bRet;
if(!InitApp(hCurInst))
return FALSE;
if(!Ini... |
/*#include <iostream>
using namespace std;
// Recursive function to print from N to 1
int main()
{
int N, num;
cout << "enter any number" << endl;
cin >> num;
for (int i = num; i >= 0; i--)
cout << i << " ";
for (int i = 1; i <= num; i++)
{
cout << i << " ";
}
retur... |
#ifndef RAY_HPP
#define RAY_HPP
#include "../include/vector.hpp"
#include "../include/point.hpp"
#include "../include/color.hpp"
#include <list>
#include "shape.hpp"
#include "light_source.hpp"
class ray {
public:
ray();
ray(math3d::point const&, math3d::point const&);
ray(const ray& orig);
virtual ~r... |
#include <iostream>
#include <queue>
#include <tuple>
#include <vector>
using namespace std;
using ll = long long;
bool visited[300010];
ll w[300010];
vector<pair<int, ll>> path[300010];
ll ans = 0;
ll dfs(int v) {
visited[v] = true;
priority_queue<ll> cost;
for (int i = 0; i < 2; ++i) {
cost.pu... |
#include "glut.h"
#include <stdio.h>
#include <string.h> //文字列関数のインクルード
#include "CModelX.h"
void CModelX::Load(char *file) {
//
//ファイルサイズを取得する
//
FILE *fp; //ファイルポインタ変数の作成
fp = fopen(file, "rb"); //ファイルをオープンする
if (fp == NULL) { //エラーチェック
printf("fopen error:%s\n", file);
return;
}
//ファイルの最後... |
#pragma once
////////////////////////////////////////////////////////////////////////////////
#include <Eigen/Dense>
////////////////////////////////////////////////////////////////////////////////
namespace cellogram {
bool read_tif_image(const std::string &path, Eigen::MatrixXd &img);
bool read_png_image(const s... |
#pragma once
#include <string.h>
#include "net_base.h"
namespace sj
{
class udp_client;
class udp_client_handle
{
public:
virtual void OnRecv(udp_client * client, char * buf, size_t len) = 0;
virtual void OnSent(udp_client * client, char * buf, size_t len) = 0;
};
struct udp_cl... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <cctype>
#include <cstdlib>
using namespace std;
void uppercaseify(string &str) {//Modify string to all uppercase
for(char &ch : str) ch = toupper(ch);
}
void die() {
cout << "Invalid Input!" << endl;
exit(EXIT_FAILURE); //Same ... |
#pragma once
#include "Vector2D.h"
#include "ColorRGB.h"
#include "ETSIDI.h"
using ETSIDI::SpriteSequence;
class coche
{
public:
void dibuja();
void setPos(float x, float y);
void setRad(float r);
void setOrientacion(int o);
void setTamaņo(int t);
Vector2D pos;
float limites[4]; // izquierda, de... |
/*********************************************************\
* 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 "hoist_request_subscriber.h"
CHoistRequestSubscriber::CHoistRequestSubscriber() :
m_pOnDataAvailable(nullptr)
{
}
CHoistRequestSubscriber::~CHoistRequestSubscriber()
{
}
bool CHoistRequestSubscriber::ValidData()
{
return (m_sampleInfo.valid_data == DDS_BOOLEAN_TRUE);
}
DataTypes::Uuid CHoistRequest... |
#include "GamePch.h"
#include "AI_HasHP.h"
#include "HealthModule.h"
extern bool g_bDebugAIBehaviors;
bool AI_HasHP::Check( Hourglass::Entity * entity )
{
if (!m_Health)
{
m_Health = entity->GetComponent<Health>();
}
if (m_Health)
{
if (g_bDebugAIBehaviors)
{
char buf[1024];
sprintf_s(buf, "\n\nHP:... |
//
// Created by jeremyelkayam on 9/29/20.
//
#pragma once
#include "screen.hpp"
#include "menu/main_menu_screen.hpp"
class TitleScreen : public Screen {
private:
sf::Sprite title_background;
sf::Sound title_theme;
bool screen_over;
public:
TitleScreen(TextLoader &text_loader, ResourceManager &resource... |
#include "Qt_Battery_View.h"
using namespace cv;
using namespace std;
Qt_Battery_View::Qt_Battery_View(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
}
void Qt_Battery_View::on_OpenFig_clicked()
{
QString filename;
filename = QFileDialog::getOpenFileName(this,
tr("choose img"),
"",
tr("Images ... |
#include <iostream>
#include <stdlib.h>
#include <cmath>
#include "Network.h"
/**
NOTES
OPTIMIZATION
-While there are General GPU functions (like GPUCopy) code reuse is not used if there is a specific CUDA function for a function to reduce stack jumps
Im not sure which configurations we wi... |
#ifndef CAFFE_MPI_BASE_LAYER_HPP_
#define CAFFE_MPI_BASE_LAYER_HPP_
#include <string>
#include <utility>
#include <vector>
#include <mpi.h>
#include "caffe/blob.hpp"
#include "caffe/layer.hpp"
#include "caffe/proto/caffe.pb.h"
namespace caffe {
template <typename Dtype>
class MPIBaseLayer : public Layer<Dtype> {
... |
// SPDX-FileCopyrightText: 2021 Samuel Cabrero <samuel@orica.es>
//
// SPDX-License-Identifier: MIT
#include <LoRa.h>
#include <mbedtls/aes.h>
#include "Comm.h"
TComm Comm;
TComm::TComm() : m_heartbeat_period(10000), m_magic(0xDEADBEEF) {
}
bool TComm::begin(int ss, int reset, int dio0) {
LoRa.setPins(ss, reset,... |
/*********************************************************************
This file is part of QtUrban.
QtUrban is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
QtUrban is ... |
// Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <autoresetevent.h>
#include <condition_variable>
#include <mutex>
#include <thread>
// Moodycamel's concurrent queue
#ifdef _WIN3... |
// Copyright 2016 <https://github.com/spelcaster>
//
#ifndef __DCW_OUT_OF_BOUNDS_EXCEPTION_H__
#define __DCW_OUT_OF_BOUNDS_EXCEPTION_H__
#include <iostream>
#include <exception>
//! OutOfBoundsException
/*!
* This exception should be thrown when an invalid index is used
*/
class OutOfBoundsException: public std::ex... |
/*
* ¹é²¢ÅÅÐò
*/
#include <bits/stdc++.h>
using namespace std;
class Solution{
public:
void merge_sort(vector<int> &nums){
if(nums.empty() || nums.size() < 2 ){
return;
}
_mergeSort(nums,0,nums.size()-1);
}
private:
void _mergeSort(vector<int> &nums,int left,int right... |
#ifndef PLATFORMER_PLAYER_H
#define PLATFORMER_PLAYER_H
#include "Vector2i.h"
namespace platformer {
/**
* Represents a player, used in the play game state.
*/
class Player {
private:
// Velocity to add when player jumps.
static const int JUMP_HEIGHT = 3;
// The players... |
//airlineTicket.cpp
#include<iostream>
#include"airlineTicket.h"
using namespace std;
airlineTicket::airlineTicket()
{
//Initialize data members
fHasEliteSuperRewardsStatus=false;
mPassengerName="Unkown Passenger";
mNumberOfMiles=0;
}
airlineTicket::~airlineTicket()
{
//Nothing need do
}
int airlineTick... |
#include "menu2.h"
#include "jeu.h"
void menu2(SDL_Surface *ecran)
{
///On cree l'ensemble des surfaces nécessaires--------------------------------------------------
SDL_Surface* menu ;
SDL_Surface* buttonHelp ;
SDL_Surface* buttonClose ;
SDL_Surface* easy;
SDL_Surface* medium;
... |
#ifndef OGREUTILS_HPP_GUARD
#define OGREUTILS_HPP_GUARD
#include <gmtl/Matrix.h>
#include <vrj/Display/Frustum.h>
#include <OGRE/OgreMatrix4.h>
#include <vector>
namespace MatrixUtils
{
Ogre::Matrix4 fromGMTL(gmtl::Matrix44f const& m);
gmtl::Matrix44f fromOGRE(Ogre::Matrix4 const& m);
Ogre::Matrix4 ma... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style: "stroustrup" -*-
*
* Copyright (C) 1995-2011 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 "mod... |
#include "main.h"
#include <sodium/sodium.h>
namespace tul{
namespace crypto{
bool init(){
//MAGIC spec says otherwise sodium is not safe to use
return sodium_init() >= 0;
}
}
}
|
#include "Item.hpp"
#include "Map.hpp"
#include "main.hpp"
using namespace std;
Item::Item(const string& name, const string& desc, const string& status,bool enable):
Object(name,desc,status),turnon(enable)
{
// Trigger for drop
Trigger drop = Trigger("drop",name+" is dropped",true);
drop.addCondition([this](){
r... |
#include <iostream>
using namespace std;
class Node
{
public:
int value;
Node *next;
};
void push(Node **head_ref, int data)
{
Node *new_node = new Node();
new_node -> value = data;
// new node pointing to first node
new_node -> next = *head_ref;
Node *itr = *head_ref;
if(*h... |
#pragma once
////////////////////////////////////////////////////////////////////////////////
#include <cellogram/common.h>
#include <vector>
#include <Eigen/Dense>
////////////////////////////////////////////////////////////////////////////////
namespace cellogram {
///
/// @brief { Adds or removes vertices fr... |
//==================================================================================================
// Name : InputParserUtil.cpp
// Author : Ken Cheng
// Copyright : This work is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of ... |
#include "stdafx.h"
#include "IniData.h"
IniData::IniData()
{
}
IniData::~IniData()
{
}
void IniData::AddData(const char * section, const char * key, const char * value)
{
tagIniData iniData;
//iniData.section = section;
//iniData.key = key;
//iniData.value = value;
strcpy_s(iniData.section, sizeof(iniData.s... |
#include "localProcess.h"
#include <algorithm>
#include <numeric>
#include <random>
#include <pcl/common/centroid.h>
#include <pcl/filters/extract_indices.h>
//#include <pcl/features/normal_3d.h>
//#include <pcl/features/normal_3d_omp.h>
#include <pcl/common/transforms.h>
void CentralizePtr(pcl::PointCloud<pcl::PointX... |
//
// GStartInterfaceLayer.h
// Core
//
// Created by Max Yoon on 11. 7. 25..
// Copyright 2011년 __MyCompanyName__. All rights reserved.
//
#ifndef Core_GStartInterfaceLayer_h
#define Core_GStartInterfaceLayer_h
#include "GInterfaceLayer.h"
class GnITabCtrl;
class GStartInterfaceLayer : public GInt... |
/** @file valknut/core/internal/msvc.hpp
*
* @brief This header detects compiler-specific features for Microsoft
* Visual Studios
*
* @note This is an internal header file, included by other library headers.
* Do not attempt to use it directly.
*/
/*
* Change Log:
*
* September 04, 2... |
#pragma once
class Vector2D
{
public:
Vector2D();
virtual ~Vector2D();
float x;
float y;
void SetVector(float xi, float yi);
float GetVectorX();
float GetVectorY();
Vector2D operator+(Vector2D v);
Vector2D operator*(float t);
};
Vector2D operator*(float t, Vector2D v);
|
/*
Copyright (c) 2016, Los Alamos National Security, LLC
All rights reserved.
Copyright 2016. Los Alamos National Security, LLC. This software was produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National Laboratory (LANL), which is operated by Los Alamos National Security, LLC for the ... |
#pragma once
#include <Tanker/Crypto/Hash.hpp>
#include <Tanker/Crypto/PublicSignatureKey.hpp>
#include <Tanker/Crypto/Signature.hpp>
#include <Tanker/Serialization/SerializedSource.hpp>
#include <Tanker/Trustchain/Actions/Nature.hpp>
#include <Tanker/Trustchain/ServerEntry.hpp>
#include <Tanker/Trustchain/TrustchainI... |
#include <iberbar/Lua/LuaCppCommon.h>
// Class 类名,如 CFoo
extern const char iberbar::Lua::uClassReflection_ClassName[] = "__cpp_classname";
// Class 所属的模块名,如 iberbar.Test
extern const char iberbar::Lua::uClassReflection_ModuleName[] = "__cpp_modulename";
// Class 全名,如 iberbar.Test.CFoo
extern const char iberbar::Lu... |
// Lab 1 PF Rev Q2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
ifstream fin("D:\\l180929\\Lab 1 PF Rev Q2\\Sample input.txt");
int n=0, x=0, p=0;
fi... |
#include "x_pch.h"
#include "x/x_app.h"
namespace x
{
static x_App *s_pApp = nullptr;
void OnClose()
{
if (s_pApp) s_pApp->onClose();
}
void OnSize(x::x_Sint32 x, x::x_Sint32 y)
{
if (s_pApp) s_pApp->onSize(x, y);
}
x_App::x_App()
: m_pGraphics(nullptr)
, m_pPlatform(nullptr)
, m_running(fal... |
#include "view.h"
#include "modellist.h"
#include "modellistiter.h"
View::View()
{
}
View::~View()
{}
void View::draw(SDL_Surface *screen, ModelList& modellist)
{
while (!modellist.isDone()) {
Model model(modellist.get());
SDL_Rect dest;
dest.x = model.getX();
dest.y = model.getY();
SDL_BlitSurface(... |
/*
When we convert graph into tree such that it has n nodes and n-1 edges and each node is reachable from other node then it
is called spanning tree.
when total cost of edges is minimum for the all spanning tree is MST.
Prims Algorithm:
1. key array
2. MST track array
3. Parent array
*/
#include<bits/stdc++.h>
using ... |
// -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
//
// Copyright (C) 2003-2012 Opera Software AS. All rights reserved.
//
// This file is part of the Opera web browser. It may not be distributed
// under any circumstances.
//
//
#ifndef LOADICONS_PI_H
#define LOADICONS_PI_H
#include "modul... |
#include <SPI.h>
#include <deprecated.h>
#include <MFRC522.h>
#include <MFRC522Extended.h>
#include <require_cpp11.h>
#include <Servo.h>
int RST_PIN = 9;
int SS_PIN = 10;
int servoPin = 8;
int kapi = 45;
byte ID[4] = {25, 11, 152, 40};
Servo motor;
MFRC522 rfid (SS_PIN, RST_PIN);
... |
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <OneButton.h>
#include <Rotary.h>
Rotary r = Rotary(2, 3);
OneButton button(10,true);
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected t... |
#include "directorywindow.h"
#include "ui_directorywindow.h"
directoryWindow::directoryWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::directoryWindow)
{
ui->setupUi(this);
doneButton = ui->pushButton;
tree = ui->treeView;
connect(doneButton, SIGNAL(clicked()), this, SLOT(hide()));
... |
#include "WinCommon.h"
#include "DXCommon.h"
#include "UISprite.h"
bool UISprite::m_bFirst = false;
LPDIRECT3DVERTEXBUFFER9 UISprite::m_pVB = NULL;
D3DFVF_XYZ_TEX1* UISprite::m_pVertex = NULL;
int UISprite::m_iCount = 0;
UISprite::UISprite(bool renderTarget)
{
m_bRenderTarget = renderTarget;
m_pTexture ... |
/*
The project is developed as part of Computer Architecture class
Project Name: Functional Simulator for subset of RISCV Processor
Developer's Name:
Developer's Email id:
Date:
*/
/* myRISCVSim.cpp
Purpose of this file: implementation file for myRISCVSim
*/
#include<bits/stdc++.h>
#include "myARMSim.h"
#inc... |
#pragma once
#include <string>
#include <GLM/glm.hpp>
#include "Scene.h"
#include "GuiElement.h"
#include "Panel.h"
class TextField : public GuiElement {
public:
TextField(Scene& scene, Font& font, glm::vec4 transform, std::string headerText);
void update();
void setTransform(glm::vec4 transform);
vo... |
// OpenCV.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include "pch.h"
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main()
{
Mat img(Size(10,14), CV_8UC1,Scalar(0,255,255));
imshow("原图",img);
waitKey(0);//
cout << "图片已经输出\n";
cout << img.type() << endl;
cout <<... |
#include <sys/socket.h>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <util.hpp>
#include "plotterUtil.cpp"
//#include "HttpReq.h"
//time_t StrTime2unix(const std::string& ts)
//{
// struct tm tm {
// };
// memset(&tm, 0, sizeof(tm));
//
// sscanf(
// ts.c_str... |
#ifndef LIBRARYWINDOW_H
#define LIBRARYWINDOW_H
#include <QDialog>
#include <QSqlTableModel>
#include <QSortFilterProxyModel>
namespace Ui {
class LibraryWindow;
}
class LibraryWindow : public QDialog
{
Q_OBJECT
public:
explicit LibraryWindow(QWidget *parent = 0);
~LibraryWindow();
private slot... |
#line 2 "pop3-tokenizer.cpp"
#line 4 "pop3-tokenizer.cpp"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/*... |
#include "suratkeluar.h"
#include "ui_suratkeluar.h"
suratkeluar::suratkeluar(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::suratkeluar)
{
ui->setupUi(this);
this->on_btndashboard_clicked();
this->on_skrefresh_clicked();
}
suratkeluar::~suratkeluar()
{
delete ui;
}
QStri... |
#pragma once
namespace qp
{
typedef boost::optional<std::string> optional_string;
typedef boost::optional<size_t> optional_size_t;
typedef boost::signals2::connection Connection;
typedef boost::signals2::scoped_connection ScopedConnection;
} |
#ifndef TREEFACE_SCENE_NODE_MANAGER_H
#define TREEFACE_SCENE_NODE_MANAGER_H
#include "treeface/base/Common.h"
#include <treecore/ClassUtils.h>
#include <treecore/Identifier.h>
#include <treecore/RefCountHolder.h>
#include <treecore/RefCountObject.h>
namespace treecore {
class String;
class var;
} // namespace treeco... |
#ifndef ASSIGNMENT_H
#define ASSIGNMENT_H
#include <stdio.h>
#include <iostream>
#include <list>
#include "date.h"
using namespace std;
enum Status{ assigned = 1, completed = 2, late = 3 };
class assignment{
private:
Date dueDate;
string description;
Date assignedDate;
Status status;
public:... |
/*
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, s... |
#include <stdio.h>
#include "DataTypes.h"
#include "Memory.h"
#include "apsoc_cv_vdma.h"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "Random.h"
#include "Embedder.h"
#include "Rsa.h"
#include "Steganography.h"
#include "WebServer.h"
#include "Certificate.h"
#define GRANTED_PIN 0x1... |
/*
* queue.hpp
*
* define your methods in coherence with the following
* function signatures
* use the abstraction of linked lists
* to implement the functionality of queues
*/
#ifndef QUEUE_HPP_
#define QUEUE_HPP_
#include "list.hpp"
namespace cs202
{
template <class T>
class queue : protected list<T>
{
pub... |
#pragma once
#include "PacketType.h"
#include "Packet.h"
#include <string>
#include <memory>
#include "Global.h"
namespace PacketInfo
{
// Chat/string messages
class ChatMessage
{
public:
ChatMessage(const std::string & str);
std::shared_ptr<Packet> toPacket();
private:
std::string m_message;
};
// U... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4; c-file-style:"stroustrup" -*-
*
* 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 IM_OP_INPUTACTION_H
#define IM... |
// Copyright (c) 2007-2013 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)
// This is a purely local version demonstrating different versions of making
// t... |
#pragma once
using namespace Jaraffe::Component;
namespace Jaraffe
{
class GameObject
{
// ****************************************************************************
// Constructor/Destructor)
// ----------------------------------------------------------------------------
private:
GameObject();
virtual ~GameObje... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2004-2006 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Tord Akerbęk
*/
#include "core/pch.h"
#ifdef PREFS_DOWNLOAD
... |
// ListCtrlTestView.h : CListCtrlTestView 类的接口
//
#pragma once
class CListCtrlTestView : public CListView
{
protected: // 仅从序列化创建
CListCtrlTestView();
DECLARE_DYNCREATE(CListCtrlTestView)
// 特性
public:
CListCtrlTestDoc* GetDocument() const;
afx_msg void OnPaint();
CListCtrl listCtrl;
// 操作
public:
//CListCt... |
#ifndef TEXTFIELDDESCRIPTORCONTAINER_H
#define TEXTFIELDDESCRIPTORCONTAINER_H
#include <QtGui/QWidget>
#include <QtGui/QLineEdit>
#include <QString>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/message.h>
#include <google/protobuf/generated_message_util.h>
#include "FieldDescriptorContain... |
// Created on: 2001-09-12
// Created by: Alexander GRIGORIEV
// 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 ... |
#include "HX711.h"
bool HX711::is_ready() {
return DATA == 0;
}
void HX711::set_gain(int gain) {
switch (gain) {
case 128: // channel A, gain factor 128
GAIN = 1;
break;
case 64: // channel A, gain factor 64
GAIN = 3;
... |
/*
Petar 'PetarV' Velickovic
Algorithm: First-Fit Bin Packing
*/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <vector>
#include <list>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <complex>
#define MID (left+... |
#include <iostream>
#include <vector>
#include <tuple>
#include "MatlabEngine.hpp"
#include "MatlabDataArray.hpp"
#include "octonav/visualize.hpp"
using namespace std;
using namespace octomap;
using matlab::data::Array;
std::unique_ptr<matlab::engine::MATLABEngine> mlp = matlab::engine::startMATLAB();
tuple<Array, A... |
#ifndef SOLVERPROPERTYWIDGET_H
#define SOLVERPROPERTYWIDGET_H
//--------------------------------------------------------------------------------------------------------------
#include <QWidget>
#include <QLabel>
#include <QDoubleSpinBox>
#include <QGridLayout>
#include <QPushButton>
#include <memory>
#include "Flui... |
#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... |
#ifndef CIRCLE_HELPER_H
#define CIRCLE_HELPER_H
#define GLM_FORCE_RADIANS
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <vector>
#include <fstream> // std::ifstream
#include <iostream>
#include <utility>
namespace CircleHelper{
std::vector<glm::dvec4> ge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.