text stringlengths 3.08k 12.5k |
|---|
// -*- C++ -*-
// -*- coding: utf-8 -*-
//
// Author: <NAME>
// Copyright 2019-
//
#include <iostream>
#include <cstdio>
#include <sstream>
#include <fstream>
#include <cmath>
#include <complex>
#include <map>
#include <gtest/gtest.h>
#include <isce3/io/Raster.h>
#include <isce3/signal/Covariance.h>
#include <isce3/ge... |
//===-- SlotIndexes.cpp - Slot Indexes Pass ------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include<bits/stdc++.h>
// g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.e... |
#include <iostream>
#include <string>
#include <random>
#include <cmath>
#include <array>
#include <random>
#include <algorithm>
#include <adept.h>
#include <Eigen/Core>
#include <Eigen/Dense>
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/XmlOutputter.h>
#include <cppunit/TestCase.h>
#include <cppunit/Test... |
/*
The MIT License (MIT)
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, mer... |
//
// G3MCanvas2DDemoScene.cpp
// G3MApp
//
// Created by <NAME> on 2/12/15.
//
#include "G3MCanvas2DDemoScene.hpp"
#include <G3M/G3MWidget.hpp>
#include <G3M/OSMLayer.hpp>
#include <G3M/LayerSet.hpp>
#include <G3M/IFactory.hpp>
#include <G3M/ICanvas.hpp>
#include <G3M/QuadShape.hpp>
#include <G3M/ShapesRenderer.h... |
/*************************************************************************
> File Name: bbu_server.cpp
> Author: miaopei
> Mail: <EMAIL>
> Created Time: 2020年02月12日 星期三 11时15分05秒
************************************************************************/
#include <cstring>
#include <iostream>
#include "bbu.h"
us... |
/**Kattis - cordonbleu
* Graph modelling + hungarian algorithm. Notice that all bottles will do the trip from their location to the
* restaurant somehow or another, so we can just compute the sum of those distances first. Then now we need to
* find the lowest cost way to reach each bottle. Notice that the possible l... |
/*Copyright 2019 <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 writing, software
distributed ... |
#include <error/error.h>
#include <aversive/blocking_detection_manager/blocking_detection_manager.h>
#include <aversive/position_manager/position_manager.h>
#include <aversive/trajectory_manager/trajectory_manager_utils.h>
#include <aversive/obstacle_avoidance/obstacle_avoidance.h>
#include "robot_helpers/math_helper... |
#include "SIMComAT.h"
#include <errno.h>
void SIMComAT::begin(Stream& port)
{
_port = &port;
_output.begin(LOG_LEVEL_VERBOSE, this, false);
#if _SIM8xx_DEBUG
_debug.begin(LOG_LEVEL_VERBOSE, &Serial, false);
#endif // _SIM8xx_DEBUG
}
void SIMComAT::flushInput() {
uint16_t timeout = 0;
while(readNext... |
#include <iostream>
#include <cassert>
#include <algorithm>
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <codecvt>
#include "charlib.h"
#include <vector>
using namespace std;
// trim from start (in place)
static inline void ltrim(std::string &s) {
s.erase(s.begin(), std::fi... |
// Soln6_3ANSI.cpp
// A program to implement a calculator accepting parentheses
#include <iostream> // For stream input/output
#include <cstdlib> // For the exit() function
#include <cctype> // For the isdigit() function
#include <cstring> // ... |
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* <NAME> <<EMAIL>>
*
* Copyright:
* <NAME>, 2013
*
* Last modified:
* $Date$ by $Author$
* $Revision$
*
* This file is part of Quacode:
* http://quacode.barichard.com
*
* Permission is hereby gran... |
/*
The OpenTRV project licenses this file to you
under the Apache Licence, Version 2.0 (the "Licence");
you may not use this file except in compliance
with the Licence. You may obtain a copy of the Licence at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
softwar... |
#include <vector>
#include <string>
#include <limits>
#include "OPTICKS_LOG.hh"
#include "BOpticksResource.hh"
#include "BFile.hh"
#include "NPY.hpp"
#include "NGLM.hpp"
#include "numpy.hpp"
struct numpyTest
{
std::vector<int> shape ;
std::vector<unsigned> data ;
glm::vec4 getQuadLocal(NPY<unsigned>* a... |
#include "myDetectorConstruction.hh"
#include "myConfig.hh"
#include "myMagneticField.hh"
#include "myMessenger.hh"
#include "myScreenSD.hh"
#include "G4Box.hh"
#include "G4FieldManager.hh"
#include "G4LogicalVolume.hh"
#include "G4NistManager.hh"
#include "G4PVPlacement.hh"
#include "G4SystemOfUnits.hh"
#include "G4T... |
///
///
/// YARP - Yet Another Robotic Platform (c) 2001-2003
///
/// #paulfitz, pasa#
///
/// "Licensed under the Academic Free License Version 1.0"
///
///
/// $Id: test05.cpp,v 2.0 2005-11-06 22:21:27 gmetta Exp $
///
///
#include <yarp/YARPConfig.h>
#include <ace/config.h>
#include <... |
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: <NAME>, <NAME>, <NAME>
*/
#include <shogun/distributions/classical/GaussianDistribution.h>
#include <shogun/base/Parameter.h>
#include <shogun/mathematics/eigen3.h>
#include <shogun/mathematics/NormalDistribution.h>
#in... |
/********************************************************************
arimafit.cpp
Copyright (c) 2015, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retai... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache 2.0 License.
#include "../ds/cli_helper.h"
#include "../ds/files.h"
#include "../node/rpc/jsonrpc.h"
#include "../tls/ca.h"
#include "../tls/cert.h"
#include "../tls/keypair.h"
#include "rpc_tls_client.h"
#include <CLI11/CLI11.hp... |
#include <xerus.h>
#include <iostream>
#include <string>
#include <fstream>
using namespace xerus;
const size_t MAX_NUM_PER_SITE = 32;
Tensor create_M() {
Tensor M = -1*Tensor::identity({MAX_NUM_PER_SITE, MAX_NUM_PER_SITE});
for (size_t i = 0; i < MAX_NUM_PER_SITE-1; ++i) {
M[{i+1, i}] = 1.0;
}
return M;
}
Te... |
/*
* camera based 3D tracking system -- Calibrate Camera Positions
* Studienarbeit SS 2016 - HAW Hamburg - <NAME>
*
* based on:
* Bachelorprojekt WS 2015/16 - HAW Hamburg - Quadrocopter-Tracking und Positionsregelung
* authors: <NAME>, <NAME>
*/
//#define CAMERA_CALIB_CIRCLES // show circles for calibration cro... |
// atcoder/abc172/E/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << ... |
/**
The class implements a set of methods of the MAX6675_Thermocouple.h
interface for working with a thermocouple based on the MAX6675
driver and reading a temperature in Celsius, Fahrenheit and Kelvin.
https://github.com/YuriiSalimov/MAX6675_Thermocouple
Created by <NAME>, February, 2018.
Released into the pub... |
//===- Conversion.cpp - Linalg to LLVM execution driver -------------------===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.... |
// Fizzy: A fast WebAssembly interpreter
// Copyright 2020 The Fizzy Authors.
// SPDX-License-Identifier: Apache-2.0
#include "cxx20/span.hpp"
#include "stack.hpp"
#include <gtest/gtest.h>
#include <array>
#include <vector>
using namespace fizzy;
using namespace testing;
TEST(cxx20_span, vector)
{
std::vector<ui... |
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <mutex>
#include <string>
#include <base64.hpp>
static const char encoding_table_def[] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c... |
/*
* StoryFit
* EE459 Spring 2021
* Team 13
* <NAME> and <NAME>
*/
#include "MainMenu.Scene.h"
#include "storyfit.h"
#include "textbox.h"
#include "rectangle.h"
#include "sensors.h"
#include "Title.Scene.h"
#include "OptionsMenu.Scene.h"
MainMenu::MainMenu(Game* game, Scene* parent)
: Scene(game, parent) ... |
// --------------------------------------------------------------------------
// Copyright (C) Karlsruhe Institute of Technology, 2017
//
// 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, eithe... |
#include <cfloat>
#include "geometry_queries.h"
#pragma GCC visibility push(hidden)
// External functions defined in predicates.cpp
extern double exactinit();
extern double orient3d(double* pa, double* pb, double* pc, double* pd);
#pragma GCC visibility pop
double
initialize_exact()
{
return exactinit();
}
floa... |
/**
* MIT license:
*
* Copyright (c) 2019 vlads
*
* 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, ... |
//
// Copyright (c) 2021, NVIDIA CORPORATION. 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 co... |
#include <iostream>
#include <gl/glut.h>
#include <gl/gl.h>
#include <time.h>
#include <math.h>
#define PI 3.14159265358979323846f
#define dt 0.1f
#define N 200
#define WIDTH 1000
#define HEIGHT 600
using namespace std;
class myObj{
public:
float m,r,sx,sy,vx,vy,cr,cg,cb;
myObj(){
this->m = float(ran... |
#include <iostream>
#include <stdio.h>
#include <string>
#include <set>
using namespace std;
void Swap(int & a, int &b) {
int tmp = a;
a = b;
b = tmp;
}
class LinkedList;
class Node {
private :
int data;
Node *next;
public:
Node() : data(0), next(0) {};
Node(int x) : data(x), next(NULL) {};
friend class... |
#include <string>
#include <list>
#include <vector>
using namespace std;
/*
题目:68 树中两个节点的最低公共祖先
输入两个树接地那,求他们最低公共祖先
*/
// define
struct TreeNode
{
int m_nValue;
std::vector<TreeNode*> m_vChildren;
};
class List
{
public:
static TreeNode* createTreeNode(int value)
{
Tr... |
#include "GLstate.h"
const char *vertexshader = "#version 150\n"
"in vec2 position;\n"
"in vec2 texcoord;\n"
"out vec2 Texcoord;\n"
"void main(){Texcoord = texcoord; gl_Position = "
"v... |
// DRUNKWATER TEMPLATE(add description and prototypes)
// Question Title and Description on leetcode.com
// Function Declaration and Function Prototypes on leetcode.com
//802. Find Eventual Safe States
//In a directed graph, we start at some node and every turn, walk along a directed edge of the graph. If we reach a n... |
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "modemfwd/modem_flasher.h"
#include <memory>
#include <utility>
#include <base/files/file_util.h>
#include <base/stl_util.h>
#include <base/... |
/**
* @file talker.cpp
* @author <NAME>
* @copyright MIT License
* @brief Implementing the publisher
* This demonstrates the simple sending of messages over the ROS system.
*/
/**
*MIT License
*Copyright (c) 2020 <NAME>
*Permission is hereby granted, free of charge, to any person obtaining a copy
*of this ... |
// Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
// Implement the LRUCache class:
// LRUCache(int capacity) Initialize the LRU cache with positive size capacity.
// int get(int key) Return the value of the key if the key exists, otherwise return -1.
// void put(int key... |
// Copyright (c) 2019-2020 LG Electronics, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 100001;
long long n, m, s, t, k, x, y, ww, cnt, fa[maxn];
struct Edge
{
int cur, h[maxn * 2], nxt[maxn * 2], p[maxn * 2], w[maxn * 2];
void add_edge(int x, int y, int z)
{
cur++;
nxt[cur] = h[x];
h[x] = cur;
p[cur... |
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#include <cstdlib>
#include <memory.h>
#include <cstring>
#include "glob... |
// Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <cassert>
#include <memory>
// forward declarations
template<typename T_VKTYPE> class MemoryVmaAllocatedBuffer;
/// Wraps the VMA VmaAllocation handle. Represents an allocatio... |
#include <array>
#include <get_input_from_user.h>
#include <iostream>
#include <list>
#include <random>
#include <string>
std::array wordsList = {
"engrenage", "ecrevice", "voyage", "celeri", "pain",
"housse", "mdrtutrouveraspas", "publicite", "brrrrrr", "bravo"};
int rand2(int min, int max) {... |
#ifndef _WIN32
#include <sys/time.h>
#endif
#include <yangutil/yang_unistd.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdarg.h>
#include <openssl/dh.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/ssl.h>
#include <yangrtp/YangRtpConstant.h>
#include <yangutil/sys/YangSsrc.h>
uint64... |
/// Solution log class methods.
#include "search.hpp"
/**
Solution log constructor reads the solution log file into the solution log unordered map.
Requires a boolean argument to specify whether to begin by loading the existing log files. If true, the existing
solution log is loaded. If false, the existing log file ... |
#include <regex>
#include <queue>
#include <valkyrie/graphics/pipeline_initializer.h>
using namespace Valkyrie;
using namespace Graphics;
void PipelineShadersInitializer::initializeShaders(const std::string& filepath, Graphics::Pipeline& pipeline) {
std::ifstream file(filepath);
if (!file.is_open()) {
... |
#include "config.h"
#include <torch/torch.h>
#include <cstring>
#include <iostream>
torch::Device cfg::device = torch::kCPU;
int cfg::min_n;
int cfg::max_n;
int cfg::batch_size;
float cfg::batch_times;
int cfg::initial_phase_len;
float cfg::alpha;
float cfg::beta;
int cfg::use_sigmoid;
float cfg::dirichlet_alpha;
fl... |
#include <iostream>
#include <chrono>
#include <thread>
#include <cstring>
#include <windows.h>
#include "ProcessingUnits/CPU.hpp"
#include "LCD/LCDSFML.hpp"
#include "Joypad/SfmlKeyboardJoypadEmulator.hpp"
#include "debugger/debugger.hpp"
#include "CableLink/BgbProtocolNetworkInterface.hpp"
#ifdef __GNUG__
#include <... |
/*
* graph_demo.cpp
*
* Created on: Mar 30, 2016
* Author: rdu
*
* Description: demo on how to create a graph and perform A* search on the graph.
*
*/
// standard libaray
#include <iostream>
#include <vector>
#include <ctime>
#include <memory>
// user
#include "graph/graph.hpp"
using namespace rdu;
s... |
/****************************************************************************
*
* Copyright (C) 2021 PX4 Development Team. 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. Redistri... |
// ================================== BIT =================================== //
// Project: The C++ Bit Library
// Name: bit.cpp
// Description: Illustrates the use of the bit library
// Creator: <NAME>
// Contributor(s): <NAME> [2015-2017]
// License: BSD 3-Clause License
// ==... |
/*
* Copyright (c) 2008, <NAME>
* All rights reserved.
*
*/
// Pseudo random number generator 'ran1' used in the stimulation program.
#include <mex.h>
#include <memory.h>
const long NTAB = 32;
// seed also contains 'static' variables used in 'ran1'
struct Seed
{
long idum;
long iy;
long iv[NTAB];
Seed()
... |
#include "../include/platform.h"
#include "../include/constants.h"
#include "../include/globalCtx.h"
#include "../include/solidUtils.h"
#include <cstdio>
extern GlobalCtx* context;
Platform::Platform(float x, float y, float w, float h, PlatformType type,
pivotPosition pivot) {
this->position = ... |
#include "midifilewriter.h"
#include <QDebug>
#include "helperfunctions.h"
#include "math.h"
const char * const MidiFileWriter::headerTag = "MThd";
const char * const MidiFileWriter::trackTag = "MTrk";
const int MidiFileWriter::firstTrackSizePos = 18;
quint8 MidiFileWriter::defaultDrumNote = 37; //side stick
MidiFi... |
// Copyright (c) 2014, Sailing Lab
// 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 list of conditions an... |
#include "SDemo.h"
#include "Map.h"
#include "Model.h"
#define MATH_PI 3.14159265359f
#define MATH_RADIAN(d) (d * (MATH_PI / 180.0f))
void SDemo::init()
{
m_Pos = XMVectorSet(0.0f, 2.0f, 0.0f, 0.0f);
m_Pro = XMMatrixPerspectiveFovLH(MATH_RADIAN(45.0f), ((float)D3D_XSCREEN
/ (float)D3D_YSCREEN), 0.1f, 1... |
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2024-08-24
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... |
#include "multi_scale_aff.hxx"
#include <unordered_map>
#include <array>
#include <vector>
typedef std::array<size_t, 3> shape;
typedef std::array<size_t, 4> aff_shape;
typedef std::unordered_map<int,double> histogram;
size_t get_strided_idx(const int coord_ax0, const int coord_ax1, const int coord_ax2, const shape &... |
#include <tuple>
#include "mozart.hh"
#include <gtest/gtest.h>
#include "testutils.hh"
using namespace mozart;
std::string intToString(nativeint value) {
std::stringstream stream;
stream << value;
return stream.str();
}
class VirtualStringTest : public MozartTest {
protected:
UnstableNode testNodes[26];
st... |
// SPDX-License-Identifier: BSD-2-Clause
#include "RandomSet.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <sys/time.h>
// Number of nodes and edges
uint32_t numNodes;
uint32_t numEdges;
// Mapping from node id to array of neighbouring node ids
// Firs... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "DragSelectPlayerController.h"
#include "DrawDebugHelpers.h"
#include "Kismet/GameplayStatics.h"
#include "SelectionBoxFunctionLibrary.h"
ADragSelectPlayerController::ADragSelectPlayerController()
{
PrimaryActorTick.bCanEverTick... |
#include <iostream>
#include <GitVersion.h>
#include "emmintrin.h"
#include "include/perf.h"
#include <sys/stat.h>
#include <string>
#include <unistd.h>
#include <utils/BMPImage.h>
#include <encoder/Encoder.h>
#include <decoder/Decoder.h>
using namespace std;
inline bool exists_image(const std::string& name) {
stru... |
#include "SortedSumTree.h"
#include "Statistics.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <ext/numeric>
using namespace std;
sst::SortedSumTree::SortedSumTree(vector< vector< int> > data, bool debug) :
_data(data) {
// initialize the mapping with the right number of rows
_mapOfNewColI... |
/*
* systems.cpp
*/
#include <SFML/Graphics.hpp>
#include <iostream>
#include "ecs.h"
#include "systems.h"
#include "console.h"
#include "gui.h"
#include "fov.h"
extern std::unique_ptr<GUI> gui;
extern std::unique_ptr<World> world;
extern std::shared_ptr<Console> mapConsole;
extern u64 playerID;
extern sf::Render... |
#include "../base/system.hh"
#include "../base/format.hh"
#include "adhesion.hh"
#include "velocity.hh"
#include "ply_writer.hh"
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
using namespace System;
using namespace Conan;
template <unsigned R>
ptr<Adhesion<R>> make_adhesion(Header cons... |
// modified tree -- format and implement level-order traversal
#include <iostream>
class Tree {
private:
struct Node {
int value;
Node *left{nullptr};
Node *right{nullptr};
};
Node *m_root{nullptr};
public:
explicit Tree() = default;
~Tree() = default; // is this okay?
voi... |
/* Copyright (c) Stanford University, The Regents of the University of
* California, and others.
*
* All Rights Reserved.
*
* See Copyright-SimVascular.txt for additional details.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated doc... |
#include <cstdint>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include "metropolis.h"
#include "unif.h"
#include "se.h"
std::vector<double> Metropolis::update_spectrum_by_new_mass(pcg_extras::seed_seq_from<std::random_device>& rd, const std::vector<double> &mass_) {
// std::cout << "rule_size... |
#include <vector>
#include <iostream>
#include <amgcl/backend/builtin.hpp>
#include <amgcl/value_type/static_matrix.hpp>
#include <amgcl/adapter/crs_tuple.hpp>
#include <amgcl/adapter/block_matrix.hpp>
#include <amgcl/mpi/distributed_matrix.hpp>
#include <amgcl/mpi/make_solver.hpp>
#include <amgcl/mpi/amg.hpp>
#inclu... |
//#include "redisConnector.h"
#include "configLoad.h"
#include "Hiredis.h"
#include "ZLibString.h"
#include "base/log/Logging.h"
#include "netLayer/event/eventloop/EventLoop.h"
#include <string>
#include <sys/stat.h>
#include <cerrno>
#include <cstdio>
using namespace muduo;
using namespace muduo::net;
std::unordered... |
#include <Atlas.h>
#include "imgui/imgui.h"
#include <glm/gtc/matrix_transform.hpp>
class ExampleLayer : public Atlas::Layer
{
public:
ExampleLayer()
: Layer("Example"), m_Camera(-1.6f, 1.6f, -0.9f, 0.9f), m_CameraPosition(0.0f)
{
vertexArray.reset(Atlas::VertexArray::Create());
float vertices[3 * 7] = {... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <vector>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <dirent.h>
#include "ins_nnie_interface.h"
#include "Tensor.h"
#... |
#include "exp_cuda_compression.h"
#include "compressor_cuda_bitreducer.h"
#include "utils.h"
#include "timer.h"
#include <chrono>
#include <thread>
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <string>
//#include <cuda.h>
#include <cuda_runtime.h>
Exp_Cuda_Compression::Exp_Cu... |
/* SYNAK NETWORK LIBRARY - <NAME>
* https://github.com/PhilJbt/Synak/
* Master Server
* main.cpp
*/
#include <network layer/synak.h>
#include <master server/synak_masterserver.h>
#include <master server/synak_masterserver_define.h>
#define TYPEFORVARIANT uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, in... |
// license:BSD-3-Clause
// copyright-holders:AJR
/***************************************************************************
DEC RX01 microcode disassembler
***************************************************************************/
#include "emu.h"
#include "rx01dasm.h"
rx01_disassembler::rx01_disassembler()... |
#include "GeometryTute.h"
#include <gl_core_4_4.h>
#include <GLFW\glfw3.h>
#include <Gizmos.h>
using glm::vec3;
using glm::vec4;
using glm::mat4;
struct Vertex
{
vec4 position;
vec4 colour;
};
GeometryTute::~GeometryTute()
{
}
void GeometryTute::GenerateGrid(unsigned int rows, unsigned int cols)
{
//Creates an... |
#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <map>
#include <sstream>
#include <sys/stat.h>
std::ofstream resources_cpp, resources_h;
std::stringstream resources_array;
void load(std::string file);
void write(std::string file, int size, char *data);
const char * love_header = ""
"/**\n"
"* Copyrigh... |
/* This file is part of nSkinz by namazso, licensed under the MIT license:
*
* MIT License
*
* Copyright (c) namazso 2018
*
* 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... |
/* ====================================================================
* The Vovida Software License, Version 1.0
*
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following... |
/*
* ARC++
*
* Copyright (c) 2007-2008 <NAME>.
*
* Licensed under the New BSD License.
*
*/
#include "universal_include.h"
#include "collide.h"
/*returns maximum or minimum of number*/
#define SDL_COLLIDE_MAX(a,b) ((a > b) ? a : b)
#define SDL_COLLIDE_MIN(a,b) ((a < b) ? a : b)
#if 0
/*
SDL surfa... |
#include "stdafx.h"
#include "qit.h"
#include "FermiFunc.h"
#define SQRT_PI 1.7724538509055160272981674833411
CQit::CQit(float aDit, float aS, bool ais_el_trap, bool ais_n_type,
float Eg, float aNc, float aNv, float avth) :
Dit(aDit/L0/N0), is_el_trap(ais_el_trap), is_n_type(ais_n_type),
Ec(Eg/2), ... |
// View.cpp : implementation of the CView class
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "resource.h"
#include "View.h"
CView::CView()
{
bPaused = true;
iFrame = 0;
rate = 0.02;
particleSize = 18;
nParticles = 40;
xShift = 30.0;
xSpa... |
#include "proximalBAQP.hpp"
using namespace std;
proximalQPModel::proximalQPModel(int nvar1, bundle_t const &cuts, vector<vector<double> > const &proxCenter, double tau) :
nvar1(nvar1), cuts(cuts), proxCenter(proxCenter), tau(tau) {}
vector<double> proximalQPModel::getFirstStageColLB() {
// y free
return vector... |
#include "historyservice.h"
#include "irequest.h"
#include "isession.h"
#include "irequest.h"
#include "irouter.h"
#include "iproxyconnection.h"
#include "idatabaseselectquery.h"
#include "idatabaseselectquerywheregroup.h"
#include "idatabaseupdatequery.h"
#include <QSqlQuery>
#include <QSqlRecord>
#include <QDateTim... |
/***************************************************************************
qgsgeometryduplicatecheck.cpp
---------------------
begin : September 2015
copyright : (C) 2014 by <NAME> / Sourcepole AG
email : <EMAIL>
*******************************************... |
#include "network.h"
#include <iostream>
#include <vector>
#include <random>
#include <bits/stdc++.h>
const int field_height = 20 + 2;
const int field_width = 20 + 2;
int step;
int field[field_width][field_height] = {0};
double surroundings[4] = {0};
int position[2] = {1, 1};
std::vector<std::vector<int>> snake;
e... |
/*******************************************************************************
* Copyright 2010 Telecom Italia SpA
*
* 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://... |
/*
* Copyright (c) 2007, Laminar Research.
*
* 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, ... |
#include "asw_random_missions.h"
#include "MapLayout.h"
#include "LevelTheme.h"
#include "TileGenDialog.h"
#include "filesystem.h"
#include "Room.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
CASW_Random_Missions::CASW_Random_Missions() :
m_pCurrentMapLayout( NU... |
#if defined(_MSC_VER)
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <cstdio>
#include "../utilities/StrHelper.h"
#include "FileStream.h"
using namespace std;
using namespace common_lib::utilities;
using namespace common_lib::io;
static inline FILE *FP(void *fp) {
return static_cast<FILE *>(fp);
}
static inli... |
#include "parser.hpp"
#include <cassert>
#include <iostream>
#include <typeindex>
static void printSpaces(int n) {
for (int i = 0; i < n; i++)
std::cout << " ";
}
static void printErr(const char *msg, char *expr, int pos) {
std::cout << msg << "\n" << expr << std::endl;
printSpaces(pos);
std::... |
/* This file is part of Into.
* Copyright (C) Intopii 2013.
* All rights reserved.
*
* Licensees holding a commercial Into license may use this file in
* accordance with the commercial license agreement. Please see
* LICENSE.commercial for commercial licensing terms.
*
* Alternatively, this file may be used und... |
/*
* Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.
*/
#in... |
#include "curve.h"
#include <memory>
#include "sockets.h"
#include "util_enum.h"
#include "util_hermite_spline.h"
cse::CurveEvaluator::CurveEvaluator(CurveSocketValue* const curve_socket_val, const int segments)
{
const std::vector<Float2>& curve_control_points = curve_socket_val->curve_points;
// No points, in t... |
// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000-2002. All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement. The various license ag... |
/*=========================================================================
*
* Copyright SINAPSE: Scalable Informatics for Neuroscience, Processing and Software Engineering
* The University of Iowa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file excep... |
#include <common/omp_utils.hpp>
#include "sequences/contigs.hpp"
#include "common/rolling_hash.hpp"
struct RawSeg {
std::string id;
size_t left;
size_t right;
RawSeg(std::string id, size_t left, size_t right) : id(std::move(id)), left(left), right(right) {}
bool operator<(const RawSeg &other) cons... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.