text string | size int64 | token_count int64 |
|---|---|---|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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/. */
/* Implement shared vtbl methods. */... | 5,619 | 2,055 |
// Copyright 2015 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 "chromecast/browser/cast_permission_manager.h"
#include "base/callback.h"
#include "base/logging.h"
#include "content/public/browser/permission_... | 2,158 | 602 |
//
// Created by theppsh on 17-4-13.
//
#include <iostream>
#include <iomanip>
#include "src/aes.hpp"
#include "src/triple_des.hpp"
int main(int argc,char ** args){
/**aes 加密*/
/// 128位全0的秘钥
u_char key_block[]={0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0
};
u_char plain_block[] = {0... | 4,918 | 2,283 |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector<int> postorderTraversal(TreeNode* root)
{
vector<int> res;
if (!roo... | 960 | 278 |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef KAGOME_CORE_STORAGE_TRIE_IMPL_POLKADOT_TRIE_BATCH_HPP
#define KAGOME_CORE_STORAGE_TRIE_IMPL_POLKADOT_TRIE_BATCH_HPP
#include "common/buffer.hpp"
#include "storage/face/write_batch.hpp"
#include "storage/trie/i... | 1,659 | 587 |
// Copyright (c) Glyn Matthews 2012, 2013, 2014.
// Copyright 2012 Google, Inc.
// 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 <gtest/gtest.h>
#include <network/uri.hpp>
#include "string_utility.hpp"... | 17,761 | 6,657 |
#include <Rcpp.h>
using namespace Rcpp;
RcppExport SEXP rnorm_manual(SEXP n) {
NumericVector out( as<int>(n) );
RNGScope rngScope;
out = rnorm(as<int>(n), 0.0, 1.0);
return out;
} | 200 | 95 |
// Only for matrix with dimension 2, 4, 8, 16...
#ifndef SQUARE_MATRIX_MULTIPLY_RECURSIVE_H
#define SQUARE_MATRIX_MULTIPLY_RECURSIVE_H
#include <utility>
namespace CLRS
{
template <typename T, std::size_t n>
void divide_matrix_4(T (&a)[n][n],
T (&b)[n/2][n/2],
T (&c)[n/2][n/2],
T (&d)[... | 2,807 | 1,513 |
#ifndef TOOLS_HPP
# define TOOLS_HPP
# include <string>
# include <vector>
# include "client.hpp"
# include <list>
# include "ircserv.hpp"
typedef std::vector<std::string> t_strvect;
typedef std::list<Client>::iterator t_citer;
/****************************************************/
/* additional tools helping the ... | 3,996 | 1,424 |
// Copyright 2015 The Weave 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 <weave/error.h>
#include <gtest/gtest.h>
namespace weave {
namespace {
ErrorPtr GenerateNetworkError() {
tracked_objects::Location loc("Genera... | 2,237 | 782 |
/* Copyright (c) 2021 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include <folly/Benchmark.h>
#include <folly/Format.h>
#include <folly/String.h>
#include <folly/container/Enumerate.h>
#include <folly/init/Init.h>
#include <gtest/gtest.h>
#include <thrift/lib/cpp/... | 8,856 | 2,775 |
//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... | 7,451 | 2,230 |
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
* Copyright (C) 2000-2015, International Business Machines
* Corporation and others. All Rights Reserved.
*
**********... | 58,391 | 19,355 |
// Yule Zhang
#include <iostream>
#include <fstream>
using namespace std;
#include "queue_eda.h"
template <typename T>
class listaPlus : public queue<T> {
using Nodo = typename queue<T>::Nodo;
public:
void mezclar(listaPlus<T> & l1, listaPlus<T> & l2) {
if (l1.nelems == 0) {//Si l1 es vacia
this->prim = l2.p... | 2,205 | 1,137 |
#ifndef RAYTRACING_MATERIAL_H
#define RAYTRACING_MATERIAL_H
#include "Vector.hpp"
enum class MaterialType { DIFFUSE };
class Material
{
private:
// Compute reflection direction
Vector3f reflect(const Vector3f &I, const Vector3f &N) const
{
return I - 2 * I.dot(N) * N;
}
// Compute refraction direction using... | 4,217 | 1,850 |
/// \file
/// \brief Internal header file that contains implementation of the position
/// class.
/// \author Lyberta
/// \copyright BSLv1.
#pragma once
namespace std::io
{
constexpr position::position(streamoff off) noexcept
: m_position{off}
{
}
constexpr position::position(offset off) noexcept
: m_position{off... | 1,726 | 564 |
/**
\file "Object/inst/null_collection_type_manager.hh"
Template class for instance_collection's type manager.
$Id: null_collection_type_manager.hh,v 1.12 2007/04/15 05:52:19 fang Exp $
*/
#ifndef __HAC_OBJECT_INST_NULL_COLLECTION_TYPE_MANAGER_H__
#define __HAC_OBJECT_INST_NULL_COLLECTION_TYPE_MANAGER_H__
#incl... | 3,271 | 1,136 |
// Copyright 2010-2018 Google LLC
// 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... | 13,504 | 4,593 |
/*
* Copyright Andrey Semashev 2007 - 2015.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#include <string>
#include <iostream>
#include <stdexcept>
#include <boost/smart_ptr/shared_p... | 6,712 | 2,387 |
// *********************************************************************************************************************
// Description: Stack Information
//
// Module: GSRoot
// Namespace: GS
// Contact person: MM
//
// SG compatible
// ******************************************************************************... | 4,361 | 1,488 |
/**
* Copyright 2017 M. Shulhan (ms@kilabit.info). All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "DNSRecordType.hh"
namespace vos {
const char* DNSRecordType::__cname = "DNSRecordType";
const int DNSRecordType::SIZE = 22;
... | 1,447 | 657 |
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
/... | 10,584 | 3,481 |
/* -*-C-*-
********************************************************************************
*
* File: seam.c (Formerly seam.c)
* Description:
* Author: Mark Seaman, OCR Technology
* Created: Fri Oct 16 14:37:00 1987
* Modified: Fri May 17 16:30:13 1991 (Mark Seaman) marks@hpgrlt
* Languag... | 13,043 | 4,740 |
/*=========================================================================
Library: TubeTK
Copyright 2010 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved.
Licensed under the Apache License, Version 2.0 ( the "License" );
you may not use this file except in compliance with the L... | 5,081 | 1,441 |
#include <vcpkg-test/catch.h>
#include <vcpkg-test/util.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/sourceparagraph.h>
#include <vcpkg/triplet.h>
#include <memory>
#include <unordered_map>
#include <vector>
using namespace vcpkg;
using Test::make_status_feature_pgh;
using Test::make_status_pgh;
using Test::u... | 49,499 | 18,155 |
#include "partition/partitioned_petsc_vec/02_partitioned_petsc_vec_for_hyperelasticity.h"
#include "utility/mpi_utility.h"
// ---- incompressible case ----
template<typename DisplacementsFunctionSpaceType, typename PressureFunctionSpaceType, typename Term, int nComponents>
std::string PartitionedPetscVecForHyperelas... | 13,991 | 4,891 |
/*
* Copyright (C) 2009, 2010, 2012 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your... | 20,135 | 6,286 |
/*
* 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-01-25
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... | 9,011 | 2,642 |
/*
* Created on: Sept 15, 2012
* Author: guille
*/
#include "date-delegate.h"
#include <utils.h>
#include <QDateEdit>
DateDelegate::DateDelegate()
: QStyledItemDelegate()
{
}
void DateDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index... | 2,144 | 646 |
//------------------------------------------------------------------------------
// physicsbody.cc
// (C) 2012-2016 Individual contributors, see AUTHORS file
//------------------------------------------------------------------------------
#include "stdneb.h"
#include "physics/physicsbody.h"
namespace Physics
{
#if (... | 642 | 210 |
#include "uv_secnet.hh"
#include <iostream>
#include <functional>
#include <string>
#include <sstream>
#include <uv.h>
#include <memory.h>
#include <memory>
#include <http_parser.h>
typedef struct {
int counter = 0;
std::shared_ptr<uv_secnet::IConnection> conn = 0;
uv_timer_t* timer = nullptr;
uv_tcp_t* tcpH... | 6,105 | 2,449 |
/**
* \file OSGB.cpp
* \brief Implementation for geographic_lib::OSGB class
*
* Copyright (c) Charles Karney (2010-2017) <charles@karney.com> and licensed
* under the MIT/X11 License. For more information, see
* https://geographiclib.sourceforge.io/
**************************************************************... | 5,461 | 1,972 |
/********************************************************************************
Copyright 2017 Frank Imeson and Stephen L. Smith
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:... | 16,195 | 4,865 |
/*
* Copyright 2016-2017 Nikolay Aleksiev. All rights reserved.
* License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE
*/
// Copyright Epic Games, Inc. All Rights Reserved.
// Modifications for Unreal Engine
#pragma once
#include "declare.hpp"
#include "imp_DepthStencil.hpp"
#include "ns.hpp"
#include ... | 4,486 | 1,532 |
// Example 7.12, page 198
// Schaum's Outline of Programming with C++ by John R. Hubbard
// Copyright McGraw-Hill, 1996
using namespace std;
#include <iostream>
// NOTA: ORMAI DEPRECATO DALLO STANDARD ATTUALE:
// EX0712.cc:10: warning: deprecated conversion from string constant to ‘char*’
int main()
{
char* nam... | 524 | 206 |
#include "config.h"
#include "utils.hpp"
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/log.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#include <string.h>
static void* OPENSSL_zalloc(size_t num)
{
vo... | 3,097 | 1,113 |
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar
#include <java/text/DateFormat_Field.hpp>
extern void unimplemented_(const char16_t* name);
java::text::DateFormat_Field::DateFormat_Field(const ::default_init_tag&)
: super(*static_cast< ::default_init_tag* >(0))
{
... | 5,463 | 1,890 |
/*
MIT LICENSE
Copyright (c) 2014-2021 Inertial Sense, Inc. - http://inertialsense.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights ... | 12,747 | 5,252 |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of... | 6,969 | 2,169 |
#include "ExplosionEvent.h"
Go::ExplosionEvent::ExplosionEvent(ModuleLibrary *module) : IEvent(module) { }
void Go::ExplosionEvent::Call(const alt::CEvent *ev)
{
static auto call = GET_FUNC(Library, "altExplosionEvent", bool (*)(alt::IPlayer* source, Entity target, Position position, short explosionType, unsigned... | 1,018 | 347 |
/*****************************************************************************
* Xidi
* DirectInput interface for XInput controllers.
*****************************************************************************
* Authored by Samuel Grossman
* Copyright (c) 2016-2021
********************************************... | 59,762 | 18,266 |
/* This project uses Automatic Package Restore feature of NuGet to resolve Aspose.Email for .NET
API reference when the project is build. Please check https://Docs.nuget.org/consume/nuget-faq
for more information. If you do not wish to use NuGet, you can manually download
Aspose.Email for .NET API from htt... | 3,467 | 1,149 |
#ifndef ENTT_ENTITY_SNAPSHOT_HPP
#define ENTT_ENTITY_SNAPSHOT_HPP
#include "../../TinySTL/array.h"
#include <cstddef>
#include <utility>
#include <cassert>
#include <iterator>
#include <type_traits>
#include "../../TinySTL/unordered_map.h"
#include "../config/config.h"
#include "entt_traits.hpp"
#include "utility.hpp... | 25,705 | 6,904 |
/*
* Copyright (c) The Shogun Machine Learning Toolbox
* Written (w) 2016 Soumyajit De
* 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... | 4,379 | 1,579 |
// Uncomment this to look for MPI-related memory leaks.
//#define COMPOSE_DEBUG_MPI
//>> cedr_kokkos.hpp
// COMPOSE version 1.0: Copyright 2018 NTESS. This software is released under
// the BSD license; see LICENSE in the top-level directory.
#ifndef INCLUDE_CEDR_KOKKOS_HPP
#define INCLUDE_CEDR_KOKKOS_HPP
#include <... | 230,744 | 93,504 |
// Copyright (c) 2007-2021 Hartmut Kaiser
//
// SPDX-License-Identifier: BSL-1.0
// 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)
#pragma once
#include <pika/config.hpp>
#include <pika/allocator_support/interna... | 21,081 | 6,408 |
// Copyright 2017 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 "garnet/lib/far/manifest.h"
#include <stdio.h>
#include "garnet/lib/far/archive_entry.h"
#include "garnet/lib/far/archive_writer.h"
#include "li... | 1,140 | 384 |
#include "Display.h"
#include <kinc/display.h>
using namespace Kore;
namespace {
const int MAXIMUM_DISPLAYS = 16;
Display displays[MAXIMUM_DISPLAYS];
}
void Display::init() {
kinc_display_init();
}
Display *Display::primary() {
displays[kinc_primary_display()]._index = kinc_primary_display();
return &displays... | 1,509 | 545 |
/**
* Copyright © 2017 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | 2,162 | 692 |
// Copyright (c) 2010-2020, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM library. For more information and source code
// availability visit ht... | 32,524 | 10,325 |
#include "utility.h"
#include "color.h"
#include "internal.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
static InstructionList dbgstk;
static ValueList dbglst;
/*
* user can trace back to function argument?
* only support simple wrapper
* r... | 35,676 | 12,436 |
// Author: b1tank
// Email: b1tank@outlook.com
//=================================
/*
138_copy-list-with-random-pointer LeetCode
Solution:
- hashmap
- "DNA" replication
- for the original linked list: cut and splice
*/
#include <iostream>
#include <unordered_map>
using namespace std... | 2,145 | 687 |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2021 Intel Corporation
#include "streaming/onevpl/accelerators/surface/dx11_frame_adapter.hpp"
#include "... | 9,532 | 3,178 |
/*
cppcryptfs : user-mode cryptographic virtual overlay filesystem.
Copyright (C) 2016-2019 Bailey Brown (github.com/bailey27/cppcryptfs)
cppcryptfs is based on the design of gocryptfs (github.com/rfjakob/gocryptfs)
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaini... | 6,590 | 2,409 |
#include "Entity.h"
Entity::Entity(float x, float y, float hitboxSize)
: x(x), y(y), hitboxSize(hitboxSize), acceleration(0.0f), velocity(0.0f), angle(0.0f), speedCap(0.0f), frictionF(0.0f), active(true)
{
}
void Entity::moveTo(float x, float y)
{
this->x = x;
this->y = y;
updateVertices();
}
void E... | 1,943 | 701 |
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | 3,157 | 980 |
#include "random.h"
#include <iostream>
using namespace std;
int main(int, char* argv[]) {
long long seed = atoll(argv[1]);
auto gen = Random(seed);
int n = 500'000 - 2;
int m = 500'000;
printf("p cnf %d %d\n", n, m);
// all same
for (int i = 1; i < n; i++) {
printf("%d %d 0\n"... | 652 | 289 |
//
// Created by Aloysio Galvão Lopes on 2020-05-30.
//
#include "utils/Texture.h"
#include "Bird.h"
std::vector<GLuint> Bird::textures;
Bird::Bird(Shaders &shaders, vcl::vec3 pos, float scale, vcl::vec3 speed, float turning) :
Object(true), dp(speed), turining(turning),
bird("../src/assets/models/bird.fbx",... | 2,482 | 948 |
// Generated by Haxe 4.2.0-rc.1+cb30bd580
#include <hxcpp.h>
#ifndef INCLUDED_95f339a1d026d52c
#define INCLUDED_95f339a1d026d52c
#include "hxMath.h"
#endif
#ifndef INCLUDED_Std
#include <Std.h>
#endif
#ifndef INCLUDED_fracs_Fracs
#include <fracs/Fracs.h>
#endif
#ifndef INCLUDED_fracs__Fraction_Fraction_Impl_
#include ... | 27,756 | 14,225 |
#include "packetreader.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <stdio.h>
#include <cstdio>
#include <cstring>
#include "scchk.h"
#define MAXPACKET 128
struct sockaddr_... | 3,769 | 1,690 |
#ifndef SD_TIMING_HPP
#define SD_TIMING_HPP
#include "Utility/Base.hpp"
#include <cstdint>
#include <queue>
#include <chrono>
namespace SD {
using ClockType = std::chrono::high_resolution_clock;
class SD_UTILITY_API Clock {
public:
Clock();
float GetElapsedMS() const;
// Restart the clock, and ret... | 832 | 315 |
#include <iostream>
#include <stack>
#define NMAX=10
using namespace std;
// A class is created to better implement the problem
class Bucket{
private:
stack <int> liter_list; // Is a stack where each element can be int(1)
int bucket_size;// Max size of bucket
public:
Bucket(int bucket_s... | 4,743 | 1,721 |
class Solution {
public:
int removeDuplicates(vector<int>& nums) {
int left = 0;
int n = nums.size();
for (int i = 0; i < n; ++i) {
if (!i or nums[i] != nums[i - 1]) {
nums[left++] = nums[i];
}
}
return left;
}
}; | 258 | 110 |
#ifdef RECKLESS_ENABLE_TRACE_LOG
#include <performance_log/trace_log.hpp>
#include <fstream>
#endif
#include <performance_log/performance_log.hpp>
#include <iostream>
#include <unistd.h>
#include LOG_INCLUDE
char c = 'A';
float pi = 3.1415;
int main()
{
unlink("log.txt");
performance_log::logger<4096, perfor... | 1,385 | 525 |
// Copyright 2020 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/global_media_controls/presentation_request_notification_producer.h"
#include <utility>
#include "base/unguessable_token.h"
#... | 9,773 | 2,639 |
////////////////////////////////////////////////////////////////////////////////
// pump.cpp
// (c) Andreas Müller
// see LICENSE.md
////////////////////////////////////////////////////////////////////////////////
#include "ledMatrix.h"
/////////////////////////////////////////////////////////////////////////////... | 2,400 | 899 |
//*****************************************************************************
// Copyright 2017-2020 Intel 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://w... | 3,034 | 799 |
/*
Copyright (c) 2007-2016 Contributors as noted in the AUTHORS file
This file is part of libzmq, the ZeroMQ core engine in C++.
libzmq is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Found... | 7,561 | 2,642 |
/*
* $Header: /Book/StatusBar.cpp 14 16.07.04 10:42 Oslph312 $
*
* NOTE: Both Toolbar and Statusbar are tailored to TextEdit.
* A more general approach would be to derive both from base classes.
*/
#include "precomp.h"
#include "Statusbar.h"
#include "MenuFont.h"
#include "HTML.h"
#include "InstanceSubclasser.... | 8,915 | 3,501 |
//*********************************************************
// Trip_Length_Data.cpp - trip length data class
//*********************************************************
#include "Trip_Length_Data.hpp"
//---------------------------------------------------------
// Trip_Length_Data constructor
//-----------------------... | 7,427 | 3,088 |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
//
// blood.cpp
//
#include "blood.hpp"
#include "context.hpp"
#include "info-region.hpp"
#include "level.hpp"
#include "random.hpp"
#include "screen-regions.h... | 3,692 | 1,528 |
#include "Button.hpp"
Button::Button( sf::Vector2f position, sf::Vector2f dimensions,
sf::Font* font, std::string text, unsigned character_size, bool hasBorder,
sf::Color text_idle_color, sf::Color text_hover_color, sf::Color text_active_color,
sf::Color idle_color, sf::Color h... | 3,996 | 1,293 |
#pragma once
#include <cstddef>
namespace thread_pool
{
void create(std::size_t size);
void destroy();
void block();
void schedule(void (*task)(void *), void * args);
}
| 195 | 68 |
// Copyright(c) 2017-2020, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and... | 36,434 | 13,797 |
static const char *divisionbyzero_errors[] = {
"test/errors/divisionbyzero/__idiv.yasl",
"test/errors/divisionbyzero/__mod.yasl",
};
| 137 | 56 |
// $Id: StjTrackCutDca.cxx,v 1.1 2008/11/27 07:09:32 tai Exp $
// Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
#include "StjTrackCutDca.h"
ClassImp(StjTrackCutDca)
| 169 | 99 |
/*
Description : Ticket Selling Booth
Function Date : 21 Nov 2020
Function Author : Prasad Dangare
Input : String,Integer
*/
#include<iostream>
#include<stdlib.h>
#include<conio.h>
using namespace std;
class ticketbooth
{
unsigned int no_people;
double totcash;
public:... | 1,170 | 482 |
#include "j1Pathfinding.h"
#include "j1App.h"
#include "j1Textures.h"
#include "p2Log.h"
#include"Character.h"
#include"j1Map.h"
#include"j1Enemy.h"
#include "Brofiler/Brofiler.h"
///class Pathfinding ------------------
// Constructors =======================
j1Pathfinding::j1Pathfinding()
{
}
// Destructors =======... | 9,084 | 3,821 |
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "ngraph/node.hpp"
#include "ngraph/op/op.hpp"
#include "openvino/op/mvn.hpp"
namespace ngraph {
namespace op {
namespace v0 {
using ov::op::v0::MVN;
} // namespace v0
using v0::MVN;
using ov::op::MVNEpsMode... | 422 | 180 |
#include "AdapterStats.h"
using reseq::AdapterStats;
#include <algorithm>
using std::max;
using std::max_element;
using std::min;
using std::sort;
#include <array>
using std::array;
#include <cmath>
using std::ceil;
#include <fstream>
using std::ifstream;
using std::ofstream;
#include <iterator>
using ... | 32,165 | 13,684 |
/*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this... | 28,688 | 10,865 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chat.h"
#include "base58.h"
#include "clientversion.h"
#include "net.h"
#inc... | 3,633 | 1,486 |
#include "SteppingRight.h"
void SteppingRight::entry(void) {
spdlog::info(" Stepping RIGHT");
trajectoryGenerator->initialiseTrajectory(robot->getCurrentMotion(), Foot::Left, robot->getJointStates());
robot->startNewTraj();
robot->setCurrentState(AlexState::StepR);
}
void SteppingRight::during(void) {
... | 432 | 149 |
// Copyright (c) 2013, Ford Motor Company
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this
// list of co... | 4,085 | 1,379 |
// CClientUse.cpp
// Copyright Menace Software (www.menasoft.com).
//
#include "graysvr.h" // predef header.
#include "cclient.h"
bool CClient::Cmd_Use_Item( CItem * pItem, bool fTestTouch )
{
// Assume we can see the target.
// called from Event_DoubleClick
... | 43,621 | 12,711 |
/*
* 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 may ... | 4,302 | 1,336 |
#include "logger.h"
//Mutex for cout
//Prevent interleaving of output
pthread_mutex_t coutMutex = PTHREAD_MUTEX_INITIALIZER;
| 131 | 55 |
/*****************************************************************************/
// Copyright 2006 Adobe Systems Incorporated
// 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.
/**********... | 3,793 | 1,397 |
/*
* Copyright 2009-2017 Alibaba Cloud 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... | 2,251 | 774 |
/*++
Copyright (c) Microsoft Corporation
Module Name:
FxPkgPdoUM.cpp
Abstract:
This module implements the Pnp package for Pdo devices.
Author:
Environment:
User mode only
Revision History:
--*/
#include "pnppriv.hpp"
#include <wdmguid.h>
// Tracing support
#if defined(EVENT_TRACING)
extern "C" {... | 2,269 | 880 |
// *******************************************************************************************************************************
// *******************************************************************************************************************************
//
// Name: sys_processor.cpp
// Purpose: Processor Emu... | 9,821 | 3,461 |
/********************************************************************************
* Copyright 2009 The Robotics Group, The Maersk Mc-Kinney Moller Institute,
* Faculty of Engineering, University of Southern Denmark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file exce... | 2,587 | 718 |
#include "UI/UISprite.h"
#include "TextureFileManager.h"
#include "Texture.h"
#include "AlphaMask.h"
//IMPLEMENT_AND_REGISTER_CLASS_INFO(UISprite, UISprite, 2DLayers);
IMPLEMENT_CLASS_INFO(UISprite)
UISprite::UISprite(const kstl::string& name, CLASS_NAME_TREE_ARG) :
UITexturedItem(name, PASS_CLASS_NAME_TREE_ARG)
, m... | 3,458 | 1,565 |
#include <iostream>
using namespace std;
int main() {
string s;
cout << "Other Successfully initiated." << endl;
while (cin >> s)
cout << "Success " << s << endl;
} | 185 | 58 |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int getRandomNum( void );
void correctAnswer();
void wrongAnswer();
int answerTheQuestion( int, int );
void askQuestions( int );
int main()
{
srand( (time(NULL)) );
askQuestions(10);
return 0;
}
int getRandomNum()
{
... | 2,489 | 842 |
/*
* AutoPublicAddress.cpp
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... | 1,920 | 635 |
/* ************************************************************************
* Copyright 2016-2019 Advanced Micro Devices, Inc.
* ************************************************************************ */
#include "handle.h"
#include "logging.h"
#include "rocblas.h"
#include "utility.h"
template <typename T, typenam... | 2,853 | 839 |
//
// Branched off piLibs (Copyright © 2015 Inigo Quilez, The MIT License), in 2015. See THIRD_PARTY_LICENSES.txt
//
#include <malloc.h>
#include "../../libBasics/piTypes.h"
#include "piBitInterlacer.h"
namespace ImmCore
{
namespace piBitInterlacer
{
BitStream::BitStream()
{
mBits = 0;
mState = 0;
}
... | 4,523 | 2,430 |
/*
* 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 applicable law ... | 5,208 | 1,684 |
#ifndef NEXMARK_FILTER_EVALUATOR_HPP
#define NEXMARK_FILTER_EVALUATOR_HPP
#include "core/SingleInputTransformEvaluator.h"
#include "Nexmark/NexmarkFilter.hpp"
/* convert a stream of records to a stream of <NexmarkRecord> records */
template <typename InputT,
typename OutputT,
template<class> class... | 1,462 | 438 |