text
stringlengths
54
60.6k
<commit_before>/* * Thread.cpp 15.08.2006 (mueller) * * Copyright (C) 2006 by Universitaet Stuttgart (VIS). Alle Rechte vorbehalten. */ #include "vislib/Thread.h" #ifndef _WIN32 #include <unistd.h> #endif /* !_WIN32 */ #include "vislib/assert.h" #include "vislib/error.h" #include "vislib/IllegalPa...
<commit_before>#ifndef MJOLNIR_CORE_RANDOM_NUMBER_GENERATOR #define MJOLNIR_CORE_RANDOM_NUMBER_GENERATOR #include <random> #include <cstdint> namespace mjolnir { template<typename traitsT> class RandomNumberGenerator { public: using traits_type = traitsT; using real_type = typename traits_type::re...
<commit_before>#include "config.h" #include "yapp.h" #include "aclock.h" const char *ApplicationName = "iceclock"; int main(int argc, char **argv) { YApplication app(&argc, &argv); YClock *clock = new YClock(); clock->show(); return app.mainLoop(); } // vim: set sw=4 ts=4 et: <commit_msg>make it co...
<commit_before>#include <algorithm> #include <cstring> #include <iostream> int blocks[26]; int memo[1000001]; int minimum_blocks(int m, int n) { if (memo[m]) return memo[m]; int i; for (i = 0; i < n; i++) { if (blocks[i] == m) { memo[m] = 1; return memo[m]; } ...
<commit_before>// these tests can only be compiled and executed with availability of // MPI #ifdef STAN_MPI #include <stan/math/prim/arr.hpp> #include <test/unit/math/prim/mat/functor/mpi_test_env.hpp> #include <iostream> #include <vector> MPI_TEST(mpi_cluster, chunk_mapping) { if (rank != 0) return; std::v...
<commit_before>/** @file Conversions.cpp @author Philip Abbet Implementation of the scripting-related conversion functions for the Athena-Core module */ #include <Athena-Scripting/Conversions.h> #include <Athena-Scripting/ScriptingManager.h> #include <Athena-Scripting/Utils.h> #include <Athena-Core/Util...
<commit_before>/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: types.hxx,v $ * * $Revision: 1.2 $ * * last change: $Author: rt $ $Date: 2005-09-08 04:01:08 $ * * The Contents of this file are made ava...
<commit_before>#include <fstream> #include <unordered_map> #include <string> #include <sstream> #include <unordered_map> #include<iostream> using namespace std; int main (int argc, char* argv[]) { // parameters if(argc != 3) { return 1; } const char* inputFile = argv[1]; const char* outputMem = argv[2...
<commit_before>#include "Convolution.hpp" #include "mlo_internal.hpp" mlopenConvolutionDescriptor::mlopenConvolutionDescriptor() : _pad_h(0), _pad_w(0), _u(1), _v(1), _upscalex(0), _upscaley(0) { printf("In convolution Ctor\n"); _mode = mlopenConvolution; } mlopenStatus_t mlopenConvolutionDescriptor::GetForwardOutp...
<commit_before>#ifdef _WIN32 #define _USE_MATH_DEFINES #endif #include <iostream> #include <list> #include "core/Halite.hpp" inline std::istream& operator>>(std::istream& i, std::pair<signed int, signed int>& p) { i >> p.first >> p.second; return i; } inline std::ostream& oper...
<commit_before><commit_msg>Build: fix modules/common/math/... build caused by upgraded osqp<commit_after><|endoftext|>
<commit_before>#include "Convolution.hpp" #include "mlo_internal.hpp" mlopenConvolutionDescriptor::mlopenConvolutionDescriptor() : _pad_h(0), _pad_w(0), _u(1), _v(1), _upscalex(0), _upscaley(0) { printf("In convolution Ctor\n"); _mode = mlopenConvolution; } mlopenStatus_t mlopenConvolutionDescriptor::GetForwardOutp...
<commit_before>// @(#)root/mathmore:$Id$ // Author: L. Moneta Wed Sep 6 09:52:26 2006 /********************************************************************** * * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * ...
<commit_before><commit_msg>random_text_writer: adding tab separator and limiting size better<commit_after><|endoftext|>
<commit_before>#pragma once #include <type_traits> #include <iterator> #include <utility> namespace helene { namespace detail { template <class Iterator, class IteratorTag> constexpr bool is_iterator_of_category_v = std::is_same<typename std::iterator_traits<Iterator>::iterator_category, Iterat...
<commit_before><commit_msg>hooked up more sounds to the menus<commit_after><|endoftext|>
<commit_before>/* * OpenSSL Block Cipher * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ #include <botan/internal/openssl_engine.h> #include <openssl/evp.h> namespace Botan { namespace { /* * EVP Block Cipher */ class EVP_BlockCipher : public BlockCipher { public: void...
<commit_before>#ifndef ASTI_CONSTANT_ITER_HPP #define ASTI_CONSTANT_ITER_HPP #include <iterator> namespace util { template <typename T> struct constant_iterator: std::iterator<std::input_iterator_tag, T> { constant_iterator(T v_,std::ptrdiff_t idx_=0): v(v_), idx(idx_) { } constant_itera...
<commit_before>/*------------------------------------------------------------------------- * drawElements Quality Program EGL Module * --------------------------------------- * * Copyright 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use t...
<commit_before>/* qgvdial is a cross platform Google Voice Dialer Copyright (C) 2010 Yuvraaj Kelkar This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at y...
<commit_before>#include <catch.hpp> #include "Chip8.hpp" #include "CPU.hpp" namespace { using namespace Core8; SCENARIO("CPUs can skip instructions if a register equals a constant value", "[conditional]") { GIVEN("A CPU with some initialized registers") { CPU cpu{}; cpu.writeRegister(Chip8::REGISTER::V1, ...
<commit_before>#include "jaco_custom.h" using namespace std; JacoCustom::JacoCustom(ros::NodeHandle &node){ end_program = false; arm_is_stopped = false; check_arm_status = false; arm_is_stopped_counter = 0; fingers_are_stopped = false; check_fingers_status = false; fingers_are_stopped_co...
<commit_before>// Copyright 2013 The Chromium 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 "gin/public/isolate_holder.h" #include <stdlib.h> #include <string.h> #include "base/files/memory_mapped_file.h" #include "base/...
<commit_before>// Copyright (C) 2016 xaizek <xaizek@openmailbox.org> // // This file is part of uncov. // // uncov is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or /...
<commit_before>//======================================================================= // Copyright (c) 2014-2016 Baptiste Wicht // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //===================================================...
<commit_before>#ifndef MISC_UI_HPP #define MISC_UI_HPP #include <wx/wxprec.h> #ifndef WX_PRECOMP #include <wx/wx.h> #endif #include <wx/filename.h> #include <wx/stdpaths.h> #include <map> #include <utility> #include "Settings.hpp" #include "Log.hpp" #include "Point.hpp" /// Macro to build std::wstring that sl...
<commit_before>/* Copyright (c) 2008, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of condi...
<commit_before>/* Copyright (c) 2005, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of condi...
<commit_before>//Copyright (c) 2019 Ultimaker B.V. #include "GcodeWriter.h" #include "pathOrderOptimizer.h" namespace arachne { GcodeWriter::GcodeWriter(std::string filename, int type, coord_t layer_thickness, float print_speed, float travel_speed, float extrusion_multiplier) : file(filename.c_str()) , type(type) , ...
<commit_before>/* * nextpnr -- Next Generation Place and Route * * Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and thi...
<commit_before>/// @brief Unit test for the allpass filter class /// @author Timothy Place // @copyright Copyright (c) 2017, Cycling '74 /// @license This project is released under the terms of the MIT License. #define CATCH_CONFIG_MAIN #include "c74_min_catch.h" SCENARIO ("Produce the correct impulse response") ...
<commit_before>#pragma once #include <coppa/oscquery/json/parser.detail.hpp> namespace coppa { namespace oscquery { namespace JSON { using val_t = json_value::type; class parser { public: static int getPort(const std::string& message) { using namespace detail; const json_map obj{ message }; ...
<commit_before>/* * Copyright 2007-2019 CM4all GmbH * All rights reserved. * * author: Max Kellermann <mk@cm4all.com> * * 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...
<commit_before>/* * Copyright (C) 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 ...
<commit_before>/*************************************************************************** wpcontact.cpp - description ------------------- begin : Fri Apr 12 2002 copyright : (C) 2002 by Gav Wood email : gav@k...
<commit_before>/** * Appcelerator Titanium - licensed under the Apache Public License 2 * see LICENSE in the root folder for details on the license. * Copyright (c) 2009 Appcelerator, Inc. All Rights Reserved. */ #include <kroll/kroll.h> #include <Poco/Environment.h> #include <Poco/Process.h> #include "process_bind...
<commit_before>#ifndef movement3d_filter_HPP #define movement3d_filter_HPP #include "movement3d.hpp" #include <GL/gl.h> #include <iostream> #include <opencv2/opencv.hpp> class movement3d_average { std::deque<movement3d> _movements; unsigned int _samples = 1; private: public: movement3d_average (u...
<commit_before>/* * Copyright (c) 2013 Nicholas Corgan (n.corgan@gmail.com) * * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt * or copy at http://opensource.org/licenses/MIT) */ #ifndef INCLUDED_PKMNSIM_TYPES_VLA_IPP #define INCLUDED_PKMNSIM_TYPES_VLA_IPP #include <iostream> #includ...
<commit_before>#ifndef V_SMC_CORE_SAMPLER_HPP #define V_SMC_CORE_SAMPLER_HPP #include <vSMC/internal/common.hpp> #include <iostream> #include <map> #include <set> #include <string> namespace vSMC { /// \brief SMC Sampler /// /// \tparam T State state type. Requiment: /// \li Consturctor: T (IntType N) /// \li Method...
<commit_before>#include <gtest/gtest.h> #include "codec_def.h" #include "codec_app_def.h" #include "codec_api.h" #include "wels_common_basis.h" #include "mem_align.h" #include "ls_defines.h" using namespace WelsDec; #define BUF_SIZE 100 //payload size exclude 6 bytes: 0001, nal type and final '\0' #define PAYLOAD_SIZ...
<commit_before>// http://thispointer.com/c-how-to-find-duplicates-in-a-vector/ #include <algorithm> #include <functional> #include <iostream> #include <map> #include <string> #include <vector> // Print the contents of vector template <typename T> void print(T& vecOfElements, std::string delimeter = " , ") { for (au...
<commit_before>/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: string.cxx,v $ * * $Revision: 1.5 $ * * last change: $Author: hr $ $Date: 2007-11-02 17:47:05 $ * * The Contents of this file are made av...
<commit_before>// NanoTexture.cpp // RenderToTexture // // Created by Eric Mika on 2/28/16. // #include "cinder/Log.h" #include "NanoTexture.h" NanoTextureRef NanoTexture::create() { return NanoTexture::create(512, 512); } NanoTextureRef NanoTexture::create(float width, float height) { NanoTextureRef ref = std::s...
<commit_before>#include <cstdlib> #include "game/lane_length_model.h" #include "gflags/gflags.h" #include "jsoncons_ext/csv/csv_reader.hpp" #include "jsoncons_ext/csv/csv_serializer.hpp" DECLARE_string(race_id); DECLARE_bool(print_models); DECLARE_bool(read_switch_models); DECLARE_bool(write_switch_models); using js...
<commit_before>/** \file SimpleXmlParser.cc * \brief A non-validating XML parser class. * \author Dr. Johannes Ruscheinski (johannes.ruscheinski@uni-tuebingen.de) * * \copyright 2015 Universitätsbiblothek Tübingen. All rights reserved. * * This program is free software: you can redistribute it and/or modi...
<commit_before>// ========================================================================== // // This file is part of Sara, a basic set of libraries in C++ for computer // vision. // // Copyright (C) 2013-2016 David Ok <david.ok8@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public // ...
<commit_before>#ifdef HAS_WCSLIB #include "../../include/frame/WCSTransformation.h" #include "../../include/utils/IO.h" #include "../../include/utils/MathHelper.h" #include <wcslib/wcshdr.h> #include <wcslib/wcsfix.h> #include <wcslib/wcs.h> #include <iostream> #include <iomanip> namespace shapelens { WCSTransforma...
<commit_before>#include "i_render.h" #include "renderable_repo.h" #include "sprite_collection.h" #include "platform\filesystem_utils.h" RenderableRepo::RenderableRepo() : RepoBase( mDefaultRenderable ) { Init(); } void RenderableRepo::Init() { ElementMap_t Renderables; fs_utils::for_each( "actors", "....
<commit_before>/* * quickXPlain.cpp * * Created on: 22.03.2015 * Author: Benjamin Musitsch */ #include "QuickXPlain.h" #include "Solver.h" #include <string> // Calculates the preferred conflict out of a number of conflicting literals using the QuickXplain algorithm // Used for debugging INCOHERENT programs...
<commit_before>#include "catch.hpp" #include "util.h" #include <shl_exception.h> #include <grammar_compiler.h> using namespace shl; TEST_CASE("GrammarCompiler Test") { string data = load_string("fixture/valid.json"); GrammarCompiler compiler; Grammar g = compiler.compile(data); compiler.resolve_includ...
<commit_before>#include "replication/backfill_in.hpp" #ifndef NDEBUG // We really shouldn't include this from here (the dependencies are // backwards), but we need it for // master_t::inside_backfill_done_or_backfill. #include "replication/master.hpp" #endif template<class value_t> std::vector<value_t> make_vector(val...
<commit_before>/** * \file StatusFrame.cpp * \brief Main Windows Class */ #include "StatusFrame.h" BEGIN_EVENT_TABLE(StatusFrame,wxFrame) EVT_MENU(ID_NEWSTATUS, StatusFrame::NewStatusWindow) EVT_MENU(ID_NEWGRAPH, StatusFrame::NewGraphWindow) EVT_MENU(-1, StatusFrame::SelectDevice) EVT_CLOSE(Status...
<commit_before>// @(#)root/gui:$Name: $:$Id: TGToolTip.cxx,v 1.7 2003/11/05 13:08:26 rdm Exp $ // Author: Fons Rademakers 22/02/98 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. ...
<commit_before>#ifndef TETRIS_DEFS_HPP_ #define TETRIS_DEFS_HPP_ #include <array> namespace tetris { template <typename T, std::size_t I, std::size_t J> using Matrix = std::array< std::array<T, J>, I>; } /* namespace tetris */ #endif /* TETRIS_DEFS_HPP_ */ <commit_msg>Create Defs.hpp<commit_after>#ifndef TETRIS_DEF...
<commit_before>/* * manager.cpp * * Created on: 23/03/2015 * * ========================================================================= * Copyright (C) 2015-, Daniele De Sensi (d.desensi.software@gmail.com) * * This file is part of AdaptiveFastFlow. * * AdaptiveFastFlow is free software: you can redistrib...
<commit_before>/* Copyright (C) 2016 Martin Albrecht This file is part of fplll. fplll is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any...
<commit_before>/* * Copyright (C) 2015 Luke San Antonio * All rights reserved. */ #include "map.h" #include "../common/grid_iterator.h" namespace game { Terrain make_flat_terrain(int alt, int w, int h) { auto terrain = Terrain{}; for(int i = 0; i < h; ++i) { terrain.altitude.emplace_back(); ...
<commit_before>#include "functions.hpp" ///data base #include <Socket/client/Client.hpp> #include <Socket/server/Server.hpp> #include <Socket/FuncWrapper.hpp> #include <Salamandre-daemon/GuiFunctions.hpp> #include <iostream> #include <list> #define SERVER_PORT 4321 #define PRINT_ERROR std::cout<<"Aucune action cores...
<commit_before>/* * MIT License * * Copyright (c) 2016 xiongziliang <771730766@qq.com> * * 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 limitat...
<commit_before>/* * A wrapper for an async_operation which closes an istream on abort. * * author: Max Kellermann <mk@cm4all.com> */ #include "abort_close.hxx" #include "async.hxx" #include "pool.hxx" #include "istream.h" #include "util/Cast.hxx" struct CloseOnAbort { struct istream *istream; struct async...
<commit_before>#include <ace/Runtime.hpp> #include <stdio.h> #if defined(__unix__) || defined(__APPLE__) || defined(__linux__) #include <dlfcn.h> #define OPEN_LIB(path) dlopen((path), RTLD_LAZY) #define CLOSE_LIB(handle) dlclose((handle)) #define LOAD_LIB_FUNC(handle, func) dlsym((handle), (func)) #e...
<commit_before>#ifndef __CALCULATE_SYMBOL_HPP__ #define __CALCULATE_SYMBOL_HPP__ #include "wrapper.hpp" namespace calculate { template<typename Expression> class Symbol { friend struct std::hash<Symbol>; public: using Type = typename Expression::Type; enum class SymbolType : int { ...
<commit_before>#pragma once /** @file @brief succinct vector @author MITSUNARI Shigeo(@herumi) @license modified new BSD license http://opensource.org/licenses/BSD-3-Clause */ #include <assert.h> #include <vector> #include <cybozu/exception.hpp> #include <cybozu/bit_operation.hpp> #include <cybozu/select8.hpp> #in...
<commit_before>#pragma once /** @file @brief succinct vector @author MITSUNARI Shigeo(@herumi) @license modified new BSD license http://opensource.org/licenses/BSD-3-Clause */ #include <assert.h> #include <vector> #include <cybozu/exception.hpp> #include <cybozu/bit_operation.hpp> #include <cybozu/select8.hpp> #in...
<commit_before>#include "catch.hh" #include "lib/file.h" TEST_CASE("Reading and writing from files works", "[file]") { const std::string testContent = "test"; { auto f = File::fromFileName("test.txt", File::Mode::Write); f->write(testContent.data(), testContent.size()); } { aut...
<commit_before>/** * \file * \brief Thread class header * * \author Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info * * \par License * 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 wi...
<commit_before>/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * 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 ...
<commit_before>/************************************************ * flatten_iterator.hpp * ESA++ * * Copyright (c) 2014, Chi-En Wu * Distributed under The BSD 3-Clause License ************************************************/ #ifndef ESAPP_FLATTEN_ITERATOR_HPP_ #define ESAPP_FLATTEN_ITERATOR_HPP_ #include <m...
<commit_before>/* * Agent.cpp * * The reinforcement learning agent: the core of the project */ #include <vector> #include <chrono> #include <math.h> #include <stdio.h> #include <fstream> #include <string> #include <sstream> #include <algorithm> #include <iostream> #include <Box2D/Box2D.h> #include "Agent.h" #in...
<commit_before>/* Copyright (c) 2003, Arvid Norberg, Daniel Wallin 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, thi...
<commit_before>#include "SkBenchmark.h" #include "SkColorPriv.h" #include "SkMatrix.h" #include "SkRandom.h" #include "SkString.h" #include "SkPaint.h" static float sk_fsel(float pred, float result_ge, float result_lt) { return pred >= 0 ? result_ge : result_lt; } static float fast_floor(float x) { float big ...
<commit_before>/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2011 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public...
<commit_before>/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkBenchmark.h" #include "SkRandom.h" #include "SkTSort.h" #include "SkString.h" static const int N = 1000; static void rand_proc(int array[], int co...
<commit_before>/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2012 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public ...
<commit_before>#include "dsa_common.h" #include "responder.h" #include "module/security_manager.h" #include "core/session.h" #include "message/request/invoke_request_message.h" #include "message/request/list_request_message.h" #include "message/request/set_request_message.h" #include "message/request/subscribe_requ...
<commit_before>#include <assert.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include "test_lib.h" static char TMP_BUFFER[2048]; unsigned int assertions = 0; std::vector<_test_case *> __tests; std::vector<_test_case *> __failed_tests; _test_case *current_test_case(void) { return...
<commit_before>// Copyright (C) 2016 Jonathan Müller <jonathanmueller.dev@gmail.com> // This file is subject to the license terms in the LICENSE file // found in the top-level directory of this distribution. #ifndef TYPE_SAFE_CONFIG_HPP_INCLUDED #define TYPE_SAFE_CONFIG_HPP_INCLUDED #include <cstddef> #include <cstdl...
<commit_before>#include "basicopenglview.h" // this version demonstrates using the mouse to inout some points and draw lines between them BasicOpenGLView::BasicOpenGLView(QWidget *parent) : QGLWidget(parent), polygons(QVector< QVector<QVector3D> >()) { clearon = false; mousedown = false; lastpt = -1...
<commit_before>#include <iostream> #include <opencv2/opencv.hpp> #include <stdio.h> using namespace std; using namespace cv; int main() { Mat frame; VideoCapture cap("frame_%06d.jpg"); VideoWriter writer("created.avi", CV_FOURCC('M','J','P','G'), 30, Size(640, 360)); int i = 0; while(1) { ...
<commit_before>#include "arch/address.hpp" #include "arch/arch.hpp" #include <netdb.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <limits.h> #include <unistd.h> #include "errors.hpp" #include <boost/bind.hpp> ip_address_t::ip_address_t(const char *host) { /* Use hint to make sure we get a...
<commit_before>//////////////////////////////////////////////////////////////////////////// // // Copyright 2015 Realm 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://ww...
<commit_before>// Copyright (c) 2012 The Chromium 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 "net/socket/unix_domain_socket_posix.h" #include <cstring> #include <string> #include <errno.h> #include <sys/socket.h> #inc...
<commit_before>/* * 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/. * * This file is part of zmqpp. * Copyright (c) 2011-2015 Contributors as noted in the AUTHORS fi...
<commit_before>/* * security-manager, database access * * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved * * Contact: Rafal Krypa <r.krypa@samsung.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licens...
<commit_before>#ifndef NETSTAT_HPP #define NETSTAT_HPP #include <string> #include <vector> struct netstat_t { std::string proto; std::string local_address; std::string foreign_address; uint16_t local_port; uint16_t foreign_port; std::string state; std::string pid; }; typedef std::vector<netst...
<commit_before>#include <cassert> #include <iostream> #include "state.h" #include "global.h" #include "partition/partition_table.h" #include "partition/partition_db.h" #include "util/hash.h" #include "util/utilization.h" #include "server_internal.h" static const float kMaximumUtilizationToAcceptDonation = 0.6; stati...
<commit_before>/* * Copyright 2015 Cloudius Systems */ #pragma once #include "core/iostream.hh" #include "core/fstream.hh" #include "types.hh" #include "compress.hh" namespace sstables { class file_writer { output_stream<char> _out; size_t _offset = 0; public: file_writer(file f, size_t buffer_size = ...
<commit_before>/* Copyright 2008 Larry Gritz and the other authors and contributors. All Rights Reserved. Based on BSD-licensed software Copyright 2004 NVIDIA Corp. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:...
<commit_before>// Time: O(|V|+|E|) = O(26 + 26^2) = O(1) // Space: O(|E|) = O(26^2) = O(1) class Solution { public: // Construct the graph. void findEdges(const string &word1, const string &word2, unordered_map<char, vector<char>> *ancestors) { int len = min(word1.length(), word2.le...
<commit_before><commit_msg>added<commit_after><|endoftext|>
<commit_before>#include "powerup.hpp" int Powerup::vertex_type( Vertex& v ) { int num_neighbors = map->getNumActors(); for ( int i = 0; i < num_neighbors; i++ ) { int a, b; map->getActorPosition( i, a, b ); Vertex temp( a, b ); if( temp == v ) { return map->getActorType( i ); } } return 0; } Poweru...
<commit_before>#include "MacroLex.h" #include "CmdInputFactor.h" #include <gtest/gtest.h> #include "IncludeHandler.h" #include "JZLogger.h" //cover case: include TEST(MacroLex, macroInclude1){ int argc = 2; char argv0[128] = {0},argv1[128] = {0}; strcpy(argv0,"tester"); strcpy(argv1,"./test/TestSet/macro_inclu...
<commit_before>#include "WebView.h" namespace CefSharp { namespace Wpf { void WebView::Initialize(String^ address, BrowserSettings^ settings) { if (!CEF::IsInitialized && !CEF::Initialize(gcnew Settings)) { throw gcnew InvalidOperationException("CEF::Initialize() failed"...
<commit_before>#include "PluginManager.h" #include <filesystem> #include <fstream> #include <sstream> #include <Logger/Logger.h> #include <Tools.h> #include "../Helpers.h" #include "../IBaseApi.h" namespace API { PluginManager::PluginManager() { ArkApi::GetCommands().AddOnTimerCallback(L"PluginManager.DetectPlu...
<commit_before>#include "catch.hpp" #include <iostream> #include <exception> // std::bad_function_call, std::runtime_error #include <thread> // std::thread, std::this_thread::yield #include <mutex> // std::mutex, std::unique_lock #include <condition_variable> // std::condition_variable #include <functional> // std::fu...
<commit_before>#ifndef _options_hpp_INCLUDED #define _options_hpp_INCLUDED /*------------------------------------------------------------------------*/ // The 'check' option has by default '0' in optimized compilation, but for // debugging and testing we want to set it to '1', by default. Setting // 'check' to '1' f...
<commit_before>// Copyright (c) 2009 The Chromium 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 "views/controls/tabbed_pane/native_tabbed_pane_win.h" #include <vssym32.h> #include "app/l10n_util_win.h" #include "app/reso...
<commit_before>/**************************************************************************/ /** ** C H I L D ** ** CHANNEL-HILLSLOPE INTEGRATED LANDSCAPE DEVELOPMENT MODEL ** ** OXFORD VERSION 2003 ** ** Designed and created by Gregory E. Tucker, Stephen T. Lanca...
<commit_before>// Copyright 2018 The gVisor 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 applicab...
<commit_before>#ifndef __STAN__AGRAD__REV__AS_BOOL_HPP__ #define __STAN__AGRAD__REV__AS_BOOL_HPP__ #include <stan/agrad/rev/var.hpp> namespace stan { namespace agrad { /** * Return 1 if the argument is unequal to zero and 0 otherwise. * * @param x Value. * @return 1 if argument is equal to ...