text string | size int64 | token_count int64 |
|---|---|---|
/*
Flow PK
Copyright 2010-201x held jointly by LANS/LANL, LBNL, and PNNL.
Amanzi is released under the three-clause BSD License.
The terms of use and "as is" disclaimer for this license are
provided in the top-level COPYRIGHT file.
Author: Konstantin Lipnikov (lipnikov@lanl.gov)
Linear model for ef... | 907 | 336 |
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/assert.hpp>
#include <boost/hana/at_key.hpp>
#include <boost/hana/equal.hpp>
#include <boost/hana/find.hpp>
#include <... | 970 | 428 |
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "EnginePrivate.h"
#include "Animation/AnimNode_TransitionPoseEvaluator.h"
/////////////////////////////////////////////////////
// FAnimNode_TransitionPoseEvaluator
FAnimNode_TransitionPoseEvaluator::FAnimNode_TransitionPoseEvaluator()
: DataSour... | 2,736 | 931 |
//
// File: bHYPRE_IJParCSRVector.hxx
// Symbol: bHYPRE.IJParCSRVector-v1.0.0
// Symbol Type: class
// Babel Version: 1.0.4
// Description: Client-side glue code for bHYPRE.IJParCSRVector
//
// WARNING: Automatically generated; changes will be lost
//
//
#ifndef included_bHYPRE_IJParCSRVector_h... | 14,713 | 5,131 |
// Copyright 2014 The Crashpad 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 ... | 8,986 | 3,750 |
/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees ... | 61,418 | 22,749 |
// https://www.urionlinejudge.com.br/judge/pt/problems/view/1286
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int max(int a, int b) {
return a > b? a : b;
}
struct Obj {
int time, pizza;
};
bool sortByPizza(Obj obj1, Obj obj2) {
if (obj1.pizza < obj2.pizza) return true;
e... | 1,191 | 524 |
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#include "Luau/TypeInfer.h"
#include "Luau/TypeVar.h"
#include "Fixture.h"
#include "doctest.h"
LUAU_FASTFLAG(LuauEqConstraint)
LUAU_FASTFLAG(LuauUseCommittingTxnLog)
using namespace Luau;
TEST_SUIT... | 11,509 | 4,503 |
/*
Copyright 2020 The OneFlow 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 agre... | 9,422 | 3,427 |
/*
* Copyright (c) 2008-2021
* Nakata, Maho
* 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, th... | 13,160 | 4,717 |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2017, Open Source Robotics Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... | 3,196 | 1,105 |
/***************************************************************************
* Copyright (c) 2018, Martin Renou, Johan Mabille, Sylvain Corlay, and *
* Wolf Vollprecht *
* Copyright (c) 2018, QuantStack *
* ... | 10,365 | 3,203 |
#include <stdio.h>
int main(void) {
int i;
int vc[5] = {10, 20, 30, 40, 50};
int *ptr = &vc[0];
for (i = 0; i < 5; i++)
printf("vc[%d] = %d ptr[%d] = %d *(ptr + %d) = %d\n",
i, vc[i], i, ptr[i], i, *(ptr + i));
return (0);
} | 240 | 149 |
//******************************************************************************
// Copyright (c) 2005-2013 by Jan Van hijfte
//
// See the included file COPYING.TXT for details about the copyright.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the i... | 892 | 286 |
/**
******************************************************************************
* This file is part of the TouchGFX 4.10.0 distribution.
*
* @attention
*
* Copyright (c) 2018 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
... | 15,875 | 5,121 |
// Boost.Geometry
// Unit Test
// Copyright (c) 2016-2017 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// ... | 7,169 | 2,796 |
// 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 ... | 8,211 | 2,328 |
#include "memory.h"
#include "os_constant.h"
#include "stdlib.h"
#include "asm_utils.h"
#include "stdio.h"
#include "program.h"
#include "os_modules.h"
MemoryManager::MemoryManager()
{
initialize();
}
void MemoryManager::initialize()
{
this->totalMemory = 0;
this->totalMemory = getTotalMemory();
// 预... | 6,668 | 2,532 |
// Copyright 2013, Beeri 15. All rights reserved.
// Author: Roman Gershman (romange@gmail.com)
//
#include <fnmatch.h>
#include <libs3.h>
#include <mutex>
#include <unordered_map>
#include "base/logging.h"
#include "file/s3_file.h"
#include "file/file.h"
#include "file/file_util.h"
#include "strings/strcat.h"
name... | 13,031 | 4,497 |
#ifndef PYTHONIC_BUILTIN_USERWARNING_HPP
#define PYTHONIC_BUILTIN_USERWARNING_HPP
#include "pythonic/include/__builtin__/UserWarning.hpp"
#include "pythonic/types/exceptions.hpp"
namespace pythonic
{
namespace __builtin__
{
PYTHONIC_EXCEPTION_IMPL(UserWarning)
}
}
#endif
| 288 | 126 |
// Copyright (c) 2021, Apple Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-3-clause license that can be
// found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
#include "MILBlob/Blob/FileWriter.hpp"
#include "MILBlob/Blob/StorageFormat.hpp"
#include "MILBlob/U... | 6,480 | 2,128 |
// This file is part of RAVL, Recognition And Vision Library
// Copyright (C) 2001, University of Surrey
// This code may be redistributed under the terms of the GNU Lesser
// General Public License (LGPL). See the lgpl.licence file for details or
// see http://www.gnu.org/copyleft/lesser.html
// file-header-ends-here... | 804 | 343 |
#include <VoterDetail.hpp>
#include <common/ATFCore.hpp>
START_ATF_NAMESPACE
namespace Detail
{
Info::VoterDoit2_ptr VoterDoit2_next(nullptr);
Info::VoterDoit2_clbk VoterDoit2_user(nullptr);
Info::VoterInitialize4_ptr VoterInitialize4_next(nullptr);
Info::VoterInitiali... | 8,651 | 3,138 |
//-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (c) 2008-2022 Ryo Suzuki
// Copyright (c) 2016-2022 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include <memory>
# include "Co... | 2,784 | 1,635 |
//
// Created by atsushi on 2020/01/21.
//
#include <jni.h>
#include <android/log.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <memory>
#include "aidl/org/androidaudioplugin/BnAudioPluginInterface.h"
#include "aidl/org/androidaudioplugin/BpAudioPluginInterface.h"
#include "aap/audio-plugin-host.h"
#include "... | 3,960 | 1,297 |
//
// $Id: StockFactory.cpp 78900 2007-07-15 13:05:48Z sowayaa $
//
#include "StockFactory.h"
#include "ace/streams.h"
StockFactory::StockFactory (CORBA::ORB_ptr orb, int number)
: orb_ (CORBA::ORB::_duplicate (orb)),
rhat_ ("RHAT", "RedHat, Inc.", 210),
msft_ ("MSFT", "Microsoft, Inc.", 91),
number... | 727 | 317 |
// Copyright 2020 The Tint 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 ... | 24,957 | 7,705 |
/*
* Copyright (c) 1996, 2010, 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 ... | 234,149 | 80,797 |
/* File: xml.cpp
* Author: Lieutenant Debaser
* Last Update (yyyy-mm-dd_hhMM): 2022-01-27_1441
*
* File contains definitions for the Xml class functions, along with constructor definitions. Functions for handling
* searching within strings and XML data are also defined here.
*
* See xml.h for Xml class definit... | 9,363 | 2,935 |
#ifndef SHARED_MUTEX_LOCKING_THREAD_HPP
#define SHARED_MUTEX_LOCKING_THREAD_HPP
// (C) Copyright 2008 Anthony Williams
//
// 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 <boost/thread/mutex.hpp>
#i... | 3,969 | 1,316 |
//#include "rosic_PitchDetector.h"
//using namespace rosic;
// Construction/Destruction:
PitchDetector::PitchDetector() : formantRemover(30)
{
// initialize parameters:
sampleRate = 44100.0;
sampleRateRec = 1.0/sampleRate;
minFundamental = 20.0;
maxFundamental = 10000.0;
minPeriod ... | 1,938 | 780 |
#include <iostream>
#include <string>
std::string zz = "Lorem ipsum dolor sit amet, \
consectetur adipiscing elit. \
Cras fermentum id diam sit amet consequat.";
std::string z2 = "Lorem ipsum dolor sit amet,"
"consectetur adipiscing elit."
"Cras fermentum id diam sit amet consequat."... | 769 | 276 |
/*
* ---------------------------------------------------------------------------------
* Copyright (C) 2015 STMicroelectronics - All Rights Reserved
*
* May be copied or modified under the terms of the LGPL v2.1.
*
* ST makes no warranty express or implied including but not limited to,
* any warranty of
*
* ... | 2,127 | 658 |
#include "decoderms3bits.h"
#include "exception.h"
namespace pcars {
Decoder_MS3bits::Decoder_MS3bits()
: num_(0) {
}
Decoder_MS3bits::~Decoder_MS3bits() {
}
void Decoder_MS3bits::decode(const PCars_Data & data, Position & position) {
num_ = (data.at(position) >> 4) & 7;
}
unsigned int Decoder_MS3bits::ms3bits(... | 350 | 150 |
#include "mull/IDEDiagnostics.h"
#include "mull/MutationPoint.h"
#include <llvm/IR/DebugInfoMetadata.h>
#include <llvm/IR/Instruction.h>
#include <llvm/Support/raw_ostream.h>
using namespace mull;
using namespace llvm;
void NormalIDEDiagnostics::report(mull::MutationPoint *mutationPoint,
... | 1,212 | 406 |
#include "super-link-cut-tree.cpp"
/**
* @brief Vertex Set Path Sum
*/
using T = int64_t;
// 遅延伝搬をするための作用素
struct Lazy {
// 単位元
Lazy() {}
// 初期化
Lazy(T v) {}
// 遅延伝搬
void propagate(const Lazy &p) {}
};
// Light-edge の情報
template< typename Lazy >
struct LInfo {
// 単位元(キーの値はアクセスしないので未初期化でもよい
LInf... | 1,108 | 637 |
// 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/renderer_host/image_transport_factory.h"
#include <algorithm>
#include <map>
#include "base/bind.h"
#include "base/command... | 14,750 | 4,618 |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <iostream>
using namespace std;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
Q3DScatter *Scatter = new Q3DScatter();
ScatterPoints = new ScatterGraph(Scatter);
... | 4,352 | 1,612 |
/************************************************************************************
*
* Sporks, the learning, scriptable Discord bot!
*
* Copyright 2019 Craig Edwards <support@sporks.gg>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with t... | 15,328 | 6,836 |
/*
Copyright (C) 2005-2007 Feeling Software Inc.
Portions of the code are:
Copyright (C) 2005-2007 Sony Computer Entertainment America
MIT License: http://www.opensource.org/licenses/mit-license.php
*/
#include "StdAfx.h"
#include "FMAngleAxis.h"
//
// FMAngleAxis
//
FMAngleAxis::FMAngleAxis()
... | 754 | 300 |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <type_traits>
#include <typeinfo>
#include "ErrorHandling/Error.hpp"
#include "Utilities/PrettyType.hpp"
#include "Utilities/Requires.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TypeTraits.hpp"
/// \ingroup Utilit... | 5,604 | 1,460 |
#include "IGameState.h"
#include "_2017_05_29_GameStateManagerApp.h"
#include <Application.h>
#pragma region Constructors
IGameState::IGameState(aie::Application* a_app) : m_app(a_app) {}
IGameState::~IGameState()
{
}
#pragma endregion
| 238 | 97 |
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
*... | 2,239 | 804 |
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on
* the source.
*/
// stdafx.cpp : source file that includes just the standard includes
// HelpE... | 443 | 136 |
#include "testing/testing.hpp"
#include "storage/storage_integration_tests/test_defines.hpp"
#include "storage/storage.hpp"
#include "platform/local_country_file_utils.hpp"
#include "platform/mwm_version.hpp"
#include "platform/platform.hpp"
#include "platform/platform_tests_support/scoped_dir.hpp"
#include "platfor... | 3,397 | 1,113 |
// MIT Licensed (see LICENSE.md).
#pragma once
// Standard includes
#include "Foundation/Geometry/GeometryStandard.hpp"
#include "Foundation/Serialization/SerializationStandard.hpp"
namespace Zero
{
// SpatialPartition library
class ZeroNoImportExport SpatialPartitionLibrary : public Zilch::StaticLibrary
{
public:
... | 1,434 | 500 |
//
// Created by connor on 7/29/18.
//
#include "Color.h"
namespace Sova
{
Color::Color(int red, int green, int blue)
{
this->red = red;
this->green = green;
this->blue = blue;
}
Color Color::Red = Color(255, 0, 0);
Color Color::Green = Color(0, 255, 0);
Color Color::B... | 1,299 | 501 |
/*===================================================================*/
/* */
/* zinfones.cpp : A Qt-specific class implementation */
/* */
/* 2004/06/26 InfoNES Project ... | 4,115 | 1,610 |
#include <iostream>
using namespace std;
const int MAX_SIZE = 100;
//2.
int positionLetter(const char *str, char letter, size_t n, size_t start = 0)
{
if (start == (strlen(str) + 1))
{
return -1;
}
if (str[start] == letter)
{
n--;
}
if (n == 0)
{
return start;
}
return positionLetter(str, letter, n, s... | 2,026 | 976 |
// -*- C++ -*-
//
// ----------------------------------------------------------------------
//
// Brad T. Aagaard, U.S. Geological Survey
// Charles A. Williams, GNS Science
// Matthew G. Knepley, University of Chicago
//
// This code was developed as part of the Computational Infrastructure
// for Geodynamics (http://... | 1,830 | 590 |
class Solution {
public:
void XXX(vector<int>& nums) {
return sort(nums.begin(),nums.end());
}
};
| 112 | 42 |
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program 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 ... | 33,509 | 11,288 |
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
*/
#include "Coverage.h"
int Coverage::TestStatusMap::getNumberOfTests() {
int cnt = 0;
for (auto const &[fileName, testsStatus] : *this) {
cnt += testsStatus.size();
}
return cnt;
}
| 292 | 111 |
#include <bits/stdc++.h>
using namespace std;
int MOD = 1e9 + 7;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, a, b, m;
cin >> n >> a >> b >> m;
a--; b--;
vector<vector<int>> graph(n, vector<int>(n, 0));
for (int i = 0; i < m; i++) {
int x, y;
cin >> x >> y;
x--... | 709 | 334 |
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <limits.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <pthread.h>
#include <signal.h>
#include <list>
#include <X11/Xlib.h>
#define __cdecl
#include "../config.h"
#include ".... | 26,165 | 10,583 |
//////////////////////////////////////////////////////////////////////////
// Author : Ngo Tien Dat
// Email : dat.ngo@epfl.ch
// Organization : EPFL
// Purpose : Solve generic EQUALITY constrained optimization problem
// Date : 30 March 2012
///////////////////////////////////////////////////... | 3,357 | 1,250 |
//===-- sanitizer_procmaps_mac.cc -----------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 13,936 | 4,694 |
#include "../includes/data.h"
void Data::read_input_file(const char * input_path)
{
FILE * pFile;
pFile = fopen (input_path,"r");
//lectura del archivo
if(!pFile)
{
std::cerr << "Problem while reading instance" << std::endl;
exit(EXIT_FAILURE);
}
//numero de articulos
i... | 6,495 | 2,215 |
#pragma once
// the linter wants this to be above everything else
#include <shared_mutex>
#include <atomic>
#include <memory>
#include <string>
#include <vector>
#include "all_type_variant.hpp"
#include "types.hpp"
namespace opossum {
class BaseIndex;
class BaseColumn;
// A chunk is a horizontal partition of a ta... | 1,459 | 451 |
#include <Colors/Colors.h>
#include <iostream>
using namespace colors;
Color Color::RESET = Color(Colors::black).reset();
Color::Color(const Colors& code) {
if (code == Colors::none) {
numbers.push_back(0);
numbers.push_back(0);
numbers.push_back(0);
} else {
numbers.push_back... | 1,822 | 640 |
//=======================================================================
// Copyright Baptiste Wicht 2011-2016.
// Distributed under the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//=======================================================================
#ifndef M... | 530 | 162 |
// Copyright (c) 2018 Jan Kowalewicz. All rights reserved.
#include "ini.h"
#include <QString>
#include <QFileInfo>
#include <QFile>
#include <QTextStream>
bool ini_class::set_file(const QString &_file_path) {
if (this->file_exists(_file_path)) {
file_path = _file_path;
return true;
} else {
... | 2,151 | 737 |
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program 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 2 of the License, or
* (at your option) any l... | 10,174 | 3,700 |
// Generated from /POI/java/org/apache/poi/ss/formula/UserDefinedFunction.java
#include <org/apache/poi/ss/formula/UserDefinedFunction.hpp>
#include <java/lang/ArrayStoreException.hpp>
#include <java/lang/Class.hpp>
#include <java/lang/ClassCastException.hpp>
#include <java/lang/NullPointerException.hpp>
#include <jav... | 4,111 | 1,421 |
#include "BlsServerSelector.hpp"
#include <MStringList>
#include "BlsConf.hpp"
BlsServerSelector::BlsServerSelector()
{
m_conhash = conhash_init(NULL);
}
BlsServerSelector::~BlsServerSelector()
{
conhash_fini(m_conhash);
}
BlsServerSelector *BlsServerSelector::instance()
{
static BlsS... | 1,453 | 538 |
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a), i##_max = (b); i < i##_max; ++i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
using namespace std;
using i64 = int64_t;
constexpr int INF = 1 << 30;
constexpr int MOD = 1000000007;
int ch... | 828 | 405 |
#include "window_configuration.h"
const wchar_t *kFlutterWindowTitle = L"Volume Explorer";
const unsigned int kFlutterWindowOriginX = 10;
const unsigned int kFlutterWindowOriginY = 10;
const unsigned int kFlutterWindowWidth = 600;
const unsigned int kFlutterWindowHeight = 600;
| 279 | 90 |
#include <iostream>
#include <vector>
using namespace std;
vector<int> genres(10);
int main(){
ios::sync_with_stdio(false);
int n,m,tmp;
int answer=0;
cin >> n >> m;
for(int i=0;i<n; i++)
{
cin >> tmp;
genres[tmp-1]++;
}
for(int i =0; i<m; i++)
for(int j=i+1; j<m; j++)
answer+=genres[... | 366 | 178 |
// Copyright 2022 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
// Tests covering the dispatch logic for individual ops.
//
// iree/vm/test/async_ops.mlir contai... | 5,705 | 2,068 |
// Copyright (c) 2012-2021 CIYAM Developers
//
// Distributed under the MIT/X11 software license, please refer to the file license.txt
// in the root project directory or http://www.opensource.org/licenses/mit-license.php.
#ifdef PRECOMPILE_H
# include "precompile.h"
#endif
#pragma hdrstop
#ifndef HAS_PRECOMPILED_ST... | 46,095 | 16,816 |
/* Copyright (c) 2017-2022, Hans Erik Thrane */
#include "roq/samples/example-4/config.hpp"
#include "roq/samples/example-4/flags.hpp"
namespace roq {
namespace samples {
namespace example_4 {
void Config::dispatch(Handler &handler) const {
handler(client::Symbol{
.regex = Flags::symbols(),
.exchange ... | 420 | 145 |
// Created on: 1993-07-30
// Created by: Jean-Louis FRENKEL
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the... | 7,737 | 2,599 |
#include <Eigen/Dense>
#include <cmath>
#include <iostream>
#include "cudaSift.h"
int ImproveHomography(SiftData &data, float *homography, int numLoops, float minScore,
float maxAmbiguity, float thresh) {
#ifdef MANAGEDMEM
SiftPoint *mpts = data.m_data;
#else
if (data.h_data == NULL) return ... | 2,401 | 1,145 |
//===- PrettifyVerilog.cpp - Transformations to improve Verilog quality ---===//
//
// 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
//
//===---------------------------... | 6,242 | 1,939 |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/layout/jank_tracker.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_part... | 6,052 | 1,859 |
/*
* Copyright (C) 2012 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... | 4,201 | 1,344 |
// The following example shows how resizing affects the array.
// <Snippet1>
using namespace System;
static void PrintIndexAndValues(array<String^>^myArr)
{
for(int i = 0; i < myArr->Length; i++)
{
Console::WriteLine(L" [{0}] : {1}", i, myArr[i]);
}
Console::WriteLine();
}
int main()
{
... | 1,953 | 675 |
// 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 "flutter/flow/layers/layer.h"
#include "third_party/skia/include/core/SkColorFilter.h"
namespace flow {
Layer::Layer() : parent_(nullptr), has... | 615 | 200 |
#include "DX11Renderer.h"
#pragma warning(push, 0) //disable warnings for external headers
#include <filesystem>
#include <iostream> //todo: switch to some non-basic bitch logger
#include <DirectXMath.h>
#include "ImGui/Backends/imgui_impl_dx11.h"
#pragma warning(pop) //enable warnings again
namespace Graphics
{... | 16,015 | 6,927 |
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm 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 obtain a copy of the License at
//
// http://www.apache.org/li... | 50,803 | 14,675 |
//
// Copyright Copyright 2009-2022, AMT – The Association For Manufacturing Technology (“AMT”)
// 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
//
// ... | 13,346 | 3,569 |
#include <catch2/catch.hpp>
#include "utils.h"
#include <boost/filesystem.hpp>
#include <fstream>
#include <iterator>
#include <vector>
#include <faabric/util/files.h>
#include <storage/FileLoader.h>
#include <storage/SharedFiles.h>
#include <upload/UploadServer.h>
namespace tests {
// NOTE: we must be careful with... | 1,708 | 545 |
void fillSuffix(vector<int> &A,vector<int> &arr){
int n=A.size();
arr[n]=0;
for(int i=n-1;i>=0;i--){
arr[i]=arr[i+1]+A[i];
}
}
void fillPrefix(vector<int> &A,vector<int> &arr){
arr[0]=0;
for(int i=1;i<arr.size();i++){
arr[i]=arr[i-1]+A[i-1];
}
}
int Solution::solve(vector<i... | 673 | 306 |
/* Copyright 2014 CyberTech Labs Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | 4,635 | 1,626 |
/*
Copyright (c) 2009-2015 Maximus5
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 of conditions and the followin... | 21,693 | 9,349 |
// Copyright 2020 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | 4,556 | 1,511 |
#include "../include/tracks.h"
#include "../include/hungarian.h"
#include "../include/image_opencv.h"
#include "../include/kalman.h"
#include "../include/utils.h"
#include <cmath>
// -- global variables ---
static int g_next_id = 0;
// ------------------------
typedef struct
{
int track_idx;
int det_i... | 8,763 | 3,805 |
#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include "ResourceCompiler.h"
#include <Windows.h>
using namespace vl;
using namespace vl::collections;
using namespace vl:... | 2,698 | 1,024 |
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
vector<int> adj[32001];
int in[32001];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
while (m--)
{
int a, b;
cin >> a >> b;
adj[a].push_back(b);
in[b]++;
}
priority_queue<int> pq;
for (int i... | 513 | 273 |
/*
* 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... | 15,952 | 4,974 |
#pragma once
#include <list>
#include <Geometry2d/Point.hpp>
#include <Configuration.hpp>
#include <Utils.hpp>
#include "KalmanBall.hpp"
class KalmanBall;
/**
* Best estimate of the true ball position using the kalman balls from each camera
*/
class WorldBall {
public:
/**
* Creates an invalid world bal... | 1,775 | 542 |
// Copyright (c) 2018 RISC Software GmbH
//
// This file was generated by CPACSGen from CPACS XML Schema (c) German Aerospace Center (DLR/SC).
// Do not edit, all changes are lost when files are re-generated.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in com... | 6,743 | 2,183 |
// Purpose:
// Test that \DexFinishTest can be used with a combination of a hit_count
// and a condition, so that the test exits after the line referenced
// by \DexFinishTest is stepped on while the condition (x == 2) is true a
// given number of times.
// Tests using the default controller (n... | 827 | 328 |
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include "openvino/op/sinh.hpp"
#include "base_reference_test.hpp"
using namespace ov;
namespace reference_tests {
namespace {
struct SinhParams {
reference_tests::Tensor input;
reference_tests::... | 3,799 | 1,496 |
// Begin License:
// Copyright (C) 2006-2008 Tobias Sargeant (tobias.sargeant@gmail.com).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Founda... | 10,080 | 3,445 |
#pragma once
#include <algorithm>
#include <array>
#include <fstream>
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
#define CRCPP_USE_CPP11
#include "CRC.h"
namespace png_text_chunk {
using KV = std::pair<std::string, std::string>;
template <typename T>
struct is_... | 12,297 | 5,052 |
// Copyright 2020 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "fpdfsdk/cpdfsdk_annot.h"
#include "fpdfsdk/cpdfsdk_annotiterator.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_helpers... | 5,250 | 1,871 |
/*
* Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com> All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* not... | 3,683 | 1,354 |
#include <iostream>
#include <fstream>
#include <set>
#include <unordered_map>
#include <utility>
#include <array>
#include <algorithm>
using namespace std;
int main(){
ifstream fin("measurement.in");
ofstream fout("measurement.out");
set<array<int, 3>> m;
unordered_map<int, int> ids;
array<int, 1... | 2,498 | 849 |
/*
Copyright (c) 2017 TOSHIBA Digital Solutions Corporation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This... | 14,577 | 6,005 |