text
stringlengths
7
961k
#include "ZoneServerTestPCH.h" #include "MockPlayerSkillController.h" using namespace gideon::zoneserver; MockPlayerSkillController::MockPlayerSkillController(zoneserver::go::Entity* owner) : PlayerSkillController(owner), lastErrorCode_(ecWhatDidYouTest) { } // = rpc::SkillRpc overriding DEFINE_SRPC_METHOD...
//----------------------------------------------------------------------------- // Torque Game Engine // Copyright (C) GarageGames.com, Inc. //----------------------------------------------------------------------------- #include "constructor/constructorSimpleMesh.h" #ifdef IS_CONSTRUCTOR #include "constructor/lighti...
//======= Copyright (c) Stereolabs Corporation, All rights reserved. =============== #include "StereolabsPrivatePCH.h" #include "Stereolabs/Private/Threading/StereolabsGrabRunnable.h" #include "Stereolabs/Public/Core/StereolabsCoreGlobals.h" DEFINE_LOG_CATEGORY(SlGrabThread); bool FSlGrabRunnable::Init() { return F...
#include "Effect.h" #include "HandleError.h" using namespace mage; Effect::Effect(const TString& filename) : shader(nullptr), file(filename) { } std::string Effect::compile(LPDIRECT3DDEVICE9 device) { if (this->shader) return ""; ID3DXBuffer* errors = 0; #if defined(DEBUG) | defined(_DEBUG) HR(D3DXCreateE...
/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- Copyright (c) 2006-2018, assimp team All rights reserved. Redistribution and use of this software in source and binary forms,...
/* Copyright 2005-2016 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundat...
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2021 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Version 2.0 (the "License"); /// you may not use this file except...
#include <bits/stdc++.h> template<typename T> T gcd(T a, T b) { if(!b) return a; return gcd(b, a % b); } template<typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; } template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ...
/** * Copyright (c) 2021 OceanBase * OceanBase CE is licensed under Mulan PubL v2. * You can use this software according to the terms and conditions of the Mulan PubL v2. * You may obtain a copy of Mulan PubL v2 at: * http://license.coscl.org.cn/MulanPubL-2.0 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS...
#include <bits/stdc++.h> using namespace std; int main(){ int a, c, x, y; int res; bool maior; scanf("%d %d %d %d", &a, &c, &x, &y); res = c - a - x- y; maior = x > (y/2); if(res > 0){ printf("Igor feliz!\n"); }else if(maior){ printf("Caio, a culpa eh sua!\n"); }else{ printf("Igor bolado!\n"); } ...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_72a.cpp Label Definition File: CWE121_Stack_Based_Buffer_Overflow__CWE193.label.xml Template File: sources-sink-72a.tmpl.cpp */ /* * @description * CWE: 121 Stack Based Buffer Overflow * BadSource: Point dat...
// Copyright (c) 2009-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2020 The PIVX developers // Copyright (c) 2021 The DECENOMY Core Developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit...
#include <eigen3/Eigen/Core> #include <numpy_eigen/boost_python_headers.hpp> Eigen::Matrix<int, 4, 4> test_int_4_4(const Eigen::Matrix<int, 4, 4> & M) { return M; } void export_int_4_4() { boost::python::def("test_int_4_4",test_int_4_4); }
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/accessibility/render_accessibility_impl.h" #include <memory> #include <string> #include <tuple> #include <utility> #includ...
/************************************************************************ MIT License Copyright © 2021 Charu Sharma 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 wi...
// Singleton.hpp // // Header file for modified Singleton pattern in which the destruction // of the Singleton takes place in a Destroyer object, thus resolving // a major problem in the classic Gamma Singleton pattern. // // The Destroyer class is templated while clients can create subclasses // of Singleton to suit ...
#ifndef SRC_ROCKET_MODEL_HPP #define SRC_ROCKET_MODEL_HPP #include <fstream> #include "ros/package.h" class Rocket { public: float dry_mass; float propellant_mass; float Isp; float minTorque; float maxTorque; std::vector<float> maxThrust{0, 0, 0}; std::vector<float> minThrust{0, 0, 0}; ...
/* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions...
/* * * Created on: Oct 29, 2016 * Author: mostafa saad * */ #include <iostream> #include <cmath> #include <complex> #include <cassert> #include <bits/stdc++.h> using namespace std; #define all(v) ((v).begin()), ((v).end()) #define sz(v) ((int)((v).size())) #define clr(v, d) memset(v, d, si...
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holdi...
#include "SMLMat4x1.h" #include "SMLMat1x4.h" SML::Mat4x1::Mat4x1(const float& A, const float& B, const float& C, const float& D) { a = A; b = B; c = C; d = D; } SML::Mat4x1::Mat4x1(const Vector& v) { a = v.x; b = v.y; c = v.z; } SML::Mat4x1::Mat4x1(const Point& v) { a = v.x; b = v.y; c = v.z; d = 1; } S...
// // Copyright (c) 2012, University of Erlangen-Nuremberg // Copyright (c) 2012, Siemens AG // 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...
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_PrimalItemArmor_SaddleGeneric_Tek_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //---------------------------------------...
//===--- AliasAnalysis.cpp - SIL Alias Analysis ---------------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
/* -*- Mode:c++; eval:(c-set-style "BSD"); c-basic-offset:4; indent-tabs-mode:nil; tab-width:8 -*- */ /* This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, ...
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
/** * @file * @brief Spell casting and miscast functions. **/ #include "AppHdr.h" #include "spl-cast.h" #include <iomanip> #include <sstream> #include <cmath> #include "areas.h" #include "art-enum.h" #include "beam.h" #include "chardump.h" #include "colour.h" #include "database.h" #include "describe.h" #include "...
#ifndef ENGINE_COMMON_UTILITY_DEBUG_REMOTERY_HPP #define ENGINE_COMMON_UTILITY_DEBUG_REMOTERY_HPP #pragma once #include <remotery.h> #include "utility/text/ustring.hpp" #include <string> #include <set> namespace engine { class remotery_t { public: remotery_t() : rmt(nullptr) { ...
#include <iostream> #include<iomanip> using namespace std; int main() { // 0 1 2 3 //we want to generate two-dimentional array 0 |12 0 121 0 // 1 | 0 12 0 13 //we want to print this array as readable as possible i...
/* Copyright (c) 2020 by Stan Fortoński */ /* Free Type library for text rendering */ /* Based on: https://learnopengl.com/In-Practice/2D-Game/Render-text */ #include "FontRenderer.hpp" namespace Engine { FontRenderer::FontRenderer(Window & win, const Font & f): window(win), font(f) { glGenVertexArrays(1 , &V...
// // Copyright (c) 2009, Markus Rickert // 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 condit...
/* * Copyright (C) 2009 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditio...
/* * Vortex OpenSplice * * This software and documentation are Copyright 2006 to ADLINK * Technology Limited, its affiliated companies and licensors. All rights * reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except i...
/* This code is public-domain - it is based on libcrypt * placed in the public domain by Wei Dai and other contributors. */ #include "sha1.hpp" #define SHA1_K0 0x5a827999 #define SHA1_K20 0x6ed9eba1 #define SHA1_K40 0x8f1bbcdc #define SHA1_K60 0xca62c1d6 const uint8_t sha1InitState[] = { 0x01,0x23,0x45,0x67, // ...
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
// Copyright 2017 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/translate/chrome_translate_client.h" #include <memory> #include <string> #include <vector> #include "base/command_line.h" #incl...
/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * Modifications Copyright (c) 2018 LG Electronics, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // // // System includes // External includes ...
/* * W.J. van der Laan 2011-2012 */ #include "bitcoingui.h" #include "clientmodel.h" #include "walletmodel.h" #include "optionsmodel.h" #include "guiutil.h" #include "guiconstants.h" #include "init.h" #include "ui_interface.h" #include "qtipcserver.h" #include <QApplication> #include <QMessageBox> #include <QTextCo...
/* This file is part of the PhantomJS project from Ofi Labs. Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com Copyright (C) 2011 Ivan De Marino <ivan.de.marino@gmail.com> Author: Milian Wolff <milian.wolff@kdab.com> Redistribution and use in source and binary forms, with...
#include <QApplication> #include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #...
/* * vi:ts=4:shiftwidth=4:expandtab * * iconvert.cpp - simple iconv() wrapper class * * Copyright (C) 2002 by Zhang Le <ejoy@users.sourceforge.net> * Begin : 02-Aug-2002 * Last Change : 24-Apr-2004. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and...
#include "Arduino.h" #include "MHZ19B.h" MHZ19B::MHZ19B(HardwareSerial *Serial) { _Serial = Serial; } MHZ19B::MHZ19B(SoftwareSerial *Serial) { _Serial = Serial; } void MHZ19B::begin() { _Serial->begin(9600); } void MHZ19B::autoCalibration (bool off) { const byte Start = 0xFF; const byte Sensor = 0x0...
/* Copyright 2015 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...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "extern/beatsaber-hook/shared/utils/typedefs.h" // Including type: Valve.VR.IVRCompositor #include "Valve/VR/IVRCompositor.hpp" // Including typ...
// Copyright (c) 2012-2015 The Bitcoin Core developers // Copyright (c) 2014-2015 The Dash Core developers // Copyright (c) 2015-2020 The PIVX developers // Copyright (c) 2021 The DECENOMY Core Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.or...
#include "internalJSONNode.h" #include "NumberToString.h" //So that I can convert numbers into strings #include "JSONNode.h" //To fill in the foreward declaration #include "JSONWorker.h" //For fetching and parsing and such #include "JSONGlobals.h" #ifdef JSON_UNIT_TEST void internalJSONNode::incinternalAllocCou...
// Author: Ivan Sovic #include "SeqFetchSettings.h" #include <limits> #include <pacbio/Version.h> namespace PacBio { namespace Pancake { namespace OptionNames { // clang-format off const CLI_v2::PositionalArgument OutputFile { R"({ "name" : "out_fn", "description" : "Output file for the fetched sequences....
// Copyright (c) 2017-2020 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <wallet/walletdb.h> #include <chainparams.h> #include <interfaces/chain.h> #include <node/context.h> #include <wallet/wa...
/* * (c) Copyright 2019-2021 Xilinx, 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 required ...
/* * LeetCode 208 Course Schedule ii * Medium * Jiawei Wang * 2021.8.5 * */ /* * Same as Courses Schedule i * Topological Sort * * A Topological Ordering is an ordering of the nodes in a directed graph * where for each directed edge from node A to node B, node A appears before node B in the the ordering *...
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as p...
#include <stdlib.h> /* realloc */ #include <string.h> /* memset & co */ #include "halloc.h" #include "align.h" #include "hlist.h" /* * block control header */ typedef struct hblock { #ifndef NDEBUG #define HH_MAGIC 0x20040518L long magic; #endif hlist_item_t siblings; /* 2 pointers */ hlist_head_t...
// 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...
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
#ifndef _H_HOIBC_CLASS #define _H_HOIBC_CLASS #include <ostream> #include <string> #include <vector> #include "hoibc_types.hpp" #include "hoibc_data.hpp" #include "../alglib/ap.h" namespace hoibc { static array<real> empty_vector_real; static array<std::string> empty_vector_string; class hoibc_class { p...
#include "RNCSafeAreaViewShadowNode.h" #include <react/renderer/components/view/conversions.h> #include <react/renderer/core/LayoutContext.h> #include <yoga/Yoga.h> #include <algorithm> namespace facebook { namespace react { extern const char RNCSafeAreaViewComponentName[] = "RNCSafeAreaView"; inline YGValue valueF...
#include <boost/spirit/home/lex.hpp>
/** * Copyright Soramitsu Co., Ltd. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ #include "runtime/binaryen/runtime_api/tagged_transaction_queue_impl.hpp" namespace kagome::runtime::binaryen { using primitives::TransactionValidity; TaggedTransactionQueueImpl::TaggedTransactionQueueImpl( ...
/*====================================================================* * * oHTMLIndex.hpp - declaration of oHTMLIndex class. * *. Motley Tools by Charles Maier *: Published 1982-2005 by Charles Maier for personal use *; Licensed under the Internet Software Consortium License * *---------------------------...
// Copyright (c) 2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "support/lockedpool.h" #include "support/cleanse.h" #if defined(HAVE_CONFIG_H) #include "config/pivx-config.h" #endif #...
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "audio_pch.h" #include "minmax.h" #include "voice_gain.h" // memdbgon must be the last include file in a .cpp fil...
/** * Copyright (c) 2016-present, Facebook, 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 ...
/** * Copyright (C) 2017, Alec F. White * * Licensed under the 2-Clause BSD License. See the LICENSE.txt * file released with this work for additional information. **/ #include "cfrac.h" namespace cfacc { cfrac::cfrac( std::vector<std::complex<double> > &d, std::vector<std::complex<double> > &cd) : ...
#pragma execution_character_set("utf-8") #include "frmframelesswidget.h" #include <QApplication> #include <QTextCodec> int main(int argc, char *argv[]) { #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) QApplication::setAttribute(Qt::AA_Use96Dpi); #endif #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0)) QGuiApplication...
/* * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/file_io.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/device_factory.h" #include "shared/source/os_interface/linux/os_context_linux.h" #include "shared/source/o...
// (C) Copyright Gennadiy Rozental 2004-2014. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version ...
// Copyright (c) 2012-2013 The PPCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/list_of.hpp> #include "kernel.h" #include "txdb.h" using namespace std; typedef std::map<int, unsigne...
#pragma once #include <cmath> #include <iostream> #include <random> #define M_PI 3.14159265358979323846 constexpr float kInfinity = std::numeric_limits<float>::max(); inline float clamp(const float& lo, const float& hi, const float& v) //???? { return std::max(lo, std::min(hi, v)); } inline bool solveQuadratic...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 applic...
//The main library OSLib #include <oslib/oslib.h> #include <time.h> #include "numscene.h" // The callbacks PSP_MODULE_INFO("plusraPSP", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU); int main() { // Initialisation srand(time(0)); oslInit(0); oslInitGfx(OSL_PF_8888, 1); oslIni...
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See License.txt in the repo root for license information. // ------------------------------------------------------------ #include "stdafx.h" using nam...
#include "helper.h" #include <ntifs.h> #include <wdm.h> /* */ extern "C" { NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath); } void DummyDPC(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2) { UNREFERENCED_PARAMETER(Dpc); UNREFERENC...
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 3.0.8 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do...
#pragma once #include <string> #include "reproject.hpp" namespace reproject { void save_png(const reproject::Image &img, std::string output_file); void save_exr(const reproject::Image &img, std::string output_file); reproject::Image read_exr(std::string input_file); reproject::Image read_png(std::string input_file...
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
#include <iostream> #include <string> #include <unordered_map> #include "lexer.h" #include "interpreter.h" int main(int argc, char** argv) { interpreter i; std::string input; std::unordered_map<std::string, long double> vars; vars["x"] = 5; vars["pi"] = 3.14159265359; vars["e"] = 2.71828182846; while(1) { std...
/*========================================================================= Library: iMSTK Copyright (c) Kitware, Inc. & Center for Modeling, Simulation, & Imaging in Medicine, Rensselaer Polytechnic Institute. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file e...
#ifndef SPROUT_ITERATOR_SIZE_ENUM_ITERATOR_HPP #define SPROUT_ITERATOR_SIZE_ENUM_ITERATOR_HPP #include <iterator> #include <utility> #include <type_traits> #include <sprout/config.hpp> #include <sprout/iterator/next.hpp> #include <sprout/iterator/prev.hpp> #include <sprout/iterator/distance.hpp> #include <sprout/conta...
#include <bits/stdc++.h> #define SIZE 1000100 using namespace std; int nextArr[SIZE]; void initNext(const string & str) { nextArr[0] = 0; int len = str.size(); for (int fstPt = 1, sndPt = 0; fstPt < len; fstPt++) { while (sndPt > 0 && str[fstPt] != str[sndPt]) sndPt = nextArr[sndPt - 1]; ...
#ifndef TESTS_MOVE_HPP #define TESTS_MOVE_HPP #include <fgl/signals.hpp> #include <memory> namespace tests::move { using signal = fgl::signals::signal < void(std::unique_ptr<int>&&, const std::string&) >; bool test() { auto ok = true; signal sig; auto connection0 = sig.connect ( [&ok](...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_wchar_t_ncat_43.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805.string.label.xml Template File: sources-sink-43.tmpl.cpp */ /* * @description * CWE: 122 Heap Based Buffer Overflow * BadSource: Alloca...
/* * Copyright (C) 2002, 2003 The Karbon Developers * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> * Copyright (C) 2006, 2007 Rob Buis <buis@kde.org> * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. * Copyright (C) Research In Motion Limited 2010. All rights reserved. * * This library is free...
// Copyright (c) 2014-2020 Hartmut Kaiser // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <hpx/hpx.hpp> #include <hpx/hpx_init.hpp> #include <hpx/include/parallel...
#include "ColorParameter.h" ColorParameter::ColorParameter(std::string uniform, float r, float g, float b, float a, bool show, int *midi) { this->uniform = uniform; this->value = ofColor(r, g, b, a); this->show = show; this->midi = new int[4]; this->midi[0] = midi[0]; this->midi[1] = midi[1]; this->midi[...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2013, 2014, 2015. // Modifications copyright (c) 2013-2015 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of ...
/* SOURCE * Intermediate representation of line info for Z80 * * Stefan Wong 2018 */ #include <iomanip> #include <iostream> #include "Source.hpp" #include "Expression.hpp" /* * ======== TOKEN ======== // */ /* * Token */ Token::Token() : type(SYM_NULL), val(-1), repr("\0") {} Token::Token(const TokenType& ...
// validator: no-self-include /* main.cpp Функция main. */ /* Copyright © 1996 Eugene Roshal Copyright © 2000 Far Group 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...
#include <EditorPluginRmlUiPCH.h>
// -*- mode: c++; indent-tabs-mode: nil; -*- // // Copyright (c) 2009-2012 Illumina, Inc. // // 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 limit...
/* Copyright (C) 2011 J. Coliz <maniacbug@ymail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. */ // STL headers // C headers // Framework headers // Library headers #include "R...
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #if V8_TARGET_ARCH_X87 #include "src/code-factory.h" #include "src/codegen.h" #include "src/deoptimizer.h" #include "src/full-codegen/full-codegen.h" #...
//===- Shape.cpp - MLIR Shape Operations ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
// Copyright 2017 Google Inc. // Copyright 2020 The Open GEE Contributors // // 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 // // Unles...
#include <kinc/graphics4/graphics.h> #include <kinc/graphics4/vertexbuffer.h> #include <kinc/backend/SystemMicrosoft.h> #include "Direct3D9.h" struct kinc_g4_vertex_buffer *kinc_internal_current_vertex_buffer = NULL; void kinc_g4_vertex_buffer_init(kinc_g4_vertex_buffer_t *buffer, int count, kinc_g4_vertex_structur...
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #if V8_TARGET_ARCH_MIPS #include "src/code-stubs.h" #include "src/api-arguments.h" #include "src/base/bits.h" #include "src/bootstrapper.h" #include "s...
// Copyright (c) 2011-2014 The Bitcoin developers // Copyright (c) 2014-2015 The Dash developers // Copyright (c) 2015-2017 The PIVX developers // Copyright (c) 2018 The Fargocash developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mi...
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkNormalMapSource.h" #include "SkArenaAlloc.h" #include "SkLightingShader.h" #include "SkMatrix.h" #include "SkNormalSource.h" #include "SkReadBuffer.h" #include "S...
// Copyright 2017 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/android/crash/pure_java_exception_handler.h" #include "chrome/android/chrome_jni_headers/PureJavaExceptionHandler_jni.h" void U...