text stringlengths 3.08k 12.5k |
|---|
#include <fdManager.h>
#include <gddApps.h>
#include <gddAppFuncTable.h>
#include <casdef.h>
#include <string>
#include <map>
class myServer : public caServer
{
public:
virtual ~myServer();
virtual pvExistReturn pvExistTest(const casCtx &ctx,
const caNetAddr &clientAddress,
... |
/*
* This program times the Fourier transform for different image sizes.
* Use it to compare the timing of the built-in DFT vs FFTW with different planning methods.
*/
#include <iostream>
#include "diplib.h"
#include "diplib/multithreading.h"
#include "diplib/transform.h"
#include "diplib/generation.h"
#include "di... |
/*
*
* From LeetCode: https://leetcode.com/problems/number-of-islands/
* The solution was explained by TechDose: https://youtu.be/__98uL6wst8
*
* Problem-Statement
*
* Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.
... |
// C/C++ headers
#include <sstream>
#include <stdexcept>
// Athena++ header
//#include "../math_funcs.hpp"
#include "../parameter_input.hpp"
#include "../coordinates/coordinates.hpp"
#include "../thermodynamics/thermodynamics.hpp"
#include "../mesh/mesh.hpp"
#include "../utils/utils.hpp"
#include "../math/core.h"
#inc... |
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "frc/controller/LTVDiffDriveController.h"
#include <cmath>
#include "frc/MathUtil.h"
#include "frc/StateSpace... |
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
� Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur F�rderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION... |
/*
Copyright (c) 2014, Robot Control and Pattern Recognition Group, Warsaw University of Technology
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 ... |
#include <QtCore/QCoreApplication>
#include <QtCore/QFile>
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonObject>
#include <QtCore/QTextStream>
#include <QtCore/QStringBuilder>
#include <QtCore/QMap>
#include <QtCore/QLinkedList>
#include <QDebug>
#include "../../unicodeutils.h"
us... |
#include "graph.h"
#include <QtGui>
#include "arrow.h"
#include "primitive.h"
#include "primitivesloader.h"
Graph::Graph(QObject *parent) : QObject(parent),
mNodes(new QVector<Node*>), mArrows(new QVector<Arrow*>), mStart(nullptr), mEnd(nullptr) {}
Graph::~Graph()
{
delete mNodes;
delete mArrows;
d... |
#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_step(Metroconf& conf, double temperature){
... |
/*
* Copyright 2016 Google Inc. 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 by applicabl... |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "pow.h"
#include "chain.h"
#include "chainparams.h"
#include "main.h"
#include "pr... |
/*
* Copyright (c) 2008 <NAME>, <NAME>, <NAME>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... |
#include <iostream>
#include "sageGeneric.h"
#include "RtedSymbols.h"
static
void presence_test(const std::string& name, void *const symptr)
{
if (symptr) return;
std::cerr << "#Error: Unable to locate symbol for '" << name << "'.\n"
<< " Did you include 'RTED/RuntimeSystem.h' ?"
... |
/* FILE: oxswarn.cc -*-Mode: c++-*-
*
* Macros and classes for nonfatal message handling.
*
*/
#include "oxswarn.h" // Note: Microsoft VC++ 6 blows chunks if
#include "oxsexcept.h" // oxsexcept.h is included before oxswarn.h
#include "util.h"
/* End includes */
String
Oxs_WarningMessageRevi... |
#include <algorithm>
#include <iostream>
#include <random>
#include <string>
#include <vector>
#include "src/smart_pointers.h"
using task::SharedPtr;
using task::UniquePtr;
using task::WeakPtr;
size_t RandomUInt(size_t max = -1) {
static std::mt19937 rand(std::random_device{}());
std::uniform_int_distribution<s... |
// $Id$
/**************************************************************************
* This file is property of and copyright by the Experimental Nuclear *
* Physics Group, Dep. of Physics *
* University of Oslo, Norway, 2007 *
* ... |
#include "receptor.h"
#include <numeric>
#include "../bitHandler/bitHandler.h"
void Receptor(std::vector<bool> fluxoBrutoDeBits, int tipoDeControleDeErro) {
CamadaEnlaceDadosReceptora(fluxoBrutoDeBits,tipoDeControleDeErro);
}
void CamadaEnlaceDadosReceptora(std::vector<bool> quadro, int tipoDeControleDeErro) {... |
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* ... |
#include "logindial.h"
#include "ui_logindial.h"
#include <QPicture>
#include <QPainter>
#include <QMessageBox>
#include <QJsonDocument>
#include <QFile>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
#include <QDebug>
#include <QDateTime>
#include <QSharedMemory>
#include "userinfo.h"
#include "com... |
#include "ultimate_msckf_vio/utility/geometric_kit.h"
#include "ultimate_msckf_vio/visual_ekf_update.h"
using Eigen::Quaterniond;
using Eigen::Vector3d;
using ultimate_msckf_vio::VectorToSkewSymmetricMatrix;
Eigen::Vector3d ComputeFeatureProjection(const Eigen::Isometry3d& T_G_C,
... |
// Copyright (c) 2015 - 2016 Anyar, 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 applicab... |
//
// Created by nathan on 2/1/18.
//
#include "volk_option_helpers.h"
#include <exception> // for exception
#include <iostream> // for operator<<, endl, basic_ostream, cout, ostream
#include <utility> // for pair
#include <limits.h> // IWYU pragma: keep
#include <cstring> // IWYU pragma: keep
#include <cs... |
// Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com.
// All rights reserved.
// Authors: <NAME> and <NAME>
//
/... |
/*
* Copyright (C) 2014 The Android Open Source Project
* 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, t... |
#include "Bacon.h"
#include "BaconInternal.h"
#include "HandleArray.h"
using namespace Bacon;
#include <string.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include <FreeImage/FreeImage.h>
#include <FreeImage/ZLib/zlib.h>
#include "Resources/SourceCodePro_otf.h"
using namespace std;
namespace {
const int Dp... |
// Copyright (c) 2006-2008 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/renderer_host/download_resource_handler.h"
#include "chrome/browser/download/download_file.h"
#include "chrome/browser/... |
#include "Utils.h"
using namespace std;
Log logFile(LOGPATH);
buffer readFile(char* path){
char* temp = NULL;
buffer buf = {0};
ifstream myFile(path,ios::in|ios::binary);
if(myFile) { //make sure file opened ok.
myFile.seekg(0,myFile.end); //move to end of file
int len = (int)myFile.tellg(); /... |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
/**
* Definition for a binary tree node.
* struc... |
#include "unit.h"
Unit::Unit(int id, std::string name, glm::vec3 pos, int soldiers, std::string country)
: Rectangle(pos, glm::vec2(10*4, 15*4))
{
this->name = name;
this->soldiers = soldiers;
this->id = id;
this->country = country;
dt = 0.0f;
activeFrame = 0;
fakePos = pos;
visible... |
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
using namespace std;
void insercion(char proceso[], int tiempo[]){
for(int i = 0; i < 5; i++){
cout<<"Ingrese el tiempo para el proceso '" << proceso[i] <<"' : ";
cin>>tiempo[i];
}
}
void FIFO(){
int v, suma= ... |
// Copyright (c), <NAME>
#include "oglwrap_example.hpp"
#include <oglwrap/oglwrap.h>
#include <oglwrap/shapes/cube_shape.h>
#include <glm/gtc/matrix_transform.hpp>
class CylinderExample : public OglwrapExample {
private:
// Defines a unit sized cube (see oglwrap/shapes/cube_shape.h)
gl::CubeShape cube_shape_;
... |
/* Edge Impulse Linux SDK
* Copyright (c) 2021 EdgeImpulse 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, ... |
#include <GL/glew.h>
#include <SDL2/SDL.h>
#include <core/Texture.h>
#include <core/Device.h>
#include <core/Logger.h>
#include <core/Renderer.h>
#include <front/Camera.h>
#include <front/ForwardRenderingPath.h>
#include <platform/event/SDLEventPooler.h>
#include <platform/input/KeyboardState.h>
#include <platform/inpu... |
/**
* Obfuscation through duplication of Basic blocks guarded
*
* This clones some basic blocks, guarded by a condition that depends on the
* context. Each branch should then be obfuscated in different ways.
*
* This showcases the development of a Function pass that relies on a
* home-grown analysis.
*/
/* for... |
/**
* @file Casware.cpp
* @author Group(SW_Browser) <<EMAIL>>
* @brief
*
* (c) 2017 Humax Co., Ltd.
* This program is produced by Humax Co., Ltd. ("Humax") and
* the proprietary Software of Humax and its licensors. Humax provides you, as an Authorized Licensee,
* non-assignable, non-transferable and n... |
#include "drone.hpp"
Drone::Drone(Controller* c){
loop_interval = 1.0f / fbconfig.looprate * 1000 * 1000;
mode = fbconfig.default_mode;
controller = c;
c->set_drone(this);
}
Drone::~Drone(){
}
bool Drone::setup(){
if(!fblib_initialise()) return false;
// initialise IMU
imu = new IMU... |
// Copyright (C) 2020 Intel Corporation
#include <string>
#include <opencv2/opencv.hpp>
#include "vino_ie_pipe.hpp"
#include "asr.h"
#include "grpc_inference_service.h"
#define MODEL_CONFIG_FILE "models/lspeech_s5_ext/FP32/speech_lib.cfg"
typedef struct _wave_header_t {
uint32_t tag; /* "RIFF" string... |
#include "PlatformPrecomp.h"
#include "EnterNameMenu.h"
#include "Entity/EntityUtils.h"
#include "MainMenu.h"
string HighScoreNameFilter(string s)
{
string temp;
for (unsigned int i=0; i < s.length(); i++)
{
if (
(s[i] >= 65 && s[i] <= 90)
|| (s[i] >= 97 && s[i] <= 122)
)
{
temp +=... |
/*
*
* 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... |
#include "Globals.h"
#include "Application.h"
#include "ModulePlayer.h"
#include "Primitive.h"
#include "PhysVehicle3D.h"
#include "PhysBody3D.h"
ModulePlayer::ModulePlayer(Application* app, bool start_enabled) : Module(app, start_enabled), vehicle(NULL)
{
turn = acceleration = brake = 0.0f;
}
ModulePlayer::~ModuleP... |
/*
Copyright (c) 2013, The Linux Foundation. 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 co... |
#include "Adaptive_Check_T_Change_Volumetric.h"
Adaptive_Check_T_Change_Volumetric::Adaptive_Check_T_Change_Volumetric(
const Temperature_Data& t_old , const K_Temperature& k_t , const Time_Data& time_data,
const Cell_Data& cell_data , const Fem_Quadrature& fem_quadrature, const Input_Reader& input_reader)
... |
/*
The MIT License (MIT)
Copyright (c) 2017 <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, publis... |
#include "static.hpp"
#include "../mtllib.hpp"
#include "../program.hpp"
#include "../scene.hpp"
#include <vector>
#include <fstream>
#include <sstream>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp>
using namespace Models;
const GLchar *const Static::attribs[] = {
"position",
"normal"... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <tchar.h>
#include "ufile.h"
#include "crypto/des.h"
using huys::crypto::des;
using huys::crypto::triple_des;
static FILE *input;
static FILE *output;
const unsigned char ENCRYPTION_SIGNATURE[16] =
{
85, 66, 67, 127, 128, 24... |
#include <llvm/IR/Instructions.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/InstIterator.h>
#include <llvm/IR/LegacyPassManager.h>
#include "PointerAnalysis.h"
/// Alias types used to do pointer analysis.
#define MUST_ALIAS
bool PointerAnalysisPass::doInitialization(Module *M) {
return false;
}
bool PointerA... |
/*
6/25/2021 AirForceOneV2 by Tim "@burnermaster" Tagman for
pneumatic ignition actuator
*/
#include "Arduino.h"
int SOLState; //solenoid output OFF state
int SOLPin=2; //solenoid connected to pin 2
int buttonLED=3; //button LED connected to pin 3
int value; //floating value of button LED brightness
... |
#include "pcl_util.h"
using namespace cv;
void ROS2PCL(const sensor_msgs::PointCloudConstPtr packet,
Cloud::Ptr cloud_out)
{
//------------------Transform into pcl::pointcloud-------------------//
sensor_msgs::PointCloud2 cloud_2;
sensor_msgs::convertPointCloudToPointCloud2(*packet, cloud_2);
... |
#include <Base.h>
constexpr unsigned int width = 1600;
constexpr unsigned int height = 900;
constexpr char* title = "Hello Model!";
Window window{ width, height, title };
struct Vertex
{
glm::vec3 position;
glm::vec3 normal;
glm::vec2 tc;
bool operator==(const Vertex& other) const
{
retur... |
#include <algorithm>
#include <cstdint>
#include <string>
#include <string_view>
#include <coreinit/thread.h>
#include <coreinit/time.h>
#include "controls.hpp"
#include "hachi_patch.hpp"
#include "iosufsa.hpp"
#include "log.hpp"
#include "messages.hpp"
#include "ntr_patch.hpp"
#include "patch.hpp"
#include "proc.hpp... |
/* Copyright 2020 Stanford, Tsinghua
*
* 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... |
#include <iostream>
#include <string>
#include <thread>
#include "Poco/StringTokenizer.h"
#include "Poco/Format.h"
using Poco::format;
using Poco::StringTokenizer;
#include "atomicops.h"
#include "readerwriterqueue.h"
using namespace std;
using namespace moodycamel;
class Sender {
public:
virtual int operator()(i... |
//
// RenderableBoxEntityItem.cpp
// interface/src
//
// Created by <NAME> on 8/6/14.
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <glm/gtx/quaternion.hpp>
#inclu... |
#include "cuckoo_hash_build.hpp"
#include "common/dpcpp/cuckoo_hashtable.hpp"
CuckooHashBuild::CuckooHashBuild() : Dwarf("CuckooHashBuild") {}
const uint32_t EMPTY_KEY = std::numeric_limits<uint32_t>::max();
const uint32_t WORKGROUP_SIZE = 1;
const uint32_t SCALE = 2;
void CuckooHashBuild::_run(const size_t buf_size,... |
// https://github.com/KubaO/stackoverflown/tree/master/questions/implicit-list-44593216
#include <QtCore>
#include <type_traits>
//
class PolymorphicSharedData : public QSharedData {
public:
virtual PolymorphicSharedData * clone() const = 0;
virtual QDebug dump(QDebug) const = 0;
virtual ~PolymorphicSharedDa... |
/*
Imagine
Copyright 2011-2012 <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 "QuickI2C.h"
const char* QuickI2CStatusToString(QuickI2CStatus status) {
if(status == QuickI2CStatus::OK) {
return "OK";
} else if(status == QuickI2CStatus::SlaveNotResponding) {
return "Slave not Responding";
} else if(status == QuickI2CStatus::DataTimeout) {
return "Data ... |
/**
* @file plotTrajectory.cpp
* @author <NAME> (<EMAIL>)
* @brief
* @version 0.1
* @date 2020-10-29
*
* @copyright Copyright (c) 2020
*
*/
#include "config.hpp"
#include "common/glfwEntry.hpp"
#include <Eigen/Dense>
#include <iostream>
#include <fstream>
using namespace std;
using namespace Eigen;
// p... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
+---------... |
#include "Application.h"
#include "mdMap.h"
#include "mdFonts.h"
#include "mainScene.h"
#include "DebLog.h"
#include "mdGuiManager.h"
#include "mdSceneManager.h"
mainScene::mainScene(bool active) : scene(MAIN_SCENE) {
scene_active = active;
name = "Main Scene";
//Preparing nodes to ease XML reading
labels_node =... |
// Copyright (c) 2019 Graphcore Ltd. All rights reserved.
#define BOOST_TEST_MODULE ReduceNMaxClassSparse
#include <poplar/Engine.hpp>
#include <poplibs_support/TestDevice.hpp>
#include "poplibs_support/Algorithm.hpp"
#include "poplibs_test/Util.hpp"
#include "popnn/codelets.hpp"
#include "poputil/VertexTemplates.hpp"... |
#include "include/depth_camera.h"
DepthCamera::DepthCamera()
{}
void DepthCamera::setDepthCamInfo(const int w_in, const int h_in,
const double fx,
const double fy,
const double cx,
c... |
/*
* Mnemonizer.cpp
* Object to convert random ipv4 and ipv6 to a mnemonic.
* The gist of the algorithm works like this:
* Checks if the ip is valid ipv4 or ipv6
* Adds a static salt to the string
* Hashes the ip and the salt with SHA1
* Splits the hash into 4 parts
* Gets one of the mn... |
/*
* Copyright (c) 2012-2014, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list ... |
/*test_Geometry.cpp
$Author: jlconlin $
$Id: test_Geometry.cpp 480 2009-03-10 16:56:40Z jlconlin $
$Revision: 480 $
$Date: 2009-03-10 10:56:40 -0600 (Tue, 10 Mar 2009) $
This file is used for testing/learning about the new Geometry libraries by
<NAME>.
*/
#include<iostream>
#include<vector>
#include<utility>
... |
#include <boost/test/included/unit_test_framework.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include "gradient_projection.h"
#define CLOSE_TOL 0.1
#define LOOSE_TOL 10
using boost::unit_test_framework::test_suite;
using namespace GradientProjection;
void test_projec... |
// 7.exercise.11.ch04.04.cpp
//
// Revisit two programs you wrote for the exercises in Chapter 4 or 5. Clean
// up that code according to the rules outlined in this chapter. See if you
// find any bugs in the process.
//
// ORIGINAL STATEMENT
//
// 4.exercise.04.cpp
//
// Write a program to play a numbers guessi... |
#include <fstream.h>
#include <iomanip>
#include <strstream>
#include "mf.h"
using namespace std;
struct patchXY{
int x;
int y;
char check;
patchXY(){ x=0;y=0;check=0; };
patchXY & operator=(const patchXY &src){ x = src.x; y = src.y; check=src.check; return *this;};
patchXY(const patchXY &src)... |
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <math.h>
#include "VideoSketch.h"
using namespace std;
using namespace cv;
VideoSketch::VideoSketch(string name) : VideoProcessNode(name)
{
this->name = name;
// TODO - Sliderize
int num_pyr_levels = 5;
int num_orientations = 11;
in... |
/* The Computer Language Benchmarks Game
http://benchmarksgame.alioth.debian.org/
converted to C++ from D by <NAME>
modified by <NAME>
modified by The Anh to compile with g++ 4.3.2
modified by <NAME>
modified by <NAME>
modified by <NAME>
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
... |
#include "stereo_calib.h"
#include "tek5030/realsense_stereo.h"
#include "opencv2/calib3d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
using namespace tek5030;
using namespace tek5030::RealSense;
// Define a few font parameters for convenience.
namespace font
{
constexpr auto... |
/***************************************************************************************
* Original Author: <NAME>
* Created: 2020-05-16
* Copyright: <NAME> (https://github.com/GabrieleGiuseppini)
***************************************************************************************/
#include "ObjectBuilder.h"... |
#include "stm32_dac.h"
#include "stm32l476xx.h"
#include "stm32l4xx_hal_gpio.h"
#define CHANNEL DAC_CHANNEL_1
#define ALIGNMENT DAC_ALIGN_12B_R
static DAC_HandleTypeDef mhdac;
static bool minitialized = false;
static uint32_t mbias;
void HAL_DAC_MspInit(DAC_HandleTypeDef *hadc);
void HAL_DAC_MspDeInit(DAC_... |
/*
Robot Auto - Remote car receives joystick values from MX-FS-03V transmitter to the XY-MK-5V receiver
*/
// download library van http://www.pjrc.com/teensy/td_libs_VirtualWire.html
#include <VirtualWire.h>
const int receive_pin = 11;
bool test = true;
// save values
int Hval, Vval, Kval;
int calib_max_speed, cal... |
#include<bits/stdc++.h>
using namespace std;
/*Given an array a that contains n elements and the
operation op that satisfies associative property:
(x op y) op z=x op (y op z) is true for any x, y, z.
The following implementation of Sqrt Tree can perform the following operations:
build in O(nloglogn),
answer queries i... |
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the ... |
#include <array>
#include "player.hpp"
#include "sdk.hpp"
void animstate_pose_param_cache_t::set_value( player_t* e, float val ) {
if ( m_idx >= 0 )
e->poses( ) [ m_idx ] = val;
}
void animstate_t::reset( ) {
static auto reset_animstate = pattern::search( "client_panorama.dll", "56 6A 01 68 ? ? ? ? 8B F1" ).get< ... |
/*
* Copyright (c) 2021 <NAME>
* OneWireNg: Arduino 1-wire service library
*
* Distributed under the 2-clause BSD License (the License)
* see accompanying file LICENSE for details.
*
* This software is distributed WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PART... |
/* -------------------------------------------------------------------------- *
* OpenSim: testIterators.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
*... |
#include <NetCollector.h>
#include <MacUtil/IOUtil.h>
#include <map>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if_dl.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <ifaddrs.h>
#include <sstream>
#include <iomanip>
static const char * NCL_TAG = "NetAdapterList";
stat... |
#include <Eigen/Core>
#include <ros/ros.h>
#include <std_msgs/Bool.h>
#include <std_msgs/Int16.h>
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/LinearMath/Vector3.h>
#include <tf2_ros/transform_listener.h>
#include <geometry_msgs/TransformStamped.h>
#include <actionlib/server/simple_action_server.h>
#include <... |
//
// server.cpp
// Lab07
//
//
//#define DEBUG
#include <iostream>
#include <errno.h>
#include <string>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
const char HOST_IP[] = "127.0. 0.1"; /// localhost
const int BUF_LEN = 4096;... |
/*
* Firmament
* Copyright (c) The Firmament Authors.
* 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
*
* ... |
#include <torch/torch.h>
#include <ATen/ATen.h>
#include <tuple>
#include <cmath>
#include <iostream>
static const std::string MNIST_PATH = "{ABSOLUTE_PATH_TO_MNIST}";
static const int EPOCHS = 10;
static const int BATCH_SIZE= 64;
static const int LOG_INTERVAL = 10;
class Net : public torch::nn::Module
{
public:
... |
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define all(x) (x).begin(), (x).end()
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int,int> pii;
typedef long long ll;
class Treap{
/* Min-Priority heap property
* Left Subtree => less than
* Right Subtree => gre... |
#include "lex-parse.h"
/*
* LEXER
*/
enum Token_Type {
TOKEN_OPEN_PAREN,
TOKEN_CLOSE_PAREN,
TOKEN_IDENTIFIER,
TOKEN_LITERAL,
};
union Token_Data {
char * identifier;
int literal;
};
struct Token {
Token_Type type;
Token_Data data;
Token() { }
Token(Token_Type type) : type(type) { }
};
void print_token(... |
/*
* Copyright (c) 2011, 2019, 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 ... |
//
// Created by yongqi on 18-1-3.
//
#include <ros/ros.h>
#include "cxxopts.hpp"
#include "StereoCalibController.hpp"
#include "CalibViewer.hpp"
#include "CameraBridge.hpp"
using namespace Robocamcal;
void draw_lines(cv::Mat &frame, bool vertical, int step = 20) {
if (vertical) {
for (int x = step; x < frame... |
#include <iostream>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <stdio.h>
#include <stdlib.h>
#include <ros/ros.h>
#include <cv_bridge/cv_bridge.h>
#include <string>
using namespace cv;
using namespace std;
//patches the currently non-functional to_string function
namespace ... |
/*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part withou... |
/*---------------------------------------------------------------------------------------------
-- SOURCE FILE: proc_hdrs.c - program to process the packet headers
--
-- FUNCTIONS: libpcap - packet filtering library based on the BSD packet
-- filter (BPF)
--
-- DATE: April 23, 2006
--
-- REVISIONS: (Date and ... |
#include <cstdlib>
#include "window/Window.h"
#include "input/UserInput.h"
#include "utility/Timer.h"
#include "vulkan/Renderer.h"
#include "input/ArcBallCamera.h"
#include <glm/gtc/matrix_transform.hpp>
#include "imgui/imgui.h"
#include "imgui/imgui_impl_glfw.h"
#include "imgui/imgui_impl_vulkan.h"
const std::vector<... |
#include <iostream>
#include <string.h>
#include <chrono>
#include <vector>
#include "Utility.hpp"
#include "SpriteRenderer.hpp"
#include "TextRenderer.hpp"
/* Wrapper because *technically* the glad function isn't expecting a _cdecl function */
// This is for the Windows port
#if 0
static void* GetGLProcA... |
//
// Copyright (c) 2013 <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 purpose,
// including commer... |
// <NAME> 2014.
//
// This example illustrates how function objects can be
// reused with different data.
//
// Computes a confidence interval for the mean of a Gaussian
// distribution. (This ML-problem can be solved in closed-
// form, so no optimization is really neccessary.)
//
#include <functional>
#include <iost... |
#include <Rcpp.h>
using namespace Rcpp;
//Functions
double tu(double Temp, double Tb) {
return Temp - Tb;
}
double ln(double TU) {
return 2.5 * exp(TU * 0.00225);
}
double ar(double LN, double LNM, double AM) {
return AM * exp(-0.0344 * pow(LN - LNM, 2.0) +
0.000731 * pow(LN - LNM, 3... |
#include "NodeBase.hpp"
#include "exception\MStatusException.hpp"
#include <maya/MFnEnumAttribute.h>
#include <maya/MFnNumericAttribute.h>
#include <maya/MFnUnitAttribute.h>
#include <string>
std::vector<std::unique_ptr<mpb::NodeBase>> mpb::NodeBase::instances_;
mpb::NodeBase::NodeBase(const MTypeId id, const MStrin... |
/*****************************************************************/
/* NAME: <NAME> */
/* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */
/* FILE: alogcheck_main.cpp */
/* DATE: July 29, 2010 ... |
#include "zeek/zeek-config.h"
#include "zeek/RuleCondition.h"
#include "zeek/RuleMatcher.h"
#include "zeek/analyzer/protocol/tcp/TCP.h"
#include "zeek/Reporter.h"
#include "zeek/Scope.h"
#include "zeek/Func.h"
#include "zeek/ID.h"
#include "zeek/Val.h"
static inline bool is_established(const zeek::analyzer::tcp::TCP_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.