text
stringlengths
3.08k
12.5k
#include "utils.h" #include <pthread.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "trie.h" char last_modified_time[50]; int connect_to_sql(MYSQL** mysql) { *mysql = mysql_init(NULL); assert(*mysql != NULL); unsigned int timeout = 3000; mysql_options(*mysql, MYSQL_OPT_CONNECT...
// // Copyright © 2019 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include "inference_test_image.hpp" #define STB_IMAGE_IMPLEMENTATION #include "../third-party/stb/stb_image.h" #define STB_IMAGE_RESIZE_IMPLEMENTATION #include "../third-party/stb/stb_image_resize.h" #define STB_IMAGE_WRITE_IMPL...
/* * main.cpp * * Created on: Mar 10, 2015 * Author: <NAME> */ #include "parallel_ts_compressor.hpp" #include "time_series_reader.hpp" #include "core/logger.h" #include "core/config.hpp" #include "util/generator/cuda_array_generator.hpp" #include <signal.h> #include <boost/bind.hpp> #define DEFAULT_GENERATE_SIZE...
/* * Checks the speeds of several TND calculations. */ #include <cstdlib> #include <cstdio> #include <ctime> #include <cstdint> #include <unistd.h> #include "fast_math.h" #include "tay_math.h" #include "normal_math.h" #include "finv_math.h" typedef float tnd_t(size_t t, size_t n, size_t d); void test_mixer(tnd_t *f...
/* Copyright (C) 2006 Imperial College London and others. Please see the AUTHORS file in the main source directory for a full list of copyright holders. Dr <NAME> Applied Modelling and Computation Group Department of Earth Science and Engineering Imperial College London <EMAIL> This library is free software...
/* Copyright (c) 1999 - 2010, Vodafone Group Services Ltd 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 condit...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <cmath> #include <queue> using namespace std; const int di[] = { -1, 0, 1, 0 }; const int dj[] = { 0, 1, 0, -1 }; inline double sqr(double x...
///////////////////////////////////////////////////////////////////////////// // Name: readshg.cpp // Purpose: Petr Smilauer's .SHG (Segmented Hypergraphics file) reading // code. // Note: .SHG is undocumented (anywhere!) so this is // reverse-engineering // ...
#include <dart/dart.hpp> #include <Configuration.h> #include <PnC/AtlasPnC/AtlasDefinition.hpp> #include <PnC/AtlasPnC/StateEstimator/BasicAccumulation.hpp> #include <Utils/IO/DataManager.hpp> #include <Utils/IO/IOUtilities.hpp> BasicAccumulation::BasicAccumulation() : filtered_acc_(3) { myUtils::pretty_construct...
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<vector> #define ri register int #define ll long long using namespace std; const int Maxn=60005; int P[Maxn]; bool vst[Maxn]; class BigInt { public: static const int BA...
#include "cbase.h" #include "asw_vgui_fast_reload.h" #include "c_asw_player.h" #include "c_asw_marine.h" #include "c_asw_weapon.h" #include <vgui/ISurface.h> #include "cdll_bounded_cvars.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" CASW_VGUI_Fast_Reload::CASW...
#include "Context.hpp" #include <sqlite3.h> #include <cstring> #include <fstream> #include <sstream> #include <stdio.h> #include <unistd.h> #include <dirent.h> #include <sys/stat.h> #include <algorithm> #include "../Commands/TableExistsCmd.hpp" #include "../Commands/TableCountCmd.hpp" #include "../Commands/StaticUpda...
// Copyright 2018 The Dawn 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 agreed t...
/*************************************************************************** * * @license * Copyright (C) Codeplay Software Limited * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *...
/* PULSE - process a pulse wave signal with an IIR filter bank First, call setup to configure the filter bank: setup(cf1, bw1, gain1, cf2, bw2, gain2, ...) Each filter has a center frequency (cf), bandwidth (bw) and gain control. Frequency can be in Hz or oct.pc. Bandwidth is in Hz, or if negative, is a...
#include "Citizen.h" #include <algorithm> #include <cmath> #include <numeric> #include <random> #include <unordered_map> static std::random_device rd; static std::mt19937 mt(rd()); Citizen::Citizen(const std::string& cipher, const std::array<int, NUMBER_OF_ROTORS_INSTALLED>& rotorNumbers, const std::array<int, NUMBE...
// // Debug_iOS.cpp // DebugUtil // // Created by <NAME> on 07/13/11. // // This code is distributed under the terms of the MIT license. // // Copyright (c) 2011-2017 <NAME>. // #include "Debug_iOS.hpp" #include <string> using namespace std; #include <iomanip> // for std::setw(int) #include <sstream> // for std::ost...
// // Copyright 2018 <NAME> <<EMAIL>> // Distributed under the Boost Software License, Version 1.0. // // See accompanying file LICENSE in the project root directory // or copy at http://www.boost.org/LICENSE_1_0.txt // #include <iostream> #include <string> #include <vector> #include <ostream> #include <sstream> #incl...
// (C) Copyright <NAME> 2001-2005. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile: const_string_test.cpp,v $ ...
/* * (C) 2009 <NAME> * * Distributed under the terms of the Botan license */ #include <fstream> #include <iostream> #include <sstream> #include <boost/regex.hpp> #include <botan/botan.h> #include <botan/eax.h> using namespace Botan; namespace { unsigned from_string(const std::string& s) { std::istringstream ...
// avr boards have just one led plugged to digital only pin. // we'll use software pwm for them // msp430 launchpad have 2 leds and 2 buttons // stellaris launchpad have one RGB led and two buttons // rfduino have one RGB led and two buttons on RGB shield #include "platform.h" #ifdef __AVR__ #include "AnyPWM.h" #en...
/********************************************************************** Sensor.cpp COPYRIGHT (c) 2013-2016 <NAME> Part of DCC++ BASE STATION for the Arduino **********************************************************************/ /********************************************************************** DCC++ BASE STAT...
///////////////////////////////////////////////////////////////////////////////// // // SourceFile: FindProxy.cpp // // Marlin Server: Internet server/client // // Copyright (c) 2014-2022 ir. <NAME> // All rights reserved // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this sof...
#include <gflags/gflags.h> #include <stddef.h> #include <algorithm> #include <chrono> #include <cmath> #include <iostream> #include <map> #include <memory> #include <random> #include <string> #include <utility> #include <vector> #include "ncode/common.h" #include "ncode/file.h" #include "ncode/logging.h" #include "nco...
// ------------------------- OpenPose Calibration Toolbox ------------------------- // Check `doc/modules/calibration_module.md`. // Implemented on top of OpenCV. // It computes and saves the intrinsics parameters of the input images. // C++ std library dependencies #include <chrono> // `std::chrono::` functions and c...
/** ** Copyright (c) 2011-2014 Illumina, Inc. ** ** This file is part of the BEETL software package, ** covered by the "BSD 2-Clause License" (see accompanying LICENSE file) ** ** Citation: <NAME>, <NAME> and <NAME> ** Lightweight BWT Construction for Very Large String Collections. ** Proceedings of CPM 2011, p...
/* Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR...
//===-- ModuleUtils.cpp - Functions to manipulate Modules -----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
#include <cstdio> #include <vector> #include <cstring> #include <algorithm> const int N = 15; const int MAXM = 21; const char NAME[2][10] = {"white", "black"}; int n, map[MAXM][MAXM]; bool checkWin(int x, int y, int c) { int tL = 1, tR = 1, tU = 1, tD = 1, tLU = 1, tRU = 1, tLD = 1, tRD = 1; for (int i = x - 1; i ...
/* * Copyright 2019-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
/** Copyright (c) 2018 Gombe. This software is released under the MIT License. http://opensource.org/licenses/mit-license.php */ #include "matrix4.hpp" Matrix4 loadPerspective(float fovy,float aspect,float zNear,float zFar,int width,int height){ Matrix4 m; const float dz(zFar - zNear); (void)width; (void)heig...
/* ** Copyright (C) 1998-2010 <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...
// Copyright 2015 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 applicable l...
/******************************************************************************* * Project: libopencad * Purpose: OpenSource CAD formats support library * Author: <NAME>, mush3d at gmail.com * Author: <NAME>, <EMAIL> * Language: C++ ****************************************************************************...
#include "VPICHeader.h" ////////////////////////////////////////////////////////////////////////////// // // Header information for every complete file where each time step has // a file for each processor which ran the original application // ///////////////////////////////////////////////////////////////////////////...
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation the rights to ...
/* CFont * * Copyright (C) 2003-2004, <NAME> <<EMAIL>> * Modified by <NAME> <<EMAIL>> */ #include "Font.h" #include "../Managers/MediaPathManager.h" #include "../Math/MathUtils.h" #include "../Tools/Logger.h" #include "../Tools/Timer.h" CFont::CFont() { fontBaseRange = 0; fontHeight = 0; memset(spaces, 0...
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2008 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
#include "selfdrive/ui/replay/route.h" #include <QEventLoop> #include <QJsonArray> #include <QJsonDocument> #include <QRegExp> #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/api.h" #include "selfdrive/ui/replay/util.h" bool Route::load() { if (data_dir_.isEmpty()) { return loadFromServer(); } e...
/*************************************************************************/ /* */ /* Centre for Speech Technology Research */ /* University of Edinburgh, UK */ /* ...
#include "RenderBatchOpenGL.h" bool RenderBatchOpenGL::DrawQuad(const RenderObject & ro) { bool translate = ro.translateWithCamera; //OpenGL renders starting from the Bottom left working around counter clockwise //Top left vq.points[0].position.x = ro.x; vq.points[0].position.y = ro.y; vq.points[0].colour = c1...
/* * Copyright 2020 OmniSci, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
/* -------------------------------------------------------------------------- * * OpenSim: WeldConstraint.cpp * * -------------------------------------------------------------------------- * * The OpenSim API is a toolkit for musculoskeletal modeling and simulation. * ...
/** ****************************************************************************** * @file VPS2535H.cpp * @author ADG * @version V1.0.0 * @date 08-May-2020 * @brief implementatio for VPS2535H driver class ****************************************************************************** * @attention * * ...
#include "FluidApplication.hpp" #include <iostream> #include <SDL/SDL_mouse.h> using namespace std; const string vertex = R"( attribute vec4 vPosition; varying vec2 fPos; void main() { fPos = vPosition.xy; float x = vPosition.x; float y = vPosition.y; gl_Position = vec4(2.0*x-1.0,...
#include <iostream> #include <stdlib.h> #include<vector> #include <fstream> #include <cstdlib> #include <conio.h> using namespace std; struct student { string imie; string nazwisko; string plec; string pesel; string numer_ind; }; struct bazaStudentow { vector<student> all_students = vector<stu...
/* \author <NAME>*/ #include <DQM/RPCMonitorClient/interface/RPCOccupancyTest.h> #include "DQM/RPCMonitorClient/interface/RPCRollMapHisto.h" #include "DQM/RPCMonitorClient/interface/utils.h" // Framework #include "FWCore/MessageLogger/interface/MessageLogger.h" //Geometry #include "Geometry/RPCGeometry/interface/RPCG...
#include <algorithm> #include <iostream> #include <vector> #include <queue> #include <map> #include "battle.hpp" #include "creature.hpp" #include "dialogue.hpp" BattleEvent::BattleEvent(Creature* source, Creature* target, BattleEventType type) { this->source = source; this->target = target; this->type = type; } i...
/* * $Id: TransportReactorTask.cpp 6896 2015-01-29 21:26:34Z wilsonj $ * * * Distributed under the OpenDDS License. * See: http://www.opendds.org/license.html */ #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/ #include "TransportReactorTask.h" #if !defined (__ACE_INLINE__) #include...
#include <uWS/uWS.h> #include <algorithm> #include <fstream> #include <iomanip> #include <iostream> #include <memory> #include <string> #include <vector> #include "Eigen-3.3/Eigen/Core" #include "Eigen-3.3/Eigen/QR" // #include "helpers.h" #include "json.hpp" #include "spline.h" #include "trajectory.h"...
// Copyright (c) 2009-2018 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. // Maintainer: joaander #include "TwoStepLangevinBase.h" #ifdef ENABLE_MPI #include "hoomd/HOOMDMPI.h" #endif namespace py = pybind11; using namespace std;...
#include "DQM/L1TMonitorClient/interface/L1EmulatorErrorFlagClient.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/MessageLogger/interfac...
// OpenSimLive.cpp : This file contains the 'main' function. Program execution begins and ends there. #include <OpenSimLiveConfig.h> #include <OpenSim.h> #include <IMUPlacerLive.h> #include <IMUInverseKinematicsToolLive.h> #include <Server.h> #include <DelsysDataReader.h> #include "conio.h" // for non-ANSI _kbhit() an...
/* Copyright 2020 <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, distribute, sublicense,...
#include <bits/stdc++.h> using namespace std; /**********************************Dijstra using adj list **********************************/ // In metric representation: condition is different for which dist[v] populating, // Dijkstra's -> dist[v] = dist[u] + graph[u][v] // Prim's ---> dist[v] = graph[u][v] // One is ...
#include "gurka.h" #include "test.h" #include <gtest/gtest.h> using namespace valhalla; /*************************************************************/ TEST(Standalone, avoid_service) { // Test to make sure bicycle routes do not use highway:service to cut // corners near intersections const std::string ascii_m...
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2009 <NAME> http://bulletphysics.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 a...
#include "ps2_keyboard.hpp" #include <cassert> #include "scancode_set_2.hpp" #include <cstdlib> ps2_keyboard::ps2_keyboard(logging::logger& in_log, ps2_controller& in_ps2, scancode_set& in_scancode_set) : _log(in_log), _ps2(in_ps2), _cur_scancode_set(in_scancode_set) { _cur_state = _state::IDLE; } // TODO: Th...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <utility> using namespace std; typedef pair<int, int> pii; class SquareCode { public: vector <string> completeIt(vector <string> grille) { ...
// // FILE NAME: CIDBuild_ToolsDriver_Win32.Cpp // // AUTHOR: <NAME> // // CREATED: 04/10/1999 // // COPYRIGHT: Charmed Quark Systems, Ltd @ 2019 // // This software is copyrighted by 'Charmed Quark Systems, Ltd' and // the author (<NAME>.) It is licensed under the MIT Open Source // license: // // https://opensour...
/* * BM3D denoising filter - VapourSynth plugin * Copyright (c) 2015-2016 mawen1250 * * 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 rig...
// TODO This includes the precompiled header. Change this to whatever is relevant for your project. #include "TestProject.h" #include "Async/Async.h" #include "Engine/Texture2D.h" #include "Misc/FileHelper.h" #include "Modules/ModuleManager.h" #include "ImageLoader.h" #include "IImageWrapper.h" #include "IImageWrappe...
/**Kattis - logo2 * I hate computational geometry. This took damn long, intially i didn't want to brute force * the angles, but doing that proved to be less prone to bugs and what not. Also i had to * adjust the EPS to 1e-8 rather than 1e-9, which was a bit of a pain to debug. * * In the case of the query being ...
// // Copyright (c) 2016, Scientific Toolworks, Inc. // // This software is licensed under the MIT License. The LICENSE.md file // describes the conditions under which this software may be distributed. // // Author: <NAME> // #include "BlameEditor.h" #include "BlameMargin.h" #include "FindWidget.h" #include "...
/***************************************************************************************/ /* DE-structor */ MGC::~MGC () { } /***************************************************************************************/ /***************************************************************************************/ /* put incom...
/* This file tests various syntax aspects of a Cigrid parser. */ // Note that this include statment should be ignored #include <stdio.h> //Empty function (S) void empty(){ } // Test one integer paramter and return statement (S) int one_param_return(int x){ return x; } // Test two parameters (S) int two_pa...
/* Two kinds of hard MDP problems defeat commonly used RL algorithms like Q-learning. (1) Antishaping. If rewards in the vicinity of a start state favor staying near a start state, then reward values far from the start state are irrelevant. The name comes from "reward shaping" which is typically used to ma...
/////////////////////////////////////////////////////////////////////////////// // Copyright <NAME> 2017 - 2020. // Distributed under the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // #include <cmath> #include <cstdfloat> #incl...
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Charts module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:GPL$ ** Commercial License Usage ** Licensees holding valid comme...
#include <stdio.h> #include <stdlib.h> // FrogPart - Head, Foot // enum FrogPart { H, F }; // enum FrogColor { R, Y, B, G }; typedef char FrogPart; typedef char FrogColor; struct Frog { FrogColor color; FrogPart part; }; const int TOP = 0; const int RIGHT = 1; const int BOTTOM = 2; cons...
// Copyright <NAME> 2018 - 2022. // Distributed under the Boost Software License, Version 1.0. // // tcbackup.cpp - tsm #include "pch.h" #pragma hdrstop using namespace std; using namespace std::chrono; using namespace Dim; /**************************************************************************** * * Declarati...
/*************************************************************************** * tests/algo/test_ksort_all_parameters.cpp * * Part of the STXXL. See http://stxxl.sourceforge.net * * Copyright (C) 2002 <NAME> <<EMAIL>> * Copyright (C) 2008 <NAME> <<EMAIL>> * * Distributed under the Boost Software License, Ver...
// -*- C++ -*- // // Package: ConfigurableAnalysis // Class: ConfigurableAnalysis // /**\class ConfigurableAnalysis ConfigurableAnalysis.cc CommonTools/UtilAlgos/src/ConfigurableAnalysis.cc Description: <one line class summary> Implementation: <Notes on implementation> */ // // Original Author: <NAME>...
/* * Main.cpp * * Created on: 13 Jan 2010 * Author: db434 */ #include <systemc.h> #include <stdio.h> #include "Utility/Arguments.h" #include "Utility/BlockingInterface.h" #include "Utility/Debugger.h" #include "Utility/Instrumentation/IPKCache.h" #include "Utility/Instrumentation.h" #include "Utility/Instr...
/** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "mcts/mcts.h" #include <chrono> using namespace mcts; Action pickBestAction(int rootPlayerId, ...
// // Copyright (C) 2007 Technische Universitaet Berlin (TUB), Germany, Telecommunication Networks Group // Copyright (C) 2007 Technische Universiteit Delft (TUD), Netherlands // Copyright (C) 2007 Universitaet Paderborn (UPB), Germany // // Documentation for these modules is at http://veins.car2x.org/ // // SPDX-Licen...
/* * Copyright (C) 2005-2013 Team XBMC * http://xbmc.org * * 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, or (at your option) * any later version. * * ...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <X11/Xlib.h> #include <X11/XKBlib.h> enum KeyState { OFF = 0, RELEASE = 1, PRESS = 2, HOLD = 3 }; extern KeyState keyStates[256]; extern int currMouseX; extern int currMouseY; extern int mouseState; void RunFrame(); void InitText(const char* ...
#include "alloy/extra/win32-bindings/win32_filesystem_monitor.hpp" #include "alloy/core/utilities/aligned_storage.hpp" #include "alloy/core/intrinsics.hpp" #include "windows.hpp" #include <vector> #include <map> #include <string> #include <codecvt> #include <locale> namespace { struct watch_handle { ::HANDL...
#include "scenemanager.h" #include "actor.h" #include "logger.h" // #include "soundmanager.h" //#include "hoppersounds.h" #include "explosionmanager.h" CActor::CActor(Ogre::String name, Ogre::String modelname ) { //:Ogre::SceneNode(CSceneManager::getInstance(), name) { mSceneManager=CSceneManager::getInstance()...
#include <gtest/gtest.h> #include <ocs2_core/Types.h> #include <ocs2_core/misc/LinearAlgebra.h> #include <ocs2_core/misc/randomMatrices.h> using namespace ocs2; using namespace LinearAlgebra; TEST(LLTofInverse, checkAgainstFullInverse) { const size_t n = 10; // matrix size const scalar_t tol = 1e-9; // C...
#define _CRT_SECURE_NO_WARNINGS #include "Client_references.h" bool DEBUG_MODE = false; bool terminated = false; IPaddress ip; TCPsocket socket; SDLNet_SocketSet socketSet = SDLNet_AllocSocketSet(1); SDL_mutex *mutex = SDL_CreateMutex(); char* msg; int recvSize = 0; int startPos = 0; int endPos = 0; const shor...
// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <chrono> #include <condition...
#include "foundation_AMOS.hh" #include "amp.hh" #include "fasta.hh" using namespace AMOS; using namespace std; string OPT_BankName; string OPT_EIDFile; string OPT_IIDFile; string OPT_scaffeid; int OPT_scaffiid; void PrintUsage (const char * s) { cerr << "\nUSAGE: " << s << " [options] <bank path>\n\n"; } //...
// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
#include <sys/types.h> #include <sys/socket.h> #include <iostream> #include <stdio.h> #include <stdlib.h> #include <set> #include <string.h> #include <microhttpd.h> #include <zlib.h> #include <unordered_set> #define PORT 7777 #define POSTBUFFERSIZE 1000000 char * response = (char *) "OK\r\n"; char * bad_r...
/* ================================================================ * * AtlasWerks Project * * Copyright (c) <NAME>, <NAME>, <NAME>, * <NAME>. All rights reserved. See Copyright.txt or for details. * * This software is distributed WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or ...
//****************************************************************** // // Copyright 2018 OHSUNG ELECTRONICS All Rights Reserved. // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance ...
#include "SphereFitting.hpp" SphereFittingProblem::SphereFittingProblem(){ setNbParams(4); setNbMinSamples(4); } SphereFittingProblem::~SphereFittingProblem(){ } void SphereFittingProblem::setData(std::vector<double> & x, std::vector<double> & y, std::vector<double> & z) { points.clear(); for (int i...
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> int read_table3 (const char *fname, int maxrow, double *col1, double *col2, double *col3); int read_table3 (const char *fname, int maxrow, double *col1, double *col2, double *col3) { FILE *f; double x, y, z; char line[1024]; int ilin...
#include <locale> #include <stdlib.h> #include <signal.h> #include <functional> #include "quanta.h" extern "C" { #include "lua.h" #include "lauxlib.h" } #include <fmt/core.h> #if WIN32 #include <conio.h> #include <windows.h> #define setenv(k,v,o) _putenv_s(k, v); #else #include <fcntl.h> #include <unistd.h>...
#pragma once #include "functions.hpp" #include "gnuplot.hpp" #include "plot_data.hpp" #include "tmp_fstream.hpp" #include <array> #include <chrono> #include <stdexcept> #include <thread> #include <tuple> namespace comp::config { enum { STEP_LIMIT = 21 }; constexpr static double x0 = 5.0; }; // namespace comp::...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "stdio.h" #include "TestCommon.h" #include "nsCOMPtr.h" #include "nsIServiceManager.h" #include "nsICompo...
#include "viewer/colors/colors.hh" #include "viewer/interaction/ui2d.hh" #include "viewer/primitives/simple_geometry.hh" #include "viewer/window_3d.hh" #include "eigen_helpers.hh" namespace maxwell { using Vec3 = Eigen::Vector3d; using Complexd = std::complex<double>; constexpr double C_MPS = 10.0; constexpr double...
// Copyright (c) 2015 fjz13. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. #include "MedusaPreCompiled.h" //SIREN_BODY_INCLUDE_BEGIN #include "SingleStrokeLibrary.h" //SIREN_BODY_INCLUDE_END MEDUSA_BEGIN; SingleStrokeLibrary::SingleStrokeL...
/* main.cpp - VCV Rack src/main.cpp replacemet for JSON catalog h4x. howto: clone rack, replace src/main.cpp, make as usual, then rename Rack to r4xh4x todo: clean up/simplify as time allows */ #include "util/common.hpp" #include "app.hpp" #include "plugin.hpp" #include <unistd.h> #include <iostream> #include <sys...
#include <avr/io.h> #include <avr/interrupt.h> #include <avr/wdt.h> #include <avr/sleep.h> #include <!cpp/Random/XorShift32.h> #include <!cpp/bitManipulations.h> #include <!cpp/common.h> #include "common.h" enum { timeQuant = 2000UL / 256, eth1Port = 0, eth2Port = 1, eth3Port = 2, wlanPort = 3, modemPort = 4,...
// system include files #include <memory> // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #...
/* <orly/data/twitter_ego.cc> Generates a core-vector file for twitter EGO-network. Copyright 2010-2014 OrlyAtomics, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http:...
//===================================================================== // Copyright 2016 (c), Advanced Micro Devices, Inc. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the So...