text stringlengths 3.08k 12.5k |
|---|
/*
* Copyright (c) 2019 <NAME>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#ifdef EMSCRIPTEN
#include <emscripten/emscripten.h>
#define GLFW_INCLUDE_ES3
#include <GLFW/glfw3.h>
#elif defined(USE_GLEW)
#include <GL/glew.h>... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
/*
* 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 (c) 2018 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2024-08-24
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... |
#include <cryptopp/eccrypto.h>
#include <cryptopp/ecpoint.h>
#include <cryptopp/asn.h>
#include <cryptopp/crc.h>
#include <cryptopp/oids.h>
#include <cryptopp/osrng.h>
#include <cryptopp/drbg.h>
#include <cryptopp/modes.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <set>
#include <thread>
#inclu... |
/*
* Copyright (c) 2015, 2016 See AUTHORS file.
* 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 ... |
/*
Copyright (c) 2013, Regents of the University of Alaska
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 cond... |
//
// Birthday project
//
#include "Birthday_win.hpp"
#include "date_time_ext.hpp" // get_date_results
#include <sstream>
#include <iostream> // test
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Birthday_win::Birthday_win(Point tl, int w, int h, const std::s... |
#include "../include/PHOLDApplication.h"
#include "../include/Process.h"
#include "../include/PHOLDEvent.h"
#include <DeserializerManager.h>
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
using std::string;
PHOLDApplication::PHOLDApplication(string inputFileName, int numObjects)
: i... |
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include "GL/glew.h"
#include <GLFW/glfw3.h>
// #include "helper.cpp"
#include "scene.h"
#include "light.h"
// #include "objects.h"
// #include "utils.h"
// #include "light.h"
// #include "camera.h"
#include <iostream>
#include<omp.h>
#define QUIT(m,v) { fp... |
#include <cstdio>
#include <typeinfo>
#include <cassert>
#include <cstring>
#include <iostream>
#include <dace/dace.h>
struct add_wcr
{
template<typename T>
static void resolve(T *ptr, const T& value)
{
*ptr += value;
}
};
#define AW 1000
#define AH 1000
int main(int, char **)
{
///////... |
/* ************************************************************************
* Copyright 2013 Advanced Micro Devices, 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... |
#include <iostream>
#include <getopt.h>
#include "fcm.h"
#define PROGRAM_NAME "FCM"
#define VERSION 20161010
#define print_name_version() cout << PROGRAM_NAME << " version " << VERSION << endl
using namespace std;
void print_help();
int main(int argc, char **argv) {
if (argc == 1){
cout << "Usage: -h ... |
/*
Creates randomize sets of a chemical reaction. All reactions are written in a file in the following format:
reactant1.reactant2.reactant3>>product
For example, for etherification reaction the line can be:
c1ccccc1CO.CO>>c1ccccc1COC
And the output
CO.c1(CO)ccccc1>>COCc1ccccc1
CO.c1c(CO)c... |
/*===================== begin_copyright_notice ==================================
Copyright (c) 2017 Intel Corporation
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, includi... |
/********************************************************
Authors: <NAME> & <NAME>
Created: November 27th 2007
Build 1.0
This is a representation of the Dungeons and Dragons game by Wizards of the Coast inc.
interpreted by <NAME> & <NAME> for the class Advanced Programming
in C++ using the d20 rules system.
**********... |
// CryptoExample.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <string>
#include <cstdio>
#include <windows.h>
#include <memory.h>
#include <string.h>
#include <wincrypt.h>
using namespace std;
bool encryptData(uint8_t* pCleartex... |
#include "SystemReader.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#if defined(WIN32)
#define WIN32_LEAN_AND_MEAN
#define FD_SETSIZE 1024
#include<WinSock2.h>
#include <MSWSock.h>
#include<Windows.h>
#else
#include <sys/socket.h>
#include <sys/types.h>
#include <fcntl.h>
#includ... |
/*
* pattern.cpp
*
* Created on: Sep 4, 2018
* Author: prakash
*/
#include "headers.hpp"
#include "pattern.hpp"
#include "circuit.hpp"
void delete_gate_from_vec(vector <Gate*> &vec, Gate *g){
vec.erase(std::remove(vec.begin(), vec.end(), g), vec.end());
}
GateStub* PatternProcessor::get_gate_stub(string... |
//From turtlebot teleop
#include <ros/ros.h>
#include <geometry_msgs/Twist.h>
#include <std_msgs/Int32.h>
#include <oddbot_msgs/HerkulexCommand.h>
#include <signal.h>
#include <termios.h>
#include <stdio.h>
#include "boost/thread/mutex.hpp"
#include "boost/thread/thread.hpp"
//D key
#define DRIVE_R 0x64
//A key
#defi... |
#include "mediapipe/framework/calculator_framework.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/framework/formats/image_frame.h"
#include "mediapipe/framework/formats/image_frame_opencv.h"
#include "mediapipe/framework/formats/rect.pb.h"
#include "mediapipe/framework/port/opencv_imgproc_inc.h"
#... |
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "BroadcasterClock.h"
const float DEG2RAD = 3.14159 / 180;
// Determine how big various clock parts should be
float widthByTwo;
int smallest;
// An index for the clock markings
GLuint index;
BroadcasterClock::BroadcasterClock(int width, int height... |
/* -*- Mode: c++; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/* vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab: */
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011, <NAME> <dirk.holz _at_ ieee.org>
* All rights reserved.
*
* Redistribution and use in source and bi... |
/*-
* $Copyright$
-*/
#include <gmock/gmock.h>
#include <devices/Pixel.hpp>
/*****************************************************************************/
class RgbPixelTest : public ::testing::Test {
public:
RgbPixelTest() {
}
virtual ~RgbPixelTest() {
}
protected:
Pixel::RGB m_rgbPixel;... |
// This is the main file that will be used to run the program for data
// collection from the 3 IMU's and send them to the server as is necesarry.
#include "main.h"
#include "debug_printer.h"
#ifdef TAKE_ARGUMENTS
#include <cxxopts.hpp>
#endif
#include <dirent.h>
#include <filesystem>
#include <fstream>
#include <... |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <GL/glx.h>
#include "context-opengl.h"
#include "runtime.h"
#include "effect.h"
#include "factory.h"
using na... |
#include "IPAddress.h"
#include <string>
IPAddress::IPAddress (unsigned char a, unsigned char b, unsigned char c, unsigned char d) : m_a(a), m_b(b), m_c(c), m_d(d) {}
IPAddress::IPAddress (unsigned int addr) { setAddress(addr); }
IPAddress IPAddress::operator& (const IPAddress& addr) const {
return IPAddress(m_... |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
template<class T>
vector<T> tokenize(string s, const string &delim=" ")
{
vector<T> ret_val;
... |
/***************************************************************************************/
// The following class class adds additional graphics functions to the TFT_eSPI library.
// The class inherits the generic drawing graphics functions from the TFT_eSPI class.
// Created by Bodmer 15/11/2018
// See license.txt in ... |
// -!- C++ -!- //////////////////////////////////////////////////////////////
//
// System :
// Module :
// Object Name : $RCSfile$
// Revision : $Revision$
// Date : $Date$
// Author : $Author$
// Created By : <NAME>
// Created : Sun Jun 10 09:27:34 2018
// Last... |
#include "ffmpegs.h"
#include <QtDebug>
#include <QFile>
extern "C" {
// 重采样相关API
#include <libswresample/swresample.h>
// 工具相关API(比如错误处理)
#include <libavutil/avutil.h>
}
// 宏定义
#define ERROR_BUF(ret) \
char errbuf[1024]; \
av_strerror(ret, errbuf, sizeof (errbuf));
FFmpegs::FFmpegs()
{
}
v... |
#include "lexer.h"
#include "common.h"
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include "utility.h"
using namespace std;
TokenValue Lexer::dummy;
bool isoperatorchar(char c){
switch(c){
case '%': case '$': case '#': case '=': case '~':
case '|': case '^': case '+': case '-': c... |
// Copyright 2018 The SAF 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
//
// Unless required by appli... |
/*
* ExAPBitmapRGBA32.cpp
* Exeter AssetProcessor
*
* Created by <NAME> on Wed May 07 2003.
* Copyright (c) 2003 by <NAME>. All rights reserved.
*
*/
#include "ExAPBitmapRGBA32.h"
#include "ExAPConversionTemplates.h"
ExAPBitmapRGBA32::ExAPBitmapRGBA32( int width, int height ) throw( ExAPExcep... |
#include <iostream>
#include <sys/time.h>
#include <CL/cl.hpp>
#include <stdexcept>
#include <sys/time.h>
#include <cstdio>
#include <fstream>
#include <sstream>
#include <utility>
cl::Context context;
std::vector<cl::Device> devices;
cl::CommandQueue commandQueue;
cl::Kernel kernel;
#define TPB 32
#ifndef DTYPE
#def... |
/*! \file TestOptimizations.cpp
\author <NAME> <<EMAIL>>
\date Tuesday May 1, 2012
\brief The source file for the TestPTXAssembly class.
*/
// Ocelot Includes
#include <ocelot/transforms/test/TestOptimizations.h>
#include <ocelot/transforms/interface/PassFactory.h>
#include <ocelot/transforms/interface/PassManager... |
//===-- PTXISelDAGToDAG.cpp - A dag to dag inst selector for PTX ----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include "data_io.hpp"
#include "pfm_io.hpp"
#include <boost/property_tree/json_parser.hpp>
#include <opencv2/opencv.hpp>
#include <glog/logging.h>
#include <iostream>
#include <utility>
#include <string>
#include <regex>
namespace pt = boost::property_tree;
void DataIO::write2json(const std::string& filename, con... |
//
// Copyright (C) 2007 by sinamas <sinamas at users.sourceforge.net>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope tha... |
#include "Connection.hpp"
// Definition of the version integer of the Connection & associated classes.
extern const unsigned connection_version = 20200306;
// Class Connection
Connection::Connection() = default;
Connection::Connection(unsigned sat, unsigned eat, unsigned bt) :
start_atom_type(sat),
end_a... |
#include <bits/stdc++.h>
using namespace std;
struct VectorHash {
size_t operator()(const array<int, 4> &v) const {
std::hash<int> hasher;
size_t seed = 0;
for (int i : v) {
seed ^= hasher(i) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
return seed;
}
};
//h... |
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
/**
* Part 1 of TokenScript example
*
* This demo shows a very simple connection between wallet and IoT device
* To get up and running you will need to:
* 1. Install AlphaWallet on iOS or Android
* 2. Copy your wallet address from Settings/My Wallet Address
* 3. Visit the faucet here: https://goerli-faucet.sloc... |
/*
###################################################################################
#
# BCMTools
#
# Copyright (c) 2011-2014 Institute of Industrial Science, The University of Tokyo.
# All rights reserved.
#
# Copyright (c) 2012-2016 Advanced Institute for Computational Science (AICS), RIKEN.
# All rights reserved.
... |
#include "scene.h"
fvec scene::BACKGROUND = fvec( "0 0 0 1" );
mat rotation_matrix( const vec &a, double angle ) {
// init cross-product
mat cp( 3, 3 );
// zero out the response
cp.zeros( 3, 3 );
vec na(a);
// create a new rotation matrix
mat rm( 3, 3 );
// zero out the response
rm.zeros( 3, 3 );
// calcu... |
#include <stdlib.h>
#include <string.h>
#include <iso646.h>
#include <malloc.h>
#include <algorithm>
#include <memory>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
#include <map>
#include <3ds.h>
#include "drawing.h"
#include "font.h"
#include "http.h"
#include "smdh.h"
#include "storage.h... |
#include <iostream>
#include <cstring>
#include <fstream>
#include <plantillas.h>
#include <estacion_espacial.h>
EstacionEspacial::EstacionEspacial(){
set_numeroRegistro("LNNNNLLL"); //Inicializa los atributos de la clase base
set_propietarioNave("Indefinido");
set_maximoTripulantes(0);
set_precio(0);
... |
#include "lodepng.h"
#include "psxmenu.h"
#include "bg_blue_png_bin.h"
static bool menu_bgLoaded = false;
static bool musicStopped = false;
static bool displayMenuGraphics = false;
static int menu_cursor = 0;
static bool menu_textFade = false;
static int menu_textFadeColor = 255; // 0 when faded out
extern int psCo... |
/*
Copyright (c) 2016 - 2019 Regents of the University of Minnesota and Bolder Flight Systems Inc.
MIT License; See LICENSE.md for complete details
Author: <NAME>
*/
#include "WProgram.h"
#include "hardware-defs.h"
#include "comms.h"
#include "mission.h"
#include "configuration.h"
#include "sensors.h"
#include "contro... |
#include<set>
#include<map>
#include<queue>
#include<cstdio>
#include<cstring>
using namespace std;
set<int> H;
int n, m, rn[32], r0[16], r1[16], wr[16], val[16], next[16], p3[16];
char cmd[16][99];
inline void Add(int& v) {
if (v < 0) return;
if (rn[v] < 0)
rn[v] = m++;
v = rn[v];
}
inline int GetReg(int k,... |
/*
Copyright (c) 2011 <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... |
#include "MIMEType.hh"
#include <string>
#include <unordered_map>
using namespace std;
static const unordered_map<string, string> mime_type_for_file_extension({
{"aif", "audio/aiff"},
{"aifc", "audio/aiff"},
{"aiff", "audio/aiff"},
{"ani", "application/x-navi-animation"},
{"asf", "video/x-ms-... |
#include <algorithm>
#include <cmath>
#include <cstdint>
#include "bms_relay.h"
#include "packet.h"
namespace {
template <class T>
inline T clamp(T x, T lower, T upper) {
return std::min(upper, std::max(x, lower));
}
inline int16_t int16FromNetworkOrder(const void* const p) {
uint8_t* const charPointer = (uint8... |
/**
* @File : fourier_transform.cpp
* @Brief : 二维离散傅里叶变换; 快速傅里叶变换; 幅度谱(零谱中心化)和相位谱
* @Author : <NAME>
* @Date : 2021-10-21
*/
#include <iostream>
#include <vector>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
// ------------ 快速离散傅里叶变换 ------------
void FFT2Im... |
#include "pch.h"
#include "StereoSimpleD3D.h"
#include "BasicTimer.h"
namespace winrt
{
using namespace Windows;
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Activation;
using namespace Windows::ApplicationModel::Core;
using namespace Windows::Foundation;
... |
/* supported_protocols_model.cpp
*
* Wireshark - Network traffic analyzer
* By <NAME> <<EMAIL>>
* Copyright 1998 <NAME>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <QSortFilterProxyModel>
#include <QStringList>
#include <QPalette>
#include <QApplication>
#include <QBrush>
#include <ui/qt/models/s... |
#include "stdafx.h"
Audio* Audio::instance = 0;
Audio* Audio::get_instance()
{
if (instance == 0)
instance = new Audio();
return instance;
}
void Audio::open()
{
SDLWrapper::open_audio(&wantedSpec, &audioSpec);
wanted_frame.format = AV_SAMPLE_FMT_S16;
wanted_frame.sample_rate = audioSpec... |
/*
* Copyright (c) 2019-2022, <NAME> <<EMAIL>>.
* All rights reserved.
*
* Distributed under the terms of the BSD 3-Clause License.
*/
#include "config.h"
#include "headers/ReadFile.hpp"
#include "headers/TestData.hpp"
#include "headers/lexer/Lexer.hpp"
#include "headers/parser/Parser.hpp"
#include "headers/RunPr... |
/*
* Copyright (c) 2018 Samsung Electronics Co., Ltd. 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... |
// Copyright 2021 <NAME>
#include <mpi.h>
#include <vector>
#include <random>
#include <stack>
#include <algorithm>
#include "../../../modules/task_3/stepanov_a_convex_hull_binary_image/convex_hull_binary_image.h"
void generateBinaryImage(std::vector<int>* image,
std::size_t size_image) {
std::random_device d... |
/*
microsoft-oms-auditd-plugin
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
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, in... |
#include "Segmenter.h"
#define IMAGE_SIZE 30
Segmenter::Segmenter() {}
std::vector<std::vector<float>> Segmenter::segment(std::vector<std::string> filenames) {
std::vector<std::vector<float>> return_to_python;
int components = 0;
for(std::string filename : filenames) {
cv::Mat original_image = cv:... |
#include "nn/plugin/plugin.h"
static const int OUTPUT_CLS_SIZE = 91;
static const int OUTPUT_BBOX_SIZE = OUTPUT_CLS_SIZE * 4;
const char* OUTPUT_BLOB_NAME0 = "NMS";
const int concatAxis[2] = {1, 1};
const bool ignoreBatch[2] = {false, false};
DetectionOutputParameters detectionOutputParam{true, false, 0, OUTPUT_CLS... |
#include "hep_concurrency/RecursiveMutex.h"
// vim: set sw=2 expandtab :
#include <atomic>
#include <condition_variable>
#include <cstdlib>
#include <exception>
#include <iomanip>
#include <iostream>
#include <map>
#include <mutex>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace ... |
/*
* Copyright (c) 2021 Samsung Electronics Co., Ltd. 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... |
/*
* Copyright (c) <NAME>. All Rights Reserved.
*
* License: See License.txt
*/
/**
* @file
* @brief List of icons
* @author <NAME>
*
* Revision History
* 2016-06-19 Add a blank icon to fix issue on Mac.
* 2012-12-29 Move icon management to global list.
* 2009-01-27 Ported to wxWidgets.
* 2007-04-22 Creat... |
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <list>
#include <climits>
#include "graph.h"
using namespace std;
const double INF_DOUBLE = 1e20;
double loss_prob = 0.2;
vector<int> edges[NODE_NUM_MAX];
int weight[NODE_NUM_MAX];
int TW;
int n; /... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "NoiseComponent.h"
#include "MapGenerator/Volumetric3DTerrain/Volumetric3DTerrainManager.h"
#include "MapGenerator/Utils/MapEditorUtils.h"
#include "MapGenerator/Volumetric3DTerrain/Octree/OctreeUtils.h"
FastNoise UNoiseComponent... |
// Implementation of vector add in OpenCL
// stop deprecation warnings about clCreateCommandQueue
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <CL/opencl.h>
#include <stdio.h>
#include "timer.h"
#define RealType float
void check_status(int status, const char *api_name)
{
if (status != CL_SUCCESS) {
pr... |
/********************************************************************
Created by MythKAst
©2013 MythKAst Some rights reserved.
You can build it with vc2010,gcc.
Anybody who gets this source code is able to modify or rebuild it anyway,
but please keep this section when you want to spread a new version.
It's strongly ... |
#include <Arduino.h>
#include <SoftwareSerial.h>
// Define constants
#define LED_R 11
#define LED_G 12
#define LED_B 13
#define LED_SENSING 4
#define LED_CALIBRATION_WHITE 7
#define LED_CALIBRATION_BLACK 8
#define LDR A0
#define BUTTON_CALIBRATE 2
#define STATE_CALIBRATION 0
#define STATE_READ_COLOR 1
//Used: 2,3,4,7,... |
#include <math.h>
#include <uWS/uWS.h>
#include <iostream>
#include <string>
#include "json.hpp"
#include "PID.h"
// for convenience
using nlohmann::json;
using std::string;
// For converting back and forth between radians and degrees.
constexpr double pi() { return M_PI; }
double deg2rad(double x) { return x * pi() ... |
//
// unit/integration test extension for max
// tim place
// cycling '74
//
#include "oscar.h"
#include "z_dsp.h"
#define MAXSAMPLECOUNT 64
/** like snapshot~ but a little easier to get predictable results in the test context.
for example, snapshot~ will return a result when banged even if dsp has never finished... |
#include <random>
#include <iostream>
#include <fstream>
#include <chrono>
#include "selection.h"
#include "utils/default_hash.hpp"
#include "utils/command_line_parser.hpp"
#include "utils/pin_thread.hpp"
#include "utils/output.hpp"
namespace utm = utils_tm;
namespace otm = utils_tm::out_tm;
#ifdef MALLOC_COUNT
#in... |
// Problem Link:
// https://practice.geeksforgeeks.org/problems/find-missing-and-repeating2512/1
// Approach 1: (Sorting)
// TC: O(n.log(n))
// SC: O(1)
// Approach 2: (Hashing)
// TC: O(n)
// SC: O(n)
// Approach 3: (Math)
// TC: O(n)
// SC: O(1)
// Approach 4: (XOR)
// TC: O(n)
// SC: O(1)
#include <bits/stdc++.... |
#include <sstream>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
class Haar1D
{
public:
vector <int> go(vector <int> d, int pos)
{
ve... |
#include "storage_task.h"
#include "mbed.h"
#include <stdio.h>
#include <errno.h>
#include <functional>
#include <string>
#include "BlockDevice.h"
#include "FATFileSystem.h"
#include "ui.h"
// Maximum number of elements in buffer
#define BUFFER_MAX_LEN 10
#define FORCE_REFORMAT true
BlockDevice *bd = BlockDevice::g... |
#include "SPH_2D.h"
#include "file_writer.h"
#include <string>
#include <sstream>
#include <iomanip>
#include <iostream>
#include <fstream>
using namespace std;
SPH_main domain;
void file_out(SPH_particle* part, int ite);
int main(void)
{
ifstream myfile("arbitrary.txt");
string line;
double t_total, t_print, de... |
/*
* mafExternalDataCodecVolume.cpp
* mafSerialization
*
* Created by <NAME> on 24/02/12.
* Copyright 2012 University of Bedfordshire. All rights reserved.
*
* See License at: http://tiny.cc/QXJ4D
*
*/
#include "mafExternalDataCodecVolume.h"
#include <mafVolume.h>
using namespace mafCore;
using namespac... |
/*
* 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 "CurveIntersection.h"
#include "QuadraticUtilities.h"
/* from http://tom.cs.byu.edu/~tom/papers/cvgip84.pdf 4.1
*
* This paper proves that Syvester's method can com... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
//
// lr1_rewriter.cpp
// TameParse
//
// Created by <NAME> on 13/01/2012.
//
// Copyright (c) 2011-2012 <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 re... |
#include "SimonSez.h"
void SimonSez::begin(Adafruit_RGBLCDShield _lcd) {
this->lcd = _lcd;
this->sLevel = NumTargets;
for (int i = 0; i < MaxMoves; i++) {
Sequence[i] = 0;
}
quitgame = false;
}
void SimonSez::SelectGame() {
lcd.clear();
lcd.home();
lcd.print(sg_Simon);
delay(1000);
bool done =... |
/*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : <NAME>
Contributors : <NAME>, <NAME>.
[1] <NAME>, <NAME>.... |
/* D-specific tree lowering bits; see also gimple.c.
Copyright (C) 2020 Free Software Foundation, Inc.
GCC 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 3, or (at your option)
any later versio... |
#include <fstream>
#include <string>
#include <sstream>
#include "Configuration.h"
Configuration* config = nullptr;
/**------------------------------------------------------------
Destructor.
-----------------------------------------------------------*/
Configuration::~Configuration() { /*delete instance;*/ }
/*... |
#include "MHelp.h"
#include "MUtilities.h"
int MHelp::currentBalloon = 0;
void MHelp::SetControlHelp(ControlHandle theControl, int resID, int stringNo)
{
#if TARGET_API_MAC_CARBON
HMHelpContentRec helpContent;
helpContent.version = kMacHelpVersion;
SetRect(&helpContent.absHotRect, 0, 0, 0, 0);
helpContent.tagSi... |
/* wanderfreq -- start up 10 MYWAVETABLEs (modified WAVETABLE with a
frequency-access method) and randomly choose a target freq,
and wander towards it
demonstration of the RTcmix object -- BGG, 11/2002
Modified to show new Instrument functionality DS 03/2003
*/
#define MAIN
#include <unistd.h>
#include <stdi... |
#include "parsercontext.hpp"
#include "tx_lang_defs.hpp"
#include "ast/ast_node.hpp"
#include "driver.hpp"
#include "txparser/scanner.hpp"
#include "llvm_generator.hpp"
std::string format_location( const TxLocation& ploc ) {
const size_t bufSize = 256;
char buf[bufSize];
auto filename = ploc.parserCtx->s... |
// Copyright 2020 LKEB at LUMC
// Author: <NAME>
#include "HSne.h"
#include <iostream>
#include <fstream>
#include <numeric>
#include <string>
#include <vector>
HSne::HSne(
bool verbose
) : _num_scales(0),
_num_data_points(0),
_num_dimensions(0),
_num_target_dimensions(0),
_verbose(verbose),
_seed(-1),
_hsne(nullp... |
/* Copyright 2001, 2019 IBM Corporation
*
* 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
* following d... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <cmath>
#include "lpmConfig.h"
#include "OutputMessage.h"
#include "Logger.h"
#include "GlobalConstants.h"
#include "LpmXyzVector.hpp"
#include "LpmEuclideanCoords.hpp"
#include "LpmSphereCoords.hpp"
#include "LpmParticles.hpp"
#include "LpmScalarField.... |
#include <utility>
#include "HttpServer.h"
using namespace http;
mg_serve_http_opts HttpServer::serverOpt_;
string http::HttpServer::rootPath_ = "./web";
std::unordered_map<std::string, ReqHandler> HttpServer::s_handler_map;
std::unordered_set<mg_connection *> HttpServer::s_websocket_session_set;
HttpServer::HttpSe... |
/*
* Copyright 2007-2021 CM4all GmbH
* 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 copyright
... |
//
// Created by Keen on 25.01.2021.
//
#include "EventManager.hpp"
#include "Utils.hpp"
namespace {
GUI_Event_Type convert_eventType_to_GUI_event_type(Event l_eventType){
switch (l_eventType){
case(Event::GUI_Clicked): { return GUI_Event_Type::Click;}
case(Event::GUI_Hovered): { r... |
#include <sophus/se3.h>
#include <string>
#include <iostream>
#include <fstream>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <Eigen/StdVector>
// need pangolin for plotting trajectory
#include <pangolin/pangolin.h>
using namespace std;
// path to trajectory file
string trajectory_file = "./com... |
#include <iostream>
#include <vector>
#include <chrono>
#include <fstream>
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/newline.hpp>
#include <boost/iostreams/device/mapped_file.hpp>
#include <boost/program_options.hpp>
#include "parameters.hpp... |
#include "ZeroPlayer.hpp"
#include "teleoperado.hpp"
#include <RobotisOp2GaitManager.hpp>
#include <RobotisOp2MotionManager.hpp>
#include <RobotisOp2VisionManager.hpp>
#include <webots/Accelerometer.hpp>
#include <webots/Camera.hpp>
#include <webots/Gyro.hpp>
#include <webots/LED.hpp>
#include <webots/Motor.hpp>
#inclu... |
/*
* File: pictureosc.cpp
*/
#include "userosc.h"
#if 1
#include "figure.h"
#else
#define VERTICES 6
#define WAVETABLES 1
static float figure_x[WAVETABLES][VERTICES] = {
{1.0, 0.5, 0.0, 0.5, 1.0, 0.5}
};
static float figure_y[WAVETABLES][VERTICES] = {
{0.0, 0.0, 0.5, 1.0, 0.5, 0.0}
};
#endif
#define BUFSIZ... |
// UVA Problem 681:
// https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=622
#include <iostream>
#include <algorithm>
#include <exception>
#include <vector>
#include "struts/geometry.cc"
using std::cin;
using std::cout;
/**
* Extensão para a classe base geometry::Poin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.