text stringlengths 7 961k |
|---|
/**************************************************************************************************
Software License Agreement (BSD License)
Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
All rights reserved.
Redistribution and use in source and binary forms, with o... |
#include "event.hpp"
Event::Event()
{
} |
// 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/regexp/jsregexp.h"
#include "src/ast/ast.h"
#include "src/base/platform/platform.h"
#include "src/compilation-cache.h"
#include "src/comp... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2020 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 <sync.h>
#include <util/system.h>
#ifdef HAVE_BOOST_PROCESS
#include <b... |
/**
* \file
* \copyright
* Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "HeatTransportBHEProcess.h"
#in... |
#ifdef _WIN32
#include "../PlatformString.h"
#include <iostream>
#include "../PlatformAssertion.h"
namespace cube
{
namespace internal
{
char32_t DecodeAndMoveInPCharacter(const wchar_t*& pStr)
{
// Same as UTF16 in String.h
char32_t res = 0;
wchar_t ch = *pStr;
if((ch & 0xFC00) == 0xD800) { // ... |
/* Copyright 2017 - 2022 R. Thomas
* Copyright 2017 - 2022 Quarkslab
*
* 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 req... |
// https://www.codechef.com/FEB21C/problems/MEET
#include <bits/stdc++.h>
using namespace std;
class CTime {
public:
int hh;
int mm;
char M;
int total;
void calT() {
if (M == 'A' && hh == 12) {
hh -= 12;
}
if (M == 'P' && hh != 12) {
... |
#include "sai_redis.h"
#include "meta/sai_serialize.h"
#include "meta/saiattributelist.h"
#include "SkipRecordAttrContainer.h"
using namespace sairedis;
static auto g_skipRecordAttrContainer = std::make_shared<SkipRecordAttrContainer>();
sai_status_t internal_redis_get_process(
_In_ sai_object_type_t object... |
#include <bits/stdc++.h>
using namespace std;
#define SIZE 200010
int dp[SIZE], lft[SIZE], rgt[SIZE];
pair<int, int> arr[SIZE];
int main() {
ios::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int len, num;
cin >> len >> num;
len++;
for (int i = 1; i <= len; i++)
lft[i] = 0, rgt[i... |
#include <limits>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;
#include "waveletMatrixArray.h"
#include "waveletMatrix.h"
/////////// For Testing ///////////////////////////////////////////////////////
#include <time.h>
#include <cassert>
#include <string>
#include <iostream>
#includ... |
/*ckwg +29
* Copyright 2013-2016 by Kitware, 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 li... |
//---------------------------------------------------------------------------//
// Copyright (c) 2015 Eleftherios Avramidis <el.avramidis@gmail.com>
//
// Distributed under The MIT License (MIT)
// See accompanying file LICENSE.txt
//---------------------------------------------------------------------------//
#ifndef... |
/****************************************************************************************
* @author: kzvd4729 created: Oct/10/2019 19:05
* solution_verdict: Wrong answer on test 9 language: GNU C++14
* run... |
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from configuration.djinni
#ifndef DJINNI_GENERATED_NJSBLOCKCHAINEXPLORERENGINES_HPP
#define DJINNI_GENERATED_NJSBLOCKCHAINEXPLORERENGINES_HPP
#include <memory>
#include <nan.h>
#include <node.h>
#include "../../../core/src/api/BlockchainExplore... |
// Copyright (c) 2011-2019 The Bitcoin Core developers
// Copyright (c) 2014-2019 The DigiByte Core developers
// Copyright (c) 2019-2020 The Auroracoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <key.h>... |
// Copyright (c) 2011-2014 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 "utilitydialog.h"
#include "ui_helpmessagedialog.h"
#include "bitcoingui.h"
#include "clientmodel.h"
#include "guiu... |
// RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,CHECK-NOSANITIZE
// RUN: %clang_cc1 -fsanitize=alignment -fno-sanitize-recover=alignment -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s -implicit-check-not="call void @__ubsan_handle_alignment_assumption" --... |
// Test target codegen - host bc file has to be created first.
// RUN: %clang_cc1 -verify -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
// RUN: %clang_cc1 -debug-info-kind=limited -verify -fopenmp -x c++ -triple nvptx64-unknown-unknown -fopen... |
/*
* Copyright 2016 - 2019 Angelo Matni, Simone Campanoni
*
* 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, ... |
// A helper for llvm backends
#include <llvm/Transforms/Utils/Cloning.h>
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruct... |
// 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 "net/quic/quic_dispatcher.h"
#include <errno.h>
#include "base/debug/stack_trace.h"
#include "base/logging.h"
#include "base/stl_util.h"
#inclu... |
#include "stdafx.h"
#include "IniUtil.h"
vector<WCHAR> GetPrivateProfileSectionBuffer(LPCWSTR appName, LPCWSTR fileName)
{
vector<WCHAR> buff(4096);
for(;;){
DWORD len = GetPrivateProfileSection(appName, buff.data(), (DWORD)buff.size(), fileName);
if( len < buff.size() - 2 ){
buff.resize(len + 1);
break;
... |
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
/*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2016, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
w... |
// Copyright 2017 The Ray Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
#include "CollisionObject.hpp"
#include <cassert>
#include <BulletCollision/CollisionShapes/btCompoundShape.h>
#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
#include <LinearMath/btDefaultMotionState.h>
#include "Objects/GameObject.hpp"
#include "Scenes/Scenes.hpp"
#include "Collider.hpp"
namespace acid... |
/* ========================================================
Author: Caili Li caili@udel.edu
======================================================*/
#include <QtGui>
#include <QtWidgets>
#include <blend2d.h>
#include "qblcanvas.h"
// ============================================================================
... |
#include <stdio.h>
#include <sstream>
#include "ast_fn.hpp"
Fn_Node::~Fn_Node()
{
for (auto &&p : params)
{
delete p;
}
params.clear();
delete return_type;
return_type = nullptr;
for (auto &&n : body)
{
delete n;
}
body.clear();
PRINT_DTOR;
}
Type_Info *Fn_N... |
#include <iostream>
using namespace std;
double power(double x ,int y)
{
double result = 1 ;
for(long long i = 0 ; i < y ; i++)
{
result*=x;
}
return result;
}
int main()
{
double asol , porer_ashol , rate ;
int year = 0;
while (cin >> asol >> rate >> porer_ashol )
{
... |
// -------------------------------------------------------------------------------------------------
// Copyright 2017 - NumScale SAS
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at
// ... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 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 "db.h"
#include "net.h"
#include "init.h"
#include "addrman.h"
#include "... |
// Copyright (C) Microsoft Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "stdafx.h"
#include "ScenarioAuthentication.h"
#include "AppWindow.h"
#include "CheckFailure.h"
using namespace Microsoft::WRL;
ScenarioAuthen... |
#include <iostream>
#include <utility>
#include <cmath>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
ll gcd(ll n, ll m) {
ll auxi;
if (m > n) {
auxi = n;
n = m, m = auxi;
}
while (m != 0) {
auxi = n;
n = m, m = auxi%m;
}
return n;
}
int... |
/*
Copyright (c) 2019-2022, Hossein Moein
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the follow... |
// Copyright 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 "media/filters/wsola_internals.h"
#include <algorithm>
#include <cmath>
#include <limits>
#include <memory>
#include "base/logging.h"
#include ... |
/* $Id: UIDownloaderExtensionPack.cpp 71434 2018-03-21 14:12:10Z vboxsync $ */
/** @file
* VBox Qt GUI - UIDownloaderExtensionPack class implementation.
*/
/*
* Copyright (C) 2011-2018 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org.... |
/* Copyright 2019 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... |
class StringIterator {
public:
StringIterator(string compressedString) : s(compressedString) {}
char next() {
if (!hasNext())
return ' ';
if (num == 0) {
currentChar = s[i++];
while (i < s.length() && isdigit(s[i]))
num = num * 10 + (s[i++] - '0');
}
--num;
return c... |
#ifndef _MANIPULATIONCOORDINATIONSERVICETRAJECTORYSENDHANDLER_HH_
#define _MANIPULATIONCOORDINATIONSERVICETRAJECTORYSENDHANDLER_HH_
#include "CommManipulatorObjects/CommManipulationTrajectory.hh"
#include <string>
class ManipulationCoordinationServiceTrajectorySendHandler
{
public:
ManipulationCoordinationServiceTr... |
/***************************************************************************
*
* _basic_ios.cc - definitions of basic_ios members
*
* $Id: //stdlib/dev/include/rw/_basic_ios.cc#6 $
*
***************************************************************************
*
* Copyright (c) 1994-2005 Quovadx, Inc., acting th... |
#include "pch.h"
#include "WaterLavaMeshRenderer.h"
#include "RenderScene.h"
#include "GraphicsDevice.h"
#include "RenderableWaterLavaMesh.h"
#include "cvars.h"
#include "GraphicsDevice.h"
#include "GpuBuffer.h"
#include "TerrainTile.h"
const int MaxWaterLavaMeshBufferSize = 1024 * 1024 * 2;
bool WaterLavaMeshRendere... |
//
// detail/timer_scheduler_fwd.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2016 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... |
/*
* 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... |
/*
* Copyright (c), 2017, Adrien Devresse <adrien.devresse@epfl.ch>
*
* 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 H5DATATYPE_MISC_HPP
#define H5DATATYPE_MISC_HPP
#include <stri... |
// Copyright 2007-2009 Daniel James.
// 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 "../helpers/prefix.hpp"
#include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp>
#include "../helpers/postf... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_73a.cpp
Label Definition File: CWE121_Stack_Based_Buffer_Overflow__CWE805.string.label.xml
Template File: sources-sink-73a.tmpl.cpp
*/
/*
* @description
* CWE: 121 Stack Based Buffer Overflow
* BadSource: Se... |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* 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.
*
*... |
// (C) Copyright 2007-2009 Andrew Sutton
//
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0 (See accompanying file
// LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GRAPH_CYCLE_HPP
#define BOOST_GRAPH_CYCLE_HPP
#include <vector>
#include <boost/... |
#include "RenaissancePCH.h"
#include "Renaissance/Core/InputLayer.h"
#include "Renaissance/Events/Event.h"
#include "Renaissance/Core/InputManager.h"
namespace Renaissance
{
void InputLayer::OnEvent(Events::Event& e)
{
Events::EventDispatcher dispatcher(e);
dispatcher.Dispatch<KeyPressedEvent>(REN_BIND_EVENT(Inp... |
/*
Q: 28. Implement strStr()
*/
#include <iostream>
#include <stdint.h>
#include <math.h>
#include <string>
#include <map>
#include <vector>
using namespace std;
class Solution
{
public:
int strStr(string h, string n)
{
int hl = h.size();
int nl = n.size();
if (nl <= 0)
{... |
// Copyright 2021 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/views/tabs/tab_strip_scroll_container.h"
#include "cc/paint/paint_shader.h"
#include "chrome/app/vector_icons/vector_icons.h"... |
// Copyright (c) 2011-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. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
//
// Copyright (c) ... |
#pragma once
#include <iostream>
#include <string>
#include <optional>
#include <sstream>
#include <Console.hpp>
#include <widgets/managers/Manager.hpp>
#include <styles/Style.hpp>
#include <widgets/managers/Pack.hpp>
#include <widgets/Listener.hpp>
// TODO: Add proper resize methods that change the client area
// T... |
#include <catch2/catch.hpp>
#include <vcpkg/base/system.print.h>
#include <vcpkg/base/util.h>
#include <vcpkg/packagespec.h>
#include <vcpkg-test/util.h>
using namespace vcpkg;
TEST_CASE ("specifier conversion", "[specifier]")
{
SECTION ("full package spec to feature specs")
{
constexpr std::size_t... |
#include <iostream>
#include <cstdlib>
#include <cmath>
bool almost_equal(float x, float gold, float tol) {
return gold * (1-tol) <= x && x <= gold * (1 + tol);
}
void test_target__teams_distribute__parallel_for__simd() {
const int N0 { 32 };
const int N1 { 32 };
const int N2 { 32 };
const float expected_valu... |
/* 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... |
#ifndef LOCKS_LOCKSMITH_MULTICAST_HPP
#define LOCKS_LOCKSMITH_MULTICAST_HPP
#include <vector>
#include "Locksmith.hpp"
#include <distributed_systems/types/UDPTypes.hpp>
namespace locks
{
struct Key
{
using string_type = type::string_type;
Key() = default;
Key(size_t clock, string_type... |
/*************************************************************************/
/* class_db.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include <vector>
#include <iostream>
#include <SDL/SDL.h>
#include <SDL/SDL_gfxPrimitives.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_mixer.h>
#include "base.h"
#include "game.h"
#include "video.h"
void draw3DLine( SDL_Surface *video, Vec3 &camera, Vec3 &p0, Vec3 &p1, int r, int g, int b ) {
float x0 = ( XRE... |
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2017-2018 The Swipp 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> // for 'map_list_of()'
#include <boost/for... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2019 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bitcoingui.h"
#includ... |
#include "grid.h"
#include <cgv/gui/key_event.h>
#include <cgv/base/find_action.h>
#include <cgv/signal/rebind.h>
#include <cgv/gui/trigger.h>
#include <cgv/utils/ostream_printf.h>
#include <cgv/utils/tokenizer.h>
#include <cgv/render/view.h>
#include <cgv/render/shader_program.h>
#include <cgv/math/det.h>
#include <cg... |
#include <iostream>
#include "packetTypes.h"
#include "ButtonFunctionCfg.h"
// Output ButtonFunctionCfgMsg to a stream in a human-readable format
ostream &operator<<(ostream &os, const struct ButtonFunctionCfgMsg &msg)
{
os << "button_id=" << int(msg.button_id);
os << " button_event=" << int(msg.button_event);... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may ... |
#include <cassert>
#include "../events/mouse_event.hpp"
#include "window.hpp"
void callback_mouse_button(GLFWwindow *window, int button, int action, int) {
assert(window);
auto data = (Window::Data *)glfwGetWindowUserPointer(window);
if (action == GLFW_PRESS) {
MouseDownEvent event(data->mouse_x,... |
/* Copyright 2019 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 "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include <QDir>
#include <QIntValidator>
#include <QLocale>
#include <QMessageBox>
OptionsDialog::OptionsDialog(QWidget *parent) :
QDialog(parent),
... |
#include <argp.h>
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
#include <unistd.h>
#include <csignal>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
#include <string>
#include <typeinfo>
#include "megasampler.h"
#include "minisampler.h"
#include "sampler.h"
#include "sampl... |
/**
* MK4duo Firmware for 3D Printer, Laser and CNC
*
* Based on Marlin, Sprinter and grbl
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
* Copyright (C) 2019 Alberto Cotronei @MagoKimbra
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Pu... |
// Copyright 2022 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
#include "acceptor.h"
#include <assert.h>
struct acceptor *acceptor_init(int port)
{
struct acceptor *acceptor1 = (struct acceptor *)malloc(sizeof(struct acceptor));
acceptor1->listen_port = port;
acceptor1->listen_fd = socket(AF_INET, SOCK_STREAM, 0);
make_nonblocking(acceptor1->listen_fd);
stru... |
/*
* Copyright (c) 2008-2019, Hazelcast, 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 ... |
// Copyright 2017 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 "job_scheduler.h"
#include "magma_util/dlog.h"
#include "msd_arm_connection.h"
#include "msd_defs.h"
#include "platform_trace.h"
JobScheduler::J... |
//
// local/stream_protocol.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2016 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 ASIO_LOCA... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__char_environment_snprintf_83_bad.cpp
Label Definition File: CWE134_Uncontrolled_Format_String.label.xml
Template File: sources-sinks-83_bad.tmpl.cpp
*/
/*
* @description
* CWE: 134 Uncontrolled Format String
* BadSource: environment Rea... |
/*****************************************************************************
* McPAT
* SOFTWARE LICENSE AGREEMENT
* Copyright 2012 Hewlett-Packard Development Company, L.P.
* All Rights Reserved
*
* Redistribution and use in... |
//Language: GNU C++
#include <algorithm>
#include <stdio.h>
#define MAXN 1000002
using namespace std;
typedef long long llint;
llint N,M,ans;
llint sz[MAXN];
int main()
{
scanf("%I64d%I64d",&N,&M);
for(llint i=0,x,y ; i<M ; i++)
{
scanf("%I64d%I64d",&x,&y);
sz[x]++,sz[y]++;
}
for(llint i... |
// 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/webui/ntp/thumbnail_source.h"
#include "base/callback.h"
#include "base/memory/ref_counted_memory.h"
#include "base/messa... |
// 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 "chrome/browser/ui/views/tabs/window_finder.h"
#include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h"
#if defined(USE_ASH)
gfx::Na... |
// Copyright (c) 2019 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) 2014-2018 The Dash Core developers
// Copyright (c) 2019 The Umbru Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "privatesend-util.h"
CKeyHolder::CKeyHolder(CWallet* pwallet) :
... |
// Copyright 2019 - University of Strathclyde, King's College London and Schlumberger Ltd
// This source code is licensed under the BSD license found in the LICENSE file in the root directory of this source tree.
#include "Action.h"
#include "LaTeXSupport.h"
#include "Ownership.h"
#include "Plan.h"
#include "Propositi... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 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/stargate-config.h"
#endif
#include "... |
#pragma once
#include <Defines.hpp>
#include <ECS/ComponentBase.hpp>
#include <Rendering/RenderingSystem.hpp>
#include <UI/Text2D.hpp>
namespace Poly {
// This is temporary class
class ENGINE_DLLEXPORT ScreenSpaceTextComponent : public ComponentBase
{
public:
RTTI_DECLARE_COMPONENT(::Poly::ScreenSpaceTextCompo... |
/*
* Copyright 2020 Axel Polin, univ_apolin@protonmail.com
*
* 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... |
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include <chrono>
#include <cstdint>
#define private public
#include "../src/board.hpp"
#include "../src/move.hpp"
#include "../src/nnue.hpp"
#include "../src/evaluate.hpp"
#include "../src/search.hpp"
#include "../magic-bits/include/magic_bits.hpp"
using namespace s... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, Locus Robotics
* 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 re... |
/*
Note about the Read Stage:
An operand can be several registers big, so data for an operand can
come from different bypasses. We keep track of which register
sub-values we've read, and keep checking bypasses until we got all
data. Afterwards, we may still need to read parts from the Register
File.
*/
#in... |
//----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2020, Thierry Lelegard
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the f... |
#include "inet_address.hpp"
#include <assert.h>
#include <cstdio>
#include <iostream>
#include "ipv4.hpp"
int main() {
InetAddressV4 ipv4("127.0.0.1", 8000);
struct sockaddr* addr = ipv4.get_addr();
socklen_t size1 = ipv4.get_size();
InetAddress ip2(addr, size1);
struct sockaddr_in* addr1 = (struct sockadd... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2012, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following... |
/*++
Copyright (c) 2000-2002 Microsoft Corporation
Module Name:
SierraCartRacing.cpp
Abstract:
Sierra Cart Racing passes a bad pointer to InitializeSecurityDescriptor which overwrites
part of the SECURITY_ATTRIBUTES structure and some other stack memory.
The original version of this shim wou... |
/*-----------------------------------------------------------------------*/
/* Low level disk I/O module SKELETON for FatFs (C)ChaN, 2019 */
/*-----------------------------------------------------------------------*/
/* If a working storage control module is available, it should be */
/* attached to t... |
/**
* @file: ./RobotCode/src/objects/lcdCode/TemporaryScreen.cpp
* @author: Aiden Carney
* @reviewed_on: 10/15/2019
* @reviewed_by: Aiden Carney
*
* @see: TemporaryScreen.hpp
*
* global screen part of a struct that can be loaded
* has no parent so that it is always valid
*
*/
#include "TemporaryScreen.hpp"
... |
/*
Copyright (C) 2016 Preet Desai (preet.desai@gmail.com)
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... |
/***********************************************************************************************************************
* OpenStudio(R), Copyright (c) 2008-2018, Alliance for Sustainable Energy, LLC. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitt... |
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestCaller.h>
#include <cppunit/TestCase.h>
#include <cppunit/TestSuite.h>
#include <assert.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "Fontdefs.h"
#include "FTSize.h"
class FTSizeTest : public CppUnit::TestCase
{
C... |
// matchertests.cpp : matcher unit tests
//
/**
* Copyright (C) 2008 10gen 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 d... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.