text stringlengths 5 1.04M |
|---|
/*
* Copyright (c) 2010-2012, 2014 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementation o... |
/*
BIJOY
CSE-25th Batch
Shahjalal University of Science and Technology
*/
#include<bits/stdc++.h>
//#define pi 3.141592653589793238462643383
//#define pi 2*acos(0.0)
//#define valid(tx,ty) tx>=0&&tx<r&&ty>=0&&ty<c
#define p pair<int,int>
//#define ll long lon... |
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "OnBoardingLanguageWindow.hpp"
#include <common/options/OptionBellMenu.hpp>
namespace gui
{
OnBoardingLanguageWindow::OnBoardingLanguageWindow(
app::ApplicationCo... |
//
// Copyright (c) 2015-2017, Deutsches Forschungszentrum für Künstliche Intelligenz GmbH.
// Copyright (c) 2015-2017, University of Bremen
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
... |
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Copyright (c) 2020 The BitcoinNickel 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/bitcoinnickel-config.h>
#... |
#include <iostream>
#include <vector>
#include <cmath>
#include <set>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <tuple>
#include <list>
#include "astar.hpp"
#include "knightpath.hpp"
#include "tsp.hpp"
int main( int argc, char* argv[] )
{
clock_t start, end;
std::cout << "Nodes Expanded\tTim... |
// 38 Count and Say
// https://leetcode.com/problems/count-and-say
// version: 1; create time: 2020-02-01 20:50:22;
class Solution {
public:
string countAndSay(int n) {
string cur = "1";
if (n == 1) return cur;
for (int i = 2; i <= n; ++i) {
string nex;
const int m =... |
/**
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "wrapper_callback.h"
#include "engine/cmd.h"
#include "engine/cmd.gen.h"
#include "engine/cmd_specific.g... |
// 4.16.1 0xbf1ff521 D2 AY R0 FARGB8888 U565 N0 SExtFlashSection
// Generated by imageconverter. Please, do not edit!
#include <touchgfx/hal/Config.hpp>
LOCATION_PRAGMA("ExtFlashSection")
KEEP extern const unsigned char image_blue_icons_next_arrow_32[] LOCATION_ATTRIBUTE("ExtFlashSection") = // 17x30 ARGB8888 pixels.... |
#include "city.h"
CITY::CITY()
{
}
void CITY::Init(INTPOINT _size)
{
m_size = _size;
m_objects.clear();
for(int y=0;y<m_size.y;y++)
for(int x=0;x<m_size.x;x++)
{
//Add tile
m_objects.push_back(OBJECT(TILE, D3DXVECTOR3(x * TILE_SIZE, 0.0f, y * -TILE_SIZE), D3DXVECTOR3(0.0f, 0.0f, 0.0f), D3DXVECTOR3(1.0... |
/**************************************************************************************
Copyright 2015 Applied Research Associates, 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.ap... |
#include <cmath>
class Base { // The class
public: // Access specifier
int Q; // Total Capacity (Discharge cell 100% to 0% SOC), Ah or mAh
float charge_capacity; // 0-100% SOC
int delta_t; // Iterations of time per sample
float delta_i; // Current applied to battery, A
float ... |
/* Copyright (c) 2010, AOYAMA Kazuharu
* All rights reserved.
*
* This software may be used and distributed according to the terms of
* the New BSD License, which is incorporated herein by reference.
*/
#include <QDir>
#include <QList>
#include <QHash>
#include <QPluginLoader>
#include <QMutex>
#include <QMutexLo... |
/** \file
* \brief String conversions and Hashing for GDF fileformat
*
* \author Łukasz Hanuszczak
*
* \par License:
* This file is part of the Open Graph Drawing Framework (OGDF).
*
* \par
* Copyright (C)<br>
* See README.md in the OGDF root directory for details.
*
* \par
* This program is free software;... |
// This file implements the IBackgroundCopyFile2 Interface for Python.
// Generated by makegw.py
#include "bits_pch.h"
#include "PyIBackgroundCopyFile.h"
#include "PyIBackgroundCopyFile2.h"
// @doc - This file contains autoduck documentation
// ---------------------------------------------------
//
// Interface Imple... |
#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <vector>
#include <time.h>
#include <string>
using namespace std;
class game_logic {
public:
bool standing = false;
int maxPlayers = 1;
int playersInGame = 0;
/*int getMaxPlayer() {
return maxPlayers;
}*/
string getHouseStats() {
stri... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
+---------... |
/*
Copyright (c) 2018 Matt Hensman <m@matt.tf>
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, d... |
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin III - PostgreSQL Tools
//
// Copyright (C) 2002 - 2014, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// pgAggregate.cpp - Aggregate class
//
/////////////////////////////////////////////... |
/*
* 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... |
#include "signverifymessagedialog.h"
#include "ui_signverifymessagedialog.h"
#include "addressbookpage.h"
#include "base58.h"
#include "guiutil.h"
#include "dialogwindowflags.h"
#include "init.h"
#include "main.h"
#include "optionsmodel.h"
#include "walletmodel.h"
#include "wallet.h"
#include <string>
#include <vecto... |
//===----------------------------------------------------------------------===//
//
// 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 (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURP... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-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.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "u... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include "jitpch.h"
#ifdef _MSC_VER
#pragma hdrstop
#endif
// return op that is the store equivalent of the given l... |
/*
Copyright (C) 2008 Grame & RTL
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the ... |
// 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... |
/*******************************************************************************
* Copyright (c) 2012-2014, The Microsystems Design Labratory (MDL)
* Department of Computer Science and Engineering, The Pennsylvania State University
* All rights reserved.
*
* This source code is part of NVMain - A cycle accurate timing... |
// Copyright (c) 2006, 2007 Julio M. Merino Vidal
// Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
// Copyright (c) 2009 Boris Schaeling
// Copyright (c) 2010 Felipe Tanus, Boris Schaeling
// Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
// Copyright (c) 2016 Klemens D. Morgenstern
//
// Distributed under the... |
#include <stdio.h>
#include <iostream>
#include "mcp23017.h"
#include "serial.h"
// Test functions go here
int mcp23017_test() {
static const uint8_t test_array[16] = {0, 1, 0, 0, 1, 0, 1, 1,
0, 1, 0, 0, 0, 1, 1, 1};
// initialize the device
Mcp23017 dev = M... |
// 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 "chrome/browser/ui/panels/panel_host.h"
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "chrome/bro... |
/**
* @file
* @brief Player related functions.
**/
#include "AppHdr.h"
#include "player.h"
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include "ability.h"
#include "abyss.h"
#include "act-iter.h"
#include "areas.h"
#include "a... |
#ifndef EVENTBUS_H_
#define EVENTBUS_H_
#include <string>
#include <vector>
#include <boost/signals2.hpp>
template<class T>
class singleton {
public:
template<typename ... Args>
static T* get_instance(Args ... args) {
if (!m_instance) {
m_instance = new T(std::forward<Args>(args)...);
}
retur... |
//
// basic_streambuf.hpp
// ~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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)
//
#ifndef BOOST_ASIO_... |
/*
* Copyright 2019 Xilinx, 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 or agreed to... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkXdmf3Writer.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 s... |
//=================================================================================================
/*!
// \file src/mathtest/dmatdvecmult/M2x2bVDa.cpp
// \brief Source file for the M2x2bVDa dense matrix/dense vector multiplication math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// ... |
/*******************************************************************************
* Copyright 2019-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 of the License at
*
* http://www.apa... |
/*
* MultipleSegmentBase.cpp
*****************************************************************************
* Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
*
* Email: libdash-dev@vicky.bitmovin.net
*
* @contributor Daniele Lorenzi
* @contributoremail lorenzidaniele.97@gmail.co... |
#include "MailBox.h"
#if defined(_WIN32)
#include "win32/Win32Defs.h"
#endif
bool CMailBox::IsPending() const
{
return m_calls.size() != 0;
}
void CMailBox::WaitForCall()
{
std::unique_lock<std::mutex> callLock(m_callMutex);
while(!IsPending())
{
m_waitCondition.wait(callLock);
}
}
void CMa... |
// Copyright (c) 2021 PaddlePaddle 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... |
// Copyright (c) 2009-2012 The Dreamcoinclub developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <openssl/bn.h>
#include <openssl/ecdsa.h>
#include <openssl/rand.h>
#include <openssl/obj_mac.h>
#include "key... |
#include <string>
#include <vector>
#include <cstdlib>
#include <CL/sycl.hpp>
#include "common.h"
#include "polybenchUtilFuncts.h"
using DATA_TYPE = float;
class Mvt1;
class Mvt2;
void init_arrays(DATA_TYPE* a, DATA_TYPE* x1, DATA_TYPE* x2, DATA_TYPE* y_1, DATA_TYPE* y_2, size_t size) {
const aut... |
/* 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... |
/*
* This file is part of the CN24 semantic segmentation software,
* copyright (C) 2015 Clemens-Alexander Brust (ikosa dot de at gmail dot com).
*
* For licensing information, see the LICENSE file included with this project.
*/
#ifndef BUILD_GUI
#include "NKContext.h"
#include "Log.h"
namespace Conv {
NKContext::... |
#include "gpiq_rjsxx.h"
#include "ui_gpiq_rjsxx.h"
#include <QDebug>
gpiq_rjsxx::gpiq_rjsxx(QWidget *parent) :
QDialog(parent),
ui(new Ui::gpiq_rjsxx)
{
ui->setupUi(this);
connect(ui->gpiq_rjsxx_grid_c, SIGNAL(clicked()), this, SLOT(gpiq_rjsxx_grid_cClick()));
connect(ui->gpiq_rjsxx_back_c, SIGNAL... |
#pragma once
#include "Sphere.h"
Sphere::Sphere(Point3 center, double radius, Material* material) :
Center(center),
Radius(radius),
m_Material(material)
{
}
std::optional<IntersectionRecord> Sphere::Intersects(const Ray& ray, const SampleBounds& sampleBounds) const
{
Vector3 distance = ray.Origin - Center;
doubl... |
#include "func_util.h"
#include "ast_ops/eval/eval_error.h"
#include <sstream>
namespace ast_ops::impl {
void check_arity(std::size_t expected, std::size_t provided) {
if (expected != provided) {
std::ostringstream msg;
msg << "wrong number of arguments (" << expected << " expected, "
<< provided <... |
// 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 "chrome/browser/ash/login/demo_mode/demo_setup_controller.h"
#include <utility>
#include "base/bind.h"
#include "base/callback.h"
#include "bas... |
/*************************************************************************/
/* export.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__new_wchar_t_connect_socket_01.cpp
Label Definition File: CWE789_Uncontrolled_Mem_Alloc__new.label.xml
Template File: sources-sinks-01.tmpl.cpp
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: connect_socke... |
#include <bits/stdc++.h>
using namespace std;
int t,m;
int dp[100002];
int tim[10002],value[10002];
int main()
{
std::ios::sync_with_stdio(false);
cin >> t >> m;
for(int i=1;i<=m;i++) cin >> tim[i] >> value[i];
for(int i=1;i<=m;i++)
{
for(int j=tim[i];j<=t;j++)
{
dp[j]=max(dp[j],dp[j-tim[i]]+value[i])... |
#include <torch/csrc/jit/codegen/fuser/cuda/fused_kernel.h>
#include <torch/csrc/jit/codegen/fuser/compiler.h>
#include <ATen/ATen.h>
#include <ATen/CUDAGeneratorImpl.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/nvrtc_stub/ATenNVRTC.h>
#include <THC/THC.h>
#include <c10/cuda/CUDAGuard.h>
#include <torch/... |
/*
* Copyright (C) 2007 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... |
//---
//
// License: MIT
//
// Description: NITF Info object.
//
//---
// $Id$
#include <ossim/support_data/ossimNitfInfo.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimIoStream.h>
#include <ossim/base/ossimStreamFactoryRegistry.h>
#include <ostream>
#include <sstream>
#include <memory>
ossim... |
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* Christian Schulte <schulte@gecode.org>
*
* Copyright:
* Christian Schulte, 2009
*
* Last modified:
* $Date: 2010-10-07 20:52:01 +1100 (Thu, 07 Oct 2010) $ by $Author: schulte $
* $Revision: 11473 $
*
* ... |
/****************************************************************************************
* @author: kzvd4729 created: 2018-08-15 23:39:50
* solution_verdict: Time limit exceeded language: C++
* run... |
#include <ncurses.h>
#include "screen.h"
Screen::Screen()
{
}
Screen::~Screen()
{
curs_set(1);
endwin();
}
bool Screen::Init()
{
initscr();
cbreak();
noecho();
clear();
start_color();
init_pair(1,COLOR_GREEN,COLOR_BLACK);
init_pair(2,COLOR_RED,COLOR_BLACK);
init_pair(3,COLOR_G... |
#include <wx/wx.h>
#include <wx/fontpicker.h>
namespace Examples {
class Frame : public wxFrame {
public:
Frame() : wxFrame(nullptr, wxID_ANY, "FontPickerCtrl example") {
SetClientSize(400, 400);
picker->SetSelectedFont(label->GetFont());
picker->SetSelectedColour(label->GetForegroundColour()... |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/layout/layout_shift_region.h"
#include <gtest/gtest.h>
#include "third_party/blink/renderer/platform/geometry/r... |
//******************************************************************************
//*
//* FULLNAME: Single-Chip Microcontroller Real-Time Operating System
//*
//* NICKNAME: scmRTOS
//*
//* Version: v5.2.0
//*
//*
//* Copyright (c) 2003-2021, scmRTOS Team
//*
//* Permission is hereby granted, free o... |
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define ll long long
#define fastoi ios::sync_with_stdio(0); cin.ti... |
// 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 "net/url_request/url_request_http_job.h"
#include <stdint.h>
#include <cstddef>
#include <memory>
#include <utility>
#include <vector>
#in... |
/* ******************************************************************************
*
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* See the NOTICE file distributed wit... |
/****************************************************************************************
* @author: kzvd4729 created: Jul/24/2018 15:21
* solution_verdict: Wrong answer on test 9 language: GNU C++14
* run... |
/* Copyright 2013-2021 MultiServerMC 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
*
* Unless required by applicable ... |
/****************************************************************************
** Meta object code from reading C++ file 'addressbookpage.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.10.1)
**
** WARNING! All changes made in this file will be lost!
****************************************************... |
#include <iostream>
#include <thread>
#include <vector>
#include <memory>
#include <sstream>
#include <boost/asio.hpp>
using namespace boost;
class connection
{
public:
asio::ip::tcp::socket socket;
std::vector<char> buff;
connection(asio::io_service& io):socket(io)
{
buff.resize(1024);
}
... |
/*
* Copyright 2019-2021 Xilinx, 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 or agre... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef WIN32
// for posix_fallocate
#ifdef __linux__
#define _POSIX_C_SOURCE 2001... |
/*
* Copyright (c) 2011-2019, The DART development contributors
* All rights reserved.
*
* The list of contributors can be found at:
* https://github.com/dartsim/dart/blob/master/LICENSE
*
* This file is provided under the following "BSD-style" License:
* Redistribution and use in source and binary forms, w... |
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "memory.hpp"
#include <memory>
#include <vector>
namespace cldnn {
struct work_group_sizes {
std::vector<size_t> global;
std::vector<size_t> local;
};
///////////////////////////////////////////////////... |
/**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "logdevice/server/NodeRegistrationHandler.h"
#include <gtest/gtest.h>
#inclu... |
/**
* Copyright (C) 2016-2017 Xilinx, Inc
*
* 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://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... |
/*
* Copyright (C) 2005 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... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_src_char_cpy_17.cpp
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_src.label.xml
Template File: sources-sink-17.tmpl.cpp
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Initialize data... |
/****************************************************************************
** Copyright (c) 2019, Fougue Ltd. <http://www.fougue.pro>
** All rights reserved.
** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt
****************************************************************************/
#includ... |
// Copyright 2020 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/nearby_sharing/transfer_metadata_builder.h"
// static
TransferMetadataBuilder TransferMetadataBuilder::Clone(
const Transfer... |
/*
We keep track of last binary digits and compare.
*/
class Solution {
public:
bool hasAlternatingBits(int n) {
int last = -1;
while (n) {
int d = n % 2;
n /= 2;
if (d == last) return false;
last = d;
}
return true;
}
}; |
/*
* 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/Script/ScriptTimePoint.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserModel... |
// 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.
#include "cc/test/begin_frame_args_test.h"
#include "base/time/time.h"
#include "cc/output/begin_frame_args.h"
#include "ui/gfx/frame_time.h"
namespace ... |
/**
* FastReport Cloud
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
*
* NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
* https://openapi-generator.tech
* Do not edit the class manually.
*... |
// Copyright (c) 2019 Álvaro Ceballos
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
#ifndef CYNODELIC_MULINUM_TEST_MAKE_FROM_TAG_HPP
#define CYNODELIC_MULINUM_TEST_MAKE_FROM_TAG_HPP
CYNODELIC_TESTER_TEST_CASE_SINGLE_SECT... |
// 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.
#include "src/api.h"
#include <string.h> // For memcpy, strlen.
#ifdef V8_USE_ADDRESS_SANITIZER
#include <sanitizer/asan_interface.h>
#endif // V8_US... |
#include "GameInterface.hpp"
#include "HostInterface.hpp"
#include "GameLogic.hpp"
#include "MapTransientState.hpp"
#include <algorithm>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <math.h>
#include <unordered_map>
GlobalState *globalState;
HostInterface *hostInterface;
static MemoryZone *transie... |
#include "vulkanite_pipeline.hpp"
#include <fstream>
#include <stdexcept>
#include <iostream>
#include <cassert>
namespace vulkanite {
VulkanitePipeline::VulkanitePipeline(VulkaniteDevice& device, const std::string& vertFilepath, const std::string& fragFilepath, const PipelineConfigInfo& configInfo) : vulkaniteDevic... |
/*
*
* Copyright 2015 gRPC 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 agree... |
//--------------------------------------------------------------------------------------
// File: GamePad.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkId=248929
// http://go.microsoft.com/fwlink/?LinkID=615561
//... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: ... |
#include <GuiFoundationPCH.h>
#include <Foundation/IO/MemoryStream.h>
#include <Foundation/Serialization/DdlSerializer.h>
#include <GuiFoundation/Action/ActionManager.h>
#include <GuiFoundation/Action/ActionMapManager.h>
#include <GuiFoundation/Action/EditActions.h>
#include <QApplication>
#include <QClipboard>
#inclu... |
// stdafx.cpp : source file that includes just the standard includes
// vvWinSync.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// reference any additional headers you need in STDAFX.H
// and not in this file
|
/*=============================================================================
Copyright (c) 2005-2013 Joel de Guzman
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 "System.h"
#include "ros/ros.h"
#include <Task.h>
#include <csetjmp>
jmp_buf g_buf;
int main(int argc, char** argv) {
ros::init(argc, argv, "hive_connect");
std::shared_ptr<ros::NodeHandle> nodeHandle =
std::make_shared<ros::NodeHandle>(*(new ros::NodeHandle("~")));
setjmp(g_buf);
ap... |
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include "CalllogHelper.hpp"
#include <Service/Service.hpp>
#include <endpoints/Endpoint.hpp>
namespace sdesktop::endpoints
{
class CalllogEndpoint : public Endpoi... |
#include "main.hpp"
// Outputs
const int pin_led = 13;
// Set up some StateMachine objects
// Pulse LED once for 200 ms immediately
Stimulus led(0, 200, digitalOn, digitalOff, pin_led);
// Wait 500 ms, then pulse LED 5 times for 50 ms each with 100 ms period
StimulusRepeating led_repeating(500, 50, digitalOn, digita... |
// Copyright (c) 2013 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "atom/common/platform_util.h"
#include <stdio.h>
#include "base/files/file_util.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
#include "url/gurl.h"
nam... |
#include "common.h"
#include "ClientTesterImpl.h"
namespace tester {
using namespace sirius;
const ClientTesterImpl::TestCases ClientTesterImpl::gTestCases[] = {
{
.type = PREVIEW_NV21,
.func = &ClientTesterImpl::testPreview,
.arg = 0,
},
{
.type = PREVIEW_NV21,
.... |
// Copyright 2021 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#include <lib/memalloc/range.h>
#include <lib/stdcompat/span.h>
#include <zircon/boot/image.h>
#include <string_view>
#include <t... |
/*
* Copyright Andrey Semashev 2007 - 2015.
* 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)
*/
/*!
* \file support/std_regex.hpp
* \author Andrey Semashev
* \date 19.03.2014... |
// Copyright 2022, University of Freiburg,
// Chair of Algorithms and Data Structures.
// Author: Johannes Kalmbach <kalmbach@cs.uni-freiburg.de>
#include <gtest/gtest.h>
#include <algorithm>
#include "../src/util/Iterators.h"
auto testIterator = [](const auto& input, auto begin, auto end) {
auto it = begin;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.