text string | size int64 | token_count int64 |
|---|---|---|
// Problem: Persistent UnionFind (https://judge.yosupo.jp/problem/persistent_unionfind)
// Contest: Library Checker
// Time: 2020-12-16 23:45:07
// 私に忍び寄るのをやめてください、ありがとう
#include<bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-... | 5,300 | 2,363 |
#include "videocapturethread.h"
#include <QDebug>
#include <opencv2/highgui/highgui.hpp>
VideoCaptureThread::VideoCaptureThread(int cameraNum = 0) : cameraNum(cameraNum)
{
isRecording = false;
camera = NULL;
vWriter = NULL;
//connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
}
VideoCaptur... | 1,833 | 606 |
// Copyright (c) 2016-2018 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/
#ifndef TAO_JSON_EVENTS_DEBUG_HPP
#define TAO_JSON_EVENTS_DEBUG_HPP
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <ostream>
#include <string>
#include "../binary_vi... | 3,440 | 963 |
/**
* Translation Unit Base class implementation
*
* SPDX-License-Identifier: MIT
*
* Copyright (C) 2022, Reto Achermann (The University of British Columbia)
*/
#include "pv/PVBusMaster.h"
#include "pv/PVAccessWidth.h"
#include <framework/translation_unit_base.hpp>
#include <framework/interface_base.hpp>
#inclu... | 9,090 | 2,788 |
/**
\file UprightFrame.cpp
\maintainer Morgan McGuire, http://graphics.cs.williams.edu
*/
#include "G3D/UprightFrame.h"
#include "G3D/BinaryInput.h"
#include "G3D/BinaryOutput.h"
namespace G3D {
UprightFrame::UprightFrame(const CoordinateFrame& cframe) {
Vector3 look = cframe.lookVector();
yaw = (float... | 5,459 | 1,872 |
/***************************************************************************
MCR/III memory map (preliminary)
0000-3fff ROM 0
4000-7fff ROM 1
8000-cfff ROM 2
c000-dfff ROM 3
e000-e7ff RAM
e800-e9ff spriteram
f000-f7ff tiles
f800-f8ff palette ram
IN0
bit 0 : left coin
bit 1 : right coin
bit 2 : 1 player
bit 3 : 2 pl... | 68,985 | 39,702 |
#include <stdio.h>
#include <component723/lib1.h>
int component723_2 () {
printf("Hello world!\n");
return 0;
}
| 118 | 52 |
/*
* 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 ... | 17,343 | 6,182 |
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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,349 | 2,589 |
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x): val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
TreeNode *buildTree(vector<int> &preorder, vector<int> &inorder) {
return f(preorder, 0, pr... | 1,022 | 368 |
#pragma once
#include "use_asio.hpp"
#include <string_view>
namespace cinatra {
enum class status_type {
init,
switching_protocols = 101,
ok = 200,
created = 201,
accepted = 202,
no_content = 204,
partial_content = 206,
multiple_choices = 300,
moved_permanently = 301,
moved_temporarily = 302,
no... | 8,124 | 3,273 |
#include "generator/opentable_dataset.hpp"
#include "generator/feature_builder.hpp"
#include "generator/sponsored_scoring.hpp"
#include "indexer/classificator.hpp"
#include "indexer/ftypes_matcher.hpp"
#include "base/logging.hpp"
#include "base/string_utils.hpp"
#include <iomanip>
#include <iostream>
#include "boo... | 2,922 | 956 |
// 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 "net/http/http_status_code.h"
#include "base/logging.h"
namespace net {
const char* GetHttpReasonPhrase(HttpStatusCode code) {
switch (code)... | 539 | 189 |
/*=============================================================================
Spirit v1.6.0
Copyright (c) 2001-2003 Joel de Guzman
Copyright (c) 2002-2003 Hartmut Kaiser
Copyright (c) 2003 Gustavo Guerra
http://spirit.sourceforge.net/
Permission to copy, use, modify, sell and distribute this ... | 10,047 | 3,165 |
// Copyright (c) 2005, 2006
// Seweryn Habdank-Wojewodzki
// Distributed under the Boost Software License,
// Version 1.0.
// (copy at http://www.boost.org/LICENSE_1_0.txt)
#include "logger.h"
#if !defined(CLEANLOG)
#define FTLOG
#if !defined(DEBUG)
#undef FTLOG
#undef TLOG
#endif
//#if defined (FTLOG)
//#include ... | 1,605 | 599 |
/*
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/bit_helpers.h"
#include "gtest/gtest.h"
using namespace NEO;
TEST(IsBitSetTests, givenDifferentValuesWhenTestingIsBitSetThenCorrectValueIsReturned) {
size_t field1 = 0;
size_t field2 = 0... | 7,058 | 3,287 |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercia... | 4,283 | 1,191 |
/* -----------------------------------------------------------------------------
* This file is part of SWIG, which is licensed as a whole under version 3
* (or any later version) of the GNU General Public License. Some additional
* terms also apply to certain portions of SWIG. The full details of the SWIG
* licen... | 47,022 | 18,121 |
#ifndef SOLAIRE_PARALEL_THREAD_POOL_EXECUTOR_HPP
#define SOLAIRE_PARALEL_THREAD_POOL_EXECUTOR_HPP
//Copyright 2016 Adam G. Smith
//
//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 :/... | 1,966 | 796 |
//===----------------------------------------------------------------------===//
// DuckDB
//
// planner/operator/logical_copy_to_file.hpp
//
//
//===----------------------------------------------------------------------===//
#pragma once
#include "duckdb/parser/parsed_data/copy_info.hpp"
#inc... | 757 | 239 |
/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2020 UniPro <ugene@unipro.ru>
* http://ugene.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 L... | 1,664 | 545 |
#include "WebSocketMocks.h"
using std::exception;
using std::function;
using std::string;
namespace Microsoft::React::Test {
MockWebSocketResource::~MockWebSocketResource() {}
#pragma region IWebSocketResource overrides
void MockWebSocketResource::Connect(const Protocols &protocols, const Options &opti... | 3,336 | 1,096 |
/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/tools/source/sysman/engine/linux/os_engine_imp.h"
namespace L0 {
const std::string LinuxEngineImp::computeEngineGroupFile("engine/rcs0/name");
const std::string LinuxEngineImp::computeEngineGroupName("rcs0");
ze_... | 1,299 | 474 |
#include <gtest/gtest.h>
#include <BookmarkSerializer.hpp>
#include "helpers.hpp"
namespace bmrk {
struct BookmarkSerializerTest: public testing::Test {
BookmarkSerializer bs;
};
TEST_F(BookmarkSerializerTest, CanSerialize) {
auto bookmark = createMockBookmark(
"http://pezzato.net", "one", Tags({"foo", "bar... | 484 | 181 |
#include "text.hpp"
using namespace blit;
bool variable_width = true;
TextAlign alignment = TextAlign::top_left;
std::string alignment_to_string(TextAlign alignment) {
switch (alignment) {
case TextAlign::bottom_left:
return "align: bottom_left";
case TextAlign::bottom_right:
return "align: bottom_right";... | 2,948 | 1,172 |
#include "http2/adapter/test_utils.h"
#include <ostream>
#include "absl/strings/str_format.h"
#include "common/quiche_endian.h"
#include "spdy/core/hpack/hpack_encoder.h"
#include "spdy/core/spdy_frame_reader.h"
namespace http2 {
namespace adapter {
namespace test {
TestDataFrameSource::TestDataFrameSource(Http2Vis... | 7,582 | 2,353 |
#include <stddef.h>
#include <cstring>
#include <assert.h>
#include "sd_spi.hpp"
#include "FreeRTOS.h"
#include "task.h"
using namespace drv;
using namespace hal;
#define WAIT_RESPONSE_CNT 10
#define TRANSMITTER_BIT 6
#define END_BIT 0
#define DATA_TOKEN_CMD17_18_24 0xFE
#define DATA_TOKEN_CMD25 0xFC
#... | 9,383 | 6,505 |
#include <iostream>
using namespace std;
int fact(int n){
int i=n;
while(n>1){
i = i*(n-1);
--n;
}
return i;
}
int main(){
int n;
cout << "Please enter a number:";
cin >> n;
cout << fact(n) << endl;
return 0;
} | 261 | 105 |
// Filename: typedWritable_ext.cxx
// Created by: rdb (10Dec13)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You s... | 9,278 | 2,760 |
// Copyright 2018 Oleksandr Bacherikov.
//
// Distributed under the Boost Software License, Version 1.0
// (see accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
#include <actl/graph/default_map.hpp>
#include <actl/graph/traversal/breadth_first_search.hpp>
#include <actl/graph/traver... | 1,688 | 587 |
#include <indires_macro_actions/Indires_macro_actions.h>
/*
Status can take this values:
uint8 PENDING = 0 # The goal has yet to be processed by the action server
uint8 ACTIVE = 1 # The goal is currently being processed by the action server
uint8 PREEMPTED = 2 # The goal received a cancel... | 33,813 | 11,734 |
/*
* Copyright Copyright 2012, System Insights, 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/licenses/LICENSE-2.0
*
* Unless requi... | 49,223 | 15,517 |
// Copyright 2020 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | 14,756 | 4,588 |
#include <map>
#include <regex>
#define MAX_ARR_LENGTH 16
#define MAX_DATE_LENGTH 26
#define MAX_TITLE_LENGTH 64
#define MAX_AUTHOR_LENGTH 32
typedef struct _frontmatter
{
std::map<std::string, std::string> list;
int categories_length;
int tags_length;
std::string type;
std::string __open_divider;... | 1,382 | 588 |
//$Id$
//------------------------------------------------------------------------------
// Interpolator
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002 - 2015 United States Government ... | 4,219 | 1,132 |
// Copyright (c) 2019 PaddlePaddle 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... | 4,849 | 1,697 |
/*
* Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibGUI/Event.h>
#include <LibGfx/Painter.h>
#include <LibGfx/StylePainter.h>
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/HTML/BrowsingContext.h>
#include <LibWeb/Layout/... | 4,254 | 1,363 |
#pragma once
template <typename T, size_t N, size_t M, typename = typefu::for_arithmetic<T>>
constexpr tmat<T, N, M> operator+(T s, const tmat<T, N, M>& m);
template <typename T, typename U, size_t N, size_t M,
typename = typefu::for_arithmetic<T, U>>
constexpr tmat<T, N, M> operator+(U s, const tmat<T, N, ... | 4,540 | 1,773 |
#include <iostream>
#include <vector>
int main() {
const int N = 2000000;
std::vector<int> is_prime(N, 1);
for (int k = 2; k + k < N; ++k) {
for (int j = k + k; j < N; j += k) {
is_prime[j] = 0;
}
}
long long sum_of_primes = 0; // 不能用int
for (int i = 2; ... | 534 | 218 |
/*!
******************************************************************************
*
* \file
*
* \brief Header file providing RAJA sort declarations.
*
******************************************************************************
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// ... | 25,084 | 7,272 |
#include "graph.hpp"
Graph::Graph()
{
}
| 42 | 20 |
/******************************************************************************
* Copyright 2018 The Apollo 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
... | 14,935 | 5,677 |
///////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// ██╗░░██╗░██╗░░░░░░░██╗░█████╗░████████╗████████╗░█████╗░
// ██║░██╔╝░██║░░██╗░░██║██╔══██╗╚══██╔══╝╚══██╔══╝██╔══██╗
// █████═╝░░╚██╗████╗██╔╝███████║░░░██║░░░░░░██║░░░███████║
// ██╔═██╗░░░████╔═████║░██╔... | 2,890 | 1,242 |
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "AI/Navigation/NavAreas/NavArea_Default.h"
UNavArea_Default::UNavArea_Default(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
}
| 226 | 81 |
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011 Katelyn Kufahl
//
// 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)
///////////////////////////////////////////... | 2,871 | 1,065 |
// Copyright (c) 2007-2017 Hartmut Kaiser
// Copyright (c) 2021 Giannis Gonidelis
//
// SPDX-License-Identifier: BSL-1.0
// 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)
#pragma once
#include <hpx/config.hpp>
... | 12,484 | 3,441 |
#include<bits/stdc++.h>
using namespace std;
int main(){
int ncase;
while(cin>>ncase){
if(ncase==0){
break;
}
int a1[ncase+5],a2[ncase+5];
for(int i=0;i<ncase;i++){
cin>>a1[i]>>a2[i];
}
bool flag=true;
if(ncase%2){
cout<<"NO\n";
}else{
sort(a1,a1+ncase);
sort(a... | 532 | 332 |
/**
* \file JobWznmIexIex.cpp
* job handler for job JobWznmIexIex (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 28 Nov 2020
*/
// IP header --- ABOVE
#ifdef WZNMCMBD
#include <Wznmcmbd.h>
#else
#include <Wznmd.h>
#endif
#... | 25,134 | 12,440 |
// Copyright (C) 2012-2021 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <asiolink/io_ad... | 40,782 | 11,129 |
/** @file
@author Zachary Fewtrell
*/
// LOCAL INCLUDES
#include "CalUtil/SimpleCalCalib/TholdCI.h"
// GLAST INCLUDES
// EXTLIB INCLUDES
// STD INCLUDES
#include <sstream>
#include <string>
#include <fstream>
using namespace CalUtil;
using namespace std;
namespace CalUtil {
const short TholdCI::INVALID_THOL... | 2,004 | 769 |
#include <iostream>
#include <stack>
#include <exception>
using std::clog;
using std::endl;
/**
* 用两个栈模拟队列操作 画好过程图
* @tparam T
*/
template <class T>
class QStack{
public:
QStack(){}
~QStack(){}
T q_pop();
void q_push(T x);
private:
std::stack<T> s1;
std::stack<T> s2;
};
... | 774 | 327 |
//
#include <abel/strings/internal/ostringstream.h>
namespace abel {
namespace strings_internal {
OStringStream::Buf::int_type OStringStream::overflow(int c) {
assert(s_);
if (!Buf::traits_type::eq_int_type(c, Buf::traits_type::eof()))
s_->push_back(static_cast<char>(c));
return 1;
}
std::streamsize OStr... | 478 | 186 |
#ifdef OS_AIX
#include <memory.h>
#endif
#ifdef OS_OPENBSD
#include <memory.h>
#endif
#ifdef OS_LINUX
#include <string.h>
#endif
#include "ether_support.h"
#include "support.h"
c_ether_header::c_ether_header(byte *ether_header)
{
header = (s_ether_header *)ether_header;
}
c_ether_header::c_ether_header(s_ether... | 887 | 377 |
/*
Определить функцию для вычисления по формуле Ньютона приблежённого значения
арифметического квадратного корня. В формуле Ньютона итерации определяются
по формуле r_[n+1] = (r_[n] + x / r_[n]) / 2
Версия для C++
*/
#include <iostream>
#include <cmath>
#include <clocale>
const double PRECISION = 0.00... | 1,803 | 679 |
#include <vector>
#include <string>
#include <iostream>
#include <cstdarg>
#include <unordered_map>
#include <fstream>
#include <ctype.h>
extern "C"
{
#include <linenoise/linenoise.h>
}
// LevelDB Headers
#include <leveldb/db.h>
#include <leveldb/write_batch.h>
using namespace std;
#define SPACECHR " \t\n"
#define... | 22,092 | 6,069 |
/* /////////////////////////////////////////////////////////////////////////
* File: winstl/controls/listview_sequence.hpp
*
* Purpose: Contains the listview_sequence class template.
*
* Created: 8th May 2003
* Updated: 19th February 2017
*
* Thanks: To Pablo Aguilar for making the requi... | 20,089 | 6,948 |
// Copyright 2012 Google Inc. 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 ap... | 79,067 | 29,603 |
#include "GeneratorInterface/SherpaInterface/interface/SherpackUtilities.h"
#include <unistd.h>
#include <cstdlib>
namespace spu {
// functions for inflating (and deflating)
//~ /* Compress from file source to file dest until EOF on source.
//~ def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
... | 15,851 | 5,556 |
#include <cstdlib>
#include "virtual_call_in_destructor_lib.hpp"
int main() {
Child c;
return EXIT_SUCCESS;
}
| 116 | 50 |
// Copyright (c) 2020 The SAPP developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "context.h"
#include "timedata.h"
#include "util.h"
#include <memory>
#include <exception>
using namespace std;
static unique_... | 2,594 | 1,065 |
#include <android/log.h>
#include "baseutils.h"
#include "_onload.h"
#include "skbitmap_helper.h"
#define LOCAL_DEBUG 0
static JNINativeMethod methods[] = {
{ "nativeInit", "(Landroid/graphics/Bitmap;[I)Z", (void*)Init },
{ "nativeGetBytesPerPixel", "(Landroid/graphics/Bitmap;)I", (void*)GetBytesPerPixel },
... | 2,063 | 791 |
// Copyright (c) 2015 Pierre MOULON.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#pragma once
namespace i23dSFM{
namespace matching{
enum EMatcherType
{
BRU... | 438 | 172 |
// -*- C++ -*-
#include "ComponentC_exec.h"
#include "ace/Log_Msg.h"
namespace CIAO_connector_test_C_Impl
{
//============================================================
// Pulse generator
//============================================================
ComponentC_exec_i::ComponentC_exec_i (void)
: topic_... | 2,683 | 1,040 |
#include <iostream>
#include <sys/time.h>
#include <assert.h>
#include <stdlib.h>
#include <pluton/client.h>
using namespace std;
// Force a service to be left in a partially read request state, then
// send a new request to ensure that it resets properly.
const char* SK = "system.echo.0.raw";
int
main(int argc... | 1,654 | 645 |
/*=============================================================================
Copyright (c) 2001-2014 Joel de Guzman
http://spirit.sourceforge.net/
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
======... | 1,756 | 580 |
// Copyright 2019 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... | 12,648 | 3,880 |
#include <fc/crypto/openssl.hpp>
#include <fc/filesystem.hpp>
#include <boost/filesystem/path.hpp>
#include <cstdlib>
#include <string>
#include <stdlib.h>
namespace fc
{
struct openssl_scope
{
static ENGINE* eng;
openssl_scope()
{
ENGINE_load_rdrand();
ENGINE* ... | 1,165 | 409 |
/****************************************************************************
** Meta object code from reading C++ file 'addressbookpage.h'
**
** Created: Thu Dec 25 23:31:32 2014
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.2)
**
** WARNING! All changes made in this file will be lost!
*******************... | 5,679 | 2,257 |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=530000;
const int MOD=998244353;
inline int read(){
int x=0,f=0; char ch=getchar();
while(ch<'0'||ch>'9') f|=(ch=='-'),ch=getchar();
while(ch>='0'&&ch<='9') x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
return f==0 ? x : -x;
}
inline... | 5,964 | 2,952 |
/*
Copyright 2021 The Silkworm 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 ... | 3,501 | 1,144 |
#include <stdio.h>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "BiTrieSelfJoin.h"
#include "common/time.h"
using namespace std;
extern long long resultNum;
void LoadStrings(vector<char*>& strings, char* filename)
{
ifstream in(filename);
if (in.fail())
{
cerr << "Can not... | 1,036 | 436 |
#include "SixCatsLogger.h"
#include <iostream> // cout
using namespace std;
#define LOCAL_C6_DEBUG 1
// --- ------------------------------------------------------------------------
SixCatsLogger::SixCatsLogger() {
selfSetup();
}
// --- ----------------------------------------------------------------... | 11,826 | 3,440 |
// Copyright (C) 2010 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#include <dlib/matrix.h>
#include <sstream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <vector>
#include "../stl_checked.h"
#include "../array.h"
#include ".... | 36,416 | 15,422 |
/*
Copyright (c) 2019, Triad National Security, LLC. All rights reserved.
This is open source software; you can redistribute it and/or modify it
under the terms of the BSD-3 License. If software is modified to produce
derivative works, such modified software should be clearly marked, so as
not to confus... | 1,993 | 757 |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... | 27,908 | 9,180 |
/*!
* \file utils.cc
*
* \author Ethan Adams
* \date
*
* This file contains utility functions for doing and testing
* sybolic regression problems in the bingo package
*/
#include <vector>
#include <numeric>
#include "BingoCpp/utils.h"
namespace bingo {
const int kPartialWindowSize = 7;
con... | 6,510 | 2,225 |
/*
* 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 m... | 4,831 | 1,308 |
// https://atcoder.jp/contests/arc118/tasks/arc118_a
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<ll>;
int main() {
cin.tie(0), ios::sync_with_stdio(0);
ll t, n;
cin >> t >> n;
ll m = (n * 100 - 1) / t + 1;
cout << m + n - 1 << '\n';
}
| 289 | 138 |
/*******************************************************************\
Module:
Author: Daniel Kroening, kroening@kroening.com
\*******************************************************************/
#include "bv_utils.h"
#include <cassert>
#include <util/arith_tools.h>
bvt bv_utilst::build_constant(const mp_integer ... | 33,013 | 13,399 |
////////////////////////////////////////////////////////////////////////////////
// The following FIT Protocol software provided may be used with FIT protocol
// devices only and remains the copyrighted property of Garmin Canada Inc.
// The software is being provided on an "as-is" basis and as an accommodation,
// ... | 15,080 | 4,297 |
#ifdef PEGASUS_OS_DARWIN
#ifndef __UNIX_STATISTICSSERVICE_PRIVATE_H
#define __UNIX_STATISTICSSERVICE_PRIVATE_H
#endif
#endif
| 131 | 67 |
/*-----------------------------------------------------------------------------
Copyright 2017 Hopsan Group
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.o... | 3,097 | 808 |
/*
* BSD 2-Clause License
*
* Copyright (c) 2021, Christoph Neuhauser
* 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 ... | 2,194 | 884 |
/*
* Copyright 2019-present Facebook, 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 11,053 | 5,427 |
#pragma once
#include <vector>
#include <filesystem>
#include <Vnavbar.hpp>
#include "CharacterCreator.hpp"
namespace cf {
class CharacterSelector : public sfs::GameObject {
public:
CharacterSelector(const std::string &directory, const std::string &filename) noexcept
: _navbar(nullptr)
, _image(nullptr)
... | 1,654 | 602 |
/*
* (c) Copyright 2016-2021 Hewlett Packard Enterprise Development Company LP.
*
* This software is available to you under a choice of one of two
* licenses. You may choose to be licensed under the terms of the
* GNU Lesser General Public License Version 3, or (at your option)
* later with exceptions inc... | 40,689 | 15,428 |
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <getopt.h>
#define MAX_BUFFER_SIZE 256
class Animal{
private:
char name[MAX_BUFFER_SIZE];
public:
Animal() { strcpy(name, "Ylvis"); }
void set_name(char *nname) { strcpy(name, nname); }
char *get_name() { return name; }
virtual void speak() ... | 1,521 | 631 |
#include <utility>
#include "mvSelectable.h"
#include "mvApp.h"
#include "mvItemRegistry.h"
namespace Marvel {
void mvSelectable::InsertParser(std::map<std::string, mvPythonParser>* parsers)
{
parsers->insert({ "add_selectable", mvPythonParser({
{mvPythonDataType::String, "name"},
{mvPythonDataType::Keyword... | 3,890 | 1,417 |
#include "SyntaxTree.h"
SyntaxTree::SyntaxTree() {
}
SyntaxTree::~SyntaxTree() {
}
void SyntaxTree::print() {
for (TreeNode* line: lines) {
std::string toPrint = line->printPreOrder();
if(toPrint.back() == ' ') {
toPrint = toPrint.substr(0, toPrint.length()-1);
}
... | 472 | 157 |
#include "JSystem/JUT/JUTException.h"
#include "P2DScreen.h"
#include "System.h"
#include "types.h"
/*
Generated from dpostproc
.section .rodata # 0x804732E0 - 0x8049E220
.global lbl_8049A6C0
lbl_8049A6C0:
.4byte 0x50324453
.4byte 0x63726565
.4byte 0x6E2E6370
.4byte 0x... | 12,534 | 6,903 |
/*
** Haaf's Game Engine 1.8
** Copyright (C) 2003-2007, Relish Games
** hge.relishgames.com
**
** hge_tut05 - Using distortion mesh
*/
// Copy the files "particles.png", "menu.wav",
// "font1.fnt", "font1.png" and "trail.psi" from
// the folder "precompiled" to the folder with
// executable file. Also copy hge.dll a... | 3,960 | 1,989 |
#include <iostream>
#include <cmath>
#include <cstring>
#include "src/calc.cpp"
using namespace std;
const double precision = 1e-15;
template<typename T>
void is(std::string text, T value, bool positive = true) {
const char* text_ptr = text.c_str();
Calculator<T> calc;
try {
auto result = calc.eval((char*)t... | 4,525 | 2,520 |
/* The MIT License (MIT)
Copyright (c) 2017 Madis Kaal <mast@nomad.ee>
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 ... | 8,270 | 2,904 |
//-----------------------------------------------
//
// This file is part of the Siv3D Engine.
//
// Copyright (C) 2008-2016 Ryo Suzuki
//
// Licensed under the MIT License.
//
//-----------------------------------------------
# pragma once
# include "Fwd.hpp"
# include "IWidget.hpp"
# include "WidgetStyle.hpp"
name... | 2,922 | 1,045 |
//
// Copyright Jesse Manning 2007
//
// 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 "convenience.h"
#include <boost/numeric/bindings/lapack/gelss.hpp>
// set to 1 to write test output to file, oth... | 12,598 | 4,996 |
#include "WaterParticles.h"
#include "Utils.h"
#include "Object.h"
using namespace glm;
inline void compileShader(ShaderProgram& program, const string& fileName) {
Shader vShader, fShader;
string path = "shaders/" + fileName;
vShader.initFromFile(VERTEX_SHADER, path + ".vert");
if (!vShader.isCompiled()) {
cout ... | 3,282 | 1,340 |
#include <pre/geometry/FilePLY>
#include <pre/string>
#include "rply.h"
namespace pre {
static void error_cb(p_ply, const char* message) {
throw std::runtime_error(message);
}
static int vertex2_cb(p_ply_argument arg) {
void* pointer = nullptr;
long index = 0;
ply_get_argument_user_data(arg, &pointe... | 6,187 | 2,328 |
/*
* Copyright (C) 2009 Apple 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... | 5,694 | 1,795 |
#include <fstream>
#include <spdlog/spdlog.h>
#include <yaml-cpp/exceptions.h>
#include <yaml-cpp/yaml.h>
#if defined(MAGFY_WINDOWS)
#include <spdlog/sinks/basic_file_sink.h>
#include <windows.h>
#else
#include <spdlog/sinks/stdout_color_sinks.h>
#endif
#include "Config.h"
#include "core.h"
// global logger object
s... | 1,568 | 554 |
#include <napi.h>
#include <iostream>
using namespace std;
namespace example {
//add two integers
// this is the function to be exported
double add(double x, double y);
//add function wrapper
// this wrapper will call the function above
Napi::Value addWrapped(const Napi::CallbackInfo& info);
//Ex... | 421 | 140 |