text stringlengths 8 6.88M |
|---|
#include "Motorbike.h"
Motorbike::Motorbike(){}
Motorbike::Motorbike(int id, std::string name, int posX, int posY) {
this->_id = id;
this->_name = name;
this->_posX = posX;
this->_posY = posY;
} |
#ifndef CAUHOI_H
#define CAUHOI_H
#include <string>
using std::string;
enum QA{
A = 0,
B,
C,
D
};
class CauHoi
{
public:
CauHoi();
virtual ~CauHoi();
int id() const;
void setId(int id);
string maMH() const;
void setMaMH(const stri... |
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "beginner_tutorials/stu.h"
void chatterCallback(const beginner_tutorials::stu::ConstPtr& msg)
{
ROS_INFO("name and date: [%s] [%d] ", msg->name.c_str(),msg->date);
}
int main(int argc, char **argv)
{
ros::init(argc, argv, "listene... |
#include<iostream>
using namespace std;
// 深拷贝和浅拷贝
// 浅拷贝:简单的复制拷贝操作
// 深拷贝:在堆区重新申请空间进行拷贝操作
class Person
{
public:
Person()
{
cout<<"Person的默认构造函数调用"<<endl;
}
Person(int age)
{
m_age = age;
cout<<"Person的有参构造函数调用"<<endl;
}
Person(int age,int height)
{
m_a... |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("ssm.in");
ofstream fout ("ssm.out");
int main()
{
long long int n, i, mx_val, mx_index, s=0;
fin>>n;
long long int arr[n+1], prev_val;
for(i=0;i<n;i++)
fin>>arr[i];
prev_val = arr[0];
mx_val = prev_val;
mx_in... |
#include <iostream>
#include <string>
#include <math.h>
#include "../meteor/process_meteor.h"
#include "./tdefs.h"
#include <fst/fstlib.h>
//maximum difference between generated path and averagge
const int MAX_LEN_DIFF = 5;
float penaltyFunction(float expected, int actual) {
return pow((expected - actual),2);
}... |
#include "plane.h"
Plane::Plane() {}
Hit Plane::intersect(Ray& ray) {
float t = 0.0;
t = (-ray.origin.y - 1.0) / ray.direction.y;
Vec3 p = ray.getPosition(t);
Vec3 n = {0.0, 1.0, 0.0};
return Hit{p, n};
} |
// Plots.h
// Created by Isaac Mooney on 7/23/18.
// A bunch of functions to make plotting more automated and less repetitive
#ifndef Plots_h
#define Plots_h
#include "TROOT.h"
#include <string>
#include <iostream>
#include <vector>
//constructs canvas
//second argument is: 0 = no log, 1 = logx, 2 = logy, 3 = log... |
#include <stdio.h>
int main(){
int a;
scanf("%d",&a);
if(a>=90&&a<=100){
printf("A");
} else if(a>=70&&a<=89){
printf("B");
} else if(a>=40&&a<=69){
printf("C");
} else{
printf("D");
}
return 0;
}
|
/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
t... |
#ifndef __DUI_TREEVIEW_H__
#define __DUI_TREEVIEW_H__
#pragma once
/*#include "DUIControlBase.h"*/
#include "DUICanvas.h"
#include "DUIControlContainer.h"
#include "DUIButton.h"
DUI_BGN_NAMESPCE
#define KEEP_TREE_STRU 0
class IDUITreeViewItem;
class CDUITreeNode;
class IDUITreeView;
class CDUITreeViewImpl;
typ... |
class Solution {
public:
int calculate(string s) {
if (s.empty()) return 0; // corner case
int n = s.size(), res = 0, lastNum = 0, curNum = 0;
char lastOp = '+'; // previous operator: 1+2*3 => 0+1+2*3
for (int i = 0; i < n; ++i) {
char curChar = s[i];
if ('0'... |
#pragma once
#include "SlowControlProcessors.h"
#include "tree/TEvent.h"
#include <map>
#include <queue>
#include <memory>
namespace ant {
namespace analysis {
namespace slowcontrol {
struct event_t {
bool Save; // indicates that slowcontrol processors found this interesting
TEvent Event;
event_t() ... |
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode({ 800, 600 }), "Colored Circles");
window.clear();
sf::CircleShape shape1(40);
shape1.setPosition({ 200, 120 });
shape1.setFillColor(sf::Color(0xFF, 0x0, 0x0));
... |
/**********************************************************************
bilibili粉丝数监视器+天气显示
基于flyAkari 会飞的阿卡林 bilibili UID:751219 的代码修改
感谢UP:Hans叫泽涵UP: 小年轻只爱她提供的灵感修改!
**********************************************************************/
/* 4pin IIC引脚,正面看,从左到右依次为GND、VCC、SCL、SDA
* ESP01 --- OLED
* ... |
#pragma once
#include <utility>
namespace Lynx::Tuple_V1
{
namespace
{
template <std::size_t N, typename T>
struct TupleCell
{
constexpr explicit TupleCell() noexcept
: value()
{
}
constexpr explicit TupleCell(const T&... |
#include <iostream>
using namespace std;
void Max (int A, int B);
int main ()
{
int N1, N2;
cout<<"Ingrese el primer valor del primer numero entero: ";
cin>>N1;
cout<<"Ingrese el segundo valor del segundo numero entero: ";
cin>>N2;
Max(N1,N2);
return 0;
}
void Max (int A, int B)
{
if (A>... |
#include "Sensor.h"
//sensor construct, this is called by all sensors on creation
Sensor::Sensor(float value)
{
this->value = value;
}
Sensor::~Sensor()
{
}
float Sensor::getValue()
{
return value;
}
void Sensor::setValue(float value)
{
this->value=value;
}
|
#include "InvalidKennitalaException.h"
InvalidKennitalaException::InvalidKennitalaException()
{
//ctor
}
InvalidKennitalaException::~InvalidKennitalaException()
{
//dtor
}
|
#ifndef LEADERBOARD_H
#define LEADERBOARD_H
#include <string>
#include <map>
class Leaderboard {
public:
Leaderboard();
static Leaderboard *leaderDB; // the one, single leaderDB
//returns if score is greater than or equal to the lowest score
bool GEQLowestScore(int score);
... |
#if (defined HAS_VTK)
#include <irtkImage.h>
#include <vtkPolyData.h>
#include <vtkPolyDataReader.h>
#include <vtkPolyDataWriter.h>
#include <vtkHull.h>
char *in_name = NULL, *out_name = NULL;
void usage()
{
cerr << "Usage: polydatahull [input] [output] <options>\n" << endl;
cerr << "" << endl;
cerr << "Opt... |
#pragma once
#include <iostream>
#include <fstream>
#include <vector>
#include <pcl/point_types.h>
#include <pcl/features/normal_3d.h>
#include <vector>
using namespace std;
namespace pointCloudExtraction
{
bool RestorePointCloud(const float* pDepthImage, unsigned int uDepthWidth, unsigned int uDepthHeight,
con... |
#ifndef __CAFFE_MTCNN_HPP__
#define __CAFFE_MTCNN_HPP__
#include <string>
#include <vector>
#include <opencv2/opencv.hpp>
#include "mtcnn.hpp"
#include "comm_lib.hpp"
#include "tengine_c_api.h"
class caffe_mtcnn: public mtcnn {
public:
caffe_mtcnn()=default;
int load_3model(const std::string& mo... |
#include "../../Common/Window.h"
#include "../CSC8503Common/StateMachine.h"
#include "../CSC8503Common/StateTransition.h"
#include "../CSC8503Common/State.h"
#include "../CSC8503Common/GameServer.h"
#include "../CSC8503Common/GameClient.h"
#include "../CSC8503Common/NavigationGrid.h"
#include "TutorialGame.h"
#incl... |
#include <Cipher.h>
//大漠算法!!!!
///////////////////////
//异或加/解密算法(以下参数类同)
//datas:待加/解密内容地址
//password:加密用的密码
void cipher_BitXor(QByteArray &datas,QString password)
{
uint datasLen=datas.length();//明文长度datasLen
uint pwdLen=password.length();//密码长度pwdLen
char *data=datas.data();//指针Data用于处理明文里的数据
uint i... |
#ifndef _HELPER_HPP_
#define _HELPER_HPP_
#include <vector>
bool Get_Int_Vector_From_C_To_Python(std::vector<int> &out, PyObject *int_list);
bool Get_Int64_Vector_From_C_To_Python(std::vector<int64_t> &out, PyObject *long_list);
#endif // _HELPER_HPP_
|
#ifndef DISABLE_RENDER
#include "renderer.h"
#endif
#include "aabb.h"
#include "body.h"
#include "contact_generator.h"
#include "gjk_epa.h"
#include "simplex.h"
namespace physics
{
#ifdef DEBUG_GJKEPA
extern std::vector<SupportPoint> minkowskiPoints;
extern std::vector<Vector3> allMinkowskiPoints;
static void ren... |
// MFCActiveXCtrl.cpp : Implementation of the CMFCActiveXCtrl ActiveX Control class.
#include "stdafx.h"
#include "MFCActiveX.h"
#include "MFCActiveXCtrl.h"
#include "MFCActiveXPropPage.h"
#include "afxdialogex.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
IMPLEMENT_DYNCREATE(CMFCActiveXCtrl, COleControl)
// Me... |
/* --- Singly Linked List --- */
#include <bits/stdc++.h>
using namespace std;
struct node {
int data;
node *next;
};
class linked_list {
private:
node *head, *tail;
public:
linked_list() {
head = NULL;
tail = NULL;
}
void add(int n) {
node *tmp = new node;
tmp... |
#include <whiskey/Parsing/ParserRuleEmpty.hpp>
#include <whiskey/Parsing/ParserContext.hpp>
#include <whiskey/Parsing/ParserResult.hpp>
namespace whiskey {
ParserResult ParserRuleEmpty::onParse(const ParserGrammar &grammar, ParserContext &ctx, MessageContext &msgs) const {
return action(msgs);
}
ParserRuleEmpty::Pa... |
#ifndef __WHISKEY_Parsing_ParserResult_HPP
#define __WHISKEY_Parsing_ParserResult_HPP
#include <whiskey/AST/Node.hpp>
namespace whiskey {
class ParserResult {
private:
std::unique_ptr<Node> node;
bool good;
public:
ParserResult();
ParserResult(const std::unique_ptr<Node> &node);
std::unique_ptr<Node> &get... |
// -*- C++ -*-
//
// Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory,
// Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC
//
// This file is part of FreePOOMA.
//
// FreePOOMA is free software; you can redistribute it and/or modify it
// under the terms of the Expat license.
//
// This progr... |
/*
========================================================================
Name : TraceManagerMainView.h
Author : DH
Copyright : All right is reserved!
Version :
E-Mail : dh.come@gmail.com
Description :
Copyright (c) 2009-2015 DH.
This material, including documentation and... |
// string literal class based on
// http://en.cppreference.com/w/cpp/language/constexpr
#pragma once
#include <cstddef>
#include <stdexcept>
#include <string>
class conststr {
private:
static constexpr const char* EMPTY = "";
const char* m_ptr;
size_t m_size;
public:
inline constexpr conststr() : m... |
#pragma once
#include "vector3.h"
class Ray
{
public:
Ray(){}
Ray(const Vector3& inOrigin, const Vector3& inDirection)
: origin(inOrigin)
, direction(inDirection)
{}
Vector3 PointAt(float t) const { return origin + (direction * t); }
public:
Vector3 origin;
Vector3 di... |
// #123 - Write a main function that does the following:
// a) reads an indeterminate number of values from the keyboard and stores them in a linked-list
// b) prints all the values
// c) prints the average of the values
// d) prints the negative values
// Eric Farkas
// CUS 1144 MWF 7:00-7:55
// March 14, 2002
#inc... |
#include <bits/stdc++.h>
using namespace std;
bool contains7(int n)
{
for (; n != 0; n /= 10)
if (n % 10 == 7)
return true;
return false;
}
int main()
{
int n;
cin >> n;
array<int, 4> ans{};
for (int i = 1; n > 0; ++i)
{
if (i % 7 != 0 and not contains7(i))
... |
/********************************************************************************
** Form generated from reading UI file 'ventana2.ui'
**
** Created by: Qt User Interface Compiler version 5.0.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
******************************************... |
/*
* File: Database.cpp
* Author: Leonardo
*
* Created on 16 de Agosto de 2015, 19:00
*/
#include "Database.h"
Database::Database() {
}
Database::Database(const Database& orig) {
}
Database::~Database() {
}
|
/*
* Copyright (c) 2009-2012 André Tupinambá (andrelrt@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... |
#include<bits/stdc++.h>
using namespace std;
vector<int>adj[10002];
int vis[10002];
int dist[10002];
void bfs(int src)
{
queue<int>q;
vis[src]=1;
q.push(src);
dist[src]=0;
while(!q.empty())
{
int cur=q.front();
q.pop();
for(int x:adj[cur])
{
if(!vis... |
#include<bits/stdc++.h>
using namespace std;
vector <int> v[1000];
bool vst[1000];
queue <pair<int,int> > q;
int main(){
int i,j,a,b,st,n,m,ans=0;
cin>>n>>m;
for(i=0;i<m;i++)
{
cin>>a>>b;
v[a].push_back(b);
v[b].push_back(a);
}
cin>>st;
q.push({1,0});
... |
#ifndef QUADBOARD_H
#define QUADBOARD_H
#include <SFML/Graphics.hpp>
class QuadBoard : public sf::Drawable, public sf::Transformable
{
public:
QuadBoard(size_t quad_size, size_t width, size_t height, size_t margin, sf::Color default_color = sf::Color::Green, sf::Color active_color = sf::Color::Yellow);
void set... |
//////////////////////////////////////////////////////////////////////////
//
// data library
//
// Written by Pavel Amialiushka
// No commercial use permited.
//
//////////////////////////////////////////////////////////////////////////
#pragma once
#include "outputter.h"
namespace monpac
{
class channel;
class co... |
#include <iostream>
using namespace std;
void printArray(int* ar, int begin, int end)
{
for(int i = begin; i <= end; i++)
{
cout << ar[i] << " ";
}
cout << "\n";
}
void merger(int* ar, int begin1, int end1, int begin2, int end2 )
{
int a = begin1;
int z = end1;
int y = end2;
int b = begin2;
... |
/*****************************************************************************************************
* 剑指offer第24题
* 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。如果是则输出Yes,否则输出No。假设
输入的数组的任意两个数字都互不相同。
*
* Input: 序列vector<int> num
* Output: 0或1
*
* Note:(后序遍历BTS的特征:后序遍历的最后一个元素为根节点,左子树的元素均小于根节点,右子树的元素均大于根... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetCircleResolution(120);
rectWidth = 199;
rectHeight = 109;
barColor.set(0,0,255);
circle1Color.set(39, 39, 37);
circle2Color.set(39, 39, 38);
circle3Color.set(35, 39, 47);
}
... |
#include <bits/stdc++.h>
#define db double
const int MAX_N = 8e5 + 10 , INF = 0x3f3f3f3f ;
std::vector<int> a , b ;
std::map<int , int> cnt ;
std::map<int , bool> ap ;
std::map<int , std::vector<int> > p1 , p2 ;
int n , nxt[MAX_N] , f[MAX_N] , g[MAX_N] ;
void calc(int l1) {
if (l1 == 1) {
int cir = a[0] - b[0] ... |
#include<sstream>
#include<string>
#include "Property.h"
using namespace std;
Property::Property(bool rentalIn, int valueIn, string addressIn)
{
rental = rentalIn;
value = valueIn;
address = addressIn;
}
Property:: ~Property(){}
bool Property::getRental()
{
return rental;
}
int Property::getValue()
{
return valu... |
#pragma once
#include <SFML/Graphics.hpp>
#include <functional>
// Тип данных: функция, выполняющая анимацию.
// @param dt - число секунд, прошедших с предыдущего кадра.
using AnimationUpdateFn = std::function<void(float dt)>;
// Класс AnimatedSprite имитирует sf::Sprite, но поддерживает покадровую анимацию.
// Для з... |
#pragma once
#include "../PeptideSpectralMatch.h"
#include "PsmCrossType.h"
#include <string>
#include <unordered_map>
#include <vector>
#include "stringhelper.h"
#include "stringbuilder.h"
#include "../Ms2ScanWithSpecificMass.h"
#include "../PeptideSpectralMatch.h"
#include "Proteomics/Proteomics.h"
using namespac... |
#ifndef CITIESSTORAGE_H
#define CITIESSTORAGE_H
#include <QObject>
#include <QMap>
#include <QPointF>
#include <QTimer>
#include <QtQml/QQmlListProperty>
#include <QFutureWatcher>
#include <QtPositioning/QGeoPositionInfoSource>
QT_BEGIN_NAMESPACE
class QNetworkAccessManager;
class QNetworkSession;
QT_END_NAMESPACE
c... |
#include <QKeyEvent>
#include "myglwidget.h"
#include "modelloader.h"
#include <iostream>
void MyGLWidget::setupBuffers() {
ModelLoader model;
bool res = model.loadObjectFromFile("C:/Users/Fred/Documents/spacefunk/Prak 3/sphere_low.obj");
// Wenn erfolgreich, generiere VBO und Index-Array
if (res) {
... |
#include "window_manager.hpp"
WindowManager::WindowManager():
shift_l_pressed(false),
shift_r_pressed(false),
ctrl_l_pressed(false),
ctrl_r_pressed(false),
left_dragging(false),
maybe_left_click(false),
max_queue_size(5),
sliding_step(10),
cur_offset_x(0.0), // center
... |
#include "client.h"
#include "gui/view_constants.h"
#include <algorithm>
#include <chrono>
#include "sprites/drawer_factory.h"
#include "messages/json_message_conversions.h"
#include "messages/message_makers.h"
#include "animations/animations_service.h"
#include "sprites/sprites_manager.h"
client::client(con... |
#ifndef BUILDER_HPP_
#define BUILDER_HPP_
#include <iostream>
#include <memory>
class Plane {
public:
void SetType(const std::string& type) { type_ = type; }
void SetEngine(const std::string& engine) { engine_ = engine; }
void SetVendor(const std::string& vendor) { vendor_ = vendor; }
... |
#pragma once
#include <boost/asio.hpp>
#include "Protos.pb.h"
#include <iostream>
using boost::asio::ip::tcp;
namespace util {
static const int MAX_MESSAGE_SIZE = 1000000;
static const int HEADER_SIZE = 6;
static size_t decode_header(const char* data) {
char header[HEADER_SIZE + 1] = "";
strncat_s(header, ... |
/* Arduino SdSpi Library
* Copyright (C) 2013 by William Greiman
*
* STM32F1 code for Maple and Maple Mini support, 2015 by Victor Perez
*
* This file is part of the Arduino SdSpi Library
*
* This Library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Lice... |
#include "Setup_2014_EPT.h"
using namespace std;
namespace ant {
namespace expconfig {
namespace setup {
/**
* @brief Ant Setup for the October 2014 End Point Tagger beam time
* @see https://wwwa2.kph.uni-mainz.de/intern/daqwiki/analysis/beamtimes/2014-10-14
*/
class Setup_2014_10_EPT_Prod : public Setup_2014_EPT... |
/*
16236. 아기 상어 다시풀기의 다시풀기
30분
bfs로 거리를 한칸 씩 늘려가면서 체크하려면,
int size = (int)q.size();
for(int m = 0; m < size; m++)
이런 식으로 1칸씩 이동된 현재 q의 데이터까지만 체크하는 방식으로 해야한다.
*/
#include <iostream>
#include <vector>
#include <queue>
#include <cstring>
#include <algorithm>
#define MAX 11
using namespace std;
typedef pair<int, ... |
#pragma once
struct Editor;
/*
This interface defines the Listenable object that Listeners can subscribe to
and are notified when the Listenable changes. User by the GUI elements to
know when they need a redraw.
*/
class Listenable
{
protected:
static const int maxListeners = 128;
Editor *mListeners[maxListen... |
/**
* @file Configuration.cpp
* @author Lukas Schuller
* @date Tue Sep 24 21:21:57 2013
*
* @brief
*
*/
#include "Configuration.h"
#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
Configuration & Configuration::r = Configuration::Get();
std::ostream & operator << (std... |
#include <bits/stdc++.h>
using namespace std;
const int MAX_INT = std::numeric_limits<int>::max();
const int MIN_INT = std::numeric_limits<int>::min();
const int INF = 1000000000;
const int NEG_INF = -1000000000;
#define max(a,b)(a>b?a:b)
#define min(a,b)(a<b?a:b)
#define MEM(arr,val)memset(arr,val, sizeof arr)
#defi... |
#include "Graph.h"
#include <limits> // numeric_limits
#include <algorithm> // push_heap, pop_heap, make_heap
Graph::Graph()
{
}
Graph::~Graph()
{
}
void Graph::addVertex(const char &letter, const std::unordered_map<char, int> &edges)
{
verticies.insert(std::unordered_map<char, const std::unordered_map<char, int>... |
#include "render.h"
#include <iostream>
#include <vector>
#include <lodepng.h>
#include <glad/glad.h>
const char* vertex_shader1_source = R"(
#version 100
attribute vec3 position;
attribute vec2 a_texcoord;
attribute vec2 a_texpos;
attribute vec2 a_texsize;
varying vec2 v_texcoord;
varyi... |
#include "DXUT.h"
#include "cResourceMgr.h"
#include "cTextureFile.h"
#include "cAseFile.h"
#include "cAseLoader.h"
#include "cToonShader.h"
#include "cImageFile.h"
#include "cAlphaShader.h"
#include "cTexBuf.h"
cResourceMgr::cResourceMgr(void)
:m_fRed( 0.0f )
,m_fAlpha( 0.0f )
,m_fScale( 1.0f )
{
m_vecShader.resi... |
#include "rclcpp/rclcpp.hpp"
#include "geometry_msgs/msg/twist.hpp"
#include "sensor_msgs/msg/joy.hpp"
#include "tello_msgs/srv/tello_action.hpp"
namespace tello_joy {
// Simple teleop node:
// -- translate joystick commands to Tello actions and cmd_vel messages
// -- ignore all responses
// XBox One constants
const... |
// NumericMFCCtrl.cpp : Implementation of the CNumericMFCCtrl ActiveX Control class.
#include "pch.h"
#include "framework.h"
#include "NumericMFC.h"
#include "NumericMFCCtrl.h"
#include "NumericMFCPropPage.h"
#include "afxdialogex.h"
#include <string>
#include <curl/curl.h>
#include <chrono>
using namespace std;
usin... |
#include<iostream>
#include<string.h>
using namespace std;
int arr[100][100];
int dp[100][100];
char path[100][100];
int m,n;
int find(int i,int j)
{
if(i==m-1&&j==n-1)
{
path[i][j]='S';
return dp[i][j]=(arr[i][j]==1);
}
int rt,dn;
if(dp[i][j]!=-1) return dp[i][j];
if... |
#ifndef _INFO_H_
#define _INFO_H_
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <string>
const int s_in_day = 24 * 60 * 60;
class Date {
public:
int year, month, day;
};
class Item {
public:
std::string title;
std::string query;
Date startdate, enddate, curre... |
#pragma once
#include "Vector3D.h"
enum LightType { POINT = 0, DIRECTIONAL = 1 };
class Light {
// Haven't consider spotlight and area light, may be extended.
public:
LightType type;
Vec3f position;
Vec3f color;
Vec3f attenuation; //How does the light decay with distance
Vec3f lightDir; // Direction to light,... |
/*=auto=========================================================================
Portions (c) Copyright 2009 Brigham and Women's Hospital (BWH) All Rights Reserved.
See Doc/copyright/copyright.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
Module: $RCSfile: vtkMRMLGradientA... |
/*
* SPDX-FileCopyrightText: 2020 Rolf Eike Beer <eike@sf-mail.de>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#pragma once
#include <osm.h>
#include <QAbstractTableModel>
#include <vector>
enum {
RELITEM_COL_TYPE = 0,
RELITEM_COL_MEMBER,
RELITEM_COL_ROLE,
RELITEM_COL_NAME,
RELITEM_NUM_COLS
};
c... |
#pragma once
#include <unordered_map>
#include <vector>
#include "Graphics\LightShader.h"
#include "Game\Model.h"
#include "Game\AnimModel.h"
#include "Game\SNode.h"
#include "Game\SMatrixTransform.h"
#include "Game\Player.h"
#include "Game\World.h"
#include "Graphics\GuiItem.h"
#include "Graphics\PlayerGameGUI.h"
#in... |
#include <MetaValueBaseImplementation.h>
#include <ostream>
using namespace std;
using MVBI = MetaValueBaseImplementation;
using Interface = MVBI::Interface;
using Ptr = MVBI::Ptr;
using Data = MVBI::Data;
Interface& MVBI::operator=( Interface&& movee) {
return *this;
}
Ptr MVBI::copy() const {
ret... |
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include "inout.h"
#include "wyarray.h"
#include "readpara.h"
#include "kktlp.h"
#include "pdmatrix.h"
#include "solverlin.h"
#include "cglv.h"
using namespace std;
void SetPara (double *A, double *b, double *c, int na) {
// define the operator
for (int... |
/**
* @file ServiceAdvertiser.h
* @author Lukas Schuller
* @date Sun Oct 6 14:34:31 2013
*
* @brief
*
*/
#ifndef SERVICEADVERTISER_H
#define SERVICEADVERTISER_H
#include <iostream>
#include <exception>
#include <boost/asio.hpp>
#include <boost/array.hpp>
class AdvertiserException : public std::except... |
#pragma once
#include <string>
#include <unordered_map>
#include <vector>
#include "tangible_filesystem.h"
#include "Chemistry/Chemistry.h"
using namespace Chemistry;
#include "../EngineLayer/EngineLayer.h"
using namespace EngineLayer;
#include "../EngineLayer/CrosslinkSearch/CrosslinkSearchEngine.h"
using namespa... |
#include "Core/mvPythonModule.h"
#include "Core/mvApp.h"
#include "Core/mvPythonTranslator.h"
#include "Core/AppItems/mvAppItems.h"
#include "mvAppInterface.h"
namespace Marvel {
static std::map<std::string, mvPythonTranslator> Translators = BuildTranslations();
PyObject* addItemColorStyle(PyObject* self, PyObject... |
//------------------------------------------------------------------------------
// PointGroup
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002 - 2015 United States Government as represented by the... |
#include<iostream>
#include<cstdlib>
#include <cmath>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include<cstdio>
#include<cstring>
#include<sstream>
#ifdef __APPLE__
#include <OpenGL/OpenGL.h>
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "imageloader.h"
using namespace std;
#... |
#include "days.hpp"
#include <range/v3/all.hpp>
#include <map>
#include "lexical_cast.hpp"
enum class field {
byr,// (Birth Year)
iyr,// (Issue Year)
eyr,// (Expiration Year)
hgt,// (Height)
hcl,// (Hair Color)
ecl,// (Eye Color)
pid,// (Passport ID)
cid,// (Country ID)
num
};
static constexpr std... |
#include "Command_Configure.h"
ConfigureSaveLocationCommand::ConfigureSaveLocationCommand(std::string savePath) : Command(CommandTokens::PrimaryCommandType::Configure) {
_newSavePath = savePath;
}
UIFeedback ConfigureSaveLocationCommand::execute(RunTimeStorage* runTimeStorage) {
checkIsValidForExecute(runTimeStorag... |
#include "rcon.h"
Rcon::Rcon(const Server server, QObject* parent)
: Query(server.getIp(), server.getPort(), parent) {
rconPassword = server.getRconPassword();
}
void Rcon::setPassword(QByteArray password) {
rconPassword = password;
}
void Rcon::send(QByteArray command) {
command.prepend(" ")
... |
#include <iostream>
using namespace std;
int main()
{
double x = 12.213;
cout.precision(2);
cout << " By default: " << x << endl;
cout << " showpoint: " << showpoint << x << endl;
cout << " fixed: " << fixed << x << endl;
cout << " scientific: " << scientific << x << endl;
return 0;
}
|
#ifndef LINKGENERATOR_HPP_
#define LINKGENERATOR_HPP_
#include <QtCore>
#include "Settings.hpp"
#include "FlurryAnalytics.hpp"
const QString SHAHASH_NA("08d2e98e6754af941484848930ccbaddfefe13d6"); //"N/A", but SHA-1 hashed
/*!
* @class LinkGenerator
* @brief LinkGenerator class
* @details Handles lin... |
/*
* LocDirectOTA.cpp
*
* Created on: Nov 1, 2019
* Author: annuar
*/
#include <LocDirectOTA.h>
#include <WebServer.h>
LocDirectOTA *iniDirectOTA;
TaskHandle_t loopDirectOTA= NULL;
WebServer server(80);
JsonHandler *jsonHandler;
String makeTwoDigits(int digits);
LocDirectOTA::LocDirectOTA(int cor... |
#include <iostream>
#include <vector>
using namespace std;
class Inimigo{
public:
Inimigo(){}
virtual void getTipo() = 0;
//...
};
class Carteiro : public Inimigo{
private:
public:
Carteiro(){}
virtual void getTipo(){cout << "Carteiro" << endl;}
//...
};
class Lixeiro : public Inimigo{
pu... |
//CtrlAKey.cpp
#include "CtrlAKey.h"
#include "MemoForm.h"
#include "PageForm.h"
#include "Memo.h"
#include "Line.h"
#include "Caret.h"
CtrlAKey::CtrlAKey(Form *form)
:KeyAction(form) {
}
CtrlAKey::CtrlAKey(const CtrlAKey& source)
: KeyAction(source) {
}
CtrlAKey::~CtrlAKey() {
}
CtrlAKey& CtrlAKey::operator=... |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main(int argc, char* argv[]) {
ifstream htmlFile;
//string hilera = getenv("HTTP_COOKIE");
string line = "";
// Insertar header en el body
htmlFile.open("../html/headerInsert.htm... |
/**
* $Source: /backup/cvsroot/project/pnids/zdk/zls/zvm/CZVMFunction.cpp,v $
*
* $Date: 2001/11/14 18:29:37 $
*
* $Revision: 1.3 $
*
* $Name: $
*
* $Author: zls $
*
* Copyright(C) since 1998 by Albert Zheng - 郑立松, All Rights Reserved.
*
* lisong.zheng@gmail.com
*
* $State: Exp $
*/
#include <zls/zvm... |
#include<bits/stdc++.h>
using namespace std;
int res;
void getRes(vector<int> data, int starts, int mid, int ends)
{
vector<int> temp(ends-starts+1);
int i = starts;
int j = mid + 1;
int k = 0;
while(i <= mid && j <= ends) {
if(data[i] <= data[j]) {
temp[k++] = data[i++];
... |
// 飞机问题.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include<iostream>
#include<algorithm>
using namespace std;
int t[400000];
int d[400000];
int main()
{
int n,s,i,j,len,temp;
while(cin>>n>>s)
{
for(i=0;i<n;i++)
{cin>>t[i];}
sort(t,t+n);//排序
for(i=0,j=1;i<n;i++)//除去重复元素
{ if(i==0)
{
d[j]=t[i];
... |
#ifndef __FILE_CHOOSER_H
#define __FILE_CHOOSER_H
#include<gtkmm.h>
class Filechooser: public Gtk::Window{
public:
Filechooser();
virtual ~Filechooser();
protected:
void on_button_file_clicked();
void on_button_folder_clicked();
Gtk::ButtonBox button_box;
Gtk::Button file_button, folder_button;
};
#endi... |
//
// Copyright (C) 2018 Ruslan Manaev (manavrion@yandex.com)
// This file is part of the Modern Expert System
//
#pragma once
namespace uwp_app {
public ref class ProjectContext sealed {
public:
ProjectContext(Windows::UI::Xaml::Controls::TextBlock^ HeaderTextBlock,
Windows::UI::Xaml::Controls::... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define pb push_back
#define rsz resize
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
using pi = pair<int, int>;
#define f first
#define s second
#define mp make_pair
void setIO(string name = "lemonade") {
... |
#pragma once
#include <algorithm>
#include <limits>
#include <map>
#include <numeric>
#include <Eigen/Eigen>
#include "corpus.hpp"
#include "MarkovTagger.hpp"
#include "UnigramTagger.hpp"
using std::make_pair;
using std::map;
using std::string;
using std::vector;
using Eigen::MatrixXi;
using Eigen::MatrixXd;
usin... |
#include "netlist.h"
netlist::~netlist()
{
list<gate *>::iterator iter = gates_.begin();
gates_.erase(iter, gates_.end());
map<string, net *>::iterator it = nets_.begin();
nets_.erase(it, nets_.end());
}
bool netlist::create(const evl_wires &wires, const evl_components &comps)
{
retu... |
#include <algorithm>
#include <exception>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "box_id.h"
#include "checksum.h"
std::vector<std::string> get_input_data(char const *const file_name);
BoxIdDiff find_correct_diff(std::vector<BoxId> const &box_ids);
struct BoxDiffNotFountExc... |
// mal1007.cpp : Defines the entry point for the console application.
//The program is C++ implementation for DLL injection into a specified process of the windows system.
/*The program has been written for x64 version of the windows OS
++ The usage of the code is as follows: mal1007.exe 'dll_path' 'process PID'
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.