text stringlengths 3.08k 12.5k |
|---|
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iostream>
#include <map>
#include <random>
#include <string>
#include <sys/time.h>
#include <tuple>
#include <vector>
#include "sst/sst.h"
#include "sst/tcp.h"
#include "sst/verbs.h"
#include "statistics.h"
static const long long int SECONDS_TO_NS = 100... |
#include "ACO.h"
#include "Ant.h"
#include <vector>
#include <random>
#include <iostream>
#include <ctime>
using namespace std;
vector<vector<int>> ACO::matrix;
vector<vector<float>> ACO::pheromones;
vector<Ant*> ACO::ants;
vector<int> ACO::bestPath;
vector<int> ACO::tabu;
float ACO::alpha;
float ACO::betha;
int ACO::... |
#include <iostream>
#include <functional>
#include <deque>
#include <vector>
#include "tree_rotations.h"
BinarySearchTree::BinarySearchTree() : root{} { /* No Code */ }
void BinarySearchTree::insert(int element) {
// get a pointer to root so we can modify it
Node* current = root;
// if tree is empty then we wa... |
#include "async_server.h"
// Base class used to cast the void* tags we get from the completion queue and call Proceed() on them.
class Call {
public:
virtual void Proceed(bool ok) = 0;
};
class StartContainerCall final : public Call {
public:
explicit StartContainerCall(PLCoordinator::AsyncService* service, g... |
//main.cpp ---------------------------------------------------------------------------
/// @section LICENSE
///
/// Copyright (c) 2016 Georgia Tech Research Institute (GTRI)
/// All Rights Reserved
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substan... |
#include <complex>
#include <vector>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <string>
#include <fstream>
#include "../include/julia_polynomial_series.h"
using std::complex;
using std::vector;
using std::string;
using std::ofstream;
using std::endl;
using std::max;
#define M_PI 3.141592653589... |
/*************************************************************************
Universal Cheeky Mouse Driver
(c)<NAME> 1998, All rights reserved.
For use only in offical Mame releases.
Not to be distrabuted as part of any commerical work.
***************************************************************************
Func... |
#include "ofxXsens.h"
#include <xsensdeviceapi.h> // The Xsens device API header
#include "ofMain.h"
#include "ofxXsensCallbackHandler.h"
#include "serialkey.h"
void ofxXsens::setup()
{
bSensorConnected = false;
if (!setSerialKey())
{
ofLogError("ofxXsens") << "Invalid serial key." << std::endl;
return... |
#include "main.h"
#include "extendeddata.h"
#define HDR_LEN_SIZE (2)
#define HDR_TYPE_SIZE (1)
#define HDR_KEY_SIZE (32)
static bool findExtendedKeyData(const std::vector<unsigned char> vExtendData, const std::string strKey, eExtendDataType & type, std::vector<uint8_t>& value)
{
uint32_t u... |
#include "config.h"
#if HAVE_GLES
# define GLFW_INCLUDE_ES3 1
#endif
#if HAVE_EGL
# define GLFW_EXPOSE_NATIVE_EGL 1
#endif
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
#include <algorithm>
#include <array>
#include "image_decoder.h"
#include "image_merge.h"
#include "tonemapper.h"
#include "log.h"
#... |
#include <M5stickC.h>
#include <WiFi.h>
#include <WiFiUdp.h>
#include "imu/ImuReader.h"
#include "imu/AverageCalc.h"
#include "input/ButtonCheck.h"
#include "input/ButtonData.h"
#include "session/SessionData.h"
#include "prefs/Settings.h"
// wifi
#define SEND_DATA_NUM 4
#define SSID ""
#define PASSWORD ""
#define CLIE... |
#include "PathFinder.h"
#include "../Vertex.h"
#include "../TriangleO.h"
#include "Ray.h"
#include "Loc.h"
using namespace deway;
PathFinder::PathFinder(std::vector<TriangleO *> * _navMesh, std::vector<Vertex*> * _verts)
{
m_navMesh_ref = _navMesh;
m_verts_ref = _verts;
genNeigbours();
sortMesh();
}
Pa... |
/*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... |
#include "streamcontroller.h"
#include <cstring>
StreamController::StreamController(QObject *parent) : QObject(parent)
{
m_globalParams = new GlobalParameters();
}
StreamController* StreamController::m_thisInstance = NULL;
int StreamController::paCallback(const void* p_inputBuffer, void* p_outputBu... |
#include "checkersdisplay.hpp"
#include "board.hpp"
#include "move.hpp"
#include "movegen.hpp"
#include <string>
using std::string;
#include <SFML/Graphics.hpp>
CheckersDisplay::CheckersDisplay(int width, int height, string title)
:_window(sf::VideoMode(width, height), title)
{}
bool CheckersDisplay::isOpen() co... |
/***************************************************************************
* Software License Agreement (BSD License) *
* Copyright (C) 2012 by <NAME> <<EMAIL>> *
* *
* Redistribution and use in sourc... |
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.end()
#define pr(v) { for(int i=0;i<v.size();i++) { v[i]==I... |
#include <boost/filesystem.hpp>
#include <boost/range/iterator_range.hpp>
#include "ogr_source_datasets.h"
#include "configuration.h"
#include "ogr_source_util.h"
std::vector<std::string> OGRSourceDatasets::getDatasetNames(){
namespace bf = boost::filesystem;
bf::path path = Configuration::get<std::string>("o... |
//
// SVisual Project
// Copyright (C) 2018 by Contributors <https://github.com/Tyill/SVisual>
//
// This code is licensed under the MIT License.
//
// 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 S... |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2016 - ROLI Ltd.
Permission is granted to use this software under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license/
... |
#include "us_ffeatures.hpp"
#include "flite/hrg/hrg.hpp"
#include "flite/regex/regex.hpp"
#include "flite/synth/ffeatures.hpp"
#include "flite/synthcommon/phoneset.hpp"
static const cst_val* gpos(const cst_item* word);
DEF_STATIC_CONST_VAL_STRING(val_string_numeric, "numeric");
DEF_STATIC_CONST_VAL_STRING(val_string... |
#include "EventLogger.h"
static FILE* _file = NULL;
static std::string _init_timestamp = "";
namespace EventLogger {
// Utils
std::string currentISO8601TimeUTC() {
auto now = std::chrono::system_clock::now();
auto itt = std::chrono::system_clock::to_time_t(now);
std::ostringstream ss;... |
/** MIT License
Copyright (c) 2018 <NAME> and <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, merge, publ... |
// File: responseModeller.cpp
// Date: 7/10/2017
// Auth: <NAME>
// Desc: Model fitter class.
// Local headers
#include "responseModeller.h"
#include "filter.h"
#include "utilities.h"
// Standard C++ headers
#include <cassert>
void ResponseModeller::ComputeModelledResponse(const double& bandwidthFrequency,
cons... |
/*Sample 3. Prototype of object recignition.
*First thing which works somehow.
*To test you must place your hand (or other object to recognize) in the rectangle
*and press any key. To exit press any key once again.
*Short description of used algorithms:
*RGB->HSV, Histogramm building
*Histogramm back projection... |
/*
*
* Game Development Build
* https://github.com/TheBenPerson/Game
*
* Copyright (C) 2016-2018 <NAME> <<EMAIL>>
*
* 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 restrictio... |
#include <3ds.h>
#include <citro3d.h>
struct C2D_Glyph
{
u32 lineNo{0};
C3D_Tex *sheet{nullptr};
float xPos{0.f};
float width{0.f};
struct
{
float left, top, right, bottom;
} texcoord{0.f, 0.f, 0.f, 0.f};
};
#include "FontInternal.hpp"
using namespace CTRFontImpl;
static ... |
#pragma once
#include <Magnum/GL/Buffer.h>
#include <Magnum/GL/DefaultFramebuffer.h>
#include <Magnum/GL/Mesh.h>
#include <Magnum/GL/Renderer.h>
#include <Magnum/Math/Color.h>
#include <Magnum/Math/Matrix3.h>
#include <Magnum/Platform/GLContext.h>
#include <Magnum/Shaders/Flat.h>
#include <Magnum/Shaders/Vector.h>
#in... |
/***********************************************************************
created: 11th August 2013
author: <NAME>
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2013 <NAME> &... |
#pragma once
#include <array>
#include <vector>
#include "fitness.hpp"
#include "tclap/CmdLine.h"
class AdditiveLandscape final : public FitnessLandscape {
public:
// The fitness profiles of amino-acids.
std::vector<std::array<double, 20>> profiles;
explicit AdditiveLandscape(std::vector<std::array<dou... |
/*******************************************************************************
* Copyright 2010 Telecom Italia SpA
*
* 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://... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2018 Open Robotics
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... |
/*
This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2019-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <<EMAIL>>
Author: <NAME> <<EMAIL>>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
Contact KDAB at <<EMAIL>> for commercial licensing options.
*/
#include "SegmentedIndicators_... |
#include "vectornav/vectornav.h"
#include "ros/ros.h"
#include <stdio.h>
#include <iostream>
#include "geometry_msgs/Vector3Stamped.h"
const int SERIAL_BAUD_RATE = 115200;
const char* COM_PORT = "/dev/ttyUSB0";
using namespace std;
int main(int argc, char* argv[]){
///Variable Declerations
Vn200 vn200; //Handler ... |
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2018 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* ... |
/*
* Copyright (c) 2019, NVIDIA CORPORATION. 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 requi... |
/*
* FULLOCK - Fast User Level LOCK library
*
* Copyright 2015 Yahoo Japan Corporation.
*
* FULLOCK is fast locking library on user level by Yahoo! JAPAN.
* FULLOCK is following specifications.
*
* For the full copyright and license information, please view
* the license file that was distributed with this sou... |
#include "Test4.h"
#include "imgui/imgui.h"
#include "../VertexBufferLayout.h"
extern const unsigned int SCR_WIDTH;
extern const unsigned int SCR_HEIGHT;
namespace test
{
Test4::Test4()
: m_MixVal(0.2f),
m_Time(0.0f),
m_FOV(45.0f),
m_AspectRatio(static_cast<float>(SCR_WIDTH) / static_cast<float>(SCR_HEIG... |
#include<bits/stdc++.h>
// g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.e... |
// #define USE_SOFT_SPI
// #define SENDING
#define RECEIVING
#include <spi.h>
#include <uart.h>
#include <gpio.h>
#include <exti.h>
#include <pwr.h>
#include <rtc.h>
#include <io.h>
#include <utils.h>
#include <clocks.h>
#include <tasks.h>
#include <drivers/nrf24.h>
extern constexpr uint8_t rx_addr[5] = {
0x00, 0xf0... |
#include <climits>
#include <cstring>
#include <ctime>
#include <fstream>
#include <string>
#include <unordered_map>
#include "gtest/gtest.h"
#include "pyis/ops/text/cedar_trie.h"
#include "pyis/ops/tokenizer/gpt2_tokenizer.h"
TEST(TestCedarTrie, Basic) {
pyis::ops::CedarTrie trie;
trie.Insert("Alpha", 1);
... |
/**
* @file scd_test.cpp
* @author <NAME>
*
* Test file for SCD (stochastic coordinate descent).
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along with mlpack. If not, see
* ... |
#include "shader_textured.hpp"
#include <stdexcept>
#include <string>
#include "gl.hpp"
#include "maths.hpp"
namespace {
struct attrib
{
constexpr static auto position = 0;
constexpr static auto colour = 1;
constexpr static auto uv = 2;
};
const std::string vertex_src =
R"(#version 330
layout(location=... |
#include <cstdlib>
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
typedef map<char, vector<string> > AugmentedGrammar;
typedef map<string, int> GotoMap; // <aps productions to LR(0) item ids
// structy for representing an augmented... |
#include "global.h"
#include "USB.h"
#include "RageLog.h"
#include "RageUtil.h"
#pragma comment(lib, "archutils/Win32/ddk/setupapi.lib")
#pragma comment(lib, "archutils/Win32/ddk/hid.lib")
extern "C" {
#include "archutils/Win32/ddk/setupapi.h"
/* Quiet header warning: */
#include "archutils/Win32/ddk/hidsdi.h"
}
s... |
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
/* Created By
<NAME>
*/
//function prototype
void displayout();
int main() {
//variables declara... |
/**
* Automatic perspective correction for quadrilateral objects. See the tutorial at
* http://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/
*/
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <stdio.h>
using namespace... |
// This is my variant of AVX2 "generic" SIMD algorithm described in
// http://0x80.pl/articles/simd-strfind.html . Read two 32B lines at once and
// then or them together into a 8B bitmask, which speeds up the algorithm due to
// the SIMDs very low throughput. We also read the first 32B into a mask and
// check that ag... |
#include "stdafx.h"
#include "World.h"
#include "ActorSet.h"
#include "PropertyBag.h"
#include "ComponentHealth.h"
#include "ComponentPhysics.h"
#include "ComponentMonsterSpawn.h"
ComponentMonsterSpawn::
ComponentMonsterSpawn(UID uid, ScopedEventHandler *parentScope)
: Component(uid, parentScope) {
resetMembers();
... |
//
// Created by <NAME> on 6/23/17.
//
#include "volTermStructureParser.h"
volTermStructureParser::volTermStructureParser(std::vector<std::string> *errorLog, std::string message)
:QuantraParser(message, errorLog){
this->message = message;
this->errorLog = errorLog;
}
void volTermStructureParser::setDate(co... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2020, PickNik LLC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditi... |
/* -------------------------------------------------------------------------- *
* OpenSim: CommonUtilities.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
... |
/******************************************************************************
** Copyright (C) 1997 by CEA
*******************************************************************************
**
** UNIT
**
** Version: 1.0
**
** Author: <NAME> && <NAME> and <NAME>
**
** Date: 23.01.98
**
** ... |
#include <pthread.h>
//#include <cstdio>
//#include <cstdlib>
//#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define NUM_THREADS 3
#define COUNT 100
//typedef std::queue<int> IntQ;
// elements are "push"ed into the back,
// and "pop"ped from the front
//IntQ SendQ;
typedef enum {FALS... |
/******************************************************************************
** Copyright (C) 1995 by CEA
*******************************************************************************
**
** UNIT
**
** Version: 1.3
**
** Author: <NAME>
**
** Date: 00/08/11
**
** File: mr_abaqu... |
/*---------------------------------------------------------------------------------*/
/* NOMAD - Nonlinear Optimization by Mesh Adaptive Direct Search - */
/* */
/* NOMAD - Version 4 has been created by ... |
// Copyright (c) 2010 The Chromium 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 "chrome/browser/autofill/credit_card_field.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
#include "base/utf_string_conversions.... |
/*
<NAME>
IIIT Bangalore
*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include... |
#include <iostream>
#include <map>
#include <sstream>
#include <stdlib.h>
void clear();
std::string ctos(char c);
bool in(std::string x, std::string y[]);
bool validate(char in);
//-----------------------------------------------------------------------
//Requirement #26: Demonstrate "something awesome." I rewrote the ... |
/*
* ONL Notice
*
* Copyright (c) 2009-2013 <NAME>, <NAME>, <NAME>, <NAME>
* and Washington University in St. Louis
*
* 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 <iostream>
#include <fstream>
#include <vector>
#include <string>
using namespace std;
/*
n - ilosc zadan
r - termin dostepnosci
p - czas obslugi
*/
// Klasa modelujaca obiekt zadania, przechowuje informacje o czasie przybycia i wykonania zadania. Nie zawiera metod, wylacznie konstruktory.
class Zadanie {
... |
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "ISF_FastCaloSimEvent/TFCS1DFunction.h"
#include "TH1.h"
#include "TCanvas.h"
#include "TRandom.h"
#include <string>
#include <iostream>
//=============================================
//======= TFCS1DFunction =========
//======... |
//
// Copyright (c) 2016 - 2017 Mesh Consultants Inc.
// 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, mod... |
#include "setup.h"
String identityCookie;
String ipAddress;
std::string message;
int transfer_progress = 0;
bool is_setting_time = false;
bool has_set_hours = false;
bool has_set_minutes = false;
int set_hours = 0;
int set_minutes = 0;
AudioGeneratorMP3 *mp3;
AudioFileSourceICYStream *file;
AudioFileSourceBuffer... |
#include "tensor_runtime.h"
#include "tensorUtils.h"
#ifndef MODEL_PARAMS_DIR
#error MODEL_PARAMS_DIR is not defined
#endif
#define STR_VALUE(X) #X
#define STRINGIFY(X) STR_VALUE(X)
#define MODEL_PARAMS_DIR_STR STRINGIFY(MODEL_PARAMS_DIR)
int main() {
llvm_hpvm_initTensorRt(0);
std::string dir_prefix = std::st... |
#include <chrono>
#include <cstdint>
#include <thread>
#include <vector>
#include "../MPMCQueue.h"
#include "MutexQueue.h"
// this is a horrible mess :(
template <template <typename, size_t> class Queue, typename Value, size_t cache_line_size>
std::chrono::milliseconds::rep test( const size_t num_threads, char* memo... |
/*
PhoneCodeOscillatorCommon.cpp - Library of common functions for use in the
board specific firmware versions. Repetition sucks.
<NAME> 26 December, 2015.
MIT license.
*/
#include "Arduino.h"
#include "phoneCodeOscillatorCommon.h"
PCOCommon::PCOCommon(int ditPin, int dahPin, int speakerPin)
{
_speedPin = dit... |
/**
@file UpdateVersionBuild.cpp
(c)2012 Palestar Inc
@author <NAME> @date 9/27/2012 8:00:28 PM
*/
#include "Standard/Settings.h"
#include "Debug/Log.h"
#include <windows.h>
#include <string>
//---------------------------------------------------------------------------------------------------
int RunCommand( co... |
#include "tabMenu.hpp"
#include <imgui.h>
#include "imtools.hpp"
TabMenu::TabMenu(int barWidth, int length, bool collapsible)
: mBarWidth(barWidth), mLength(length) { }
Vec2f TabMenu::getSize() const
{
ImGuiStyle &style = ImGui::GetStyle();
float width = mBarWidth + (mSelected >= 0 ? (mTabs[mSelected].width ... |
/**
* Copyright (c) 2008, 2009, 2010 Regents of the University of California
*
* ADModelbuilder and associated libraries and documentations are
* provided under the general terms of the "BSD" license.
*
* License:
*
* Redistribution and use in source and binary forms, with or without
* modification, are per... |
/*
dparallel_recursion: distributed parallel_recursion skeleton
Copyright (C) 2015-2016 <NAME>, <NAME>. Universidade da Coruna
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.apa... |
/*
* FSlider.cpp
* Fly Swatter
*
* Created by <NAME> on 12/31/09.
* Copyright 2009 Raptisoft LLC. All rights reserved.
*
*/
#include "FSlider.hpp"
#include "os_core_graphics.h"
#include "core_includes.h"
FSlider::FSlider() {
mMin = 0.0f;
mMax = 1.0f;
mThumbX = 0.0f;
mThumbY = 0.0f;
mThu... |
/*
* Copyright (c) 2018, <NAME>
* Copyright (c) 2018, Xilinx
* 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 copyright not... |
#include <AnnJsonLevel.hpp>
#include <json.hpp>
#include <fstream>
#include "Annwvyn.h"
//Chaiscript also exposes a json class took from "simple json".
//But the interface of "JSON for modern C++" is nicer to use
using json_t = nlohmann::json;
namespace Annwvyn
{
//Our little pimpl
struct AnnJsonLevel::AnnJson
{... |
#include <iostream>
#include <fstream>
#include <string>
#include <array>
#include <cstdint>
#include <stack>
// create cell array and pointer and initialize them to zero
std::array<uint8_t, 30000> cells = {};
unsigned int pointer = 0;
// keeps track of the farthest out cell thats been visited, used to pri... |
/*
* mexNcsController.cc
*
* created on: 25.11.2016
* author: M.Khaled
*/
#include <iostream>
#include <vector>
#include <math.h>
#include <cstring>
#include "mex.h"
#include "ncsController.hh"
using namespace std;
vector<Cudd*> pCuddManager;
vector<ncsController*> pContr;
void mexFunction( int nlhs,... |
#include "Player.h"
Player::Player(int x, int y,CarObject *car,int index,Controls controller,FontManager &fmanager){
_car = car;
_index = index;
_controller = controller;
_car->setPosition(x,y);
_font = fmanager.get(Fonts::FONT);
initHealthBar();
_health.setFont(_font);
_healt... |
/*
* Copyright 2015-2019 Autoware Foundation. 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 requi... |
/**************************************************************
*
* 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 y... |
#include "mog/base/Circle.h"
#include "mog/core/Engine.h"
#include "mog/core/Device.h"
#include <math.h>
using namespace mog;
shared_ptr<Circle> Circle::create(float radius) {
auto circle = shared_ptr<Circle>(new Circle());
circle->init(radius);
return circle;
}
Circle::Circle() {
}
void Circle::init(fl... |
#include "gps.h"
using namespace std;
bool circle_intersection_with_stretch(Node A, Node B, Node S, double r)
{
double closer_point_dist = min((A.x - S.x)*(A.x - S.x) + (A.y - S.y)*(A.y - S.y),
(B.x - S.x)*(B.x - S.x) + (B.y - S.y)*(B.y - S.y)); // odleglosc blizszego z punktow... |
#include <boost/algorithm/string/predicate.hpp>
#include <cmath>
#include "datastore_access.hpp"
#include "libyang_utils.hpp"
#include "utils.hpp"
leaf_data_ leafValueFromNode(libyang::S_Data_Node_Leaf_List node)
{
std::function<leaf_data_(libyang::S_Data_Node_Leaf_List)> impl = [&impl](libyang::S_Data_Node_Leaf_L... |
////////////////////////////////////////////////////////////////////////////////
// Implementation of TextureCompiler
// Copyright <NAME> in 2005-2008
////////////////////////////////////////////////////////////////////////////////
#include "TextureCompiler.h"
#include "BGString.h"
#include "FileCache.h"
#include <as... |
/* -*-mode:c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <unordered_map>
#include <functional>
#include <cstdlib>
#include "thunk/ggutils.hh"
#include "util/exception.hh"
#include "util/inotify.... |
/*
* Copyright (c) 2011-2013 BlackBerry Limited.
*
* 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 <math.h>
#include "transition.h"
using namespace std;
vector<transitionType> beginningTransitions;
vector<transitionType> transitions[N_VOCA][MAX_PHONES][N_STATE];
// 해당 phone에서 state로 시작할 확률
double getBeginningProb(int phoneIndex, int state) {
return phones[phoneIndex].tp[0][state + 1];
}
... |
#include "Model.hpp"
#include "Backend/ModelShader.hpp"
#define IDX(x) (size_t)static_cast<uint8_t>(x)
namespace LuaSTG::Core
{
bool ModelSharedComponent::createShader()
{
HRESULT hr = S_OK;
// built-in: compile shader
Microsoft::WRL::ComPtr<ID3DBlob> vs;
Micro... |
#include "../testenv.hh"
#include <mod/mod.stdio.hh>
#include <mod/mod.sys.hh>
#include <mod/mod.fs.ext.hh>
using namespace std;
using namespace testenv;
void test_copy_function(duktape::engine& js)
{
test_comment("test_copy_function");
test_makefiletree();
test_expect( js.eval<bool>("fs.chdir(t... |
// SMsg_ConnStatus.cpp -*- C++ -*-
// $Id: SMsg_ConnStatus.cpp,v 1.2 1998-02-03 23:34:20-08 jason Exp $
// Copyright 1996-1997 Lyra LLC, All rights reserved.
//
// message implementation
#ifdef __GNUC__
#pragma implementation "SMsg_ConnStatus.h"
#endif
#ifdef WIN32
#define STRICT
#include "unix.h"
#include <winsock.... |
/*
* TdZdd: a Top-down/Breadth-first Decision Diagram Manipulation Framework
* by <NAME> <<EMAIL>>
* Copyright (c) 2014 ERATO MINATO Project
*
* 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 So... |
#include <QApplication>
#include <QMessageBox>
#include <QDir>
#include <QDateTime>
#include "QImageWidget.h"
#include "GLModelViewer.h"
#include "QKinectFile.h"
#include "KinectPlayerWidget.h"
#include "QKinectGrabberFromFile.h"
#include "QKinectIO.h"
#include "QKinectGpu.h"
#include "KinectSpecs.h"
#include <iostrea... |
// Copyright 2020 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <err.h>
#include <sys/types.h>
#include <sys/stat.h>
static int g_opt_parse_byte = 1;
static int g_opt_addr_label = 1;
static int g_opt_char_extra = 0;
static void show_usage() {
printf(
"myhexer [-optio... |
#include <fstream>
#include "google/protobuf/io/coded_stream.h"
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/util/delimited_message_util.h>
#include "common-index-format.pb.h"
#include "CLI/CLI.hpp"
#include "gsl/span"
using namespac... |
#include "RollingCodeHandler.h"
byte rawSignal[AG_RADIO_MAX_PAYLOAD_SIZE];
RollingCodeHandler::RollingCodeHandler(StateManager &stateManager, Radio &radio) {
this->stateManager = &stateManager;
this->clients = new SimpleMap<String, ClientState>([](String &a, String &b) -> int {
if (a == b) return 0;
... |
// Copyright (c) 2012-2019 <NAME>
// MIT license (see License.txt)
#include "p4t_update.h"
#include "app_update.h"
#include "bb_string.h"
#include "common.h"
#include "crt_leak_check.h"
#include "fonts.h"
#include "imgui_core.h"
#include "imgui_utils.h"
#include "message_box.h"
#include "p4.h"
#include "tasks.h"
#incl... |
#include "snake.hpp"
////////////////////////////////////////////////////////////////////////////
int constrain(const int & x, const int & a, const int & b) {
if(x < a) {
return a;
}
else if(b < x) {
return b;
}
else
return x;
}
int power(const int & base, const int pow){... |
#include <catboost/libs/model/model.h>
#include <catboost/libs/train_lib/train_model.h>
#include <library/unittest/registar.h>
#include <util/folder/tempdir.h>
#include <util/generic/array_ref.h>
#include <util/random/fast.h>
#include <limits>
template <typename Prng>
static void FillWithRandom(TArrayRef<TVector<fl... |
#include "gl_render.h"
#include "stb_image.h"
#include <learnopengl/filesystem.h>
GLRender::GLRender() {
m_window = nullptr;
m_width_win = 1280;
m_height_win = 720;
// m_width_win = 900;
// m_height_win = 1200;
m_lastX = m_width_win / 2.0;
m_lastY = m_height_win / 2.0;
m... |
/******************************************************************************
* @author <NAME>
* @copyright Copyright (c) 2020 <NAME>
* @file calibration.cpp
* @brief Calibration of the ventilator
*****************************************************************************/
#pragma once
#include "../includes/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.