text
string
size
int64
token_count
int64
// Copyright 2020 CryptoGarage #include "cfdcore/cfdcore_schnorrsig.h" #include <cstring> #include <string> #include <vector> #include "cfdcore/cfdcore_exception.h" #include "cfdcore/cfdcore_util.h" #include "secp256k1.h" // NOLINT #include "secp256k1_schnorrsig.h" // NOLINT #include "secp256k1_util.h" ...
14,174
5,343
//Copyright 2018 Husky Data Lab, CUHK //Authors: Hongzhi Chen, Miao Liu #ifndef SLAVE_COMMUN_HPP_ #define SLAVE_COMMUN_HPP_ #include <mpi.h> #include "util/communication.hpp" #include "util/global.hpp" int slave_all_sum(int my_copy) { int tmp = my_copy; if( _my_rank != SLAVE_LEADER) { send_data(my_copy, SLAV...
525
273
#pragma once #include <algorithm> #include <cmath> #include <stdexcept> #include <vector> // LCA: Lowest Common Ancestor // using Binary Lifting // // Space: O(V log V + E) // // NOTE: // - undirected // - non-loop // - non-multi-edge // - it can NOT handle a forest // // Verified: // - https://onlinejudge.u-...
3,467
1,388
/********************************************************************************* Copyright 2017 GlobalPlatform, Inc. Licensed under the GlobalPlatform/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 https://gi...
1,352
391
#ifndef DECISION_NODE_H #define DECISION_NODE_H #include "fconfig.hpp" #include "fcontext.hpp" #include <mcts/inner_node.hpp> namespace freedom { using mcts::INode; using mcts::InnerNode; // ---------------------------------------------------------------------- /// @brief Uses a selectionStrategy for nodes in whi...
743
232
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD+Patents license found in the * LICENSE file in the root directory of this source tree. */ // -*- c++ -*- #include "IndexBinary.h" #include "FaissAssert.h" #include <cstring> namespace faiss {...
2,134
773
// 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 may...
3,394
1,138
#include <sstream> #include <iostream> #include <ydk/entity_util.hpp> #include "bundle_info.hpp" #include "generated_entity_lookup.hpp" #include "Cisco_IOS_XR_mpls_te_oper_40.hpp" #include "Cisco_IOS_XR_mpls_te_oper_41.hpp" using namespace ydk; namespace cisco_ios_xr { namespace Cisco_IOS_XR_mpls_te_oper { MplsTeSt...
1,001,202
371,407
#include <iostream> #include <SDL2/SDL.h> // Graphics const int WINDOW_WIDTH = 512; const int WINDOW_HEIGHT = 284; SDL_Window* g_main_window; SDL_Renderer* g_main_renderer; // Colors namespace Colors { const SDL_Color GREEN = { 0, 255, 0, SDL_ALPHA_OPAQUE }; const SDL_Color BLACK = { 0, 0, 0, SDL_ALPHA_OPAQUE }; ...
2,092
857
//////////////////////////////////////////////////////////////////////////////// /// \file /// \brief Main module for Problem 4: Type conversion. /// \author Georgii Zhulikov /// \version 0.1.0 /// \date 25.01.2021 /// This code is for educational purposes of the course "Introduction /// ...
1,192
310
// Copyright 2016 the V8 project 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/snapshot/deserializer.h" #include "src/codegen/assembler-inl.h" #include "src/execution/isolate.h" #include "src/heap/heap-inl.h" #includ...
32,457
10,102
// Copyright (C) 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * * Copyright (C) 2009-2016, International Business Machines * Corporation and others. All Rights Reserved. ...
17,148
5,718
#include "TactileButton.h" namespace components { TactileButton::TactileButton(Ref<Component> parent, DigitalInput input, TriggerOn trigger) : Component(parent), _input(input), _pressed(false), _on_press([](){}), _on_release([](){}), _trigger(trigger) {} TactileButton::TactileButton(Ref<Component> parent, PinNumber ...
932
331
// Copyright 2020 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 "ui/views/layout/flex_layout_view.h" #include <memory> #include "ui/views/layout/flex_layout_types.h" #include "ui/views/layout/layout_types.h"...
6,248
2,023
/* * Copyright (c) 2020, Rapprise. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of condition...
6,721
2,155
/////////////////////////////////////////////////////////////////////////////// /// \file domain.hpp /// Contains definition of domain\<\> class template and helpers for /// defining domains with a generator and a grammar for controlling /// operator overloading. // // Copyright 2008 Eric Niebler. Distributed under th...
11,616
3,226
/************************************************************** * * 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 y...
2,851
997
/* * Copyright (C) 2006-2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required b...
4,961
1,667
/* * Copyright 2015, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
4,208
1,526
#include <SFML/Graphics.hpp> #include <SFML/Audio.hpp> #include <iostream> #include <time.h> #pragma once #include "../Blocks/Block.hpp" #include "../Map/Map.hpp" class Engine { public: Engine(); void move(); void rotation(); void tick(Block block[]); void check_lines(); ...
1,318
410
/*************************************************************************/ /* box_container.cpp */ /*************************************************************************/ /* This file is part of: */ /* ...
9,170
3,547
// Fill out your copyright notice in the Description page of Project Settings. #include "Empty_AMC_Character.h" #include "AMC_MovementComponent.h" // Sets default values AEmpty_AMC_Character::AEmpty_AMC_Character(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UAMC_Mov...
1,585
586
// Copyright (C) 2018 ETH Zurich // Copyright (C) 2018 UT-Battelle, LLC // All rights reserved. // See LICENSE.txt for terms of usage./ // See CITATION.md for citation guidelines, if DCA++ is used for scientific publications. // // Authors: Giovanni Balduzzi (gbalduzz@itp.phys.ethz.ch) // // This class represent all po...
8,635
3,104
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: Responsible for drawing the scene // //===========================================================================// #include "cbase.h" #include "materialsystem/imaterialsystem.h" #include "materialsystem/imaterialvar.h...
5,460
1,849
//SWEngine #include "../../include/SWEngine.h" #pragma comment (lib,"../../lib/SWUtil.lib") #pragma comment (lib,"../../lib/SWTypes.lib") #pragma comment (lib,"../../lib/SWCore.lib") #pragma comment (lib,"../../lib/SWEngine.lib") swApplication pointSpriteApp; int pointSpriteID=-1; swPoint pointS[3];...
1,745
684
#include<float.h> #include<math.h> #include<stdbool.h> #include<stddef.h> #include<stdint.h> #include<stdio.h> #include<string.h> #include "ap_int.h" #include "tlp.h" #define BURST_WIDTH 512 #define UNROLL_FACTOR 64 #define TILE_SIZE_DIM_0 8000 #ifndef BURST_WIDTH #define BURST_WIDTH 512 #endif//BURST_WIDTH #if UNROL...
72,215
39,360
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*- //----------------------------------------------------------------------------- // Copyright 2000-2021 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com) // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: Apache-2...
3,867
1,021
// Copyright (c) YugaByte, 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 writ...
46,010
15,022
//--------------------------------------------------------------------------- // Greenplum Database // Copyright (C) 2009 - 2011 EMC Corp. // // @filename: // CEngine.cpp // // @doc: // Implementation of optimization engine //--------------------------------------------------------------------------- #include "gpos/b...
69,509
25,720
// 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 "android_webview/browser/input_stream.h" #include "android_webview/browser/net/android_stream_reader_url_request_job.h" #include "android_web...
12,342
3,790
#ifndef _TESTMESSAGE_H_ #define _TESTMESSAGE_H_ #include <iostream> #include <sstream> #include <cstdint> #include <vector> /** * Struct representing the data to send down the wire */ struct TestMessage { uint32_t m_MessageSize; uint16_t m_p1Size; uint16_t m_p2Size; std::string m_p1; std::string m...
1,310
459
// // Copyright (c) 2017-2018 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 Software without restriction, including without limitation the rig...
10,597
3,208
// // libtgvoip is free and unencumbered public domain software. // For more information, see http://unlicense.org or the UNLICENSE file // you should have received with this source code distribution. // #include "EchoCanceller.h" #include "audio/AudioOutput.h" #include "audio/AudioInput.h" #include "logging.h" #inclu...
13,974
6,865
// $Id: CglTwomir.cpp 1132 2013-04-25 18:57:12Z stefan $ // Copyright (C) 2002, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). #include <cstdlib> #include <cstdio> #include <cmath> #include <cfloat> #include...
62,240
24,951
// Copyright Joyent, Inc. and other Node contributors. // // 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, modi...
25,908
8,956
/* * 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 ...
5,989
2,087
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * Christian Schulte <schulte@gecode.org> * * Copyright: * Christian Schulte, 2008, 2012 * * Last modified: * $Date: 2016-04-19 17:19:45 +0200 (Tue, 19 Apr 2016) $ by $Author: schulte $ * $Revision: 14967 $ ...
70,564
41,876
/** * Copyright 2020 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 applicable law...
5,179
1,917
#include <blah/images/image.h> #include <blah/streams/stream.h> #include <blah/streams/filestream.h> #include <blah/core/log.h> using namespace Blah; #define STB_IMAGE_IMPLEMENTATION #define STBI_ONLY_JPEG #define STBI_ONLY_PNG #define STBI_ONLY_BMP #include "../third_party/stb_image.h" #define STB_IMAGE_WRITE_IMPLE...
6,635
2,831
/* * * TezosLikeTransactionDatabaseHelper * * Created by El Khalil Bellakrid on 27/04/2019. * * The MIT License (MIT) * * Copyright (c) 2019 Ledger * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal ...
8,705
2,471
#include "playscene.h" #include <QDebug> #include <QMenuBar> #include <QTimer> #include "mypushbutton.h" #include <QPainter> #include <QLabel> #include <QFont> #include <QString> #include "chess.h" #include "computer.h" #include <QPair> #include <QSound> void PlayScene::setChess(int x, int y, QString statue) { if(...
18,792
6,063
#pragma once #include "ModelData.hpp" class Light { private: glm::vec3 pos = glm::vec3(0, 0, 0); glm::vec3 color = glm::vec3(1, 1, 1); bool isPointLight = true; public: Light(glm::vec3 pos, glm::vec3 color, bool isPointLight); void Light::setPos(glm::vec3 pos2); bool Light::getIsPointLight(); void Light::se...
457
192
// https://open.kattis.com/problems/alicedigital #include <iostream> #include <vector> using namespace std; typedef vector<int> vi; int main() { int t; cin >> t; while (t--) { int n, m; cin >> n >> m; vi a(n + 1, 0); int p = 0; int q = 0; int M = 0; for (int i = 1; i <= n; i++) { cin >> a[i]; ...
612
370
/*############################################################################## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®. 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...
106,894
31,159
// // This source file is part of appleseed. // Visit https://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2010-2013 Francois Beaune, Jupiter Jazz Limited // Copyright (c) 2014-2018 Francois Beaune, The appleseedhq Organization //...
11,267
3,167
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "Yoga.h" #include "log.h" #include <float.h> #include <string.h> #include <algorithm> #include <atomic> #include <memory> ...
157,621
46,952
/* MobileRobots Advanced Robotics Interface for Applications (ARIA) Copyright (C) 2004, 2005 ActivMedia Robotics LLC Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc. Copyright (C) 2010, 2011 Adept Technology, Inc. This program is free software; you can redistribute it and/or modify it under the terms o...
56,981
21,118
// Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc. // 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) #ifdef BOOST_QVM_TEST_SINGLE_HEADER # include BOOST_QVM_TEST_SINGLE_HEADER #else # include <boos...
1,679
700
#include <boost/python.hpp> #include "OpenPGP/Subpackets/Tag2Sub28.h" void Tag2Sub28_init() { boost::python::class_<Tag2Sub28, boost::python::bases<Tag2Subpacket>>("Tag2Sub28") .def(boost::python::init<std::string &>()) .def("read", &Tag2Sub28::read) .def("show", &Tag2Sub28::show) .def("raw", &Tag2Sub...
468
209
#include "PhysicsTools/JetMCAlgos/interface/BasePartonSelector.h" BasePartonSelector::BasePartonSelector() {} BasePartonSelector::~BasePartonSelector() {} void BasePartonSelector::run(const edm::Handle<reco::GenParticleCollection>& particles, std::unique_ptr<reco::GenParticleRefVector>& ...
332
99
/*The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1211. Given an integer n where 1 ≤ n ≤ 30, gene...
1,047
434
/* IQIF neuron object * Chen-Fu Yeh, 2019/11/09 */ #include "iq_neuron.h" using namespace std; iq_neuron::iq_neuron(int rest, int threshold, int reset, int a, int b, int noise) { x = rest; // initialize with rest potential t_neuron = 0; f_min = (a*rest...
2,006
831
//------------------------------------------------------------------------------ /* This file is part of divvyd: https://github.com/xdv/divvyd Copyright (c) 2012, 2013 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby grant...
23,412
6,860
/* * BSD 2-Clause License * * Copyright (c) 2020, Christoph Neuhauser * 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 ...
44,258
13,867
/* oscpack -- Open Sound Control packet manipulation library http://www.audiomulch.com/~rossb/oscpack Copyright (c) 2004-2005 Ross Bencina <rossb@audiomulch.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwar...
2,556
1,053
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2008-2013, Image Engine Design 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: // // ...
4,925
1,673
/* **============================================================================== ** ** Copyright (c) 2003, 2004, 2005, 2006, Michael Brasher, Karl Schopmeyer ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), ** ...
2,509
919
/* * BiasedRandomWalk.hpp * * Created on: 03.07.2020 * Author: Klaus Ahrens <ahrens@informatik.hu-berlin.de> * * adapted and reimplemented from node2vec * part of snap [https://github.com/snap-stanford/snap] * Copyright (c) 2007-2019, Jure Leskovec (under BSD license) * * see [https://arxiv.org/pdf...
1,802
637
#include <string> #include <string_view> #include <iostream> #include <regex> #include <algorithm> #include <map> // #include <range/v3/all.hpp> namespace { using SatelliteGraph = std::map<std::string, std::vector<std::string>>; SatelliteGraph map2graph(std::istream& map) { SatelliteGraph result; const std...
2,098
740
#pragma once #include <httplib/detail/common.hpp> #include <httplib/http/headers.hpp> #include <httplib/http/version.hpp> #include <string> HTTPLIB_OPEN_NAMESPACE struct http_response_t { unsigned int code = 0; std::string reason; http_version_t version; http_headers_t headers; }; std::ostream &...
413
150
#pragma once #include <tudocomp/config.h> #ifndef SDSL_FOUND #pragma message "SDSL required, but not available!" #else //std includes: #include <vector> #include <tuple> //general includes: #include <tudocomp/util.hpp> #include <tudocomp/ds/IntVector.hpp> #include <tudocomp/Compressor.hpp> #include <tudocomp/Error....
19,005
5,384
/*ckwg +29 * Copyright 2019 by Kitware, 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 notice, * this list of...
7,098
2,522
#include "opencv2/opencv.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> using namespace std; using namespace cv; Mat myMask; Mat myFrame; Mat origFrame; int frameCols = 0, frameRows = 0; Mat refine(Mat frame, Mat mask); static void help() { cout << "\nThis...
11,486
4,442
/* * This file is part of ALVAR, A Library for Virtual and Augmented Reality. * * Copyright 2007-2012 VTT Technical Research Centre of Finland * * Contact: VTT Augmented Reality Team <alvar.info@vtt.fi> * <http://www.vtt.fi/multimedia/alvar.html> * * ALVAR is free software; you can redistribute it and/...
2,420
838
/* * HaloDataOrganizer.hpp * * Created on: Jun 13, 2019 * Author: stu */ #ifndef INCLUDE_HALODATAORGANIZER_HPP_ #define INCLUDE_HALODATAORGANIZER_HPP_ #include <map> #include <set> #include <algorithm> //#include "TLBM_definitions.h" #include "HaloDataObject.hpp" template <class T> class HaloDataOrganizer...
3,192
1,379
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/clouddirectory/model/UpgradeAppliedSchemaRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::CloudDirectory::Model; using namespace Aws::...
983
366
#include "Interface/Core/ArchHelpers/Arm64Emitter.h" #include <FEXCore/Utils/LogManager.h> #include <FEXCore/Core/CoreState.h> #include "aarch64/cpu-aarch64.h" #include "cpu-features.h" #include "aarch64/instructions-aarch64.h" #include "utils-vixl.h" #include <tuple> namespace FEXCore::CPU { #define STATE x28 // ...
6,227
2,791
// Copyright 2014 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 "modules/fetch/BodyStreamBuffer.h" #include "core/testing/DummyPageHolder.h" #include "modules/fetch/DataConsumerHandleTestUtil.h" #include "pla...
12,139
3,718
#if !defined(DONT_DEFINE_TYPES) #endif #include "F:/Programming/CppLibs/imgui/imgui/examples/imgui_impl_glfw.h"
115
56
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
12,432
4,346
/** ########################################################################## # If not stated otherwise in this file or this component's LICENSE # file the following copyright and licenses apply: # # Copyright 2019 RDK Management # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
1,601
536
/* * Copyright (c) 2020 Andreas Pohl * Licensed under MIT (https://github.com/apohl79/audiogridder/blob/master/COPYING) * * Author: Andreas Pohl */ #include "PluginProcessor.hpp" #include <signal.h> #include "PluginEditor.hpp" #include "json.hpp" using json = nlohmann::json; AudioGridderAudioProcessor::AudioG...
17,818
5,615
///////////////////////////////////////////////////////////////////// // = NMatrix // // A linear algebra library for scientific computation in Ruby. // NMatrix is part of SciRuby. // // NMatrix was originally inspired by and derived from NArray, by // Masahiro Tanaka: http://narray.rubyforge.org // // == Copyright Inf...
33,837
13,396
#include "stdafx.h" void Camera::UpdateProjectionMatrix() { m_projectionMatrix = Matrix4::Perspective(m_FOV, GetApplication()->GetAspect(), m_nearPlane, m_farPlane); }
169
61
#include <ros/ros.h> #include <nodelet/loader.h> #include <image_topic_to_image/advertisement_checker.h> int main(int argc, char **argv) { ros::init(argc, argv, "image_topic_to_image"); // Check for common user errors if (ros::names::remap("camera") != "camera") { ROS_WARN("Remapping 'camera' has no effec...
2,060
698
// Copyright (c) 2007-2017 Hartmut Kaiser // Copyright (c) 2011 Bryce Lelbach // // 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) #if !defined(HPX_APPLIER_APPLY_HELPER_JUN_25_2008_0917PM) #define HPX_APPLIE...
7,842
2,286
/********************************************************************** * Copyright (c) 2008-2015, Alliance for Sustainable Energy. * All rights reserved. * * 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 t...
12,353
4,006
#include <algorithm> #include <iterator> #define CATCH_CONFIG_PREFIX_ALL #include "perceive/calibration/aruco-cube.hpp" #include "perceive/contrib/catch.hpp" #include "perceive/geometry.hpp" #include "perceive/geometry/projective/binocular-camera.hpp" namespace perceive { static const string c1001_v6 = R"V0G0N( { ...
28,395
17,147
// Copyright 2017 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 "gpu/ipc/service/gpu_memory_buffer_factory_dxgi.h" #include <vector> #include "base/memory/unsafe_shared_memory_region.h" #include "base/trace_...
7,011
2,720
/* ** ClanLib SDK ** Copyright (c) 1997-2020 The ClanLib Team ** ** 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 anyone to use this software for a...
6,890
2,408
#include <bits/stdc++.h> using namespace std; typedef long long ll; string solve(string s) { if(s == "AAA" || s == "BBB") return "No"; return "Yes"; } /* int main() { string s; cin >> s; cout << solve(s); } */
238
95
#include <iostream> #include <vector> #include <queue> #define INF 10000000 using namespace std; vector<vector<pair<int, int> > > graph; void dijkstra(int start) { vector<int>dist((int)graph.size(), INF); vector<int>path((int)graph.size(), -1); priority_queue<pair<int,int>, vector<pair<int,int> >, greater...
1,748
667
/** * File : F.cpp * Author : Kazune Takahashi * Created : 2018-4-14 21:58:25 * Powered by Visual Studio Code */ #include <iostream> #include <iomanip> // << fixed << setprecision(xxx) #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <vector> #include <string> // to_string(nnn)...
3,696
1,658
/* * Copyright © 2011 Intel Corporation * * 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, pub...
13,177
4,374
#include <iostream> using namespace std; class strings_recursion { public: int length(char s[]); void removeX(char s[]); }; int strings_recursion::length(char s[]) { if (s[0] == '\0') { return 0; } int smallStringLength = length(s + 1); return 1 + smallStringLength; } void string...
822
332
//---------------------------------------------------------------------------------------------------------------------- // CCoreGraphics.cpp ©2020 Stevo Brock All rights reserved. //---------------------------------------------------------------------------------------------------------------------- #include "CCore...
1,814
537
// Copyright 2017 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 "components/prefs/writeable_pref_store.h" void WriteablePrefStore::ReportSubValuesChanged( const std::string& key, std::set<std::vector<...
504
157
//===------- LegalizeVectorTypes.cpp - Legalization of vector types -------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
106,081
39,614
// This file is part of CROWN, which is distributed under the revised // BSD license. A copy of this license can be found in the file LICENSE. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PART...
5,873
2,402
#include "Assembler.hpp" #include "MinHash.hpp" using namespace ChanZuckerberg; using namespace shasta; // Use the minHash algorithm to find alignment candidates. // Use as features sequences of m consecutive special k-mers. void Assembler::findAlignmentCandidatesMinHash( size_t m, // Numb...
3,975
1,192
#ifdef _WIN32 #include <windows.h> #include <windowsx.h> #else #include "../swell/swell.h" #endif #include <stdlib.h> #include <string.h> #ifndef CURSES_INSTANCE #define CURSES_INSTANCE ((win32CursesCtx *)m_cursesCtx) #endif #include "curses.h" #include "eel_edit.h" #include "../wdlutf8.h" #include "../win32_utf8.h" #i...
62,133
24,338
/* Copyright 2017 The Apollo 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 agree...
29,952
10,275
#define DOCTEST_CONFIG_IMPLEMENT #include "doctest.h" #include <cstdio> #include <backward.hpp> namespace veg { int argc = 0; char** argv = nullptr; } // namespace veg auto main(int argc, char** argv) -> int { veg::argc = argc; veg::argv = argv; char argname[] = "--veg-death-assertion-id"; if (argc >= 3 && // ...
577
249
//////////////////////////////////////////////////////////////////////////////// // Name: scope.cpp // Purpose: Implementation of class wex::scope // Author: Anton van Wezenbeek // Copyright: (c) 2020-2021 Anton van Wezenbeek //////////////////////////////////////////////////////////////////////////////// #i...
2,910
1,080
/* $Id: blast_test_util.hpp 354597 2012-02-28 16:45:09Z ucko $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government...
6,931
2,082
//**************************************************************************** //** //** kybrd.cpp //** -Keyboard driver //** //**************************************************************************** //============================================================================ // IMPLEMENTATION HEAD...
16,440
7,974
#include <string> #include <stdio.h> #include <list> #include <set> #include <algorithm> #include "GumboInterface.h" #include "string_buffer.h" #include "error.h" #include "StringUtil.h" #include "UrlUtil.h" //#include "pcrecpp.h" namespace future { static std::set<std::string> init_set(const char** arr,...
42,083
16,580
/** * @cond doxygenLibsbmlInternal * * @file CompartmentOutsideCycles.cpp * @brief Ensures no cycles exist via a Compartment's 'outside' attribute. * @author Ben Bornstein * * <!-------------------------------------------------------------------------- * This file is part of libSBML. Please visit http:/...
5,116
1,652
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2021 Ryo Suzuki // Copyright (c) 2016-2021 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # pragma once # include "../Common.hpp" names...
884
459
#include "system_management.h" std::ofstream fileout("log"); System_resource::System_resource() { sysinfo(&memInfo); totalVirtualMem = memInfo.totalram; totalVirtualMem += memInfo.totalswap; totalVirtualMem *= memInfo.mem_unit; totalPhysMem = memInfo.totalram; totalPhysMem *= memInfo.mem_unit; } uint64_t Syste...
860
320