text
string
size
int64
token_count
int64
// Copyright (C) 2012-2019 The VPaint Developers. // See the COPYRIGHT file at the top-level directory of this distribution // and at https://github.com/dalboris/vpaint/blob/master/COPYRIGHT // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the ...
6,327
1,890
// ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PlayerPawnTest_Male_parameters.hpp" namespace sdk { //--------------------------------------------------------------------------- //Functions //--------------------------------------------------------------...
1,473
495
#include <cmath> #include <string.h> #include "tensor.h" #include "layers.h" #include "net.h" #include "optimizer.h" #include "error.h" namespace lten { void SGDOptimizer::setup_optimizer() { int i; uint64_t numels; for (i = 0; i < num_params_; i++) { numels = network_params_ptr_[i].param_->get_numels();...
5,441
2,514
// Copyright 2020 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include "iree/compiler/Codegen/LLVMCPU/KernelDispatch.h" #include <numeric> #include "iree-dia...
46,376
15,397
#include "bwtransform.h" /* * Author: Daniil [Mathtin] Shigapov * Copyright (c) 2017 Mathtin <wdaniil@mail.ru> * This file is released under the MIT license. */ size_t sa[L_PAGE]; size_t tmp[L_PAGE]; size_t tmp2[L_PAGE]; size_t count[L_PAGE]; size_t *cl, *workTmp; #define REP(i, n) for (size_t i = 0; i < n; ++...
5,015
2,162
#include "array_list.hpp" // подключаем заголовочный файл с объявлениями #include <algorithm> // copy, fill #include <cassert> // assert #include <stdexcept> // out_of_range, invalid_argument #include "private/internal.hpp" // вспомогательные функции namespace itis { ArrayList::ArrayList(int capacity) : capa...
5,990
2,198
/* //@HEADER // ************************************************************************ // // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this softw...
74,686
33,793
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- ***************************** * Qwt Widget Library * Copyright (C) 1997 Josef Wilgen * Copyright (C) 2002 Uwe Rathmann * * This library is free software; you can redistribute it and/or * modify it under the terms of the Qwt License, Version 1.0 **************...
17,327
5,700
// Copyright Carl Philipp Reh 2009 - 2018. // 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) #ifndef FCPPT_MATH_FROM_ARRAY_HPP_INCLUDED #define FCPPT_MATH_FROM_ARRAY_HPP_INCLUDED #include <f...
1,077
468
/** * Copyright (c) 2017-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. */ #include "ServiceDiscoveryConfig.h" #include <folly/Range.h> #include "logdevice/common/debug.h" #include...
2,067
654
/* * Copyright (C) 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 app...
32,407
9,819
// Copyright (c) 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/android/jni_string.h" #include "base/metrics/histogram_macros.h" #include "base/time/time.h" #include "chrome/browser/android/shortcut_...
5,684
1,792
/* * Copyright (C) 2013 Antony Woods <antony@teamwoods.org> * All rights reserved. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. * * Author: Antony Woods <antony@teamwoods.org> */ #include "Timer.h" namespace entityx { namespace ...
651
224
// Copyright (c) 2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <index/coinstatsindex.h> #include <test/util/setup_common.h> #include <util/time.h> #include <validation.h> #include <bo...
2,634
912
/// See ../../License.txt for license info. #pragma once #include <cmath> #include <vector> #include "../Core/Vector3.hpp" namespace HANDYMATH_NS { struct AABB3 { Vector3 Min; Vector3 Max; AABB3(); AABB3(Vector3 const & point); AABB3(std::vector<Vector3> const & points); AABB3(Vector3 const & min, Vector3 ...
3,644
1,464
class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { int i = nums1.size() + nums2.size(); int a = 0, b = 0; int res1 = 0, res2 = 0; while (a < nums1.size() && b < nums2.size() && (a + b) <= i/2) { if (nums1[a] < nums2[b]) { ...
923
333
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018 www.open3d.org // // Permissio...
6,660
2,348
#include "StdAfx.h" #include ".\recursivemutex.h" #include "atlsync.h" namespace clib { recursive_mutex::recursive_mutex() : m_lockCount(0) { } recursive_mutex::~recursive_mutex() { } LONG recursive_mutex::GetLockCount() { return m_lockCount; } void recursive_mutex::do_lock() { ::InterlockedIncrement(&m_lo...
2,090
883
// Main test framework #include <bandit/bandit.h> // std includes #include <iostream> #include <memory> // Threadily includes #include <ReadyEvent.h> #include <Observable.h> #include <ThreadManager.h> #include <ThreadQueueItem.h> #include <ThreadIds.h> using namespace snowhouse; using namespace bandit; namespace thre...
7,386
2,786
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
46,677
15,681
/* * mafObjectFactoryTest.cpp * mafCoreTest * * Created by Paolo Quadrani on 22/09/09. * Copyright 2009 SCS-B3C. All rights reserved. * * See Licence at: http://tiny.cc/QXJ4D * */ #include <mafTestSuite.h> #include <mafObjectBase.h> #include <mafObject.h> #include <mafSmartPointer.h> using namespace maf...
4,376
1,386
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
5,943
1,836
/* * Copyright (c) 2015, 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 <gl...
1,645
698
// GridCell.cpp : implementation file // // MFC Grid Control - Main grid cell class // // Provides the implementation for the "default" cell type of the // grid control. Adds in cell editing. // // Written by Chris Maunder <cmaunder@mail.com> // Copyright (c) 1998-2001. All Rights Reserved. // // This code ma...
6,989
2,546
class Solution { public: string removeKdigits(string num, int k) { string ans = ""; for (char i: num) { while (ans.length() && ans.back() > i && k) { ans.pop_back(); k--; } if (ans.length() || i != '0') ...
472
148
#include "MySimple3D.h" #include <QPaintEvent> #include <QResizeEvent> #include <QPainter> #include <QPainterPath> #include <QtMath> #include <algorithm> #include <QTimer> #include <QtConcurrent> #include <QDebug> MySimple3D::MySimple3D(QWidget *parent) : QWidget(parent) { initItems(); //异步处理结束,获取结果并刷新窗...
8,094
3,410
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/typedefs.h" #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: IGamePause #include "Global...
12,809
4,202
// 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. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #include "config.h" #include "V8TrackEvent.h" #include "bindings/c...
7,117
2,312
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { int n; cin >> n; vector<vector<int> > arr(n, vector<int>()); for(int i = 0; i < n; i++) { int nums = 0; cin >> nums; for(int j = 0; j < nums; j++) { int v; cin >> v; arr[i].push...
797
309
#include "palette.h" Palette::Palette() { int pat1[16] = {0,128,128,128,128,128,128,192,128,255,255,255,255,255,255,255}; int pat2[6] = {0,95,135,175,215,255}; short t=0, j=0, k=0; int gray = 8; // vector version rgb_table.resize(256, std::vector<int>(3,0)); // 256x3 w/ value 0 int rgb[] = {0,0,0}; fo...
2,885
1,449
// ================================================================================================= // Copyright 2003 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // of the Adobe license agreement accompanying i...
52,694
19,573
/* -*- Mode: C++; -*- */ // copyright (c) 2010 by Christos Dimitrakakis <christos.dimitrakakis@gmail.com> /*************************************************************************** * * * This program is free software; you can redistribute it ...
16,332
5,888
/* * Copyright 2011, Ben Langmead <langmea@cs.jhu.edu> * * This file is part of Bowtie 2. * * Bowtie 2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opt...
2,929
1,342
/*------------------------------------------------------------------------- * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2017 Google 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 ob...
102,010
52,416
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, i...
18,919
6,899
#define NCPP_EXCEPTIONS_PLEASE // // This is a **build** test - it does nothing else except ensure that all the C++ wrapper classes are included and that // the program builds. // // Once there are demos which exercise all the C++ classes this "test" can be removed // #include <cstdlib> #include <clocale> #include <ios...
1,608
694
// 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...
11,047
4,128
/*========================================================================= * * Copyright NumFOCUS * * 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.or...
5,429
2,006
/***************************************************************************** * \file * \brief This header defines the type 'monotype' *****************************************************************************/ /* The MIT License (MIT) Bit Standard Template Library. https://github.com/bitwizeshift/bit-st...
3,346
953
/*** Copyright (c), The Unregents of the University of California *** *** For more information please refer to files in the COPYRIGHT directory ***/ /* rsQuerySpecColl.c */ #include "querySpecColl.h" #include "rcMisc.h" #include "fileOpendir.h" #include "fileReaddir.h" #include "fileClosedir.h" #include "...
18,607
6,478
#include <iostream> using namespace std; int main() { long int decimalNumber, remainder, quotient; int i = 1, j, temp; char hexadecimalNumber[100]; cout << "Masukkan Bilangan Decimal : "; cin >> decimalNumber; quotient = decimalNumber; while (quotient != 0) { temp = quotient % 16; if (temp < 10)...
609
252
/* ** EPITECH PROJECT, 2019 ** NewDimension ** File description: ** Logger */ #ifndef LOGGER_HPP_ # define LOGGER_HPP_ # include <ostream> # include <iostream> # include <array> # include <ctime> # include <functional> # include "config/config.hpp" namespace nd { namespace engine { class Logger { public: Logger...
5,697
2,031
/** BSD 2-Clause License Copyright (c) 2019, SBcodework 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 ...
16,032
5,403
//===- lib/MC/MCContext.cpp - Machine Code Context ------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
37,360
11,627
#include "ChangeFrontBackColorWidget.h" #include <QDebug> #define CHANGEFRONTBACKCOLORWIDGET_MARGIN 3 #define CHANGEFRONTBACKCOLORWIDGET_BTN_W 12 #define CHANGEFRONTBACKCOLORWIDGET_BTN_H 12 ChangeFrontBackColorWidget::ChangeFrontBackColorWidget(QWidget *parent) : QWidget(parent) { setAutoFillBackground(true); } /...
1,731
713
#include <host-config.h> #if !defined (__MINGW32__) || (defined (__MINGW32__) && __GNUC__ >= 10) #include <compare> #endif #include <cstdio> #include <cstdlib> #include <cstring> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> #include <cctype> #include <libgen.h> #include <cerrno> #include <unistd.h> ...
42,691
16,794
/* * Copyright (c) 2018, Bosch Software Innovations GmbH. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted (subject to the limitations in the disclaimer * below) provided that the following conditions are met: * * * Redistributions o...
9,270
3,288
// SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: 2019-2022 Second State INC #include "gtest/gtest.h" GTEST_API_ int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
233
101
// Name: SeaOfThieves, Version: 2.0.23 #include "../pch.h" /*!!DEFINE!!*/ /*!!HELPER_DEF!!*/ /*!!HELPER_INC!!*/ #ifdef _MSC_VER #pragma pack(push, 0x01) #endif namespace CG { //--------------------------------------------------------------------------- // Functions //--------------------------------------------...
13,390
4,743
// AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from foo_client_interface.djinni #pragma once #include <atomic> #include <experimental/optional> #include "foo_some_other_record.hpp" #ifdef __cplusplus extern "C" { #endif #include "dh__foo_some_other_record.h" #ifdef __cplusplus } #endif stru...
794
272
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2020 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ...
5,486
2,997
// Copyright 2015 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/chromeos/file_system_provider/throttled_file_system.h" #include <stddef.h> #include <memory> #include <vector> #include "base/...
5,695
2,006
// Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/media/audio/audio_core/pipeline_config.h" #include <gtest/gtest.h> namespace media::audio { namespace { TEST(PipelineConfigTest, Calculate...
967
315
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04...
8,272
2,871
/* This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary, for any purpose, commercial or non-commercial, and by any * means. * * In jurisdictions ...
3,157
1,096
// DLLDemo.cpp : Defines the entry point for the DLL application. // #include "sense4.h" #include <stdlib.h> #include <stdio.h> #include <assert.h> #include "common.h" #include "..\inc\sample_26.h" #include "DLLDemo.h" /* global variables definition */ SENSE4_CONTEXT stS4Ctx = {0}; unsigned long dwBytesR...
7,886
3,593
/******************************************************************************/ /* */ /* Unit Name : atmos.cpp */ /* ...
10,360
3,392
#include "wmpch.h" #include "World.h" namespace InGame { float World::s_LimitTurnTime = 0; int World::s_LimitSuddenDeathTurn = 0; int World::s_CurrentTurn = 0; World::World(const InitiateData& initData) { s_LimitSuddenDeathTurn = initData.LimitSuddenDeathTurn; s_LimitTurnTime = initData.LimitTurnTime; s_C...
3,661
1,474
/***************************************************************************** FilterBank.cpp Author: Laurent de Soras, 2017 --- Legal stuff --- This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the ...
8,739
3,844
/* 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...
10,958
3,946
// 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. // ==++== // // // ==--== #include "sos.h" #include "disasm.h" #include <dbghelp.h> #include "corhdr.h" #include...
176,374
56,156
/* *************************************************************************** * * $Id$ * * *************************************************************************** * * * * *************************************************************************** * * $Log$ * Revision 1.3 2007/05/22 09:01:42 akisiel * Add the pos...
36,032
16,614
#ifndef RBX_FLOAT_HPP #define RBX_FLOAT_HPP #include "builtin/class.hpp" #include "builtin/object.hpp" #include "type_info.hpp" /* Begin borrowing from MRI 1.8.6 stable */ #if defined(__FreeBSD__) && __FreeBSD__ < 4 #include <floatingpoint.h> #endif #include <math.h> #include <float.h> namespace rubinius { class ...
4,595
1,609
/* * SignObjectImplementation.cpp * * Created on: Nov 20, 2010 * Author: crush */ #include "server/zone/objects/tangible/sign/SignObject.h" #include "server/zone/objects/creature/CreatureObject.h" #include "server/zone/objects/player/sui/messagebox/SuiMessageBox.h" #include "server/zone/objects/building/Bu...
1,253
412
// license:BSD-3-Clause // copyright-holders:Fabio Priuli /*********************************************************************************************************** NES/Famicom cartridge emulation for C&E PCBs Here we emulate the following PCBs * C&E Decathlon [mapper 244] * C&E Feng Shen Bang [mapper 246] ...
4,919
2,234
// Performs the given work function on the data element of the tree and // on each child. template<class Function> void tree::for_all(Function& action) { // Perform the action on each child. parallel_for_each(begin(_children), end(_children), [&](tree& child) { child.for_all(action);...
399
114
#include <bits/stdc++.h> #include <limits.h> using namespace std; #define pb(a) push_back(a) #define mp(a,b) make_pair(a,b) #define inf INT_MAX int waitTime(int period, int tempo) { return(period - tempo % period); } void dijkstra(vector<vector<pair<int, int> > > graph, int **cost, int start, int period) { for (i...
2,545
1,050
/* ============================================================================== This file is part of the JUCE library. Copyright (c) 2022 - Raw Material Software Limited JUCE is an open source library subject to commercial or open-source licensing. By using JUCE, you agree to the terms of...
5,608
1,692
// // composed_3.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #include <asio/bind_executor.hpp> #incl...
7,363
1,971
#include "msgpass/VarSyncMng.h" #include "msgpass/PackTransfer.h" #include <arcane/IParallelMng.h> #include <arcane/MeshVariableScalarRef.h> #include <arcane/MeshVariableArrayRef.h> #include <arcane/VariableBuildInfo.h> #include <thread> #include <mpi.h> /*------------------------------------------------------------...
10,641
4,110
/*! * @file Adafruit_BMP280.cpp * * This is a library for the BMP280 orientation sensor * * Designed specifically to work with the Adafruit BMP280 Sensor. * * Pick one up today in the adafruit shop! * ------> https://www.adafruit.com/product/2651 * * These sensors use I2C to communicate, 2 pins are requ...
15,750
6,374
/* By: facug91 From: http://coj.uci.cu/24h/problem.xhtml?abb=2972 Name: Tobby and Sequence Number: 2972 Date: 11/07/2014 */ #include <iostream> #include <cstdio> #include <cstdlib> #include <string> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <queue> #inclu...
1,095
586
// Copyright Dan Corrigan 2020 All Rights Reserved. #include "OVFPPluginStyle.h" #include "OVFPPlugin.h" #include "Framework/Application/SlateApplication.h" #include "Styling/SlateStyleRegistry.h" #include "Slate/SlateGameResources.h" #include "Interfaces/IPluginManager.h" TSharedPtr< FSlateStyleSet > FOVFPPluginStyl...
2,232
853
#include "ThreadTask.h" #include "MyVulkanManager.h" #include "ShaderQueueSuit_CommonTexLight.h" void ThreadTask::doTask() { MyVulkanManager::init_vulkan_instance(); MyVulkanManager::enumerate_vulkan_phy_devices(); MyVulkanManager::create_vulkan_devices(); MyVulkanManager::create_vulkan_CommandBuffer();...
1,615
542
#include <vnl/vnl_matrix_fixed.hxx> VNL_MATRIX_FIXED_INSTANTIATE(double,2,8);
78
41
/*************************************************************************** * @file main.cpp * @author Alan.W * @date 02 Feb 2014 * 13 Oct 2014 * @remark This code is for the exercises from C++ Primer 5th Edition * @note ***************************************************...
919
310
/** * Copyright 2021 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
6,263
2,165
#include "cilk.hpp" #include "raycast.hpp" int main() { taskparts::benchmark_cilk([&] { // benchmark benchmark(); }, [&] { // setup gen_input(); }, [&] { // teardown // later: write results to outfile }, [&] { // reset reset(); }); return 0; }
277
106
// Copyright (c) 2020 ASMlover. 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 ofconditions and...
3,292
1,176
// 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. // // File: contractimpl.cpp // // Keeps track of contract implementations, used primarily in stub dispatch. // // ...
21,098
6,898
#include <stdlib.h> #include <stdio.h> #include <malloc.h> #include <string.h> #include "token.h" #include "instructions.h" CInstrTable::CInstrTable() { currInstr = 0; } CInstrTable::~CInstrTable() { } int CInstrTable::AddInstr(char *name,int token,int numParams) { if(strlen(name) >= MAX_INSTR_NAME) re...
1,236
559
/* * ModbusReadCoils.cpp * * Created on: 09.02.2016 * Author: lode */ #include "ModbusReadCoils.h" namespace Modbus { ReadCoils2Array::ReadCoils2Array(unsigned* array, uint16_t numOfBits, TxnReturnPath* rp) : ReadBits2Array(FunctionCode, array, numOfBits, rp) {} //ReadCoils2Array::~ReadCoils2Array() //{ ...
388
161
#include "nalu.h" //#include <cmath> #include "math.h" Nalu::Nalu(int input_dim, int out_dim, float *weight, float *gate) : weights_(weight), gate_(gate), Layer ( input_dim, out_dim) {} void Nalu::process(float* input,float* output) { for(int i = 0; i < out_dim_; i++) { float lin = 0; ...
779
308
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #ifndef KAGOME_RUNTIME_CORE_HPP #define KAGOME_RUNTIME_CORE_HPP #include <outcome/outcome.hpp> #include <vector> #include "primitives/authority.hpp" #include "primitives/block.hpp" #include "primitives/block_id.hpp" ...
1,523
490
/* * This file is part of the Simutrans-Extended project under the Artistic License. * (see LICENSE.txt) */ #include <stdio.h> #include "../../simdebug.h" #include "../../simconst.h" #include "../../bauer/vehikelbauer.h" #include "../sound_desc.h" #include "../vehicle_desc.h" #include "../intro_dates.h" #include "...
22,923
10,383
auto f = [](auto) {};
22
10
#include "precomp.h" #undef TRACE #define TRACE(object) clogf << "line " << __LINE__ << ", file "\ << __FILE__ << ", " << #object " = " << object << endl; /* John: I think we should remove boundary references. P. */ extern ofstream clogf; void dfuvcomp(par_t& param, par_t_reg& dfparam, dmatrix& dfu, dmatrix& ...
1,014
459
#include <string> #include <FL/Fl.H> #include "layer.hpp" florb::layer::layer() : m_name("N/A"), m_enabled(true) { add_instance(this); }; florb::layer::~layer() { del_instance(this); }; const std::string& florb::layer::name() const { return m_name; }; bool florb::layer::enabled() const { ret...
473
189
// This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited. #include "storage/persistent_index.h" #include <gtest/gtest.h> #include "env/env_memory.h" #include "storage/fs/file_block_manager.h" #include "storage/fs/fs_util.h" #include "storage/storage_engine.h" #include "testut...
10,361
3,903
#include <iostream> #include <fstream> #include <string> typedef unsigned int uint; void write_file(std::string path, uint number) { std::ofstream file; file.open(path, std::ios::app); if (file.is_open()){ file << number << ' '; file.close(); }else{ std::cerr << "File isn't ope...
528
189
/* * MIT License * * Copyright (c) 2021 Jimmie Bergmann * * 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, m...
13,156
3,933
/******************************************************************************* The content of this file includes portions of the AUDIOKINETIC Wwise Technology released in source code form as part of the SDK installer package. Commercial License Usage Licensees holding valid commercial licenses to the AUDIOKINETIC W...
3,919
1,459
#include <cligen/cligen.h> #include <clixon/clixon.h> #include "plugin_lifecycle.h" int LifecycleManager::plugin_start(clicon_handle h) { return 0; } int LifecycleManager::plugin_exit(clicon_handle h) { return 0; } int LifecycleManager::plugin_daemon(clicon_handle h) { return 0; }
298
118
#include <iostream> struct [[nodiscard]] error_info { /*...*/ }; error_info enable_missile_safety_mode() { /*...*/ return {}; } void launch_missiles() { /*...*/ } void test_missiles() { enable_missile_safety_mode(); // compiler may warn on discarding a nodiscard value launch_missiles(); } // nodiscard( string-l...
504
192
#include "NotificationFdbEvent.h" #include "Meta.h" #include "MetaTestSaiInterface.h" #include "sairediscommon.h" #include "sai_serialize.h" #include <gtest/gtest.h> #include <memory> using namespace sairedis; using namespace saimeta; static std::string s = "[{\"fdb_entry\":\"{\\\"bvid\\\":\\\"oid:0x260000000005be...
1,882
890
// Copyright 2019 Google LLC // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #include <algorithm> #include <cmath> #include <functional> #include <random> #include <vector> #include <xnnpack.h> #include <benchmark/benchmark.h> #i...
38,689
19,550
/***************************************************************************** * * ftp.cpp - FTP folder bookkeeping * *****************************************************************************/ #include "priv.h" //#include "ftpinet.h" //#include "ftpsite.h" //#include "ftplist.h" //#include "msieftp.h...
4,139
1,381
// Copyright 2020 The Dawn Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
18,358
5,021
/*#include <omp.h> #include <stdio.h> #include <cmath> void byRows(double** A, double* V, int n, int m, double* result) { #pragma omp parallel for schedule(static) shared(result) for (int i = 0; i < n; ++i) { double sum = 0.0; for (int j = 0; j < m; ++j) { sum += A[i][j] * V[j]; } result[i] = sum; } } v...
2,824
1,437
// 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 "chrome/browser/ui/webui/options/search_engine_manager_handler.h" #include "base/bind.h" #include "base/strings/string_number_conversions.h"...
12,533
3,936