text stringlengths 3.08k 12.5k |
|---|
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_INA219.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include "SdFat.h"
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (S... |
#include <string>
#include <ros/ros.h>
#include <sensor_msgs/PointCloud.h>
#include <sensor_msgs/PointCloud2.h>
#include <sensor_msgs/point_cloud2_iterator.h>
#include <sensor_msgs/point_cloud_conversion.h>
#include <geometry_msgs/Point32.h>
constexpr auto TOTAL_RINGS = 16u;
struct PCL2PCL2
{
/**
* @brief... |
#include <fcntl.h>
#include <sys/mount.h>
#include <sys/sendfile.h>
#include <unistd.h>
#include "android_data_backup.hpp"
#include "util.hpp"
using namespace std;
struct bk_header
{
unsigned short error;
unsigned short version;
size_t data_size;
size_t system_size;
};
static const int num_bk_files ... |
/*
* Copyright 2018 Foundation for Research and Technology - Hellas
*
* 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 [1] [1]
*
* Unless... |
// license:BSD-3-Clause
// copyright-holders:<NAME>, <NAME>, <NAME>
/************************************************************
PC Engine CD HW notes:
TODO:
- Dragon Ball Z: ADPCM dies after the first upload;
- Dragon Slayer - The Legend of Heroes: black screen;
- <NAME>: dies at new game selection;
- Snatcher: bla... |
#include "SpriteStudio5PrivatePCH.h"
#include "SsPlayerCellmap.h"
#include "SsProject.h"
#include "SsAnimePack.h"
#include "SsCellMap.h"
#include "SsPlayerAnimedecode.h"
#include "SsPlayerMatrix.h"
FSsCelMapLinker::FSsCelMapLinker()
: CellMap(0)
, Tex(0)
{
}
FSsCelMapLinker::FSsCelMapLinker(FSsCellMap* cellmap,... |
/*
* restart.cpp
* Authors: <NAME>, <NAME>
* Retrieved from Unix Systems Programming, 10th Ed.
*
*/
#include "restart.h"
/* Private functions */
static int gettimeout(struct timeval end,
struct timeval *timeoutp) {
gettimeofday(timeoutp, NULL);
timeoutp->tv_sec = end.tv_sec... |
#define SIMPLE_EXPORT
#include <caffe/caffe.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "graph.hpp"
#include "ployfit.hpp"
using namespace cv;
using namespace caffe;
using namespace std;
void clipBoxes(vector<float>& box, int height, int... |
/*
* Copyright (C) 2019 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:
* 1. Redistributions of source code must retain the above copyright notice(s),
* this list of c... |
#include "stdafx.h"
#include "Notification.h"
#include "File.h"
#define INITIALIZATION_TIME 1 // In seconds
#define INITIALIZATION_LIMIT 350
void Notification::load_settings(){
// Read values from settings file to initialize variables
Settings setts(L"settings.txt");
font_size = DEFAULT(stoi(setts.read(L"font ... |
#include<iostream>
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<string.h>
#include <windows.h>
#include <time.h>
#define SCREEN_WIDTH 90
#define SCREEN_HEIGHT 26
#define WIN_WIDTH 70
#define MENU_WIDTH 20
#define GAP_SIZE 7
#define PIPE_DIF 45
using namespace std;
// cout<<"±±±±±±±±±";
HANDLE cons... |
#include "SMXDeviceSearch.h"
#include "SMXDeviceConnection.h"
#include "Helpers.h"
#include <string>
#include <memory>
#include <set>
using namespace std;
using namespace SMX;
#include <hidsdi.h>
#include <SetupAPI.h>
// Return all USB HID device paths. This doesn't open the device to filter just our devices.
stat... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long long unsigned llu;
typedef double dl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef map<int,int> mii;
typedef map<ll,ll> ... |
//=====================================================================
// Copyright 2007-2016 (c), Advanced Micro Devices, Inc. All rights reserved.
//
/// \author AMD Developer Tools Team
/// \file StringUtils.cpp
///
//=====================================================================
//=========================... |
/*
* MIT License
*
* Copyright (c) 2022 CoretronicMEMS
*
* 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... |
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2017 <NAME> - www.xs-labs.com / www.digidna.net
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "... |
//
// Created by <NAME> on 08/10/2018.
//
#include "ofxGFNet.h"
gf::dnn::Net::Net() {
}
gf::dnn::Net::~Net() {
if (session != nullptr) {
session->Close();
}
delete session;
}
void gf::dnn::Net::readNet(const std::string &graph_file_name) {
tensorflow::GraphDef graph_def;
tensorflow:... |
#include "torch.h"
#include <Arduino.h>
#include <BadgeOs.h>
#include <BadgeLog.h>
#include <BadgeMenu.h>
#include <BadgeTextViewer.h>
#include <BSidesBadge2020.h>
#include <BSidesMessaging.h>
#include <display.h>
#include <menu.h>
#define BRIGHTNESS_MAXIMUM (5U)
extern SerialMessageQueue serialBridgeQueue;
static S... |
#include <cmath>
#include <gtest/gtest.h>
#include <math/Vector.hpp>
TEST(Vector, defaultConstruct) { Vector v; }
TEST(Vector, componentsDefaultedToZero) {
Vector v;
ASSERT_FLOAT_EQ(v.x(), 0.0);
ASSERT_FLOAT_EQ(v.y(), 0.0);
ASSERT_FLOAT_EQ(v.z(), 0.0);
}
TEST(Vector, initialValueConstructed) {
Vector v(1.0... |
// Copyright 2009 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 agreed to in... |
/*
* File: Jugador.hxx
*
* Created on 26 de diciembre de 2015, 11:50
*/
void Jugador::toUpper(string &cadena) {
for (unsigned int i = 0; i < cadena.length(); i++)
cadena[i] = toupper(cadena[i]);
}
Jugador::Jugador() {
this->nombre = "Maquina";
this->tipo = false;
}
Jugador::Jugador(Persona... |
/* Copyright (c) 2010 - 2021 Advanced Micro Devices, Inc.
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, mer... |
#pragma once
#include "route.hpp"
#include "../request.hpp"
#include "../response.hpp"
#include "../http.hpp"
#include "../generator.hpp"
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>
#include <spdlog/logger.h>
#include <filesystem>
#include <functional>
#include... |
#include "stdafx.h"
#include "XHRConstructor.h"
#include "AppSettings.h"
#include "Logger.hpp"
#include <cctype>
static std::string censor(const std::string& header)
{
const char* to_censor[] = { "authorization" };
for (auto head : to_censor) {
auto len = strlen(head);
if (header.size() <= len)
continue;
if... |
#include "ofApp.h"
using namespace ofxCv;
using namespace cv;
void ofApp::setup()
{
double posX = 1;
double posY = 1;
double posZ = 1;
double rotX = 0.;
double rotY = 0.;
double rotZ = 0.;
cv::Mat r_x = (cv::Mat_<double>(4,4) << 1, 0, 0, 0,
... |
//! \brief The Dao of Clustering library - Robust & Fine-grained Deterministic Clustering for Large Networks
//! Command-line Interface implemented as C++ client app of the library.
//!
//! \license Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.html
//! > Simple explanation: https://tldrlegal... |
#include "includes.h"
#include "extern.h"
// search-and-replace function for strings
char * replacestr(char *str, char *oldstr, char *newstr)
{
char *p;
char str2[512];
char str3[512];
char str4[512];
memset(str2, 0, sizeof(str2));
memset(str3, 0, sizeof(str3));
memset(str4, 0, sizeof(str4));
strncpy(str2, ... |
/*
* Copyright (c) 2018 Axis Communications AB.
*/
#include <stdio.h>
#include <string>
#include <cmath>
#include <stdlib.h>
#include <libgen.h>
#include "loaders.h"
#define TINYOBJLOADER_IMPLEMENTATION
#include <tiny_obj_loader.h>
#include <syslog.h>
#include "gl_example_errors.h"
#include <glm/gtx/normal.hpp>
... |
/*
* This file contains code from "C++ Primer, Fourth Edition", by <NAME>.
* Lippman, <NAME>, and <NAME>, and is covered under the
* copyright and warranty notices given in that book:
*
* "Copyright (c) 2005 by Objectwrite, Inc., <NAME>, and <NAME>."
*
*
* "The authors and publisher have taken care in the pr... |
// Copyright (C) 2018 <NAME> <<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, publi... |
#include "itkImageFileWriter.h"
#include "itkImageRegionIterator.h"
#include "itkHistogramMatchingImageFilter.h"
#include <math.h>
#include "itkPluginUtilities.h"
#include "ZScoreMappingCLP.h"
// Use an anonymous namespace to keep class types and function names
// from colliding when module is used as shared object ... |
#include "joint.h"
int Joint::id = -1;
Joint::Joint(GLWidget277 *context): Drawable(context), thisID(), name(), parent(nullptr), children(std::vector<Joint*>()), position(), rotation(), joint_bindMatrix(), selected(false)
{
}
GLenum Joint::drawMode()
{
return GL_LINES;
}
void Joint::setSelected(bool select) {
... |
# include <stdlib.h>
# include "rSystem.h"
# include "rMemory.h"
# include "StringM.h"
# include "Global.h"
# include "Tree.h"
# ifdef _MSC_VER
# pragma warning (disable: 4514)
# endif
void ErrorCheck (char * s, FILE * f)
{ if (f == 0) printf ("Error: %s\n", s); }
void PrintMark (tTree t)
{ printf ("%d ", t->PRE_... |
#include "monte_carlo/util.h"
#include "linalg/util.h"
#include "linalg/ray.h"
#include "linalg/vector.h"
#include "geometry/sphere.h"
Sphere::Sphere(float radius) : radius(radius){}
bool Sphere::intersect(Ray &ray, DifferentialGeometry &diff_geom) const {
//Compute quadratic sphere coefficients
Vector ray_orig{ray.... |
#include <Rcpp.h>
#include "../include/pruner.hpp"
#include "03-pruning.hpp"
using namespace Rcpp;
class TreeData {
public:
uint nstates;
uint n;
uint nfuns;
// Annotations
pruner::vv_uint A;
pruner::v_uint Ntype;
// Temporal storage ----------------------------------------------------------
... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
#include "fonctions.h"
int write_in_queue(RT_QUEUE *msgQueue, void * data, int size);
void envoyer(void * arg) {
printf("tenvoyer... |
#include <ros/ros.h>
#include <std_msgs/Int8.h>
#include <std_msgs/Bool.h>
#include <signal.h>
/*INCLUDE SOCKET HEADERS*/
#include <sys/types.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
// Signal-safe flag for whether shutdown is requested
sig_atomic_t volatile g_reque... |
/*
* Benchmark homomorphic convolution
*
* Created on: August 10, 2019
* Author: ryanleh
*/
#include <cstddef>
#include <iostream>
#include <iomanip>
#include <string>
#include <chrono>
#include <random>
#include <thread>
#include <mutex>
#include <memory>
#include <limits>
#include <math.h>
#include "conv... |
// Copyright 2020 <NAME>
#include <mpi.h>
#include <string>
#include <random>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <utility>
#include <vector>
#include <cstring>
#include "../../../modules/task_3/bessolitsyn_s_gauss/bessolitsyn_s_gauss.h"
const std::vector<std::vector<double>> gauss_matri... |
#include "session.hpp"
#include "model/data/choicetest.hpp"
#include <cmath>
#include <QDateTime>
#include <QDebug>
Session::Session(TestList tests, int maxAttempts):
mTests(tests),
mPosition(0),
mMaxAttempts(maxAttempts),
mMagicConstant(1377),
mState(new SessionState) {
applyResult();
}
Sess... |
/*
* Copyright (c) 2014 Hackdirt Ltd.
* Author: <NAME> (<EMAIL>)
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the
* use of this software. Permission is granted to anyone to use this software for
* any pu... |
#include "program_options.hpp"
#include <string>
#include <iostream>
//constructor
Program_Options::Program_Options(int const& argc, char** const& argv){
using namespace boost::program_options;
//build all the possible flags and add description.
options_description desc (Get_Options_Description());
//set pos... |
/* mbed Microcontroller Library
* Copyright (c) 2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
************************************************************************
*
* Test of the Pmod ambient light sensor
*
*************************************************************************
* Description: M... |
/*
* BackSeatDriver.cpp
*
* Created on: Jul 16, 2014
* Author: <NAME>
*
* (c) 2014 All rights reserved. Please see LICENSE.
*/
#include "BackSeatDriver.h"
#include <math.h>
BackSeatDriver::BackSeatDriver(BackSeatDriver_IMotorAdapter *adapter) {
_adapter = adapter;
_debug = false;
_initMs = millis();... |
#include <numerics.hpp>
void numerics::neuralnet::SGD::_check_alpha(const double a) {
if (a <= 0) {
throw std::domain_error("adam requires: alpha (=" + std::to_string(a) + ") > 0.");
}
}
void numerics::neuralnet::SGD::_initialize_averages(const std::vector<Layer>& layers) {
_avg_weights.clear();
... |
/* Filename: test_main.cpp
* Author(s): <NAME>,
* <NAME>,
* <NAME>
* Date: 8/8/14
*/
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <time.h>
#include <errno.h>
#include <queue>
#include <deque>
#include <sys/stat.h>
#include <string>
#include <thread>
#inc... |
//$Id: Manager.cpp 91825 2010-09-17 09:10:22Z johnnyw $
#include "ace/SString.h"
#include "Manager.h"
#include "test_i.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
const ACE_TCHAR *control_ior = 0;
const ACE_TCHAR *proxy_ior = 0;
int
parse_args (int argc, ACE_TCHAR *argv[])
{
ACE_Get_Opt get_opts (arg... |
#include <bustd/math.hpp>
#include <bustd/vector.hpp>
#include <kernel/elfreader.hpp>
#include <kernel/filesystem/vfs.hpp>
#include <kernel/memory.hpp>
#include <kernel/process.hpp>
#include <kernel/x86/memory.hpp>
#include <string.h>
#define ELFSIZE 32
#include <kernel/exec_elf.h>
#define DEBUG_ELF
#ifdef DEBUG_ELF
... |
// 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... |
#include<bits/stdc++.h>
using namespace std;
using vi = vector<int>; using vvi = vector<vi>;
using ii = pair<int,int>; using vii = vector<ii>;
using l = long long; using vl = vector<l>; using vvl = vector<vl>;
using lu = unsigned long long; using ll = pair<l, l>;
using vb = vector<bool>; using vvb = vector<vb>;
using ... |
/*
Compute the area of a triangle mesh
<NAME>, October 1997
*/
#include <stdio.h>
#include <math.h>
#include <malloc.h>
#include <strings.h>
#include <ply.h>
#include <unistd.h>
#ifdef LINUX
#include <stdlib.h>
#endif
/* user's vertex and face definitions for a polygonal object */
typedef struct Vertex {
floa... |
/**
Copyright (c) 2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublic... |
// Usual programs
#include <stdio.h>
#include <stdlib.h>
// We need Logger
#include "Logger/Logger.hpp"
// We need FastString
#include "Strings/Strings.hpp"
// We need MQTT client
// Swap our own string class here and don't depend on the selected build flags
#define MQTTDumpCommunication 1
#undef MQTTString
#define M... |
//////////////////////////////////////////////
// View.cpp
// Definitions for the CView class
#include "stdafx.h"
#include "view.h"
#include "FastGDIApp.h"
#include "resource.h"
CView::CView()
{
}
CView::~CView()
{
}
BOOL CView::LoadFileImage(LPCTSTR filename)
{
// Only bitmap images (bmp files) can be loaded... |
#include <vector>
#include <algorithm>
#include <iostream>
#include "Rand.h"
#include "World.h"
using namespace std;
World::World(int size, int initial_predators, int initial_prey,
float predator_reproduction_chance, float prey_reproduction_chance,
int predator_hunger_limit):
gri... |
#include "../include/ceras.hpp"
#include "../include/utils/range.hpp"
#include "../include/utils/better_assert.hpp"
#include "../include/utils/color.hpp"
#include "../include/keras/layer.hpp"
#include "../include/keras/model.hpp"
#include <fstream>
#include <string>
#include <vector>
#include <cstddef>
#include <cstd... |
#ifdef ONLINE_JUDGE
#include <bits/stdc++.h>
#else
#include <algorithm>
#include <bitset>
#include <list>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) |
+---------... |
/*=============================================================================
# Author: <NAME> - https://github.com/mjenrungrot/
# FileName: 173.cc
# Description: UVa Online Judge - 173
=============================================================================*/
#include <bits/stdc++.h>
#pra... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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.or... |
// Copyright (c) 2019 The Zcash developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or https://www.opensource.org/licenses/mit-license.php
#include "core_memusage.h"
#include "mempool_limit.h"
#include "random.h"
#include "serialize.h"
#include "timedata.h"
#include "version... |
#include "server.h"
serverMainThread::serverMainThread(serverProcess *pProcessNew)
:thread(FALSE, pProcessNew)
{ pServerProcess = pProcessNew;
}
void serverMainThread::doSomething(void)
{ serverThread *pThread;
if (!(pThread = new serverThread(pServerProcess)))
return;
else
if (!pThread->isSuccessf... |
// This program is free software: you can use, modify and/or redistribute it
// under the terms of the simplified BSD License. You should have received a
// copy of this license along this program. If not, see
// <http://www.opensource.org/licenses/bsd-license.html>.
//
// Copyright (C) 2015-2018, <NAME> <<EMAIL>>
// C... |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2018, STEREOLABS.
//
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIE... |
#include <cstdlib>
#include <iostream>
#include "time.h"
using namespace std;
void Metodo_Burbuja(int vec[10]);
void Metodo_Burbuja_Optimizada(int vec[10]);
void Metodo_Seleccion(int vec[10]);
void Metodo_Shell_Sort(int vect [10]);
void Metodo_Insercion(int vec[10]);
void Metodo_Shaker_Sort(int vec [10]);
void Resta... |
#pragma once
#include <bts/blockchain/types.hpp>
namespace bts { namespace blockchain {
struct price;
/**
* An asset is a fixed point number with
* 64.64 bit precision. This is used
* for accumalating dividends and
* calculating prices on the built-in exchange.
*/
struct asset
{
as... |
/*****************************************************
Routine(s) to locate spine in the spread profile of
a Maximum. It returns type/invalid as well as
where in the profile the base of the spine is
located.
******************************************************/
typedef struct
{
nsdouble depth;
... |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
#include <algorithm>
#include <cstdint>
#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <memory>
#include <stdexcept>
#include "Drive/disk.h"
#include "Drive/vbr.h"
#include "Drive/reader.h"
#include "Bitlocker/bitlocker.h"
#include "options.h"
#include "Utils/utils.h"
#include "Ut... |
/*
* Copyright 2016-2018, 2021 Internet Corporation for Assigned Names and Numbers.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*/
/*
* Developed by Sinod... |
/*************************************************************************
>>> Author: WindCry1
>>> Mail: <EMAIL>
>>> Website: https://windcry1.com
>>> Date: 12/30/2019 11:03:37 PM
*************************************************************************/
#include <cstring>
#include <cmath>
#include <cstdio>
#include <... |
////////////////////////////////////////////////////////////////////////////////////////////////////
// deep_copy.hpp
//
// Copyright 2008 <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)
#include <utilit... |
//
//
//
#include "OramDeterministic.h"
#include <iostream>
#include <string>
#include <sstream>
#include <cmath>
#include <bitset>
using namespace std;
OramDeterministic::OramDeterministic(UntrustedStorageInterface* storage, RandForOramInterface* rand_gen,
int bucket_size,... |
/*
* File: main.cpp
* Author: schlottb[at]<EMAIL>
*
* Created on 2017.05.21
*/
#include <glib.h>
#include <glib-object.h>
#include <PlatformInterface/Platform.h>
//#include <Tools/Debug/Stopwatch.h>
#include <ModuleFramework/ModuleManager.h>
#include <ModuleFramework/ModuleCreator.h>
#include <cstring>
#inclu... |
/******************************************************************************
** Copyright (c) 2013-2018, <NAME> **
** All rights reserved. **
** **
** Redistrib... |
#include <cassert>
#include <iostream>
#include <type_traits>
#include <vector>
#include "particle_simulator.hpp"
class forceNearEP {
public:
void clear() {}
};
/*FullParticle class for FDPS*/
class SphereFP {
public:
PS::S32 gid;
PS::F64vec3 pos;
PS::F64 RSearch;
PS::F64vec getPos() const {... |
/**
* Copyright 2021 Huawei Technologies Co., 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... |
//
// window_util.cpp
//
// Created by <NAME> on 14-02-19.
//
#include "window_util.hpp"
#include <math.h>
window_util::window_util(int width, int height, const char* title) : _width(width), _height(height)
{
glfwInit();
win = glfwCreateWindow(width, height, title, nullptr, nullptr);
if (!win)
throw std::runti... |
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2019 Intel Corporation. All Rights Reserved.
#include "camera-shader.h"
#include <glad/glad.h>
using namespace rs2;
struct short3
{
uint16_t x, y, z;
};
#include <res/d435.h>
#include <res/d415.h>
#include <res/sr300.h>
#include <res/t2... |
/*
Copyright (c) 2020-present Maximus5
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 conditions and the follo... |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... |
#include "parser.hpp"
#include "writer.hpp"
Writer::Writer(const char *fname, Parser *p) {
file_name = fname;
parser = p;
current_num = 0;
}
void Writer::assemble() {
fstream f;
f.open(file_name, ios::out);
if (!f.is_open()) {
cerr << "cannot open output file" << endl;
}
for (... |
/*
* Copyright (c) 2020, <NAME>. <<EMAIL>>
* 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 c... |
/* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include <gtest/gtest.h>
#include <utility>
#include "common/base/Base.h"
#include "kvstore/wal/AtomicLogBuffer.h"
namespace nebula {
namespace wal {
void checkIterator(std::shared_ptr<AtomicLogB... |
#include "DebLog.h"
#include "Application.h"
#include "mdRender.h"
#include "mdTextures.h"
#include "mdMap.h"
#include <math.h>
#include "Brofiler/Brofiler.h"
#include "mdAudio.h"
#include "mdEntities.h"
mdMap::mdMap() : Module(), map_loaded(false) {
name = "map";
}
// Destructor
mdMap::~mdMap()
{}
// Called before... |
/*
* Copyright 2008, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include <dirent.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
// exported by the generic attribute support in libroot_build.s... |
#include "weather.h"
#include "secrets.h"
#include "WiFi.h"
#include "ArduinoJson.h"
#include "TimeLib.h"
/**
* Connect to MQTT Broker
*/
void connectToMqtt() {
// Setup for mqtt
uint16_t size =1024;
mqtt.setBufferSize(size);
mqtt.setServer(AWS_IOT_ENDPOINT, 8883);
mqtt.setCallback(callback);
if (!mqtt.co... |
#include <iostream>
#include <fstream>
#include <string>
template <typename T>
class LinkedList {
public:
LinkedList() : length(0), head(nullptr), tail(nullptr) {};
~LinkedList();
T getElement(int index) const;
void addElement(T e);
void removeElement(int index);
void setElementAtIdx(T e, int idx);
void sort(... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <stdio.h>
#include <vector>
#include "Ngram.h"
using namespace std ;
FILE *open_or_die( const char *filename, const char *ht )
{
FILE *fp = fopen( filename, ht );
if( fp == NULL ){
perror(filename);
exi... |
// Copyright 2013 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/devtools/devtools_embedder_message_dispatcher.h"
#include "base/bind.h"
#include "base/values.h"
namespace {
using DispatchCal... |
//! \file
/*
** Copyright (c) 2020 - Ponce
** Authors:
** <NAME> <EMAIL>
** <NAME> <EMAIL>
**
** This program is under the terms of the BSD License.
*/
#include <iostream>
#include <fstream>
// Ponce
#include "blacklist.hpp"
#include "globals.hpp"
#include "callbacks.hpp"
#inc... |
// Copyright 2019 The MediaPipe Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or a... |
#include "MSLayersAtAngle.h"
#include "RecoTracker/TkMSParametrization/interface/PixelRecoLineRZ.h"
#include "DataFormats/Math/interface/approx_log.h"
using namespace std;
namespace {
template <class T>
inline T sqr(T t) {
return t * t;
}
} // namespace
void MSLayersAtAngle::init() {
std::sort(theLaye... |
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <iostream>
#include <fstream>
#include <strings.h>
#include <stdlib.h>
#include <string>
#include <pthread.h>
#include <cctype>
#include <iomanip>
using namespace... |
/** @file
A brief file description
@section license License
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 und... |
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrXferProcessor.h"
#include "GrPipelineBuilder.h"
#include "GrProcOptInfo.h"
#include "gl/GrGLCaps.h"
GrXferProcessor::GrXferProcessor()
: fWillReadDstColor(fal... |
/*
Q Light Controller
shortcutwing.cpp
Copyright (c) <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.txt
Unless required by a... |
#pragma once
#include <stdint.h>
#include <chrono>
#include <iomanip>
#include <benchmark/benchmark.h>
namespace viper::kv_bm {
static constexpr double SCALE_FACTOR = 1;
static constexpr uint64_t NUM_BASE_PREFILLS = 100'000'000;
static constexpr uint64_t NUM_BASE_OPS = 50'000'000;
static constexpr uint64_t NUM_OPS =... |
#include <algorithm>
#include "scene_camera.h"
#include "editor_context.h"
static void glm_mat_to_engine_mat( Engine::Matrix4f& engine_mat, glm::mat4& glm_mat )
{
const float *pSource1 = (const float*)glm::value_ptr(glm_mat);
engine_mat.x.x = pSource1[0];
engine_mat.x.y = pSource1[1];
engine_mat.x... |
#pragma once
#include <iostream>
#include <string>
#include <memory>
#include <list>
#include <vector>
#include <set>
#include <array>
#include <exception>
#include "redx/core.hpp"
#include "redx/ctypes.hpp"
#include "redx/csav/node.hpp"
#include "redx/csav/serializers.hpp"
#include "CStringPool.hpp"
#i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.