text stringlengths 3.08k 22k |
|---|
#include <string>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQ... |
#include <stdio.h>
#include <algorithm>
#include <random>
#include <cstdlib>
#include "actor.h"
using namespace std;
#define PR false
tuple<bool, bool> Actor::analyzeCardBelief(const vector<float>& b) {
assert(b.size() == 25);
set<int> colors;
set<int> ranks;
for (int c = 0; c < 5; ++c) {
fo... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/crt/Api.h>
#include <aws/crt/StlAllocator.h>
#include <aws/crt/auth/Credentials.h>
#include <aws/crt/io/TlsOptions.h>
#include <aws/iot/MqttClient.h>
#include <aws/iotdevicecommon/IotDev... |
// The example shows the Fibonacci Sequence
#include <SFML/Graphics.hpp>
#include <bits/stdc++.h>
#include "6502.hpp"
#include "Bus.hpp"
/* Meta Data */
// The Bus which connects CPU and RAM
Bus bus = Bus();
// Height And Width Of the Screen
#define HEIGHT 600
#define WIDTH 550
/* Helper Function */
// Supplying e... |
/*
* suba.cpp
* Implementation of the Karatsuba algorithm for multiplication and
* exponentiation
*/
/*
MIT License
Copyright (c) 2018 <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
... |
#include <KrisLibrary/Logger.h>
#include "gdi.h"
#include <errors.h>
#include <KrisLibrary/utils/fileutils.h>
#include <KrisLibrary/utils/stringutils.h>
class GdiplusStartupHelper
{
public:
GdiplusStartupHelper() {
gdiplusToken = 0;
tried_startup = false;
}
~GdiplusStartupHelper() {
if (gdiplusToken ... |
/******************************************************************************
*
* Copyright (C) 2014 Google, 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://ww... |
#include "MeshData.h"
#include "core/application/Application.h"
#include "core/engine/geometry/Displacement.h"
#include "core/util/Logger.h"
MeshData::MeshData(std::vector<Vertex> vertices, std::vector<uint32> indices, VertexLayout vertexLayout):
vertices(vertices), indices(indices), vertexLayout(vertexLayout), meshC... |
#include "PID_Autotuner.h"
#include "TemperatureControl.h"
#include "SigmaDeltaPwm.h"
#include "cmsis_os.h"
#include "main.h"
#include <cmath> // std::abs
//#define DEBUG_PRINTF s->printf
#define DEBUG_PRINTF(...)
PID_Autotuner::PID_Autotuner(TemperatureControl *tc)
: temp_control(tc) {
lastInputs = n... |
/* ========================================
* Reverb - Reverb.h
* Copyright (c) 2016 airwindows, All rights reserved
* ======================================== */
#ifndef __Reverb_H
#include "Reverb.h"
#endif
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new Reverb(audioMaster);}
Re... |
#include "ukf.h"
#include "Eigen/Dense"
#include <iostream>
#define EPS 0.001
using namespace std;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::vector;
/**
* Initializes Unscented Kalman filter
* This is scaffolding, do not modify
*/
UKF::UKF() {
// If this is false, laser measurements will be ignor... |
//
// Copyright 2021 <NAME>. All Rights Reserved.
//
// Licensed under the Apache License 2.0 (the "License"). You may not use
// this file except in compliance with the License. You can obtain a copy
// in the file LICENSE in the source distribution.
//
#include <cstdint>
#include <iostream>
#include <string>
#defin... |
//
// Created by Tobias on 9/20/2020.
//
#define STB_IMAGE_IMPLEMENTATION
#include <iostream>
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#pragma warning(push, 0)
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <lyra/lyra.hpp>
#pragma warning(pop)
#incl... |
/****************************************************************************
* Copyright (c) 2015 - 2016, CEA
* 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 mus... |
/*
* Copyright (C) Cvitek Co., Ltd. 2019-2020. All rights reserved.
*
* File Name: TgDequantKernel.cpp
* Description:
*/
#include "TgDequantKernel.hpp"
#include "backend/backend_tl_api.h"
#include <numeric>
#define DEBUG_TYPE "dequant_kernel"
void TgDequantKernel::reshape() {
int shape[] = {n, c, h, w};
asse... |
#include "afk/component/TerrainManager.hpp"
#include <fstream>
#include <iostream>
#include <random>
#include <string>
#include "afk/debug/Assert.hpp"
#include "afk/io/Path.hpp"
auto Afk::TerrainManager::generate_flat(unsigned width, unsigned length) -> void {
this->model.meshes.clear();
this->model.meshes.resiz... |
//===- PrettyTypeDumper.cpp - PDBSymDumper type dumper *------------ C++ *-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
// NOTES: has error test data, there are some characters which aren't lowercase letters.
// FUCK
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <queue>
#include <map>
#include <algorithm>
#include <assert.h>
#include <assert.h>
#pragma comment( linker, "/STACK:1024000000,1024000... |
#include "../include/util.h"
#include <Eigen/Dense>
#include <vector>
#include <iostream>
#include <tbb/tbb.h>
using namespace std;
using namespace Eigen;
Matrix3f eigenso3hat(Vector3f w)
{
Matrix3f what;
what << 0.0, -w(2), w(1),
w(2), 0.0, -w(0),
-w(1), w(0), 0.0;
return what;
}
Matrix3... |
/**
Objective: Implement the Blend Shape deformation on the character face
- Observe the relation between the change of weights by the sliders (blend_shapes_sliders) and the call of the function update_blend_shape
- Add the necessary precomputation in the function initialize_data, and the update of the deformed face... |
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/config/config.h>
#include <vespa/messagebus/configagent.h>
#include <vespa/messagebus/iconfighandler.h>
#include <vespa/messagebus/routing/routingspec.h>
#include <vespa/vespalib/testk... |
#include "pi-peps/config.h"
#include "pi-peps/su2.h"
using namespace std;
itensor::ITensor SU2_getSpinOp(SU2O su2o, itensor::Index const& s, bool DBG) {
auto s1 = prime(s);
int dimS = s.m();
// Construct MPO
auto Op = itensor::ITensor(s, s1);
switch (su2o) {
case SU2_Id: {
if (DBG)
std::... |
#include <cmath>
#include <vector>
#include <imgui.h>
#include <imgui-SFML.h>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include "SfmlHelper.h"
#include "BezierExercise.h"
sf::Vector2f BezierExercise::B(std::vector<sf::Vector2f> coorArr, int i, int j, float at) {
if (j == 0) {
return coorAr... |
#include <stdint.h>
#include <array>
#define SIMDPP_ARCH_X86_SSE3
#include "simdpp/simd.h"
using vec4 = simdpp::float32<4>;
using vec16 = simdpp::float32<16>;
using ivec4 = simdpp::int32<4>;
using ivec16 = simdpp::int32<16>;
// Generates hashes for a vector of integers
static ivec16 hashblock(const ivec16& a)
{
... |
/*****************************************************************************
* BSD 3-Clause License
*
* Copyright (c) 2020, <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.... |
#include <cstdio>
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <cstring>
#include <vector>
#include <set>
#include <mpi.h>
#include <unistd.h>
#include <limits>
#include "worker.h"
#define MSG_NEED_TASKS 0x0
#define MSG_HAS_TASKS 0x1
#define MSG_RESULTS_AND_DIE 0x2
#define TAG_SEND_QUERY 1000... |
#include <SDL.h>
#include <SDL_opengl.h>
#include <Leap.h>
#include <glm/glm.hpp>
Leap::Frame last_frame;
bool rotate = false;
#define POINTER_ID_INVALID INT32_MAX
int32_t pointer_id = POINTER_ID_INVALID;
glm::vec3 pointer_pos, pointer_dir;
#define TEXTURE_WORLD_Z -10.f
#define TEXTURE_WORLD_W 16.f
#define TEXTUR... |
#include "ProceduralMeshDemos.h"
#include "FrequencyFinder.h"
#include <vector>
#include <iostream>
#define _USE_MATH_DEFINES
#include <math.h>
#include "Dependencies/WindowsAudioListener/AudioListener.h"
FrequencyFinder::FrequencyFinder()
: m_sink(m_bitDepth, 2, 128),
m_listener(16, WAVE_FORMAT_PCM, 4, 0)
{
Freq... |
// Copyright <NAME> 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include "ui/file_browser.h"
#include "ui/color_palette.h"
#include "ui/fonts.h"
#include "ui/text.h"
#include "ui/paint.... |
/*
* File: TimeUtilities.cpp
* Description:
* Common utility code for time manipulation.
* Author: <NAME> <<EMAIL>>
* License: New BSD License
*/
#include "Arduino.h"
#include "TimeUtilities.h"
// February is 28 here, but we will account for leap years further down.
static int numDaysInMonths[] = {31, 28, 31,... |
#include <cstring>
#include <set>
#include <vector>
#include <thread>
#include "ycsb_txn.h"
#include "common/buffer/buffer.h"
#include "common/index/index.h"
#include "common/storage/tablespace/row_item.h"
#include "common/storage/catalog.h"
#include "common/storage/table.h"
#include "common/workload/ycsb_wl.h"
#inclu... |
/**
* KFR (http://kfrlib.com)
* Copyright (C) 2016 <NAME>
* See LICENSE.txt for details
*/
#include <kfr/io/tostring.hpp>
#include "testo/testo.hpp"
#include <kfr/base/basic_expressions.hpp>
#include <kfr/base/complex.hpp>
#include <kfr/base/reduce.hpp>
#include <kfr/cometa/string.hpp>
#include <kfr/math.hpp>
#i... |
/*
Stable marriage problem in Gecode.
Translation of the OPL version from
<NAME> "The OPL Optimization Programming Language"
Also:
http://www.comp.rgu.ac.uk/staff/ha/ZCSP/additional_problems/stable_marriage/stable_marriage.pdf
Compare with the following models:
* MiniZinc: http://www.hakank.org/mini... |
/*
==============================================================================
PhaseResponse.cpp
Created: 5 Aug 2020 3:53:29pm
Author: <NAME>
==============================================================================
*/
#include <JuceHeader.h>
#include "PhaseResponse.h"
//======... |
#include <AMReX.H>
#include <AMReX_GeomIntersectUtils.H>
#include <AMReX_ParmParse.H>
#include <AMReX_VectorIO.H>
#include <AMReX_Utility.H>
using namespace amrex;
using std::list;
list<list<Segment>> MakePolyLines(Vector<Segment>& segVec);
int
main (int argc,
char* argv[])
{
amrex::Initialize(argc,argv);
... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008-2017. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory... |
#include "../Server/server_http.hpp"
#include "../Server/client_http.hpp"
//Added for the json-example
#define BOOST_SPIRIT_THREADSAFE
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
//Added for the default_resource example
#include <fstream>
#include <boost/filesystem.hpp>
#in... |
/* This file builds an executable that can receive IMU data from a phone and
control the pose (roll and pitch) of a rectangular slab in OpenSim. The phone needs to be Android,
have an accelerometer and a gyroscope, and have the app 'Wireless IMU' installed. To run the
executable, make sure to set the IP address of the ... |
#include "ImageSender.hpp"
#include <unistd.h> // close
#include <sys/types.h>
#include <sys/stat.h>
#include <opencv2/opencv.hpp>
//#include <opencv2/imgcodecs/imgcodecs.hpp>
ImageSender::ImageSender(int port) :
image_dims_(cv::Size2i(0, 0)),
out_path_("D:\\"),
client_len_(0),
server_addr_size_(size... |
/*=============================================================================
Library: CppMicroServices
Copyright (c) The CppMicroServices developers. See the COPYRIGHT
file at the top-level directory of this distribution and at
https://github.com/CppMicroServices/CppMicroServices/COPYRIGHT .
Licensed un... |
//----------------------------------
// (c) Reliable Software 2002 - 2008
//----------------------------------
#include "precompiled.h"
#undef DBG_LOGGING
#define DBG_LOGGING false
#include "Hierarchy.h"
#include "HierarchyView.h"
#include "RecordSet.h"
#include <File/Vpath.h>
class Refresher
{
public:
Refresher (... |
#include "maze_generator.h"
maze_generator::maze_generator(int maze_size, int start_room_size,
int quest_room_size, int n_quest_rooms,
int n_exits, Cell start_room_pos) :
maze_size(maze_size),
... |
/* NetHack may be freely redistributed. See license for details. */
#include "vulture_sdl.h" /* XXX this must be the first include,
no idea why but it won't compile otherwise */
extern "C" {
#include "hack.h"
}
#include "vulture_gra.h"
#include "vulture_main.h"
#include "vulture_mou.h"
... |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may... |
// Software License for MTL
//
// Copyright (c) 2007 The Trustees of Indiana University.
// 2008 Dresden University of Technology and the Trustees of Indiana University.
// 2010 SimuNova UG, www.simunova.com.
// All rights reserved.
// Authors: <NAME> and <NAME>
//
// This file is part o... |
//
// Created by Administrator on 2019/9/23 0023.
//
#include "WebsocketProtocolParser.h"
void WebsocketProtocolParser::ProcessHttpHeader(string &name, string &value) {
value.erase(0, value.find_first_not_of(" "));//trim left space
if ("Upgrade" == name) {
header_upgrade = value;
} else if ("Conne... |
// Copyright 2016 The Streamer Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... |
// matth-x/ESP8266-OCPP
// Copyright <NAME> 2019 - 2021
// MIT License
#include "Variants.h"
#include <ArduinoOcpp/Tasks/SmartCharging/SmartChargingService.h>
#include <ArduinoOcpp/Core/OcppEngine.h>
#include <ArduinoOcpp/Core/Configuration.h>
#define SINGLE_CONNECTOR_ID 1
#define PROFILE_FN_PREFIX "/ocpp-"
#defin... |
// jhcHeadGaze.cpp : computes direction using offset of face from head center
//
// Written by <NAME>, <EMAIL>
//
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2017-2020 IBM Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use... |
#include "Application2D.h"
#include "Texture.h"
#include "Font.h"
#include "Input.h"
#include "Player.h"
#include "ObjectPool.h"
#include "Laser.h"
#include "HitBox.h"
#include <assert.h>
Application2D::Application2D()
{
}
Application2D::~Application2D()
{
}
bool Application2D::startup() //c... |
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* ... |
// Low level matrix multiplication on GPU using CUDA with CURAND and CUBLAS
// C(m,n) = A(m,k) * B(k,n)
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <cublas_v2.h>
#include <curand.h>
#include <sys/time.h>
#include <stdio.h>
#define CUDA_CALL(x) do { if((x) != cudaSuccess) { \
printf("Error ... |
#include "erosion/Droplet.h"
#include <iostream>
Droplet::Droplet(float x, float y) {
position = glm::vec2(x, y);
prevPosition = glm::vec2(0);
direction = glm::vec2(0);
gradient = glm::vec2(0);
velocity = 1;
water = 1;
sediment = 0;
heightmap = nullptr;
}
// TODO: too long!
void Droplet::erode(HeightMap& hei... |
#include <math.h>
#include <stdio.h>
#include <PnC/RobotSystem/RobotSystem.hpp>
#include <PnC/DracoPnC/TestSet/BalanceTest.hpp>
#include <PnC/DracoPnC/TestSet/WalkingTest.hpp>
#include <PnC/DracoPnC/DracoInterface.hpp>
#include <PnC/DracoPnC/DracoStateEstimator.hpp>
#include <PnC/DracoPnC/DracoStateProvider.hpp>
#inclu... |
#include <algorithm>
#include <iostream>
#include "vehicle.h"
#include <cmath>
#include <map>
#include <string>
#include <iterator>
//#include "cost.h"
/**
* Initializes Vehicle
*/
#define SAFE_DISTANCE_BEHIND (15)
#define SAFE_DISTANCE_FRONT (30)
#define TRACK_LENGTH (6945.554)
#define MAX_COST (100000.0)
#define ... |
/*
* File: PPOrderBy_serializer.cpp
* Copyright (C) 2011 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
*/
#include "PPOrderBy_serializer.h"
#include "common/bit_set.h"
#include "tr/executor/fo/casting_operations.h"
#include "tr/executor/fo/string_operations.h"
TupleSerializer::... |
#include "lagged_ensemble.h"
#include "plugin_factory.h"
#include "util.h"
#define HIMAN_AUXILIARY_INCLUDE
#include "fetcher.h"
#undef HIMAN_AUXILIARY_INCLUDE
#include <math.h>
using namespace himan;
using namespace himan::plugin;
using namespace himan::util;
namespace
{
std::vector<std::pair<forecast_type, time_d... |
//
// MnistUtils.cpp
// MNN
//
// Created by MNN on 2020/01/08.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include "MnistUtils.hpp"
#include <MNN/expr/Executor.hpp>
#include <cmath>
#include <iostream>
#include <vector>
#include "DataLoader.hpp"
#include "DemoUnit.hpp"
#include "MnistDataset.hpp"
#incl... |
/** //
* Copyright (c) 2013-2018, The Kovri I2P Router Project //
* //
* All rights reserved. ... |
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* Copyright (c) 2000 International Computer Science Institute
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:... |
/*
* private/systematics/SexualAncestry.cc
* Avida
*
* Created by David on 7/7/10.
* Copyright 2010-2011 Michigan State University. All rights reserved.
*
*
* This file is part of Avida.
*
* Avida is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public... |
#include "libs/stb_truetype.h"
#include "libs/stb_image_write.h"
#include <cerrno>
#include <cstdint>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
struct Rect {
uint32_t width;
uint32_t height;
};
static uint32_t max(uin... |
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "semant.h"
#include "utilities.h"
extern int semant_debug;
extern char *curr_filename;
//////////////////////////////////////////////////////////////////////
//
// Symbols
//
// For convenience, a large number of symbols are predefined here.
// Th... |
/* ************************************************************************
* Copyright 2013 Advanced Micro Devices, 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... |
#include "ast_stmts.hpp"
#include "ast_deletestmt_node.hpp"
#include "ast_assertstmt_node.hpp"
#include "ast_panicstmt_node.hpp"
#include "ast/expr/ast_ref.hpp"
#include "symbol/package.hpp"
#include "driver.hpp"
#include "parsercontext.hpp"
#include "llvm_generator.hpp"
#include "llvm/IR/IntrinsicInst.h"
using names... |
// Filename: initializeBondedForces.cu
//
// Copyright (c) 2010-2012, <NAME>
//
// This file is part of Fluam
//
// Fluam 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
/... |
/*
This file is part of the UrgBenri application.
Copyright (c) 2016 <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 th... |
ST_retcode sf_scalar_dbl(char const *scalar, int64_t vlen, ST_double *z)
{
ST_retcode rc = 0;
SPARQUET_CHAR(vscalar, 32);
memcpy(vscalar, scalar, vlen);
if ( (rc = SF_scal_use(vscalar, z)) ) return (rc);
return (rc);
}
ST_retcode sf_scalar_int(char const *scalar, int64_t vlen, int64_t *s)
{
ST_... |
#include <iostream>
#include <string>
extern "C" {
#include <libavdevice/avdevice.h>
#include <libavfilter/avfilter.h>
#include <libavformat/avformat.h>
#include <libavutil/imgutils.h>
#include <libswscale/swscale.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
}
#include <opencv2/core/core.hpp>
#inc... |
#include <iostream>
#include "io/binary_parser.h"
#include "dstruct/factor_graph/factor_graph.h"
#include "dstruct/factor_graph/factor.h"
bool dd::FactorGraph::is_usable(){
return this->sorted && this->safety_check_passed;
}
dd::FactorGraph::FactorGraph(long _n_var, long _n_factor, long _n_weight, long _n_edge) : ... |
#include "stdafx.h"
#include "context.hpp"
using namespace renderer;
using namespace std;
using namespace placeholders;
void RendererContextSDL::setTitle(const char* title) {
}
void RendererContextSDL::setup(size_t w, size_t h) {
winWidth = w;
winHeight = h;
//SDL_SetMainReady();
if (SDL_Ini... |
// -*-c++-*-
//-----------------------------------------------------------------------------
/**
* @file Graph.cpp
* @author <NAME>
*/
//-----------------------------------------------------------------------------
#include <Graph.hpp>
void Graph::
addEdgeUndirected(int src, int dst, double weight) {
assert(... |
/*
Picture Puzzle
By <NAME>
*/
#include "Picture Puzzle Header.hpp"
#define launcherScreenX 640
#define launcherScreenY 480
#define launcherFPS 60
#define halfOFlauncherScreenX (launcherScreenX >> 1)
#define launcherText "Configuration Settings Wizard"
#define launcherHelpText "Click an item to change value v... |
/*
* Teensy 3.2 SPI test to control Mirrorcle PicoAmp MEMS mirror driver board.
* PicoAmp board is based on AD5664R quad 16 bit DAC with SPI input.
* <NAME>
* Aug 8th(ish) 2017
*
* This program generates a varying sinusoid in X and Y, initializes the SPI, initializes the DAC, sets a period
* then plays back the ... |
//////////////////////////////////////////////////////////////////////////
// Supor Keyboard //
//////////////////////////////////////////////////////////////////////////
void EXPAD_Supor_Keyboard::Reset()
{
bGraph = FALSE;
bOut = FALSE;
ScanNo = 0;
}
... |
//
// Part of Metta OS. Check https://atta-metta.net for latest version.
//
// Copyright 2010 - 2017, <NAME> <<EMAIL>>
//
// Distributed under the Boost Software License, Version 1.0.
// (See file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include "dwarf_lines.h"
#include "local_panic.h"
#in... |
/*
pbrt source code Copyright(c) 1998-2012 <NAME> and <NAME>.
This file is part of pbrt.
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 copyr... |
#include "NWNXResMan.h"
#include "pluginlink.h"
#include <stdio.h>
CNWNXResMan::CNWNXResMan()
{
confKey = "RESOURCEMANAGER";
warnMissing = false;
debugCRes = false;
}
CNWNXResMan::~CNWNXResMan()
{
}
bool CNWNXResMan::OnCreate(gline *config, const char *LogDir)
{
char log[MAXPATH];
sprintf(log, "... |
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include "m1.h"
#include "m2.h"
#include "Fuzzy_Search.h"
#include "global.h"
using namespace std;
extern global globalVar;
//This may slow the procesing speed, needs to fix
#define FUZZYNAME_DISPLAY_NUM 100 //Number of names to display
#defin... |
#include "textrenderer.h"
TextRenderer::TextRenderer(const std::string &fontPath, const GLuint &windowWidth, const GLuint &windowHeight)
{
// set OpenGL options.
// we need blending for the text alpha (disable to see the quads onto which the glyph textures are drawn)
glEnable(GL_CULL_FACE);
glEnable(GL_BLEND);
gl... |
#include <chrono>
#include <boost/thread.hpp>
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
#include <boost/filesystem.hpp>
#include <boost/uuid/uuid_io.... |
/**
* src/main.cc
*
* Copyright (c) 2021-2022 <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 require... |
#include <gtest/gtest.h>
#include <condition_variable>
#include <iostream>
#include <mutex>
#include <opencv2/opencv.hpp>
#include <string>
#include "easycodec/easy_encode.h"
#include "easyinfer/mlu_context.h"
#include "test_base.h"
using edk::PixelFmt;
using edk::CodecType;
using edk::VideoProfile;
static std::mutex... |
/*
* Copyright (C) 2022 <NAME>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaim... |
/*
Copyright 2001-2018 <NAME>
Site: scriptol.com - .fr
License: Apache 2.0.
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <string>
#include <cstring>
#include <iterator>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#ifdef UN... |
// Copyright 2018 PDFium 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 "public/fpdf_transformpage.h"
#include "testing/embedder_test.h"
class FPDFTransformEmbedderTest : public EmbedderTest {};
TEST_F(FPDFTransformEmbedd... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance w... |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
#include "Scene.h"
#include "Ray.h"
#include <cmath>
#include <math.h>
#include <vector>
#if defined(_OPENMP)
#include <omp.h>
static bool b = true;
#endif
Scene::Scene(Camera &_camera, const std::vector<Light> &_lights, const std::vector<Object *> &_objects,
const json &_j, bool _debug, shadow_type _shadow, boo... |
#pragma once
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
struct Texture {
std::string file;
GLuint reference = 0;
r32 width = 0.f;
r32 height = 0.f;
GLenum format;
Rectf Rect() const {
return Rectf(0, 0, width, height);
... |
/*
*
* Copyright 2021 gRPC authors 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 copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
// Copyright 2019, Beeri 15. All rights reserved.
// Author: <NAME> (<EMAIL>)
//
// Example MR that processes movies dataset dataset:
// https://www.kaggle.com/rounakbanik/the-movies-dataset/
#include <rapidjson/error/en.h>
#include <re2/re2.h>
#include "base/init.h"
#include "base/logging.h"
#include "file/file_uti... |
/*
* (C) Copyright 1996-2016 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an in... |
#include <iostream>
#include <fstream>
#include "LinuxUtils.h"
#include "Utils.h"
#include "PrintVar.h"
#include "OrbitModule.h"
#include "Path.h"
#include "ScopeTimer.h"
#include "Capture.h"
#include "Callstack.h"
#include "SamplingProfiler.h"
#include "EventBuffer.h"
#include "Capture.h"
#include "ScopeTimer.h"
#inc... |
#include "utils.h"
static std::string trimCharacters(const std::vector<char> &src, std::initializer_list<char> chars) {
auto start = src.begin(), end = src.end() - 1;
while (start != end) {
bool exists = false;
for (auto &ch : chars) {
if (*start == ch) {
exists = tr... |
#include "tcp.h"
#include "global.h"
#include "httpsession.h"
#include <iostream>
#include <sys/socket.h>
class TCP;
extern pool<TCP> g_tcp_pool;
extern int32_t g_epoller_fd;
Listener::Listener(const std::string ip, const int32_t port, const int32_t rsize, const int32_t ssize)
: iPipe(ip, port),
_asso... |
/****************************************************************************/
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
// Copyright (C) 2011-2020 German Aerospace Center (DLR) and others.
// This program and the accompanying materials are made available under the
// terms of the Ecli... |
/*
* GameManager.cpp
*
* Created on: 18.03.2018
* Author: core
*/
#include "GameManager.h"
GameManager::~GameManager() {
TTF_CloseFont(fpsFont);
TTF_CloseFont(scoreFont);
}
void GameManager::init(int screenW, int screenH) {
this->screenW = screenW;
this->screenH = screenH;
this->scoreFont = TTF_Open... |
/////////////////////////////////////////////////////////////////////////////
/// InternalModesCalculator.cpp
///
/// Implementation of InternalModesCalculator class
///
///
/// \copyright Copyright 2010-2014 BARCELONA SUPERCOMPUTING CENTER. See the COPYRIGHT file at the top-level directory of this distribution.
///
//... |
#include "testApp.h"
#include "GL\glew.h"
#include "terrainShader.h"
#include "ofFileUtils.h"
//--------------------------------------------------------------
void testApp::setup() {
maxHands = 2;
maxChange = 1.0f;
maxRadius = 0.4f;
uiZone = 0.7f;
hasLeft = false;
hasRight = false;
// using margins ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.