text string | size int64 | token_count int64 |
|---|---|---|
#pragma warning(disable:4996)
#include <stdio.h>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int rope;
int weight[100000];
int result[100000];
int n = 1;
int max;
scanf("%d", &rope);
for (int i = 0; i < rope; i++) {
scanf("%d", &weight[i]);
}
sort(wei... | 526 | 253 |
#include <Parsers/MySQL/ASTDeclareColumn.h>
#include <Parsers/ASTIdentifier.h>
#include <Parsers/ParserDataType.h>
#include <Parsers/ExpressionListParsers.h>
#include <Parsers/ExpressionElementParsers.h>
#include <Parsers/MySQL/ASTDeclareOption.h>
#include <Parsers/MySQL/ASTDeclareReference.h>
#include <Parsers/MySQL/... | 4,149 | 1,266 |
// ReSharper disable All
#include <AIO/Search/SearchEngine.hpp>
#include <AIO/Network/FakeNetwork.hpp>
#include <AIO/Network/TrtNetwork.hpp>
#include <AIO/Utils/Utils.hpp>
#include <effolkronium/random.hpp>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <random>
#include <spdlog/spdlog.h>
namesp... | 12,236 | 3,799 |
/**
* Copyright © 2020 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | 13,666 | 3,864 |
#ifndef MPLLIBS_METAMONAD_TYPECLASS_HPP
#define MPLLIBS_METAMONAD_TYPECLASS_HPP
// Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
// 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 <mplli... | 467 | 199 |
#include "astronomy/time_scales.hpp"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "quantities/astronomy.hpp"
#include "testing_utilities/almost_equals.hpp"
#include "testing_utilities/approximate_quantity.hpp"
#include "testing_utilities/is_near.hpp"
#include "testing_utilities/numerics.hpp"
namespace... | 20,317 | 10,925 |
#include <iostream>
#include "include/CCustomEngineListener.h"
#include <TDEngine2.h>
#include <thread>
#if defined (TDE2_USE_WIN32PLATFORM)
#pragma comment(lib, "TDEngine2.lib")
#endif
using namespace TDEngine2;
int main(int argc, char** argv)
{
E_RESULT_CODE result = RC_OK;
IEngineCoreBuilder* pEngineCoreBui... | 744 | 271 |
#ifndef CONFIGURATION_FILES_PREPARER
#define CONFIGURATION_FILES_PREPARER
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include "Chain.h"
#include "MorphologicalDictionary.h"
#include "DisambiguatorSettingsRus.h"
#include "FileReader.h"
#include "FileWrite... | 14,440 | 4,224 |
/*========================== begin_copyright_notice ============================
Copyright (c) 2017-2021 Intel Corporation
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, inc... | 4,304 | 1,289 |
// Eggs.SD-6
//
// Copyright Agustin K-ballo Berge, Fusion Fenix 2015
//
// 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 <iterator>
void test_make_reverse_iterator() {
std::reverse_iterator<int*> p{std:... | 404 | 158 |
#include "amuse/AudioGroup.hpp"
#include <regex>
#include <sstream>
#include "amuse/AudioGroupData.hpp"
#include <athena/FileReader.hpp>
#include <fmt/ostream.h>
using namespace std::literals;
namespace amuse {
void AudioGroup::assign(const AudioGroupData& data) {
m_pool = AudioGroupPool::CreateAudioGroupPool(... | 12,004 | 4,269 |
// Copyright Mark H. Spatz 2021-present
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// https://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <array>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <wmr/vendor_hid_interface.hpp>
... | 3,141 | 1,142 |
#include <iostream>
#include <set>
using namespace std;
int main() {
set<int> numbers;
int Q;
cin >> Q;
while(Q--) {
int type, x;
cin >> type >> x;
if(1 == type)
numbers.insert(x);
if(2 == type)
numbers.erase(x);
if(3 == type) {
... | 415 | 151 |
#pragma once
#include "Forward.hh"
struct SDK::ClientModeShared {
PAD(0x28);
int m_nRootSize[2];
}; | 104 | 47 |
// This file is part of the QuantumGate project. For copyright and
// licensing information refer to the license file(s) in the project root.
#include "pch.h"
#include "IPAddress.h"
#include "..\Common\Endian.h"
#include <regex>
namespace QuantumGate::Implementation::Network
{
bool IPAddress::TryParse(const WChar* ... | 4,886 | 2,118 |
/* Copyright of Ashikul Hosen
Solution of C++ Primer ex 12.33 */
#include "StrBlob.h"
#include "StrBlobPtr.h"
#include "ConstStrBlobPtr.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::... | 1,267 | 485 |
#include <iostream>
using namespace std;
int main() {
double num01, sqr;
cout << "Calculador de sqrt" << endl;
cout << "Digite um número: ";
cin >> num01;
sqr = num01 * num01;
cout << "O resultado é: " << sqr << endl;
}
// This is a commentary
| 274 | 103 |
////////////////////////////////////////////////////////////////////////////
// Module : agent_manager.cpp
// Created : 24.05.2004
// Modified : 24.05.2004
// Author : Dmitriy Iassenev
// Description : Agent manager
////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
... | 3,129 | 1,172 |
#include "Test_HVACController.h"
Test_HVACController::Test_HVACController(QObject *parent) : QObject(parent)
{
}
| 115 | 46 |
// Copyright 2019 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 "base/test/bind.h"
#include <string>
#include "base/bind.h"
#include "base/callback.h"
#include "base/location.h"
#include "testing/gtest/inclu... | 2,086 | 622 |
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2020-2021, The Monero Project.
// Copyright (c) 2012 thomasv@gitorious
#include "ColorScheme.h"
#include <QDebug>
bool ColorScheme::darkScheme = false;
ColorSchemeItem ColorScheme::GREEN = ColorSchemeItem("#117c11", "#8af296");
ColorSchemeItem ColorScheme::Y... | 1,511 | 546 |
// Copyright 2018 Phyronnaz
#include "VoxelWorldEditor.h"
#include "VoxelInvokerComponent.h"
#include "VoxelWorld.h"
#include "Components/CapsuleComponent.h"
#include "LevelEditorViewport.h"
#include "Editor.h"
#include "VoxelWorldDetails.h"
AVoxelWorldEditor::AVoxelWorldEditor()
{
PrimaryActorTick.bCanEverTick = tr... | 1,534 | 582 |
#ifndef BIGVECTOR_H
#define BIGVECTOR_H
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <omp.h>
#include <thread>
#include "core/filesystem.hpp"
#include "core/partition.hpp"
template <typename T>
class BigVector {
std::string path;
bool is_open;
bool in_memory = false;
... | 4,489 | 2,065 |
/*!
* \copyright Copyright (c) 2014-2019 Governikus GmbH & Co. KG, Germany
*/
#include "CommandApdu.h"
#include <QLoggingCategory>
#include <QtEndian>
using namespace governikus;
Q_DECLARE_LOGGING_CATEGORY(card)
CommandApdu::CommandApdu(const QByteArray& pBuffer)
: Apdu(pBuffer)
{
}
bool CommandApdu::isExtend... | 3,992 | 1,733 |
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include <stdio.h>
//#include "leveldb/expiry.h"
#include "db/dbformat.h"
#include "db/version_set.h"
#... | 9,656 | 3,108 |
#include "goinghome_remote.h"
//debug 확인용
#define DEBUG
//move_base action_client
//amcl x,y 좌표
//static double amcl_x,amcl_y;
//orientation
//static double amcl_w;
//static double arg_x,arg_y;
//sector 영역 구분
bool nevi_sev_callback(nevi_srv::Request &req,nevi_srv::Response &res){
//action_clinet 객체 생성 "move_b... | 2,560 | 1,312 |
/*
* Copyright (C) 2009 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... | 14,437 | 4,799 |
#include <boost/config/warning_disable.hpp>
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <iostream>
#include <string>
#include <fstream>
#include "grammar/CspProblemGrammar.h"
#include "utils/utils.h"
#include "csp_problem/CspProblem.h"
#include "solvers/Backtrac... | 2,294 | 756 |
#include "stdio.h"
#include <string.h>
#include <vector>
#include <stdlib.h>
#include <conio.h>
#include <iostream>
#include <istream>
#include <fstream>
#include <sstream>
#include "Player.h"
#include "MilitarGround.h"
#include "World.h"
#include "Item.h"
using namespace std;
/*Inicio Zork*/
Player* player = nullptr;... | 1,253 | 575 |
/*=============================================================================
Spirit v1.6.0
Copyright (c) 2001-2003 Joel de Guzman
http://spirit.sourceforge.net/
Permission to copy, use, modify, sell and distribute this software is
granted provided this copyright notice appears in all copie... | 12,154 | 3,804 |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... | 192,492 | 160,449 |
#include "Product.h"
#include <iostream>
#include <string>
using namespace std;
template <class T>
Product<T>::Product() {}
template<class T>
Product<T>::Product(T i, string n, float p, string c, T si, T q, bool s) {
id = i;
name = n;
price = p;
category = c;
sellerId = si;
quantity = q;
state = s;
}
templa... | 2,200 | 860 |
#include "Delphi/Syntax/DelphiCaseElseClauseSyntax.hpp"
#include <cassert>
#include "interlinck/Core/Syntax/ISyntaxToken.hpp"
#include "interlinck/Core/Syntax/SyntaxKinds.hpp"
#include "Core/Support/SyntaxFactory.hpp"
namespace interlinck::Delphi::Syntax
{
using Core::Support::SyntaxFactory;
using namespace Core::Syn... | 1,694 | 458 |
#pragma once
#include "shiva/shivadef.hpp"
#include "shiva/DirectoryTree.hpp"
#include "../../../src/editor/windows/AssetGui.hpp"
#include "ari/en/gui/DockableWindow.hpp"
#include "DockWindow.hpp"
namespace ari {
class Button;
class Dock;
class DockSpace;
}
namespace shiva
{
class AssetGui;
cla... | 748 | 286 |
#include "../../common/resource/CResourceLock.h"
#include "../../common/CException.h"
#include "../../common/sphereproto.h"
#include "../chars/CChar.h"
#include "../clients/CClient.h"
#include "../CServer.h"
#include "../CWorldMap.h"
#include "../triggers.h"
#include "CItemMulti.h"
#include "CItemShip.h"
#include "CIte... | 96,411 | 33,312 |
#include "xmltags.h"
#include "NetworkArchitecture.h"
#include "Parameter.h"
#include "Chain.h"
#include "Link.h"
#include "Network.h"
#include "Parameter.h"
#include "ParameterValues.h"
#include "Exceptions.h"
#include "CNTKWrapperInternals.h"
Chain::Chain()
{
m_chainLinks = std::vector<Link*>();
}
Chain::~Chain(... | 1,002 | 402 |
#include <cstdio>
#include <cstdlib>
#include <cstring>
/************************************************
This is for post processing RAM or VRAM dump
taken from emulator or reconstructed from picture,
of running M68k Opcode Sizes Test ROM.
The reason is that some of opcodes are skipped,
and some of them are reporte... | 5,259 | 2,636 |
// Filter.C -- hacked version (by BGG) for RTcmix from Perry/Gary's STK
// original head/comment:
/***************************************************/
/*! \class Filter
\brief STK filter class.
This class implements a generic structure which
can be used to create a wide range of filters.
It can func... | 5,417 | 2,329 |
#include "ZFImpl_sys_Qt_ZFUIKit_impl.h"
#include "ZFUIKit/protocol/ZFProtocolZFUITextEdit.h"
#if ZF_ENV_sys_Qt
#include <QLineEdit>
#include <QEvent>
#include <QKeyEvent>
#include <QGraphicsDropShadowEffect>
#include <QGraphicsProxyWidget>
class _ZFP_ZFUITextEditImpl_sys_Qt_TextEdit : public QLineEdit
{
Q_OBJECT... | 13,807 | 4,284 |
#include <bits/stdc++.h>
using namespace std;
template<typename T>
struct Edge {
public:
T weight, capacity;
Edge(
T weight=1, T capacity=1
)
: weight(weight),
capacity(capacity)
{}
};
template<typename T>
struct Node {};
template<typename T>
struct Graph {
public:
Graph(int ... | 2,161 | 974 |
#include <iostream>
#include <conio.h>
#include <string.h>
#include <fstream>
#include <list>
#include <vector>
#include <stack>
#include <string>
#include <set>
#include <queue>
#include <stdlib.h>
#include <time.h>
//clockwise=1
//anticlockwise=0
using namespace std;
class Gnode {
private:
i... | 23,130 | 13,552 |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: TMPro.TMP_TextUtilities
#include "T... | 2,862 | 953 |
#ifndef NODE_CLUTTER_TEXT_H_
#define NODE_CLUTTER_TEXT_H_
#include <clutter/clutter.h>
#include <v8.h>
#include <node.h>
namespace clutter {
class Text : public Actor {
public:
static void Initialize(v8::Handle<v8::Object> target);
protected:
Text();
static v8::Handle<v8::Value> New(const v8::Arguments& args);
... | 740 | 284 |
/**
* Connected Vision - https://github.com/ConnectedVision
* MIT License
*/
#ifndef OutputPin_PNG_code
#define OutputPin_PNG_code
#include "OutputPin_PNG.h"
#include <HTTP/HTTPTools.h>
namespace ConnectedVision {
namespace OutputPins {
template <class TDataClass>
OutputPin_PNG<TDataClass>::OutputPin_PNG(ConnectedV... | 1,716 | 615 |
#include "AddPersonDialog.hpp"
#include "ui_AddPersonDialog.h"
AddPersonDialog::AddPersonDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AddPersonDialog)
{
ui->setupUi(this);
}
AddPersonDialog::~AddPersonDialog()
{
delete ui;
}
bool AddPersonDialog::isPersonCreated() const
{
... | 1,255 | 413 |
/*
* Copyright (c) 2003-2006, National ICT Australia (NICTA)
*/
/*
* Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder).
* All rights reserved.
*
* 1. Redistribution and use of OKL4 (Software) in source and binary
* forms, with or without modification, are permitted provided that the
* following condi... | 18,600 | 6,016 |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "backend/protobuf/query_responses/proto_error_query_response.hpp"
#include "utils/variant_deserializer.hpp"
namespace shared_model {
namespace proto {
ErrorQueryResponse::ErrorQueryResponse(
ir... | 1,494 | 385 |
#include "pch.h"
#include "../include/state/state.h"
#include "../include/application.h"
Empaerior::State::State() = default;
| 133 | 54 |
/****************************************************************/
/* */
/* SecurityPage.cpp */
/* */
/* Implementation of the CSecurityPage class. */
/* This class is a part of the FTP Server. */
/* */
/* Programmed by xingyun86 */
/* ... | 12,226 | 5,097 |
/*
* Copyright (c) 2017-2018 CelePixel Technology Co. Ltd. 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 r... | 2,642 | 1,126 |
//
// Created by Vitali Kurlovich on 12/16/15.
//
#ifndef RMVECTORMATH_TMATRIX4X3_OPERATOR_HPP
#define RMVECTORMATH_TMATRIX4X3_OPERATOR_HPP
#include "../TMatrix4x3_def.hpp"
namespace rmmath {
namespace matrix {
template<typename T>
inline bool operator==(const TMatrix4x3 <T> &a, const TMatrix4... | 1,065 | 436 |
/*
* Copyright 2010 Erik Gilling
*
* 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 ... | 1,127 | 383 |
/*
The MIT License (MIT)
Copyright (c) 2012-2021 Ivan Gagis <igagis@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use,... | 6,420 | 2,056 |
#include "apecs.hpp"
#include <gtest/gtest.h>
TEST(sparse_set, set_and_get)
{
apx::sparse_set<int> set;
set.insert(2, 5);
ASSERT_TRUE(set.has(2));
ASSERT_EQ(set[2], 5);
}
TEST(sparse_set, erase)
{
apx::sparse_set<int> set;
set.insert(2, 5);
ASSERT_TRUE(set.has(2));
set.erase(2);
... | 551 | 267 |
/**
* \file imperative/src/impl/ops/utility.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
... | 18,186 | 6,349 |
#pragma once
#include "headers.hpp"
class Player : public Obstacle
{
public:
bool active;
std::string nickname;
std::string ID;
sf::IpAddress address;
unsigned short port;
unsigned short slot;
float crosshair_distance;
int speed;
std::array<I... | 557 | 166 |
// -*- Mode: c++ -*-
#pragma once
#include "karabiner_virtual_hid_device.hpp"
#include <IOKit/IOKitLib.h>
namespace pqrs {
class karabiner_virtual_hid_device_methods final {
public:
// VirtualHIDKeyboard
static IOReturn initialize_virtual_hid_keyboard(mach_port_t connection, const karabiner_virtual_hid_device::... | 3,919 | 1,114 |
/**
** Copyright (c) 2014 Illumina, Inc.
**
** This file is part of Illumina's Enhanced Artificial Genome Engine (EAGLE),
** covered by the "BSD 2-Clause License" (see accompanying LICENSE file)
**
** \description Declaration of the skeleton of all c++ programs.
**
** \author Mauricio Varea
**/
#ifndef EAGLE_... | 5,892 | 1,858 |
class cnstrct {
file = "support\modules\rmm_cnstrct";
class functions {
class create {};
class handler {};
class open {};
class refresh {};
class sell {};
class update {};
};
}; | 192 | 69 |
//===----------------------------------------------------------------------===//
//
// 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
//
//===---------------------------... | 1,498 | 540 |
#ifndef ACE_TIMEPROBE_T_CPP
#define ACE_TIMEPROBE_T_CPP
#include "ace/config-all.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if defined (ACE_COMPILE_TIMEPROBES)
#include "ace/Timeprobe.h"
#include "ace/High_Res_Timer.h"
#include "ace/OS_NS_string.h"
ACE_... | 13,223 | 4,893 |
/* Copyright 2016 The TensorFlow 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 a... | 7,000 | 2,350 |
#ifndef SPLIT_FLUXES_HPP
#define SPLIT_FLUXES_HPP
#include "point.hpp"
void flux_Gyn(codi::RealReverse Gyn[4], codi::RealReverse nx, codi::RealReverse ny, codi::RealReverse u1, codi::RealReverse u2, codi::RealReverse rho, codi::RealReverse pr);
void flux_Gyp(codi::RealReverse Gyp[4], codi::RealReverse nx, codi::Real... | 1,124 | 469 |
#include "Axes.h"
Axes::Axes(void){
anzVertex = 4;
anzIndex = 6;
indices = AxeIndices;
vertices = AxeVertices;
colors = AxeColor;
}
void Axes::render(){
glBindVertexArray(vao);
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glDrawElements(GL_LINES,6,GL_UNSIGNED_INT,indices);
gl... | 435 | 187 |
#include "models/filename.h"
#include <QCollator>
#include <QJSEngine>
#include <QRegularExpression>
#include <QSettings>
#include <algorithm>
#include "filename/ast/filename-node-variable.h"
#include "filename/ast-filename.h"
#include "filename/filename-cache.h"
#include "filename/filename-execution-visitor.h"
#includ... | 13,540 | 4,996 |
// https://www.hackerrank.com/challenges/dijkstrashortreach
#include "common/graph/graph_ei.h"
#include "common/graph/graph_ei/distance_positive_cost.h"
#include "common/stl/base.h"
int main_dijkstra_shortest_reach_2() {
unsigned T, max_cost = -1u;
cin >> T;
for (unsigned it = 0; it < T; ++it) {
unsigned n,... | 659 | 279 |
#include <ros/ros.h>
#include <simple_velocity_controller/controller_node.h>
#include <tuw_nav_msgs/ControllerState.h>
#include <tf/transform_datatypes.h>
#define NSEC_2_SECS(A) ((float)A / 1000000000.0)
int main(int argc, char** argv)
{
std::string name("pid_controller");
if (argc >= 2)
{
name = argv[1]... | 4,428 | 1,795 |
#include "YamlParser.h"
YamlParser::YamlParser()
{
}
YamlParser::~YamlParser()
{
}
void YamlParser::loadLaPredefinedPositions(std::string file)
{
std::cout << "YamlParser.->Trying to parse file: " << file << std::endl;
nodeLaPredefined = YAML::LoadFile(file);
}
void YamlParser::loadRaPredefinedPositions(std... | 649 | 236 |
#include "LookWhereYoureGoing.h"
#include "Entity.h"
LookWhereYoureGoing::LookWhereYoureGoing(EntityActor* character)
:Align(character, nullptr)
{
}
bool LookWhereYoureGoing::getSteering(SteeringOutput* output)
{
EntityActor target;
m_pTarget = ⌖
auto velocity = vx::loadFloat4(&m_pCharacter->m_velocity)... | 748 | 313 |
#include "rtt_interface.h"
#include <string.h>
#include <entry.h>
#include "AP_Show.h"
#include "AP_Buffer.h"
extern vel_target vel;
extern AP_Show* show;
extern AP_Buffer* buffer;
extern uint8_t key_value;
extern ap_t mav_data;
extern uint8_t mode_changed;
extern int8_t car_mode;
extern "C"{
char g... | 2,493 | 1,045 |
//
// Created by kaiser on 2020/4/18.
//
#include <iostream>
#include <string>
#include <utility>
int main() {
// 当基于范围的 for 循环被用于一个具有写时复制语义的(非
// const)对象时, 它可能会通过(隐式)调用非 const 的 begin()
// 成员函数触发深层复制
// 如果想要避免这种行为(比如循环实际上不会修改这个对象), 可以使用
// std::as_const
// 假设是写时复制的字符串
std::string cow_string{"str"};
... | 463 | 297 |
//
// main.cpp
// 114_flatten
//
// Created by Bella Yang on 2019/10/11.
// Copyright © 2019 Bella Yang. All rights reserved.
//
#include <iostream>
#include <vector>
#include <stack>
#include <queue>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int... | 2,095 | 700 |
/*
* Original work: Copyright (c) 2014, Oculus VR, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* RakNet License.txt file in the licenses directory of this source tree. An additional grant
* of patent rights can be found in the RakNet Patents.txt file... | 20,363 | 7,563 |
#include "staticcube.h"
namespace edan {
namespace graphics{
StaticCube::StaticCube(float x, float y, float z, float sideLength, const math::vec4 &color, Shader &shader)
: Renderable3D(math::vec3(x, y, 0), sideLength, color), m_Shader(shader)
{
m_VertexArray = new VertexArray();
GLfloat vertices[] =
... | 1,617 | 939 |
// Problem Code: 228A
#include <iostream>
#include <vector>
#include <set>
using namespace std;
int is_your_horseshoe_on_the_other_hoof(vector<int>& s) {
set<int> seen(s.begin(), s.end());
return s.size() - seen.size();
}
int main() {
vector<int> s(4);
for (int& x: s)
cin >> x;
cout << is_your_horseshoe_on_... | 351 | 161 |
/*
Copyright (C) 2018 Quaternion Risk Management Ltd
All rights reserved.
This file is part of ORE, a free-software/open-source library
for transparent pricing and risk analysis - http://opensourcerisk.org
ORE is free software: you can redistribute it and/or modify it
under the terms of the Modified BSD License... | 5,334 | 1,503 |
#pragma once
#include <string>
namespace easy2d
{
using string = std::string;
} // -- easy2d
| 98 | 35 |
// Copyright (c) 2018 Hartmut Kaiser
//
// 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)
// Fixing #509: Empty list defined inside Phylanx function has an issue
#include <phylanx/phylanx.hpp>
#include <hpx/h... | 1,517 | 598 |
/*
Description :
Given a pointer/ reference to the node which is
to be deleted from the linked list of N number nodes.
The task is to delete the node. Pointer/ reference to head node is not given.
*/
#include <bitset/stdc++.h>
using namespace std;
struct Node
{
int data;... | 2,678 | 851 |
/*
Copyright (c) 2014-2016, Arvid Norberg
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and ... | 4,803 | 1,845 |
#include "ApprovalTests.v.10.0.0.hpp" | 37 | 20 |
/**
* \file src/opr/test/dnn/local.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS"... | 6,800 | 2,637 |
#pragma once
#include <immintrin.h>
struct v4sf;
struct v8sf;
struct v2df;
struct v4df;
struct v4sf {
typedef float _v4sf __attribute__((vector_size(16))) __attribute__((aligned(16)));
_v4sf val;
static int getVectorLength() {
return 4;
}
v4sf(const v4sf & rhs) : val(rhs.val) {}
v4s... | 16,133 | 7,036 |
/******************************************************************************
* Copyright (c) 2021, Xilinx, 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. Redistributio... | 9,611 | 2,896 |
#define PROBLEM "https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_B"
#include <bits/stdc++.h>
using namespace std;
#include "utility/fast-pow.hpp"
const long long MOD = 1e9 + 7;
int main() {
long long M, N;
cin >> M >> N;
cout << fast_pow(M, N, MOD) << '\n';
} | 282 | 131 |
//-----------------------------------------------------------------------------
// boost variant/detail/std_hash.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2018-2019 Ant... | 1,575 | 569 |
#if 0
// Call from DrawableObjectAndValues::Draw()
DrawableObjectAndValues::Draw()
{
...
DrawingCanvas::RawPixels rawPixels = drawingCanvas.GetRawPixels();
std::vector<Edge> edges = { {0,1},{1,2},{2,3},{3,4},{4,5},{5,6},{6,7},{7,0}, {8,9},{9,10},{10,11},{11,8}, {12,13},{13,14},{14,15},{15,12} };... | 15,470 | 5,250 |
//============================================================================
// Name :
// Author : Avi
// Revision : $Revision: #5 $
//
// Copyright 2009-2017 ECMWF.
// This software is licensed under the terms of the Apache Licence version 2.0
// which can be obtained at http://www.apache.org/licenses... | 3,770 | 1,331 |
template <class B>
force_inline
void AString<B>::Insert(int pos, const char *s)
{
Insert(pos, s, strlen__(s));
}
template <class B>
void AString<B>::Cat(int c, int count)
{
tchar *s = B::Insert(GetLength(), count, NULL);
while(count--)
*s++ = c;
}
template <class B>
force_inline
void AString<B>::Cat(const tchar ... | 6,708 | 3,081 |
#include "DX9ShareContainer.hpp"
#include <d3dx9.h>
namespace dx9 {
namespace resource {
bool DX9ShareContainer::isResCreated = false;
size_t DX9ShareContainer::topLayerPos = 0;
LogManager* DX9ShareContainer::log;
CComPtr<IDirect3D9> DX9ShareContainer::d3d9;
CComPtr<IDirect3D... | 1,167 | 582 |
#include "MengeCore/PluginEngine/CorePluginEngine.h"
#include "MengeCore/Agents/AgentGenerators/AgentGeneratorDatabase.h"
#include "MengeCore/Agents/Elevations/ElevationDatabase.h"
#include "MengeCore/Agents/Events/EventEffectDB.h"
#include "MengeCore/Agents/Events/EventTargetDB.h"
#include "MengeCore/Agents/Events/Ev... | 6,803 | 1,998 |
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_image.h>
#include <cstdlib>
#include <ctime>
#include <map>
#include <fstream>
#include <iostream>
#include "Simulation.hpp"
#include "speed.hpp"
Simulation::Simulation(Settings const& settings): m_settings(settings)
{
srand(time(0));
... | 7,274 | 2,603 |
/**
* \file WdbeMtpModbscbuZynq_ip_AXI_v1_0.cpp
* Wdbe operation processor - add pin substitute signals (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 28 Nov 2020
*/
// IP header --- ABOVE
#ifdef WDBECMBD
#include <Wdbecmbd... | 2,566 | 1,187 |
// Copyright 2008 by BBN Technologies Corp.
// All Rights Reserved.
#include "Generic/common/leak_detection.h"
#include "Generic/common/UTF8InputStream.h"
#include "Generic/common/ParamReader.h"
#include <iostream>
using namespace std;
int main (int argc, char *argv[]) {
if (argc != 2) {
cerr ... | 555 | 212 |
#ifndef _ARINDEXBUFFER_HPP
#define _ARINDEXBUFFER_HPP
#include "common.hpp"
#include "RenderResource.hpp"
#include "RenderDefinitions.hpp"
#ifndef GL_GLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES
#endif
#include <GLFW/glfw3.h>
namespace ar
{
class IndexBuffer : public RenderResource
{
public:
virtual ~IndexBuffer(... | 1,714 | 636 |
#include "sampler.h"
#include "types.h"
namespace opencl {
#ifndef CL_VERSION_2_0
// /* Sampler APIs */
// extern CL_API_ENTRY cl_sampler CL_API_CALL
// clCreateSampler(cl_context /* context */,
// cl_bool /* normalized_coords */,
// cl_addressing_mode /* addressi... | 6,209 | 2,320 |
#include "MapInfo.h"
using namespace BWAPI;
using namespace Boris;
namespace Boris
{
void MapInfo::onStart()
{
}
} | 120 | 48 |
/*
* chronotest.cpp
*
* Created on: 24 марта 2017 г.
* Author: dmitry
*/
#include <iostream>
#include <chrono>
#include <thread>
#include <ratio>
#include <ctime>
#include "chronotest.h"
namespace chronotest {
//duration test
void test01(){
std::chrono::duration<int, std::ratio<60,1>> dminutes {1};
... | 3,204 | 1,252 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | 6,226 | 1,887 |
// Copyright (c) 2010-2011 Zipline Games, Inc. All Rights Reserved.
// http://getmoai.com
#include "pch.h"
#include <Box2D/Box2D.h>
#include <moaicore/MOAISim.h>
#include <moaicore/MOAIBox2DArbiter.h>
#include <moaicore/MOAIBox2DBody.h>
#include <moaicore/MOAIBox2DPrismaticJoint.h>
#include <moaicore/MOAIBox2DWorld.h>... | 11,752 | 4,598 |