text stringlengths 8 6.88M |
|---|
// Copyright 2019 Google LLC
//
// 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 ... |
#ifndef TRENDCONSTRUCT_H
#define TRENDCONSTRUCT_H
#include <QDialog>
#include <QVector>
class IoNetClient;
class QTreeWidgetItem;
class QListWidgetItem;
namespace Ui {
class TrendConstruct;
}
class TrendConstruct : public QDialog {
Q_OBJECT
public:
TrendConstruct(IoNetClient &source,QWidget *parent = 0)... |
//-----------------------------------------------------------------------------
// VST Plug-Ins SDK
// VSTGUI: Graphical User Interface Framework for VST plugins
//
// Version 4.2
//
//-----------------------------------------------------------------------------
// VSTGUI LICENSE
// (c) 2012, Steinberg Media Technologi... |
/* NO WARRANTY
*
* BECAUSE THE PROGRAM IS IN THE PUBLIC DOMAIN, THERE IS NO
* WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
* LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE AUTHORS
* AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
* WARRANTY OF ANY KIND, EITHER E... |
#ifndef FASTCG_MATH_H
#define FASTCG_MATH_H
#define _USE_MATH_DEFINES
#include <cstdlib>
#include <math.h>
namespace FastCG
{
template <typename T>
class Math
{
public:
static const float DEGREES_TO_RADIANS;
static const float RADIANS_TO_DEGREES;
static const float PI;
static const float TWO_PI;
inlin... |
#include <logging.h>
#include <derivativeestimator.h>
#include <vecn_logging.h>
#include <vec2.h>
#include <vec2_logging.h>
using namespace Common;
using vcust = vec2f;// vec<double, 2>;
vcust function(F t)
{
return vcust(cos(0.5*t), t * t * t);
}
vcust dfunction(F t)
{
return vcust(-0.5*sin(0.5*t), 3.0 *... |
#ifndef _CONECTORMODULAR
#define _CONECTORMODULAR
#include <mysql/mysql.h>
class ConectorModular {
public:
MYSQL* connection();
MYSQL_RES* query(MYSQL* connection, const char* sql_query);
};
#endif
|
#include "level.h"
#include "graphics.h"
#include "globals.h"
#include "player.h"
#include "enemy.h"
#include "tinyxml2.h"
#include "slope.h"
#include <SDL.h>
#include "utils.h"
#include <sstream>
#include <algorithm>
#include <cmath>
#include "weapon.h"
using namespace tinyxml2;
Level::Level() {}
Level::Level(std::... |
#ifndef SSPEDITOR_LEVEL_LEVEL_H
#define SSPEDITOR_LEVEL_LEVEL_H
#include <unordered_map>
#include "Header.h"
#include "../../ResourceLib/Enumerations.h"
#include "DataHandler.h"
#include "AiHandler.h"
#include "GlobalIDHandler.h"
#include "Checkpointhandler.h"
#include "LightController.h"
//#include "UiControlHandler.h... |
//
// Created by Vesper on 6/8/18.
//
#include "config.h"
#include "config_builder.h"
ConfigBuilder Config ::create() { return ConfigBuilder{std::make_shared<Config>(Config{})}; }
|
#pragma once
#include "Sprite.h"
#include "Coord.h"
class ItemBase
{
public:
virtual ~ItemBase() = default;
int idImg = 0;
};
class ItemSet
{
public:
void Init();
void Draw(int id, Coord c);
private:
Sprite m_item1;
};
class Container
{
public:
void Draw(ItemSet &set, const Coord &pos);
void AddItem(Item... |
#include "metis.hpp"
#define RETURN_NEXT() return (uint64_t)instruction-(uint64_t)code_start;
#define CHECK_INSTRUCTION(instruction_length) \
if ((uint8_t *)(registers[REGIP].ulong + instruction_length) > code_end) { \
throw MetisException("attempt to add instruction past address space",__LINE__,__FILE__); \
... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
string a;
cin>>a;
bool s = 0, f = 1;
for(int i=0; i<n; i++)
{
if(a[i]=='H')
{
if(s)
{
f = 0;
break;
}
s = 1;
}
if(a[i]=='T')
{
if(!s)
{
f = 0;
... |
// -*- 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... |
//-----------------------------------------------------------------------------
// Perimeter Map Compiler
// Copyright (c) 2005, Don Reba
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:... |
#include "Scene.hh"
using namespace std;
/**
* @brief Construct a new Scene:: Scene object
*
*/
Scene::Scene()
{
drone = new Drone;
water = new WaterSurface;
bottom = new BottomSurface;
initObstacles();
}
/**
* @brief Destroy the Scene:: Scene object
*
*/
Scene::~Scene()
{
delete drone;
... |
// This is RLL. A Runtime Library Loader.
// It is public domain:
// Copyright (c) 2020 Elijah Hopp, No Rights Reserved.
//--------------------------------HEADER_GUARD--------------------------------//
#ifndef RLL_HPP_
#define RLL_HPP_
//----------------------------------INCLUDES----------------------------------//
#in... |
bool model_loading = 0;
class model{
public:
vertex * p; int np;
line * l; int nl;
mesh * m; int nm;
}mdl;
void loadmodel(){
model_loading = 1;
int ib;//integer buffer
float fb;//float buffer
//opening file
std::fstream scene("models/l200.hmdl",std::ios::binary|std::ios::in|std::ios::out);
//reading ... |
//Дан целочисленный массив размера N. Удалить из массива все соседние одинаковые элементы, оставив их первые вхождения.
#include <iostream>
#include <locale.h>
using namespace std;
int main()
{
int N, i;
setlocale(LC_ALL, "Rus");
cout << "введите N>>";
cin >> N;
int* A = new int[N];
cout << "введите элементы ... |
/*
This library assumes that the hardware spi of the microcontroller is initialized
and the pins of the spi are set to output.
You should also define:
the name of the function used to tranceive bytes with the spi
the command used to set the reset, rs and cs pins as outputs, low and high
the name of the function used... |
#ifndef CREATEGAMEWIDGET_H
#define CREATEGAMEWIDGET_H
#include <QWidget>
#include <QImage>
#include <QPixmap>
#include <QLabel>
class CreateGameWidget : public QWidget
{
Q_OBJECT
public:
explicit CreateGameWidget(int width, int height, QWidget *parent = 0);
~CreateGameWidget();
private:
QLabel* m_back... |
#include <WasmScript/String.h>
#include <WasmScript/Math.h>
#include <WasmScript/Memory.h>
WASM_SCRIPT_MAGIC
using namespace script;
WASM_EXPORT void run() {
auto pool = mempool::create(nullptr);
char *ptr = (char *)mempool::palloc(pool, 128);
memcpy(ptr, "Hello world\n", 12);
ws_print(ptr);
mempool::destroy(... |
#ifndef EXPORTCURVETHREAD_H
#define EXPORTCURVETHREAD_H
#include <QThread>
#include <QTextCodec>
#include "curve_struct.h"
class ExportCurveThread : public QThread
{
public:
Q_OBJECT
public:
ExportCurveThread();
~ExportCurveThread();
void initThread(curve_ini_data *curve_data,QString strDir);
public:
protec... |
#include "main.h"
std::string model_filename = "savedModel.csv";
bool flag_retrain = false, flag_save_model = true, flag_draw_obstacle = false;
bool allow_mouse_click = false, flag_next_goal = false;
bool flag_time_to_run = false;
glm::vec3 pt_goal(500.0f, 400.0f, 0.0f), pt_starting(60.0f, 80.0f, 0.0f), next_pt_goal;... |
#include "bitreader.h"
#define debug 0
BYTE bitreader::readBYTE()
{
BYTE out;
input->read((char *) &out, sizeof(BYTE));
if (debug)
std::cout << input->tellg() << std::endl;
return out;
}
BYTE *bitreader::readBYTEArray(int number) {
BYTE *out = new BYTE[number];
input->read((char *) out, sizeo... |
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "Windows.Devices.AllJoyn.1.h"
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Foundation::Collections {
#ifndef WINRT_GENERIC_bb78502a_f79d_54fa_92c9_90c5039fdf7e
#define WIN... |
#include "StdAfx.h"
#include "controls\plot\screen.h"
int colors::by_chanel(int chanel)
{
static int colors_table[]=
{
/* 1 */ 0x00ffff, 0x8080ff, 0xff00ff, 0xffff80, 0x00ff80, 0x808080, 0xff0080, 0x80ff00,
/* 9 */ 0xff8000, 0x008000, 0x80ffff, 0x0080c4, 0x0080ff, 0x8000ff, 0x80ff80, 0xff80... |
#include <iostream>
#include <cmath>
using std::cout;
using std::cin;
using std::endl;
// globals
// function prototypes
float Dist3(float ux, float uy, float uz, float vx, float vy, float vz);
void PrintPoint(float *pointA, float *pointB);
void PrintDist3(float distance);
int main()
{
// local
float m_pointA[3];... |
// Copyright 2017 Phyronnaz
#include "VoxelPrivatePCH.h"
#include "VoxelWorldGenerator.h"
UVoxelWorldGenerator::UVoxelWorldGenerator(const class FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
} |
// AntiySYSMonitor.cpp : 定义应用程序的类行为。
//
#include "stdafx.h"
#include "AntiySYSMonitor.h"
#include "AntiySYSMainForm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CAntiySYSMonitorApp
BEGIN_MESSAGE_MAP(CAntiySYSMonitorApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()
// CAntiySYSMonitorApp... |
/*
1405. 미친 로봇
DFS
<< 소수점 자르기 >>
오차범위를 10^-9 까지 허용하기 때문에, 10^-10 까지 출력하도록 소수점을 고정시켜 주었다.
C++에서 cout의 소수점을 고정시켜주는 방법은
cout.precision(10) // 소수점 아래 10자리 까지 설정
cout << fixed << Simple << endl; // 소수점 아래 고정 10자리 까지 출력
>> 그러면 왜 4321.123456이 출력이 안되고 4321.123457이 되었을까?
그 이유는 나머지 버리는 자리 수는 반올림이 되기 때문입니다.
그래서... |
#include "Own_bill_format.h"
Own_bill_format::Own_bill_format(float amount, std::string owner, std::string debtor)
{
*myNamelist = owner;
*(myNamelist + 1) = debtor;
set_bill_format(amount, myNamelist, 2);
}
Own_bill_format::~Own_bill_format()
{
}
void Own_bill_format::printBill()
{
std::cout << "type: OWN... |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef tuple<ll, ll, ll> tp;
typedef pair<ll, ll> pr;
const ll MOD = 1000000007;
const ll INF = 1e18;
template <typename T> void print(const T &t) {
std::copy(t.cbegin(), t.cend(),
std::ostream_iterator<typename T::value_type>(std::co... |
#include "expstr.h"
#include "hierarchicallist.h"
const std::string ExpStr::allowableSignes = "+-*/";
ExpStr::ExpStr()
{
str.clear();
str = "\0";
}
ExpStr::ExpStr(std::string str): ExpStr()
{
this->str = str;
}
ExpStr::~ExpStr()
{
str = nullptr;
}
void ExpStr::deleteEmptyBrackets()
{
static con... |
// invert binary tree
#include <bits/stdc++.h>
using namespace std;
struct TreeNode
{
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
TreeNode(int x, TreeNode *left, TreeNode *right) : val... |
#ifndef PAGINATIONTEST_H
#define PAGINATIONTEST_H
#include <QtTest/QTest>
#include <QtCore/QObject>
#include "Cutelyst/Plugins/Utils/Pagination/Pagination"
#include "coverageobject.h"
using namespace Cutelyst;
class TestPagination : public CoverageObject
{
Q_OBJECT
private Q_SLOTS:
void testPagination();
... |
//
// Created by 梁栋 on 2019-04-26.
//
#include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
bool isVaild(int x, int y, int m, int n){
if(x>=0 && x<m && y>=0 && y<n){
return true;
}
return false;
}
int dxs[4] = {1, 0, -1, 0};
int dys[4] = ... |
/***********************************************************************
created: Sat May 24 2014
author: Timotei Dolean <timotei21@gmail.com>
purpose: Implementation for a view that displays a list of model items.
*************************************************************************/
/******... |
class Solution {
public:
TreeNode* lowestCommonAncestor(TreeNode* root, vector<TreeNode*> &nodes) {
if (!root) return NULL;
if (nodes.size() == 1) return nodes[0];
for (auto & node : nodes) {
if (node == root) return root; // if nodes include root
}
... |
/****************************************************************************
*文件名称: base_station.cpp
*创建日期: 2017-9-14
*作 者: 郭世江
*修改记录: 2017-9-14 首次创建
*功能描述: 业务处理文件代码
*****************************************************************************/
#include "base_sta... |
#include "core.h"
#include <time.h>
#include <iostream>
using namespace std;
///////////////////////////////////////
// TODO write the tree here:
///////////////////////////////////////
class gamefieldstate
{
public:
unsigned char gf[6][7]; //should have a copy of the current situation
int evaluate; //kinda 1 ... |
/*
ID: zrh331
PROG: fact4
LANG: C++
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <string.h>
using namespace std;
int n, ans=1;
int main () {
freopen ( "fact4.in", "r", stdin);
freopen ( "fact4.out", "w", stdout);
cin >> n;
int a=0, b=0;
... |
#include "AccelerationStructure.h"
#include "VulkanHelpers.h"
#include "CommandPool.h"
#include "Buffer.h"
using namespace vkw;
vkw::AccelerationStructure::AccelerationStructure(VulkanDevice* pDevice, VkGeometryNV* geometry, const std::vector<GeometryInstance>& instances)
:m_pDevice{pDevice}, m_pGeometry{geometry}, ... |
#include <vector>
#include <iostream>
using namespace std;
int findUnsortedSubarray(vector<int> &nums)
{
int n = nums.size();
vector<int> snums(n);
for (int i = 0; i < n; i++)
snums[i] = nums[i];
int l = n, r = 0;
for (int i = 0; i < n; i++)
{
if (snums[i] != nums[i])
{
... |
/*******************************************************************************
* Cristian Alexandrescu *
* 2163013577ba2bc237f22b3f4d006856 *
* 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ... |
/*
A number is represented in the form of a linked list such that each digit corresponds to a node in input linked list. You need to add 1 to it and return the updated list.
For example 1234 is represented as (1-> 2-> 3 -> 4) and adding 1 to it should change it to (1 -> 2 -> 3 -> 5).
Input Format :
Line 1 : Linked lis... |
#pragma once
#include "btBulletDynamicsCommon.h"
#include "Client.h"
#include "util\HatType.h"
#include <chrono>
using namespace std::chrono;
class Hat : public btRigidBody {
public:
Hat(btRigidBodyConstructionInfo& info, HatType hatTypee);
~Hat();
static Hat* createNewHat(HatType hatType, btCollisionShape* sh... |
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#ifndef GRAPHICS_H_INCLUDED
#define GRAPHICS_H_INCLUDED
#include <map>
#include <string>
struct SDL_Surface;
struct SDL_Rect;
class Graphics{
public:
Graphics();
~Graphics();
typedef SDL_Surface* SurfaceID;
SurfaceID loadImage(const std::string &file_path);
void blitSurface(SurfaceID source, SDL_Rect* source_rect... |
#pragma once
#include "../../Core/pch.h"
class GameStart
{
public:
int Test_ReadConfigFile_Success();
int Test_ReadConfigFile_Failure();
int Test_PlayerInput_SelectPlayerCount_ValidEntry();
int Test_PlayerInput_SelectPlayerCount_InvalidEntry();
int Test_PlayerInput_MapSelect_ValidEntry();
int Test_PlayerInput_M... |
#include "Config.h"
namespace revel
{
//Load the map with default values
/*std::map<std::string, std::string> Config::s_ConfigMap =
{
{"graphics_api", "OpenGL"},
{"screen_width", "1280"},
{"screen_height", "720"}
};*/
std::map<std::string, std::string>
Config::s_ConfigMap = Config::init();
} /* namespace re... |
#include "drake/perception/dev/feedforward_neural_network.h"
namespace drake {
using std::vector;
using drake::systems::Context;
using drake::systems::InputPort;
using drake::systems::OutputPort;
using drake::systems::System;
using drake::systems::BasicVector;
using Eigen::AutoDiffScalar;
using std::cout;
using std... |
#include "CellPickerHeader.h"
CellPicker::CellPicker(int width, int height)
{
width_ = width;
height_ = height;
x_ = static_cast<int> (width_ - 1) / 2;
y_ = static_cast<int> (height_ - 1) / 2;
}
CellPicker::CellPicker()
{
width_ = 0;
height_ = 0;
x_ = static_cast<int> (width_ - 1) / 2;
y_ = static_cast<int>... |
/* GPA2 - IFC
Criado Por: Natalia Kelim Thiel
Data: 11/03/2016
Descrição:
Código fonte (source) da biblioteca para o uso do LCD 20x4
*/
#include "Display.h"
/*static*/ LiquidCrystal_I2C *Display::_lcd;
/*static*/ byte Display::_grau[8] = { // "desenha" a bolinha do grau ( º )
B00000,
B0110... |
/*******************************************************************************
* Cristian Alexandrescu *
* 2163013577ba2bc237f22b3f4d006856 *
* 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ... |
#include <string>
#include <cstring>
#include <iostream>
#include <fstream> //includes if and of stream
#include <cctype>
#include <stdio.h>
#include <string.h> //strlen, strcpy, strcat
using namespace std;
int stuff(int lineLength, istream& inf, ostream& outf);
//precondition: lineLength > 1, inf and outf open suc... |
#ifndef CNF_H
#define CNF_H
#include <iostream>
#include <vector>
#include <set>
#include <map>
enum ValEnum {UNK=-1, VAL0=0, VAL1=1};
/**
* Models one clause in a CNF formula
*/
class Clause
{
public:
/**
* Default constructor
*/
Clause();
/**
* Constructs a Clause from its list of v... |
#ifndef CORE_WRAPPER_H
#define CORE_WRAPPER_H
#include "DynamicCore.h"
#include "WitnessWrapper.h"
#include <cassert>
inline int as_core_counter = 1;
template <class Core, class WitnessType, template <class> class WitnessSetType>
class CoreWrapper : public DynamicCore {
private:
using WitnessAlias = WitnessType;
... |
#ifndef __veritas_hpp__
#define __veritas_hpp__
#include <algorithm>
#include <chrono>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <tuple>
#include <memory>
#include <sstream>
#include <vector>
#include <omp.h>
#if defined... |
#ifndef PRIME_H
#define PRIME_H
#include "../util/util.h"
/*
class node {
private:
int _data;
node *_next;
public:
node(int);
};
class list {
private:
node *_head;
node *_tail;
int _size;
public:
list();
void insertAtTail();
};
*/
class prime {
private:
bool *_refArray; //This contains all the... |
//
// Created by Peter Chen on 5/29/16.
//
#ifndef CUBEWORLD_TILEUPDATERULES_H
#define CUBEWORLD_TILEUPDATERULES_H
class TileUpdateRules {
};
#endif //CUBEWORLD_TILEUPDATERULES_H
|
// C++ for the Windows Runtime vv1.0.170303.6
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
#include "Windows.ApplicationModel.Calls.1.h"
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Foundation {
#ifndef WINRT_GENERIC_7c5f5192_9fc0_5543_9bc4_411482e4ea93
#define WINRT_GEN... |
#ifndef SPARSIFY_H
#define SPARSIFY_H
// Return pairs (pos, length)
vector<pair<int, int>> find_long_runs(const Board &board, int min_length) {
vector<pair<int, int>> result;
int n = board_size(board);
for (int i = 0; i < n; i++) {
int k = 0;
for (int j = 0; j < n; j++) {
int pos = i * n + j;
... |
#ifndef TORCH_H
#define TORCH_H
#include <objects/usable.h>
namespace lab3
{
namespace objects
{
class Torch : public Usable
{
public:
Torch();
~Torch();
ActionResult use(Character &c);
};
}
}
#endif // TORCH_H
|
/*
* GPIODriver.hpp
*
* Created on: Aug 31, 2018
* Author: drnuc
*/
#ifndef GPIODRIVER_H
#define GPIODRIVER_H
#include "LPC17xx.h"
#include "stdint.h"
#include "tasks.hpp"
// gpio initializer
typedef struct {
uint8_t port;
uint8_t pin;
} gpioInit_t;
// define port one LED an... |
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
typedef struct Coordinate {
long long int x, y;
};
typedef struct Line {
long long int distance;
Coordinate Center;
int first, second;
};
Coordinate arr[1001];
Line line[1002001];
bool sortLineByDistance(Line A, Line B) {
if (A.distan... |
//**************************************************************************
//**
//** See jlquake.txt for copyright info.
//**
//** 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 the Free Software Foundation; either ... |
// Copyright 2016 Tamas Palagyi
//------------------------------------------------------------------------------
#include <getopt.h>
#include <easylogging++.h>
INITIALIZE_EASYLOGGINGPP
#include "dcmtk.hh"
#include "imagestore.hh"
#include "util.hh"
//-----------------------------------------------------------------... |
/* ============================================================================
* Tywyl Engine
* Platform: Windows
* WWW:
* ----------------------------------------------------------------------------
* Copyright 2015 Tomas Mikalauskas. All rights reserved.
*
* Redistribution and use in source and binary forms, wi... |
#ifndef CUTHASH_H
#define CUTHASH_H
/// @file CutHash.h
/// @brief CutHash のヘッダファイル
/// @author Yusuke Matsunaga (松永 裕介)
///
/// Copyright (C) 2005-2012 Yusuke Matsunaga
/// All rights reserved.
#include "YmNetworks/bdn.h"
#include "YmLogic/TvFunc.h"
BEGIN_NAMESPACE_YM
class Cut;
///////////////////////////////... |
#ifndef __UTILS_H
#define __UTILS_H
#include <string>
using namespace std;
string findAndReplace(string, string, string);
bool endsWith(string const &fullString, string const &ending);
#endif
|
#pragma once
#include "Util.h"
namespace Ubpa::UECS {
template<typename... AllCmpts, typename... AnyCmpts, typename... NoneCmpts>
EntityFilter::EntityFilter(TypeList<AllCmpts...>, TypeList<AnyCmpts...>, TypeList<NoneCmpts...>)
: allCmptTypes{ CmptType::Of<AllCmpts>... },
anyCmptTypes{ CmptType::Of<AnyCmpts>... ... |
//==========================================================================
// OUTPUTVECTORINSPECTOR.H - part of
//
// OMNeT++/OMNEST
// Discrete System Simulation in C++
//
//==========================================================================
/*---------------------------------... |
#include <iostream>
#include <string>
#include <vector>
#include "Card2.h"
#include "Deck2.h"
using namespace std;
int main() {
Deck d1;
Card p1;
Card p2;
d1.newDeck();
cout << "Deck size: " << d1.deckSize() << endl;
p1 = d1.dealCard();
p2 = d1.dealCard();
p1.printCard();
p2.... |
#include "PEngine/utilities/error.h"
#include "PEngine/app/application.h"
#include <iostream>
namespace pear { namespace utils {
void fatalError( const char* format, ... )
{
char message[256];
va_list ap;
va_start( ap, format );
vsprintf( message, format, ap );
va_end( ap );
std::cerr << "\nFat... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
#define pb push_back
#define all(x) begin(x), end(x)
#define rep(i, a, b) for(ll i = a; i < b; ++i)
using pi = pair<int, int>;
#define f first
#define s second
void setIO(string name = "diamond") {
ios_base::sync_with_s... |
/**********************
数据类型为bool的属性类
**********************/
#ifndef PROPERTYBOOL_H
#define PROPERTYBOOL_H
#include "DataPropertyAPI.h"
#include "PropertyBase.h"
namespace DataProperty
{
class DATAPROPERTYAPI PropertyBool : public PropertyBase
{
public:
//构造函数
PropertyBool();
//构造函数
PropertyBool(QString ... |
/* ASSIGNMENT 4 - COEN 244
Jean-Baptiste WARING 40054925
FAROUQ HAMEDALLAH 40087448
HOSPITAL MANAGEMENT SYSTEM
*/
#include "./person.h"
using namespace std;
Person::Person(string f, string l, string m, int s){
fname = f;
lname = l;
mname = m;
sin = s;
}
int Person::get_sint(){
return sin;
}
/*int Pe... |
#include "MeshFeatureTrackingUI.h"
#include <iostream>
#include "ui_MeshFeatureTrackingUI.h"
MeshFeatureTrackingUI::MeshFeatureTrackingUI(QWidget *parent) :
QFrame(parent),
ui(new Ui::MeshFeatureTrackingUI)
{
ui->setupUi(this);
this->setVisible( false );
}
MeshFeatureTrackingUI::~MeshFeatureTracking... |
void setUpWifi() {
Serial.println("-----------------------------");
WiFi.config(local_IP, primaryDNS, gateway, subnet); //No funciona
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Conectando...");
}
Serial.println("Connectado!");
Serial.print("Dire... |
#include <bits/stdc++.h>
#define ll long long
const int L = 61 , MAX_L = 64 + 5 , MAX_N = 200 + 10 , MAX_M = 2e5 ;
std::bitset<200010> f[MAX_L] , g ;
ll n , S ;
int T , m , a[MAX_N] ;
void update(int x , int ty) {
for (int i = 0 ; i <= MAX_M ; ++i)
if ((i & 1) == ty) f[x][i >> 1] = g[i] ;
}
int main() {
scanf... |
/*
修改了特征处理的过程,auc有所下降
# map 1: x -> [0, 100] -> [15, 100]
# map 2: x -> [0, 50] -> [7, 50]
# map 11:x -> [0, 50] -> [7, 50]
train auc:0.529165 test auc:0.528039
train auc:0.544145 test auc:0.542516
train auc:0.567513 test auc:0.565032
train auc:0.594086 test auc:0.59096
train auc:0.616... |
#include <iostream>
int main()
{
constexpr int SIZE = 5;
int arr[SIZE] = {0, 2, 4, 6, 8};
std::cout << "Array: ";
for (int i : arr)
std::cout << i << " ";
std::cout << std::endl;
std::cout << "puts all elements to 0: ";
for (int *p = arr; p < arr + SIZE; ++p)
*p = 0;
for (int i : arr)
std::cout << i << ... |
#ifndef ANALYZE_H
#define ANALYZE_H
#include "Robot.h"
#include "Planitis.h"
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;
#include <typeinfo>
class Analyze:public Robot{
public:
Analyze();//constuctor
virtual void PrintInfo() const;
virtual void PrintSymbol() c... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "ProceduralAnimationComponent.h"
#include "Components/CapsuleComponent.h"
#include "Components/SkeletalMeshComponent.h"
#include "GameFramework/Character.h"
#include "Components/StaticMeshComponent.h"
#include "DrawDebugHelpers.h... |
#include "LineSegSlingshot.h"
#include "Surface.h"
#include "Player.h"
#include "extern.h"
LineSegSlingshot::LineSegSlingshot(const Vertex2D& p1, const Vertex2D& p2, const float _zlow, const float _zhigh)
: LineSeg(p1, p2, _zlow, _zhigh)
{
m_slingshotanim.m_iframe = false;
m_slingshotanim.m_TimeReset = 0;
m_doHi... |
#pragma once
#include "../CoreTypes.h"
namespace Corgi
{
namespace Core
{
namespace Graphic
{
class FrameBuffer
{
public:
FrameBuffer(int32 width, int32 height);
virtual ~FrameBuffer();
void ClearColor();
... |
/*******************************************************
FILE: Matrix2.cpp
AUTHOR: Zach Sadler - zps6
DOES: Acts as a 4x4 matrix data structure
********************************************************/
#include <glut/glut.h>
class Matrix2 {
GLdouble values[16];
public:
GLdouble get_value(int i, int j) { return val... |
#pragma once
#include <vector>
#include <map>
#include <Eigen/Core>
namespace point
{
using Vector = Eigen::Vector2d;
class Point
{
public:
Point() {}
Point(const Point &p)
: pos{p.pos}, thick{p.thick} {}
Point(const Vector &p, const double &t)
: pos{p}, thick{t} {}
point::Vector operator()() con... |
using namespace System::Xml;
using namespace System::Collections;
using namespace System::Math;
#include "StdAfx.h"
#include "FirmwareDefinition.h"
FirmwareDefinition::FirmwareDefinition(void)
{
DataItems = gcnew array<FirmwareItem^>(MAX_DATA_ITEMS);
ConfigItems = gcnew array<FirmwareItem^>(MAX_CONFIG_ITEMS);
Regi... |
// Workshop 4
// Woodson Delhia
// BTP305
#include<iostream>
template <class K, class V, int N>
class KVList {
K product[N];
V price[N];
size_t counter; // Counter that tracks the index of last added item
public:
// Default Contructor
KVList(){
product[0] = "\0";
price[0] = 0.0;
... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... |
/*-
* BSD LICENSE
*
* Copyright (c) Intel Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyri... |
//
// Created by 王润基 on 2017/4/8.
//
#ifndef INC_2RAYTRACE_OBJECT2D_H
#define INC_2RAYTRACE_OBJECT2D_H
#include "../Shape.h"
class Shape2D: public Shape {
public:
virtual bool isOnSurface (Vector3f const& point) const = 0;
void intersect(IntersectInfo &info) const override;
};
#endif //INC_2RAYTRACE_OBJEC... |
#include "graphics.h"
#include <QPainter>
#include <QBrush>
#include "math.h"
#include <QPointF>
graphics::graphics(QWidget *parent) :
QWidget(parent)
{
position=0;
timerId=startTimer(100);
}
void graphics::paintEvent(QPaintEvent *){
QPainter painter(this);
QPoint p(300, 300);
// moon(painter, p... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <queue>
#include <sstream>
#include <cmath>
#include<unordered_set> // 需要c++ 11才能支持
using namespace std;
class MaxSum {
public:
int getMaxSum(vector<int> A, int n) {
// assert n>=0 // 要注意全是负数的数组样例
... |
#include <iostream>
#include "gwindow.h"
#include <cmath>
using namespace std;
/* @param SIDE_SIZE determines the size of the triangl`s size */
double SIDE_SIZE = 500;
/* @param NUMBER_OF_CYCLES determines the iteration of the recursion */
int NUMBER_OF_CYCLES = 1;
/* @param WINDOW_HEIGHT determines the height of the ... |
#include<iostream>
using namespace std;
int main() {
int a;
char b;
cin >> b;
a = b;
cout << b << "는" << a - 97 << "번째 영어 소문자" << endl;
//a은 0번째 문자이자 아스키 코드가 97이기 때문에 97빼면 숫자가 맞음
}
|
/*
Copyright (c) 2005-2023, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Chaste.
Redistribution and use in source and binary forms... |
#pragma once
#include <tudocomp/util.hpp>
#include <tudocomp/Coder.hpp>
namespace tdc {
class SLEIntCoder : public Algorithm {
public:
inline static Meta meta() {
Meta m(Coder::type_desc(), "sle",
"Static low entropy encoding, conforming [Dinklage, 2015]."
);
return m;
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.