text string | size int64 | token_count int64 |
|---|---|---|
#include "household.hpp"
namespace epiabm
{
Household::Household(size_t mcellPos) :
MembersInterface(mcellPos),
m_params(),
m_mcellPos(mcellPos)
{}
size_t Household::microcellPos() const { return m_mcellPos; }
HouseholdParams& Household::params() { return m_params; }
} // ... | 337 | 123 |
#ifdef HAVE_CONFIG_H
#include <../../config.h>
#endif
/*
* Copyright (c) 1990, 1991 Stanford University
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and ... | 3,686 | 1,437 |
// Copyright (c) 2021 PaddlePaddle 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... | 3,745 | 1,445 |
// Copyright 2013 Daniel Parker
// Distributed under the Boost license, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See https://github.com/danielaparker/jsoncons for latest version
#ifndef JSONCONS_JSON_CONTAINER_HPP
#define JSONCONS_JSON_CONTAINER_HPP
#... | 43,948 | 13,787 |
#ifndef TEXTNET_LAYER_RESHAPE_LAYER_INL_HPP_
#define TEXTNET_LAYER_RESHAPE_LAYER_INL_HPP_
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <mshadow/tensor.h>
#include "../layer.h"
#include "../op.h"
namespace textnet {
namespace layer {
template<typename xpu>
class ReshapeLayer : pu... | 7,113 | 2,748 |
#include <stdio.h>
#include <stdlib.h>
#include <bits/stdc++.h>
using namespace std;
char square[10] = { 'o', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
int choice, player;
int checkForWin();
void displayBoard();
void markBoard(char mark);
int main()
{
int gameStatus;
char mark;
player = 1;
d... | 3,312 | 1,279 |
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
double m,n,p,k;
while(scanf("%lf %lf",&n,&p)!=EOF)
{
k=pow(p,1/n);
printf("%0.lf\n",k);
}
return 0;
}
| 224 | 105 |
/*
* Copyright 2016-2020 JetBrains s.r.o.
* Use of this source code is governed by the Apache 2.0 License that can be found in the LICENSE.txt file.
*/
#pragma once
#include <cstdlib>
/* Check the given pointer to see if it's null. If so, fail, printing to
stderr that insufficient memory is available. */
templat... | 512 | 170 |
#include "cpshm.h"
#include <stdio.h>
#include "cpstring.h"
const char* shm_id = "test_nwdl_shm";
struct TEST_SHM_DATA
{
char str[128];
int len;
};
void print_data(TEST_SHM_DATA* data)
{
printf("TEST_SHM_DATA::str: %s \nTEST_SHM_DATA::len: %d\n\n",
data->str, data->len);
}
... | 5,277 | 2,300 |
// Name: SeaOfThieves, Version: 2.0.23
#include "../pch.h"
/*!!DEFINE!!*/
/*!!HELPER_DEF!!*/
/*!!HELPER_INC!!*/
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
namespace CG
{
//---------------------------------------------------------------------------
// Functions
//--------------------------------------------... | 5,722 | 1,911 |
// Copyright 2016 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 "modules/webgl/WebGLGetBufferSubDataAsync.h"
#include "core/dom/DOMException.h"
#include "gpu/GLES2/gl2extchromium.h"
#include "gpu/command_buff... | 6,313 | 1,876 |
// Copyright 2016 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/allocator/allocator_shim.h"
#include <stdlib.h>
#include <string.h>
#include <atomic>
#include <iomanip>
#include <memory>
#include <new>... | 25,577 | 9,269 |
#include "../.././Image/Processing/Filters/Convolve/GaussConvolve.hh"
| 72 | 32 |
#ifndef GAMETRAINER_WINDOW_ENUMERATOR_MOCK_HPP
#define GAMETRAINER_WINDOW_ENUMERATOR_MOCK_HPP
#include <gt_os/window-enumerator.i.hpp>
class WindowEnumeratorMock : public gt::os::IWindowEnumerator {
public:
MOCK_METHOD1(setTitle, gt::os::IWindowEnumerator*(const std::string&));
MOCK_METHOD0(enumerate, gt::os:... | 440 | 199 |
#include "KdTree.h"
namespace ZIRAN {
/**
add an eigenvec point to the tree
*/
template <int dim>
template <class TV_IN>
void KdTree<dim>::addPoint(const int i, const TV_IN& new_p)
{
TV p;
for (int i = 0; i < dim; i++)
p(i) = (double)(new_p(i));
tree.insert(KdTreeHelper<dim>(i, p));
}
template... | 2,553 | 1,180 |
/**
* \file include/geombd/CRTP/DJointBase.hxx
* \author Alvaro Paz, Gustavo Arechavaleta
* \version 1.0
* \date 2021
*
* Class to implement the CRTP base (interface)
* Copyright (c) 2021 Cinvestav
* This library is distributed under the MIT License.
*/
#ifdef EIGEN_VECTORIZE
#endif
#if... | 11,768 | 4,105 |
// Filename: parasiteBuffer.cxx
// Created by: drose (27Feb04)
//
////////////////////////////////////////////////////////////////////
//
// 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 sh... | 9,167 | 2,401 |
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
string simplifyPath(string path) {
if (path.back() != '/') path += '/';
string res, s;
for (auto &c : path)
{
if (res.empty()) res += c;
else if (c == '/')
{
if... | 963 | 276 |
#include "FirstPersonCameraController.h"
#include "Core/Transform.h"
#include "Misc/Hardware/Mouse.h"
#include "Misc/Hardware/Time.h"
#include "XPlatform/typename.h"
namespace Tristeon
{
namespace Standard
{
DerivedRegister<FirstPersonCameraController> FirstPersonCameraController::reg;
nlohmann::json FirstPers... | 1,010 | 380 |
/*****************************************************************************
* \file
* \brief This header detects features for Windows platforms
*
* \note This is an internal header file, included by other library headers.
* Do not attempt to use it directly.
**********************************************... | 3,496 | 1,250 |
#include "CombinedHitPairGeneratorForPhotonConversion.h"
#include <memory>
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/Event.h"
#include "HitPairGeneratorFromLayerPairForPhotonConversion.h"
#include "FWCore/Utilities/... | 2,590 | 762 |
/* Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 29,991 | 11,154 |
#include "Common.h"
#include "Polygon.h"
#include "Vector2.h"
Polygon::Polygon()
{
_vertices.reset(new std::vector<Vector2>());
_perpendiculars.reset(new std::vector<Vector2>());
}
void Polygon::operator=(const Polygon& source)
{
if (this == &source)
return;
_vertices->clear();
_perpendiculars->clear();
_ve... | 3,924 | 1,500 |
#include "libs.hh"
#include "classes.hh"
#include "headers.hh"
namespace FractalSpace
{
void force_at_particle(Group& group, Fractal& fractal,const bool& conserve)
{
fractal.timing(-1,8);
ofstream& FileFractal=fractal.p_file->DUMPS;
vector <double> dens(8);
vector <double> weights(8);
vector <d... | 1,695 | 772 |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_user_login_flow.h"
#include "base/metrics/histogram_macros.h"
#include "chrome/browser/ch... | 2,195 | 711 |
#include <cstdio>
#include <cstring>
#include <stack>
#include <vector>
#include <algorithm>
#include <unordered_map>
using namespace std;
#define NMAX 200000
#define MEMSIZE 1800000
struct Pair {
int u, v;
bool operator==(const Pair &z) const {
return u == z.u && v == z.v;
}
};
namespace std ... | 4,900 | 1,975 |
#pragma once
#include <cstddef>
#include <functional>
#include <iostream>
#include <vector>
#include <realm/util/identifier.hpp>
#include <realm/util/type_traits.hpp>
namespace realm {
/**
* @brief Memory layout
* Describes a particular layout of memory. Inspired by Rust's alloc::Layout.
* @ref https://doc.rust-l... | 4,596 | 1,379 |
// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors
// Licensed under the MIT License:
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, inc... | 15,669 | 5,124 |
#ifndef SimPPS_PPSPixelDigiProducer_PPSPixelDigiProducer_h
#define SimPPS_PPSPixelDigiProducer_PPSPixelDigiProducer_h
// -*- C++ -*-
//
// Package: PPSPixelDigiProducer
// Class: CTPPSPixelDigiProducer
//
/**\class CTPPSPixelDigiProducer PPSPixelDigiProducer.cc SimPPS/PPSPixelDigiProducer/plugins/PPSPixelDigiP... | 9,716 | 3,632 |
#include <ros/ros.h>
#include "GpsKalmanFilter.h"
int main(int argc, char** argv)
{
ros::init(argc, argv, "gps_kalman_filter");
ros::NodeHandle n;
ros::NodeHandle pn("~");
gps_kalman_filter::GpsKalmanFilter node(n, pn);
ros::spin();
} | 251 | 115 |
/*ckwg +29
* Copyright 2012-2018 by Kitware, 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 li... | 44,101 | 14,276 |
/****************************************************************************
**
** Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Script Generator project on Qt Labs.
**
** $QT_BEGIN_LICE... | 4,558 | 1,476 |
#include <torch/csrc/lazy/python/init.h>
#include <torch/csrc/lazy/core/debug_util.h>
#include <torch/csrc/lazy/python/python_util.h>
namespace torch {
namespace lazy {
void initLazyBindings(PyObject* /* module */){
#ifndef USE_DEPLOY
// When libtorch_python is loaded, we register the python frame getter
// othe... | 659 | 218 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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.... | 5,384 | 1,775 |
// @formatter:off
//
// Balau core C++ library
//
// Copyright (C) 2008 Bora Software (contact@borasoftware.com)
//
// 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.apach... | 4,738 | 1,554 |
/*
* DigiBoosterEcho.cpp
* -------------------
* Purpose: Implementation of the DigiBooster Pro Echo DSP
* Notes : (currently none)
* Authors: OpenMPT Devs, based on original code by Grzegorz Kraszewski (BSD 2-clause)
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/... | 6,347 | 2,553 |
#include <common/verify.hpp>
#include <experimental/filesystem>
#include <fstream>
#include <unistd.h>
#include <common/dir_utils.hpp>
#include <common/string_utils.hpp>
std::string getFirst(const std::experimental::filesystem::path &cfile) {
std::string res;
std::ifstream is;
is.open(cfile);
std::getl... | 2,913 | 951 |
// Iostreams base classes -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Publi... | 6,017 | 2,305 |
// Copyright (c) 2018 Graphcore Ltd. All rights reserved.
#ifndef GUARD_NEURALNET_REDUCESUMSQUAREX_HPP
#define GUARD_NEURALNET_REDUCESUMSQUAREX_HPP
#include <popart/names.hpp>
#include <popart/popx/popopx.hpp>
namespace popart {
namespace popx {
class ReduceSumSquareOpx : public PopOpx {
public:
ReduceSumSquareOpx... | 605 | 237 |
#ifndef TOUCH_TYPING_TEXT_FILER_HPP
#define TOUCH_TYPING_TEXT_FILER_HPP
#include <filesystem>
#include <string>
namespace touch_typing {
class TextFile {
public:
explicit TextFile(const std::filesystem::path& filename);
[[nodiscard]] auto asString() const noexcept -> const std::string&;
private:
std::s... | 405 | 156 |
//==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
**/
//==================================================================================================
#... | 3,534 | 1,209 |
#ifndef TDAP_M_LIMITER_HPP
#define TDAP_M_LIMITER_HPP
/*
* tdap/Limiter.hpp
*
* Added by michel on 2020-02-09
* Copyright (C) 2015-2020 Michel Fleur.
* Source https://github.com/emmef/speakerman
* Email speakerman@emmef.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use t... | 13,619 | 4,286 |
/*
* DeletionFilter.cpp
*
* Created on: Mar 19, 2015
* Author: Martin Wermelinger, Peter Fankhauser
* Institute: ETH Zurich, Autonomous Systems Lab
*/
#include "grid_map_filters/DeletionFilter.hpp"
#include <grid_map_core/GridMap.hpp>
#include <pluginlib/class_list_macros.h>
using namespace filters;
n... | 1,295 | 461 |
#include <bits/stdc++.h>
using namespace std;
int get_value_base(int num, int base)
{
int rv = 0;
int p = 1;
while (num > 0)
{
int dig = num % base;
num = num / base;
rv += dig * p;
p = p * 10;
}
return rv;
}
int main()
{
int num = 634;
int base = 8;
... | 411 | 173 |
#include <cstdio>
#include <cstring>
#include <cstdlib>
/**< 问题:最长递增子序列 */
// Ref: http://blog.csdn.net/joylnwang/article/details/6766317
// Ref: http://qiemengdao.iteye.com/blog/1660229
/* 给定一个长度为 N 的数组 a0, a1, a2, ..., an - 1,找出一个最长的单调递增子序列
* 递增的意思是对于任意的 i < j,都满足 ai < aj,此外子序列的意思是不要求连续,顺序不乱即可。
* 例如,长度为 6 的数组 A =... | 1,493 | 945 |
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define RFOR(i, b, a) for (int i = b; i >= a; --i)
#define REP(i, N) for (int i = 0; i < N; ++i)
#define MAXN 10000
#define INF 0x3F3F3F3F
#define LINF 0x3F3F3F3FFFFFFFFFLL
#define pb push_back
#define mp make_pair
using namespace std;
struct ... | 3,001 | 1,249 |
#include <volt/pch.hpp>
#include <volt/config.hpp>
#include <volt/util/util.hpp>
#include <volt/log.hpp>
#include <volt/paths.hpp>
namespace fs = std::filesystem;
namespace nl = nlohmann;
#ifdef VOLT_DEVELOPMENT
static nl::json base_config;
#endif
static nl::json default_config, config;
static nl::json cleave(nl::... | 2,739 | 1,129 |
#ifndef SASS_MEMORY_POOL_H
#define SASS_MEMORY_POOL_H
#include <stdlib.h>
#include <iostream>
#include <algorithm>
#include <climits>
#include <vector>
namespace Sass {
// SIMPLE MEMORY-POOL ALLOCATOR WITH FREE-LIST ON TOP
// This is a memory pool allocator with a free list on top.
// We only allocate memory ... | 5,562 | 1,630 |
// Copyright (C) 2008-2018 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0 (see accompanying
// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
// Test invariant compilation on/... | 5,851 | 2,042 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the "License");
* you m... | 11,349 | 3,149 |
/*
* (C) Copyright 1996- 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 interg... | 2,541 | 967 |
/*
* Copyright 2019, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | 28,059 | 8,838 |
// Copyright (c) 2008-2022 the Urho3D project
// License: MIT
#include "../IK/IKSolver.h"
#include "../IK/IKConstraint.h"
#include "../IK/IKEvents.h"
#include "../IK/IKEffector.h"
#include "../IK/IKConverters.h"
#include "../Core/Context.h"
#include "../Core/Profiler.h"
#include "../Graphics/Animation.h"
#include "..... | 27,365 | 8,454 |
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* ----... | 3,349 | 1,253 |
// Copyright (c) 2011 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 <sstream>
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/range/range.h"
#include "ui/gfx/range/range_f.h"
namespace {
tem... | 16,237 | 7,238 |
// 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 "chrome/browser/instant/instant_controller.h"
#include "base/command_line.h"
#include "base/i18n/case_conversion.h"
#include "base/metrics/h... | 30,608 | 9,582 |
/*
* 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... | 23,425 | 7,477 |
#ifndef BOOST_MP11_SET_HPP_INCLUDED
#define BOOST_MP11_SET_HPP_INCLUDED
// Copyright 2015 Peter Dimov.
//
// 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 <boost/mp11/utility.hpp>
#include <boost/m... | 2,741 | 1,090 |
/*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Feli... | 14,287 | 5,309 |
/*
* @Author: xiaominfc
* @Date: 2020-09-02 17:10:06
* @Description: main run for routeserver
*/
#include "RouteConn.h"
#include "netlib.h"
#include "ConfigFileReader.h"
#include "version.h"
#include "EventSocket.h"
int main(int argc, char* argv[])
{
PRINTSERVERVERSION()
signal(SIGPIPE, SIG_IGN);
srand(time(... | 1,306 | 536 |
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <math.h>
#include<bits/stdc++.h>
using namespace std;
char Mapa[4] = {'a','b','c','d'};
vector<int> returnQuaternary(long int value, long int n_pos)
{
vector<int> retVect;
int target = value;
int module_r = 0;
int counter... | 2,107 | 799 |
// Copyright (C) 2015-2021 Virgil Security, 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
// ... | 5,763 | 1,898 |
// https://leetcode.com/problems/kth-smallest-element-in-a-bst/
// Honestly, this problem should be classified as easy.
class Solution {
public:
int kthSmallest(TreeNode* root, int k) {
stack<TreeNode*> s;
TreeNode* cur = root;
while(cur != NULL){
s.push(cur);
cur =... | 721 | 222 |
#include <unistd.h>
#include <cctype>
#include <sstream>
#include <string>
#include <vector>
#include <linux_parser.h>
#include "process.h"
using std::string;
using std::to_string;
using std::vector;
Process::Process(int pid)
:pid_(pid),
user_(LinuxParser::User(pid_)),
commandUsed_(LinuxParser::Command... | 1,029 | 356 |
/*
* Copyright (c) 2018 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2025-03-24
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... | 1,130 | 345 |
#include <stdinc.h>
#include "compiler.hpp"
#include "symtable.hpp"
#include "commands.hpp"
#include "program.hpp"
template<typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
static ArgVariant conv_int(T integral)
{
int32_t i = static_cast<int32_t>(integral);
if(i >= std::numeric_limits<int8... | 25,507 | 7,946 |
/****************************************************************************
*
* Copyright (c) 2019 PX4 Development Team. 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. Redistri... | 3,894 | 1,439 |
/******************************************************************************
*
* Project: KML Translator
* Purpose: Implements OGRLIBKMLDriver
* Author: Brian Case, rush at winkey dot org
*
******************************************************************************
* Copyright (c) 2010, Brian Case
*
... | 47,585 | 14,471 |
#include"CreateWindow.h"
//setting
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
//camera
GLCamera camera(glm::vec3(0.0f, 0.0f, 6.0f));
float lastX = SCR_WIDTH / 2.0f;
float lastY = SCR_HEIGHT / 2.0f;
bool firstMouse = true;
//timing
float deltaTime = 0.0f; // time between curr... | 2,768 | 1,126 |
//
// Copyright (c) Prokura Innovations. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
#include <condition_variable>
#include <cstdio>
#include <iostream>
#include <mutex>
#include <queue>
#include <string>
#include <sstream>
// Header fil... | 5,480 | 1,980 |
//----------------------------------------------------//
// //
// File: Node.cpp //
// This scene graph is a basic example for the //
// object relational management of the scene //
// This is the basic node class ... | 1,841 | 497 |
/*
* scout_webots_runner.cpp
*
* Created on: Sep 18, 2020 11:13
* Description:
*
* Copyright (c) 2020 Ruixiang Du (rdu)
*/
#include <signal.h>
#include <webots_ros/set_float.h>
#include "scout_base/scout_messenger.hpp"
#include "scout_webots_sim/scout_webots_runner.hpp"
#include "scout_webots_sim/scout_webots... | 4,632 | 1,679 |
/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
\file gvznode.cc
\date May 2012
\author TNick
\brief Contains the implementation of GVzNode class
*//*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | 18,686 | 8,808 |
#include "Halide.h"
namespace {
class Interpolate : public Halide::Generator<Interpolate> {
public:
GeneratorParam<int> levels_{"levels", 10};
Input<Buffer<float>> input_{"input", 3};
Output<Buffer<float>> output_{"output", 3};
void generate() {
Var x("x"), y("y"), c("c");
... | 5,902 | 1,972 |
// SPDX-License-Identifier: Apache-2.0
/**
* Copyright (C) 2020 Parichay Kapoor <pk.kapoor@samsung.com>
*
* @file addition_layer.cpp
* @date 30 July 2020
* @see https://github.com/nnstreamer/nntrainer
* @author Parichay Kapoor <pk.kapoor@samsung.com>
* @bug No known bugs except for NYI items
* @brief ... | 2,340 | 811 |
#ifndef _DOOR_HPP
#define _DOOR_HPP
#include <string>
#include <vector>
#include "content.hpp"
#include "entity.hpp"
namespace duckhero
{
struct DoorInfo
{
int x;
int y;
std::string map;
};
class Door : public Entity
{
private:
SDL_Texture * _texture;
public:
int key_id;
bool unlocked;
Door();... | 684 | 284 |
// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
// de Barcelona (UAB).
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#include <carla/PythonUtil.h>
#include <carla/client/Client.h>
#include <carla/client/World.h>
... | 923 | 320 |
class Solution
{
public:
void rotateby90(vector<vector<int> >& matrix, int n)
{
// code here
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
swap(matrix[i][j],matrix[j][i]);
}
}
for(int i=0;i<n;... | 501 | 185 |
#pragma once
#include "dde_x.h"
void load_land_coef(std::string &path, std::string sfx, std::vector<DataPoint> &img);
void load_land(std::string p, DataPoint &temp);
void load_img(std::string p, DataPoint &temp);
void load_land(std::string p, DataPoint &temp);
void cal_rect(DataPoint &temp);
void... | 749 | 301 |
// 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 "content/renderer/devtools/devtools_agent_filter.h"
#include "base/bind.h"
#include "content/child/child_process.h"
#include "content/common... | 3,128 | 1,004 |
/*
* SPDX-License-Identifier: LGPL-2.0-only
* License-Filename: LICENSES/LGPLv2-KDAB
*
* The KD Tools Library is Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB.
*/
#include "kdsingleapplicationguard.h"
#if QT_VERSION >= 0x040400 || defined(DOXYGEN_RUN)
#ifndef QT_NO_SHAREDMEMORY
#include "kdsharedmem... | 39,201 | 11,890 |
// Selection Sort using C++
// Author : Abhishek Sharma
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
void insertionsort(int p[],int no_of_steps,int n)
{
int min_ele;
int addr;
int temp;
for (int i = 0; i<no_of_steps; ++i)
{
min_ele = p[i];
addr = i;
... | 936 | 414 |
/**************************************************************************
* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... | 22,138 | 8,302 |
#include "group_utils.h"
#include "solution_utils.h"
#include "settings.h"
#include <QDir>
namespace {
QList<Group> groups;
QHash<QUuid, const Group*> groupMap;
QHash<QString, QList<const Group*>> userToGroupMap;
const Group BAD_GROUP;
const QList<const Group*> EMPTY_GROUP_LIST;
void updateAll()
{
groupMap.clear(... | 2,710 | 840 |
#include "../../headers/ui/Image.h"
#include "../../headers/Renderer2D.h"
Image::Image(const char * path, int x, int y)
{
pImageId = Resources::getInstance()->Load<Sprite>(path);
px = x;
py = y;
}
Image::~Image()
{
}
void Image::Render()
{
Renderer2D::getInstance()->RenderGraphic(pImageId, px, py);
} | 309 | 121 |
// Copyright (c) YugaByte, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | 4,903 | 1,537 |
#include <cassert>
#include <sstream>
#include <iomanip>
#include "OldZSolid.hh"
#include "ZSolid.h"
#include "G4Ellipsoid.hh"
#include "G4Tubs.hh"
#include "G4Polycone.hh"
#include "G4UnionSolid.hh"
#include "NP.hh"
std::string OldZSolid::desc() const
{
std::stringstream ss ;
ss
<< " EntityT... | 5,905 | 2,208 |
/************************************************
* *
* rs@md *
* (reactive steps @ molecular dynamics ) *
* *
************************************************/
/*
Copyright 2020... | 2,485 | 688 |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc.
// http://code.google.com/p/protobuf/
//
// 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:... | 4,126 | 1,285 |
/**
* Copyright (c) 2017 LIBBLE team supervised by Dr. Wu-Jun LI at Nanjing University.
* 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 Licen... | 2,190 | 675 |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance w... | 11,879 | 3,454 |
/*****************************************************************************
*
* CLIPP - command line interfaces for modern C++
*
* released under MIT license
*
* (c) 2017 André Müller; foss@andremueller-online.de
*
*****************************************************************************/
#include "test... | 6,460 | 2,668 |
/*++
Copyright (c) 2000 Microsoft Corporation
Module Name:
FaxOutboundRoutingGroups.cpp
Abstract:
Implementation of CFaxOutboundRoutingGroups class.
Author:
Iv Garber (IvG) Jun, 2000
Revision History:
--*/
#include "stdafx.h"
#include "FaxComEx.h"
#include "FaxOutboundRoutingGroups.h... | 17,627 | 6,718 |
// Copyright (c) 2019 LLambert
//
// 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,
// publish, dist... | 6,262 | 2,359 |
//*****************************************************************
// Copyright 2015 MIT Lincoln Laboratory
// Project: SPAR
// Authors: OMD
// Description: Unit tests for NumberedCommandReceiver
//
// Modifications:
// Date Name Modification
// ---- ---- ... | 6,233 | 2,075 |
#include "priv.h"
#include "sccls.h"
#include "menuband.h"
#include "itbar.h"
#include "bands.h"
#include "isfband.h"
#include "menubar.h"
#include "../lib/dpastuff.h" // COrderList_*
#include "inpobj.h"
#include "theater.h"
#include "resource.h"
#include "oleacc.h"
#include "apithk.h"
#include "uema... | 142,674 | 46,023 |
// AvioMatrix a fast matrix computation library.
//
// Copyright (C) 2011 The University of Tokyo Avionics Research Group
//
// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of t... | 5,834 | 2,390 |
// Copyright 2016 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/builtins/builtins-utils-gen.h"
#include "src/builtins/builtins.h"
#include "src/codegen/code-factory.h"
#include "src/codegen/code-stub-as... | 13,763 | 4,006 |
#include <fstream>
#include <ros/ros.h>
#include <ros/package.h>
int main(int argc, char **argv)
{
// Get path and file name
std::string package_path = ros::package::getPath("crowdbot_active_slam");
std::string directory_path = package_path + "/" + argv[1];
std::string general_results_path = directory_path +... | 3,045 | 1,087 |
#include "CRenderable2D.h"
#include "core/utils/string.h"
#include "core-ext/system/io/Resources.h"
#include "core-ext/system/io/assets/TextureIO.h"
#include "gpuw/Device.h"
#include "renderer/texture/RrTexture.h"
#include "renderer/material/RrShaderProgram.h"
#include "renderer/material/RrPass.h"
#include "renderer/... | 20,665 | 7,992 |