text stringlengths 3.08k 12.5k |
|---|
/******************************************************************************
* Copyright AllSeen Alliance. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and th... |
// Copyright 2022 PingCAP, Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... |
#include "my_robot_loop.h"
RobotLoop::RobotLoop():
pMyRobotControl(nullptr),
pMyForceSensorOne(nullptr),
pMyForceSensorTwo(nullptr)
{
}
void RobotLoop::init_param(MyForceSensorOne *pSensorOne, MyForceSensorTwo *pSensorTwo, MyRobotControl *pRobot,QString path){
pMyForceSensorOne = pSensorOne;
pMyFor... |
#ifndef __PROGTEST__
#define pause() system("pause");
#else
#define pause();
#endif
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define IS_VALID(v, x, y) allowed_values[x][y] == allowed_bitfield[v]
typedef struct SudokuPosition {
unsigned short possible_number_count = 0;
unsign... |
#include "Command.h"
Command::Command(Debug &debug, string userID, string shell) : debug(ref(debug)), userID(std::move(userID)), shell(std::move(shell)) {}
Command::~Command()
{
// Close the write end of the write pipe
close(this->outPipeFD[1]);
// Close the read end of the read pipe
close(this->inP... |
// KarplusSynth.cpp
// <NAME>, MIT License, 2018
#include "KarplusStrong.h"
void np::synth::KarplusStrong::Voice::patch() {
addModuleInput("trig", triggers);
addModuleInput("pitch", comb.in_pitch() );
addModuleInput("damping", comb.in_damping() );
addModuleInput("fb", fbBoundaries );
addModul... |
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
#include "pfc-lite.h"
#include "guid.h"
#include "debug.h" // pfc::crash()
#include "string_base.h"
#ifdef _WIN32
#include <Objbase.h>
#else
#include "nix-objects.h"
#endif
/*
6B29FC40-CA47-1067-B31D-00DD010662DA
.
typedef struct _GUID { // size is 16
DWORD Data1;
WORD Data2;
WORD Data3;
... |
#include "BoolCircuit.h"
#include "GateBoolAND.h"
#include "GateBoolNAND.h"
#include "GateBoolOR.h"
#include "GateBoolXOR.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <assert.h>
using namespace std;
BoolCircuit::BoolCircuit(const string filename) {
parse(filename);
consolidate()... |
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2002-2012 Free Software Foundation Europe e.V.
Copyright (C) 2015-2017 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Lice... |
#include "mbed.h"
#include "DHT.h"
#include "TextLCD.h"
#include <vector>
#include <string>
#include <stdio.h> //float-to-string
#include "scd30.h"
#define MAX_SAMPLE_COUNT 3
#define ERROR_VALUE -99
#define LCD_TIMEOUT_MS 5000
/**
* Note:
* the D0 and D1 pins are not available per defa... |
// Copyright 2019 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
/**
* This file is part of Intrinsic3D.
*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019, Technical University of Munich. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions ... |
/* GangConnection.cpp
*
* Revamped PCO area detector driver.
* The communication connection class for a ganged client
*
* Author: <NAME>
* <NAME>
*
*/
#include "GangConnection.h"
#include "GangMemberConfig.h"
#include "GangServer.h"
#include "TraceStream.h"
#include "Pco.h"
#include "epicsExport.h"
#... |
// Copyright (C) 2021-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <stddef.h>
#include <set>
#include <tuple>
#include <unordered_map>
#include <vector>
#include <opencv2/core.hpp>
struct TrackedObject {
cv::Rect rect;
float confidence = -1.0f;
int object_id = ... |
// -*- Mode:C++; Coding:us-ascii-unix; fill-column:158 -*-
/**************************************************************************************************************************************************************/
/**
@file level_curves.cpp
@author <NAME> <https://www.mitchr.me>
@brief Draw level c... |
#include <cstdlib>
#include <fstream>
#include <stdexcept>
#ifndef _WIN32
#include <sys/wait.h>
#endif
#include <util/bv_arithmetic.h>
#include <util/mp_arith.h>
#include <cegis/instrument/literals.h>
#include <cegis/genetic/concrete_test_runner.h>
#define EXECUTABLE_PREFIX "test_runner"
#define EXECUTABLE_SUFFIX "... |
#include <bits/stdc++.h>
#include <cctype>
#include <csv.h>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <pugixml.hpp>
#include <string>
#include <vector>
using namespace std;
void field_read(void *data, size_t len, void *ptr) {
if (len < 1) {
return;
}
auto tiles = (vector<vector<... |
//----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2018, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following c... |
#include <ag_utils.h>
#include <ag_net_utils.h>
#include <ag_socket_address.h>
#include <event2/util.h>
#ifndef _WIN32
#include <net/if.h> // For if_nametoindex/if_indextoname
#else
#include <Iphlpapi.h>
#include <Winsock2.h>
#include <Ws2tcpip.h>
#ifndef INET6_ADDRSTRLEN
#define INET6_ADDRSTRLEN 46
#endif
#endif
std... |
#include "Relaxation.h"
#include <iostream>
#include <cmath>
using namespace std;
struct Vortex_Param
{
int n2;
double lambda;
double e2;
};
void DIFEQ_ODD(const Relaxation_Param relax_param, void *param, VVD &S)
{
for (size_t i = 0; i < S.size(); i++)
{
for (size_t j = 0; j < S[i].size(... |
/*############################################################################
# Copyright (C) Intel Corporation
#
# SPDX-License-Identifier: MIT
############################################################################*/
#include "sample_vpp_frc_adv.h"
#include <math.h>
#include <algorithm>
#include "vm/st... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(0,0,0);
ofEnableSmoothing();
ofEnableAlphaBlending();
ofSetWindowTitle("color example");
ofSetRectMode(OF_RECTMODE_CENTER);
ofSetFrameRate(60); // if vertical sync is off, we ... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyPawn.h"
#include "Uke3_UE.h"
#include "Enemy.h"
#include "Bullet.h"
#include "Kismet/GameplayStatics.h"
#include "Engine/World.h"
#include "Components/BoxComponent.h"
#include "Components/StaticMeshComponent.h"
#include "Camera/... |
/*
Copyright (c) 2005-2019 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
#include<iostream>
#include<ctime>
#include<cstdlib> // 随机数 rand()
#include<memory.h> // memcpy
#include "mythreadlock.h"
#define DEL_PTR(p) if(p) delete p; p=NULL;
#define DEL_PTR_ARRAY( p ) if(p) delete [] p; p = NULL;
#define varName(x) #x
#define MaxArray 102030
#define MaxData 10203040
using std::cout;
us... |
#include <iostream>
#include <cmath>
#include "types.hpp"
#include "nodes/VectorAddNode.hpp"
#include "nodes/InputNode.hpp"
#include "CompilationMemoryMap.hpp"
#include "GraphCompilationPlatform.hpp"
#include "GraphCompilationPlatformFactory.hpp"
float testVectorAddNode(const MemoryDimensions input1Dim, InputDataBuff... |
//===--- FormalEvaluation.cpp ---------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
// bin/copy-matrix.cc
// Copyright 2009-2011 Microsoft Corporation
// See ../../COPYING for clarification regarding multiple 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
//
... |
/* -*- C++ -*-
* File: raw2text.cpp
* Copyright 2008-2021 LibRaw LLC (<EMAIL>)
* Created: Sun Sept 01, 2020
*
* LibRaw sample
* Dumps (small) selection of RAW data to text file
*
LibRaw is free software; you can redistribute it and/or modify
it under the terms of the one of two licenses as you choose:
1. GNU L... |
#include <http/TLSHandler.hpp>
#include <memory>
using namespace http;
using namespace std;
#ifdef TLS_DEBUG
static void my_debug(void *ctx, int level,
const char *file, int line,
const char *str)
{
((void)level);
mbedtls_fprintf((FILE *)ctx, "%s:%04d: %s", file, line, str);
fflush(... |
#include "game.h"
#include <algorithm>
#include <fstream>
#include <iostream>
using namespace std;
using namespace wotreplay;
const std::vector<packet_t> &game_t::get_packets() const {
return packets;
}
const std::string &game_t::get_map_name() const {
return map_name;
}
const std::string &game_t::get_gam... |
// Copyright (c) 2015-2017 <NAME>
// SPDX-License-Identifier: BSL-1.0
#include <Pothos/Framework.hpp>
#include <algorithm> //min/max
#include <iostream>
#include <thread>
#include <chrono>
/***********************************************************************
* |PothosDoc TX Burst Timer
*
* Schedule a transmit b... |
/**
\file
\author <NAME>
*/
#include "LuaScriptItem.h"
#include "LuaInterpreter.h"
#include <cnoid/ItemManager>
#include <cnoid/Archive>
#include <cnoid/FileUtil>
#include <cnoid/LazyCaller>
#include <cnoid/MessageView>
#include <fmt/format.h>
#include "gettext.h"
using namespace std;
using namespace cnoid;
nam... |
/*
Copyright (c) 2015, Project OSRM contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list
of conditions and the f... |
#include <IO/ReadBufferFromString.h>
#include <IO/ReadHelpers.h>
#include <Poco/ConsoleChannel.h>
#include <Common/ZooKeeper/KeeperException.h>
#include <Common/ZooKeeper/ZooKeeper.h>
#include <common/LineReader.h>
#include <common/logger_useful.h>
#include <fmt/format.h>
#include <iostream>
#include <sstream>
#includ... |
//
// Created by <NAME> on 2021/1/7.
//
#include <cassert>
#include <cerrno>
#include <climits>
#include <cstring>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cxxopts.hpp>
... |
/****************************************************************************\
* Copyright (c) 2011, Advanced Micro Devices, Inc. *
* All rights reserved. *
* *
... |
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <queue>
#include <stack>
#include <cassert>
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sd3(x,y,z) scanf("%d%d%d",&x,&... |
#include "armor.hpp"
#include <vector>
Armor::Armor(const IClassifier& classifier, const IParams& params, const IParams& requirements) :
IItem(),
_classifier( classifier ),
_params( params ),
_requirements( requirements )
{
}
void Armor::get_classifier(IClassifier& classifier) const {
... |
#include <math.h>
#include <array>
#include <swerve_math/SwerveMath.h>
#include <ros/ros.h>
#include <ros/console.h>
using namespace std;
// TODO : use intializer list
// Make arg const &
swerveDriveMath::swerveDriveMath(array<Eigen::Vector2d, WHEELCOUNT> wheelCoordinate)
{
wheelCoordinate_ = wheelCoordinate;
parki... |
/* Copyright <NAME>. Inspiredd by libuv link: http://www.libuv.org
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), toi
* deal in the Software without restriction, including without limitation the
* rights to u... |
/* -*- indent-tabs-mode: nil -*- */
#include "log/file_storage.h"
#include <assert.h>
#include <cstdlib>
#include <dirent.h>
#include <errno.h>
#include <set>
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include "log/filesystem_op.h"
#include "util/util.h"
using std::string;
FileStorage::FileStorage... |
#include "algorithms/include/iterative_policy_evaluation.h"
#include "common/include/error_macros.h"
#include "environments/grid_world/include/grid_world.h"
#include <gflags/gflags.h>
#include <string>
#include <map>
namespace mnyrve {
namespace examples {
using mnyrve::environments::GridWorld;
using mnyrve::algorit... |
#include "CondFormats/SiStripObjects/interface/SiStripSummary.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <algorithm>
SiStripSummary::SiStripSummary(std::vector<std::string>& userDBContent) {
userDBContent_ = userDBContent;
runNr_ = 0;
timeValue_ = 0;
}
SiStripSummary::SiStripSummary(... |
// "$Id: ComboBox.cxx 1513 2007-03-07 16:46:20Z spitzak $"
//
// Copyright 1998-2006 by <NAME> and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of th... |
#include <cstdio>
#include "vector3.h"
#include <qd/dd_real.h>
#include <qd/dd_inline.h>
inline dd_real rsqrt(const dd_real &x){
double y_app = 1.0 / sqrt(to_double(x));
dd_real x2 = mul_pwr2(x, 0.5);
return y_app * (dd_real(1.5) - x2 * sqr(y_app));
}
typedef vector3<dd_real> qvec3;
template <> template <>
vecto... |
#include <limits>
#include <chrono>
#include <random>
#include <algorithm>
#include <iostream>
#include <iomanip>
constexpr int MAX_CITIES = 15;
template <class T>
struct counting_iterator {
private:
typedef counting_iterator<T> self;
public:
typedef T value_type;
typedef typename std::make_signed<T>::type di... |
/*This file is part of the FEBio Studio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio-Studio.txt for details.
Copyright (c) 2020 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any per... |
/*
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
/*
Copyright 2011 <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,... |
#include <iostream>
#include <cstring>
#include <fstream>
using namespace std;
const int maxAthletesCount = 15;
class Athlete{
public:
Athlete();
Athlete(int, const char*, const char*, int[5]);
Athlete(const Athlete&); // Copy constructor
Athlete& operator=(const Athlete&); // Operator =... |
#include <nstd/String.hpp>
#include <nstd/Debug.hpp>
#include <nstd/List.hpp>
#include <cctype>
void testString()
{
// test constructors
String empty;
ASSERT(empty.isEmpty());
String hello(_T("hello"));
ASSERT(!hello.isEmpty());
String copyOfHello(hello);
ASSERT(!copyOfHello.isEmpty());
String copyOf... |
#include "RecoilBlaster.h"
#include "BLEDevice.h"
#include <Arduino.h>
#include <functional>
RecoilClientCallback::RecoilClientCallback(RecoilBlaster &blaster)
{
this->pBlaster = &blaster;
}
void RecoilClientCallback::onConnect(BLEClient *pclient)
{
// do nothing?
}
void RecoilClientCallback::onDisconnect(BL... |
#import "chordquality.hpp"
std::string Qualities::toString() {
#define serialize_quality(k, mm, MM, nn, missing) do { \
if (k == Quality::Missing) str.append(missing); \
else if (k == Quality::Flat) str.append(mm); \
else if (k == Quality::Sharp) str.append(MM); \
else str.append(nn... |
// Copyright (c) 2013 Elements of Programming Interviews. All rights reserved.
#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iostream>
#include <random>
#include <vector>
using std::cout;
using std::default_random_engine;
using std::deque;
using std::endl;
using std::ostream_iter... |
///////////////////////////////////////////////////////////////////
//
// Patch Matrix Module for VCV
//
// Strum 2017
// <EMAIL>
//
///////////////////////////////////////////////////////////////////
#include "mental.hpp"
#include "dsp/digital.hpp"
namespace rack_plugin_mental {
struct MentalPatchMatrix : Module... |
// The MIT License (MIT)
//
// Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
//
// 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 wit... |
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <bits/stdc++.h>
#include <functional>
#include <list>
#include <unordered_map>
#include <vector>
#include "graph.h"
#include "map.h"
#include "algorithms.h"
#include "priority_queue.h"
using namespace pathfinder;
TEST(AStarAlgorithm, findPaths_test0)
{
s... |
// Incompressible Flow Solver
// Copyright (C) 2005 <NAME>
//------------------------------------------------------------------------------
// Created on: 16 Mar 2004
// Last update: 25 Mar 2005
//------------------------------------------------------------------------------
#include <iostream>
#include... |
/**************************************************************
*
* 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... |
//
// Created by <NAME> on 2021-06-04.
//
#include "suil/sawtooth/tp.hpp"
#include <suil/base/syson.hpp>
namespace sp {
using sawtooth::protos::Message;
using sawtooth::protos::TransactionHeader;
using sawtooth::protos::TpRegisterRequest;
using sawtooth::protos::TpRegisterResponse;
using sawtooth... |
#include "MotionControl.hpp"
#include <Context.hpp>
#include <Geometry2d/Util.hpp>
#include <Robot.hpp>
#include <RobotConfig.hpp>
#include <Utils.hpp>
#include <optional>
#include <planning/MotionInstant.hpp>
using namespace std;
using namespace Geometry2d;
using namespace Planning;
#pragma mark Config Variables
R... |
/* Copyright (c) <2003-2016> <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,
* includi... |
/* mbr.cc -- Functions for loading, saving, and manipulating legacy MBR partition
data. */
/* Initial coding by <NAME>, January to February, 2009 */
/* This program is copyright (c) 2009-2013 by <NAME>. It is distributed
under the terms of the GNU GPL version 2, as detailed in the COPYING file. */
#define __STD... |
// Copyright (c) <NAME>.
// SPDX-License-Identifier: MIT
#include <fstream>
#include <iostream>
#include <vector>
#include <iterator>
#include <time.h>
#include <algorithm>
#include "../../src/HTJ2KDecoder.hpp"
#include "../../src/HTJ2KEncoder.hpp"
void readFile(std::string fileName, std::vector<uint8_t> &vec)
{
... |
/*******************************************************************************
* The MIT License (MIT)
*
* 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... |
#define GL_GLEXT_PROTOTYPES
#include <GLES/gl.h>
#include <GLES/glext.h>
#include <GLES3/gl3.h>
#include <stdio.h>
#include <emscripten.h>
#include <emscripten/html5.h>
#define GL_CALL( x ) \
{ \
x; \
GLenum error = glGetError(); \
if( error != GL_NO_ERROR ) \
printf( "GL ERROR:... |
/*
Copyright (c) 2007 <NAME>. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... |
////////////////////////////////////////////////////////
//
// Created by john on 15/8/21.
//
#include "utils.h"
#include <unistd.h>
#include <sys/stat.h>
#include <dirent.h>
#include <iostream>
#include <regex>
#include <pwd.h>
#define BUFFER_SIZE 32000
#define DELIMETER ","
static char BUFFER[BUFFER_SIZE];
std::s... |
/* journal_test.cc -*- C++ -*-
<NAME>, 12 April 2012
Copyright (c) 2012 Datacratic. All rights reserved.
Test for the journalling facility
*/
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include "mmap_test.h"
#include "mmap/journal.h"
#include "mmap... |
/* 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, merge, publish, distrib... |
//
// Created by Tyler on 11/17/20.
//
#include "dledger/record.hpp"
#include "dledger/ledger.hpp"
#include "dynamic-function-runner.h"
#include <iostream>
#include <unordered_set>
#include <ndn-cxx/util/scheduler.hpp>
#include <boost/asio/io_service.hpp>
#include <ndn-cxx/util/io.hpp>
#include <random>
std::random_d... |
/*
*
* 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"); y... |
// Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifdef HAVE_CONFIG_H
#endif
#include <transactiondesc.h>
#include <bitcoinunits.h>
#include <guiutil.h>
#include <transact... |
/*
* Copyright (C) 2008 - 2012 TrinityCore <http://www.trinitycore.org/>
*
* Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/>
*
* 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; ... |
#include <ct/ct.hpp>
#include <ct/platform/platform.hpp>
#include <ct/platform/render_window.hpp>
#include <glad/glad.h>
ct::Logger logger;
typedef struct {
GLuint vao;
GLuint ibo;
GLuint vertices_vbo;
GLuint color_vbo;
} TriangleMesh;
bool check_shader_compilation(GLuint shader) {
int success;
glGetShaderiv... |
//
// NNClassifier.cpp
// TLD
//
// Created by 陈裕昕 on 11/4/14.
// Copyright (c) 2014 Fudan. All rights reserved.
//
#include "NNClassifier.h"
NNClassifier::NNClassifier():
thPos(NN_TH_POS)
{
}
NNClassifier::~NNClassifier()
{
}
float NNClassifier::calcNCC(const Mat &patch1, const Mat &patch2)
{
if(... |
// license:BSD-3-Clause
// copyright-holders:<NAME>
/**********************************************************************
machine.c
Functions to emulate general aspects of the machine (RAM, ROM, interrups,
I/O ports)
**********************************************************************/
#include "emu.h"
#i... |
/***********************************************************************
Copyright (c) 2017, The OpenBRAS project authors. 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 sou... |
#include "snowman.hpp"
#include <array>
using namespace ariel;
using namespace std;
const int PART_OF_BODY = 8;
const int OPTION = 4;
const int INPUT_SIZE = 8;
const int HAT = 0;
const int NOSE_MOUTH = 1;
const int LEFT_EYE = 2;
const int RIGHT_EYE = 3;
const int LEFT_ARM = 4;
const int RIGHT_ARM = 5;
const int TORSO... |
/*
RFSniffer connected to RPI GPIO 2 / BCM27 / Pin 13
Usage: ./RFSniffer [<pulseLength>]
[] = optional
Hacked from http://code.google.com/p/rc-switch/
by @justy to provide a handy RF code sniffer
by @josar to forward the massages to MQTT
*/
#include "../rc-switch/RCSwitch.h"
#include <stdlib.h>
#include <s... |
///////////////////////////////////////////////////
// codit-21 's solution and implementation to
// Google Hash Code online qualification round 2021
///////////////////////////////////////////////////
#include <iostream>
#include <queue>
#include <string>
#include <map>
#include <vector>
#include <set>
... |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: <NAME>, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ------------... |
/*=============================================================================
NifTK: A software platform for medical image computing.
Copyright (c) University College London (UCL). All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY o... |
/**
* @file thread_pool_pppcsr.cpp
* @author <NAME>
*/
#include "thread_pool_pppcsr.h"
#include <numa.h>
#include <iostream>
#include <mutex>
#include <thread>
#include <vector>
using namespace std;
/**
* Initializes a pool of threads. Every thread has its own task queue.
*/
ThreadPoolPPPCSR::ThreadPoolPPPCSR... |
#include <sstream>
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <cassert>
#include "kxseq.h"
using namespace std;
using namespace kx;
struct TaxInfo {
int parent;
string rank;
string name;
};
unordered_map<string, int> acc2tid;
vector<Tax... |
#include "eval_helpers.h"
#include <library/threading/local_executor/local_executor.h>
#include <util/generic/algorithm.h>
#include <util/string/builder.h>
#include <util/generic/ymath.h>
#include <util/generic/algorithm.h>
void CalcSoftmax(const TVector<double>& approx, TVector<double>* softmax) {
double maxApp... |
/* tess.c - by <NAME>, SGI */
#include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
#include "code/utilities/graphics/opengl/sphere.hpp"
static GLfloat spin = 0;
static int level = 4;
static int model = 0;
static GLfloat rotx, roty;
static int ox = -1, oy = -1;
static int mot;
#define PAN 1
#define ROT ... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
unsigned char *slapfight_videor... |
/*
link: https://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array/
quick-sort:
The key process in quickSort is partition().
Target of partitions is, given an array and an element x of array as pivot,
put x at its correct position in sorted array and put all smaller elements
(sm... |
/*
Copyright 2016-2018 <NAME>, <NAME>, <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 l... |
// Copyright 2017 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/fpdfapi/page/cpdf_sampledfunc.h"
#include "core/fpdfapi/parser... |
#include <algorithm>
#include <chrono>
#include <cmath> // std::pow, std::sqrt
#include <iomanip>
#include <iostream>
#include <numeric> // std::accumulate
#include <thread>
#include "thpool1/thread_pool.h"
#include "thpool2/thread_pool.h"
#include "thpool3/thread_pool.h"
#include "scenario.h"
scenario::sce... |
#include "stdafx.h"
#include "PhotoEditorView.h"
#include "crackers.h"
#include "Rect.h"
#include "resourceppc.h"
#include "Tools.h"
#include <fstream>
using namespace htmlayout;
using namespace htmlayout::dom;
using namespace std;
using namespace Tools;
//----------
// interface
//----------
Ph... |
/*
* Copyright (c) 2001-2008
* DecisionSoft Limited. All rights reserved.
* Copyright (c) 2004-2008
* Oracle. 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... |
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include "../include/template.hpp"
#include "../include/helpers.hpp"
using namespace std;
TemplateManager::TemplateManager(std::string templateFile)
{
this->tmap = new TemplateMap;
if (templateFile == "")
return;
this->pr... |
#include <sstream>
#include <string>
#include <vector>
#include "test_framework.h"
#include <util/chase_algorithm.h>
TEST(TupleWindowTest, SimpleDiamond) {
std::string stream_string = "0 14 "
"1 : f(x1)\n"
"2 : a(x2)\n"
... |
//
// main.cpp
// sct_change_nifti_pixel_type
//
// Created by <NAME> on 2013-11-12.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
#define _SCL_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdlib>
#include <string>
#include <itkImage.h>
#include <itkImageIOBase.h>
#include <itkImageFileReader.h>
#inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.