text
stringlengths
54
60.6k
<commit_before>/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: image.hxx,v $ * * $Revision: 1.3 $ * * last change: $Author: rt $ $Date: 2005-11-09 13:28:09 $ * * The Contents of this file are made ava...
<commit_before>/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. 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 b...
<commit_before>#include "common.hh" #include <algorithm> #include <cinttypes> #include <iostream> #include <memory> #include <string> #include "auth.hh" // #include "cookies.hh" #include "cgi.hh" #include "config.hh" #include "db.hh" #include "event.hh" #include "event_utils.hh" #include "http.hh" #include "sender_cl...
<commit_before>/** * Copyright (c) 2016-2017 Netflix, 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 * ...
<commit_before>/* BEGIN_COMMON_COPYRIGHT_HEADER * (c)LGPL2+ * * LXQt - a lightweight, Qt based, desktop toolset * https://lxqt.org * * Copyright: 2010-2011 Razor team * Authors: * Alexander Sokoloff <[email protected]> * * This program or library is free software; you can redistribute it * and/or modify...
<commit_before>#include "narf/console.h" #include "narf/path.h" #if defined(__unix__) || defined(__APPLE__) #include <sys/stat.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #endif #ifdef _MSC_VER #include <direct.h> #endif #ifdef __APPLE__ #include <mach-o/dyld.h> #endif #ifdef _WIN32 #include ...
<commit_before><commit_msg>Bugfix: `class Material`: always initialize `openGL_textureID`.<commit_after><|endoftext|>
<commit_before><commit_msg>Bugfix: added missing `#include` line.<commit_after><|endoftext|>
<commit_before>/* * A node that produces creates string messages based on various * factors (events, velocity, etc.) * * Created by Christian Onuogu */ #include "ros/ros.h" #include "std_msgs/String.h" #include "geometry_msgs/Twist.h" #include "nav_msgs/Odometry.h" #include "move_base_msgs/MoveBaseActionGoal.h" ...
<commit_before>/* * Copyright (C) 2009 Toni Gundogdu. * * This file is part of cclive. * * cclive 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 3 of the License, or (at your option) an...
<commit_before>#include <ros/ros.h> #include <moveit/move_group_interface/move_group.h> #include <moveit/planning_scene_interface/planning_scene_interface.h> #include <moveit/planning_scene/planning_scene.h> #include <moveit_msgs/DisplayRobotState.h> #include <moveit_msgs/DisplayTrajectory.h> #include <moveit/wareho...
<commit_before>/* Copyright (c) by respective owners including Yahoo!, Microsoft, and individual contributors. All rights reserved. Released under a BSD (revised) license as described in the file LICENSE. */ #include <sstream> #include <float.h> #include "reductions.h" #include "gd.h" struct oaa{ size_t k; vw* a...
<commit_before>#include <cstdio> #include <cstdlib> #include <cstring> #include <exception> #include <memory> #include <utility> // Linux headers #include <libgen.h> #include <signal.h> #include "handler/feed_document_handler.h" #include "handler/query_handler.h" #include "handler/test_handler.h" #include "index/docum...
<commit_before>#include <test/unit/math/test_ad.hpp> #include <vector> TEST(mathMixMatFun, acosh) { auto f = [](const auto& x1) { using stan::math::acosh; return acosh(x1); }; for (double x : stan::test::internal::common_args()) stan::test::expect_unary_vectorized(x); stan::test::expect_unary_vecto...
<commit_before>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "protocol.h" #include "chainparams.h" #include "util.h" ...
<commit_before>#include <pybind11/pybind11.h> #include <pybind11/stl_bind.h> #include <pybind11/numpy.h> #include <pybind11/eigen.h> #include <pybind11/operators.h> #include <pybind11/functional.h> #include <core.h> #include <space.h> #include <move.h> #include <analysis.h> #include <potentials.h> #include <regions.h>...
<commit_before>/* Resembla https://github.com/tuem/resembla Copyright 2017 Takashi Uemura 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 req...
<commit_before>#include <ros/ros.h> #include <chrono> #include <cstdlib> #include <string> #include <thread> #include "ur_modern_driver/log.h" #include "ur_modern_driver/pipeline.h" #include "ur_modern_driver/ros/action_server.h" #include "ur_modern_driver/ros/controller.h" #include "ur_modern_driver/ros/io_service.h"...
<commit_before>#include "cons_util.hh" #include "env.hh" #include "s_closure.hh" #include "zs_error.hh" SyntacticClosure::SyntacticClosure(Env* e, Lisp_ptr f, Lisp_ptr ex) : env_(e), free_names_(f), expr_(ex){ for(auto i : f){ if(!identifierp(i)){ throw_zs_error(i, "syntactic closure: free-list has a non...
<commit_before>#pragma once /* ** Copyright (C) 2012 Aldebaran Robotics ** See COPYING for the license */ #ifndef _SRC_SIGNAL_P_HPP_ #define _SRC_SIGNAL_P_HPP_ #include <qitype/signal.hpp> #include <boost/thread/thread.hpp> #include <boost/thread/recursive_mutex.hpp> namespace qi { typedef std::map<SignalBase::...
<commit_before>#include <mapbox/geojsonvt/simplify.hpp> #include <deque> namespace mapbox { namespace geojsonvt { // calculate simplification data using optimized Douglas-Peucker algorithm void Simplify::simplify(ProjectedPoints& points, double tolerance) { const double sqTolerance = tolerance * tolerance; ...
<commit_before>/* Luwra * Minimal-overhead Lua wrapper for C++ * * Copyright (C) 2015, Ole Krüger <[email protected]> */ #ifndef LUWRA_COMMON_H_ #define LUWRA_COMMON_H_ extern "C" { #include <lua.h> #include <lualib.h> #include <lauxlib.h> } // Check for proper Lua version #if !defined(LUA_VERSION_NUM) || LUA_VERS...
<commit_before>#include "momentum.h" #include <boost/unordered_map.hpp> #include <iostream> #include <semiOrderedMap.cpp> namespace bts { #define MAX_MOMENTUM_NONCE (1<<26) #define SEARCH_SPACE_BITS 50 #define BIRTHDAYS_PER_HASH 8 std::vector< std::pair<uint32_t,uint32_t> > momentum_search( uint256 midHash ) ...
<commit_before>#include <os> #include <net/inet.hpp> #include <net/util.hpp> #include <stdlib.h> /* uint16_t net::checksum(uint16_t* buf, uint32_t len) { union sum { uint32_t whole; uint16_t part[2]; } sum32{0}; // Iterate in short int steps. for (uint16_t* i = buf; i < buf + len / 2; i++){ ...
<commit_before>/************************************************************************* * * $RCSfile: dsselect.cxx,v $ * * $Revision: 1.9 $ * * last change: $Author: hr $ $Date: 2004-11-09 12:32:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licen...
<commit_before>#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <map> #include <set> #include <stack> #include <cstring> #include <string> #include <vector> #include <iomanip> #include <cmath> #include <list> #include <bitset> using namespace std; #define ll long long #define lson...
<commit_before>#include <cstdlib> #include <cmath> #include <fstream> #include <sstream> #include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <exception> #include <sys/time.h> #include "modules/htmTree.h" #include "modules/kdTree.h" #include "misc.h" #include ...
<commit_before>/* * Copyright (c) 2009, Willow Garage, 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 must retain the above copyright * ...
<commit_before>/* * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information * * This program 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...
<commit_before>/*========================================================================= Program: ORFEO Toolbox Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. See OTBCopyright.txt for details. This software is distr...
<commit_before>/* MIT License Copyright (c) 2017 Alan Tonks 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, merg...
<commit_before>#ifndef DISSENT_CONNECTIONS_CSNETWORK_H_GUARD #define DISSENT_CONNECTIONS_CSNETWORK_H_GUARD #include <QByteArray> #include <QSharedPointer> #include <QVariant> #include "Connections/Connection.hpp" #include "Connections/ConnectionManager.hpp" #include "Connections/ConnectionTable.hpp" #include "Connect...
<commit_before>/* Copyright 2015 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
<commit_before>/*- * Copyright (c) 2012, Achilleas Margaritis * Copyright (c) 2014, David T. Chisnall * 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 m...
<commit_before>// Copyright (c) 2011 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 "chrome/browser/ui/views/tab_contents/native_tab_contents_container_aura.h" #include "chrome/browser/ui/view_ids.h" #include ...
<commit_before>/* * Takes an arbitrary number of tuples as input and calculates the fewest * possible groups of sets whose combined Cartesian product contains exactly * those tuples. * * Copyright (c) 2012, Dennis Hedback * All rights reserved. * * Redistribution and use in source and binary forms, with or w...
<commit_before>// Copyright (c) 2011 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 "chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler.h" #include <map> #include <set> #include <vector> ...
<commit_before>/* * Copyright (C) 2014 Hugh Bailey <[email protected]> * * 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 your option...
<commit_before>/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
<commit_before>// Copyright 2016 AUV-IITK #include <ros/ros.h> #include <image_transport/image_transport.h> #include <opencv2/highgui/highgui.hpp> #include <cv_bridge/cv_bridge.h> #include <sstream> // for converting the command line parameter to integer #include <string> #include <cstdio> #include <iostream> #include...
<commit_before>/* * Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde * 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 ...
<commit_before>#include "himan_unit.h" #include "metutil.h" #define BOOST_TEST_MODULE metutil using namespace std; using namespace himan; const double kEpsilon = 1e-3; BOOST_AUTO_TEST_CASE(LCL_SLOW) { // "slow" calculation of LCL lcl_t LCL = himan::metutil::LCL_(85000,273.15 + 16.5828, 273.15 + -1.45402); BOO...
<commit_before>#include <iostream> #include <iomanip> // << fixed << setprecision(xxx) #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <vector> #include <string> // to_string(nnn) // substr(m, n) // stoi(nnn) #include <complex> #include <tuple> // get<n>(xxx) #include <queue> #include <st...
<commit_before>// Copyright (c) 2013 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/common/node_bindings.h" #include <string> #include <vector> #include "atom/common/api/event_emitter_caller.h" #include "atom/common/api/locker.h" #inclu...
<commit_before>#include "Memory.h" #include <vector> #include <iostream> #include <iomanip> #include <cstdint> #include <cassert> #include <llvm/IR/GlobalVariable.h> #include <llvm/IR/Function.h> #include <llvm/IR/IntrinsicInst.h> #include "Type.h" #include "Runtime.h" #include "GasMeter.h" #include "...
<commit_before>#define DEBUG 1 /** * File : F.cpp * Author : Kazune Takahashi * Created : 2019-6-1 22:04:14 * Powered by Visual Studio Code */ #include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <complex> #include <tuple> #include <queue> #include <stack> ...
<commit_before>/* * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob...
<commit_before><commit_msg>Simplify expression to fix bool/sal_Bool ambiguity<commit_after><|endoftext|>
<commit_before>/* * Copyright (C) 2020 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>/* Title: Bitmap. Generally used by the garbage collector to indicate allocated words Copyright (c) 2006 David C.J. Matthews Based on original code in garbage_collect.c. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser G...
<commit_before>//! \file ************************************************************** //! \brief Source ressource. //! //! - Compilateur : GCC,MinGW //! //! \author Antoine Maleyrie //! \version 0.19 //! \date 30.03.2013 //! //! ******************************************************************** /* * Copyright © 2...
<commit_before>/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
<commit_before>/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
<commit_before>#include <iostream> #include <vector> #include <map> #include <node.h> #include "PSATResult.h" #include "calculator/EstimateFLA.h" using namespace v8; using namespace std; Isolate* iso; Local<Object> inp; double Get(const char *nm) { auto rObj = inp->ToObject()->Get(String::NewFromUtf8(iso,nm)); ...
<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 "webkit/common/resource_type.h" #include "base/logging.h" using blink::WebURLRequest; // static ResourceType::Type Resource...
<commit_before>/* Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required...
<commit_before>/******************************************************************************* * thrill/data/channel.hpp * * Part of Project Thrill. * * Copyright (C) 2015 Timo Bingmann <[email protected]> * Copyright (C) 2015 Tobias Sturm <[email protected]> * * This file has no license. Only Chuck Norris can...
<commit_before>// Copyright (c) 2006-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. // Test of FieldTrial class #include "base/field_trial.h" #include "base/stringprintf.h" #include "testing/gtest/include/gtest/g...
<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>/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.o...
<commit_before>/************************************************************************* * * $RCSfile: process.cxx,v $ * * $Revision: 1.3 $ * * last change: $Author: hro $ $Date: 2001-05-10 15:59:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licen...
<commit_before>#ifndef selection_hh_INCLUDED #define selection_hh_INCLUDED #include "buffer.hh" namespace Kakoune { using CaptureList = Vector<String, MemoryDomain::Selections>; // A selection is a Selection, associated with a CaptureList struct Selection { static constexpr MemoryDomain Domain = MemoryDomain::S...
<commit_before>#ifndef _SDD_DD_NARY_HH_ #define _SDD_DD_NARY_HH_ #include <algorithm> // copy, equal #include <cassert> #include <initializer_list> #include <iosfwd> #include <boost/container/flat_set.hpp> #include "sdd/dd/context_fwd.hh" #include "sdd/dd/definition.hh" #include "sdd/dd/top.hh" namespace sdd { name...
<commit_before>#include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> #include <queue> #include <utility> #include <algorithm> #include <iostream> #include <fstream> #include <errno.h> #include <unistd.h> #include <assert.h> #include "../vowpalwabbit/vw.h" using namespace std; int pairs = 0; i...
<commit_before>#include "button.h" #include "const.h" #include "logger.h" #include "bluetooth.h" namespace button { namespace { //Stores the value of the button pressed or depressed const uint8_t BUTTON_NONE = 65; volatile uint8_t buttonPressed = BUTTON_NONE; //Method to call when the the interrupt...
<commit_before>#include <cstdlib> #include <cmath> #include <fstream> #include <sstream> #include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <exception> #include <sys/time.h> #include "modules/htmTree.h" #include "modules/kdTree.h" #include "misc.h" #include ...
<commit_before>// Copyright (c) 2017-2020 The Bitcoin Core developers // Copyright (c) 2020 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "fs.h" #ifndef WIN32 #include <fcntl.h> #else #ifndef ...
<commit_before>//@ {"targets":[{"name":"serializer.hpp","type":"include"}]} #ifndef TEMPLE_SERIALIZER_HPP #define TEMPLE_SERIALIZER_HPP #include "item.hpp" #include "treenode.hpp" #include <stack> namespace Temple { namespace { template<class Callback> class VisitorBase { public: virtual bool atEnd...
<commit_before>#include <iostream> #include <sys/types.h> #include <dirent.h> #include <errno.h> #include <vector> #include <string> using namespace std; int main(int argc, char** argv) { bool aFlag = false; bool lFlag = false; bool RFlag = false; vector<string> fileParam; // Loops through arguments looking ...
<commit_before><commit_msg>WaE: overriding virtual function declaration not marked 'override'<commit_after><|endoftext|>
<commit_before>#pragma once #include <string> #include <vector> #include <memory> #include "acmacs-base/throw.hh" #include "acmacs-base/range.hh" #include "acmacs-base/timeit.hh" #include "acmacs-chart-2/chart.hh" #include "acmacs-draw/viewport.hh" #include "acmacs-map-draw/point-style-draw.hh" #include "acmacs-map-d...
<commit_before>#include <algorithm> #include <iterator> #include <sstream> #include <string> #include <pybind11/numpy.h> #include <pybind11/operators.h> #include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <gsl/gsl> #include "xchainer/dtype.h" #include "xchainer/error.h" #include "xchainer/scalar.h" nam...
<commit_before>#include <QLabel> #include <QScrollArea> #include <QPixmap> #include <QImage> #include <QMouseEvent> #include <QApplication> #include <math.h> #ifndef QT_NO_WHEELEVENT #include <QWheelEvent> #endif #include <stdio.h> #include "widget.h" Widget::Widget(QWidget *parent) : QWidget(parent) { } Widg...
<commit_before>/* * yosys -- Yosys Open SYnthesis Suite * * Copyright (C) 2012 Clifford Wolf <[email protected]> * (C) 2019 Eddie Hung <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided th...
<commit_before>/* * yosys -- Yosys Open SYnthesis Suite * * Copyright (C) 2012 Clifford Wolf <[email protected]> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission no...
<commit_before>#include <stdio.h> #include <graphics.h> #include <windows.h> #include <stdlib.h> #define panjang 600 #define MAX_INPUT_LEN 15 //typedef struct{ //char *name; //int score; //int lives; //}playerControl; int kursor(int, int, int); void tampilan(); void tampilan2(); void menuutama(); void player1(); v...
<commit_before>/* * menuQA.C * * * Created by schutz on 01/08/08. * Copyright 2008 CERN. All rights reserved. *fQA */ gROOT->Reset("a") ; TControlBar * fQA = NULL ; TControlBar * fDet = NULL ; TControlBar * fHist = NULL ; const Int_t fRun = atoi(gSystem->Getenv("RUNNUM")) ; AliQA * fQAResult = NULL...
<commit_before>#ifndef TEST_MEMORY_CLEANUP #define TEST_MEMORY_CLEANUP #include <mapnik/warning.hpp> MAPNIK_DISABLE_WARNING_PUSH #include <mapnik/warning_ignore.hpp> #if defined(HAVE_LIBXML2) #include <libxml/parser.h> #include <libxml/entities.h> #include <libxml/globals.h> #endif #if defined(HAVE_CAIRO) #include <...
<commit_before>//======================================================================= // Copyright (c) 2014 Baptiste Wicht // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //========================================================...
<commit_before>#include <silicium/bridge.hpp> #include <silicium/consume.hpp> #include <boost/optional.hpp> #include <boost/optional/optional_io.hpp> #include <boost/test/unit_test.hpp> #include <lua.hpp> namespace Si { struct lua_deleter { void operator()(lua_State *L) const { lua_close(L); } }; std::un...
<commit_before>/** * Copyright (c) Sjors Gielen, 2010 * See LICENSE for license. */ #include "perl_callbacks.h" #include "embedperl.h" #include <assert.h> #define MAX_EMBED_PERL 10 // #define DEBUG // Totally thread-unsafe... static EmbedPerl *ePerl[MAX_EMBED_PERL]; static int numEmbedPerl = 0; extern "C" { void...
<commit_before>//======================================================================= // Copyright Baptiste Wicht 2013-2016. // 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) //=================================...
<commit_before>/** * DP */ class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { if(matrix.empty()) return 0; int m = matrix.size(), n = matrix[0].size(); vector<vector<int>> f(m, vector<int>(n)); for (int i = 0; i < n; ++i) f[0][i] = matrix[0][i] == '1'; ...
<commit_before>/* * String, Design * */ class Codec { public: // Encodes a list of strings to a single string. string encode(vector<string>& strs) { string encoded = ""; for (const string& s: strs) { int len = s.size(); encoded += to_string(len) + "/" + s; } ...
<commit_before>#include "stdafx.h" App app; std::string g_type = "mesh"; static float CalcRadius(const Mesh* m) { const Block& b = m->GetRawDatas(); float maxSq = 0; for (auto& it : b.vertices) { float sq = lengthSq(it.xyz); maxSq = std::max(maxSq, sq); } return std::sqrt(maxSq); } App::Ap...
<commit_before>#include "extconfig.h" #include <utility> #include <Eigen/Cholesky> #include <cmath> /* * Member function definitions of TSEncoder template class. * See tsencoder.h for template class declaration. */ template <size_t M, size_t N, size_t O> TSEncoder<M, N, O>::TSEncoder(const TSEncoderConfig& config)...
<commit_before>#ifndef UI_UILAYER_HPP #define UI_UILAYER_HPP #include "SDL.h" namespace UI { class Layer { public: static Layer *front; virtual ~Layer(); virtual void handleEvent(SDL_Event const &evt); virtual void draw(); }; } #endif <commit_msg>Fixed header guards on ui/layer.hpp.<commit_after>#ifn...
<commit_before>/* * Copyright 2007-2017 Content Management AG * All rights reserved. * * author: Max Kellermann <[email protected]> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source...
<commit_before>/** * @file uuid.cc * @author Bartek Kryza * @copyright (C) 2017 ACK CYFRONET AGH * @copyright This software is released under the MIT license cited in * 'LICENSE.txt' */ #include "uuid.h" #include "base64.h" #include <spdlog/fmt/fmt.h> namespace one { namespace client { namespace util { namesp...
<commit_before>/** * Copyright (C) 2012 by INdT * Copyright (C) 2014 Bacon2D Project * * This program 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 * of the License, or (at you...
<commit_before>// This file is part of the "x0" project, http://github.com/christianparpart/x0> // (c) 2009-2017 Christian Parpart <[email protected]> // // Licensed under the MIT License (the "License"); you may not use this // file except in compliance with the License. You may obtain a copy of // the Licens...
<commit_before>/** * Copyright (c) 2015 - The CM Authors <[email protected]> * All Rights Reserved. * * This file is CONFIDENTIAL -- Distribution or duplication of this material or * the information contained herein is strictly forbidden unless prior written * permission is obtained. */ #include <stdlib.h...
<commit_before>#pragma once #include <utility> namespace zbs { template <typename T> class func; template <typename R, typename ...Args> class func<R (Args...)> { static R _invoke_func(void *data, Args &&...args) { auto fp = reinterpret_cast<R (*)(Args...)>(data); return (*fp)(std::forward<Args>(args)...); } ...
<commit_before>#ifndef SUCCINCT_GRAPH_SG_HPP #define SUCCINCT_GRAPH_SG_HPP #include <iostream> #include <fstream> #include <map> #include "cpp/vg.pb.h" #include "sdsl/bit_vectors.hpp" #include "sdsl/enc_vector.hpp" #include "sdsl/dac_vector.hpp" #include "sdsl/vlc_vector.hpp" #include "sdsl/wavelet_trees.hpp" //#inclu...
<commit_before>#include "CountCompleteTreeNodes.hpp" int CountCompleteTreeNodes::countNodes(TreeNode* root) { if (root == nullptr) return 0; if (root->left == nullptr) return 1; if (root->right == nullptr) return 2; TreeNode* ln = root; int ld = 0; while (ln != nullptr) { ld++; ln =...
<commit_before>/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2012 Scientific Computing and Imaging Institute, University of Utah. License for the specific language governing rights and limitations under Permission is hereby granted, free of charge, ...
<commit_before>// {{{ Copyright notice /* Copyright (c) 2007-2009, Adam Harvey * * 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 ...
<commit_before>/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2012, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided tha...
<commit_before> class Solution { public: /** * @param heights: a vector of integers * @return: an integer */ int maxArea(vector<int> &height) { int max = 0, area; int start = 0, end = height.size() - 1; // substructure // perfect attribute // minimum bord...
<commit_before>/* * Copyright(c) Sophist Solutions, Inc. 1990-2014. All rights reserved */ #include "../StroikaPreComp.h" #include "../Characters/SDKString.h" #include "../Characters/String_Constant.h" #include "../Characters/Tokenize.h" #include "CommandLine.h" using namespace Stroika::Foun...