text stringlengths 3.08k 22k |
|---|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
#include <Windows.h> // Windows.h must be included before GdiPlus.h
#include <GdiPlus.h>
#pragma comment(lib, "gdiplus.lib")
ULONG_PTR m_gdiplusToken; // class member
#endif
#include <iostream>
#include <string>
#include <math.h>
#... |
//
// UIvPlotter.cpp
// 09 - TraceMaker
//
// Created by <NAME> on 10/9/13.
//
//
#include "UIvPlotter.h"
UIvPlotter::UIvPlotter(){
motorsDistance = 500;//1549;
pulleyRadius = 5;
stepsPerRotation = 800;
host = "192.168.1.12";
oscPort = 101010;
... |
// Copyright (c) 2015-2018 <NAME> (at gmail dot com)
// This file is distributed under the MIT License.
#include "ofp/yaml/encoder.h"
#include "ofp/requestforward.h"
#include "ofp/yaml/ybundleaddmessage.h"
#include "ofp/yaml/ybundlecontrol.h"
#include "ofp/yaml/yecho.h"
#include "ofp/yaml/yerror.h"
#include "ofp/yaml... |
/*
* CFC_LedMatrixSerial.cpp - A library for controling Leds with a MAX7219/MAX7221
* Copyright (c) 2007 <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... |
/*
The MIT License (MIT)
Copyright (c) 2015 <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... |
// -*- C++ -*-
//
// Package: Validation/MtdValidation
// Class: EtlDigiHitsValidation
//
/**\class EtlDigiHitsValidation EtlDigiHitsValidation.cc Validation/MtdValidation/plugins/EtlDigiHitsValidation.cc
Description: ETL DIGI hits validation
Implementation:
[Notes on implementation]
*/
#include <stri... |
// ----------------------------------------------------------------------------
// Copyright 2018 ARM Ltd.
//
// SPDX-License-Identifier: Apache-2.0
//
// 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 L... |
// Copyright 2016-2019 <NAME>
// Licensed under the Apache License, version 2.0
// See accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0
//----------------------------------------------------------------------------
// The REPL is the Read-Eval-Print Loop. It's the interactive command line
// sh... |
//--------------------------------------------------------------------------
// File and Version Information:
// $Id: KalPairConduit.cc,v 1.10 2004/06/21 22:07:53 brownd Exp $
//
// Description:
//
//
// Environment:
// Software developed for the BaBar Detector at the SLAC B-Factory.
//
// Author(s): <NA... |
#include "CvexStereoCameraCalibration.h"
#include <iostream>
using namespace std;
int CvexStereoCameraCalibration::getImageCount()
{
return image_count;
}
void CvexStereoCameraCalibration::getKRK(
CvMat* srcK,
CvMat* R,
CvMat* destK,
CvMat* dest)
{
CvMat* temp = cvCloneMat(src... |
/*
Space Manifold - a variety of tools for depth cameras and FreeFrame
Copyright (c) 2011-2012 <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,
includin... |
//===- OffloaderInjection.cpp - Pass that injects calls for PIM offloading --*- C++ -*-===//
//
//
//===----------------------------------------------------------------------===//
//
//
//===----------------------------------------------------------------------===//
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Leg... |
// Copyright 2012 <NAME>
#include <iostream>
#include <boost/program_options.hpp>
#include <sys/time.h>
#include <mkl.h>
#include "searcher.h"
#include "indexer.h"
using namespace boost::program_options;
using std::endl;
using std::ofstream;
/**
* Number of threads for indexing
*/
Dimensions SPACE_DIMENSION;
/**
... |
/*
* FastCGI GDAL raster subsetter
*
* 2021/02/24
* <NAME>
*
*/
#include <cstdio>
#include <string>
#include <sstream>
#include <unordered_map>
#include <fcgiapp.h>
#include <cgicc/Cgicc.h>
// Things like head(), body(), br(), streamable out
#include <cgicc/HTMLClasses.h>
#include <cgicc/HTTPHTMLHeader.h>
#in... |
#include <assert.h>
//#include <gsl/gsl_nan.h>
#include "csm/csm_all.h"
int minmax(int from, int to, int x) { return (std::max)((std::min)(x, to), from); }
void possible_interval(const double *p_i_w, LDP ld, double max_angular_correction_deg, double max_linear_correction,
int *from, int *to, i... |
#include "LeptonThread.h"
#include "Palettes.h"
#include "SPI.h"
#include "Lepton_I2C.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <iostream>
using namespace std;
static const char *device = "/dev/spidev0.0";
uint8_t mode;
static uint8_t bits = 8;
static uint32_t speed = 32000000;
int s... |
#pragma once
#include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
struct Node
{
int key;
struct Node *left, *right;
};
// A utility function to create a new BST Node
struct Node *newNode(int item)
{
struct Node *temp = new Node;
temp->key = item;
temp->left = temp-... |
/**
@file
@author <NAME>
@author <NAME>
@copyright 2014-2017 INRIA, 2014-2015 CNRS. Licensed under the Apache
License, Version 2.0. (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
@brief
*/
#include <iostream>
#include <limits>
#include <iomanip>
#define HUMOTO_GLOBAL_LOGG... |
/**
* Copyright (C) 2021 Lachesis <<EMAIL>>
*
* 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 DI... |
// Copyright (C) 2021 by the IntelliStream team (https://github.com/intellistream)
//
// Created by <NAME> on 20/07/2021.
//
#include <Algorithm/OfflineClustering/KMeans.hpp>
#include <Utils/UtilityFunctions.hpp>
#include <Utils/Logger.hpp>
#include <Algorithm/DataStructure/DataStructureFactory.hpp>
/**
* @Descript... |
/*
* 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.
*
* ... |
//
// Created by clemens on 27.05.19.
//
#include "SelfomatController.h"
using namespace selfomat::logic;
using namespace selfomat::tools;
const SelfomatController::LED_TYPE SelfomatController::LED_TYPE::RGB = SelfomatController::LED_TYPE("RGB",0);
const SelfomatController::LED_TYPE SelfomatController::LED_TYPE::RG... |
#include "CalibTracker/SiStripCommon/interface/StandaloneTrackerTopology.h"
#include <memory>
#include "FWCore/Concurrency/interface/Xerces.h"
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/dom/DOM.hpp>
#include "FWCore/Utilities/interface/Exception.h"
using na... |
//
// Copyright (c) 2015-2017, Deutsches Forschungszentrum für Künstliche Intelligenz GmbH.
// Copyright (c) 2015-2017, University of Bremen
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
... |
/************************************************
BSD 3-Clause License
Copyright (c) 2019, HPCN Group, UAM Spain (hpcn-uam.es)
and Systems Group, ETH Zurich (systems.ethz.ch)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the followin... |
/*
* Copyright (C) 2015-2021 IoT.bzh Company
* Author "<NAME>"
*
* $RP_BEGIN_LICENSE$
* Commercial License Usage
* Licensees holding valid commercial IoT.bzh licenses may use this file in
* accordance with the commercial license agreement provided with the
* Software or, alternatively, in accordance with the... |
// Game_Music_Emu $vers. http://www.slack.net/~ant/
#include "Music_Emu.h"
/* Copyright (C) 2003-2008 <NAME>. This module 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; either
version 2.1 of the License,... |
#include <psp2cldr/context.hpp>
#include <psp2cldr/coordinator.hpp>
#include <psp2cldr/logger.hpp>
#include <cassert>
#include <exception>
#include <mutex>
#include <unordered_map>
static void adjust_stack_for_parameters(InterruptContext *ctx, int n_params, bool is_undo = false)
{
if (n_params > 4)
{
... |
//----------------------------------------------------------------------------------------------------------
// PURPOSE --------- This program allows one to search their library for a given author or title string.
// AUTHOR ---------- <NAME>
// DATE ------------ 01 december 2016 thursday
// SOURCES --------- http://www... |
#include "player.hpp"
#include <glm/gtx/fast_trigonometry.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <iostream>
void Player::initializeGL(GLuint program) {
terminateGL();
m_program = program;
m_translation = glm::vec2(spawn);
//clear na lista de bullets
m_scaleLoc = glGetUniformLocation(m_program,... |
/*
* Hetero-mark
*
* Copyright (c) 2015 Northeastern University
* All rights reserved.
*
* Developed by:
* Northeastern University Computer Architecture Research (NUCAR) Group
* Northeastern University
* http://www.ece.neu.edu/groups/nucar/
*
*
* Permission is hereby granted, free of charge, to any pe... |
#include <utility>
#include "dhe-modules.h"
#include "display/controls.h"
#include "display/panel.h"
#include "util/duration.h"
#include "util/rotation.h"
#include "util/signal.h"
#include "util/stage-components.h"
namespace DHE {
class BoosterStage : public rack::Module {
public:
BoosterStage() : Module{PARAMETER... |
#include <osgUtil/RayIntersector>
#include <QFile>
#include <QMenuBar>
#include <QuiLoader>
#include "PCVR_Controller.hpp"
// Override OpenVRImageHandler so to change default click behavior.
// Now clicks happen when the trigger is released, regardless of where it was first pressed.
PCVR_ImageHandler::PCVR_ImageHan... |
#include "allh.h"
/*
Uses the standard quadratic equation to
locate roots of a cubic equation
(pt^3+qt^2+rt+s=0) with one root known.
Arguments below are:
double p: the coeffiecent of t^3 in the equation.
double q: the coeffiecent of t^2 in the equation.
double r: the coeffiecent of t in the equation.
double... |
/**
* Copyright (C) 2015, 2017, 2020-2021 <NAME> <<EMAIL>> with support Kintech Lab
* Licensed under the Apache License, Version 2.0
**/
#include <omp.h>
// #include "../../include/aiwlib/binary_format"
#include "../../include/aiwlib/qplt/imaging"
#include "../../include/aiwlib/vec"
using namespace aiw;
//-------... |
#include <pthread.h>
#include "all.h"
rrr::PollMgr *poll_mgr_g = nullptr;
namespace rococo {
static pthread_t th_id_s = 0;
RococoProxy* DepGraph::get_server_proxy(uint32_t id) {
pthread_t th_id = pthread_self();
if (th_id_s == 0) {
th_id_s = th_id;
} else {
verify(th_id_s == th_id);
... |
#include "FlyingEnemy.h"
#include "App.h"
#include "Textures.h"
#include "Audio.h"
#include "Input.h"
#include "Render.h"
#include "Scene.h"
#include "Log.h"
#include "Map.h"
#include "Collisions.h"
#include "SceneWin.h"
#include "PathFinding.h"
#include "Player.h"
#include "Math.h"
FlyingEnemy::FlyingEnemy(Textures* ... |
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
// Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC
// (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Test: mpi_kelpie_many_items
// Purpose: Given a pair of nodes, inject a large number of keys and then lis... |
//
// Created by Grishka on 19.06.16.
//
#include "OpusDecoder.h"
#include "logging.h"
#include <assert.h>
#define PACKET_SIZE (960*2)
COpusDecoder::COpusDecoder(CMediaStreamItf *dst){
//this->source=source;
dst->SetCallback(COpusDecoder::Callback, this);
dec=opus_decoder_create(48000, 1, NULL);
//test=fopen("/s... |
/*
* MIT License
*
* Copyright (c) 2019 <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,... |
/*
Copyright (c) 2003-2016, <NAME>
Antiprism - http://www.antiprism.com
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 rig... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetVerticalSync(true);
ofSetCircleResolution(80);
// 0 output channels,
// 2 input channels
// 44100 samples per second
// 256 samples per buffer
// 4 num buffers (latency)
... |
/*
* Copyright 2017-2018 Content Management AG
* All rights reserved.
*
* author: <NAME> <<EMAIL>>
*
* 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 c... |
#include "stream.h"
#include <termios.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <linux/serial.h>
#include <iostream>
class StreamSerial : public Stream {
public:
StreamSerial(std::string device_name, speed_t baud_rate);
~StreamSerial();
virtual bool Conn... |
#include "spirv_cross.h"
#include <utils/log.h>
#include <graphics/format/oish.h>
#include <graphics/shader.h>
#include <graphics/shaderstage.h>
#include <graphics/graphics.h>
#include <fstream>
#pragma comment(lib, "Xinput.lib")
using namespace oi;
using namespace oi ::wc;
using namespace oi::gc;
using namespace sp... |
/* Copyright (C) 2017 IBM Corp.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writi... |
/*********************
* *
* Created by gparap *
* *
*********************/
#include "SceneGamePlay.h"
#include "Globals.h"
#include "Obstacle.h"
#include "SceneGameOver.h"
#include <stdlib.h> //srand
#include <time.h> //seed for srand
#include <math.h> //floor
#include "Sou... |
/*
* combine_svs.cpp
*
* Created on: Jul 6, 2016
* Author: fsedlaze
*/
#include "combine_svs.h"
breakpoint_str convert_position(strcoordinate pos) {
breakpoint_str tmp;
tmp.chr = pos.chr;
tmp.position = pos.pos;
return tmp;
}
int get_support(std::vector<Support_Node *> caller_info) {
int support = 0;... |
/*---------------------------------------------------------------------------------
LUA NDS something something game engine
Uses: LibNDS, NITROFS and the wonderful devkitarm tool-chain
LUASCRIPT based on EliasD tutorial: https://github.com/EliasD/unnamed_lua_binder
-------------------------------------------------... |
#include "vars.hpp"
#include "error_handler/error_handler.hpp"
#include "files/source_file.hpp"
// Get output path to remove if an error occurs
extern std::string output_path;
// The name for the utility
std::string utility_name;
// Whether we're currently in a file
bool in_file_ = false;
// The current file we're ... |
#include "stdafx.h"
#include "csapp.h"
#define CGI_BIN "cgi-bin.exe"
void doit(int fd);
void read_requesthdrs(rio_t *rp);
int parse_uri(char *uri, char *filename, char *cgiargs);
void serve_static(int fd, char *filename, int filesize);
void get_filetype(char *filename, char *filetype);
void serve_dynamic(int fd, char... |
// SciTE - Scintilla based Text Editor
/** @file JobQueue.cxx
** Define job queue
**/
// SciTE & Scintilla copyright 1998-2003 by <NAME> <<EMAIL>>
// Copyright 2007 by <NAME> <<EMAIL>>, from <NAME> <<EMAIL>>
// The License.txt file describes the conditions under which this software may be distributed.
#include <cstd... |
#include <glossy/window.hpp>
#include <glossy/default_scene.hpp>
#include <glossy/json2glsl.hpp>
#include <glossy/stopwatch.hpp>
#include <glossy/util.hpp>
#include <string>
#include <stdexcept>
#include <cmath>
#include <fstream>
#include <iostream>
void glossy::window::update_resolution( unsigned int width, unsigned... |
#include "mcPhaseSpaceIO.h"
#include "mcParticle.h"
#include "mcDefs.h"
#include <float.h>
const unsigned int mcPhaseSpaceIO::PHOTON_LATCH = 0x00000000;
const unsigned int mcPhaseSpaceIO::NEGATRON_LATCH = 0x40000000;
const unsigned int mcPhaseSpaceIO::POSITRON_LATCH = 0x20000000;
const unsigned int mcPhaseSpaceIO::BUF... |
#include "LGH.h"
#include "Locator.h"
#include "ThreadManager.h"
#include <algorithm>
std::mutex lightMutex;
LGH::~LGH()
{
}
void LGH::Create(const std::vector<Light>& pl)
{
voxels_per_axis_squared = (int)std::pow(voxels_per_axis, 2);
voxel_per_axis_cubed = (int)std::pow(voxels_per_axis, 3);
Recreate(&pl);
}
/... |
// Type B Thermocouple library per ITS-90
// *** BSD License ***
// ------------------------------------------------------------------------------------------
//
// Author: T81
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following c... |
#include "shared.h"
const unsigned int ARRAYS_RESERVE_SIZE = 2048;
enum RenderTargetType
{
RenderTargetType_Null,
RenderTargetType_Color,
RenderTargetType_DepthStencil
};
void dump (IView* view)
{
ViewDesc view_desc;
TextureDesc tex_desc;
if (view)
{
view->GetD... |
#include <iostream>
#include "m3g/m3g-gl.hpp"
#include "m3g/Transformable.hpp"
#include "m3g/Transform.hpp"
#include "m3g/Exception.hpp"
#include "m3g/AnimationTrack.hpp"
#include "m3g/AnimationController.hpp"
#include "m3g/KeyframeSequence.hpp"
using namespace std;
using namespace m3g;
Transformable:: Transformable (... |
#include <ThostFtdcTraderApi.h>
#include "CTraderSpi.hpp"
#include "trade.h"
#include <_cgo_export.h>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
using namespace std;
typedef struct
{
TThostFtdcInvestorIDType *account;
TThostFtdcPasswordType *password;
} CCredential;
//... |
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "imgui.h"
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include <iostream>
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode);
const GLchar* vertexShaderSource = R"(
#version 460 core
layout (location = 0) in vec3 ... |
#include <iostream>
#include "KCMerge.h"
#include "KCUtility.h"
#include "KCSelective.h"
using namespace std;
#define ITEMSETSFILE "_ITEMSETS_DATA_"
extern vector<vector<int> > get_maxfreqsets(int al, char *fname, int difn, double supp);
// Create a mapping from attribute values to the indices of the cliques that ... |
#pragma once
#include <Configuration.h>
#include <ExternalSource/myOptimizer/ConicSolver/include/solver/interface/Solver.hpp>
#include <PnC/Planner.hpp>
#include <PnC/PlannerSet/CentroidPlanner/ContactPlanInterface.hpp>
#include <PnC/PlannerSet/CentroidPlanner/DynamicsState.hpp>
#include <PnC/RobotSystem/CentroidModel... |
/******************************************************************************************
* Project Name: three
*
* Honbey, <EMAIL>
* Created On 2020-02-03
* Copyright (c) 2020. All rights reserved.
*
* Date: 2019-02-03
*
* Description: the 3rd learning record of OpenCV.
* C++ program for learning OpenCV.... |
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, <NAME>, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... |
#include <iostream>
#include <array>
int solveCalls = 0; // To keep track of how many times solveBoard() is called
/*Nicely prints a 9x9 sudoku board
@param arr a std::array which contains 9 std::arrays of ints
*/
void printBoard(std::array <std::array <int, 9>, 9> arr)
{
int row_no = 0;
int col_no = 0;
st... |
// Created: 07/14/2004 05:18:15 Eastern Standard Time
// Last Updated: $Date: 2004/08/28 02:34:20 $
// Revision: $Revision: 1.1 $
// Author: <NAME>
// Email: <EMAIL>
// Copyright: (c) 2004 <NAME>
////////////////////////////////////////////////////////////////////////////
// Standard C++ libra... |
/*
* Copyright 2017 MapD Technologies, 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 o... |
#include "gsys.h"
#include "do.h"
#include "wspackets.h"
#include <malloc.h>
#include <memory.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#ifdef TGOSLINUX
#include <alloca.h>
#include <stdlib.h>
#endif
void encode_tmp(char *bp,uint32_t len,char *rbp,uint32_t *rlen)
{
uint32_t len2;
... |
/* Author : <NAME> & <NAME>
* Date : 2013-12-30 10:12:53 Add gzstream to read file
* 2013-10-18 15:25:18
*
* The main part of variant detection program
* 1-base system to output
*
*/
#include <iostream>
#include <fstream>
#include <vector>
#include <getopt.h>
#include "utility.h"
#include "Variant.h"
... |
//
// Radar.cpp
// Radar_Detection
//
// Created by zhouforrest on 3/29/19.
// Copyright © 2019 Ruilin. All rights reserved.
//
#include "Radar.h"
// ------------------- Radar Class Implementation -----------------------
// Constructor
Radar::Radar(double x_in, double y_in, double z_in, double yaw_in, double... |
#include <boost/algorithm/string.hpp>
#include "k8deployer/IngressComponent.h"
#include "restc-cpp/RequestBuilder.h"
#include "k8deployer/logging.h"
#include "k8deployer/IngressComponent.h"
#include "k8deployer/Cluster.h"
#include "k8deployer/Component.h"
#include "k8deployer/probe.h"
using namespace std;
using nam... |
/* This software and supporting documentation are distributed by
* Institut Federatif de Recherche 49
* CEA/NeuroSpin, Batiment 145,
* 91191 Gif-sur-Yvette cedex
* France
*
* This software is governed by the CeCILL-B license under
* French law and abiding by the rules of distribution of free soft... |
#include "private/base64.h"
#include "gtest/gtest.h"
#define MANY_TIMES 5000
#ifdef _WIN32
#define RANDOM rand
#else
#define RANDOM random
#endif
std::string combine(uint32_t fst, uint32_t snd) {
std::string res;
res.reserve(8);
res.append(1, fst & 0xFF);
res.append(1, fst & 0xFF00);
res.append(1, fst & 0x... |
#include "DataFormats/FEDRawData/interface/FEDNumbering.h"
#include "DataFormats/SiStripCommon/interface/SiStripFedKey.h"
#include "DataFormats/SiStripCommon/interface/ConstantsForHardwareSystems.h"
#include "DQM/SiStripMonitorHardware/interface/CMHistograms.hh"
CMHistograms::CMHistograms() {
for (unsigned int i(0)... |
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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 app... |
/////*********************************************************/////
/////* Simple Calculator implemented with Stack */////
/////* 7th mini project Data structre course */////
/////* <NAME>. 20105183, <NAME>. 20106168 */////
/////* in AAST,Cairo,Egypt 2022 *//... |
#define linux
#include <iostream>
#include <fstream>
#include <pthread.h>
#include <mutex>
#include <unistd.h>
#include <string.h>
#include "PCANBasic.h"
#include "CanBasic.h"
#include <math.h>
#include <syslog.h>
extern int get_rtParam_int(char *name, char *field);
extern int set_rtParam(char* name, char* field, doub... |
#include <fstream>
#include <vector>
#include <string>
#include <stdlib.h>
#include "Application.h"
#include "EmitterFactory.h"
#include "AttractorFactory.h"
#include "./json/json.h"
#include "DgStringFunctions.h"
#define ARRAY_SIZE(arr) (int)((sizeof(arr))/(sizeof(*arr)))
void Application::UpdateProjectTitle(std::... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <string>
#include <vector>
#include <CL/cl.h>
#include "../util.h"
using namespace std;
const string kernel_name = "math.cl";
cl_int err;
cl_platform_id platform;
cl_device_id device;
cl_context context;
cl_command_queue q... |
/*
* Copyright (c) 2020-2022 <EMAIL> Chad_Peng.
* All Rights Reserved.
* Confidential and Proprietary - <EMAIL> Chad_Peng.
*/
#include "selfdrive/ui/qt/debug.h"
#include <cassert>
#include <cmath>
#include <string>
#include <QDebug>
#ifndef QCOM
#include "selfdrive/ui/qt/offroad/networking.h"
#endif
#ifdef ENA... |
#include "pch.h"
#include "image.h"
struct read_data
{
read_data(size_t ppos, const void* sourcedata, size_t buffersize)
: ppos(ppos),
sourcedata(sourcedata),
buffersize(buffersize)
{
}
size_t read(void* destinationbuffer, int amount)
{
auto src = ... |
#include <iostream>
#include <cstring>
#include <iomanip>
#include <byteswap.h>
#include <assert.h>
#include <chrono>
const int BITS_IN_BYTE = 8;
class Word {
private:
static const unsigned int BYTE_SIZE = 4;
static const unsigned int BIT_SIZE = 32;
unsigned int mValue;
public:
Word() {
mValue = 0;
}
Word(un... |
#include <bits/stdc++.h>
using namespace std;
#define node pair<int, int>
#define x first
#define y second
const int maxn = 1010;
int a[maxn][maxn];
int treeMinimus[maxn*4][maxn*4], treeMaximus[maxn*4][maxn*4];
bool operator == (const node& leftNode, const node& rightNode) {
return ((leftNode.x == rightNode.x) &... |
/*
* Copyright (C) 2015-2017 <NAME>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... |
#include "burner.h"
bool bIsWindowsXPorGreater = FALSE;
// Detect if we are using Windows XP/Vista/7
BOOL DetectWindowsVersion()
{
OSVERSIONINFO osvi;
BOOL bIsWindowsXPorLater;
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
... |
#include "Motor.h"
Controller::Controller(driver motor_driver, int pwm_pin, int motor_pinA, int motor_pinB):
motor_driver_(motor_driver),
pwm_pin_(pwm_pin),
motor_pinA_(motor_pinA),
motor_pinB_(motor_pinB),
prev_pwm_(0),
next_pwm_(0),
rampStartMillis(0)
{
switch (motor_driver... |
#include "sdl_example.h"
// http://lazyfoo.net/tutorials/SDL/37_multiple_displays/index.php
namespace SDL37ExampleNamespace {
//Screen dimension constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
class LWindow
{
public:
//Intializes internals
... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... |
// Copyright 2019 <NAME>
#include <torch/torch.h>
#include <torch/script.h>
#include <iostream>
#include <iomanip>
void print_tensor_size(const torch::Tensor&);
int main() {
std::cout << "PyTorch Basics\n\n";
// Set floating point output precision
std::cout << std::fixed << std::setprecision(4);
// ... |
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in bin... |
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrSurface.h"
#include "GrContext.h"
#include "GrOpList.h"
#include "GrSurfacePriv.h"
#include "SkBitmap.h"
#include "SkGrPriv.h"
#include "SkImageEncoder.h"
#includ... |
// $Id: plwind.c 12968 2014-01-29 01:42:57Z airwin $
//
// Routines for setting up world coordinates of the current viewport.
//
// Copyright (C) 2004 <NAME>
//
// This file is part of PLplot.
//
// PLplot is free software; you can redistribute it and/or modify
// it under the terms of the GNU Library Ge... |
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
#include <algorithm>
#include <u... |
/*
* mmuimpl.cpp
* Copyright (C) 2020 <NAME> <<EMAIL>>
*
* Distributed under terms of the MIT license.
*/
#include "mmuimpl.hpp"
#include "interrupt.hpp"
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <utility>
using namespace gbg;
namespace MemAddr {
static const addr_t ... |
#include "kmer.h"
#include "hirschberg.h"
#include "output.h"
#include <thread>
#include <mutex>
#include "main.h"
#include <cstdlib>
#define RPRINT
std::mutex file_mtx;
std::mutex occurrences_mtx;
/*
Uses hirschberg alignment results to create a vector ofoccurrence_t structures
which count mutation votes ... |
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* obje... |
/*
* Copyright 2019, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME> <waddlesplash>
*/
extern "C" {
#include <sys/malloc.h>
#include <sys/bus.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/mbuf.h>
#include <machine/bus.h>
}
// #pragma ma... |
/*
* Copyright 2002-2019 Barcelona Supercomputing Center (www.bsc.es)
*
* 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
*
* Unl... |
//
// "$Id: table-sort.cxx 11493 2016-03-31 21:50:34Z AlbrechtS $"
//
// table-sort -- An example application using a sortable Fl_Table
//
// Originally the 'sortapp.cxx' example program that came with
// erco's Fl_Table widget. Added to FLTK in 2010.
//
// Example of a non-trivial application tha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.