text stringlengths 3.08k 12.5k |
|---|
/* Unit tests */
#include <cstdarg>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#include <petsc.h>
#include <fenv.h>
#include <softlib/SOFTLibException.h>
#include "tests/cxx/config.h"
#include "FVM/FVMException.hpp"
#include "UnitTest.hpp"
// Tests
#include "tests/... |
#include "pxt.h"
enum class BaudRate {
//% block=115200
BaudRate115200 = 115200,
//% block=57600
BaudRate57600 = 57600,
//% block=38400
BaudRate38400 = 38400,
//% block=31250
BaudRate31250 = 31250,
//% block=28800
BaudRate28800 = 28800,
//% block=19200
BaudRate19200 = 19200,
//% block=14400
... |
#include "kinect.hpp"
#include "util.h"
#include <chrono>
#include <ctime>
#include <iomanip>
#include <ostream>
// Constructor
kinect::kinect( const uint32_t index )
: device_index( index )
{
// Initialize
initialize();
}
kinect::~kinect()
{
// Finalize
finalize();
}
// Initialize
void kinect::... |
// 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_annotlist.h"
#include <memory>
#include <utility>... |
#include "FireworkFactory.h"
#include "Firework.h"
#include <iostream>
FireworkFactory::FireworkFactory() {}
// Receive a stack of Firework pointers and add them to the factories inventory. Fireworks must be sold in the order
// that they are popped off the stack (The top of the stack is the oldest firework)... |
#include <Gosu/Bitmap.hpp>
#include <cassert>
#include <algorithm>
#include <vector>
using namespace std;
void Gosu::Bitmap::swap(Bitmap& other)
{
std::swap(pixels, other.pixels);
std::swap(w, other.w);
std::swap(h, other.h);
}
void Gosu::Bitmap::resize(unsigned width, unsigned height, Color c)
{
if (... |
#include "BoundaryVector.h"
#include <gtest/gtest.h>
using namespace ibpm;
#define EXPECT_ALL_EQUAL(a,b) \
for ( int i=0; i<_n; ++i ) { \
EXPECT_DOUBLE_EQ( (a), (b) ); \
}
class BoundaryVectorTest : public testing::Test {
protected:
BoundaryVectorTest() :
_n(10),
_f(_n),
_... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "bgp/bgp_path.h"
#include "bgp/bgp_route.h"
#include "bgp/bgp_peer.h"
#include "net/community_type.h"
using std::string;
using std::vector;
string BgpPath::PathIdString(uint32_t path_id) {
Ip4Address addr(path_id);
return addr... |
#include <algorithm>
#include <optional>
#include <Poco/File.h>
#include <Poco/DirectoryIterator.h>
#include <Storages/MergeTree/MergeTreeIndexGranularity.h>
#include <Storages/MergeTree/checkDataPart.h>
#include <Storages/MergeTree/MergeTreeDataPartCompact.h>
#include <Storages/MergeTree/MergeTreeDataPartInMemory.h>... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN = 50000 + 5;
const int MAXV = 16;
int father[MAXN];
int Rank[MAXN];
int visited[MAXN];
int ancestor[MAXN];
struct Edge {
int to;
int next;
};
Edge edge[MAXN * 2];
int head[MAXN];
int edgeCnt;
void ... |
//
// LinearPatch.cpp
// Copyright (c) <NAME>. All rights reserved.
//
#include "stdafx.hpp"
#include "LinearPatch.hpp"
#include "Grid.hpp"
#include "Value.hpp"
#include <math/vec2.ipp>
#include <math/vec3.ipp>
#include <math/mat4x4.ipp>
#include <math/scalar.ipp>
#include "assert.hpp"
#include <vector>
... |
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org
Copyright (c) 2000-2014 Tor<NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of... |
// Copyright (c) 2001-2011 <NAME>
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// #define KARMA_TEST_COMPILE_FAIL
#include <boost/config/warning_disable.hpp>
#include <boost/detail/lightweight_test.hpp>... |
// TestUV.cpp : Defines the entry point for the console application.
//
#include <awaituv.h>
#include <fcntl.h>
#include <string>
#include <vector>
using namespace awaituv;
using namespace std;
bool run_timer = true;
uv_timer_t color_timer;
future_t<void> start_color_changer()
{
static string_buf_t n... |
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------... |
#include <iostream>
#include <pthread.h>
#include <signal.h>
#include <string>
#include <opencv2/opencv.hpp>
#include <opencv2/face.hpp>
#define FACE_DETECT_PERIOD 5
#define FACE_UI_WIDTH_OFFSET 1300
#define FACE_UI_HEIGHT_OFFSET 680
bool g_running = false;
// pthread_t g_grab_thread;
// pthread_mutex_t g_mutex_lo... |
#include "File.h"
void File::open(int file_descr, FileMode m, bool own)
{
if (fd != -1) ::close(fd);
fd = file_descr;
mode = m;
own_fd = own;
pos = 0;
buf = xmalloc<uchar>(File_BufSize);
if (mode == READ) size = read(fd, buf, File_BufSize);
else size = -1;
}
vo... |
//===- unittests/core/test_protect.cpp ------------------------------------===//
//* _ _ *
//* _ __ _ __ ___ | |_ ___ ___| |_ *
//* | '_ \| '__/ _ \| __/ _ \/ __| __| *
//* | |_) | | | (_) | || __/ (__| |_ *
//* | .__/|_| \___/ \__\___|\___|\__| *
//* |_| ... |
/*************************************************************************/
/* export.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
//
// main.cpp
// GravityCpp
//
// Created by <NAME> on 26/12/2018.
// Copyright © 2018 Creolabs. All rights reserved.
//
#include "gravity_compiler.h"
#include "gravity_core.h"
#include "gravity_vm.h"
#include "gravity_macros.h"
#include "gravity_vmmacros.h"
#include "gravity_opcodes.h"
#include <iostream>
using ... |
//
// main.cpp
// MemcachedEmbeddedTest
//
// Created by <NAME> on 3/24/13.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
#include <iostream>
#include <string>
#include <chaos/common/memory/ManagedMemory.h>
#include <chaos/common/data/cache/DataCache.h>
#include <chaos/common/data/cache/KeyGroupCache.h>
#... |
#pragma once
#include <dsp/block.h>
#include <mutex>
#include "common.hpp"
extern "C" {
#include "sondedump/include/dfm09.h"
#include "sondedump/include/rs41.h"
#include "sondedump/include/ims100.h"
#include "sondedump/include/m10.h"
}
#define LEN(x) (sizeof(x)/sizeof(*x))
static float dewpt(float temp, float rh);
s... |
//
// QuantizedMaxPoolTest.cpp
// MNNTests
//
// Created by MNN on 2019/01/15.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include <MNN/Interpreter.hpp>
#include "MNNTestSuite.h"
#include "core/Session.hpp"
#include "TFQuantizeOp_generated.h"
#include "core/TensorUtils.hpp"
#include "TestUtils.h"
using... |
#include "Classifier.h"
#include <chrono>
#include <algorithm>
#include <numeric>
/**
* \brief Returns the index of the top value of a vector v
* \param v The vector
* \return The index of the top value
*/
static int Argmax(const std::vector<float>& v)
{
if (v.size() == 0)
{
return -1;
}
int index = 0;
float ... |
/*----Multiplication between string and int(des_str,str,int,len)----*/
/*------------The 2nd number b < 21474836. Require rev()------------*/
int si_multiplication(char *r, char *a, long b, int len)
{
int i,j;
unsigned long m=0;
for(i=len-1,j=0;i>-1;i--)
{
m+= *(a+i)* b;
*(r+ j++)=(m%10)+... |
// Copyright 2022 <NAME>
#include "../../../modules/task_4/utyugov_d_cannons_alg_std/cannons_alg.h"
#include <iostream>
#include <random>
#include <string>
#include <utility>
#include <vector>
#include "../../../3rdparty/unapproved/unapproved.h"
std::vector<double> getRandomVector(int size) {
std::random_device de... |
/* This file is part of hdd_serial_spoofer by namazso, licensed under the MIT license:
*
* MIT License
*
* Copyright (c) namazso 2018
*
* 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... |
#include <sstream>
#include <iostream>
#include <algorithm>
#include <fstream>
#include <stdlib.h>
#include <deque>
#include <stdint.h>
#include <math.h>
#include <assert.h>
#include "random_variable.h"
using namespace std;
/* Uniform Random Variable
*/
UniformRandomVariable::UniformRandomVariable() {
min_ = 0.0;
... |
#include <cmath>
#include <iostream>
#include <type_traits>
#include "api.hpp"
#include "isaac/array.h"
#include "isaac/driver/common.h"
#include "clBLAS.h"
#include "cublas.h"
namespace sc = isaac;
typedef isaac::int_t int_t;
template<typename T>
void test_impl(std::string const & ST, simple_vector_base<T> & cy, sim... |
// Copyright The Blocxxi Project Authors 2018.
// Distributed under the 3-Clause BSD License.
// (See accompanying file LICENSE or copy at
// https://opensource.org/licenses/BSD-3-Clause)
#include <utility> // for std::move
#include <iostream>
#include <boost/algorithm/string/join.hpp> // for string joi... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
using namespace std;
const int N = 3e5 + 10;
struct node {
int fa, ch[2], mx, val, lazy;
bool rev, is_root;
}LCT[N];
int n, m;
void pushup(int rt) {
if(!rt) return;
LCT[rt].mx = max(LCT[rt].val, max(LCT[LCT[rt].ch[0]]... |
/*
SumIt
...still needs some work
*/////////////////////////////////////////////////////////////////////////////
#include "pvc.hpp"
#include "dsp/digital.hpp"
struct SumIt : Module {
enum ParamIds {
ATTEN,
ACT_UI = ATTEN + 4,
INV_UI = ACT_UI + 4,
NUM_PARAMS = INV_UI + 4
};
enum InputId... |
/*
* File: ForecastsPointer.h
* Author: <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Created on January 27, 2020, 5:39 PM
*/
#include "ForecastsPointer.h"
#include "Functions.h"
#include <stdexcept>
#include <algorithm>
#if defined(_OPENMP)
#include <omp.h>
#endif
using namespace std;
const size_t Fore... |
/********************************************************************************
Copyright (c) 2017 <NAME> / asw204k_AT_yahoo.com
All rights reserved.
Please see license in the project root directory fro more details
*/
#include "devices/LIS3MDL.h"
#include "devices/TCA9548A.h"
#include "devices/BMP085.h"
#include... |
// System
#include <sstream>
#include <string>
#include <vector>
// Custom
#include <gpd/candidate/candidates_generator.h>
#include <gpd/candidate/hand_search.h>
#include <gpd/util/config_file.h>
#include <gpd/util/plot.h>
namespace gpd {
namespace apps {
namespace generate_candidates {
// function to read in a doub... |
// ROS includes
#include "ros/ros.h"
#include "ros/assert.h"
#include "dynamic_reconfigure/server.h"
#include "create_driver/vicon_driver.h"
#include "geometry_msgs/Twist.h"
// Library includes
#include <string>
#include <vector>
#include <map>
#include <Eigen/Core>
#include <Eigen/LU>
// Local Package includes
#incl... |
// Copyright (c) 2020 The Plankton Authors.
// All rights reserved.
//
// This source code is derived from UUV Simulator
// (https://github.com/uuvsimulator/uuv_simulator)
// Copyright (c) 2016-2019 The UUV Simulator Authors
// licensed under the Apache license, Version 2.0
// cf. 3rd-party-licenses.txt file in the roo... |
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
//works for multiple values too
struct STM {
#define lc t[cur].l
#define rc t[cur].r
struct node {
int l, r, sz;
} t[N * 30];
int T;
int id[N * 30];
STM() {
T = 0;
for (int i = 1; i < N * 30; i++) id[i] = i;
}
... |
#include <iostream>
#include <climits>
using namespace std;
// Structure of Node
class Node{
public:
int data;
int degree;
Node* parent;
Node* child;
Node* sibling;
};
/***************************************/
Node* root = NULL;
// link two heaps by making h1 as a child of h2.
int binomialLink(... |
#include <giomm.h>
#include <glibmm/variant.h>
#include "ofMain.h"
#include "ofxCv.h"
#include "ofxOpenCv.h"
#include "streamer.hpp"
using namespace ofxCv;
using namespace cv;
namespace
{
Streamer m_writer;
Glib::ustring m_uri;
Glib::ustring m_source_dir;
Glib::ustring m_destination_dir;
std::ma... |
/***************************************************************************
pppm_ext.cpp
-------------------
<NAME> (ORNL)
Functions for LAMMPS access to PPPM acceleration routines
___________________________________________... |
/*
Copyright [2008] [<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 <math.h>
#include <stdio.h>
#include <PnC/RobotSystem/RobotSystem.hpp>
#include <PnC/ScorpioPnC/ScorpioInterface.hpp>
#include <PnC/ScorpioPnC/TestSet/OSCTest.hpp>
#include <PnC/ScorpioPnC/TestSet/GraspingTest.hpp>
#include <Utils/IO/IOUtilities.hpp>
#include <Utils/Math/MathUtilities.hpp>
#include <PnC/Scorpi... |
#include "oiserver.h"
#include <QDebug>
OIServer::OIServer(QObject *parent) : QObject(parent),
m_quality(MbData::Quality::Good),
m_works(false),
m_clientAddr(DEFAULT_CLIENT_ADDRESS),
m_requestDelay(DEFAULT_REQUESTS_INTERVAL)
{
qDebug() << "IOServer constructor";
//--- IODriver ----
m_ptrL... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
/*
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement
For Open Source Computer Vision Library
(3-clause B... |
/*
* Main.cpp
*
* Created on: Nov 29, 2016
* Author: cochez
*/
//#include "RandomWalkExperiments.h"
#include "nTripleParser.h"
#include <iostream>
#include <utility>
#include <unordered_map>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <fstream>... |
// $Id: LB_Factory_Server.cpp 91825 2010-09-17 09:10:22Z johnnyw $
#include "LB_Factory_Server.h"
#include "Simple.h"
#include "Factory.h"
#include "TestC.h"
#include "ace/OS_NS_stdio.h"
#include "ace/Get_Opt.h"
const ACE_TCHAR* factory1_file = ACE_TEXT ("factory1.ior");
const ACE_TCHAR* factory2_file = ACE_TEXT ("f... |
// TextMateAnnotator.cpp
#include "TextMateAnnotator.h"
#include "Document.h"
#include "TextStyleRegistry.h"
#include <string>
#include <algorithm>
TextMateAnnotator::TextMateAnnotator( const Document& doc, TextStyleRegistry& styleRegistry )
: m_doc( doc )
, m_styleRegistry( styleRegistry )
, m_defaultStyle( style... |
/*---------------------------------------------------------------------------*\
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... |
#include <iostream>
#include <fstream>
#include <thread>
#include <string>
using namespace std;
static const char SHIP_SYMBOL = '*';
static const char DEAD_SHIP_SYMBOL = 'x';
static const char SLIP_SYMBOL = '-';
class Field {
static const int size = 10;
static const char COMMAND_HELP = 'h';
static cons... |
#include "sim.h"
extern std::mutex mtx;
#if TRACE
/*
* Simulation time used for trace purpose
*/
vluint64_t sim_time;
// Called by $time in Verilog
double sc_time_stamp() { return main_time; }
#endif
AXISimulatorDriver::AXISimulatorDriver() {
top = new Vtop("top");
#if TRACE
tfp = new VerilatedVcdC;
top->... |
#include <saucats/Geometry>
#include <saucats/Macros>
#include <saucats/Render>
#include <saucats/SDF>
#include <saucats/utils/Algorithm.h>
#include <tclap/CmdLine.h>
#include <fstream>
#include <iostream>
using namespace std;
using namespace saucats;
/*
* Define the shapes to dock together
*/
auto
get_left_s... |
#include <ctime>
#include <fstream>
#include <iostream>
#include <string>
#include <sstream> // std::stringstream
#include <math.h>
#include "Global_variables.h"
//#include "Population.h"
using namespace std;
//// Global variables - Externally defined
//extern std::string extension;
//extern std::string... |
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
#include <iostream>
#include <memory>
#include <stdexcept>
#include "constraints.hpp"
#include "tests.hpp" // define strings LWEVSS_TESTS::passed and LWEVSS_TESTS::failed
using namespace DLPROOFS;
bool test_splitBy()
{
PtxtVec vec = {
{1, Scalar().setInteger(1)},
{3, Scalar().setInteger(3)},
... |
#include <boost/python.hpp>
#include <boost/python/implicit.hpp>
#include <boost/python/make_constructor.hpp>
#include <boost/variant.hpp>
#include <boost/python/copy_const_reference.hpp>
#include <boost/python/return_value_policy.hpp>
#include "type_printer.hpp"
#include "utility/isinstance.hpp"
#include "raw_construc... |
/*
# Headers
C++ stdlib headers that are not C stdlib headers don't have the `.h` extension,
and therefore are not included with the `.h` extension.
Pre-standardized versions of C++ by Stroustrup used the `.h` extension, for example `iostream.h`,
but this has been deprecated: <http://stackoverflow.com... |
#include <iostream>
#include <Eigen/Dense>
#include <Eigen/Core>
#include <Eigen/QR>
#include <Eigen/Eigenvalues>
#include <chrono>
#include <cxxopts.hpp>
#include "DavidsonSolver.hpp"
#include "DavidsonOperator.hpp"
#include "MatrixFreeOperator.hpp"
#include <iostream>
#include <fstream>
#include <string>
using na... |
#include "QSqlTestJsonFile.h"
#include <QFile>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QtGlobal>
#include <QDebug>
#define CHECK_REQUIREMENT(cond, err) \
if (!cond) { ... |
/// String Hash with Segment Tree
/// Allows setting range with a character, querying hash of a range in O(log n)
/// String functions uses 0-based index, however segment tree uses 1-based index
namespace strhash{
#define LET 10 /// Number of distinct letters in string, Set to digits [0-9] by default
#define A... |
/*
CapacitiveSense.h v.04 - Capacitive Sensing Library for 'duino / Wiring
https://github.com/PaulStoffregen/CapacitiveSensor
http://www.pjrc.com/teensy/td_libs_CapacitiveSensor.html
http://playground.arduino.cc/Main/CapacitiveSensor
Copyright (c) 2009 <NAME> All right reserved.
Version 05 by <NAME> - Support no... |
#include "wall.h"
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include "texture_cache.h"
#include "engine.h"
#include <math.h>
#include "misc.h"
#include "geometry.h"
#include <algorithm>
#include <stdio.h>
using namespace sf;
Wall::Wall(double x, double y, double w, double h, double angle0, const Textur... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctime>
#include "trimesh.h"
#define MIN(x,y) ((x) <= (y) ? (x) : (y))
#define MAX(x,y) ((x) >= (y) ? (x) : (y))
int main(int argcs, char* pArgs[])
{
int b, c, i, j, k, nn, nt, nb, tdim, n0, n1, m, n;
const int bdim = 132;
char... |
#pragma once
#include <vector>
#include <stack>
#include "Engine/Input/KeyButtonState.hpp"
#include "Engine/Input/XboxController.hpp"
#include "Engine/Math/Vec2.hpp"
class InputObserver;
class IVec2;
class Window;
class InputSystem
{
public:
InputSystem( Window* window );
~InputSystem() {};
static Inpu... |
/***************************************************************************
cchip.c
This file contains routines to interface with the Taito Controller Chip
version 1. It's currently used by Superman and Mega Blade.
According to <NAME>, the C-Chip is an encrypted Z80 which communicates
with the main board as a pr... |
// Copyright (c) OpenMMLab. All rights reserved.
#include "detector.h"
#include <numeric>
#include "apis/c/common_internal.h"
#include "apis/c/executor_internal.h"
#include "apis/c/model.h"
#include "apis/c/pipeline.h"
#include "archive/value_archive.h"
#include "codebase/mmdet/mmdet.h"
#include "core/device.h"
#inc... |
/**
@file
@brief Plugin to verify the ordering of session and transaction start and
close hooks is correct. Keeps track of statistics about the number of
hooks tracked that are caught and of the number of errors encountered.
@section license License
Licensed to the Apache Software Foundation (ASF) under o... |
//----------------------------------*-C++-*----------------------------------//
// Copyright 2021 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//-------------------------------------------------------------------------... |
//------------------------------------
// (c) Reliable Software, 1996 - 2007
//------------------------------------
#include "precompiled.h"
#include "SetupCtrl.h"
#include "OutputSink.h"
#include "Global.h"
#include "BuildOptions.h"
#include "GlobalMessages.h"
#include "Catalog.h"
#include "License.h"
#include "reso... |
#include "comm.h"
using namespace std;
//127. Word Ladder
// void ladderLengthDFS(const string &endWord, string &curWord, int idx, unordered_map<string, bool> &visited,
// vector<string> &path, vector<int> &ans){
// //take the reference of visited
// auto isValidWord = [&](const string &w){
//... |
/**
* \file dnn/src/cuda/local_share/backward_filter/batched_matmul.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the Licens... |
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in co... |
/*
* Copyright 2008 <NAME>, <EMAIL>. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "CalendarMenuWindow.h"
#include <Button.h>
#include <CalendarView.h>
#include <GridLayoutBuilder.h>
#include <GroupLayout.h>
#include <GroupLayoutBuilder.h>
#include <GroupView.h>
#include <Loca... |
#include "run_async.h"
#include "duktapevm.h"
#include "callback.h"
#include "nan_addon.h"
#include <string>
#include <vector>
using namespace v8;
namespace {
using nan_addon::PersistentCallback;
// Forward declaration for APICallbackSignaling destructor.
void cleanupUvAsync(uv_handle_s* handle);
// Forward decl... |
/**************************************************************************\
* Copyright (c) <NAME> & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistribu... |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#include "stdafx.h"
#include "app_main.h"
#include "xplat.h"
#include "trace_writer.h"
#include "utils.h"
#include "servicing.h"
#include <sstream>
#inc... |
#include "global.h"
#include "ScreenTestSound.h"
#include "RageDisplay.h"
#include "ScreenManager.h"
#include "RageSoundManager.h"
#include "ThemeManager.h"
#include "RageUtil.h"
ScreenTestSound::ScreenTestSound( const CString &sClassName ) : Screen( sClassName )
{
this->AddChild(&HEEEEEEEEELP);
const CString sFon... |
/***************** GPS stuff *******************
Using the Sparkfun u-blox SAM-M8Q
Qwiic connection
NOTE - the GPS breakout does not work through the mux. It needs interrupts
/ callback to run, and this doesn't work when it's mux port is disabled
***/
#include "MySensor.h"
#include <Wire.h>
#include <... |
#include "critter.hpp"
#include "Game.hpp"
#include "math.h"
#include "tileController.hpp"
#include <cmath>
Critter::Critter(const sf::Texture & txtr, Tile _map[61][61], float _xInit,
float _yInit)
: Enemy(_xInit, _yInit), xInit(_xInit), yInit(_yInit), currentDir(0.f),
spriteSheet(txtr), awa... |
/*
* Copyright (C) 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 agree... |
#include <cassert>
#include <iostream>
#include "eigen.h"
#include "formant/viterbi.h"
using namespace Eigen;
double Viterbi::combinations(int n, int k)
{
long double result = 1.0;
if (k > n / 2) k = n - k;
for (int i = 1; i <= k; ++i) result *= n - i + 1;
for (int i = 2; i <= k; ++i) result /= i;
... |
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
#include <QPushButton>
#include <QLabel>
#include <QFileDialog>
#include "importnesdialog.h"
using namespace std;
ImportNESDialog::ImportNESDialog(QWidget* parent, shared_ptr<Project> project): QDialog(parent), m_project(project)
{
QVBoxLayout* la... |
// license:BSD-3-Clause
// copyright-holders:<NAME>, <NAME>
/***************************************************************************
galaxy.c
Functions to emulate the video hardware of the Galaksija.
20/05/2008 - Real video implementation by <NAME>
01/03/2008 - Update by <NAME> to make Galaksija video wo... |
#include <stat/stats.hpp>
#include "Reg.h"
#define STATS_GO_INLINE
using namespace std;
using Eigen::MatrixXd;
using Eigen::VectorXd;
// Each x should be centered with respect to itself.
void Regresser::generateSubsample(vector<int> &subsample, int num, int m)
{
for (int i = 0; i < num; i++)
{
subsample.push_b... |
#include "Utility/package.h"
#include "package.h"
//---------------------------------------------------------------------------------
// Written by <NAME> - tjgrant [at] tatewake [dot] com
// Find the full tutorial at: http://gamedev.tutsplus.com/series/
//-------------------------------------------------------------... |
/*
Name: AVL tree
Time complexity: O(logN) per operation
Space complexity: O(N)
*/
#include <bits/stdc++.h>
using namespace std;
template <typename T>
class AVLTree {
private:
struct Node {
int key, height;
T data;
Node *l, *r, *parent;
Node(pair<int, T> p, Node *pare... |
//===- AssumeBundleBuilder.cpp - tools to preserve informations -*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/*****************************************************************************
FILE: FIBDetect.cpp
AUTHOR: wan
CREATED: 2/16/2017
*******************************************************************************/
#include "FIBDetect.h"
EcgMark FIBDetect(float rr,long currentTime,int type){//
static int counter =0;... |
#include <string.h>
#include "rubidium_hash_sha512.h"
#include "rubidium_sign_ed25519.h"
#include "sign_ed25519_ref10.h"
#include "private/ed25519_ref10.h"
#include "randombytes.h"
#include "utils.h"
void
_rubidium_sign_ed25519_ref10_hinit(rubidium_hash_sha512_state *hs, int prehashed)
{
static const unsigned ch... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <numeric>
#include <algorithm>
#include <string.h>
#include <assert.h>
#include <omp.h>
using namespace std;
template <typename T>
vector<size_t> sortIndices(const vector<T> &v) {
// initialize original index locations
ve... |
#include <ilcplex/cplex.h>
#include <chrono>
#include <cmath>
#include <fstream>
#include <iostream>
#include <random>
#include <string>
#include "TSPinstance.hpp"
using std::pair;
using std::string;
using std::vector;
TSPinstance::TSPinstance() : points(nullptr) {}
TSPinstance::~TSPinstance() { delete points; }
c... |
#include "FoveatedRendererBase.h"
FoveatedRendererBase::FoveatedRendererBase(int window_height, int window_width, int fbo_size, int oszoom ):
_window_height(window_height), _window_width(window_width), _fbo_size(fbo_size), _OSzoom(oszoom)
{
_gaze_data_file = "";
_with_gaze_data = true;
_with_fr = true;
_wit... |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
#include<iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <sstream>
using namespace std;
struct ListNode{
int val;
ListNode *... |
/*
** Copyright 2011-2019 Centreon
**
** This file is part of Centreon Engine.
**
** Centreon Engine 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.
**
** Centreon Engine is distributed in the hope... |
#include "Tokens/ASSIGN.h"
inline bool isFloat( std::string myString ) {
std::istringstream iss(myString);
float f;
iss >> std::noskipws >> f; // noskipws considers leading whitespace invalid
return iss.eof() && !iss.fail();
}
inline bool isInt(const std::string& s)
{
std::string::const_iterator ... |
#include <algorithm>
#include <dicomcodecs/exception.hpp>
#include <dicomcodecs/image.hpp>
#include <vector>
using namespace dicomcodecs;
using namespace std;
struct ByteWriter {
public:
ByteWriter(size_t size = 65536) {
buffer_.resize(0);
buffer_.reserve(size);
}
virtual ~ByteWriter() {}
void Reset(... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
// CryCommon
#include <CryCommon/Maestro/Types/AnimNodeType.h> // for An... |
// 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/window_sizer/window_sizer.h"
#include "ash/ash_switches.h"
#include "ash/shell.h"
#include "ash/wm/mru_window_tracker.h"
... |
/*
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2020 Gothel Software e.K.
* Copyright (c) 2020 ZAFENA AB
*
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2016 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.