text stringlengths 7 961k |
|---|
#pragma once
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
// Path to file containing data, data table, vector of column headers
template <class T>
bool DataSet<T>::load( const string& path )
{
cout << "Loading data set from " << path << endl;
string line;
ifstrea... |
#include <QtGlobal>
// Automatically generated by extract_strings.py
#ifdef __GNUC__
#define UNUSED __attribute__((unused))
#else
#define UNUSED
#endif
static const char UNUSED *blockwage_strings[] = {
QT_TRANSLATE_NOOP("blockwage-core", " mints deleted\n"),
QT_TRANSLATE_NOOP("blockwage-core", " mints updated, "),
QT_... |
#pragma once
#include <map>
#include <memory>
#include "abstract_join_ordering_algorithm.hpp"
#include "join_graph_edge.hpp"
namespace opossum {
class AbstractLQPNode;
class AbstractCostEstimator;
class JoinGraph;
/**
* Heuristic join ordering algorithm derived from "A New Heuristic for Optimizing Large Queries"
... |
#include <iostream>
#include <vector>
#include <fstream>
std::vector<int> val_to_index(std::vector<int> &nums) {
std::vector<int> nums_cpy(nums.size());
int nums_size = nums.size();
for (int i = 0; i < nums_size; ++i) {
nums_cpy[nums[i] - 1] = i + 1;
}
return nums_cpy;
}
int main() {
... |
bool debug = false;
#include<vector>
#include<stack>
#include<queue>
#include<deque>
#include<bitset>
#include<set>
#include<string>
#include<iostream>
#include<algorithm>
#include<map>
#include<unordered_map>
#include<stdlib.h>
#include<string.h>
#include<stdio.h>
#include<math.h>
#include<time.h>
using namespace st... |
#include "utils.hpp"
void pauseForText(int seconds) {
consoleUpdate(NULL);
std::this_thread::sleep_for(std::chrono::seconds(seconds));
}
namespace { // CURL helper stuff
struct CURL_builder {
CURL* request;
curl_slist* headers;
CURL_builder() : request(nullptr), headers(nullptr) ... |
#ifndef INCLUDE_CLIENT_HPP_
#define INCLUDE_CLIENT_HPP_
#include <boost/asio.hpp>
#include "common.hpp"
#include "packet.hpp"
using boost::asio::ip::tcp;
using boost::asio::io_service;
using boost::system::error_code;
class Client
{
public:
Client( const std::string ip,
const unsigned short port );
~... |
#pragma once
#include <cstdint>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include "../subgroup_info.hpp"
#include "../view.hpp"
#include "derecho_internal.hpp"
#include <derecho/mutils-serialization/SerializationSupport.hpp>
#include <spdlog/spdlog.h>
namespace derecho... |
//==============================================================================
// Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// ... |
// 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.
// This file contains the tests for the FencedAllocator class.
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/memory/aligned_me... |
/*****************************************************************
|
| Platinum - Service State Variable
|
| Copyright (c) 2004-2010, Plutinosoft, LLC.
| All rights reserved.
| http://www.plutinosoft.com
|
| This program is free software; you can redistribute it and/or
| modify it under the terms of the GNU General P... |
// 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/chromeos/cros/certificate_pattern_matcher.h"
#include <cert.h>
#include <pk11pub.h>
#include <list>
#include <string>
#incl... |
/*
* Copyright 2021 IBM 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 or agreed... |
/*
* Copyright (C) 2020 GreenWaves Technologies, SAS, ETH Zurich and
* University of Bologna
*
* 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.apac... |
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
/*
* Copyright (C) 2015, Simon Fuhrmann
* TU Darmstadt - Graphics, Capture and Massively Parallel Computing
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-Clause license. See the LICENSE.txt file for details.
*/
#include "ogl/vertex_buffer.h"
OGL_NAMESPA... |
/*****************************************************************************
*
* GARGOYLE_PSCAND: Gargoyle - Protection for Linux
*
* ip addr removal from blacklist
*
* Copyright (c) 2017 - 2018, Bayshore Networks, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or wit... |
// Copyright 2020 Jan Niklas Hasse <jhasse@bixense.com>
// For conditions of distribution and use, see copyright notice in LICENSE.txt
#pragma once
#include "sdl.hpp"
#if defined(__has_include) && __has_include(<optional>)
#include <optional>
using std::optional;
using std::nullopt; // NOLINT
#else
#include <experim... |
// Copyright (c) 2011-2012 The Beginnercoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "sync.h"
#include "util.h"
#include <boost/foreach.hpp>
#ifdef DEBUG_LOCKCONTENTION
void PrintLockContention(... |
/*
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2013-2017 Nest Labs, 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.o... |
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is grant... |
#include<iostream>
using namespace std;
int CountLeft(int n,int x,int y)
{
int left=n-abs(x-y)-1;
return left;
}
int CountRight(int n,int x,int y)
{
int right=n-abs(n+1-x-y)-1;
return right;
}
int H(int n,int a,int b,int x,int y,int &count)
{
if((a==x|| b==y) && !((a==x) && (b==y)))
{
if... |
// copyright (c) 2020-2021 hors<horsicq@gmail.com>
//
// 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, ... |
/*
*
* 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... |
// Copyright (c) 2014 Anuj R. Sharma
// Copyright (c) 2014-2016 Hartmut Kaiser
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http:// ww.boost.org/LICENSE_1_0.txt)
#ifndef HPX_PARTITIONED_VECTOR_FWD_HPP
#define HPX_PARTITIONED_VECTOR_FWD_HPP
#... |
#include <stdio.h>
#include "gtest/gtest.h"
// #include "../src/*"
#include "../include/Board.h"
#include "../include/Color.h"
#include "../include/Game.h"
#include "../include/Dice.h"
#include "../include/utils.h"
#include "../include/AsciiView.h"
//TODO: include more intelligently, "../src/*" ?
GTEST_API_ int main(... |
//===- llvm/unittest/ADT/BitVectorTest.cpp - BitVector tests --------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
// 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 <stddef.h>
#include "base/guid.h"
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h... |
/* Sirikata
* Lights.hpp
*
* Copyright (c) 2010, Ewen Cheslack-Postava
* 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 c... |
/*
* Copyright 2009-2017 Alibaba Cloud 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) [2020] Futurewei Technologies, Inc.
//
// FORCE-RISCV is 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
//
// THIS SOFTW... |
/*
* Copyright 2009-2017 Alibaba Cloud 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) 2020 Huawei Technologies Co.,Ltd.
*
* openGauss is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ... |
#include "transactiondesc.h"
#include "guiutil.h"
#include "bitcoinunits.h"
#include "main.h"
#include "wallet.h"
#include "db.h"
#include "ui_interface.h"
#include "base58.h"
QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
{
if (!wtx.IsFinal())
{
if (wtx.nLockTime < LOCKTIME_THRESHOLD)... |
#include "d3d_impl.hpp"
#include "base/log.hpp"
#include "common/error_reporter.hpp"
#include "dxguids.hpp"
#include "renderer.hpp"
jkgm::Direct3D_impl::Direct3D_impl(renderer *r)
: r(r)
{
}
HRESULT WINAPI jkgm::Direct3D_impl::QueryInterface(REFIID riid, LPVOID *ppvObj)
{
report_unimplemented_function(str(fmt... |
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2018 The PIVX developers
// Copyright (c) 2018 The Betfint developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-licen... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2016, Daniel de Leng
* 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 retai... |
// These violate our poisons so have to happen first
#include "llvm/IR/Attributes.h"
#include "llvm/IR/DerivedTypes.h" // FunctionType, StructType
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Verifier.h"
#include "absl/base/casts.h"
#include "ast/Helpers.h"
#include "ast/ast.h"
#include "cfg/CFG.h"
#include "commo... |
////////////////////////////////////////////////////////////////////////////////////////////
// main1.cpp :
//
#include <iostream>
#include <fstream>
#include <AFEPack/AMGSolver.h>
#include <AFEPack/Geometry.h>
#include <AFEPack/TemplateElement.h>
#include <AFEPack/FEMSpace.h>
#include <AFEPack/Operator.h>
#include <... |
// Copyright (c) 2012-2014 The Bitcoin Core developers
// Copyright (c) 2014-2015 The Dash Core developers
// Copyright (c) 2015-2018 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 "netbase.h"
... |
/*
* This file is part of MICA, a Pin tool to collect
* microarchitecture-independent program characteristics using the Pin
* instrumentation framework.
*
* Please see the README.txt file distributed with the MICA release for more
* information.
*/
/* MICA includes */
#include "mica_init.h"
/*
* Setup MICA lo... |
//===----------------------------------------------------------------------===//
//
// The MIT License (MIT)
// Copyright (c) 2017 Jokubas Liutkus
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentat... |
// 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 "third_party/blink/renderer/platform/graphics/paint/paint_controller_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_part... |
// Copyright (c) 2014-2019, 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 of
/... |
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
#include "leveldb/table.h"
#include "leveldb/cache.h"
#include "leveldb/comparator.h"
#include "leveld... |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int **a, n, s, t, init, g, se, p;
vector<int> visited, vals;
int searcher(int row, int val) {
// cout<<"currently searching "<<row<<endl;
if (find(visited.begin(), visited.end(), row) != visited.end())
return -1;
else
visited.... |
#include <vtkImageData.h>
#include <vtkPoints.h>
#include <vtkImageDataToPointSet.h>
#include <vtkNew.h>
#include <vtkXMLStructuredGridWriter.h>
#include <vtkStructuredGrid.h>
namespace {
void CreateImage(vtkImageData* image);
}
int main(int, char *[])
{
vtkNew<vtkImageData> image;
CreateImage(image);
vtkNew<... |
#include <seqan3/core/type_traits/template_inspection.hpp>
#include <seqan3/core/algorithm/configuration.hpp>
using namespace seqan3;
int main()
{
//! [usage]
using tl = type_list<int, char, double>;
using t = detail::transfer_template_args_onto_t<tl, std::tuple>;
// t is std::tuple<int, char, double>
//! [usage]
//... |
#include <iostream>
#include "classes.h"
int main()
{
Fraction f1;
std::cout << "Enter fraction 1 (numerator / denominator): ";
std::cin >> f1;
Fraction f2;
std::cout << "Enter fraction 2 (numerator / denominator): ";
std::cin >> f2;
std::cout << f1 << " * " << f2 << " is " << f1 * f2 << '\n'; // note: The r... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE134_Uncontrolled_Format_String__wchar_t_file_vfprintf_82_goodG2B.cpp
Label Definition File: CWE134_Uncontrolled_Format_String.vasinks.label.xml
Template File: sources-vasinks-82_goodG2B.tmpl.cpp
*/
/*
* @description
* CWE: 134 Uncontrolled Format String
* BadSource: f... |
// 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/lib/pkg_url/fuchsia_pkg_url.h"
#include "gtest/gtest.h"
namespace component {
namespace {
FuchsiaPkgUrl ParseFuchsiaPkgUrl(const std::stri... |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2020 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
#include<bits/stdc++.h>
using namespace std;
int check(int arr[],int n,int m)
{
unordered_map<int,int> umap;
for(int i=0;i<n;i++)
umap[arr[i]]=i;
int ct=0;
for(int i=0;i<n-1;i++)
{
for(int j=i+1;j<n;j++)
{
int c = m-(arr[i]+arr[j]);
auto it = umap.find(c)... |
class Solution {
public:
// int XXX(int m, int n) {
// if(m==1||n==1)return 1;
// return XXX(m-1,n)+XXX(m,n-1);
// }
int XXX(int m, int n) {
int dp[100][100]={0};
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
if(i==0||j==0)dp[i][j]=1;
... |
/*
* This file belongs to the Galois project, a C++ library for exploiting
* parallelism. The code is being released under the terms of the 3-Clause BSD
* License (a copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
#include "script_component.hpp"
class CfgPatches {
class AMP_Door_Wedge {
name = COMPONENT_NAME;
units[] = {"AMP_Door_Wedge_Place"};
weapons[] = {"AMP_Door_Wedge"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
"A3_Weapons_F_Explosives",
"a... |
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty o... |
// Geometric Tools, Inc.
// http://www.geometrictools.com
// Copyright (c) 1998-2006. All Rights Reserved
//
// The Wild Magic Version 4 Foundation Library source code is supplied
// under the terms of the license agreement
// http://www.geometrictools.com/License/Wm4FoundationLicense.pdf
// and may not be copied ... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "StateUpdate.h"
namespace facebook {
namespace react {
std::pair<StateTarget, StateData::Shared> StateUpdate::operator()... |
#include <iostream>
using std::cout;
//Definition for singly-linked list.
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
ListNode * head = NULL;
ListNode ** nextNode ... |
/*
* 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) 2012, Michael Lehn
*
* 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,... |
// Copyright (c) 2011-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 <consensus/validation.h>
#include <key.h>
#include <validation.h>
#include <txmempool.h>
#include <script/standard.h... |
#include "lightsky/math/quat_utils.h" |
// This is a generated file! Please edit source .ksy file and use
// kaitai-struct-compiler to rebuild
#include "kaitai/elf.h"
namespace veles {
namespace kaitai {
namespace elf {
elf_t::elf_t(kaitai::kstream* p_io, kaitai::kstruct* p_parent, elf_t* p_root)
: kaitai::kstruct(p_io) {
m__io->pushName("_parent");... |
#include<bits/stdc++.h>
using namespace std;
#define endll '\n'
bool isAll(int arr[],int m)
{
for(int i=1;i<=m;i++)
if(arr[i] <= 0) return false;
return true;
}
main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n,m,q;
cin>>n>>m>>q;
int snack[n];
for(int i=0;i<n;i++)
cin>>snack[i];
int nearest... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, instal... |
// Copyright (c) 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 <boost/test/unit_test.hpp>
#include <consensus/validation.h>
#include <primitives/block.h>
#include <scheduler.h>
#includ... |
#include <iostream>
#include <fs/vfs.hpp>
#include <common.cxx>
using namespace std::string_literals;
extern lest::tests & specification();
class Person {
public:
explicit Person(std::string name, int age) : name_ {name}, age_ {age} {};
bool isBjarne() const { return (name_ == "Bjarne") ? true : false; }
private... |
// Copyright (c) 2019, NVIDIA CORPORATION. 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 ... |
#include "MySQLReplication.h"
#include <DataTypes/DataTypeString.h>
#include <IO/ReadBufferFromString.h>
#include <IO/MySQLBinlogEventReadBuffer.h>
#include <IO/ReadHelpers.h>
#include <IO/Operators.h>
#include <base/DateLUT.h>
#include <Common/FieldVisitorToString.h>
#include <Core/MySQL/PacketsGeneric.h>
#include <C... |
// Geometric Tools, LLC
// Copyright (c) 1998-2014
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.0 (2010/01/01)
#include "Wm5GraphicsPCH.h"
#include "Wm5SwitchNode.h"
using nam... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "RuntimeState.h"
#include "hermes/Support/OSCompat.h"
#include "hermes/hermes.h"
#include "nodelib/NodeBytecode.h"
#inclu... |
#ifndef PCI_HH
#define PCI_HH
#include "bus.h"
#include "types.h"
class PCI : public Bus
{
public:
struct HeaderCommon {
//Common
uint16_t vendor;
uint16_t device;
uint16_t command;
uint16_t status;
uint8_t revID;
uint8_t progIF;
uint8_t subclass;
... |
// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "subgraph.h"
#include <ie_parallel.hpp>
#include <vector>
#include <algorithm>
#include <array>
#include <tuple>
#include <mkldnn.hpp>
#include <mkldnn_debug.h>
#include <mkldnn_types.h>
#include <mkldnn_extension_utils.... |
/****************************************************************************
* hipipe library
* Copyright (c) 2017, Cognexa Solutions s.r.o.
* Copyright (c) 2018, Iterait a.s.
* Author(s) Filip Matzner
*
* This file is distributed under the MIT License.
* See the accompanying file LICENSE.txt for the comp... |
#include "display.h"
#include <SSD1306Ascii.h>
#include <SSD1306AsciiAvrI2c.h>
#include <math.h>
//#define DEBUG
/**
DISPLAY
*/
static SSD1306AsciiAvrI2c display;
static unsigned long time = millis();
void display_init() {
display.begin(&Adafruit128x64, 0x3C);
display.setFont(Stang5x7);
display.setContras... |
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Nazara Engine - OpenGL Renderer"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/OpenGLRenderer/Wrapper/Shader.hpp>
#include <cassert>
#include <Nazara/OpenGLRenderer/Debug.hpp>
namespace Nz::GL
{
inline... |
#ifdef PEGASUS_OS_ZOS
#ifndef __UNIX_CONTROLLERCONFIGURATIONSERVICE_PRIVATE_H
#define __UNIX_CONTROLLERCONFIGURATIONSERVICE_PRIVATE_H
#endif
#endif |
#pragma once
#include <glm/glm.hpp>
#include <vector>
#include "Lighting/Light.hpp"
#include "PostProcessing/PostProcessing.hpp"
#include "RenderScene.hpp"
struct GLFWwindow;
namespace Video {
class StaticRenderProgram;
class Shader;
class ShaderProgram;
class Buffer;
class VertexDescription;
class GeometryBinding;
... |
//
// InterpBufExecution.cpp
// MNN
//
// Created by MNN on 2019/02/28.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef MNN_OPENCL_BUFFER_CLOSED
#include "backend/opencl/execution/buffer/InterpBufExecution.hpp"
#include "core/TensorUtils.hpp"
namespace MNN {
namespace OpenCL {
InterpBufExecution::... |
// Copyright (c) 2018, The Safex 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 of
// c... |
#pragma once
#include "glad/glad_glx.h"
#include "XcbApplication.hpp"
namespace My {
class OpenGLApplication : public XcbApplication {
public:
using XcbApplication::XcbApplication;
int Initialize() override;
void Tick() override;
void CreateMainWindow() override;
private:... |
#ifndef MBGL_RENDERER_PAINTER
#define MBGL_RENDERER_PAINTER
#include <mbgl/map/transform_state.hpp>
#include <mbgl/map/map_context.hpp>
#include <mbgl/renderer/frame_history.hpp>
#include <mbgl/renderer/bucket.hpp>
#include <mbgl/geometry/vao.hpp>
#include <mbgl/geometry/static_vertex_buffer.hpp>
#include <mbgl/ren... |
/* fractalgen3d.hpp -- part of the OpenCL fractal3d implementation
*
* Copyright (C) 2015 Alrik Firl
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#ifndef OCL_FRACTALS_3D_HPP
#define OCL_FRACTALS_3D_HPP
#include <CL/cl.hpp>
#inc... |
// 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/download/chrome_download_manager_delegate.h"
#include <string>
#include "base/bind.h"
#include "base/bind_helpers.h"
#inclu... |
// Copyright (c) 2012-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "clientversion.h"
#include "tinyformat.h"
#include <string>
/**
* Name of client reported in the 'version' message. R... |
#include "main.hpp"
void box(std::vector<std::vector<int> >& muhimage) {
size_t w = muhimage.size() / 4;
size_t h = muhimage[0].size() / 4;
for (size_t i = w; i < 3 * w; i++) {
for (size_t j = h; j < 3 * h; j++) {
muhimage[i][j] = 255;
}
}
} |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
#define psb push_back
#define mkp make_pair
#define all(x) (x).begin(),(x).end()
#define PI acos(-1)
#define MOD 1000000007
int toint(string x)
{
istringstream ss(x);
int a;
ss>>a;
return a;
}
string... |
#include "IInteractable.h"
namespace Cta::UI
{
} |
// Copyright (c) 2014-2017 The Dash Core developers
// Copyright (c) 2017-2017 The OIOCoin Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "keepass.h"
#include "wallet/crypter.h"
#include "clientver... |
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STB_RECT_PACK_IMPLEMENTATION
#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "stb_image.h"
#include "stb_image_write.h"
#include "stb_rect_pack.h"
#include "stb_image_resize.h" |
// 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 "core/loader/resource/TextResource.h"
#include "core/html/parser/TextResourceDecoder.h"
#include "platform/SharedBuffer.h"
#include "wtf/text/St... |
// David Eberly, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2020
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 4.0.2019.08.13
#include "PhysicsModule.h"
#include <Mathematic... |
#include <DB/IO/WriteBufferFromString.h>
#include <DB/DataTypes/DataTypeEnum.h>
#include <limits>
namespace DB
{
namespace ErrorCodes
{
extern const int SYNTAX_ERROR;
extern const int EMPTY_DATA_PASSED;
}
template <typename FieldType> struct EnumName;
template <> struct EnumName<Int8> { static constexpr auto val... |
/*
** Copyright (C) 2012 Aldebaran Robotics
** See COPYING for the license
*/
// Disable "'this': used in base member initializer list"
#ifdef _MSC_VER
# pragma warning( push )
# pragma warning(disable: 4355)
#endif
#include <sstream>
#include <qi/session.hpp>
#include <ka/scoped.hpp>
#include "message.hpp"
#includ... |
// Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 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 "editaddressdialog.h"
#... |
// Copyright (c) 2017 Baidu, 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 2012-2013 European Broadcasting Union and Limecraft, NV.
*
* 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... |
// Copyright 2021 Your Name <your_email>
#include <student.hpp>
json collect_inform(const std::string &path){
std::ifstream jf(path);
json data;
jf >> data;
if (path.empty()) throw std::runtime_error{"The file path cannot be empty!"};
if (!jf)
throw std::runtime_error{"There is no such file on your com... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.