text stringlengths 3.08k 12.5k |
|---|
#include <Components/UISound.h>
#include "Customs/MainScene.h"
MainScene::MainScene() {}
void MainScene::OnActivation() {
m_width_middle = EngineGlobals::screen_width / 2;
m_height_middle = EngineGlobals::screen_height / 2;
CreatePlayButton();
CreateQuitButton();
CreateBackground();
CreateGamemodes();
... |
/* Copyright (c) <2009> <Newton Game Dynamics>
*
* 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 software.
*
* Permission is granted to anyone to use this software for any purpose,
* inclu... |
#include <QHostAddress>
#include <QMessageBox>
#include <QDateTime>
#include <QTimer>
#include <QFileDialog>
#include <QFileInfo>
#include <QTimer>
#include "myheaders.h"
#include "server/serverwidget.h"
#include "ui_serverwidget.h"
ServerWidget::ServerWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Se... |
/*
* Copyright (c) 2018 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribut... |
#include <ros/ros.h>
#include <serial/serial.h>
#include <sensor_msgs/Imu.h>
#include <sensor_msgs/MagneticField.h>
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <tf/tf.h>
using namespace std;
#include "FDILink.h"
#include "fdilink_decode.h"
#include "CRC_Table.c"
#include "FDILink.c"
//static... |
/***************************************************************************************
*** ***
*** Copyright (c) 2019, <NAME>, Inc. ***
*** ... |
/*-----------------------------------------------------------------------
<NAME> 2020
http://trederia.blogspot.com
crogine application - 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 so... |
#include <cstring>
#include <iostream>
#include <iomanip>
#include <thread>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include "GasmeterSerial.h"
#include "GasmeterEnums.h"
GasmeterSerial::GasmeterSerial(const unsigned char &log) : Log(log)
{
}
GasmeterSerial::~GasmeterSerial(void)
{
if (SerialP... |
/*
* Fledge HTTP Sender implementation using the
* HTTPS Simple Web Server library
*
* Copyright (c) 2018 Dianomic Systems
*
* Released under the Apache 2.0 Licence
*
* Author: <NAME>, <NAME>
*/
#include <simple_https.h>
#include <thread>
#include <logger.h>
#include <unistd.h>
#define VERBOSE_LOG 0
using n... |
/*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... |
/*
<NAME>i @nguyenvanhieuvn
Thực hành nhiều bài tập hơn tại https://luyencode.net/
*/
#include<iostream>
#include<cmath>
using namespace std;
const int NoSolution = 0, Undetermined = -1;
int EqualDeg1(double a, double b, double &x) // Phương trình bậc 1
{
int nSolution1; ... |
#include "threads.h"
#include <algorithm>
#define TASKQUEUE_HEAD 0x00010000
#define TASKQUEUE_HEAD_NOWORK 0x0000fffe
#define TASKQUEUE_HEAD_KILL 0x80000000
#define TASKQUEUE_SLICE_NEXT_TASK -1
bool slice_task_c::done() {
if (owner)
return owner->slice_done();
return false;
... |
#include "AttysComm.h"
#include <assert.h>
#include <chrono>
#include <thread>
void AttysComm::connect() {
if (btAddr == NULL) throw "Bluetooth structure is NULL";
if (btAddrLen == 0) throw "Bluetooth structure length is zero.";
// allocate a socket
#ifdef __linux__
btsocket = socket(AF_BLUETOOTH, SOCK_STREAM,... |
// Push relabel in O(V^2 E^0.5) with gap heuristic
// It's quite fast
template<typename flow_t = long long>
struct PushRelabel {
struct Edge {
int to, rev;
flow_t f, c;
};
vector<vector<Edge> > G;
vector<flow_t> ec;
vector<Edge*> cur;
vector<vector<int> > hs;
vector<int> H;
... |
//nom_to_ord.cpp - preprocessing of nominals.
//Levels are sorted by average value of response and then converted to ordinals
//nom_levels - aggregating levels with low counts - should be run before nom_to_ord
#pragma warning(disable : 4996) //complaints about strerror function
#include <vector>
#include <string>
#... |
/* 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... |
/* Copyright 1995, 1996 by Abacus Research and
* Development, Inc. All rights reserved.
*/
#include <base/common.h>
#include <QuickDraw.h>
#include <DialogMgr.h>
#include <Iconutil.h>
#include <ControlMgr.h>
#include <dial/itm.h>
#include <quickdraw/cquick.h>
#include <mman/mman.h>
#include <algorithm>
using nam... |
/*
* 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 retain the above copyright notice,
* this list of conditions a... |
// Ex7_05.cpp
// Apply some algorithms to plotting curves
// To get the output with the correct aspect ratio, set the characters
// in the standard output stream destination to a square font, such as 8 x 8 pixels
#include <iostream> // For standard streams
#include <iterator> ... |
/*******************************************************************************
*
* Copyrights <NAME> 2014 <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of ... |
//taskset 0x1 ./sort_test
#include <iostream> /* std::cout */
#include <algorithm> /* std::max */
#include <string> /* std::string */
#include <vector> /* std:vector */
#include <chrono> /* high_r... |
/* Freescale Semiconductor Inc.
* mbed Microcontroller Library
* (c) Copyright 2014 ARM Limited.
*
* 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 w... |
#include "Wrapper_py/Tools/Sequence/Sequence.hpp"
#include <pybind11/functional.h>
#include <functional>
#include <chrono>
namespace py = pybind11;
using namespace py::literals;
using namespace aff3ct;
using namespace aff3ct::module;
using namespace aff3ct::tools;
using namespace aff3ct::wrapper;
Wrapper_Sequence
:... |
#include "state_impl.hpp"
void SignalJammerSelectorState::print(Platform& pfrm, const char* str)
{
const bool bigfont = locale_requires_doublesize_font();
auto margin =
centered_text_margins(pfrm, utf8::len(str) * (bigfont ? 2 : 1));
if (bigfont) {
margin /= 2;
}
FontConfigurati... |
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <vector>
#include <string>
#include <SDL2/SDL.h>
const int SCREEN_SIZE = 400;
const int LINE_SIZE = 10;
int LineDistance(int x, int y, int x2, int y2) {
int a = sqrt(((x2-x)*(x2-x))+((y2-y)*(y2-y)));
return a;
}
int Grid(int a) {
... |
#include <cstdlib>
#include <iostream>
#include <vector>
#include <algorithm>
#include <time.h>
#include "inc/Code.h"
#include "inc/Rule.h"
#include "inc/Silf.h"
#include "inc/Face.h"
using namespace graphite2;
using namespace vm;
typedef Machine::Code Code;
const byte simple_prog[] =
{
PUSH_BYTE, 43,
... |
// BEGIN CUT HERE
#pragma warning(disable:4018) // signed/unsigned mistatch
#pragma warning(disable:4244) // w64 to int cast
#pragma warning(disable:4267) // big to small -- possible loss of data
#pragma warning(disable:4786) // long identifiers
#pragma warning(disable:4800) // forcing int to bool
#pragma wa... |
#include "token_info.hpp"
std::string translate::tk_info(const Token& tk) {
switch (tk.type()) {
case (int)TokenType::ID: return std::string(tk.raw());
case (int)TokenType::LF: return std::string(tk.raw());
case (int)TokenType::LIT_STRING: return "\"" + std::string(tk.raw()) + "\"";
case (int)TokenType... |
#include "tf.h"
IMPL_WRAP(Session);
Session::Session(TF_Session* s) {
session_ = s;
}
Session::~Session() {
if (session_ != nullptr) {
TF_Status* status = TF_NewStatus();
TF_CloseSession(session_, status);
// Result of close is ignored, delete anyway.
TF_DeleteSession(session_, status);
TF_De... |
#include "Util\Intersections.h"
#include "Util/Ray.h"
#include "Math/AABB.h"
#include "Math\peCoordSys.h"
#include "Shapes\Triangle.h"
#include <limits>
bool pe::RayTriangleIntersection(const Ray &ray, const Vertex &v0,
const Vertex &v1, const Vertex &v2,
... |
// Copyright © 2016-2021 <NAME> and <NAME>
//
// This file is part of the vinecopulib library and licensed under the terms of
// the MIT license. For a copy, see the LICENSE file in the root directory of
// vinecopulib or https://vinecopulib.github.io/vinecopulib/.
#pragma once
#include <boost/graph/adjacency_list.hp... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <utility>
#include <functional>
using namespace std;
typedef pair<int, int> pii;
bool a[1001][1001];
int deg[1001];
bool used[1001];
bool ... |
/************************************************************************************
This source file is part of the Theora Video Playback Library
For latest info, see http://libtheoraplayer.sourceforge.net/
*************************************************************************************
Copyright (c) 2008-2014 <... |
#ifndef DUMB_TLSF_ALLOCATOR
#include <stdlib.h>
#define DUMB_TLSF_ALLOCATOR malloc
#endif
#ifndef DUMB_TLSF_DEALLOCATOR
#include <stdlib.h>
static inline void DUMB_TLSF_DEALLOCATOR (void* p, size_t size) { free(p); }
#endif
#ifdef _WIN32
typedef size_t uint;
#else
#include <unistd.h>
#endif
namespace dumb_tlsf_pri... |
#include <iostream>
#include <fstream>
#include <math.h>
//#include "../exercise_cpp/Eigen/Core"
const static int N = 3; // システムの次元
/**
@brief バネマスダンパのパラメータ
*/
struct Param_SpringMassDamperModel {
double m; // 質量
double c; // 摩擦係数
double k; // ばね定数
double g; // 重力加速度
};
/**
@brief PIDの... |
//
// PerformanceTest.cpp - Simple random performance test which can be
// run against the DirectedAcyclicGraph or its boost wrapper
// equivalent. Uses the boost POSIX time library because <ctime.h>
// can't add time intervals.
//
// Copyright (c) 2009 Host<EMAIL>
//
// Distributed under the Boost So... |
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
#include <boost/algorithm/string.hpp>
#include "ScriptReader.h"
void ScriptReader::parseTokens()
{
using namespace std;
head_block_ = new ScriptBlock;
head_block_->name_ = "head_block";
parseTokens(tokens_, head_block_);
... |
// Copyright(c) 2019, Intel Corporation
//
// 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 conditions and the ... |
// -*- C++ -*-
//===----------------------- support/win32/support.h ----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===-------------------------... |
#include <memory>
#include <functional>
// GLM
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/matrix_operation.hpp>
#include "glm/ext.hpp"
#include "Application.h"
int Application::SCREEN_WIDTH = 0;
int Application::SCREEN_HEIGHT = 0;
// Camera
Came... |
auto Program::path(uint id) -> string {
return mediumPaths(id);
}
auto Program::open(uint id, string name, vfs::file::mode mode, bool required) -> vfs::shared::file {
if(id == SFC::ID::System) {
const vector<uint8_t>* embed = nullptr;
if(name == "ipl.rom") embed = &Embed::SuperFamicom::iplrom;
if(name ... |
// Ref: https://unacademy.com/a/free-course-on-segment-trees-new
// Original codes: https://pastebin.com/hsikTRdD
// https://pastebin.com/HenNdx4h
// Raw code of below algorithm: https://pastebin.com/9eJShF82
// Example on how to use it: https://pastebin.com/ZHh28xxM
/********************************... |
#include <algorithm>
#include <fstream>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <boost/bind.hpp>
#include <simpletbl/corpus/BrownCorpusReader.hh>
#include <simpletbl/corpus/Corpus.hh>
#include <simpletbl/corpus/Sentence.hh>
... |
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2018, The TurtleCoin Developers
// Copyright (c) 2018-2019, The BLOC.MONEY Developers
//
// Please see the included LICENSE file for more information.
//
// BLOC is free softwa... |
#include "precomp.h"
#include "zone_architect.h"
#include "zone_map.h"
#include "zone_map_section.h"
//#include "Engine/Server/GameWorld/LibTCOD/mersenne.hpp"
using namespace clan;
/*bool BspTraversalListener::visitNode(TCODBsp *node, void *userData)
{
if ( node->isLeaf() )
{
int x,y,w,h;
int ro... |
#include "geometry.h"
using namespace cv;
void getOrientedVector(const Eigen::Quaternionf &q, cv::Mat_<float> &cvpt)
{
double roll;
double pitch;
double yaw;
// roll (x-axis rotation)
double sinr = +2.0 * (q.w() * q.x() + q.y() * q.z());
double cosr = +1.0 - 2.0 * (q.x() * q.x() + q.y() * q.y(... |
#include "RayTraceRenderContext.h"
//
// Member function definitions
//
RayTraceRenderContext::RayTraceRenderContext(const char* const SAMPLE_NAME, const uint32_t width, const uint32_t height) : m_project_name(SAMPLE_NAME)
{
m_width = width;
m_height = height;
}
void RayTraceRenderContext::setupContext(int usage_r... |
// ToLuaDoxy.cpp
// Implements the main app entrypoint
#include "Globals.h"
#include <fstream>
#include <iostream>
typedef std::vector<AString> AStrings;
class cProcessor
{
public:
cProcessor(const AString & a_FileOut) :
m_Out(a_FileOut.c_str(), std::ios::out),
m_IsInToLua(false),
m_IsInComment(fals... |
#include "message_unit.h"
#include <string>
#include <vector>
#include <xenon/xenon.h>
namespace xn = xenon;
// Call for_each_path and return the number of matches.
static int count_test(xn::message const &m, std::string const &path) {
int found = 0;
xn::for_each_path(m, path, [&](xn::message::const_cursor) {... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
vector<string> a;
vector< vector<int> > children;
vector<string> sol;
void go(int p, const string &cur, bool vert) {
sol.push_bac... |
// Copyright (c) 2015, helo2804. 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 conditions a... |
#include <string>
#include <vector>
#include <memory>
#include <cassert>
#include <algorithm>
#include <gflags/gflags.h>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <opencv2/opencv.hpp>
#include "file_util.h"
#include "time_util.h"
#include "classifier.h"
using namespace std;
using n... |
////////////////////////////////////////////////////////////////////////////
//
// This file is part of RTTeensyLink
//
// Copyright (c) 2015, richards-tech, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"... |
#include "models/stringtablemodel.h"
#include "models/service.h"
StringTableModel::StringTableModel() { }
StringTableModel::StringTableModel(const QStringList& labels)
: headers(labels) { }
StringTableModel::StringTableModel(const QVector< QVector< QString > >& data)
: rows(data) { }
StringTableModel::Strin... |
/* $selId: french.c,v 2.0 1995/10/24 01:13:06 lees Exp $
* Copyright 1993-1995, <NAME>, all rights reserved.
* Permission granted to use, copy, modify, distribute and sell so long as
* the above copyright and this permission statement are retained in all
* copies. THERE IS NO WARRANTY - USE AT YOUR OWN RISK.
*/
... |
#include "asset_manager.h"
#include "../Renderer/shader.h"
#include "ctime"
void AssetManager::x_addAsset(std::shared_ptr<Asset> asset)
{
fileAssets.insert({asset->path, asset});
auto dir = std::make_shared<Dir>();
auto p = asset->path;
dir->path = p.remove_filename();
auto r = dirs.insert({dir->p... |
#include "code.h"
#include <QByteArray>
#include <QRegularExpression>
Code::Code() : type_(TYPE::Empty), padding_(0)
{
}
void Code::code(QString code)
{
code = code.trimmed();
code = code.simplified();
code.replace(" ", " ");
//qDebug() << "simplified code" << code;
QRegularExpression portMoveR... |
/*************************************************************************/
/* Xania (M)ulti(U)ser(D)ungeon server source code */
/* (C) 1995-2020 Xania Development Team */
/* See the header to file: merc.h for original code copyrights */
/* Chat bot ori... |
#include "game.h"
Game::Game(){
this->isOver = false;
this->moves = 0;
this->board = new Board();
this->black = new Player(this->board, 'B');
this->white = new Player(this->board, 'W');
}
Game::~Game(){
delete this->board;
delete this->black ;
delete this->white ;
}
/**
To ... |
//Runtime: 20 ms, faster than 39.60% of C++ online submissions for Reverse Nodes in k-Group.
//Memory Usage: 10.3 MB, less than 16.67% of C++ online submissions for Reverse Nodes in k-Group.
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0),... |
/*
* Copyright 2019 Xilinx 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 agreed to ... |
/**
\file App.cpp
App that allows viewing of 2D and 3D assets
\maintainer <NAME>, http://graphics.cs.williams.edu
\author <NAME> <EMAIL>, <NAME> <EMAIL>, <NAME> <EMAIL>
\created 2007-05-31
\edited 2010-01-04
*/
#include "App.h"
#include "ArticulatedViewer.h"
#include "TextureViewer.h"
#include "FontViewer... |
#define STB_IMAGE_IMPLEMENTATION
#include "include/stb_image.h"
#include "include/image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "include/stb_image_write.h"
#include <iostream>
#include <iomanip>
Image::Image() {
sampling_method_ = Sampling::NEAREST_NEIGHBOR;
width_ = 0;
height_ = 0;
pixels_... |
// Program by <NAME>
// CS265, Grantham University
// Written in C++
// This program generates a cell phone bill based on input from the user. It will utilize the Windows console.
// Program Header Info
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
using namespace std;
//Pro... |
#include "apf_smooth.h"
#include <iostream>
#include <cmath>
// constructors
APFSmoother::APFSmoother(int numParts, unsigned int pathLength, APFResampStyle resampTechnique)
: m_now(0), m_numParts(numParts), m_logLastCondLike(0.0),
m_pathLength(pathLength), m_resampTechnique(resampTechnique) //, m_ESS(m_n... |
#include <Arduino.h>
#include <ArduinoOTA.h>
#include <DNSServer.h>
#include <ESP8266WiFi.h>
#include <ezTime.h>
#include <SPI.h>
#include <ESPAsyncWebServer.h> //Local WebServer used to serve the configuration portal
#include <ESPAsyncWiFiManager.h> //https://github.com/tzapu/WiFiManager WiFi Configuration Magic
#in... |
//
// RemotePhotoTool - remote camera control software
// Copyright (C) 2008-2018 <NAME>
//
/// \file JpegGeoTagger.cpp JPEG Geo-tagger
//
#include "stdafx.h"
#include "JpegGeoTagger.hpp"
#include <ulib/Exception.hpp>
#include <ulib/stream/FileStream.hpp>
#include <ulib/stream/EndianAwareFilter.hpp>
#include "Exif.hpp"... |
#include "model.hpp"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include <iostream>
Model::Model(std::string model_file):loaded(false){
size_t split = model_file.find_last_of('/');
if( split == std::string::npos){
path.clear();
split = 0;
}
else{
split ++;
... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "collectionunittest.hxx"
// ================================================================
class RRNextPrevTest : public UNITTEST
// ================================================================
{
private:
static RR... |
/*
* Copyright (C) 2005-2009 National Association of REALTORS(R)
*
* 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 li... |
/* mbed Microcontroller Library
* Copyright (c) 2006-2014 ARM Limited
*
* 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 re... |
/*****************************************************************************/
/* SOURCE CONTROL VERSIONS */
/*---------------------------------------------------------------------------*/
/* ... |
/*!
\file SharedComputationAnalyzer.cpp
\author <NAME> <<EMAIL>>
\brief Implementation of an analysis tool for shared computation traces
*/
//////////////////////////////////////////////////////////////////////////////////////////////////
#include <traces/interface/SharedComputationAnalyzer.h>
#include <ocelo... |
#include "core.h"
#include "D3D9/d3d9rendertarget.h"
#include "D3D9/d3d9texture.h"
#include "irenderer.h"
/*static*/ D3DFORMAT D3D9RenderTarget::GetD3DFormat(
const ERenderTargetFormat Format) {
switch (Format) {
case ERTF_Unknown:
return D3DFMT_UNKNOWN;
case ERTF_X8R8G8B8:
return D3DFMT_X8R8... |
// ---------------------------------------------------------------------------
//
// The ab-initio based multiscale library
//
// S / P H I / n X
//
// Copyright: Max-Planck-Institute for Iron Research
// 40237 Duesseldorf, Germany
//
// Contact: https://sxlib.mpie.d... |
/**************************************************************
*
* 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 y... |
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* Copyright 2002, Statistics Research, Bell Labs, Lucent Technologies and
* The University of North Carolina at Chapel Hill
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided ... |
#include <iostream>
#include <eigen3/Eigen/Dense>
#include <glpk.h>
#include "equality_polytope.h"
#include "simple_polytope.h"
// Input: The convex polytope Cz <= d, Fz = g.
// Output: A polytope of smaller dimension, defined by inequalities alone,
// where any point inside the polytope can be turned into
// a p... |
/*
* Citybuilding tools: a set of utilities to work with the game files
* Copyright (c) 2017 <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, inc... |
//////////////////////////////////////////////////////////////////////////////
// Copyright 2017-2021 Lawrence Livermore National Security, LLC and other
// UMAP Project Developers. See the top-level LICENSE file for details.
//
// SPDX-License-Identifier: LGPL-2.1-only
/////////////////////////////////////////////////... |
#include "RegistrationFrame.hpp"
#include "NiftiInt.hpp"
#include "OpenCVInt.hpp"
#include "System.hpp"
#include "Measure.hpp"
#include "Global.hpp"
#include <fstream>
#ifdef CUDA_GPU
#include "gpu.h"
#endif
void RegistrationFrame::load(ConfigurationTree conf){
conf.requireFields({"registration"});
_registra... |
#include <stdlib.h>
#include <stdio.h>
#include <cutil.h>
#include <memory.h>
#include <math.h>
#include "PMM.h"
#include "CudaWrapper.h"
int main(int argc, const char** argv)
{
if(argc < 2) //at least a file name is expected
{
usage();
exit(1);
}
CUTBoolean res = cutCheckCmdLineFlag(argc, argv, "niters");
... |
// File Name: F.cpp
// Author: YangYue
// Created Time: Mon Sep 29 00:35:14 2014
//headers
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <ctime>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <iostream>
#include <vec... |
/*
* THIS FILE IS FOR IP FORWARD TEST
*/
#include "sysInclude.h"
#include <map>
using namespace std;
// system support
extern void fwd_LocalRcv(char *pBuffer, int length);
extern void fwd_SendtoLower(char *pBuffer, int length, unsigned int nexthop);
extern void fwd_DiscardPkt(char *pBuffer, int type);
extern unsign... |
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <leveldb/db.h>
#include <string>
using namespace std;
typedef struct WiscKey {
string dir;
leveldb::DB *leveldb;
FILE *logfile;
} WK;
// leveldb 读操作封装
static bool leveldbGet(leveldb::DB *db, string &key, string &value) {
leveldb::Status s = db... |
/*
* Based loosely on I2Cdev by <NAME>, except for all kludgy bit-banging
*/
#include "HamShield_comms.h"
uint8_t ncs_pin = nCS;
uint8_t clk_pin = CLK;
uint8_t dat_pin = DAT;
void HSsetPins(uint8_t ncs, uint8_t clk, uint8_t dat) {
ncs_pin = ncs;
clk_pin = clk;
dat_pin = dat;
#if !defined(ARDUINO)
... |
// B 16/17, Zadaća 2, Zadatak 2
// Autotestovi by <NAME> (<EMAIL> | @eon : etf.ba)
// NAPOMENA: i javni ATo-vi su dio postavke!
#include <iostream>
#include <vector>
#include <deque>
#include <cmath>
#include <type_traits>
#include <iomanip>
#include <stdexcept>
using namespace std;
enum class SmjerKr... |
#include "stdafx.h"
//
// Find and flag periodic telemetry bursts
// <NAME> 05/15/2003.
//
#include "Venus.h"
#include "ImageProcessing.h"
//
// Mask out the periodic telemetry bursts, automatically and manually.
// Carefully salvage partial scan line in first and last line of a burst.
//
#define SHOR... |
#include <opencv2/opencv.hpp>
#include <DBoW3/DBoW3.h>
#include <pybind11/stl.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include "ndarray_converter.h"
namespace py = pybind11;
class Vocabulary
{
public:
Vocabulary(const std::string &path = std::string(), int k = 10, int L = 5,
DBoW3::Weight... |
/**
* @file RWA1Section1RajanPande.cpp
* @author <NAME> (<EMAIL>)
* @brief A programme to fill boxes with parts depending on the given conditions
* @version 0.1
* @date 2021-09-28
*
* @copyright Copyright (c) 2021
*
*/
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
/**
* @brief... |
#include <err.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <iostream>
#include <bragi/helpers-std.hpp>
#include <CLI/App.hpp>
#include <CLI/Formatter.hpp>
#include <CLI/Config.hpp>
#include <frg/span.hpp>
#include <ostrace.bragi.hpp>
enum class ExtractMode {
none,
e... |
#include <chrono>
#include <cstdlib>
#include <stdexcept>
#include <unistd.h>
#include <poll.h>
#include <sys/wait.h>
#include "common.hpp"
#include "logger.hpp"
#include "logreader/utils.hpp"
#include "logreader/file.hpp"
static const bool file_exists(std::string fn) {
if ( FILE *fd = fopen(fn.c_str(), "r")) {
f... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
+---------... |
/* Program that performs ADDDTION,SUBTRACTION, MULTIPLICATION, DIVISION, POWER.
so, we are taking inputs 'a' and 'b' for above operaitions and also given MOD 'm'.
All of them have constraints 1 to 10^50000
Explaining the main points-
1 . For performing DIVISION (a/b) we have to calculate the multiplicative inverse ... |
/* This software and supporting documentation are distributed by
* Institut Federatif de Recherche 49
* CEA/NeuroSpin, Batiment 145,
* 91191 Gif-sur-Yvette cedex
* France
*
* This software is governed by the CeCILL-B license under
* French law and abiding by the rules of distribution of free soft... |
/*
Copyright (c) 2012, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following ... |
/*
* Cerritos
* Copyright 2021 by <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 in the Software without restriction, including without limitation
* the rights to use, copy, modi... |
/******************************************************************************
@File PVRTPFXSemantics.cpp
@Title PFX Semantics
@Version
@Copyright Copyright (c) Imagination Technologies Limited.
@Platform All
@Description A list of supported PFX semantics.
******... |
#include "test.hh"
#include <random>
#include <algorithm>
struct test_event_1
{
int count;
};
struct test_event_2
{
double distance;
};
struct test_event_3
{
int something;
};
struct test_component_tag {};
struct test_component_normal { int a; };
struct test_component_ptr: ptr_component { int a; };
str... |
/*******************************************************************
* File : prophesee_ros_publisher.cpp *
* *
* Copyright: (c) 2015-2019 Prophesee *
*******************************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.