text stringlengths 3.08k 22k |
|---|
/*
* Created by <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the MIT License
*/
//------------------------------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#inclu... |
/*
* Copyright (C) 2015 by <NAME> (<EMAIL>)
*
* Released under the MIT license, see LICENSE.txt
*/
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include <ctime>
#include <cmath>
#include <cstdio>
#include <sstream>
#include "unitTests.h"
#include "pathmapper.h"
using namespace std;
using namespace vg;
... |
/*
* Copyright 2019 JG Mechatronics AB
*
* 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... |
#ifdef _WIN32
#include <windows.h>
#else
#include <pthread.h>
#endif
#include <stdexcept>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <string>
#include <fstream>
#include <SDL.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "gl_core_4_5.h"
#include "util.h... |
#include <polyvec/io/vtk_curve_writer.hpp> // Optional
#include <polyvec/misc.hpp>
#include <polyvec/api.hpp>
#include <polyvec/curve_objectives.hpp>
#include <polyvec/curve_bezier.hpp>
#include <polyvec/curve_solver.hpp>
#include <memory>
using namespace polyvec;
using namespace std;
namespace {
void
exam... |
/*
This file forms part of hpGEM. This package has been developed over a number of
years by various people at the University of Twente and a full list of
contributors can be found at http://hpgem.org/about-the-code/team
This code is distributed using BSD 3-Clause License. A copy of which can found
below.
Copyr... |
/* $Id: UIToolPaneGlobal.cpp 73424 2018-08-01 14:07:18Z vboxsync $ */
/** @file
* VBox Qt GUI - UIToolPaneGlobal class implementation.
*/
/*
* Copyright (C) 2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free soft... |
// Copyright 2008, Google Inc.
// 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 conditions a... |
/*
* #%L
* OME-XML C++ library for working with OME-XML metadata structures.
* %%
* Copyright © 2014 - 2016 Open Microscopy Environment:
* - Massachusetts Institute of Technology
* - National Institutes of Health
* - University of Dundee
* - Board of Regents of the University of Wisconsin-Madison
* -... |
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
/* This is NOT a TF GPU op, instead it is a CPU op invoking GPUs
* In future we should wrap individual cuMF kernels as TF ops,
* and use TF to write the glue code which is currently in c
*/
REGISTER_OP("DoAls")
.Input("csr... |
#include <QDir>
#include <QString>
#include "medo/config.h"
#include "storage/fileitem.h"
#include "storage/folderitem.h"
#include "storage/storage.h"
#include "storage/storagemonitorlocker.h"
#include "deletion.h"
#include "helpers.h"
#include "rtfconverter.h"
FolderItem::FolderItem(Storage* storage, FolderItem* root... |
/**
* Bachelor thesis: Algorithms for automatic image cropping
* VUT FIT 2018
* Author: <NAME> (<EMAIL>)
* Supervisor: Doc. Ing. <NAME>, Ph. D.
* File: Main.cpp
* Github repository: https://github.com/VitaAmbroz/AutoCropApp
*/
#include <iostream>
#include <string>
#include <opencv2/opencv.hpp>
#in... |
#include <Path2D.h>
#include <cmath>
using namespace canvas;
void
Path2D::arc(const Point & p, double radius, double sa, double ea, bool anticlockwise) {
data.push_back(PathComponent(PathComponent::ARC, p.x, p.y, radius, sa, ea, anticlockwise));
current_point = Point(p.x + radius * cos(ea), p.y + radius * sin(ea... |
#include <CoreFoundation/CoreFoundation.h>
#include "lldb-perf/lib/Measurement.h"
#include "lldb-perf/lib/Metric.h"
#include "lldb-perf/lib/TestCase.h"
#include "lldb-perf/lib/Timer.h"
#include "lldb-perf/lib/Xcode.h"
#include <getopt.h>
#include <string>
#include <unistd.h>
using namespace lldb_perf;
class StepTes... |
#include <awtrix_matrix.h>
void initMatrix()
{
switch (matrixType)
{
case 0:
matrix = new FastLED_NeoMatrix(leds, 32, 8, NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG);
break;
case 1:
matrix = new FastLED_NeoMatrix(leds, 8, 8, 4, 1, NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO... |
/**
* \file docopt_testing.cpp
*
* \copyright <NAME>, 2018
*
* See LICENSE for details
*/
#include <e131_blinkt.hpp>
static const char* cmd_help{
R"(e131_blinkt - command a Pimoroni Blinkt! through E1.31
Usage:
e131_blinkt [--help] [--verbose] [--spidev=FILE] [--config=FILE]
Options:
--help ... |
// OpenCVSandbox.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <... |
/*
* FCP report generators
*
* Class for reading messages into frames.
*
* Copyright IBM Corp. 2008, 2017
*
* s390-tools is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. See LICENSE for details.
*/
#include <assert.h>
#include <unistd.h>
#define __STDC_LIMIT_MAC... |
/**
* This node:
* - receives movement data from pilot and transforms it into byte array and publishes it
* - receives byte array from protocol_bridge, parses it and publishes it
*/
#include "ros/ros.h"
#include "std_msgs/UInt16.h"
#include "std_msgs/UInt8MultiArray.h"
#include "geometry_msgs/Twist.h"
#include "s... |
/**
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: <NAME>
*/
#include "particle_filter.h"
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <random>
#include <string>
#include <vector>
#include "helper_functions.h"
using std::string;
using ... |
/*****************************************************************************/
/**
* @file main.cpp
* @author <NAME>
* @brief Example program of parallel rendering with image composition
*/
/*****************************************************************************/
#include <kvs/OffScreen>
#include <kvs/... |
/*
* Copyright (C) 2015 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... |
#pragma once
// C++
#include <limits.h>
#include <istream>
#include <ostream>
// PCL
#include <pcl/io/obj_io.h>
#include <pcl/common/transforms.h>
// OpenCV
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
// PCL
#include <pcl/common/eigen.h>
#include <pcl/common/common.h>
// OpenCV
#i... |
//
// Created by Johannes on 25.06.2020.
//
#include "logic/inner_participant.hpp"
#include "logic/inner_simulation.hpp"
using namespace har;
//region asymmetric_lock
asymmetric_lock::asymmetric_lock(std::mutex & inverse) : _mutex(),
_waiting(false),
... |
/*----------------------------------------------------------------------------*/
/* */
/* Copyright (c) Innovation First 2020 All rights reserved. */
/* Licensed under the MIT license. ... |
/*
Copyright (c) 2005-2021 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, WVU Interactive Robotics Laboratory
* https://web.statler.wvu.edu/~irl/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or w... |
//$Header: /cygdrive/p/dev/cvs/test/TestModerator/TestModerator.cpp,v 1.6 2005/07/13 21:19:46 lojun Exp $
//------------------------------------------------------------------------------
// TestModerator
//------------------------------------------------------------------------------... |
/*
* .file advanced/spectra/document_view.cpp
* .brief Implements the document view class.
*
* @author <NAME>
*
* Copyright 2012-2019 <NAME>. Distributed under the Boost
* Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include... |
#include "torrent_handler.h"
#include <libtorrent/magnet_uri.hpp>
#include <libtorrent/torrent_info.hpp>
#include <libtorrent/alert_types.hpp>
#include <libtorrent/read_resume_data.hpp>
#include <libtorrent/write_resume_data.hpp>
#include "item_window.h"
#include "resource_manager.h"
#include "settings_manager.h"
#incl... |
// Core SPC emulation: CPU, timers, SMP registers, memory
// snes_spc 0.9.0. http://www.slack.net/~ant/
#include <algorithm>
#include <cstring>
#include "SNES_SPC.h"
/* Copyright (C) 2004-2007 <NAME>. This module is free software; you
can redistribute it and/or modify it under the terms of the GNU Lesser
General Pub... |
#pragma GCC optimize(3)
#define NDEBUG
#include <cassert>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
#define BUFFERSIZE 65536
static size_t _pos = BUFFERSIZE;
static char _buf[BUFFERSIZE];
void _getc(char &c) {
if (_pos == BUFFERSIZE) {
... |
#include "visUtil.hpp"
#include <cstring>
// Initialise the serial from a std::string
input_ctype::input_ctype() {
chan_id = 0;
std::memset(correlator_input, 0, 32);
}
// Initialise the serial from a std::string
input_ctype::input_ctype(uint16_t id, std::string serial) {
chan_id = id;
std::memset(cor... |
template<SPLIT_POINTER_TEMPLATE_HEAD, typename IndexType>
void EllPageRank<SPLIT_POINTER_TEMPLATES, IndexType>::clearMtx()
{
if (matrixInitialized_) {
matIndices_.clear();
matEmptyColIndices_.clear();
deleteSplitPtr(matVals_);
matEmptyColNumber_ = 0;
}
matrixInitialized_ = ... |
/*
Reads in a specified .min file generated by NETGEN, interpreted as an LP. Feeds the problem to CPLEX and writes the results to three specified files: one for cost/time, one for parent flows, and one for child flows (for use in RR schemes). We expect exactly four arguments: the name of the .min file, the name of the ... |
////////////////////////////////////////////////////////////////////////////////
// devmm2name :: Device Major/Minor to string converter
// (C)2019 Dark Embedded Systems
// http://e.dark-x.net/
//
// You can choose one of following licenses:
// * Project Open License v1.0 or later
// * Dark Embedded Systems License v1.... |
#include "SRMclass.h"
#include "submodel.h"
#include "image.h"
#include <stdio.h>
#include <ctime>
#include <vector>
#include "exception.cpp"
#include "s.h"
#include "s1/s1.cpp"
#include "s2/s2.cpp"
#include "s3/s3.cpp"
#include "s3x3/s3x3.cpp"
#include "s5x5/s5x5.cpp"
#include <vector>
#include "config.c... |
/** This is free and unencumbered software released into the public domain.
The authors of ISIS do not claim copyright on the contents of this file.
For more details about the LICENSE terms and the AUTHORS, you will
find files of those names at the top level of this repository. **/
/* SPDX-License-Identifier: CC0-1.0... |
/* OpenSceneGraph example, osgtexture3D.
*
* 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, publ... |
#include <mpi.h>
#include <iostream>
#include <memory>
#include <math.h>
#include <cedar/types.h>
#include <cedar/3d/mpi/grid_func.h>
#include <cedar/3d/util/topo.h>
#include <cedar/3d/mpi/solver.h>
#include <cedar/3d/mpi/gallery.h>
#include <cedar/util/time_log.h>
using namespace cedar;
using namespace cedar::cdr3;... |
#include "Configuration.h"
#include "Log.h"
#include "OSCompatibilityLayer.h"
#include "ParserHelpers.h"
#include <fstream>
#include "CommonFunctions.h"
#include "CommonRegexes.h"
Configuration theConfiguration;
void Configuration::instantiate(std::istream& theStream, bool (*DoesFolderExist)(const std::string& path2)... |
/*
* Copyright (c) 2010 <NAME> <roland DOT philippsen AT gmx DOT net>
*
* BSD license:
* 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
* not... |
// Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX Developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#i... |
#include "codegenerator.h"
#include "node.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/raw_ostrea... |
/*
* poisson_generator_ps.cpp
*
* This file is part of NEST.
*
* Copyright (C) 2004 The NEST Initiative
*
* NEST 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 License, ... |
#include <iostream>
#include <fstream>
// For various tree and maps uses
#include <vector>
#include <map>
// Sockets
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
#include <arpa/inet.h>
// Benchmark
#include <sys/time.h>
#include <ctime>
// Some utilities functions
#include "... |
/* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... |
// Copyright 2021 <NAME>
#define _USE_MATH_DEFINES
#include "../../modules/task_3/feoktistov_a_optimization/ops_mpi.h"
#include <math.h>
#include <mpi.h>
#include <cfloat>
#include <iostream>
#include <set>
#include <string>
#include <vector>
struct interval {
double begin;
double end;
double value;
};
struct cus... |
#include <ros/ros.h>
#include <linux/input.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <fcntl.h>
#include <math.h>
#include "g29_force_feedback/ForceFeedback.h"
class G29ForceFeedback
{
private:
ros::Subscriber sub_target;
ros::Timer timer;
float m_pub_rate;
// variables from fouce feedbac... |
/*=================================================================
* tetgen.cpp - matlab interface to tetgen
*
* Inputs: vertices, [faces], [quality], [switches]
* Outputs: nodes, faces, elements
*
* Copyright 2013 <NAME> <<EMAIL>>
* $Revision: 0.0.0.1 $
*
*================================================... |
//
// Created by alejandro on 20/10/16.
//
#include "headers/Network.h"
#include <chrono>
using namespace chrono;
Network::Network() {
}
Network::Network(const char * serverIP,const int& serverPort) {
this->serverIP = serverIP;
this->serverPort = serverPort;
this->timer = Timer();
this->timer.addTi... |
#include "gm.h"
/* Convert one file format into another (with properties)
* ./gm_format_converter <in_schema.txt>
*
*/
void print_schema_file_format()
{
fprintf(stderr, "#Schema File Format:\n");
fprintf(stderr, "\t# begins line-comment\n");
fprintf(stderr, "\t# no distinguish between upper chara... |
/*
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2020 Gothel Software e.K.
* Copyright (c) 2020 ZAFENA AB
*
* 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
... |
#include "RoomManager.h"
void RoomManager::roomMenu() {
roomsObjVec.clear();
copyCSVtoRoomObjVec(roomsObjVec);
//Accept valid range and UI to display
int selection = ioManager.inputValidation(1, 6, UI::roomMenuDisplay);
//control the valid selection made
switch (selection) {
case 1: {
... |
/*
* Copyright (c) 2016, SRCH2
* 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 conditions ... |
////////////////////////////////////////////////////////////////////////////
// Name: PVMSearch.cpp
// Description: Implementation for class that performs a memory enhanced
// principle variation search
// Created: 07/28/2004 10:00:25 Eastern Daylight Time
// Last Updated: $Date: 2004/09/18 ... |
//--------------------------------------------------------------------------
// Name:
// PacPlaneDetElem
// Environment:
// Software developed for PACRAT / SuperB
// Copyright Information:
// Copyright (C) 2008 Lawrence Berkeley Laboratory
// Author List:
// <NAME> 23 APR 2008
//-------------------------------... |
/*!
*
* \class StEEmcHitMakerSimple_t
* \author <NAME> <<EMAIL>>
*
* See description in StEEmcHitMakerSimple.h
*
*/
/// Include StRoot headers
#include "StRoot/St_base/Stypes.h"
#include "StRoot/St_base/StMessMgr.h"
#include "StRoot/StEEmcPool/./EEmcTreeContainers/EEmcEnergy.h"
/// Include related classes
#incl... |
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
/* ######################################################################
Version Test - Simple program to run through a file and comare versions.
Each version is compared and the result is checked against an expected
result in the file. The f... |
#include <tf/tf.h>
#include <tf/transform_broadcaster.h>
#include "RoboSim.hpp"
typedef Eigen::Vector3d Point;
typedef visualization_msgs::Marker Bar;
const Eigen::Vector4d RED(1.0, 0, 0, 0.8);
const std::vector<LinkInfo> init_links = {
LinkInfo(0.5, 0, M_PI_2, 0.134140),
LinkInfo(0.1, 0.8, 0, 0.012189),
... |
// Application includes
#include "Genome.hh"
Genome Genome::genomes[NGS] = {Genome("NCBI36"),Genome("GRCh37")};
Genome::Genome(string name) : n_chr_(0)
{
string org_name = name;
for(int i = 0;i < name.length();i++) name[i] = tolower(name[i]);
if (name == "hg18" || name == "ncbi36") {
gname_ = "NCBI36"... |
//
// OCCAM
//
// Copyright (c) 2011-2020, SRI International
//
// 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, ... |
#include<AFQMC/Utilities/Utils.h>
#include <numeric>
#include<iostream>
namespace std{
void swap(std::tuple<int &, int &, qmcplusplus::RealType &> const& a, std::tuple<int &, int &, qmcplusplus::RealType &> const& b) {
using std::swap;
swap(std::get<0>(a), std::get<0>(b));
swap(std::get<1>(a), std::g... |
/*
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, modi... |
#include <iostream>
#include <chrono>
#include "Tokeniser.h"
#include "Parser.h"
#include "VarAnalysis.h"
#include "IOException.h"
#include "Test.h"
#include "PerlServer.h"
#include "SymbolLoader.h"
struct TimeInfo {
long long int tokenise;
long long int parse;
long long int analysis;
long long int tot... |
/* -*- Mode: C++; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* Copyright (C) Flamewing 2013-2016 <<EMAIL>>
* Very loosely based on code by the KENS Project Development Team
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Pu... |
// MaxwellNonCon2D_RHS.cpp
// function [rhsHx, rhsHy, rhsEz] = MaxwellRHS2D(Hx,Hy,Ez)
// 2007/08/04
//---------------------------------------------------------
#include "NDGLib_headers.h"
#include "MaxwellNonCon2D.h"
//---------------------------------------------------------
void MaxwellNonCon2D::RHS()
//-----------... |
#include "path_tracer.hpp"
#include <glm/glm.hpp>
#include <glm/gtx/component_wise.hpp>
#include <glm/gtx/norm.hpp>
using namespace std;
using namespace glm;
vec3 PathTracer::ShadePixel(const vec2 &pixel) const {
auto radiance = vec3(0.f);
for (int i = 0; i < num_pixel_sample_; ++i) {
const auto ray = camera... |
// Copyright 2018 <NAME>, <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 wri... |
#include "CameraStreamer.hpp"
CameraStreamer::CameraStreamer()
{
this->VideoOutput = RAW16;
this->SensorType = Boson_640;
}
CameraStreamer::CameraStreamer(vector<string> video_port)
{
// initilize parameters
this->VideoOutput = RAW16;
this->SensorType = Boson_640;
this->camera_ports = video_por... |
/***************************************************************************
qgsbench.cpp - Benchmark
-------------------
begin : 2011-11-15
copyright : (C) 2011 <NAME>
email : <EMAIL>
******************************... |
/*
COPYRIGHT
Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
States of America. All Rights Reserved.
This product is protected by copyright and distributed under the following
license restricting its use.
The Interface Definition Language Compiler Front End (CFE) is made
available for your ... |
#include <libxobotos.h>
#include <CanvasGlue.h>
#include "XobotWindow.h"
#include <SkGraphics.h>
#include <SkPaint.h>
#include <SkGpuDevice.h>
#include <GL/glx.h>
#include <GL/gl.h>
#include <GL/glu.h>
XobotWindow::XobotWindow(Window window, OnDrawFunc on_draw, bool init_gl) : SkWindow()
{
this->display = XOpenDispla... |
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include <algorithm>
#include "Noelle.hpp"
using namespace llvm::noelle ;
namespace {
struct CAT : public ModulePass {
static ch... |
#include <iostream>
#include <string>
using namespace std;
const int elementNumber = 3; // Number of minimun children of node
const int emptyKey = -313131;
class Node {
public:
int arrOfKeys[elementNumber - 1];
string arrOfData[elementNumber - 1];
public:
Node* childrenPointers[elementNumber]... |
//
// Created by shunji on 16/07/19.
//
#include <cstdlib>
#include <vector>
#include <cassert>
#include <limits>
#include <algorithm>
#include <sstream>
#include <fcntl.h>
#include <unistd.h>
#include <iostream>
#include "DPDB.h"
//conexpr int kPatternSize = 6; // number of pattern tiles
constexpr size_t kTableSize =... |
//------------------------------------------------------------------------------
// 03. IIR filtering
//
// In this example, we will use infinite impulse response (IIR) filters to
// detect dialed phone numbers encoded with dual-tone multi-frequency (DTMF)
// signaling. In DTMF signaling, a sum of two signals of predef... |
#include<bits/stdc++.h>
using namespace std;
const int N=510;
const int mod=1e9+7;
using ll = long long;
using ld = long double;
const ld eps=1e-9;
const ld PI=acos(-1.0);
ll n,k,a[N],dis[N][N];
vector <ll> g[N],cost[N];
bool ok[N][N];
void dfs(ll u,ll p,ll d,ll cur) {
dis[cur][u] = d;
ll len = g... |
//----------------------------------------------------------------------------//
// //
// PDFR LetterGrouper implementation file //
// ... |
/*
* Copyright (c) 2021, University of Washington
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this li... |
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <opencv2/core/ocl.hpp>
#include <random>
#include <chrono>
#include <cmath>
using std::cout;
using std::cin;
using std::endl;
using namespace std;
using namespace cv;
Mat idealFilter(Mat img, float r);
Mat butterworthFilter(Mat img, float r, int n);
Mat gauss... |
//
// Created by <NAME> on 9/21/2018.
//
#include "MagicSquares.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <sys/time.h>
#include <fstream>
using namespace std;
MagicSquares::MagicSquares() {
// TODO Auto-generated constructor stub
}
MagicSquares::~MagicSquares() ... |
// g++ -fPIC -shared -o Server_Lib.so server_noPvss.cpp -lgmp
#include <bits/stdc++.h>
#include "gmp.h"
using namespace std;
gmp_randstate_t rand_state;
int first400Prime[400];
struct KeyComponent
{
char *k;
int x;
};
struct KeyComponent_mpz
{
mpz_t k;
int x;
};
struct KeySharing
{
// string A... |
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Constants.h"
#include "llvm/ADT/APInt.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#ifndef NDEBUG
#include "llvm/IR/Verifier.h"
#endi... |
/*
This file contains 4 sorting procedures.
1. Insertion Sort
2. Merge Sort
3. Bubble Sort
4. Quick Sort
All are programed to sort in "Ascending order".
This code contains a lot of console prints to ensure user sophistication.
So the program run time may be slower than your expectations.
However, if you use the sort f... |
#define _USE_MATH_DEFINES
#include <Mesh.h>
#include <Vertex.h>
#include <vector>
#include <cmath>
#include <cassert>
Mesh* Mesh::CreateCube(const float p_Size)
{
Mesh* mesh = new Mesh;
float fPointPos = p_Size / 2.0f;
mesh->m_vertices.emplace_back(Vertex{ Vec3{ -fPointPos, fPointPos, -fPointPos } }); //0
mesh->... |
// Copyright © 1996-2018, Valve Corporation, All rights reserved.
#include "MultiplayerAdvancedDialog.h"
#include <ctime>
#include "FileSystem.h"
#include "PanelListPanel.h"
#include "tier0/include/vcrmode.h"
#include "tier1/keyvalues.h"
#include "vgui/IInput.h"
#include "vgui/ILocalize.h"
#include "vgui/ISurface.h"
... |
#include "dxfw.h"
using namespace std;
using namespace base;
static void _conv_A8R8G8B8_u(DWORD rgba,void *out) { *(DWORD*)out = rgba; }
static void _conv_R5G6B5_u(DWORD rgba,void *out) { *(word*)out = ((rgba>>8)&0xF800) | ((rgba>>5)&0x07E0) | ((rgba>>3)&0x001F); }
static void _conv_A1R5G5B5_u(DWOR... |
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* Copyright (c) 1999 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
... |
#include "FlashExporter.h"
#include "Converter.h"
#include "Files.h"
#include "Haxe.h"
#include "ImageTool.h"
#include "Options.h"
#include "StringHelper.h"
#include <sstream>
using namespace kmd;
using namespace hake;
using namespace kake;
namespace {
std::string adjustFilename(std::string filename) {
filename = ... |
#include <WinSock2.h>
#include "Utility.h"
#include "../LibCore/InfoRecorder.h"
using namespace cg;
using namespace cg::core;
CommandServer::CommandServer(): func_count_(0), size_limit_(Max_Buf_Size) {
infoRecorder->logTrace("[CommandServer]: constructor, size limit:%d\n", size_limit_);
//reserve 2 bytes for func_... |
#include "mbed.h"
#define MYDEBUG
#define COMPLETE 1
#define INCOMPLETE 0
#define END_OF_PACKET '\n'
#define SIZE_OF_SEND_PACKET 16
#define CHECK_CHUTTER_US 500000
#define ALERT_CYCLE_SEC 1
#define BUZZER_ON 1
#define BUZZER_OFF 0
#define SW_LED_ON 1
#define SW_LED_OFF 0
#define ALERT_START 1
#define ALERT_STOP ... |
#include "AdvancedNavigation.h"
#include "gl_core_4_4.h"
#include <GLFW\glfw3.h>
#include "Gizmos.h"
#include "Utility.h"
#include "tiny_obj_loader.h"
#include <iostream>
using glm::vec2;
using glm::vec3;
using glm::vec4;
using glm::mat4;
AdvancedNavigation::AdvancedNavigation()
{
}
AdvancedNavigation::~AdvancedNavig... |
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "/debug.h"
#else
#define db(...)
#endif
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define deb(x) cout<< #x << " " << x << "\n";
#define MAX 9223... |
/*
SMBRelay3 - IMAP REPLAY ATTACK MODULE
-------------------------------------
*/
#include "imaprelay.h"
#include "payload.h"
extern int verbose;
int HandleIncommingIMAPRequest(RELAY *relay, char *destinationhostname, int destinationport)
{
char buffer[4096];
char buf[4096];
char buf1[4096];
char buf2... |
/*************************************************************************
* Copyright (C) [2019-2021] by Cambricon, 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 Lice... |
/* MPU6050 Basic Example Code
by: <NAME>
date: May 1, 2014
license: Beerware - Use this code however you'd like. If you
find it useful you can buy me a beer some time.
Demonstrate MPU-6050 basic functionality including initialization, accelerometer trimming, sleep mode functionality as well as
parameteri... |
#include "c_calcul.h"
#include "c_build.h"
c_calcul::c_calcul() {
_build = nullptr;
_tc_resume = nullptr;
_mainMastery << "Maîtrise Élémentaire Feu" << "Maîtrise Mêlée" << "Maîtrise Monocible";
_healingElementMastery = "Maîtrise Élémentaire Eau";
}
int c_calcul::compute_reduction(const int resistances... |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: <NAME>, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -----------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.