text stringlengths 3.08k 12.5k |
|---|
#include "stdafx.h"
#include "Level2.h"
#include "MeshHelper.h"
#include "Space.h"
#include "Animation.h"
#include "Animator.h"
#include "SpriteSource.h"
#include "Sprite.h"
// print what function (fn) it's in (with less code)
#define fn(str) std::cout << "Level2::" << str << std::endl
using namespace Bet... |
// -*- C++ -*-
//
// Package: LHE2HepMCConverter
// Class: LHE2HepMCConverter
//
/**\class LHE2HepMCConverter LHE2HepMCConverter.cc GeneratorInterface/LHE2HepMCConverter/src/LHE2HepMCConverter.cc
Description: [one line class summary]
Implementation:
[Notes on implementation]
*/
//
// Original Author: ... |
#include <stdio.h>
#include <celib/memory/allocator.h>
#include <cetech/editor/editor.h>
#include <celib/log.h>
#include <cetech/log_view/log_view.h>
#include <celib/containers/array.h>
#include <cetech/debugui/icons_font_awesome.h>
#include "celib/id.h"
#include "celib/memory/memory.h"
#include "celib/api.h"
#includ... |
// Copyright 2016 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fpdfdoc/cpdf_filespec.h"
#include "core/fpdfapi/parser/cpdf_di... |
#include <iostream>
#include <fstream>
#include <vector>
#include <cassert>
#include "graph.h"
#include "branch.h"
#include "optimize.h"
#include "clique_neigh.h"
#include "clique.h"
#include "deg3.h"
#include "bipart.h"
static vector<string> split(const string& str, const string& delim)
{
vector<string> tokens;
si... |
#include <player.hpp>
#include <e/collision.hpp>
#include <e/core.hpp>
void Player::start() {
sprite = new Spritesheet("player.png", 10, 19);
sprite->addAnimation("idle_hori", { 0, 1 });
sprite->addAnimation("walk_hori", { 2, 3 });
sprite->addAnimation("idle_down", { 4, 5 });
sprite->addAnimation("walk_dow... |
/*
Code by,
___ _ __ _
| _ \___| |_ __ _ _ _ / _(_)______
| / _ \ ' \/ _` | ' \| _| |_ /_ /
|_|_\___/_||_\__,_|_||_|_| |_/__/__|
*/
#include<bits/stdc++.h>
typedef int int32_t;
#define int long long int
#define LOOP(i,n) f... |
/*
Beginning DirectX 11 Game Programming
By <NAME> and <NAME>
ObjModel - Used to represent an OBJ model.
*/
#include<fstream>
#include<vector>
#include<string>
#include"objLoader.h"
#include"TokenStream.h"
ObjModel::ObjModel( )
{
vertices_ = 0;
normals_ = 0;
texCoords_ = 0;
totalVerts_ ... |
/***************************************************************
* Name: FexWrite.cpp
* Purpose: Code for : extract and write the descriptors according to the input parameters
* Author: <NAME> (<EMAIL>)
* Created: 16.06.2009
* Copyright: <NAME> (https://sites.google.com/site/mubastan)
* License:... |
#include "Play.h"
#include "Application.h"
Play::Play()
{
}
bool Play::OnEnter()
{
srand(SDL_GetTicks());
camera = new Camera;
skybox = new Skybox;
world = new World;
player = new Wheel;
hud = new HUD;
int tex[7];
tex[0] = Load::PNG("model/powerups/shield.png");
tex[1] = Load::PNG("model/powerups/happy_wh... |
// ROS Hexapod Teleop Joystick Node
// Copyright (c) 2016, <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:
// * Redistributions of source code must retain the above copyright
// no... |
/*
* OpenSplice DDS
*
* This software and documentation are Copyright 2006 to TO_YEAR PrismTech
* Limited, its affiliated companies and licensors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complia... |
#include <stdint.h>
#include <stdio.h>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip> // std::setw
#include <thread>
#include <chrono>
using namespace std;
#if !defined(HETOBE16)
#if !defined(__BYTE_ORDER)
#error Failed to detect byte order!
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
#define ... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 <NAME> - http://www.igorski.nl
*
* 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 limitati... |
#include <complex>
#include <cmath>
#include "bulirschStoerIntegrator.hpp"
/*
subroutine bulirsch_stoer(y,dy,nv,x0,dx,
& rn,ecomp,vr,eunit,b,allp1,nextrp)
*/
extern "C" {
void dfv_m_(double *r, double *y, double *dy, int *nv, int *n,
double *rn, std::complex<double... |
//////////////////////////////////////////////////////////////////////
//
// MAXShaderOp.cpp - Implementation of the MAXShaderOp
//
// Author: <NAME>
// Date of Birth: March 13, 2005
// Tabs: 4
// Comments:
//
// License Information: Please see the attached LICENSE.TXT file
//
////////////////////////////////////... |
// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
#include "list_wrapper.hpp"
#include "unittest.hpp"
#include <libpmemobj++/make_persistent.hpp>
#include <libpmemobj++/make_persistent_atomic.hpp>
namespace nvobj = pmem::obj;
using C = container_t<int>;
struct root {
nvobj::pers... |
#include "stdafx.h"
#include "PerlinNoise.h"
/**
* @brief Construct a new Perlin Noise:: Perlin Noise object
* assigns the private members with the passed parameters
* Perlin noise creates 2D wave-like noise which is used for terrain generation and more
* @param _persistence
* @param _frequency
* @param _ampl... |
#include <torch/extension.h>
#include "communicator.h"
Communicator::Communicator(int rank, int size):m_rank(rank), m_size(size) {
m_current_comm = 0;
m_num_comms = 1;
m_nccl_ids = new ncclUniqueId[1000];
m_streams = new cudaStream_t[1000];
m_nccl_comms = new ncclComm_t[1000];
for (int i = 0... |
//
// Created by ubuntu on 18-7-9.
//
#include <bits/stdc++.h>
using namespace std;
const int N = 1001;
bool f[N];
vector<int> prime;
void init() {
memset(f, true, sizeof(f));
f[0] = f[1] = false;
for (int i = 2; i < N; i++) {
if (f[i]) {
prime.push_back(i);
}
for (int... |
/*
* Copyright (c) 2019 The Regents of the University of California
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hard... |
/*
Author: <NAME>
The maximum time of 2-neighbor bootstrap percolation: Complexity results
Rudini Sampaio
Theorem 4.1, pg 5
*/
#include <iostream>
#include "bipartiteK3.hpp"
#include <random>
#include <algorithm>
Graph::Graph(int const& n_vertex){
n = n_vertex;
adjList.resize(n);
infected... |
// compute shaders tutorial
// Dr <NAME> <<EMAIL>>
// Trinity College Dublin, Ireland
// 26 Feb 2016. latest v 2 Mar 2016
#include "gl_utils.h"
// this is the compute shader in an ugly C string
const char* compute_shader_str =
"#version 430\n \
layout (l... |
/*********************************************************************
** Program Filename: main.cpp
** Author: <NAME>
** Date: 10/20/15
** Description: The program displays a menu allowing the user to run
** three different recursive functions.
** Input: std::cin, int, double, string
** Output: std... |
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
// 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,... |
//===========================================================================
/*
Software License Agreement (BSD License)
Copyright (c) 2003-2012, CHAI3D.
(www.chai3d.org)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitt... |
// OneLoneCoder
// Simple Neural Network Example with training
// May have bugs - is not finished yet
// WORK IN PROGRESS
// User supplies an input and output vector to determine how many
// neurons are in input and output layers
// can also specify hidden layers (which are same size as input)
// Example shows trainin... |
// Copyright 2018 U.C. Berkeley RISE Lab
//
// 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... |
/******************************************************************
*
* Copyright 2016 Samsung Electronics 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
*
... |
#include "DataPool.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../ipc/MutexFactory.h"
DataPool::DataPool( void ( *initFunction )( std::map<uint32_t, PoolEntryIF*>* pool_map ) ) {
mutex = MutexFactory::instance()->createMutex();
if (initFunction != NULL ) {
initFunction( &this->data_pool );... |
// (C) 1992-2016 Intel Corporation.
// Intel, the Intel logo, Intel, MegaCore, NIOS II, Quartus and TalkBack words
// and logos are trademarks of Intel Corporation or its subsidiaries in the U.S.
// and/or other countries. Other marks and brands may be claimed as the property
// ... |
#include "numberrec.h"
static int lns(FILE* const file)
{
int ch = EOF;
int lines = 0;
int pc = '\n';
while((ch = getc(file)) != EOF)
{
if(ch == '\n')
lines++;
pc = ch;
}
if(pc != '\n')
lines++;
rewind(file);
return lines;
}
static char* readln(F... |
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file config_collide.cxx
* @... |
//===- unittests/exchange/test_paths.cpp ----------------------------------===//
//* _ _ *
//* _ __ __ _| |_| |__ ___ *
//* | '_ \ / _` | __| '_ \/ __| *
//* | |_) | (_| | |_| | | \__ \ *
//* | .__/ \__,_|\__|_| |_|___/ *
//* |_| *
//===------------------------------... |
#include "perfkit/ftxui-extension.hpp"
#include <ftxui/component/screen_interactive.hpp>
#include "./config_browser.hpp"
#include "./trace_browser.hpp"
#include "perfkit/detail/configs.hpp"
#include "perfkit/detail/trace_future.hpp"
ftxui::Component perfkit_ftxui::config_browser()
{
return std::shared_ptr<ftxui:... |
// gl_helpers.cpp
// texture and shader loading
// Copyright 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
/... |
/* Copyright (c) <NAME>, 1994. */
/**
* (c) Copyright 1993, 1994, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the c... |
// Copyright 2017 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... |
#include "car_specifics.h"
#include "Arduino.h"
#include "transducer_classes.h"
#define serialOut Serial
/**********************************
CAR CLASS
***********************************/
/* Constructor
* l: two motors on the left
* r: two motors on the right
* also intializes the motors and the sensors used
*/
Ca... |
#include "die.h"
#include "app_timer.h"
#include "app_error.h"
#include "app_error_weak.h"
#include "drivers_nrf/watchdog.h"
#include "drivers_nrf/timers.h"
#include "drivers_nrf/scheduler.h"
#include "drivers_nrf/log.h"
#include "drivers_nrf/a2d.h"
#include "drivers_nrf/power_manager.h"
#include "drivers_nrf/i2c.h"
... |
/*
Copyright (c) 2007 <NAME>. 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 require... |
// Copyright (c) 2021, Qualcomm Innovation Center, 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:
//
// 1. Redistributions of source code must retain the above copyright notice,
// ... |
#include "behavior.h"
using namespace std;
Behavior::Behavior(vector<vector<double>> const &sensor_fusion, CarData car, Predictions const &predictions) {
Target target;
target.time = 3.0;
double car_speed_target = car.speed_target;
double safety_distance = predictions.get_safety_distance();
// re... |
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be use... |
//
// Created by Robin on 31/05/2020.
//
#include <BotManager.h>
void BotManager::InitializeBot(){
//Region of how the bot works.
std::string token = getToken();
if(token.empty()) {
std::cerr << "CRITICAL: "
<< "There is no valid way for Echo to obtain a token! Use one of the f... |
#include "oss/generator/all.h"
#include <seqan3/std/ranges>
#include <seqan3/alphabet/adaptation/char.hpp>
#include <seqan3/alphabet/concept.hpp>
#include <seqan3/alphabet/nucleotide/dna4.hpp>
#include <seqan3/argument_parser/all.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/io/sequence_file/all.hpp>
... |
// Copyright 2019 DeepMind Technologies Ltd. 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 require... |
#include "L1Trigger/TrackFindingTracklet/interface/ProcessBase.h"
#include "L1Trigger/TrackFindingTracklet/interface/MemoryBase.h"
#include "L1Trigger/TrackFindingTracklet/interface/Settings.h"
#include "L1Trigger/TrackFindingTracklet/interface/Globals.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#incl... |
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include "lackey.hh"
#include <fstream>
#include <map>
#include <mutex>
using std::endl;
using std::function;
using std::ifstream;
using std::map;
using std::mutex;
using std::ofstream;
using std::string;
using std::to_string;
using std::unique_lock;
DisobedientLacke... |
/*
* Version: 2017.07.31
* Authors: Members of the Team NAIST-Panasonic at the Amazon Robotics Challenge 2017:
* <NAME>. <garcia-g at is.naist.jp> (Captain),
* <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
* <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
* <NAME>, <NAME>, <NAME>, <... |
#include "DrawAux.h"
#include <opencv2/imgproc.hpp>
using namespace cv;
/**
* Calculate de Euclidian distance 2D between 2 points.
**/
float DrawAux::euclideanDist(cv::Point& p, cv::Point& q) {
if (p.x==q.x && p.y==q.y)
return 0;
cv::Point diff = p - q;
return cv::sqrt(diff.x*diff.x + diff.y*diff.y);
}
/**
... |
//
// main.cpp
// closestpair
//
// Created by <NAME> on 8/5/20.
// Copyright © 2020 Biocellion SPC. All rights reserved.
//
#include <float.h>
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <math.h>
class Point {
public:
double x;
double y;
double z;
Point(double a, double b, ... |
// ----------------------------------------------------------------------------
//
// FCST: Fuel Cell Simulation Toolbox
//
// Copyright (C) 2006-2013 by Energy Systems Design Laboratory, University of Alberta
//
// This software is distributed under the MIT License
// For more information, see the README file in /doc/... |
// The authors have released ID3Lib as Public Domain (PD) and claim no copyright,
// patent or other intellectual property protection in this work. This means that
// it may be modified, redistributed and used in commercial and non-commercial
// software and hardware without restrictions. ID3Lib is distributed... |
/*
* Copyright (c) 2003-2005, National ICT Australia (NICTA)
*/
/*
* Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder).
* All rights reserved.
*
* 1. Redistribution and use of OKL4 (Software) in source and binary
* forms, with or without modification, are permitted provided that the
* following condi... |
// Copyright 2019 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 "src/ui/lib/input_reader/sensor.h"
#include <stdint.h>
#include <stdio.h>
#include <vector>
#include <hid-parser/parser.h>
#include <hid-parser... |
/*
This file is a part of liblsdj, a C library for managing everything
that has to do with LSDJ, software for writing music (chiptune) with
your gameboy. For more information, see:
* https://github.com/stijnfrishert/liblsdj
* http://www.littlesounddj.com
-----------------------------------------------------... |
#include "gtest/gtest.h"
#include "math/tuple.h"
#include <cmath>
TEST(TupleTest, TupleWithWOneIsPoint) {
Tuple tuple = Tuple(4.3f, -4.2f, 3.1f, 1.0f);
EXPECT_FLOAT_EQ(tuple.x, 4.3f);
EXPECT_FLOAT_EQ(tuple.y, -4.2f);
EXPECT_FLOAT_EQ(tuple.z, 3.1f);
EXPECT_FLOAT_EQ(tuple.w, 1.0f);
EXPECT_TRUE(tuple.is_p... |
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "actor.h"
#include "mcts.h"
#include "types.h"
#include "utils.h"
#include <algorithm>
#include <at... |
#include <string.h>
#include "partitioner.hpp"
void createpartitionentry(PARTITION* p,uint8_t type,uint32_t firstlba,uint32_t count)
{
p->status=0;
p->firstchs[0]=0xfe;
p->firstchs[1]=0xff;
p->firstchs[2]=0xff;
p->type=type;
p->lastchs[0]=0xfe;
p->lastchs[1]=0xff;
p->lastchs[2]=0xff;
p->firstlba[0]=... |
#include "stdafx.h"
#include "Camera.hpp"
#include "Application.hpp"
#include "Track.hpp"
Camera::Camera()
{
}
Camera::~Camera()
{
}
void Camera::Tick(float deltaTime)
{
// Caluclate new force for the camera roll rotation
// Like gravity but for roll
float angle = m_roll * Math::pi;
Vector3 wanted = Vector3(sin(... |
// Copyright (c) 2019 <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, d... |
/* Copyright (C) 2020 Massless Corp. - All Rights Reserved
* Author: <NAME>.
* You may use, distribute and modify this code under the
* terms of the BSD 3-Clause "New" or "Revised" License.
*
* You should have received a copy of this license with
* this file. If not, please email <EMAIL>
*/
#pragma once
#inclu... |
#include "physdevice.h"
#include <iostream>
#include <stdexcept>
#include "util_vulkan.h"
#include "konst.h"
#define DAL_PRINT_DEVICE_INFO true
namespace {
bool is_mipmap_gen_available_for(const VkFormat format, const VkPhysicalDevice physDevice) {
VkFormatProperties props;
vkGetPhysicalDevice... |
/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 <NAME>
CppAD is distributed under the terms of the
Eclipse Public License Version 2.0.
This Source Code may also be made available under the following
Secondary Lice... |
#include "stdafx.h"
#include "DatabaseSchemaSql.h"
const std::map<uint32_t, Gender> DatabaseSchemaSql::DATABASE_SQLITE_GENDERS_BIND_TABLE = {
{ 1, Gender::Male },
{ 2, Gender::Feemale },
{ 3, Gender::Schemale },
};
const std::string DatabaseSchemaSql::PATIENTS_DATABASE_SQLITE_SCHEMA = R"(
CREATE TABLE IF NOT EX... |
#include <algorithm>
#include <exception>
#include <fstream>
#include <iostream>
#include <iterator>
#include <memory>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/CompilerInstance.h"
#in... |
/**
* 操作系统上机第二题:磁盘调度
* 1、对于如下给定的一组磁盘访问进行调度:
* 请求服务到达 A B C D E F G H I J K L M N
* 访问的磁道号 30 50 100 180 20 90 150 70 80 10 160 120 40 110
* 2、要求分别采用先来先服务、最短寻道优先以及电梯调度算法进行调度;
* 3、要求给出每种算法中磁盘访问的顺序,计算出平均移动道数;
* 4、假定当前读写头在90号,电梯调度算法向磁道号增加的方向移动。
*/
#include <iostream>
#include <vector>
#include <ioman... |
#include<iostream>
/*program to do insertion in an AVL tree. Similar to BST insertion with onlu caution that we check after every insertion
for the appropiate rotation to be applied for balancing the tree.
a)Recursive insertions
Now the worst case time complexity will be O(logn) because, we keep the tree balanc... |
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2015-2017 Intel Corporation. All Rights Reserved.
#include <librealsense2/rs.hpp> // Include RealSense Cross Platform API
#include "example.hpp" // Include short list of convenience functions for rendering
#include <algorithm> ... |
//
// This file is made available under the terms of the Apache 2.0
// license which is available at http://www.apache.org/licenses/
//
/// @file
/// An "elements and attributes" schema implementation.
#include <new>
#include "lhash.h"
#include <tagsoup.hpp>
#include "internals.hpp"
using namespace TagSoup;
int Sc... |
///! \file
/// Read U1 configs from a file and fix them to a given gauge (at the moment
/// Landau gauge is the only gauge implemented).
///
#include "./gaugegroups/u1.h"
#include "../src/actions/compact_qed.h"
#include "../src/stat.h"
#include "./u1_gauge_fixing_params.h"
#include "io.h"
#include <iomanip>
#include <... |
/// \copyright <NAME> 2019-2021
/// Distributed under the Boost Software License, Version 1.0.
/// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
#include "etl/tuple.hpp"
#include "etl/cstdint.hpp"
#include "etl/type_traits.hpp"
#include "etl/warning.hpp"
#include "testing/testing.hpp"
na... |
// $Header$
// Include files
#include "FluxSvc/IFluxSvc.h"
#include "FluxSvc/IFlux.h"
#include "astro/GPS.h"
#include "astro/IGRField.h"
// GlastEvent for creating the McEvent stuff
#include "Event/TopLevel/Event.h"
#include "Event/TopLevel/MCEvent.h"
#include "Event/MonteCarlo/McParticle.h"
#include "Event/TopLev... |
#include <stdint.h>
#include <pthread.h>
#include <iostream>
#include <iomanip>
#include "util.h"
#include "SerialLog.h"
SerialLog::SerialLog(unsigned log_size, unsigned timeout)
: _c_buf(log_size), _mutex_initted(false), _timeout_us(timeout), _last_up_time_us(0),
_enabled(false)
{
if ((_c_buf.free() >... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercia... |
//
// scrabble.cpp
//
#include <iostream>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <map>
#include <set>
using namespace std;
typedef map<char, int> LetterMap; //lettermap
typedef map<string, int> WordMap; //wordmap
static const int TWO = 2;
static const int THR = 3;
stati... |
#include "path_trie.h"
#include <string>
#include <algorithm>
#include <iostream>
#include <limits>
#include <memory>
#include <utility>
#include <vector>
#include <map>
#include <unordered_map>
#include "decoder_utils.h"
#include "scorer.h"
PathTrie::PathTrie() {
log_prob_b_prev = -NUM_FLT_INF;
log_prob_nb_prev... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
ort = new ofxOrt(ORT_TSTR("tinyyolov2-8.onnx"), true);
ort->printModelInfo();
original.load("cat.jpg");
fbo.allocate(416, 416, GL_RGB);
}
//--------------------------------------------------------------... |
#include "haar.h"
int partition(std::vector<MyRect>& _vec, std::vector<int>& labels, float eps);
int myMax(int a, int b)
{
if (a >= b)
return a;
else
return b;
}
int myMin(int a, int b)
{
if (a <= b)
return a;
else
return b;
}
inline int myRound( float value )
{
return (int)(value + (val... |
/** @file
* Respacker to make resource embedded.
*
* @author MXWXZ
* @date 2019/03/09
*/
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <memory>
#include <cxxopts/cxxopts.hpp>
using namespace std;
const char* kFileCmd = "files";
unsigned char kResID[] = {0x55, 0x49}; // ... |
#include "grid.h"
#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <vector>
std::unordered_set<uint64_t> alive_cells;
std::vector<uint64_t> cells_to_add;
std::vector<uint64_t> cells_to_delete;
std::unordered_map<uint64_t, int> neighbours;
bool paused = true;
bool left_mouse_p... |
#include "Globals.h"
class MockChest;
typedef cItemCallback<MockChest> cChestCallback;
AString ItemToFullString(const cItem & a_Item)
{
return "";
}
class cEntity
{
public:
const Vector3d & GetPosition (void) const { return m_pos;}
double GetWidth (void) const { return 0; }
double GetHeight (void) const { return... |
/*
dbWatson
Database Structur Exporter
https://github.com/Zer0Knowledge/dbWatson
BSD 2-Clause License
Copyright (c) 2016 | <NAME>, <NAME>, <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. Red... |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
const int MAXN = 555;
const int MAXS = 101111;
const int MAXH = 555;
const int MAXL = 555;
const long double eps = 1e-15;
int n, m, cnt, c[MAXN], l[MAXS], graph[MAXN][MAXN];
char a[MAXN][MAXN], b[MAXN][MAXN];
namespace Gaussian_Elimination{
... |
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <cstring>
#include <set>
#include <chrono>
using namespace std::chrono;
using namespace std;
typedef unsigned long long lld;
vector<string> doneState;
map<char, in... |
#include "algorithms/FEAL.hpp"
#include "util/Logging.hpp"
#include "algorithms/FEALLinearCA.hpp"
inline std::ostream& operator<<(std::ostream& o, const std::vector<char>& chars)
{
for (auto c : chars)
{
o << std::setfill('0') << std::setw(2) << std::hex << static_cast<unsigned int>(static_cast<unsign... |
/*
* Copyright 2016 The Imaging Source Europe GmbH
*
* 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 la... |
/***************************************
** Tsunagari Tile Engine **
** world.cpp **
** Copyright 2011-2015 <NAME> **
** Copyright 2011-2020 <NAME> **
***************************************/
// **********
// Permission is hereby granted, free of charge, to any person obtaining ... |
// Copyright 2013 15418 Course Staff
#include <getopt.h>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <boost/make_shared.hpp>
#include <string>
#include "comm/connect.h"
#include "comm/comm.h"
#include "server/messag... |
#include <iostream>
#include <fstream>
#include <lacze_do_gnuplota.hh>
#include <utility>
#include "../inc/Matrix3x3.h"
#include "Cuboid.h"
#include "Vector.h"
#include "Scene.h"
#define Vector Vector<double, 3>
void menuDisplay();
void getRotationMatrix(scene &gnu);
void chooseIndex(scene &gnu);
int main() {
Ve... |
/**
Copyright 2009-2017 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated
by National Technology and Engineering... |
#include "handleopt.h"
#include "getcover.h"
#include "tbhash.h"
#include "worker.h"
#include "core.h"
#include <QCoreApplication>
#include <QUrl>
#include <QRegularExpression>
#include <QRegularExpressionMatch>
#include <QDebug>
#include <iostream>
#include <fstream>
#include <unistd.h>
//#include "json.hpp"
#incl... |
// SPDX-License-Identifier: Apache-2.0
#include "glfwdriver.h"
#include <GLFW/glfw3.h>
#include <chrono>
#include <dlfcn.h>
#include <thread>
namespace {
constexpr int kWidth = 640;
constexpr int kHeight = 480;
} // namespace
bool GLFWDriver::Initialize() {
if (!glfwInit()) {
return false;
}
glfwWindo... |
//
// large_message.cpp
//
#include "bits.hpp"
#include "debug.hpp"
#include "kernel_subsystems.hpp"
#include "large_message.hpp"
#include "new.hpp"
#include "thread.hpp"
///
/// Constructor. Load (cache) the message parameters, but defer all
/// validation until collect_payload()
///
large_message_c::
large_messag... |
#include "Player_view.h"
#include "Game_model.h"
#include "Controller.h"
#include "../Points.h"
//#define DEBUG_ROT
using namespace std;
using namespace Zeni;
Player_view::Player_view() : to_rend() {
//Get the camera from the model
camera = Game_model::get_model().get_camera();
}
void Player_view::render_hud() {
... |
#include <iostream>
#include <iomanip>
#include <cstring>
#include <vector>
using namespace std;
const int DRAGON = 0;
const int NINJA = 1;
const int ICEMAN = 2;
const int LION = 3;
const int WOLF = 4;
const char wname[5][10] = {"dragon", "ninja", "iceman", "lion", "wolf"};
const int SWORD = 0;
const int BOMB = 1;
co... |
#include <vector>
#include "Hull2D.h"
using namespace std;
Hull2D::Hull2D()
{
}
Hull2D::~Hull2D()
{
}
vector<Point*>* Hull2D::FindHull(vector<Point*> *points)
{
return FindHullOfSubset(points, 0, points->size() - 1);
}
//Method called recursively for dividing set until case is trivial and then recombining subset... |
/*-------------------------------------------------------------------------
*
* dict_synonym.c
* Synonym dictionary: replace word by its synonym
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
*
*
* IDENTIFICATION
* src/backend/tsearch/dict_synonym.c
*
*--------------------------... |
/*
XimuReceiver.cpp
Original Author: <NAME>
C++ library for receiving data from the x-IMU. Modified by <NAME> for the particular needs of this project
*/
#include "stdafx.h"
#include "XimuReceiver.h"
#include <iostream>
// Serial stream decoding
unsigned char buf[256];
unsigned char bufIndex = 0;
// Dat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.