text string | size int64 | token_count int64 |
|---|---|---|
/* Copyright 2014 Gareth Cross, 2018-2019 TomTom N.V.
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 w... | 1,743 | 570 |
#include "comparison.h"
#include <iostream>
using namespace std;
int main(int argc, char * argv[])
{
if (argc < 6)
{
cerr << "Expected arguments: root-dir1 file1 root-dir2 file2 type [--binary]" << endl;
cerr << "Use '.' for <type> to compare all messages and enums in given files." << endl;
... | 1,258 | 399 |
#include "json.hpp"
#include <fstream>
#include <iostream>
int main()
{
std::ifstream ifs("c_cpp_properties.json"); //input filestream to read
nlohmann::json data; //json object
ifs >> data; //.json file into data object
std::cout << data["configur... | 630 | 210 |
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include "Thread.hpp"
#include "Object.hpp"
#include "System.hpp"
#include "Barrier.hpp"
#include "ByteArrayReader.hpp"
using namespace obotcha;
extern void testReadline();
extern void basetest();
extern void testByteArrayLittleEndian();
extern void testBy... | 511 | 175 |
#include <iostream>
#include <future>
#include <exception>
#include <stdexcept>
using namespace std;
int calculate()
{
throw runtime_error("Exception thrown from calculate().");
}
int main()
{
// Use the launch::async policy to force asynchronous execution.
auto myFuture = async(launch::async, calc... | 556 | 181 |
// Copyright (c) 2019 Hugo Amiard hugo.amiard@laposte.net
// This software is provided 'as-is' under the zlib License, see the LICENSE.txt file.
// This notice and the license may not be removed or altered from any source distribution.
#ifdef TWO_MODULES
module;
#include <infra/Cpp20.h>
module TWO(ecs);
#else
#incl... | 848 | 368 |
#include <iostream>
#include <string>
// For External Library
#include <torch/torch.h>
// For Original Header
#include "loss.hpp"
#include "losses.hpp"
// -----------------------------------
// class{Loss} -> constructor
// -----------------------------------
Loss::Loss(const std::string loss){
if (loss == "l1"){... | 1,035 | 343 |
#include "Ideas.h"
#include "IdeaGroup.h"
#include "IdeaUpdaters.h"
#include "Log.h"
#include "ParserHelpers.h"
#include <fstream>
HoI4::Ideas::Ideas() noexcept
{
importIdeologicalIdeas();
importGeneralIdeas();
}
void HoI4::Ideas::importIdeologicalIdeas()
{
registerRegex(commonItems::catchallRegex, [this](const... | 1,721 | 652 |
//
// Created by Felix Klauke on 29.03.18.
//
#include <RootNode.h>
#include <ClassNode.h>
#include <iostream>
#include <StatementNode.h>
#include <VarDeclarationNode.h>
#include <VarAssignNode.h>
#include <IntegerNode.h>
#include <FunctionCallNode.h>
#include <VarDeclarationAndInitializationNode.h>
#include "Parser.h... | 5,495 | 1,659 |
#include <algorithm>
#include <cstdio>
using namespace std;
int H, M;
double a, b; // angles for the two hands
int main()
{
while (true) {
scanf("%d:%d", &H, &M);
if (H == 0 && M == 0) break;
a = H*30 + 1.0*M/2.0;
b = M*6;
double x = a - b;
double y = b - a;
... | 436 | 194 |
// 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 "chromecast/browser/cast_content_window.h"
namespace chromecast {
CastContentWindow::CastContentWindow(const CreateParams& params)
: delega... | 922 | 265 |
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2022 Ben Vanik. All rights reserved. ... | 34,293 | 11,844 |
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include "PCSTree.h"
#include "PCSNode.h"
// constructor
PCSTree::PCSTree()
{
info.maxLevelCount = 0;
info.maxNodeCount = 0;
info.numLevels = 0;
info.numNodes = 0;
root = NULL;
};
// destructor
PCSTree::~PCSTree()
{
// printf("PCSTree: destructor()\n... | 5,050 | 1,865 |
#include <stdio.h>
#include <iostream>
#include "./Civilization.hpp"
#ifndef BUBBLE
#define BUBBLE
namespace Emperor2
{
class Bubble
{
public:
Civilization *BubbleSort(Civilization *civilizations, int numberOfCivilizations);
};
} // namespace Emperor2
#endif | 282 | 95 |
// Copyright (c) 2015 Gregor Klinke
// All rights reserved.
#pragma once
#include "fo.hpp"
#include <iterator>
#include <memory>
#include <string>
#include <vector>
namespace eyestep {
class SosofoIterator;
class Sosofo
{
public:
/*! Creates an empty sosofo */
Sosofo();
Sosofo(const Sosofo& one, const Soso... | 2,255 | 837 |
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 7,542 | 2,491 |
//-------------------------------------------------------------------------
/*
Copyright (C) 1997, 2005 - 3D Realms Entertainment
This file is part of Shadow Warrior version 1.2
Shadow Warrior is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by ... | 7,796 | 3,078 |
#include "ShakeFadeOut.h"
#include "../../Utils.h"
namespace oreore
{
using namespace cocos2d;
ShakeFadeOut *ShakeFadeOut::create(const float duration, const float strength)
{
return create(duration, strength, strength);
}
ShakeFadeOut *ShakeFadeOut::create(const float duration, const flo... | 1,133 | 372 |
//===--------------------- Scheduler.cpp ------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 12,727 | 4,080 |
// ********************************************************
// This C++ code was automatically generated by ml2cpp (development version).
// Copyright 2020
// https://github.com/antoinecarme/ml2cpp
// Model : BaggingClassifier
// Dataset : FourClass_100
// This CPP code can be compiled using any C++-17 compiler.
//... | 225,178 | 107,547 |
#include "data_transfer.h"
// Start of frame delimiter
#define SOF 0x81
#define ESC 0x7e
#define MAXDATA 10
typedef struct Message {
byte sof;
size_t len; // How many more bytes to read after this
msg_type_t type;
byte data[MAXDATA]; // Data goes here (variable length)
} msg_t;
void send_msg(msg_type_t ty... | 802 | 347 |
// Copyright (C) 2015-2017 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 3, or (at your op... | 1,682 | 602 |
// Copyright 2016 Etix Labs
//
// 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 wr... | 5,372 | 1,804 |
// Copyright 2020 The VGC Developers
// See the COPYRIGHT file at the top-level directory of this distribution
// and at https://github.com/vgc/vgc/blob/master/COPYRIGHT
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may o... | 4,722 | 1,502 |
#include "stdafx.h"
#include "EoSelectCmd.h"
#include "AeSysDoc.h"
#include "AeSysView.h"
#include <DbCommandContext.h>
const OdString CommandSelect::groupName() const {
return L"AeSys";
}
const OdString CommandSelect::Name() {
return L"SELECT";
}
const OdString CommandSelect::globalName() const {
return Name();
... | 1,166 | 390 |
/*
* Copyright (c) 2020 Samsung Electronics 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... | 2,177 | 705 |
#include <algorithm>
#include <cstdint>
#include <numeric>
#include <arpa/inet.h>
#include "spirent_pga/common/headers.h"
namespace scalar {
inline uint32_t fold64(uint64_t sum)
{
sum = (sum >> 32) + (sum & 0xffffffff);
sum += sum >> 32;
return (static_cast<uint32_t>(sum));
}
inline uint16_t fold32(uin... | 2,473 | 849 |
#include "Messages/CommandMessage.h"
namespace face
{
CommandMessage::CommandMessage(Type iType, unsigned iFrameId, long long iTimestamp) :
fw::Message(iFrameId, iTimestamp),
mType(iType)
{
}
}
| 209 | 71 |
/* file: qualitymetricset_batch.cpp */
/*******************************************************************************
* Copyright 2014-2021 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 o... | 1,981 | 612 |
// Copyright (c) Christopher Di Bella.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
#ifndef CJDB_TEST_FUNCTIONAL_RANGECMP_IS_EQUIVALENCE_HPP
#define CJDB_TEST_FUNCTIONAL_RANGECMP_IS_EQUIVALENCE_HPP
#include "cjdb/test/constexpr_check.hpp"
#include "cjdb/test/functional/rangecmp/is_partial_equivalence.... | 637 | 277 |
/*
* Copyright 2018-2019 Autoware Foundation. 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 requi... | 8,913 | 3,337 |
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QStringListModel>
class StringListModel : public QStringListModel {
Q_OBJECT
public:
Q_INVOKABLE bool removeRows(int row, int count,
const QModelIndex &parent = QModelIndex()) {
return QSt... | 780 | 263 |
/**
* Reactive
*
* (c) 2015-2016 Axel Etcheverry
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#include <string>
#include <reactive/http/request.hpp>
namespace reactive {
namespace http {
int request::on_message_begin(http... | 13,004 | 3,976 |
//==================================================================================================
/*!
@file
@copyright 2016 NumScale SAS
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
//===========================... | 1,548 | 573 |
#include "BBUtils.h"
#include <QDir>
#include <QProcess>
#include "FileSystem/BBFileListWidget.h"
#include <GL/gl.h>
QString BBConstant::BB_NAME_PROJECT = "";
QString BBConstant::BB_PATH_PROJECT = "";
// there is no / at the end
QString BBConstant::BB_PATH_PROJECT_ENGINE = "";
QString BBConstant::BB_PATH_PROJECT_USE... | 5,669 | 2,478 |
// 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 <lib/async-loop/cpp/loop.h>
#include <lib/async-loop/default.h>
#include "src/virtualization/lib/guest_interaction/client/guest_discovery_service... | 648 | 212 |
/*
** ClanLib SDK
** Copyright (c) 1997-2016 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for a... | 8,492 | 3,336 |
// $Id$
// vim:tabstop=2
/***********************************************************************
Moses - factored phrase-based language decoder
Copyright (C) 2010 Hieu Hoang
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as publish... | 2,128 | 692 |
#pragma once
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <vector>
#include <mutex>
enum Direction {
Up,
Right,
Down,
Left
};
class Player : public sf::Drawable
{
public:
// Constructor
Player(const std::map<std::string, sf::Texture>&, std::mutex*);
// Destructor
~Player();
// Setters
voi... | 736 | 272 |
#include <polyfem/RhsAssembler.hpp>
#include <polyfem/BoundarySampler.hpp>
#include <polyfem/LinearSolver.hpp>
// #include <polyfem/UIState.hpp>
#include <polyfem/Logger.hpp>
#include <Eigen/Sparse>
#ifdef USE_TBB
#include <tbb/parallel_for.h>
#include <tbb/task_scheduler_init.h>
#include <tbb/enumerable_thread_... | 21,503 | 9,445 |
/*
Copyright 2020 Marc SIBERT
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 writi... | 7,021 | 3,266 |
#include "FrenetOptimalTrajectory.h"
#include "FrenetPath.h"
#include "py_cpp_struct.h"
#include "CubicSpline2D.h"
#include "utils.h"
#include <stddef.h>
#include <vector>
using namespace std;
// C++ wrapper to expose the FrenetOptimalTrajectory class to python
extern "C" {
// Compute the frenet optimal trajecto... | 5,274 | 1,894 |
/*
* 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 ... | 2,938 | 801 |
#include <bits/stdc++.h>
using namespace std;
typedef int I;
int main()
{
string s;
cin >> s;
cout << s << s << '\n';
return 0;
}
| 151 | 66 |
#include "Particle.hpp"
#include "Scenes/Scenes.hpp"
namespace acid {
static constexpr float FADE_TIME = 1.0f;
Particle::Particle(std::shared_ptr<ParticleType> particleType, const Vector3f &position, const Vector3f &velocity, float lifeLength, float stageCycles,
float rotation, float scale, float gravityEffect) :
... | 1,916 | 648 |
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Redistribution and use of this software in source and binary forms, with or
without modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and ... | 13,179 | 4,089 |
#include "point.h"
namespace lf::geometry {
Eigen::MatrixXd Point::Global(const Eigen::MatrixXd& local) const {
LF_ASSERT_MSG(local.rows() == 0, "local.rows() != 0");
return coord_.replicate(1, local.cols());
}
// NOLINTNEXTLINE(misc-unused-parameters)
Eigen::MatrixXd Point::Jacobian(const Eigen::MatrixXd& local)... | 1,617 | 621 |
#include "stdafx.hpp"
#include "Window/GLFWWindowWrapper.hpp"
#include "FlexEngine.hpp"
#include "Editor.hpp"
#if COMPILE_OPEN_GL
#include "Graphics/GL/GLHelpers.hpp"
#endif
#include "Graphics/Renderer.hpp"
#include "Helpers.hpp"
#include "InputManager.hpp"
#include "Platform/Platform.hpp"
#include "Window/Monitor.hp... | 27,849 | 11,969 |
/* (c) 2018 CYVA. For details refer to LICENSE */
#pragma once
#include <graphene/chain/protocol/base.hpp>
#include <graphene/chain/protocol/types.hpp>
#include <graphene/chain/protocol/asset.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <fc/reflect/reflect.hpp>
#include <fc/crypto/ripemd160.hpp>
#include <... | 505 | 195 |
/****************************************************************************
*
* Copyright (C) 2019 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistrib... | 5,297 | 2,048 |
/*
* Copyright (c) 2017 Trail of Bits, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... | 2,301 | 1,090 |
#include <CChatStealSystem.hpp>
START_ATF_NAMESPACE
CChatStealSystem::CChatStealSystem()
{
using org_ptr = void (WINAPIV*)(struct CChatStealSystem*);
(org_ptr(0x1403f86a0L))(this);
};
void CChatStealSystem::ctor_CChatStealSystem()
{
using org_ptr = void (WINAPIV*)(struct CC... | 2,524 | 992 |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... | 1,889 | 671 |
//---------------------------------------------------------
// Copyright 2016 Ontario Institute for Cancer Research
// Written by Jared Simpson (jared.simpson@oicr.on.ca)
//---------------------------------------------------------
//
// nanopolish_fast5_processor -- framework for iterating
// over a collection of fast5... | 3,145 | 1,002 |
/*
Letter Case Permutation
https://leetcode.com/problems/letter-case-permutation/
Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string.
Return a list of all possible strings we could create. You can return the output in any order.
Example 1:
Input: S =... | 1,305 | 492 |
#ifndef VIENNACL_LINALG_DIRECT_SOLVE_HPP_
#define VIENNACL_LINALG_DIRECT_SOLVE_HPP_
/* =========================================================================
Copyright (c) 2010-2012, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
... | 18,563 | 6,066 |
/*
* Copyright (C) 2021 Alibaba Inc. All rights reserved.
* Author: Kraken Team.
*/
#include "qjs_patch.h"
#include <quickjs/cutils.h>
#include <quickjs/list.h>
#include <cstring>
typedef enum {
JS_GC_PHASE_NONE,
JS_GC_PHASE_DECREF,
JS_GC_PHASE_REMOVE_CYCLES,
} JSGCPhaseEnum;
typedef struct JSProxyData {
... | 11,541 | 4,299 |
/***************************************************************************
* Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
* Martin Renou *
* Copyright (c) QuantStack *
* ... | 5,397 | 1,652 |
#include "content_loader.h"
#include "pugixml.hpp"
#include <iostream>
#include <string>
#include "globalvariables.h"
#include "sprite.h"
enemy_content_map enemyContentMap;
void SetEnemyContentFromEnemyDirXMLFile(std::string xml_enemy_scripts_file_dir,
std::string xml_enemy_scripts_file_path)
{
// Creat... | 15,043 | 5,384 |
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019 Datadog, Inc.
#include "two.h"
#include "constants.h"
#include <sstream>
Two::~Two() { Py_Fin... | 11,972 | 3,841 |
class Solution {
public:
/**
* @param ratings Children's ratings
* @return the minimum candies you must give
*/
int candy(vector<int>& ratings) {
// Write your code here
vector<int> candy_list(ratings.size(), 0);
for (size_t i = 0; i < ratings.size(); ++ i) {
c... | 712 | 267 |
#include "dbmanager.h"
#include <QDir>
#include <QFile>
#include <QMessageBox>
#include <math.h>
DbManager::DbManager()
{
m_db = QSqlDatabase::addDatabase("QSQLITE", "Connection");
QString db_path = QDir::currentPath();
db_path = db_path + QString("/university.db");
m_db.setDatabaseName(db_path);
if... | 31,446 | 10,031 |
#include "statisticsmenu.h"
#include "game.h"
StatisticsMenu::StatisticsMenu(Game *game, QGridLayout *grid) :
Menu(game, grid) {
grid->addWidget(&statisticsLabel, 0, 1);
statisticsLabel.setVisible(false);
statisticsLabel.setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
grid->addWidget(&stati... | 3,235 | 1,023 |
#pragma once
#include "entityx/Entity.h"
namespace CaptainAsteroidCPP
{
namespace Comp
{
enum class Id
{
Unknown,
Asteroid,
SpaceShip,
LaserShot
};
struct Identity : public entityx::Component<Identity>
{
Identity(Id _id = Id::Unknown) : id(_id){};
Id id;
};
}// namespace Comp
}//... | 349 | 127 |
// Mono Native Fixture
// Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Namespace: System.Threading
// Name: LockCookie
// C++ Typed Name: mscorlib::System::Threading::LockCookie
#include <gtest/gtest.h>
#include <mscorlib/System/Threading/mscorlib_System_Threading_LockCooki... | 1,002 | 444 |
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation... | 10,096 | 2,980 |
#ifndef GEOINDEX_AABB_INDEX
#define GEOINDEX_AABB_INDEX
#include <vector>
#include <algorithm> // Or #include <parallel/algorithm>.
#include <iterator>
#include "Common.hpp"
namespace geoIndex {
/** This index uses the "Axis Aligned Bounding Box" (AABB) trick to quickly find points close to the
* given... | 10,710 | 2,889 |
#include <iostream>
#include <graphics.h>
using namespace std;
int main()
{
initwindow(800, 800);
double startPointX = 100;
double startPointY = 600;
double windowSizeX = 600;
double windowSizeY = 500;
double columnWidth = 70;
double distanceBetweenColumns = 70;
double D = 60;
double bi[] = {5, 2... | 2,162 | 882 |
#include "openCV.h"
using namespace cv;
class GUI {
int lowH, lowS, lowV = 90;
int highH = 180;
int highS = 255, highV = 255;
void lowHChange(int pos, void*) {
int lowH = pos;
}
void lowSChange(int pos, void*) {
int lowS = pos;
}
void lowVChange(int pos, void*) {
int lowV = pos;
}
void highHChang... | 977 | 426 |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include "DataStructures/DataBox/PrefixHelpers.hpp"
#include "DataStructures/DataBox/Prefixes.hpp"
#include "IO/Observer/Helpers.hpp"
#include "ParallelAlgorithms/LinearSolver/Gmres/ElementActions.hpp"
#include "ParallelAlgorithms/Line... | 7,808 | 2,231 |
// ivectorbin/ivector-mean.cc
// Copyright 2013-2014 Daniel Povey
// 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 obtain a copy of the License at
//
/... | 5,929 | 2,075 |
#pragma once
#include "scene_view.hpp"
#include "mesh_renderer.hpp"
namespace glpp::asset::render {
template<class ShadingModel>
class scene_renderer_t {
public:
using material_key_t = size_t;
using renderer_t = mesh_renderer_t<ShadingModel>;
scene_renderer_t(const ShadingModel& model, const scene_t& scene);
v... | 2,122 | 803 |
// 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 "V8SVGLength.h"
#include "bindings/core/v8/V8S... | 16,867 | 5,771 |
/*
Copyright (c) 2015-2016, Arvid Norberg
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 and ... | 4,137 | 1,612 |
/*
Copyright (c) 2009-2015, Jack Poulson
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#pragma once
#ifndef EL_PSEUDOSPECTRA_IRA_HPP
#define E... | 43,016 | 13,676 |
#include "storage.h"
using namespace core;
Storage::Storage() :
Object()
{
LOGGER_FUNCTION_BEGIN;
LOGGER_DEBUG("New %s", __FUNCTION__);
try {
// set props defaults
Add(AttributeBool::New(CKA_TOKEN, false, PVF_13));
Add(AttributeBool::New(CKA_PRIVATE, false, PVF_13));
A... | 545 | 210 |
//
// Created by jaredhuang on 2021/02/23.
//
#include "HttpDnsBridge.h"
#ifdef __cplusplus
extern "C" {
#endif
// 初始化,主要是如果用了命名空间会变成_ZN3mna9MnaBridge12MNASetBridgeEPFiPKcE之类的格式
__attribute__ ((visibility ("default"))) HTTPDNSSendToUnity HTTPDNSGetBridge() {
return self_dns::HttpDnsBridge::HTTPDNSGet... | 859 | 378 |
// Copy of AbilityTask_WaitAttributeChange that passes the old and new values on change
#include "Tasks/GASExtAT_WaitAttributeChangeWithValues.h"
#include <AbilitySystemComponent.h>
#include <AbilitySystemGlobals.h>
#include <GameplayEffectExtension.h>
UGASExtAT_WaitAttributeChangeWithValues::UGASExtAT_WaitA... | 5,495 | 1,607 |
extern "C"
{
#include <psp2/libdbg.h>
}
#include <sstream>
#include <vector>
#include "EGL/eglInstance.h"
#include "ES/buffer.h"
#include "ES/program.h"
#include "ES/texture.h"
#include "gfx/text_renderer.h"
#include "io.h"
#include "logger.h"
EGLInstance::EGLInstance(Logger* in_logger_ptr)
:m_display ... | 14,159 | 4,413 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
ll L = 0, X = 1;
while (N - X >= 0) {
N -= X;
L++;
X *= 26;
}
string ans(L, 'a');
for (int i = L - 1; i >= 0; i--) {
ans[i] += N % 26;
N /= 26;
}
cout << ans << endl;
return 0;
}
| 298 | 167 |
/*
* Copyright 2011 Wolfgang Koller - http://www.gofg.at/
*
* 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,614 | 884 |
/*
* GDevelop Core
* Copyright 2008-2016 Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
#include "GDCore/IDE/Events/EventsBehaviorRenamer.h"
#include <map>
#include <memory>
#include <vector>
#include "GDCore/Events/Event.h"
#include "GDCore/Even... | 6,213 | 1,660 |
#include"net/Server.h"
#include<sys/socket.h>
#include<arpa/inet.h>
#include<netinet/in.h>
#include"base/Util.h"
Server::Server(Eventloop* loop,int threadnum,uint16_t port)
:loop_(loop),
threadnum_(threadnum),
eventloopthreadpool_(new Eventloopthreadpool(loop_,threadnum_)),
started_(false),
port_(p... | 2,586 | 867 |
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/PlatformIncl.h>
#include <AzCore/Asset/AssetManagerComponent.h>
#include <AzCore/Co... | 7,118 | 1,976 |
/*
//
// Draw multiple thick lines on the image
//
// Inputs:
// InputImg: Input image (Grayscale or Color)
// CoordPnt: Coordinates of end points of lines [r1 r2 c1 c2]
// (n x 4 double array, n: # of lines)
// Thickness: Thickness of lines (The value is integer, but the type is double.)
// ... | 7,557 | 2,960 |
// Copyright 2020 The Tint 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 obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... | 1,892 | 639 |
#ifndef UTILS_UTILS_HPP
#define UTILS_UTILS_HPP
// Copyright (c) 2016, Dmitry Koplyarov <koplyarov.da@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,
// provided that the above copyright notice and this permission notice appear in... | 2,196 | 734 |
/**********************************************************************
* Copyright (c) 2008-2014, 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 ... | 9,107 | 3,399 |
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkNormalizeImageFilterTest.cxx
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopy... | 2,570 | 808 |
/*
Copyright (C) 2010 Lukasz Wolnik
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, a... | 2,688 | 934 |
// Copyright 2016 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "packager/media/base/audio_stream_info... | 14,655 | 5,447 |
#ifdef DSP_CPP
static void dsp_state_save(unsigned char **out, void *in, size_t size) {
memcpy(*out, in, size);
*out += size;
}
static void dsp_state_load(unsigned char **in, void *out, size_t size) {
memcpy(out, *in, size);
*in += size;
}
void DSP::serialize(serializer &s) {
Processor::serialize(s);
s.a... | 709 | 295 |
/**
* EdDSA crypto routines, metaheader.
*/
namespace decaf { enum Prehashed { PURE, PREHASHED }; }
$("\n".join([
"#include <decaf/ed%s.hxx>" % g for g in sorted([c["bits"] for _,c in curve.iteritems()])
]))
| 215 | 86 |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commerc... | 4,664 | 1,449 |
/*******************************************************************************
* Copyright 2019 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.apache.o... | 7,452 | 2,689 |
/**
* @file test_os_char_driver.cpp
* @brief Tests os_char_driver template
* @author Kacper Kowalski - kacper.s.kowalski@gmail.com
*/
#include "os_char_driver.hpp"
#include "os_task.hpp"
#include "unity.h"
#include <array>
#include <csignal>
#include <functional>
#include <iostream>
#include <string>
#include <stri... | 5,767 | 1,838 |
#include "mvTextureContainer.h"
#include "mvPythonExceptions.h"
#include "mvLog.h"
#include "mvStaticTexture.h"
#include "mvDynamicTexture.h"
namespace Marvel {
void mvTextureContainer::InsertParser(std::map<std::string, mvPythonParser>* parsers)
{
mvPythonParser parser(mvPyDataType::String, "Undocumented functi... | 3,742 | 1,546 |
#include "ArrayLiteral.hh"
void ArrayLiteral::add_expression(ptr_t<Expression> &expression) {
m_expressions.push_back(std::move(expression));
}
void ArrayLiteral::analyze(Scope *scope) {
m_type.change_kind(Kind::ARRAY);
if (m_expressions.empty()) {
m_type.change_primitive(Primitive::DONT_CARE);
... | 1,215 | 409 |
#include "squid.h"
/*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
*
* Squid is the result of efforts by numerous individuals from
* the Internet community; see the CONTRIBUTORS file for full
* details. Many organizations have pr... | 4,208 | 1,597 |
#include "..\Inc\CRCinematicController.h"
float CinematicController::GetCurrentTime()
{
clock_t currentTime;
currentTime = clock();
return (float)currentTime/CLOCKS_PER_SEC;
}
void CinematicController::Init()
{
end = true;
filmStartTime = -1;
}
void CinematicController::Update()
{
float stage0Cost = 6.0f;
flo... | 4,301 | 1,919 |