text string | size int64 | token_count int64 |
|---|---|---|
// Copyright (c) 2017 Graphcore Ltd. All rights reserved.
#ifndef poplibs_test_NonLinearity_hpp
#define poplibs_test_NonLinearity_hpp
#include "poplibs_support/Compiler.hpp"
#include "poplibs_test/exceptions.hpp"
#include "popnn/NonLinearity.hpp"
#include <boost/multi_array.hpp>
namespace poplibs_test {
// input/ou... | 1,506 | 461 |
/*
* Copyright (c) 2018 Julian Soeren Lorenz, Carnegie Mellon University, 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 copyri... | 3,491 | 1,504 |
#include "pch.h"
#include <angsys.h>
using namespace ang;
#define MY_TYPE ang::variable<bool>
#include "ang/inline/object_wrapper_specialization.inl"
#undef MY_TYPE
static collections::pair<castr_t, bool> s_boolean_parsing_map[] =
{
{ "FALSE"_sv, false },
{ "False"_sv, false },
{ "HIGH"_sv, true },
{ "High"_sv, ... | 2,850 | 1,257 |
/*
Copyright (c) 2009, Robin RUAUX
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 ... | 3,986 | 1,145 |
/*
* Copyright (c) 2018-2019, NVIDIA CORPORATION. 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 ... | 10,795 | 3,987 |
#define WITHOUT_CMS_FRAMEWORK 1
#include "DQMServices/Core/src/DQMStore.cc"
int main() { return 0; }
| 102 | 50 |
/*
* QuadraticIntegralErrorTerm.cpp
*
* Created on: Dec 4, 2013
* Author: hannes
*/
#include <sstream>
#include <boost/python.hpp>
#include <numpy_eigen/boost_python_headers.hpp>
#include <Eigen/Core>
#include <aslam/backend/QuadraticIntegralError.hpp>
using namespace boost::python;
template <int dim, ty... | 1,953 | 599 |
// Copyright 2012 the V8 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.
#include "src/codegen.h"
#if defined(V8_OS_AIX)
#include <fenv.h> // NOLINT(build/c++11)
#endif
#include <memory>
#include "src/ast/prettyprinter.h"... | 10,249 | 3,332 |
/***********************************************************************************************************************
* 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... | 38,681 | 12,986 |
/*
* Author: Christian Rauch
*
* Copyright (c) 2018, University Of Edinburgh
* 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 abo... | 4,196 | 1,556 |
/****************************************************************************
** Meta object code from reading C++ file 'bip38tooldialog.h'
**
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "qt/bip38tooldialog.h"
#inclu... | 5,266 | 2,205 |
#include <atomic>
#include <algorithm>
#include <thread>
#include <chrono>
#include "world.hpp"
#include "util.hpp"
#include "player.hpp"
#include "dir.hpp"
#include "room.hpp"
#include "object.hpp"
World::World() {
this->self = std::shared_ptr<World>(this);
this->startActorThread();
}
World::~World() {
this->dest... | 4,784 | 1,738 |
/*************************************************************************
*
* ADOBE CONFIDENTIAL
*
* Copyright 2017 Adobe
*
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received... | 3,695 | 1,208 |
#include <vector>
#include <iostream>
#include "bigmap.h"
#include "bigmultimap.h"
#include "indexer.h"
typedef std::vector<bits24> bits24_vec;
// compact at most 3 20-bit integers into one 64-bit integer
// bit 62 and 61 indicate the count (1, 2 or 3)
uint64_t compact_index_list(uint32_t* index_ptr, int index_count)... | 20,867 | 9,319 |
#pragma once
#include <iosfwd>
#include <limits>
#include "tatum/Time.hpp"
#include "tatum/TimingGraphFwd.hpp"
namespace tatum {
enum class TagType : unsigned char {
CLOCK_LAUNCH,
CLOCK_CAPTURE,
DATA_ARRIVAL,
DATA_REQUIRED,
SLACK,
UNKOWN
};
class TimingTag;
std::ostream& operator<<(std::ost... | 6,579 | 1,820 |
#pragma once
#include <cstdint>
#include <string>
#include <unordered_map>
namespace mppi::optimization {
enum class MotionModel : uint8_t { Omni, DiffDrive, Carlike };
inline bool isHolonomic(MotionModel motion_model)
{
return (motion_model == MotionModel::Omni) ? true : false;
}
const inline std::unordered_map... | 510 | 181 |
// MIT License
//
// Copyright (c) 2020 Jean-Louis Haywood
//
// 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... | 2,178 | 715 |
// 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 "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/time/tick_clock.h"
#... | 17,312 | 6,248 |
#include <gtest/gtest.h>
#include <wfc/utility/math.hpp>
TEST(Utilty, IsPowerOfTwo)
{
ASSERT_TRUE(wfc::is_power_of_two(2));
ASSERT_FALSE(wfc::is_power_of_two(3));
}
TEST(Utilty, Log2OfPowerOfTwo)
{
ASSERT_EQ(wfc::log2_of_power_of_two(2U), 1U);
ASSERT_EQ(wfc::log2_of_power_of_two(4U), 2U);
ASSERT_EQ(wfc::log2_of... | 581 | 291 |
// Copyright 2014 The Crashpad 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 ... | 10,216 | 3,581 |
// Copyright 2020 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 or a... | 3,888 | 1,230 |
#include <psychlops.h>
using namespace Psychlops;
double estimated_gamma = 0;
double gamma_step = 8.0;
var estimate_gamma = function(colorlevel) {
estimated_gamma = 0;
gamma_step = 8.0;
while (0.0001<gamma_step) {
while (0<pow(colorlevel, estimated_gamma) - 0.5) {
estimated_gamma += gamma_step;
}... | 4,118 | 2,036 |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#pragma warning (disable:4127)
#include <winsock2.h>
#include <ws2tcpip.h>
#pragma warning (default:4127)
#include "iph... | 12,513 | 5,607 |
/*
* EFiberMutex.hh
*
* Created on: 2016-5-9
* Author: cxxjava@163.com
*/
#ifndef EFIBERMUTEX_HH_
#define EFIBERMUTEX_HH_
#include "./EFiberBlocker.hh"
namespace efc {
namespace eco {
/**
* Mutex for fiber.
*/
class EFiberMutex: public ELock {
public:
virtual ~EFiberMutex();
EFiberMutex();
virtual... | 756 | 288 |
/// @file lascl.hpp Multiplies a matrix by a scalar.
/// @author Weslley S Pereira, University of Colorado Denver, USA
//
// Copyright (c) 2012-2021, University of Colorado Denver. All rights reserved.
//
// This file is part of <T>LAPACK.
// <T>LAPACK is free software: you can redistribute it and/or modify it under
//... | 4,799 | 1,642 |
#include "adminlogssystem.h"
AdminLogsSystem::AdminLogsSystem(QObject *parent): QObject(parent) {
logsSystem = new LogsSystem;
logsSystem->moveToThread(&logsSystemThread);
connect(&logsSystemThread, &QThread::finished, logsSystem, &QObject::deleteLater);
connect(this, &AdminLogsSystem::operate, logs... | 1,795 | 637 |
// gitupdate.cpp : Tento soubor obsahuje funkci main. Provádění programu se tam zahajuje a ukončuje.
//
#define _CTR_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <string.h>
#include <conio.h>
#include <windows.h>
#include <stdlib.h>
#include <string>
#include<algorithm>
#incl... | 4,825 | 1,979 |
#pragma once
namespace appbase {
extern const char* appbase_version_string;
} | 85 | 27 |
//$Id: Brent.cpp 10052 2011-12-06 22:56:03Z djcinsb $
//------------------------------------------------------------------------------
// Brent
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool.
//
// Copyright (c) 2002-2011... | 11,613 | 3,603 |
//
// ulib - a collection of useful classes
// Copyright (C) 2007,2008,2012,2014,2017,2020 Michael Fink
//
/// \file ITextStream.hpp text stream interface
//
#pragma once
namespace Stream
{
/// text stream interface
class ITextStream
{
public:
/// text encoding that is possible for text files
e... | 2,913 | 818 |
// Fill out your copyright notice in the Description page of Project Settings.
#include "SampleSubSystem.h"
#include "AsyncSample.h"
//---------------------------------------------------------------------------------
// SampleSubSystem
//-------------------------------------------------------------------------------... | 1,362 | 416 |
#include "Particle.hpp"
#include <device_launch_parameters.h>
#include <mirror/simt_macros.hpp>
#include <mirror/simt_allocator.hpp>
#include <mirror/simt_vector.hpp>
#include <mirror/simt_serialization.hpp>
#include <mirror/simt_utilities.hpp>
ParticleSquare::ParticleSquare(double L) : m_L(L) {}
ParticleSquare::~P... | 2,236 | 792 |
// ECS.cpp : Questo file contiene la funzione 'main', in cui inizia e termina l'esecuzione del programma.
//
#include <iostream>
#include <vector>
#include <time.h>
#include "Heder/ECS_Context.h"
#include "Heder/Component.h"
class ClassTest
{
public:
ClassTest();
~ClassTest();
void Adding() {
inttt += 5;
}
p... | 1,959 | 761 |
#include "DBlmdb.hpp"
#include <boost/lexical_cast.hpp>
#include <iostream>
#include "PathTools.hpp"
using namespace platform;
#ifdef _WIN32
#pragma comment(lib, "ntdll.lib") // dependency of lmdb, here to avoid linker arguments
#endif
static void lmdb_check(int rc, const char *msg) {
if (rc != MDB_SUC... | 11,430 | 4,775 |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dynamodb/model/AutoScalingSettingsDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
names... | 3,315 | 1,213 |
#include "AdcNode.hpp"
extern int __get_adc_mode();
/**
* TODO:
* * manage status topic: isnan(ESP.getVcc()) => setProperty(cStatusTopic).send("error")
* note: check what happen when no wire is connected to ADC pin
*/
AdcNode::AdcNode(const char *id,
const char *name,
uint32_t... | 1,578 | 530 |
//===- Timing.cpp - Execution time measurement facilities -----------------===//
//
// 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
//
//===---------------------------... | 19,394 | 5,619 |
// 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 writing, software
// distributed ... | 5,049 | 1,812 |
/*-------------------------------------------------------------------------
* drawElements Quality Program OpenGL ES 3.0 Module
* -------------------------------------------------
*
* Copyright 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not ... | 9,218 | 3,944 |
/*
* The Sleuth Kit
*
* Contact: Brian Carrier [carrier <at> sleuthkit [dot] org]
* Copyright (c) 2011-2012 Basis Technology Corporation. All Rights
* reserved.
*
* This software is distributed under the Common Public License 1.0
*/
/** \file TskHashLookupModule.cpp
* Contains an implementation of a hash look... | 10,570 | 3,099 |
#include "network_common.h"
#include <server_lib/platform_config.h>
#if defined(SERVER_LIB_PLATFORM_LINUX)
#include <sys/socket.h>
#include <netinet/ip.h>
#include <sys/types.h>
#endif
namespace server_lib {
namespace tests {
uint16_t basic_network_fixture::get_free_port()
{
int result = 0;
#if defi... | 1,330 | 468 |
#include "template.hpp"
int main() {
ll(N, Q);
vll(A, N);
vll(L, R, X, Q);
set<ll> S;
each(a, A) {
if (S.count(a)) {
S.erase(a);
} else {
S.insert(a);
}
}
rep(i, Q) {
ll ans = 0;
ll c = 0;
vi D;
for (auto j = S.lower_bound(L[i]); j != S.end() and *j <= R[i]; ++j) {... | 549 | 275 |
/**
* @file HeatMapView.hpp
* @brief The HeatMapView class.
* @author Dominique LaSalle <dominique@solidlake.com>
* Copyright 2017
* @version 1
*/
#ifndef MATRIXINSPECTOR_VIEW_HEATMAPVIEW_HPP
#define MATRIXINSPECTOR_VIEW_HEATMAPVIEW_HPP
#include "View.hpp"
#include "HeatMap.hpp"
namespace MatrixInspe... | 1,016 | 408 |
#include <eosiolib/asset.hpp>
#include <eosiolib/eosio.hpp>
#include <eosiolib/types.hpp>
#include <iostream>
#include "../pradata.hpp"
using namespace eosio;
using namespace prochain;
class demo : public contract
{
public:
demo(account_name self) : contract(self){};
// @abi action
void check(const acc... | 2,034 | 809 |
/* Generated by re2c 0.13.5 on Thu May 27 03:14:47 2010 */
#line 1 "fastpath.re"
/*
+----------------------------------------------------------------------+
| XHP |
+----------------------------------------------------------------------+
| Copyrig... | 14,020 | 7,264 |
#include "GenerateTrainingSetView.h"
//qt
#include <QFileDialog>
//qf
#include "iqf_main.h"
//mipf
#include "MitkMain/IQF_MitkIO.h"
#include "MitkMain/IQF_MitkDataManager.h"
#include "ITKImageTypeDef.h"
//itk
#include <itkImage.h>
#include <itkChangeInformationImageFilter.h>
//mitk
#include "mitkImage.h"
#include ... | 3,677 | 1,322 |
#include "charts.hpp"
#include "forcing_phase.hpp"
#include "gnuplot_if.hpp"
using namespace dynamics;
namespace charts
{
void plot_impacts(const std::vector<Impact> &impacts, const std::string &outfile, const Parameters ¶ms)
{
do_plot( {prepare_plot(impacts, "", "dots")}, outfile, params);
}
}
| 310 | 116 |
/*
* Copyright 2006, Haiku.
*
* Copyright (c) 2002-2004 Matthijs Hollemans
* Distributed under the terms of the MIT License.
*
* Authors:
* Matthijs Hollemans
*/
#include <kits/debug/Debug.h>
#include <MidiConsumer.h>
#include <MidiProducer.h>
#include <MidiRoster.h>
#include <MidiRosterLooper.h>
#include <pr... | 14,275 | 6,121 |
#include <string>
#include <iostream>
#include <SFML/Window/Joystick.hpp>
#include "code/utilities/peripheral/keyboard/F310_gamepad/functions/f310_gamepads_state_getter.hpp"
#include "code/utilities/formats/json/converters/lib.hpp"
#include "code/utilities/formats/json/converters/type_to_json_string.hpp",
int main()
{... | 598 | 220 |
// -*- C++ -*-
#include "SAXPrint_Handler.h"
#include "ace/ACE.h"
#include "ace/Log_Msg.h"
#if !defined (__ACEXML_INLINE__)
# include "SAXPrint_Handler.inl"
#endif /* __ACEXML_INLINE__ */
ACEXML_SAXPrint_Handler::ACEXML_SAXPrint_Handler (const ACEXML_Char* filename)
: indent_ (0), fileName_(ACE::strnew (filename)... | 5,574 | 1,895 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: WavmUtils.cpp
* Author: ubuntu
*
* Created on April 22, 2018, 5:42 PM
*/
#include <string>
#include <iostream>
#... | 2,463 | 803 |
#include "Box.h"
#include "gl/glut.h"
Box::Box(): bIsOverlapping(false)
{
body = new cyclone::RigidBody();
}
Box::~Box()
{
delete body;
}
void Box::Render() const
{
// Get the OpenGL transformation
GLfloat mat[16];
body->GetGLTransform(mat);
if (bIsOverlapping)
{
glColor3f(0.7f,... | 2,591 | 1,068 |
#include "precompiled.hpp"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#endif // __clang__
#if defined __GNUC__ \
&& ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) ) \
&& !defined __clang__
#pragma GCC diagnostic push
#pragm... | 1,189 | 447 |
//==============================================================================
#ifndef ArseAbout
#define ArseAbout
#pragma once
#include <context.hpp>
//------------------------------------------------------------------------------
class Credits : public Context
{
public:
Credits();
virtual ~Credits();
... | 659 | 162 |
// Time: O(n^2 * n!)
// Space: O(n^2)
class Solution {
private:
struct TrieNode {
vector<int> indices;
vector<TrieNode *> children;
TrieNode() : children(26, nullptr) {}
};
TrieNode *buildTrie(const vector<string>& words) {
TrieNode *root = new TrieNode();
for (int... | 1,799 | 581 |
/*
Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your ... | 10,711 | 3,487 |
#include "headers/instruction.h"
#include "headers/functions.h"
#include "headers/utilities.h"
#include "headers/global_vars.h"
Instruction::Instruction(int addr, uint OP, Builder *Maker)
{
OPCode = OP;
this->Maker = Maker;
this->addr_instr = addr;
}
Instruction::Instruction(int add... | 12,844 | 4,101 |
/*
Copyright (c) 2020, Eric Hyer
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 following di... | 8,370 | 2,741 |
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 EMC Corp.
//
// @filename:
// CAutoTraceFlag.cpp
//
// @doc:
// Auto object to toggle TF in scope
//---------------------------------------------------------------------------
#include "gpos/base... | 1,216 | 394 |
/***************************************************************************************************
LICENSE:
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/l... | 2,005 | 647 |
//========= Copyright Valve Corporation, All rights reserved. ============//
#include "cbase.h"
#include "ai_basenpc.h"
#include "ai_behavior_lead.h"
#include "entityapi.h"
#include "saverestore.h"
#include "saverestoretypes.h"
#include "triggers.h"
#include "entities/triggers/CChangeLevel.h"
// memdbgon must be th... | 24,133 | 8,979 |
// Copyright (c) 2007-2009 Google Inc.
// Copyright (c) 2006-2007 Jaiku Ltd.
// Copyright (c) 2002-2006 Mika Raento and Renaud Petit
//
// This software is licensed at your choice under either 1 or 2 below.
//
// 1. MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of thi... | 6,148 | 2,434 |
class Solution {
public:
vector<int> addToArrayForm(vector<int>& A, int K)
{
vector<int> result;
int i = A.size();
int carry = K;
while(--i >= 0 || carry > 0)
{
if(i >= 0)
carry += A[i];
result.push_back(car... | 453 | 147 |
/*
* Copyright (C) 2005 - 2012 MaNGOS <http://www.getmangos.com/>
*
* Copyright (C) 2008 - 2012 Trinity <http://www.trinitycore.org/>
*
* Copyright (C) 2012 - 2012 FrenchCORE <http://www.frcore.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General... | 20,074 | 7,228 |
/* core/technology.cpp: Extracting technology information from an AST.
*
* Copyright 2019 Adrian "ArdiMaster" Welcker
*
* 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://ww... | 3,941 | 1,476 |
/*=========================================================================
Program: MAF2
Module: mafDeviceButtonsPadMouse
Authors: Marco Petrone
Copyright (c) B3C
All rights reserved. See Copyright.txt or
http://www.scsitaly.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; w... | 9,561 | 2,772 |
#include "BlockyVideoMemoryPool.h"
#include <cstring>
BlockyVideoMemoryPool::BlockyVideoMemoryPool(GLuint blockSize)
:blockSize(blockSize)
{
realloc(8);
}
BlockyVideoMemoryPool::BlockyVideoMemoryPool(BlockyVideoMemoryPool &&rhs) {
this->pbuffer.swap(rhs.pbuffer);
this->usage.swap(rhs.usage);
this->blo... | 2,096 | 697 |
/* $Id: CPUMAllRegs.cpp $ */
/** @file
* CPUM - CPU Monitor(/Manager) - Getters and Setters.
*/
/*
* Copyright (C) 2006-2015 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/... | 86,599 | 37,337 |
#include "ann.h"
bool training = true;
//======================Set Network Size=============================
std::ofstream config; //store network size for testing purpose
std::string config_file = "config.dat";
DataSet dataset = MNIST;
int numOfLayers;
std::vector<int> numOfNeurons;
//User Interface for networ... | 3,349 | 1,032 |
// 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 "crosdns/hosts_modifier.h"
#include <string>
#include <base/files/scoped_temp_dir.h>
#include <base/files/file_path.h>
#include <base/files/... | 5,322 | 1,925 |
/*
* binary_search_tree.cpp
* Copyright (C) 2020 sylveryte <sylveryte@archred>
*
* Distributed under terms of the MIT license.
*/
#include "binary_search_tree.h"
#include "../sylvtools.cpp"
int main(){
binary_search_tree b(21);
b.insert(21);
b.insert(1);
b.insert(23);
b.insert(233);
b.insert(4);
b.print_... | 2,662 | 1,090 |
#include "Asteroid.h"
#define REFINEMENT_LEVEL 2
#define BASE_RADIUS 1.9021f
#define MAX_VELOCITY 0.05
#define MAX_ROTATION 5.0
float Asteroid::nextID = 1.0;
Asteroid::Asteroid(){
Asteroid(glm::vec3(0), 0, 1.9021);
}
Asteroid::Asteroid(glm::vec3 startingPosition, int elementOffset, GLfloat radius)
{
this->radius =... | 10,369 | 4,258 |
#include <assert.h>
#include <memory.h>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
struct Node;
typedef Node Column;
struct Node
{
Node* left;
Node* right;
Node* up;
Node* down;
Column* col;
int col_idx;
const char* name;
int size;
... | 13,440 | 4,514 |
#include <iostream>
#include <stdexcept>
#include <string>
using namespace std;
class OwnException: public exception{ //class derived from exception
private:
string a; //declaring string
public:
OwnException(){
a = "Default case exception"; //when default thsi is printed
}
OwnException(const... | 1,411 | 461 |
/*
* adds pose information given by pose_000x.txt into cloud_000x.pcd files (old dataset structure)
* now we can use pcl_viewer *.pcd to show all point clouds in common coordinate system
*
* Created on: Dec 04, 2014
* Author: Thomas Faeulhammer
*
*/
#include <v4r/io/filesystem.h>
#include <v4r/io/eigen.h>... | 6,137 | 1,875 |
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
using namespace std;
struct Node
{
int key; // Key
int h; // Height attribute. EVERY function must leave h correct for all nodes.
Node* left; // Left child
Node* right; // Right c... | 9,982 | 4,164 |
#include "precomp.h"
//TODO: Compute post processing effects on GPU
void PostProcessing::Vignette(Color renderBuffer[SCRWIDTH][SCRHEIGHT], float2 uv[SCRWIDTH][SCRHEIGHT], float outerRadius, float smoothness, float intensity)
{
outerRadius = clamp(outerRadius, 0.0f, 1.0f);
intensity = clamp(intensity, 0.0f, 1.0f);
s... | 1,704 | 712 |
#include "init.h"
#include <iostream>
#include "../../core/project.h"
namespace cli {
const char* command_init_string =
R"(Usage: repaintbrush init [-f] <directory>
Create a new Repaintbrush project.
Options:
-f, --force Force the creation of a project)";
void command_init_func(ArgChain& args)
... | 1,321 | 387 |
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
* Gearmand client and server library.
*
* Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
* Copyright (C) 2009 Cory Bennett
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modific... | 3,455 | 1,253 |
/*!
* @section LICENSE
*
* @copyright
* Copyright (c) 2015-2017 Intel Corporation
*
* @copyright
* 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
*
* @copyright
* http://www.apach... | 2,623 | 800 |
//correct solution
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
int n, nt;
long s = 0, m;
cin >> n;
int *a = new int[n];// dynamic array allocation
long *b = new long[n];
for (int i = 0; i < n; i++)
cin >> a[i];
b[0] = a[0];
for (int i = 1; i < n; i++)
b... | 773 | 371 |
/**
* Copyright Soramitsu Co., Ltd. 2018 All Rights Reserved.
* http://soramitsu.co.jp
*
* 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/LICENS... | 2,605 | 827 |
/*
* Copyright (C) 2015 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... | 4,847 | 1,659 |
#include "load_library.hpp"
#include <fmt/printf.h>
#include <zeus/platform.hpp>
#if defined(ZEUS_PLATFORM_WINDOWS)
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#else
# include <dlfcn.h>
#endif
namespace atlas::hlr
{
#if defined(ZEUS_PLATFORM_WINDOWS)
void* load_library_handle(std::string const& l... | 2,402 | 764 |
/*=========================================================================
*
* Copyright SINAPSE: Scalable Informatics for Neuroscience, Processing and Software Engineering
* The University of Iowa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file excep... | 1,936 | 602 |
#ifndef _CONFIG_CONFIGURATION_H_
#define _CONFIG_CONFIGURATION_H_
#include <tinyxml2.h>
#include <chrono>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <vector>
namespace gramConfig {
class Configurable;
class Configuration {
public:
/** A list of configurati... | 3,574 | 920 |
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to d... | 2,710 | 1,043 |
/* Copyright (c) 2011 Kevin Wells */
/* OpenGL Pong may be freely redistributed. See license for details. */
#include "input.h"
#include "variables.h"
#include "quit.h"
#include "sdl.h"
#include "screen_draw.h"
using namespace std;
void input_game(){
while(SDL_PollEvent(&event)){
switch(event.type){
... | 1,783 | 709 |
#include <seastar/http/httpd.hh>
#include <seastar/http/handlers.hh>
#include <seastar/http/function_handlers.hh>
#include <seastar/http/file_handler.hh>
#include <seastar/core/seastar.hh>
#include <seastar/core/reactor.hh>
// #include "demo.json.hh"
#include <seastar/http/api_docs.hh>
#include <seastar/core/thread.hh>... | 4,819 | 1,543 |
#include "Generated/AB.rfks.h" | 30 | 13 |
/////////////////////////////////////////////////////////////////////////////////////////
// distribution::survival::models::common::importance_sampling::proposals_manager.hpp //
// //
// Copyright 2009 Erwann Rogard. Distributed under the... | 3,252 | 1,033 |
// Copyright (c) 2018 Hongzheng Chen
// E-mail: chenhzh37@mail2.sysu.edu.cn
// This is the implementation of Entropy-directed scheduling (EDS) algorithm for FPGA high-level synthesis.
// This file is the main function of EDS.
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <chron... | 8,236 | 3,925 |
/**
* Orthanc - A Lightweight, RESTful DICOM Store
* Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
* Department, University Hospital of Liege, Belgium
* Copyright (C) 2017-2020 Osimis S.A., Belgium
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the G... | 68,386 | 23,774 |
/*
Copyright (c) 2020 - present 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
to us... | 2,073 | 703 |
//===- Offset.hpp ------------------------------------------------*- C++-*-===//
//
// Copyright (C) 2020 GrammaTech, Inc.
//
// This code is licensed under the MIT license. See the LICENSE file in the
// project root for license terms.
//
// This project is sponsored by the Office of Naval Research, One Liberty
//... | 3,898 | 1,279 |
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file eggMorphList.cxx
* @au... | 845 | 327 |
#include <cpplib/stdinc.hpp>
bool check(int n, int m, vector<list<int> > iadj, vvb mat, vi dg, int k){
queue<ii> q;
set<int> inq;
for(int u=0; u<n; ++u){
for(int v=0; v<n; ++v){
}
}
while(!q.empty()){
int u = q.front();
q.pop();
inq.erase(u);
for(... | 1,562 | 630 |
#include "bits/stdc++.h"
using namespace std;
# define s(n) scanf("%d",&n)
# define sc(n) scanf("%c",&n)
# define sl(n) scanf("%lld",&n)
# define sf(n) scanf("%lf",&n)
# define ss(n) scanf("%s",n)
#define R(... | 1,032 | 523 |
#include <math.h>
#include "MathHelper.h"
double pythagorean(float a, float b)
{
return sqrt(a * a + b * b);
} | 115 | 50 |
#include <iostream>
#include <vector>
#include <cstdio>
using namespace std;
const int MAX = 1001;
int numberOfDivisors(int number) {
int divisors = 2;
for(int i = 2; i*i <= number; ++i) {
if(number % i == 0) divisors += 2;
if(i*i == number) --divisors;
}
return divisors;
}
int calculat... | 1,357 | 499 |