text stringlengths 3.08k 12.5k |
|---|
#include <gtest/gtest.h>
#include <utility>
#include "grpc_obj_det/OnnxYoloV4Detector.h"
using namespace std;
#define TEST_ABS_ERROR 0.0001
TEST(OnnxYoloV4DetectorTest, CanInitWhenProvidedValidConfigFiles) {
auto detector = ObjDet::OnnxYoloV4Detector("onnx_yolov4_coco",
... |
#include <AMReX.H>
#include <AMReX_Print.H>
#include <AMReX_PlotFileUtil.H>
using namespace amrex;
namespace {
class BoxND
{
public:
friend std::ostream& operator<< (std::ostream& os, const BoxND& b);
BoxND (Box const& b, int dim) : m_box(b), m_dim(dim) {}
private:
Box m_box;
int m_dim;
};
std::ostr... |
#include <cmath>
#include <cassert>
#include "action.h"
#include "core.h"
Action::Action(const char* action_id, Character* actor, double score)
: action_id_(action_id), actor_(actor), target_(NULL), score_(score) {}
Action::Action(const char* action_id, Character* actor, Character* target,
double ... |
/*******************************************************************************
* Copyright 2020 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/l... |
#include <WiFi.h>
#include "certs.h"
#include "creds.h"
#include "Blockfrost.h"
WiFiClientSecure *sClient;
Blockfrost::CommonApi *comm;
Blockfrost::CardanoApi *cbapi;
Blockfrost::NutLinkApi *nlapi;
void setup(){
Serial.begin(115200);
Serial.print("Attempting to connect to SSID: ");
Serial.println(WIFI_S... |
/*
MIT License
Copyright (c) 2021 Ravin.Wang(<EMAIL>)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, pu... |
#include "PID.h"
#include <cmath>
#include <iostream>
#include <limits>
using namespace std;
/*
* TODO: Complete the PID class.
*/
PID::PID() {}
PID::~PID() {}
/*
* Initialize PID.
*/
void PID::Init(double Kp, double Ki, double Kd, double Max_Output, Tunings Tuning_type) {
//Set PID parameters to assigned valu... |
#pragma once
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/asio.hpp>
#include <ctime>
#include <iostream>
#include <iomanip>
#include <mutex>
#include <string>
#include <vector>
//mutex for when the objects change
std::mutex mMarkerLock;
using boost::asio::ip::u... |
#include <iomanip>
#include <iterator>
#include <numeric>
#include <random>
#include <chrono>
#include <mpi.h>
#include "../../src/parser.hpp"
#include "../../src/input.hpp"
#include "../../src/metroconf.hpp"
constexpr double kb = 0.0000861733; // [eV/K]
double metropolis_like_step(Metroconf& conf, double p){
doubl... |
#include "SpotifyClient.h"
//url will be <name>.local
SpotifyClient::SpotifyClient(String name){
if (MDNS.begin(name.c_str())) {
Serial.println("MDNS responder started");
}
//http://name.local/authentication/
callbackLink = new String("http%3A%2F%2F" + String(name) + ".local%2Fauthentication%2F");
apiClient = n... |
//
// Created by FF on 2019-06-25.
//
#include "MyFFmpeg.h"
/**
* 被子线程调用的初始化FFmpeg,需要定义为全局函数
*/
void *prepareThread(void *args) {
auto *pFFmpeg = static_cast<MyFFmpeg *>(args);
pFFmpeg->prepareFFmpeg();
return nullptr;
}
/**
* 被子线程调用的获取数据包,需要定义为全局函数
*/
void *packetThread(void *args) {
auto *pFFmp... |
// 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 ... |
#include "rdr2geo.h"
#include <pybind11/eigen.h>
#include <pybind11/numpy.h>
#include <stdexcept>
#include <string>
#include <isce3/core/Constants.h>
#include <isce3/core/Ellipsoid.h>
#include <isce3/core/LookSide.h>
#include <isce3/core/LUT2d.h>
#include <isce3/core/Orbit.h>
#include <isce3/core/Vector.h>
#include <... |
#include <stdio.h>
/* This file is in the public domain */
#include <iostream>
#include <iomanip>
#include <ctime>
#include <cmath>
#include <string>
#include <exception>
#include <opencl/filters.h>
using namespace OpenCL_types;
extern OpenCL::RandomNumberGenerator& rng;
struct algorithm
{
algorithm(const ... |
#include "network/network.h"
// Version of protocol
#define NETWORK_PROTOCOL_VERSION 0x0001
// Backward-compatibility with all versions greater than
#define NETWORK_MINIMAL_PROTOCOL_VERSION 0x0001
#include <QDataStream>
#include <QDebug>
#include <QTcpServer>
#include <QTcpSocket>
#include <QUdpSocket>
#include "net... |
#include "pcomplexlib.h"
#include <iostream>
#include <string>
using namespace std;
static const complex j = complex(0.0, 1.0);
int main(int argc, char* argv[]) {
complex a(1.2, 1.2), b(-1.2, -1.2);
try {
cout << "Please, enter a:\n\t";
getValue(a);
cout << "Also, enter b:\n\t";
getValue(b);
... |
// webdass.cpp
#include "Assembler.h"
#include <fstream>
#include <iomanip>
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <vector>
using namespace libwasm;
static void usage(const char* programName)
{
std::cerr << "\nUsage: " << programName << " [options] wat_files\n"
"Options:\n"
... |
#include "MC_SourceNow.hh"
#include "AtomicMacro.hh"
#include "MCT.hh"
#include "MC_Cell_State.hh"
#include "MC_Processor_Info.hh"
#include "MC_Time_Info.hh"
#include "MaterialDatabase.hh"
#include "MonteCarlo.hh"
#include "NVTX_Range.hh"
#include "ParticleVault.hh"
#include "ParticleVaultContainer.hh"
#include "Physic... |
#include "Server.h"
#include "NetworkData.h"
#include <string.h>
#include <iostream>
#include <vector>
#include <string>
//#include <ServerCall.h>
Server::Server(void)
{
WSADATA wsaData;
//sockets for the server
ListenSocket = INVALID_SOCKET;
ClientSocket = INVALID_SOCKET;
//address to listen to
struct addr... |
// This Include
#include "TextLoader.h"
// Local Include
//#include "AssetMgr.h"
#include "Utility.h"
Text::Text(std::string font) :
color(1.0f, 1.0f, 1.0f),
text(""),
scale(1.0f)
{
//m_Program = CAssetMgr::GetInstance()->GetProgramID("Text");
glm::mat4 proj = glm::ortho(0.0f, (GLfloat)util::SCR_WIDTH, 0.0f, (G... |
#include "jk_virtual_file_system.hpp"
#include "base/file_block.hpp"
#include "base/filesystem.hpp"
#include "base/log.hpp"
#include "base/range.hpp"
#include "base/string_search.hpp"
#include "gob_virtual_container.hpp"
#include <string_view>
using namespace jkgm;
namespace {
void load_gob(fs::path const &filena... |
#include "PolygonDecomposition.hpp"
#include <algorithm>
#include <limits>
#include <vector>
#include "LocalVertexBuffer.hpp"
#include "Util.hpp"
#include "Vector2D.hpp"
#include "Geometry.hpp"
// test if a point lies within an arbitrary polygon
bool pnpoly(const v2* vertices, const u32 nvert, const v2& test) {
... |
/*
* Copyright 2019 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "include/core/SkCanvas.h"
#include "include/core/SkTypes.h"
#include "include/utils/SkRandom.h"
#include "modules/particles/include/SkParticleEffect.h"
#include "modul... |
/**************************************************
* TemperatureSensors
*
* Subclasses based on CMySensor for the temperature Sensors
*
* Currently two sensors:
* CDHTTempSensor for the DHT22
* CDS18BTempSensor for the DS18B20 sensor
*************************************************/
#include "MySensor.h"
... |
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This softwa... |
/*
This file is part of INDDGO.
Copyright (C) 2012, Oak Ridge National Laboratory
This product includes software produced by UT-Battelle, LLC under Contract No.
DE-AC05-00OR22725 with the Department of Energy.
This program is free software; you can redistribute it and/or modify
it under the terms of the New BSD 3... |
#include <string>
#include "ir_print.h"
using namespace IR;
// Check if there is an impure instruction between `from` (inclusive) and `to` (exclusive)
bool impureBetween(Inst *from, Inst *to) {
if (from == nullptr) return true;
Inst *cur = from;
while (cur != nullptr) {
if (cur == to) return fal... |
#include <SFML\Graphics.hpp>
#include <cmath>
#include <vector>
#include <iostream>
using namespace sf;
RenderWindow win(sf::VideoMode(1000, 600), "Halo, ma duds !");
class Parabola{
public:
Vertex focus;
float line, finish_up = 0, finish_down = 360, p;
float thickness=9;
std::vector<sf::Vertex> figu... |
#include <vector>
#include <SFML/Graphics.hpp>
/* Display Constants */
const char SCREEN_TITLE[] = "Game of Life"; // Lol not gonna include string just for one string
const unsigned SCREEN_WIDTH = 1200;
const unsigned SCREEN_HEIGHT = 700;
const unsigned FRAME_RATE = 30;
const sf::Color BG_COLOR = sf::Color:... |
#include "Master.h"
#include "misc.h"
#include <algorithm>
#include <math.h>
#include <functional>
#include <random>
Master::Master(string filename, string alg){
isValidExecutions = 0;
algorithm = alg;
sat_solver = "default";
if(ends_with(filename, "smt2")){
#ifdef NOSMT
print_err("Worki... |
/****************************************************************************
* Copyright (c) 2021, CEA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retai... |
#include "CEModel.h"
#include "CETypes.h"
#include "../CEDX12Manager.h"
using namespace ConceptEngineFramework::Graphics::DirectX12::Resources;
CEKeyFrame::CEKeyFrame(): TimePos(0.0f),
Translation(0.0f, 0.0f, 0.0f),
Scale(1.0f, 1.0f, 1.0f),
... |
/* BSD Socket API Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <sys/par... |
// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "drivechain.h"
#include "crypto/sha256.h"
#include "script/interpreter.h"
#include "streams.h"
#include "util.h"
#inclu... |
/********************************************************/
/* Distributed UDDSketch */
/* */
/* Coded by <NAME> */
/* */
/* April 8, 2021 ... |
/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "nanomsg/src/nn.h"
#include "nanomsg/src/pipeline.h"
#include "nanomsg/src/reqrep.h"
#include "SkCanvas.h"
#include "SkCommandLineFlags.h"
#include "SkData.h"
#inclu... |
#include "Engine.h"
#include <GL/wglew.h>
#include <iostream>
#include <thread>
#define SAFE_DELETE(p) {if(p){delete p;}}
Engine::Engine()
{
SDLInit();
createGLWindow("FRE", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, sWidth, sHeight);
glewInit();
glClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
SDL_Cap... |
#include "Geometry/DebugDraw.h"
static const Vec2i OTHER_AXES_TABLE[] = {
{1, 2},
{0, 2},
{0, 1},
};
void DebugDraw::clear()
{
vertices.clear();
indices.clear();
}
void DebugDraw::cube(const Vec3 &min, const Vec3 &max, const Vec3 &color)
{
debug_cube(vertices, indices, offset + min, offset + max, color);
}
vo... |
/*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2017 Intel Corporation. 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 noti... |
#include <Arduino.h>
#include <ezOutput.h>
#include <LiquidCrystal.h>
#include <Wire.h>
// LCD
#define LCD_RS_PIN 2
#define LCD_ENA_PIN 3
#define LCD_D4_PIN 4
#define LCD_D5_PIN 5
#define LCD_D6_PIN 6
#define LCD_D7_PIN 7
#define LCD_A_PIN 8
// LED Diodes
#define LED1_PIN 9
#define LED2_PIN 10
#define LED3_PIN 11
#de... |
// -*- C++ -*-
//
// Package: JetTagProducer
// Class: JetTagProducer
//
/**\class JetTagProducer JetTagProducer.cc RecoBTag/JetTagProducer/src/JetTagProducer.cc
Description: Uses a JetTagComputer to produce JetTags from TagInfos
Implementation:
<Notes on implementation>
*/
//
// Original Author: <NA... |
// C++ Code to implement HeapSort using an array of random numbers, where N = 20
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
void display(int[], int n);
// Function to Build a heap from a given array Using the Max Heap Property
int *buildHeap(int[], int, int);
// Function used to ... |
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <map>
#include <iostream>
#include <fstream>
#include <Entry.h>
#include <File.h>
#include <String.h>
#include "ComputableCatalog.h"
#include "/boot/home/git/haiku/headers/private/locale/EditableCatalog.h"
#include "/boot/home/git/haiku/headers/private... |
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Contains code for 3x3 matrices.
* \file IceMatrix3x3.cpp
* \author <NAME>
* \date April, 4, 2000
*/
//////... |
//============================================================================
//
// This file is part of GPSTk, the GPS Toolkit.
//
// The GPSTk is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; ei... |
/*
* Copyright (c) 2021, NVIDIA 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 law ... |
#include <Windows.h>
#include <Gdiplus.h>
#pragma comment(lib,"Gdiplus.lib")
#include <shellapi.h>
#include <QIcon>
#include <QImage>
#include <QPixmap>
class GdiPlusInit
{
public:
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiPlusInit()
{
Gdiplus::GdiplusStar... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <map>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <iterator>
#include "Graph.h"
#include "MemChunk.h"
#include "BKTask.h"
using namespace std;
extern bool CollectMemUsage;
Graph* Graph::createHpxS... |
/*
* Test for analyzing the jitter of commands.
*/
#include <iostream>
#include <iomanip>
#include <string.h>
#include "redox.hpp"
using namespace std;
using redox::Redox;
using redox::Command;
using redox::Subscriber;
double time_s() {
unsigned long ms = chrono::system_clock::now().time_since_epoch() / chrono::mi... |
#include <SOperations.h>
#include <assert.h> // for assert
#include <algorithm> // for min
#include <boost/core/enable_if.hpp> // for enable_if_c<>::type
#include <stdexcept> // for out_of_range
using namespace boost ;
//https://stackoverflow.com/questions/35971827/c... |
#line 2 "AstronomicalRecords.cpp"
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <set>
#include <algorithm>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cassert>
#include <bitset>
#include <list>
#include <cmath>
#include <string>
#include <vector>
#include <climits... |
#include "GameObject.h"
#include "Skybox.h"
#include "camera.h"
#include "Debug_Camera.h"
//#include "texture.h"
#include "renderer.h"
#include "manager.h"
#include "Scene.h"
#include "ShadowMap.h"
#include "external/DirectXTex/DDSTextureLoader.h"
using namespace Aegis;
ComPtr<ID3D11Buffer> SKYBOX::VertexBuffer;
C... |
// -*- C++ -*-
//
// Package: ClusterAnalyzer
// Class: ClusterAnalyzer
//
/**\class ClusterAnalyzer ClusterAnalyzer.cc msegala/ClusterSummary/src/ClusterAnalyzer.cc
Description: [one line class summary]
Implementation:
[Notes on implementation]
*/
//
// Original Author: <NAME>
// Created: We... |
/*
* Copyright (C) 2021 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
#include <video_capture_raw_queue.hpp>
#include <video_capture_profiler.hpp>
#include <Utility.hpp>
#include <NtwkUtil.hpp>
#include <NtwkFixedArray.hpp>
#include <LoggerCpp/LoggerCpp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <iostream>
#include <chrono>
#include <vector... |
//%2005////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Cor... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, WHILL, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditi... |
/* -------------------------------------------------
//
// 88888888888 ad88888ba 88888888888
// 88 d8" "8b 88
// 88 Y8, 88
// 88aaaaa ,adPPYYba, `Y8aaaaa, 88aaaaa
// 88... |
/*
Peak Traffic Share on LinkedIn
Description:
Credits: This challenge is from the facebook engineering puzzles
Facebook is looking for ways to help users find out which friends they interact with the most on the site. Towards that end, you have collected data from your friends regarding who they interacted ... |
/*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... |
#include "Fullscreen.hpp"
#include "Image.hpp"
#include "Kernel.hpp"
#include <FullscreenVS_spv.h>
using namespace flop;
static VkShaderModule s_vs;
void Fullscreen::init(uint8_t const* shader_bytecode,
size_t bytecode_size,
uint8_t pushconstant_size)
{
VkPushConstan... |
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
#define BOOST_TEST_MODULE ScheduleHostOpTest
#include <../random_util.hpp>
#include <boost/test/unit_test.hpp>
#include <filereader.hpp>
#include <popart/builder.hpp>
#include <popart/dataflow.hpp>
#include <popart/devicemanager.hpp>
#include <popart/inputshape... |
#include<unordered_map>
#include "reductions.h"
using namespace std;
namespace MARGINAL {
typedef pair<double,double> marginal;
struct data
{
float initial_numerator;
float initial_denominator;
float decay;
bool id_features[256];
features temp[256];//temporary storage when reducing.
unordered_map<uin... |
#include<bits/stdc++.h>
using namespace std;
const char user_id[]="<user_id>";
const char user_name[]="<user_name>";
const char custom_game_id[]="<custom_game_id>";
const int BUFFER_SIZE=1000;
char buf[BUFFER_SIZE]={'\0'};
void sleep(double s){
clock_t st=clock();
while(clock()-st<s*CLOCKS_PER_SEC){}
}
const int MAX_... |
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <iomanip>
#include <sstream>
#include <ctime>
#include "hash.h"
#include <stdint.h>
template<class T>
T rrot(T x, unsigned int moves)
{
return (x >> moves) | (x << sizeof(T)*8 - moves);
}
//call this once just to seed rand at the s... |
// Copyright 2020 The Autoware Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or a... |
/**
* Copyright (c) 2014, baskingshark
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of condi... |
#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 <gui/widget.h>
using namespace rexos::gui;
using namespace rexos::common;
Widget::Widget(Widget* parent, int32_t x, int32_t y, int32_t w,
int32_t h, int8_t r, int8_t g,
int8_t b):
KeyboardEventHandler() {
this->parent = parent;
this->x =... |
#include <Arduino.h>
#include "Coordinate.h"
#include "MinValueDirection.h"
#include "IWavefront.h"
#include "Map.h"
#define PROPAGATE_ITERATIONS 50
Map::Map() : Map::Map(DEFAULT_X_SIZE, DEFAULT_Y_SIZE) {
}
Map::Map(uint8_t sizeX, uint8_t sizeY) : Map(sizeX, sizeY, DEFAULT_DIM_X, DEFAULT_DIM_Y) {
}
Map::Map(uint8_t... |
/*************************************************************************
> File Name: log.cpp
> Author: sudoku.huang
> Mail: <EMAIL>
> Created Time: Thursday, December 22, 2016 AM08:58:20 CST
************************************************************************/
#include "log.h"
#include <stdlib... |
#include <array>
#include <fstream>
#include <iostream>
#include "ICP.h"
#include "RayCaster.h"
#include "Frame.h"
#include "Volume.h"
#include "VirtualSensor.h"
#include "Eigen.h"
#include "SimpleMesh.h"
#include "MarchingCubes.h"
#include "ICPOptimizer.h"
#define DISTANCE_THRESHOLD 0.05
#define EDGE_THRESHOLD 0.02
... |
#include "rendercontext.h"
//#include <glm/gtx/string_cast.hpp>
using namespace NormalRaster;
RenderContext::RenderContext(int width, int height) :
m_width(width),
m_height(height)
{
data.resize(width * height *4);
}
void RenderContext::resize(int width, int height)
{
data.clear();
data.resize(w... |
// calib_ros_node.cpp
// A ros node for tracking camera external calibration
// <NAME>, Nov 2020, <EMAIL>
#include <ros/ros.h>
#include <numeric>
#include <nav_msgs/Odometry.h>
#include <message_filters/subscriber.h>
#include <message_filters/time_synchronizer.h>
#include <message_filters/sync_policies/approximate_tim... |
#define BOOST_TEST_MODULE XOR Test
#include <boost/test/included/unit_test.hpp>
#include "../network.h"
#include "../gradient.h"
#include "../evolution.h"
#include <memory>
// Setup the test parameters
struct XORdata {
std::vector<boost::numeric::ublas::vector<double> > input;
std::vector<boost::numeric::ublas::v... |
#include "widget.h"
#include "ui_widget.h"
#include "pathdialog.h"
#include "readZIP.h"
#include <iostream>
#include "JlCompress.h"
#include <string.h>
#include <QMessageBox>
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
QStringList titles;
titles << "Name" << "... |
#include "fuzz.h"
#define MODULE_NAME "MiFare Read/Write:"
enum {
SUB_TYPE_DETECT_NDEF,
SUB_TYPE_READ_NDEF,
SUB_TYPE_WRITE_NDEF,
SUB_TYPE_FORMAT_NDEF,
SUB_TYPE_MAX
};
// ========= Constants copied from rw_mfc.cc ================
#define RW_MFC_4K_Support 0x10
// ===========================... |
#include "game.hpp"
bool Game::uciHandler(std::string str) {
std::vector<std::string> cmd = getStringArray(str);
if(cmd[0] == "isready") {
std::cout << "readyok" << std::endl;
} else if(cmd[0] == "position") {
gameHash.clear();
gameHash.resize(0);
hash_decrement = 0;
if(cmd[1] == "startpo... |
constexpr DVL::Command DVL::cGeneralCommandHelp;
constexpr DVL::Command DVL::cBottomCommandHelp;
constexpr DVL::Command DVL::cControlCommandHelp;
constexpr DVL::Command DVL::cEnvironmentCommandHelp;
constexpr DVL::Command DVL::cLoopRecorderCommandHelp;
constexpr DVL::Command DVL::cPerformanceTestCommandHelp;
constexpr... |
#include "driver.h"
#include "vidhrdw/generic.h"
unsigned char *galpanic_bgvideoram,*galpanic_fgvideoram;
size_t galpanic_fgvideoram_size;
void galpanic_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom)
{
int i;
palette += 3*1024; /* first 1024 colors are dynamic ... |
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2014, <NAME>, <NAME>.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "S... |
#include "Histogram.h"
#include "SeqLib/SeqLibUtils.h"
#include <fstream>
#include <cmath>
#include <algorithm>
#include <sstream>
#define BINARY_SEARCH 1
#define DEBUG_HISTOGRAM
Histogram::Histogram(const int32_t& start, const int32_t& end, const uint32_t& width)
{
assert(end >= start);
Bin bin;
bin.bound... |
#include "cbase.h"
#include "holo_ship_aim_info.h"
#include "holo_utilities.h"
#include "gstring/hologui/env_holo_system.h"
#include "gstring/hologui/point_holo_target.h"
#include "gstring/cspacecraft.h"
#include "gstring/gstring_in_main.h"
#include "gstring/cgstring_globals.h"
#include "gstring/c_gstring_util.h"
#in... |
#include "LeetCodeLib.h"
/*
* @lc app=leetcode id=315 lang=cpp
*
* [315] Count of Smaller Numbers After Self
*
* https://leetcode.com/problems/count-of-smaller-numbers-after-self/description/
*
* algorithms
* Hard (38.08%)
* Likes: 1102
* Dislikes: 49
* Total Accepted: 76.2K
* Total Submissions: 199... |
#include <Fastor/Fastor.h>
using namespace Fastor;
#define Tol 1e-12
#define BigTol 1e-5
template<typename T>
void run() {
using std::abs;
{
Tensor<T,67> a1; a1.iota(0);
// scalar indexing
FASTOR_EXIT_ASSERT(abs(a1(23) - 23) < Tol);
FASTOR_EXIT_ASSERT(abs(a1(-1) - 66) < Tol)... |
/*
BMW328BatteryManager.cpp
Interface to the BMS which is within the Think City battery packs
Copyright (c) 2013 <NAME>, <NAME>, <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 Softw... |
#include "gtest/gtest.h"
#include <misc/string_ref.hpp>
using namespace ydsh;
struct StringRefTest : public ::testing::Test {
template <size_t N>
void equals(const char (&expect)[N], const StringRef &ref) {
ASSERT_EQ(N - 1, ref.size());
ASSERT_TRUE(memcmp(expect, ref.data(), N - 1) == 0);
}
};
TEST_F(... |
// Copyright 2021 <NAME>
#include "../../../modules/task_2/votyakova_d_jacoby_method/jacoby_method.h"
#include <mpi.h>
#include <random>
#include <vector>
std::vector<double> getDiagonallyDominantMatrix(int size) {
if (size <= 0) {
return std::vector<double>(0);
}
std::random_device rd;
std::mt19937 ge... |
/*
* Vector.cpp
* Description: Implements Vector.hpp function prototypes.
* @author <NAME>
* @version 0.1 05/10/2017
*/
#include <iostream>
#include <string>
#include <fstream>
#include <cassert>
#include <cmath>
#include <random>
#include <algorithm>
#include <functional>
#include <thread>
#include <vector>
#include <... |
//
// Created by yale on 8/13/18.
//
#include <vector>
#include <random>
#include <thread>
#include <celesos/pow/ethash.hpp>
#include <celesos/miner_plugin/worker.hpp>
using namespace std;
using namespace celesos;
using namespace eosio;
using std::chrono::system_clock;
using boost::multiprecision::uint256_t;
void *c... |
/* Copyright (c) 2019, NVIDIA CORPORATION. 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 condi... |
// BSD 2-Clause License
//
// Copyright (c) 2016, frzifus
// 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
//... |
#include <Windows.h>
#include <filesystem/ui_pathop.h>
#include <core/ui_string.h>
// longui::detail namespace
namespace LongUI { namespace detail {
// is a dot
inline auto is_a_dot(const char* str) noexcept {
return str[0] == '.';
}
// is double dot
inline auto is_double_dot(const char* s... |
/*
* Copyright (c) 2015, <copyright holder> <email>
*/
#include "posixfile.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#ifndef WIN32
#include <sys/mman.h>
#include <dirent.h>
#else
#include <windows.h>
#include <sys/stat.h>
void... |
#include <fstream>
#include <sstream>
#include <cmath>
#include "util.h"
#include "cppo5m/utils.h"
using namespace std;
int ReadFileContents(const char *filename, int binaryMode, std::string &contentOut)
{
contentOut = "";
std::ios_base::openmode mode = (std::ios_base::openmode)0;
if(binaryMode)
mode ^= std::ios:... |
#include "memory_pool.h"
#include <cstdlib>
#include <mutex>
//alignment size
#define ALIGN_BASE 8
//align m to 8's double number
#define ALIGN_RET(m) ((m + (ALIGN_BASE - 1)) & (~(ALIGN_BASE - 1)))
//block list count
#define BLOCK_LIST_COUNT 5
//every block list max node
#def... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
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 condit... |
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <unistd.h>
#include <cstring>
#include <wait.h>
#include <errno.h>
#include <sys/epoll.h>
#include <cstdlib>
#include <iostream>
#include <errno.h>
#include <netinet/tcp.h>
#include <netdb.h>
using... |
#include <array>
#include <chrono>
#include <string>
#include <thread>
#include <vector>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#ifdef _WIN32
#include <Windows.h>
#endif
#include "bat_handle.h"
#include "fixed_array.h"
#include "httplib.h"
#include "json.hpp"
#include "util.h"
const size_t SEND_CHUNK_SIZE = 819... |
#include "gfx.h"
#include "d3d12/d3d12_device.h"
#include "utils/assert.h"
#include "xxHash/xxhash.h"
#include "microprofile/microprofile.h"
IGfxDevice* CreateGfxDevice(const GfxDeviceDesc& desc)
{
IGfxDevice* pDevice = nullptr;
switch (desc.backend)
{
case GfxRenderBackend::D3D12:
pDevice = n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.