text
string
size
int64
token_count
int64
// // UIButtonLoader.cpp // Clover // // Created by C218-pc on 15/6/29. // // #include "UIButtonLoader.h" #include "UIButton.h" #include "UIHelper.h" cocos2d::Node * UIButtonLoader::createObject(rapidjson::Value & config) { return uilib::Button::create(); } bool UIButtonLoader::setProperty(cocos2d::Node *p, c...
3,545
1,095
/*========================================================================= Program: Visualization Toolkit Module: vtkExternalOpenGLRenderer.cxx Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This...
5,565
1,885
#include "../src/uWS.h" #include "addon.h" //#include "http.h" void Main(Local<Object> exports) { isolate = exports->GetIsolate(); exports->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "server").ToLocalChecked(), Namespace<uWS::SERVER>(isolate).object); exports->Set(isolate->GetCurrentCo...
1,071
391
// // Created by xmac on 18-10-22. // #include "../include/unp.h" void dg_cli(FILE* fp, int sockfd, const SA* servaddr, socklen_t addrlen) { int n; int recvline[MAXLINE], sendline[MAXLINE]; while(Fgets(sendline, MAXLINE, fp) != NULL) { Sendto(sockfd, sendline, strlen(recvline), 0, servaddr, addrl...
426
180
// HomeWork220126.cpp : 이 파일에는 'main' 함수가 포함됩니다. 거기서 프로그램 실행이 시작되고 종료됩니다. // #include <iostream> class MyInt { public: int Value; public: MyInt(int _Value) : Value(_Value) { } MyInt& operator++() { Value += 1; return *this; } MyInt operator++(int) { ...
1,099
888
/* ** v_palette.cpp ** Automatic colormap generation for "colored lights", etc. ** **--------------------------------------------------------------------------- ** Copyright 1998-2006 Randy Heit ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without ** modification, are permitt...
13,424
6,054
#include <iostream> // #include <gmock/gmock.h> #include <gtest/gtest.h> #include "checker.h" ///////////////////////////////////////////////////////////// //fixture class for parameters class RangeCheckerFixture: public testing::TestWithParam<double>{ public: RangeCheckerFixture() = default; protected: RangeC...
1,004
301
/* * Copyright (c) 2016, Google Inc. * All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/perf_data_converter.h" #include <algorithm> #include <deque> #include <map> #include <sstream> #include <utility> #include <vector> #...
30,478
9,704
#include "../hook/responsive_hooks.h" #include "radio_check_button_control_group.h" cwin::control::radio_group::radio_group(){ insert_object<hook::contain>(nullptr); } cwin::control::radio_group::radio_group(tree &parent) : radio_group(parent, static_cast<std::size_t>(-1)){} cwin::control::radio_group::radio_grou...
991
360
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
7,445
2,428
// Attached: HW_3a, 3b, 3c // =========================================================== // Project: HW_3b // =========================================================== // Programmer: Mark Norem // Class: CMPR 131 // =========================================================== #include "SortedList.h" void showMenu()...
1,509
570
/* Copyright 2020 The OneFlow 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 applicable law or agre...
2,762
1,042
/* * Copyright (C) 2018 Microchip Technology Inc. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 */ #include "pages.h" #include "settings.h" #include "window.h" #include <chrono> using namespace egt; using namespace std; ThermostatWindow::ThermostatWindow() { auto hsizer = make_shared<BoxSizer>...
3,507
1,245
#include "processcreate.h" #include "ui_processcreate.h" #include <QDebug> ProcessCreate::ProcessCreate(QWidget *parent) : QWidget(parent), ui(new Ui::ProcessCreate) { ui->setupUi(this); this->setWindowTitle("创建进程 - PowerSimulator"); this->setFixedSize(this->width(),this->height()); this->setWi...
2,107
781
/// \file /// \brief Contains definition of parallel_execution_policy. /// #pragma once #include <agency/detail/config.hpp> #include <agency/execution/executor/parallel_executor.hpp> #include <agency/execution/execution_agent.hpp> #include <agency/execution/execution_policy/basic_execution_policy.hpp> namespace age...
4,033
1,167
/** * Copyright 2018-2019 Dynatrace LLC * * 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 i...
1,762
588
// Copyright Louis Dionne 2013-2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) #include <boost/hana/ext/boost/mpl/list.hpp> #include <boost/hana/assert.hpp> #include <boost/hana/drop_front_exactly.hpp> #includ...
2,967
1,295
#include "msrating.h" #include <npassert.h> #include "array.h" #include "msluglob.h" #include "parselbl.h" #include "debug.h" #include <convtime.h> #include <wininet.h> extern BOOL LoadWinINet(); COptionsBase::COptionsBase() { m_cRef = 1; m_timeUntil = 0xffffffff; /* as far in the future as ...
46,311
15,574
/* 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 applicable law or a...
10,048
3,268
// For conditions of distribution and use, see copyright notice in LICENSE #include "StableHeaders.h" #include "Script.h" #include "IScriptInstance.h" #include "ScriptAsset.h" #include "AssetAPI.h" #include "Framework.h" #include "IAttribute.h" #include "AttributeMetadata.h" #include "IAssetTransfer.h" #include "Enti...
7,196
2,068
/*///////////////////////////////////////////////////////////////////////////////// /// An /// ___ ____ ___ _____ ___ ____ /// / _ \ / ___|_ _|_ _/ _ \| _ \ /// | | | | | _ | | | || | | | |_) | /// | |_| | |_| || | | || |_| | _ < /// \___/ \____|___| |_| \___/|_| \_\ /// ...
31,907
9,370
/* Copyright 2019 Axel Huebl, Benjamin Worpitz * * This file is part of alpaka. * * 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/. */ #pragma once #ifdef _OPENMP...
2,518
645
// // Copyright (c) Microsoft Corporation. All rights reserved. // SPDX-License-Identifier: Apache-2.0 // #include "common/Common.hpp" #include "common/MockILogManagerInternal.hpp" #include "modules/filter/CompliantByDefaultEventFilterModule.hpp" using namespace MAT; using namespace testing; class CompliantByDefaul...
2,397
816
/* * Realsense Segmentation Sample * * Contributing Authors: Tome Vang <tome.vang@intel.com> * * */ #include <iostream> #include <vector> #include <time.h> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/objdetect/objdetect.hpp> #include <librealsense2/rs.hpp> #i...
19,082
5,815
/* * event_identity.hpp * * Created on: Dec 20, 2016 * Author: zmij */ #ifndef AFSM_DETAIL_EVENT_IDENTITY_HPP_ #define AFSM_DETAIL_EVENT_IDENTITY_HPP_ #include <type_traits> #include <set> #include <pushkin/meta/type_tuple.hpp> namespace afsm { namespace detail { struct event_base { struct id_type {}...
976
370
//////////////////////////////////////////////////////////// // Door Motor - Open / close coop door by cycling a relay //////////////////////////////////////////////////////////// #include <Arduino.h> #include <GPSParser.h> #include <SaveController.h> #include "ICommInterface.h" #include "TelemetryTags.h" #include "T...
9,954
3,916
#include "ValidRequest.h" #include "dllexport.h" using TLMUtilities::E_XactorType ; template<unsigned A, unsigned D, unsigned U> unsigned ValidRequest<A,D,U>::isValid (TLMUtilities::E_XactorType xtype , const TLMRequest<A,D,U> &req , TLMUtiliti...
6,873
2,651
#include "QtScriptBindingsHelpers.h" void ToExistingScriptValue_Circle(QScriptEngine *engine, const Circle &value, QScriptValue obj) { obj.setProperty("pos", qScriptValueFromValue(engine, value.pos), QScriptValue::Undeletable); obj.setProperty("normal", qScriptValueFromValue(engine, value.normal), QScriptValue...
24,260
7,266
/** * Copyright 2020-2021 Huawei Technologies Co., Ltd * * 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 applicabl...
5,237
1,873
// 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 "base/command_line.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "chrome/app/chrome_command_ids.h" #include ...
28,125
9,350
// // Created by Siddhant on 2019-11-15. // #include "iostream" #include "vector" #include "string" using namespace std; vector<string> map = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; vector<string> letterCombinations(string digits) { vector<string> s; vector<string> old; for ...
968
355
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_MissionRace_Interface_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //---------------------------------------------------...
840
291
#include "Settings.h" Settings::Settings() { uint8_t tempMAC[6]; defaultMacAP.set(WiFi.softAPmacAddress(tempMAC)); if(!defaultMacAP.valid()) defaultMacAP.randomize(); } void Settings::syncMacInterface(){ if(debug) Serial.println("Trying to sync the MAC addr with settings"); if(isSettingsLoaded){ Mac mac...
8,305
3,161
//------------------------------------------------------------------------------------------ // // // Created on: 2/1/2015 // Author: Nghia Truong // //------------------------------------------------------------------------------------------ #include <iostream> #include <cmath> #include <core/helper_math.h> #inclu...
24,500
8,168
#pragma once #include <bunsan/error.hpp> namespace bunsan::utility { struct error : virtual bunsan::error { error() = default; explicit error(const std::string &message_); }; } // namespace bunsan::utility
215
74
/* The following code example is taken from the book * "The C++ Standard Library - A Tutorial and Reference, 2nd Edition" * by Nicolai M. Josuttis, Addison-Wesley, 2012 * * (C) Copyright Nicolai M. Josuttis 2012. * Permission to copy, use, modify, sell and distribute this software * is granted provided this copyr...
1,338
416
// s_only.cpp /* Copyright 2009 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be...
6,381
1,802
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
4,882
1,622
/* economyPhase.cpp */ #include <iostream> #include <string> #include "basicHeader.hpp" using std::cout; using std::endl; /* ========================================================================= */ void Game::economyPhase(PlayerPtr pl) { printF ("Economy Phase Started !" , 1 , YEL , FILL); printF ("Press E...
2,606
869
// Copyright 2006-2009 Daniel James. // 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 <boost/unordered_set.hpp> #include <boost/unordered_map.hpp> #include "../helpers/test.hpp" namespace unnecessary_copy...
8,279
2,932
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <gtest/gtest.h> #include "common_test_utils/test_common.hpp" #include <string> #include <sstream> #include <fstream> #include <memory> #include <map> #include <ngraph/function.hpp> #include <ngraph/op/constant.hpp> #inclu...
9,141
3,430
/* * Copyright 2019-2020 Douglas Kaip * * 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...
10,099
2,882
//============================================================================ // Copyright 2009- ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. // In applying this licence, ECMWF does not waive the privileges...
5,778
2,205
/******************************************************************************* * Copyright 2020 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
4,617
1,895
#include <string> #include "rclcpp/rclcpp.hpp" #include "ros2_bdi_skills/bdi_action_executor.hpp" #include "example_interfaces/msg/string.hpp" #include "webots_ros2_simulations_interfaces/msg/move_status.hpp" using std::string; using example_interfaces::msg::String; using webots_ros2_simulations_interfaces::msg::Mo...
3,121
990
// 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 "base/file_util.h" #include "chrome/installer/util/create_dir_work_item.h" #include "chrome/installer/util/logging_installer.h" CreateDirWor...
1,853
625
#pragma once #include <ros/ros.h> #include <string> #include "msg_adaptor/MeshGeometryStampedCustom.hpp" // Placing all lib elements into a sel_map namespace, partly in case this is extended upon later, partly to reduce pollution. namespace sel_map::publisher{ template <typename MeshAdaptorType> class Trian...
834
259
//----------------------------------------------------------------------------- // Copyright (c) 2012 GarageGames, LLC // // 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 restrictio...
3,804
1,183
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/connectivity/bluetooth/core/bt-host/l2cap/channel_configuration.h" #include "src/connectivity/bluetooth/core/bt-host/common/byte_buffer.h" #...
947
340
#include "DxDeviceMt.h" IDWriteFactory *DxDeviceMt::GetDwriteFactory() const { return this->dwriteFactory.Get(); } ID2D1Factory1 *DxDeviceMt::GetD2DFactory() const { return this->d2dFactory.Get(); } ID3D11Device *DxDeviceMt::GetD3DDevice() const { return this->d3dDev.Get(); } ID2D1Device *DxDeviceMt::GetD2DDevic...
960
407
#include "water.h" Water::Water(): TaticalMovingObject() { } Water::Water ( const Coordinates& position, const Vector& velocity, unsigned int initialTime, unsigned int lifeTime, const Vector &acceleration ): TaticalMovingObject(position, velocity, initialTime, lifeTime, acceleration, ObjectCatego...
614
210
#if !defined WATER_UTILITY_MATHS_INCLUDED #define WATER_UTILITY_MATHS_INCLUDED // STL headers. #include <cmath> #include <type_traits> // Utility namespace. namespace util { ///////////////////// /// Miscellaneous /// ///////////////////// /// <summary> Checks if two float values are relatively equ...
2,789
853
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define fi first #define se second typedef long long ll; typedef pair<int,int> pii; // head const int N = 105; char s[105]; char dig[15][15] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };...
634
299
/** * This file is part of the CernVM File System. */ #include "swissknife_lease_curl.h" #include "cvmfs_config.h" #include "gateway_util.h" #include "hash.h" #include "json_document.h" #include "logging.h" #include "util/pointer.h" #include "util/string.h" namespace { CURL* PrepareCurl(const std::string& method...
4,765
1,714
// algparam.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #ifndef CRYPTOPP_IMPORTS #include "algparam.h" NAMESPACE_BEGIN(CryptoPP) PAssignIntToInteger g_pAssignIntToInteger = NULL; bool CombinedNameValuePairs::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue...
1,987
741
#include "Player.h" #include <SystemResources.h> #include "TextureManager.h" #include "CollisionHandler.h" #include "Contact.h" #include "Input.h" #include "GameManager.h" #include "Bullet.h" namespace diva { /* */ Player::Player(int x, int y, int w, int h) : GameObject(), position(x, y), collider(posit...
4,087
1,339
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. // // Produced at the Lawrence Livermore National Laboratory // // LLNL-CODE-716457 // // All rights reserved. // // This file is part of Ascent. // // For details, see:...
5,332
1,562
/* * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. * Copyright (C) 2018 Apple Inc. All rights reserved. * * This library is free software; ...
3,221
1,047
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //===========================...
1,856
633
/*+**************************************************************************/ /*** ***/ /*** Copyright (C) by Dierk Ohlerich ***/ /*** all rights reserverd ***/ /***...
3,756
1,169
#if defined(Hiro_VerticalSlider) namespace hiro { static auto VerticalSlider_change(GtkRange* gtkRange, pVerticalSlider* p) -> void { auto position = (uint)gtk_range_get_value(gtkRange); if(p->state().position == position) return; p->state().position = position; if(!p->locked()) p->self().doChange(); } auto ...
1,290
516
// Copyright 2019 Google LLC. 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...
3,404
1,243
//----------------------------------------------------------------------------- // Copyright (c) 2015 GarageGames, LLC // // 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 restrictio...
56,756
20,410
#ifndef __POOL_HPP__ #define __POOL_HPP__ #include <algorithm> #include <deque> #include "Mutex.hpp" namespace osl { template <typename T> class Pool { private: Mutex _avail_lock; Mutex _work_lock; std::deque<T*> _avails; std::deque<T*> _works; size_t _size; public: Pool(size_t size) : _size(si...
2,304
1,000
// Copyright 2021 Google LLC // // 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 ...
23,336
9,374
#include <mainwindow.h> #include <Player.h> #include <BestInstallPath.h> #include <HostMessageAdapter.h> #include <Helper/CacheNetworkManagerFactory.h> #include <Features/PlainFileCache.h> #include <Features/Marketing/MarketingIntegrationMarker.h> #include <viewmodel/UpdateViewModel.h> #include <viewmodel/Applicat...
26,785
8,484
// keyfeatures_example2.cpp -*-C++-*- #include <ball_log.h> #include <ball_loggermanager.h> #include <ball_loggermanagerconfiguration.h> #include <ball_fileobserver.h> #include <ball_scopedattribute.h> #include <bslma_allocator.h> #include <bslma_default.h> #include <bsl_iost...
3,624
991
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DinoBlueprintBase_VariableMovement_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //-----------------------------------...
14,355
4,746
/* * This file is subject to the terms and conditions defined in * file 'LICENSE', which is part of this source code package. * * Copyright (c) 2020 fortiss GmbH, Stefan Profanter * All rights reserved. */ #include "SimGripper.h" bool SimGripper::startVaccum() { return true; } bool SimGripper::stopVa...
397
137
#include<bits/stdc++.h> using namespace std; int main(){ int n,x,res=0; cin>>n; for(int i=0;i<n;i++){ cin>>x; } if(n==1){ res = 1; cout<<res<<"\n"; } else if(n==1){ res = 2; cout<<res<<"\n"; } else{ res = n/2; cout<<res<<"\n"; ...
341
150
#pragma once #include <string> #include <iostream> #include <fstream> #include <map> #define EPS 0.001 using namespace std; // day = 24 hours + 1/7 week // = 24 (60 min) + 1/7(1/4 month) // = 24( 60(60 sec)+ 1/7(1/4(1/12 year) typedef struct{ string incUnit; double inc = 0; string decUnit; double d...
2,319
700
// Copyright Benoit Blanchon 2014-2016 // MIT License // // Arduino JSON library // https://github.com/bblanchon/ArduinoJson // If you like this project, please add a star! #pragma once #include "../Polyfills/isInfinity.hpp" #include "../Polyfills/isNaN.hpp" #include "../Polyfills/normalize.hpp" #include "../Print.hp...
3,567
1,257
class Solution { public: uint32_t reverseBits(uint32_t n) { uint32_t result= 0; for(int i=0; i<32; i++) result = (result<<1) + (n>>i &1); return result; } };
209
83
/** @file Code for class to manage configuration updates @section license License Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses ...
8,873
2,956
#include <bits/stdc++.h> using namespace std; int main( void ) { int n = 0, t = 0; cin >> n >> t; char pos[n]; cin >> pos; while( t-- ) { for(int i = 1; i < n; i++) { if( pos[i] == 'G' && pos[i - 1] == 'B') { pos[i] = 'B'; ...
438
177
#ifndef E2_I_NODE_INOUT_HPP #define E2_I_NODE_INOUT_HPP #include <thread> #include <functional> #include <type_traits> #include <list> namespace e2 { namespace interface { template< class Impl > class i_node_inout : public Impl { public: std::list< i_node_inout * > _in; std::list< i_node_inout * > _out; }; ...
332
141
/* //@HEADER // ************************************************************************ // // nonlinear_solvers.hpp // Pressio // Copyright 2019 // National Technology & Engineering Solutions of Sandia, LLC (NTESS) // // Under the terms of Contract DE-NA0003525 with N...
29,880
10,250
// ------------------------------------------------------------------------------------------------ #include "PocoLib/Register.hpp" // ------------------------------------------------------------------------------------------------ namespace SqMod { // -----------------------------------------------------------------...
1,113
344
/** * @file sg_driver.cc * @author Joseph Lee <development@jc-lab.net> * @date 2020/07/23 * @copyright Copyright (C) 2020 jc-lab.\n * This software may be modified and distributed under the terms * of the Apache License 2.0. See the LICENSE file for details. */ #include <unistd.h> #includ...
5,777
2,286
// // Advent of Code 2017, day 22, part one // #include <algorithm> #include <iostream> #include <string> #include <unordered_set> #include <utility> #include <vector> struct PairHash { template<typename T1, typename T2> std::size_t operator()(const std::pair<T1, T2> &p) const noexcept { std::size_t h1 = std::ha...
1,496
712
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the demonstration applications of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding...
3,934
1,120
// Copyright 2021 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 "third_party/blink/renderer/platform/testing/noop_web_url_loader.h" #include "services/network/public/cpp/resource_request.h" #include "third_pa...
1,415
480
#include "gsVertex.hpp" #include "gsEdge.hpp" #include "gsTile.hpp" #include <algorithm> #include <iostream> #include <limits> using std::cerr; using std::endl; int gs::Vertex::idCounter = 0; void gs::Vertex::AddLink(const gs::Link<gs::Vertex>& link) { links.push_back(link); } void gs::Vertex...
3,095
1,011
class Solution { private: vector<vector<bool>> isPalindrome; void helper(string& s, int start, vector<string>& ans, vector<vector<string>>& res) { if (start == s.size()) { res.push_back(ans); return; } for (auto i = start; i < s.size(); +...
1,349
425
#include "InitializedStructPortFieldProgram.hpp" #include "Arp/System/Commons/Logging.h" #include "Arp/System/Core/ByteConverter.hpp" namespace InitializedStructPortField { void InitializedStructPortFieldProgram::Execute() { //implement program } } // end of namespace InitializedStructPortField
319
99
#include "UidGenerator.h" UidGenerator::UidGenerator() : next_(1) {} UidGenerator &UidGenerator::instance() { static UidGenerator uidGenerator; return uidGenerator; } unsigned int UidGenerator::generate() { unsigned int uid = 0; if (!released_.empty()) { uid = released_.front(); released_.pop(); } else ...
430
170
#include "simfem/timestepping.hpp" // typedef double (*nlfct)(double u, double v); //Hopf // double global_Du = 0.0; // double global_Dv = 0.0; // double global_a = 1.0; // double global_b = 2.1; // double global_T = 50.0; // double global_eps = 0.01; //spatial pattern // double global_Du = 0.001; // double global_...
1,370
566
#ifndef IMMUTABLE_STRING_HPP #define IMMUTABLE_STRING_HPP #include "basic_sys.hpp" #include "hash.hpp" class ImmutableStringCache { public: static ImmutableStringCache& getInstance() { static ImmutableStringCache instance; return instance; } private: ImmutableStringCache(){}; ImmutableStringCache(Im...
2,764
898
#include "BandSplitter.hpp" #include <cassert> using byte_t = uint8_t; BandSplitter::BandSplitter(const std::vector<byte_t>& data) { split(data); } BandSplitter::BandSplitter(const std::vector<float>& upper, const std::vector<float>& lower) { upper_band = upper; lower_band = lower; } void BandSplitter:...
2,296
871
// FIFO_Send.cpp // FIFO_Send.cpp,v 4.10 2000/10/07 08:03:47 brunsch Exp #include "ace/FIFO_Send.h" #include "ace/Log_Msg.h" #if defined (ACE_LACKS_INLINE_FUNCTIONS) #include "ace/FIFO_Send.i" #endif ACE_RCSID(ace, FIFO_Send, "FIFO_Send.cpp,v 4.10 2000/10/07 08:03:47 brunsch Exp") ACE_ALLOC_HOOK_DEFINE(...
1,470
583
#include "MessageReceiver.h" #include "Arduino.h" MessageReceiver::MessageReceiver() : currMessage(0u) { } MessageBase* MessageReceiver::getNextMessage() { MessageBase* retVal = NULL; if (messages.size() > currMessage) { retVal = messages.element_at(currMessage); currMessage++; } else { me...
467
163
// Copyright (c) 2019 Michael Vilim // // This file is part of the bamboo library. It is currently hosted at // https://github.com/mvilim/bamboo // // 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 Lic...
12,274
3,580
#ifndef TP_TALLER_DE_PROGRAMACION_FIUBA_CABEZAENEMIGO_HPP #define TP_TALLER_DE_PROGRAMACION_FIUBA_CABEZAENEMIGO_HPP #include "Terreno.hpp" class CabezaEnemigo : public Terreno{ public: CabezaEnemigo(); float aplicarCoeficienteDeRozamiento(float velocidadX) override; float obtenerImpulsoH...
547
227
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE...
2,061
744
/*========================================================================= Program: ParaView Module: $RCSfile$ Copyright (c) Kitware, Inc. All rights reserved. See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without...
12,948
3,794
// // Created by Mikel Matticoli on 2/14/18. // #include <iostream> #include <math.h> #include "Event.h" #include "CustomerEvent.h" #include "SortedEventQueue.h" #include "TellerEvent.h" // Function prototypes for non-class functions int randTime(double min, double max); int runSim(int customerCount, int tellerCount,...
7,581
2,131
#include <Arduino.h> #include <SPI.h> #include <MFRC522.h> #define LONGITUD_BYTES 18 #define LONGITUD_BYTES_ESCRITURA 16 /* Pines para conectar el lector */ #define RST_PIN D3 #define SS_PIN D4 // Constantes para el ejemplo #define MODO_LECTURA 1 #define MODO_ESCRITURA 2 #define MODO MODO_ESCRITURA MFRC522 lector(SS_PI...
3,620
1,515
/* Compile if this is MSVC 6. */ #if defined(_MSC_VER) && (_MSC_VER == 1200) int main() { return 0; } #endif
112
56
/** * Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman * Copyright (c) 2018 Terry Moore, MCCI * * Permission is hereby granted, free of charge, to anyone * obtaining a copy of this document and accompanying files, * to do whatever they want with them without any restriction, * including, but not limited t...
12,437
4,707
//~---------------------------------------------------------------------------// // _______ _______ _______ _ _ // // | _ || || || | _ | | // // | |_| || || _ || || || | ...
10,185
2,887