text string | size int64 | token_count int64 |
|---|---|---|
//===----------------------------------------------------------------------===//
//
// This file is part of the Noxoscope project
//
// Copyright (c) 2016 Niklas Helmertz
//
//===----------------------------------------------------------------------===//
#include "TestShared.h"
#include <Logging.h>
#include <Geometry... | 1,247 | 470 |
/*
* Copyright (c) 2021, NVIDIA 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 2,376 | 1,232 |
#include "GamePCH.h"
#include "GameObjects/GameObject.h"
#include "Trainer.h"
#include "Controllers/PlayerController.h"
#include "Sprites/AnimatedSprite.h"
#include "GameplayHelpers/ResourceManager.h"
#include "GameplayHelpers/TileMap.h"
#include "Mesh/Mesh.h"
#include "GameplayHelpers/SceneManager.h"
#include "Sce... | 5,506 | 2,321 |
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... | 4,104 | 1,269 |
#pragma once
#include <cstdint>
#include <vector>
#include <gmock/gmock.h>
namespace ipmiblob
{
class CrcInterface
{
public:
virtual ~CrcInterface() = default;
virtual std::uint16_t
generateCrc(const std::vector<std::uint8_t>& data) const = 0;
};
class CrcMock : public CrcInterface
{
public:
... | 497 | 184 |
#include <iostream>
#include <vector>
#include <fstream>
#include <sstream>
#include <string>
int main()
{
std::vector<std::vector<double>> arr;
std::string str;
std::ifstream in; in.open("april.txt");
while(std::getline(in, str))
{
std::stringstream ss(str);
int index=0;double n;
... | 574 | 211 |
/************************************************************************
> File Name: variable_v1.cpp
> Author: deqi
> Mail: deqi_tang@163.com
> Created Time: Sat 30 Jan 2021 01:11:54 PM CST
************************************************************************/
//#include "atomsciflow/abinit/utils... | 9,458 | 2,986 |
#include <iostream>
#include <vector>
#include <string>
#include <string>
#include <iomanip>
#include <cmath>
#include <map>
#include <set>
using std::cout;
using std::endl;
using std::vector;
using std::set;
using std::cin;
using std::string;
using std::map;
#define PI 3.14159265359
#define N 1000
#define M 2*N+1
... | 3,744 | 1,826 |
/**
* @file: InSpeciesTypeBond.cpp
* @brief: Implementation of the InSpeciesTypeBond class
* @author: SBMLTeam
*
* <!--------------------------------------------------------------------------
* This file is part of libSBML. Please visit http://sbml.org for more
* information about SBML, and the latest versio... | 23,649 | 8,303 |
// A C++ Program to implement A* Search Algorithm
#include <bits/stdc++.h>
using namespace std;
#define ROW 9
#define COL 10
// Creating a shortcut for int, int pair type
typedef pair<int, int> Pair;
// Creating a shortcut for pair<int, pair<int, int>> type
typedef pair<double, pair<int, int>> pPair;
// A struc... | 23,992 | 7,138 |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... | 6,824 | 2,168 |
#include "editoroptions.h"
#include "loading.h"
#include "colors.h"
#include "definitions.h"
EditorOptions::EditorOptions()
{
free();
}
EditorOptions::~EditorOptions()
{
free();
}
void EditorOptions::free()
{
if (!keytextvec.empty())
{
for (auto &it : keytextvec)
{
delete it;
it = nullptr;
}
keyte... | 9,190 | 3,727 |
#include <Eigen/Dense>
#include <iostream>
#include <iomanip>
#include <cmath>
//! \brief One step of autonomous IVP y'' + y' + y = 0, [y(0), y'(0)] = z0 using SDIRK method
//! Use SDIRK method for first order ode z' = f(z). Steps of size h.
//! \tparam StateType type of solution space y and initial data y0
//! \par... | 3,160 | 1,291 |
/*
* src/c_dd.cc
*
* This work was supported by the Director, Office of Science, Division
* of Mathematical, Information, and Computational Sciences of the
* U.S. Department of Energy under contract number DE-AC03-76SF00098.
*
* Copyright (c) 2000-2001
*
* Contains the C wrapper functions for double-double pre... | 6,580 | 3,267 |
/*
* ModDocTemplate.cpp
* ------------------
* Purpose: CDocTemplate and CModDocManager specialization for CModDoc.
* Notes : (currently none)
* Authors: OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#include "stdafx.h"
#include "FolderScanner.h"
#... | 7,007 | 2,816 |
@interface CocoaViewport : NSView {
@public
phoenix::Viewport* viewport;
}
-(id) initWith:(phoenix::Viewport&)viewport;
-(void) drawRect:(NSRect)rect;
-(BOOL) acceptsFirstResponder;
-(NSDragOperation) draggingEntered:(id<NSDraggingInfo>)sender;
-(BOOL) performDragOperation:(id<NSDraggingInfo>)sender;
-(void) keyDown:... | 680 | 240 |
// 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_TIME_OUTPUT_TM_HPP_INCLUDED
#define FCPPT_TIME_OUTPUT_TM_HPP_INCLUDED
#include <fcp... | 967 | 389 |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cc/output/delegating_renderer.h"
#include "cc/output/gl_renderer.h"
#include "cc/output/output_surface.h"
#include "cc/test/fake_output_surface_... | 3,873 | 1,154 |
/*****************************************************************************
Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
more contributor license agreements. See the NOTICE file distributed
with this work for additional information regarding copyright ownership.
Accellera licenses... | 3,739 | 1,253 |
/*
* Copyright (c) 2021 Huawei Device 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 applica... | 11,379 | 4,688 |
/* Copyright 2021 Stanford University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | 50,218 | 18,293 |
#include <graphics.h>
int main ()
{
initwindow(600,500,"TUTORIAL");
setbkcolor(BLACK);
cleardevice();
readimagefile("nyoba.jpg",100,100,300,300);
getch();
closegraph();
}
| 198 | 99 |
// Copyright David Abrahams, Daniel Wallin 2003. 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_0.txt)
#include <boost/parameter.hpp>
#include <boost/parameter/macros.hpp>
#inc... | 1,233 | 497 |
#pragma once
#include "./PKIXCertPathChecker.hpp"
class JObject;
namespace java::net
{
class URI;
}
namespace java::security::cert
{
class X509Certificate;
}
namespace java::security::cert
{
class PKIXRevocationChecker : public java::security::cert::PKIXCertPathChecker
{
public:
// Fields
// QJniObject f... | 1,222 | 450 |
#include <stdio.h>
#include <math.h>
#include <time.h>
#ifdef WIN32
#include <windows.h>
#include <iostream.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <math.h>
#include <fstream.h>
void SetRandomSeed()
{
LARGE_INTEGER la;
QueryPerformanceCounter( &la );
srand( (unsign... | 1,591 | 674 |
#ifndef __VSIM_RIGID_BODY_HPP__
#define __VSIM_RIGID_BODY_HPP__
#include <string>
#include <vector>
#include <memory>
#include <Eigen/Core>
#include <vsim/env/scene_fwd.hpp>
#include <vsim/env/pose.hpp>
#include <vsim/env/base_element.hpp>
namespace vsim {
class RigidBody ;
typedef std::shared_ptr<RigidBody> BodyP... | 612 | 246 |
#define BOOST_TEST_MODULE WeightsTest
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include "sparse_vector.h"
using namespace std;
BOOST_AUTO_TEST_CASE(Dot) {
SparseVector<double> x;
SparseVector<double> y;
x.set_value(1,0.8);
y.set_value(1,5);
x.set_value(2,-2);
... | 746 | 364 |
#include "GameLoader.h"
using namespace std;
Game* GameLoader::Load(wstring& filePath, int& sizeX, int& sizeY)
{
Game* game = new Game();
ifstream file(filePath);
if (!file.good())
return nullptr;
file >> sizeX;
file >> sizeY;
for (int x = 0; x < sizeX; x++)
{
game->tiles.push_back(new Tile(x, -1, Tile... | 1,152 | 555 |
// Author(s): Bas Ploeger, Carst Tankink, Ruud Koolen
// Copyright: see the accompanying file COPYING or copy at
// https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENS... | 1,938 | 730 |
// HACKERRANK - Halloween Party
// https://www.hackerrank.com/challenges/halloween-party
#include <iostream>
using namespace std;
int main (int argc, char *argv[]) {
int N;
cin >> N;
while (N--) {
long long input;
long long x, y;
cin >> input;
x = input / 2;
y = input - x;
cout << x * y << endl;
... | 337 | 150 |
// OptFrame - Optimization Framework
// Copyright (C) 2009-2015
// http://optframe.sourceforge.net/
//
// This file is part of the OptFrame optimization framework. This framework
// is free software; you can redistribute it and/or modify it under the
// terms of the GNU Lesser General Public License v3 as published by... | 3,473 | 1,327 |
/* Copyright © 2019 Haoran Luo
*
* 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, publis... | 3,871 | 1,175 |
#ifndef IRODS_RS_SET_DELAY_SERVER_MIGRATION_INFO_HPP
#define IRODS_RS_SET_DELAY_SERVER_MIGRATION_INFO_HPP
/// \file
#include "irods/plugins/api/delay_server_migration_types.h"
struct RsComm;
#ifdef __cplusplus
extern "C" {
#endif
/// Atomically sets the leader and successor hostnames for delay server migration in ... | 1,691 | 546 |
#include <ghex/transport_layer/callback_communicator.hpp>
#include <ghex/transport_layer/mpi/communicator.hpp>
#include <iostream>
#include <iomanip>
#include <gtest/gtest.h>
template<typename Comm, typename Alloc>
using callback_comm_t = gridtools::ghex::tl::callback_communicator<Comm,Alloc>;
//using callback_comm_t... | 2,050 | 815 |
/*
Copyright (C) 2015 Preet Desai (preet.desai@gmail.com)
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 applic... | 2,172 | 648 |
/*
* PopulationPerPlanningArea.cpp
*
* Created on: 13 Aug, 2015
* Author: Chetan Rogbeer <chetan.rogbeer@smart.mit.edu>
*/
#include "database/entity/PopulationPerPlanningArea.hpp"
#include <boost/serialization/vector.hpp>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>
... | 3,662 | 1,170 |
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include <string>
#include "src/unicode-decoder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal ... | 1,044 | 367 |
///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2014 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... | 11,585 | 3,898 |
#include "ClangTidy.h"
#include "ClangTidyTest.h"
#include "gtest/gtest.h"
namespace clang {
namespace tidy {
namespace test {
class TestCheck : public ClangTidyCheck {
public:
TestCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFi... | 2,644 | 1,017 |
#include <algorithm>
#include <cassert>
#include <iostream>
#include <cmath>
#include <complex>
using namespace std;
#include <SuiteSparseQR.hpp>
#include <umfpack.h>
#include "Real.h"
#include "Complex.h"
#include "SparseMatrix.h"
#include "DenseMatrix.h"
#include "LinearContext.h"
#include "Utility.h"
namespace DD... | 21,267 | 7,315 |
//
// Created by panda on 2021/2/26.
//
#include <cameras/camera.h>
#include <cores/scene.h>
using namespace DR;
void Film::write_ppm(const std::string &filename) {
auto fp = std::unique_ptr<FILE, decltype(&fclose)>(
fopen(filename.c_str(), "wb"), &fclose);
(void)fprintf(fp.get(), "P6\n%d %d\n255\n", height,... | 3,460 | 1,424 |
#pragma once
namespace FSNG {
using Ticket = uint64_t;
inline Ticket InvalidTicket = 0;
inline Ticket FirstTicket = 1;
} | 123 | 47 |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2020 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... | 4,331 | 1,736 |
/*
*
*/
#include "Comment.hxx"
using namespace std;
namespace html
{
string Comment::toString() const
{
string s = m_text;
size_t found, pos = 0;
const string ind = indent();
const string nl = "\n" + ind + ' ';
while ((found = s.find('\n', pos)) != string::npos) {
s.replace(found, 1, nl);
pos =... | 449 | 178 |
#include "SimG4CMS/Calo/interface/HFFibreFiducial.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "CLHEP/Units/GlobalPhysicalConstants.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"
#include<iostream>
//#define DebugLog
int HFFibreFiducial::PMTNumber(const G4ThreeVector& pe_effect)
{
double... | 107,073 | 70,399 |
#include <iostream>
#include <vector>
using std::vector;
using std::cout;
using std::endl;
int main()
{
vector<int> u(10, 100);
vector<int> v;
// the code throws an error if we use v.begin()
// copy(u.begin(), u.end(), v.begin());
return 0;
} | 265 | 103 |
#include <mylib/mylib.h>
int main(int argc, char *argv[]) {
mylib::MyLibInstance.get_lib_state();
mylib::MyLibInstance.switch_lib_state();
return 0;
}
| 165 | 66 |
/*
* Copyright 2018 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 4,842 | 2,372 |
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#inc... | 1,008 | 392 |
#include <QmlNet/types/NetSignalInfo.h>
#include <QmlNet/qml/NetValueMetaObjectPacker.h>
#include <QmlNetUtilities.h>
NetSignalInfo::NetSignalInfo(QSharedPointer<NetTypeInfo> parentType, QString name) :
_parentType(parentType),
_name(name)
{
}
QSharedPointer<NetTypeInfo> NetSignalInfo::getParentType()
{
r... | 3,127 | 983 |
#include "Brier.h"
#include "../Variables/Variable.h"
#include "../Distribution.h"
#include "../Obs.h"
#include "../Data.h"
#include <iomanip>
MetricBrier::MetricBrier(const Options& iOptions, const Data& iData) :
Metric(iOptions, iData),
mAnomaly(false),
mAnomalyAbove(false),
mAnomalyBelow(fals... | 2,936 | 1,031 |
#include <iostream>
long long get_fibonaccihuge(long long n, long long m) {
//write your code here
return 0;
}
int main() {
long long n, m;
std::cin >> n >> m;
std::cout << get_fibonaccihuge(n, m) << '\n';
}
| 226 | 93 |
#ifndef CONVERT_SIMTK_VEC3_HPP
#define CONVERT_SIMTK_VEC3_HPP
void register_simtk_vec3_conversion();
#endif // CONVERT_SIMTK_STRING_HPP
| 138 | 68 |
/**
** @file ScriptedTask.cpp
*/
/*
** Copyright (c) 2014, GCBLUE PROJECT
** 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 copyri... | 5,549 | 1,787 |
/*
* Copyright (c) 2016, NVIDIA CORPORATION. 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 c... | 9,074 | 3,269 |
/* <LICENSE>
License for the MULTOVL multiple genomic overlap tools
Copyright (c) 2007-2012, Dr Andras Aszodi,
Campus Science Support Facilities GmbH (CSF),
Dr-Bohr-Gasse 3, A-1030 Vienna, Austria, Europe.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permi... | 3,990 | 1,367 |
/* Generated code for Python source for module 'requests.status_codes'
* created by Nuitka version 0.5.28.2
*
* This code is in part copyright 2017 Kay Hayen.
*
* 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 ... | 40,214 | 15,141 |
#include <iostream>
#include <array>
#include <tuple>
#include <type_traits>
// Convert array into a tuple
template<typename Array, std::size_t... I>
constexpr auto a2t_impl(const Array& a, std::index_sequence<I...>)
{
return std::make_tuple(a[I]...);
}
template<typename T, std::size_t N, typename Indices = std... | 825 | 329 |
//
// Created by Khyber on 3/18/2019.
//
class A {
public:
static bool initialized;
A() noexcept {
initialized = true;
}
~A() {
initialized = false;
}
};
bool A::initialized = false;
A a;
int main() {
return static_cast<int>(A::initialized);
}
| 309 | 118 |
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtNetwork module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licens... | 43,655 | 12,803 |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... | 8,577 | 2,846 |
#include <json.hpp>
#include <httplib.h>
#include <discord-rpc.h>
#include <cstring>
#include <iostream>
#include <string>
#include <thread>
using json = nlohmann::json;
struct config {
std::string lfm_api_key;
std::string dsc_app_id;
std::string lfm_user;
};
struct current_status {
bool playing;
std::string ... | 2,194 | 889 |
#include "softjoystick.h"
#include "control.h"
#include <algorithm>
#include <math.h>
#include <SDL_image.h>
#ifndef M_PI
#define M_PI 3.1415926535897
#endif
static byte numButtons = 2;
static byte state = 0;
static byte taps = 0;
void SoftJoystickNumButtons(byte n) {
numButtons = std::max((byte) 1, std::min(n, (... | 4,342 | 2,104 |
#pragma once
#include "cache.hpp"
#include <bunsan/pm/repository.hpp>
#include <boost/noncopyable.hpp>
namespace bunsan {
namespace pm {
class repository::extractor : private boost::noncopyable {
public:
extractor(repository &self, const extract_config &config);
void extract(const entry &package,
... | 1,528 | 416 |
/*
* @author Nickel_Angel (1239004072@qq.com)
* @copyright Copyright (c) 2022
*/
#include <algorithm>
#include <cstdio>
#include <cstring>
int n, a[5010], f[5010][5010];
int main()
{
scanf("%d", &n);
for (int i = 1; i <= n; ++i)
scanf("%d", a + i);
std::sort(a + 1, a + n + 1);
for (int i = 1;... | 916 | 414 |
#include <iostream>
#ifndef N
// By default consider about 150 million numbers.
#define N (1<<27)
#endif
bool can_be_prime [N];
int main () {
// Mark all numbers as potentially prime.
for (int i = 2 ; i < N ; i ++) {
can_be_prime [i] = true;
}
int primes = 0;
// Check numbers f... | 882 | 299 |
// 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 "content/browser/storage_partition_impl_map.h"
#include <unordered_set>
#include <utility>
#include "base/bind.h"
#include "base/bind_helpe... | 20,260 | 5,886 |
/******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... | 68,105 | 31,741 |
#include "keysmappingdialog.h"
#include "ui_keysmappingdialog.h"
KeysMappingDialog::KeysMappingDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::KeysMappingDialog)
{
ui->setupUi(this);
this->setWindowTitle("Keys Options");
connect(ui->A_pushButton, &QPushButton::pressed, this, &KeysMappingDia... | 2,456 | 790 |
#include <fase2/fase.h>
#include <fase2/imgui_editor/imgui_editor.h>
#include <fase2/stdparts.h>
#include <string>
#include <vector>
#include "../extra_parts.h"
#include "../fase_gl_utils.h"
#include "funcs.h"
int main() {
// Create Fase instance with GUI editor
fase::Fase<fase::ImGuiEditor, fase::FixedPip... | 1,604 | 599 |
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
using namespace std;
struct Chunk{
int key;
int length;
Chunk *prev;
Chunk *next;
Chunk(int k=0, int len=0) : key(k), length(len), prev(nullptr), next(nullptr) {}
} *head;
void init(int m)
{
Chunk *t = new Chunk(0, ... | 2,196 | 848 |
#include "core/ir/ir.h"
#include "core/util/prelude.h"
namespace trtorch {
namespace core {
namespace ir {
bool valid_dtype_format_combo(nvinfer1::DataType dtype, nvinfer1::TensorFormat format) {
switch (dtype) {
case nvinfer1::DataType::kINT8: // Supports just Linear (NCHW)
switch (format) {
case... | 4,816 | 1,720 |
#include <bits/stdc++.h>
using namespace std;
/**
* Marks: 15/15
*/
int digits[4];
int main() {
for (int i = 0; i < 4; i++) {
scanf("%d", &digits[i]);
}
if (digits[0] != 8 && digits[0] != 9 || digits[3] != 8 && digits[3] != 9 || digits[1] != digits[2]) {
cout << "answer" << endl;
} else {
cou... | 361 | 166 |
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* mergeNodes(... | 797 | 263 |
#include <iostream>
#include <iomanip>
#include <fstream>
#include "vector.hh"
#include "matrix.hh"
#include "Prostopadloscian.hh"
#include "lacze_do_gnuplota.hh"
#include <string>
#include <unistd.h>
#include <stdlib.h>
Vector<double, 3> VecPrzesu;
Matrix<3> MROT;
Prostopadloscian<double> cuboid;
PzG::LaczeDoGNUPlot... | 3,627 | 1,259 |
#include <prism/framerateselectscreen.h>
#include <prism/physics.h>
#include <prism/file.h>
#include <prism/drawing.h>
#include <prism/log.h>
#include <prism/wrapper.h>
#include <prism/system.h>
#include <prism/stagehandler.h>
#include <prism/logoscreen.h>
#include <prism/mugentexthandler.h>
#include <prism/debug.h>
#... | 1,746 | 744 |
// 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/history/shortcuts_backend.h"
#include <map>
#include <string>
#include <vector>
#include "base/bind.h"
#include "base/bind_... | 9,610 | 3,076 |
/////////////////////////////////////////////////////////////////
/*
Created by Berat Özdemir, January 24 , 2021.
*/
/////////////////////////////////////////////////////////////////
#include "ProgressBarScreen.h"
V20::ProgressBarScreen::ProgressBarScreen(char _text[], uint16_t _barLength, uint16_t _fillPercentage... | 1,792 | 717 |
// This file is part of the dune-xt project:
// https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt
// Copyright 2009-2021 dune-xt developers and contributors. All rights reserved.
// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
// or GPL-2.0+ (h... | 6,892 | 2,377 |
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
#include "cassandra_constants.h"
namespace org { namespace apache { namespace cassandra {
const cassandraConstants g_cassandra_constants;
cassandraConstants::cassandraConstants() {
VERSION = "19.4.0";
}
}}} ... | 334 | 123 |
/*
* Copyright (C) 2020-2021 LEIDOS.
*
* 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... | 3,501 | 1,293 |
//
// Pull combinations out of the event and make TH1's, some TNtuples ...
//
#include "art-workbook/ExDataProducts/CombinationCollection.h"
#include "art-workbook/ExUtilities/PSetChecker.h"
#include "art-workbook/ExN/TrackCuts.h"
#include "toyExperiment/Geometry/Geometry.h"
#include "toyExperiment/Conditions/Conditi... | 5,093 | 2,030 |
// STL
#include <mutex>
// Project
#include "HUD027.h"
#include "../common_classes/ostreamUtils.h"
using namespace ostream_utils;
HUD027::HUD027(const OpenGLWindow& window)
: HUD(window)
{
static std::once_flag prepareOnceFlag;
std::call_once(prepareOnceFlag, []()
{
FreeTypeFontManager::getI... | 1,492 | 522 |
//
// Created by Krisu on 2020/3/13.
//
#include "DirectionalShadow.hpp"
#include "Renderer.hpp"
#include "Mesh.hpp"
#include "Scene.hpp"
#include "Transform.hpp"
DirectionalShadow::DirectionalShadow(const int map_width, const int map_height)
:
width(map_width), height(map_height) {
glGenFramebuf... | 2,982 | 1,076 |
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
// use thi... | 5,637 | 2,141 |
//----------------------------------*-C++-*----------------------------------//
// Copyright 2020 UT-Battelle, LLC, and other Celeritas developers.
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
//-------------------------------------------------------------------------... | 1,863 | 499 |
/*=========================================================================
Program: ParaView
Module: vtkSMAnimationCueManipulatorProxy.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed W... | 1,805 | 490 |
#include "Timer.h"
using std::chrono::high_resolution_clock;
/* 打开计时器 */
void Timer::start()
{
if (m_isRunning)
return;
m_isRunning = true;
m_start = high_resolution_clock::now();
}
/* 停止计时器 */
void Timer::stop()
{
m_isRunning = false;
}
/* 重新打开计时器 */
void Timer::restart()
{
stop();
s... | 692 | 309 |
/*
Given an array A of size N , write a function that implements insertion sort on the array. Print the elements of sorted array.
Input Format
First line contains a single integer N denoting the size of the array. Next line contains N space seperated integers where ith integer is the ith element of the array.
Constra... | 946 | 393 |
// clang-format off
// RUN: %run %s --thread 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN
// RUN: %run %s --thread 2>&1 | FileCheck %s
// REQUIRES: thread && softcounter
// clang-format on
#include <stdlib.h>
#include <thread>
#include <stdio.h>
void repeat_alloc_free(unsigned n) {
for (int i = 0; i < n; i++) {
... | 933 | 376 |
// 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... | 9,818 | 3,494 |
/*--------------------------------------------------------------------------------------
Ethanon Engine (C) Copyright 2008-2013 Andre Santee
http://ethanonengine.com/
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), t... | 6,297 | 2,708 |
// -*- C++ -*-
//
// Package: EcalBxOrbitNumberGrapher
// Class: EcalBxOrbitNumberGrapher
//
/**\class EcalBxOrbitNumberGrapher EcalBxOrbitNumberGrapher.cc
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Original Author: Seth COOPER
// Created: Th Nov 22... | 3,972 | 1,448 |
//
// Created by zhukovasky on 2020/8/19.
//
#include "JavaHeap.h"
namespace Runtime{
Object *JavaHeap::createJavaObject(JavaClass *javaClass) {
Object *object=new Object();
object->setJavaClass(javaClass);
object->setData(nullptr);
this->youngList.insert(object);
return ob... | 584 | 186 |
/*!
@file
@author Albert Semenov
@date 08/2010
*/
#include "Precompiled.h"
#include "StateListControl.h"
#include "SkinManager.h"
#include "Binary.h"
#include "Localise.h"
namespace tools
{
enum PresetEnum
{
PresetNormalOnly = Binary<10>::value,
PresetFirst4States = Binary<1111>::value,
PresetAllStates = ... | 4,805 | 1,904 |
// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 2,713 | 891 |
#include <iostream>
using namespace std;
int main()
{
int n, c, total = 0;
cin >> n >> c;
for (int i = 0; i < n; i++) {
total+=c;
if (c > 1)
c--;
}
cout << total << endl;
return 0;
}
| 238 | 97 |
// Copyright 2018, Intel Corp.
#include "tile/codegen/rewrite_locs.h"
#include <algorithm>
#include <iterator>
#include <queue>
namespace vertexai {
namespace tile {
namespace codegen {
namespace {
struct Rewrite {
std::vector<stripe::Device> prefix;
std::vector<stripe::Device> target;
};
void RewriteLocation(... | 1,809 | 639 |
// ArduinoJson - https://arduinojson.org
// Copyright © 2014-2022, Benoit BLANCHON
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
TEST_CASE("JsonArray::remove()") {
DynamicJsonDocument doc(4096);
JsonArray array = doc.to<JsonArray>();
array.add(1);
array.add(2);
array.add(3);
SECTION("remov... | 1,888 | 760 |
//=========================================================================
// Copyright (C) 2012 The Elastos 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
//
// ... | 7,862 | 2,768 |