text stringlengths 3.08k 12.5k |
|---|
//
// Code based on apps/interpoloate/interpolate.cpp
//
#include <iostream>
#include <limits>
#include "Halide.h"
#include "halide_benchmark.h"
using namespace Halide;
using namespace Halide::Tools;
using std::vector;
int run_test(bool auto_schedule, int argc, char **argv) {
int W = 1536;
int H = 2560;
... |
#include <string>
#include <algorithm>
#include <iterator>
#include <thread>
#include <vector>
#include <event-source-base.h>
#include "services.h"
#include "../wstring.h"
#include <Windows.h>
using namespace std;
using namespace Napi;
using namespace EventSourceBase;
struct Service_item {
Service_item(wstring&& n... |
//-------Source Code for Course Registration System-------//
/* Created by
<NAME>
*/
#include<iostream>
#include<cstdlib>
#include<fstream>
#include<cstring>
#include<conio.h>
#include<windows.h>
using namespace std;
//Function declarations
class CourseRegistration{
char name[50],fname[50],username[20],p... |
#include "rendercl.h"
#include "renderjob.h"
#include "renderjobqueue.h"
#include "shared/platform.h"
#include <cl/cl.h>
#include <iostream>
#include <string>
#if _DEBUG
#define CL_CHECK_ERROR(x) { assert(x == CL_SUCCESS); }
#else
#define CL_CHECK_ERROR(x) x
#endif
inline void build(cl_program program, cl_device_id... |
#include <iostream>
#include <Eigen/Dense>
#include "gaussQuad.hpp"
using namespace Eigen;
const double PI = 3.141592653589793;
// small helper function to evaluate f_alpha_(x)
double f(VectorXd alpha, double x) {
return std::exp(alpha(0) + alpha(1) * x + alpha(2) * x * x);
}
// rho(x) = (1, x, x^2)^T
VectorXd rh... |
#include <iostream>
#include <iomanip>
#include <libusb.h>
#define GIMIC_USBVID 0x16c0
#define GIMIC_USBPID 0x05e5
using namespace std;
void printdev(libusb_device *dev); //prototype of the function
int WriteBytes(libusb_device_handle *dev_handle, unsigned char *data, int *bytes)
{
int r = 0;
int inBytes = ... |
#include<bits/stdc++.h>
#define PIN "secret/0.in"
#define POUT "secret/0.bad"
#define TOUT "secret/0.bad"
#define SCORE "secret/0.scr"
FILE *spoj_p_in, *spoj_p_out, *spoj_t_out, *spoj_score;
void spoj_init(){
spoj_p_in=fopen(PIN, "r");
spoj_p_out=fopen(POUT, "r");
spoj_t_out=fopen(TOUT, "r");
spoj_score=fopen(... |
/*
*
* Copyright (C) 1997-2005, OFFIS
*
* This software and supporting documentation were developed by
*
* Kuratorium OFFIS e.V.
* Healthcare Information and Communication Systems
* Escherweg 2
* D-26121 Oldenburg, Germany
*
* THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRA... |
#include "mx28snapshot.hh"
#include <cstdio>
#include <cmath>
#include "../MX28/mx28.hh"
#include "../CM730/cm730.hh"
#include "../util/assert.hh"
using namespace bold;
// see http://support.robotis.com/en/product/dynamixel/rx_series/mx-28.htm
// TODO have constructors just store const byte[] and convert fields to... |
/*
*
* Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
* This library 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, or (at your opti... |
/**
* generates atom positions based on space group
* @author <NAME> <<EMAIL>>
* @date nov-2015
* @license GPLv2
*/
// gcc -o sggen sggen.cpp -std=c++11 -lstdc++ -lm -I../.. -I/usr/include/QtGui/ ../../libs/spacegroups/spacegroup_clp.cpp ../../libs/spacegroups/crystalsys.cpp -DNO_QT -lclipper-core ../../tlibs/fil... |
// Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
Copyright 1999, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
/* addon.cpp */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <Application.h>
#include <Entry.h>
#include <Path.h>
#include <List.h>
#include <... |
#include "nivision.h"
#include "Vision/MonoImage.h"
#include "Target.h"
#include <algorithm>
#include <math.h>
// These parameters set ellipse finding in the NI imaq (Image Aquisition) library.
// Refer to the CVI Function Reference PDF document installed with LabVIEW for
// additional information.
static EllipseDescr... |
#include "VertexFormat.h"
#include "System.h"
#include "Utility.h"
#include <lucid/core/FileReader.h>
#include <lucid/core/Reader.h>
#include <sstream>
#include <d3dcompiler.h>
///
///
///
namespace /* anonymous */
{
/// ENUM LOOKUP
std::string const vertexElementType[] =
{
"float",
"float2",
"float3",
"f... |
/**
* @copyright Copyright 2016 The J-PET Framework 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 find a copy of the License in the LICENCE file.
*
* Unless required by applicable la... |
#include <iostream>
#include <vector>
#include <bitset>
#include <random>
#include <Eigen/Dense>
#include "utils.h"
#include "SC.h"
//using Eigen::MatrixXd;
std::vector< std::vector<double> > SC_true_abs_err;
std::vector< std::vector<double> > SC_LFSR_abs_err;
std::vector< std::vector<double> > SC_LD_abs_err;
std::... |
#include "tcp_client.h"
#include "log_util.h"
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <thread>
#include <deleter.h>
#define BUFF_MAX 1024 * 48
#define BUFF_LENGTH 1024 * 16
TcpClient::TcpClient() {
sockfd_ = -1;
is_threadrun_=false;
}
TcpClient::~Tc... |
/** @file
* @brief Implementation of the detector model
* @copyright Copyright (c) 2017-2022 CERN and the Corryvreckan authors.
* This software is distributed under the terms of the MIT License, copied verbatim in the file "LICENSE.md".
* In applying this license, CERN does not waive the privileges and immunities... |
#include "leveleditor.h"
#include "config.h"
#include <json/json.h>
#include <json/writer.h>
#include <iostream>
#include <fstream>
#include <QPen>
#include <QGraphicsPixmapItem>
constexpr bool LOG_DEBUG = false;
static const float scale = 1.0f/64.0f;
LevelEditor::LevelEditor(std::string const& name, int width, i... |
/*
Solution 1:
The direct approach, compute the average of every possible combination, then return the start index
that has the lowest.
int solution(vector<int> &A) {
int index = 0;
int N = A.size();
vector<int> P = computePrefixSum(A);
double curMinAve = P[N] / N;
for (int i = 0; i < N-1; i++) {
for (int j ... |
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
#include <CGAL/parameterize.h>
#include <CGAL/Parameterization_mesh_patch_3.h>
#include <iostream>
#include <fstream>
// ---------------------------------... |
#include "spriteSheet.h"
spriteSheet::spriteSheet( const char* fName )
{
std::ifstream inFile( fName );
if( inFile ) init(inFile);
}
spriteSheet::spriteSheet( std::ifstream& inFile ) { init(inFile); }
void spriteSheet::init( std::ifstream& inFile )
{
getline( inFile, imgFname );
img.loadFromFile( im... |
// monteCarloEngine.c
// <NAME>
// May 10, 2012
// Function for running Monte Carlo on the GPU using OpenCL
#include <hip/hip_runtime.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include "monteCarloConstants.h"
#include "monteCarloStructs.h"
#include "monteCar... |
/** -*- C++ -*-
* mongo_temporary_server.cc
* Mich, 2014-12-15
* This file is part of MLDB. Copyright 2014 mldb.ai inc. All rights reserved.
**/
#include <sys/socket.h>
#include <netinet/in.h>
#include "mldb/base/exc_assert.h"
#include "mongo_tempora... |
// train.cpp
#include "train.h"
#include "main.h"
#define SPHERE_RADIUS 5.0
#define SPHERE_COLOUR 238.0/255.0, 106.0/255.0, 20.0/255.0
#define CUBE_RADIUS 1.0
#define CAR1_RADIUS 1.0
#define CAR2_RADIUS 1.0
#define CAR3_RADIUS 1.0
#define CAR4_RADIUS 1.0
#define CAR5_RADIUS 1.0
#define CUBE_COLOUR 19/255.0, 52/255.... |
/* Copyright(c) 2012 Optimal Bits Sweden AB. All rights reserved.
*
* 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,... |
//
// Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
//
// 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... |
/*
Masthead -
Submitted by - <NAME>
Enroll no. - 19114055
Batch - O-3
Code Editor - VSCode 2020
Terminal - WSL Ubuntu 2020
Shell - git bash
Contact -
Website - https://mayankmeena.netlify.app/
Email - <EMAIL>
Social -
GitHub - https://github.com/maayami
YouTube - https://www.youtube.com/channel/UCwcdyxP6uk5zso-L4lY... |
/****************************************************************************
** $Id$
**
** Copyright (C) 2001-2006 Trolltech AS. All rights reserved.
**
** This file is part of the Qt Script for Applications framework (QSA).
**
** This file may be distributed and/or modified under the terms of the
** GNU General Publ... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "RTCube.h"
#include "Engine.h"
// Sets default values
ARTCube::ARTCube()
{
ThisScene = CreateDefaultSubobject<USceneComponent>(TEXT("Root"));
RootComponent = ThisScene;
ThisMesh = CreateDefaultSubobject<URuntimeMeshComponent>(... |
#include "CodeGen.h"
#include "environment.h"
#define outputTabbed(code) (CodeGen::outputFile << "\t" << code << "\n")
#define outputUntabbed(code) (CodeGen::outputFile << code << "\n")
#define outputTabbedToBuffer(code) (CodeGen::bufferedOutput << "\t" << code << "\n")
#define outputUntabbedToBuffer(code) (CodeGen::b... |
//gyrating cat enthusiast
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <string>
#include <utility>
#include <cassert>
#include <algorithm>
#include <vector>
#include <random>
#include <chrono>
#include <queue>
#include <set>
#define ll long long
#define lb long double
#define pi... |
#include <random>
#include <cstring>
#include "gameinstance.h"
std::random_device rd;
std::mt19937 gen(rd());
unsigned next_game_id = 1000000;
GameInstance::GameInstance(unsigned board_width, unsigned board_length, unsigned num_players, unsigned num_food) :
board_width_(board_width), board_length_(board_length), n... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010, Image Engine Design 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:
//
// * Re... |
#include <iostream>
#include "finiteautomaton.h"
State FiniteAutomaton::addState() {
std::size_t index = m_stateArcs.size();
m_stateArcs.resize(index + 1);
return State(this, index);
}
void FiniteAutomaton::removeState(const State &state) {
m_stateArcs.erase(m_stateArcs.begin() + state.index());
// remove... |
/*
* Copyright (c) 2010 The Regents of The University of Michigan
* 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, ... |
/***************************************************************************************************************************************
©2020, <NAME>. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Sof... |
#pragma once
#include <type_traits>
#include <string_view>
#include <functional>
#include <memory>
#include <vector>
#include <cassert>
//编译期类型ID机制可参考 https://stackoverflow.com/a/56600402
//这里只是演示
using type_code = std::string_view;
template<typename T>
constexpr type_code type_code_of() noexcept {
#ifdef __clang__
... |
//misaka and rin will carry me to cm
#include <iostream>
#include <cstdio>
#include <cstring>
#include <utility>
#include <cassert>
#include <algorithm>
#include <vector>
#include <array>
#include <tuple>
#include <map>
#include <unordered_map>
#define ll long long
#define lb long double
#define sz(vec) ((int)(vec.... |
#include <iostream>
#include <string>
#include <fstream>
#include <cstring>
#include <vector>
#include <utility>
using namespace std;
string change(string input);
void init();
vector<pair<string,string>> map;
int main(int argc,char *argv[]){
cout.flush();
if(argc<2){
cout<<"에러: 파일명 또는 명령이 인식되지 않음"<<endl;
re... |
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <math.h>
#ifdef USE_IWMALLOC
#include "iwmalloc.h"
#endif
/*
Reads a file of tdt's and generates statistics on the fingerprints set.
*/
#include "iwstring_data_source.h"
#include "iwbits.h"
#include "iwminmax.h"
#include "iwstring.h"
char * prog... |
#include <domination.h>
//////////////////////////////////////////////////////////////////////////////
static QScriptValue ssCreate(QScriptContext * context,QScriptEngine * engine)
{
N::ScriptStrings * ss = new N::ScriptStrings(engine) ;
ss->setupTranslation() ;
return engine->newQ... |
/* Sirikata
* main.cpp
*
* Copyright (c) 2009, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* no... |
// Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
// All Rights reserved. See files LICENSE and NOTICE for details.
//
// This file is part of CEED, a collection of benchmarks, miniapps, software
// libraries and APIs for ... |
#include "FbxAnimation.h"
#include "FbxSceneContext.h"
//-------------------------------------------------------------------------
namespace KRG::RawAssets
{
class FbxRawAnimation : public RawAnimation
{
friend class FbxAnimationFileReader;
};
//-----------------------------------... |
/**
* @file optionspages.cpp
* @brief Edit Defaults Page.
* @author <NAME>
* @note Copyright (c) 2002-2010 <NAME> - http://untidy.net/
*
* Programmer's Notepad 2 : The license file (license.[txt|html]) describes
* the conditions under which this source may be modified / distributed.
*/
#include "stdafx.h"
#in... |
/* Cylindrically symmetric simulation of an einzel lens
*
* A 10 keV, 1 mA Ar-8+ beam propagates through a cylindrically
* symmetric, accelerating einzel lens with 5 kV voltage.
*
* This is the first example of the Jyvaskyla Summer School course
* Computational Ion Optics with IBSimu (PH1).
*/
#include <fstream... |
/*
* File: easyeye_compare_main.cc
* Author: mchaberski
*
* Created on July 15, 2013, 4:15 PM
*/
#include <easyeye/encode/easyeye_encode.h>
#include <easyeye/match/easyeye_match.h>
#include <easyeye/match/HDCalculator.h>
#include <easyeye/common/easyeye_utils.h>
#include <easyeye/common/easyeye_types.h>
#inclu... |
#include "BSplineCurve.h"
#include"Point.h"
#include<assert.h>
#include<algorithm>
using namespace std;
vector3D BSplineCurve::getFirstDerivative(double u)
{
return getDeriOfBSplineCurve(p,U,controlPts,u);
}
Point3D BSplineCurve::getPointAt(double u)
{
return curvePoint(n,p,U,controlPts,u);
}
BSplineCurve BSpli... |
#include <string>
#include <iostream>
#include <future> // std::packaged_task, std::future
#include <list>
#include <thread>
#include <assert.h>
using namespace std;
typedef unsigned long ulong;
class JoinThreads {
std::vector<std::thread>& m_threads;
public:
explicit JoinThreads(std::vector<std::thread>... |
/*---------------------------------------------------------------------------*\
Copyright (C) 2013-2015 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of Caelus.
Caelus is free software: you can redistribute it and/or modify it
... |
/*-----------------------------------------------------------------
Copyright (C) 2015
<NAME>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option... |
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any l... |
#include <iostream>
//#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <iterator>
#include <functional>
#include <sys/stat.h>
#include "moses/TypeDef.h"
#include "moses/ConfusionNet.h"
#include "moses/FactorCollection.h"
#include "moses/Phrase.h"
#include "moses/InputFileStream.h"
#inc... |
// 人生苦短,快用Python
// #define NDEBUG
#include <cassert>
#include <cstdio>
#include <vector>
#include <SDL2/SDL.h>
#include <GL/glew.h>
#define VECTOR_FLOAT long double
#include "Vector.hpp"
#define FAILURE_ARGUMENTS 1
#define FAILURE_FILEIO 2
#define FAILURE_FORMAT 3
#define FAILURE_SDL_INIT 4
#define FAILURE_SDL_WIN... |
// g++ -Wall -pedantic -std=c++14 -o sine-wave sine-wave.cpp `sdl2-config --cflags --libs`
#include <cstdio>
#include <cstdlib>
#include <cstdarg>
#include <ctime>
#include <cstdint>
#include <iostream>
#include <unistd.h>
#include <SDL.h>
using namespace std;
#define nelem(x) (sizeof(x) / sizeof(x[0]))... |
/** MIT License
*
* Copyright(c) 2017 DevDuino
*
* 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, pub... |
/**********
This library 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 3 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This librar... |
#include <glad/glad.h>
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <imgui.h>
#include <imgui_impl_glfw.h>
#include <imgui_impl_opengl3.h>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/euler_angles.hpp>
#include "Axes.hpp"
#include "Camera.hpp"
#include "Collision.hpp"
#includ... |
/**
* Serlio - Esri CityEngine Plugin for Autodesk Maya
*
* See https://github.com/esri/serlio for build and usage instructions.
*
* Copyright (c) 2012-2019 Esri R&D Center Zurich
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with th... |
/*******************************************************************
Copyright(c) 2016, <NAME>
All rights reserved.
Distributed under the BSD license.
(See accompanying file LICENSE.txt at
https://github.com/zhedahht/CodingInterviewChinese2/blob/master/LICENSE.txt)
*****************************************************... |
#include "i18n_private.h"
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <unordered_map>
#include <mutex>
#include <string>
#include <atomic>
#include <vector>
#include <stdexcept>
#include <jansson.h>
using std::mutex;
using std::lock_guard;
using std::unordered_map;
using std::string;
using std::wstring;
u... |
#include "text.hpp"
extern SDL_Window *myWindow;
glText::glText(std::string fontpath, int size)
{
this->fontpath = fontpath;
this->global_init(size);
this->load_text128();
this->load_shaders();
this->update();
glGenVertexArrays(1, &this->VAO);
glBindVertexArray(VAO);
glGenBuffers(1, &... |
#include "score_calcer.h"
#include "index_calcer.h"
#include <catboost/libs/model/split.h>
struct TBucketStats {
double SumWeightedDelta = 0;
double SumWeight = 0;
double SumDelta = 0;
double Count = 0;
void Add(const TBucketStats& other) {
SumWeightedDelta += other.SumWeightedDelta;
... |
/*
* 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.
*
* ... |
/****************************************************************************
* Copyright (c) 2019 by Focus Robotics. All rights reserved.
*
* 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 Softwa... |
// Copyright 2020 <NAME>
#include "../../../modules/task_3/makarychev_s_foxes_algorithm/foxes_algorithm.h"
#include <mpi.h>
#include <iostream>
#include <random>
#include <algorithm>
#include <vector>
#include <limits>
#include <ctime>
#include <cmath>
MPI_Comm GridComm;
MPI_Comm ColComm;
MPI_Comm RowComm;
std::vecto... |
/*
* pgp-info.c
* Provide info about PGP data.
*
* Copyright (c) 2005 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above... |
#include <math.h>
#include "picosystem.hpp"
using namespace picosystem;
voice_t piano = voice(20, 200, 50, 50);
struct note_t {
uint32_t f, d;
};
std::array<note_t, 25> notes = {{
{ _, 4},
{C4, 2}, { _, 1}, {G3, 1},
{C4, 2}, { _, 1}, {G3, 1},
{C4, 1}, {G3, 1}, {C4, 1}, {E4, 1},
{G4, 4}... |
/*-------------------------------------------------------------------------------------*/
/* NOMAD - Nonlinear Optimization by Mesh Adaptive Direct search - version 3.7.1 */
/* */
/* Copyright (C) 2001-2015 <NAME> - the... |
/*
* LSensor.cpp
*
* Created on: 25 Mar 2018
* Author: <NAME> 15823926
* Author: <NAME> 15836791
*/
#include "../config/robot_config.h"
#include "LSensor.h"
//buffer of bytes that takes in a packet of four reads from the LiDAR sensor
byte * buffer;
unsigned int distances[360];
Waypoint wp[360];
LSen... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "vr_defs.h"
#include "pkt/proto_handler.h"
#include "pkt/pkt_init.h"
#include "pkt/packet_buffer.h"
///////////////////////////////////////////////////////////////////////////////
ProtoHandler::ProtoHandler(Agent *agent, boost::shared_... |
/* Read this comment first: https://gist.github.com/tonious/1377667#gistcomment-2277101
* 2017-12-05
*
* -- T.
*/
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string... |
//===- llvm/unittest/DebugInfo/PDB/HashTableTest.cpp ----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
this file is part of rcssserver3D
Fri May 9 2003
Copyright (C) 2003 Koblenz University
$Id$
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 ... |
#include "PgfPlotsAxis.hpp"
PgfPlotsAxis::PgfPlotsAxis(const std::string &options)
: legend_(nullptr)
{
options_.Add(options);
}
void PgfPlotsAxis::SetLegend(PgfPlotsLegend *legend) {
legend_ = legend;
}
/** Add a plot to this axis.
*
* \param[in] plot The plot to be added.
*/
void PgfPlotsAxis::AddPlot(PgfPlo... |
/*
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2020, <NAME> (SavaLione)
* 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 th... |
//
// Created by <NAME> on 2016/08/19.
// Worker thread to perform HTTP requests
//
#include "Worker.h"
//Worker::Worker(Stats *stats, Options *options) : stats_(stats), options_(options) {}
Worker::Worker(Stats *stats_, Options *options_, mutex *mtx_for_cout_) : stats_(stats_), options_(options_),
... |
#include <iostream>
#include <utility>
#include <algorithm>
#include "magic_square.h"
#include "main.h"
Magic_Square::Magic_Square(const int size) : order(size), board(order, slice_t(order)) {
if (order % 2 == 0) {
throw std::logic_error("Order cannot be even.");
}
if (order > 15) {
throw ... |
#include "db.hpp"
using namespace std;
#include <iostream>
#include <fstream>
#include <sqlite3.h>
#include <ctime>
static string DB_BOOTSTRAP = R"sql(
CREATE TABLE packages (
id INTEGER PRIMARY KEY NOT NULL,
name TEXT NOT NULL,
version TEXT NOT NULL,
install INTEGER NOT NULL,
change I... |
#include "stdafx.h"
#include "dab_header.h"
void notifyNewFunc(qString name, qneu_Function * f, qValue * tree )
{
qFuncall * fcall = dynamic_cast<qFuncall*>(tree);
if (fcall)
{
if (fcall->name == f->name)
{
qString mymangle = "";
for (int i =0;i<tree->L()->size();i++)
{
mymangle+=tree->L()->childr... |
#include <opengv/optimization_tools/objective_function_tools/GlobalPnPFunctionInfo.hpp>
#include <Eigen/Dense>
#include <opengv/Indices.hpp>
#include <iostream>
GlobalPnPFunctionInfo::GlobalPnPFunctionInfo(const opengv::absolute_pose::AbsoluteAdapterBase & adapter){
opengv::Indices indices(adapter.getNumberCorrespo... |
// <NAME>
// CS 1wait0
// Module-wait: Open Ended Project
#include "Family.h"
#include "Lobster.h"
#include <iostream>
#include <string>
#include <unistd.h>
#include <vector>
using namespace std;
bool isInVector(vector<string> &vec, string item);
bool removeFromVector(vector<string> &vec, string item);
int main() {
... |
//===-- asan_poisoning.cc ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <ros/console.h>
#include <string>
#include <sstream>
#include <map>
#include <crane_x7_control/control_setting.h>
CONTROL_SETTING::CONTROL_SETTING( ros::NodeHandle handle )
: node_handle(handle)
{
joint_num = 0;
port_name = "";
joint_list.clear(... |
/***************************************************************************************
Autodesk(R) Open Reality(R) Samples
(C) 2009 Autodesk, Inc. and/or its licensors
All rights reserved.
AUTODESK SOFTWARE LICENSE AGREEMENT
Autodesk, Inc. licenses this Software to you only upon the condition that
... |
/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*
* 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... |
#ifdef HAVE_CONFIG_H
#include <../../config.h>
#endif
/*
* Copyright (c) 1990, 1991 Stanford University
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and ... |
#include <Arduino.h>
#include <Dhcp.h>
#include <Dns.h>
#include <EthernetServer.h>
#include <util.h>
#include <EthernetUdp.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <SPI.h>
#include <stdlib.h>
#include <stdio.h>
#include "Nimbits.h"
#define BUFFER_SIZE 1024
#define PORT 80
#define CATEGORY 2
#defin... |
#include "renderarea.h"
#include <QPainter>
#include <QMouseEvent>
#include <qdebug.h>
const int IdRole = Qt::UserRole;
const int xCount = 64;
const int yCount = 32;
const int cellWidth = 12;
const int cellHeight = 12;
RenderArea::RenderArea(QWidget *parent)
: QWidget(parent)
, m_allowDrawing( ... |
//////////////////////////////////////////////////////////////////////
//
// This is a udp_server node to get the information from other nodes.
// It also publish the received information to local ros master with topic
// (/cross_info).
// author: JieTang data: 29/08/2018
//
//////////////////... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#pragma warning (disable:4996)
using namespace std;
vector<int>total, request, available, release, waitIndex;
vector<vector<int>>MAX, ALLOCATION, NEED;
int n, m; //n=프로세스의 갯수, m=자원의 갯수
struct Wait {
int wait_processNum... |
/// FicTrac http://rjdmoore.net/fictrac/
/// \file Localiser.cpp
/// \brief Localises current sphere ROI within surface map.
/// \author <NAME>
/// \copyright CC BY-NC-SA 3.0
#include "Localiser.h"
#include "Logger.h"
using cv::Mat;
using namespace std;
///
///
///
Localiser::Localiser(nlopt_algorit... |
#include "Sort.h"
#include "Utilities.h"
#include <list>
#include <cmath>
#include <iostream>
using namespace std;
void sortAnalyze(int a[], unsigned int size)
{
if (!size)
return;
int min = a[0], max = a[0];
for (unsigned int i = 1; i < size; ++i)
{
if (max < a[i])
max =... |
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "peridot/bin/ledger/tests/benchmark/launch_benchmark.h"
#include <iostream>
#include "lib/fsl/tasks/message_loop.h"
#include "lib/fxl/command_li... |
#include "Battle.h"
#include <stdio.h>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include "Warrior.h"
#include <windows.h>
using namespace std;
extern Warrior* userwarriors;
void Battle::chooseWarriors() {
Warrior* warrior1 = nullptr;
Warrior* warrior2 = nullptr;
if (nWarriors =... |
#include <org/mlflow/tracking/MlflowClient.h>
#include <chrono>
#include <awslib/AwsFileHandler.h>
#include <iostream>
#include <stdexcept>
#include <stdio.h>
#include <string>
#include <ctime>
using namespace std::chrono;
using namespace mlflow;
// Returns a default client based on the MLFLOW_TRACKING_URI environmen... |
#include "instance.h"
int DynamicGraph::createNode(bool terminal) {
Node node;
node.id = next_node_id++;
node.terminal = terminal;
nodes[node.id] = node;
return node.id;
}
int DynamicGraph::createEdge(int a, int b, int w) {
Edge edge;
edge.id = next_edge_id++;
edge.endpoints[0] = a;
edge.e... |
#pragma once
#include <ostream>
#include <toolboxcpp/util/FuncRef.hpp>
#include <toolboxcpp/util/SourceLocation.hpp>
/*
Logging macros - use these to write messages to log
*/
// Hard, unrecoverable error
#define $log_error(...) $log_error_at($LogCurrentChannel, $LogCurrentLocation, ## __VA_ARGS__)
// An error wh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.