text stringlengths 3.08k 12.5k |
|---|
// Copyright (c) 2021 <NAME>
//
// Copyright <NAME> 2001-2004.
// Copyright (c) <NAME> 2001-2003.
// Copyright (c) <NAME> 2002.
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_... |
/* -----------------------------------------------------------------------------
Copyright (c) 2006 <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 wit... |
/* Copyright (c) 2015, <NAME> <<EMAIL>>
* Licensed under the MIT license. See the license file LICENSE.
*/
#pragma once
#include <Eigen/Dense>
#include <Eigen/Cholesky>
#include <algorithm>
#include <iostream>
#include <boost/random/normal_distribution.hpp>
#include <boost/math/special_functions/bessel.hpp>
#incl... |
#define IMGUI_DEFINE_MATH_OPERATORS
#include <utility>
#include "ProjectWindow.h"
#include "Application.h"
#include <IconsFontAwesome4.h>
#include <fstream>
using namespace sm;
using namespace sm::editor;
using namespace ImGui;
ProjectWindow::ProjectWindow() : timelineEditor() {}
void ProjectWindow::showFrame() {
... |
#include <iostream>
#include <systemc>
#include <tlm.h>
#include "tlms/tlm_adapters/tlm2wishbone.hpp"
#include "tlms/commons/initiator.h"
#include "models/wishbone/wbram.hpp"
#include "commons/assertions.hpp"
using namespace std;
// To hide some complexity;
void test_standard_writes_reads(Initiator& init) {
uint... |
#include "hidb-5/report.hh"
// ----------------------------------------------------------------------
void hidb::report_antigens(const hidb::HiDb& hidb, const AntigenIndexList& aIndexes, enum report_tables aReportTables, std::string_view aPrefix)
{
for (auto index: aIndexes)
report_antigen(hidb, index, aR... |
#include "BlurPostEffect.h"
#include <iostream>
BlurPostEffect::BlurPostEffect() :
enabled_(true)
{
// Convolution filter with the following kernel:
// | 1/81 1/81 1/81 1/81 1/81 1/81 1/81 |
// | 1/81 1/81 1/81 1/81 1/81 1/81 1/81 |
// | 1/81 1/81 1/81 1/81 1/81 1/81 1/81 |
// | 1/81 1/81 ... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <unordered_map>
#include <utility>
#include <vector>
#include "DataStructures/DataBox/DataBox.hpp"
#include "DataStructures/Variables.hpp"
#include "ParallelAlgorithms/Interpolation/InterpolationTargetDetail.hpp"
#include "Pa... |
/**
* \file dnn/src/cuda/topk/opr_impl.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS... |
//
// Copyright (c) 2016 - 2017 Mesh Consultants Inc.
// 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, mod... |
/*
// Copyright (c) 2018 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
/***************************************************
* Problem Name : 1214 - Large Division.cpp
* Problem Link : http://lightoj.com/volume_showproblem.php?problem=1214
* OJ : LOJ
* Verdict : AC
* Date : 2018-10-03
* Problem Type : Big Integer
* Author Name : <NAME>
* University : CSE, ... |
/*
Copyright 2012 <NAME> <<EMAIL>>
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... |
/*
cppcryptfs : user-mode cryptographic virtual overlay filesystem.
Copyright (C) 2016-2022 <NAME> (github.com/bailey27/cppcryptfs)
cppcryptfs is based on the design of gocryptfs (github.com/rfjakob/gocryptfs)
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a cop... |
/*******************************************************************************
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
******************************************************************************/
#include "blob_to_meta_converter.h"
#include "converters/to_roi/ssd.h"
#include "... |
/*
Filename: TicTac (Chap 7 Program 10)
Author: <NAME>
Description: This is a program to allow two users to play tic tac toe.
Date Last Modified: 2/26/16
Algorithm: Introduce program
Set up gameboard (create multideminsion array)*
Output gameboard*
get spot player one would like... |
#include <unordered_map>
#include <list>
#include <iostream>
#include <advent.hpp>
#include <string_utils.hpp>
constexpr size_t n_turns = 40;
struct pair_hash
{
template <class T1, class T2>
std::size_t operator() (const std::pair<T1, T2> &pair) const {
return std::hash<T1>()(pair.first) ^ std::hash<T... |
#include <ros/ros.h>
#include <geometry_msgs/PoseStamped.h>
#include "/home/ubuntu/catkin_ws/src/A_simple_subpuber/include/A_simple_subpuber/mavlink/v1.0/autoquad/mavlink.h"
#include "A_simple_subpuber/Mavlink.h"
#include "SerialRDM.h"
#define RADIUS_EARTH_METER (6378.137*1000.0)
int j=0;
SerialRDM serial;
void Radia... |
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
/*======
This file is part of PerconaFT.
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
PerconaFT is free software: you can redistribute it and/or modif... |
#include <stdio.h>
#include "est/sparse.hpp"
#include <f2c.h>
extern "C" {
int pcgs_(doublereal *, doublereal *, integer *,
integer *, integer *, integer *, doublereal *, doublereal *,
integer *, doublereal *, doublereal *, doublereal *,
doublereal *, doublereal *, doublereal *, doublereal *,
do... |
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cstring>
#include "TZX.h"
using namespace TZX_Class;
using namespace Utility;
// ============================================================================================
// Constructors / Destructor
TZX::TZX()
{
blocks = new vector<Block*>()... |
// Copyright (c) 2017-2018 LG Electronics, 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... |
/* ************************************************************************
* Copyright 2016-2020 Advanced Micro Devices, Inc.
*
* ************************************************************************ */
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include "testing_common.hpp"
using namespace std;... |
/*
* Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... |
/*
A Bipartite Graph is a graph whose vertices can be divided into two independent sets, U and V such that every edge (u, v)
either connects a vertex from U to V or a vertex from V to U. In other words, for every edge (u, v), either u belongs to U and v to V,
or u belongs to V and v to U. We can also say that t... |
#include "personnummer.hpp"
#include <cmath>
#include <ctime>
#include <iomanip>
#include <regex>
#include <sstream>
#include <string>
/*
* Convert a string to integer and if the conversion fails, return the fallback
* integer instead.
* */
int stoi_or_fallback(const std::string &maybe_digit, int fallback) {
try ... |
//
// grpctcp.cpp
//
// TCP-based implementation of remote procedure calls. Runs on top of
// the tcpdatagram service.
//
/*
Original code: Copyright (c) 2014 Microsoft Corporation
Modified code: Copyright (c) 2015-2016 VMware, Inc
All rights reserved.
Written by <NAME>
MIT License
Permission is hereby... |
// Aleth: Ethereum C++ client, tools and libraries.
// Copyright 2014-2019 Aleth Authors.
// Licensed under the GNU General Public License, Version 3.
#include <sys/types.h>
#ifndef _WIN32
#include <ifaddrs.h>
#endif
#include <libdevcore/Assertions.h>
#include <libdevcore/Common.h>
#include <libdevcore/CommonIO.h>
#i... |
#include <glad/glad.h>
#include "RenderEngine.h"
#include "Log.h"
#include <array>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/string_cast.hpp>
#include <iostream>
#include <stb_image.h>
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include <imgui.h>
RenderEngine::RenderEngine(uint32_t _width, ui... |
/**
* Copyright (c) 2011, 2012
* <NAME> <<EMAIL>>
* and the IceCube Collaboration <http://www.icecube.wisc.edu>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appea... |
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <folly/Format.h>
#include "source/util/Camera.h"
#inclu... |
/*
* Copyright (c) 9.11.2016 com2m GmbH.
* All rights reserved.
*/
// Tragediy from: https://github.com/tpreclik/drive-sdk/tree/tragediy
// and: https://github.com/NoveroResearch/tragediy
#include "headers/tragediyimplementation.h"
#include <QDebug>
#include <stdio.h>
#include <locale.h>
#include "head... |
#pragma once
#include "DeviceEvent.hpp"
// I implemented PicoQuant event types to verify that the framework can handle
// a good range of raw event stream formats. But it has not been excercised.
#error "This code is untested; use only after testing"
// PicoQuant raw photon event ("TTTR") formats are documented in t... |
/**
* @file compressionTest.cc
* @author
* @brief tset the compression
* @version 0.1
* @date 2021-07-14
*
* @copyright Copyright (c) 2021
*
*/
#include <lz4.h>
#include <algorithm>
#include <functional>
#include <random>
#include <climits>
#include "../../include/define.h"
#include "../../include/chunkS... |
//
// Created by ljn on 20-4-12.
//
#include <gflags/gflags.h>
#include <cmath>
#include "path_optimizer/config/planning_flags.hpp"
void updateConfig() {
FLAGS_circle_radius = sqrt(pow(FLAGS_car_length / 8, 2) + pow(FLAGS_car_width / 2, 2)) + FLAGS_safety_margin;
FLAGS_d1 = -3.0 / 8.0 * FLAGS_car_length + FLAG... |
#include "graph.h"
#include "drawwidget.h"
void drawWidget::setSpeed(int v)
{
// qDebug() << v;
speed = (100 - v) * 10;
}
QListWidgetItem* setItem(QString str)
{
QListWidgetItem *item = new QListWidgetItem();
item->setText(str);
item->setFont(getFont());
item->setFlags(Qt::ItemIsEnabled);
r... |
/*
Copyright (c) 2015 Perutka, Ondrej
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... |
//*******************************************************************
//
// Program: Homework 6, Extract Emails.
//
// Author: <NAME>
// Email: <EMAIL>
//
//
// Description: The program proompts the user to enter the names of the input and output files, reads in data from a file and extracts the emai... |
#include <cstdlib>
#include <complex>
#include <iostream>
#include <tuple>
#include <array>
#include <utility>
#include <mpl/mpl.hpp>
// print elements of a pair
template<typename ch, typename tr, typename T1, typename T2>
std::basic_ostream<ch, tr> &operator<<(std::basic_ostream<ch, tr> &out,
... |
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
#define TNZU_DEFINE_INTERFACE
#include <toonz_utility.hpp>
#include <opencv2/imgproc/imgproc.hpp>
class MyFx : public tnzu::Fx {
public:
//
// PORT
//
enum {
PORT_INPUT,
PORT_COUNT,
};
int port_count() const override { return PORT_COUNT; }
char const* port_name(int i) const override {
stat... |
#include "gqf.h"
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h>
#include<iostream>
#include <fstream>
#include "hashutil.h"
#include "kmer.h"
#include <vector>
#include <chrono>
#include<cmath>
#include <random>
#include <algorithm>
using namespace std;
#define BufferSize 1000000
/** Zipf... |
//
// Created by <NAME> on 02/01/2020.
// Copyright (c) 2020 <NAME>. All rights reserved.
//
#include "Trainer.h"
// This function spiders the top level directory and obtains a list of all the
// image files.
vector<vector<string>> NanoID::Trainer::LoadObjectsList(const string &dir) {
vector<vector<string>> objec... |
#include <iostream>
#include "board.h"
#include "card.h"
#include <vector>
#include "action.h"
#include <time.h>
#include <string>
#include <stdlib.h>
#include "piece.h"
#include <sstream>
using namespace std;
//Returns true if and only if the vector contains the element requested
bool vectorContains(vector<int>& myv... |
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <stdio.h>
#include <pthread.h> // compile with -pthread
#include <pty.h> // link with -lutil
#include <fcntl.h>
// BUILD ME:
// g++ -pthread -o .run/terminal t... |
#include "window.h"
#include "panel.h"
#include "bar.h"
#include "text.h"
#include "events.h"
#define WIDTH 1024
#define HEIGHT 768
constexpr uint32_t nBarHeight = 20;
constexpr uint32_t nButtonWidth = 20;
constexpr uint32_t nButtonHeight = 16;
constexpr uint32_t nPadding = 5;
Graphics::Window::Window(const unsigned... |
#include <iostream>
#include <compiler/ir/graph/graph.hpp>
#include <compiler/ir/graph/driver.hpp>
#include <compiler/ir/graph/visitor.hpp>
#include <compiler/ir/graph/pass/pass.hpp>
#include <compiler/ir/builder.hpp>
#include <compiler/ir/graph/fusible_op.hpp>
using namespace sc;
sc_graph_t make_graph(sc_op_ptr &in,... |
/*
Pipe.cpp
Written by <NAME>
A pipe is a connection between two programs, possibly on different computers.
*/
#include <aclapi.h>
Pipe::Pipe()
{
_Handle = NULL;
}
Pipe::~Pipe()
{
ClosePipe();
}
void Pipe::ClosePipe()
{
if(_Handle != NULL)
{
FlushFileBuffers(_Handle);
DisconnectName... |
/*
* main.cpp
* Author: <NAME>
* Created: 13/04-2018 15:00
* Modified: 23/05-2018 15:00
* Version: 1.7
*
* Description:
* main file for the EcoDome prototype code.
*
* NOTE:
*
*/
// Standard Libraries
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <vector>
#include <string>... |
// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2015 Oslo and Akershus University College of Applied Sciences
// and <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 ... |
#include <GL/glew.h>
#include <GL/gl.h>
#include <SDL2/SDL.h>
#include "gk/gk++.hpp"
#include <rpav/log.hpp>
#include "example.hpp"
static const char *shader_geom_quad =
"#version 330 core\n"
"layout(lines_adjacency) in;"
"layout(triangle_strip, max_vertices = 4) out;"
"in vec2 vert_uv[];"
"out vec2 uv;"
"voi... |
#include "stdafx.h"
#pragma hdrstop
#include "zipop.h"
#include "enter.h"
#include "dz_errs.h"
#undef _DZ_FILE_
#define _DZ_FILE_ DZ_ZIPMAIN_CPP
/* DLLmain.c * Copyright (C) 1997 <NAME> and <NAME>
* Permission is granted to any individual or institution to use, copy, or
* redistribute this software so long... |
//
// Created by dragos on 09.12.2019.
//
#include "DatabaseServer.h"
namespace p4_thrift {
bool method::operator<(const method &o) const {
return method_id < o.method_id;
}
bool edge::operator<(const edge &o) const {
return std::make_tuple(sourceMethod, source, targetMethod, target) <
std::make_tuple(o.... |
#include "bspedupack.h"
/* This is a test program which uses bsplu to decompose an n by n
matrix A into triangular factors L and U, with partial row pivoting.
The decomposition is A(pi(i),j)=(LU)(i,j), for 0 <= i,j < n,
where pi is a permutation.
The input matrix A is a row-rotated version of a matri... |
//====================================================================================================================================================
// Copyright 2020 Lake Orion Robotics FIRST Team 302
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated ... |
#include "Lex.h"
#define HandleToken(x,y) if(tag==x){SubmitToken(y,"",row,col);}
Lex::Lex(void)
{
}
Lex::~Lex(void)
{
}
void Lex::setLexTbl(const char* lexFname)
{
FILE *fp = fopen("lex.txt","r");
int i=0,j=0;
while(!feof(fp))
{
fscanf(fp, "%d ", &Lextable[i][j]);
if(j!=127)
j++... |
/**
* .file tools/make_bitmap_font.hpp
* .brief Tool for generating a font bitmap and metrics file using Pango/Cairo
*
* @author <NAME>
*
* Copyright 2010-2012 <NAME>. Distributed under the Boost
* Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICE... |
/*
* Copyright (c) 2014 ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Universitaetsstrasse 4, CH-8092 Zurich. Attn: Systems Group.
*/
#include <iostream>
#inclu... |
#include "stdafx.h"
#include "SphericalTerrainComponentUpdater.h"
#include "SoaState.h"
#include "SpaceSystem.h"
#include "SpaceSystemAssemblages.h"
#include "SpaceSystemComponents.h"
#include "SphericalHeightmapGenerator.h"
#include "TerrainPatchMeshManager.h"
#include "VoxelCoordinateSpaces.h"
#include "PlanetGenLoa... |
#include "ArUcoTracker.h"
#include <opencv2/aruco.hpp>
#include <opencv2/opencv.hpp>
namespace
{
inline void addPointsAroundCenter(std::vector<cv::Point3f>& points, float x, float y, float markerSize = 1.f)
{
const float delta = 0.5f * markerSize;
points.reserve(4);
points.emplace_back... |
#include <bits/stdc++.h>
#define PII pair<int,int>
using namespace std;
void inline printMatrix(vector<vector<int>> &matrix) {
for (int i = 0; i < matrix.size(); i++) {
for (int j = 0; j < matrix[i].size(); j++) {
cout << matrix[i][j] << " ";
}
cout << endl;
}
}
// concep... |
// Copyright (c) 2022, ETH Zurich and UNC Chapel Hill.
// 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
// notic... |
#include "btcomm.h"
using namespace comm;
//#define DEBUG
BtComm::BtComm(util::Storage *storage, lap::Rssi *rssi, radio::Rx5808 *rx5808) : Comm(storage), _serialGotLine(false), _serialString(false),
_rssi(rssi), _rx5808(rx5808) {
}
extern "C" {
#include "user_interface.h"
extern struct rst_info resetIn... |
/*
** Copyright 2011-2013,2017 Centreon
**
** This file is part of Centreon Engine.
**
** Centreon Engine 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.
**
** Centreon Engine is distributed in the... |
#include <VecCore/VecCore>
#include <random>
#include <type_traits>
#include <gtest/gtest.h>
constexpr size_t N = 1024;
using namespace testing;
template <class Backend>
using FloatTypes = Types<typename Backend::Float_v, typename Backend::Double_v>;
////////////////////////////////////////////////////////////////... |
#include <iostream>
#include <iomanip>
#include <fstream>
#include <list>
#include <ctime>
#include <boost/numeric/ublas/io.hpp>
#include <flame/constants.h>
#include <flame/base.h>
#include <flame/moment.h>
#include <flame/chg_stripper.h>
#include <flame/state/vector.h>
#include <flame/state/matrix.h>
#include <fla... |
/**
* @file
* @brief [Dynamic Array](https://en.wikipedia.org/wiki/Dynamic_array)
*
* @details
* The list_array is the implementation of list represented using array.
* We can perform basic CRUD operations as well as other operations like sorting
* etc.
*
* ### Algorithm
* It implements various method like in... |
/** @file ImageMarker.cpp
* Definition of ImageMarker class for DDT image library
*
* @author Dynamic DeZigns Technology
*
*/
#include <ImageMarker.h>
#include <QApplication>
#include <QColor>
#include <QPaintDevice>
#include <QRect>
ImageMarker::ImageMarker(QImage * image)
: QPainter(image)
{
if (image && ! ... |
#include "AssimpLoader.h"
#include <3rdParty/assimp/pbrmaterial.h>
#include <CppUtil/Engine/SObj.h>
#include <CppUtil/Engine/CmptMaterial.h>
#include <CppUtil/Engine/CmptTransform.h>
#include <CppUtil/Engine/CmptGeometry.h>
#include <CppUtil/Engine/TriMesh.h>
#include <CppUtil/Engine/BSDF_Frostbite.h>
#include <Cp... |
/* HDU 3487 - Play with Chain, by Abreto<<EMAIL>>. */
#include <bits/stdc++.h>
using namespace std;
#define MAXN 300300
int n, m;
#define LC(p) ch[p][0]
#define RC(p) ch[p][1]
#define TARGET(p) LC(RC(p))
int nodes;
int val[MAXN], ch[MAXN][2], fa[MAXN], sz[MAXN];
int rev[MAXN];
inline int new_node(int v, in... |
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. 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. Redist... |
//
// GB2ShapeCache-x.cpp
//
// Loads physics sprites created with https://www.codeandweb.com/physicseditor
// To be used with cocos2d-x
//
// Generic Shape Cache for box2d
//
// Created by <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associate... |
/*
* This file is part of
* llreve - Automatic regression verification for LLVM programs
*
* Copyright (C) 2016 Karlsruhe Institute of Technology
*
* The system is published under a BSD license.
* See LICENSE (distributed with this file) for details.
*/
#include "Preprocess.h"
#include "Helper.h"
#include ... |
#include "CImg.h"
#include "kf/kf_vector.h"
#include "kf/kf_ray.h"
#include "windows.h"
#include "vector"
#include "iostream"
#include <map>
using namespace cimg_library;
// The resolution of the window and the output of the ray tracer. This can be overridden by the Lua startup script.
int g_windowWidth = 1024;
int g... |
#include "SamplerLogger.h"
SamplerLogger::SamplerLogger(Simulator* model, std::shared_ptr<IPowerDEVSLogger> baseLogger) : SamplerLogger(model, baseLogger, -1){
printLog(LOG_LEVEL_DEBUG, "Created SamplerLogger \n");
// the sample period will be read when the variable is initialized (so that we know the variable... |
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <TMinuit.h>
#include <TFile.h>
#include <TH1.h>
#include <TObjArray.h>
#include <TRandom3.h>
#include "UtilBeamLine3D.h"
UtilBeamLine3D util; // global instance
int twoLineDca3D(double& lambda,double& kappa,TVector3& V, TVector3& U, TVector3& R,TVector... |
// File Name : LoopHandler.cpp
// Author : <NAME>
// Creation Date: 2015 09 10 12:05
// Last Modified: 2015 09 16 10:21
#include <list>
#include "LoopHandler.h"
#include "Util.h"
using namespace llvm;
using namespace clang;
using namespace clang::ast_matchers;
#define LoopUnrollHint std::string("__attribute... |
/* --------------------------------------------------------------------------
*
* File GameScene.cpp
*
* Ported By <NAME>
* Contact <EMAIL>
*
* --------------------------------------------------------------------------
*
* Copyright (c) 2010-2013 XMSoft. All... |
#include "coo_csr_reader.hpp"
// Parts of the MatrixMarket reder interface, declared `extern "C"`
// to work nicely with C++. Compiling mmio.c with a C++ compiler
// does not seem to work correctly.
typedef char MM_typecode[4];
extern "C" char *mm_typecode_to_str(MM_typecode matcode);
extern "C" int mm_read_banner(FIL... |
#include "TimSort.h"
void TimSort::insertionSort(sf::RenderWindow &window, int left, int right, float delay)
{
for (int i = left + 1; i <= right; i++)
{
checkEvents(window);
if (backButtonPressed) return;
++numberOfArrayAccesses;
sf::RectangleShape temp = rods.at(i);
int j = i - 1;
++numberOfComparisons... |
/*
Dwarf Therapist
Copyright (c) 2010 <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, publis... |
#include <QApplication>
#include <QMessageBox>
#include <QMainWindow>
#include <QAction>
#include <QMenu>
#include <QMenuBar>
#include <QFileDialog>
#include <QDir>
#include <QSqlDatabase>
#include <QSqlError>
#include <qtreports/engine.hpp>
#ifdef WIN32
#include <windows.h>
#endif
static QMainWindow* mainWindow = nu... |
#include "StdAfx.h"
#include "GLRenderer.h"
#include "GL\gl.h"
#include "GL\glu.h"
#include "GL\glaux.h"
#include "GL\glut.h"
#include "DImage.h"
#include "Tex.h"
//#pragma comment(lib, "GL\\glut32.lib")
const double M_PI = 3.141592653589793238463;
CTex *tex;
CGLRenderer::CGLRenderer(void)
{
tex = new CTex();
}
CG... |
#include <iostream>
#include <algorithm>
#include <functional>
#include <cstring>
using namespace std;
const int N = 3e4;
pair<long long, int> w[N], h[N];
int pos_w[N], pos_h[N], p[N];
struct seg_node
{
long long f[3][3];
seg_node *l, *r;
seg_node(seg_node *l, seg_node *r) :l(l), r(r) {}
void calc(int... |
/*
Shadow.h - Library for controling shadows through steppers
Copyright (c) 2006 <NAME>. All right reserved.
*/
#include <ESP8266WiFi.h>
#include <AccelStepper.h>
#include <Arduino.h>
#include <Shadow.h>
#include <cppQueue.h>
Shadow::Shadow(int port0, int port1, int port2, int port3, int steps, int fullSteps, in... |
/*
* Copyright 2017-2018 Content Management AG
* All rights reserved.
*
* author: <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above c... |
//===--------------------------------------------------------------------===//
// copy.cpp
// Description: This file contains the implementation of the different copy
// functions
//===--------------------------------------------------------------------===//
#include "duckdb/common/exception.hpp"
#include "duckdb/comm... |
#include <iostream>
#include <cstdlib> //For rand.
#include <ctime> //Seeding for rand.
#include <stdlib.h> //Aghhhh OS-specific.
#include <string.h>
/* Yay SFML */
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
/* Rules
1. Any live cell with fewer than two live neighbours dies, as if caused by underpopu... |
// Copyright (c) 2011-2015 The Bogcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "proposalcommunitytablemodel.h"
#include "masternode-vote.h"
#include "masternode-payments.h"
#include "masternodec... |
#include "LinkedList.h"
LinkedList::LinkedList() {
this->inicioLista = NULL;
this->finLista = NULL;
this->n = 0;
}
bool LinkedList::inserta(int p, Object* x) {
if (p >= 1 && p <= n + 1) {
Nodo* nuevo = new Nodo();
nuevo->setData(x);
if (this->inicioLista == NULL) {
... |
#include "UIntKey96.h"
/*============================================================================
UIntKey96.cpp
uint32 based key for working with 3D grids.
Copyright(c) 2019-2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation file... |
#include "clientdata_operation.h"
#include "sample_libcrypto.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <string.h>
#include <openssl/aes.h> // sudo apt-get install libssl-dev
// #include <sample_libcrypto.h>
using namespace std;
#include <cstdlib>
#include <time.h>
/* These are used for u... |
#include "ros/duration.h"
#include "ros/time.h"
#include <gtest/gtest.h>
class TestTime : public ::testing::Test {
public:
static const ros::Time times[];
static const ros::Duration durations[];
static const int num_times;
static const int num_durations;
static const ros::Time additions[];
static const ro... |
/*
* Some of the code was copied from https://sites.google.com/site/findcommunities/
*/
#include "graph.h"
#include <string.h>
#include <sstream>
using namespace std;
char *infile = NULL;
char *outfile = NULL;
char *partition_file = NULL;
int numberOfPartitions = 1;
//void printPartition(vector<pair<int,int> > e... |
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickStyle>
#include <osmscout/OSMScoutQt.h>
#include <disqt/disqt.h>
#include "libs/Utils/Utils.h"
#include "libs/Settings/Settings.h"
// todo check for redis service with libsystemd-qt and start it if necessary
// todo handle segfault when red... |
#ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
// Include files:
#include "MultiBlockMeshRefine.H"
#include "MayDay.H"
#inc... |
#include "mainwindow.h"
#include "ui_animationMW.h"
#include "QtSingleApplication"
#include "modelController.h"
#include "pictureModel.h"
#include "mvvm/commands/undostack.h"
#include "mvvm/model/modelutils.h"
#include "picScaleComp.h"
#include "gifLoad.h"
#include "mvvm/model/sessionitem.h"
#include "g... |
#include "TileMap.h"
#include "Camera.h"
#include "RessourcesLoader.h"
#include "Inputs.h"
#include <fstream>
#include <string>
#include <cstring>
#include "imgui/imgui_impl_glfw.h"
#include "imgui/imgui_impl_opengl3.h"
#include "Globals.h"
#include<iostream>
extern Camera camera;
static GameObjectClone currentTile... |
// Console Input Output Library Tester program for CMenu
// Test10Menu.cpp
//
// <NAME>, <NAME>
// Oct 10 2012
// Version 0.9
#include "cstring"
#include "cstdio"
using namespace std;
#include "cuigh.h"
#include "cframe.h"
#include "cdialog.h"
#include "clabel.h"
#include "cbutton.h"
#include "clineedit.h"
#include "... |
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. 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 sou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.