text string | size int64 | token_count int64 |
|---|---|---|
/* Taken from
* https://github.com/FastFilter/fastfilter_cpp
* */
#ifndef FILTERS_WRAPPERS_HPP
#define FILTERS_WRAPPERS_HPP
#include <climits>
#include <iomanip>
#include <iostream>
#include <map>
#include <random>
#include <set>
#include <stdexcept>
#include <stdio.h>
#include <vector>
#include "../Bloom_Filter/b... | 33,660 | 11,257 |
// This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited.
#include <gtest/gtest.h>
#include <iostream>
#include <vector>
#include "formats/parquet/schema.h"
namespace starrocks::parquet {
class ParquetSchemaTest : public testing::Test {
public:
ParquetSchemaTest() {}
... | 26,359 | 9,349 |
class WebQueryTest;
#define TEST_FRIEND WebQueryTest;
#include <plugintest.h>
#include <QtGui/QGuiApplication>
#include "updaterserver.h"
using namespace QtAutoUpdater;
class WebQueryTest : public PluginTest
{
Q_OBJECT
protected:
bool init() override;
bool cleanup() override;
QString backend() const override;
Q... | 6,763 | 2,746 |
/* * Copyright (c) 2016 Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, ... | 4,341 | 1,593 |
#pragma once
#include "device/Device.hpp"
#include "debug/Font.hpp"
#include "rendering/Mesh.hpp"
namespace lucent
{
class TextMesh
{
public:
TextMesh(Device* device, const Font& font);
void SetScreenSize(uint32 width, uint32 height);
float Draw(const std::string& str, float x, float y, Color color = C... | 764 | 268 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
bool b[1005];
vector<vector<pair<ll,ll> > > vc(1005);
vector<vector<ll>> par(1005);
ll dis[1005][1005];
ll tr[1005];
void dij(ll i){
dis[i][i]=0;
// ll pr=i;
tr[i]=i;
priority_queue<pair<ll,ll>,vector<pair<ll,ll>>,greater<pair<ll,ll>> > pq;
pq.pus... | 1,365 | 780 |
//
// Created by James Noeckel on 10/13/20.
//
#include "reconstruction/ReconstructionData.h"
#include <opencv2/opencv.hpp>
using namespace Eigen;
void saveEpipolarLines(ReconstructionData &reconstruction) {
for (auto &pair : reconstruction.images) {
Vector3d origin1 = pair.second.origin();
double ... | 3,139 | 1,058 |
#include "pch.h"
#include "Asteroids.h"
#include "BasicTimer.h"
#define STRINGIFY(str) #str
#define PLAYER_ACCELERATION 100.0f
#define TURN_SPEED 200.0f
#define MAX_ASTEROIDS 32
#define MAX_FALLOUT_PER_ASTEROID 20
#define FALLOUT_INITIAL_VEL 500.0f
#define BULLET_SPEED 300.0f
#define DESTROYED_ASTEROID_SPEED 100.0f
#... | 44,406 | 16,551 |
/*=========================================================================
medInria
Copyright (c) INRIA 2013. All rights reserved.
See LICENSE.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
====... | 19,392 | 6,076 |
/*******************************************************************************
** Toolbox-base **
** MIT License **
** Copyright (c) [2018] [Florian Lance] ... | 28,059 | 9,257 |
// Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#include "utils/concord_eth_hash.hpp"
#include "utils/concord_eth_sign.hpp"
#include "utils/concord_utils.hpp"
#include "utils/rlp.hpp"
using namespace std;
using concord::utils::dehex;
using concord::utils::EthSign;
u... | 4,292 | 1,838 |
#include <QtCore>
#include <QDebug>
#include <QCoreApplication>
#include <iostream>
#include <unistd.h>
#include "dbusutil.h"
using namespace std;
ENUM_BUS g_session_bus = USE_SYSTEM_BUS;
void msgHandler(QtMsgType type, const QMessageLogContext& ctx, const QString& msg)
{
Q_UNUSED(ctx);
const char symbols[] ... | 2,787 | 999 |
#pragma once
namespace gem::expr
{
// Expression produced by the - operator
template <typename LHS, typename RHS>
class diff_expr
{
LHS const& m_lhs_expr;
RHS const& m_rhs_expr;
public:
using result_type
= gem::meta::sum<typename LHS::result_type,
... | 2,323 | 679 |
#include "MenuModelManager.hpp"
#include <cmath>
#include "../../ui/UiManager.hpp"
MenuModelManager::MenuModelManager()
: ModelManager(64) {
//
}
void MenuModelManager::updateOneTick() {
//
}
void MenuModelManager::draw(UiManager &uiManager) {
uiManager.setColorMask({1,1,1});
uiManager.set... | 1,170 | 529 |
#pragma once
#include "GpProtoHeaderValue.hpp"
#include "../Enums/GpEnums.hpp"
namespace GPlatform {
class GPNETWORK_API GpProtoHeaders: public GpTypeStructBase
{
public:
CLASS_DECLARE_DEFAULTS(GpProtoHeaders)
TYPE_STRUCT_DECLARE("88a01e4e-9105-4cd5-9990-4578ebb14b51"_sv)
public:
explicit ... | 5,738 | 1,581 |
/* Line.cpp (exercise 1.5.5)
Description:
* Declare Line class that represents a line in 2-D Euclidean space.
State Variables/Objects:
*Point p1, p2: Points in 2-D Euclidean space.
Member Functions:
*Line(): Default constructor (allocates memory for both state Point objects, sets their states to (0,0)).
*Line(const... | 3,991 | 1,351 |
// Copyright 2018 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 "third_party/blink/renderer/core/html/anchor_element_metrics_sender.h"
#include "base/metrics/histogram_macros.h"
#include "third_party/blink/pu... | 4,865 | 1,459 |
#include <signal.h> // our new library
extern volatile sig_atomic_t flag;
void delay(float time);
void defining_sigaction();
void my_handler(int signal); | 157 | 51 |
#include "meshFIM.h"
#include "Vec.h"
#include <math.h>
#include <sstream>
#include <fstream>
#include <stdio.h>
//#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
//#include <termios.h>
#define NB_ENABLE 0
#define NB_DISABLE 1
#ifndef PI
#define PI 3.1415927
#endif
#ifndef MIN
#d... | 80,205 | 30,440 |
#pragma once
#include "utilities.hpp"
class i_client_leaf_system
{
public:
void create_renderable_handle(void* obj)
{
return utilities::call_virtual< void, 0, std::uintptr_t, bool, int, int, std::uint32_t >(this, reinterpret_cast<std::uintptr_t>(obj) + 4, false, 0, -1, 0xFFFFFFFF);
}
}; | 294 | 124 |
/* This file is part of Cloudy and is copyright (C)1978-2019 by Gary J. Ferland and
* others. For conditions of distribution and use see copyright notice in license.txt */
/*InitCoreloadPostparse initialization at start, called from cloudy
* after parser one time per core load */
#include "cddefines.h"
#include "ini... | 1,597 | 657 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// TGUI - Texus's Graphical User Interface
// Copyright (C) 2012-2017 Bruno Van de Velde (vdv_b@tgui.eu)
//
// This software is provided 'as-is', without any express or implied warranty.
... | 8,167 | 2,604 |
//@HEADER
// ************************************************************************
//
// HPCCG: Simple Conjugate Gradient Benchmark Code
// Copyright (2006) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by... | 3,302 | 1,139 |
// Created on: 1994-04-21
// Created by: Christian CAILLET
// Copyright (c) 1994-1999 Matra Datavision
// Copyright (c) 1999-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 ... | 5,005 | 1,491 |
#pragma once
#include <anton/allocator.hpp>
#include <anton/assert.hpp>
#include <anton/iterators.hpp>
#include <anton/math/math.hpp>
#include <anton/memory.hpp>
#include <anton/swap.hpp>
#include <anton/tags.hpp>
#include <anton/type_traits.hpp>
#include <anton/utility.hpp>
namespace anton {
#define ANTON_ARRAY_MIN_... | 30,975 | 9,249 |
#include "stdafx.h"
using namespace std;
using namespace cv;
using namespace cvproc;
using namespace cvproc::imagematch;
void main()
{
cMatchManager mng;
mng.Init("match-script.txt", "@test");
cMatchResult *result = mng.m_sharedData.AllocMatchResult();
list<string> exts;
exts.push_back("jpg");
exts.push_back... | 802 | 310 |
version https://git-lfs.github.com/spec/v1
oid sha256:4bee13f1ae0dfeeb63f8afbdabf2f2c704da45573edd3063e914ae9149cba03c
size 2868
| 129 | 86 |
/*
* Semaphore.cpp
*
* Copyright (C) 2016 Cyrille Potereau
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include "Semaphore.h"
#include <time.h>
CSemaphore::CSemaphore (int32_t maxcount) :
m_MaxCnt(maxcount)
{
sem_init (&m_Sem... | 964 | 490 |
#include "Trainer.h"
using namespace std;
void Trainer::bindModel(Model* pm){
this->pm = pm;
}
void Trainer::bindDataset(const DataHolder* pd){
this->pd = pd;
}
void Trainer::prepare()
{
}
void Trainer::ready()
{
}
void Trainer::initBasic(const std::vector<std::string>& param)
{
this->param = param;
}
std::vec... | 965 | 368 |
// Copyright Take Vos 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
#include "momentary_button_widget.hpp"
namespace hi::inline v1 {
widget_constraints const &momentary_button_widget::set_constraints() n... | 1,563 | 502 |
//==================================================================================================
/**
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
**/
//==================================================================================================
#... | 1,513 | 699 |
#include <iostream>
#include "stdlib.h"
#include "math.h"
#include "UnitTest++.h"
#include <Epetra_MpiComm.h>
#include "Epetra_SerialComm.h"
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_ParameterXMLFileReader.hpp"
#include "CycleDriver.hh"
#include "eos_registration.hh"
#include "Mesh.hh"
#include "MeshFa... | 3,093 | 1,222 |
#include <date.h>
#include <gmock/gmock.h>
#include <boost/asio/buffer.hpp>
#include <reader.hpp>
#include <writer.hpp>
#include "SerializationTestTypes.hpp"
using namespace testing;
using namespace detail;
using namespace date;
using namespace std::chrono;
namespace asio = boost::asio;
template <size_t N>
class Rea... | 12,975 | 4,506 |
#include <climits>
#include <cmath>
#include <queue>
#include <vector>
using namespace std;
class Solution
{
public:
int minimumEffortPath(vector<vector<int>> &heights)
{
int M = heights.size(), N = heights[0].size();
priority_queue<pair<int, int>> q; //{effort,position}
vector<vector<int>> seen(M, vector<int>... | 997 | 497 |
/*
* Copyright 2019 pixiv Inc. All Rights Reserved.
*
* Use of this source code is governed by a license that can be
* found in the LICENSE.pixiv file in the root of the source tree.
*/
#include "api/media_stream_interface.h"
#include "rtc_base/ref_counted_object.h"
#include "sdk/c/api/media_stream_interface.h... | 5,810 | 1,897 |
//
// Created by kier on 2018/6/29.
//
#include "global/operator_factory.h"
#include <map>
#include <global/operator_factory.h>
#include "global/memory_device.h"
namespace ts {
using Name = std::pair<DeviceType, std::string>;
template<typename K, typename V>
using map = std::map<K, V>;
static map<... | 4,252 | 1,260 |
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: tensorflow_serving/apis/prediction_service.proto
#include "tensorflow_serving/apis/prediction_service.pb.h"
#include "tensorflow_serving/apis/prediction_service.grpc.pb.h"
#include <grpcpp/impl/codegen/async_stream.h>
... | 11,612 | 3,427 |
#include <iostream>
#include <math.h>
#include <random>
#include <vector>
#include <fstream>
#include <map>
#include <string>
#include <algorithm>
#include <mpi.h>
#include <omp.h>
#include "Randomize.h"
#include "Ising.h"
#include "ArrayUtilities.h"
/*
*
* This function runs totalS number of parallel chains each on... | 13,045 | 4,372 |
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2017 Realm 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/li... | 15,206 | 4,428 |
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | 907 | 309 |
#include "5_System_Processes.h"
#include "defines.h"
#include <EEPROM.h>
#include "Preferences.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "esp32-hal-log.h"
const char * my_nvs_errors[] = { "OTHER", "NOT_INITIALIZED", "NOT_FOUND", "TYPE_MISMATCH", "READ_ONLY", "NOT_ENOUGH_SPACE", "INVALID_NAME", "INVALID_HAND... | 12,451 | 4,608 |
#include "util.h"
#include "invoiceutil.h"
namespace InvoiceUtil {
bool validateInvoiceNumber(std::string input)
{
int size = input.size();
if(size > 32) {
return false;
}
for(int idx=0; idx < size; ++idx)
{
int ch = input.at(idx);
... | 1,103 | 338 |
#include "FragTrap.hpp"
#include "ScavTrap.hpp"
int main()
{
FragTrap frag_trap;
FragTrap R2D2("R2D2");
FragTrap test("BMO");
FragTrap BMO(test);
FragTrap test2("C-3PO");
FragTrap C_3PO = test2;
frag_trap.rangeAttack("Blue bird");
frag_trap.meleeAttack("Handsome Jack");
frag_trap.takeDamage(42);
frag_trap.t... | 656 | 353 |
// @HEADER
// ***********************************************************************
//
// Teuchos: Common Tools Package
// Copyright (2004) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of... | 4,381 | 1,452 |
/***********************************************************************************************************************
**
** Copyright (c) 2015 ETH Zurich
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
** following conditi... | 3,494 | 1,107 |
#include "ExecuteConfigSection.h"
#include "Messages.h"
#include <cstdio>
#include <cstring>
ExecuteConfigSection *g_executeConfig = NULL;
ExecuteConfigSection::ExecuteConfigSection() {}
ExecuteConfigSection::~ExecuteConfigSection() {}
CONFIG_SEC_RET ExecuteConfigSection::ProcessKeyValue(char *name, char *value) {
... | 1,420 | 491 |
/*
* Main authors:
* Roberto Castaneda Lozano <roberto.castaneda@ri.se>
*
* This file is part of Unison, see http://unison-code.github.io
*
* Copyright (c) 2016, RISE SICS AB
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted pr... | 3,990 | 1,463 |
#include "thread_group.h"
#include <algorithm>
#include <cassert>
namespace concurrencpp::details {
class thread_group_worker {
private:
task m_task;
std::thread m_thread;
thread_group& m_parent_pool;
typename std::list<thread_group_worker>::iterator m_self_it;
void execute_and_retire();
public:
th... | 3,422 | 1,270 |
/* Copyright (c) 2021 Xie Meiyi(xiemeiyi@hust.edu.cn) and OceanBase and/or its affiliates. All rights reserved.
miniob is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/Mulan... | 91,661 | 33,436 |
/**************************************************************
*
* 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 yo... | 3,777 | 1,288 |
//Approach #1 Brute Force [Accepted]
//Runtime: 24 ms, faster than 33.17% of C++ online submissions for Maximal Square.
//Memory Usage: 8.2 MB, less than 100.00% of C++ online submissions for Maximal Square.
//time: O((mn)^2), space: O(1)
class Solution {
public:
int maximalSquare(vector<vector<char>>& matrix) {
... | 3,680 | 1,205 |
#include "FalChatChannel.h"
#include "CEGUIPropertyHelper.h"
#include "falagard/CEGUIFalWidgetLookManager.h"
#include "falagard/CEGUIFalWidgetLookFeel.h"
// Start of CEGUI namespace section
namespace CEGUI
{
//===================================================================================
//
// FalagardChatCha... | 6,657 | 2,512 |
// Houzi Game Engine
// Copyright (c) 2018 Davide Corradi
// Licensed under the MIT license.
#include "hou/gfx/test_gfx_base.hpp"
#include "hou/gfx/graphics_state.hpp"
using namespace hou;
using namespace testing;
namespace hou
{
class test_graphics_state : public test_gfx_base
{
public:
static std::vector<ble... | 3,922 | 1,475 |
/************************************************************************************
**
* @copyright (c) 2013-2100, ChengDu Duyer Technology Co., LTD. All Right Reserved.
*
*************************************************************************************/
/**
* @file duye_epoll.cpp
* @version
* @brief ... | 3,899 | 1,643 |
#include "log.h"
#include "ioloop.h"
#include <memory>
#include <iostream>
void test() {
auto loop = IOLoop::loop();
error_c ec = loop->handle_CtrlC();
if (ec) {
std::cout<<"Ctrl-C handler error "<<ec<<std::endl;
return;
}
auto uart = loop->uart("UartEndpoint");
{
std::s... | 1,593 | 533 |
// Copyright (c) 2013-2017, Matt Godbolt
// 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 conditions... | 2,518 | 840 |
#include "App.h"
#define STAGES (4)
int main()
{
unsigned char *Input_data = (unsigned char *)malloc(FRAMES * FRAME_SIZE);
unsigned char *Temp_data[STAGES - 1];
unsigned char *Output_data = (unsigned char *)malloc(MAX_OUTPUT_SIZE);
if (Input_data == NULL)
Exit_with_error();
if (Output_data == NULL)
... | 1,549 | 631 |
#include <iostream>
int main() {
int k;
while (std::cin >> k, k) {
for (int m{k + 1}; true; m++) {
int pos{0};
int n{k * 2};
bool hasGood{false};
for (int i{1}; i <= k; i++) {
pos = (pos + m - 1) % n;
if (pos < k) {
... | 556 | 171 |
#pragma once
#include "../../Graphics/Material.hpp"
class EmissiveMaterial : public Material
{
public:
EmissiveMaterial(glm::vec3 col = glm::vec3(1, 1, 1));
~EmissiveMaterial();
void SetCol(glm::vec3 col) { m_Color = col; }
private:
void LoadTextures();
void AccessShaderAttributes();
void UploadDerivedVariable... | 388 | 149 |
//+------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1993.
//
// File: bm_qi.cxx
//
// Contents: Ole QueryInterface test
//
// Classes: CQueryInterfaceTest
//
// History: 1-July-93 t-martig Created
//
//-----... | 4,765 | 2,011 |
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "i2c-child.h"
#include <lib/sync/completion.h>
#include <threads.h>
#include <zircon/types.h>
#include <ddk/binding.h>
#include <ddk/debug.h>
#i... | 5,609 | 2,142 |
#include "graphics/Primitives.hpp"
#include <vector>
#include <glm/glm.hpp>
typedef glm::vec3 v3;
typedef glm::vec2 v2;
typedef glm::vec4 v4;
/*
p4 -- p3
| |
p1 -- p2
*/
void add_face(std::vector<v3>& v,
std::vector<v3>& n,
std::vector<v4>& c,
std::vector<v2>& t,
v3 p1,
v3 p2,
v3 p3,
... | 6,744 | 3,501 |
#include "LevSceneUtil.h"
#include "LevMeshObject.h"
#include "LevSceneObject.h"
#include "LevRAttrRenderObjectAttributeBinder.h"
namespace Leviathan
{
namespace Scene
{
bool LevSceneUtil::InitSceneNodeWithMeshFile(const char * mesh_file, unsigned scene_object_mask, LSPtr<LevSceneNode>& out_scene_node)
{
LSPt... | 17,006 | 7,236 |
#include "filereader.h"
ImageRotator::ImageRotator(const QString *pathToSourceSvg, const QString *pathToRendedImage, const QString *fileType, const QString *slash, const QString *svgType, QObject *parent)
: QObject(parent)
, m_file(new QFile())
, m_pathToSourceSvgFolder(pathToSourceSvg)
, m_pathToRende... | 2,409 | 932 |
/**
* @author hans@dkmt.io
* @date 2021-06-24
*/
#include "utils.h"
#include <chrono>
namespace dkcoro {
int64_t utils::current_time_millis() {
using std::chrono::duration_cast;
using std::chrono::milliseconds;
using std::chrono::system_clock;
auto now = system_clock::now();
return duration_cast<millis... | 702 | 271 |
/***************************************************/
/*! \class Mesh2D
\brief Two-dimensional rectilinear waveguide mesh class.
This class implements a rectilinear,
two-dimensional digital waveguide mesh
structure. For details, see Van Duyne and
Smith, "Physical Modeling with the 2-D Digital
... | 9,937 | 4,352 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// There are potenially several ways to solve this problem. This solution
// simply fills a two dimensional boolean array representing whether or
// not a commercial is on for each minute of each station's programming.
// Then, we traverse the arra... | 3,646 | 1,069 |
// Author: Adam Phillippy
/*
Copyright (C) 2016 Pawel Gajer (pgajer@gmail.com), Adam Phillippy and Jacques Ravel jravel@som.umaryland.edu
Permission to use, copy, modify, and distribute this software and its
documentation with or without modifications and for any purpose and
without fee is hereby granted, provided th... | 77,729 | 29,928 |
#ifndef _C4_REGEN_HPP_
#define _C4_REGEN_HPP_
#include "c4/regen/enum.hpp"
#include "c4/regen/function.hpp"
#include "c4/regen/class.hpp"
#include "c4/regen/writer.hpp"
#include <c4/c4_push.hpp>
namespace c4 {
namespace regen {
//-----------------------------------------------------------------------------
//------... | 3,450 | 1,105 |
#include "../include/aspose.h"
#include "../include/presentation.h"
#include "../include/slide.h"
#include "../include/islide_collection.h"
#include "../include/slide_size.h"
#include <phpcpp.h>
#include <iostream>
#include "../include/master-slide-collection.h"
#include "../include/image-collection.h"
using namespac... | 12,525 | 3,558 |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/secretsmanager/SecretsManagerErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using name... | 3,516 | 1,186 |
// For conditions of distribution and use, see copyright notice in License.txt
#include "../../Debug/Log.h"
#include "../../Debug/Profiler.h"
#include "../Shader.h"
#include "D3D11Graphics.h"
#include "D3D11ShaderVariation.h"
#include "D3D11VertexBuffer.h"
#include <d3d11.h>
#include <d3dcompiler.h>
#include "../../... | 5,848 | 2,024 |
// C++ headers
#include <cstring>
#include <iterator>
#include <string>
// {fmt} headers
#include <fmt/printf.h>
// CMSSW headers
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/Framework/interf... | 13,536 | 5,046 |
// WM_DRAWITEM, SS_OWNERDRAW|SS_NOTIFY, Bmp & hBmp -> global vars
// DPI resize.
/*
Copyright (c) 2014-2017 Maximus5
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code m... | 18,023 | 8,714 |
//
// sharpen_effect.cpp
// liveDemo
//
// Created by apple on 16/5/12.
// Copyright © 2016年 changba. All rights reserved.
//
#include "sharpen_effect.h"
#define LOG_TAG "SharpenEffect"
SharpenEffect::SharpenEffect() {
mVertexShader = SHARPEN_EFFECT_VERTEX_SHADER;
mFragmentShader = SHARPEN_EFFECT_FRAGMEN... | 2,655 | 840 |
#include <Arduino.h>
#include "loramesher.h"
LoraMesher *radio;
void setup() {
Serial.begin(9600);
radio = new LoraMesher();
}
void loop() {
sleep(7);
radio->sendDataPacket();
} | 190 | 84 |
// expect-success
/*
* Copyright 2014 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... | 1,490 | 520 |
// C++ Program to Implement Rolling Hash
#include <iostream>
#include <string>
using namespace std;
const unsigned PRIME_BASE = 257;
const unsigned PRIME_MOD = 1000000007;
/*
* Hash Function
*/
unsigned hash(const string& s)
{
long long ret = 0;
for (int i = 0; i < s.size(); i++)
{
ret = ret... | 1,602 | 624 |
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// Preprocessed version of "boost/mpl/list/list20.hpp" header
// -- DO NOT modify by hand!
namespace m... | 4,265 | 2,037 |
#include "precompiled.h"
#include "json_tests.h"
#include <boost/format.hpp>
#include <boost/static_assert.hpp>
#include <locale>
#include <stdarg.h>
#include <type_traits>
using namespace bond;
template <typename From, typename To>
const To& operator->*(const From& from, To& to)
{
bond::OutputBuffer buffer;
... | 7,276 | 2,733 |
#include "aap/android-application-context.h"
namespace aap {
// Android-specific API. Not sure if we would like to keep it in the host API - it is for plugins.
JavaVM *android_vm{nullptr};
jobject application_context{nullptr};
extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
android_vm = vm;
retu... | 1,215 | 393 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "PlatformConstantsModule.h"
#include <VersionHelpers.h>
using Method = facebook::xplat::module::CxxModule::Method;
#ifndef RNW_PKG_VERSION_MAJOR
#define RNW_PKG_VERSION_MAJOR 1000
#endif
#ifndef RNW_PKG_VERSION_MINOR
#d... | 1,854 | 599 |
// 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 "config.h"
#include "modules/screen_orientation/ScreenOrientationInspectorAgent.h"
#include "core/InspectorTypeBuilder.h"
#include "core/frame/L... | 4,190 | 1,097 |
/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
* Copyright 2008-2012 Pelican Mapping
* http://osgearth.org
*
* osgEarth 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; e... | 7,142 | 2,614 |
// Mono Native Fixture
// Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Namespace: System.Runtime.Serialization
// Name: IObjectReference
// C++ Typed Name: mscorlib::System::Runtime::Serialization::IObjectReference
#include <gtest/gtest.h>
#include <mscorlib/System/Runtime/... | 878 | 336 |
// 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/.
#ifndef OPENTXS_CASH_DIGITALCASH_HPP
#define OPENTXS_CASH_DIGI... | 1,249 | 485 |
#ifndef LOTHAR_UTILS_HH
#define LOTHAR_UTILS_HH
#include "utils.h"
#include "error_handling.hh"
#include <algorithm>
// a bit dirty, but avoid all tr1/c++11/whatever trickery by redeclaring shared_ptr in the lothar namespace
#ifdef HAVE_SHARED_PTR
#include <memory>
namespace lothar
{
template <typename T>
class... | 4,643 | 1,731 |
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#include <map>
#include "linker.h"
FILE *in; //for read module
FILE *out; //for output link result
/*offset of the current module
assume current module is I+1, the offset of I+1
will be LENGTH(0) + LENGTH(1) + ...... LENGTH(I)
where... | 9,093 | 3,493 |
#include "FileIO.h"
void FileIO::init(const char* gifDirName) {
// Set the gif directory name and open the dir
m_gifDirName = gifDirName;
m_gifDir = SPIFFS.openDir(m_gifDirName);
m_gifFileId = 0;
// Mount SPIFFS
if (SPIFFS.begin()) {
DEBUGLN("Mounted SPIFFS")
} else {
FATAL... | 2,344 | 865 |
#include "Entity.hpp"
void Entity::scheduleRemoval()
{
m_remove = true;
}
void Entity::update()
{
ext::for_each(m_components, [](auto* ptr)
{
if (ptr != nullptr && ptr->active)
ptr->update();
});
}
| 236 | 85 |
// Copyright 2013 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 "storage/common/data_element.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include "base/strings/string_number_conversions.... | 3,926 | 1,359 |
#include <string.h>
#include <sys/mman.h>
#include "thread_start.h"
#include "log.h"
#include "core.h"
#include "simulator.h"
#include "fixed_types.h"
#include "pin_config.h"
#include "tile_manager.h"
#include "thread_manager.h"
#include "thread_support.h"
int spawnThreadSpawner(CONTEXT *ctxt)
{
int res;
IntPt... | 9,164 | 3,248 |
// Copyright (c) Matthew Brecknell 2013.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
#include <iostream>
#include <string>
#include "tree.hpp"
typedef tree<int> tri;
int main() {
tri foo = tri(tri(tri(1... | 612 | 251 |
// Runs a plan with mpi enabled without mpirun. This differs from run_plan_mpi
// in the sense that the common world is formed by joining during runtime,
// instead of being set up by mpirun.
//
// This util assumes that you have a common path (like NFS) that multiple
// instances can read from.
#include <mpi.h>
#inc... | 2,253 | 857 |
//======================================================================
//-----------------------------------------------------------------------
/**
* @file printto.cpp
* @brief printto sample
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2014-2017, Takazumi Shirayanagi\n... | 3,478 | 1,322 |
/*
* 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,391 | 708 |
#include <hal/amp-1.0.0/amp-leds.h>
FreeRTOS::Semaphore AmpLeds::ledsReady = FreeRTOS::Semaphore("leds");
void AmpLeds::init() {
// setup the status led
status = new OneWireLED(NeoPixel, STATUS_LED, 0, 1);
(*status)[0] = lightOff;
}
void AmpLeds::deinit() {
delay(50);
}
void AmpLeds::process() {
ledsReady... | 3,960 | 1,455 |
// Return all non-negative integers of length N such that the absolute difference between every two consecutive digits is K.
// Note that every number in the answer must not have leading zeros except for the number 0 itself. For example, 01 has one leading zero and is invalid, but 0 is valid.
// You may return the an... | 1,284 | 507 |
//
// Copyright (c) .NET Foundation and Contributors
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#include "nf_system_collections.h"
HRESULT Library_nf_system_collections_System_Collections_Queue::CopyTo___VOI... | 2,405 | 988 |
/*
Copyright © 2018, Marko Ranta
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the fo... | 9,367 | 4,192 |