text stringlengths 3.08k 12.5k |
|---|
/* soundfile.cc: Convert audio files (wav, voc, etc.) to lists of pulses
Copyright (c) 2007-2008 <NAME>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or... |
//========= Copyright 1996-2006, Valve Corporation, All rights reserved. ============//
//
// Purpose: VPC
//
//=====================================================================================//
#include "vpc.h"
void CVPC::SetMacro( const char *pName, const char *pValue, bool bSetupDefineInProjectFile )
{
// Se... |
/* -*- c-file-style: "bsd"; c-basic-offset: 2; indent-tabs-mode: nil -*- */
#include "SingleSiteScattering.hpp"
extern "C"
{
void trltog_(int *, int *, Complex *, Complex *, Complex *, Complex *, Complex *);
void gjinv_(Complex *a, int *n, int *nmax, Complex *detl);
void tripmt_(Complex *u, Complex *b, Complex *... |
#pragma once
#include <string>
#include <vector>
#include <iostream>
#include <tuple>
#include <algorithm>
#include <random>
#include <chrono>
#include "sgct/log.h"
#include "gameobject.hpp"
#include "geometryhandler.hpp"
#include "balljointconstraint.hpp"
//POD struct to encode/decode game state data
//Ctor, initi... |
//
// Copyright (c) 2020, <NAME>, all rights reserved.
//
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree.
#pragma once
#include "videoinput.hpp"
#include <opencv2/opencv.hpp>
class VrImageLayout
{
public:
int numImgsX = 0;
int num... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright 1991- The GROMACS Authors
* and the project initiators <NAME>, <NAME> and <NAME>.
* Consult the AUTHORS/COPYING files and https://www.gromacs.org for details.
*
* GROMACS is free software; you can redistribute it and/or
* modify i... |
/*
Copyright (c) 2021,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC. See
the top-level NOTICE for additional details. All rights reserved. SPDX-License-Identifier: BSD-3-Clause
*/
#include "PcapPacketParser.h"
#include <asio.hpp>
#include <cstdio>
#inclu... |
/**
* @file graph-test.cpp
* @author <NAME>
*/
#include <iostream>
#include <numeric>
#include <algorithm>
#include <fstream>
#include <string>
#include <random>
#include "meta.h"
#include "util/progress.h"
#include "graph/undirected_graph.h"
#include "graph/directed_graph.h"
#include "graph/algorithms/algorithms.... |
//= ScanfFormatString.cpp - Analysis of printf format strings --*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------------... |
/*!
* @file DFRobot_Flash_Moudle.h
* @brief 此文件中定义了DFRobot_File基本文件操作类,DFRobot_FlashMoudle flash模块操作类, DFRobot_FlashMoudle_IIC驱动类。
* @details 这是一个文件系统库,专门用来操作DFRobot自制的一款通信接口为I2C的flash Memory Moudle。使用该库,可以用文件的方式对
* @n 该flash存储模块进行操作,你可以直接在该模块上面创建,读,写文件,或者创建目录。此驱动它有以下特点:
* @n 1. 能实现用文件的方式操作特定的存储模块;
* @n 2. 目前只支持短... |
// query.cpp
//
// A shell utility for somewhat emulating the Tracker's "Find By Formula"
// functionality.
//
// by <NAME> (<EMAIL>)
//
// Modified by <NAME> on November 03, 2003
//
// Filtering capability added by <NAME> on January 14, 2005
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd... |
/* Portions copyright (c) 2006-2016 Stanford University and Simbios.
* Contributors: <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 l... |
/*
* Copyright (c) 2006-2007 <NAME> http://www.gphysics.com
*
* 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... |
//
// Application.cpp
// PinkTopaz
//
// Created by <NAME> on 6/25/16.
//
//
#include "pinktopaz_config.h"
#include "FileUtilities.hpp"
#include "RetinaSupport.h"
#include "World.hpp"
#include "WindowSizeChangedEvent.hpp"
#include "KeypressEvent.hpp"
#include "MouseButtonEvent.hpp"
#include "MouseMoveEvent.hpp"
#in... |
// Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
/*****************************************************************************************
* *
* OpenSpace *
* ... |
#include <msxml6.h> // Including MSXML latest version
#include <atlbase.h>
#include "atlstr.h" // Including CString, CStringW and CW2A
#include <iostream> // Including wcout method
#include <string> // Including c_str()method, wcout
#include <direct.h>
#include "comutil.h" // Including _bstr_t
using names... |
/*
* created by xehoth on 01-04-2017
*/
#include <bits/stdc++.h>
inline char read() {
static const int IN_LEN = 1000000;
static char buf[IN_LEN], *s, *t;
if (s == t) {
t = (s = buf) + fread(buf, 1, IN_LEN, stdin);
if (s == t) return -1;
}
return *s++;
}
template <class T>
inline ... |
#include "../1_LSQi/lsq_Layers.h"
#include "File.h"
#include "Disk.h"
#include "Timer.h"
#include <dirent.h>
/* --------------------------------------------------------------- */
/* Constants ----------------------------------------------------- */
/* ---------------------------------------------------------------... |
#include "bflpmc_yche.h"
#include "../util/search_yche.h"
#ifdef VARYING_RMAX
BFLPMC::BFLPMC(string g_name_, GraphYche &g_, double c_, double epsilon_, double delta_, double r_max_) :
g_name(g_name_), g(&g_), c(c_), epsilon(epsilon_), delta(delta_) {
// init the two components
flp = new FLPMC(g_name, ... |
/*
* File: KrakenBattle.cpp
* Author: <NAME>
*
* Created on November 24, 2015
*/
#include "KrakenBattle.h"
#include <algorithm>
#include <iterator>
#include <g3log/g3log.hpp>
namespace {
const std::string emptyUUID = {"00000000-0000-0000-0000-000000000000"};
const std::vector<uint8_t> emptyData = {};
}
... |
#include <regex>
#include <sstream>
#include <unordered_map>
#include <fstream>
#include <stdio.h>
#include "assembler.hpp"
#include "instructions.hpp"
struct Operand {
uint8_t mode;
uint8_t reg;
uint16_t ref;
uint8_t to_bits() {
return (mode << 3) | reg;
}
};
const Operand kLiteralOpera... |
/* Copyright (c) 2020, 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 condi... |
// { dg-do run { target c++11 } }
// Copyright (C) 2011-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 Foundatio... |
#include "ReplUtils.h"
#include "common/util/FileUtil.h"
#include "third-party/replxx/include/replxx.hxx"
#include "common/versions.h"
#include "third-party/fmt/color.h"
#include "third-party/fmt/core.h"
// TODO - expand a list of hints (ie. a hint for defun to show at a glance how to write a function,
// or perhaps,... |
/*
* Copyright (c) 2015 <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, di... |
#include "wand.h"
using namespace std;
/**
* Initializes the WAND object.
* Initializes the InvertedIndex to query from and also the UB
* of each posting list.
*/
WAND::WAND(unordered_map<string, vector<pair<int, int>>> & postingList) {
InvertedIndex = postingList;
//Initialize UB for each term.
for ... |
#include <cerrno>
#include <cstring>
#include <unistd.h>
#include <pthread.h>
#include <csignal>
#include <sys/wait.h>
#include <fcntl.h>
#include <string>
#include <unordered_map>
#include <fstream>
#include "../common/common.h"
// Track Client State
static int _client_is_alive = 0;
static int _client_status = 0;
s... |
#include <iostream>
#include <Windows.h>
#include <cstring>
#include <string>
using namespace std;
string ExePath() {
char buffer[MAX_PATH];
GetModuleFileName(NULL, buffer, MAX_PATH);
string::size_type pos = string(buffer).find_last_of("\\/");
return string(buffer).substr(0, pos);
}
//save text to clipboard
void... |
#include <sys/select.h>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <iostream>
#include <string>
#include <curl/curl.h>
namespace {
[[noreturn]] void error(const char* msg) {
std::cerr << msg << '\n';
std::exit(EXIT_FAILURE);
}
st... |
/*
* Copyright (c) 2013, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
template <typename T>
int bit_length(T n) {
int l = 0;
while (1 << l <= n) ++l;
return l;
}
#include <functional>
template <typename S>
struct Monoid {
private:
using Op = std::function<S(S, S)>;
using Id = std::function<S()>;
public:
Op op;
Id e;
bool commutative;
};
#include <... |
// Include the module header.
#include <BuffPanel/Client.h>
// Include internal headers.
#include <BuffPanel/Version.h>
// Include poco headers.
#include <Poco/Exception.h>
#include <Poco/URI.h>
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/HTTPMessage.h>
#include <Poco/Net/HTTPRequest.h>
#include <Poco... |
#include <queue>
#include <iostream>
#include <sstream>
#include "nfa.h"
#include "utils.cpp"
string error_message = "NFA Creation Error : ";
void verify_state_set(const set<string>& states, const set<string>& state_set) {
set<string>::const_iterator it;
for (it = state_set.begin(); it != state_set.end(); ++... |
#include "radarContainer.h"
#include "graphics-utils.h"
#include "easing-utils.h"
RadarContainer::RadarContainer() {
x = 0;
y = 0;
w = 240;
h = 21*GRID_SIZE;
abs_p = ofPoint(1515, 195);
radar1 = Radar();
radar1.x = abs_p.x;
radar1.y = abs_p.y+1*GRID_SIZE;
radar1.w = w;
radar1.h = 12*GRID_SIZE;
r... |
/*
Copyright (C) <NAME> 2017 (<EMAIL>)
This work is licensed under the:
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
To view a copy of this license, visit:
http://creativecommons.org/licenses/by-nc-sa/4.0/
or send a letter to Creative Commons, PO Box 1866, Mo... |
// ---------------------------------------------------------------------
//
// Copyright (c) 2019 - 2021 by the IBAMR developers
// All rights reserved.
//
// This file is part of IBAMR.
//
// IBAMR is free software and is distributed under the 3-clause BSD
// license. The full text of the license can be found in the f... |
#include <iostream>
#include <fstream>
#include <sys/time.h> //gettimeofday
#include <unistd.h> // UNIX standard function definitions
#include <errno.h> // Error number definitions
#include <termios.h> // POSIX terminal control definitions
#include <sys/ioctl.h>
#include <getopt.h>
#include <stdio.h>
#include ... |
// Copyright (c) 2008 <NAME> <<EMAIL>>
// Copyright (c) 2019 <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, including without limitation the right... |
// Copyright 2020 <NAME>
#include "../../../modules/task_2/chesnokov_a_scatter/scatter.h"
#include <mpi.h>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <utility>
int My_Scatter_By_Tree(const void* sendbuf, int sendcount,
MPI_Datatype sendtype, void* rec... |
/* Copyright � 2007 Apple Inc. All Rights Reserved.
Disclaimer: IMPORTANT: This Apple software is supplied to you by
Apple Inc. ("Apple") in consideration of your agreement to the
following terms, and your use, installation, modification or
redistribution of this Apple software constitutes acceptance of t... |
#include <algorithm>
#include <iostream>
#include <numeric>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using CountingMatrix = std::vector<std::vector<uint32_t> >;
using StepDecisionMatrix = std::vector<std::vector<char> >;
template <typename Matrix>
void WriteMatrix(Ma... |
#include "include/config.hpp"
#include "include/ocr_det.hpp"
#include "include/ocr_rec.hpp"
void PrintUsage(){
std::cout << "Usage:" << std::endl;
std::cout << " <config file path>"<<std::endl
<< "[--only_recog <Specify this option if recognize image patch>]"<<std::endl
<< "--gpu_i... |
#include "renderer.h"
#include <algorithm>
#include <mutex>
#include <optional>
#include <thread>
#include <vector>
#include "camera.h"
#include "material.h"
#include "random.h"
#include "world.h"
class WorkList
{
public:
explicit WorkList(size_t numTasks) : m_numTasks(numTasks), m_nextTask(0) {}
std::optio... |
// Copyright (c) 2020 The Orbit 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 "Path.h"
#include <filesystem>
#include <string>
#include "CoreUtils.h"
#include "OrbitBase/SafeStrerror.h"
#include "absl/flags/flag.h"
#ifd... |
#include "bag_reader.hpp"
#include <ros_utils/data_ros_utils.h>
#include <ros_utils/primitive_ros_utils.h>
#include <ros_utils/mapping_ros_utils.h>
#include <primitive/poly_solver.h>
#include <planner/mp_map_util.h>
using namespace MPL;
std_msgs::Header header_;
ros::Publisher cloud_pub_;
std::vector<ros::Publisher> ... |
#include "GraphMatrix.h"
#include <iostream>
#include <cassert>
using std::cout;
using std::endl;
void test_constructor();
void test_vertex_insert();
void test_vertex_delete();
void test_edge_insert();
int GraphMatrix_test_main(){
cout << "Running tests" << endl;
test_constructor();
test_vertex_insert();
test_ed... |
/**
* @file offb_node.cpp
* @brief Offboard control example node, written with MAVROS version 0.19.x, PX4 Pro Flight
* Stack and tested in Gazebo SITL
*/
#include <iostream>
#include <ros/ros.h>
#include <aruco_msgs/Detector.h>
#include <aruco_msgs/Detector_vel.h>
#include <geometry_msgs/PoseStamped.h>
#include <ge... |
#include "utils.h"
#include "bench.h"
#include <thread>
static const unsigned int MSEC_TO_USEC = 1000;
int* shared_data;
unsigned int N_THREADS = 64;
unsigned int N_BACKOFF = 10;
std::mutex mutex;
std::mutex mutex_heavy;
int CAS_lock_var;
int CAS_lock_var_heavy;
int futex_lock_var;
int futex_lock_var_heavy;
std::th... |
//%Header {
/*****************************************************************************
*
* File: src/Mushcore/MushcoreAutoMonkey.cpp
*
* Author: <NAME> 2002-2005
*
* This file contains original work by <NAME>. The author and his
* employer (Mushware Limited) irrevocably waive all of their copyright rights
... |
#include "PageFrameAllocator.h"
#include "../memory/memory.h"
// Variables are kept up to date to track system memory status
uint64_t free_memory;
uint64_t reserved_memory;
uint64_t used_memory;
bool allocator_initialized = false;
// Globally addressable page frame allocator
PageFrameAllocator GlobalAllocator;
// ... |
/*
Cafu Engine, http://www.cafu.de/
Copyright (c) <NAME> and other contributors.
This project is licensed under the terms of the MIT license.
*/
#include "CompCarriedWeapon.hpp"
#include "../AllComponents.hpp"
#include "../Entity.hpp"
#include "../World.hpp"
#include "UniScriptState.hpp"
extern "C"
{
#include <l... |
// STD
#include <iostream>
#include <vector>
#include <fmt/format.h>
#include "xregProgOptUtils.h"
#include "xregFCSVUtils.h"
#include "xregITKIOUtils.h"
#include "xregITKLabelUtils.h"
#include "xregLandmarkMapUtils.h"
#include "xregAnatCoordFrames.h"
#include "xregH5ProjDataIO.h"
#include "xregRayCastProgOpts.h"
#i... |
// File: UserCountSuggestion.cpp
// Copyright: Copyright(C) 2013-2017 Wuhan KOTEI Informatics Co., Ltd. All rights reserved.
// Website: http://www.nuiengine.com
// Description: This code is part of NPlan Project (Powered by NUI Engine)
// Comments:
// Rev: 1
// Created: 2018/8/2... |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <string>
#include <time.h>
#include <CL/cl.h>
#include <exception>
#include <functional>
using namespace std;
static void checkResult(const cl_int code, const string &method,
function<bool()> hook = []{ return f... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <queue>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <stack>
#include <utility>
#include <v... |
#include <stdio.h>
#include "noiseReduction.h"
#include "waveFilter.h"
#include "vitalmonitor.h"
#include "OpenNI.h"
#include "OniSampleUtilities.h"
#include <time.h>
#include <math.h>
#include <ros/ros.h>
#include "std_msgs/Float64.h"
#include "stdint.h"
#define SAMPLE_READ_WAIT_TIMEOUT 2000 //2000ms
... |
#pragma once
#include <cstdint>
#include "..\math\Vector.hpp"
#include "..\misc\bf_write.h"
#define GenDefineVFunc(...) ( this, __VA_ARGS__ ); }
#define VFUNC( index, func, sig ) auto func { return call_virtual< sig >( this, index ) GenDefineVFunc
class CClockDriftMgr {
public:
float m_ClockOffsets[17]; //0x0000... |
// <NAME> @ 2016
#include "ServerConfig.h"
#include "Runtime/Core/Public/HAL/FileManager.h"
#include "Runtime/Core/Public/Misc/ConfigCacheIni.h"
#include "Runtime/Core/Public/Misc/CommandLine.h"
#include "Modules/ModuleManager.h"
#include "AssetRegistryModule.h"
#include "UnrealcvLog.h"
// TODO: Try to simplify th... |
// Standard library includes
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <iterator>
#include <map>
// Out project headers
#include "PlayfairCipher.hpp"
PlayfairCipher::PlayfairCipher( const std::string& key )
: key_{""},
charLookup_{},
coordLookup_{}
{
setKey(key)... |
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <map>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <set>
using namespace std;
const string error = "Wrong date format: ";
class Date {
public:
void SetYear(int y) {
year = y;
}
int GetYear() const {
retu... |
//**.****|****.****|****.****|****.****|****.****|****.****|****.****|****.****|
// * He_to_H_CS.cc * galprop package * 4/14/2000
//**"****!****"****!****"****!****"****!****"****!****"****!****"****!****"****|
//**.****|****.****|****.****|****.****|****.****|****.****|****.****|****.**... |
/*
ZBreakout Project
Copyright (c) 2018 <NAME> (Telegram @MrOnlineCoder | github.com/MrOnlineCoder | <EMAIL>)
All rights reserved.
Only original author is allowed to edit and share this file.
Unauthorized copying or editing this file, via any medium is strictly prohibited
Proprietary and confidential
*/
#include "As... |
/**
MIT License
Copyright (c) 2017 mpomaranski at gmail
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... |
#include <ros/ros.h>
#include <tf/transform_listener.h>
#include <geometry_msgs/Twist.h>
#include <sensor_msgs/PointCloud.h>
#include <pcl/ModelCoefficients.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/features/nor... |
#include<windows.h>
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
int c1=0,c2=0;
float m,c,y,x;
float pts[4],bdr[4];
void disply1()
{
glColor3f(0,1,0);
glBegin(GL_LINES);
glVertex2f(-200,0);
glVertex2f(200,0);
glVertex2f(0,200);
glVertex2f(0,-200);
glEnd();
glColor3f(1,0,0... |
// -*- C++ -*-
//
// Package: Calibration/HcalAlCaRecoProducers/AlCaGammaJetSelector
// Class: AlCaGammaJetSelector
//
/**\class AlCaGammaJetSelector AlCaGammaJetSelector.cc Calibration/HcalAlCaRecoProducers/AlCaGammaJetSelector/src/AlCaGammaJetSelector.cc
Description: Enable filtering of good events based on... |
#include <iostream>
#include <windows.h>
#include <cstdio>
#include <conio.h>
#include <string>
#include "game.h"
#include "point.h"
#include "cursor.h"
#include "option.h"
#include "snake.h"
#include "food.h"
////////////////////////////////////////////////////////////////////////////////
using std::cin;
using std::c... |
#include <portability.h>
/////////////////////////////////////////////////////////////////
// XMLListener class file.
//
// Author: <NAME>, www.threepenny.net
// Date : May 2005
//
// This class's HandleEvent method is called when
// specific events occur within the agent:
//
/*
* smlEVENT_XML_TRACE_OUTPUT
*/
/... |
#ifdef ESP8266
#include <ESP8266mDNS.h> // Include the mDNS library
#elif defined(ESP32)
#include <ESPmDNS.h>
#endif
#include "../../config.h"
#include "../../sigksens.h"
#include "../services/signalK.h"
#include "webSocket.h"
#ifdef ENABLE_WEBSOCKET_SERVER
WebSocketsServer webSocketServer = WebSockets... |
/**
* @file Common.cpp
* @author WUZHUOBIN <EMAIL>
* @since Mar.29.2020
* @version 1.0
* @copyright WUZHUOBIN All rights reserved.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without e... |
#include "State.h"
#include "ShutDownState.h"
#include "AgreementState.h"
#include "FlashingState.h"
BaseState* BaseState::forcedNextState = 0;
BaseState* BaseState::logicStep() {
if (digitalRead(PIN_SWITCH) == HIGH) {
// The switch is off, we want to get to off
return &ShutDownState::INSTANCE;
}
if(fo... |
#include "SPImain.hpp"
// include tests.hpp if running the tests function that tests all the functionality of the SPI classes
#include "tests.hpp"
static char help[] = "SPI class to wrap PETSc Mat variables \n\n";
int main(int argc, char **args){
PetscErrorCode ierr;
std::cout<<"-----------------Petsc Slepc ... |
// Client.c
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include<bits/stdc++.h>
#include <arpa/inet.h>
#define MAXIN 50
#define MAXOUT 20
#define HEADERTYPE 12
#define HEADERLEN 4
using namespace std;
bool flag =... |
#include <iostream>
#include <stack>
#include <queue>
#include <string>
#include <sstream>
#include <cstdio>
using namespace std;
int countsign(string str);
double converttonum(string str);
double solve_signs(stack <char> signs,stack <double> Nums);
double calculate_pure_str(string Input);
string c... |
/*
* Copyright 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 condi... |
// This is the answer to ex4
#include <iomanip>
#include "systemc"
using namespace sc_core;
using namespace sc_dt;
using namespace std;
#include "tlm.h"
#include "../common/mm.h"
// Initiator module generating generic payload transactions
struct Initiator: sc_module, tlm::tlm_bw_transport_if<>
{
// TLM-2 sock... |
/*
* Copyright (c) 2008-2011, <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT... |
#include <optional>
#include <string_view>
#include <thread>
#include "partition_map.h"
#include "state.h"
#include "score.h"
#include "absl/container/flat_hash_set.h"
#include "absl/synchronization/mutex.h"
using namespace wordle;
// low_len and high_len are inclusive
void concoct(int num_threads, int low_len, int ... |
#include "parametrization/parametrization.hpp"
#include <vector>
#include <cmath>
#include <chrono>
#include <Eigen/IterativeLinearSolvers>
using namespace Eigen;
using namespace std;
typedef Triplet<double> Td;
vector<MatrixXd> parametrize(vector<const MatrixXd*> &Vs, vector<const MatrixXi*> &Ts) {
cout << "Star... |
/******************************************************************************
/ MarkerList.cpp
/
/ Copyright (c) 2011 <NAME> (SWS)
/
/
/ 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 withou... |
#include "mbed.h"
#include "suli2.h"
#include "grove_barometer_class.h"
#include "grove_digital_light_class.h"
#include "grove_accelerometer_class.h"
#include "grove_compass_class.h"
#include "grove_gyroscope_class.h"
#include "grove_fingerprint_class.h"
#include "grove_heartrate_class.h"
#include "grove_temp_hum_clas... |
// ---------------------------------------------------------------------------
//
// The general purpose cross platform C/C++ framework
//
// S x A c c e l e r a t e
//
// Home: https://www.sxlib.de
// License: Apache 2
// Authors: see src/AUTHOR... |
/*
* Copyright (c) 2011-2013 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
* libbitcoin is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License with
* additional permissions to the one published by the Free Software
* Fou... |
//////////////////////////////////////////////////////////////////////////
// Description: this is the base implementation of a simple maze router
// Author: n+e
// Date: 20170429
//////////////////////////////////////////////////////////////////////////
#include <cstdio>
#include "BaseRouter.h"
const int X[4]... |
// Copyright 2019 <NAME>, <EMAIL>.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
//
// GUI.cpp
// Air Tycoon (Summative)
//
// Created by - on 2017/04/24.
// Copyright © 2017 <NAME> the House of Ren. All rights reserved.
//
#include "GUI.hpp"
#include <string>
#include <iostream>
GUI::GUI() {
}
//void GUI::setConstants() {
// //Attendant e;
// cout << "Please enter the amount of c... |
/* Copyright (C) 2020 ATHENA AUTHORS;
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law... |
#include <iostream>
#include <array>
#include <cassert>
#include <cstring> // strcmp()
#define CONCAT2(x, y) x##y
#define CHAR_CONST_PTR(x) struct CONCAT2(_, x) \
{ \
constexpr static auto value() {return #x;} \
}
namespace cormen
{
template <class S... |
//---------------------------------------------------------------------------//
//!
//! \file tstBasicComptonProfileSubshellConverter.cpp
//! \author <NAME>
//! \brief Basic Compton profile subshell converter unit tests
//!
//---------------------------------------------------------------------------//
// Std Lib I... |
/********************************************************************
* AUTHORS: <NAME>, <NAME>
*
* BEGIN DATE: Augq, 2010
*
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,... |
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
#include "globals.h"
#include "vehiclestructure.h"
#include "vehicleupdate.h"
/* is this used any more?
float GetLimbAngleXEx ( int iID, int iLimbID )
{
sObject* pObject = PhysX::GetObject ( iID );
sFrame* pFrame = pObject->ppFrameList [ iLimbID ];
//UpdateRealtimeFrameVectors ( pObject, pFrame );
return pFrame->... |
#include "Icosahedron.h"
#include <iterator>
#include <algorithm>
#include <glbinding/gl/enum.h>
#include <glbinding/gl/functions.h>
#include <glm/glm.hpp>
#include <globjects/VertexArray.h>
#include <globjects/VertexAttributeBinding.h>
#include <globjects/Buffer.h>
using namespace gl;
using names... |
//
// Created by joey on 8/23/16.
//
#include "IMU.h"
// Accelerometer Object and attributes
LSM9DS1 mpu;
IMU::IMU() {
// Initialize class attributes
_rawAx = 0;
_rawAy = 0;
_rawAz = 0;
_rawGx = 0;
_rawGy = 0;
_rawGz = 0;
_rawMx = 0;
_rawMy = 0;
_rawMz = 0;
_ax = 0;
... |
/*
* ssl-client.cpp
*
* Created on: Dec 10, 2015
* Author: zmij
*/
#include <iostream>
#include <string>
#include <functional>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include <boost/program_options.hpp>
enum { max_length = 1024 };
class client {
public:
typedef boost::asio::ssl::stream... |
/*
* Gamedev Framework (gf)
* Copyright (C) 2016-2022 <NAME>
*
* 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 pu... |
#include <SFML/GRAPHICS.hpp>
#include <cstdlib>
#include <ctime>
#include <iostream>
using namespace sf;
void createMapOfCells(int arrOfCubes[82][122]) {
srand(time(NULL));
for(int i = 1; i < 81; i ++) {
for(int j = 1; j < 121; j ++) {
arrOfCubes[i][j] = rand() % 3 + 1;
}
}
}
... |
#include <windows.h>
#include <stdlib.h>
#include <GL/glut.h>
#include<string.h>
#include<iostream>
//GLfloat rotation = 90.0;
int posX = 70, posY = -120, posZ = 0;
int goal = 0;
int dartX = -150, dartY = 30;
int width = 120, height = 130;
int mousewidth = 25, mouseheight = 25;
int dartX1 = -130, dar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.