text string | size int64 | token_count int64 |
|---|---|---|
#include <ros/ros.h>
#include <message_filters/subscriber.h>
#include <message_filters/synchronizer.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <dji_sdk/GlobalPosition.h>
#include <dji_sdk/LocalPosition.h>
#include <nav_msgs/Odometry.h>
#include <eigen3/Eigen/Dense>
#include "transform.h"
... | 3,381 | 1,312 |
/*
The MIT License
Copyright (c) 2015-2017 Albert Murienne
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | 8,085 | 2,780 |
#include "timereference.h"
#include <ctime>
#include "core/tickpoke.h"
#include "globalcontext.h"
#define INTERVAL 50
static int currentyear = 0;
static int currentmonth = 0;
static int currentday = 0;
TimeReference::TimeReference() {
global->getTickPoke()->startPoke(this, "TimeReference", INTERVAL, 0);
}
void ... | 1,080 | 372 |
#include<cassert>
int main()
{
try {
int x = 5;
int *py = &x;
throw py;
}
catch(int*) { }
catch(void*) { assert(0); }
return 0;
}
| 155 | 74 |
#include <string>
#include <iostream>
#include <sstream>
#include "Avapi/AvapiConnection.hpp"
#include "Avapi/TECHNICAL_INDICATOR/MIDPOINT.hpp"
using namespace std;
using namespace Avapi;
int main()
{
string lastHttpRequest = "";
AvapiConnection* avapi_connection;
try
{
avapi_connection =... | 2,192 | 698 |
// decl.C99\Error_class_forward_def_const_volatile9.hpp
// using singly defined class
// (C)2010 Kenneth Boyd, license: MIT.txt
class good_test;
const class good_test volatile;
class good_test {
int x_factor;
};
| 227 | 90 |
/*
* MapboxVectorTileParser_jni.cpp
* WhirlyGlobeLib
*
* Created by Steve Gifford on 5/25/16.
* Copyright 2011-2016 mousebird consulting
*
* 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 L... | 4,138 | 1,324 |
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
ex.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2011-04-28
Revision History:
--*/
#include<iostream>
#include "util/z3_exception.h"
class ex {
public:
virtual ~ex() {}
virtual char const * msg() const = 0;
};
class... | 1,050 | 407 |
#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker,"/stack:1024000000,1024000000")
#define db(x) cout<<(x)<<endl
#define pf(x) push_front(x)
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define ms(x,y) memset(x,y,sizeof x)
typedef long long LL;
const double pi=acos(-1),eps=1e-9;
const LL ... | 1,038 | 668 |
/*!
******************************************************************************
*
* \file
*
* \brief Header file providing RAJA sort declarations.
*
******************************************************************************
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
// ... | 4,183 | 1,353 |
#include "player.h"
#include <chrono>
#include <iostream>
#include <algorithm>
extern "C" {
#include <libavutil/time.h>
}
using std::string;
using std::unique_ptr;
using std::function;
using std::thread;
using std::chrono::milliseconds;
using std::this_thread::sleep_for;
using std::exception;
using std::cerr;
usi... | 4,061 | 1,748 |
/*
* ImageBackground.cpp
*
* Created on: 08.09.2014
* Author: baudenri
*/
#include "PolygonBackground.h"
#include <World/Scene.h>
#include <OgreMaterialManager.h>
#include <OgrePass.h>
#include <OgreRenderQueue.h>
#include <OgreAxisAlignedBox.h>
#include <OgreSceneNode.h>
#include <OgreTechnique.h>
#includ... | 2,730 | 999 |
/**********************************************************************
* Copyright (c) 2008-2014, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published ... | 4,453 | 1,881 |
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int nNum;
int nSize;
cin >> nNum;
nSize = (nNum <= 0) ? (abs(nNum) + 2) : nNum;
cout << nSize*(1+nNum)/2 << endl;
return 0;
} | 209 | 100 |
// 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 "quiche/spdy/core/spdy_pinnable_buffer_piece.h"
#include <new>
namespace spdy {
SpdyPinnableBufferPiece::SpdyPinnableBufferPiece()
: buffe... | 940 | 339 |
#ifndef __MOCKITOPP_HPP__
#define __MOCKITOPP_HPP__
#include "exceptions.hpp"
#include "matchers.hpp"
#include "mock_object.hpp"
#endif //__MOCKITOPP_HPP__
| 158 | 73 |
#include "system_details_to_json_converter.h"
#include <ArduinoJson.h>
namespace CDEM {
String SystemDetailsToJsonConverter::to_json_string(String ip, String mac, String libVersion, String pcbVersion) {
StaticJsonDocument<128> json;
json["ip"] = ip;
json["mac"] = mac;
json["lib-version"] = libVersio... | 446 | 151 |
#include "testing/testing.hpp"
#include "routing/base/astar_algorithm.hpp"
#include "routing/edge_estimator.hpp"
#include "routing/index_graph.hpp"
#include "routing/index_graph_serialization.hpp"
#include "routing/index_graph_starter.hpp"
#include "routing/vehicle_mask.hpp"
#include "routing/routing_tests/index_grap... | 20,448 | 7,881 |
#include "gameState.h"
#include <stdio.h>
/*
o gameState de cada fase possui
um cen�rio,
um conjunto de alienigenas(inimigos),
um conjunto de objetos (stuff) que podem ser lan�ados pelos inimigos ou pela nave principal
a nave principal
** ao passar a token init_cg
... | 11,564 | 3,468 |
// Copyright (C) 2020-2021 Jonathan Müller <jonathanmueller.dev@gmail.com>
// This file is subject to the license terms in the LICENSE file
// found in the top-level directory of this distribution.
#ifndef LEXY_INPUT_RANGE_INPUT_HPP_INCLUDED
#define LEXY_INPUT_RANGE_INPUT_HPP_INCLUDED
#include <lexy/error.hpp>
#inclu... | 1,479 | 510 |
/*
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#pragma once
#include <climits>
#include <cstddef>
#include <cmath>
#include <uavcan/build_config.hpp>
#ifndef UAVCAN_CPP_VERSION
# error UAVCAN_CPP_VERSION
#endif
#if UAVCAN_CPP_VERSION < UAVCAN_CPP11
# include <float.h> // cfloat may not b... | 10,278 | 3,552 |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/Scripting/Natives/Generated/ink/anim/TextInterpolator.hpp>
namespace RED4ext
{
namespace ink::anim {
struct TextReplaceInterpolator : ink::anim::TextInterpolator
{
static con... | 531 | 178 |
#include <Windows.h>
int main(int argc, char *argv[])
{
HANDLE hMutex = NULL;
do
{
hMutex = CreateMutex(NULL, FALSE, "Global\\73E21C80-1960-472F-BF0B-3EE7CC7AF17E");
DWORD dwError = GetLastError();
if (ERROR_ALREADY_EXISTS == dwError || ERROR_ACCESS_DENIED == dwError)
{
... | 500 | 205 |
/*
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
*/
#include "util/test.h"
#include "util/trace.h"
using namespace lean;
int main() {
lean_assert(!is_trace_enabled("name"));
enable_trace("name");
... | 470 | 159 |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018 Intel Corporation
#ifndef OPENCV_GAPI_GCOMPUTATION_HPP
#define OPENCV_GAPI_GCOMPUTATION_HPP
#inclu... | 5,671 | 1,776 |
//===-- ClangExpressionVariable.cpp -----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 2,219 | 747 |
//@result 151 / 151 test cases passed. Status: Accepted Runtime: 580 ms Submitted: 1 minute ago You are here! Your runtime beats 65.83% of cpp submissions.
/**
* Definition for an interval.
* struct Interval {
* int start;
* int end;
* Interval() : start(0), end(0) {}
* Interval(int s, int e) : start(s... | 948 | 367 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Licen... | 2,664 | 884 |
// Warning! This file is autogenerated.
#include <boost/text/collation_table.hpp>
#include <boost/text/collate.hpp>
#include <boost/text/data/all.hpp>
#ifndef LIMIT_TESTING_FOR_CI
#include <boost/text/save_load_table.hpp>
#include <boost/filesystem.hpp>
#endif
#include <gtest/gtest.h>
using namespace boost::text;
... | 312,429 | 118,910 |
// 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.
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
#include "config.h"
#include "V8SVGPreserveAspectRatio.h"
#include... | 13,925 | 4,970 |
// Copyright (c) 1999, Google 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:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditi... | 62,881 | 20,980 |
// Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
//
// 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
// t... | 3,371 | 1,171 |
/**
* @author Moe_Sakiya sakiya@tun.moe
* @date 2018-03-01 00:07:15
*
*/
#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
using namespace st... | 934 | 474 |
#include <CGAL/Curves_on_surface_topology.h>
#include <CGAL/Path_on_surface.h>
#include <CGAL/Polygonal_schema.h>
///////////////////////////////////////////////////////////////////////////////
[[ noreturn ]] void usage(int /*argc*/, char** argv)
{
std::cout<<"usage: "<<argv[0]<<" scheme [-nbdefo D] [-nbedges E] "
... | 6,354 | 2,213 |
#define USE_FILE_IO
#include <cstdio>
#include <cstring>
#include <climits>
#include <algorithm>
using namespace std;
typedef long long i64;
#define NMAX 200000
#define MOD 998244353
static int n;
static int A[NMAX + 10], B[NMAX + 10];
static i64 fac[NMAX + 10];
static i64 inv[NMAX + 10];
inline i64 qpow(i64 a, ... | 1,274 | 601 |
/**
* @file testPlanarSDFutils.cpp
* @author Jing Dong
* @date May 8 2016
**/
#include <CppUnitLite/TestHarness.h>
#include <gtsam/base/numericalDerivative.h>
#include <gtsam/base/Matrix.h>
#include <gpmp2/obstacle/PlanarSDF.h>
#include <iostream>
using namespace std;
using namespace gtsam;
using namespace gpmp... | 2,425 | 1,116 |
#include "rectangle.h"
#include "main.h"
Rectangle::Rectangle(float x, float y,float x1, float y1,float length, float width, color_t color)
{
this->position = glm::vec3(x, y, 0);
const GLfloat vertex_buffer_data[] = {
x1, y1, 0, // vertex 1
x1, y1+width, 0, // vertex 2
x1+length, y1+wid... | 1,168 | 481 |
/* behemoth: A syntax-guided synthesis library
* Copyright (C) 2018 EPFL
*
* 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 right... | 12,464 | 4,478 |
/**
* File: HVocabulary.cpp
* Date: April 2010
* Author: Dorian Galvez
* Description: hierarchical vocabulary implementing (Nister, 2006)
*/
#include "HVocabulary.h"
#include "HVocParams.h"
#include "DUtils.h"
#include <cassert>
#include <algorithm>
#include <numeric>
#include <vector>
#include ... | 18,187 | 7,608 |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Assistant of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid co... | 5,096 | 1,512 |
/*
* Copyright (c) 2013, Willow Garage, 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this l... | 4,379 | 1,537 |
/*=========================================================================
Module: vtkPVOptionsXMLParser.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
th... | 1,899 | 604 |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without m... | 11,047 | 3,759 |
// Copyright 2018 The Chromium OS 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 "init/file_attrs_cleaner.h"
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/xattr.h>
#incl... | 9,889 | 3,828 |
#include <fstream>
#include <streambuf>
#include <gl_includes.h>
#include <iostream>
#include <cstdlib>
#include "textures.h"
#include "util.h"
#define KONSTRUCTS_PATH_SIZE 256
namespace konstructs {
void shtxt_path(const char *name, const char *type, char *path, size_t max_len) {
snprintf(path, max_len, "... | 5,129 | 1,922 |
// (C) Copyright Gennadiy Rozental 2005-2008.
// 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)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version ... | 14,334 | 4,706 |
#include "addspatialentitycommand.h"
#include <QtWidgets/qcombobox.h>
#include "GameData/Components/TransformComponent.generated.h"
#include "GameData/World.h"
AddSpatialEntityCommand::AddSpatialEntityCommand(const SpatialEntity& entity, const Vector2D& location)
: EditorCommand(EffectBitset(EffectType::Entities))
... | 1,043 | 336 |
#include <szen/System/Window.hpp>
#include <szen/Game/Camera.hpp>
#include <sstream>
#ifdef SFML_SYSTEM_WINDOWS
#include <Windows.h>
#endif
using namespace sz;
namespace
{
sf::RenderWindow* m_window = NULL;
float m_aspectRatio;
sf::Uint32 m_virtualWidth = 1920;
sf::View m_view;
std::string m_title;
sf:... | 5,195 | 1,831 |
/* CatenaBase_NetSave.cpp Mon Dec 03 2018 13:21:28 chwon */
/*
Module: CatenaBase_NetSave.cpp
Function:
Interface from LoRaWAN to FRAM.
Version:
V0.12.0 Mon Dec 03 2018 13:21:28 chwon Edit level 1
Copyright notice:
This file copyright (C) 2018 by
MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 1485... | 1,814 | 853 |
/*
* Copyright (c) 2017, Ford Motor Company
* 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 condit... | 42,601 | 13,270 |
#include "inc/Core/Common/InstructionUtils.h"
#include "inc/Core/Common.h"
#ifndef _MSC_VER
void cpuid(int info[4], int InfoType) {
__cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]);
}
#endif
namespace SPTAG {
namespace COMMON {
const InstructionSet::InstructionSet_Internal InstructionSet... | 2,593 | 931 |
class Solution {
public:
string multiply(string num1, string num2) {
vector<string> partial_result;
string digit = "";
for_each(num2.rbegin(), num2.rend(), [&num1, &digit, &partial_result](const auto ch2) {
const auto op2 = ch2 - '0';
auto carry = 0;
stri... | 2,099 | 631 |
#include "NL_GameManager.h"
#include "NL_RenderingEngine.h"
#include "NL_ScriptingEngine.h"
#include "NL_ThreadLocal.h"
#include "NL_GameObject.h"
#include "NL_EngineServices.h"
#include "NL_SharedData.h"
#include "NL_IWindowManager.h"
#include <fstream>
namespace NLE
{
namespace GAME
{
GameManager::GameManager(... | 6,771 | 2,704 |
#include <iostream>
#include "Map.h"
#include <vector>
#include <stack>
using namespace std;
/*
Quick instruction:
If you want to see the third illustation being validated, the second one should be fixed.
To do so, just remove the comment from line 88 (i.e. establish the brazil --> north africa connection).
*/
int ma... | 7,445 | 2,253 |
//
// multimap.hpp
// bit_array-test
//
// Created by Nick Fagan on 3/12/18.
//
#pragma once
#include <unordered_map>
#include <stdexcept>
#include <vector>
#include <cstdint>
namespace util {
template<typename K, typename V>
class multimap;
}
template<typename K, typename V>
class util::multimap
{
publi... | 5,080 | 2,066 |
#include <catch2/catch.hpp>
#include <rapidcheck/catch.h>
#include <rapidcheck/state.h>
#include "util/GenUtils.h"
using namespace rc;
using namespace rc::test;
namespace {
struct Bag {
std::vector<int> items;
bool open = false;
};
using BagCommand = state::Command<Bag, Bag>;
struct Open : public BagCommand {... | 6,472 | 2,198 |
#pragma once
#include "DataFileWriter.hpp"
#include "GlobalAveragePointsGnuplotFileWriter.hpp"
#include "GlobalEloRatingGnuplotFileWriter.hpp"
#include "GlobalPlacePercentageGnuplotFileWriter.hpp"
#include "IndividualAveragePointsGnuplotFileWriter.hpp"
#include "IndividualEloRatingGnuplotFileWriter.hpp"
#include "Indi... | 10,608 | 3,055 |
#include "energy/soft_volume_constraint.h"
#include "matrix_utils.h"
#include "surface_derivatives.h"
namespace rsurfaces
{
SoftVolumeConstraint::SoftVolumeConstraint(MeshPtr mesh_, GeomPtr geom_, double weight_)
{
mesh = mesh_;
geom = geom_;
weight = weight_;
initialVolume = to... | 2,160 | 646 |
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "planner/Query.h"
#include <folly/String.h>
#include "common/interface/gen-cpp2/graph_types.h"
#include "util... | 5,934 | 1,854 |
/*
* CreatureTemplateReference.cpp
*
* Created on: 29/04/2012
* Author: victor
*/
#include "CreatureTemplateReference.h"
#include "server/zone/managers/creature/CreatureTemplateManager.h"
bool CreatureTemplateReference::toBinaryStream(ObjectOutputStream* stream) {
#ifdef ODB_SERIALIZATION
templateString.t... | 1,312 | 448 |
// Copyright 2017 Open Source Robotics Foundation, 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 appli... | 8,034 | 3,445 |
/**
* @file
*
* Unless noted otherwise, the portions of Isis written by the USGS are public
* domain. See individual third-party library and package descriptions for
* intellectual property information,user agreements, and related information.
*
* Although Isis has been used by the USGS, no warranty, ex... | 4,594 | 1,613 |
/* See LICENSE for license details */
/*
*/
#include <appl_status.h>
#include <appl_types.h>
#include <thread/appl_thread_descriptor.h>
#include <object/appl_object.h>
#include <buf/appl_buf.h>
#include <thread/appl_thread_descriptor_impl.h>
#include <heap/appl_heap_handle.h>
//
//
//
enum appl_status
app... | 2,743 | 951 |
struct Cartridge {
#include "memory.hpp"
auto pathID() const -> uint { return information.pathID; }
auto hash() const -> string { return information.sha256; }
auto manifest() const -> string { return information.manifest; }
auto title() const -> string { return information.title; }
struct Information {
... | 806 | 262 |
/*
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | 7,518 | 2,856 |
/*
* (C) Copyright 2009-2016 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/LICENSE-2.0.
* In applying this licence, ECMWF does not waive the privileges and immunities
* granted to it by virtue of its status as an... | 2,019 | 642 |
#include <stdio.h>
#include <xtime_l.h>
#include "test.h"
void test_cls_hls_polling_pre()
{
// Disable interrupt
interrupt_enable(false);
}
unsigned int test_cls_hls_polling()
{
XTime tick[4], perf[3] = {0, 0, 0};
unsigned int err = 0;
int *label = &testDataLabel[0];
int16_t *x = &testDataI[0][0];
for (size_t ... | 853 | 404 |
/* Name: Rehannah Baptiste
Program Title: Memory vs Gender Analysis Game
Program description: This program visualises statistics to determine which gender has better memory (recall)
and allows users to play a memory game which adds to the data.
Version 1.0: December 5th 2020
Current version: 1.5 (... | 19,125 | 8,022 |
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*****************************************************************************************
******************** This file was generated by sksllex. Do not edit. **************... | 61,160 | 39,466 |
//
// Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// 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)
//
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOO... | 885 | 344 |
//===- CVSymbolVisitor.cpp --------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 2,797 | 821 |
//===----------------------------------------------------------------------===//
//
// 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,198 | 402 |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PA... | 5,538 | 1,741 |
// boost::compressed_pair test program
// (C) Copyright John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
// standalone test program for <boost/call_trait... | 14,906 | 5,546 |
// ----------------- BEGIN LICENSE BLOCK ---------------------------------
//
// Copyright (C) 2017-2020 Intel Corporation
//
// SPDX-License-Identifier: MIT
//
// ----------------- END LICENSE BLOCK -----------------------------------
#include "ad/map/maker/test_helper/StringTestHelper.hpp"
#include <stdio.h>
namesp... | 4,499 | 1,519 |
#ifndef _FONTHANDLER_
#define _FONTHANDLER_
#include <cstring>
#include "Types.hpp"
#include "Color.hpp"
#include "BaseRenderTarget.hpp"
#include "Utilities/FileHandler.hpp"
#ifdef _PC_
#include <SFML/Graphics.hpp>
#endif
/**
* Class used to draw fonts.
* The FontHandler is designed to use only one font,
* if mo... | 1,003 | 330 |
/*
ESP8266 Simple Service Discovery
Copyright (c) 2015 Hristo Gochkov
Original (Arduino) version by Filippo Sallemi, July 23, 2014.
Can be found at: https://github.com/nomadnt/uSSDP
License (MIT license):
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated docu... | 11,041 | 4,719 |
#include <exception>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
using std::cout;
inline void cout_rep_sym(char c, int n)
{
for (int i = 0; i < n; ++i)
cout << c;
}
inline std::string str_bin_comp(std::string& s)
{
std::string ret;
ret.resize(s.size());
... | 2,945 | 1,128 |
/*
Copyright (c) 2009-2015, Jack Poulson
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#include "El.hpp"
namespace El {
namespace nnls {
// ... | 1,753 | 687 |
// Boost.TypeErasure library
//
// Copyright 2011 Steven Watanabe
//
// 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)
//
// $Id$
#ifndef BOOST_TYPE_ERASURE_CONFIG_HPP_INCLUDED
#define BOOST_TYPE_ERASURE_CONFIG_HPP... | 866 | 336 |
#include "session.h"
#include <memory>
#include <boost/lexical_cast.hpp>
#include "room.h"
#include "player.h"
#include "request_handler.h"
Session::Session(boost::asio::ip::tcp::socket socket, const Room& room)
: socket_(std::move(socket)),
room_(const_cast<Room&>(room)),
player_(std::make_shared<Player... | 2,339 | 744 |
/*********************************************************************************
* Copyright (c) 2018, Università degli Studi di Salerno, ALTEC S.p.A.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions... | 9,382 | 3,131 |
#include "../stdafx.h"
#include "storehelper.h"
Handle<PkiItemCollection> Provider::getProviderItemCollection(){
LOGGER_FN();
return this->providerItemCollection;
}
ProviderCollection::ProviderCollection(){
LOGGER_FN();
_items = std::vector<Handle<Provider> >();
}
ProviderCollection::~ProviderCollection(){
L... | 5,639 | 2,114 |
// This file has been generated by Py++.
#ifndef Image_hpp__pyplusplus_wrapper
#define Image_hpp__pyplusplus_wrapper
void register_Image_class();
#endif//Image_hpp__pyplusplus_wrapper
| 187 | 62 |
#include <vector>
#include <iostream>
#include "types.h"
#include "symbol.h"
#include "token.h"
#include "lexer.h"
#include "statement_parser.h"
#include "ast.h"
#include "ast_parser.h"
int main() {
try {
printf("main block started. moving on to lexing...\n");
Token_Linked_List tokens = lex_file((char*)"./ex... | 851 | 280 |
/*****************************************************************************************
* *
* OpenSpace *
* ... | 16,107 | 4,255 |
// A recursive CPP program to find
// LCA of two nodes n1 and n2.
#include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node* left, *right;
};
/* Function to find LCA of n1 and n2.
The function assumes that both n1 and n2
are present in BST */
struct node *lca... | 1,802 | 705 |
//
// Created by marsevil on 10/01/2021.
//
#include "Controller.hpp"
Controller::Controller(View* _view, sf::path const& _source, sf::path const& _destination, std::string const& _password)
: view(_view), source(_source), destination(_destination), password(_password) {
// Nothing to do here.
}
Controller::~Con... | 5,433 | 1,535 |
#include "merge_scoring_function_dfp.h"
#include "distances.h"
#include "factored_transition_system.h"
#include "label_equivalence_relation.h"
#include "labels.h"
#include "transition_system.h"
#include "../options/option_parser.h"
#include "../options/plugin.h"
#include "../utils/markup.h"
#include <cassert>
usin... | 4,690 | 1,469 |
#include "mex.h"
#include "RigidBodyConstraint.h"
#include "drakeMexUtil.h"
#include "../RigidBodyManipulator.h"
#include <cstring>
/*
* [num_constraint,constraint_val,iAfun,jAvar,A ,constraint_name,lower_bound,upper_bound] = testMultipleTimeLinearPostureConstraintmex(kinCnst_ptr,q,t)
* @param kinCnst_ptr ... | 3,732 | 1,543 |
#include <string>
#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;
typedef pair<int,int> PII;
typedef vector<PII> VPII;
#define a second
#define b first
int main()
{
int n;
cin>>n;
VPII v(n);
for (int i=0;i<n;i++)
cin>>v[i].... | 544 | 236 |
// Copyright (C) 2013-2017 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 <cc/command_int... | 22,099 | 6,973 |
/*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... | 6,254 | 1,955 |
#include "BejeweledIO.h"
#include <stdlib.h>
ScoreIO::ScoreIO()
: scoreFile("HighScores.txt")
{
readScores();
}
vector<PlayerScore> ScoreIO::readScores()
{
string HighScores = "HighScores.txt";
ifstream ist(HighScores.c_str());
if(!ist)
cout << "High Score File Not Found!" << endl;
string t... | 1,816 | 722 |
#include "gpk_encoding.h"
#include "gpk_view_bit.h"
#include "gpk_noise.h"
#include "gpk_chrono.h"
#include "gpk_parse.h"
#include <ctime>
#include <random>
::gpk::error_t gpk::saltDataSalt (const ::gpk::view_const_byte& binary, ::gpk::array_pod<byte_t> & salted) {
gpk_necall(salted.resize(bi... | 11,528 | 6,724 |
#include "amr-wind/equation_systems/icns/source_terms/BodyForce.H"
#include "amr-wind/CFDSim.H"
#include "amr-wind/utilities/trig_ops.H"
#include "AMReX_ParmParse.H"
#include "AMReX_Gpu.H"
namespace amr_wind {
namespace pde {
namespace icns {
/** Body Force
*/
BodyForce::BodyForce(const CFDSim& sim) : m_time(sim.ti... | 1,400 | 584 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "Types.h"
#include "Unicode.h"
namespace graphql::mapi {
StringId::StringId(PCWSTR name)
: m_name { convert::utf8::to_utf8(name) }
{
}
const std::string& StringId::getName() const
{
return m_name;
}
} // name... | 339 | 122 |
/*
* Copyright (C) 2014 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... | 24,967 | 7,517 |
#include "BonDriver_Proxy.h"
namespace BonDriver_Proxy {
static BOOL IsTagMatch(const char *line, const char *tag, char **value)
{
const int taglen = ::strlen(tag);
const char *p;
if (::strncmp(line, tag, taglen) != 0)
return FALSE;
p = line + taglen;
while (*p == ' ' || *p == '\t')
p++;
if (value == NULL ... | 21,386 | 10,978 |
#include <cstdio>
#include <cstdlib>
#include <cerrno>
#include <cstring>
#define FLOAT32 "%.9g"
struct atlas_ent
{
int bin_id, font_id, glyph;
short x, y, ox, oy, w, h;
};
int main(int argc, char **argv)
{
FILE *in = nullptr;
if (argc != 2) {
fprintf(stderr, "usage: %s <filename>\n", argv[0... | 999 | 434 |