text stringlengths 3.08k 12.5k |
|---|
/*
* SendChannelEndTable.cpp
*
* Created on: 14 Jan 2010
* Author: db434
*/
#include "SendChannelEndTable.h"
#include "WriteStage.h"
#include "../Core.h"
#include "../ChannelMapTable.h"
#include "../../../Utility/Assert.h"
#include "../../../Utility/Instrumentation/Latency.h"
#include "../../../Utility/Inst... |
#include "argparse.hpp"
#include "random.hpp"
#include "statistic.hpp"
using namespace TCLAP;
using namespace std;
uniform_real_distribution<double> unif(0.0, 1.0);
class Sequence {
private:
u_long nbr_states;
double delta_x;
u_long exon_size;
double x{0.3};
double pop_size;
double alpha;
... |
//headers
Missile missile;
Plane plane;
FuzzyLogic_Missile * flm = new FuzzyLogic_Missile(100.0f);
#define CITYNUMBER 5
//Cities
struct City
{
City() {radius = 1.0f; position = Point2D(); damage = 50.0f;};
float radius;
Point2D position;
float damage;
int red;
int green;
int blue;
};
City cities[CITYNUMBER];... |
/*
* NMEASentenceRMC.cpp
*
* Created on: Sep 21, 2017
* Author: monte
*/
/*
* MIT License
*
* Copyright (c) 2018 VisualGPS, LLC
*
* 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... |
#include <Arduino.h>
#include "Device.h"
#include "EL.h"
#include "debug.h"
// base
Device::Device(byte eoj0, byte eoj1, byte eoj2)
{
setEoj(_eoj, eoj0, eoj1, eoj2);
}
// SmartMeter
WattHour::WattHour()
{
for (int i = 0; i < WATT_HOUR_POINTS; i++)
_values[i] = -1;
}
int WattHour::time... |
/**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include "... |
/*
* Copyright 2019, Offchain Labs, 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 ag... |
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.end()
#define pr(v) { for(int i=0;i<v.size();i++) { v[i]==I... |
/************************************************************************/
/* */
/* Copyright 2007-2019 by <NAME> */
/* */
/* Permission is here... |
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <string>
#include "refRenderer.h"
#if WITH_CUDA
#include "cudaRenderer.h"
#endif
#include "platformgl.h"
#include "Cubemap.h"
void startRendererWithDisplay(Renderer* renderer, bool printStats = true);
void startBenchmark(Renderer* renderer, int star... |
#include "Utils.h"
#include "Level.h"
#include "Player.h"
#include "Enemy.h"
#include <iostream>
#include <vector>
#include <random>
#include <ctime>
void initPlayer(Player &player, unsigned int x, unsigned int y, unsigned int attack, unsigned int hp, unsigned int maxHp);
int main() {
Utils util;
Level level;
Play... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/gtk/custom_drag.h"
#include "base/file_path.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/gtk/b... |
// LLVM function pass to canonicalize barriers.
//
// Copyright (c) 2011 <NAME>
// 2012-2014 <NAME> / Tampere University of Technology
// 2021 <NAME> and contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documen... |
#include "PosAndMC.h"
PosAndMC::PosAndMC()
{
}
PosAndMC::~PosAndMC()
{
}
bool PosAndMC::run(Globals* g, const vector<string>& args) {
bool success=true;
if (args.size() != 6) {
cerr << "Wrong number of arguments: need 5" << endl;
throw UnexpectedException();
}
int shipnum = atoi(args[0].c_str());
int l... |
// Copyright (c) 2005-2009 <NAME>
//
// Distributed under the MIT license (See accompanying file
// LICENSE.txt or copy at http://jagpdf.org/LICENSE.txt)
//
#include <core/generic/refcountedimpl.h>
#include <core/jstd/configimpl.h>
#include <core/jstd/memory_stream.h>
#include <core/jstd/file_stream.h>
#include <core/... |
#include "sound.h"
#include "opl.h"
#include <stdint.h>
void snd_beepLeft()
{
const uint8_t lightsSbiData[11] = {0x03, 0x01, 0x47, 0x00, 0x95, 0x95, 0x15, 0x15, 0x01, 0x00, (uint8_t)(0x08 | OPL_left)};
FMSetVoice(3, (const FMInstrument*)lightsSbiData);
FMVoiceOff(3);
FMKeyOn(3, 580, 4);
}
void snd_be... |
// graphdrawing.cpp
#include "Window.h"
#include "GraphDrawing.h"
#include "AADrawing.h"
// #include "XEvent.h"
// #include <iterator>
void set_color(SDL_Renderer *renderer, SDL_Color col){
SDL_SetRenderDrawColor(renderer, col.r, col.g, col.b, col.a);
};
void GraphDrawing::filter_epoch_data(std::string fullstr, ... |
/*
Encryption
Encryption is the process of obfuscating a message using keys.
Symmetrical encryption is when only one key can be used to both encrypt and decrypt a message.
Playfair Cipher
This code is about a symmetrical encryption method called the Playfair cipher. The e... |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <functional>
// MACROS!
// TODO: Faster/Shorter expression
#define lch(_x) ( (_x)<<1 )
#define rch(_x) ( ((_x)<<1) | 1)
/* NOTE:
* Marcos needed: lch(_x), rch(_x)
* See https://www.luogu.org/problemnew/show/P3373
*/
long long in... |
/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: <NAME> <<EMAIL>>
*
* 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
... |
// SPDX-License-Identifier: Apache-2.0
//
// Copyright 2000-2014 <NAME>
// Copyright 2004-2013 Gigablast, Inc.
// Copyright 2013 Web Research Properties, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a... |
//=============================================================================
//
// Adventure Game Studio (AGS)
//
// Copyright (C) 1999-2011 <NAME> and 2011-20xx others
// The full list of copyright holders can be found in the Copyright.txt
// file, which is part of this source code distribution.
//
// The AGS sourc... |
//
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenEXR Project.
//
#ifdef NDEBUG
# undef NDEBUG
#endif
#include "ImathQuat.h"
#include "ImathRandom.h"
#include <assert.h>
#include <iostream>
#include <testQuatSetRotation.h>
using namespace std;
using namespace IMATH_INTERNAL_NAMESPAC... |
// -*-Mode: C++;-*-
// * BeginRiceCopyright *****************************************************
//
// $HeadURL$
// $Id$
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research and development of
//... |
// Written: fmckenna
// Purpose: the typical Qt main for running a QMainWindow
#include <MainWindowWorkflowApp.h>
#include <QApplication>
#include <QFile>
#include <QThread>
#include <QObject>
#include <AgaveCurl.h>
#include <InputWidgetEE_UQ.h>
#include <QApplication>
#include <QFile>
#include <QTime>
#include <Q... |
#include "mgnss/controllers/wheeled_references.h"
#include <custom_services/updatePDGains.h>
#include <XBotCore-interfaces/XDomainCommunication.h>
#include <mwoibn/robot_class/robot_xbot_nrt.h>
bool evenstHandler(custom_services::updatePDGains::Request& req,
custom_services::updatePDGains::Response... |
/* Copyright (c) 2014, 2015, 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 as
published by the Free Software Foundation; version 2 of the
License.
This program is distributed i... |
/*================================================================
* Copyright (C) 2014 All rights reserved.
*
* 文件名称:test_client.cpp
* 创 建 者:<NAME>
* 邮 箱:<EMAIL>
* 创建日期:2014年12月30日
* 描 述:
*
================================================================*/
#include <vector>
#include <iostre... |
/*== SAGITTARIUS =====================================================================
* Copyright (c) 2012, <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 sour... |
#include "IntervalGen/IntGenForPosit32OneApprox.h"
#include "luts.h"
#include "math.h"
#ifdef __APPLE__
#define exp10fFunc __exp10f
#else
#define exp10fFunc exp10f
#endif
#ifdef __APPLE__
#define exp10Func __exp10
#else
#define exp10Func exp10
#endif
posit32 IntervalGenerator::MpfrCalculateFunction(posit32 x) {
... |
/////////////////////////////////////////////////////////////////////////////////
//
// SourceFile: IISDebug.cpp
//
// Marlin Server: Internet server/client
//
// Copyright (c) 2014-2022 ir. <NAME>
// All rights reserved
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this soft... |
#include "Terrain.h"
// on "init" you need to initialize your instance
bool ::Terrain::init()
{
//////////////////////////////
// 1. super init first
if ( !Node::init() )
{
return false;
}
winSize = Director::getInstance()->getWinSize();
_fromKeyPointI = 0;
_toKeyPointI = 0;
drawNo... |
//----------------------------------------------------------------------------
//Yume Engine
//Copyright (C) 2015 arkenthera
//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 ... |
/***************************************************************************
* Software License Agreement (BSD License) *
* Copyright (C) 2012 by <NAME> <<EMAIL>> *
* *
* Redistribution and use in sourc... |
#include "../include/rosinterface.h"
//Constructor to set the sensor type
RosInterface::RosInterface(bool p_euclidSensor, bool p_kinectSensor, bool p_astraSensor):euclidSensor( p_euclidSensor ), kinectSensor ( p_kinectSensor ), astraSensor ( p_astraSensor )
{
dataGrabber = new DataGrabber(euclidSensor, kinectSens... |
#include <iostream>
#include <csignal>
#include <thread>
#include <chrono>
#include <sys/uio.h>
#include <sstream>
#include <string.h>
#include <iomanip>
#include <fstream>
#include "mapsreader.h"
namespace
{
volatile std::sig_atomic_t gSignalStatus;
}
void signal_handler(int signal)
{
gSignalStatus = signal;
}
... |
/*
* Kaidan - A user-friendly XMPP client for every device!
*
* Copyright (C) 2016-2021 Kaidan developers and contributors
* (see the LICENSE file for a full list of copyright authors)
*
* Kaidan is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License a... |
/******************************************************************************
*
* Copyright (C) 2014 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://ww... |
// *****************************************************************************
//
// Prácticas de SCD. Práctica 1.
// Plantilla de código para el ejercicio de los fumadores
//
// *****************************************************************************
#include <iostream>
#include <cassert>
#include <pthread.h>
... |
// https://www.codechef.com/APRIL21A/problems/PAIRFLIP
#include <bits/stdc++.h>
using namespace std;
struct graph {
int n;
vector<vector<int>> g;
vector<int> nodes;
};
struct op {
char type;
int k, i, j;
};
vector<vector<int>> g, h;
vector<int> visited;
int cc;
void dfs(int u) {
visited[u] = cc;
for ... |
#include <random>
#include <chrono>
#include <io2d.h>
using namespace std;
using namespace std::chrono;
using namespace std::experimental;
using namespace std::experimental::io2d;
class GameOfLife
{
public:
GameOfLife(int board_width, int board_height);
void Seed(int amount);
void Tick();
void Di... |
#include <algorithm>
#include <iostream>
#include "BVHNode.h"
using namespace std;
using namespace Eigen;
BVHNode::BVHNode() :
left(NULL),
right(NULL),
object(NULL),
min(INFINITY, INFINITY, INFINITY),
max(-INFINITY, -INFINITY, -INFINITY)
{
}
void BVHNode::recursiveBuild(const vector<shared_ptr<Ge... |
#include <iostream>
#include <vector>
#include <utility>
#include <cstdlib>
#include <tr1/unordered_map>
#include <boost/functional/hash.hpp>
#include <boost/program_options.hpp>
#include <boost/program_options/variables_map.hpp>
#include "striped_grammar.h"
#include "tdict.h"
#include "sentence_pair.h"
#include "fdi... |
#include "paintwidget.h"
/**
* @brief PaintWidget::PaintWidget Constructs a new PaintWidget for a new document
* Creates a new canvas based on image path
* @param imagePath
* @param parent
*/
PaintWidget::PaintWidget(const QString &imagePath, Tool *tool,
QWidget *parent) :
QGraphicsVi... |
/**
* elf_parser.cpp - Implementation of ELF binary perser
* @author <NAME> <<EMAIL>>
* Copyright 2012 uArchSim iLab project
*/
// Genereic C
#include <libelf.h>
#include <cstdio>
#include <unistd.h>
#include <cstring>
#include <fcntl.h>
#include <gelf.h>
#include <cstdlib>
#include <cerrno>
#include <cassert>
//... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
std::ostream& operator<<(std::ostream& os, const std::vector<int>& v) {
if (v.size() == 0) { os << "{}"; return os; }
os << "{" << v.at(0);
for (size_t ii{1}; ii < v.size(); ++ii) {
os << "," << v.at(ii);
}
os << "}";
return os;
}
cla... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/views/avatar_menu_button.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
#inclu... |
auto PPU::readVRAM(u32 mode, n32 address) -> n32 {
address &= (address & 0x10000) ? 0x17fff : 0x0ffff;
if(mode & Word) {
address &= ~3;
return vram[address + 0] << 0 | vram[address + 1] << 8 | vram[address + 2] << 16 | vram[address + 3] << 24;
} else if(mode & Half) {
address &= ~1;
return vram[a... |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
#include "PipeOutputManager.h"
#include "stdafx.h"
#include "Exceptions.h"
#include "SRWExclusiveLock.h"
#include "StdWrapper.h"
#include "ntassert.h"
#include "String... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2012 University of Washington
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This pro... |
#include <client.h>
#include <login.h>
#define USDL
#include <graph.h>
tcpclient c;
bool ivis = true;
int SX = 640, SY = 480;
int mx, my;
void tlo();
struct savestate {
char status[200];
int question;
} ss;
int LIMIT = 20, cmdsend;
bool checkOK(const char* where) {
cmdsend++;
if(c.getline(tlo) != "OK")... |
#include "FPSCamera.h"
void FPSCamera::Initialize(int screenWidth, int screenHeight, float fov, float zNear, float zFar) {
BaseCamera::IsKeyboardEnabled = true;
BaseCamera::IsMouseEnabled = true;
Camera3D::Initialize(screenWidth, screenHeight, fov, zNear, zFar);
// Initialize
mDirectionsSwitches = 0;
mRotation... |
/*
* Please report any problem to the author:
* +----------------------------------+
* | Author: <NAME> |
* | Email: <EMAIL> |
* | Phone: 306 880 5494 |
* +----------------------------------+
*
*/
#include <cstdio> /* isspace() */
#include <iostream>
#include <string>
#inc... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sstream>
#include <glog/logging.h>
#include "server/messages.h"
#include "server/worker.h"
#include "tools/cycle_timer.h"
#include "tools/work_queue.h"
#include "work_q.h"
#include <pthread.h>
#ifndef NUMTHREADS
#define NUM_THREADS 33
#endif
Wor... |
/*
* Copyright 2015 <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... |
/*
* usersfile.c
* (C) 2000 <NAME>, Stellar-X Pty Ltd
* Released under GPL, see COPYING-2.0 for details.
*
* These routines are to allow users attempting to use the proxy which
* have been explicitly allowed by the system administrator.
* The code originated from denyusers.c.
*/
#include "squid.h"
#include "ut... |
// Id
/***************************************************************
* FLU - FLTK Utility Widgets
* Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
*
* This file and its content is protected by a software license.
* You should have received a copy of this license with this fi... |
/*
Copyright 2017, <NAME>, Institute for Systems Biology
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 ... |
/*
* Copyright (c) 2015 by <NAME>, www.dinkla.com, All rights reserved.
*
* See the LICENSE file in the root directory.
*/
#define _CRT_SECURE_NO_WARNINGS 1
#include "Defs.h"
#include <cuda_profiler_api.h>
#include <cuda_runtime_api.h>
#include <iostream>
#include <iomanip>
#include <assert.h>
#... |
#include "Core/Math/Matrix3.h"
inline float det22(float a, float b, float c, float d)
{
return a * d - b * c;
}
Pu::Matrix3 Pu::Matrix3::CreateRotation(float theta, Vector3 axis)
{
const float cc = cosf(theta);
const float ss = sinf(theta);
const float xx = axis.X * axis.X;
const float xy = axis.X * axis.Y;
con... |
// Copyright <NAME>
#include "GHBezierCurve.h"
#include "GHPlatform/GHDebugMessage.h"
GHBezierCurve::GHBezierCurve(void)
: mTotalLength(0)
{
}
void GHBezierCurve::clear(void)
{
mPoints.resize(0);
mBezierPoints.resize(0);
mTotalLength = 0;
}
void GHBezierCurve::addSegPos(const GHPoint3& center, const GHPoint3& l... |
#include "Assets.h"
Assets::Assets() = default;
Assets::~Assets() = default;
void Assets::LoadSprites()
{
const auto Load = [&](const std::string Name, const char* FileName)
{
const Texture2D Sprite = LoadTexture(FileName);
Sprites[Name] = Sprite;
};
Load("Player", "Sprites/Scarlet.png");
Load("BlueBullet"... |
/*Published under The MIT License (MIT)
See LICENSE.TXT*/
// Definitions for the all planet objects class in the system.
//
// <NAME>
//
#include "planet.h"
Planet::Planet(float mass, float distanceFromSun, float orbitTime, float rotationTime, float radius, GLuint textureHandle)
{
this->mass = mass;
this->distan... |
#include "MatlabNeedleController.h"
#include "ConfigurationSpace/Cfg.h"
#include "MPProblem/Robot/Actuator.h"
#include "MPProblem/Robot/Robot.h"
#include "Simulator/MatlabMicroSimulator.h"
#include "Utilities/XMLNode.h"
#include "nonstd/container_ops.h"
#include <algorithm>
/*------------------------------ Constru... |
/*
* HelTec Automation(TM) LoRaWAN 1.0.2 OTAA example use OTAA, CLASS A
*
* Function summary:
*
* - use internal RTC(150KHz);
*
* - Forward the data measured by the 12-bit ADC to the server.
*
* - Include stop mode and deep sleep mode;
*
* - 15S data send cycle;
*
* - Informations output via serial(115200)... |
/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: <NAME>
*/
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <vector>
#include <functional>
#include <cmath>
#include "util/test.h"
#include "u... |
#include "session.hpp"
#include <cstring>
Session::Session(){
this->frame_counter = 0;
this->ticks = 0;
this->compressor = tjInitCompress();
this->decompressor = tjInitDecompress();
this->jpeg_quality = 30;
this->greyscale = false;
}
Session::~Session() {}
void Session::stderr_handler(logger... |
#define BOOST_TEST_MAIN TestActiveWindow
#include <boost/test/unit_test.hpp>
#include <sam/Features.hpp>
#include <sam/FeatureMap.hpp>
using namespace sam;
BOOST_AUTO_TEST_CASE( single_feature )
{
SingleFeature feature(10.5);
BOOST_CHECK_EQUAL(feature.evaluate<double>(valueFunc), 10.5);
}
BOOST_AUTO_TEST_CA... |
#include "Luddite/Layers/Editor/ViewportPanel.hpp"
#include "Luddite/Layers/EditorLayer.hpp"
#include "Luddite/Graphics/Renderer.hpp"
#include "Luddite/ECS/Modules/Graphics.hpp"
#include "Luddite/ECS/Modules/Editor.hpp"
Luddite::ViewportPanel::ViewportPanel()
{
SetRenderTexture();
}
void Luddite::ViewportPanel... |
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#define PI 3.14159265
using ScalarField = std::vector<std::vector<float> >;
using VectorField = std::vector<std::vector<std::vector<float> > >;
// meta params (non-physical simulation)
const int iters = 100;
const int jaco... |
/*-------------------------------------------------------------------------
*
* xlogdesc.c
* rmgr descriptor routines for access/transam/xlog.c
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION... |
#include "Simd/SimdDetection.hpp"
#include "Simd/SimdDrawing.hpp"
#include <iostream>
#include<arpa/inet.h>
#include<sys/socket.h>
using namespace std;
#define ERR_DETECT 0
#define MISS_DETECT 1
typedef Simd::Detection<Simd::Allocator> Detection;
unsigned int buffer[100];
int s_int;
struct sockaddr_in server;
void s... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: onewClass.cpp
* Author: c
*
* Created on November 23, 2016, 5:08 PM
*/
#include "onewClass.h"
#include <GL/gl.h>
... |
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include <common/Init.h>
#include <common/datatypes/DataSet.h>
#include <folly/synchronization/Baton.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <nebula/client/Config.h>
#include <... |
//============================================================
//
// Type: burgers include file
//
// Author: <NAME> on 16/10/2019.
// Dipartimento di Scienze e Tecnologie Aerospaziali
// Politecnico di Milano
// Via La Masa 34, 20156 Milano, I... |
#include "WwiseSoundBankInfoCache.h"
#include "AssetManagement/AkAssetDatabase.h"
#include "AkUnrealHelper.h"
#include "HAL/FileManager.h"
#include "HAL/PlatformFileManager.h"
#include "Misc/Paths.h"
#include "WwiseProjectInfo.h"
namespace WwiseSoundBankInfoCacheHelpers
{
constexpr auto CacheVersion = 1;
constexpr ... |
#pragma once
#include <vector>
#include <tuple>
#include <algorithm>
#include <map>
#include "dvrapi_error_string.h"
#define checkCudaErrors(err) __checkCudaErrors(err, __FILE__, __LINE__)
// These are the inline versions for all of the SDK helper functions
inline void __checkCudaErrors(int err, const char *file, co... |
// `g++ cubeAuto2.cc -lglut -lGL -lGLU -o cubeAuto2`
#include <iostream>
#include <stdlib.h>
// the GLUT and OpenGL libraries have to be linked correctly
#ifdef __APPLE__
#include <OpenGL/OpenGL.h>
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
using namespace std;
// The coordinates for the vertices of t... |
/*
Copyright (c) 2018, 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 ... |
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <iostream>
#include <Eigen/Dense>
#include <algorithm>
using namespace sf;
using namespace std;
using namespace Eigen;
typedef Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > Mat;
void reset(Mat& mat) {
//initialize matrix to zero matrix
//행렬을 영... |
#include "FileIO.h"
// source shared between AliReview and Renerer - patch changes
#include <assert.h>
#include <memory>
using std::string;
using std::ofstream;
using std::ifstream;
unsigned char Ali::peekByte(ifstream& f) {
// unsigned char acts like byte from 0-255
unsigned char b = 0;
int nextInt = f.p... |
// Lose Face - An open source face recognition project
// Copyright (C) 2008-2009 <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 ... |
#include <limitless/pipeline/postprocessing.hpp>
#include <limitless/models/model.hpp>
#include <limitless/core/texture_builder.hpp>
#include <limitless/core/shader_program.hpp>
#include <limitless/core/uniform.hpp>
#include <limitless/models/abstract_mesh.hpp>
using namespace Limitless;
Blur::Blur(ContextEventObse... |
#include <unistd.h>
#include <iostream>
#include <iomanip>
#include <cstddef>
#include <cstdlib>
#include <sstream>
#include <libdash.h>
using namespace std;
using namespace dash;
typedef struct unit_threading_s {
int num_threads;
int max_threads;
bool hyperthreads;
bool openmp;
} unit_threading_t;
unit_t... |
/*
* MIT License
*
* Copyright (c) 2020 <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, m... |
//#include <OpenGL/gl.h>
//#include <OpenGL/glu.h>
//#define GLEW_STATIC
//#include <GL/glew.h>
#include <nanogui/nanogui.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
#include <fstream>
#include "mpi.h"
typedef std::complex<double> K;
#incl... |
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include "waveletsample.h"
#include "waveletsampleblock.h"
#include "transforms.h"
#include "delay.h"
void usage()
{
cerr << "teststream [wavelet-type] [numstages] [infile]\n";
cerr << " -------------- ---... |
/////////////////////////////////////////////////////////////////////
// sdrsetupdlg.cpp: implementation of the CSdrSetupDlg class.
//
// This class implements a dialog to setup SDR parameters.
//
// History:
// 2010-09-15 Initial creation MSW
// 2011-03-27 Initial release
////////////////////////////////////... |
/*
Cafu Engine, http://www.cafu.de/
Copyright (c) <NAME> and other contributors.
This project is licensed under the terms of the MIT license.
*/
// Ward 97 Tone Reproduction Operator
// **********************************
const double DisplayLuminanceMax=80.0;
bool HistogramCeiling(ArrayT<unsigned long>& Bins, doubl... |
#include <nlohmann/json.hpp>
#include <unordered_map>
#include <filesystem>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <cassert>
#include <string>
#include <mpi.h>
#include "Servant.hpp"
#include "Common.hpp"
Servant::Servant(int workerId) : workerId(workerId) {
std::cout << "Worker " << wor... |
#include "palettepad.hpp"
Palettepad::Palettepad(Application* app, unsigned int top, unsigned int left, unsigned int width, unsigned int height)
: Panel(app, top, left, width, height) {
palette = std::vector<std::vector<Color>>(18);
for (unsigned int i = 0; i < 18; ++i) {
palette[i] = std::vector<... |
#include "StdMain.h"
#include "lwaveupprogress.h"
typedef struct LWavePrivateData{
P_STYLE percentStyle;
int value;
int minValue;
int maxValue;
int waterDensity;
double waterHeight;
double offset;
int borderWidth;
QColor usedColr;
QString strText;
QTimer *timer;
}P_Data;
... |
/*
* MIT License
*
* Copyright (c) 2016 <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, ... |
#include <iostream>
#include <iomanip>
#include <cmath>
#include "Token.h"
#include "utils.h"
//=====================================================================================
// Token class member functions
//=====================================================================================
Token::Token(ch... |
// Project: Assignment 3 - Evolution Strategies
// Author: <NAME>
// Description: Function definitions for the Population class as defined in population.h
#include <iomanip>
#include "population.h"
#include "points.h"
// Constructor ** ASSUMES initRand() HAS BEEN CALLED! **
Population::Population( int nPoints, i... |
/*!
@authors <NAME> (<EMAIL>)
@date 2014-2020
@copyright BSD-3-Clause
*/
#include <pyclustering/differential/differ_state.hpp>
#include <gtest/gtest.h>
using namespace pyclustering::differential;
TEST(utest_differential, plus_states) {
differ_state<double> state1 { 0, 1, 2, 3, 4 };
d... |
//https://stackoverflow.com/questions/17119116/how-many-ways-can-you-insert-a-series-of-values-into-a-bst-to-form-a-specific-tr
//Runtime: 128 ms, faster than 80.00% of C++ online submissions for Number of Ways to Reorder Array to Get Same BST.
//Memory Usage: 28.5 MB, less than 100.00% of C++ online submissions for Nu... |
#include "../turnManager.h"
#include "../tools/layerManager.h"
TurnManager::TurnManager()
{
uiSheet = new olc::Renderable();
uiSheet->Load(util::GetCWD("Data/ui.png").c_str());
characterSheet = new olc::Renderable();
characterSheet->Load(util::GetCWD("Data/characterSheet.png").c_str());
}
TurnManager::~TurnManag... |
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
#define MAX_N 101010
char T[MAX_N];
int RA[MAX_N], tempRA[MAX_N], SA[MAX_N], tempSA[MAX_N], c[MAX_N];
int Phi[MAX_N], PLCP[MAX_N], LCP[MAX_N], n;
const int nr_max = 100;
int nr, lengths[nr_max], counters[nr_max];
int Owners[MAX_N];
void countin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.