text stringlengths 3.08k 12.5k |
|---|
#include "Character.h"
using namespace Gameplay;
Character::Character(Configuration& newConfig) : config(newConfig)
{
mapCharPtr = nullptr;
name = "Unnamed character";
max_hp = 100;
hp = max_hp;
atk = 6;
def = 3;
speed = 3;
speed_battle = 6;
level = 1;
current_exp = 0;
exp_cap = 20;
direction = d... |
#include<iostream>
#include<string>
using namespace std;
long long int p = 998244353;
long long int gcd(long long int a, long long int b){
while(b!=0){
long long int temp = a;
a = b;
b = temp%b;
}
return a;
}
long long int mod_exp(long long int x, long long int y){
if(x==1 ||... |
//Connected-component labeling
#include "core_headers.h"
ccl3d::ccl3d(Image& input3d) {
parent = new int[input3d.logical_x_dimension * input3d.logical_y_dimension * input3d.logical_z_dimension]( );
}
ccl3d::~ccl3d( ) {
delete[] parent;
}
int ccl3d::Max(int i, int j, int k) {
if ( i >= j && i >= k )
... |
#include "cmos.hpp"
TimeDriver* TimeDriver::time = 0;
TimeDriver::TimeDriver()
: cmos_address(0x70)
, cmos_data(0x71)
{
time = this;
}
void TimeDriver::SetTimezoneOffset(uint16_t t_offset) { timezone_offset = t_offset; }
static char format[10];
char* TimeDriver::GetFullTime(char seperator)
{
char *se... |
#include "httpresponse.h"
using namespace std;
const unordered_map<string, string> HttpResponse::SUFFIX_TYPE = {
{ ".html", "text/html" },
{ ".xml", "text/xml" },
{ ".xhtml", "application/xhtml+xml" },
{ ".txt", "text/plain" },
{ ".rtf", "application/rtf" },
{ ".pdf", "application/pdf... |
#include <cassert>
#include <chrono>
#include <functional>
#include <random>
#include <thread>
#include "../include/multimap_fib.hh"
#include "../include/relay.hh"
using namespace MediaNet;
Relay::Relay(uint16_t port)
: qServer()
, fib(std::make_unique<MultimapFib>())
{
qServer.open(port);
std::random_devic... |
//
// Created by brani on 27.12.20.
//
#include "../include/viewer_3D.h"
void Viewer3D::show() {
window_.setActive();
while(window_.isOpen()) {
sf::Event event{};
while (window_.pollEvent(event))
{
if (event.type == sf::Event::Closed)
{
// end t... |
#pragma once
#include <string_view>
#include <cassert>
#include <bitset>
#include <array>
#include <iomanip> // setw
#include <functional> // function
#include <optional>
#include <unordered_map>
#include "table.hpp"
#include "terminal.hpp"
#include "colorize.hpp"
enum class border_pos : size_t
{
top, bo... |
//Copyright 2012 <NAME>
//
//This file is part of CustomStepper.
//
//CustomStepper 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 version 3 of the License, or
//(at your option) any later version.
//
... |
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2008 Advanced Micro Devices
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use th... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
#include "HAL.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "lvgl/lvgl.h"
#include "Utils/GPX_Parser/GPX_Parser.h"
#include "Config/Config.h"
#define PI 3.1415926535897932384626433832795f
#define HALF_PI 1.5707963267948966192313216916398f
#define TWO_PI 6.28... |
/*
* Copyright 2020 <NAME>
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. ... |
/*
Adapted by BUK, from Adafruit GFX lib.
This library has been tailored to this project so this means some features have been removed or
modified for lower flash usage, reduced overhead, and to speed up drawing operations.
Changes made:
- Reimplemented drawHLine, drawVLine, drawRect, fillRect
- Rem... |
//=== HexagonSplitConst32AndConst64.cpp - split CONST32/Const64 into HI/LO ===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <fcntl.h>
#include <fuchsia/device/c/fidl.h>
#include <fuchsia/device/llcpp/fidl.h>
#include <lib/fdio/directory.h>
#include <lib/zx/channel.h>
#i... |
/*
* Copyright 2011-2015 <NAME>. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Just hacking DDS loading code in here.
#include "bgfx_p.h"
using namespace bgfx;
#include "image.h"
#if 0
# define BX_TRACE(_format, ..... |
#include "../util/config.h"
#include <gtest/gtest.h>
#include <rapidjson/document.h>
#include <cstdlib>
#include <fmt/format.h>
using atlas::util::Config;
using atlas::util::EndpointConfig;
using atlas::util::FeaturesConfig;
using atlas::util::HttpConfig;
using atlas::util::intern_str;
using atlas::util::LogConfig;
T... |
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <iostream>
#include <math.h>
#define ESCAPE 27 //Valor em ASCII do ESC
#define WIDTH 500
#define HEIGHT 500
using namespace std;
int window;
typedef st... |
//===- ConvertToLLVMDialect.cpp - conversion from Linalg to LLVM dialect --===//
//
// Copyright 2019 The MLIR Authors.
//
// 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.... |
#include <fstream>
#include <string>
#include <vector>
#include <stdexcept>
#include <cmath>
using namespace std;
typedef vector<int> VecInt;
const double EPS = 1e-8;
VecInt cards; //four cards
vector<VecInt> perm; //all permutation of cards
vector<VecInt> op_seq; //all possible operators sequences
//auxil... |
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstring>
using namespace std;
class Rational
{
private:
long num;
long den;
static long gcd(long x, long y)
{
long r;
while (y)
{
r = x % y;
x = y;
y = r;
}
return x;
}
public:
Rational();
Rational(long numerator, long denomin... |
// Copyright (c) 2010-2014, The Video Segmentation Project
// 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 copyright
// notice... |
/**
* @file llxfer_mem.cpp
* @brief implementation of LLXfer_Mem class for a single xfer
*
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the ter... |
/*
Copyright (c) 2009-2014, <NAME>
Copyright (c) 2011, The University of Texas at Austin
Copyright (c) 2014, <NAME>, University of Houston
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
h... |
//*****************************************************************************
// Copyright 2022 Intel Corporation
//
// 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.ap... |
#include "goliath.h"
#include "goliath/api/types.h"
#include "goliath/assembly/instruction.h"
#include "goliath/definition/generate.h"
#include "goliath/engine/engine.h"
#include "goliath/graph/control_flow.h"
#include "goliath/logger/logger.h"
#include "goliath/memory/loader.h"
#include <stdexcept>
#include <string>
... |
#include <task_handler.h>
taskHandler::taskHandler (double _timeout) {
topic_map_["heave"] = "/anahita/z_coordinate";
topic_map_["sway"] = "/anahita/y_coordinate";
topic_map_["surge"] = "/anahita/x_coordinate";
topic_map_["yaw"] = "/anahita/imu/yaw";
topic_map_["pitch"] = "/anahita/imu/pitch";
... |
// ----------------------------------------------------------------------
// Copyright (c) 2018, The Regents of the University of California 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 <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
/*
* Values of A_V : tabular form
* units sqrt(kg/gmol)cm3/gmol
*/
double A_V(double temp) {
double retn;
if (temp == 323.15) {
retn = 2.37356;
} else if (temp == 473.15) {
retn = 15.0766;
} ... |
#include <atomic>
#include <condition_variable>
#include <csignal>
#include <iostream>
#include <string>
#include <thread>
#include <vector>
#include "rtc_base/log_sinks.h"
#if USE_ROS
#include "ros/ros_log_sink.h"
#include "ros/ros_video_capture.h"
#include "signal_listener.h"
#else
#if USE_SCREEN_CAPTURER
#include... |
#include <pybind11/pybind11.h>
#include <pybind11/eigen.h>
#include <pybind11/stl.h>
#include <Eigen/Dense>
#include <vector>
#include <string>
#include <algorithm>
#include <cctype>
#include <sstream>
#include <iterator>
#include <iostream>
#include <fstream>
#include <set>
namespace py = pybind11;
// Text clean-... |
#include "algouttsyntaxhighlighter.h"
/**
* @brief AlgoUttSyntaxHighLighter::AlgoUttSyntaxHighLighter
* @param document
* @param dark
*/
AlgoUttSyntaxHighLighter::AlgoUttSyntaxHighLighter(QTextDocument *document, bool dark) : QSyntaxHighlighter(document)
{
this->dark = dark;
#ifdef Q_OS_WIN
QFile file(QAp... |
/*
The MIT License (MIT)
Copyright (c) [2016] [BTC.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, copy, modify, me... |
#include <cctype>
#include <gsl/gsl>
#include "infrastructure/tokenizer.h"
#include "infrastructure/exception.h"
bool Tokenizer::NextToken() {
// This skips comments / spaces after a token has been read
if (LineHasMoreChars()) {
SkipSpaceAndControl();
SkipComment();
}
// This loop finds the next line
// If... |
/* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
#include "CimbReader.h"
#include "CellDrift.h"
#include "Config.h"
#include "bit_file/bitmatrix.h"
#include "chromatic_adaptation/adaptation_transform.h"
#include "chromatic_adaptation/color_correction.h"
#inclu... |
// #include<iostream>
// #include<bits/stdc++.h>
// using namespace std;
// #define ll long long
// #define mp make_pair
// #define pb push_back
// const int mno = 10000003;
// bool isValid(ll arr[], ll n, ll k, ll ans){
// ll count =1; // count of painters
// ll sum=0;
// for(int i=0; i<n; i++){
// ... |
#include "Scene.h"
// <NAME>
// https://rorywebdev.com
// 2016
Scene::Scene(int _w, int _h)
{
// This matrix is responsible for the size, position and rotation of our model directly
m_modelMatrix = glm::mat4(1.0f);
// Set up the viewing matrix
// This is the matrix that views the object
m_viewMatrix = glm::tran... |
#include <cstdio>
#include <cstdlib>
#if defined(USE_OPENGL)
#include <GL/glut.h>
#endif
#if defined(USE_OPENMP)
#include "omp.h"
#endif
#include "Color.h"
#include "Ray.h"
#include "Surface.h"
#include "SurfaceList.h"
#include "Sphere.h"
#include "Plane.h"
#include "Intersection.h"
#include "Scene.h"
#incl... |
//
// Copyright 2018 <NAME> <mateusz at loskot dot net>
//
// 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
//
#include <boost/gil/point.hpp>
#include <boost/core/lightweight_test.hpp>
#include <type_traits>
names... |
// Copyright (c) 2003-2021 Xsens Technologies B.V. or subsidiaries worldwide.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the ... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... |
// Copyright (c) 2021 The WhiteBox Authors. All rights reserved.
// Use of this source code is governed by a 3-Clause BSD license that can be
// found in the LICENSE file.
//
// Character set for parsers.
#include "simple_token_parser.h"
//
#include <array>
#include <tuple>
//
#include "base/deps/googletest/gtest/gte... |
#include "glex/common/log.h"
#include "glex/Application.h"
#include "glex/graphics/Triangle.h"
#include "glex/graphics/Cube.h"
#include "glex/graphics/Mesh.h"
#include "glex/graphics/Image.h"
#include "glex/graphics/Text.h"
#include "glex/graphics/MeshLoader.h"
#include "glex/input/GamepadInputHandler.h"
#include <cst... |
// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2015 Oslo and Akershus University College of Applied Sciences
// and <NAME>
//
// 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 ... |
/*
SevenInstall
Copyright (c) 2013-2017 <NAME>
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or no... |
#include "pass_fplan.hpp"
#include <string> // for std::to_string
#include "hier_tree.hpp"
#include "i_resolve_header.hpp"
#include "profile_time.hpp"
//#include "thread_pool.hpp"
void setup_pass_fplan() { Pass_fplan::setup(); }
#define FULL
#ifdef REG
constexpr unsigned int def_min_tree_nodes = 1;
constexpr... |
#include <nrr/units/unitinfo.h>
std::map<std::string, std::shared_ptr<UnitInfo>, std::less<>> UnitCompendium::unitInfos_;
WadArchive *UnitFactory::archive_;
void UnitCompendium::add(ConfigParser &legoCfg, WadArchive &archive, std::string_view unitName, UnitType unitType) {
add(legoCfg, archive, unitName, unitType, ... |
/*
UNISTDX — C++ library for Linux system calls.
© 2018, 2019, 2020 <NAME>
This file is part of UNISTDX.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary... |
/**
Copyright 2019 JasmineGraph Team
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, software... |
/*
* Copyright (C) 2013 The Android Open Source Project
*
* 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 app... |
/*
* See header file for a description of this class.
*
* Author of original version: <NAME>
* \author <NAME>
*/
#include "DTVDriftWriter.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FW... |
#include "larva_model.h"
std::vector<circ> Larva_Model::calculateModel(std::vector<cv::Point> *contour, int dMin, int dMax, int mask_half){
//calculate curvatures for all contour points
std::vector<double> curvatures;
size_t contour_size = contour->size();
for (int i=0; i < (int) contour_size; i++)
... |
/**
* RobustMatcher.cpp
* Author: <NAME> <<EMAIL>>
*
*/
#include <opencv2/opencv.hpp>
#include <opencv2/calib3d/calib3d_c.h>
#include "RobustMatcher.h"
RobustMatcher::RobustMatcher() {
detector = cv::ORB::create();
extractor = cv::ORB::create();
matcher = cv::makePtr<cv::BFMatcher>((int) cv::NORM_HA... |
// Copyright (c) 2017-2018 Intel Corporation
//
// 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 ... |
#include <iostream>
#include <cmath>
#include <math.h>
#include <iostream>
#include <vector>
#include <array>
#include "heatEquation.hpp"
#include "TriDiagMatrix.hpp"
#include "MassMatrix.hpp"
#include "StiffnessMatrix.hpp"
#include <fstream>
#include <string>
#include <boost/math/quadrature/gauss.hpp>
usi... |
#include "buddy_memory_resource.h"
#include <cassert>
BuddyMemoryResource::BuddyMemoryResource(MemoryResource* memory_resource, size_t root_size_log2, size_t leaf_size_log2)
: m_memory_resource(memory_resource)
, m_leaf_size_log2(static_cast<uint32_t>(leaf_size_log2))
, m_max_depth(static_cast<uint32_t>(r... |
// Chemfiles, a modern library for chemistry file reading and writing
// Copyright (C) <NAME> and contributors -- BSD license
#include <cassert>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include "chemfiles/formats/Tinker.hpp"
#include "chemfiles/ErrorFmt.hpp"
#include "chemfiles/Frame.hpp"
#include "chemfil... |
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
... |
#include <bits/stdc++.h>
using namespace std;
struct Dsu {
using pi=pair<int, int>;
int n;
vector<int> p;
vector<int> r;
vector<pi> histo;
Dsu(int _n) : n(_n)
, p(n)
, r(n)
{
init();
}
inline void init() {
for (int i = 0; i < n; i++) {
p... |
/****************************************************************************
*
* Copyright (c) 2016-2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Red... |
/*
* Copyright 2008 <NAME>
* For license terms, see the file COPYING along with this library.
*/
#include <winsock2.h>
#include <windows.h>
#include <stdio.h>
#include <assert.h>
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#include "spwin32iocp.hpp"
#include "spiocpserver.hpp"
#include "spio... |
#include <fstream>
#include <iostream>
#include <vector>
#include <sstream>
#include <cstring>
#include <stdio.h>
#include <cstdlib>
#include <stdio.h>
#include <getopt.h>
#include "gru_sequential.h"
using namespace std;
void print_cuda_info();
void run_model_cuda(int num_data, int batch_size, int window_size, int v... |
// $Id: server.cpp 91825 2010-09-17 09:10:22Z johnnyw $
#include "Coordinator.h"
#include "Session_Control.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_unistd.h"
const ACE_TCHAR *ior_output_file = ACE_TEXT("test.ior");
CORBA::ULong peer_count = 4;
CORBA::ULong payload_size = 1024;
... |
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <chrono>
#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <set>
#include "board.h"
#include "position.h"
#include "color.h"
#include "move.h"
#include "engine.h"
const int kDepth = 4;
const auto kUtility = SmartUtili... |
#include<math.h>
#include<GL/glut.h>
#include<fstream>
#include<iostream>
#include"armList.cpp"
#include"torso.cpp"
#include"shoulder.cpp"
#include"faceList.cpp"
#include"hat.cpp"
#include"hip.cpp"
class Human
{
public:
upperArm armL,radioL,radioR,armR;
upperArm legL,legR,lowLegL,lowLegR;
Torso tor;
Shoulder s... |
// Copyright 2022 <NAME>
//
// 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 writi... |
/*
Copyright 2015 Google Inc. All rights reserved.
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 ... |
#include "MLP.h"
double activate(const int mode, const double in) {
switch(mode) {
case 0: {
if(in > 0) {
return in;
}
return 0;
}
default: {
cout << "Invalid activation mode!" << endl;
return NULL;
}
}
}
double activateDerivative(const int mode, const double in) {
switch(mode) {
case ... |
/*
* utitlity.h
*
* Created on: Mar 27, 2015
* Author: Tadeze
*/
#include "utility.hpp"
using namespace std;
//default_random_engine gen(time(NULL));
default_random_engine gen(0);
/*
int randomI(int min, int max) {
int num;
num = (int) (min + (rand() % (max - min)));
return num;
}
i... |
//
// Created by dylan on 27/11/2016.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
#include "../../include/GameMechanics/Trade.h"
#include "../../include/Exception/NoPropertyException.h"
#include "../../include/Exception/NoMoneyException.h"
using namespace Exception;
using namespac... |
//
// VboTriangleRenderer.cpp
// vboRendererDev
//
// Created by <NAME> on 2018/04/16.
//
//
#include "VboTriangleRenderer.hpp"
constexpr double ROOT_3 = 1.73205;
constexpr double ROOT_3_DIV_3 = 0.57735;
constexpr double ROOT_3_DIV_6 = 0.288675;
VboTriangleRenderer::VboTriangleRenderer() {
lineWidth = 1.0;
}
... |
#pragma once
/************************************************************************
* This file is part of the AREG SDK core engine.
* AREG SDK is dual-licensed under Free open source (Apache version 2.0
* License) and Commercial (with various pricing models) licenses, depending
* on the nature of the project (c... |
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "myriad_layers_tests.hpp"
#include <algorithm>
using std::tuple;
using std::get;
#define f32Tof16 PrecisionUtils::f32tof16
#define f16Tof32 PrecisionUtils::f16tof32
using namespace InferenceEngine;
struct reverse_sequen... |
#include <iostream>
#include <memory>
#include <stack>
#include <queue>
#include <vector>
#include "gtest/gtest.h"
template <typename T>
struct Node {
T value;
Node<T> *left;
Node<T> *right;
Node<T> *parent;
explicit Node(T val): value(val){
left = nullptr;
right = nullptr;
parent = nullptr;
... |
/* Copyright 2013-2016 QReal Research Group, <NAME>
*
* 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 applicabl... |
/*
Copyright (c) 2009-2016, <NAME>
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#include <El.hpp>
using namespace El;
template<typename F>
v... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with San... |
/*****************************************************************************/
/* Copyright (c) 2015, <NAME> */
/* All rights reserved. */
/* */
/* Re... |
#include "stdafx.h"
#pragma hdrstop
#include "xrRenderCommon/uber_deffer.h"
#include "Blender_deffer_model.h"
CBlender_deffer_model::CBlender_deffer_model() {
description.CLS = B_MODEL;
description.version = 2;
oTessellation.Count = 4;
oTessellation.IDselected = 0;
oAREF.value = 32;
oAREF.min ... |
/**************************************************************************
*
* Copyright (c) 2002 - 2011 by Computer Architecture Department,
* Universitat Politecnica de Catalunya.
* All rights reserved.
*
* The contents of this file may not be disclosed to third parties,
* copied or duplicated in any form, in... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... |
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace sf;
using namespace std;
const Keyboard::Key controls[4] = {
Keyboard::W, // Player1 UP
Keyboard::S, // Player1 Down
Keyboard::Up, // Player2 UP
Keyboard::Down // Player2 Down
};
const Vector2f paddleSize(25.f, 100.f);
const float b... |
//
// Created by joshua on 14.07.17.
//
#include <arpa/inet.h>
#include "Catflow.h"
#include <server/ApiServer.h>
// static
ApiProcessible* Catflow::apiRoot = nullptr;
ApiServer* Catflow::server = nullptr;
Log Catflow::l("Catflow");
set<Client *> Catflow::webSockConnections;
set<set<Client*>*> Catflow::linkedWebSoc... |
// Local
#include "visualise/ar_example.h"
// Eigen
#include <Eigen/Geometry>
// OpenCV
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
// Standard Library
#include <iomanip>
// Define a few BGR-colors for convenience.
namespace color
{
const cv::Scalar blue(255, 0, 0);
const cv::Scalar green(0, 255, ... |
#include "unit/separate_binary/catalyst_adaptor_test.h"
namespace bdm {
/// Tests if simulation_info.json is generated correctly during initialization.
TEST_F(CatalystAdaptorTest, GenerateSimulationInfoJson) {
auto* param = simulation_->GetParam();
// set-up Param values
param->export_visualization_ = true;
... |
/* Author: <NAME>
* Vision for Robotics Group, Automation and Control Institute (ACIN)
* TU Wien, Vienna */
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
namespace py = pybind11;
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/common/common.h>
#include... |
/*
* libEtPan! -- a mail stuff library
*
* Copyright (C) 2001, 2005 - <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above co... |
/*
* Select_samples.cpp
*
* Created on: Feb 27, 2018
* Author: sedlazec
*/
#include "Select_samples.h"
bool genotype_parse(char * buffer) {
//cout << "buffer: " << buffer[0] << buffer[1] << buffer[2] << endl;
if ((buffer[0] == '0' && buffer[2] == '1') || (buffer[0] == '1' && buffer[2] == '1')) {
retur... |
#include "SaveManager.h"
#include "Runtime.h"
#include <fstream>
#include <sstream>
SaveManager::SaveManager() {
saveLocation = "";
}
SaveManager::SaveManager(std::string s) {
saveLocation = s;
}
std::string SaveManager::SaveSlots() {
std::fstream file;
std::string line;
std::string output = "... |
/*
* Copyright (C) 2010 - 2012 ProjectSkyfire <http://www.projectskyfire.org/>
*
* Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/>
*
* 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 Found... |
#include "BigIntegerCalculator.h"
#include <cassert>
uint32_t BigIntegerCalculator::gcd(uint32_t left, uint32_t right) {
// Executes the classic Euclidean algorithm.
// https://en.wikipedia.org/wiki/Euclidean_algorithm
while (right != 0)
{
uint temp = left % right;
left = right;
... |
#include "FWCore/PluginManager/interface/PluginManager.h"
#include "FWCore/PluginManager/interface/standard.h"
#include "FWCore/PluginManager/interface/SharedLibrary.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
//
#include "CondCore/CondDB/inte... |
/****************************************************************************
* MeshLab o o *
* An extendible mesh processor o o *
* _ O _ *
* Co... |
// MIT License
//
// Copyright (c) 2018 <NAME>
//
// 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, copy, modify, merg... |
#include <iostream>
#include <fstream>
#include <map>
#include <string>
#include <stdlib.h>
#include "FASTAReader.h"
#include "FASTASequence.h"
#include <queue>
using namespace std;
void StoreBins(vector<int> &counts, int seqLength, int kmer, int binSize, vector<int> &bins) {
int L = seqLength - kmer + 1;
bins.resiz... |
#include "gtest/gtest.h"
#include "path_expressions-test.h"
#include "path_expressions.h"
using namespace std;
using namespace simit::pe;
#define CHECK_EQ(v1, v2) \
do { \
ASSERT_EQ(v1, v2); \
ASSERT_FALSE(v1 < v2 || v1 > v2); \
} while (false)
#defin... |
#include "App.h"
void App::help()
{
if (command.empty())
{
cout << "To find out how to use Airline Manager please use the following commands:\n\n";
cout << "help tutorial\n - Find out how the program works.\n";
cout << "help general\n - See general use commands.\n";
cout << "help airpor... |
// DEMO12_9.CPP - Fuzzy Lingustic Variable manifold demo
// note, I used a little C++ for fun, so you straight C guys pay
// attention
// INCLUDES ///////////////////////////////////////////////////////////////
#define WIN32_LEAN_AND_MEAN // make sure certain headers are included correctly
#include <window... |
/***************************************************************************
Copyright 2016 Ufora Inc.
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/licen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.