text
string
size
int64
token_count
int64
#include "Epoll.h" #include <assert.h> #include <errno.h> #include <netinet/in.h> #include <string.h> #include <sys/epoll.h> #include <sys/socket.h> #include <deque> #include <queue> #include "utils/SocketUtils.h" #include "utils/Logging.h" #include <arpa/inet.h> #include <iostream> //typedef shared_ptr<Event> SP_Ev...
2,813
1,188
#include"../localedef.h" namespace fast_io_i18n { namespace { inline constexpr std::size_t monetary_mon_grouping_storage[]{3}; inline constexpr lc_all lc_all_global{.identification={.title=tsc("Slovenian locale for Slovenia"),.source=tsc("USM//MZT\t\t;\t\tfast_io"),.address=tsc("Kotnikova 6,, Ljubljana, Slovenia\t\t...
11,238
6,185
#include "LitesqlMethodPanel.h" #include "objectmodel.hpp" using namespace xml; LitesqlMethodPanel::LitesqlMethodPanel( wxWindow* parent , Method::Ptr& pMethod) : MethodPanel( parent ), m_pMethod(pMethod) { m_textCtrlName->SetValidator(StdStringValidator(wxFILTER_ALPHANUMERIC,&m_pMethod->name)); }
303
111
// // Created by daniel on 24.09.21. // #include "items.hpp" namespace items { Listbox::Item create_inventory_item(INVENTORY_ITEM item_type) { Listbox::Item item; switch (item_type) { case INVENTORY_ITEM::GATE_PART: item = create_gate_part(INVENTORY_ITEM::GATE_PART); break; case INVENTORY_ITEM::AP...
5,145
2,525
// // ulib - a collection of useful classes // Copyright (C) 2008-2014,2017 Michael Fink // /// \file FileFinder.cpp File finder // // includes #include "stdafx.h" #include <ulib/FileFinder.hpp> #include <ulib/Path.hpp> std::vector<CString> FileFinder::FindAllInPath(const CString& path, const CString& fileSpec, bool ...
1,159
386
/* test4014.SysFile.cpp */ //---------------------------------------------------------------------------------------- // // Project: CCore 2.00 // // Tag: HCore Mini // // License: Boost Software License - Version 1.0 - August 17th, 2003 // // see http://www.boost.org/LICENSE_1_0.txt or the local copy // ...
4,657
1,911
#include <algorithm> #include <regex> #include <sstream> #include <string> #include <net/if.h> #include "logger.h" #include "producerstatetable.h" #include "macaddress.h" #include "vxlanmgr.h" #include "exec.h" #include "tokenize.h" #include "shellcmd.h" #include "warm_restart.h" using namespace std; using namespace ...
15,657
5,932
/* * Copyright (c) 2019-2020, Fei Wu <f.eiwu@yahoo.com> * 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 *...
4,498
1,585
#include <iostream> using std::cin; using std::cout; int get_sum(int a, int b) { int n = (a < b ? b - a : a - b) + 1; return n * (a + b) / 2; } int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); }
228
106
#include <algorithm> #include <cstdio> #include <cstring> typedef long long ll; const int N = 1e6 + 61; int n, l, r, a[N]; ll k, c; int main() { scanf("%d%lld", &n, &k); if ((c = n * (n + 1ll) / 2) > k) return puts("-1"), 0; for (int i = 1; i <= n; i++) a[i] = i; l = 1, r = n; for (; l < r && c < k; l++, r--) { ...
539
284
/** * Copyright (C) 2014 Patrick Mours. All rights reserved. * License: https://github.com/crosire/reshade#license * * Copyright (C) 2021 Elisha Riedlinger * * 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 us...
3,482
1,345
class CfgVehicles { class Flag_White_F; class GVAR(Flag): Flag_White_F { author = ECSTRING(main, author); displayName = CSTRING(display); scopecurator = public; scope = public; class EventHandlers { init = QUOTE((_this select 0) setFlagTexture QUOTE(QPATHTOF(data\61stFlag.paa))); }; }; class GVAR(Fla...
503
213
/* * Copyright (C) 2004-2015 ZNC, see the NOTICE file for details. * * 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 requi...
4,274
1,588
/*============================================================================= Copyright (c) 2001-2006 Joel de Guzman 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) ===================================...
1,021
356
#ifndef INC_DATA_HANDLING_HPP_ #define INC_DATA_HANDLING_HPP_ #include <stdlib.h> #include <cstring> #include "stdio.h" #include "main.h" enum struct HeartBeat { Buffer1, Buffer2, Buffer3, DEFAULT, FRAME_BY_FRAME }; class Data_management { private: // Buffers containing data and states. uint8_t DataBu...
1,251
529
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "tier0/dbg.h" #include <stdio.h> #include <string.h> #include <ctype.h> #include "choreoevent.h" #incl...
121,192
41,625
/* Copyright 2012-present Facebook, Inc. * Licensed under the Apache License, Version 2.0 */ #include "watchman.h" #include "InMemoryView.h" #include "watchman_error_category.h" namespace watchman { void InMemoryView::statPath( const std::shared_ptr<w_root_t>& root, SyncView::LockedPtr& view, PendingColl...
7,760
2,498
///////////////////////////////////////////////////////////////////////////////////////////// // Copyright 2017 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 // // htt...
15,458
4,846
#include "Framework.h" Ninja::Ninja(UINT instanceID) : instanceID(instanceID), state(IDLE) { collider = new SphereCollider(); collider->tag = "NinjaCollider"; collider->Load(); hpBar = new ProgressBar("Textures/UI/hp_bar.png", "Textures/UI/hp_bar_BG.png"); //hpBar->scale *= 0.1f; } Ninja::~Ninja() { delete co...
2,697
1,167
/* * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT) * * This software may be modified and distributed under the terms of the * BSD 3-Clause license. See the accompanying LICENSE file for details. */ #include <BayesFilters/GaussianMixture.h> using namespace bfl; using namespace Eigen; GaussianMix...
7,678
2,585
#include "Worker.h" #include "adios2/helper/adiosLog.h" #include "adios2/helper/adiosXMLUtil.h" #include <pugixml.hpp> namespace adios2 { namespace query { void XmlWorker::ParseMe() { auto lf_FileContents = [&](const std::string &configXML) -> std::string { std::ifstream fileStream(configXML); if...
9,466
2,843
// // Created by liudiyang1998 on 13.04.21. // #ifndef FACTORY_FACTORY_H #define FACTORY_FACTORY_H #include "LeiFeng.h" class Factory { public: virtual LeiFeng* createLeiFeng()=0; }; #endif //FACTORY_FACTORY_H
218
109
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
3,686
1,185
// Copyright 2016 Jonathan Buchanan. // This file is part of Sunglasses, which is licensed under the MIT License. // See LICENSE.md for details. #include <sunglasses/Scripting/LuaPrimitives.h> namespace sunglasses { namespace Scripting { template<> int getFromStack(lua_State *l, int index) { return lua_to...
1,572
535
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
1,649
491
#include <cstdio> #include <iostream> #include <sstream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <map> #include <queue> #include <set> #define X first #define Y second #define pb push_back #define ii pair<int,int> #define ll long long #define N 128 inline int MIN(int a,int b...
1,616
975
//---------------------------------Spheral++----------------------------------// // VoronoiRedistributeNodes // // This algorithm uses the Voronoi tessellation to decide how to domain // decompose our points. The idea is to relax a set of generator points into // the SPH node distribution -- the generators are attrac...
4,773
1,223
#pragma once #include <cstdlib> #include <cstring> #include "toy/Math.hpp" namespace toy{ namespace memory{ // The memory size of Allocator01 always base of 2. template<typename T> class Allocator01 { public: Allocator01() { ; } ~Allocator01() { free(); } Allocator01(const Allocator01 &other...
2,118
1,108
#include "random.hpp" #include <assert.h> namespace Util{ Random::Random(uint32_t _seed) { m_state[0] = 0xaffeaffe ^ _seed; m_state[1] = 0xf9b2a750 ^ (_seed * 0x804c8a24 + 0x68f699be); m_state[2] = 0x485eac66 ^ (_seed * 0x0fe56638 + 0xc917c8ce); m_state[3] = 0xcbd02714 ^ (_seed * 0x57571dae + 0xce2b3bd1); ...
1,488
665
#include "hcpch.h" #include "LevelManager.h" namespace Hercules { LevelData levelData; const void Hercules::LevelManager::OpenLevel(const char* levelPath, std::string projectPath) { HC_STAT("Opening {0}", levelPath); levelData.matColors.clear(); levelData.matShinies.clear(); SceneManager::GetEntites(...
10,502
4,625
/* * Copyright 2011 Hewlett-Packard Development Company, L.P. 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 * n...
2,460
828
#include "stdafx.h" #include "util/fixes.h" #include <obj.h> #include <temple_functions.h> #include "gamesystems/timeevents.h" #include <particles.h> #include <gamesystems/gamesystems.h> #include <gamesystems/map/sector.h> #include <gamesystems/particlesystems.h> /* This is the fix for bug #104, which causes particle...
3,949
1,566
// File implement/oglplus/enums/object_type_names.ipp // // Automatically generated file, DO NOT modify manually. // Edit the source 'source/enums/oglplus/object_type.txt' // or the 'source/enums/make_enum.py' script instead. // // Copyright 2010-2017 Matus Chochlik. // Distributed under the Boost Software Licens...
1,761
722
#include <parser.hpp> #include <anton/optional.hpp> #include <anton/string7_stream.hpp> #include <anton/string7_view.hpp> // TODO: When matching keywords, ensure that the keyword is followed by non-identifier character (Find a cleaner way). // TODO: Figure out a way to match operators that use overlapping symbols (+ ...
118,110
33,620
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int N = 30007; struct Node { int p, v, s; Node* ch[2]; Node(int v):v(v) {p = rand(); ch[0] = ch[1] = NULL; s = 1;} int cmp(int x) const { if (x == v) return -1; return x < v ? 0 : 1; } void Maintain() { s = 1; if (ch[0...
1,719
897
#include "account_model.h" #include <fstream> #include <tuple> std::string account_model::accounts_file_location_; sf::String account_model::current_user_internal_representation_; sf::String account_model::current_user_screen_name_; using namespace std; bool account_model::init() { current_user_internal_representat...
8,730
3,208
#include <algorithm> #include <QDebug> #include "Sound_Queue.h" Sound_Queue::Sound_Queue() : buffer(0), audio(0){ } Sound_Queue::~Sound_Queue() { if (audio) { delete audio; } } const char* Sound_Queue::start(long sample_rate, int chan_count) { QAudioFormat as; as.setSampleType(QAudioFormat::SignedInt); ...
1,483
540
#include <QApplication> #include <QMessageBox> #include <QMainWindow> #include "Kernel_type.h" #include "Scene_surface_mesh_item.h" #include "Scene_polylines_item.h" #include <CGAL/Three/Polyhedron_demo_plugin_helper.h> #include <CGAL/Three/Polyhedron_demo_plugin_interface.h> #include <CGAL/Polygon_mesh_processing/st...
5,283
1,837
// Copyright 2016 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/ntp_tiles/json_unsafe_parser.h" #include "base/bind.h" #include "base/callback.h" #include "base/json/json_parser.h" #include "base/...
1,545
453
/** * @file main.cpp * @author Andrew SASSOYE */ #include <iostream> #include <algorithm> #include <functional> #include "../resources/utilscpp.hpp" #include "../src/sign.hpp" #include "../resources/data_fraction.h" #include "fraction_constexpr.hpp" using namespace std; using namespace g54327; const size_t N_FRACT...
3,703
1,312
#include "Component.h" C3_NAMESPACE_BEGIN CBaseComponent::CBaseComponent() { RefCount = 0; } void CBaseComponent::AddRef() { RefCount++; } void CBaseComponent::Release() { auto count = RefCount--; if (count == 0) delete this; } TypeId CBaseComponent::RealType() { return GetTypeId<IComponent>(); } bool CBase...
703
285
// Boost.Geometry Index // // Pairs intended to be used internally in nodes. // // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland. // // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1...
2,191
788
#include <stdint.h> #include "../Level.h" #include "../Game.h" #include "../Log.h" #include "../MathUtil.h" //#define SPIRAL_OFFSET_FIX //Fixes the radius offset to scale properly static const uint8_t FlipAngleTable[] = { 0x00,0x00, 0x01,0x01,0x16,0x16,0x16,0x16,0x2C,0x2C, 0x2C,0x2C,0x42,0x42,0x42,0x42,0x58,0x58, ...
5,273
3,494
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<map> #include<set> #include<vector> #include<utility> #include<queue> #include<stack> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define...
1,731
937
#include "MemoryCheck.h" #include <iostream> #ifdef WINDOWS #include <stdlib.h> #include <crtdbg.h> void prepareMemoryCheck() { _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT); _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ERROR, _CRTD...
1,495
620
/* * Copyright (c) 2016 - present Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #include <...
786
287
/* * source code: hp_rechner.cpp * author: Lukas Eder * date: 28.12.2017 * * Descr.: * Grundlegende Rechnungen von Addition, Subtraktion, Multiplikation und Division nach dem HP-Rechner-Model. */ #include "hpFunktionen.h" #include <iostream> using namespace std; // Hauptprogramm int main(...
1,436
648
//============================================================================== /* Grid heating test case for electros in 2D This deck is made for quickly testing code changes by testing the grid heating rate. It initializes a 2D box of electrons with periodic boundary conditions and lets it evolve for ...
11,486
4,152
/* * Copyright 2009-2017 Alibaba Cloud 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...
2,204
734
// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // 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...
38,320
16,797
/* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen University * * ...
12,250
3,993
#pragma once namespace Zion { class Log { public: static void Open(const char *filename); static void Close(); static void Write(const char *format, ...); }; };
217
57
/* * Copyright (c) 2007, Laminar Research. * * 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, ...
34,710
17,083
#include <TestSupport.h> #include <Core/SpawningKit/Handshake/Prepare.h> #include <Core/SpawningKit/Handshake/Perform.h> #include <LoggingKit/Context.h> #include <SystemTools/UserDatabase.h> #include <boost/bind/bind.hpp> #include <cstdio> #include <IOTools/IOUtils.h> using namespace std; using namespace Passenger; us...
28,436
10,990
/** \copyright * Copyright (c) 2013, Balazs Racz * 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 li...
7,019
2,402
#include <iostream> class MyClass { public: MyClass() { std::cout << "Constructor called!" << std::endl; } ~MyClass() { std::cout << "Destructor called!" << std::endl; } }; int main() { MyClass myClass; std::cout << "Function body!" << std::endl; ...
335
105
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/api/identity/identity_mint_queue.h" #include <vector> #include "testing/gmock/include/gmock/gmock.h" #include "t...
6,713
2,327
#include "matrix.h" #include <iostream> Matrix::~Matrix() { for (size_t i = 0; i < cols; i++) delete[] arr[i]; delete[] arr; } Matrix& Matrix::operator *= (int k) { for (size_t i = 0; i < cols; i++) for (size_t j = 0; j < rows; j++) arr[i][j] *= k; return *this; } bool Mat...
1,106
436
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "AnimGraphRuntimePrivatePCH.h" #include "BoneControllers/AnimNode_ObserveBone.h" #include "AnimationRuntime.h" ///////////////////////////////////////////////////// // FAnimNode_ObserveBone FAnimNode_ObserveBone::FAnimNode_ObserveBone() : Display...
2,086
734
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2016 INRIA. * * 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 * *...
1,317
414
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). #include "table/block_based/partitioned_filter_block.h" ...
19,392
5,963
/* D. Up the Strip */ // https://codeforces.com/contest/1561/problem/D1 // Date: Aug/24/2021 18:29 (00:54:05) // Runtime: 6000 ms // Memory: 29160 KB // Verdict: TLE #include <iostream> #include <string.h> using namespace std; int n, m; int memo[4000010]; int count(int x) { if (memo[x] != -1) return memo[x];...
626
301
/********************************************************************** * Copyright (c) 2008-2014, 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 publishe...
4,090
1,259
#ifndef _FUNCTION_HPP #define _FUNCTION_HPP #include <SDL2/SDL.h> #include <string> #include "block.hpp" void gameover(const std::string &message); block *XYtoArr(int x, int y); void dfs(block *it); block *mouseToArr(int _x, int _y); void setball(); void init(); inline void clock(const unsigned int frames_per_second...
357
136
#include<iostream> #define MAX_SIZE 5 int sort(int arr[MAX_SIZE], int key) { int pos = 0; for(int i=0;i<MAX_SIZE;i++) { if(arr[i]==key) return(i); } return (-1); } int main() { int list[MAX_SIZE]; int ele; std::cout<<"Enter Array: "; for(int i = 0; ...
612
244
/** MIT License Copyright (c) 2018 Vasilyev Daniil **/ #include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast") template<typename T> using v = vector<T>; #define int long long typedef string str; typedef vector<int> vint; #define rep(a, l, r) for(int a = (l); a < (r); a++) #define pb push_ba...
2,480
1,029
/** ** Copyright (c) 2011 Illumina, Inc. ** ** ** This software is covered by the "Illumina Non-Commercial Use Software ** and Source Code License Agreement" and any user of this software or ** source file is bound by the terms therein (see accompanying file ** Illumina_Non-Commercial_Use_Software_and_Source_Cod...
4,424
2,417
#pragma once #include <bits/stdc++.h> using namespace std; // Tropical matrix operations (max plus or min plus) template <typename T> struct tmat { using vec = vector<T>; using unit_type = T; static constexpr T inf = numeric_limits<T>::lowest() / 2; static const T add(const T& a, const T& b) { return ...
4,899
1,886
#include <glapi.h> #include <device.h> #include <config.h> #include <window.h> #include <GLFW/glfw3.h> #include <GL/gl.h> namespace engine { namespace gfx { Device::Device(Window& wnd): m_log("GFX_DEVICE"), m_window(wnd) { } bool Device::init() { m_log.debug("init"); if (!glapi::init()) { ...
1,234
522
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. /*===================================================================== ** ** Source: test2.c ** ** Purpose: Tests ...
5,496
1,728
#include "globals.h" #include "flags.h" #include "writer.h" #include "fluxmap.h" #include "decoders/decoders.h" #include "encoders/encoders.h" #include "sector.h" #include "proto.h" #include "fluxsink/fluxsink.h" #include "fluxsource/fluxsource.h" #include "arch/brother/brother.h" #include "arch/ibm/ibm.h" #include "im...
2,057
791
#include "li_wire.h" #include <QDebug> #include "../layout_def.h" #include "li_layer.h" namespace open_edi { namespace gui { LI_Wire::LI_Wire(ScaleFactor* scale_factor) : LI_Base(scale_factor) { item_ = new LGI_Wire; item_->setLiBase(this); pen_.setColor(QColor(0xff, 0, 0, 0xff)); brush_ = QBrush(Q...
2,594
1,001
#ifndef COCO_COMBIX_COMBINATORS_CHOICE_HPP_ #define COCO_COMBIX_COMBINATORS_CHOICE_HPP_ #include <type_traits> #include <utility> #include <coco/combix/error.hpp> #include <coco/combix/parser_traits.hpp> namespace coco { namespace combix { template <typename... P> struct choice_parser; template <type...
2,151
723
#ifndef STAN_MATH_TORSTEN_NONMEN_EVENTS_RECORD_HPP #define STAN_MATH_TORSTEN_NONMEN_EVENTS_RECORD_HPP #include <stan/math/torsten/dsolve/pk_vars.hpp> #include <stan/math/torsten/return_type.hpp> #include <boost/math/tools/promotion.hpp> #include <Eigen/Dense> #include <numeric> #include <string> #include <vector> nam...
8,593
3,025
// ============================================================================ // Copyright (c) 2017-2019, by Vitaly Grigoriev, <Vit.link420@gmail.com>. // This file is part of ProtocolAnalyzer open source project under MIT License. // ============================================================================ #ifnd...
2,793
804
// // Distributions.cpp // MNN // // Created by MNN on 2019/11/28. // Copyright © 2018, Alibaba Group Holding Limited // #include "Distributions.hpp" #include <cmath> namespace MNN { namespace Train { void Distributions::uniform(const int count, const float min, const float max, float *r, std::mt19937 gen) { ...
772
288
// // Construction de VBO // #include "vbobuild.hh" #include "sys/msys.h" #include "sys/msys_debug.h" #include "cube.hh" namespace VBO { // ========================================================================= // Versions pour les hommes, où il faut gérer les indices // Version de base, avec position et ...
7,422
3,162
// MIT License // // Copyright (c) 2020 ADCIRC Development Group // // 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, ...
21,402
7,267
#include "Python.h" #include "x11.h" #define DEBUG_ASSERT(cond) \ if(!(cond)) \ { \ fprintf(stderr, "Assert: %s | Function: %s\n", #cond, __FUNCTION__); \ assert(0); \ } static PyObject* x11_hash_wrapper(PyObject *self, PyObject *args) { char* input_data; int input_data_len; char hash_data[32]; ...
899
375
/* Copyright (c) 2020 Xavier Leclercq Released under the MIT License See https://github.com/Ishiko-cpp/Terminal/blob/master/LICENSE.txt */ #include "TerminalOutputTests.h" #include "Ishiko/Terminal/TerminalOutput.h" #include <Ishiko/Process/CurrentProcess.h> #include <boost/filesystem/operations.hpp> usin...
3,636
1,068
// xcharconv.h internal header // Copyright (c) Microsoft Corporation. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception //~ #pragma once #ifndef _XCHARCONV_H #define _XCHARCONV_H //~ #include <yvals_core.h> //~ #if _STL_COMPILER_PREPROCESSOR //~ #include <cstdint> //~ #include <type_traits> //~ #include <x...
1,290
550
#ifdef NALL_STRING_INTERNAL_HPP namespace nall { template<bool Insensitive> bool chrequal(char x, char y) { if(Insensitive) return chrlower(x) == chrlower(y); return x == y; } template<bool Quoted, typename T> bool quoteskip(T*& p) { if(Quoted == false) return false; if(*p != '\'' && *p != '\"') return false...
734
310
// // Button.cpp // // Created by Aleksey on 19.11.2020. // #include "Button.hpp" #include <2d/CCSprite.h> #include <2d/CCCamera.h> #include <base/CCDirector.h> #include <base/CCEventDispatcher.h> #include <base/CCEventListenerTouch.h> #include <base/CCEventCustom.h> using namespace custom_ui; Button* Button::cr...
7,264
2,464
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved #include "SpatialGDKEditorSettings.h" #include "Dom/JsonObject.h" #include "Internationalization/Regex.h" #include "ISettingsModule.h" #include "Misc/FileHelper.h" #include "Misc/MessageDialog.h" #include "Modules/ModuleManager.h" #include "Serialization/Jso...
7,201
2,280
/* * This file is part of the MiniPython project, http://minipython.org/ * * The MIT License (MIT) * * Copyright (c) 2015-2017 Kevin Thomas * * 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 S...
6,781
2,993
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are perm...
8,226
2,819
// pyUserLibrarymodule.cpp // This file is generated by Shroud nowrite-version. Do not edit. // Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and // other Shroud Project Developers. // See the top-level COPYRIGHT file for details. // // SPDX-License-Identifier: (BSD-3-Clause) // #include "pyUserLib...
3,568
1,272
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2019-2020 Joel E. Anderson * * 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 * ...
1,529
529
/****************************************************************************** Author: Matthew Nolan OrangeMUD Codebase Date: January 2001 [Crossplatform] License: MIT License Permission is hereby granted, free of charge, to any pers...
5,295
1,662
#include "CExpressionPicker.h" #include <QHeaderView> #include <QMouseEvent> #include "CExpressionPickerDelegate.h" #include <QDebug> CExpressionPicker::CExpressionPicker(QWidget *parent) :QTableView(parent) ,mModel(new QStandardItemModel(this)) ,mPreView(new QLabel(this)) ,mShowPreView(fal...
5,761
1,875
// Copyright (c) Microsoft Corporation // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "pch.h" #include "xsapi/contextual_search_service.h" NAMESPACE_MICROSOFT_XBOX_SERVICES_CONTEXTUAL_SEARCH_CPP_BEGIN contextual_search_game_clip_uri_info::contextual_se...
2,777
1,030
#include "FSDWidgetBlueprintLibrary.h" #include "Templates/SubclassOf.h" class UObject; class UWidget; class UHorizontalBox; class UUserWidget; class UWidgetAnimation; class USizeBox; class UPanelWidget; class UTextBlock; class UImage; class UWindowWidget; class AFSDPlayerState; class UFSDCheatManager; class APlayerCo...
8,329
2,655
#include "AnimalThirdPersonControler.h" #include <OgreMath.h> #include "TerrainUtils.h" const float camDist = 900.f; AnimalThirdPersonControler::AnimalThirdPersonControler() : m_lookAround(false), m_camDistance(camDist), m_camAngularSpeed(0.0015f), m_camHeightOffset(0.f), m_pCamera(nullptr), m_pAnimal(nullptr...
4,491
1,843
// // Created by kier on 2019-09-03. // #include "runtime/operator.h" #include "global/operator_factory.h" #include "backend/name.h" #include "core/tensor_builder.h" #include "runtime/stack.h" #include "kernels/cpu/operator_on_cpu.h" #include "backend/base/base_roi_align.h" #include "dragon/roi_align_op.h" /** * THi...
1,537
504
#include "pathwatch.h" namespace pathwatch { PathWatcher::PathWatcher() { } void PathWatcher::watchInternal(fs::path, CallbackWrapper callbacks) { } PathWatcher::~PathWatcher() {} }
199
77
/* NOTE - eventually this file will be automatically updated using a Perl script that understand * the naming of test case files, functions, and namespaces. */ #include <time.h> /* for time() */ #include <stdlib.h> /* for srand() */ #include "std_testcase.h" #include "testcases.h" int main(int argc, ch...
59,189
25,310
/* * create_mask.cpp * * Author: * Siddharth Kherada <siddharthkherada27[at]gmail[dot]com> * * This tutorial demonstrates how to make mask image (black and white). * The program takes as input a source image and outputs its corresponding * mask image. */ #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" ...
2,783
1,035
/****************************************************************************/ /* Copyright 2005-2006, Francis Russell */ /* */ /* Licensed under the Apache License, Version 2.0 (the License); */ /* y...
4,469
1,479
/* * Copyright (c) 2014-2021, NVIDIA CORPORATION. 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 ...
10,279
3,642
#include "net.h" #include "opencv2/opencv.hpp" #include "mrutil.h" #define USE_INT8 0 #if _WIN32 #pragma comment(lib,"ncnn.lib") #endif const char* class_names[] = {"face", "mask"}; std::string modelname = "mask"; #if USE_INT8 modelname = modelname + "-int8"; #endif int input_size = 160; const float mean_vals[3...
2,410
1,040