text stringlengths 3.08k 12.5k |
|---|
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <queue>
#include <stack>
#include <cassert>
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sd3(x,y,z) scanf("%d%d%d",&x,&... |
#ifndef NATIVE
#include <enclave_rex_u.h>
#include <sgx_qe_errlist.h>
#include <sgx_qv_errlist.h>
#include "sgx_dcap_quoteverify.h"
#endif
#include <communication/sync_zmq.h>
#include <stdio.h>
#include <iostream>
#include <map>
#include <mutex>
#define BLD "\x1B[1m"
#define RED "\x1B[31m"
#define GRN "\x1B[32m"
#defi... |
#include <errno.h>
#include "engine.h"
#define MODE_ENCODE 0
#define MODE_DECODE 1
Napi::FunctionReference Engine::constructor;
static z_stream blank_stream = {
.next_in = NULL,
.avail_in = 0,
.total_in = 0,
.next_out = NULL,
.avail_out = 0,
.total_out = 0,
.msg = NULL,
.state = NULL,
.zalloc = NUL... |
#include <random>
/********************************************************************
Implementation of Bucket Oblivious Permutation
<NAME>., <NAME>., <NAME>., <NAME>., <NAME>. and <NAME>., 2020.
Bucket oblivious sort: An extremely simple oblivious sort.
Created by <NAME> on 21/07/21.
MIT License
Copyright... |
#include "RtMidi.h"
#include <stdio.h>
#include <memory>
#include <unistd.h>
using namespace std;
#define MIDI_NOTE_OFF 0x80
#define MIDI_NOTE_ON 0x90
#define MIDI_CONTROL_CHANGE 0xB0
#define MIDI_PROGRAM_CHANGE 0xC0
#define MIDI_PITCH_BEND 0xE0
#define MIDI_AFTERTOUCH ... |
/*
Copyright 2005-2012 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks.
Threading Building Blocks is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundat... |
/*****************************************************************************
*
* $Id$
*
* Copyright (C) 2006-2012 <NAME>, Ingenieurgemeinschaft IgH
*
* This file is part of the IgH EtherCAT Master.
*
* The IgH EtherCAT Master is free software; you can redistribute it and/or
* modify it under the terms ... |
/*
MIT License
Copyright(c) 2018-2019 megai2
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, dist... |
#include "motor.h"
PiParams make_motor_pi_params(Scalar bandwidth, Scalar resistance,
Scalar inductance) {
PiParams params;
params.p_gain = inductance * bandwidth;
params.i_gain = resistance * bandwidth;
return params;
}
/*
// calculates
// - bEmfs
// - phase_voltages
// ... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/*
A simple program to provide intro help to the icommands
*/
#include "rodsClient.h"
#include "parseCommandLine.h"
#include <string>
const char * const icmds... |
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <cstdio>
#include <cstring>
#include <fcntl.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
/*fn Writen
*brief write 'count' bytes to fd
*param_in fd, handle
*par... |
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <list>
#include <stdlib.h>
#include <unistd.h>
#include <ncurses.h>
#include <menu.h>
#include <form.h>
#include <boost/algorithm/string.hpp>
#include "elftree.h"
#include "elfutil.h"
#include "tui.h"
using namespace std::string_... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
using namespace std;
inline bool is_num(char c){
return c>='0'&&c<='9';
}
inline int ni(){
int i=0;char c;
while(!is_num(c=getchar()));
while(i=i*10-'0'+c,is_num(c=getchar()));
return i;
}
inline int sqr(int x){
return x*x;
}
const int MO... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#include "napa-zone.h"
#include <module/loader/module-loader.h>
#include <platform/dll.h>
#include <platform/filesystem.h>
#include <utils/string.h>
#include <zone/eval-task.h>
#include <zone/call-task.h>
#include <zone/ca... |
#include <cst/program_options.hpp>
#include <cst/progress/bar.hpp>
#include <cst/progress/simple_view.hpp>
#include <cst/logging/logger/trivial_loggers.hpp>
#include <iostream>
#include <cstdio>
#include "util/files.hpp"
#include "util/base64.hpp"
#include "net/url.hpp"
#include "net/http/client.hpp"
namespace po = ... |
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "lwip/sys.h"
#include "lwip/netdb.h"
#include "lwip/api.h"
#include "esp_log.h"
#include "driver/gpio.h"
#include "cJSON.h"
#include "freertos/FreeRTOS.h"
#include "esp_system.h"
#include "httpserver/httpserver.h"
#include "websocket_server.h"
conste... |
#include <iostream>
#include <stdlib.h>
#include <mutex>
#include <chrono>
#include <thread>
#include <vector>
#include <climits>
#include "skiplist_PQ.h"
using namespace std;
using namespace std::chrono;
// #define TNUM 10
#define MAX_VERTICES 400
#define MAX_EDGES 400*50
#define WT_LIMIT 100000
#define MAXWEIGHT 200... |
/*
* Copyright (C) 2014-2015 <NAME>.
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#include "codeview.h"
#include <QPainter>
#include <QDebug>
#include <QPaintEvent>
#include <QColor>
#include "log.h"
#include ... |
#include <iostream>
#include <array>
#include <random>
#include <vector>
#include <ros/ros.h>
#include <geometry_msgs/Point.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/TwistStamped.h>
#include <mavros_msgs/State.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/CommandBool.h>
#include <ma... |
/*
* Copyright (C) 2012-2014 Open Source Robotics Foundation
*
* 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... |
//
// "$Id: scroll.cxx 5592 2007-01-09 12:20:29Z yuri $"
//
// ScrollGroup test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2006 by <NAME> and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as pub... |
//===- ModuleCombiner.cpp - MLIR SPIR-V Module Combiner ---------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
/*
---- Hector the simulator ----
A fast simulator of particles through generic beamlines.
<NAME>, <NAME> ~~~ <EMAIL>
http://www.fynu.ucl.ac.be/hector.html
Centre de Physique des Particules et de Phénoménologie (CP3)
Université Catholique de Louvain (UCL)
*/
/// \file H_OpticalElement.cc
/// \bri... |
//
// Created by andrew on 2020/11/1.
//
#include <iostream>
using namespace std;
extern "C" {
#include <libavutil/log.h>
#include <libavformat/avformat.h>
}
void adts_header(char *szAdtsHeader, int dataLen) {
int audio_object_type = 2;
int sampling_frequency_index = 7;
int channel_config = 2;
int ad... |
#ifdef ONLINE_JUDGE
#include <bits/stdc++.h>
#else
#include <algorithm>
#include <bitset>
#include <list>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
... |
// Copyright (c)2007 <NAME>
// See license.txt for license information
#include "GameState.h"
#include "Renderer.h"
#include "Textures.h"
#include "CompatibleSystem.h"
#include "Tga.h"
#include "os_graphics.h"
// For FPS display
#include "TextWriter.h"
#include <iomanip>
Tga *GameState::GetTexture(Te... |
#include <random>
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
using candidate_info = struct candidate_info_t
{
std::vector<double> vector;
double fitness = DBL_MAX;
};
std::random_device rd;
std::mt19937 generator(rd());
std::uniform_real_distribution<> distribution(0.0, 1.0);
auto ... |
/*MINVEST - Investment Money
#knapsack #dynamic-programming
English Vietnamese
John never knew he had a grand-uncle, until he received the notary’s letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John was the only inheritor.
John did not need that much ... |
/**
* Example of use of photos C++ interface. Pythia events are
* generated first and photos used for FSR.
*
* @author LCG & <NAME>
* @date 6 May 2011
*/
//pythia header files
#include "Pythia.h"
#include "HepMCInterface.h"
//PHOTOS header files
#include "Photos/Photos.h"
#include "Photos/PhotosHepMCEvent.h"
#i... |
#include "chromosome.h"
#include <iostream>
#include <assert.h>
#include "common/random.h"
#include "net.h"
#include "neuron.h"
#include "edge.h"
#include "innovation_number_getter.h"
#include "util.h"
Chromosome::Chromosome(Random& random, const NeatConfig& conf, Net* net)
: net_(net),
conf_(conf),
... |
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <algorithm>
#include <sstream>
#include <set>
#include <climits>
#include <cstdio>
#include <string>
#include <map>
using namespace std;
const int n = 12;
struct bal {
string left;
string right;
string result;
};
i... |
#include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
#define MAX 300000
const int inf = 1000000000;
int n;
vector<int> adj[MAX];
int qhead, qtail;
int queue[MAX];
int dad[MAX];
int dist[MAX];
int visina[MAX][3];
int how_visina[MAX][3];
int dole_diametar[MAX];
int best_dole_diametar[MAX][2]... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "TilemapNavComponent.h"
#include "Test2DPlatformer.h"
#include "PaperTileMapComponent.h"
#include "Navigation/NavLinkProxy.h"
#include "NavLinkCustomComponent.h"
#include "NavArea_Jump.h"
#include "Engine/World.h"
// Sets default... |
#include "header.h"
#include "clientSpreadUtil.h"
#include "client.h"
using namespace std;
Client::Client(ClientSpreadUtil *sp) : spreadUtil(sp) {
spreadUtil->set_observer(this);
spreadUtil->handle_events();
}
void Client::login(const string user_name_) {
user_name = user_name_;
cout << "==> You hav... |
#include "thread_pool.h"
#include <util/log.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
#include <limits>
ThreadNotify::ThreadNotify()
{
pthread_mutexattr_init(&m_mutexattr);
pthread_mutexattr_settype(&m_mutexattr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&m_mutex, &m_mutexattr);
pthre... |
/*
* created by xehoth on 09-01-2017
*/
#include <bits/stdc++.h>
const int MAXN = 500010;
const int IN_LEN = 10000000;
const int OUT_LEN = 10000000;
const int INF = 0x3f3f3f3f;
inline int nextChar() {
static char buf[IN_LEN], *h, *t;
if (h == t) {
t = (h = buf) + fread(buf, 1, IN_LEN, stdin);
... |
#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <limits>
#include <random>
#include "globals.h"
#include "pubkcrypto.h"
#include "fileio.h"
using namespace std;
int LOGGING = 0;
int main()
{
//If the ciphertext.txt exists, delete it.
if (LOGGING > 0)
cout << "Clean... |
// Notice
// ------
//
// This file is part of the Mezzo SoundFont2 Sampling Based Synthesizer:
//
// https://github.com/turgu1/mezzo
//
// Simplified BSD License
// ----------------------
//
// Copyright (c) 2018, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or with... |
#include <cstdint>
#include <cstddef>
#include <future>
#include <system_error>
#include <sys/statfs.h>
#include <H5Cpp.h>
#include <spead2/common_ringbuffer.h>
#include <spead2/common_thread_pool.h>
#include <pybind11/pybind11.h>
#include "common.h"
#include "session.h"
#include "writer.h"
#include "stats.h"
// TODO:... |
/*
Constructor: A special type of function, which has the same name as the class, but has no return type.
There are 4 types of Constructors in C++:
1. Default Constructor: When we don't explicitly define this constructor, this constructor is called by the compiler,
whenever an object is create... |
#include "utils/isotope_pattern_db.hpp"
#include "ms/isocalc.hpp"
#include "ms/periodic_table.hpp"
#include "cxxopts.hpp"
#include <iostream>
#include <regex>
#include <fstream>
#include <set>
#include <vector>
#include <string>
#include <memory>
void printAdducts(const std::vector<std::string>& adducts) {
for (aut... |
//===- halo_tblgen.cc -------------------------------------------*- C++ -*-===//
//
// Copyright (C) 2019-2020 Alibaba Group Holding 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 ... |
/*
Generating all solutions for a regular expression in Gecode.
Regular expressions in Gecode is described here:
http://www.gecode.org/gecode-doc-latest/classGecode_1_1REG.html
This Gecode model was created by <NAME> (<EMAIL>)
Also, see my Gecode page: http://www.hakank.org/gecode/ .
*/
#include <gecode... |
#include "clipboard-utils.h"
#include <QDebug>
#include <unistd.h>
#include <QApplication>
#include <QClipboard>
#include <QMetaObject>
#include <QMetaProperty>
#include <QMimeData>
#include <QUrl>
#include <QMutex>
#include <iostream>
#include <X11/X.h>
#include <X11/Xlib.h>
static QStringList gClipboardFileUrls;
s... |
#include <cstring>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <string>
#include <vector>
#include <zlib.h>
namespace impl {
template <typename Cont, typename Char>
Cont readFile(const Char *path)
{
std::ifstream f;
f.exceptions(std::ios::failbit | std::ios::badbit);
f.open(path,... |
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/platform/default/logging.h"
#include "tensorflow/core/framework/shape_inference.h"
#include <algorithm>
using namespace tensorflow;
REGISTER_OP("InterpRev")
.Attr("T: {float, double}")
.Input("t: T")
.Input("x: T")
.Input("y: T")
.I... |
// A crude prototype UI is implemented here to test various functionality within the application
#include <Window.h>
#include <UI.h>
#include <stdexcept>
#include <iostream>
#include <glad/glad.h>
#include <chrono>
#include <thread>
#include <ImageBlock.h>
#include <Layer.h>
#include <Canvas.h>
#include <Timer.h>
#inc... |
#include <iostream>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <string.h>
#include "jtag_rbb.hpp"
using namespace std;
jtag_rbb::jtag_rbb (int portnum){
int opt = 1;
port_value = portnum;
// Creating socket file d... |
#include <sjc.h>
bool CCompareVar::getReturnThis() {
return false;
}
shared_ptr<CType> CCompareVar::getType(Compiler* compiler) {
return compiler->typeBool;
}
void CCompareVar::transpile(Compiler* compiler, TrOutput* trOutput, TrBlock* trBlock, shared_ptr<TrValue> thisValue, shared_ptr<TrStoreValue> storeVa... |
#include <istream>
#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <iterator>
#include <filesystem>
#include <experimental/iterator>
#include <functional>
#include "xtensor/xarray.hpp"
#include "xtensor/xcsv.hpp"
#include "xtensor/xbuilder.hpp"
#include "xtensor/xview.hpp"
#include ... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2011, <NAME>, 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:
*
* * Redistributions of source code... |
#include <ros/ros.h>
#include <actionlib/server/simple_action_server.h>
#include <actionlib/client/simple_action_client.h>
#include <control_msgs/GripperCommandAction.h>
#include <jaco2_msgs/GripperControlAction.h>
/// Moveit planning scene
#include <moveit/planning_scene_interface/planning_scene_interface.h>
#inclu... |
/* GRChombo
* Copyright 2012 The GRChombo collaboration.
* Please refer to LICENSE in GRChombo's root directory.
*/
// This program can be used to compare two HDF5 files written with GRChombo.
// It is the strongest possible check whether any changes to the program affect
// the output many timesteps later.
#includ... |
/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* 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 ag... |
// See LICENSE_CELLO file for license and copyright information
/// @file enzo_PpmlTest.cpp
/// @author <NAME> (<EMAIL>)
/// @date 2017-06-12
/// @brief Definition of the PpmlTest class
#include "enzo.hpp"
//======================================================================
EnzoInitialPpmlTest::Enz... |
//
// Created by cpasjuste on 21/11/16.
//
#include <ext/concurrence.h>
#include "cross2d/c2d.h"
#if 0
#include "ds.h"
#include <kos/blockdev.h>
#include <ext2/fs_ext2.h>
#include <fat/fs_fat.h>
#endif
using namespace c2d;
extern uint8 romdisk[];
KOS_INIT_ROMDISK(romdisk);
DCRenderer::DCRenderer(const Vector2f &s)... |
#include "PathTracer.h"
#include <time.h>
#define M_PI 3.14159265358979323846
PathTracer::PathTracer()
{
m_samplesCount = 10;
}
PathTracer::PathTracer(int width, int height) : Tracer(width, height)
{
m_samplesCount = 10;
}
Ray PathTracer::SampleDiffuse(Ray& ray, RayHitResult result) const
{
Vector3 orientedNorma... |
#include "synth2.h"
#include "preset.h"
#include <tuple>
typedef bool(*lambda)(const note& item);
template<class T>
void safe_remove(T& v, lambda f)
{
auto n = v.begin();
while (n != v.end())
if (!f(*n))
n = v.erase(n);
else
++n;
}
synth2::synth2(synth2::parameters& config) :
pge_imgui(true), params(conf... |
#include "efontTicker.h"
#include <M5Stack.h>
#include <efontEnableJaMini.h>
#include <efont.h>
void drawEfont(int x, int y, const char* pStr) {
int posX = M5.Lcd.getCursorX();
int posY = M5.Lcd.getCursorY();
uint8_t textsize = M5.Lcd.textsize;
uint32_t textcolor = M5.Lcd.textcolor;
uint32_t textbgcolor = ... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 <dirent.h>
#include <unistd.h>
#include <string>
#include <vector>
#include <iterator>
#include "linux_parser.h"
using std::stof;
using std::string;
using std::to_string;
using std::vector;
string LinuxParser::OperatingSystem() {
string line;
string key;
string value;
std::ifstream filestream(kOSPat... |
// Include standard libraries
#include <string>
#include <sstream>
// Include Qt libraries
#include <QMenuBar>
#include <QMenu>
#include <QAction>
#include <QBitmap>
#include <QPainter>
#include <QPen>
#include <QBrush>
#include <QFont>
#include <QDebug>
// Include project files
#include "chessboard.h"
// Namespaces... |
#include "common/oberror.h"
#include "stdio.h"
#include "common/oblogfile.h"
#include "common/oberrorhandler.h"
#include "modfile/obespfile.h"
#include <iostream>
#include <vector>
#include "conio.h"
#include "windows.h"
int Test_sstring_RandomStress (const int NumTests);
//using namespace std;
s... |
#include "tclap/CmdLine.h"
#include "hidapi.h"
#include <iostream>
#include <cstdint>
#include <sstream>
#include <algorithm>
#include <codecvt>
#include <exception>
#include <memory>
#include <stdexcept>
#include <typeinfo>
std::wstring s2ws(const std::string& str)
{
using convert_typeX = std::codecvt_utf8<wchar... |
/****************************************************************************/
/***************************** demKalman.cpp **************************/
/****************************************************************************/
/****************************************************************************/
// ... |
/**
* @file
* @author Inmatarian <<EMAIL>>
* @section LICENSE
* Insert copyright and license information here.
*/
#include <string>
#include <cstring>
#include <cstdlib>
#include <memory>
#include <iostream>
#include <fstream>
#include <vector>
#include <iomanip>
#include "debug.h"
#include "zstring.h"
#include... |
// Write C++/Java program to draw the polygons by using the mouse. Choose colors by clicking on the designed color pane. Use window port to draw. Use DDA algorithm for line drawing.
// Author: <NAME>.
#include<string.h>
#include<GL/glut.h>
#define ROUND(x)((int)(x+0.5))
struct Point{
GLint x;
GLint y;
};
struct Co... |
#include<iostream>
#include<unordered_set>
#include<map>
#include<tuple>
#include<cstdlib>
#include<string>
#include<bitset>
#include"nlohmann/json.hpp"
using json = nlohmann::json;
const long long DEFAULT_MAX_STEPS = 100000;
const long long MAX_MAIN_SET_SIZE = 1000;
template<typename T>
class FiniteSet : public std... |
/**
* @file demo.cc
* @author guoqing (<EMAIL>)
* @brief 尝试使用 Nano GUI 的例子
* @version 0.1
* @date 2020-01-20
*
* @copyright Copyright (c) 2020
*
*/
#include <nanogui/nanogui.h>
#include <iostream>
#include <Eigen/Core>
#include <thread>
#include <chrono>
#include <mutex>
#include <sstream>
#include <string... |
/*
* Copyright 2019 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "tools/gpu/TestOps.h"
#include "src/core/SkPointPriv.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrGeometryProcessor.h"
#include "src/gpu/GrMemoryPool.h"
#includ... |
// Copyright 2010 <NAME>
// henry UNDERSCORE christophe AT hotmail DOT com
// This is an extended version of the state machine available in the boost::mpl library
// Distributed under the same license as the original.
// Copyright for the original version:
// Copyright 2005 <NAME> and <NAME>. Distributed
// under the B... |
/* ----------------------------------------------------------------- */
/* The Toolkit for Building Voice Interaction Systems */
/* "MMDAgent" developed by MMDAgent Project Team */
/* http://www.mmdagent.jp/ */
/* -----------------------------... |
// Copyright 2017-2018 <NAME>
// SPDX-License-Identifier: Apache-2.0
#include "cameraReceive.hpp"
using namespace cv;
using namespace std;
cameraReceive::cameraReceive() {
// ## network ##
uint16_t port = 44444;
// create a normal UDP socket
fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (fd < 0) {
perro... |
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
this file is part of rcssserver3D
Fri May 9 2003
Copyright (C) 2002,2003 Koblenz University
Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
$Id$
This program is free software; you can redistribute it and/or modify
it und... |
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... |
/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: <NAME>
*/
#include <sstream>
#include <memory>
#include "util/test.h"
#include "util/exception.h"
#include "util/numerics/mpq.h"
#include "kernel/kernel.h"
#include "library/pri... |
// Hall's marriage theorem, bipartite graph matching, maxflow
// for all subset X sat. |X| <= |Neighborhood(X)| = |Y|
//
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <queue>
#include <stack>
#include <assert.h>
#include <set>
using namespace std;
const int MAXV = 40010;
const ... |
#include "similarity_cuda_worker.h"
#include "similarity_resultblock.h"
#include "similarity_workblock.h"
#include <ace/core/elog.h>
using namespace std;
/*!
* Construct a new CUDA worker with the given parent analytic, CUDA object,
* CUDA context, and CUDA program.
*
* @param base
* @param baseCuda
* @para... |
// http://www.apache.org/licenses/LICENSE-2.0
// Copyright 2014 <NAME> <<EMAIL>>
#include "file_watch.hpp"
//#include "core/log.h"
#include <cstring>
#include <sys/inotify.h>
#include <unistd.h>
#include <linux/limits.h> // PATH_MAX
#define MODULE "__filewatch"
#define log_w(module_name, fmt, ...) printf(#module_name ... |
/*=========================================================================
*
* Copyright NumFOCUS
*
* 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... |
/*
* Copyright (C) 2018-2020 LEIDOS.
*
* 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... |
/*
# <<BEGIN-copyright>>
# Copyright 2019, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
# <<END-copyright>>
*/
#include <stdlib.h>
#include <iostream>
#include <set>
#include "MCGIDI.hpp"
#include "MCGIDI_testUtilities.hpp"
static char ... |
//
// GLSphereExt.cpp
// HCI557_Spotlight
//
// Created by <NAME> on 9/26/15.
//
//
#include "Plane3D.h"
GLPlane3D::GLPlane3D(float center_x, float center_y, float center_z, float width, float height, int rows, int cols ):
_center_x(center_x), _center_y(center_y), _center_z(center_z), _width(width), _heig... |
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certai... |
#include <fstream>
#include <iostream>
#include <map>
#include <vector>
#include <sstream>
using namespace std;
static map<string, double> conf;
// fills up global variable conf with values from log file,
// prints variable name and value if flag is true
extern "C"
void configure(const char* charlog, bool flag = fal... |
#include "opentelemetry/nostd/span.h"
#include <algorithm>
#include <array>
#include <iterator>
#include <list>
#include <type_traits>
#include <vector>
#include <gtest/gtest.h>
using opentelemetry::nostd::span;
TEST(SpanTest, DefaultConstruction)
{
span<int> s1;
EXPECT_EQ(s1.data(), nullptr);
EXPECT_EQ(s1.si... |
/**
* @file main.cpp
* @brief Cluster generator implementation
* @author <NAME>
* @version 0.1
* @date 2014-05-06
* @notes see TODO comments for set of enhancements
* to functionality and statbility.
*/
#include <fstream>
#include <iostream>
#include <vector>
#include <memory>
#include <cassert>
#incl... |
// Copyright (c) 2020 midnightBITS
// This code is licensed under MIT license (see LICENSE for details)
#include "dtd_types.hh"
#include "indent.hh"
#include <iomanip>
#include <iostream>
int elem_info::cmp(std::set<std::string> const& lhs,
std::set<std::string> const& rhs) noexcept {
auto lhs_it ... |
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
#include "imguiCustom.h"
void ImGuiCustom::colorPopup(const char* name, std::array<float, 4>& color, bool* rainbow, float* rainbowSpeed, bool* enable, float* thickness, float* rounding) noexcept
{
ImGui::PushID(name);
if (enable) {
ImGui::Chec... |
/*
152. Maximum Product Subarray
https://leetcode.com/problems/maximum-product-subarray/description/
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest product = 6.
*/
... |
/*
Problem with the Copy Constructor is that, if there is any Dynamic Memory Allocation done for some object,
then for the next object of the same type, when the values of one object are copied to the other object using the
copy constructor, and if there's a pointer initialization, then the pointer will again point to... |
/*******************************************************************\
Module: Bounded Model Checking for ANSI-C
Author: <NAME>, <EMAIL>
\*******************************************************************/
/// \file
/// Bounded Model Checking for ANSI-C
#include "symex_bmc.h"
#include <limits>
#include <util/sim... |
/* -------------------------------------------------------------------------- *
* Simbody(tm): SimTKmath *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
#include <iostream>
#include <iomanip> // setprecision()
using namespace std;
double inputValidate(double, double);
char inputValidate(char);
void getOrderInfo();
void displayOrderInfo(double, double, double = 10.00);
int main()
{
getOrderInfo();
return 0;
}
/*************************************************... |
#include "player_manager.hpp"
#include <iostream>
#include <MediaDecoder.h>
#include <SoundPlayer.h>
#include <SupportKit.h>
media_format* CreateMp3MediaFormat();
media_format CreateRawMediaFormat();
class StreamListener : public BUrlProtocolListener, public BMediaDecoder{
public:
off_t pos;
size_t size;
BMall... |
/* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2018 INRIA.
*
* 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
*
*... |
// ***************************************************************** -*- C++ -*-
/*
* Copyright (C) 2004-2017 <NAME> <<EMAIL>>
*
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as p... |
/**
* @file user_flash_data.cpp
* @author <NAME> (<EMAIL>)
* @brief Initialize, read and write parameters from/to internal flash memory.
* The file used is a new one with the name user_flash_data_name. That
* means there are two files in the nRF52 internal file system. The
* first one is for t... |
/*
* Copyright 2018 The Android Open Source Project
*
* 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 applica... |
#include <../../nrnconf.h>
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <InterViews/resource.h>
#include "nrnoc2iv.h"
#include "cvodeobj.h"
#include "nonvintblock.h"
typedef int (*Pfridot)(...);
extern "C" {
#include "membfunc.h"
#include "neuron.h"
extern int diam_changed;
extern int tree_change... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.