text string | size int64 | token_count int64 |
|---|---|---|
#pragma once
#include <scorum/chain/services/advertising_property.hpp>
#include <scorum/chain/services/account.hpp>
#include <scorum/chain/services/budgets.hpp>
#include <scorum/chain/services/dynamic_global_property.hpp>
#include <scorum/app/scorum_api_objects.hpp>
#include <scorum/app/advertising_api.hpp>
#include <... | 4,970 | 1,635 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// clang-format off
#include "pch.h"
#include "webrtc.PeerConnectionObserver.h"
#include "webrtc.PeerConnectionObserver.g.cpp"
// clang-format on
#include "webrtc.IceCandidate.h"
#include "webrtc.RtpTransceiver.h"
namespace winrt::Microsoft::... | 5,286 | 1,820 |
// This file was generated based on '(multiple files)'.
// WARNING: Changes might be lost if you edit this file directly.
#include <iOS.QuartzCore.CATransform3D.h>
#include <Uno.Double.h>
namespace g{
namespace iOS{
namespace QuartzCore{
// ../../../../../../../usr/local/share/uno/Packages/Experimental.iOS/0.24.0/st... | 6,256 | 2,851 |
#include<iostream>
int days = 0;
int getDayOfWeek();
int getYear();
int getMonth(bool isLeapYear);
int main(){
int year = 0, month = 0, dayOfWeek = 0;
bool isLeapYear = true;
char week[7][10] = {"Saturday", "Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday"};
while ((std::c... | 1,516 | 676 |
/*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* 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... | 215,144 | 63,373 |
// 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 "net/tools/quic/quic_reliable_client_stream.h"
using std::string;
namespace net {
namespace tools {
// Sends body data to the server and r... | 815 | 262 |
// 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 "chrome/browser/media/webrtc/webrtc_log_util.h"
#include <vector>
#include "base/bind.h"
#include "base/task/post_task.h"
#include "base/task/t... | 1,420 | 456 |
#include <Arduino.h>
#include "protothreads.h"
#include "Machine.h"
void Machine::inizialice(Led red, Led green, Servo servo, Joystick joy, Adafruit_SSD1306 oled) {
this->_red = red;
this->_green = green;
this->_servo = servo;
this->_joy = joy;
this->_oled = oled;
this->_servo.write(0);
this->_point = 0;
this... | 2,721 | 1,246 |
#include "logpicker_t.hpp"
#include "types.hpp"
#include "logpicker_t.hpp"
#include "log.hpp"
#include "cert.hpp"
#include "utils.hpp"
int main() {
cert_t cert = read_cert_from_disk("/home/leen/Projects/TU_BS/misc/LogPicker/lpp/data/github/DER/github.com");
hash_t hash = hash_certificate(cert);
std::cout ... | 503 | 196 |
//
//
//
#include <gtest/gtest.h>
#include "AutoVersion.h"
TEST(AutoVersionTest, ParsesUpstreamOnly)
{
AutoVersion v("1");
EXPECT_EQ(0, v.Epoch());
EXPECT_STREQ("1", v.Upstream());
EXPECT_STREQ("0", v.Revision());
}
TEST(AutoVersionTest, ParsesEpochs)
{
AutoVersion v("1:2.0.1");
EXPECT_EQ(1, ... | 2,006 | 901 |
/*
SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
SPDX-License-Identifier: MIT
*/
#include "auditlogbrowserdialog.h"
#include "ui_auditlogbrowserdialog.h"
#include <auditloguicontroller.h>
#include <QDateTime>
#include <QPushButton>
using namespace KUserFeedback;
AuditLogBrowserDialog::Audit... | 1,508 | 513 |
//-------------------Joysticks----------------
#define DRIVE_STICK 0
#define STEER_STICK 1
//-------------------Drivetrain---------------
#define SWERVE_DISTANCE_FRONT 10 //distance between swerve drives from front to back (inches)
#define SWERVE_DISTANCE_SIDE 10 //distance between swerve drives from side to side (inc... | 782 | 290 |
/*
Boost.System is a small library defining four classes to identify errors.
boost::system::error_code is the most basic class and represents operating
system specific errors. Since operating systems typically enumerate errors,
boost::system::error_code saves an error code in a variable of type int.
The following e... | 8,498 | 2,327 |
#pragma once
#include "forwarddecl/Tex.hpp"
#include "forwarddecl/Ren.hpp"
#include "Base.hpp"
#include "PixelFmt.hpp"
#include "Geom.hpp"
namespace rolmodl {
enum class TextureType {
Static, Lock, Ren
};
namespace textureType::unsafe {
constexpr TextureType fromSDLEnum(const int a) noexcept {
if... | 3,156 | 1,080 |
#pragma once
#include <Windows.h>
#include <thread>
#include <condition_variable>
#include <mutex>
#pragma warning( push )
#pragma warning( disable: 26495 )
#pragma warning( disable: 4005 )
#include <d3d11.h>
#pragma warning( pop )
using namespace std::chrono_literals;
class Instance {
private:
inline static Ins... | 761 | 283 |
#include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define pi 2*acos(0.0)
#de... | 906 | 427 |
//
// main.cpp
// pick-ghost
//
// Created by Ju Yuanmao on 2017/7/15.
// Copyleft
//
#include <iostream>
#include <fstream>
#include <algorithm>
#include "randi.hpp"
#include "cards.hpp"
#include "player.hpp"
using std::cin;
using std::cout;
using std::endl;
int main(int argc, const char * argv[]) {
std::of... | 1,972 | 637 |
#include <stdio.h>
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osg/io_utils>
#include <osg/UserDataContainer>
#include <osg/ValueObject>
#include "SceneData.h"
#include "AssetsManager.h"
#include "Logging.h"
static void build_scene_data(const char *osgt_file)
{
char buf[20];
osg::Group *roo... | 6,640 | 2,433 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#line 2 "au_autodiff_generate_template.cpp"
#include <math.h>
#include "au_mex.h"
// Autogenerated by au_ccode
// FROM: f
// au_autodiff_template.cpp - outline code for au_autodiff*
// awf@microsoft.com, Dec 13
void mlx_function(mlx_inputs& ... | 391,712 | 274,075 |
#include "ZFObjectCore.h"
#include "ZFObjectImpl.h"
#include "ZFCore/ZFSTLWrapper/zfstl_string.h"
#include "ZFCore/ZFSTLWrapper/zfstl_map.h"
#include "ZFCore/ZFSTLWrapper/zfstl_deque.h"
ZF_NAMESPACE_GLOBAL_BEGIN
// ============================================================
// ZFListenerData
void ZFListenerData::ob... | 20,924 | 7,193 |
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2017 Intel Corporation. All Rights Reserved
#include <pluginlib/class_list_macros.h>
#include <behavior_common/behavior.h>
PYTHON_BEHAVIOR_PLUGIN(take_object_behavior, "TAKE_OBJECT");
PLUGINLIB_EXPORT_CLASS(take_object_behavior, behavior_comm... | 341 | 128 |
#include "stdafx.h"
#include "LiveTab.h"
#include "resource.h"
#include "AppDefine.h"
#include "CamMonitor.h"
#include "cih.h"
#include "ChildView.h"
#include "SelectCameraDialog.h"
#include "SaveLiveDialog.h"
#include "Util.h"
IMPLEMENT_DYNAMIC(CLiveTab, CBaseTab)
CLiveTab::CLiveTab(CWnd* pParent)
: CBaseTab(CLive... | 28,340 | 12,996 |
#ifndef UTILS_TIMING_PROFILER_HPP
#define UTILS_TIMING_PROFILER_HPP
#include <chrono>
namespace engine::utils {
/**
* \brief Provides a simple way to profile arbitrary code.
*/
class Profiler {
public:
/**
* \brief Starts a time measurement.
*/
void start() {
... | 1,797 | 509 |
#include "StrBlob.h"
StrBlob::StrBlob() : data(std::make_shared<std::vector<std::string>>()) {};
StrBlob::StrBlob(std::initializer_list<std::string> il) : data(std::make_shared<std::vector<std::string>>(il))
{
}
void StrBlob::check(StrBlob::size_type sz, const std::string &msg) const
{
if (sz >= data->size())
th... | 1,176 | 470 |
#include "AIPaddle.h"
#include "Ball.h"
AIPaddle::AIPaddle(Ball* ball) : Paddle(irr::core::vector3df(25.0f, 0.0f, 0.0f))
{
this->_ball = ball;
}
AIPaddle::~AIPaddle()
{
}
bool AIPaddle::Update(float deltaTime, InputHandler* ih)
{
irr::core::vector3df ballPos = this->_ball->GetPosition();
irr::core::vector3df myP... | 573 | 246 |
#include <vector>
#include "../../utils/cpp/Assert.h"
#include "../../utils/cpp/PrintVector.h"
#include "./BucketSort.h"
int main(int argc, char** argv)
{
int unsorted[] = { 5,5,1,2,4,5,1,4,2,4,2,3,1,2,4,5,1 };
int sorted[] = { 1,1,1,1,2,2,2,2,3,4,4,4,4,5,5,5,5 };
int n = sizeof(unsorted)/sizeof(int);
std::vec... | 465 | 225 |
/**
* Copyright by Ruman Gerst
* Research Group Applied Systems Biology - Head: Prof. Dr. Marc Thilo Figge
* https://www.leibniz-hki.de/en/applied-systems-biology.html
* HKI-Center for Systems Biology of Infection
* Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Insitute (HKI)
*... | 852 | 289 |
#ifndef FTS_DEFINE_HPP
#define FTS_DEFINE_HPP
#define FTS_TIMEOUT_SEC (60)
#define FTS_RETRY_INTERVAL_USEC (2000000)
#define FTS_DEFAULT_MAX_CONCURRENT_QUERIES 128
#define FTS_DEFAULT_MAX_RESULTS 128
#define FTS_DEFAULT_MAX_RESULT_LIFETIME_SEC 50000
#define FTS_LUTFILE_EXT "csv"
#define FTS_LUT_POSSIBLE_INPUT_NUM_O... | 407 | 215 |
// Automatically generated by bindings.c. DO NOT EDIT.
#include <wpi/StringRef.h>
#include <wpi/ArrayRef.h>
#include <frc/smartdashboard/SmartDashboard.h>
#include "luadef.h"
LUAFUNC void SmartDashboard_PutNumber(const char* keyName, double value) {
frc::SmartDashboard::PutNumber((wpi::StringRef)keyName,... | 1,288 | 477 |
/////////////////////////////////////////////////////////////////////////////
// ARGSS - Copyright (c) 2009 - 2010, Alejandro Marzini (vgvgf)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// ar... | 8,424 | 4,315 |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <_pvp_order_view_end_zocl.hpp>
START_ATF_NAMESPACE
namespace Info
{
using _pvp_order_view_end_zoclsize2_ptr = int (WINAPIV*)(struct _pvp_order_... | 520 | 210 |
//
// Created by Harrand on 25/08/2018.
//
#include "bullet.hpp"
#include "entity_manager.hpp"
Bullet::Bullet(Vector2F position, Vector2F velocity, const Texture* bullet_texture, EntityManager& manager, DynamicSprite* shooter): DynamicSprite(1.0f, position, 0.0f, {Bullet::bullet_size, Bullet::bullet_size}, bullet_tex... | 1,457 | 498 |
#include "vertexcover.hpp"
#include "graph.hpp"
#include "timer.hpp"
#include "global.hpp"
#include <vector>
#include <queue>
#include <cassert>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <map>
#define F first
#define S second
using namespace std;
namespace VertexCover {
int uu[maxN];
int... | 8,669 | 5,016 |
/** \file
* \author Max Mertens <max.mail@dameweb.de>
* \section LICENSE
* Copyright (c) 2013, Max Mertens.
* All rights reserved.
* This file is licensed under the "BSD 3-Clause License".
* Full license text is under the file "LICENSE" provided with this code. */
#include "Sphere.hpp"
#include "DataTransmit.hpp... | 3,136 | 1,164 |
/*
* 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 applicable law ... | 6,706 | 2,334 |
/*
Copyright 2018-2021 Tatsuya Yamasaki.
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... | 1,277 | 454 |
/*****************************************************************************
* dialog.cpp
*
* Created: 12/20/2020 2020 by mguludag
*
* Copyright 2020 mguludag. All rights reserved.
*
* This file may be distributed under the terms of GNU Public License version
* 3 (GPL v3) as defined by the Free Softwa... | 1,716 | 548 |
#include "shape.h"
FLOAT Shape::Area() { return 0; }
| 59 | 31 |
#include "stream_transformer_payload_to_payload.h"
#include <iostream>
#include "cast.h"
#include "exceptions.h"
#include "json_utilities.h"
#include "spdlog/spdlog.h"
#include "utilities.h"
namespace tw {
void StreamTransformerPayloadToPayload::setup(const nlohmann::json& p_json) {
if (!is_valid_setup(p_json)) {... | 5,673 | 1,885 |
// Copyright (c) 2015 Andrew Sutton
// All rights reserved
#include "decl.hpp"
#include "type.hpp"
Function_type const*
Function_decl::type() const
{
return cast<Function_type>(Decl::type());
}
Type const*
Function_decl::return_type() const
{
return type()->return_type();
}
| 285 | 102 |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
string word;
int strLen = 0;
int count = 0;
getline (cin, word);
strLen = word.length();
for (int i = 0; i < strLen+1; i++) {
if (islower(word[i])) {
... | 382 | 141 |
// Class for defining the production cross-section data for
// a specific target isotope. It stores a map of ActXSecGraphs
// for the target isotope.
#include "Activia/ActProdXSecData.hh"
#include "Activia/ActBeamSpectrum.hh"
#include "Activia/ActProdNuclideList.hh"
#include "Activia/ActProdNuclide.hh"
#include "Activ... | 8,475 | 2,868 |
#include "UAutomizerFileReader.h"
#include <sys/stat.h>
inline bool exists_file (const std::string& name) {
struct stat buffer;
return (stat (name.c_str(), &buffer) == 0);
}
int main(int argc, char * argv[]){
if(argc != 6){
std::cerr << "Invalid number of inputs.\n";
return 0;
}
// argv[1] -> ... | 1,145 | 448 |
#include <iostream>
#include "Board.hpp"
using namespace std;
using namespace ariel;
const char defaultChar = '_';
namespace ariel {
void Board::update(unsigned int row, unsigned int col, bool flag, unsigned int num){
if(this->maxR!=0 || this->minR!=INT32_MAX || this->maxC!=0 || this->minC!=INT32_MAX)... | 2,754 | 836 |
class Solution {
public:
int minimumLength(string s)
{
int l = 0, r = s.size() - 1;
while(l < r)
{
if(s[l]!=s[r]) break;
while(l<r-1 && s[l+1]==s[r])l++;
while(r>l+1 && s[r-1]==s[l])r--;
if(r-l+1>=2&&l<s.size()-1){l++;r--;}
}
... | 346 | 155 |
#pragma once
#include "batch.hpp"
#include "boundary_conditions.hpp"
#include "distribution.hpp"
#include "kronmult.hpp"
#include "program_options.hpp"
#include "tensors.hpp"
#include "timer.hpp"
#include <mutex>
// this function executes a time step using the current solution
// vector x (in host_space).
// on exit, ... | 1,316 | 401 |
/*************************************************************************
* Copyright (c) 2015, Synopsys, Inc. *
* All rights reserved. *
* *
* Redistribution and... | 8,818 | 3,049 |
#include <complex>
#include <tuple>
#include <type_traits>
#include <vector>
// Question: https://stackoverflow.com/questions/25187323/how-can-i-get-the-innermost-template-parameter-type
// adapted from https://stackoverflow.com/a/25187583
template<typename T>
struct inner_impl
{
using type = T;
};
template<tem... | 926 | 341 |
extern void loopTower(ConfigurableSettings& settings);
| 55 | 14 |
/****************************************************************************
*
* This is a part of TOTEM offline software.
* Authors:
* Jan Kašpar (jan.kaspar@gmail.com)
*
****************************************************************************/
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#inc... | 2,616 | 794 |
#pragma once
#include "generator/collector_interface.hpp"
#include "generator/feature_builder.hpp"
#include "generator/intermediate_elements.hpp"
#include "generator/osm_element.hpp"
#include "routing/road_access.hpp"
#include "routing/vehicle_mask.hpp"
#include <array>
#include <cstdint>
#include <fstream>
#include... | 3,511 | 1,068 |
// Copyright (c) 2020-2021 LG Electronics, 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... | 3,074 | 1,053 |
// Copyright (c) 2021 Akihiro Yamamoto.
// Licensed under the MIT License <https://spdx.org/licenses/MIT.html>
// See LICENSE file in the project root for full license information.
//
#include "credentials.h"
#include "iothub_client.hpp"
#include "peripherals.hpp"
#include <ArduinoOTA.h>
#include <M5Core2.h>
#... | 8,179 | 3,287 |
// -*- C++ -*-
// Copyright 2006-2007 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
// or its licensors,as applicable.
// Copyright 1995-2005 Thomas M. Breuel
//
// You may not use this file except under the terms of the accompanying license.
//
// Licensed under the Apache License,Version 2.0 (the "Lice... | 7,494 | 2,560 |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright 2012 The MITRE Corporation *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* y... | 2,518 | 780 |
#ifndef HYPSYS1D_BOUNDARY_CONDITION_HPP
#define HYPSYS1D_BOUNDARY_CONDITION_HPP
#include <Eigen/Dense>
#include <memory>
/// Interface for enforcing boundary conditions through ghost-cells.
class BoundaryCondition {
public:
// BoundaryCondition is an abstract base class. It needs a virtual
// destructor.
... | 2,133 | 751 |
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/mojo/mojom/encoded_audio_buffer_traits.h"
#include "mojo/public/cpp/base/time_mojom_traits.h"
namespace mojo {
// static
bool StructTra... | 1,319 | 434 |
#include <iostream>
#include "BinarySearchTree.h"
#include <vector>
int main()
{
BinarySearchTree<int> tree;
//tree.Add(4);
//tree.Add(2);
//tree.Add(6);
//tree.Add(1);
//tree.Add(3);
//tree.Add(5);
//tree.Add(7);
tree.Add(25);
tree.Add(15);
tree.Add(50);
tree.Add(10);
tree.Add(22);
tree.Add(35);
tree... | 1,250 | 560 |
/**
* @Copyright 2011 GanJi Inc.
* @file ganji/crawler/conf_crawler/url_dedup/static_dedup.cc
* @namespace ganji::crawler::conf_crawler::dedup
* @version 1.0
* @author lisizhong
* @date 2012-03-31
*
* 改动程序后, 请使用tools/cpplint/cpplint.py 检查代码是否符合编码规范!
* 遵循的编码规范请参考: http://google-styleguide.googlecode.com/... | 3,734 | 1,486 |
/*
* Copyright 2011, 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 applica... | 12,095 | 3,583 |
/*
Nexus
Copyright(C) 2012 - Federico Ponchio
ISTI - Italian National Research Council - Visual Computing Lab
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 ... | 3,184 | 1,295 |
#include "RemoveDuplicatesFromSortedArrayII.h"
#include "gtest/gtest.h"
using namespace lcpp;
TEST(RemoveDuplicatesFromSortedArrayII, Solution81_1) {
std::vector<int> Nums1{1, 1, 1, 2, 2, 3};
const int Size1 = 5;
ASSERT_EQ(Size1, Solution80_1().removeDuplicates(Nums1));
const std::vector<int> Expected1{1, 1, ... | 685 | 326 |
//
// Licensed to Green Energy Corp (www.greenenergycorp.com) under one or
// more contributor license agreements. See the NOTICE file distributed
// with this work for additional information regarding copyright ownership.
// Green Energy Corp licenses this file to you under the Apache License,
// Version 2.0 (the "Li... | 3,168 | 1,203 |
//
// Created by pzz on 2022/4/22.
//
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
class Solution {
public:
int maxRotateFunction(vector<int> &nums) {
int n = nums.size();
int numSum = 0, f = 0;
for (int i = 0; i < n; i++) {
numSum += nums[i... | 565 | 217 |
# include <iostream>
using namespace std;
void test_1();
void test_2();
int main() {
// test_1();
test_2();
}
void test_1(){
int a[2];
a[0] = 1;
a[1] = 2;
int i = 2;
a[i] = 10;
for (int i = 0; i <=2; i++){
cout << a[i] << " ";
}
cout << endl;
for (int i = 0; ... | 510 | 241 |
/*
* Copyright (c) 2017 Pedro Falcato
* This file is part of Onyx, and is released under the terms of the MIT License
* check LICENSE at the root directory for more information
*/
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <onyx/worker.h>
#include <onyx/scheduler.h>
#include <onyx/thread.h>
#i... | 1,869 | 752 |
#include<vector>
#include<iostream>
using namespace::std;
int main()
{
vector<unsigned> v(11,0);
unsigned score;
auto it = v.begin();
while(cin>>score)
++*(it + score/10);
for(auto &w:v)
cout<<w<<" ";
cout<<endl;
return 0;
}
| 239 | 108 |
#include "BitArray.hpp"
namespace {
constexpr uint8_t SELECT_TABLE[9][256] = {
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,... | 10,556 | 8,374 |
/* $Id: transmissionrw.cpp 583834 2019-04-02 19:20:44Z sadyrovr $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Governm... | 7,772 | 2,723 |
// Copyright (c) 2014, Michael Boyle
// See LICENSE file for details
#ifndef COMBINATORICS_HPP
#define COMBINATORICS_HPP
#include <vector>
#include <cmath>
#ifdef DEBUG
#include <iostream>
#include "Errors.hpp"
#endif
namespace SphericalFunctions {
const int ellMax = 32;
const double epsilon = 1.0e-14;
clas... | 7,690 | 2,624 |
#include "AudioOutObject.h"
#include "AudioOutObject_p.h"
namespace Magna{
namespace MultiMedia{
AudioOutObject & AudioOutObject::getAudioOutObject(){
static AudioOutObject o;
return o;
}
AudioOutObject::AudioOutObject()
:m_data( new PrivateData( *this ) ){
}
... | 4,572 | 1,697 |
/*
* While the "cubic_gadget" aims to provide a circuit for the statement:
* (E) x**3 + x + 5 = 35
* This gadget ("generic_cubic_gagdet") is more generic, and provides a circuit for the statement:
* (E') A*x**3 + B*x**2 + C*x + D = E
* where, A, B, C, D, and E are fields elements of the field we are working on (Fi... | 5,617 | 2,052 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=4 sw=4 et tw=99:
*
* 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/. */
#i... | 66,271 | 20,135 |
#ifndef SCREAM_FIELD_UPPER_BOUND_CHECK_HPP
#define SCREAM_FIELD_UPPER_BOUND_CHECK_HPP
#include "share/field/field_property_checks/field_within_interval_check.hpp"
#include "ekat/util/ekat_math_utils.hpp"
namespace scream
{
// This field property check returns true if all data in a given field are
// bounded above b... | 1,599 | 476 |
/*
A majority element in an array arr of size n is an
element that appears more than n/2 times.
Example:
N = 9, arr = {1, 2, 2, 2, 4, 2, 2, 1, 5}
Majority Element = 2 as count[2] = 5 which is greater
than n/2 i.e 4
*/
#include<bits/stdc++.h>
using namespace std;
int checkMajorityElement(int arr[], int N)
{
map<i... | 1,155 | 483 |
#include <iostream>
#include <string>
#include <Windows.h>
#include <processenv.h>
#include <algorithm>
#include <ranges>
int main(int argc, char** argv) {
if (argc < 2) {
std::cout << "insufficient args\n";
}
std::string const arg{argv[1]};
std::string env_path{};
env_path.reserve(2048);
... | 1,651 | 560 |
#include "tools.hpp"
extern GLOB_VARS globVar;
bool isDeviceSuitable(VkPhysicalDevice device)
{
QueueFamilyIndices indices = findQueueFamilies(device);
bool indiceComplete = indices.graphicsFamilyFound && indices.presentFamilyFound;
bool extensionSupport = checkDeviceExtensionSupport(device);
bool swa... | 14,808 | 5,071 |
#include <bits/stdc++.h>
using namespace std;
#define forall(i,a,b) for(int i=a;i<b;i++)
#define miN(a,b) ( (a) < (b) ? (a) : (b))
#define maX(a,b) ( (a) > (b) ? (a) : (b))
#define ll long long int
#define llu long long unsigned
#define mod 1000000007
struct in... | 3,799 | 1,446 |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.
//
#include "stdafx.h"
// <toplevel>
#include <string>
#include <vector>
#include <speechapi_cxx.h>
using namespace std;
using namespace Microsoft::CognitiveSer... | 4,982 | 1,447 |
#include <gtest/gtest.h>
#include <Serialize/BsonSerializer.h>
using namespace EasyCpp;
namespace EasyCppTest
{
TEST(BsonSerializer, BuildDocument)
{
Bundle b;
b.set("hello", "world");
Serialize::BsonSerializer bson;
auto result = bson.serialize(b);
ASSERT_EQ(result.size(), 22);
ASSERT_EQ(result, std::s... | 864 | 431 |
#include "bits/stdc++.h"
using namespace std;
# define MOD 1000000007
int main()
{
int i,j,k,l,m,n,r=0,c=0,ans=0;
scanf("%d %d",&n,&m);
char a[20][20];
for(i=0;i<n;i++){
for(j=0;j<m;j++){
scanf(" %c",&a[i][j]);
}
}
for (int x = 1; x <= n; x++) {
for (int y = 1;y <= m; y++){
int r =... | 1,330 | 585 |
#include <memory>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <tsduck/tsduck.h>
#include "ring_file_sink.hh"
#include "service_recorder.hh"
#include "test_helper.hh"
namespace {
constexpr size_t kNumBuffers = 2;
constexpr size_t kNumChunks = 2;
constexpr size_t kChunkSize = RingFileSink::kBufferSize ... | 33,709 | 12,516 |
#include "./ll1_definition_analyzer.h"
#include "./ll1_expression_analyzer.h"
#include "./ll1_statement_analyzer.h"
namespace vegetable_script {
bool Ll1DefinitionAnalyzer::Parse(Lexer* lexer, Definition::Ptr* definition, Exception* exception) {
return ParseDefinition(lexer, definition, exception);
}
boo... | 3,484 | 1,055 |
#include <iostream>
#include <algorithm>
#include <iterator>
#include <vector>
using namespace std;
#define N 111 // upper bound on n and m
int A[N];
int B[N];
int f[N][N];
vector<int> res;
//first we're going to create a table which calculates the length of the Largest Common Subsequence which is done in the main() ... | 1,643 | 601 |
#ifndef MINSK_ANALYSIS_BINDING_NODES_EXPRESSIONS_UNARY_KIND_HPP
#define MINSK_ANALYSIS_BINDING_NODES_EXPRESSIONS_UNARY_KIND_HPP
namespace minsk::analysis::binding {
enum class bound_unary_operator_kind {
identity,
negation,
logical_negation,
bitwise_negation,
};
}
#endif // MINSK_ANALYSIS_BINDING_NODES_EXPR... | 343 | 156 |
/*
* JBoss, Home of Professional Open Source
* Copyright 2011, Red Hat, Inc., and others contributors as indicated
* by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishin... | 13,694 | 5,698 |
/*******************************************************************************
* Copyright (C) 2004-2011 Intel 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:
*
* - Redistribut... | 5,384 | 2,208 |
#include <DB/Storages/MergeTree/SimpleMergeSelector.h>
#include <DB/Common/interpolate.h>
#include <cmath>
namespace DB
{
namespace
{
/** Estimates best set of parts to merge within passed alternatives.
*/
struct Estimator
{
using Iterator = SimpleMergeSelector::PartsInPartition::const_iterator;
void consider... | 4,066 | 1,570 |
// Copyright Carl Philipp Reh 2006 - 2019.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SGE_PLUGIN_DECLARE_ITERATOR_HPP_INCLUDED
#define SGE_PLUGIN_DECLARE_ITERATOR_HPP_INCLUDED
... | 571 | 236 |
#include<cstdio>
#include<string>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<stack>
#define ll long long
#define read(a) scanf("%d",&a);
using namespace std;
char s[1010];
int main(){
freopen("test.txt... | 788 | 432 |
#ifdef __cplusplus
extern "C" {
#endif
const char SO_FILE_VERSION[] __attribute__((section(".bugly_version"))) = "<1.1.0>";
#ifdef __cplusplus
}
#endif
#include <stdlib.h>
#include <string.h>
#include <jni.h>
#include <stdio.h>
#include <dirent.h>
#include "protector.h"
#include <sstream>
#include <sys/types.h>
#inc... | 4,366 | 1,745 |
#include <QSerialPortInfo>
#include <QMessageBox>
#include "lib-main.h"
/* Implementations of GUI functions from lib-main.h */
namespace Xn {
void LibMain::guiInit() {
QObject::connect(form.ui.cb_interface_type, SIGNAL(currentIndexChanged(int)), this,
SLOT(cb_interface_type_changed(int)));
QObject::connect(... | 5,623 | 2,210 |
/*
* Copyright (C) 2022 Nils Asmussen, Barkhausen Institut
*
* This file is part of M3 (Microkernel-based SysteM for Heterogeneous Manycores).
*
* M3 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Founda... | 4,320 | 1,626 |
/*
* TranslationObject.hpp
*
* Created on: Apr 20, 2017
* Author: scsmdk
*/
#ifndef TRANSLATIONOBJECT_HPP_
#define TRANSLATIONOBJECT_HPP_
#include <vector>
#include <iostream>
#include "Coordinates.hpp"
#include "Mesh.hpp"
#include "pugixml.hpp"
namespace TwoDLib {
struct Translation {
double _v;
do... | 1,730 | 588 |
// Copyright (c) 2018 Deyuan Guo. All rights reserved.
// This file is subject to the terms and conditions defined
// in file 'LICENSE' in this source code package.
#include <iostream>
#include <random>
// Engine: std::random_device
// Algorithm: True-RNG if entropy() is non-zero, pseudo-RNG otherwise
// Note: Non-de... | 4,135 | 1,596 |
/*
* thread_Locality_info
*
* Purpose: A profiling agent than can be plugged to JVM to monitor field
* accesses and modifications by threads.
*
* Usage: Please refer to the included Makefile for compilation information,
* and for a sample usage case, refer to run_tests_with_agent.sh
*
* Author: Noshe... | 27,641 | 8,074 |
/**********************************************************************
* LeechCraft - modular cross-platform feature rich internet client.
* Copyright (C) 2006-2014 Georg Rudoy
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE... | 1,972 | 743 |
#include "RangedPhysicalDamageCalculator.hpp"
RangedPhysicalDamageCalculator::RangedPhysicalDamageCalculator(const PhaseOfMoonType new_pom)
: PhysicalDamageCalculator(AttackType::ATTACK_TYPE_RANGED, new_pom)
{
}
int RangedPhysicalDamageCalculator::get_statistic_based_damage_modifier(CreaturePtr attacking_creature)
{
... | 752 | 285 |
#pragma once
#include "flexui/Layout/LayoutObject.hpp"
namespace flexui {
class Text;
class TextLayoutObject : public LayoutObject {
public:
TextLayoutObject(Text* text);
~TextLayoutObject();
Text* getTextNode() const { return m_Text; }
private:
Text* m_Text;
};
}
| 285 | 105 |
#ifndef LEETCODE_475_HPP
#define LEETCODE_475_HPP
#include <iostream>
#include <queue>
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <numeric>
#include <stack>
#include <string>
using namespace std;
class Solution {
public:
int findRadius(vector... | 967 | 311 |