text
string
size
int64
token_count
int64
#include "stdafx.h" #include "RenderTask.h" // DX12 Specifics #include "../CommandInterface.h" #include "../GPUMemory/GPUMemory.h" #include "../PipelineState/GraphicsState.h" #include "../RootSignature.h" #include "../SwapChain.h" RenderTask::RenderTask( ID3D12Device5* device, RootSignature* rootSignature, const s...
1,634
623
#include <iostream> #include <string> using namespace std; typedef long long ll; int main() { // HACKERMAN ios::sync_with_stdio(false); cin.tie(0); //Read inputs int value; cin >> value; string res = "NO SOLUTION"; if (value > 3) { res = ""; for (int i = 2; i <= val...
568
217
#pragma once #include "nlohmann/json.hpp" namespace expert_system::utility { /** * @brief A managed confidence factor. * Ensures that the confidence factor does not exceed the range of 0.0f and 1.0f. */ class Confidence { public: /** * @brief Defaul...
3,531
854
#include "Lighting.h" #include "LightCalculator/LightCommon.h" #include "LightCalculator/BFSLightCalculator.h" #include "LightCalculator/DirectionalLightCalculator.h" #include <TRGame/TRGame.hpp> #include <TRGame/Player/Player.h> #include <TRGame/Worlds/GameWorld.h> #include <TRGame/Worlds/WorldResources.h> #include...
3,347
1,268
// This file is part of snark, a generic and flexible library for robotics research // Copyright (c) 2011 The University of Sydney // 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. Redistr...
3,237
1,170
/* This software and supporting documentation are distributed by * Institut Federatif de Recherche 49 * CEA/NeuroSpin, Batiment 145, * 91191 Gif-sur-Yvette cedex * France * * This software is governed by the CeCILL-B license under * French law and abiding by the rules of distribution of free soft...
6,993
2,492
// Copyright (C) 2018-2019 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include <vector> /** * @brief Class for action info */ using Action = int; /** * @brief Class for events on a single frame with action info */ struct FrameEvent { /** @brief Frame index */ int frame_id; ...
1,112
367
#include "soundmanager.hpp" void SoundManager::lowerMusicVolume(bool lower) { if (lower) { sounds.at(MENU).setVolume(50); sounds.at(LEVEL).setVolume(50); } else { sounds.at(MENU).setVolume(100); sounds.at(LEVEL).setVolume(100); } } SoundManager::SoundManager() { menuSB....
1,807
612
/* * Copyright (c) 2017 James Jackson, BYU MAGICC Lab. * 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 * ...
10,530
6,810
#include "dma.hpp" #include "events.hpp" #include "usart.hpp" static USART_TypeDef *usart_base(int iusart); static DMA_Stream_TypeDef *usart_dma_stream(int iusart); static IRQn_Type usart_irqn(int iusart); // Set up USART for interrupt-driven RX, DMA-driven TX. void USART::init(void) { volatile uint32_t &apbenr_r...
10,608
4,688
// 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 "mojo/examples/apptest/example_client_application.h" #include "mojo/examples/apptest/example_client_impl.h" #include "mojo/examples/apptest/examp...
2,736
928
#include "CardAreaDetection.h" #include <opencv2/videostab/ring_buffer.hpp> // defines includes #include <opencv2\imgcodecs\imgcodecs_c.h> #include <opencv2\imgproc\types_c.h> using namespace cv; IDAP::CardAreaDetection::CardAreaDetection(int _id, int _playerID, int _sizeID, int _xPos, int _yPos, int _width, ...
19,733
6,329
/* Copyright (c) MediaArea.net SARL & AV Preservation by reto.ch. * * Use of this source code is governed by a BSD-style license that can * be found in the License.html file in the root of the source tree. */ //--------------------------------------------------------------------------- #include "CLI/Glob...
28,956
8,607
#include "object_filter.h" #include <tf/transform_listener.h> using namespace hirop_perception; float ObjectFilter::minX = 0; float ObjectFilter::maxX = 0; float ObjectFilter::minZ = 0; float ObjectFilter::maxZ = 0; float ObjectFilter::minY = 0; float ObjectFilter::maxY = 0; ObjectFilter::ObjectFilter(){ _n = r...
3,904
1,389
/*! \brief Function definitions for the DescriptorSet class. \file PVRVk/DescriptorSetVk.cpp \author PowerVR by Imagination, Developer Technology Team \copyright Copyright (c) Imagination Technologies Limited. */ #include "PVRVk/DescriptorSetVk.h" #include "PVRVk/ImageVk.h" #include "PVRVk/SamplerVk.h" #include "PVRVk/...
4,156
1,505
// Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxge/dib/fx_dib.h" #include <tuple> #include <utility> #inclu...
1,617
676
/* * Copyright (C) 2009 Michael Howell <mhowell123@gmail.com>. * Copyright (C) 2009 Germain Garand <germain@ebooksfrance.org> * Parts copyright (C) 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2018 afarcat <kabak@sina.com> * * Redistribution and use in source and binary forms, with or without * mod...
3,969
1,441
//Daniel Garcia Molero #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; //Esta solucion tiene un coste en tiempo y espacio de O(x*y), donde x e y son la //longitud de las palabras 1 y 2 respectivamente int getLongestSequence(const string &p1, const string &p2) { //p1 ...
1,229
572
// // ZQStringUtils.cpp // libzq // // Created by staff on 16/11/18. // Copyright © 2016年 zyqiosexercise. All rights reserved. // #include "ZQStringUtils.h" #include <functional> using namespace zq; bool StringUtils::startsWith(const std::string &text, const std::string &start) { //if start is bigger than t...
5,746
1,979
#include <bits/stdc++.h > using namespace std; int cnt[200005][26]; char s[200005]; int main() { int T; scanf("%d", &T); while (T--) { int n, k; scanf("%d%d", &n, &k); scanf("%s", s); for (int i=0; i<n; i++) { for (int j=0; j<26; j++) { c...
1,118
443
/*************************************************************************** * * @package: franka_ros_controllers * @metapackage: franka_ros_interface * @author: Saif Sidhik <sxs1412@bham.ac.uk> * **************************************************************************/ /*******************************************...
9,123
2,818
#include <hal.h> #include <algorithm> namespace hal { using namespace device; namespace internal { template<uint32_t x, uint32_t b, uint8_t nbits> static constexpr uint32_t encode() { static_assert(x < (1 << nbits), "bit field overflow"); return ((x & (1 << 0)) ? (b << 0) : 0) | ((x & (1 << 1)) ? (...
11,744
5,051
#include "platform/constants.hpp" #include "platform/measurement_utils.hpp" #include "platform/platform.hpp" #include "platform/settings.hpp" #include "coding/file_reader.hpp" #include "base/logging.hpp" #include "platform/target_os.hpp" #include <algorithm> #include <future> #include <memory> #include <regex> #inc...
1,857
608
/** * Copyright (c) 2019 - Pieter De Clercq. All rights reserved. * * https://github.com/thepieterdc/mailbridge/ */ #include <sys/socket.h> #include <unistd.h> #include <iostream> #include "server.h" #include "../configurations/slack_configuration.h" #include "../handlers/slack_handler.h" #include "../handlers/std...
878
268
#include <bits/stdc++.h> #define N 100020 #define ll long long using namespace std; inline ll read(){ ll x=0,f=1;char ch=getchar(); while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar()); while(ch<='9'&&ch>='0')x=(x<<3)+(x<<1)+ch-'0',ch=getchar(); return f?x:-x; } typedef pair<ll, ll> pairs; inline ll calc(ll x) ...
2,113
934
#include <CDirFTW.h> #include <ftw.h> #include <iostream> typedef int (*FtwProc)(const char *file, const struct stat *sb, int flag, struct FTW *ftw); CDirFTW *CDirFTW::walk_ = NULL; CDirFTW:: CDirFTW(const std::string &dirname) : dirname_(dirname), follow_links_(false), change_dir_(false), debug_(false) { } bool...
1,939
762
#pragma once #include <string> namespace afk { namespace io { auto get_date_time() -> std::string; } }
113
42
#include <type_traits> #include <iostream> //#define NDEBUG #include <cassert> // assert template<class T> void countdown(T start) { // Compile time static_assert(std::is_integral<T>::value && std::is_signed<T>::value, "Requires signed integral type"); assert(start >= 0); ...
413
134
// // Created by 张俊伟 on 2020/7/1. // struct ListNode { int val; struct ListNode *next; }; struct ListNode *reverseList(struct ListNode *head) { struct ListNode *pre = nullptr; struct ListNode *cur = head; while (cur!= nullptr){ struct ListNode *temp = cur->next; cur->next = pre; ...
381
138
/************************************************************** * * 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...
5,862
1,981
/** * @author Samuel Larkin * @file filter_models.cc * @brief Program that filters TMs and LMs. * * LMs & TMs filtering * * Technologies langagieres interactives / Interactive Language Technologies * Inst. de technologie de l'information / Institute for Information Technology * Conseil national de recherches ...
25,953
7,959
/* * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use,...
4,566
1,433
/* * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include "UiCanvasEditor_precompiled.h" #include "EditorCommon.h" UndoStackExecutionScope::UndoStac...
507
173
#include "listen/tcp_listen_service.h" #include <string.h> #include "log/log.h" #include "common/config/listen_flags.h" #include "connector/connector_manager.h" TCPListenService::TCPListenService() { stop_ = false; } TCPListenService::~TCPListenService() { stop(); close(listen_fd_); } void TCPListenSer...
4,296
1,426
// Copyright (c) 2016 Nuxi, https://nuxi.nl/ // // SPDX-License-Identifier: BSD-2-Clause #include <stdbool.h> #include <stdlib.h> #include <wchar.h> #include <iterator> #include "gtest/gtest.h" TEST(wmemmem, null) { // wmemmem() should not attempt to access any buffers if the needle // has length 0 or is larger ...
2,189
961
#include <iostream> #include <nlohmann/json.hpp> using json = nlohmann::json; int main() { // create a JSON value json j = { {"number", 1}, {"string", "foo"}, {"array", {1, 2}} }; std::cout << std::boolalpha << j.contains("/number"_json_pointer) << '\n' << j.co...
1,189
410
bool isOdd(int n) { return n & 1; }
35
17
// // FBullCowModel.cpp // Bull Cow Game Model // // Created by Diego Becciolini on 11/01/2017. // Copyright © 2017 Itizir. // This work is free. You can redistribute it and/or modify it under the // terms of the Do What The Fuck You Want To Public License, Version 2, // as published by Sam Hocevar. See the LICE...
7,566
2,755
/* * Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2020 Yermalayeu Ihar, * 2019-2019 Facundo Galan. * * 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 wi...
27,224
7,781
#ifndef __KF_CLIENT_MODULE_H__ #define __KF_CLIENT_MODULE_H__ /************************************************************************ // @Module : tcp客户端 // @Author : __凌_痕__ // @QQ : 7969936 // @Mail : lori227@qq.com // @Date : 2017-1-8 ***************...
5,499
1,683
/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include <QCoreApplication> #include <Components/Slots/Execution/ExecutionSlotLayoutComponent.h> ...
7,084
2,090
/* * See header file for a description of this class. * * \author Paolo Ronchese INFN Padova * */ //----------------------- // This Class' Header -- //----------------------- #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHKinematicFit.h" //------------------------------- // Collaborating Class Headers --...
12,684
4,419
#ifndef TNT_PCG_RANDOM_HPP #define TNT_PCG_RANDOM_HPP #include <concepts> #include "core/Config.hpp" #include "math/Vector.hpp" // TODO: // randomColor, etc. // constexpr halton* namespace tnt { /// @brief Get a random float on range @c [min_,max_]. /// @param min_ The minimum value of the float. /// @p...
1,906
611
/* See the header file for detailed explanations of the below functions. */ #include "range_based_tunnel_localizer.hh" RangeBasedTunnelLocalizer::RangeBasedTunnelLocalizer(int max_iter, double yz_tol, double yaw_tol){ _cloud = pcl::PointCloud<pcl::PointXYZ>().makeShared(); _cloud_aligned = pcl::PointC...
13,010
5,473
/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, development version * * (c) 2006-2017 INRIA, USTL, UJF, CNRS, MGH * * * ...
5,493
1,374
/*============================================================================= Copyright (c) 2013 Ville Ruusutie 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 wi...
4,617
1,622
//: S03:Enum.cpp // From "Thinking in C++, 2nd Edition, Volume 1, Annotated Solutions Guide" // by Chuck Allison, (c) 2001 MindView, Inc. all rights reserved // Available at www.BruceEckel.com. #include <iostream> enum color { BLACK, RED, GREEN, BLUE, WHITE }; int main() { using...
453
194
/**************************************************************************** ** Meta object code from reading C++ file 'interface_toolbar.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.6.1) ** ** WARNING! All changes made in this file will be lost! ***************************************************...
7,472
3,054
#include <gtest/gtest.h> #include <string> using std::string; #include "../src/Utils.h" TEST(testUtils, parseInsertStatement){ Row* row = new Row; string target = "insert 1 username email@email.com"; parseInsertStatement(target, *row); EXPECT_EQ(1, row->id); EXPECT_STREQ("username", row->username); EXPECT_...
594
238
#include "R_Mesh.h" #include "OpenGL.h" R_Mesh::R_Mesh() : Resource(ResourceType::MESH) { isExternal = true; for (uint i = 0; i < max_buffer_type; i++) { buffers[i] = 0; buffersSize[i] = 0; } } R_Mesh::~R_Mesh() { } void R_Mesh::CreateAABB() { aabb.SetNegativeInfinity(); aabb.Enclose((math::vec*)vertices,...
3,869
1,622
/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ // This test only works with the GPU backend. #include "gm.h" #if SK_SUPPORT_GPU #include "GrContext.h" #include "GrTest.h" #include "effects/GrYUVtoRGBEffect.h" #include ...
4,249
1,453
#include "gui/grouping/grouping_manager_widget.h" #include "gui/gui_globals.h" #include "gui/graph_tab_widget/graph_tab_widget.h" #include "gui/grouping/grouping_color_delegate.h" #include "gui/grouping/grouping_proxy_model.h" #include "gui/input_dialog/input_dialog.h" #include "gui/searchbar/searchbar.h" #include "gu...
15,054
4,280
#include "seasonlistmodel.h" SeasonListModel::SeasonListModel(QObject *parent, DatabaseManager* dbmanager) : QObject(parent) { m_dbmanager = dbmanager; } SeasonListModel::~SeasonListModel() { for (auto season : m_seasonListModel) { delete season; season = 0; } } QQmlListProperty<Seas...
1,880
622
/// Simulate a MIPS R2/3000 processor. /// /// This code has been adapted from Ousterhout's MIPSSIM package. Byte /// ordering is little-endian, so we can be compatible with DEC RISC systems. /// /// DO NOT CHANGE -- part of the machine emulation /// /// Copyright (c) 1992-1993 The Regents of the University of Califor...
20,129
6,190
#include <math.h> #include <iostream> #include <math.h> #include "prediction.h" using std::cout; using std::endl; using std::min; using std::max; Prediction::Prediction() { init_lanes(); } Prediction::~Prediction() { } void Prediction::update(vector<vector<double>>& sensor_fusion, Vehicle& egocar, Trajector...
3,398
1,277
#include "global.h" #include "ArchHooks_Win32.h" #include "RageUtil.h" #include "RageLog.h" #include "RageThreads.h" #include "ProductInfo.h" #include "archutils/win32/AppInstance.h" #include "archutils/win32/crash.h" #include "archutils/win32/DebugInfoHunt.h" #include "archutils/win32/ErrorStrings.h" #include "archuti...
8,022
3,086
class Solution { public: void Perm(vector<vector<int>>& ret, vector<int>& nums, int index, int size){ //结束条件 if(index == size){ vector<int> tmp = nums; ret.push_back(tmp); return; } for(int i = index; i < size; i++){ //在0位置依次固定nums中的每一...
709
280
#include <cstdio> #include <cstdlib> using namespace std; char cmd[100]; int main() { for (int i = 1; i <= 10; i++) { sprintf(cmd, "cp star%d.in star.in", i); system(cmd); sprintf(cmd, "./star"); system(cmd); sprintf(cmd, "mv star.out star%d.out", i); system(cmd); ...
399
155
/* * Copyright (c) 2016 The ZLToolKit project authors. All Rights Reserved. * * This file is part of ZLToolKit(https://github.com/xiongziliang/ZLToolKit). * * Use of this source code is governed by MIT license that can be found in the * LICENSE file in the root of the source tree. All contributing project author...
24,619
9,330
#ifndef GPCPP_CHAPTER03_INPUTCOMPONENT_HPP #define GPCPP_CHAPTER03_INPUTCOMPONENT_HPP #include "MoveComponent.hpp" namespace gpcpp::c03 { class InputComponent : public MoveComponent { public: explicit InputComponent(class Actor *Owner); void processInput(const uint8_t *KeyState) override; [[nodiscard]] float...
1,307
466
server { listen 80; server_name youth.cc; charset utf-8; root /home/work/dev/app/youth/public; access_log logs/youth.app.access.log main; location / { index index.html index.htm index.php; } #error_page 404 /404.html; # redirect server error pages...
1,388
568
#ifndef RECTANGLE_HPP #define RECTANGLE_HPP #include "vector2.hpp" namespace blub { class rectangle { public: vector2 topLeft, rightBottom; rectangle(void); rectangle(const vector2 &topLeft_, const vector2 &rightBottom_); void merge(const rectangle &other); void merge(const vector2 &other); }; ...
348
124
/** * Copyright 2019 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...
2,999
1,000
/** * @ Author: KaiserLancelot * @ Create Time: 2020-05-14 06:26:07 * @ Modified time: 2020-05-15 02:16:50 */ #include <cstdint> struct A { std::int32_t x; std::int32_t y; std::int32_t z; }; // TODO 编译器实现不完整 int main() {}
236
140
#ifndef __RANDOM_H_ #define __RANDOM_H_ #include <chrono> #include <cmath> #include <cstdlib> #include <iomanip> #include <iostream> #include <random> namespace R { // float R(float min, float max) { // return min + static_cast<float>(rand()) / // (static_cast<float>(RAND_MAX / (max - min))); // ...
1,374
522
#include "Boids2D.h" #include <vector> #include <iostream> #include <Core/Engine.h> #include "Object2DBoids2D.h" using namespace std; Boids2D::Boids2D() { } Boids2D::~Boids2D() { } void Boids2D::Init() { glm::ivec2 resolution = window->GetResolution(); auto camera = GetSceneCamera(); came...
7,415
3,110
#include "network.hpp" #include "network_impl.hpp" namespace Shadow { Network::Network() { engine_ = std::make_shared<NetworkImpl>(); } void Network::LoadXModel(const shadow::NetParam& net_param, const ArgumentHelper& arguments) { engine_->LoadXModel(net_param, arguments); } void Network:...
2,840
872
#include "translationgraphwidget.h" TranslationGraphWidget::TranslationGraphWidget(QWidget *parent) : PolygonGraphWidget(parent), p(QPoint(0, 0)) { } void TranslationGraphWidget::translateXYChanged(const QPoint &p) { this->p = p; } void TranslationGraphWidget::performOperation() { foreach (auto pp, polyg...
422
149
#include <output.hpp> #include <core.hpp> #include "../../shared/config.hpp" #include <linux/input-event-codes.h> #include <compositor.h> class wayfire_rotator : public wayfire_plugin_t { key_callback up, down, left, right; public: void init(wayfire_config *config) { grab_interface->name = "rotato...
1,868
679
// Copyright 1996-2020 Cyberbotics 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 or agr...
3,328
1,131
/* * 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 ...
1,340
438
/** * @file autotype8.cpp * @brief C++11/14/17 program to demonstrate auto type of 8 * @ref https://stackoverflow.com/questions/38060436/what-are-the-new-features-in-c17 * @details http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html * * COMPILATION TIP : -Wall warning all, -g debugger, gd...
851
380
#include <stdio.h> #include <string.h> #include <iostream> #include <queue> #include <map> using namespace std; int main(void) { int qnum, r, n, f, s; char c[10]; priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > pq; map<int, int> m; while (EOF != scanf("%s", c) && strcmp(...
647
305
#include "../BVH.h"
21
13
/* Copyright 2012-2013 Peter Goodman, all rights reserved. */ /* * trace_log.cc * * Created on: 2013-05-06 * Author: Peter Goodman */ #include "granary/globals.h" #include "granary/trace_log.h" #if CONFIG_DEBUG_TRACE_EXECUTION # include "granary/instruction.h" # include "granary/emit_utils.h" # inclu...
6,107
2,130
#pragma once #include <engine/MovementComponent.hpp> #include <engine/Transform2D.hpp> #include <engine/InputSystem.hpp> #include <engine/TimerGuard.hpp> #include <engine/Animation.hpp> #include <engine/Mob.hpp> #include <engine/Attack.hpp> #include <gamebase/Buff.hpp> #include <gamebase/Inventory.hpp> #include <Sprit...
2,569
946
//===--- Utils/FileSystem.cpp - File system utilities -----------*- C++ -*-===// // // The North Compiler Infrastructure // // This file is distributed under the MIT License. // See LICENSE.TXT for details. // //===---------------------------------------------...
1,006
324
/************************************************************************** ** This file is a part of our work (Siggraph'16 paper, binary, code and dataset): ** ** Roto++: Accelerating Professional Rotoscoping using Shape Manifolds ** Wenbin Li, Fabio Viola, Jonathan Starck, Gabriel J. Brostow and Neill D.F. Campbell *...
3,000
1,034
// Copyright 2018 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 <memory> #include <lib/async-loop/cpp/loop.h> #include <trace-provider/provider.h> #include "lib/component/cpp/startup_context.h" #include "lib/...
1,083
396
///////////////////////////////////////////////// // Includes #include "fa.h" ///////////////////////////////////////////////// // Finite-Automata-Transition PFaTrans TFaTrans::LoadCustomXml(const PXmlTok& XmlTok){ IAssert(XmlTok->IsTag("Trans")); // collect transition values TStr MsgNm=XmlTok->GetArgVal("Msg");...
14,668
5,663
/* MIT License Copyright (c) 2018 Federico Terzi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
1,735
572
// ============================================================================= // // Copyright (c) 2009-2013 Christopher Baker <http://christopherbaker.net> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to de...
4,148
1,375
/*---------------------------------------------------------------------------*/ #include <string.h> #include <_types.h> #include <util/string.h> #include <util/tables.h> #include <util/memory.h> /*---------------------------------------------------------------------------*/ void xlate_to_lowercase (BYTE buf[], WO...
751
229
#include "stdafx.h" Texture::Texture(const fs::path& path) { BinaryReader reader = hierarchy.open_file(path); if (path.extension() == ".blp" || path.extension() == ".BLP") { auto blp = blp::BLP(reader); auto[w, h, d] = blp.mipmaps.front(); data = d; width = w; height = h; channels = 4; // ToDo doe...
916
390
 #include "browser/api/ApiApp.h" #include "common/NodeRegisterHelp.h" #include "common/api/EventEmitter.h" #include "common/ThreadCall.h" #include "gin/object_template_builder.h" #include "browser/api/WindowList.h" #include "base/values.h" #include "wke.h" #include "nodeblink.h" #include "base/strings/stri...
11,335
3,631
/* * Modified by LeafLabs, LLC. * * Part of the Wiring project - http://wiring.org.co Copyright (c) * 2004-06 Hernando Barragan Modified 13 August 2006, David A. Mellis * for Arduino - http://www.arduino.cc/ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU...
1,383
472
// Copyright 2018 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/core/layout/layout_shift_tracker.h" #include "cc/layers/heads_up_display_layer.h" #include "cc/layers/picture_layer....
32,329
10,073
/* * 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 ...
2,299
771
/* The MIT License (MIT) Copyright (c) 2013-2015 SRS(ossrs) 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...
9,003
3,010
class Solution { public: bool XXX(vector<int>& nums) { int len = nums.size()-1; int max = 0; for(int i = 0;i<len;i++) { for(int j = i;j<=(i+nums[i]);j++) { max = (j+nums[j])>=(max+nums[max]) ? j : max ; if(max!= len && nums[ma...
476
177
#include <iostream> #include "Chapter1Helper.h" #include "Chapter2Helper.h" #include "Chapter3Helper.h" #include "Chapter4Helper.h" #include "Chapter5Helper.h" #include "Chapter6Helper.h" #include "Chapter7Helper.h" #include "Chapter8Helper.h" #include "Chapter9Helper.h" #include "Chapter10Helper.h" #include "Chapter11...
1,318
470
#include "CollisionManager.h" #include <iostream> CollisionManager::CollisionManager() { } CollisionManager::~CollisionManager() { } void CollisionManager::Update(float deltaTime) { for (int i = 0; i < _ObjectList.size(); i++) { GameObject* _Object = _ObjectList[i]; Collider* _FirstCollider...
2,402
1,063
// print-frac.cpp // as of 2021-09-04 bw [bw.org] #include <bwprint.h> #include <string_view> #include <string> // support for std:: or fmt:: (reference implementation) // see j.bw.org/fmt #ifdef __cpp_lib_format #define formatter std::formatter #else #define formatter fmt::formatter #endif // __cpp_lib_format using...
799
300
#include "math.h" i64 pydiv(i64 a, i64 b) { i64 result = a / b; if ((a < 0) ^ (b < 0)) { if (pymod(a, b) != 0) { result -= 1; } } return result; } i64 pymod(i64 a, i64 b) { i64 result = a % b; if (result < 0) { result = b + result; } return result; }
269
157
#pragma once #include "ir/ir.hpp" #include "ir/symbol_table.hpp" enum class X86_Registers { EAX = 0, EBX = 1, ECX = 2, EDX = 3, ESI = 4, EDI = 5, EBP = 6, ESP = 7 }; struct X86_IrRegisters { static constexpr Ir::Argument EAX = Ir::Argument::PinnedHardRegister(int(X86_Registers::EA...
1,123
416
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PA...
2,187
794
#include "AncestralSeqNet.h" #include "NetworkError.h" #include <iostream> #include <map> #include <set> using namespace std; AncestralSeqNet::AncestralSeqNet(const vector <Sequence*> & seqvect, const vector<bool> & mask, unsigned epsilon, double alpha) : /*AbstractMSN(seqvect, mask, epsilon), */HapNet(seqvect, ma...
4,402
1,568
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef IROHA_SHARED_MODEL_PROTO_COMMAND_HPP #define IROHA_SHARED_MODEL_PROTO_COMMAND_HPP #include "interfaces/commands/command.hpp" #include "commands.pb.h" namespace shared_model { namespace proto { class Co...
914
298
#include "prx/utilities/data_structures/tree.hpp" PRX_SETTER(tree_t, vertex_id_counter) PRX_GETTER(tree_t, vertex_id_counter) void pyprx_utilities_data_structures_tree_py() { class_<prx::tree_node_t, std::shared_ptr<prx::tree_node_t>, bases<prx::abstract_node_t>>("tree_node", init<>()) .def("get_parent", &prx::tre...
1,959
905
/********************************************************************** AudMonkey: A Digital Audio Editor @file ConfigInterface.cpp **********************************************************************/ #include "ConfigInterface.h" ConfigClientInterface::~ConfigClientInterface() = default;
300
61