text stringlengths 3.08k 22k |
|---|
#include "Player.h"
#include "TextureCache.h"
#include "FPSRegulator.h"
#include "InputManager.h"
#include "Base.h"
#include "Game.h"
#include "Level.h"
#include "Tile.h"
#include "RoguelikeMath.h"
#include "ErrorHandler.h"
#include <SDL2/SDL.h>
#include <vector>
#include <fstream>
Player::Player() :... |
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* 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 ... |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/***********************************************************************************
**
** Connection.h
**
** Copyright (C) August 2016 Hotride
**
************... |
/* -------------------------------------------------------------------------- *
* Simbody(tm) Example: MotorWithSpeedControl *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
// Copyright 2008 Google 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/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
//
// Created by IgVelasco on 5/17/19.
//
#include "WolverineServer.h"
#include "../Projectiles/ProjectileWolverineServer.h"
const int LEVEL_WIDTH = 3200;
const int LEVEL_HEIGHT = 600;
const int LAST_STANDING_SPRITE = 16;
const int LAST_WALKING_SPRITE = 15;
const int LAST_JUMPING_SPRITE = 20;
const int LAST_JUMPING... |
/**
* @file simulator_node.cpp
* @author <NAME>
* @author <NAME>
* @date 25/03/2014
*
* @attention Copyright (C) 2014 UnBall Robot Soccer Team
*
* @brief Implements a simulator node with communication for controlling the robots velocities and publish their poses
* in the vision topic, emulating the real u... |
#include <dirent.h>
#include <unistd.h>
#include <string>
#include <vector>
#include <unordered_map>
#include "linux_parser.h"
#include <iomanip>
#include <iostream>
using std::stof;
using std::string;
using std::to_string;
using std::vector;
// DONE: An example of how to read data from the filesystem
string LinuxPars... |
#include "SceneGame.h"
#include "ModuleCamera3D.h"
#include "ModuleScene.h"
#include "ModulePhysics3D.h"
#include "Vehicle.h"
#include "TaxiClient.h"
#include "ModuleMap.h"
#include "Arrow.h"
#include "Booster.h"
#include "Radios.h"
#include "External/SDL/include/SDL_opengl.h"
#include "Follower.h"
float tiempo = 8.0f... |
/*****************************************************************************************
* *
* OpenSpace *
* ... |
// HeadThread.cpp: implementation of the HeadThread class.
//
//////////////////////////////////////////////////////////////////////
//#include <>
#include "HeadThread.h"
#include <iostream>
#include <iomanip>
const int __inPortDelay = 5;
const int __outPortDelay = 100; // 4 seconds
///////////////////////////////... |
#include <iostream>
#include <vector>
#include <map>
#include <climits>
#include <pthread.h>
#include <cstdio>
#include <stdint.h> // <cstdint>
#include <fstream>
#include <cmath>
using namespace std;
#define SLABCLASSNUM (63 + 1)
static map<uint32_t, uint32_t> counter_mapping_set[SLABCLASSNUM];
static pthread_mutex_... |
/**
* ----------------------------------------------------------------------------
* File : drvApci1710.cpp
* Author : <NAME>, <EMAIL>
* Created : 2016-03-30
* Last update: 2016-05-06
* ----------------------------------------------------------------------------
* Description:
* Driver for ADDI-DAT... |
//
// 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, this list of conditions and the following disclaimer.
// * Redistributions in bin... |
/* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... |
#include "modbus_wrapper.h"
#include "log.h"
#include <map>
using namespace std;
TModbusServer::TModbusServer(PModbusBackend backend)
: mb(backend)
{
// fill _CmdRangeMap for quick and pretty access in parser
_CmdRangeMap[READ_COIL_STATUS] = &_co;
_CmdRangeMap[READ_DISCRETE_INPUTS] ... |
/*++
Copyright (C) 2020 Autodesk Inc.
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, this list of conditions and the follow... |
/*
Copyright (c) 2010-2012, <NAME> - All rights reserved.
This code is intended for use with the Cinder C++ library: http://libcinder.org
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
* Redistributions of sour... |
#include <cmath>
#include <algorithm>
#include "contest.hpp"
#include "helper.hpp"
#include "problem.hpp"
#include "attempt.hpp"
#include "user.hpp"
using namespace std;
static bool isjudge(int user, const JSON& contest) {
JSON tmp = contest("judges");
if (!tmp.isarr()) return false;
auto& a = tmp.arr();
au... |
#include "VulkanImage.hpp"
#include <stdexcept>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "VulkanMemory.hpp"
#include "VulkanCommandBuffer.hpp"
#include "VulkanPhysicalDevice.hpp"
VkDeviceSize
loadTextureInBuffer(VkPhysicalDevice physical_device,
VkDevice device,
... |
#include "BVHDeformable.h"
#include "BVSphere.h"
#include "BoundingVolumeFactory.h"
#include <simulation/collision_detection/narrow/Collider.h>
#include <simulation/collision_detection/narrow/CollisionObject.h>
#include <scene/data/geometric/AbstractPolygon.h>
#include <limits>
BVHDeformable::BVHDeformable(
... |
//
// Copyright (c) 2016 - 2018
// Stony Brook University
// Copyright (c) 2015 - 2018
// Los Alamos National Security, LLC.
// Copyright (c) 2011 - 2015
// University of Houston System and UT-Battelle, LLC.
// Copyright (c) 2009 - 2015
// Silicon Graphics International Corp. SHMEM is copyrighted
// by Silicon... |
////////////////////////////////////////////////////////////////////////
// This file is part of Grappa, a system for scaling irregular
// applications on commodity clusters.
// Copyright (C) 2010-2014 University of Washington and Battelle
// Memorial Institute. University of Washington authorizes use of this
// Grap... |
#include "App.h"
#include "Input.h"
#include "SceneManager.h"
#include "EntityManager.h"
#include "QuestManager.h"
#include "Defs.h"
#include "Log.h"
QuestManager::QuestManager(){
}
bool QuestManager::CleanUp()
{
questList.Clear();
activeQuestList.Clear();
completeQuestList.Clear();
return true;
}
bool Quest... |
// Copyright (c) 2013-2015 <NAME>
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
#include <SFML/Network.hpp>
#include <SSVUtils/Core/Core.hpp>
#include <SSVUtils/Encryption/Encryption.hpp>
#include <SSVUtils/Json/Json.hpp>
using namespace std;
using namesp... |
#include "euler1d.hpp"
void openFile( t_output &output ){
if( output.filename == "stdout" )
output.file = stdout;
else {
output.file = fopen( output.filename.c_str(), "w" );
if( !output.file ){
OUT << "! Error: Unable to open file " << output.filename << " for writing." << LF;
... |
/*
The MIT License (MIT)
Copyright (c) [2018] [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... |
/**************************************************************************\
* Copyright (c) <NAME> & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistribu... |
#include "CPatternController.h"
#include "core/math/random/random_vector.h"
#include "core/math/random/Random.h"
#include "IPatternGeneration.h"
#include "after/terrain/generation/regions/CRegionGenerator.h"
#include "after/terrain/generation/CWorldGen_Terran.h"
#include "after/terrain/VoxelTerrain.h"
#include "aft... |
/*=============================================================================
Copyright (c) 2001-2011 <NAME>
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 <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <cmath>
using namespace std;
struct Point
{
int x;
int y;
}ref;
vector<Point> points;
int is_left_special(Point p0, Point p1, Point p2)
{
long int cross_product = (p1.x - p0.x)*(p2.y - p0.y) - (p2.x ... |
/*
Copyright (c) 2016 <NAME>
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 this software for any purpose,
including commercial applications, and to al... |
/* Matrix3.cpp */
#include "Matrix3.h"
#include <stdexcept>
//Costruttore di default
Matrix3::Matrix3(): SquareMatrix(3) {}
//Costruttore a 1 param
// crea una matrice quadrata con dim 3x3
// imposta tutti gli elem a init
Matrix3::Matrix3(double init): SquareMatrix(3, init) {}
Matrix3* Matrix3::clone() const {
ret... |
#pragma once
#include <SFML/Graphics.hpp>
#include "Game.h"
#define BOARD_WEIGHT 10
#define BOARD_HEIGHT 25
int menu(sf::RenderWindow &window) {
bool choice = false;
int choiceNumber = 0;
sf::Font font;
font.loadFromFile("AllAgesDEMO.ttf");
sf::Text menuText("Menu", font, 50);
menuText.setPos... |
#include <iostream>
#include "..\includes\stdafx.h"
#include <d3d9.h>
#include <shellapi.h>
#include "dllmain.h"
#include "Settings.h"
#include "ConsoleWnd.h"
#include "LAApatch.h"
#include "..\external\imgui\imgui.h"
#include "..\external\imgui\imgui_impl_win32.h"
#include "..\external\imgui\imgui_impl_dx9.h"
#include... |
// Metronome class implementation /////////////////////////////////////////////////////////////
#include "Metronome.h"
using namespace std;
Metronome::Metronome()
{
setBPM(120.0);
nBeats = 4;
highNoteFreq = 660;
lowNoteFreq = 450;
highNoteVolume = 0.8f;
lowNoteVolume = 0.5f;
highNoteLength = 1200;
lowNoteLen... |
// #define NDEBUG
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cctype>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
#ifndef NDEBUG
#define TRACE printf("At #%d (%s) traced.\n", __LINE__, __PRETTY_FUNCTION__);
#define DEBUG(message, ...) printf(m... |
// @file output.h
// @brief Output functions.
// @author <NAME>
// @date 2017-09-11 14:42:14
// Copyright 2017 <NAME>
#include <assert.h>
#include <wchar.h>
#include <sat/v1.0.2/data.h>
#include <sat/v1.0.2/sat.h>
#include <sat/v1.0.2/util.h>
#include <tle/v2.1.0/tle.h>
#include <string>
#include "./common.h... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004-2021 musikcube 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:
//
// * Redist... |
// DynamDOM.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <msxml6.h>
#pragma warning(disable : 4127) // conditional expression is constant
// Macro that calls a COM method returning HRESULT value.
#define CHK_HR(stmt) do { hr=(stmt); if (FAILED(hr)) goto Clean... |
/* ------------------------------------------------------------------
Copyright (c) 2017 <NAME>
email: <EMAIL>
This code is distributed under the MIT License.
Please see <root-path>/LICENSE for details.
-------------------------------------------------------------- */
#include "pathProblem.h"
#i... |
/*
* Monte Carlo Tree Search -- Upper Confidence Bound applied to Trees (UCT)
* -- Heavy rollouts
* --
* --
*
*
*/
#include <cassert>
#include <climits>
#include <cmath>
#include <iostream>
#include <libataxx/move.hpp>
#include <libataxx/position.hpp>
#include <limits>
#include <vector>
#include "other.hpp"
#in... |
#include "tileController.hpp"
#include "ResourcePath.hpp"
#include "drawPixels.hpp"
#include "initMapVectors.hpp"
#include "mappingFunctions.hpp"
#include "resourceHandler.hpp"
#include "turret.hpp"
#include <cstring>
#include <random>
// This code could be much cleaner, but it works...
// The class is called tile con... |
#include "screenshooter.h"
#include <QProcess>
ScreenShooter::ScreenShooter(QObject *parent) : QObject(parent)
{
m_pTimer = 0;
m_w2shoot = 0;
m_iScreenshot = 0;
static QString sDir = qApp->applicationDirPath()+QDir::separator()+"gifmovie";
{
QDir appDir(qApp->applicationDirPath());
... |
//
// main.cpp
// Unit Testing for eFLIP
//
// Created by <NAME> on 5/5/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
#include <iostream>
#include <string.h>
#include <bitset>
#include "eflip.h"
void test_metaheader(void);
void test_metafields(void);
void test_buildandparse(void);
void test_gtpsockets(v... |
/**
* Copyright (c) 2014 <NAME> <https://github.com/reklatsmasters>
*
* MIT License <https://github.com/reklatsmasters/node-process-list/blob/master/LICENSE>
*/
#include "tasklist.h" // NOLINT(build/include)
#define _WIN32_DCOM
#include <windows.h>
#include <comdef.h>
#include <Wbemidl.h>
#include "OAIdl.h"
#in... |
//Includes
//#include <chrono>
#include "lstm_peephole.c"
//Declarations
const valarray<size_t> oktypes = {1u,2u};
const size_t I = 4u, O = 1u;
size_t dim, N, T;
//Description
string descr;
descr += "Neural soma stage.\n";
descr += "Does peephole LSTM (long short-term memory) model for driving \n";
descr += "inputs X... |
#include<bits/stdc++.h>
using namespace std::chrono;
using namespace std;
#define fastio ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define boolalpha std::cout << std::boolalpha;
#pragma GCC optimize("Ofast")
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef map<int,int> maa... |
#include <rct_optimizations/dh_chain_kinematic_calibration.h>
#include <rct_optimizations/local_parameterization.h>
#include <rct_optimizations_tests/dh_chain_observation_creator.h>
#include <rct_optimizations_tests/utilities.h>
#include <rct_optimizations_tests/observation_creator.h>
#include <boost/accumulators/accu... |
//
// AppleGCR.cpp
// Clock Signal
//
// Created by <NAME> on 21/04/2018.
// Copyright 2018 <NAME>. All rights reserved.
//
#include "Encoder.hpp"
namespace {
const uint8_t five_and_three_mapping[] = {
0xab, 0xad, 0xae, 0xaf, 0xb5, 0xb6, 0xb7, 0xba,
0xbb, 0xbd, 0xbe, 0xbf, 0xd6, 0xd7, 0xda, 0xdb,
0xdd, 0xde, ... |
/* Binary string diff utility
* The input to this utility is a formatted text file written in this fashion:
* [Category A]
* 0000111101101001010010100110111000110110
* 0000111101000101001011010110111010110100
* 0000111111010100100010010110111010110010
* 0000111111101001000110000110111000111011
* [Cat... |
// Copyright 2008 by BBN Technologies Corp.
// All Rights Reserved.
#include "Generic/common/leak_detection.h"
#include "English/parse/en_WordFeatures.h"
#ifdef _WIN32
#define swprintf _snwprintf
#endif
using namespace std;
const unsigned EnglishWordFeatures::numDerivationalFeatures =
WORD_... |
#include <iostream>
#include <fstream>
#include <cassert>
#include <algorithm>
#include "pangenome/pannode.h"
#include "pangenome/pansample.h"
#include "pangenome/panread.h"
#include "minihit.h"
#include "utils.h"
#include "localPRG.h"
#define assert_msg(x) !(std::cerr << "Assertion failed: " << x << std::endl)
usin... |
#include <cmath>
#include <iterator>
namespace detail {
template <class T, class U>
constexpr bool is_nothrow_equatable_v = noexcept(std::declval<T>() !=
std::declval<T>());
template <class T, class U>
constexpr bool is_nothrow_addable_v = noexcept(std::declval<T>() +... |
#include "server.hpp"
#include "adprp.hpp"
#include "pir.hpp"
#include <iostream>
// #include <mach/port.h>
using namespace std;
PIRServer::PIRServer() {
std::cout << "server is created." << std::endl;
}
void PIRServer::set_database(uint32_t db_size_, Database *db_) {
if (db_ == nullptr) {
throw std... |
/*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2019, The University of Texas at Austin. All rights reserved.
* UNIVER... |
// Copyright 2017 The Dawn 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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
#include "io.h"
#include "debug.h"
#include "init.h"
#include "Scanner.h"
#include "String.h"
#include "except.h"
#include "Token.h"
#include "pterm.h"
#include "config.h"
class Char {
private:
enum {
WhiteSpaceBit=1,
DigitBit=2,
AlphaBit=4,
IdentStartBit=8,
OperatorBit=16,
DelimBit=32,
... |
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
Mat temp_frame, background_frame, frame_gray, background_frame_gray, subtracted_frame;
int slider_bg_subtract = 50; // background subtract treshol... |
#include "drm_modesetter.h"
#include "egl_drm_glue.h"
#include "matrix.h"
#include "SkBitmap.h"
#include "SkCodec.h"
#include "gl_code.h"
#include "gl_impl.h"
std::unique_ptr<ged::EGLDRMGlue> egl_;
ged::EGLDRMGlue::Size display_size_ = {};
/********************** Base64 Decode Function ****************************... |
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/AlgFactory.h"
#include "GaudiKernel/IDataProviderSvc.h"
#include "GaudiKernel/SmartDataPtr.h"
#include "GaudiKernel/Algorithm.h"
#include "Event/TopLevel/Event.h"
#include "Event/TopLevel/EventModel.h"
#include "LdfEvent/EventSummaryData.h"
#include "facilitie... |
// Copyright (c) 2015, <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 copyright notice, this list of conditions and the follo... |
/*
https://www.hackerrank.com/challenges/magic-square-forming/problem
We define a magic square to be an matrix of distinct positive integers from to where the sum of any row, column, or diagonal of length
is always equal to the same number: the magic constant.
You will be given a
matrix of integers in the inclusive ... |
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This softwa... |
#include "../advent_of_code.hpp"
#include <regex>
#include <vector>
#include <unordered_map>
#include <map>
#include <set>
#include <optional>
#include <tuple>
#include <iostream>
// https://adventofcode.com/2021/day/22
// For part B, I tried to split intersected cuboids but I couldn't get the maths
// right. I found... |
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit ht... |
#include "interfejs.h"
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <ctime>
#include <limits>
Kopiec* zPermutacjiDoKopca(Permutacja& perm)
{
Kopiec * kopiec = new Kopiec(oppozycjiN);
for(vector<TYP>::iterator it=perm.m_dane.begin(); it != perm.m_dane.end(); ++it)
{
... |
/**
* Stabilization of an inverted pendulum with the abstraction-based engine.
*
* Created by <NAME> on May 10, 2018.
* Hybrid Systems Group, University of Waterloo.
*/
#include <iostream>
#include <string>
#include <sys/stat.h>
#include "src/DBAparser.h"
#include "src/system.hpp"
#include "src/abstraction.h... |
//MIT License
//Copyright (c) 2019 <NAME>
#include <GUI.h>
#include <imGUI/imgui.h>
#include <imGUI/imgui_impl_glfw.h>
#include <imGUI/imgui_impl_opengl3.h>
#include <Values.h>
#include <CudaControler.h>
#include <CPUControler.h>
#include <Render.h>
#include <Console.h>
#include <iostream>
#include <fstream>
stati... |
#include <utility>
//
// Created by may on 2018/7/20.
//
#include "QtHttpRequest.h"
#include "../../../QtUtil/Utils/Log.h"
#include "../../../QtUtil/Utils/utils.h"
#include <curl/curl.h>
#include <iostream>
#include <sstream>
#include <time.h>
using namespace QTalk;
std::function<void(StProcessParam)> callfun;
s... |
#include "mc-lang.h"
#include <cstring>
#include <cstdio>
#include <cerrno>
#include <stdexcept>
#include <iostream>
#include <readline/readline.h>
#include <readline/history.h>
#define MC_LINE_SIZE 1024
static vector<string> s_commands;
/* Generator function for command completion. STATE lets us know whether
to... |
// for maintaining subtree information, look at
// https://codeforces.com/blog/entry/67637
template <class node>
struct link_cut_tree {
bool connected(node* u, node* v) { return lca(u, v) != NULL; }
int depth(node* u) {
// make root(LCT component)->u a preferred path, then root and u are in
// ... |
#include "Texture.h"
const int Texture::texColNameWhite = 1100;
const int Texture::texColNameBlack = 1101;
const int Texture::texColNameRed = 1102;
const int Texture::texColNameGreen = 1103;
const int Texture::texColNameBlue = 1104;
Texture::Texture(void) : Resource() {
texWidth = -1;
texHeight = -1;
textureId = -... |
// Copyright 2015 <NAME>
// Copyright 2015 cheaplin
// Copyright 2017, 2018 <NAME>
#include "ir_LG.h"
#include <algorithm>
#include "IRrecv.h"
#include "IRsend.h"
#include "IRutils.h"
// L GGGG
// L G
// L G GG
... |
#include "insttimeplot.h"
#include "visumisc.h"
const QString InstTimePlot::TAG_NAME = "TIME_PLOT";
bool InstTimePlot::updateProperties(const QString& key, const QString& value)
{
mProperties[key] = value;
InstTimePlot::loadProperties();
return VisuInstrument::refresh(key);
}
void InstTimePlot::loadPrope... |
/****************************************************************************/
/// @file MSRailSignal.cpp
/// @author <NAME>
/// @author <NAME>
/// @date Jan 2015
/// @version $Id$
///
// A rail signal logic
/****************************************************************************/
// SUMO, Simulation of Ur... |
/**
* This file is part of Open Chess Game Database Standard.
*
* Copyright (c) 2021-2022 <NAME> (github@nguyenpham)
* Copyright (c) 2021-2022 Developers
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)
*/
#include "builder.h"
#incl... |
#include <iostream>
#include <vector>
#include <string>
#include <chrono>
#include <assert.h>
using namespace std;
#define BD_WIDTH 6
#define BD_HEIGHT 6
#define BD_SIZE (BD_WIDTH*BD_HEIGHT)
#define ARY_WIDTH (BD_WIDTH+4)
#define ARY_HEIGHT (BD_HEIGHT+4)
#define ARY_SIZE (ARY_WIDTH*ARY_HEIGHT)
#define WA... |
/* ----------------------------------------------------------------------------
ex21.C
mbwall 1jan96
Copyright (c) 1995-1996 Massachusetts Institute of Technology
DESCRIPTION:
This example illustrates various uses of the AlleleSet in concert with the
ArrayAlleleGenome. In particular, we use the RealGenome t... |
/*
Copyright (c) 2010 <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, publish, distribute, su... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <vector>
#include <functional>
#include <cmath>
#include <math.h>
#include <float.h>
#include <limits.h>
#include <stdlib.h>
#include <typeinfo>
#include <opencv2/core/core.hpp>
#... |
/*
* Copyright (c) 2016-2019 ARM Limited. All rights reserved.
*/
#include <string.h>
#include "mbed.h"
#include "borderrouter_tasklet.h"
#include "drivers/eth_driver.h"
#include "sal-stack-nanostack-slip/Slip.h"
#include "Nanostack.h"
#include "NanostackEthernetInterface.h"
#include "MeshInterfaceNanostack.h"
#i... |
//
// ELF object format config
//
// Copyright (C) 2003-2007 <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... |
#include "stdafx.h"
#include "xrserver.h"
#include "game_sv_single.h"
#include "game_sv_deathmatch.h"
#include "game_sv_teamdeathmatch.h"
#include "game_sv_artefacthunt.h"
#include "xrMessages.h"
#include "game_cl_artefacthunt.h"
#include "game_cl_single.h"
#include "MainMenu.h"
#include "../xrEngine/x_ray.h"... |
// Copyright 2019, <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 writ... |
//******************************************************************
//
// Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except ... |
/*
Copyright (c) 2016, <NAME>
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH... |
//----------------------------------*-C++-*----------------------------------//
/*!
* \file plot2D/test/tstPlot2D.cc
* \author <NAME>
* \brief Plot2D test.
* \note Copyright (C) 2016-2019 Triad National Security, LLC.
* All rights reserved. */
//--------------------------------------------------------... |
/*
* Copyright 2018 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/**************************************************************************************************
*** This file was autogenerated from GrRectBlurEffect.fp; do not modify.
... |
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gflags/gflags.h>
#include <iostream>
#include <string>
#include <memory>
#include <vector>
#include <algorithm>
#include <map>
#include <chrono>
#include <samples/common.hpp>
#include <samples/slog.hpp>
#include <samples... |
// find_root_example.cpp
// Copyright <NAME> 2007.
// Use, modification and distribution are subject to 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)
// Example of using root finding.
// Note that this file contains Quickboo... |
#include "wavesaccount.h"
#include "wavesutil.h"
#include "position.h"
#include "../qbase58/qbase58.h"
#include "../libcurve25519-donna/additions/keygen.h"
#include "../libcurve25519-donna/additions/curve_sigs.h"
#include <QDebug>
#include <QRandomGenerator>
#include <QJsonObject>
#include <QJsonArray>
#include <QJso... |
#include"socket.hh"
//提取ip port初始化sockaddr_in并传出
int make_IPv4_sockaddr(const std::string& str, struct sockaddr_in* ret/*out*/) {
if(str.empty()) return -1;
struct in_addr inp;
string::size_type pos = str.find(':');
if(pos == string::npos) {
if(inet_aton(str.c_str(), &inp)) {
ret->sin_addr.s_addr = i... |
/*
list of throw exceptions:
1 = vectors fed to the constructor are not the same size
2 = normalization of sample vector error = its field of zeroes
3 = vectors in dot product are not the same size
*/
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <thread>
#include <atom... |
/*
* util.cpp
*
* Created on: Aug 22, 2012
* Author: belyaev
*/
#include <llvm/Support/Program.h>
#include <llvm/IR/Constants.h>
#include <llvm/IR/InstrTypes.h>
#include <llvm/IR/LLVMContext.h>
#include <cstdlib>
#include <unordered_set>
#include <llvm/IR/CallSite.h>
#include "Util/cast.hpp"
#include "Uti... |
//
// Created by <NAME> on 2018/11/30.
//
#include "ExpectiMax.hh"
#include "Output.hh"
#include <algorithm>
#include <iostream>
#include <ExpectiMax.hh>
#include <iomanip>
#include <Settings.hh>
using std::cout;
using std::endl;
int ExpectiMax::createTree(Board board, int gens) {
spawnedBoardChildren.clear();
... |
/* General purpose routine to rotate an ensemble. Works in one
of two modes depending on switch constant_transformation. When true
rotates to a specified orientation defined by spherical angles phi and
theta (see ThreeComponentSeismogram rotate method for details). When
false the program will attempt to... |
//
// Created by <NAME> on 13-Mar-19.
//
#include "WiFi.hpp"
#include "HTTP.hpp"
#include "GPIO_Pin.hpp"
#include "USB_Serial.hpp"
using namespace std;
// uncategorized methods section
bool WiFi::init(UART_HandleTypeDef &_uart, bool connect) {
this->uart = UART(&_uart);
this->changeBaud(9600);
HAL_Del... |
/*
SPDX-FileCopyrightText: 2022 <NAME> <<EMAIL>>
SPDX-License-Identifier: MIT
*/
#include <string_view>
#include <charconv>
#include <utility>
#include <cstdio>
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <sys/ioctl.h>
#include <termios.h>
#include <signal.h>
#include <unistd.h>
#includ... |
///////////////////////////////////////////////////////////////
// Copyright 2018 <NAME>. 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_
/*`This example demonstrates the usage of the MPC backend for multiprecisi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.