text stringlengths 8 6.88M |
|---|
/*-----------------------------主函数--------------------
* 文件名:CameraInit.cpp
* 作者: 孙霖
* 功能: 摄像头打开设置关闭
------------------------------------------------------*/
#include "CameraInit.h"
//-------------------------函数区------------------------------
/**
* @author Seafood
* @name PrintDeviceInfo
* @retur... |
#include <Ethernet.h>
#include <PubSubClient.h>
#include <RH_ASK.h>
#include <SPI.h> // Not actually used but needed to compile
// Update these with values suitable for your network.
byte mac[] = { 0x16, 0x07, 0x84, 0x01, 0x02, 0x87 };
EthernetClient ethClient;
// MQTT Client Settings
byte server[] = { 192, 168, 1... |
/* -*- 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
#include "platforms/mac/... |
#include <stdio.h>
#include <math.h>
int main(){
float a,b,c,prec,x,sakne;
int n=0;
printf("Ievadiet a vertibu ");
scanf("%f",&a);
printf("Ievadiet b vertibu ");
scanf("%f",&b);
printf("Ievadiet c vērtību izteinsmei (1+x)*exp(x)=c ");
scanf("%f",&c);
printf("Ievadiet precizitāti ");
scanf("%f",&prec);
float vid=a... |
#include "ChessField.h"
using namespace chess_piece;
namespace chess_field {
void ChessField::setMap(map<int, ChessPiece*> chessMap) {
this->chessMap_ = chessMap;
}
void ChessField::printChessMap() const {
for (auto itr = this->chessMap_.begin(); itr != this->chessMap_.end(); ++itr) {
ChessPiece* piece = ... |
#include <sys/types.h>
#include <sys/param.h>
#include <dirent.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
#include <time.h>
#include <stdlib.h>
#include<vector>
#include<string>
using namespace std;
struct node
{
string name;
long long file_size=0;
string dir;
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright (C) Opera Software ASA 2009-2011
*
* WebGL GLSL compiler -- dumping outputs.
*
*/
#ifndef WGL_PRINTER_CONSOLE_H
#define WGL_PRINTER_CONSOLE_H
#include "modules/webgl/src/wgl_printer.h"
#include "modules/util/opstring.h"
... |
/**********************************************
**Description: Implementation file of Person
***********************************************/
#include "Person.hpp"
Person::Person(std::string nameIn, double ageIn){ //constructor
name = nameIn;
age = ageIn;
}
std::string Person::getName(){ //This function return ... |
#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;
vector<string> split(string s, string p) {
vector<string> ret;
ll h = 0;
REP(i, 0, s.size() - p.size() + 1) if(s.substr(i, p.size()) == p) {
ret.push_back(s.substr(h, i - h));
... |
#ifndef Tone_h
#define Tone_h
class Tone {
public:
Tone() : toneOutput(-1) {};
void attach(uint8_t pin, unsigned int frequency, unsigned long duration_in_msec = 0);
void detach(uint8_t pin);
void handler();
private:
int8_t toneOutput;
uint32_t toneToggleCount;
};
void tone(uint8_t pin, unsigned int frequency,... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
using namespace std;
typedef long long ll;
#define INF 10e17 // 4倍しても(4回足しても)long longを溢れない
#define rep(i,n) f... |
//: C10:SimpleStaticMemberFunction.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
class X {
public:
static void f(){};
};
int main() {
X::f();
} ///:~
|
/*
filename: moitemset.h
author: Sherri Harms
last modified: 7/20/01
description: Class moitemset implementations for parallel
episodes. This is the implementation FILE moitemset.cpp for the class moitemset.
Values of this type are sets of moitem pointers,
where an moitem is a composite of
episode, support, and a... |
//
// 11651.cpp
// baekjoon
//
// Created by 최희연 on 2021/07/09.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool comp(pair<int, int> a, pair<int, int>b){
if(a.second==b.second)
return a.first<b.first;
else
return a.second<b.second;
}
int main(){
i... |
#include "Polygon.h"
#include <algorithm>
#include <cmath>
#include <functional>
#include <vector>
#include <utility>
double Polygon::edgeLen(const Vertex& v1, const Vertex& v2) {
double x = v2.x - v1.x;
double y = v2.y - v1.y;
return sqrt(x*x + y*y);
}
double Polygon::minTriangulationP(std::vector<std:... |
#include <iostream>
using namespace std;
class B {
public:
B() : a(1) { }
void aa(int a) { ; }
int a;
};
class d : public B {
public:
void aa(int a, int b) { ; }
};
int main(void) {
B *b = new d;
cout << b->a << endl;
return 0;
}
|
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstring>
#include<cmath>
using namespace std;
#define maxn 105
struct edge{
int from,to,cost;
};
int d[maxn];
vector<edge> es;
int V,E;
void bellman_ford(int s){
// printf("get in b_f \n");
for(int i=1;i<=V;i++)... |
/**
*
**/
#pragma once
#include <iostream>
#include <netinet/in.h>
#include <time.h>
static const int BUFFER_SIZE = 64;
struct HeapTimerNode {
HeapTimerNode(int delay, void (*cbf)(void*), void *data):
cbFunc(cbf), userData(data) {
expire = time(NULL) + delay;
}
time_t expire;
void (*cbFunc)(void*);
... |
// Created on: 1999-06-30
// Created by: Sergey ZARITCHNY
// Copyright (c) 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 Le... |
/*
GTASA C++ SDK
See README.md for more details
DK22Pac, 2015
*/
#pragma once
#include <vector>
namespace plugin {
template <typename T>
class ExtenderInterface {
public:
virtual void AllocateBlocks() = 0;
virtual void OnConstructor(T *object) = 0;
virtual void OnDestructor(T *obj... |
#include <iostream>
using namespace std;
int main(void)
{
int n;
int people[11] = { 0, };
int res[11] = { 0, };
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> people[i];
}
for (int i = 0; i < n; i++)
{
}
return 0;
} |
#include <iostream>
#include <fstream>
using namespace std;
//don't understand this part
char getTile(int x, int y, unsigned char data[], int size, int w, int h); // how to know what kind of parameters do we need in this?
int writeBytes(int offset, unsigned char data[]);
int main() {
ifstream map("8x8flipped.bmp");... |
constexpr int maxn = 262144;
constexpr int mod = 998244353;
using i64 = long long;
using poly_t = int[maxn];
using poly = int *const;
inline void derivative(const poly &h, const int n, poly &f) {
for (int i = 1; i != n; ++i) f[i - 1] = (i64)h[i] * i % mod;
f[n - 1] = 0;
}
inline void integrate(const poly &h, con... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2000-2006 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser. It may not be distributed
** under any circumstances.
**
** Peter Karlsson
*/
#if !defined ACCESSORS_LNGLIGHT_H && define... |
/*
* Created by Peng Qixiang on 2018/8/1.
*/
/*
* 二叉搜索树的后序遍历序列
* 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。
* 如果是则输出Yes,否则输出No。假设输入的数组的任意两个数字都互不相同。
*
*/
# include <iostream>
# include <vector>
using namespace std;
class Solution {
public:
bool VerifySquenceOfBST(vector<int> sequence){
if(sequence.empty()... |
int ldr=A0;
//Libraries needed
#include <ESP8266WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <FirebaseArduino.h>
//Credentials for connection to firebase
#define FIREBASE_HOST "smart-iv-hackon.firebaseio.com"
#define FIREBASE_AUTH ""
//Credentials for connection to Wi-Fi
#define WIFI_SSID "Galaxy"
#de... |
#include "./platform/UnitTestSupport.hpp"
#include "Dot++/src/lexer/states/ProduceToken.hpp"
#include <Dot++/lexer/FileInfo.hpp>
#include <Dot++/lexer/Token.hpp>
#include <Dot++/lexer/TokenizerState.hpp>
#include <Dot++/lexer/TokenInfo.hpp>
#include <Dot++/lexer/TokenType.hpp>
#include <deque>
namespace {
... |
#include "MyDLL.h"
extern "C" int CalcSum_(int a, int b, int c);
int sj()
{
int a = 17, b = 11, c = 14;
int sum = CalcSum_(a, b, c);
return sum;
}
|
#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 <bits/stdc++.h>
using namespace std;
int main()
{
int students, team;
cin>>students;
cin>>team;
int arr[students];
map <int, int>checker; //the meaning of this method is to check a data and the data type in list
for(int i=0;i<students;i++)
{
cin>>arr[i];
checker[ar... |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define LL long long
#define SIZE(x) (int) x.size()
#define PB(x) push_back(x)
template<class E>
class Edge : public E
{
private:
int v;
public:
Edge(E e, int v) : E(e)
{
this... |
#include <sys/time.h>
#include "microtime.h"
#define TEST 0 /* Set to 0 except when testing the code or timer resolution */
double get_microtime_resolution(void) {
double time1, time2;
time1 = microtime();
do {
time2 = microtime();
} while (time1 == time2);
return time2 - time1;
}
doubl... |
//
// Created by askeynil on 2019/11/5.
//
#include "FeatureMatching.h"
FeatureMatching::FeatureMatching(Mat &featureImg,
Mat &checkImg,
int nfeatures) :
featureImgs({featureImg}), checkImg(checkImg), orb(ORB::create(nfeatures)) {}
FeatureMatching... |
// Copyright (c) 2021 Thomas Kaldahl
#include "finlin.hpp"
// Helper functions
void ensureSameMatDim(int h1, int w1, int h2, int w2, const char *operation) {
if(w1 != w2) {
fprintf(
stderr,
"Dimension mismatch. Cannot %s matrices of width %d and %d.\n",
operation,
w1,
w2
);
exit(1);
} else if(h... |
#include <iostream>
using namespace std;
struct complex_t {
float real;
float imag;
complex_t() {
real = 0.0f;
imag = 0.0f;
}
complex_t add( complex_t other) const {
complex_t result;
result.real = this->real + other.real;
result.imag = this->imag ... |
/****************************************************************
* TianGong RenderLab *
* Copyright (c) Gaiyitp9. All rights reserved. *
* This code is licensed under the MIT License (MIT). *
*****************************************************************/
#pragma once
#include "GraphicsBase.hpp"
#in... |
/**
* @title Parallel vector of strings with RcppParallel
* @author Brian J. Knaus
* @license GPL (>= 2)
* @tags parallel
* @summary Demonstrates using a vector of strings with RcppParallel.
*
* The data structures used by R and Rcpp are not thread safe because garbage
* collection may occur.
* The [RcppPara... |
//Library
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
//Sensor Cahaya TSL2561
#include <Adafruit_TSL2561_U.h>
//Sensor Suhu & Kelembaban DHT11
#include <DHT.h>
#include <DHT_U.h>
//Sensor CO2 MH-Z19B
#include <MHZ19.h>
//MQTT & WiFi
#... |
#include<stdio.h>
#include<stdlib.h>
typedef struct{
int sommet;
int taille;
int T[40];
}mypile;
void empiler(mypile *p,int v){
p->T[p->sommet++]=v;
}
int depiler(mypile *p){
return p->T[--p->sommet];
}
int estpleinne(mypile p){
return p.sommet==p.taille;
}
int estvide(mypile p){
re... |
#include "pch.h"
#include "WaypointSearch.h"
#include "Math\SimpleMath.h"
#include "TimeManager.h"
#include "Renderer\DebugRenderer.h"
namespace Hourglass
{
void WaypointSearch::DrawDebug()
{
Vector4 debugColor = { 1.0f, 1.0f, 1.0f, 1.0f };
Aabb debugAabb;
debugAabb.pMin = m_WaypointGraph->operator[]( m_Start ... |
/*
* @lc app=leetcode id=231 lang=cpp
*
* [231] Power of Two
*
* https://leetcode.com/problems/power-of-two/description/
*
* algorithms
* Easy (42.16%)
* Likes: 470
* Dislikes: 129
* Total Accepted: 238K
* Total Submissions: 564.5K
* Testcase Example: '1'
*
* Given an integer, write a function to ... |
//
// Created by thinker on 7/6/16.
//
#ifndef PROJECT_HTTPREQ_H
#define PROJECT_HTTPREQ_H
#endif //PROJECT_HTTPREQ_H
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <netdb.h>
#include <stdarg.h>
#include <sys/socket.h>
#include <netinet/i... |
#ifndef RECHERCHERSTOCK_H
#define RECHERCHERSTOCK_H
#include <QDialog>
namespace Ui {
class rechercherstock;
}
class rechercherstock : public QDialog
{
Q_OBJECT
public:
explicit rechercherstock(QWidget *parent = 0);
~rechercherstock();
private slots:
void on_RprecedentPB_clicked();
private... |
#include "Q03.h"
// (1) 简单选择排序 time: O(n^2) space: O(1) 不稳定 顺序存储(链式存储)
void selectSort(int A[], int n){
// 选择一个最小的值,和第一个值进行交换
for(int i=0; i<n-1; i++)
{
int min=i;
for(int j=i+1; j<n; j++)
{
if(A[j] < A[min])
min = j;
}
if(min != i)... |
#include <iostream>
#include <stack>
#include <vector>
using namespace std;
// 300 600 200 500 (O) | 600, 500 |
vector<int> getBuildingsWithView(vector<int> buildings) {
vector<int> result;
if (buildings.size() == 0) {
return result;
}
stack<int> st;
st.push(buildings[0]);
for (int i = 1... |
#pragma once
#include "../../math/maths.h"
#include "../buffers/buffer.h"
#include "../buffers/indexbuffer.h"
#include "../buffers/vertexarray.h"
#include "../renderer/renderer2D.h"
#include "../shader/shader.h"
#include "../texture/texture.h"
#include "../../event/events.h"
#define _DEBUG_DRAW 1
namespace sge { na... |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i++)
#define show(x) {for(auto i: x){cout << i << " ";} cout<<endl;}
#define showm(m) {for(auto i: m){cout << m.x << " ";} cout<<endl;}
typedef long l... |
#include <iostream>
#include "daemon.h"
int main(int argc, char** argv)
{
if (argc != 2)
{
printf("Usage: ./%s filename.cfg\n", DAEMON_NAME);
return EXIT_FAILURE;
}
startDaemon(argv[1]);
}
|
#ifndef SERVO_MOVE_H
#define SERVO_MOVE_H
#include "bluetooth.h"
#include "timeDelay.h"
class servo : public Bluetooth, public timeDelay {
public:
void servoSetup();
void servoRead();
void servoMove(int *finalPos);
byte getSpeed();
char getDir();
#define HOMEPOSY 90
#define HOMEPOSZ 90
int... |
#pragma once
using namespace Ogre;
enum E_ENTITY_TYPE
{
E_NULL_ENTITY_TYPE = 0,
E_BRUSH_ENTITY_TYPE,
E_NPC_ENTITY_TYPE,
E_ENTITY_TYPE_NUM
};
class EntityEx : public UserObjectBindings
{
public:
EntityEx();
~EntityEx();
E_ENTITY_TYPE GetEntityType() const;
void SetEntityType( E_ENTITY_... |
#ifndef GLOBAL_TYPES_H
#define GLOBAL_TYPES_H
#include <iostream>
#include <unistd.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <stdint.h>
#define MAX_COLS 32
#define MAX_MEM_ROWS (1<<16)
#define MAX_CHARS 256
#define MAX_TABLES 128
#define MAX_NUM_CMDS 16
#define MAX_CLAUSES 16
#define MAX_AN... |
#include <iostream>
#include <string>
class Move{
public:
int x1;
int y1;
int x2;
int y2;
int player;
Move();
Move(int x1, int y1, int x2, int y2, int player);
std::string to_string();
};
|
#pragma once
#include <pthread.h>
#include "PThreadHelp.hpp"
namespace SCMP {
using pthreadhelp::SimpleQueue;
template<class T>
class Queue : public SimpleQueue<T> {
public:
Queue();
Queue(const Queue<T> &another);
Queue<T>& operator=(const Queue<T> &another);
~Queue... |
#include <iostream>
#include <string>
#include "BirthAnalysis.h"
using namespace std;
template <typename T>
bool testAnswer(const string &nameOfTest, const T& received, const T& expected) {
if (received == expected) {
cout << "PASSED " << nameOfTest << ": expected and received " << received << endl;
re... |
//
// 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.
//
// @author Arjan van Leeuwen (arjanl)
//
#ifndef AUTHENTICATION_COMMAND_H
#define AUTHENTICATION_COMMAND_H
#include "adjunct/m2/src/backend... |
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; c-file-style: "stroustrup" -*- */
#include "core/pch.h"
#include "modules/ecmascript/carakan/src/es_pch.h"
#include "modules/ecmascript/carakan/src/builtins/es_builtins.h"
#include "modules/ecmascript/carakan/src/kernel/es_string.h"
#include "m... |
#pragma once
#include <stdint.h>
#include <stdbool.h>
namespace x
{
typedef bool x_Bool, *x_PBool;
typedef int8_t x_Sint8, *x_PSint8;
typedef uint8_t x_Uint8, *x_PUint8;
typedef int16_t x_Sint16, *x_PSint16;
typedef uint16_t x_Uint16, *x_PUint16;
typedef ... |
#ifndef DYCOREGENERATOR_H
#define DYCOREGENERATOR_H
#include "acoregenerator.h"
class DYCoreGenerator : public ACoreGenerator
{
public:
DYCoreGenerator();
double **generate(int size) override;
double * generateX(int size) override;
double * generateY(int size) override;
};
#endif // DYCOREGENERATOR_H... |
#ifndef COPY_H
#define COPY_H
#include "Action.h"
#include "..\Statements\Statement.h"
#include "..\ApplicationManager.h"
class Copy : public Action
{
private:
Point Position;
Statement *Stat;
public:
Copy(ApplicationManager *pAppManager);
//Read Assignemt statements position
virtual void ReadActionParameters()... |
/* -*- 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.
*
* @author Manuela Hutter (manuelah)
*/
#ifndef __ST_OPERA_ACCOUN... |
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<math.h>
struct point{
double x;
double y;
}p;
void c_curve(struct point p,double len,double angle,int n);
void main()
{
int gd=DETECT,gm;
int n,run=1;
double l,a;
while(run==1)
{
run=0;
prin... |
#pragma once
#include "proto/data_base.pb.h"
#include "proto/data_player.pb.h"
#include "proto/data_chat.pb.h"
#include "proto/data_arena.pb.h"
#include "proto/data_mail.pb.h"
#include "proto/data_yunying.pb.h"
#include "proto/data_log.pb.h"
#include "proto/data_admin.pb.h"
#include "net/conn.hpp"
#include "net/server... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define maxn 100005
int n,m;
ll h[maxn],p[maxn];
bool ok(ll time) {
ll need;
int pos=0;
for(int i=0; i<n; i++) {
if(abs(h[i]-p[pos])>time)
continue;
if(h[i]==p[pos])
pos++;
if(h[i... |
/*
* 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 <folly/MapUtil.h>
#include <quic/state/AckEvent.h>
#include <chrono>
#include <utility>
namespace quic {
void AckEvent... |
//
// Created by 钟奇龙 on 2019-05-03.
//
#include <iostream>
using namespace std;
class Node{
public:
int data;
int leftMax;
int rightMax;
Node *left;
Node *right;
Node(int x):data(0),leftMax(0),rightMax(0),left(NULL),right(NULL){
}
};
int maxDistance = INT_MIN;
int getMaxDistance(Node *head... |
#include "vlc_helper.h"
#include <mutex>
template < typename T >
using scoped_do = std::unique_ptr< T, std::function< void( T* ) > >;
char* mY_hACkY_wACky_StRDuP( const char* str )
{
// Внутри функция text_segment_New дублирует С-строку с помощью strdup и сохраняет указатель внутри сегмента в psz_text.
// К... |
/*************************************************************************
> File Name: stone.cpp
> Author: JY.ZH
> Mail: xw2016@mail.ustc.edu.cn
> Created Time: 2018年07月20日 星期五 12时31分10秒
************************************************************************/
#include<iostream>
using std::cout;
#in... |
// BGS.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <opencv2\core\core.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\features2d\features2d.hpp>
#include <iostream>
#include <conio.h>
#include <vector>
const double pi = 3.142;
const double cthr = 0.00001;
... |
#include "extractionworker.h"
#include "JlCompress.h"
extern std::atomic<bool> extractionCompleted;
void ExtractionWorker::init(QFileInfo fileDest,QProgressBar* pb)
{
this->qfi_=fileDest;
this->pb_=pb;
}
void ExtractionWorker::extract()
{
extractionCompleted=false;
QStringList zextracted = JlCompress::ext... |
#pragma once
#include "cursur_point.h"
#define EMPTY -1
class Board
{
public:
Board();
int GetState(cursur_point pos);
void SetState(cursur_point pos, int state);
int CheckLineFull(cursur_point reference_pos);
private:
int board_[10][20];
};
|
#include "VnaUserDefinedPort.h"
// RsaToolbox
using namespace RsaToolbox;
// Qt
#include <QStringList>
/*!
* \class RsaToolbox::VnaUserDefinedPort
* \ingroup VnaGroup
* \brief The \c %VnaUserDefinedPort class
* controls the setup of user-defined ports
*/
VnaUserDefinedPort::VnaUserDefinedPort()
{
_source... |
#ifndef DNA_ANALYZER_PROJECT_USERINTERFACE_H
#define DNA_ANALYZER_PROJECT_USERINTERFACE_H
#include "../Model/dataDNA.h"
#include "../Controller/System.h"
#include "../Controller/CallBack.h"
class UserInterface
{
public:
virtual ~UserInterface(){};
virtual void start(Iwriter& writer, Ireader& reade... |
//
// NamedEvent_Android.h
//
// $Id: //poco/1.4/Foundation/include/_/NamedEvent_Android.h#1 $
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Definition of the NamedEventImpl class for Android.
//
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH.
// and Contributor... |
/****************************************************************************
* AAMLibrary
* http://code.google.com/p/aam-library
* Copyright (c) 2008-2009 by GreatYao, all rights reserved.
****************************************************************************/
#include <ctime>
#include "AAM_Basic... |
#include <Windows.h>
#include <Psapi.h>
#include <cstdint>
__forceinline const bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for (; *szMask; ++szMask, ++pData, ++bMask)
{
if (*szMask == 'x' && *pData != *bMask)
return false;
}
return (*szMask) == NULL;
}
__forcei... |
#include "gtest/gtest.h"
#include <string>
#include <vector>
#include "ArgumentsParsing.h"
#include "CmdOption.h"
#include "Node.h"
#include "SyntacticParser.h"
namespace ArithmeticalParserTests
{
using OptionsMap = std::map<arithmetic_parser::CmdOption, arithmetic_parser::OptionInput>;
TEST(SyntacticParserInvali... |
/**
* @file parseCmdArgs.hpp
* @brief Functionality related to command line parsing for indexing and mapping
* @author Chirag Jain <cjain7@gatech.edu>
*/
#ifndef PARSE_CMD_HPP
#define PARSE_CMD_HPP
#include <iostream>
#include <string>
#include <fstream>
//Own includes
#include "map/include/map_parameters... |
/* Copyright 2019 Abner Soares e Kallebe Sousa */
#include <stdexcept>
#include "tu_entidades.hpp"
void TU_Usuario::setUp() {
this-> usuario = new Usuario();
estado = SUCESSO;
}
void TU_Reserva::setUp() {
this-> reserva = new Reserva();
estado = SUCESSO;
}
void TU_Carona::setUp() {
this-> carona... |
#include <iostream>
#include <math.h>
#include <cmath>
using namespace std;
float f(double x) { return (x*x*x + 6 * x *x - 0.02*exp(x) - 14); } // вычисляемая функция
float df(float x) { return (3 * x*x + 12 * x - 0.02*exp(x)); } // производная функции
void reshenie()
{
double x, x1, temp = 0, a = -6, b = 2... |
//
// Created by 송지원 on 2020/07/07.
//
#include <iostream>
using namespace std;
int N, K;
int cnt;
int student[6][2];
int a, b;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> N >> K;
for (int i=0; i<N; i++) {
cin >> a >> b;
student[b-1][a]++;
}
for (int i=0; i<6; i+... |
#include<iostream>
using namespace std;
//function declaration
//double distance(double velocity, double time_elapsed) ;
// function definition
double distance(double velocity, double time_elapsed) {
return velocity * time_elapsed / 2 ;
}
int main() {
// funct... |
/*
* Created by Peng Qixiang on 2018/5/27.
*/
/*
* 输入一个整数,输出该数二进制表示中1的个数.
* 其中负数用补码表示。
*/
# include <iostream>
using namespace std;
// 错误,负数左移最高位填1, 固会陷入死循环
int NumberOf1_v1(int n) {
int count = 0;
while (n != 0) {
count += (n & 1);
n = n >> 1;
}
return count;
}
// 解法1, n = n & ... |
#include "DisplayRender.h"
DisplayRender::DisplayRender(Display disp)
{
display_map = disp;
}
void DisplayRender::updateMap()
{
for (int i = 0; i < 16; i++)
{
openSingle(i, display_map.getColorAt(i));
//Serial.print(display_map.getColorAt(i));
//Serial.print(";");
}
//Seria... |
#include <stdio.h>
#include <string.h>
int main(){
char str[1007];
int sum = 0 ;
int length;
int n;
while(gets(str)!=NULL){
sum=0;
length=strlen(str);
for(int i=0;i<length;i++){
if(str[i]=='(')
sum++;
else if(str[i]==')')
sum--;
else if (str[i]=='B')
break;
... |
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
pair<queue<pair<int, int>>, bool> find_path(
const vector<vector<char>>& grid,
int r = 0, int c = 0, queue<pair<int, int>> path = {}) {
if ((r < grid.size()) && (c < grid[r].size()) && (grid[r][c] == 'o')) {
path.... |
/*
* Terrier.cpp
*
* Created on: Jun 7, 2016
* Author: g33z
*/
#include "Terrier.h"
Terrier::~Terrier()
{
}
void Terrier::bark(){
cout << "Gautz " << "Gautz!" << endl;
}
|
/*
========================================================================
DEVise Data Visualization Software
(c) Copyright 1992-1996
By the DEVise Development Group
Madison, Wisconsin
All Rights Reserved.
========================================================================
Under no circumstances ... |
#include "Curativos.h"
#include <sstream>
#include <iostream>
using std::cout;
using std::endl;
using std::cout;
using std::stringstream;
Curativos::Curativos(){
}
Curativos::Curativos(string n, int nv, string t){
nombre=n;
nivel=nv;
tipo=t;
}
string Curativos::getTipo(){
return tipo;
}
... |
#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... |
/*
* NIST Utils Class Library
* clutils/Str.cc
* April 1997
* K. C. Morris
* David Sauder
* Development of this software was funded by the United States Government,
* and is not subject to copyright.
*/
#include <Str.h>
#include <scl_memmgr.h>
#ifndef STRING_DELIM
#define STRING_DELIM '\''
#endif
/******************... |
/*********************************************************\
* 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 "Chien.h"
//pour créer un chien, on a besoin de savoir son age et son nom :
//on appelle le constructeur de Animal avec les paramètres adéquat :
Chien::Chien(int age,string nom):Animal("ouafouaf",age,15)
{
this->nom=nom;
cout<<"Le chien a ete cree"<<endl;
}
//un chien ne se déplace pas de la même... |
/* -*- 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"
#if defined(NEW_PI_MH)
#include "platforms... |
#include <iostream>
typedef long long ll;
const int MOD = 1e9 + 7;
ll n, x, N[1000002], ans;
int main()
{
std::cin.sync_with_stdio(false);
std::cin.tie(NULL);
std::cin >> n >> x;
for(int i = 0; i <= n; i++)
{
ll A, t;
std::cin >> A >> t;
N[t] = A;
}
for(int i = n + ... |
#pragma once
#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include "Engine/AssetManager.h"
#include "Engine/StreamableManager.h"
#include "Single/ManagerClass/ManagerClass.h"
#include "RPGGameInst.generated.h"
#ifndef GAME_INST
#define GAME_INST
#define GetGameInst(worldContextObj) (Cast<URPGGameInst>(... |
/****************************************************************************
Copyright (C) 2002-2014 Gilles Debunne. All rights reserved.
This file is part of the QGLViewer library version 2.6.3.
http://www.libqglviewer.com - contact@libqglviewer.com
This file may be used under the terms of the GNU General Pub... |
// Question 18 => Find all pairs on integer array whose sum is equal to given number
#include<bits/stdc++.h>
using namespace std;
int getSum1(int arr[], int n, int sum){
int count = 0;
for(int i=0; i<n; i++){
for(int j=i+1; j<n; j++){
if(arr[i] + arr[j] == sum){
count++;
... |
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <list>
using namespace std;
main()
{
list <string> alumnos;
alumnos.push_back("Juan");
alumnos.push_back("Maria");
alumnos.push_back("Camila");
alumnos.push_back("Martin");
alumnos.push_back("Juan");
alumnos.pu... |
#pragma once
#include"dlgs.h"
// CFileDialogEx
class CFileDialogEx : public CFileDialog
{
DECLARE_DYNAMIC(CFileDialogEx)
public:
CFileDialogEx(BOOL bOpenFileDialog, // 对于 FileOpen 为 TRUE,对于 FileSaveAs 为 FALSE
LPCTSTR lpszDefExt = NULL,
LPCTSTR lpszFileName = NULL,
DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERW... |
#include "Hw264Encoder.h"
#include "media/NdkMediaFormat.h"
CLASS_LOG_IMPLEMENT(CHw264Encoder, "video[264.encoder]");
extern bool g_IsMTK;
CHw264Encoder::CHw264Encoder(AMediaCodec *pCodec, StreamEncodedataParameter *Parameter)
: m_pCodec(pCodec), m_ref(-1), m_adj(-1)
{
THIS_LOGT_print("is created: %p of %s, IsMTK: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.