text stringlengths 3.08k 12.5k |
|---|
/*
* Copyright (c) 2016, SRCH2
* 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 ... |
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <getopt.h>
using namespace std;
const int MAX_COMMENT_COLUMN = 120;
const int MAX_TAB = 40;
int comment_column = 72;
int tab_size = 4;
istream *fin = &cin;
struct LanguageDependence
{
string language;
string s... |
#include "GameObject.h"
#include "StateManager.h"
GameObject::~GameObject(){}
void GameObject::death(bool stop)
{
if (stop)
{
//end game
std::cout << "DIED" << std::endl;
return;
}
this->visible = false;
this->_parentState->AddScore(15);
// change sprite here.
// if player
// if swan
// i... |
#include "debug_drawer.hpp"
DebugDrawer::DebugDrawer(VulkanContext& context, uint32_t max_lines) : m_context(&context), m_max_lines(max_lines), m_current_lines(0)
{
const VkDeviceSize extra_memory = 500;
m_gpu_memory = context.allocate_device_memory(max_lines * sizeof(DebugLine) + extra_memory);
m_cpu_memory = con... |
// -*- C++ -*-
///bookLayer
// Package: SiPixelPhase1MonitorVertexSoA
// Class: SiPixelPhase1MonitorVertexSoA
//
/**\class SiPixelPhase1MonitorVertexSoA SiPixelPhase1MonitorVertexSoA.cc
*/
//
// Author: <NAME>
//
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"... |
#include <SFML/Graphics.hpp>
#include <time.h>
#include "Connector.hpp"
using namespace sf;
int size = 56;
Vector2f offset(28,28);
Sprite f[32]; //figures
std::string position="";
int board[8][8] =
{-1,-2,-3,-4,-5,-3,-2,-1,
-6,-6,-6,-6,-6,-6,-6,-6,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0... |
//=======- EarlyLowering.cpp - Toy Lowering to Linear Algebra Dialect -=======//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.... |
/*
Copyright (c) 2017, Massachusetts Institute of Technology 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 condition... |
#include <iostream>
#include <functional>
#include <memory>
#include <atomic>
#include <cmath>
#include "integration_test_helper.h"
#include "mavsdk.h"
#include "plugins/telemetry/telemetry.h"
#include "plugins/action/action.h"
#include "plugins/mission/mission.h"
using namespace mavsdk;
Mission::MissionItem only_set... |
#include <exception>
#include "client.h"
#include "debugger.h"
#include "adapter.h"
#include "signals.h"
#include <iostream>
#include <io.h>
#include <fcntl.h>
#include <boost/asio.hpp>
#include <boost/program_options.hpp>
namespace asio = boost::asio;
namespace serialization = unreal_debugger::serialization;
using... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <exception>
using namespace std;
const int INF_WEIGHT = 100000000;
// A class for Cylinder
class Cylinder
{
public:
int oxygen;
int nitrogen;
int weight;
Cylinder(int oxygen, int nitrogen, int weight)
{
this->oxygen = ox... |
struct S100 {
int i;
int* p;
};
static struct S100 s101;
void escape1() {
int x;
s101.p = &x;
}
int simple_field_bad() {
escape1();
return *s101.p; // BAD
}
int simple_field_good() {
escape1();
return s101.i; // GOOD
}
int deref_p() {
return *s101.p; // BAD
}
int field_indirect_bad() {
escape1... |
/*
The MIT License (MIT)
Copyright (c) [2016] [BTC.COM]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, me... |
#include "snw_util.h"
using namespace Snowda;
#include <array>
#include <iostream>
#include <type_traits>
#include <cstdint>
#include <cstddef>
#include <cassert>
template<int level, int target, int... values>
struct FindHelper;
template<int level, int target, int value, int... values>
struct FindHelper<level, ta... |
#include "ros/ros.h"
#include "wr_drive_msgs/DriveTrainCmd.h"
#include "wr_drive_msgs/CamMastCmd.h"
#include "std_msgs/Bool.h"
#include "std_msgs/Float32.h"
#include <array>
#include "Watchdog.hpp"
#include <stdlib.h>
#include <stdio.h>
//Variables to hold the speeds and speed ratios for each side
std::array<float, 2... |
/*
* This file is a part of the open source stm32plus library.
* Copyright (c) 2011,2012,2013,2014 <NAME> <www.andybrown.me.uk>
* Please see website for licensing terms.
*/
#include "config/stm32plus.h"
#include "config/timer.h"
#include "config/timing.h"
#include "config/usart.h"
#include "config/string.h"
usin... |
/*
* Open Chinese Convert
*
* Copyright 2010-2014 <NAME> <<EMAIL>>
*
* 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 re... |
/*************************
*
* Date: 2005/08 $
* \author <NAME> - <NAME>'
*/
#include <iostream>
#include <algorithm> // because we use std::swap
#include <HepMC3/GenEvent.h>
#include <HepMC3/GenVertex.h>
#include <HepMC3/GenParticle.h>
#include "SimDataFormats/GeneratorProducts/interface/HepMC3Product.h"
#inc... |
#include <rtosc/rtosc.h>
#include <rtosc/thread-link.h>
#include <rtosc/ports.h>
#include <rtosc/miditable.h>
#include <string.h>
#include <cmath>
#include "synth.h"
#include <rtosc/port-sugar.h>
#include <rtosc/subtree-serialize.h>
using namespace rtosc;
float Fs = 0.0f;
ThreadLink bToU(1024,1024);
ThreadLink uToB(... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you m... |
//========================================================================================
// Athena++ astrophysical MHD code
// Copyright(C) 2014 <NAME> <<EMAIL>> and other code contributors
// Licensed under the 3-clause BSD License, see LICENSE file for details
//=====================================================... |
#include <ur/players/computer.h>
#include <ur/players/human.h>
#include <ur/players/random.h>
#include <ur/game.h>
#include <ur/utils.h>
#include <ctime>
#include <cstdlib>
#include <exception>
#include <memory>
#include <unistd.h>
// conveniently print an error message and exit the program
void err(cons... |
// 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 <lib/fdio/directory.h>
#include <lib/fdio/spawn.h>
#include <lib/gtest/real_loop_fixture.h>
#include <lib/sys/cpp/component_context.h>
#include <l... |
////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010-2015, University of Washington and Battelle
// Memorial Institute. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following cond... |
// Copyright 2014 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/fxcrt/cfx_checksumcontext.h"
#include "core/fdrm/crypto/fx_cry... |
/* Shifter, Copyright (c) 2015, The Regents of the University of California,
## through Lawrence Berkeley National Laboratory (subject to receipt of any
## required approvals from the U.S. Dept. of Energy). All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, ... |
/* Copyright (c) <2009> <Newton Game Dynamics>
*
* 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,
* inclu... |
/*
* Copyright information and license terms for this software can be
* found in the file LICENSE that is included with the distribution
*/
/**
* @author mrk
*/
/* Author: <NAME> */
#include <iostream>
#include <epicsThread.h>
#include <pv/pvaClient.h>
using namespace std;
using namespace epics::pvData;
using ... |
// main81.cc is a part of the PYTHIA event generator.
// Copyright (C) 2019 <NAME>.
// PYTHIA is licenced under the GNU GPL v2 or later, see COPYING for details.
// Please respect the MCnet Guidelines, see GUIDELINES for details.
// This program is written by <NAME>.
// It illustrates how to do CKKW-L merging, see the... |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
#include "Bus.h"
Bus::Bus()
{
// CPU를 버스에 연결
cpu.ConnectBus(this);
// RAM의 값을 모두 0으로 초기화
for (auto& i : cpuRam) i = 0x00;
}
Bus::~Bus()
{
}
void Bus::SetSampleFrequency(uint32_t sample_rate)
{
dAudioTimePerSystemSample = 1.0 / (double)sample_rate;
// Magic Number - Core crystal frequency used by the NTSC NE... |
#pragma once
#include <cstdlib>
#include <stdint.h>
#include <unordered_map>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sys/time.h>
#include <boost/algorithm/string.hpp>
//获取时间戳的工具
class TimeUtil
{
public:
TimeUtil() {}
~TimeUtil() {}
//获取当前的时间戳 //类方法
static in... |
#include <iostream>
#include "TestModel.h"
#include "bvh.h"
#include "scene.h"
#include "tiny_obj_loader.h"
#include <glm/gtx/string_cast.hpp>
using namespace std;
using glm::dot;
using glm::vec2;
using glm::vec3;
using glm::vec4;
using tinyobj::attrib_t;
using tinyobj::index_t;
using tinyobj::material_t;
using tiny... |
// Executables must have the following defined if the library contains
// doctest definitions. For builds with this disabled, e.g. code shipped to
// users, this can be left out.
#ifdef ENABLE_DOCTEST_IN_LIBRARY
#define DOCTEST_CONFIG_IMPLEMENT
#include "../tests/doctest/doctest.h"
#endif
#include <iostream>
#include ... |
// Copyright (C) 2021 Technische Universität Dresden, Germany
//
// 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 condit... |
/*
Copyright 2019 Ethereum Foundation
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... |
// OpenH264Demo.cpp
//
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "codec_api.h"
ISVCDecoder *g_pDecoder = 0;
const char *g_pH264 = ".\\src\\720p.h264";
const char *g_pYUV = ".\\src\\720p.yuv";
FILE *g_pH264File = 0;
FILE *g_pYUVFile = 0;
void readH264();
void decodeFrame... |
// ****************************************************************************
// NOTICE
//
// This is the copyright work of The MITRE Corporation, and was produced
// for the U. S. Government under Contract Number DTFAWA-10-C-00080, and
// is subject to Federal Aviation Administration Acquisition Management
// System... |
//
// Created by ineoquest on 3/28/17.
//
#include "tests.h"
#include <iostream>
#include <iomanip>
#include <memory>
#include <cstring>
#include <map>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#ifdef __linux
#include <malloc.h>
#endif
#if defined(WIN32) && defined(_DEBUG)
#include <crtdbg.h>
#defin... |
#include "intervention.h"
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QLineEdit>
#include <iostream>
#include <QSqlQuery>
#include <QMessageBox>
#include <QSqlQueryModel>
#include <QSqlError>
intervention::intervention()
{
CODE_OUV=0;
NOM_CLIENT="";
NOM_OUV="";
NOM_SERVICE="";
DEG="";
P... |
//
// TradesWebSocket.cpp
// OKEX
//
// Created by <NAME> on 23/09/2018.
// Copyright © 2018 <NAME>. All rights reserved.
//
#include "TradesWebSocket.hpp"
TradesWebsocket::TradesWebsocket(std::vector<TradingPair> tradingPairs, std::string apiKey_, std::string apiSecret_): host("real.okex.com"), port("10441"), pa... |
#include <vector>
#include "dbgcfg.h"
#include "general.h"
#include "keymap.h"
#include "keystate.h"
#include "scanner.h"
// Declarations
constexpr uint32_t TapAndHoldTimeLimit = 100;
keystate keyStates[num_keystates];
#if defined(DEBUG)
void dumpScanCode(uint8_t sc, bool pressed) {
Serial.print("Scan Code ");
... |
// Partially based on Verilator example module
#include <verilated.h>
// Include model header, generated from Verilating "marble_base.v"
#include "Vmarble_base.h"
#include <verilated_fst_c.h>
#include "ethernet_model.h"
void spi_model(unsigned char *SCLK, unsigned char *CSB, unsigned char *MOSI, unsigned char MISO);
... |
#include "precomp.h"
#include "main_widget.h"
#include "title_widgets/skin_dialog.h"
#include "title_widgets/mainmenu_widgets/main_menu.h"
#include "cniconsole/client_widget_proxy.h"
#include "cniconsole/protocol/network_proxy.h"
#include "cniconsole/protocol/serialport_proxy.h"
#include "cniconsole/statusbar_proxy.h"... |
/* F U Z Z _ S H O O T R A Y . C P P
* BRL-CAD
*
* Copyright (c) 2020-2022 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* versio... |
/**************************************************************************************************
Software License Agreement (BSD License)
Copyright (c) 2014-2015, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
All rights reserved.
Redistribution and use in source and binary forms, with o... |
/*
Copyright (C) 2013 <NAME>
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it w... |
#include "InputManager.h"
#include "gfx/gl/texture/TextureDumper.h"
#include "gui/MainWindow.h"
#include "gui/MenuBarHandler.h"
#include <Logging.h>
#include "io/Format.h"
#include <mutils/time/profiler.h>
#include <imgui.h>
#include <glm/vec3.hpp>
#include <SDL.h>
#include <algorithm>
using namespace input;
/**
... |
#include <Flight_controller.h>
#include <Motor_manager.h>
#include <Logger.h>
#include <unistd.h>
//Initialization of the static variable
mutex Flight_controller::flight_controller_lock;
Flight_controller::Flight_controller(Logger &logger):logger(logger), orientation_manager(logger), motor_manager(logger){
desire... |
// Standard Library includes
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
// For std::isalpha and std::isupper
#include <cctype>
//include Char transform header
#include "transformChar.hpp"
#include "runCaeserCipher.hpp"
//Function to process command line arguments generated by main()
bo... |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
// Author(s): <NAME>
// Copyright: see the accompanying file COPYING or copy at
// https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING
//
// 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)
//
/// \file find_test... |
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 2002.
//
// File: secstore.hxx
//
// Contents: SDID to SECURIRY_DESCRIPTOR mapping table for downlevel content
// index. Stored persiste... |
#include "dominantColors.hpp"
template<int N>
inline size_t quantize(size_t val)
{
val = val >> N;
val = val << N;
return val;
}
static inline int SQR(int val)
{
return val * val;
}
int Color::distanceTo(const cv::Vec3b& other) const
{
int r = hash & 0xFF;
int g = (hash >> 8) & 0xFF;
int b = (hash >... |
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <cassert>
#include <vector>
#include "PatchMatchDescriptor.h"
double PatchMatchDescriptor::distanceDescriptor(const Descriptor& desSource, const Descriptor& desTarget, int sx, int sy, int ... |
#include "gross/Graph/NodeUtils.h"
#include "DLXNodeUtils.h"
#include "PostMachineLowering.h"
using namespace gross;
PostMachineLowering::PostMachineLowering(GraphSchedule& schedule)
: Schedule(schedule),
G(Schedule.getGraph()) {}
void PostMachineLowering::ControlFlowLowering() {
auto mapRelOp = [](IrOpcode:... |
//backtracking
//TLE
//52 / 63 test cases passed.
class Solution {
public:
string s, t;
int ans;
void backtrack(int start, string& cur){
if(cur.size() == t.size()){
//here cur == t must hold
++ans;
}else if(cur.size() < t.size() &&
cur.size() + ... |
//
// Copyright (c) 2015 <NAME> <EMAIL>
//
// 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 com... |
#include <stdio.h>
#include "../headers/System.h"
System::System(int width, int height)
: pip(width/2, height/2)
, racket1(LEFT, height/2, 60, 0.945, 0.757, 0.364)
, racket2(RIGHT, height/2, 60, 0.035, 0.639, 0.678) {
this->width = width;
this->height = height;
this->pip = System::P... |
// Copyright 2017 SAS Project Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a... |
#include <Windows.h>
#include "xhashcpp.h"
#include <boost/program_options.hpp>
#include <iostream>
#include <string>
enum HashType {
MD5 = 0,
SHA1,
SHA256
};
enum HashFormat {
HEXSTRING = 0,
HEXARRAY
};
void dumpExports(const std::string& file, HashType hashtype, HashFormat format);
std::stri... |
/*
ETHER_28J60.cpp - Ethernet library
Copyright (c) 2010 <NAME>. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any... |
#include "JPEGEncoderL4TMHelper.h"
#include <string.h>
#include <malloc.h>
// https://dev.w3.org/Amaya/libjpeg/example.c
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ROUND_UP_4(num) (((num) + 3) & ~3)
JPEGEncoderL4TMHelper::JPEGEncoderL4TMHelper(int _quality): planes(3)
{
memset(&cinfo, 0, sizeof(cinfo));
... |
//--------------------------------------------------------------------
//
// Copyright (C) Streamlet. All rights reserved.
//
// File Name: RenderUtility.cpp
// Author: Streamlet
// Create Time: 2015-04-12
// Description:
//
// Version history:
//
//
//-----------------------------... |
// -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
// Small example how to scroll text.
//
// This code is public domain
// (but note, that the led-matrix library this depends on is GPL v2)
#include "led-matrix.h"
#include "graphics.h"
#include <string>
#include <getopt.h>
#include <signal.h>
#include <... |
/* Copyright 2016 <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 writing, ... |
/**
\file
\author <NAME>
*/
#include "PassiveMarker.h"
#include <cnoid/EigenArchive>
#include <cnoid/EigenUtil>
#include <cnoid/MeshGenerator>
#include <cnoid/SceneDevice>
#include <cnoid/SceneMarkers>
#include <cnoid/SceneShape>
#include <cnoid/StdBodyLoader>
#include <cnoid/StdBodyWriter>
#include <cnoid/YAMLR... |
/**
* This file is part of GEO Project.
* It is subject to the license terms in the LICENSE.md file found in the top-level directory
* of this distribution and at https://github.com/GEO-Project/GEO-Project/blob/master/LICENSE.md
*
* No part of GEO Project, including this file, may be copied, modified, propagated, ... |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014-2015 <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mo... |
/*
Corto
Copyright(C) 2017 - <NAME>
ISTI - Italian National Research Council - Visual Computing Lab
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at you... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019, Image Engine Design 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:
//
// * R... |
/*---------------------------------------------------------------------------*\
Copyright (C) 2011 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of CAELUS.
CAELUS is free software: you can redistribute it and/or modify it
under... |
/* plugin_FL_cellseg.cpp
* a plugin version of the original V3D cellseg module function based on Fuhui's watershed code
* by <NAME>, 2011-02-23
*/
#include "v3d_message.h"
#include "volimg_proc.h"
#include "dialog_watershed_para.h"
#include "FL_cellSegmentation3D.cpp"
#include "plugin_FL_cellseg.h"
#define USH... |
#include "stdafx.h"
#include "TransportUrl.h"
#include "Settings.h"
#include "Logger.h"
/**
Constructor - Decoder
*/
TransportUrl::TransportUrl(LPCTSTR url)
{
USES_CONVERSION;
m_url=T2A(url);
g_logLevel=Settings::DefaultLogLevel();
m_framerate=Settings::DefaultFramerate();
m_frameQueueSize=Settings::DefaultFra... |
#include "include/headers.h"
int num_of_threads = 8;
std::random_device rd;
std::mt19937::result_type seed = 8<PASSWORD>L; // set constant to maintain same disorder for different sizes etc
// rd() ^ (\
(std::mt19937::result_type)\
std::chrono::duration_cast<std::chrono::seconds>(\
std::chrono::system_clock::now().... |
/* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain so... |
#include "huffman.h"
#include <fstream>
#include <queue>
using namespace HuffmanCode;
const char*
Exception::what() const noexcept {
return &desc[0];
}
Exception::Exception(const std::string& _desc)
: desc(_desc) {}
Node::Node(uint8_t _val)
: val(_val)
, e{ 0, 0 } {}
Node::Node(Node* l, Node* r)
... |
#include "gltf_model.h"
#include "asset.h"
#define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define TINYGLTF_NO_STB_IMAGE_WRITE
#include "tinygltf/tiny_gltf.h"
#include "utils.h"
#include "render.h"
void GltfModel::load() {
tinygltf::TinyGLTF loader;
std::string err;
std::vector<unsigne... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, <NAME>. All rights reserved.
// Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided... |
// Copyright 2018 <NAME> <<EMAIL>>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/**
* The class bucketaccounting is responsible for tracking free bucketIndex's
* Most operation are atomic. Will also maintain a <set> of used buckets.
*/
... |
/*
* Copyright (c) 2009-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 wri... |
#include "Node.hpp"
//Constructors
Node::Node():
parent_(nullptr),
children_(),
name_("Node"),
path_(),
depth_(0),
localTransform_(1.0f), //Identity Matrix‚
worldTransform_(1.0f),
speed_(0.5f),
distanceOrigin_(0.0f),
radius_(1.0f),
selfRotation_(0.5f),
origin_(nullptr){... |
/*
Copyright (c) 2013 <<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
restriction, including without limitation the rights to use,
copy, modify, merge, pu... |
#include "ComponentDistorsionZone.h"
#include "Application.h"
#include "ModuleAudio.h"
#include "ModuleRenderer3D.h"
#include "GameObject.h"
#include "ComponentTransform.h"
#include "OpenGL.h"
ComponentDistorsionZone::ComponentDistorsionZone(GameObject * attached_gameobject)
{
SetActive(true);
SetName("Distorsion ... |
#include <iostream>
#include <fstream>
#include <vpp/vpp.hh>
#include <vpp/utils/opencv_bridge.hh>
#include <opencv2/opencv.hpp>
#include "get_time.hh"
using namespace vpp;
void raw_naive(image2d<int> A, image2d<int> B, image2d<int> C)
{
for (int r = 0; r < A.nrows(); r++)
for (int c = 0; c < A.ncols(); c++)
{... |
#pragma once
#include "option_structure.hpp"
#include "config_structure.hpp"
#include "geometry_structure.hpp"
#include "element_structure.hpp"
#include "initial_structure.hpp"
class CData {
public:
// Constructor.
CData(CConfig *config_container,
CGeometry *geometry_container,
CInitia... |
/*
* License: Copyright (c) Huawei Technologies Co., Ltd. 2012-2019. All rights reserved.
* Description: host侧入口代码
* Date: 2019-02-28
* LastEditTime: 2019-09-24 17:17:28
*/
#include <unistd.h>
#include <thread>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <string>
#include "hiaiengine/api.h"... |
/*
Author: <NAME>
Date: 10/03/2019
Filename: Add_Sub_Bucks
Purpose: To calculate two given values Addition and Subtraction then convert them from a change value into a dollars value and appropriate change.
Error Checking: None Yet!
Assumptions: That the 1st value will never be smaller than the second value as to not ca... |
/**
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" ... |
/**
* primitive functions
*/
#include "primitives.h"
#include "eval.h"
#include "string.h"
#include "err.h"
#include "int.h"
#include "num.h"
class One_Primitive : public Primitive {
protected:
virtual Obj *apply_one(Obj *arg) = 0;
public:
Obj *apply(Obj *args) override {
ASSERT(is_pair(args), "one primiti... |
/* MicroFlo - Flow-Based Programming for microcontrollers
* Copyright (c) 2013 <NAME> <<EMAIL>>
* MicroFlo may be freely distributed under the MIT license
*/
#include "microflo.h"
#include "inc/hw_ints.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "inc/hw_ssi.h"
#include "driverlib/de... |
#include "TriangularMatrixOperations.hpp"
#include <iostream>
//--------------------------------------------------------------------------------
TriangularMatrixOperations::TriangularMatrixOperations ( int n )
{
dim = n;
w.resize( dim );
p.resize( dim );
d.resize( dim );
}
//----------------------------------... |
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <vector>
#include <string>
#include <zlib.h>
extern "C" {
#include "cgi.h"
#include "html.h"
}
using namespace std;
const char *fn = "results.pgn";
static gzFile gz = NULL;
struct Game {
string p1, p2;
string opponent;
string r... |
#include <iostream>
#include <vector>
#include <fstream>
#include <list>
#include <set>
#include <stack>
#include <algorithm>
#include <boost/date_time.hpp>
typedef std::vector<std::vector<unsigned long>> Graph;
std::stack<unsigned long> topological(Graph vertices, unsigned long vertice_count){
std::cout << ("fi... |
#include "BenchmarkUtil.h"
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <string>
bool BenchmarkUtil::processResults(double* latencies,
const std::vector<uint32_t>& indices,
... |
// Driver Function of Program
#include <iostream>
#include <fstream>
#include <string>
#include <regex>
#include <vector>
#include "building.h"
#include "minheap.h"
#include "redblacknode.h"
#include "redblacktree.h"
using namespace std;
//processes command from input file.
void process_input_command... |
#include "HMC5883L.h"
#include "Comms.h"
#include "eeprom.h"
#include "RoverEEAddresses.h"
HMC5883L Compass;
bool HasCompass;
float CurrentHeading;
static bool __isCalibrating = false;
static bool _isCompassCalibrated = 0;
static int16_t __min_x;
static int16_t __min_y;
static int16_t __max_x;
static int16_t __max... |
/*
* bqt_launchargs.cpp
*
* Implements bqt_launchargs.hpp & holds launch arguments state
* Using the getopt family http://linux.die.net/man/3/getopt
*
* Note that no thread-safety is necessary as launch flags/arguments are set up
* at launch and do not change.
*
* Also implements bqt_log.hpp
*
*/
/* IN... |
/*
Copyright (c) 2015, 2016 <NAME> <<EMAIL>>
This file is part of cangaroo.
cangaroo 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) an... |
#include <GL/gl3w.h>
#include <SDL2/SDL.h>
#include <glm/glm.hpp>
#include <imgui.h>
#include <spdlog/spdlog.h>
#include "imgui_impl/imgui_impl_opengl3.h"
#include "imgui_impl/imgui_impl_sdl.h"
#include "context.hpp"
#include "main_scene.hpp"
#include "scene.hpp"
constexpr auto ProjectName = "stb-sdf-text-demo";
con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.