text
string
size
int64
token_count
int64
//==-------------- allowlist.cpp - SYCL_DEVICE_ALLOWLIST -------------------==// // // 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 // //===---------------------------...
15,911
4,512
#include <torch/extension.h> #include <tuple> std::tuple<torch::Tensor, torch::Tensor> imputer_loss_op(const torch::Tensor &log_probs, const torch::Tensor &targets, const torch::Tensor &force_emits, at::IntArrayRef input_lengths, at::IntArrayRef target_lengths, int64_t BLANK, ...
3,759
1,479
class Solution { public: bool isHappy(int n) { unordered_set<int> visited{n}; while (n != 1) { int temp = n; n = 0; while (temp) { int i = temp % 10; n += i * i; temp /= 10; } if (visited.coun...
452
137
#include <ymj.h> #include <array> #include <cstring> #include <cstdio> using Hand = std::array<uint8_t, YMJ_HAND_SIZE>; void callback(const ymj_state *state) { std::printf("(%2d)", state->head); for (int i = 0; i < 4; i++) { std::printf("(%c %d)", state->mentu[i].is_kotu ? 'k' : 's', state->mentu[i].start);...
722
339
// Copyright 2021 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chromeos/services/libassistant/settings_controller.h" #include "base/test/mock_callback.h" #include "base/test/task_environment.h" #include "ch...
12,637
3,732
/* Copyright (C) GridGain Systems. 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...
18,727
4,763
#ifndef __EIGEN_INCLUDER_HPP__ #define __EIGEN_INCLUDER_HPP__ #include <eigen3/Eigen/Core> #include <eigen3/Eigen/Dense> #include <eigen3/Eigen/Sparse> #include <eigen3/Eigen/SparseCholesky> #include <eigen3/Eigen/SparseQR> #include <eigen3/Eigen/LU> #include <eigen3/Eigen/Cholesky> #include <eigen3/Eigen/Geometry> #...
1,066
442
#include "SettingsLoader.h" #include "../Core/Engine.h" namespace Eunoia { void SettingsLoader::WriteSettingsToFile(const String& path, const EunoiaSettings& settings) { FILE* file = fopen(path.C_Str(), "wb"); if (!file) return; fwrite(&settings, sizeof(EunoiaSettings), 1, file); fclose(file); } void...
1,109
428
/** * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. * 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 "logdevice/test/utils/NodesConfigurationFileUpdater.h" #include "logdevice/c...
2,059
613
#include "editremotedialog.h" #include "mainwindow.h" #include "ui_mainwindow.h" #include <QDesktopServices> #include <QSettings> #include <dialogmaster.h> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), model(new MountModel(this)), sortModel(new QSortFilterProxyModel(this)),...
7,410
2,658
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2008, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...
3,491
1,129
#include <iostream> #include "array.h" using namespace std; int SetName(char list[][10], char names[]){ int lastIndex = Count(list); int lastChar = Count(names); for (int i = 0; i < lastChar; i++){ list[lastIndex][i] = names[i]; } return 0; } int ShowName(char names[][10], int index){ ...
3,295
1,196
#include "CrossPlatformGUI.h" bool CrossPlatformGUI::performGUIPass() { ImGui::NewFrame(); static bool isConnected = false; bool open = true; ImGui::SetNextWindowPos({ 0,0 }); { //TODO: Figure out how to get rid of the Windows window, make everything transparent, and just use ImGui for everything. //TODO:...
6,361
2,683
#ifndef MATRIX_HPP #define MATRIX_HPP #include "fraction.hpp" #include <cassert> #include <iostream> using namespace std; struct Matrix{ int row_size, col_size; Fraction **rows; // Constructors Matrix(int n); Matrix(int m, int n); // Copy Constructor Matrix(const Matrix &M); // Destructor ~Matrix(); ...
818
287
///////////////////////////////////////////////////////////////////////////////// // // Thor C++ Library // Copyright (c) 2011-2014 Jan Haller // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use ...
2,034
614
/** * @file unit_test_fnd_memory_addressof.cpp * * @brief addressof のテスト * * @author myoukaku */ #include <bksge/fnd/memory/addressof.hpp> #include <bksge/fnd/config.hpp> #include <gtest/gtest.h> #include "constexpr_test.hpp" namespace bksge_memory_test { namespace addressof_test { struct ...
2,104
1,024
#include <iostream> #include "../common/common.h" int main() { auto inputs = read_inputs(); auto values = split(inputs, "\n"); // Part 1 auto depth = 0; auto horizontal = 0; for (size_t i = 0; i < values.size(); i++) { auto input = values[i]; auto instructions = split(input, " ...
1,241
413
/* Copyright 2020 Victor Santos Reis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwar...
132,136
48,706
/* ============================================================================== This file contains the basic framework code for a JUCE plugin editor. ============================================================================== */ #include "PluginProcessor.h" #include "PluginEditor.h" //=================...
11,062
3,913
#include<iostream> #include <ctime> #include<string> using namespace std; void encrypt( char [ ] ); // prototypes of functions used in the code void decrypt( char * ePtr ); int i=1; // for nodeNumber (unique incremental integral value) // structure of node struct node { string data; // information int nodeNu...
2,679
883
//:: pd_prefix = "p4_pd_" + p4_prefix + "_" //:: api_prefix = p4_prefix + "_" #include "p4_prefix.h" #include <iostream> #include <string.h> #include "pd/pd.h" #include <list> #include <map> #include <mutex> #include <thread> #include <condition_variable> #include <future> using namespace ::p4_pd_rpc; using name...
29,001
11,494
// 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/ash/login/screens/wrong_hwid_screen.h" #include "chrome/browser/ash/login/wizard_controller.h" #include "chrome/browser/ui/w...
1,444
523
go_bandit([]() { describe("adiar/bdd/apply.cpp", []() { node_file bdd_F; node_file bdd_T; { // Garbage collect writers to free write-lock node_writer nw_F(bdd_F); nw_F << create_sink(false); node_writer nw_T(bdd_T); nw_T << create_sink(true); } ptr_t sink_T = create_sink...
44,007
15,755
#include "ComponentLight.h" #include "GameObject.h" #include "ComponentTransform.h" #include "ModuleScene.h" #include "Application.h" #include "debugdraw.h" #include "JSONManager.h" ComponentLight::ComponentLight(GameObject * my_go) { this->my_go = my_go; this->type = LIGHT; if (App->scene->mainLight == nullptr) Ap...
1,382
476
// 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 "quiche/http2/test_tools/http2_frame_decoder_listener_test_util.h" #include "quiche/http2/decoder/http2_frame_decoder_listener.h" #include "quic...
16,573
5,602
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/offline_pages/core/prefetch/tasks/metrics_finalization_task.h" #include <memory> #include <set> #include <vector> #include "base/te...
8,646
3,022
/*############################################################################## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License...
64,956
19,447
/* * Copyright (c) 2020 Samsung Electronics 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...
13,657
4,322
// Copyright 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 "content/renderer/media/crypto/content_decryption_module_factory.h" #include "base/logging.h" #include "content/renderer/media/crypto/key_system...
5,972
1,833
#include "territory.h" Territory::Territory(Board *parent) : QObject(parent) { bp = parent; size = 0.4; show = false; for ( int i = 0; i < bp->Xsize; i++ ) for ( int j = 0; j < bp->Ysize; j++ ) gi.append( -1 ); // -1 == undetermined territory, not yet in a group update(); } void Territory::setScen...
7,029
2,445
// ***************************************************************************** /*! \file tests/unit/Base/TestTimer.cpp \copyright 2012-2015 J. Bakosi, 2016-2018 Los Alamos National Security, LLC., 2019 Triad National Security, LLC. All rights reserved. See the LICENSE f...
9,826
3,151
/* * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Softwa...
2,148
711
// Description: C++18 Table Object implementation for CFInt. /* * org.msscf.msscf.CFInt * * Copyright (c) 2020 Mark Stephen Sobkow * * MSS Code Factory CFInt 2.13 Internet Essentials * * Copyright 2020-2021 Mark Stephen Sobkow * * This file is part of MSS Code Factory. * * MSS Code Factory is availabl...
32,005
13,346
/* +----------------------------------------------------------------------+ | Swoole | +----------------------------------------------------------------------+ | This source file is subject to version 2.0 of the Apache license, | | that is bundled wi...
5,352
2,018
#include "parse.h" #include "util.h" int parse_child(FILE *fp, int unquoted, int *line_n, char *buff, char **b, group *g, group *prev_g, int depth, parse_error *er) { g->countable = 1; //until proven otherwise int n_chars = 0; while(buff[n_chars] != '\0') n_chars++; size_t line_buff_len = max_read_line_len; c...
14,666
5,886
// record_stack.cc - Fundamental stack arrangement. // // ##Copyright## // // Copyright 2000-2016 Peter Robinson (pjr@itee.uq.edu.au) // // 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 // ...
871
307
// This file is part of Wintermute Engine // For conditions of distribution and use, see copyright notice in license.txt #include "Wme.h" #include "Timer.h" namespace Wme { ////////////////////////////////////////////////////////////////////////// Timer::Timer() { m_OgreTimer = new Ogre::Timer(); ...
1,445
456
#pragma once #include "avr/io/detail/type_traits/enable_if.hpp" namespace avr { namespace io { namespace detail { template<typename Bit, typename... Rest> struct all_state_representation_at_compiletime { constexpr static bool value = all_state_representation_at_compiletime<Bit>::value && all_stat...
833
261
// Copyright Carl Philipp Reh 2006 - 2019. // 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 SGE_SPRITE_GEOMETRY_DETAIL_FILL_TEXTURE_COORDINATES_HPP_INCLUDED #define SGE_SPRITE_GEOMETR...
3,173
1,148
#include <iostream> #include <fstream> using namespace std; const long long int del = 1000000007; long long int binpow (long long int a, long long int n) { long long int res = 1; while (n) { if (n & 1) { res *= a; res = res % del; } a *= a; a = a%del; n >>= 1; } return res; ...
1,027
524
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "garnet/lib/ui/gfx/tests/session_handler_test.h" namespace scenic_impl { namespace gfx { namespace test { void SessionHandlerTest::SetUp() { I...
3,059
989
// // Created by Dawid Drozd aka Gelldur on 03.12.17. // #include "Bezier.h" //////////////////////////////////
114
46
// Copyright (C) 2018-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "ngraph/op/util/elementwise_args.hpp" #include "ngraph/op/util/binary_elementwise_arithmetic.hpp" using namespace ngraph; std::tuple<element::Type, PartialShape> ngraph::op::util::validate_and_infer_elementwise_args( ...
1,769
546
class Solution { public: int trap(vector<int>& height) { int n = height.size(), h; int* l = new int[n]; int* r = new int[n]; h = 0; for (int i = 0; i < n; i++) { h = max(h, height[i]); l[i] = h; } h = 0; for (int i = n-1; i >= 0; i--) { h = max(h, height[i]); r[i] = h; } ...
457
265
#include <iostream> #include <fstream> #include <sstream> #include <regex> #include <map> #include "lmpBaseReader.hpp" #include "debug.hpp" using namespace std; void lmpBaseReader::goToSection(ifstream &f, string section_title) { f.seekg(0,ios::beg); //return to top of file regex sectionRE(section_title+".*",reg...
3,818
1,419
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file...
2,914
1,017
#include<iostream> using namespace std; class Kitty{ public: void nyan(){cout << "Kitty on your lap\n";} }; class Di_Gi_Gharat : public Kitty{ public: void nyo(){cout << "Di Gi Gharat\n";} } obj; int main(){ obj.nyo(); obj.nyan(); return 0; }
266
111
class Baz {}; class Qux { Baz Foo; /* Test 1 */ // CHECK: Baz Bar; public: Qux(); }; Qux::Qux() : Foo() /* Test 2 */ {} // CHECK: Qux::Qux() : Bar() /* Test 2 */ {} // Test 1. // RUN: clang-rename -offset=33 -new-name=Bar %s -- | sed 's,//.*,,' | FileCheck %s // Test 2. // RUN: clang-rename -off...
461
194
#include "testUtils.h" using namespace irr; using namespace core; using namespace io; static bool testgetAbsoluteFilename(io::IFileSystem* fs) { bool result=true; io::path apath = fs->getAbsolutePath("media"); io::path cwd = fs->getWorkingDirectory(); if (apath!=(cwd+"/media")) { logTestString("ge...
4,824
1,803
#include "Resource.h" #define PREFETCH_SIZE 128*1024 using namespace Filesystem; HashMap<String, Resource*> Resource::pool; const Resource& Resource::request(StringRef path) { Resource* resource; auto iter = pool.find(path); if(iter != pool.end()) { resource = iter->second; } else ...
795
262
#include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; for(int a0 = 0; a0 < t; a0++){ int n; cin >> n; int min = 1001, max = 0; for(int x_i = 0; x_i < n; x_i++){ int x; cin >> x; if (x < min) min = x; ...
435
167
// // Generated file. Do not edit. // // clang-format off #include "generated_plugin_registrant.h" #include <flutter_audio_capture/flutter_audio_capture_plugin.h> void fl_register_plugins(FlPluginRegistry* registry) { g_autoptr(FlPluginRegistrar) flutter_audio_capture_registrar = fl_plugin_registry_get_reg...
469
160
#ifndef _WIN32 #include <sys/types.h> #include <signal.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> #include <fcntl.h> #include <unistd.h> #include <algorithm> #include <netinet/in.h> #include <sys/time.h> #if defined(__APPLE__) || defined(BSD) #inclu...
14,651
4,878
#include <libgraphic/Painter.h> #include <libwidget/elements/IconElement.h> namespace Widget { IconElement::IconElement(Ref<Graphic::Icon> icon, Graphic::IconSize size) : _icon{icon}, _icon_size{size} { } void IconElement::paint(Graphic::Painter &painter, const Math::Recti &) { if (!_icon) { retu...
711
253
/* * AttrPlotPluginWrapper.cpp * * Created on: 28 Feb 2017 * Author: Blaz Kranjc */ #include "AttrPlotPluginWrapper.h" AttrPlotPluginWrapper::AttrPlotPluginWrapper(const std::string& port, int max_attributes, int cache_size, int max_selected, const std::string& in_port, int in_addr) : ND...
550
201
/* Copyright (c) 2005-2020, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
32,954
10,381
// RUN: %clang_cc1 -triple x86_64-linux -O1 -disable-llvm-passes %s \ // RUN: -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,OLD-PATH // RUN: %clang_cc1 -triple x86_64-linux -O1 -disable-llvm-passes %s \ // RUN: -emit-llvm -new-struct-path-tbaa -o - | FileCheck %s -check-prefixes=CHECK,NEW-PATH // // Chec...
1,029
505
/* * DummyThreads.hh * * Copyright 2002, LifeLine Networks BV (www.lifeline.nl). All rights reserved. * Copyright 2002, Bastiaan Bakker. All rights reserved. * * See the COPYING file for the terms of usage and distribution. */ #ifndef _LOG4CPP_THREADING_DUMMYTHREADS_HH #define _LOG4CPP_THREADING_DUMMYTHREADS_HH...
2,015
565
#include "mqtt_api.h" #include <iostream> #include <functional> #include <boost/date_time/time_duration.hpp> namespace wavplayeralsa { MqttApi::MqttApi(boost::asio::io_service &io_service) : io_service_(io_service), reconnect_timer_(io_service) { } void MqttApi::Initialize(std::shared_ptr<spdlog::logger> l...
2,341
951
/* * This file is open source software, licensed to you under the terms * of the Apache License, Version 2.0 (the "License"). See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. You may not use this file except in compliance with the License. * * You may ...
24,867
7,741
#include "amuse/Submix.hpp" namespace amuse { Submix::Submix(Engine& engine) : m_root(engine) {} EffectChorus& Submix::makeChorus(uint32_t baseDelay, uint32_t variation, uint32_t period) { return makeEffect<EffectChorus>(baseDelay, variation, period); } EffectChorus& Submix::makeChorus(const EffectChorusInfo& inf...
2,272
740
// license:BSD-3-Clause // copyright-holders:Curt Coder /********************************************************************** TIKI-100 expansion bus emulation **********************************************************************/ #include "emu.h" #include "exp.h" //******************************************...
5,513
1,877
#include "Sobol.hpp" constexpr uint32_t kMaxDimension = 64; constexpr VkDeviceSize kBufferSize = (kMaxDimension + 1) * sizeof(uint32_t); /*void Sobol::Next(float *out) { uint8_t c = get_first_zero_bit(m_index++); //uint8_t c = glm::findLSB(~(m_index ++)); for (unsigned j = 0; j < m_dim; ++j) out[j]...
2,946
1,210
#include "..\common.h" #include <iostream> #include <memory> using namespace cv; using namespace std; int main(int argc, char** argv) { int retVal = 0; if (argc == 3) { Mat inputImage = imread(argv[1], IMREAD_COLOR); if (!inputImage.data) { printf("ERROR: No input image...
2,139
564
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool isBalanced(TreeNode* root) { if(root==NULL) { return true...
786
263
#include "muscle.h" #include "msa.h" #include "profile.h" #include "objscore.h" #if DOUBLE_AFFINE #define TRACE 0 #define TEST_SPFAST 0 static SCORE GapPenalty(unsigned uLength, bool Term, SCORE g, SCORE e) { //if (Term) // { // switch (g_TermGap) // { // case TERMGAP_Full: // return g + (uLength - 1)*e;...
6,734
3,349
#include "Line2D.hpp" #include <core/GodotGlobal.hpp> #include <core/CoreTypes.hpp> #include <core/Ref.hpp> #include <core/Godot.hpp> #include "__icalls.hpp" #include "Curve.hpp" #include "Gradient.hpp" #include "Texture.hpp" namespace godot { Line2D::___method_bindings Line2D::___mb = {}; void Line2D::___ini...
8,637
3,425
#include "LyricDecoder.h" #include "zlib/zconf.h" #include "zlib/zlib.h" #include "stdio.h" #include "QQMusicDES/des.h" #include <sys/stat.h> #include <malloc.h> #include <stdlib.h> #include <assert.h> #include<string.h> const unsigned char key[] = { 64, 71, 97, 119, 94, 50, 116, 71, 81, 54, 49, 45, 206, 210, 110, 1...
2,880
1,437
/********************************************************************** * Copyright (c) 2008-2016, Alliance for Sustainable Energy. * All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by t...
38,751
14,238
#include <string> #include <sstream> #include <iostream> #include "log.h" using std::string; using std::stringstream; void log::info(string message) { std::cout << "\e[0;32m[INFO]\e[0m - " << message << std::endl; } void log::error(string name, string message) { std::cerr << "\e[0;31m" << name << ":\e[0m " << mes...
723
256
// $Id: ngt.cpp 245 2009-04-02 14:05:40Z fabio_brugnara $ /****************************************************************************** IrstLM: IRST Language Model Toolkit Copyright (C) 2006 Marcello Federico, ITC-irst Trento, Italy This library is free software; you can redistribute it and/or modify it under the t...
15,885
6,068
#ifndef STAN_MATH_FWD_SCAL_FUN_TRUNC_HPP #define STAN_MATH_FWD_SCAL_FUN_TRUNC_HPP #include <stan/math/fwd/core.hpp> #include <stan/math/prim/scal/fun/trunc.hpp> namespace stan { namespace math { /** * Return the nearest integral value that is not larger in * magnitude than the specified argument. ...
583
223
#include "tests_runner.h" #include "../compact_vector.h" std::string test_string = "hello_world_hello_world_hello_world_hello_world"; COMPACT_VECTOR_TEST(constructor_1) { compact_vector<uint8_t> vector(10); } COMPACT_VECTOR_TEST(constructor_2) { compact_vector<uint8_t> vector(100); } COMPACT_VECTOR_TEST(construct...
1,684
732
/* * Auto-Generated File. Changes will be destroyed. */ #include "squid.h" #include "auth/CredentialState.h" namespace Auth { const char *CredentialState_str[] = { "Unchecked", "Ok", "Pending", "Handshake", "Failed" }; }; // namespace Auth
248
93
/* Copyright (c) <2003-2021> <Julio Jerez, Newton Game Dynamics> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpo...
7,713
3,471
class LRG_ModuleVehicleCam: Module_F { scope = 2; displayName = "Add Vehicle Camera"; icon = "\z\LRG Fundamentals\addons\media\images\icons\Camera.paa"; category = "LRG_CommandCentre"; function = "LR_fnc_moduleVehicleCam"; functionPriority = 4; isGlobal = 0; isTriggerActivated = 0; isDisposable = 0; is3DEN = ...
836
292
/* Copyright 2001, 2019 IBM Corporation * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the * following d...
1,944
730
/*Implement Insertion Sort*/ #include <iostream> using namespace std; void print(int a[],int n) { for(int i=0;i<n;i++) cout<<a[i]<<" "; } void Insertion_Sort(int a[],int n) { int key; for(int i=1;i<n;i++) { key=a[i]; int j=i-1; while(j>=0 && key<a[j]) { a[j+1]=a[j]; j--; } a[j+1]=key; } ...
540
283
#include "asuka.hpp" int main(void) { cout<<"starting up"<<endl; AT::Resource::Manager t; t.accept("/usr/lib/asuka/resource"); for(int i=0; i<10; i++) { AT::Field image = t.input("a24bit.tga"); cout<<"=["<<i<<"]============================"<<endl; cout<<"width: "<<image["header"]["width"]<<endl...
469
192
#include <pcv/utils/benchmark_common.h> #include <cmath> namespace pcv { BenchmarkStats::BenchmarkStats(size_t LOOKUP_CNT, size_t real_rule_cnt, size_t trace_cnt, std::ostream &out) : LOOKUP_CNT(LOOKUP_CNT), out(out), construction_timer(nullptr), lookup_timer( nullptr), real_rule_cnt(real_rule_cnt), number_of...
3,122
1,279
#include <StftPitchShift/StftPitchShift.h> #include <StftPitchShift/FFT.h> #include <StftPitchShift/RFFT.h> #include <StftPitchShift/STFT.h> #include <StftPitchShift/StftPitchShiftCore.h> using namespace stftpitchshift; StftPitchShift::StftPitchShift( const size_t framesize, const size_t hopsize, const double...
3,597
1,302
/** * Copyright (C) 2012 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful...
4,852
1,575
#include <cstdio> #include <vector> #include <algorithm> typedef long long ll; bool check(const std::vector<ll> &sv, ll med, const ll budget){ ll left(0), right(0), sum(0); for(ll p = 0; p < sv.size(); p++){ if(sv[p].first < m){++left; sum += (sv[p].second > m) ? sv[p].second : m;} if(sv[p].fi...
1,090
445
#include "node.hpp" int main() { //(20.0 + -10.0 ) * 0.1 node * p1 = new NumNode(20.0); node * p2 = new NumNode(-10.0); node * p3 = new AddNode(p1,p2); node * p4 = new NumNode(0.1); node * p5 = new MultNode(p3,p4); double x = p5->calc(); std::cout << x<<std::endl; delete p5; }
287
146
version https://git-lfs.github.com/spec/v1 oid sha256:03df42f0f44ce261f51089ffca63fb7aa5ce59ad275f40e295e6d8801e5a4d03 size 19831
130
90
// Copyright 2010-2018, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of condit...
21,460
6,605
/*++ Copyright (c) 2005 Microsoft Corporation All rights reserved. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. File Name: bkfl...
13,406
4,429
//---------------------------------Spheral++----------------------------------// // ArtificialViscosity -- The base class for all ArtificialViscosities in // Spheral++. //----------------------------------------------------------------------------// #include "FileIO/FileIO.hh" #include "Hydro/HydroFieldNames.hh" #incl...
9,495
3,212
/*------------------------------------------------------------------------- * drawElements Quality Program OpenGL ES 2.0 Module * ------------------------------------------------- * * Copyright 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not ...
13,732
6,135
// Copyright 2018 Bernardo Heynemann <heynemann@gmail.com> // Backstage Renderer #pragma once #include <string> namespace backstage { namespace renderer { class CliRoot { public: bool help = false; bool version = false; std::string host = "localhost"; int port = 8888; int workers = 8; int l...
655
209
#include <Ref_Constituant_Avec_Vitesse.h> #include <Constituant_Avec_Vitesse.h> Implemente_ref(Constituant_Avec_Vitesse);
122
55
//============================================================================ // // This file is part of GPSTk, the GPS Toolkit. // // The GPSTk is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation; ei...
6,575
2,362
/* * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
10,260
3,404
// Copyright 2016 The Chromium OS 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 "power_manager/powerd/system/dbus_wrapper.h" #include <memory> #include <utility> #include <base/bind.h> #include <base/check.h> #include <b...
5,557
1,763
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/glue/model/LongColumnStatisticsData.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws {...
2,350
873
#include <iostream> #include <mutex> #include <condition_variable> #include <unistd.h> #include <thread> using namespace std; int main() { cout << "Hello world!"<< endl; return 0; }
201
69
#ifndef ICHARACTER_HPP #define ICHARACTER_HPP #include <string> class AMateria; class ICharacter { public: virtual ~ICharacter() {}; virtual std::string const & getName() const = 0; virtual void equip(AMateria* m) = 0; virtual void unequip(int idx) = 0; virtual void use(in...
363
126
#include "sx_serie_cronologia.h" #include "form_serie_mese.h" #include <QtSql> #include <iostream> using namespace std; sx_serie_cronologia::sx_serie_cronologia(QWidget *parent) : QWidget(parent) { lay=new QVBoxLayout(this); tit=new QLabel("Cronologia serie",this); tit->setFont(QFont("Times",15)); ...
1,144
448
/** * @file methods/kmeans/kmeans_main.cpp * @author Ryan Curtin * * Executable for running K-Means. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpack. If not, see...
16,907
5,481
#include "Newton6DOFConstraint.h" #include "NewtonPhysicsWorld.h" #include "UrhoNewtonConversions.h" #include "dCustomSixdof.h" #include "Urho3D/Core/Context.h" namespace Urho3D { NewtonSixDofConstraint::NewtonSixDofConstraint(Context* context) : NewtonConstraint(context) { } NewtonSixDofConstr...
3,450
1,246