text string | size int64 | token_count int64 |
|---|---|---|
//
// Copyright (c) 2017 The Khronos Group 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 la... | 5,899 | 2,179 |
/*
* Copyright (c) 2000-2001,2011-2012,2014 Apple Inc. All Rights Reserved.
*
* The contents of this file constitute Original Code as defined in and are
* subject to the Apple Public Source License Version 1.2 (the 'License').
* You may not use this file except in compliance with the License. Please obtain
* a c... | 2,349 | 850 |
#pragma once
#include <QString>
#include <pajlada/settings.hpp>
namespace AB_NAMESPACE {
void _registerSetting(std::weak_ptr<pajlada::Settings::SettingData> setting);
template <typename Type>
class ChatterinoSetting : public pajlada::Settings::Setting<Type>
{
public:
ChatterinoSetting(const std::string &path)
... | 2,172 | 665 |
/*
Copyright (c) 2019, Triad National Security, LLC
All rights reserved.
Copyright 2019. Triad National Security, LLC. This software was
produced under U.S. Government contract 89233218CNA000001 for Los
Alamos National Laboratory (LANL), which is operated by Triad
National Security, LLC for the U.S. Department o... | 77,846 | 24,551 |
#include "MainWindow.hpp"
#include "ui_MainWindow.h"
#include "ConfigViewFactory.hpp"
#include "DialogAbout.hpp"
#include "DialogSerialSettings.hpp"
#include "MdiChild.hpp"
#include "../parser/ConfigParser.hpp"
#include "../core/Element.hpp"
#include <QDockWidget>
#include <QFileDialog>
#include <QMdiSubWindow>
#in... | 9,671 | 3,003 |
/*
* Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... | 6,221 | 1,893 |
// This file is part of CaptureTheBanana++.
//
// Copyright (c) 2018 the CaptureTheBanana++ contributors (see CONTRIBUTORS.md)
// This file is licensed under the MIT license; see LICENSE file in the root of this
// project for details.
#ifndef ENGINE_PHYSICS_LEVELCONTACTLISTENER_HPP
#define ENGINE_PHYSICS_LEVELCONTACT... | 4,685 | 1,330 |
#include <babylon/extensions/entitycomponentsystem/detail/filter.h>
namespace BABYLON {
namespace Extensions {
namespace ECS {
namespace detail {
bool Filter::doesPassFilter(const ComponentTypeList& componentTypeList) const
{
for (std::size_t i = 0; i < m_requires.size(); ++i) {
if (m_requires[i] && !componentT... | 536 | 180 |
#include <assert.h>
#include <Arclight/Core/Application.h>
#include <Arclight/Core/Input.h>
#include <Arclight/Core/Logger.h>
#include <Arclight/Core/ResourceManager.h>
#include <Arclight/Core/ThreadPool.h>
#include <Arclight/Core/Timer.h>
#include <Arclight/Graphics/Rendering/Renderer.h>
#include <Arclight/Platform... | 2,815 | 1,076 |
/*-----------------------------------------------------------------------------
* This file is part of the Colony.Core Project. The Colony.Core Project is an
* open source project with a BSD type of licensing agreement. See the license
* agreement (license.txt) in the top/ directory or on the Internet at
* http://int... | 4,364 | 1,485 |
// Copyright 2018 The Fuchsia 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 "src/developer/forensics/testing/fakes/data_provider.h"
#include <fuchsia/feedback/cpp/fidl.h>
#include <fuchsia/mem/cpp/fidl.h>
#include <lib/sy... | 2,885 | 967 |
#include<bits/stdc++.h>
using namespace std;
// Max sum with no 3 consecutive is an extension of the below procedure
// this is the implementation where no consecutive are in the max sum
int maxSumNoConsecutiveElems(vector<int> &a){
// incl contains (prev element excluded sum + current element)
// excl contains... | 1,567 | 643 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <stack>
#include <vector>
using namespace std;
#define INF 1000
#define Zero(v) memset((v), 0, sizeof(v))
// goal[n]: coordinates of number n in the solution configuration
const int goal[9][2] = {
{ 2, 2 },
{ 0, 0 }, { 0,... | 5,305 | 2,141 |
/*
* Copyright (c) 2019 SK Telecom 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 requir... | 3,538 | 1,048 |
/*
* Copyright 2008-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#include <posix/realtime_sem.h>
#include <string.h>
#include <new>
#include <OS.h>
#include <AutoDeleter.h>
#include <fs/KPath.h>
#include <kernel.h>
#include <lock.h>
#include <syscall_restart.h>... | 15,254 | 6,539 |
#include "../Eigen/Sparse"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void call_ref(Ref<SparseMatrix<float> > a) { }
int main()
{
SparseMatrix<float> a(10,10);
CV_QUALIFIER SparseMatrix<float>& ac(a);
call_ref(ac);
}
| 302 | 138 |
// -*- C++ -*-
// LF_Event_Loop_Thread_Helper.cpp,v 1.2 2001/08/01 23:39:46 coryan Exp
#include "tao/LF_Event_Loop_Thread_Helper.h"
#if !defined (__ACE_INLINE__)
# include "tao/LF_Event_Loop_Thread_Helper.inl"
#endif /* __ACE_INLINE__ */
ACE_RCSID(tao, LF_Event_Loop_Thread_Helper, "LF_Event_Loop_Thread_Help... | 367 | 194 |
#include <xcb/xcb.h>
#include <i3ipc++/ipc.hpp>
#include "common.hpp"
#include "settings.hpp"
#include "utils/i3.hpp"
#include "utils/socket.hpp"
#include "utils/string.hpp"
#include "x11/connection.hpp"
#include "x11/ewmh.hpp"
#include "x11/icccm.hpp"
POLYBAR_NS
namespace i3_util {
/**
* Get all workspaces for... | 2,140 | 781 |
// Copyright 2020-2021 the Autoware Foundation
//
// 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... | 3,455 | 1,243 |
/*****************************************************************************************
* *
* OpenSpace *
* ... | 5,235 | 1,391 |
// Copyright 2019 The Fuchsia 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 "src/media/audio/audio_core/test/service/message_transceiver.h"
#include <lib/async/default.h>
namespace media::audio::test {
MessageTransceive... | 4,363 | 1,456 |
/******************************************************************************
* MIT License
*
* Copyright (c) 2019 Kartik Madhira, Aruna Baijal, Arjun Gupta
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software")... | 2,699 | 876 |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04... | 3,872 | 1,326 |
#include<iostream>
using namespace std;
bool isgiven_sum(int arr[],int n,int givsum){
int sum=0;
for(int i=0;i<n;i++){
for(int j=i;j<n;j++){//not working
sum+=arr[j];
}
if(givsum==sum){
return true;
}
}
return false;
}
int main(){
int arr[]={1,4,20,3,10,5},n=6,givsum=33;
cout<<isg... | 365 | 185 |
#ifndef Rice__Symbol__hpp_
#define Rice__Symbol__hpp_
#include "Identifier.hpp"
#include "Object_defn.hpp"
#include "detail/ruby.hpp"
#include <string>
namespace Rice
{
//! A wrapper for ruby's Symbol class.
/*! Symbols are internal identifiers in ruby. They are singletons and
* can be thought of as frozen string... | 1,319 | 420 |
#include <iostream>
#include <vector>
using namespace std;
vector<string> gss(string s){
// write your code here
vector<string> x;
if(s.length()==0){
x.push_back("");
return x;
}
string small=s.substr(0,s.length()-1);
vector<string> getsub=gss(small);
for(int i=0;i<... | 727 | 274 |
// This file is part of OpenMVG, an Open Multiple View Geometry C++ library.
// Copyright (c) 2015 Pierre Moulon.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#... | 1,966 | 694 |
#define MAZE_TESTING
#include "maze.h"
#include "maze.cpp"
#include "maze_generator.h"
size_t size = 0;
maze::Cell *real_cells;
Directions maze::read_walls(maze::Position pos) {
if (real_cells == nullptr)
return Directions();
maze::Cell *cell = &real_cells[pos.y * size + pos.x];
return cell->wa... | 2,438 | 944 |
/*-------------------------------------------------------------------------
This source file is a part of m8rscript
For the latest info, see http:www.marrin.org/
Copyright (c) 2018-2019, Chris Marrin
All rights reserved.
Use of this source code is governed by the MIT license that can be
found i... | 1,880 | 654 |
#include "EntityManager.h"
#include "../../Protocol/Play.h"
#include "../World.h"
#include "../../Utilities/Utils.h"
#include <iostream>
namespace Minecraft::Server::Internal::Entity {
EntityManager::EntityManager()
{
}
EntityManager::~EntityManager()
{
}
void generateBaseObjectMeta(ByteBuffer* meta, Entity* ... | 3,544 | 1,568 |
#include<iostream>
#include<ctype.h>
#include<cstring>
#include<string>
using namespace std;
int main(){
char x[1001];
cin>>x;
cout<<x[0]-97;
}
| 144 | 65 |
/*
* Copyright 2018-2019 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "... | 7,754 | 2,369 |
#include <iostream>
#include <thread>
#include <mutex>
/*
* This program tries to increment an integer 200 times in two threads.
* We fix the race condition by locking a mutex before each increment.
*/
int main() {
int nError = 0;
for (int j = 0; j < 1000; j++) {
int a = 0;
std::mutex aMutex;
// ... | 799 | 325 |
#include <cstdint>
#include "Halide.h"
#include "Element.h"
using namespace Halide;
using Halide::Element::schedule;
template<typename T>
class WarpMapBilinear : public Halide::Generator<WarpMapBilinear<T>> {
public:
ImageParam src0{type_of<T>(), 2, "src0"};
ImageParam src1{type_of<float>(), 2, "src1"};
I... | 1,076 | 429 |
#ifndef ATTACHMENTNYA_H
#define ATTACHMENTNYA_H
#include "CommonMail.hpp"
#include <QIODevice>
#include <QHash>
#include <QByteArray>
#include <QStringList>
namespace Nya
{
class Attachment
{
QByteArray contentType;
mutable s_p<QIODevice> content;
QHash<QByteArray, QByteArray> extraHeaders;
public:
Attachment()... | 962 | 325 |
#pragma once
#include <inttypes.h>
#define ATOMIC_ENTER lock()
#define ATOMIC_LEAVE unlock()
namespace cdev
{
struct file_operations {
void *op;
};
using px4_file_operations_t = struct file_operations;
using mode_t = uint32_t;
struct file_t {
int f_oflags{0};
void *f_priv{nullptr};
void *vdev{nullptr};
fil... | 609 | 260 |
#include <boost/ut.hpp>
#include <libembeddedhal/static_callable.hpp>
namespace embed {
boost::ut::suite static_callable_test = []() {
using namespace boost::ut;
// Setup
class dummy_driver
{};
"static_callable void(void)"_test = []() {
// Setup
using callback1_signature = void (*)(void);
bool ... | 1,395 | 463 |
/**
* @file
* @copyright defined in LICENSE.txt
*/
#include <eosiolib/eosio.hpp>
#include <eosiolib/asset.hpp>
#include <eosiolib/public_key.hpp>
#include "abieos_numeric.hpp"
using namespace std;
using namespace eosio;
class mmnewaccount : public contract {
public:
mmnewaccount(account_name self) : contract... | 4,783 | 1,640 |
/**
* @file VirtualCamera.cpp
* @author Christoph Göttert
* @version 0.1
*/
#include "VirtualCamera.h"
VirtualCamera::VirtualCamera( osg::ref_ptr<osg::Camera> cam)
{
camera = cam;
// Initial Values
camera->setProjectionMatrixAsPerspective(40., 1., 1., 100. );
}
void VirtualCamera::updatePosition(double r, ... | 844 | 341 |
/*****************************************************************************
*
* (C) COPYRIGHT MICROSOFT CORPORATION, 1999
*
* TITLE: propset.cpp
*
* VERSION: 1
*
*
* DATE: 06/15/1999
*
* DESCRIPTION: This code implements the IPropertySetStorage interface
* ... | 7,685 | 2,577 |
#include <getopt.h>
#include "mmutil.hh"
#include "io.hh"
#include "mmutil_embedding.hh"
#ifndef MMUTIL_ANNOTATE_EMBEDDING_HH_
#define MMUTIL_ANNOTATE_EMBEDDING_HH_
struct embedding_options_t {
using Str = std::string;
typedef enum { UNIFORM, CV, MEAN } sampling_method_t;
const std::vector<Str> METHOD_N... | 3,939 | 1,251 |
//
// Copyright (C) Wojciech Jarosz <wjarosz@gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can
// be found in the LICENSE.txt file.
//
#include "ppm.h"
#include <cmath>
#include <cstdio>
#include <iostream>
#include <stdexcept>
#include <string>
using namespace st... | 5,809 | 1,799 |
/* Copyright (c) 2020 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include <gtest/gtest.h>
#include "graph/context/QueryContext.h"
#include "graph/executor/algo/ProduceSemiShortestPathExecutor.h"
#include "graph/planner/plan/Algo.h"
namespace nebula {
namespace g... | 16,314 | 5,842 |
/*
Copyright (c) 2002-2009 Tampere University.
This file is part of TTA-Based Codesign Environment (TCE).
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, ... | 4,947 | 1,501 |
#include <cage-core/logger.h>
#include <cage-core/ini.h>
#include <cage-core/config.h>
#include <cage-core/files.h>
#include <cage-core/image.h>
#include <qasm/qasm.h>
using namespace qasm;
int main(int argc, const char *args[])
{
try
{
Holder<Logger> logger = newLogger();
logger->format.bind<logFormatConsole>... | 4,090 | 1,617 |
#include <iostream>
using namespace std;
// structure to denote node in list
typedef struct node
{
// member to hold data of node
int data;
// pointer to next node
struct node* next;
}node;
// a node to point to some element in the list
node* start;
/*
Function: preety_print
Desc: utility for printi... | 2,120 | 648 |
#include "StraightLineBehavior.hpp"
#include "Velocity.hpp"
StraightLineBehavior::StraightLineBehavior()
{}
void StraightLineBehavior::Update(const SwarmieSensors& sensors, const SwarmieAction& ll_action)
{
_action = ll_action;
// TODO: guard against waypoint actions
if(ll_action.GetVelocity().GetAngularMag... | 473 | 172 |
// Copyright (c) 2018-present, Qihoo, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#include "include/pika_cmd... | 1,666 | 585 |
/*
* 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 applica... | 13,052 | 4,495 |
/*
Copyright (c) 2009-2015 Maximus5
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the followin... | 110,231 | 53,225 |
// Copyright (c) 2010 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/ui/meegotouch/browser_toolbar_qt.h"
#include "chrome/browser/ui/meegotouch/browser_window_qt.h"
#include "chrome/browser/ui/m... | 7,146 | 2,483 |
/*
//
// DEKAF(tm): Lighter, Faster, Smarter(tm)
//
// Copyright (c) 2017, Ridgeware, Inc.
//
// +-------------------------------------------------------------------------+
// | /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\|
// |/+--------------------------------------------------------------... | 7,923 | 3,515 |
#include "common.h"
#include "jassbind.h"
#include "class_handle.h"
#include "class_array.h"
#include "libs_runtime.h"
#include <base/warcraft3/hashtable.h>
#include <base/warcraft3/war3_searcher.h>
#include <base/warcraft3/jass.h>
#include <base/warcraft3/jass/trampoline_function.h>
#include <base/util/single... | 4,817 | 2,261 |
/*
* This file is part of the OpenKinect Project. http://www.openkinect.org
*
* Copyright (c) 2014 individual OpenKinect contributors. See the CONTRIB file
* for details.
*
* This code is licensed to you under the terms of the Apache License, version
* 2.0, or, at your option, the terms of the GNU General Public... | 1,994 | 690 |
// 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 "components/policy/core/browser/configuration_policy_pref_store.h"
#include <string>
#include <vector>
#include "base/bind.h"
#include "bas... | 5,423 | 1,727 |
/*
* Copyright 2016 -- 2021 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 o... | 4,401 | 1,449 |
cout << "Hello";
| 17 | 7 |
/**
* bridge API
* bridge API generated from bridge.yang
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*/
/* Do not edit this file manually */
#include "BridgeApi.h"
namespace io {
namespace swagger... | 96,834 | 31,293 |
/*=============================================================================
TexGen: Geometric textile modeller.
Copyright (C) 2006 Martin Sherburn
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; ... | 3,908 | 1,487 |
/**********************************************************
* Author : Apriluestc
* Email : 13669186256@163.com
* Last modified : 2019-07-28 13:24
* Filename : Channel.cpp
* Description : 事件和描述符的封装
* 包括文件描述符的获取、设置
* 事件的设置、获取
* 以及读、写、异常、错误事件的分发处理
* ******... | 1,158 | 473 |
#ifndef FF_DRECEIVER_H
#define FF_DRECEIVER_H
#include <iostream>
#include <sstream>
#include <ff/ff.hpp>
#include <ff/distributed/ff_network.hpp>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <arpa/inet.h>
#include <cereal/cereal.hpp>
#include <cereal/archives/porta... | 7,300 | 2,328 |
// -*- C++ -*-
// TAO_Time_Service_Clerk.cpp,v 1.20 2001/03/26 21:17:04 coryan Exp
#include "TAO_Time_Service_Clerk.h"
#include "TAO_TIO.h"
#include "TAO_UTO.h"
#include "tao/ORB_Core.h"
// Constructor.
TAO_Time_Service_Clerk::TAO_Time_Service_Clerk (int timer_value,
... | 5,312 | 1,940 |
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n ,point , input = 0;
cin >> n;
while (n > 0){
for(int i = 0 ; i <3 ;i++){
cin>>input;
point = point + input;
}
n--;
}
if(point == 0){
cout<<"YES... | 350 | 141 |
// expression_test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <chrono>
#pragma warning(disable:4996)
#pragma warning(disable:4146)
#include "../../Program.cpp"
#include "../main.cpp"
| 235 | 84 |
// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Graphics/SlicedSprite.hpp>
#include <Nazara/Graphics/BasicMaterial.hpp>
#include <Nazara/Graphi... | 5,176 | 2,234 |
#include <map>
#include "IPipelineStateManager.hpp"
namespace My {
class PipelineStateManager : _implements_ IPipelineStateManager {
public:
PipelineStateManager() = default;
virtual ~PipelineStateManager();
int Initialize() override;
void Finalize() override;
void Tick() override {}
bool... | 884 | 249 |
// Maximum Difference between two elements such that smaller number always appear before larger one.
// Complexity : O(n) and O(1) in terms of space
#include <iostream>
#include <vector>
int max_diff(std::vector<int> elements) {
int max = -10, min = 1000, sm = 2000;
for(int i = 0; i < elements.size(); i++) {
if(m... | 683 | 281 |
/*
* Copyright (c) 2007, Michael Feathers, James Grenning and Bas Vodde
* 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... | 9,503 | 3,019 |
////////////////////////////////////////////////////////////////////////////////////////////////////
// This file is part of CosmoScout VR //
// and may be used under the terms of the MIT license. See the LICENSE file for details. //
// ... | 1,990 | 580 |
#pragma once
#include "Core/Core.hpp"
#include "Core/Image.hpp"
#include "Primus/Map.hpp"
struct Colormap
{
Image image;
};
// Holds data related to map to be used in the editor.
struct EditorMap : public Map
{
int16 heightmapTileXMin = 66;
int16 heightmapTileXMax = 70;
int16 heightmapTileY... | 594 | 237 |
// https://cses.fi/problemset/task/1090/
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, w;
cin >> n >> w;
vector<int> a(n);
for (int i = 0; i < n; i++) cin >> a[i];
sort(a.begin(), a.end());
int i = 0;
int j = n - 1;
int c = 0;
while (i <= j) {
... | 407 | 190 |
#include "NetDataSource.h"
#include "DataSource.h"
#include "defs.h"
#include <NERvGear/NERvSDK.h>
using namespace NERvGear;
NVG_BEGIN_PLUGIN_INFO(NetDataSource)
NVG_DECLARE_PLUGIN_UID(0x2f94132f, 0x4489, 0x4375, 0xb2, 0x6e, 0xfd, 0x27, 0xbf, 0xb8, 0xa3, 0xcf) // {2f94132f-4489-4375-b26e-fd27bfb8a3cf}
NVG_DECLARE... | 1,652 | 610 |
// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
// -- BEGIN LICENSE BLOCK ----------------------------------------------
// Copyright (c) 2018, FZI Forschungszentrum Informatik
//
// Redistribution and use in source and binary forms, with or without modification, are permitted
// provided t... | 9,588 | 3,703 |
#include "types.h"
/*
* --INFO--
* Address: ........
* Size: 00009C
*/
void _Error(char*, ...)
{
// UNUSED FUNCTION
}
/*
* --INFO--
* Address: ........
* Size: 0000F0
*/
void _Print(char*, ...)
{
// UNUSED FUNCTION
}
/*
* --INFO--
* Address: 80152794
* Size: 0009C8
*/
SpiderProp::SpiderProp()
{
/*
.l... | 29,723 | 20,017 |
#pragma once
#include <string>
#include <DirectXMath.h>
namespace DoremiEngine
{
namespace Graphic
{
class Camera;
/**
Builds new cameras and pushes cameras to the GPU
*/
class CameraManager
{
public:
/**
Creates a new Camera from ... | 643 | 174 |
#include <iostream>
using namespace std;
int main()
{
string s = "";
int n = 10000;
for (int i = 0; i < n; i++)
{
s += "hello";
}
cout << s << endl;
} | 167 | 75 |
#include "jln/mp/list/take_back.hpp"
| 37 | 18 |
/*
* SpaceShipGrammar.cpp
*
* Created on: Nov 2, 2015
* Author: Karl Haubenwallner
*/
#include <iostream>
#include "operators/Generator.impl"
#include "operators/ScopeOperators.impl"
#include "operators/Resize.impl"
#include "operators/Repeat.impl"
#include "operators/Subdivide.impl"
#include "operators/Com... | 11,112 | 4,607 |
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
// https://leetcode.com/problems/repeated-dna-sequences/discuss/420527/Easy-Hashmap-bit-manipulation-solution-C%2B%2B
class Solution {
public:
int char_to_bit(char c){
if(c=='A') return 0;
if(c=='C') return 1;
... | 1,030 | 401 |
// See LICENSE_CELLO file for license and copyright information
/// @file test_Parameters.cpp
/// @author James Bordner (jobordner@ucsd.edu)
/// @date Thu Feb 21 16:04:03 PST 2008
/// @brief Program implementing unit tests for the Parameters class
//--------------------------------------------------------... | 19,494 | 7,368 |
// Copyright (c) 2014 Antony Arciuolo. See License.txt regarding use.
// This cpp contains implemenations of to_string and from_string for intrinsic
// types as well as ouro types.
#include <oHLSL/oHLSLMath.h>
#include <oString/stringize.h>
namespace ouro {
bool from_string(float2* _pValue, const char* sr... | 4,924 | 2,041 |
#include "stdafx.h"
#include "TestRepository.h"
#include <boost/algorithm/string.hpp>
// Raw
#include "OneToOneRawBatchThroughputTest.h"
#include "OneToOneRawThroughputTest.h"
// Sequenced
#include "OneToOneSequencedBatchThroughputTest.h"
#include "OneToOneSequencedLongArrayThroughputTest.h"
#include "OneToOneSequen... | 4,881 | 1,524 |
#ifndef __LOG_HPP__
#define __LOG_HPP__
#define LOG0( format ) Serial.printf( "(%ld) " format, millis())
#define LOG1( format, x) Serial.printf( "(%ld) " format, millis(), x )
#endif
| 185 | 74 |
#ifndef QUICKSORT_HPP
#define QUICKSORT_HPP
#include "partition.hpp"
template <typename T>
void quicksort(T a[], int l, int r, int (*piv)(T a[], int l, int r, bool (*cmp)(T& a, T& b)), bool (*cmp)(T& a, T& b))
{
if (r > l)
{
int pivot = piv(a, l, r, cmp);
quicksort(a, l, pivot - 1, piv, cmp);
... | 380 | 172 |
#include "Vector3.h"
#include <iostream>
int main() {
Vector3<int> vec1(1, 0, 0);
Vector3<int> vec2(0, 1, 0);
Vector3<int> vec3(0, 0, 1);
Vector3<int> vec = vec1 + vec2 + vec3;
/**
* Console Output: X: 1, Y: 1, Z: 1
*/
std::cout << vec.to_string() << std::endl;
} | 274 | 140 |
// Copyright Carl Philipp Reh 2009 - 2021.
// 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 <fcppt/make_ref.hpp>
#include <fcppt/catch/begin.hpp>
#include <fcppt/catch/end.hpp>
#incl... | 1,375 | 564 |
#include "CipherFactory.hpp"
std::unique_ptr<Cipher> cipherFactory( const CipherType type, const std::string key){
switch(type){
case CipherType::Caesar:
return std::make_unique<CaesarCipher>(key);
case CipherType::Playfair:
return std::make_unique<PlayfairCipher>(key);
... | 454 | 145 |
// Includes
#include <math.h>
#include <ctime>
//
#include "Primitives.h"
#include "CompositeModels.h"
////
// Forward declarations
void Update(void);
void Render(void);
void InitializeModels(void);
void CalculateDeltaSeconds(void);
////
// Global variables
time_t g_lastFrameTime;
float g_deltaSeconds = 0.01f;
const... | 2,525 | 1,215 |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using nam... | 1,116 | 305 |
/*
** EPITECH PROJECT, 2020
** B-CPP-300-LYN-3-1-CPPrush3-
** File description:
** network.hpp
*/
#ifndef _NETWORK_HPP_
#define _NETWORK_HPP_
#include "main.hpp"
class network {
public:
network();
~network();
void set_WLP(std::string);
void set_LO(std... | 739 | 244 |
/** This is free and unencumbered software released into the public domain.
The authors of ISIS do not claim copyright on the contents of this file.
For more details about the LICENSE terms and the AUTHORS, you will
find files of those names at the top level of this repository. **/
/* SPDX-License-Identifier: CC0-1.0... | 35,597 | 10,987 |
#include<iostream>
#include<conio.h>
using namespace std;
main()
{
int a[6]={1,2,3,4,5};
for(int i=0;i<2;i++)
{
int t;
t=a[i];
a[i]=a[4-i];
a[4-i]=t;
}
for(int i=0;i<5;i++)
{
cout<<a[i]<<" ";
}
getch();
return 0;
}
| 236 | 152 |
#include "stdafx.h"
#include "GridRow.h"
#include "NativeGridRow.h"
namespace Ntreev { namespace Windows { namespace Forms { namespace Grid
{
GridRow::GridRow(Native::GrGridRow* pGridRow)
: m_pGridRow(pGridRow), RowBase(pGridRow)
{
}
_GridControl^ GridRow::ChildGrid::get()
{
return... | 446 | 151 |
#include <eeros/hal/HAL.hpp>
#include <eeros/core/Fault.hpp>
#include <dlfcn.h>
#include <getopt.h>
using namespace eeros;
using namespace eeros::hal;
HAL::HAL() : log('H') { }
HAL::HAL(const HAL&) : log('H') { }
HAL& HAL::operator=(const HAL&) { }
HAL& HAL::instance() {
static HAL halInstance;
return halInstance... | 9,169 | 3,228 |
#include "ImageCubeTexture.h"
ImageCubeTexture::ImageCubeTexture(const vector<string>& filenames)
{
if (filenames.size() != 6)
throw runtime_error("Bad size for filenames");
bind(0);
this->size = 0;
for (int m = 0; m<6; ++m) {
vector<uint8_t> pdata;
map<string, int> meta;
int w, h;
png_read(filenames... | 1,794 | 890 |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include "Evolution/Systems/GrMhd/ValenciaDivClean/BoundaryConditions/BoundaryCondition.hpp"
#include "Evolution/Systems/GrMhd/ValenciaDivClean/BoundaryConditions/DirichletAnalytic.hpp"
#include "Evolution/Systems/GrMhd/ValenciaDivClea... | 354 | 124 |
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, Leoni... | 9,620 | 3,283 |
//===----------------------------------------------------------------------===//
//
// Peloton
//
// optimizer.cpp
//
// Identification: src/optimizer/optimizer.cpp
//
// Copyright (c) 2015-16, Carnegie Mellon University Database Group
//
//===----------------------------------------------------... | 16,143 | 4,777 |
#include "iobuffer.h"
#include "symbols.h"
#include "abstract-syntax-tree.h"
using namespace std ;
using namespace CS_IO_Buffers ;
using namespace CS_Symbol_Tables ;
using namespace Workshop_Compiler ;
// ignore unused-function warnings in this source file
#pragma clang diagnostic ignored "-Wunused-function"
// kee... | 8,830 | 2,952 |
#include "LGPOperator_Division.h"
#include "../LGPConstants/LGPProtectedDefinition.h"
LGPOperator_Division::LGPOperator_Division()
: LGPOperator("/")
{
}
LGPOperator_Division::~LGPOperator_Division()
{
}
int LGPOperator_Division::Execute(const LGPRegister* operand1, const LGPRegister* operand2, LGPRegister* destin... | 578 | 223 |