text stringlengths 3.08k 12.5k |
|---|
#include "MainGateway.h"
#include "static.h"
//#include <vector>
using namespace web::json;
using namespace utility::conversions;
value DiscordCPP::MainGateway::get_heartbeat_payload() {
value payload = value();
payload[U("op")] = value(1);
if (_sequence_number == 0)
payload[U("d")] = value::null();
else
pa... |
#include <stdio.h>
#include <sys/time.h>
#include <iostream>
#include "cgmres.hpp"
#include "matrix.hpp"
#include "model1.hpp"
#include "model2.hpp"
#include "simulator1.hpp"
#include "simulator2.hpp"
double getEtime(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
return (double)tv.tv_sec + (double)tv.tv_u... |
#include "DSCCommandArgs.h"
#include "ServiceManager.h"
using namespace deltix;
using namespace deltix::dsc;
int DSCCreateService(ServiceManager &dsm, const DSCCommandArgs &args);
int DSCDeleteService(ServiceManager &dsm, const DSCCommandArgs &args);
int DSCStartService(ServiceManager &dsm, const DSCCommandArgs &args... |
/* consensus_skeleton_func.cpp
* a plugin to merge multiple neurons by generating a consensus skeleton
* 2012-05-02 : by <NAME>
*/
#include <v3d_interface.h>
#include "basic_surf_objs.h"
#include "v3d_message.h"
#include "consensus_skeleton_func.h"
#include "consensus_skeleton.h"
#include <vector>
#include <iostrea... |
#include "ModuleCamera.h"
#include "Application.h"
#include "ModuleWindow.h"
#include "ModuleInput.h"
#include "ModuleModelLoader.h"
#include <IMGUI/imgui.h>
ModuleCamera::ModuleCamera()
{
}
ModuleCamera::~ModuleCamera()
{
}
bool ModuleCamera::Init()
{
int w, h;
SDL_GetWindowSize(App->window->window, &w, &h);
fl... |
/**
* @brief find the most optimal domain decomposition
* @author <NAME>
*
* This software is provided with the hope that it will be
* useful. It comes with no warranty whatsoever.
* Please send bug reports to <EMAIL>.
*/
#include "CubeDecomp.h"
bool
CubeDecomp::build(int nprocs, const std::vector<size_t>& ... |
#include "stdafx.h"
#include "Winsock2.h"
#include "iostream"
using namespace std;
#pragma comment(lib, "Ws2_32.lib")
SOCKET GetListenSocket(short shPortNo, int nBacklog = SOMAXCONN)
{
SOCKET hsoListen = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (hsoListen == INVALID_SOCKET)
{
cout << "socket failed, code : ... |
// Section 7.8
// $ CC commandline.cpp
/* output:
a.out -d -l 1024 -o test_7_8 chapter7.doc chapter8.doc
illustration of handling command line arguments:
argc: 8
argv[ 1 ]: -d
case '-' found
-d found: debugging turned on
argv[ 2 ]: -l
case '-' found
-l found: resource limit
argv[ 3 ]: 1024
default non-h... |
//
// experimental_modules.cpp
// imgSymmetry
//
// Created by <NAME> on 13/12/2017.
//
#include "experimental_modules.hpp"
//--------------------------------------------------------------------------------
/*********************************************************************************
*
* DFOx Construc... |
/*
Scheduling (building a house) in Gecode.
This model is adapted to Gecode from the OPL model sched_intro.mod (examples).
"""
This is a basic problem that involves building a house. The masonry,
roofing, painting, etc. must be scheduled. Some tasks must
necessarily take place before others, and these re... |
#include "test_header.hpp"
class CSVParserTest : public TestTimer {};
/* Test for CSVParser
- Test for openning file
- Test for reading file and 2-d vector construction
_ Test for CSVParser values methods
*/
TEST(CSVParser, TestFreeFunctions) {
CSVParser p(TEST_CSV_INPUT_DIR + "test_more_input/2018-0... |
/****************************************************************************
**
** Copyright (C) 2018 TU Wien, ACIN, Vision 4 Robotics (V4R) group
** Contact: v4r.acin.tuwien.ac.at
**
** This file is part of V4R
**
** V4R is distributed under dual licenses - GPLv3 or closed source.
**
** GNU General Public License Usa... |
/*
Copyright (C) 2011 - 2019, <NAME> and contributors listed
in the AUTHORS file in TASBE Flow Analytics distribution's top directory.
This file is part of the TASBE Flow Analytics package, and is distributed
under the terms of the GNU General Public License, with a linking
exception, as described in the fil... |
#include "black_item.h"
#include "omp.h"
Vision::Vision()
{
//image_sub = nh.subscribe(VISION_TOPIC, 1,static_cast<void (Vision::*)(const sensor_msgs::ImageConstPtr&)>(&Vision::imageCb),this);
image_sub = nh.subscribe(VISION_TOPIC, 1, &Vision::imageCb, this);
}
Vision::Vision(string topic)
{
image_sub = nh... |
// This file is part of playd.
// playd is licensed under the MIT licence: see LICENSE.txt.
/**
* @file
* Implementation of the Mp3AudioSource class.
* @see audio/sources/mp3.hpp
*/
#include <cassert>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <memory>
#inc... |
#include <string>
#include <typeinfo>
#include <string>
using std::string;
#include <iostream>
#include <sstream>
using std::cout;
using std::cin;
using std::endl;
#include <vector>
using namespace std;
#include "Ingrediente.h"
#include "Plato.h"
void ingresarIgrediente(vector<Ingrediente*>&);
//void llenarVecto... |
/**
* \file mc-train.cpp
* \copyright <NAME>
* \date December 2019
* \brief Implements the MonteCarloTrain class
*/
#include "mc-train.hpp"
#include <time.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <map>
#include <random>
#include <sstream>
#include <string>
#include <tuple>
#include... |
#include "RoamingCamera.h"
#include "PluginBase/Interfaces.h"
#include "PluginBase/Player.h"
#include <cdll_int.h>
#include <client/c_baseplayer.h>
#include <shared/in_buttons.h>
#include <algorithm>
static float GetSpecSpeed()
{
static ConVarRef sv_specspeed("sv_specspeed");
return sv_specspeed.GetFloat();
}
stat... |
// @HEADER
// ************************************************************************
//
// Intrepid Package
// Copyright (2007) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the ... |
#include <grend/playerView.hpp>
#include <grend/gameView.hpp>
#include <grend/audioMixer.hpp>
#include <grend/controllers.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <grend/geometryGeneration.hpp>
using namespace grendx;
static gameObject::ptr testweapon = nullptr;
static gameModel::ptr cuboid = generate_cuboi... |
// Copyright (c) 2013-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <hash.h>
#include <crypto/common.h>
#include <crypto/curve25519.h>
#include <crypto/hmac_sha512.h>
inline uint32_t... |
#include <arduinoFFT.h>
#include <driver/i2s.h>
#include "version.h"
/***************************************************************************/
// oled screen
#include "SSD1306Wire.h"
/***************************************************************************/
// Industrial Data Logger networking implementation.... |
#include <string>
#include <vector>
#include "../lib/cxxopts/include/cxxopts.hpp"
#include "arithmetic/table.hpp"
#include "expression/calculator.hpp"
#include "expression/filter.hpp"
#include "provision/input.hpp"
#include "provision/lookup.hpp"
#include "render/output.hpp"
using namespace Glay;
using namespace Glay... |
#include "client.h"
#include "sdl/window.h"
#include "sdl/game_scene.h"
#include "game/board_position.h"
#include "communication/client_protocol.h"
#include "communication/action_thread.h"
#include "../common/packet.h"
#include "../common/chess_exception.h"
#include "../common/client_data.h"
#include "sdl/event_handler... |
//
// Copyright <NAME> (<EMAIL>)
// GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
//
//
// TODO
// Rewrite the pattern logic. Instead of pre-computing the
// entire pattern, have it slowly expand itself to fill
// the whole buffer.
// Watch out for those lines where we would have to set
// the sieve values as b... |
// Day12.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <algorithm>
#include <iostream>
#include <map>
#include <regex>
#include <string>
#include <vector>
#include "../AoCHelpers/InputHandler.h"
#include "PlantRule.h"
PlantMap get_initial_state(co... |
#include <math.h>
#include "mex.h"
#include "matrix.h"
#include "../mex/compat.h"
#define MAX(A,B) ((A) < (B) ? (B) : (A))
#define MIN(A,B) ((A) > (B) ? (B) : (A))
// Undocumented Features!
//extern int mxUnshareArray(mxArray *pr, int noDeepCopy); // true if not successful
//extern bool mxUnshareArray(const mxArr... |
/*
* This is a minimal example, see extra-examples.cpp for a version
* with more explantory documentation, example routines, how to
* hook up your pixels and all of the pixel types that are supported.
*
*/
/*-------------------------------------------------------------------------
Spark Core library to control... |
#include <ros/ros.h>
#include <opencv2/opencv.hpp>
#include <cv_bridge/cv_bridge.h>
#include <image_transport/image_transport.h>
#include <geometry_msgs/Twist.h>
#include <dynamic_reconfigure/server.h>
#include <zaryabot_bringup/parameterConfig.h>
#include <zaryabot_bringup/working_state.h>
using namespace cv;
using n... |
#define __STDC_FORMAT_MACROS
#define _POSIX_C_SOURCE 200112L
#define _FILE_OFFSET_BITS 64
#include <cassert>
#include <sstream>
#include "common.h"
#include "cryptopp/modes.h"
#include "cryptopp/base64.h"
#include "zstr/src/zstr.hpp"
int64_t readInt64BE(uint8_t* &buffer) {
int64_t result = ((int64_t) buffer[0] <<... |
#include<hongyulib.h>
/***********************************************************
* This C function uses wiggins algorithm to interpolate for
* higher sampling rate. While used in down sampling may
* results in aliasing effects.
*
* double *x ---- Origin signal x.
* double *y ---- Origin signal y=... |
// Copyright (c) 2009 - Mozy, Inc.
#include <boost/bind.hpp>
#include "mordor/future.h"
#include "mordor/iomanager.h"
#include "mordor/test/test.h"
#include "mordor/thread.h"
#include "mordor/version.h"
#include "mordor/socket.h"
using namespace Mordor;
using namespace Mordor::Test;
namespace
{
class EmptyTimeC... |
#include "argument_parser.h"
#include "bitstorage/base64_bit_storage.h"
#include "bech32m.h"
#include "bitstorage/bin_bit_storage.h"
#include "bitstorage/hex_bit_storage.h"
#include <cmath>
#include <fstream>
#include <iostream>
void read_write(const ProgramArgs &arguments);
int main(int argc, const char **argv) {
... |
//
// Created by istvan on 5/2/17.
//
#include <componentmodel/ports/r_periodictimer.h>
#include <chrono>
#include <thread>
#include <functional>
#include <atomic>
#include <mutex>
using namespace std;
constexpr auto CMD_START = "$START";
constexpr auto CMD_HALT = "$HALT" ;
namespace riaps {
namespace ports {... |
#include <iostream>
#include <fstream>
#include "bucket.h"
using namespace std;
Bucket::Bucket(string n, Baseplate *plate)
: bucket_name(n), baseplate(plate) {}
Bucket::~Bucket() {}
string const Bucket::name() {
return bucket_name;
}
Briq *Bucket::save_briq(Briq *b) {
b->set_bucket(this->name());
i... |
#include <tytherm.h>
#include <user_config.h>
#include <SmingCore/SmingCore.h>
HashMap<String, String> db;
HashMap<String, int> conn_db;
DNSServer dnsServer;
Timer counterTimer;
Timer wifiScanDelayTimer;
Timer DownloadTimer;
Timer ConnectTimer;
HttpClient httpClient;
void counter_loop();
void try_download();
void tr... |
#include "Game.h"
#include <iostream>
#include <fstream>
#include <string>
#include <memory>
#include "json/single_include/nlohmann/json.hpp"
using json = nlohmann::json;
constexpr int MAX_ROUND = 130;
Game::operator notation() const
{
notation n;
std::ostringstream oss;
n.filename = filename();
n... |
#include <iostream>
#include <random>
#include <fstream>
#include <queue>
#include <cuda_runtime.h>
#include <cuda_profiler_api.h>
#define USE_CUDA
#define USE_RMM
//#define ENABLE_NVVP
#define OUTPUT_RESULT
#include "ellipse.h"
using DataType = float;
#ifdef USE_CUDA
using ArclengthCalculate = ArclengthCalculate... |
//
// Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rig... |
// https://adventofcode.com/2019/day/12
//
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <fstream>
#include <vector>
struct vector_t
{
int x;
int y;
int z;
};
int sign(int i)
{
return (i > 0) - (i < 0);
}
vector_t sign(const vector_t& v)
{
return { sign(v.x), sign(v.y), s... |
//-----------------------------------------------------------------
// Bitmap Object
// C++ Source - Bitmap.cpp
// Author: <NAME>
//-----------------------------------------------------------------
//-----------------------------------------------------------------
// Include Files
//--------------------------... |
/*
<NAME>
IIIT Bangalore
*/
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define ll long long int
#define ld long double
#define fi first
#define se second
#define pr(v) { for(int i=0;i<v.size();i++) { v[i]==INF? cout<<"INF " : co... |
// Simple Music Player
// coding by S.H. (GAMELINKS)
// This source code license is MIT, see the license
// include DxLib
#include "DxLib.h"
// include Boost library
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
namespace fs = boost::filesystem;
// include openCV
#include <opencv2/opencv.hpp>
// inc... |
/*
Sudoku
------
*/
#include <algorithm>
#include <iostream>
#include <memory>
#include <vector>
#include <string>
#include <array>
class Sudoku {
public:
static void initialize() {
unsigned row, row_2;
std::array<unsigned, 3> index;
for (unsigned i = 0; i < 9; ++i) {
fo... |
/*
* Copyright 2017 <NAME>
*
* 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 ... |
/**
* Copyright (c) 2019 Horizon Robotics. All rights reserved.
* @author yaoyao.sun
* @date 2019.04.12
*/
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <chrono>
#include <fstream>
#include <iostream>
#include <map>
#include ... |
#include "Particle.h"
// Requires the SparkIntervalTimer library
// https://github.com/pkourany/SparkIntervalTimer
#include "SparkIntervalTimer/SparkIntervalTimer.h"
// Tested with Adafruit 1713
// Electret Microphone Amplifier - MAX9814 with Auto Gain Control
// https://www.adafruit.com/products/1713
//
// AR - No... |
// OpcClient.cpp
// CinderOpenPixelControlSandbox
//
// Created by <NAME> on 12/24/15.
#include "OpcClient.h"
#include "cinder/Log.h"
#include "cinder/Rand.h"
#include "cinder/Utilities.h"
#include "cinder/app/App.h"
#pragma mark Lifecycle
using namespace kp::opc;
ClientRef Client::create(std::string host, int32_t... |
#include "Common.h"
#include "inode_imp.h"
#include "JSONReader.h"
#include "gtest/gtest.h"
#include <filesystem>
#include <memory>
#include <string>
#include <vector>
namespace fs = std::filesystem;
static fs::path cwd;
static fs::path testdir = "../../../tests/full/utils/data/";
static fs::path tf = "test_json.j... |
#include <fstream>
#include <string>
#include <cstdlib>
#include <numeric>
#include <string_view>
#include <span>
#include <vector>
#include <cassert>
#include <cmath>
#include <limits>
#include <strf/to_cfile.hpp>
auto print_err = strf::to(stderr);
struct parsed_header {
std::size_t names_field_size = 0;
st... |
#include "logger.h"
#include "KafkaW/KafkaW.h"
#include <atomic>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#ifdef _MSC_VER
#include <io.h>
#include <iso646.h>
#define isatty _isatty
#else
#include <unistd.h>
#endif
#include <atomic>
#include <memory>
#include <nlohmann/json.hpp>
#includ... |
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
#include "ipu_utils.hpp"
#include <cmath>
#include <iostream>
Device getDevice() {
auto dm = DeviceManager::createDeviceManager();
auto devices = dm.getDevices(TargetType::IPU, 1);
std::cerr << "Found " << devices.size() << " devices ..." << std::endl;... |
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
class Course{
public:
Course(string, int, char);
string getCourseCode();
string printReport();
int getCredits();
int getGPV();
protected:
string course... |
//# painting, matrix, horizontal, vertical, min-cut, maxflow
//# => This is obviously a min-cut problem, but finding the right network is nontrivial... It turns out the correct approach is to assign nodes to horizontal and vertical edges of the board and empty squares and connect one to the source and one to the sink a... |
// Copyright (c) 2016-2020 Memgraph Ltd. [https://memgraph.com]
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required ... |
#include "DataStructures.h"
bool doubleEdge (std::vector<std::pair<int,int> > edge, int first_, int second_){
for (int i=0; i<edge.size(); i++) {
if (edge[i].first == first_ && edge[i].second == second_)
return false;
if (edge[i].second == first_ && edge[i].first == second_)
... |
/*=========================================================================
Program: ParaView
Module: TestCellAndPointData.cxx
Copyright (c) <NAME> - <NAME>, MARIN, The Netherlands
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERC... |
#include "oregonV2.1.h"
#include "buffer.h"
/*******************************************************************************
--OREGON v2.1 PROTOCOL SPECIFICATION--
----SIGNAL----
A signal consists of a PREAMBLE, DATA and an POSTAMBLE.
Each signal is sent 2 times in a row to increase the d... |
#include "World.hpp"
#include <random>
const litelogger::Logger World::WORLD("World", "[\033[1;32m%s\033[0m %s]: ", 0, stdout);
World::World(): chunks{} {
}
void World::generate() {
std::random_device device;
std::mt19937 rng(device());
std::uniform_int_distribution<uint32_t> randomPos(0, SIZE_TILES-1);
std::un... |
//
// Created by cqy on 21-9-10.
//
#include "ivf/hierarchical_kmeans.h"
#include "util/file_handler.h"
#include <algorithm>
#include <fstream>
#include <iostream>
#include <random>
#include <stdio.h>
#include <unistd.h>
using namespace std;
int64_t blk_size = 12 * 1024;
void hierarchical_clusters() {
// TimeRecor... |
//
// OpenCL benchmark for running a STREAM-like benchmark on GPUs to determine bandwidth vs. workgroup configuration
//
// Author: <NAME>, <EMAIL>
// License: MIT/X11 license, see file LICENSE.txt
//
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <algorithm>
#include "opencl-err... |
#include <sstream>
#include <fstream>
#include <iostream>
#include <cassert>
#include <cmath>
#include <stdexcept>
#include "geometry.h"
#include "xmlparser.h"
#include "track.h"
using namespace GPS;
// Note: The implementation should exploit the relationship:
... |
#include <cmath>
#include <string>
#include <algorithm>
#include <iostream>
#include "atk/toolkit.h"
#include "atkui/skeleton_drawer.h"
#include "atkui/framework.h"
#include "imgui/imgui.h"
#include "imgui/imgui_impl_glfw.h"
#include "imgui/imgui_impl_opengl3.h"
using namespace atk;
using namespace glm;
class AIKSimp... |
/**********************************************************************************/
/* gd_mono_class.cpp */
/**********************************************************************************/
/* The MIT License (MIT) ... |
/**
* @date Tue Jan 10 21:14 2016 +0100
* @author <NAME> <<EMAIL>>
*
* @brief Binds the Generalized SVD
*/
#include "gsvd.h"
#include <bob.blitz/cppapi.h>
#include <bob.blitz/cleanup.h>
#include <bob.math/gsvd.h>
#include <bob.math/svd.h>
#include <bob.math/linear.h>
PyObject* py_gsvd (PyObject*, PyObject* args,... |
#include "chartpage.h"
#include "ui_chartpage.h"
#include "main.h"
#include <QFileDialog>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QPointF>
#include <QVector>
#include <Qpainter>
#include <QGraphicsItem>
using namespace boost;
ChartPage::ChartPage(QWidget *parent) :
QMainWindow(parent),
u... |
#ifdef ENABLE_DOCTEST_IN_LIBRARY
#define DOCTEST_CONFIG_IMPLEMENT
#include "doctest/doctest.h"
#endif
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#include "config.h"
#include "Bus.h"
#include "R6502.h"
class R6502Emulator : public olc::Pixel... |
//-
// ==========================================================================
// Copyright 1995,2006,2008 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk
// license agreement provided at the time of installation or download,
// or which otherwise accompan... |
/*
Copyright 2012-2014 <NAME> and contributors
This 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... |
#pragma once
#include <cassert>
#include <cstdint>
#include <stdexcept>
#include "random.hpp"
#include "record_layout.hpp"
/**
* Better strncpy().
* out buffer will be null-terminated.
* returned value is written size excluding the last null character.
*/
inline std::size_t copy_cstr(char* out, const char* in, s... |
#pragma once
#include "yaml/include/myYaml/yaml.h"
#include <Eigen/Dense>
#include <algorithm>
#include <chrono>
#include <iostream>
#include <math.h>
// =============================================================================
// YAML Readers
// ===================================================================... |
#include "astar.hpp"
#include "float_comparison.hpp"
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <set>
namespace {
using namespace planner;
using NodePtr = std::shared_ptr<Node>;
struct NodePtrComparator {
double heuristic_weight;
const Ti... |
/***************************************************************************
qgsalgorithmremoveduplicatesbyattribute.cpp
----------------------------------
begin : October 2018
copyright : (C) 2018 by <NAME>
email : <... |
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=50500;
class SplayData
{
public:
int ch[2],fa,sz,rev;
ll lsum,rsum,pls,sum,key,ksum;
};
int n,m;
ll Ic[maxN],Is[maxN];
S... |
#include "Revelation.h"
#include "Game.h"
#include "JASS.h"
#include "MHDetect.h"
pair<DWFP, DWFP> GetRandomXYinCircle(float x, float y, float r)
{
pair<DWFP, DWFP> point;
static float zero = 0.0f;
static float one = 1.0f;
static float two_pi = 6.2831853f;
float angle = jGetRandomReal(&zero, &... |
/* Copyright 2001, 2019 IBM Corporation
*
* 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 d... |
#include "touchapplication.h"
#include "touchinputfilter.h"
#include <QWindow>
#include <QWidget>
#include <QTabletEvent>
int TouchApplication::m_tabletButtons = 0;
TouchApplication::TouchApplication(int& argc, char** argv) : QApplication(argc, argv), inputState(None)
{
// prevent Qt from handling tou... |
#include "core.h"
bool g_swnpcRun = false;
int g_numWaypoints = -1;
edict_t *g_hostEntity = null;
int g_callAddNPC = -1;
int g_callRemoveNPC = -1;
int g_callThink_Pre = -1;
int g_callTakeDamage_Pre = -1;
int g_callKill_Pre = -1;
int g_callThink_Post = -1;
int g_callTakeDamage_Post = -1;
int g_callKill_Post = -1;
... |
// __BEGIN_LICENSE__
// Copyright (c) 2006-2013, United States Government as represented by the
// Administrator of the National Aeronautics and Space Administration. All
// rights reserved.
//
// The NASA Vision Workbench is licensed under the Apache License,
// Version 2.0 (the "License"); you may not use this f... |
#include "GuiManager.h"
#include "App.h"
#include "Textures.h"
#include "GuiButton.h"
#include "GuiCheck.h"
#include "GuiSlidder.h"
#include "Audio.h"
GuiManager::GuiManager(bool startEnabled) : Module(startEnabled)
{
name.Create("guiManager");
}
GuiManager::~GuiManager() {}
bool GuiManager::Awake(pugi::xml_node&c... |
#include <string>
#include "../headers/JsonParser.h"
const map<AugNode*, CourseMatrix> JsonParser::parse_input(const char* input, map<int, CourseNode*>* _crs_details)
{
json j_input = json::parse(input);
for (auto crs_itr = j_input[1].begin(); crs_itr != j_input[1].end(); crs_itr++)
{ //extract all course deta... |
#include <iostream>
#include <chrono>
#include <thread>
using namespace std::this_thread;
using namespace std::chrono;
#include "Controller.h"
//constructor
Controller::Controller(){
ui=GameUI(); //initialize the UI.
}
void Controller::start(){
do {
srand(time(NULL)); //seed for random number generato... |
#include <bits/stdc++.h>
#pragma GCC optimize("O2,unroll-loops")
#pragma GCC target("tune=native")
#define fi first
#define se second
using namespace std;
using ll=long long;
using ld=long double;
template<class T>
using vec=vector<T>;
template<class T>
using v2d=vector<vector<T>>;
template<class T>
using prq=prio... |
#include <catch2/catch.hpp>
#include <cassian/main/flags_builder.hpp>
#include <cassian/main/test_helper.hpp>
#include <cassian/random/random.hpp>
#include <cassian/utility/utility.hpp>
namespace ca = cassian;
using ca::test::FlagsBuilder;
using ca::test::Language;
enum class Saturation { NO_SAT, USE_SAT_ZERO, USE_S... |
#include <algorithm>
#include "xr_cform.h"
#include "xr_reader.h"
#include "xr_writer.h"
using namespace xray_re;
xr_cform::xr_cform() { m_bbox.null(); }
xr_cform::~xr_cform() {}
struct read_vertex { void operator()(cf_vertex& vertex, xr_reader& r) const {
r.r_fvector3(vertex.p);
vertex.face0 = BAD_IDX;
}};
stru... |
#include "Commons.h"
#include "SystemCallWrapper.h"
#include <time.h>
#include <QApplication>
#include <QDir>
#include <QCryptographicHash>
#include <QProcess>
#include <QNetworkReply>
const char* CCommons::RESTARTED_ARG = "restarted";
QString
CCommons::FileMd5(const QString &file_path) {
if(file_path == "Not fo... |
/*
* Copyright (c) 2019 <NAME>
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
#if defined(_WIN32) // windows
# define NOMINMAX // to remove min,max macro
... |
/**********************************************************************
* File: linlsq.cpp (Formerly llsq.c)
* Description: Linear Least squares fitting code.
* Author: <NAME>
* Created: Thu Sep 12 08:44:51 BST 1991
*
* (C) Copyright 1991, Hewlett-Packard Ltd.
** Licensed under the Apache License, Vers... |
/*-----------------------------------------------------------------------
<NAME> 2017 - 2020
http://trederia.blogspot.com
crogine - Zlib license.
This software is provided 'as-is', without any express or
implied warranty.In no event will the authors be held
liable for any damages arising from the use of this softwar... |
// ----------------------------------------------------------------------
// MCVerticesAnalyzer
// ---------
#include <memory>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
#include <bitset>
#include "HeavyIonsAnalysis/VertexAnalysis/interface/MCVerticesAnalyzer.h"
#include "CondFormats/... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <stdint.h>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
#define UART_BAUD 9600... |
// Tencent is pleased to support the open source community by making Mars available.
// Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
// Licensed under the MIT License (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the Licens... |
#include <stdint.h>
#include "bmp280.h"
#include "i2c.h"
// Calibration routines taken from Bosch BMP280 datasheet.
void bmp280::begin(i2c * I2C)
{
this->I2C = I2C;
readCalibrationData();
}
int32_t bmp280::readPressure() // returns Pressure * 100
{
readTemperature(); //Pressure reading needs the temper... |
#include <iostream>
#include <vector>
// Used for test1
// Scoped enumeration holding the items for a grocery list
// The value of the enumerator could be the item code
enum class Grocery_Item {Milk=350, Bread=250, Apple=132, Orange=100};
// Used for test1
// Overloaded stream insertion operator.
// Inserts the name ... |
#include <iostream>
#include <string>
#include <math.h>
using namespace std;
class Pet
{
public:
string name;
int level;
int exp;
int health;
int fun;
int stamina;
int food;
Pet(string input)
{
name = input;
level = 1;
exp = 0;
food = 10;
fun = 25;
health = 20;
stamina = 40;
}
void checkTre... |
/////////////////////////////////////////////////////////////////////////////////
// This project exists to test the proper "installation" of the ARSS package,
// testing compilation and linking with the external libraries. If everything is
// installed correctly, you should get a glut window with a simple basketbal... |
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
#include <Windows.h>
#include <roapi.h>
#include <winstring.h>
#include <rometadataresolution.h>
#include <combaseapi.h>
#include <wrl.h>
#include <xmllite.h>
#include <Shlwapi.h>
#include <comutil.h>
#include <iostream>
#include <fstream>
#include <unordered_... |
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#pragma once
#include <eosiolib/types.h>
#include <functional>
#include <tuple>
#include <string>
namespace eosio {
typedef std::vector<std::tuple<uint16_t,std::vector<char>>> extensions_type;
/**
* Converts a base32 symbol into its binary repres... |
#include "worker.hpp"
using namespace headers;
static bool IPv4HdrVerification(ipv4* ipv4_hdr, uint16_t f_len){
// Do header verification (rfc 1812)
// Step 1
if(f_len < 20){
return false;
}
// Step 2
if(IPv4HdrChecksum(ipv4_hdr) != ipv4_hdr->checksum){
#ifdef DEBUG
logDebug("IPv4 verification failed");
#e... |
/*****************************************************************//**
* @file adsr_core.cpp
*
* @brief implementation of AdsrCore class
*
* @author <NAME>
* @version v1.0: initial release
********************************************************************/
#include "adsr_core.h"
AdsrCore::AdsrCore... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.