text string | size int64 | token_count int64 |
|---|---|---|
// MsgGetter.cpp --- Win32 message tracer
// Copyright (C) 2019 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
// This file is public domain software.
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_NON_CONFORMING_WCSTOK
#include "targetver.h"
#include <windows.h>
#include <windowsx.h>
#include <tchar.h>
#... | 17,093 | 6,709 |
#include "working_files.h"
#include "lex_utils.h"
#include "position.h"
#include <doctest/doctest.h>
#include <loguru.hpp>
#include <algorithm>
#include <climits>
#include <numeric>
namespace {
// When finding a best match of buffer line and index line, limit the max edit
// distance.
constexpr int kMaxDiff = 20;
... | 23,346 | 8,101 |
#include "common.h"
int startSentence;
int endSentence;
FILE* docOut = NULL;
bool showBadUTF = false; // log bad utf8 characer words
static bool blockComment = false;
bool singleSource = false; // in ReadDocument treat each line as an independent sentence
bool newline = false;
int docSampleRate = 0;
in... | 96,940 | 42,967 |
// Γράψτε ένα πρόγραμμα που να ορίζει μια κλάση Α με ένα ιδιωτικό μέλος δεδομένων που να είναι δείκτης προς πίνακα ακεραίων.
// Συμπληρώστε έναν κατασκευαστή αντιγραφής.
// Χρησιμοποιήστε τον κατασκευαστή αντιγραφής στη main.
#include <iostream>
using namespace std;
class A
{
private:
int n;
int *data;
pu... | 951 | 523 |
// Copyright 2018-2022, NVIDIA CORPORATION & AFFILIATES. 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... | 14,342 | 5,439 |
/*******************************************************************************
* Copyright 2017-2018 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://www.apa... | 10,043 | 4,009 |
#include <iostream>
#include <stack>
using namespace std;
struct TreeNode {
int value;
TreeNode *left;
TreeNode *right;
public:
TreeNode(int val) : value(val) {}
};
class Solution {
public:
void printAncestorsByValue(TreeNode *root, int x) {
stack<TreeNode *> st;
TreeNode *p = root;
TreeNode... | 1,225 | 443 |
// Copyright (c) 2015-2017 Francisco Jose Tapia
// Copyright (c) 2020 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)
#include <hpx/local/init.hpp>
#includ... | 4,601 | 2,187 |
// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
#define FILENAME(line) FILENAME_FOR_EXCEPTIONS("src/libawkward/builder/ArrayBuilder.cpp", line)
#include <sstream>
#include <stdexcept>
#include "awkward/common.h"
#include "awkward/Content.h"
#include "awkward/builder/ArrayBuil... | 11,163 | 3,786 |
/*
* Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 ... | 1,787 | 641 |
$NetBSD$
Support SunOS/gcc.
--- src/hotspot/os_cpu/solaris_x86/atomic_solaris_x86.hpp.orig 2019-01-08 09:40:30.000000000 +0000
+++ src/hotspot/os_cpu/solaris_x86/atomic_solaris_x86.hpp
@@ -27,11 +27,65 @@
// For Sun Studio - implementation is in solaris_x86_64.il.
+#ifdef __GNUC__
+inline int32_t _Atomic_add(int... | 3,568 | 1,468 |
#include "Entity.h"
namespace Engine
{
//[junk_enable /]
char* CBaseEntity::GetPlayerName()
{
if (IsPlayer())
{
static PlayerInfo Info;
if (Interfaces::Engine()->GetPlayerInfo(EntIndex(), &Info))
return Info.m_szPlayerName;
}
return "";
}
bool CBaseEntity::IsPlayer()
{
typedef bool(__thisc... | 8,034 | 3,540 |
/**************************************************************
*
* 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 y... | 10,452 | 3,834 |
// -*- C++ -*-
// Copyright (C) 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 Public License as published by the Free Software
// Foundation; either version ... | 4,013 | 1,351 |
/* ----------------------------------------------------------------------------
* 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
* ----... | 26,276 | 8,117 |
#define APPLICATIONMAIN
#include "CApplication.h"
#include "AvaraGL.h"
#include "Preferences.h"
#include "Types.h"
#include <SDL2/SDL.h>
#include <fstream>
#include <nanogui/nanogui.h>
#include <string>
#include <vector>
CApplication::CApplication(std::string title, int width, int height) :
nanogui::Screen(nanogui... | 2,495 | 834 |
/// @file
/// @copyright Copyright (c) 2017, Cycling '74
/// @author Timothy Place
/// @license Usage of this file and its contents is governed by the MIT License
#include "DspFilters/ChebyshevII.h"
using namespace Dsp::ChebyshevII::Design;
#include "../filter.h"
class chebyshev : public filter<chebyshev,false,true... | 1,408 | 592 |
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/Map.h>
namespace JS {
Map* Map::create(GlobalObject& global_object)
{
return global_object.heap().allocate<Map>(global_object, *global_object.map_prototype());
}
Map::Ma... | 586 | 232 |
#include "pch.h"
#include "libCloudundancy/UtilityComponents/FunctionCallers/Member/VoidOneArgMemberFunctionCaller.h" | 118 | 41 |
#include "dialog.h"
#include <QLabel>
#include <QLineEdit>
#include <QComboBox>
#include <QSpinBox>
#include <QPushButton>
#include <QGridLayout>
#include <QSettings>
#include <QApplication>
#include <QtSerialPort/QSerialPortInfo>
QT_USE_NAMESPACE
/*
#define ConstBaudRate 115200 //230400 для arduino nano, 115200 дл... | 7,198 | 2,818 |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... | 7,334 | 2,342 |
#include "visualization/viz-data-collector.h"
#include <mutex>
#include <string>
#include <tuple>
#include <unordered_map>
#include <Eigen/Core>
#include <aslam/common/unique-id.h>
#include <maplab-common/accessors.h>
#include <maplab-common/macros.h>
namespace visualization {
namespace internal {
const VizDataColle... | 1,947 | 704 |
/**
* @brief implementation of a power network used in calculations
*
* @file powerNet.cpp
* @author Luiz Victor Linhares Rocha
* @date 2018-09-22
* @copyright 2018
*/
#include <utility>
#include <iostream>
#include "powerNet.hpp"
#include "barra.hpp"
#include "branch.hpp"
#include "admitanceCalc.hpp"
#include... | 13,465 | 5,139 |
//
// Created by pedro on 8/28/17.
//
#include "Tests.h"
void Testing::test1() {
CPPUNIT_ASSERT(1);
}
| 108 | 55 |
/* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed wit... | 2,287 | 782 |
#include "core.hpp"
#include <cstdio>
namespace tap {
struct PeerObject::State {
enum {
DIRTY_FLAG = 1 << 0,
REFERENCE_FLAG = 1 << 1,
};
State() noexcept:
key(-1),
flags(0)
{
}
State(Key key, unsigned int flags) noexcept:
key(key),
flags(flags)
{
}
State &operator=(const State &other) noe... | 6,656 | 2,495 |
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010-2011 Thomas Heller
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... | 22,722 | 9,245 |
// This file automatically generated by create_export_module.py
#include <NumpyEigenConverter.hpp>
#define NUMPY_IMPORT_ARRAY_RETVAL
// function prototypes
void import_1_1_int();
void import_1_1_float();
void import_1_1_double();
void import_1_1_uchar();
void import_1_1_long();
void import_1_2_int();
void import_1_2_f... | 11,377 | 5,004 |
//
// Created by authetic on 2019/4/13.
//
/*
* 树的概念:
* 1. n个结点n-1条边
* 2. 结点的度(Degree):结点子树的个数
* 3. 树的度:所有结点中最大的度数
* 4. 结点的层次(Level):根结点层次为1,其它结点依次加1
* 5. 树的深度(Depth):树中所有结点的最大层次
* 6. n0表示叶结点的个数,n2度为2的结点个数
* 则n0 = n2 + 1
* (从边的角度考虑,
* n0+n1+n2-1 = n0*0 + n1*1 + n2*2
*
* 完全二叉树顺序存储
* 1. 结点i的父结点 = ... | 1,908 | 950 |
#ifndef OBJMGR_UTIL___SCORE_BUILDER_BASE__HPP
#define OBJMGR_UTIL___SCORE_BUILDER_BASE__HPP
/* $Id: score_builder_base.hpp 363131 2012-05-14 15:34:29Z whlavina $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* Nation... | 8,814 | 2,490 |
// Copyright (c) 2018 The Open-Transactions developers
// 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/.
// An OTTrade is derived from OTCronItem. OTCron has a list of... | 7,296 | 2,223 |
// Copyright (c) 2021 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 "net/quiche/common/platform/impl/quiche_test_impl.h"
#include <string>
namespace quiche {
namespace test {
std::string QuicheGetCommonSour... | 420 | 140 |
/**
\file
\author Kenta Suzuki
*/
#include "MotionPlannerDialog.h"
#include <cnoid/BodyItem>
#include <cnoid/Button>
#include <cnoid/CheckBox>
#include <cnoid/ComboBox>
#include <cnoid/EigenTypes>
#include <cnoid/JointPath>
#include <cnoid/MenuManager>
#include <cnoid/MeshGenerator>
#include <cnoid/MessageView>
... | 27,394 | 9,310 |
/*--------------------------------------------
Ternary search algorithm
Finds the maximum/minimum value of
any unimodal function
Here is an algorithm for finding the maximum
of a sample function f(x). Algorithm for
finding the minimum value is symmetrical
Time complexity - O(log(2/3)N)
---------------------------... | 676 | 266 |
// Copyright (C) 2004, 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 Public License as published by the
// Free Software Foundation; either version 2, or (at your o... | 1,193 | 446 |
/*
WhetStone, Version 2.2
Release name: naka-to.
Copyright 2010-201x held jointly by LANS/LANL, LBNL, and PNNL.
Amanzi is released under the three-clause BSD License.
The terms of use and "as is" disclaimer for this license are
provided in the top-level COPYRIGHT file.
Author: Konstantin Lipnikov (li... | 1,318 | 487 |
//=======================================================================
// Copyright 2013 University of Warsaw.
// Authors: Piotr Wygocki
//
// 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)
//===================... | 831 | 277 |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* vim: set ts=8 sts=2 et sw=2 tw=80:
* 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/. */
... | 8,370 | 2,838 |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MeshLoader.h"
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include "Modules/ModuleManager.h"
#include "Misc/FileHelper.h"
#include "IImageWrapper.h"
#include "Runtime/ImageWrapper/Pu... | 6,679 | 2,651 |
/*
* Copyright 2010 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkImageInfo.h"
#include "SkSafeMath.h"
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"
// These values must be constant over revisions, though they can be rena... | 8,250 | 2,967 |
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrTextureStripAtlas.h"
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrProxyProvider.h"
#include "GrSurfaceContext.h"
#include "SkGr.h"
#include "SkPix... | 11,895 | 3,845 |
// Copyright 1996-2020 Cyberbotics 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 or agr... | 5,124 | 2,054 |
// $Id: Foo_C_i.cpp 77008 2007-02-12 11:52:38Z johnnyw $
#include "Foo_C_i.h"
#include "AppShutdown.h"
#include "CustomExceptionC.h"
Foo_C_i::Foo_C_i()
{
for (unsigned i = 0; i < 10; i++)
{
this->count_[i] = 0;
}
}
Foo_C_i::~Foo_C_i()
{
}
void
Foo_C_i::op1(void)
{
++this->count_[0];
}
void
Foo... | 1,909 | 955 |
/**
* Touhou Community Reliant Automatic Patcher
* Main DLL
*
* ----
*
* Logging functions.
*/
#include "thcrap.h"
#include <io.h>
#include <fcntl.h>
#include <ThreadPool.h>
// -------
// Globals
// -------
static HANDLE log_file = INVALID_HANDLE_VALUE;
static bool console_open = false;
static ThreadPoo... | 12,697 | 5,661 |
#ifndef TP_TALLER_DE_PROGRAMACION_FIUBA_SPRITEENEMIGO_HPP
#define TP_TALLER_DE_PROGRAMACION_FIUBA_SPRITEENEMIGO_HPP
#include "Sprite.hpp"
class SpriteEnemigo : public Sprite{
public:
virtual void morir() = 0;
virtual bool seMostroElTiempoSuficienteEnPantalla() = 0;
bool debeEspejarse() con... | 562 | 235 |
#include <fcntl.h>
#include <unistd.h>
#include "tcp_helper.h"
SOCKET create_tcp_origin_sock()
{
return ::socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, IPPROTO_TCP);
}
bool set_linger_sock(SOCKET fd, int onoff, int linger)
{
struct linger slinger;
slinger.l_onoff = onoff ? 1 : 0;
slinger.l_linger =... | 1,873 | 888 |
#include "qsslserver.h"
#include <QFile>
#include <QCoreApplication>
#include <QSslKey>
#include <QSslCertificate>
#include <QSslCipher>
QSslServer::QSslServer(QObject *parent) :
QTcpServer(parent),
configuration(QSslConfiguration::defaultConfiguration()),
lastError(QAbstractSocket::UnknownSocketError),
... | 5,948 | 1,970 |
/**
* @file src/fileformat/types/dotnet_types/dotnet_type_reconstructor.cpp
* @brief Class for .NET reconstructor.
* @copyright (c) 2017 Avast Software, licensed under the MIT license
*/
#include <iostream>
#include "retdec/utils/conversion.h"
#include "retdec/utils/string.h"
#include "retdec/fileformat/types/dot... | 46,253 | 15,360 |
/* Copyright 2017 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... | 4,965 | 1,943 |
#ifndef BOOST_SERIALIZATION_COLLECTIONS_SAVE_IMP_HPP
#define BOOST_SERIALIZATION_COLLECTIONS_SAVE_IMP_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// collections_sav... | 1,795 | 567 |
/*
* Main.cpp
*
* The main program of the PAPR product firmware.
*
* KEEP THE MAIN LOOP RUNNING AT ALL TIMES. DO NOT USE DELAY().
* Be careful - this firmware keeps running even when the user does "Power Off".
* This code may need to run correctly for months at a time. Don't break this code!
* All code must wo... | 24,099 | 7,910 |
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Pu... | 18,768 | 6,340 |
#include <bits/stdc++.h>
#define fastio cin.tie(0)->sync_with_stdio(0)
using namespace std;
using ll = int64_t;
using ull = uint64_t;
using pll = pair<ll, ll>;
struct Random {
mt19937 rd;
Random() : rd((unsigned)chrono::steady_clock::now().time_since_epoch().count()) {}
Random(int seed) : rd(seed) {}
template<typ... | 3,009 | 1,579 |
// Copyright (c) 2000, 2001, 2002, 2003 by David Scherer and others.
// Copyright (c) 2003, 2004 by Jonathan Brandmeyer and others.
// See the file license.txt for complete license terms.
// See the file authors.txt for a complete list of contributors.
#include "renderable.hpp"
#include "material.hpp"
namespa... | 2,955 | 1,095 |
#include "ModuleRender.h"
#include "Label.h"
#include "Fonts.h"
#include "GUIElem.h"
#include "Application.h"
#include "ModuleInput.h"
Label::Label(fPoint position, LabelInfo& info, GUIElem* parent, Module* listener) : GUIElem(position, listener, {}, GUIElemType::LABEL, parent)
{
text = info.text;
font = App->fonts-... | 1,477 | 583 |
#include "test_server.h"
#include <iostream>
#include <unistd.h>
#include <gtest/gtest.h>
#include <sys/select.h>
#include <time.h>
#include <chrono>
#include <boost/any.hpp>
#include "coroutine.h"
#include "../gtest_exit.h"
#include "hook.h"
using namespace std;
using namespace co;
///select test points:
// 1.timeout... | 9,693 | 3,985 |
/** @file bcm.cpp
@brief A brief, one sentence description.
A more detailed multiline description...
@author Peter Drysdale, Felix Fung,
*/
// Main module header
#include "bcm.h" // BCM;
// Other nftsim headers
#include "configf.h" // Configf;
#include "de.h" // RK4;
// C++ standard library... | 1,604 | 730 |
#include <glib.h>
#include <string>
#include <pbnjson.hpp>
#include "UwbLogging.h"
#include "UwbServiceManager.h"
#include "uart_serial.h"
PmLogContext gUwbLogContext;
static const char* const logContextName = "webos-uwb-service";
int main(int argc, char *argv[]) {
PmLogErr status = PmLogGetContext(logContextNa... | 1,897 | 706 |
//==============================================================================
// This file is part of the SPNC project under the Apache License v2.0 by the
// Embedded Systems and Applications Group, TU Darmstadt.
// For the full copyright and license information, please view the LICENSE
// file that was distributed... | 4,378 | 1,342 |
class Solution {
public:
int maximumGap(vector<int>& nums) {
int n = nums.size();
if (n < 2) return 0;
int maxNum = *max_element(nums.begin(), nums.end());
int minNum = *min_element(nums.begin(), nums.end());
if (maxNum == minNum) return 0;
double bucketSize = (double... | 1,019 | 359 |
/**
* Copyright 2021 Huawei Technologies 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... | 4,975 | 1,860 |
// 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... | 31,578 | 9,996 |
// Created on: 2011-03-06
// Created by: Sergey ZERCHANINOV
// Copyright (c) 2011-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2... | 9,915 | 3,117 |
#include "ffmpeg.hpp"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <boost/process.hpp>
#define This StreamingFFMpegEncoder
namespace perceive::movie
{
namespace bp = boost::process;
// ----------------------------------------------------- call ffmpeg to make mp4
//
int call_ffm... | 5,119 | 1,519 |
#include "GameManager.h"
#include <iostream>
int main(int argc, char* args[])
{
GameManager *ptr = new GameManager();
bool status = ptr->OnCreate();
if (status == true) {
ptr->Run();
}
else if (status == false) {
/// You should have learned about stderr (std::cerr) in Operating Systems
std::cerr << "Fatal ... | 405 | 144 |
/*
* VMatrix.cpp
*
* Created on: Feb 15, 2012
* Author: kleinwrt
*/
/** \file
* VMatrix methods.
*
* \author Claus Kleinwort, DESY, 2011 (Claus.Kleinwort@desy.de)
*
* \copyright
* Copyright (c) 2011 - 2016 Deutsches Elektronen-Synchroton,
* Member of the Helmholtz Association, (DESY), HAMBURG, G... | 13,157 | 4,775 |
/*
* Thread Implementation
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* @file: nana/threads/thread.hpp
*/
#ifndef NANA_THREADS_THREAD_HPP
#def... | 1,636 | 699 |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
#include "config.h"
#include "ClientQueryOptions.h"
namespace blink {
Cli... | 488 | 161 |
#ifndef STAN_LANG_AST_FUN_IS_SPACE_DEF_HPP
#define STAN_LANG_AST_FUN_IS_SPACE_DEF_HPP
#include <stan/lang/ast/fun/is_space.hpp>
namespace stan {
namespace lang {
bool is_space(char c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t';
}
}
}
#endif
| 277 | 127 |
/*
* PVPFile.hpp
*
* Created on: Jun 4, 2014
* Author: pschultz
*
* The goal of the PVPFile class is to encapsulate all interaction with
* PVPFiles---opening and closing, reading and writing, gathering and
* scattering---into a form where, even in the MPI context, all processes
* call the same public met... | 1,671 | 591 |
#include "Texture.h"
#include <SOIL/SOIL.h>
#include "common.h"
#include "debug.h"
#include "util.h"
namespace prb {
void Texture::defInit(unsigned char* data) {
D3D11_TEXTURE2D_DESC tdesc;
// ...
// Fill out width, height, mip levels, format, etc...
// ...
tdesc.Width... | 12,129 | 4,460 |
#include "Grid.h"
#include "DrawTarget.h"
namespace blocks {
void Grid::computeLine(const sb::Vector2f& start, const sb::Vector2f& end) {
Line line(_thickness, _color);
line.addPoint(start);
line.addPoint(end);
_vertices.insert(_vertices.end(), line.getVertices().begin(), line.getVertices().end());
... | 1,566 | 616 |
/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2012 UniPro <ugene@unipro.ru>
* http://ugene.unipro.ru
*
* 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... | 10,794 | 3,392 |
/* Copyright 2020 Alexey Chernov <4ernov@gmail.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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... | 3,589 | 1,175 |
//
// Test Object which contains:
// - Two errors to be found by clang-tidy.
// - Test coverage for all lines except the ones marked with 'no coverage'.
//
int called_always() {
#ifdef _DEBUG
const char sz[] = "Debug"; // testing: deliberate error for clang-tidy
#else
const char sz[] = "Release"; // testing:... | 716 | 221 |
// Copyright 2021 The BladeDISC 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 l... | 1,495 | 522 |
// 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 "ppapi/proxy/ppb_flash_menu_proxy.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_flash_menu.h"
#include "ppapi/proxy/enter_... | 5,304 | 1,873 |
/* Copyright (c) 2021 Mitya Selivanov
*
* This file is part of the Laplace project.
*
* Laplace is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the MIT License for more details.
... | 7,149 | 3,213 |
#include "pch.h"
#include <cstdarg>
void aiLogPrint(const char* fmt, ...)
{
va_list vl;
va_start(vl, fmt);
#ifdef _WIN32
char buf[2048];
vsprintf(buf, fmt, vl);
::OutputDebugStringA(buf);
::OutputDebugStringA("\n");
#else
vprintf(fmt, vl);
#endif
va_end(vl);
}
void aiLo... | 591 | 251 |
#include "Framework/FrameworkTest.h"
#include "ShaderCompiler.h"
#include "System/Path.h"
// ***********************
// Tries to compile and link all shaders in combination folder.
SIMPLE_FRAMEWORK_TEST_IN_SUITE( Shaders_Compilation, TestCombinations )
{
auto vsShadersList = Path::List( "Assets/S... | 553 | 200 |
template<typename T,
template<typename Elem> class Cont = std::deque>
class Stack {
private:
Cont<T> elems; // elements
public:
void push(T const&); // push element
void pop(); // pop element
T const& top() const; // return top element
bool empty()... | 421 | 116 |
#include <CtrlLib/CtrlLib.h>
#include "SplitterButton.h"
namespace Upp {
SplitterButton::SplitterButton() {
Add(splitter.SizePos());
Add(button1.LeftPosZ(80, 10).TopPosZ(30, 40));
Add(button2.LeftPosZ(80, 10).TopPosZ(30, 40));
splitter.WhenLayout = THISBACK(OnLayout);
button1.WhenAction = THISBACK1(SetButton... | 4,580 | 1,917 |
// base/kaldi-utils.cc
// Copyright 2009-2011 Karel Vesely; Yanmin Qian; Microsoft Corporation
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtai... | 1,471 | 547 |
#include <QTimer>
#include "NoOpReply.h"
NoOpReply::NoOpReply(QNetworkRequest &request, QObject *parent) : QNetworkReply(parent) {
open(ReadOnly | Unbuffered);
setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 200);
setHeader(QNetworkRequest::ContentLengthHeader, QVariant(0));
setHeader(QNetworkRequest::C... | 774 | 302 |
#ifndef FTXUI_COMPONENT_CHECKBOX_HPP
#define FTXUI_COMPONENT_CHECKBOX_HPP
#include <functional> // for function
#include <string> // for allocator, wstring
#include "ftxui/component/component.hpp" // for Component
#include "ftxui/component/component_base.hpp" // for ComponentBase
#include "ftxui/dom/elem... | 1,941 | 643 |
#ifndef SWT_PLUS_PLUS_RESOURCE_H
#define SWT_PLUS_PLUS_RESOURCE_H
namespace swt
{
class Resource {
public:
};
}
#endif //SWT_PLUS_PLUS_RESOURCE_H
| 161 | 78 |
#include "SerialWombat.h"
SerialWombatWS2812::SerialWombatWS2812(SerialWombat& serialWombat)
{
_sw = &serialWombat;
}
int16_t SerialWombatWS2812::begin(uint8_t pin, uint8_t numberOfLEDs, uint16_t userBufferIndex)
{
_pin = pin;
_numLEDS = numberOfLEDs;
_userBufferIndex = userBufferIndex;
uint8_t tx[8] = { 200,_... | 2,603 | 1,335 |
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/... | 1,949 | 676 |
/**
* @file
* @copyright defined in enumivo/LICENSE
*/
#pragma once
#include <enumivo/chain/types.hpp>
#include <fc/io/raw.hpp>
#include <softfloat.hpp>
namespace enumivo { namespace chain {
template<typename ...Indices>
class index_set;
template<typename Index>
class index_utils {
public:
... | 6,506 | 2,185 |
#include "../include/coefficient.hpp"
#include <iostream>
#include <random>
#include <vector>
using DwellRegions::Coefficient;
auto
generate_random_coefficients(size_t num_points)
{
std::random_device rd; // Will be used to obtain a seed for the random number engine
std::mt19937 gen(rd()); // Standard mersenne_... | 3,411 | 1,136 |
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// rcpp_parse_rmd
void rcpp_parse_rmd(const std::string filename, const std::string tempfile);
RcppExport SEXP _srr_rcpp_parse_rmd(SEXP filenameSEXP,... | 913 | 376 |
#include <bdlb_arrayutil.h>
#include <bdlb_bitutil.h>
#include <bdld_datummaker.h>
#include <bdldfp_decimal.h>
#include <bdldfp_decimalutil.h>
#include <bsl_algorithm.h>
#include <bsl_cmath.h>
#include <bsl_functional.h>
#include <bsl_limits.h>
#include <bsl_numeric.h>
#include <bsl_utility.h>
#include <bslmf_assert.h>... | 18,036 | 5,652 |
#include "echo_server.h"
#include <msgpack/rpc/server.h>
#include <msgpack/rpc/client.h>
#include <cclog/cclog.h>
#include <cclog/cclog_tty.h>
int main(void)
{
cclog::reset(new cclog_tty(cclog::TRACE, std::cout));
signal(SIGPIPE, SIG_IGN);
// run server {
rpc::server svr;
std::auto_ptr<rpc::dispatcher> dp(new m... | 658 | 307 |
// Copyright 2020 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 "aml-power.h"
#include <lib/device-protocol/pdev.h>
#include <algorithm>
#include <ddk/binding.h>
#include <ddk/debug.h>
#include <ddk/platform... | 15,046 | 5,737 |
/**********************************************************************
* Copyright (c) 2008-2016, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Fre... | 7,084 | 2,027 |
#include "Shader.h"
#include <fstream>
#include <iostream>
using namespace std;
namespace DDG
{
Shader::Shader( void )
// constructor -- shader is initially invalid
: vertexShader( 0 ),
fragmentShader( 0 ),
geometryShader( 0 ),
program( 0 ),
linked( false )
{}
Shader::~Shader( void... | 3,148 | 1,023 |
// SPDX-License-Identifier: MIT
/*
* Copyright 2006-2012 Red Hat, Inc.
* Copyright 2018-2021 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
*
* Author: Adam Jackson <ajax@nwnk.net>
* Maintainer: Hans Verkuil <hverkuil-cisco@xs4all.nl>
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#... | 9,205 | 4,818 |
#include <iostream>
#include <cstring>
using namespace std;
// class declaration
class Node
{
public:
char data;
Node *next;
} *head = NULL;
void append(char data)
{
// adds the element to the top of Stack
Node *newnode = new Node();
newnode->data = data;
newnode->next = NULL;
if (head == ... | 1,263 | 392 |
/* --------------------------------------------------------------------------
CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 Bradley M. Bell
CppAD is distributed under the terms of the
Eclipse Public License Version 2.0.
This Source Code may also be made available under the following
Secon... | 13,167 | 4,252 |
/*-
* Copyright 2021 Vsevolod Stakhov
*
* 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... | 9,495 | 3,979 |