text stringlengths 7 961k |
|---|
#include<stdio.h>
int main()
{
int a,b,h,l,i;
printf("enter two number\n");
scanf("%d\n%d",&a,&b);
for(i=1;i<=a,i<=b;i++)
{
if(a%i==0&&b%i==0)
h=i;
}
l=(a*b)/h;
printf("hcf value=%d\n lcm value=%d",h,l);
} |
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
#include <bits/stdc++.h>
using namespace std;
int getNumDominos(int m , int n);
int getNumDominos(int m , int n) {
if(m % 2 == 0) {
return m * n / 2;
}
else {
return (int)((m - 1) * n / 2) + (int)(n / 2);
}
}
int main(int argc, char const *argv[]) {
int m;
int n;
cin >> m >> n;
cout << getNumDominos(m , ... |
#pragma once
// This file is generated from the Game's Reflection data
#include <cstdint>
#include <RED4ext/Common.hpp>
#include <RED4ext/Scripting/Natives/Generated/red/Event.hpp>
namespace RED4ext
{
namespace ent {
struct UpdateRenderProxyStateEvent : red::Event
{
static constexpr const char* NAME = "entUpdat... |
/** @file Driver.cpp
* @brief This is the main game Driver file.
*
* This file is the Driver file for the chess game.
*
* @author Dishon Merkhai (dmerkhai).
* @author Fraser Brown (fbrown5).
*
* @bug no known bugs.
*/
/** -- Includes -- **/
#include "Game.h"
using namespace std;
using namespace cv;
/** @b... |
#include <omni/core/model/type_mismatch_error.hpp>
#include <omni/core/model/type.hpp>
#include <sstream>
namespace {
/**
Builds and returns an error message that leftType is not equal to rightType.
**/
std::string buildTypeMismatchErrorMessage (omni::core::model::type & leftType, omni::core::model::type & rightType)... |
class Solution {
public:
vector<int> distributeCandies(int candies, int n) {
vector<int> ans(n, 0);
int i = 0, index, curr = 1;
while (candies > 0){
i = i%n;
if (candies >= curr){
candies -= curr;
ans[i] += curr;
... |
#include "mc.hpp"
#include "remc.hpp"
void do_mc(std::mt19937 &mt) {
MC m;
double max = 0.0;
while (true) {
m.onestep(0.01, mt);
if (max > m.current_energy()) {
max = m.current_energy();
m.show();
}
}
}
void do_remc(std::mt19937 &mt) {
REMC remc;
double beta = 0.001;
for (int i =... |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2018, Intel Corporation, all rights reserved.
// Third party copyrights are property of their respective o... |
/**
* @file ListOfDeletions.cpp
* @brief Implementation of ListOfDeletions.
* @author Lucian Smith
*
*<!---------------------------------------------------------------------------
* This file is part of libSBML. Please visit http://sbml.org for more
* information about SBML, and the latest version of libS... |
//
// Copyright (c) 2008-2018 the Urho3D project.
//
// 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, m... |
#include <bits/stdc++.h>
using namespace std;
// A utility function to get the middle index from corner indexes.
int getMid(int s, int e) { return s + (e -s)/2; }
/*
A recursive function to get the sum of values in the given range
of the array. The following are parameters for this function.
st --> Pointer... |
#include <iterator>
#include <string>
#include <pl/algo/erase.hpp>
#include <pl/algo/ranged_algorithms.hpp>
#include <pl/string_view.hpp>
#include <cl/exception.hpp>
#include <cl/fs/directory_listing.hpp>
#include "interpolated_data_set_paths.hpp"
namespace cm {
namespace {
/*!
* \brief Fetches the revised data se... |
#pragma once
#include <mbgl/renderer/bucket.hpp>
#include <mbgl/map/mode.hpp>
#include <mbgl/gfx/vertex_buffer.hpp>
#include <mbgl/gfx/index_buffer.hpp>
#include <mbgl/programs/segment.hpp>
#include <mbgl/programs/symbol_program.hpp>
#include <mbgl/programs/collision_box_program.hpp>
#include <mbgl/text/glyph_range.hp... |
/**
* Copyright (C) 2016 MongoDB Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be usef... |
// 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 "components/history/core/browser/expire_history_backend.h"
#include <stddef.h>
#include <algorithm>
#include <functional>
#include <limits>... |
#include "common/UuidUtility.h"
#include <array>
#include <random>
uuids::uuid generateRandomUuid()
{
std::random_device rd;
auto seed_data = std::array<int, std::mt19937::state_size>{};
std::generate( std::begin(seed_data), std::end(seed_data), std::ref(rd) );
std::seed_seq seq( std::begin(seed_data)... |
// Copyright 2013 The Flutter 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 "flutter/lib/ui/semantics/semantics_update.h"
#include <memory>
#include "flutter/lib/ui/painting/matrix.h"
#include "flutter/lib/ui/semantics/s... |
/*
* Copyright (c) 2018, 2020, 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 ... |
// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=50 %s -Wuninitialized
typedef void **omp_allocator_handle_t;
extern const omp_allocator_handle_t omp_null_allocator;
extern const omp_allocator_handle_t omp_default_mem_alloc;
extern co... |
/**
* Autogenerated by Thrift Compiler (0.11.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#include "TI2StringService.h"
namespace OpenStars { namespace Common { namespace I2SKV {
bool TI2StringServiceProcessor::dispatchCall(::apache::thrift::protocol::TProtocol* iprot,... |
#include "SolverTrilinosAztec.h"
namespace INMOST {
SolverTrilinosAztec::SolverTrilinosAztec() {
}
SolverTrilinosAztec::SolverTrilinosAztec(const SolverInterface *other) {
//You should not really want to copy solver's information
throw INMOST::SolverUnsupportedOperation;
}
bool ... |
////////////////////////////////////////////////////////////////////////////////
// The MIT License (MIT)
//
// Copyright (c) 2020 Nicholas Frechette & Realtime Math contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (th... |
// -------------------------------------------------
// BlinKit - BlinKit Library
// -------------------------------------------------
// File Name: CSSInterpolationType.cpp
// Description: CSSInterpolationType Class
// Author: Ziming Li
// Created: 2021-10-20
// ---------------------------------------------... |
// Copyright (c) 2007-2018 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_init.hpp>
#include <hpx/include/async.hpp>
#include <hpx/includ... |
/*
Copyright 2017-2020 Siemens AG
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, distribute,
sub... |
#include "NVM_Transaction_Flash_RD.h"
#include "../nvm_chip/NVM_Types.h"
namespace SSD_Components
{
//FGM - LPA, PPA, No Address, Related Write
NVM_Transaction_Flash_RD::NVM_Transaction_Flash_RD(
Transaction_Source_Type source,
stream_id_type stream_id,
unsigned int data_size_in_byte,
LPA_type lpa,
... |
#include <iostream>
#include <algorithm>
#include <map>
#include <string>
using namespace std;
bool cmp(const string& ll, const string& rr)
{
return ll.size() > rr.size(); //descending order
}
bool isWordMakeable(const string& word, map<string, bool>& hashmap)
{
int len = word.size();
if(len == 0)
{... |
#include <QtGui>
#include <numeric>
#include <algorithm>
#include <sstream>
#include "zpunctum.h"
#include "zrandom.h"
ZPunctum::ZPunctum()
: m_score(1.0)
{
setColor(255, 255, 0, 255);
setX(-1);
setY(-1);
setZ(-1);
setRadius(2.0);
setMaxIntensity(255);
setMeanIntensity(255);
setSDevOfIntensity(0);
... |
/*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-2014 Intel Corporation. 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 noti... |
#include <ozo/io/binary_query.h>
#include <ozo/optional.h>
#include <iterator>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
namespace {
namespace hana = boost::hana;
using namespace testing;
template <class Text, class Params>
static auto make_binary_query(Text&& text, const Params& params) {
return ozo:... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
// Copyright 2011 Eric Niebler. 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)
//
// This is an example of how to specify a transform externally so
// that a single grammar can be used to drive multiple differnt... |
// KRATOS___
// // ) )
// // ___ ___
// // ____ //___) ) // ) )
// // / / // // / /
// ((____/ / ((____ ((___/ / MECHANICS
//
// License: geo_mechanics_application/license.txt
//
//
// Main authors: Ignasi de Pouplana,
// Vahid Galavi
//
#includ... |
#include "stdafx.h"
#include "AbilityGather.h"
#include "Scene.h"
#include "Log.h"
#include "Obj_ItemBox.h"
#include "ItemManager.h"
#include "GCBoxItemList.h"
#include "GameTable.h"
#include "GCAbilitySucc.h"
using namespace Packets;
AbilityGather::AbilityGather(Ability& a):Ability(a)
{
}
ORESULT AbilityGather:... |
/*
* FogLAMP south plugin.
*
* Copyright (c) 2018 Dianomic Systems
*
* Released under the Apache 2.0 Licence
*
* Author: Mark Riddoch
*/
#include <expression.h>
#include <plugin_api.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <string>
#include <logger.h>
#include <plugin_exception.h>... |
#include <boost/asio/ip/basic_endpoint.hpp> |
#ifndef STATIC_LINK_VW
#define BOOST_TEST_DYN_LINK
#endif
#include <boost/test/unit_test.hpp>
#include "vwdll.h"
#include "vw.h"
template<class T>
void check_weights_equal(T& first, T& second)
{
auto secondIt = second.begin();
for (auto firstIt : first)
{
BOOST_CHECK_EQUAL(firstIt, *secondIt);
++second... |
#include <pga/rendering/D3DException.h>
#include <pga/rendering/D3DMaterial.h>
#include <pga/rendering/D3DShader.h>
#include <iterator>
namespace PGA
{
namespace Rendering
{
namespace D3D
{
void move(void** ppBuffer, size_t offset)
{
auto cBuffer = reinterpret_cast<unsigned char*>(*ppBuffer);
cBuf... |
// Copyright 2014 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.
#include "src/base/bits.h"
#include "src/compiler/backend/instruction-selector-impl.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/no... |
/**
* problem : https://leetcode.com/problems/orderly-queue/
* time complexity : O(NlogN)
* algorithm : greedy
*/
class Solution {
public:
string orderlyQueue(string S, int K) {
string ans = S;
if(K==1){
for(int i=1; i<S.size();i++)
ans = min(ans, S.substr(i) + S.su... |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////... |
// Generated by Haxe 4.1.4
#include <hxcpp.h>
#ifndef INCLUDED_lime_graphics_opengl_ext_OES_vertex_half_float
#include <lime/graphics/opengl/ext/OES_vertex_half_float.h>
#endif
HX_DEFINE_STACK_FRAME(_hx_pos_2b1d0dc1acb0da8b_6_new,"lime.graphics.opengl.ext.OES_vertex_half_float","new",0x752d1419,"lime.graphics.opengl.... |
// StaticObj.cpp: implementation of the CStation class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Station.h"
#include "vertextypes.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Cons... |
/*
Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
Copyright (c) 2021, COSIC-KU Leuven, Kasteelpark Arenberg 10, bus 2452, B-3001 Leuven-Heverlee, Belgium.
All rights reserved
*/
#include "GC/SimplifyCircuit.h"
#include "Math/bigint.h"
#include "config.h"... |
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "EventFilter/L1TRawToDigi/plugins/UnpackerFactory.h"
#include "L1Trigger/L1TMuon/interface/MuonRawDigiTranslator.h"
#include "GMTCollections.h"
#include "IntermediateMuonUnpacker.h"
namespace l1t {
name... |
// Copyright 2016 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 ... |
// -----------------------------------------------------------------------------
// Brandy language DFA (lexer)
// Howard Hughes
// -----------------------------------------------------------------------------
#include "lexer.h"
#include <assert.h>
#include <ctype.h>
#include <vector>
// -----------------------------... |
// Copyright (c) 2014-2018, The Monero Project
//
// 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 o... |
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
... |
#include "AssertException.h"
namespace UnitTest {
void ReportAssert(char const* description, char const* filename, int lineNumber)
{
throw AssertException(description, filename, lineNumber);
}
} |
// License: BSD 2 Clause
// Copyright (C) 2010, Google Inc. All rights reserved.
// Copyright (C) 2015+, The LabSound Authors. All rights reserved.
#include "LabSound/core/ChannelSplitterNode.h"
#include "LabSound/core/AudioBus.h"
#include "LabSound/core/AudioContext.h"
#include "LabSound/core/AudioNodeInput.h"
#inclu... |
/*
* (C) Copyright 2018 UCAR
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/
#include "lorenz95/instantiateL95ChangeVarFactory.h"
#include "lorenz95/instantiateLocalizationFactory.h"
#include "lorenz95/L95Tra... |
// See LICENSE_CELLO file for license and copyright information
/// @file enzo_EnzoRiemannUtils.hpp
/// @author Matthew Abruzzo (matthewabruzzo@gmail.com)
/// @date Thurs May 15 2020
/// @brief [\ref Enzo] Declaration and Implementation of assorted utilities
/// in the enzo_riemann_utils namesapce that ar... |
/*=========================================================================
Program: Visualization Toolkit
Module: TestLogoWidget.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software i... |
#include <bits/stdc++.h>
#define ENDL '\n'
#define deb(u) cout << #u " : " << (u) << ENDL;
#define deba(alias, u) cout << alias << ": " << (u) << ENDL;
#define debp(u, v) cout << u << " : " << v << ENDL;
#define pb push_back
#define F first
#define S second
#define lli long long
#define pii pair<int, int>
#define pll p... |
/**
* @file record.cpp
* @author SMS (2436210442@qq.com)
* @brief 视频保存
* @date 2021-08-28
* @copyright Copyright (c) 2021 GUCROBOT_WOLF
*
*/
#include "record.hpp"
#include <iostream>
#include <opencv2/opencv.hpp>
#include <thread>
#include <string>
#include <ctime>
#include <chrono>
#include<fstream>
namespace R... |
// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: param_server/param_server.proto
#include "param_server/param_server.pb.h"
#include "param_server/param_server.grpc.pb.h"
#include <functional>
#include <grpcpp/impl/codegen/async_stream.h>
#include <grpcpp/impl/codegen... |
// Copyright (c) 2018-2019 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/
#ifndef TAO_JSON_BINDING_MEMBER_KIND_HPP
#define TAO_JSON_BINDING_MEMBER_KIND_HPP
namespace tao::json::binding
{
enum class member_kind : bool
{
optional,
required
... |
#include <Python.h>
#include "client_context.hpp"
#include <hawktracer/client_utils/stream_factory.hpp>
namespace HawkTracer
{
namespace Python
{
using namespace HawkTracer;
struct HT_Python_Client
{
PyObject_HEAD
Context* context;
};
static PyObject *
client_new(PyTypeObject *type, PyObject *args, PyObjec... |
//=================================================================================================
/*!
// \file src/mathtest/tdvecsmatmult/VDbLCb.cpp
// \brief Source file for the VDbLCb dense vector/sparse matrix multiplication math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// Th... |
#include "stage2.h"
#include "ui_stage2.h"
#include "QMessageBox"
static int point2=0;
static int point5=5;
static int point=10;
static int point3=15;
static int point4=5;
stage2::stage2(QWidget *parent) :
QDialog(parent),
ui(new Ui::stage2)
{
ui->setupUi(this);
ui->Display3->setText(QString::number(... |
/*************************************************************************
* libjson-rpc-cpp
*************************************************************************
* @file test_common.cpp
* @date 28.09.2013
* @author Peter Spiess-Knafl <dev@spiessknafl.at>
* @license See attached LICENSE.txt
**********... |
// Copyright (c) 2009-2017 The Bitcoin Core developers
// Copyright (c) 2021 The PHOENIXSIV Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif
#i... |
// Copyright 2018 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 "src/connectivity/bluetooth/core/bt-host/sdp/pdu.h"
#include <gtest/gtest.h>
#include "src/connectivity/bluetooth/core/bt-host/common/byte_buffe... |
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1... |
// Copyright 2019 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 "base/task/sequence_manager/work_deduplicator.h"
#include <utility>
#include "base/check_op.h"
namespace base {
namespace sequence_manager {
na... |
// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* 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
*
* h... |
/**
* 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... |
/*
* 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... |
/*
* 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 <Atom/RHI.Reflect/Vulkan/ReflectSystemComponent.h>
#include <Atom/RHI.Reflect/ReflectSystem... |
/*
* Copyright (c) 2018, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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/LICE... |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "extern/beatsaber-hook/shared/utils/typedefs.h"
#include "extern/beatsaber-hook/shared/utils/byref.hpp"
// Including type: MissionLevelModifiers... |
/*
* Copyright 2006-2008 The FLWOR Foundation.
*
* 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... |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bitcoinunits.h"
#include <QStringList>
BitcoinUnits::BitcoinUnits(QObject *parent):
QAbstractListModel(par... |
/*
* 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... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
#include "StdAfx.h"
#include "StaticPlaneShape.h"
#define Native static_cast<btStaticPlaneShape*>(_native)
StaticPlaneShape::StaticPlaneShape(Vector3 planeNormal, btScalar planeConstant)
: ConcaveShape(0)
{
VECTOR3_CONV(planeNormal);
UnmanagedPointer = new btStaticPlaneShape(VECTOR3_USE(planeNormal), planeConstan... |
// Created by: Eugeny MALTCHIKOV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the F... |
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "android_webview/browser/aw_pref_store.h"
#include <utility>
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
AwPrefStore::AwP... |
#include "Uuid.h"
#include <boost/lexical_cast.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
namespace kc::core {
Uuid generateUuid() {
using namespace boost;
return lexical_cast<Uuid>(uuids::random_generator()());
}
} |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE762_Mismatched_Memory_Management_Routines__new_free_char_52b.cpp
Label Definition File: CWE762_Mismatched_Memory_Management_Routines__new_free.label.xml
Template File: sources-sinks-52b.tmpl.cpp
*/
/*
* @description
* CWE: 762 Mismatched Memory Management Routines
* B... |
#include "stdafx.h"
#include "DebugRenderer.h"
#include "RenderingManager.h"
#include "GpuBuffer.h"
//////////////////////////////////////////////////////////////////////////
static struct DebugSpherePrecomp
{
DebugSpherePrecomp()
{
auto PointOnSphere = [](float theta, float phi) -> glm::vec3
... |
//Displays 123456789987654321 then stops
//Praise P. Tompane
#include <iostream>
using namespace std;
//Base case of a recursion function
//is the condition that causes the recursion to stop
void PrintNum(int Num)
{
//bool NumReachedNine = false;
cout <<Num;
if(Num < 9)
{
PrintNum(Num + 1);
}... |
// g_spawn
class CCC_Spawn : public IConsole_Command {
public:
CCC_Spawn(LPCSTR N) : IConsole_Command(N) { };
virtual void Execute(LPCSTR args) {
if (!g_pGameLevel) return;
if (!pSettings->section_exist(args))
{
Msg("! Section [%s] isn`t exist...", args);
return;
}
char Name[128]; Name[0] = 0;
ss... |
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
#include <boost/hana/assert.hpp>
#include <boost/hana/equal.hpp>
#include <boost/hana/ext/std/ratio.hpp>
#include <boost/hana/not.hpp>
#in... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
using namespace std;
typedef long long lint;
inline bool is_num(char c){
return c>='0'&&c<='9';
}
inline int ni(){
int i=0;char c;
while(!is_num(c=getchar()));
while(i=i*10-'0'+c,is_num(c=getchar()));
return i;
}
int main(){
freopen("rsmt... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and ... |
/*
* Copyright (c) 2015, Nagoya University
* 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 ... |
#include "testApp.h"
void testApp::setup() {
ofSetFrameRate(60);
cam.setPosition(ofVec3f(0, -3.f, -111));
cam.lookAt(ofVec3f(0, 0, 0), ofVec3f(0, -1, 0));
world.setup();
world.enableGrabbing();
world.setCamera(&cam);
world.setGravity( ofVec3f(0, 0, 0) );
//this has been taken straight out of the of... |
// 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 "third_party/blink/renderer/platform/scheduler/common/throttling/wake_up_budget_pool.h"
#include <algorithm>
#include <cstdint>
#include "third... |
//
// Created by Jarlene on 2017/7/21.
//
#include "matrix/include/api/Symbol.h"
#include "matrix/include/utils/StringUtil.h"
namespace matrix {
Symbol::Symbol(const Symbol &symbol) {
this->nodePtr = symbol.nodePtr;
}
Symbol::Symbol(const std::string &name) {
nodePtr = Node::Create();
... |
/*
* Copyright (C) 2014 Patrick Mours. All rights reserved.
* License: https://github.com/crosire/reshade#license
*/
#include "input.hpp" // input::key_name
#include "imgui_widgets.hpp"
#include "fonts/forkawesome.h"
#include <cassert>
bool reshade::imgui::path_list(const char *label, std::vector<std::filesystem::... |
/** Copyright 2020 Alibaba Group Holding Limited.
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... |
// Copyright 2020-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... |
#include "Core/ImGuiLayer.hpp"
#include "Core/Window.hpp"
#include "Graphics/Device.hpp"
#include "ImGuizmo.h"
namespace SD {
ImGuiLayer::ImGuiLayer(Window* window) : Layer("ImGuiLayer"), m_window(window)
{
IMGUI_CHECKVERSION();
m_context = ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
// io.C... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "VModAudPcm.h"
#include "verilated.h"
#define CONGFXB_NOMAIN
#include "congfxbe.c"
VModAudPcm *top = new VModAudPcm;
vluint64_t main_time = 0;
int sblk0_enc(int v)
{
int e, v0, v1;
if(v<0)
{
v1=sblk0_enc(-v);
return(0x80|v1);
}
if(v>=25... |
#include "Precompiled.h"
#include "UndoManager.h"
#include "CommandManager.h"
#include "WidgetSelectorManager.h"
template <> tools::UndoManager* MyGUI::Singleton<tools::UndoManager>::msInstance = nullptr;
template <> const char* MyGUI::Singleton<tools::UndoManager>::mClassTypeName = "UndoManager";
namespace tools
{
... |
#include <iostream>
#include <thread>
#include <mutex>
#include <map>
#include <fstream>
#include "player.hpp"
#include "attack.hpp"
#include "loot.hpp"
#include "sender.hpp"
#include <xhacking/xHacking.h>
#include <xhacking/Utilities/Utilities.h>
#include <xhacking/Loader/Loader.h>
#include <xhacking/Detour/Detour.h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.