text stringlengths 3.08k 12.5k |
|---|
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <stdexcept>
#include <omp.h>
#include "graph.h"
using namespace std;
/// Check if all components of v are true
bool all (const vector<bool>& v) {
int n = v.size();
for (int i = 0; i < n; i++) {
if ... |
/*
* enumeratecanonicalclonetrees.cpp
*
* Created on: 07-sep-2017
* Author: <NAME>
*/
#include "enumeratecanonicalclonetrees.h"
#include "rootedcladisticnoisysparseenumeration.h"
#include "spruce/rootedcladisticnoisyenumeration.h"
EnumerateCanonicalCloneTrees::EnumerateCanonicalCloneTrees(const FrequencyMa... |
/*The MIT License (MIT)
Copyright (c) 2016 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... |
#include "emp-tool/emp-tool.h"
#include "emp-tool/utils/mitccrh.h"
#include <iostream>
using namespace std;
using namespace emp;
void print_keys(AES_KEY key) {
cout << "round keys\n";
for(int i = 0; i < 11; i++) {
cout << key.rd_key[i]<<endl;
}
}
void aes_k2_h2_ori(block *H, block random, uint64_t idx) {
block ... |
#include "glimageloader.h"
// source : https://en.wikibooks.org/wiki/OpenGL_Programming/Intermediate/Textures
#include <png.h>
#include <stdio.h>
#define TEXTURE_LOAD_ERROR 0
using namespace std;
/** loadTexture
* loads a png file into an opengl texture object, using cstdio , libpng, and opengl.
*
* \param fi... |
/**
* @file
* @brief Implementation of the [Karatsuba algorithm for fast
* multiplication](https://en.wikipedia.org/wiki/Karatsuba_algorithm)
* @details
* Given two strings in binary notation we want to multiply them and return the
* value Simple approach is to multiply bits one by one which will give the time
*... |
/******************************************************************
Copyright (C) 2001 Microsoft Corporation. All rights reserved.
Author -- <NAME>(<EMAIL>)
TaskShutDown.CPP -- Shutdown and Restart of a system
Description:
Shuts down or restarts a system depending on the command line par... |
/*
** ClanLib SDK
** Copyright (c) 1997-2016 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for a... |
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#include "geometry.hpp"
qreal radToDeg(qreal v) { return v * (180.0 / M_PI); }
qreal degToRad(qreal deg) { return (qreal)(M_PI * (deg / 180.0)); }
void rectilinear2equirectangular(QPointF& uv, qreal sphereRadius) {
uv.ry() = qAtan2(uv.ry(),... |
#include <iostream> // std::cout
#include <fstream> // std::ifstream, std::ofstream
#include <filesystem> // std::filesystem
#include <string> // std::string
#include <tuple> // std::tuple
#include <chrono> ... |
/*
* Unpublished Copyright (c) 2009-2019 AutonomouStuff, LLC, All Rights Reserved.
*
* This file is part of the Kvaser ROS driver which is released under the MIT license.
* See file LICENSE included with this software or go to https://opensource.org/licenses/MIT for full license details.
*/
#include <thread>
#include ... |
// Filename: dcparse.cxx
// Created by: drose (05Oct00)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should ha... |
/*
*
* Copyright 2016 gRPC authors.
*
* 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 agree... |
/*
This sample illustrates how to save the acquired 3D data to a simple text file.
One single image is acquired. The 3D and intensity data are written to a text file.
The Point Cloud Library data format (.pcd) is used: http://pointclouds.org/documentation/tutorials/pcd_file_format.php.
You can view .pcd in the free ... |
#include "Renderer.h"
#include "Sort.h"
#include "Timer.h"
#include "Utils.h"
Renderer::Renderer(const char *title, const int width, const int height) : mWindowInformation({title, width, height}) {
}
Renderer::~Renderer() {
SDL_DestroyWindow(mWindow);
SDL_Quit();
TTF_Quit();
}
bool Renderer::Init() {
... |
// License: BSD 2 Clause
// Copyright (C) 2010, Google Inc. All rights reserved.
// Copyright (C) 2015+, The LabSound Authors. All rights reserved.
#include "LabSound/core/AudioParam.h"
#include "LabSound/core/AudioNode.h"
#include "LabSound/core/AudioNodeOutput.h"
#include "LabSound/extended/AudioContextLock.h"
#in... |
#include "pch.h"
#include "TKickout.h"
#include "control.h"
#include "loader.h"
#include "pb.h"
#include "TBall.h"
#include "TCircle.h"
#include "timer.h"
#include "TPinballTable.h"
#include "TTableLayer.h"
TKickout::TKickout(TPinballTable* table, int groupIndex, bool someFlag): TCollisionComponent(
table, groupInd... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be us... |
/*
calendar.cpp
Copyright (C) 2007 Acekard, www.acekard.com
Copyright (C) 2007-2009 somebody
Copyright (C) 2009 <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, eith... |
// Vaca - Visual Application Components Abstraction
// Copyright (c) 2005-2009 <NAME>
//
// This file is distributed under the terms of the MIT license,
// please read LICENSE.txt for more information.
#include <vaca/vaca.h>
#include <ctime>
#include "../resource.h"
using namespace vaca;
Message progress... |
//=============================================================================
//
// Adventure Game Studio (AGS)
//
// Copyright (C) 1999-2011 <NAME> and 2011-20xx others
// The full list of copyright holders can be found in the Copyright.txt
// file, which is part of this source code distribution.
//
// The AGS sourc... |
// rf95_mesh_client.cpp
// -*- mode: C++ -*-
// Example application showing how to create a simple addressed, routed reliable messaging client
// with the RHMesh class.
// It is designed to work with the other examples rf95_mesh_server*
// Hint: you can simulate other network topologies by setting the
// RH_TEST... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
// Copyright 2007-2008 the V8 project authors. 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 lis... |
#include "kinem/EDepSimHEPEVTKinematicsGenerator.hh"
#include "EDepSimException.hh"
#include <G4Event.hh>
#include <G4SystemOfUnits.hh>
#include <G4LorentzVector.hh>
#include <G4PrimaryVertex.hh>
#ifdef USE_G4HEPEvtInterface
#include <G4HEPEvtInterface.hh>
#endif
#include <memory>
EDepSim::HEPEVTKinematicsGenerato... |
//
// Created by <NAME> on 20/02/17.
//
#include "RaytracedObject.h"
#include <glm/gtc/matrix_access.hpp>
#include <iostream>
#include <algorithm>
RaytracedObject::RaytracedObject(glm::vec3 position, glm::fquat rotation) : Object(position, rotation) { this->position = position; this->rotation = rotation; }
std::pair... |
#include "font.hpp"
#include "roller.hpp"
#include "parse.hpp"
#include <algorithm>
#include <string>
#include <vector>
#include <stdexcept>
#include <stdlib.h>
#include <time.h>
void Roller::insert(char c){
if(c > 31 && c < 127){
auto pos = expr.begin();
std::advance(pos, curx - 2);
expr.... |
//!
//! build.cpp
//!
//! Created on: Aug 4, 2013
//! Author: Lazan
//!
#include "common/arguments.h"
#include "common/environment.h"
#include "common/file.h"
#include "common/uuid.h"
#include "common/error.h"
#include "common/string.h"
#include "common/process.h"
#include "common/exception.h"
#include "config/... |
#include "equation/equation.hpp"
#include "domain/structure/structure.hpp"
#include "domain/boundary/boundary_condition.hpp"
#include "domain/boundary/boundary_index.hpp"
#include <cmath>
using namespace carpio;
const St DIM = 2;
typedef StructureDomain_<DIM> Domain;
typedef typename Domain::spGrid spGrid;
typed... |
/* Copyright 2019-2020 <NAME>, <NAME>
*
* This file is part of WarpX.
*
* License: BSD-3-Clause-LBNL
*/
#include "NCIGodfreyFilter.H"
#include "Utils/NCIGodfreyTables.H"
#include <AMReX.H>
#include <AMReX_Algorithm.H>
#include <AMReX_BLassert.H>
#include <AMReX_Config.H>
#include <AMReX_Dim3.H>
#include <AMReX_G... |
/*
* Copyright 2019 Xilinx 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 or agreed to ... |
/*
* Copyright (c) 2020-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, p... |
#include<vector>
#include<nlohmann/json.hpp>
#include<fstream>
#include "ddcmath.h"
#include "fourier.h"
#include<iomanip>
#include<iostream>
#include<chrono>
#include<time.h>
char *pre_accel_dump_file;
using json = nlohmann::json;
int main(int argc, char **argv) {
char *inpname = argv[1];
char *outname = argv... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2012, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
/*******************************************************************\
Module: API to expression classes for Pointers
Author: <NAME>, <EMAIL>
\*******************************************************************/
#include "pointer_expr.h"
#include "arith_tools.h"
#include "byte_operators.h"
#include "c_types.h"
#inc... |
// -*- mode: c++; c-basic-offset: 2; -*-
/**
* @file pdot.cc
* @date May 13, 2021
* @brief Brief description here
*/
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <optional>
#include <span>
#... |
#include <iostream>
#include <cmath>
#include <string>
#include <fastjet/PseudoJet.hh>
#include <fastjet/ClusterSequence.hh>
using namespace fastjet;
using namespace std;
const int mxpart = 12;
const int maxd = 40;
extern "C" {
// integer nextnplot
// common/plotindex/nextnplot
extern struct {
int nextnplot;
} p... |
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright (C) 2020, Raspberry Pi (Trading) Ltd.
*
* options.cpp - common program options helpers
*/
#include "core/options.hpp"
bool Options::Parse(int argc, char *argv[])
{
using namespace boost::program_options;
using namespace libcamera;
variables_ma... |
#include <bits/stdc++.h>
namespace IO {
inline char read() {
static const int IN_LEN = 100000;
static char buf[IN_LEN], *s, *t;
s == t ? t = (s = buf) + fread(buf, 1, IN_LEN, stdin) : 0;
return s == t ? -1 : *s++;
}
template <typename T>
inline void read(T &x) {
static char c;
static bool ios... |
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This logoFile is part of the examples of the Qt Wayland module
**
** $QT_BEGIN_LICENSE:BSD$
** Commercial License Usage
** Licensees holding valid com... |
//
// AudioRingBufferTests.cpp
// tests/audio/src
//
// Created by <NAME> on 6/24/2014
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AudioRingBufferTests.h"
#incl... |
/*
* MIT License
*
* Copyright (c) 2021 CSCS, ETH Zurich
* 2021 University of Basel
*
* 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 with... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... |
/************************************************************************************//**
// Copyright (c) 2006-2015 Advanced Micro Devices, Inc. All rights reserved.
/// \author AMD Developer Tools Team
/// \file
****************************************************************************************/
// This is the i... |
/*
Copyright (c) 2015, <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 conditions and the following... |
/* Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
... |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2018, Lawrence Livermore National Security, LLC. Produced at the
// Lawrence Livermore National Laboratory in collaboration with University of
// Illinois Urbana-Champaign.
//
// Written by the LBANN Research Team (<NAME>... |
///////////////////////////////////////////////////////////////////////////////
// //
// polar v1.0 - August the 15th 2019 //
// //
... |
/*
* Copyright (C) 2018 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 <lily.hpp>
#include <lilyConstruct.hpp>
#include <lilyParse.hpp>
using namespace lily;
using namespace lilyConstruct;
void pr(const char* s, bool requireTotal=true) {
auto v= lilyParse(std::string(s), requireTotal);
std::cout << v->typeName() << ": ";
WRITELN(v);
}
void note(const char* s) {
std::cout <... |
#include <fstream>
#include "microcanonical_sampler/statistics_summary.h"
#include "smash/pow.h"
Statistics::Statistics() {
n_events_ = 0;
B_midy_.clear();
S_midy_.clear();
Q_midy_.clear();
E_midy_.clear();
}
void Statistics::add_event(const std::vector<MicrocanonicalSampler::SamplerParticleList>& particl... |
/****************************************/
// Standard C header files
/****************************************/
#include <sys/times.h>
#include <unistd.h>
#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include "myFIFOSampler.h"
#include "myFIFO-IOp.h"... |
/*
* Copyright (c) 2019 SK Telecom Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 - 2020, <NAME>, <NAME>, <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 wit... |
/**
* Starting file for Hw4.
* This file has the main routine.
*
* @author <NAME> (<EMAIL>)
* @version
* 03/11/2005 - Created
*/
#include "hwconstant.h"
#include "hwutil.h"
#include "basedump.h"
#include "secretdump.h"
#include "signdump.h"
#include "verifydump.h"
#include "desencdump.h"
#include "desdecdump... |
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <utility>
#include <functional>
#include <memory>
#include <algorithm>
#include <iostream>
#include <map>
#include <unordered_map>
#include <chrono>
#ifdef __APPLE__
#include "SDL.h"
#else
#include <SDL/SDL.h>
#endif
S... |
/*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part withou... |
#include <exception>
#include <iostream>
#include <memory>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include "lab_s02e09_MF.h"
void ex_1()
{
// 2,147,483,647
// 10,000,000,000
// 100,000,000
const int number_of_elements = 100000000;
for (int i = 0; i < number_of_elements; i++) ... |
#include <v8.h>
#include <node.h>
#if _USE_CUSTOM_BUFFER_POOL
#include <node_buffer.h>
#endif
#include <string.h>
#include <assert.h>
#include "reader.h"
using namespace hiredis;
static void *tryParentize(const redisReadTask *task, const Local<Value> &v) {
Reader *r = reinterpret_cast<Reader*>(task->privdata);
... |
#include "hosek_wilkie_sky_model.h"
#include <macros.h>
#include <logger.h>
#include <utility.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include "hosek_data_rgb.inl"
// -----------------------------------------------------------------------------------------------------------------------------------
double e... |
#include "ItemOnGrounds.h"
#include "ItemOnGround.h"
#include "VertexArrayObject.h"
#include "VertexBufferObject.h"
#include "Texture.h"
#include "Character.h"
#include "Inventory.h"
HRESULT ItemOnGrounds::Init()
{
allItemsImage = new GLImage();
allItemsImage->Init("Icons/AllItems", 8, 8, 0.25f, 0.25f);
... |
#include "wrapper.h"
using namespace std;
//const bool DEBUG = true;
const bool DEBUG = false;
//TODO: better exceptions
OneStepDisasm::OneStepDisasm(string filename, int mode, uint64_t startaddr, uint64_t v_addr)
: _filename(filename)
, _codefile(filename, ios::in|ios::binary|ios::ate) //opening the file in binary ... |
// Tripendulum model
// Author: <NAME> <<EMAIL>>
// Includes
#include <feed_gait/model/tilt_phase/tripendulum_model.h>
#include <cmath>
// Namespaces
using namespace tripendulum;
//
// TriPendModel class
//
// Set model parameters
void TriPendModel::setParam(double thb, double thm, double thf, double Cbsq, double C... |
#include "adjmatrix_map.h"
void CreateMGraph(MGraph &G){
int i,j,k,w;
printf("please input the vexnum and arcnum of this graph:\n");
scanf("%d%d",&G.vexnum,&G.arcnum);
printf("input the weight of very vertex:\n");
for (i = 0; i < G.vexnum; ++i) scanf("%d",&G.vexs[i+1]);
for (i = 0; i < G.vexnum; ++i) // init m... |
// ================================================================================
// Legal Notice: Copyright (C) 1991-2007 Altera Corporation
// Any megafunction design, and related net list (encrypted or decrypted),
// support information, device programming or simulation file, and any other
// associated documentat... |
/*************************************************************************/
/* */
/* Centre for Speech Technology Research */
/* University of Edinburgh, UK */
/* ... |
//
// Simu5G
//
// Authors: <NAME>, <NAME>, <NAME> (University of Pisa)
//
// This file is part of a software released under the license included in file
// "license.pdf". Please read LICENSE and README files before using it.
// The above files and the present reference are part of the software itself,... |
#include "enrico/comm_split.h"
#include "enrico/openmc_driver.h"
#include "enrico/surrogate_heat_driver.h"
#include <iomanip>
#include <mpi.h>
#include <unistd.h>
namespace enrico {
class TestDriver {
public:
TestDriver(MPI_Comm comm, pugi::xml_node node)
: comm_(comm)
{
auto neut_node = node.child("neut... |
/*
Copyright (c) 2021 <NAME> - <<EMAIL>>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publis... |
#include "googletest/googletest/include/gtest/gtest.h"
#include <boost/foreach.hpp>
#include "init.h"
#include "wallet.h"
#include "walletdb.h"
static void
GetResults(CWallet* wallet, CWalletDB& walletdb, std::map<int64_t, CAccountingEntry>& results)
{
std::list<CAccountingEntry> aes;
results.clear();
E... |
//********************************************************
// Syzygy is licensed under the BSD license v2
// see the file SZG_CREDITS for details
//********************************************************
#include "arPrecompiled.h"
#include "arGraphicsHeader.h"
#include "arGraphicsScreen.h"
#include "arHead.h"... |
#include "stdafx.h"
#include "HudSound.h"
float psHUDSoundVolume = 1.0f;
float psHUDStepSoundVolume = 1.0f;
void InitHudSoundSettings()
{
psHUDSoundVolume = pSettings->r_float("hud_sound", "hud_sound_vol_k");
psHUDStepSoundVolume = pSettings->r_float("hud_sound", "hud_step_sound_vol_k");
}
void HUD_SOUND_ITEM:... |
#include <iostream>
#include <ncurses.h>
#include <unistd.h>
#include <string>
#include <vector>
#include "../includes/UI.hpp"
using namespace std;
info Menu_log_in::run(info information)
{
int hauteur,largeur,len_str;
string quitter = "quitter";
initscr();
echo();
int taille_max_user_name=18;
char str[19... |
/*
* EndToEndAffine.cpp
*
* Created on: Oct 22, 2013
* Author: philipp_
*/
#include "EndToEndAffine.h"
int EndToEndAffine::BatchScore(int const mode, int const batchSize, char const * const * const refSeqList, char const * const * const qrySeqList, char const * const * const qalSeqList, float * const resul... |
/*
=============================================================================
Simulating the double pendulum using Runge–Kutta method(RK4)
=============================================================================
Updated on Mon Jul 20 2020
@author: <NAME>*/
#include <iostream>
#include <vec... |
#include "UIViewController.h"
void UIViewController::setup(DayDataModel *_nowDayDataRef)
{
nowDayDataRef = _nowDayDataRef;
displayDataController.setup(nowDayDataRef, &displayData);
M5.Lcd.fillScreen(BLACK);
M5.Lcd.fillRoundRect(5, 26, 310, 209, 5, WHITE);
uiHeader.setup(&displayData);
U... |
// <NAME> 2013.
//
// This is a test of ConstrainedFunction with a known optimum.
#include <functional>
#include <iostream>
#include <limits>
#include <random>
#include <cstddef>
#include <spii/auto_diff_term.h>
#include <spii/constrained_function.h>
#include <spii/solver.h>
using namespace spii;
struct LinearObjec... |
#include "stdafx.h"
#include "Debug.h"
#include "SDLLib.h"
void _SDLLib_Log(void* userdata, int category, SDL_LogPriority priority, const char* message) {
LOG("[SDLLib] Log: %s\n", message);
}
namespace Osaka{
namespace Engine{
SDLLib::SDLLib(Debug::Debug* debug){
this->debug = debug;
window... |
/*************** <auto-copyright.pl BEGIN do not edit this line> **************
*
* osgWorks is (C) Copyright 2009-2012 by <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software F... |
#include "programdata.h"
ProgramData::ProgramData()
{
}
void ProgramData::loadFile(const QString &fileName) {
/* Load the contents of the file */
QFile file(fileName);
if (file.open(QFile::ReadOnly)) {
load(file.readAll());
file.close();
}
}
void ProgramData::load(const QByteArray &d... |
// Copyright (c) 2017 <NAME>
// MIT License | https://opensource.org/licenses/MIT
// http://vittorioromeo.info | <EMAIL>
#pragma once
#include <cassert>
#include <exception>
#include <iostream>
#include <sstream>
#include <string>
#include <type_traits>
#ifndef FWD
#define FWD(...) ::std::forward<decltype(__VA_ARGS... |
// Copyright (c) 2010 The Chromium OS 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 "gobi-cromo-plugin/gobi_modem.h"
#include <memory>
#include <vector>
#include <base/logging.h>
#include <gmock/gmock.h>
#include <gtest/... |
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from ... |
#include "rip.h"
#include "router.h"
#include "router_hal.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern bool validateIPChecksum(uint8_t *packet, size_t len);
extern void update(bool insert, RoutingTableEntry entry);
extern bool query(uint32_t addr, uint32_t *nexthop, uint32_t... |
#include "Shader.h"
#include <stdio.h>
#include <fstream>
/*
constructors
*/
// default
Shader::Shader() {}
// initialize with paths to vertex and fragment shaders
Shader::Shader(bool includeDefaultHeader, const char* vertexShaderPath, const char* fragShaderPath, const char* geoShaderPath) {
generate(includ... |
#include <iostream>
#include <fstream>
#include <vector>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <chrono>
#include <memory>
#ifdef USE_CPU
#include "solver.h"
#elif defined USE_VIE
#include "vie.h"
#else
#include "solver_ocl.h"
#endif
void solve_surface(std::vector<st... |
#define PORT PORTD // Port
#include "Led_obj.h"
#define l_pinout 5
/*--------------------------------------------------*/
uint16_t t_f;
Led_obj::Led_obj(uint8_t pinout, uint16_t qleds){ // CONSTRUTOR
l_pin = pinout;
q_led = qleds;
int i;
for(i=0; i< 150; i++){//Setando todas a... |
/*
* File: Presenter.cpp
* Author: walther
*
* Created on September 27, 2012, 6:46 PM
*/
#include "Presenter.h"
#include <GL/glut.h>
#include <stdio.h>
#include <string.h>
#define SCREEN_WIDTH 500
#define SCREEN_HEIGHT 500
TSPColony Presenter::_colony;
bool Presenter::_paused = true;
bool Presenter::_showBes... |
//
// molar_mass_calculator.hpp
// MolarMassCalculator
//
// Created by <NAME> on 10/10/21.
// Copyright © 2021 <NAME>. All rights reserved.
//
// Modified from a js source from https://lenntech.com
//
#ifndef molar_mass_calculator_hpp
#define molar_mass_calculator_hpp
#include <stdio.h>
#endif /* molar_mass_cal... |
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... |
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstring>
#include <cctype>
#include <cmath>
#include "plane.h"
#include "citylist.h"
using namespace std;
//Reads a plane's info from the file
void Plane::readPlane(ifstream* planeFile, const int numPlanes) const
{
planeFile->read((char*)this, siz... |
#include "PclVisualization.h"
#include <pcl/surface/texture_mapping.h>
using namespace pcl;
void keyboardEventOccurred(const pcl::visualization::KeyboardEvent &event, void *viewer_void) {
boost::shared_ptr<visualization::PCLVisualizer> viewer = *static_cast<boost::shared_ptr<pcl::visualization::PCLVisualizer> *> ... |
#include <functional>
#include <vector>
using namespace std;
template<int L, int C>
class Matriz {
public:
vector<vector<double>> matrix;
Matriz() {
vector<vector<double>> m(L, vector<double>(C));
}
void insert(int i, int j, double v) {
matrix[i][j] = v;
... |
#define BUFFER_LENGTH 1024
#include "PetoiMPU6050DMP.h"
#include "I2Cdev.h"
#include "Wire.h"
#include "MPU6050_6Axis_MotionApps20.h"
/*
board Lolin Description
======= ========== ====================================================
INT GPIO26 Interrupt pin
SCL GPIO022 I2C c... |
#include <iostream>
#include <random>
#include <fstream>
#include "../external/essentials/include/essentials.hpp"
#include "../external/cmd_line_parser/include/parser.hpp"
#include "hft/fenwick.hpp"
static constexpr int runs = 100;
static constexpr uint32_t num_queries = 10000;
static constexpr unsigned value_seed = ... |
// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000-2002. All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement. The various license ag... |
#include "CliAlgo.h"
#include <string>
#include <chess/algo_factory.h>
namespace {
inline bool isPawnPromotion(const space::Move & move, const space::IBoard & board) {
using namespace space;
auto piece = board.getPiece({ move.sourceRank, move.sourceFile });
if (!piece || piece->pieceType != PieceType::Pawn)
... |
//*******************************************************************
// Copyright (C) 2000 ImageLinks Inc.
//
// License: See top level LICENSE.txt file.
//
// Author: <NAME>
//
//*******************************************************************
// $Id: tfw2ogeom.cpp 13025 2008-06-13 17:06:30Z sbortman $
#includ... |
/*
Copyright (c) 2015 - present 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 rights
to us... |
#include <vector>
#include <sstream>
#include <iostream>
#include <iterator>
#include <stdlib.h>
#include <string.h>
using namespace std;
struct node
{
int val;
unsigned char neighbors;
};
class nSolver
{
public:
nSolver()
{
dx[0] = -1; dy[0] = 0; dx[1] = 1; dy[1] = 0;
dx[2] = 0; dy[2] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.