text string | size int64 | token_count int64 |
|---|---|---|
#include "gl/context.h"
#include "gl/environment.h"
#include "gl/mockglfw.h"
#include "gl/mockglxw.h"
#include <gmock/gmock.h>
using namespace gxy;
using testing::_;
using testing::InSequence;
using testing::NiceMock;
using testing::Return;
struct Fixture : public testing::Test
{
const int width{42};
const int... | 3,357 | 1,304 |
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
**********************************************... | 5,904 | 2,014 |
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int b[100]; //static
cout<<sizeof(b)<<endl;
cout<<b<<endl; //symbol table
int * a=new int[n]; //dynamic
cout<<sizeof(a)<<endl;
cout<<a<<endl;
for(int i=0;i<n;i++){
cin>>a[i];
cout<<a[i]<<" ";
}
cout<<endl;
delete []... | 325 | 147 |
#ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
#include "CoarseAverageFace.H"
#include "AverageFaceF_F.H"
#include "Namespac... | 7,355 | 2,344 |
// PX2BeamEmitter.inl
//----------------------------------------------------------------------------
inline void BeamEmitter::SetEmitRate (float rate)
{
mEmitRate = rate;
}
//----------------------------------------------------------------------------
inline float BeamEmitter::GetEmitRate () const
{
return mEmitRate... | 4,721 | 1,132 |
// SPDX-License-Identifier: Apache-2.0
#include "gtest/gtest.h"
#include "kompute/Kompute.hpp"
#include "kompute_test/Shader.hpp"
TEST(TestSpecializationConstants, TestTwoConstants)
{
{
std::string shader(R"(
#version 450
layout (constant_id = 0) const float cOne = 1;
layou... | 3,420 | 1,166 |
#pragma once
// libJSON lib
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4100) // unreferenced formal parameter.
#pragma warning(disable : 4127) // conditional expression is constant.
#endif
#include "libjson_7.6.1/libjson.h"
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#include <string>
#include <sta... | 4,859 | 1,284 |
//
// Created by Jakub Gert on 20/06/2020.
//
#include <QObject>
#include <QTest>
#include "tests/TestSuite.h"
#include "ResponseMessageParser.h"
class ResponseMessageParserTests : public TestSuite {
Q_OBJECT
private slots:
void testInvalid() {
ResponseMessageParser parser;
auto result = parser.... | 1,005 | 322 |
#pragma once
#include <math.h>
#include <napi.h>
#include <webp/encode.h>
#include "format.hpp"
#include "image.hpp"
namespace nodeWebp {
class Encoder : public Napi::AsyncWorker {
private:
uint8_t* buffer = nullptr;
Napi::Promise::Deferred promise;
float_t quality = 0;
uint64_t size = 0;
... | 619 | 273 |
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
b... | 10,245 | 3,697 |
//$Id: TDRSSTwoWayRange.hpp 1398 2011-04-21 20:39:37Z $
//------------------------------------------------------------------------------
// TDRSSTwoWayRange
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool
//
// Copyright (c... | 3,252 | 968 |
//
// group.cc:
//
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <X11/Xlib.h>
#include <local_types.h>
#include <list.h>
#include <eedefs.h>
#include <shape.h>
#include <shapeset.h>
#include <frame.h>
#include <xcontext.h>
#include <board.h>
#include <group.h>
#include <misc.... | 14,017 | 6,342 |
#include <iostream>
#include <thread>
#include "elemental.hpp"
#include "sparse_matrix.hpp"
#include "matrix_generator.hpp"
#include "delimited_file.hpp"
#include "index_set.hpp"
#include "random.hpp"
#include "timer.hpp"
using std::cout;
using std::cerr;
using std::endl;
// For the NMF formulation A~WH, we need the ... | 14,525 | 5,447 |
/*
Copyright (c) 2014-2016 DataStax
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | 2,722 | 955 |
/*
MIT License
Android remote Viewer, GUI ADB tools
Android Viewer developed to view and control your android device from a PC.
ADB exchange Android Viewer, support scale view, input tap from mouse,
input swipe from keyboard, save/copy screenshot, etc..
Copyright (c) 2016-2019 PS
GitHub: ... | 14,895 | 5,029 |
#include "System.h"
#include <winuser.h>
#include <iostream>
#include <fstream>
System::System() : m_initializationFailed(false), m_applicationName(nullptr), m_hInstance(nullptr), m_hwnd(nullptr), m_input(nullptr), m_graphics(nullptr) {
auto screenWidth = 0;
auto screenHeight = 0;
//Initialize the Windows API
Ini... | 11,629 | 4,229 |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <algorithm>
using namespace std;
typedef long long LL;
typedef long double DB;
const int maxn = 201, maxm = maxn * maxn, maxs = 13;
const DB eps = 1e-8, INF = 1e4;
inline int sgn(DB x) {
assert(!std::isnan(x));
return (x > eps) - (x < -... | 3,353 | 1,891 |
#include "../mainwindow.h"
#include "pinwidget.h"
#include "ui_pinwidget.h"
#include <QMessageBox>
using namespace Vipster;
PinWidget::PinWidget(QWidget *parent) :
BaseWidget(parent),
ui(new Ui::PinWidget)
{
ui->setupUi(this);
}
PinWidget::~PinWidget()
{
delete ui;
}
void PinWidget::updateWidget(GUI... | 8,468 | 2,881 |
// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
// Allow implicit conversion from char16_t* to UnicodeString for this file:
// Helpful in toString methods and elsewhere.
#define UNISTR_FROM_STRING_E... | 17,114 | 4,891 |
#include "UnitEventOperator.h"
#include "../UnitBehavior.h"
UnitEventOperator::UnitEventOperator(SharedParams_t params) : UnitEventBase(params)
{
}
UnitEventOperator::~UnitEventOperator(void)
{
}
// Выполняется ли условие
bool UnitEventOperator::IsApprove( core::array<Event_t*>& events )
{
return true;
}
| 312 | 110 |
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
#include <memory>
#include <popart/op/reducemedian.hpp>
#include <popart/opmanager.hpp>
namespace popart {
ReduceMedianOp::ReduceMedianOp(
const OperatorIdentifier &opid,
const nonstd::optional<std::vector<int64_t>> &axes,
int64_t keepdims,
con... | 3,114 | 1,015 |
#include "dtlz.h"
namespace dtlz
{
#define PI 3.1415926535897932384626433832795
void DTLZ1(const double *x, double* f, const unsigned no_vars, const unsigned no_objs)
{
int i = 0;
int j = 0;
int n = no_vars;
int k = n - no_objs + 1;
double g = 0;
for (i = n - k + 1; i <= n; i++)
{
g += p... | 4,159 | 2,236 |
// Copyright (c) 2010 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/speech/speech_recognition_request.h"
#include <vector>
#include "app/l10n_util.h"
#include "base/json/json_reader.h"
#inclu... | 6,950 | 2,169 |
/* Copyright (c) 2019, isaponsoft (Isao Shibuya) All rights reserved. *
* Use of this source code is governed by a BSD-style license that *
* can be found in the LICENSE file. */
#ifndef __libamtrs__graphics__opengl__devices_shader__hpp
#define __libamtrs__graphics__opengl__device... | 5,396 | 2,535 |
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... | 14,579 | 5,011 |
//
// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#include <MaterialXTest/Catch/catch.hpp>
#include <MaterialXCore/Document.h>
namespace mx = MaterialX;
TEST_CASE("Document", "[document]")
{
// Create a document.
mx::Document... | 3,482 | 1,132 |
#include <string>
#include <fstream>
#include <sstream>
#include <iostream>
#include <vector>
using namespace std;
string SRC = "src/";
string WG_SRC = SRC + "webgraph/";
struct Execution{
FILE* f;
int retCode;
Execution(FILE* f, int retCode){
this->f = f;
this->retCode = retCode;
}
};
bool startswith(const ... | 10,937 | 4,819 |
/*
* Copyright (c) Meta, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "gtn/gtn.h"
using namespace gtn;
using namespace gtn::criterion;
n... | 680 | 258 |
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file depthWriteAttrib.cxx
*... | 3,659 | 1,183 |
#pragma once
#include "../pch.h"
#include "../gstd/GstdLib.hpp"
#include "DxTypes.hpp"
#if defined(DNH_PROJ_EXECUTOR)
#include "Vertex.hpp"
#endif | 149 | 68 |
/* 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... | 6,307 | 1,819 |
/******************************************************************************
* Copyright (c) 2020, Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
*
*****************************************************************************/
#include "sct_assert.h"
#include ... | 18,257 | 7,518 |
/*
* File name: Folder.impl.hpp
* Description: 文件夹类,用于捕捉所有文件夹下的非隐藏文件
* Author: 王锦润
* Version: 2
* Date: 2019.6.11
* History: 此程序被纳入git,可以直接使用git查询。
*/
//防卫式声明,必须要有
//就算没有重复包含也建议有,这是代码习惯
#ifndef _FOLDER_IMPL_HPP_
#define _FOLDER_IMPL_HPP_
#include "Folder.hpp"
#include <algorithm>
#include <iostream>
using std::c... | 3,191 | 1,558 |
#ifdef IZENELIB_DRIVER_VALUE_INLINE
/**
* @file izenelib/driver/value/size.inl
* @author Ian Yang
* @date Created <2010-06-08 11:31:29>
* @brief Gets size of a value
*/
namespace izenelib {
namespace driver {
namespace detail {
class ValueSizeVisitor : public boost::static_visitor<std::size_t>
{
public:
type... | 1,096 | 385 |
// Problema 18 - Fisa Gradinariu (TEMA)
#include "pch.h"
#include "fstream"
#include "iostream"
using namespace std;
// ifstream fin("date.in");
// ofstream fout("date.out");
int index = 1, v[101], suma1, suma2, aux1, aux2;
int main()
{
int x;
cin >> x;
while (x != 0) {
v[index] = x;
index++;
cin >> x;
}
... | 667 | 370 |
/* Copyright © 2017 Ezer IT Consulting.
* Released under an MIT License.
*/
#include <deque>
#include <map>
#include <string>
#include <iostream>
#include "util.hpp"
#include "translit_handler.hpp"
#include "hebrew_transliterator.hpp"
using namespace std;
struct translit_strings {
string g_word_translit;
... | 8,727 | 3,152 |
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... | 2,888 | 877 |
#include <pbdata/saf/AlnGroup.hpp>
int AlnGroup::FindPath(unsigned int idKey, std::string &val)
{
for (size_t i = 0; i < id.size(); i++) {
if (idKey == id[i]) {
val = path[i];
return 1;
}
}
return 0;
}
| 255 | 101 |
// OutputForce.cc
//
// Description:
// Implementation of output routine for writing a list of force coefficients.
//
// Author(s):
// Clancy Rowley
// Steve Brunton
//
// Date: 22 Aug 2008
//
// $Revision$
// $LastChangedDate$
// $LastChangedBy$
// $HeadURL$
#include "OutputForce.h"
#include "BaseFlow.h"
#include "St... | 2,177 | 764 |
// Copyright 2017 Rainer Gemulla
//
// 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 applica... | 7,418 | 2,843 |
// client.cpp
// Implementation of the client class for the mqtt C++ client library.
/*******************************************************************************
* Copyright (c) 2013-2017 Frank Pagliughi <fpagliughi@mindspring.com>
*
* All rights reserved. This program and the accompanying materials
* are made... | 2,433 | 740 |
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
// This is a GPU-backend specific test. It relies on static intializers to work
#include "SkTypes.h"
#if defined(SK_VULKAN)
#include "GrContextFactory.h"
#include "GrContex... | 4,484 | 1,380 |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2020 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... | 8,952 | 2,987 |
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/context/context.h"
#include "cl_api_tests.h"
using namespace NEO;
typedef api_tests clRetainReleaseSamplerTests;
namespace ULT {
TEST_F(clRetainReleaseSamplerTests, GivenValidSamplerWhenRetainingThenSamplerR... | 1,431 | 543 |
//
// Distributed Linear Algebra with Future (DLAF)
//
// Copyright (c) 2018-2019, ETH Zurich
// All rights reserved.
//
// Please, refer to the LICENSE file in the root directory.
// SPDX-License-Identifier: BSD-3-Clause
//
#include "dlaf/common/data_descriptor.h"
#include <memory>
#include <type_traits>
#include <... | 27,372 | 9,882 |
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be... | 4,607 | 2,060 |
#include "RtcClientPch.h"
#include "RtcClient.h"
#include <grpc++/channel_interface.h>
#include <grpc++/client_context.h>
#include <grpc++/status.h>
#include <grpc++/stream.h>
using grpc::CompletionQueue;
using grpc::ChannelInterface;
using grpc::ClientContext;
using grpc::ClientReader;
using grpc::ClientReaderWriter;... | 5,199 | 1,632 |
#ifndef TEST
#include "CalcScreen.h"
#include "../Any/View.h"
#include <SDL.h>
#include "../Any/Enums.h"
#include "../Struct/Pair.h"
#include "../Struct/Message.h"
#include "../Struct/Rect.h"
#include "../Struct/Point.h"
#include "../Struct/Size.h"
namespace ii887522::Calculator
{
CalcScreen::CalcScreen(SDL_Renderer... | 1,392 | 543 |
#include <mbgl/storage/asset_file_source.hpp>
#include <mbgl/storage/file_source_request.hpp>
#include <mbgl/storage/local_file_request.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/util/string.hpp>
#include <mbgl/util/thread.hpp>
#include <mbgl/util/url.hpp>
namespace {
const std::string assetProtocol = "... | 1,740 | 536 |
#include "libews.h"
#include "ewsnNotificationServiceBindingService.h"
#include "ewsnNotificationServiceBinding12Service.h"
#include "ews_push_notification_server.h"
#include <iostream>
#include <sstream>
#include <memory>
#include "urlparser.h"
#include "libews_c_subscribe_callback.h"
#ifndef _WIN32
#define closes... | 12,920 | 4,187 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#include "inc/Client/Options.h"
#include "inc/Client/ClientWrapper.h"
#include <cstdio>
#include <atomic>
#include <iostream>
std::unique_ptr<SPTAG::Client::ClientWrapper> g_client;
int main(int argc, char** argv)
{
... | 2,137 | 672 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef airsim_core_PhysicsEngineBase_hpp
#define airsim_core_PhysicsEngineBase_hpp
#include "common/UpdatableContainer.hpp"
#include "common/Common.hpp"
#include "PhysicsBody.hpp"
namespace msr { namespace airl... | 1,950 | 544 |
/*++
Copyright (c) 1999-2001 Microsoft Corporation
Module Name :
server_support.cxx
Abstract:
IIS Plus ServerSupportFunction command implementations
Author:
Wade Hilmo (wadeh) 05-Apr-2000
Project:
w3isapi.dll
--*/
#include "precomp.hxx"
... | 137,676 | 45,764 |
#include "dotted.h"
#include "Component.h"
#include "File.h"
#include "Toolset.h"
#include "Project.h"
#include <algorithm>
#include <set>
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(clang_compile)
{
Component c("hello", true);
Project p("./");
File *input = p.CreateFile(c, "hello/src/gretting... | 1,526 | 605 |
#include "PlatformUtils.h"
#include <Windows.h>
#include <psapi.h>
#include <TCHAR.h>
#include <pdh.h>
//total CPU usage
static PDH_HQUERY cpuQuery;
static PDH_HCOUNTER cpuTotal;
//Process CPU time
static ULARGE_INTEGER lastCPU, lastSysCPU, lastUserCPU;
static int numProcessors;
static HANDLE self;
void PlatformUt... | 3,300 | 1,220 |
#pragma once
#include <CreateCoin/chain/CreateCoin_object_types.hpp>
#ifndef CreateCoin_WITNESS_SPACE_ID
#define CreateCoin_WITNESS_SPACE_ID 19
#endif
namespace CreateCoin { namespace chain {
struct by_account;
} }
namespace CreateCoin { namespace plugins { namespace witness {
using namespace CreateCoin::chain;
e... | 1,459 | 507 |
#include<iostream>
using namespace std;
class node
{
public:
int data;
node* next;
node()
{
next=NULL;
}
node(int d)
{
data=d;
next=NULL;
}
};
class Graph
{
public:
node **relation;
int vertex_count;
void initialise(int element[])
{
... | 4,798 | 1,401 |
/*
* Copyright (c) 2022, NVIDIA 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 ... | 2,734 | 966 |
/*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. 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 Public License version 2 only, as
* published by the Free ... | 2,413 | 823 |
/****************************************************/
/* breeze Engine Scene Module (c) Tobias Zirr 2011 */
/****************************************************/
#include "beSceneInternal/stdafx.h"
#include "beScene/beSerializationParameters.h"
#include <beEntitySystem/beSerializationParameters.h>
namesp... | 2,084 | 560 |
#include <vnl/vnl_vector_fixed.hxx>
VNL_VECTOR_FIXED_INSTANTIATE(double,4);
| 77 | 39 |
/*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2020 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the ... | 7,790 | 3,198 |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <_TBBUTTON.hpp>
#include <tagNMHDR.hpp>
#include <tagRECT.hpp>
START_ATF_NAMESPACE
struct tagNMTOOLBARA
{
tagNMHDR hdr;
int iItem;
... | 439 | 165 |
/*
MIT License
Copyright (c) 2021 Ivan Gagis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dis... | 3,594 | 1,377 |
#include <stdio.h>
struct A {
int a;
virtual void foo() = 0;
void bar() { printf("A::bar(): a=%x\n", a); }
};
struct B {
int b;
virtual void foo() = 0;
void bar() { printf("B::bar(): b=%x\n", b); }
};
struct C : A, B {
int c;
virtual void foo() { printf("C::foo(), c=%x\n", c); }
void bar() { printf... | 623 | 303 |
// ------------------------------------------------------------------------
// Copyright (C)
// Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
// University of California Berkeley (UCB) - USA
//
// Jordi Pont-Tuset <jordi.pont@upc.edu>
// Pablo Arbelaez <arbelaez@berkeley.edu>
// June 2014
// ... | 3,625 | 1,345 |
#include <iostream>
#include "mysql/mysql.h"
int main()
{
MYSQL* mysql = mysql_init(nullptr);
mysql_close(mysql);
#ifdef TEST_OPTION
std::cout << "[ok] Test option enabled\n";
return 0;
#else
std::cout << "[error] Test option disabled\n";
return 1;
#endif
} | 283 | 105 |
#include <sstream>
#include <iomanip>
#include <grpcpp/grpcpp.h>
#include <grpcpp/security/server_credentials.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
#include "muta/mutation.grpc.pb.h"
template <typename T>
static void to_string (std::ostream& out, const go... | 2,397 | 967 |
// 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 "V8HTMLTableRowElement.h"
#include "HTMLNames.... | 18,857 | 6,178 |
/*
* Copyright (C) 2021 Frank Mertens.
*
* Distribution and use is allowed under the terms of the zlib license
* (see cc/LICENSE-zlib).
*
*/
#include <cc/HttpError>
namespace cc {
HttpBadRequest::HttpBadRequest():
HttpError{HttpStatus::BadRequest, "Bad Request"}
{}
HttpForbidden::HttpForbidden():
Http... | 1,051 | 331 |
#include "RendererApiEnum.h"
namespace vanadium {
std::string_view rendererApiToString(RendererApi rendererApi) {
switch (rendererApi) {
case RendererApi::Direct3D11:
return "Direct3D11";
case RendererApi::Direct3D9:
return "Direct3D9";
case RendererApi::Direct3D12:
return "Direct3D12"... | 2,842 | 924 |
/**
* This file is part of the "libterminal" project
* Copyright (c) 2019-2020 Christian Parpart <christian@parpart.family>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Unless required by applicable law or agreed to i... | 4,749 | 1,560 |
//
// 113_path_sum_3.cpp
// leetcode_tree
//
// Created by Hadley on 11.07.20.
// Copyright © 2020 Hadley. All rights reserved.
//
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
#include <stack>
#include <cstring>
#include <queue>
#include <... | 1,691 | 604 |
//-*-mode:c++; mode:font-lock;-*-
/*! \file VSLaserData.hpp
Simple pedestal data
\author Stephen Fegan \n
UCLA \n
sfegan@astro.ucla.edu \n
\version 1.0
\date 05/18/2005
$Id: VSLaserData.hpp,v 3.8 2009/11/24 01:11:45 matthe... | 6,884 | 2,406 |
#include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
// Easy O(1) solution, who needs general solutions anyways
bool isPrim(int n){
return n == 2 || n == 3 || n == 5 || n == 7 || n == 11 || n == 13 || n == 17 || n == 19 || n == 23;
}
signed main() {
// Turn off synchr... | 1,405 | 556 |
#include "SetSkyboxModifier.h"
#include "Utils/StringHelper.h"
SetSkyboxModifier::SetSkyboxModifier(ZFile* nParent) : ZRoomCommand(nParent)
{
}
void SetSkyboxModifier::ParseRawData()
{
ZRoomCommand::ParseRawData();
disableSky = parent->GetRawData().at(rawDataIndex + 0x04);
disableSunMoon = parent->GetRawData().at... | 842 | 317 |
// Copyright (C) 2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <ostream>
#include <string>
#include <vector>
#include <ngraph/ngraph.hpp>
namespace ngraph {
namespace builder {
namespace subgraph {
class Constant {
public:
Constant();
Constant(const float value);
... | 1,431 | 438 |
/*!
* @file at.cpp
*
* BSD 3-Clause License
* Copyright (c) 2021, Giulio Berti
* 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 retai... | 6,858 | 2,330 |
/**************************************************************
*
* 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... | 3,017 | 855 |
#include "bin_heap.h"
template<typename dataT, typename countT>
BinHeap<dataT, countT>::BinHeap(bool (*cmp)(const dataT &, const dataT &)) {
trees_list = nullptr;
top_node = nullptr;
// tree_num = 0;
node_num = 0;
this->cmp = cmp;
}
template<typename dataT, typename countT>
void
B... | 5,710 | 1,916 |
#pragma once
#include <glm/glm.hpp>
namespace Colors {
inline glm::vec3 hsvToRgb(glm::vec3 hsv) {
glm::vec3 rgb;
int i = (int)floorf(hsv[0] * 6.0f);
float f = hsv[0] * 6 - i;
float p = hsv[2] * (1 - hsv[1]);
float q = hsv[2] * (1 - f * hsv[1]);
float t = hsv[2] * (1 - (1 - f) * hsv[1]);
switch (i % 6) ... | 1,078 | 626 |
#include <bits/stdc++.h>
using namespace std;
bool isLetter(char l){
return (l>='a'&&l<='z') || (l>='A'&&l<='Z');
}
int main(){
string input;
cin >> input;
long long ans = 0;
for(int i = 0; i < input.size(); i++){
if(input[i] == '@'){
long long before = 0, after = 0;
... | 1,368 | 424 |
////////////////////////////////////////////////////////////////////////////////////
//// This code is written by Ho Yub Jung ////
////////////////////////////////////////////////////////////////////////////////////
#include "float4d.h"
std::mt19937 float4d::n_random_seed = std::... | 4,161 | 1,974 |
// *****************************************************************************
// Module..: Leddar
//
/// \file LdBoolProperty.cpp
///
/// \brief Definition of LdBoolProperty class.
///
/// \author Patrick Boulay
///
/// \since January 2016
//
// Copyright (c) 2016 LeddarTech Inc. All rights reserved.
// ****... | 6,029 | 1,734 |
// Copyright (c) 2021 DNV AS
//
// 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 "Units/Runtime/DynamicQuantity.h"
#include "Units/Runtime/Unit.h"
#include "Units/Length.h"
#in... | 4,659 | 1,457 |
/* Copyright (c) 2010-2015, Delft University of Technology
* 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 ... | 16,075 | 4,719 |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2017-present Facebook, Inc. (http://www.facebook.com) |
+---------... | 2,702 | 886 |
// Copyright 2008-2009 Deutsches Forschungszentrum fuer Kuenstliche Intelligenz
// or its licensors, as applicable.
//
// You may not use this file except under the terms of the accompanying license.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you
// may not use this file except in compliance ... | 7,392 | 2,336 |
/* ************************************************************************
* Copyright 2016-2020 Advanced Micro Devices, Inc.
* ************************************************************************ */
#pragma once
#ifndef _GEMM_HOST_HPP_
#define _GEMM_HOST_HPP_
#include "handle.hpp"
#ifdef USE_TENSILE_HOST
#i... | 26,273 | 7,290 |
// [!output WTL_FRAME_FILE].cpp : implmentation of the [!output WTL_FRAME_CLASS] class
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
[!if WTL_USE_RIBBON]
#include "Ribbon.h"
[!endif]
#include "resource.h"
#include "aboutdlg.h"
[!if WTL_USE_VIEW]
#incl... | 12,185 | 5,894 |
#include "platform.h"
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include "dmetaphone.hpp"
#include "metaphone.h"
#define DMETAPHONE_VERSION "DMETAPHONE 1.1.05"
static const char * compatibleVersions[] = {
"DMETAPHONE 1.1.05 [0e64c86ec1d5771d4ce0abe488a98a2a]",
"DMETAPHONE 1.1.05",
NULL };
... | 3,761 | 1,592 |
const char* const asserter_abi = R"=====(
{
"version": "eosio::abi/1.0",
"types": [],
"structs": [
{
"name": "assertdef",
"base": "",
"fields": [
{
"name": "condition",
"type": "int8"
},{
"name": "message",
... | 788 | 257 |
#ifndef AST_VAR_DECL_H
#define AST_VAR_DECL_H
#include <memory>
#include "ast.hpp"
#include "../common/typedefs.hpp"
#include "../typing/substitution.hpp"
namespace splicpp
{
class ast_type;
class ast_exp;
class ast_id;
class symboltable;
class varcontext;
class typecontext;
class ltypecontext;
class sl_typ... | 1,078 | 457 |
#include "gtest/gtest.h"
#include "test_macro.cpp"
#include "localPRG.h"
#include "minimizer.h"
#include "minirecord.h"
#include "minihit.h"
#include "interval.h"
#include "prg/path.h"
#include "localgraph.h"
#include "localnode.h"
#include "index.h"
#include "inthash.h"
#include "pangenome/pannode.h"
#include "pangeno... | 64,921 | 30,841 |
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define N 100010
#define mp make_pair
#define pa pair<ll,ll>
#define fi first
#define se second
using namespace std ;
typedef long long ll;
ll p,n,m,w[N];
ll prime[N],mod[N],cnt[N],a[N];
int tot;
ll quick_my(ll a,ll b,ll M)
{
ll ret=1;
... | 2,238 | 1,157 |
// ////////////////////////////////////////////////////////
// # Title
// Tours on a 4 x n playing board
//
// # URL
// https://projecteuler.net/problem=237
// http://euler.stephan-brumme.com/237/
//
// # Problem
// Let `T(n)` be the number of tours over a `4 * n` playing board such that:
// - The tour starts in the to... | 10,606 | 3,601 |
#include "LevelGenerationCarver.h"
FLevelGenerationCarver::FLevelGenerationCarver() {
this->MeshCarver = NULL;
this->ConvexCarver = NULL;
this->StaticMeshCarver = NULL;
this->ConvexExpensiveNoise = 0.00f;
this->CarveCellSize = CarveOptionsCellSize::CARVE_CELL_SIZE_25;
this->TerrainMaterial = NU... | 409 | 150 |
// Copyright (C) 2016-2019 Internet Systems Consortium, Inc. ("ISC")
//
// 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/.
#include <config.h>
#include <dhcp/dhcp6.h>
#... | 74,881 | 26,670 |
/*
,--. ,--. ,--. ,--.
,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2018
'-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
| | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
`---' `--' `... | 4,010 | 1,300 |
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1999 - 1999
//
// File: evtsink.cpp
//
//--------------------------------------------------------------------------
#include "stdafx.h"
#include "winnls.... | 6,982 | 2,566 |