text stringlengths 3.08k 22k |
|---|
/*-------------optics_vis.cpp-------------------------------------------------//
*
* Purpose: To visualize a geometrical optics for LeiosOS
*
* Notes: This will be using the cairo package, hopefully creating animations
* I could use the subroutine-comic project, but this will be from
* scra... |
// Copyright 2021 The Khronos Group
// SPDX-License-Identifier: Apache-2.0
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <array>
// anari
#include "anari/anari_cpp.hpp"
#include "anari/anari_cpp/ext/std.h"
// stb_image
#include "stb_image_write.h"
const char *g_moduleType = "environment";
using ... |
/***
*
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object ... |
/*************************************************************************/
/* cp_loader_it_info.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/*
Copyright (c) 2013, <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 conditi... |
#include <algorithm>
#include <numeric>
#include <caffe/util/math_functions.hpp>
#include <valarray>
#include "visualisations.hpp"
#include "DummyLayerVisualisation.hpp"
#include "MultiImageVisualisation.hpp"
#include "FlatLayerVisualisation.hpp"
#include "Range.hpp"
#include "ActivityAnimation.hpp"
#include "InputLaye... |
#include <qtfoundation.h>
#define ADD(ID,NAME) plan.addTable(N::Tables::ID,NAME)
void N::InstallTables(PurePlan & plan)
{
ADD(MajorUuid , "uuid" ) ;
ADD(Objects , "objects" ) ;
ADD(Types , "types" ) ;
ADD(Names ... |
#include "Common.h"
#include <OVR_CAPI_GL.h>
RiftApp::RiftApp(bool fullscreen) : RiftGlfwApp(fullscreen) {
Platform::sleepMillis(200);
if (!ovrHmd_ConfigureTracking(hmd,
ovrTrackingCap_Orientation | ovrTrackingCap_Position | ovrTrackingCap_MagYawCorrection, 0)) {
SAY_ERR("Could not attach to sensor devic... |
/******************************************************************************
* *
* Copyright 2018 <NAME> *
* *
* Licensed un... |
#include <bits/stdc++.h>
using namespace std;
#define SIZE 40010
/* Link/cut Tree */
class LinkCutTree {
public:
int val, maxv, maxPt;
bool revLazy;
int father, son[2];
};
LinkCutTree lct[SIZE];
const LinkCutTree blankNode = {0, 0, 0, false, 0, {0, 0}};
const auto node = [](int rt... |
// -*- C++ -*-
//
// Package: Validation/MtdValidation
// Class: EtlRecHitsValidation
//
/**\class EtlRecHitsValidation EtlRecHitsValidation.cc Validation/MtdValidation/plugins/EtlRecHitsValidation.cc
Description: ETL RECO hits validation
Implementation:
[Notes on implementation]
*/
#include <string>
... |
//----------------------------------------------------------------------------
// Yaobi - Yet Another OBB-Tree Implementation
//----------------------------------------------------------------------------
//
// Copyright (c) 2006 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtai... |
/*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
/*Universidade Federal do Rio de Janeiro
Departamento de Engenharia Eletrôncia e de Computação
Sistemas Operacionais - 2018.2
Aluna: <NAME>
DRE: 115037241*/
/*TRABALHO: IMPLEMENTAÇÃO DE UM SHELL PARA LINUX COM MULTIPLAS TELAS*/
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#inc... |
//
// Copyright (C) 2020 <NAME>
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <GraphMol/MonomerInfo.h>
#include <GraphMol/RDKit... |
#include "voronoi3d.h"
Voronoi3D::Voronoi3D(VecF<double> &x, VecF<double> &y, VecF<double> &z, VecF<double> &r, double cellLen_2, double zCut, int numA, bool radical, int maxV) {
//Initialise with x,y,z coordinates and radii
//Make periodic container in xy
n=x.n;
nA=numA;
nB=n-nA;
maxVertices... |
// Copyright (c) 2019, Compiler Tree Technologies Pvt 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. Redistributions of source code must retain the above copyright notice, this
... |
#pragma once
enum
{
TE_BEAMPOINTS = 0x00, // beam effect between two points
TE_SPRITE = 0x01, // additive sprite, plays 1 cycle
TE_BEAMDISK = 0x02, // disk that expands to max radius over lifetime
TE_BEAMCYLINDER = 0x03, // cylinder that expands to max radius over lifetime
TE_BEAMFOLLOW = 0x04, // create a lin... |
// Copyright (c) 2018-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
#include "smt/solver.h"
#include "smt/ctx.h"
#include "util/compiler.h"
#include "util/config.h"
#include "util/file.h"
#include <cassert>
#include <fstream>
#include <iomanip>
#include <option... |
/*
* Copyright (c) 2012-2015 Advanced Micro Devices, Inc.
* All rights reserved.
*
* For use for simulation and test purposes only
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of sourc... |
/*
Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
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; version 2 of the License.
This program is distributed in the hope ... |
//By <NAME>
//Email: <EMAIL>
#include "graph.h"
using namespace std;
//Constructor of the array of g_nodes given a number of locations.
graph::graph(int a_num_locs)
{
f_id=0;
t_id=0;
a_id=0;
s_id=0;
h_id=0;
num_locs=a_num_locs;
array=new g_node[num_locs];
}
//Destructor
graph::~graph()
{
array... |
/*****************************************************************************
* *
* Copyright 2018 Rice University *
* *
* ... |
/*
Copyright ©1995-1996, <NAME>
All rights reserved.
File: CScout.c
Created: Wednesday, March 15, 1995, 07:48
Modified: Monday, September 16, 1996, 19:31
*/
// #define ENABLE_FPS_DEBUG // uncomment if you want to see FPS_DEBUG output for this file
#include "CScout.h"
#include "CAbstractPlayer.h"... |
// Generated from /POI/java/org/apache/poi/hssf/util/HSSFColor.java
#pragma once
#include <fwd-POI.hpp>
#include <java/io/fwd-POI.hpp>
#include <java/lang/fwd-POI.hpp>
#include <org/apache/poi/hssf/util/fwd-POI.hpp>
#include <java/lang/Enum.hpp>
template<typename ComponentType, typename... Bases> struct SubArray;
na... |
#include "optixbrickpool.hpp"
#include "../optixdvr_instance.hpp"
OptixVolumeBrickPool::OptixVolumeBrickPool()
{
mContext = &OptixInstance::get()->m_context;
mPageTableBuffer = nullptr;
}
void OptixVolumeBrickPool::allocatePageTable()
{
if(mPageTableBuffer)
{
mPageTableTexture->destroy();
... |
#include <bits/stdc++.h>
#define INF 2000000000
using namespace std;
typedef long long ll;
int read(){
int f = 1, x = 0;
char c = getchar();
while(c < '0' || c > '9'){if(c == '-') f = -f; c = getchar();}
while(c >= '0' && c <= '9')x = x * 10 + c - '0', c = getchar();
return f * x;
}
struct TreeNod... |
//LatLong- UTM conversion.cpp
//Lat Long - UTM, UTM - Lat Long conversions
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "UTM.h"
/*Reference ellipsoids derived from <NAME>'s website-
http://www.utexas.edu/depts/grg/gcraft/notes/datum/elist.html
Department of Geography, University of Texas at Aust... |
#include "Test11.h"
#include "imgui/imgui.h"
#include "../VertexBufferLayout.h"
#include "../InputSystem.h"
extern const unsigned int SCR_WIDTH;
extern const unsigned int SCR_HEIGHT;
namespace test
{
Test11::Test11()
: m_Time(0.0f),
m_ClearColor(glm::vec3(0.0f))
{
float vertices[] = {
// positions ... |
/*
* File: Order.cpp
* Author: amit
*
* Created on May 13, 2016, 11:51 PM
*/
#include <iostream>
#include <locale>
#include "Order.hpp"
using namespace std;
FORMAT stringToEnumFormat(const string& s) {
string S = s;
for (auto & c: S) c = toupper(c);
if (S == "JPEG" || S == "JPG") {
return... |
#include "glacier/httpdata.h"
#include "glacier/base/logging.h"
#include "glacier/channel.h"
#include "glacier/eventloop.h"
#include "glacier/timer.h"
#include "glacier/utils.h"
using namespace std;
pthread_once_t MimeType::once_control = PTHREAD_ONCE_INIT;
unordered_map<string, string> MimeType::mime;
const uint32_... |
/*
* Copyright (c) 2020 <NAME>
* This file is part of Onyx, and is released under the terms of the MIT License
* check LICENSE at the root directory for more information
*/
#include <stdio.h>
#include "../virtio.hpp"
#include "network.hpp"
#include <onyx/slice.hpp>
#include <onyx/page.h>
#include <onyx/net/network.h>... |
// Copyright 2021 TUNiB Inc.
// Copyright (c) Facebook, Inc. and its affiliates.
// 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.
///
/// This design stemmed of from the PointwiseOperatorCompileCache with the
... |
#include "Halide.h"
#include "benchmark.h"
using namespace Halide;
#include <iostream>
#include <limits>
Var x, y, z, c;
// Downsample with a 1 3 3 1 filter
Func downsample(Func f) {
Func downx, downy;
downx(x, y, _) = (f(2*x-1, y, _) + 3.0f * (f(2*x, y, _) + f(2*x+1, y, _)) + f(2*x+2, y, _)) / 8.0f;
do... |
/* cygtls.cc
Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
2013, 2014 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
#define USE_SYS_TYPES_FD_SET
#include "cy... |
/*
* Copyright (C) 2018 by Author: Aroudj, Samir
* TU Darmstadt - Graphics, Capture and Massively Parallel Computing
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-Clause license. See the License.txt file for details.
*/
#include <atomic>
#include "Math/M... |
#include "foundation_AMOS.hh"
#include "amp.hh"
#include "fasta.hh"
#include "AMOS_Foundation.hh"
#include "PersistentUtils.hh"
using namespace AMOS;
using namespace std;
int MINDELTA(0);
int PRINTDIFFERENT(0);
int USESCAFFOLD(0);
int USEEID(0);
int SHOWBEST(0);
ReadPosLookup read2contigpos;
IDMap_t lastcontigm... |
#include "TimeLapseWebSocket.h"
#include "TimeLapseCamera.h"
#include <ArduinoJson.h>
#include <ezTime.h>
#include <ArduinoLogRemoteDebug.h>
TimeLapseWebSocket::TimeLapseWebSocket(const String& url, TimeLapseCamera& tlc, int port):
AsyncWebSocket(url),
_tlc(tlc)
{
this->onEvent(onWebSocketEvent);
}
void merge(... |
#include "rfqchunk.h"
#include <memory.h>
#include "endian.h"
RfqChunk::RfqChunk(RfqHeader* header){
memset(this, 0, sizeof(RfqChunk));
mHeader = header;
}
RfqChunk::~RfqChunk(){
if(mReadLenBuf)
delete[] mReadLenBuf;
if(mName1LenBuf)
delete[] mName1LenBuf;
if(mName2LenBuf)
... |
#include "fuzz.h"
#include <nos/NuggetClient.h>
#include <nostypes.h>
#include <nosutils.h>
#include <stdlib.h>
#include <unistd.h>
#include <chrono>
#include <fstream>
#include <iostream>
#include "include/log.h"
#include "src/mutator.h"
#include "utils.h"
using std::cout;
using std::endl;
using namespace nostype... |
// AED 2021/2022 - Aula Pratica 07
// <NAME> (DCC/FCUP) [06/12/2021]
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "hashTable.h"
#include "funWithHashTables.h"
using testing::Eq;
// ----------------------------------------------------------
// Exercicio 1: Tabelas de Dispersão
// -----------------------... |
/*
* This file is part of MQT QFR library which is released under the MIT license.
* See file README.md or go to https://www.cda.cit.tum.de/research/quantum/ for more information.
*/
#include "QuantumComputation.hpp"
void qc::QuantumComputation::importReal(std::istream& is) {
auto line = readRealHeader(is);
... |
/*
* GridGain Community Edition Licensing
* Copyright 2019 GridGain Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License") modified with Commons Clause
* Restriction; you may not use this file except in compliance with the License. You may obtain a
* c... |
#include "Engine.h"
// ========== constructors and destructors ==========
Engine::Engine() {
window = new Window;
} // Engine
Engine::~Engine() {
delete renderer;
renderer = nullptr;
for ( unsigned int i = 0; i < displayElements.size(); ++i ) {
delete displayElements[i];
displayElements[i] = nullptr;
}
d... |
#include<iostream>
#include<math.h>
#define PI 3.14159265
using namespace std;
//Function for sine!!!
double sine(double x)
{
x=x*3.14;
x=x/180;
return sin(x);
}
//Function for cosine
double cosine(double x)
{
x=x*3.14;
x=x/180;
return cos(x);
}
double arctan(double slope)
{
double theta;
//Arc tan code for con... |
//
// Created by neo on 2019-08-15.
//
#include "../pinball.h"
//----- (01004C3C) --------------------------------------------------------
int high_score_clear_table(int a1)
{
int result; // eax
signed int v2; // ecx
result = a1;
v2 = 5;
do
{
*(DWORD *)(result + 32) = -999;
*(... |
#include "config.h"
#define LOGLEVEL LOG_LEVEL_DEBUG
// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 4;
const int LOADCELL_SCK_PIN = 5;
HX711 scale;
/*
Master set a register
if register is set, master send a OnRequest event
slave response with number of bytes based to actual register set
Event handl... |
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
// What this program does, is first simulate one full sequence.
// Then, it will compress that sequence into a single array using:
// goesTo[current] = newPos
// And will keep applying that array to positions until they are all in the c... |
/*************************************************************************/
/* os_3ds.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include "StartModels.h"
#include "output.h"
#include "utils.h"
#include "ProgressBar.h"
#include "elongationPhase/ExtensionTable.h"
#include <list>
#include <iostream>
#include <string>
/**************************************
* find overrepresented IUPAC patterns in positive set compared to the negative set
******... |
#include <sensor_msgs/Image.h>
#include "ArUcoDetector.h"
#include <opencv2/aruco.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#include <boost/thread/mutex.hpp>
#include <cv_bridge/cv_bridge.h>
#include "ros/ros.h"
#include "../aruco_model/Marker.h"
#include "../aruco_locator/ArUcoLocator.h"
#include <FileUt... |
#include <iostream>
#include <math.h>
#include "event.hpp"
#include "../transforms.hpp"
#include "../common.hpp"
#include "../sprite_common.hpp"
#include "../assets.h"
#include "../anim.hpp"
void EventScene::loadBigImage(Event event) {
/* Load big image */
_currentBigTexture.loadFromImage(event.bigImage);
... |
#include <Windows.h>
#include <cstdio>
#include <cstring>
using namespace std;
enum DisplaySelection {
DS_MONITOR = 1,
DS_HDMI = 2,
DS_BOTH = 3,
DS_CYCLE = 4,
};
/* This array must match the above enum */
const char *DisplaySelectionStrings[] = {
"Monitor",
"HDMI",
"Both",
"Cycle",
};
static const unsigned i... |
#include <iostream>
#include <algorithm>
#include <unordered_set>
#include "../util/stringescape.h"
#include "../util/ArgParser.h"
#include "zlib/zstr.hpp"
namespace fs = std::filesystem;
using path = std::string;
using Repeats = std::unordered_map<path, std::unordered_set<unsigned long>>;
using CharMap = std::map<un... |
#include "../multiboot.hpp"
#include "LibC/ctype.hpp"
#include "LibC/stdio.hpp"
#include "LibC/stdlib.hpp"
#include "LibGUI/font.hpp"
#include "LibGUI/gui.hpp"
#include "Exec/elf.hpp"
#include "Exec/loader.hpp"
#include "GDT/gdt.hpp"
#include "Mem/mm.hpp"
#include "Mem/paging.hpp"
#include "Net/arp.hpp"
#include "Net/... |
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "Account.h"
#include "Bank.h"
#include "BankOfficer.h"
#include "utils.h"
#include <vector>
#include <string>
using testing::Eq;
TEST(test_1, a){
vector<int> v1;
v1.push_back(10); v1.push_back(8);
v1.push_back(12);
EXPECT_EQ(3, numberDifferen... |
#include "pch.h"
#include "Huffman.h"
#include "winrt/Windows.Storage.h"
#include "winrt/Windows.Storage.Streams.h"
using namespace std;
using namespace winrt;
using namespace Windows::Storage;
using namespace Windows::Storage::Streams;
using namespace Windows::Foundation;
#define MAXLEN 512+5
#define ASCLLNUM 256
s... |
#include "RigidObject.h"
#include <KrisLibrary/Timer.h>
#include "Mass.h"
#include "IO/ROS.h"
#include <KrisLibrary/robotics/Inertia.h>
#include <KrisLibrary/utils/SimpleFile.h>
#include <KrisLibrary/utils/stringutils.h>
#include <KrisLibrary/GLdraw/GL.h>
#include <KrisLibrary/GLdraw/drawextra.h>
#include <KrisLibrary/... |
#include <iostream>
#include <fstream>
// #include <unistd.h>
#include <time.h>
#include <string>
#include <deque>
#include <csignal>
#include <algorithm>
#include <cmath>
#include <vector>
#include <filesystem>
#include "json.hpp"
#include <gpiod.hpp>
// clang++ fanshim_driver.cpp -O3 -std=c++17 -lstdc++fs -lgpiodc... |
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be usefu... |
/***********************************************************************************************************************
* *
* libscopeprotocols ... |
// Spirick Tuning
//
// A C++ class and template library
// for performance critical applications.
// Copyright (C) 1996-2021 <NAME>.
// All rights reserved.
// Internet www.spirick.com
// E-Mail <EMAIL>
//
// Version 1.48
// File sourcedep/dirmap.cpp
#include "sourcedep/dirmap.hpp"
#include "tuning/chn/array.h"
... |
#include "VoxelsPicker.hpp"
#include "Camera.hpp"
#include "Voxels.hpp"
#include <SFML/OpenGL.hpp>
VoxelsPicker::VoxelsPicker(Camera* cam, Voxels* voxels)
{
m_cam = cam;
m_voxels = voxels;
m_voxStamp = 0;
m_voxDl = glGenLists(1);
}
VoxelsPicker::~VoxelsPicker()
{
glDeleteLists(1, m_voxDl);
}
Camera* Voxel... |
// Copyright (c) 2006-2008 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.
#include "chrome/browser/fav_icon_helper.h"
#include "base/gfx/image_operations.h"
#include "base/gfx/png_decoder.h"
#include "base/gfx/png_enco... |
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
#include "Draw3D.h"
#include "AppSDL2OGL_3D.h" // THE HEADER
// camera_FPS( pos, rotMat ){
void AppSDL2OGL_3D::camera_FPS( const Vec3d& pos, const Mat3d& rotMat ){
//glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glFrustum( -ASPECT_RATIO, AS... |
#include <iostream>
#include <fstream>
#include <cmath>
#include <stdio.h>
#include <time.h>
#include <glm/glm.hpp>
#include <omp.h>
#include "../include/Camera.h"
#include "../include/Scene.h"
int savePPM(
const char* file_name,
const int width,
const int height,
unsigned char* data)
{
FILE *fp = fopen(file_na... |
/* neutube_v2_plugin.cpp
* This is a test plugin, you can use it as a demo.
* 2015-2-9 : by <NAME>
*/
#include "v3d_message.h"
#include <vector>
#include <QElapsedTimer>
#include "basic_surf_objs.h"
#include "neutube_v2_plugin.h"
#include "zqtheader.h" //Start including neutube headers
#include "zneurontracer.h... |
/*
* ntripleParser.cpp
*
* Created on: Nov 23, 2016
* Author: cochez
*
*
*
*
*/
#include <assert.h>
#include <utility>
#include <boost/algorithm/string.hpp>
#include <fstream>
#include <memory>
#include "nTripleParser.h"
#include "utils.h"
using namespace std;
using namespace boost;
namespace {
bool... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include "ObjMesh.h"
struct Triangle {
int a, b, c;
};
typedef struct Triangle Triangle;
static inline void ltrim(std::string &s) {
s.erase(s.begin(), find_if(s.begin(), s.end(), [](... |
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
/*
* Copyright 2008, 2009 Google Inc.
* Copyright 2006 Nintendo Co., Ltd.
*
* 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
*
* Unle... |
/* # Reference: https://brilliant.org/wiki/bellman-ford-algorithm/
https://cp-algorithms.com/graph/bellman_ford.html
Intuition: https://www.youtube.com/watch?v=75yC1vbS8S8&list=PLgUwDviBIf0rGEWe64KWas0Nryn7SCRWw&index=29
# This algorithm is DP based.
# It is a graph search algorithm that finds t... |
#include <iostream>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graphviz.hpp>
#include <boost/graph/properties.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/named_function_params.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
// the predefined property types a... |
/*
* Copyright (C) 2014 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in wr... |
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| ... |
//////////////////////////////////////////////////////////////////////////////////
/// OpenGL Image (gli.g-truc.net)
///
/// Copyright (c) 2008 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files... |
#include "evaluator.hpp"
#include "desktop-opencv.hpp"
#include <fmo/image.hpp>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <stdexcept>
const std::string& eventName(Event e) {
static const std::string tp = "TP";
static const std::string tn = "TN";
static const std::string fp = "FP";
... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <mutex>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core/persistence.hpp>
#include <ros/ros.h>
#include <tf2/LinearMath/Quaternion.h>
#include <tf2/LinearMath/Matrix3x3.h>
#include <glog/... |
#include "hilbert.h"
#include "mainwindow.h"
hilbert::hilbert(int srfr, int pstim, int lft, double osfr, double thfr, int delay, int ampl, int numst)
{
this->srfr = srfr;
this->osfr = osfr;
this->thfr = thfr;
this->phase = delay;
this->numst = numst;
x=new float[NMAX];
noise = 0;
s... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: Dungeon.cpp
* Author: logan
*
* Created on May 4, 2017, 9:41 AM
*/
#include "Dungeon.h"
// We're ... |
#include <math.h>
static __inline float cuberoot( float x ) {
if( x<0.0f ) {
return -powf(-x,1.0f/3.0f);
}
return powf(x,1.0f/3.0f);
}
void complexSquareRoot( float a, float b, float *res ) {
float r = sqrtf( a*a+b*b );
float y = sqrtf(.5f*(r-a));
float x = .5f*b/y;
res[0] = x;
... |
/*
MIT License
Copyright (c) 2018 <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,... |
//
// stored_events.c
// chickencoopArt
//
/*****************************************************************************
MIT License
Copyright (c) 2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to d... |
#include "define.h"
#include "utils.h"
#ifdef __ANDROID__
static AAssetManager *assetManager = 0;
void SetAssetManager(AAssetManager *am)
{
assetManager = am;
}
ULONG GetTickCount()
{
return 0;
}
#endif
#ifdef linux
ULONG
GetTickCount()
{
float t = (float)clock() / (float)CLOCKS_PER_SEC;
return (ULONG)(t * 1000... |
#include "sim.Host.h"
#include "probability_v10.h"
#include "misc_v9.h"
using namespace std;
//------------------------------------------------
// initialise host
void Host::init(int index, int &ID, int deme,
vector<int> &Sh, vector<int> &Eh, vector<int> &Ih,
vector<vector<int>> &host... |
#include "Item.h"
#include <Morph\Looks\LookMulti.h>
#include <Morph\Room.h>
#include "GlobalTextureCont.h"
#include "GlobalFontCont.h"
#include "Player.h"
#include "DescriptorItem.h"
#include "Map.h"
#include "InventorySlot.h"
#include "Inventory.h"
#include <algorithm>
#include "Tile.h"
#include "Enemy.h"
#include "E... |
#include <getopt.h>
#include "pgpdriver.h"
static uint8_t* pci_resource;
static void print_dma_lane(const char* name, int addr, int offset, int mask)
{
printf("%20.20s", name);
for(int i=0; i<4; i++) {
uint32_t reg = get_reg32(pci_resource, DMA_LANES(i) + addr);
printf(" %8u", (reg >> offset) ... |
#include <tdp/testing/testing.h>
#include <iostream>
#include <Eigen/Dense>
#include <tdp/manifold/SO3.h>
#include <tdp/manifold/rotation.h>
#include <tdp/manifold/SE3.h>
#include <tdp/data/managed_image.h>
#include <tdp/eigen/dense.h>
#include <tdp/preproc/pc.h>
using namespace tdp;
TEST(SE3, setup) {
SE3d T;... |
// Copyright © 2022 <NAME>. All rights reserved.
#pragma once
#include <functional>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <vector>
#include "DSPHeaders/EventProcessor.hpp"
#include "SF2Lib/MIDI/NRPN.hpp"
#include "SF2Lib/Render/Engine/Mixer.hpp"
#include "SF2Lib/Render/Engine/Old... |
#include "faceDetect.hpp"
#include "compiler_fp16.h"
#include <chrono>
#include <common/tengine_operations.h>
#include <log.h>
#include <string>
#define clip(x, y) (x < 0 ? 0 : (x > y ? y : x))
faceDetect::faceDetect(std::string model_path, context_t context, int numThread,
float score_threshol... |
#include <math.h>
#include <SFML/Graphics.hpp>
int N = 128;
int SCALE = 4;
int ITERATIONS = 16;
float TIMESTEP = 0.1f;
float DIFFUSION = 0;
float VISCOSITY = 0.0000001f;
#define IX(x, y) ((x) + (y) * N)
struct FluidSquare {
int size;
float dt;
float diff;
float visc;
float *s;
float *d... |
#include <vector>
#include <fstream>
#include <bits/stdc++.h>
#include "GreedyHeuristicM.h"
#include <assert.h>
using Iter = std::vector<int>::const_iterator;
using namespace std;
vector<int> erase_element(vector<int> vec, int el){
vector<int> result;
for (Iter it = vec.begin() ; it<vec.end();it++){
if (*it!=el){... |
#include "Plane.hpp"
#include "QCoreApplication"
#include "Sphere.hpp"
#include "Types.hpp"
#include <QColor>
#include <QCommandLineParser>
#include <QImage>
#include <QOpenGLFunctions>
#include <QVector3D>
#include <cmath>
#include <iostream>
auto WIDTH = 640;
auto HEIGHT = 480;
constexpr float PI = 3.141592F;
conste... |
#include <ThermalAnalysis/LinearCombination.hpp>
#include <boost/program_options.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <libField/HDF5.hpp>
#include <gputils/io.hpp>
#include <libArrhenius/Arrhenius.hpp>
#include <iostream>
#include <fstrea... |
#include <LSP/Synth/Luath.hpp>
#include <LSP/MIDI/Messages/BasicMessage.hpp>
#include <LSP/MIDI/Messages/SysExMessage.hpp>
using namespace LSP;
using namespace LSP::MIDI;
using namespace LSP::MIDI::Messages;
using namespace LSP::Synth;
Luath::Luath(uint32_t sampleFreq, SystemType defaultSystemType)
: mSampleFreq(sa... |
/**
*BSD 3-Clause License
*
*Copyright (c) 2019, <NAME>
*All rights reserved.
*
*Redistribution and use in source and binary forms, with or without
*modification, are permitted provided that the following conditions are met:
*1. Redistributions of source code must retain the above copyright notice, this
* li... |
///
/// Convolver.cpp -- The low-latency convolution classes.
/// See the copyright notice and acknowledgment of authors in the file COPYRIGHT
///
#include "Convolver.h"
using namespace csl;
// Fancy constructor that reads the IR file and does its FFT
Convolver :: Convolver (char *filename) : Effect() {
mNumBufs ... |
/**
* \file libsanm/pade.cpp
* This file is part of SANM, a symbolic asymptotic numerical solver.
*/
#include "libsanm/pade.h"
#include "libsanm/unary_polynomial.h"
#include <cmath>
using namespace sanm;
PadeApproximation::PadeApproximation(std::span<const TensorND> xs,
bool ... |
//**********************************************************************************
//
// © 2015 Arizona Board of Regents on behalf of the University of Arizona with rights
// granted for USDOT OSADP distribution with the Apache 2.0 open source license.
//
//*************************************************... |
#include <iostream>
#include <fstream>
#include <vector>
#include <map>
#include <typeinfo>
#include <string>
#include <sstream>
#include <exception>
/*~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~*/
//g++ --std=c++11 DECRYPT.cpp -o DECRYPT && ./DECRYPT
/*~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.