text stringlengths 3.08k 12.5k |
|---|
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <cctype>
#include <algorithm>
using namespace std;
typedef long long lint;
#define ni (next_num<int>())
#define nl (next_num<lint>())
template<class T>inline T next_num(){
T i=0;char c;
while(!isdigit(c=getchar())&&c!='-');
bool fla... |
#include "dumps.h"
#include "solver.h"
dump_manager_class :: dump_manager_class()
{
}
dump_manager_class :: ~dump_manager_class()
{
for (int i=0; i<dumpN; i++) delete (dump_slaves[i]);
free(dump_slaves);
}
dump_manager_class :: dump_manager_class(FILE* optfid)
{
dumpN = load_namedint(optfid, "DUMPS_N", true, 0)... |
#include <assert.h>
#include "stubs.h"
/*******************************************************************************
* Names for some of our resources.
*/
// Names for clist slots
static constexpr uintptr_t
// Where reply keys arrive.
k0 = 0,
// We move reply keys here immediately so they don't get stompe... |
#include "LauncherSystem.h"
void LauncherSystem::Update(){
std::set<Entity*> current_missile=engine_.GetEntityStream().WithTag(Component::Tag::CURRENTMISSILE); // ask for sprites, all entities containing a sprite have to use a scaled bitmap
if (current_missile.empty()){
context_.changing=true;
... |
///////////////////////////////////////////////////////////
// MYTREE Linuxvariante
#include <sys/types.h>
#include <dirent.h>
#include <string>
#include <list>
#include <iostream>
#include <algorithm>
using namespace std;
////////////////////////////////////////////
class Visitor
{
public:
Visi... |
#include "Sandbox2D.h"
#include "imgui/imgui.h"
#include <glm/gtc/type_ptr.hpp>
#include<sstream>
Hazel::Ref<Hazel::Texture2D> logo;
float frametime = 1.f;
Sandbox2D::Sandbox2D()
: Layer("Sandbox2D"), m_CameraController(1280.f / 720.f)
{
}
void Sandbox2D::OnAttach()
{
HZ_PROFILE_FUNCTION();
m_CheckerTexture =... |
/* Copyright 2017-2018 All Rights Reserved.
* <NAME> (<EMAIL>)
*
* [Contact]
* <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/licen... |
// C++ program for the above approach
#include <bits/stdc++.h>
using namespace std;
// AVL tree node
struct AVLwithparent {
struct AVLwithparent* left;
struct AVLwithparent* right;
int key;
struct AVLwithparent* par;
int height;
};
// Function to update the height of
// a node according to its chi... |
// Copyright (c) Team CharLS.
// SPDX-License-Identifier: BSD-3-Clause
#include "pch.h"
#include "util.h"
#include <charls/charls.h>
#include "../src/jpeg_stream_writer.h"
#include "../test/portable_anymap_file.h"
using Microsoft::VisualStudio::CppUnitTestFramework::Assert;
using std::ifstream;
using std::vector;... |
#include "lst_timer.h"
#include "../http/http_conn.h"
time_wheel::time_wheel() : cur_slot(0)
{
for(int i = 0; i < N; i++){
slots[i] = NULL;
}
}
time_wheel::~time_wheel()
{
for(int i = 0; i < N; i++){
util_timer* tmp = slots[i];
while(tmp){
slots[i] = tmp -> next;
... |
#include "Image.h"
#include <IL/il.h>
#include <pthread.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#include <dirent.h>
#include "utils.h"
#include <string.h>
using namespace SNN;
/* wether the image library was allready initialized */
bool Image::initialized = false;
/* synconiz... |
#include <cstring>
#include <chrono>
#include "../Simulation/simulation.hpp"
#include "../Simulation/analysis.hpp"
#include "config_parser.h"
// forward declaration
bool file_exists (const std::string& name);
void read_parameters_from_ini(Param& p, const std::string file_name);
void obtain_equilibrium(simulation& Sim... |
#include "EspNowSerialBase.h"
const char* EspNowSerialBase::NEWLINE = "\r\n";
const uint8_t EspNowSerialBase::BROADCAST_ADDRESS[ESP_NOW_ETH_ALEN] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
EspNowSerialBase::EspNowSerialBase(void)
: _serial(nullptr), _channel(0), _address{0}, _buf{0} {
uint8_t addr[ESP_NOW_... |
// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// GameKit
#include "AwsGameKitStyleSet.h"
// Unreal
#include <Interfaces/IPluginManager.h>
#include <Styling/SlateStyle.h>
#include <Styling/SlateStyleRegistry.h>
#include <Styling/SlateTypes.h>
TShared... |
/*
Copyright (c) 2010--2011, <NAME>, ASL, ETHZ, Switzerland
You can contact the author at <stephane at magnenat dot net>
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 ... |
#include <QCoreApplication>
#include <QCommandLineParser>
#include "emberquery.h"
#include <iostream>
#ifdef Q_OS_WIN32
#include <fcntl.h>
#include <io.h>
#else
#include <unistd.h>
#endif
enum CommandLineParseResult
{
CommandLineOk,
CommandLineError,
CommandLineVersionRequested,
CommandLineHelpReque... |
#include "cbase.h"
#include <VGUI_EntityPanel.h>
#include <KeyValues.h>
#include "commanderoverlay.h"
#include "clientmode_tfnormal.h"
#include "tf_shareddefs.h"
#include "shareddefs.h"
#include "c_func_resource.h"
#include "techtree.h"
#include "c_basetfplayer.h"
#include "vgui_HealthBar.h"
#include "vgui_BitmapImage.... |
/** @file
@brief Implementation
@date 2015
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, 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 ... |
#include "Database.h"
#include <fstream>
#include <iostream>
#include <string>
#include <algorithm>
Database::Database()
{
reset();
}
void Database::filterByRule(const std::string& rule)
{
_rules.push_back(rule);
_data.erase(std::remove_if(_data.begin(), _data.end(), [&](std::string& word) {
return !wordFitsRule... |
#include "pulse_utils.hpp"
#include "zspmv.hpp"
complex_t internal_expect_psi_csr(const py::array_t<complex_t>& data,
const py::array_t<int>& ind,
const py::array_t<int>& ptr,
const py::array_t<complex_t>& vec) {
... |
// The MIT License (MIT)
// Copyright (c) 2017 nabijaczleweli
// 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... |
#include <SPI.h>
#include <SdFat.h>
#include <errno.h>
#include "sd_log.h"
#include "common.h"
#define SPI_SPEED SD_SCK_MHZ(8)
const uint8_t sd_CS = 10;
static bool sdReady = 0;
SdFat sd;
SdFile root;
static SdFile dataFile;
static SdFile rawLogFile;
static bool dataFileOpened = 0;
static bool rawFileOpened = 0;
s... |
#include <gtest/gtest.h>
#include <memory>
#include "telegram_bot.h"
using namespace telegram;
struct Small {
declare_struct
declare_field(bool,test);
};
TEST(JsonParser,to_json_small_structure) {
std::string json = JsonParser::i().toJson(Small{false});
std::string expected_json = "{\"test\":false}";
... |
#include "simulation.h"
Simulation::Simulation(World * w, int minCreatures, unsigned int rate)
{
creatures = std::vector<std::shared_ptr<Creature>>();
world = w;
minimumCreatures = minCreatures;
stepRate = rate;
steps = 0;
}
void Simulation::RunFor(unsigned long seconds)
{
for (unsigned long ... |
#include "jjOpenCLBasic.hpp"
cl_context createContext()
{
cl_int errNum;
JJ_CL_PLATFORMS platformsInformations;
cl_context context = NULL;
errNum = jjOpenCLPlatformInitialize(&platformsInformations, true);
cl_context_properties contextProperties[] = {
CL_CONTEXT_PLATFORM,
(cl_context_properties)platformsInfor... |
#include <Arduino.h>
#include <math.h>
#include <AsyncTCP.h>
#include <map>
#include "stellarium.h"
#include "clock.h"
#include "storage.h"
#include "steppers.h"
#include "Sideral.h"
#include "log.h"
#define TCP_SERVER_PORT 10001
AsyncServer stellariumServer(TCP_SERVER_PORT);
std::map<AsyncClient *, int> stellariumC... |
#include <cstdlib>
#include <clocale>
#include <sstream>
#include <getopt.h>
#include <iostream>
#include <ncpp/NotCurses.hh>
#include <ncpp/PanelReel.hh>
#include <ncpp/NCKey.hh>
using namespace ncpp;
// FIXME ought be able to get pr from tablet, methinks?
static PanelReel* PR;
class TabletCtx {
public:
Tablet... |
#include <gtest/gtest.h>
#include <mlfe/operators/maxpool2d.h>
#include <mlfe/utils/gradient_checker.h>
#include <random>
using namespace mlfe;
using namespace mlfe::operators;
namespace fn = mlfe::functional;
TEST(operator, maxpool2d_k2_s2){
using T = float;
constexpr int B = 1;
constexpr int C = 2;
... |
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <vector>
using namespace std;
#define MAXL 262144
char S[MAXL], C[MAXL], T[MAXL];
int dp[MAXL], n, m;
int A[MAXL][26], SUM[MAXL][26];
void exbuild(char S[]) { // manacher's algorithm
n = strlen(S), m = 2 * n + 1;
int mx = 0, idx = 0;
int ans ... |
#include "openid_connect.h"
void OpenIdConnectService::OpenIdConnectService::run() {
try {
const std::string &request = params.get("request");
if (request == "login") {
this->login(params.get("access_token"));
} else { // FALLBACK
response.sendFailureJSON("OpenIdCon... |
//
// ===============================================================================
// clReflect
// -------------------------------------------------------------------------------
// Copyright (c) 2011-2012 <NAME> & clReflect Authors (see AUTHORS file)
// Released under MIT License (see LICENSE file)
// =====... |
#define _USE_MATH_DEFINES
#include <Eigen/Dense>
#include <cmath>
#include <iostream>
#include <geometry_msgs/PointStamped.h>
#include <geometry_msgs/PoseStamped.h>
#include <igvc_msgs/velocity_pair.h>
#include <nav_msgs/Odometry.h>
#include <visualization_msgs/MarkerArray.h>
#include <tf/transform_datatypes.h>
#in... |
#include "homework_3.h"
#include "utils.h"
#include "filter.h"
#include <iostream>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core.hpp>
#include <opencv2/calib3d.hpp>
#include <string>
#include <vector>
using namespace std;
using namespace cv;
/**
* Generate histograms for the t... |
// utils.cpp
// Superblocks - Version 0.4.3
#include "superblocks.hpp"
void Superblocks::timer_start()
{
cstart = clock();
}
float Superblocks::timer_end()
{
cend = clock() - cstart;
return (double)cend / ((double)CLOCKS_PER_SEC);
}
long Superblocks::gethashcutout( int step, const char* hash )
{
if( debug ) ... |
/*****************************************************************************
* GATB : Genome Assembly Tool Box
* Copyright (C) 2014 INRIA
* Authors: R.Chikhi, G.Rizk, E.Drezen
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public ... |
/*
* Copyright 2011 Google Inc. 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 applic... |
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2017 Intel Corporation
//
// 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
//
// ht... |
/* Copyright (C) 2010-2011 DeSmuME team
This file is part of DeSmuME
DeSmuME 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
(at your option) any later ve... |
#include <opencv2/highgui.hpp>
#include <iod/parse_command_line.hh>
#include <iod/timer.hh>
#include <gpof/gpof_ios.hh>
#include <vpp/vpp.hh>
#include <vpp/algorithms/video_extruder.hh>
#include <vpp/utils/opencv_bridge.hh>
#include <vpp/utils/opencv_utils.hh>
#include <vpp/draw/draw_trajectories.hh>
#include <evalu... |
/* XMRig
* Copyright 2010 <NAME> <<EMAIL>>
* Copyright 2012-2014 pooler <<EMAIL>>
* Copyright 2014 <NAME> <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 <NAME> <<EMAIL>>
* Copyright 2016-2017 XMRig <<EMAIL>>
*
*
* ... |
/* <server/signal_handler_thread.test.cc>
----------------------------------------------------------------------------
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 o... |
/*
* Copyright 2021, <NAME> <<EMAIL>>
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include "Daemon.h"
#include <iostream>
#include <MessageRunner.h>
#include <Roster.h>
#include <Url.h>
#include "DeskbarView.h"
#include "FeedController.h"
#include "Notifier.h"
#include "Preferences.... |
#include <fstream>
#include <iostream>
#include <cmath>
#include <map>
#include <chrono>
#include "json.hpp"
#include "BinaryGASolver.h"
#include "Common.h"
using json = nlohmann::json;
#define POPULATION_SIZE 300
#define MUTATION_PROBABILITY 0.01
#define CROSSOVER_FACTOR 0.75
#define MAX_NUMBER_OF_GENERATIONS 15000... |
/*
* This function will free up all
* memory allocated by the database
* only when the program is about to
* finish execution
*/
#include "word_exif_data_to_mem.hh"
#include "word_endings.hh"
#define MEM_NO_ALLOC 0
#define MEM_ALLOC 1
using namespace std;
/*
* String starts with
*/
inline bool
... |
/*
* Copyright 2018 The Polycube 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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
//2014.07.20 - 2014.07.21 - 2014.07.22 Gustaf-37 - CTG.
/* PROBLEM :
T R A C K I N G A N U N K N O W N Q U A N T I T Y O F S TU D E N T R E C O R D S
In this problem, you will write a class with methods to store and manipulate a collection
of student records. A student record contains a student number... |
#include "example_unicode_utils.h"
#include <nanodbc/nanodbc.h>
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <random>
#include <vector>
using namespace std;
using namespace nanodbc;
// returns random string [min_size, max_size]
template <class T, typename = nanodbc::enable_if_s... |
/*
The MIT License (MIT)
Copyright (c) 2016 CStanKonrad
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, p... |
#include "DemoRenderer.h"
#include "OpenGLWindow.h"
#include <QOpenGLFunctions_3_0>
#include <QThread>
#define _USE_MATH_DEFINES
#include <math.h>
void DrawCube(QOpenGLFunctions_3_0 *f)
{
f->glBegin(GL_QUADS); // Draw The Cube Using quads
f->glColor3f(0.0f, 1.0f, 0.0f); // Color Blue
f->gl... |
#include "ViewModel.h"
#include <memory>
using namespace std;
ViewModel :: ViewModel(shared_ptr<Camera> camera, shared_ptr<Node> node):
Tracker(static_pointer_cast<Node>(camera), Tracker::ORIENT, Freq::Time::ms(25)),
m_pCamera(camera.get()),
m_pNode(node)
{
assert(node);
assert(camera);
assert(... |
/**
* Copyright (c) 2021 OceanBase
* OceanBase Database Proxy(ODP) is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ... |
#include <simplebluez/Bluez.h>
#include <simplebluez/Exceptions.h>
#include <atomic>
#include <chrono>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <thread>
SimpleBluez::Bluez bluez;
std::atomic_bool async_thread_active = true;
void async_thread_function() {
while (async_thread_active) {
... |
#include <bits/stdc++.h>
using namespace std;
const int MAXV = 40010;
const int MAXE = MAXV * 200 * 2;
const long long LLINF = 1LL<<62;
typedef struct Edge {
int v;
long long cap, flow;
Edge *next, *re;
} Edge;
class MaxFlow {
public:
Edge edge[MAXE], *adj[MAXV], *pre[MAXV], *arc[MAXV];
int e, ... |
#include "engine/gen/FlowField.h"
FlowField::FlowField()
{
dijkstraGrid = std::vector<std::vector<node>>(gridWidth);
}
FlowField::~FlowField()
{
}
void FlowField::GenerateFlowField()
{
GenerateDijkstraGrid(std::vector<glm::vec2>{ {2, 4}, { 5,6 }});
int x, y;
std::vector<std::vector<glm::vec2>> flowField(gridWi... |
/***************************************************************************************************
LICENSE:
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... |
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2014, <NAME>, <NAME>.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "S... |
#include "sendplanepositionscommobj.h"
#include <QMessageBox>
#include "viewmodels/planespositionsviewmodel.h"
#include "multiplayerround.h"
bool SendPlanePositionsCommObj::makeRequest()
{
if (m_GlobalData->m_UserData.m_UserName.isEmpty()) {
QMessageBox msgBox(m_ParentWidget);
msgBox.setText("No u... |
#define _WIN32_WINNT 0x0601
#define SDL_MAIN_HANDLED
#include <iostream>
#include <vector>
#include <windows.h>
#include "Shader.h"
#include "Text.h"
#include "Geometry.h"
#include "WindowInformation.h"
#include "SolarSystem.h"
#include "OrbitPrediction.h"
using std::vector;
/* https://www.pluralsight.com/blo... |
#include "llvm/IR/IRBuilder.h"
#include "llvm/Support/raw_ostream.h"
#include <openssl/rsa.h>
namespace {
const int KEY_SIZE = 512;
/*
* Takes an OpenSLL BIGNUM and return an equivalent LLVM APInt.
*/
llvm::APInt ConvertBignum(const BIGNUM *bn) {
// Get bytes in big-endian order
int size = BN_nu... |
/*
* Copyright 2020-present Ksyun
*
* 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... |
#include <common.h>
#include <game.h>
#include <g3dhax.h>
#include <sfx.h>
#include "boss.h"
const char* MEarcNameList [] = {
"kazan_rock",
NULL
};
class dMeteor : public dEn_c {
int onCreate();
int onDelete();
int onExecute();
int onDraw();
static dMeteor *build();
mHeapAllocator_c allocator;
m3d::mdl_c b... |
//
// UIBase.hpp
//
#pragma once
#include "UISuper.hpp"
#include <v8.h>
#include "../InputManager.hpp"
#include <functional>
using namespace v8;
class ScriptEnvironment;
typedef std::weak_ptr<ScriptEnvironment> ScriptEnvironmentWeakPtr;
class UIBase;
class Input;
typedef std::shared_ptr<UIBase> UIBasePtr;
typedef... |
#include "lbs_linear_boltzmann_solver.h"
#include "ChiMath/SpatialDiscretization/FiniteElement/PiecewiseLinear/pwl.h"
#include "chi_log.h"
extern ChiLog& chi_log;
#include <iomanip>
//###################################################################
/**Zeroes all the outflow data-structures required to compute
*... |
#include "RoiSelector.h"
RoiSelector::RoiSelector(float _offset_roi_x, float _offset_roi_y, float _width_roi_x, float _height_roi_y, bool _isEmptyFlag)
: offset_roi_x(_offset_roi_x), offset_roi_y(_offset_roi_y), width_roi_x(_width_roi_x), height_roi_y(_height_roi_y), isEmptyFlag(true), roiNotCroped(), roiCrope... |
/*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part without... |
#include "Chemin.hpp"
#include <cmath>
bool Chemin::readPath(std::ifstream &in){
char k; // utiliser pour récupérer le caractère séparateur
// récupération éventuelle des coordonnées du pixel
in >> x >> k >> y >> k;
if(in.eof()) return false;
std::cout << "==================================================... |
#include "interpolation.h"
#include <QTextStream>
#include <cmath>
#include <fstream>
#include <vector>
#include "polynomial.h"
const double EPS = 1e-6;
Interpolation Interpolation::FromFile(QString path) {
Interpolation result;
QFile file(path);
if (!file.open(QIODevice::ReadOnly)) {
throw std::runtime_er... |
#include "imgui.h"
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include <stdio.h>
#if defined(IMGUI_IMPL_OPENGL_ES2)
#include <GLES2/gl2.h>
#endif
#include <GLFW/glfw3.h> // Will drag system OpenGL headers
#include <iostream>
#include <string.h>
// internally wrapped libraries
#include <SystemInforma... |
#include <unordered_map>
#include <vector>
#include <iostream>
#include <fstream>
#include <pvm3.h>
#include <ctime>
#include "consts.h"
using namespace std;
vector<string> word_list;
unordered_map<string,int> frequency_list;
unordered_map<string,string> tree_list;
void read_word_frequency_list(string filename)
{
... |
#include "pch.hpp"
#include <cstdint>
#include <string>
#include <vector>
#include "../tiny-lib/BinaryBuffer.hpp"
#include "gtest/gtest.h"
TEST(BinaryBufferTest, PrimitiveReadWrite)
{
BinaryBuffer buffer;
bool b_real = true;
buffer.Write(b_real);
bool b_read = false;
ASSERT_TRUE(buffer.Read(b_read));
EXPECT_E... |
#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include <QApplication>
#include <QtGlobal>
#include <QOpenGLContext>
#include <QQmlApplicationEngine>
#include <QFontDatabase>
#include <QStyleFactory>
#include <QCommandLineParser>
#include <QDir>
// #include "client/crashpad_client.h"
// #in... |
#include <cassert>
#include <regex>
#include "h5s3/private/s3_driver.h"
namespace h5s3::s3_driver {
const char* s3_kv_store::name = "h5s3";
s3_kv_store::s3_kv_store(const std::string& host,
bool use_tls,
const std::string& bucket,
const std::... |
/* socket.c - All socket related operations
*/
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <endian.h>
#include <daemon.h>
#include <utils.h>
#include <logging.h>
#define ABS_SOCKET_LEN(sun) (sizeof(sa_family_t) + strlen(sun->sun_path + 1) + 1)
socklen_t setup_sockaddr(struct sockaddr_un *su... |
#include <ros/ros.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <cmath>
#include <geometry_msgs/Pose.h>
#include <geometry_msgs/PoseStamped.h>
#include <nav_msgs/Odometry.h>
#include <tf/transform_datatypes.h>
#include <tf/transform_listener.h>
#include <std_msgs/Bool.h>
#inclu... |
/**
* Uporaba cevovoda s štirimi stopnjami;
* posamezno stopnjo lahko opravlja več niti
*/
#include <iostream>
#include <random>
#include <pthread.h>
#include <unistd.h>
#include "../input.hpp"
#include "../rle.hpp"
#include "../huffman.hpp"
#include "../output.hpp"
#include "../stream.hpp"
#define REPS 1000
#de... |
/*
* Copyright (C) 2007 Apple Inc. 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 ... |
// test.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <algorithm>
#include <vector>
#include "host.h"
#include "utils/macros.hpp"
#include "utils/zero_resetable.hpp"
#include "utils/cpp_wrappers.hpp"
using namespace std;
using namespace native_p... |
/*
* Copyright (c) 2021, The UAPKI Project Authors.
*
* 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 ... |
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include <cmath>
#include "frc/geometry/Translation3d.h"
#include "gtest/gtest.h"
using namespace frc;
static constex... |
/******************************************************************************
QtAV Player Demo: this file is part of QtAV examples
Copyright (C) 2012-2015 <NAME> <<EMAIL>>
* This file is part of QtAV
This program is free software: you can redistribute it and/or modify
it under the terms of the GN... |
// Copyright 2020 The Fuchsia 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 "tests/common/arc_parameters.h"
#include <math.h>
// All computations taken from http://www.w3.org/TR/SVG/implnote.html
arc_endpoint_parameters... |
#include "costas.h"
#include <cassert>
#include <cmath>
#ifdef __ARM_NEON__
#include "./neon/neon_mathfun.h"
#endif
#define M_2PI (2 * M_PI)
Costas::Costas() {
float damp = sqrtf(2.0f)/2.0f;
float bw = 0.005f;
phase_ = 0.0f;
freq_ = 0.0f;
alpha_ = (4 * damp * bw) / (1.0 + 2.0 * damp * bw + bw * bw);
bet... |
#include "HixConfig.h"
#include "HixMQTT.h"
#include "HixWebServer.h"
#include "secret.h"
#include <Arduino.h>
#include <ArduinoOTA.h>
#include <IRac.h>
#include <IRrecv.h>
#include <IRremoteESP8266.h>
#include <IRtext.h>
#include <IRutils.h>
#include <ir_Samsung.h>
// runtime global variables
HixConfig g_config;
H... |
#include "Epoll.h"
#include "ThreadPool.h"
#include "util.h"
#include <sys/epoll.h>
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <queue>
#include <deque>
#include <arpa/inet.h>
// #include "RequestData.h"
int TIMER_TIME_OUT = 500;
extern std::priority_qu... |
/*************************************************************
* > File Name : c1086_2.cpp
* > Author : Tony
* > Created Time : 2019/11/07 15:32:56
* > Algorithm :
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
inline ... |
#include "scene.h"
Scene::Scene( void )
{}
Scene::~Scene( void )
{
if ( bvh_ )
{
delete bvh_;
bvh_ = nullptr;
}
}
// bool Scene::intersect( const Ray &ray,
// IntersectionRecord &intersection_record ) const
// {
// bool intersection_result = false;
// Intersect... |
#include "gtest/gtest.h"
#include <cmath>
#include "spica.h"
using namespace spica;
// ------------------------------
// Sphere class test
// ------------------------------
TEST(BSphereTest, InstanceTest) {
BSphere sp0;
EXPECT_EQ(0.0, sp0.center().x());
EXPECT_EQ(0.0, sp0.center().y());
... |
#include "dbdet_curvelet.h"
#include <vcl_iostream.h>
#include <vcl_fstream.h>
#include <vcl_cassert.h>
#include <vcl_deque.h>
#include <vcl_algorithm.h>
//: copy constructor
dbdet_curvelet::dbdet_curvelet(const dbdet_curvelet& other)
{
//the edgels have to copied as links because curvelets are just groupings of th... |
#include<dialogs/options_dialog.h>
auto option_item::make_view()
{
auto tog_enable = plain_toggle_icon_button( icons::cancel, icons::ok, 1.0);
tog_enable.value(enabled);
tog_enable.on_click = [&](bool b)
{
enabled = b;
};
auto tb = input_box("Write a Csound option");
tb.second->set... |
//////////////////////////////////////////////////////////////////////
//
// ShadowPhotonMap.cpp - Implements the shadow photon map
//
// Author: <NAME>
// Date of Birth: May 14, 2004
// Tabs: 4
// Comments:
//
// License Information: Please see the attached LICENSE.TXT file
//
//////////////////////////////////... |
/**
* Created by <NAME> on 22/08/2020.
**/
#include "NasNas/tilemapping/ObjectLayer.hpp"
using namespace ns;
using namespace ns::tm;
ns::tm::ObjectLayer::ObjectLayer(const pugi::xml_node& xml_node, tm::TiledMap* tiledmap) :
Layer(xml_node, tiledmap)
{
if (xml_node.attribute("color"))
m_color = hexToColor... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
bool done[50][1<<15];
double dp[50][1<<15];
int N;
vector<int> I, E, M;
double go(int k, int have) {
if (k == -1)
return 0.0;... |
#include "testApp.h"
using namespace MSA;
//--------------------------------------------------------------
void testApp::setup() {
// setup fluid stuff
fluidSolver.setup(100, 100);
fluidSolver.enableRGB(true);
//fluidSolver.setFadeSpeed(0.000001);
fluidSolver.setFadeSpeed(0.002f);
//fluidSolver.setFadeSp... |
#include <iostream>
#include <cassert>
#include <TROOT.h>
#include <TSystem.h>
#include <TFile.h>
#include <TTree.h>
#include <TBranch.h>
#include <TCanvas.h>
#include <TH1.h>
#include <TH2.h>
#include <TGraph.h>
#include <TF1.h>
#include <TFormula.h>
#include <TStyle.h>
#include <TKey.h>
#include <vector>
#include "FW... |
/* <stig/indy/disk/util/stig_dm.cc>
The 'main' of the Stig disk manager.
Copyright 2010-2014 Tagged
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.or... |
//
// main.cpp
//
// Created by <NAME> on 9 October 2018.
// Copyright 2013-2018 Regents of the University of California
//
#include <iostream>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <execinfo.h>
#include <boost/asio.hpp>
#include <boost/asio/deadline_timer.hpp>
#inclu... |
#define _SCL_SECURE_NO_WARNINGS
#pragma warning(disable:4996)
#include "readFiles.h"
const char* readFile(string filename) {
string fullFileData;
ifstream openedFile(filename.c_str());
if (openedFile.is_open()) {
string line;
while (getline(openedFile, line)) {
fullFileData += line + '\n';
}
openedFile... |
/*
** Copyright (C) 1998-2011 <NAME> <<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 2 of the License, or
** (at your option) any later version.
**
** This program... |
// main.cpp
// RSA
//
// Created by Sergiy on 06.06.17.
#include <iostream>
#include <math.h>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
bool isPrime(long int prime);
long int calculateE( long int t );
long int greatestCommonDivisor( long int e, long int t );
long int calculateD(... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with San... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.