text stringlengths 3.08k 22k |
|---|
/*************************************************************************/
/* export.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
// -*- C++ -*-
//
// Package: RecoEgamma/PhotonIdentification
// Class: PhotonMVANtuplizer
//
/**\class PhotonMVANtuplizer PhotonMVANtuplizer.cc RecoEgamma/PhotonIdentification/plugins/PhotonMVANtuplizer.cc
Description: Ntuplizer to use for testing photon MVA IDs.
Implementation:
[Notes on implementati... |
/*
* Copyright 2017-2020 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related... |
// See the file "COPYING" in the main distribution directory for copyright.
#include "zeek/NetVar.h"
#include "zeek/zeek-config.h"
#include "zeek/EventHandler.h"
#include "zeek/ID.h"
#include "zeek/Val.h"
#include "zeek/Var.h"
zeek::RecordType* conn_id;
zeek::RecordType* endpoint;
zeek::RecordType* endpoint_stats;
... |
//
// This source file is a part of borsch.3d
//
// Copyright (C) borsch.3d team 2017-2018
//
// 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 limitat... |
#include <cstring>
#include "CertHelper.h"
#include "../ChainParams.h"
#include "../Tools/Log.h"
uint8_t CertHelper::getCurrencyIdForCert(X509* x509) {
char* iso2code = (char*)malloc(3);
X509_NAME *subject = X509_get_subject_name(x509);
X509_NAME_get_text_by_NID(subject, NID_countryName, iso2code, 3);
... |
/*
* Copyright (c) 2020, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "Game.h"
#include <AK/Array.h>
#include <AK/NumericLimits.h>
#include <AK/String.h>
#include <stdlib.h>
Game::Game(size_t grid_size, size_t target_tile, bool evil_ai)
: m_grid_size(grid_size)
, m_evil... |
#include "muscle.h"
#include "tree.h"
#include <stdio.h>
#define TRACE 0
void ClusterByHeight(const Tree &tree, double dMaxHeight, unsigned Subtrees[],
unsigned *ptruSubtreeCount)
{
if (!tree.IsRooted())
Quit("ClusterByHeight: requires rooted tree");
#if TRACE
Log("ClusterByHeight, max height=%g\... |
/**
* @file
* @author <NAME>
* @date 27.09.2011 18:59:03 MSD
*/
#include <stdio.h>
#include <math.h> // cos, sin
#include "WMG.h"
#include "footstep.h"
WMG::WMG (
const unsigned int N_,
const unsigned int T_,
const double step_height_,
const double bezier_weight_1_,
co... |
#include "qasm3_handler.hpp"
#include <iostream>
#include <regex>
#include <sstream>
#include "openqasmv3_mlir_generator.hpp"
#include "qasm3_handler_utils.hpp"
#include "quantum_to_llvm.hpp"
#include "pass_manager.hpp"
using namespace clang;
namespace qcor {
void Qasm3SyntaxHandler::GetReplacement(Preprocessor &P... |
/******************************************************************************
*
* Project: GDAL
* Purpose: Fuzzer
* Author: <NAME>, even.rouault at spatialys.com
*
******************************************************************************
* Copyright (c) 2017, <NAME> <even.rouault at spatialys.com>
*
... |
/**
* \file QryBrlyCon1NRelay.cpp
* job handler for job QryBrlyCon1NRelay (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author <NAME> (auto-generation)
* \date created: 11 Jan 2021
*/
// IP header --- ABOVE
#ifdef BRLYCMBD
#include <Brlycmbd.h>
#else
#include <Brlyd.h>
#endif
#include ... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This tool is used to benchmark the render model used by the compositor
// Most of this file is derived from the source of the tile_render_bench to... |
#include "global.h"
#include "RageSurface_Load_JPEG.h"
#include "RageUtil.h"
#include "RageLog.h"
#include "RageFile.h"
#include "RageSurface.h"
#include <setjmp.h>
#if defined(WIN32) && !defined(__MINGW32__)
// work around namespace bugs in win32/libjpeg:
#define XMD_H
#undef FAR
#include "jpeglib.h"
#include "jerro... |
//=============================================================================
//
// 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
// ... |
// Copyright (c) 2016 <NAME>. See License.txt regarding use.
#include <oBase/unit_test.h>
#include <oMath/cube_topology.h>
#include <oMath/hlslx.h>
#include <oMath/matrix.h>
#include <oMath/projection.h>
#include <oMath/equal.h>
#include <array>
using namespace ouro;
oTEST(oMath_frustum)
{
static const frustum_t E... |
/**
* @file PlotRNGDistributions.cpp
*/
/********************************************************************************
*
* This file is part of the Geneva library collection. The following license
* applies to this file:
*
* ------------------------------------------------------------------------------
* Li... |
/*
* Copyright (C) 2005 - 2012 MaNGOS <http://www.getmangos.com/>
*
* Copyright (C) 2008 - 2012 Trinity <http://www.trinitycore.org/>
*
* Copyright (C) 2010 - 2012 ProjectSkyfire <http://www.projectskyfire.org/>
*
* Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/>
*
*
* This program is free softwar... |
/*
Copyright 2013 <NAME> and <NAME>
This file is part of CampersCoreBurner.
CampersCoreBurner is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later... |
/** @file
* Testcase for shared folder case conversion code.
*/
/*
* Copyright (C) 2006-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of ... |
/** \file CSCSegment.cc
*
* \author <NAME>
*/
#include <DataFormats/CSCRecHit/interface/CSCSegment.h>
#include <iostream>
namespace {
// Get CSCDetId from one of the rechits, but then remove the layer part so it's a _chamber_ id
inline DetId buildDetId(CSCDetId id) { return CSCDetId(id.endcap(), id.station(),... |
/// \file globalTecSim.cc
/// \author <NAME> (<EMAIL>)
/// \brief implement the interface defined in global tec simulator
/// \version 0.1
/// \date 2019-10-09
///
/// \copyright Copyright (c) 2019
///
#include "../../include/globalTecSim.h"
long inline calDiff(struct timeval ×tart, struct timeval &timeend) {
... |
#include "PlayMode.hpp"
#include "LitColorTextureProgram.hpp"
#include "DrawLines.hpp"
#include "Mesh.hpp"
#include "Load.hpp"
#include "gl_errors.hpp"
#include "data_path.hpp"
#include "View.hpp"
#include <glm/gtc/type_ptr.hpp>
#include <random>
GLuint hexapod_meshes_for_lit_color_texture_program = 0;
Load< MeshB... |
/* ============================== Throttle ================================
* This file defines the throttle class
*/
#include "Throttle.h"
extern bool recu;
extern bool direc;
/* ============================== Throttle Constructor ====================
* Instantiates the throttle object
* @param canManager: Ca... |
/*
* Copyright 2017-present <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... |
/**
* TODO: add a cli to stop the server
*/
#include <filesystem>
#include <mutex>
#include <sys/stat.h>
#include <thread>
#include "HTTP_message.hpp"
#include "TCP_conn.hpp"
#include "json.hpp"
#include "utils.hpp"
#undef break
using json = nlohmann::json;
const char *server_init_file = "server_... |
#include "MainGraphicExtendModel.hpp"
#include <Engine/MainGraphic.hpp>
#include <Engine/Time.hpp>
#include <Engine/Display/DisplayWindow.hpp>
#include <Gui/WidgetRender.hpp>
#include <Engine/Camera.hpp>
#include <PathManager.hpp>
#include <Engine/ModelEngine/ModelManager.hpp>
MainGraphicExtendModel::MainGraphicExtend... |
#include <array2_utils.h>
#include <marching_triangles.h>
void MarchingTriangles::
contour_grid(void)
{
edge.resize(0);
x.resize(0);
edge_cross.clear();
for(int j=0; j+1<(int)phi.nj; ++j) for(int i=0; i+1<(int)phi.ni; ++i)
contour_square(i,j);
//improve_mesh();
}
void MarchingTriangles::
... |
//#define ENABLE_LOG_PRINTF
#include <string.h>
#include <d3dx9.h>
#include "evas_direct3d_object_image.h"
#include "evas_direct3d_image_cache.h"
#include "evas_direct3d_device.h"
#include "evas_direct3d_shader_pack.h"
#include "evas_direct3d_vertex_buffer_cache.h"
TArray<D3DObjectImage *> D3DObjectImage::_cache;
b... |
// Copyright (c) 2019-2020, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
/... |
#include <iostream>
#include <fstream>
#include <string>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <malloc.h>
#include <string.h>
using namespace std ;
#include "postes.h"
// But : Création d'un groupe de postes à partir d'un flux donné
groupePostes* g_openPostesCSV(FILE*... |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2019 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
/*
* Copyright 2017 MapD Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
/**
*
* \author <NAME> (UCSD)
*
* $Id:
*/
#include <iostream>
#include <vector>
#include <memory>
#include "RecoEgamma/EgammaHLTProducers/interface/EgammaHLTPFPhotonIsolationProducer.h"
// Framework
#include "FWCore/Framework/interface/EventSetup.h"
#include "DataFormats/Common/interface/Handle.... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include <unistd.h>
#include <fstream>
#include <sstream>
#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>
using namespace boost::assign;
#include <pugixml/pugixml.hpp>
#include "base/util.h"
#include "base/test/task_te... |
/****************************************************************************/
/// @file MEVehicle.cpp
/// @author <NAME>
/// @date Tue, May 2005
/// @version $Id$
///
// A vehicle from the mesoscopic point of view
/****************************************************************************/
// SUMO, Simulation... |
//===- llvm-prof.cpp - Read in and process llvmprof.out data files --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------... |
#include "Terrain.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <iostream>
#include <FreeImage.h>
#include "GameScreen.h"
ShaderProgram Terrain::terrain;
Shader Terrain::terrainShaders[NUMTERRAINSHADERS];
Terrain::~Terrain()
{
destroy();
}
void Terrain::init()
{
this->translateVector ... |
#include <iostream>
#include <fstream>
struct MkCompare
{
std::ostream &out;
typedef enum { GENERIC=0, CONST_CHAR_PTR, CHAR_PTR, FLASH_CHAR_PTR, SIZED_ARRAY, GENERIC_ARRAY, STRING } TYPES;
static const TYPES SPECIAL[];
const char* typeName(TYPES T) {
switch(T) {
case GENERIC: return "GENERIC";
c... |
/*
* Copyright (C) 2016 The CyanogenMod Project
* Copyright (C) 2008 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/lic... |
/*
* ofxBox2dPolygon.cpp
* ofxBox2d
*
* Created by <NAME> on 1/14/11.
* Copyright 2011 Interactive Design. All rights reserved.
*
*/
#include "ofxBox2dPolygon.h"
#include "ofxBox2dPolygonUtils.h"
//----------------------------------------
ofxBox2dPolygon::ofxBox2dPolygon() {
bIsTriangulated = false;
bIs... |
#include "dfmessagereader.h"
DfMessageReader::DfMessageReader()
{
}
bool DfMessageReader::sameAsLastMessage()
{
if (creatureList == lastCreatureList){
// check if selection changed. If so, redraw
for (int i = 0; i < creatureList.size(); ++i){
if (creatureList[i].isSe... |
#include <memory>
#include <regex>
#include <string>
#include <sstream>
#include "common.hpp"
#include "io/bulkio.hpp"
#include "printer/cexpr_emit.hpp"
#include "printer/cprinter.hpp"
#include "printer/gpuprinter.hpp"
#include "expression.hpp"
#include "symdiff.hpp"
struct testcase {
const char* source;
con... |
#include <bits/stdc++.h>
#include <omp.h>
#include "encrypt.h"
using namespace std;
static inline int log2int(int x) {
return 31 - __builtin_clz(x);
}
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x)... |
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. 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. Redistri... |
////////////////////////////////////////////////////////////////////////////////
// gameWinGL.cpp
#include <stdio.h>
#include <stdlib.h>
#include "game.h"
#include "ApConfig.h"
#include "BtTime.h"
#include "ShTouch.h"
#include "RsPlatform.h"
#include "glfw.h"
#include "ErrorLog.h"
#include "RsUtil.h"
#include "RsImpl.... |
// RUN: %check_clang_tidy %s bugprone-posix-return %t
#define NULL nullptr
#define ZERO 0
#define NEGATIVE_ONE -1
typedef int pid_t;
typedef long off_t;
typedef decltype(sizeof(int)) size_t;
typedef struct __posix_spawn_file_actions* posix_spawn_file_actions_t;
typedef struct __posix_spawnattr* posix_spawnattr_t;
ex... |
/** \file convert_imageset_siamese_data.cpp
* \brief small executable to convert a set of image pairs (files) into a caffe supported format.
*
* Converts a set of image pairs (2 filenames on a line in a text file) and the label (last
* value in the line) into a two channel datum with label provided. This output for... |
// Copyright 2020 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 ... |
/* Inspired from https://github.com/SylvainDeker/Shader-Graph/blob/master/source/preview/Shader.cpp */
#include "shader.h"
#include <fstream> // Reading a file with the C API instead of the C++ API is more efficient
#include <sstream>
#include <iostream>
#include <regex>
#include <glad/glad.h>
Shader::Shader(const s... |
//
// Package: RecoTracker/SingleTrackPattern
// Class: CosmicTrajectoryBuilder
// Original Author: <NAME>-IN<NAME>
#include <vector>
#include <iostream>
#include <cmath>
#include "RecoTracker/SingleTrackPattern/interface/CosmicTrajectoryBuilder.h"
#include "DataFormats/Common/interface/OwnVector.h"... |
#include "../utils/utils.h"
#include "hpack.h"
#include "tables.h"
#include "huffman.h"
#include "../utils/result.h"
#include "../utils/net.h"
// adapted from https://cs.opensource.google/go/x/net/+/c6fcb2db:http2/hpack/hpack.go
enum IndexType {
True,
False,
Never
};
Result<HeaderField> getIndexedField(uint64_t i... |
#include <AutoPID.h>
#include <ESPUI.h>
#include "main.hpp"
#include "steering.hpp"
#include "udpHandler.hpp"
#include "ioAccess.hpp"
#include "webUi.hpp"
SteeringCurrentSettings steeringSettings;
void steeringInit() {
// Webinterface
steeringSettings.isActivePort = preferences.getUChar("steeringPortEn", 255);
... |
#include "common/socket.hpp"
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <plog/Log.h>
#include <stdio.h>
#include <string.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
int init_netlink_socket(struct sockaddr_nl *src_addr, st... |
#include "shell.h"
#include <Lemon/Core/CFGParser.h>
#include <Lemon/Core/IconManager.h>
#include <Lemon/Core/Keyboard.h>
#include <Lemon/Graphics/Graphics.h>
#include <Lemon/GUI/Model.h>
#include <Lemon/GUI/Window.h>
#include <Lemon/System/Spawn.h>
#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>
#include ... |
/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibTest/TestCase.h>
#include <AK/Array.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef long double longdouble;
typedef long long longlong;
typedef unsigned long long unsignedlonglong;
... |
/*
* NoiseBound.cpp
*
*/
#include <FHE/NoiseBounds.h>
#include "FHEOffline/Proof.h"
#include "Protocols/CowGearOptions.h"
#include <math.h>
SemiHomomorphicNoiseBounds::SemiHomomorphicNoiseBounds(const bigint& p,
int phi_m, int n, int sec, int slack_param, bool extra_h,
const FHE_Params& params) :
... |
// Copyright (c) 2020 <NAME>.
// https://github.com/Nandite/Pcl-Optics
// Distributed under the MIT Software License (X11 license).
//
// SPDX-License-Identifier: MIT
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"... |
// functions for microtyper 2.0
// genotyping with better efficiency and ability to scale to large loci with many SNPs
#include <string>
#include <vector>
#include <unordered_map>
#include <math.h>
#include "api/BamReader.h"
#include "typedefs.h"
#include "utils.h"
// counts reads of alleles present in an individual
... |
#include "StdAfx.h"
#include <math.h>
#include ".\mp3decoder.h"
CMP3Decoder::CMP3Decoder(IAudioSourceHelper * pHelper) :
m_hFile(NULL),
m_pDecoder(NULL),
m_SampleBuffer(NULL)
{
m_pHelper = pHelper;
}
CMP3Decoder::~CMP3Decoder(void)
{
}
unsigned long CMP3Decoder::GetID3HeaderLength(unsigned char *... |
/*
* Copyright information and license terms for this software can be
* found in the file LICENSE that is included with the distribution
*/
#include <epicsUnitTest.h>
#include <testMain.h>
#include <pv/nt.h>
using namespace epics::nt;
using namespace epics::pvData;
using std::tr1::dynamic_pointer_cast;
static Fi... |
/*This file is part of the FEBio Studio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio-Studio.txt for details.
Copyright (c) 2020 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any per... |
#include "cnn/nodes.h"
#include "cnn/cnn.h"
#include "cnn/training.h"
#include "cnn/timing.h"
#include "cnn/rnn.h"
#include "cnn/lstm.h"
#include "cnn/dict.h"
#include "cnn/expr.h"
#include "cnn/rnnem.h"
#include <iostream>
#include <fstream>
#include <sstream>
#ifdef WIN32
#include <process.h>
#endif
#include <boost... |
/**
BSD 3-Clause License
Copyright (c) 2018, <NAME> and <NAME>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of c... |
#include "Globals.h"
#include "Application.h"
#include "ModulePlayer.h"
#include "Primitive.h"
#include "PhysVehicle3D.h"
#include "PhysBody3D.h"
ModulePlayer::ModulePlayer(Application* app, bool start_enabled) : Module(app, start_enabled), vehicle(NULL)
{
turn = acceleration = brake = 0.0f;
}
ModulePlayer::~ModuleP... |
/* Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved */
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include "ImageNNAvg.h"
#include "Vecs.h"
ImageNNAvg::ImageNNAvg(int n_rows, int n_cols, int n_frames) {
m_gain_min_mult = 1;
InitializeClean();
Alloc(n_rows, n_cols, n_frames);
}
... |
// Copyright © 2017-2020 Trust Wallet.
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
#include "Extrinsic.h"
#include <TrustWalletCore/TWSS58Addr... |
#include "FastCGI.h"
#include <iostream>
#include "modelHead.h"
static const int PARAMS_BUFF_LEN = 2048; //环境参数buffer的大小
static const int CONTENT_BUFF_LEN = 2048; //内容buffer的大小
void FastCGI::FastCgi_init() {
c->sockfd_ = 0; //与php-fpm 建立的 sockfd
c->flag_ = 0; // record 里的请求ID
c->requestId_ = 0; ... |
#include "ZSTDComp.h"
#include <fstream>
#include <numeric>
#include <type_traits>
#include "dictBuilder/zdict.h"
#include "zstd.h"
// Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95833
// Also defined in AssetMapCLI.cpp
#ifdef __GLIBCXX__
# define stdReduce std::accumulate
#else
# define stdReduce st... |
#include "../param/shader.hpp"
#include <GLFW/glfw3.h>
int min(int x, int y) { return y < x ? y : x; }
int divup(int x, int y) { return (x + y - 1) / y; }
static char const* julia_vert = R"~(
#version 430 core
layout (location = 0) in vec2 pos;
out vec2 coord;
void main()
{
gl_Position = vec4(pos.x, pos.y, 0.0,... |
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmake.h"
#include "cmAlgorithms.h"
#include "cmDocumentationEntry.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStat... |
#include <iostream>
#include "headers.h"
#include "M.h"
#include "nodeInformation.h"
#include "functions.h"
#include "helperClass.h"
using namespace std;
NodeInformation::NodeInformation(){
fingerTable = vector< pair< pair<string,int> , lli > >(M+1);
successorList = vector< pair< pair<string,int> , lli > >(R+1);
... |
#include "demoloop.h"
#include "helpers.h"
#include "graphics/shader.h"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/rotate_vector.hpp>
using namespace std;
using namespace demoloop;
const uint32_t CYCLE_LENGTH = 10;
const uint32_t arms = 7;
const uint32_t trisPerArm = 50;
const uint32_t numTris = arms * ... |
#include "common.h"
float distance2DPolar(int e1, int z1, int e2, int z2) {
return sqrt(pow((e1 - e2), 2) + pow((z1 - z2), 2));
}
float computeL2Dist(geometry_msgs::Point position,
pcl::PointCloud<pcl::PointXYZ>::iterator pcl_it) {
return sqrt(pow(position.x - pcl_it->x, 2) + pow(position.y - ... |
#include <algorithm>
#include <iostream>
#include <cmath>
#include <map>
#include <string>
#include <iterator>
#include <cfloat>
#include "bp.hpp"
#include "spline.hpp"
#include "helper.hpp"
#include "json.hpp"
using namespace std;
using json = nlohmann::json;
Behavior_Planner::Behavior_Planner(){}
... |
//#include "rosic_Open303.h"
//using namespace rosic;
//-------------------------------------------------------------------------------------------------
// construction/destruction:
Open303::Open303()
{
ampScaler = 1.0;
oscFreq = 440.0;
sampleRate = 44100.0;
level = -... |
/*
* main.cpp
*
* Created on: Jan 21, 2016
* Author: scsmdk
*/
#include <iostream>
#include <iterator>
#include <fstream>
#include <sstream>
#include <limits>
#include <algorithm>
#include <iomanip>
#include "TwoDLib.hpp"
#if defined(_OPENMP)
#include <omp.h>
#endif
const int N_POINTS = 10;
namespace TwoDL... |
//
// Cube.cpp
// QubGL
//
// Copyright © 2020 Team FESTIVAL. All rights reserved.
//
#define _USE_MATH_DEFINES
#include "Cube.hpp"
#include "GLFW/glfw3.h"
#include <cmath>
#include <iostream>
#include "../Rendering/Color.hpp"
#include "../Rendering/Mesh.hpp"
#include "../Rendering/ShaderProgram.hpp"
#include ... |
/*
* Copyright 2001 <NAME>. All rights reserved.
*
*/
/*
* i18napi.cc - API support for charset conversion identifiers
*
*/
// this NEED_GETPID triggers loading windows.h
#define NEED_GETPID
#include <stdhdrs.h>
#include <strbuf.h>
#include "i18napi.h"
#include "enviro.h"
static const cha... |
/*
* Refs:
* https://eigen.tuxfamily.org/dox/index.html
* https://dritchie.github.io/csci2240/assignments/eigen_tutorial.pdf
* */
#include <iostream>
#include <Eigen/Dense>
#define PRINT(x) std::cout << #x << ": " << std::endl << (x) << std::endl << std::endl
#define PRINT_SIZE(x) std::cout << #x << " is of size ... |
#include <cstdio>
#include <cstdlib>
#include <iostream>
#define TINY_DNG_WRITER_IMPLEMENTATION
#include "../dngwriter/tiny_dng_writer.h"
#define TINY_DNG_LOADER_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#include "tiny_dng_loader.h"
#define MY_TAG (21264)
static char get_colorname(int c) {
switch (c) {
... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008-2012, Image Engine Design Inc. All rights reserved.
//
// Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
// its affiliates and/or its licensors.
//
// Redistribution and use in source and ... |
#include "retracer.h"
#include "apitracecall.h"
#include "thumbnail.h"
#include "image.hpp"
#include "trace_profiler.hpp"
#include <QDebug>
#include <QVariant>
#include <QList>
#include <QImage>
#include "qubjson.h"
/**
* Wrapper around a QProcess which enforces IO to block .
*
* Several QIODevice users (nota... |
// ------------------------------------------------------------------------ //
// Copyright 2021 SPTK Working Group //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... |
/*** Copyright (c) 2010 Data Intensive Cyberinfrastructure Foundation. All rights reserved. ***
*** For full copyright notice please refer to files in the COPYRIGHT directory ***/
/* Written by <NAME> of CCIN2P3 and copyright assigned to Data Intensive Cyberinfrastructure Foundation */
#include "rod... |
/*
Copyright 2011 Aevum Software aevum @ aevumlab.com
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... |
//
// UVAutoRatio Maya Plugin Source Code
// Copyright (C) 2007-2014 RenderHeads Ltd.
//
// This source is available for distribution and/or modification
// only under the terms of the MIT license. All rights reserved.
//
// The source is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRA... |
#include "Assignment2.h"
#include <iostream>
static void printMat(const Eigen::Matrix4d& mat)
{
std::cout<<" matrix:"<<std::endl;
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
std::cout<< mat(j,i)<<" ";
std::cout<<std::endl;
}
}
Assignment2::Assignment2()
{
SceneParser("data/scenes/scene3.txt... |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* A simple ... |
//
// json_printer_asset_test.cpp
// agent_test
//
// Created by <NAME> on 3/28/19.
//
#include <cstdio>
//
// Copyright Copyright 2009-2021, AMT – The Association For Manufacturing Technology (“AMT”)
// All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not... |
///////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2019 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without ... |
/*
* Copyright (C) 2008 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... |
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <unordered_set>
using namespace std;
class Board {
public:
int square[9][9] = {{0}};
bool possible[9][9][10] = {{{true}}};
int blank_count = 81;
void place(int x, int y, int val) {
this->square[x][y] = va... |
/**********
Copyright (c) 2019, Xilinx, 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:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the follo... |
double INF = (1.0/0.0);
double EPS = 0.0000001;
struct Vector {
double x, y;
inline Vector operator-(const Vector &v) const {
return Vector(x-v.x, y-v.y);
}
inline Vector operator+(const Vector &v) const {
return Vector(x+v.x, y+v.y);
}
inline bool operator==(const Vector &v) const {
return fab... |
/*
* libjingle
* Copyright 2004--2005, Google Inc.
*
* 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 a... |
#include "../lbs_linear_boltzmann_solver.h"
#include "ChiTimer/chi_timer.h"
#include <chi_mpi.h>
#include <chi_log.h>
extern ChiMPI& chi_mpi;
extern ChiLog& chi_log;
//###################################################################
/**Sets the source moments for the groups in the current group set.
*
* \param... |
//HEADER_GOES_HERE
#include "../types.h"
int help_select_line; // weak
int dword_634494; // weak
int helpflag;
int displayinghelp[22]; /* check, does nothing? */
int HelpTop; // weak
const char gszHelpText[] = {
"$Keyboard Shortcuts:|"
"F1: Open Help Screen|"
"Esc: Display Main Me... |
// **********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.... |
#include "plot.h"
#include <assert.h>
int window1;
Points inpoints;
Points intersectionPoints;
//window configurations and registering callbacks
void graphicsInit (int argc, char **argv, int wsize, int linewidth,
float pointsize)
{
glutInit(&argc, argv);
glutInitWindowSize(wsize, wsize);
glutInitDisplayMo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.