text
stringlengths
5
1.04M
/* * LinuxSerialDriverComponentImplCfg.hpp * * Created on: Nov 29, 2016 * Author: tcanham */ #ifndef LINUXSERIALDRIVER_BLSPSERIALDRIVERCOMPONENTIMPLCFG_HPP_ #define LINUXSERIALDRIVER_BLSPSERIALDRIVERCOMPONENTIMPLCFG_HPP_ enum { DR_MAX_NUM_BUFFERS = 20, // Increasing this from 10 b/c RceAdapter couldn'...
// Copyright 2016 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 "modules/canvas2d/BaseRenderingContext2D.h" #include "bindings/core/v8/ExceptionMessages.h" #include "bindings/core/v8/ExceptionState.h" #includ...
/*! @file Defines the `boost::hana::Identity` data type. @copyright Louis Dionne 2014 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_IDENTITY_HPP #define BOOST_HANA_IDENTITY_HPP #include <boost/hana/appl...
// YaMangClient.cpp : 응용 프로그램에 대한 진입점을 정의합니다. // #include "stdafx.h" #include "YaMangClient.h" #ifdef DEBUG #include <crtdbg.h> #endif // DEBUG #include "Logger.h" #include "MainWindow.h" #include "NetworkManager.h" #include "Exception.h" INT_PTR g_LogHandle = -1; int APIENTRY _tWinMain( _In_ HINSTANCE hInstance,...
/*******************************************************************/ /* */ /* ADOBE CONFIDENTIAL */ /* _ _ _ _ _ _ _ _ _ _ _ _ _ */ /* ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define mii map<int, int> #define pqb priority...
// file : build2/parser.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #include <build2/parser.hxx> #include <sstream> #include <iostream> // cout #include <libbutl/filesystem.mxx> // path_search(), path_match() #include <build2/dump....
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * * THE BSD LICENSE * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistribut...
/* * Copyright (C) 2017 The LineageOS 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 applicable la...
#pragma once #include <trwlang/node.hpp> #include <vector> #include <unordered_map> namespace trwlang { struct matcher { std::unordered_map<std::string, node const *> hold; bool match (node const & p, node const & e) { stack_expr_.clear(); stack_pattern_.clear(); stack_expr_.push_back(&e); sta...
#include <2020/Day14Puzzle.hpp> #include <zeno-engine/Utility/StringExtensions.hpp> #include <algorithm> #include <bitset> #include <cassert> #include <set> #include <functional> namespace TwentyTwenty { Day14Puzzle::Day14Puzzle() : core::PuzzleBase("Docking Data", 2020, 14) { } void Day14Puzzle::initialise(c...
//============================================================================== // 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. // ...
#define INITGUID #include "c3.h" #include "c3errors.h" #include "globals.h" #include "aui.h" #include "debugwindow.h" extern DebugWindow *g_debugWindow; #include "ConstDB.h" extern ConstDB *g_theConstDB; #include "dynarr.h" #include "SelItem.h" extern SelectedItem *g_selected_item; #include "TurnCnt....
/**************************************************************************** * * Copyright (c) 2020-2021 PX4 Development Team. 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. Red...
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #include <Rcpp.h> using namespace Rcpp; // filterICPSRFiles StringVector filterICPSRFiles(StringVector filePaths, std::string state, std::string outputDir); RcppExport SEXP _nibrs_filterICP...
/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/memory_manager/internal_allocation_storage.h" #include "shared/source/memory_manager/memory_manager.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpe...
// Copyright (c) 2020, Clyde McQueen. // All rights reserved. // // Software License Agreement (BSD License 2.0) // // 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 ...
/* C++ program for recursive implementation of Bubble sort */ #include <bits/stdc++.h> using namespace std; // A function for bubble sort void Bubble_Sort(int array[], int N) { // First case if (N == 1) return; /* One pass of bubble sort. After this pass, the largest element is bubbled (or moved) to end.*/ f...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2020 The Widecoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <random.h> #include <compat/cpuid.h> #include <crypto/sha256.h> #inclu...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "mbed.h" #include "DevkitDPSClient.h" #include "DiceCore.h" #include "RiotCore.h" #include "EEPROMInterface.h" #include "iothub_client_version.h" #include "iot...
/* * FileReader.cpp * -------------- * Purpose: A basic class for transparent reading of memory-based files. * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. */ #include "stdafx.h" #include "FileReader.h" #if define...
// 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/webshare/win/fake_uri_runtime_class_factory.h" #include <wrl/implements.h> #include "base/strings/string_piece.h" #include "bas...
// 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. #include "init.h" #include "main.h" #include "core.h" #include "chainparams.h" #in...
// Copyright 2004-present Facebook. All Rights Reserved. #include <ATen/native/UpSample.h> namespace at { namespace native { namespace upsample { TORCH_API c10::SmallVector<int64_t, 3> compute_output_size( c10::IntArrayRef input_size, // Full input tensor size. c10::optional<c10::IntArrayRef> output_size, ...
#include <stdlib.h> #include "PcapPlusPlusVersion.h" #include "PcapLiveDevice.h" #include "PcapLiveDeviceList.h" #include "NetworkUtils.h" #include <getopt.h> #include "SystemUtils.h" #define EXIT_WITH_ERROR(reason, ...) do { \ printf("\nError: " reason "\n\n", ## __VA_ARGS__); \ printUsage(); \ exit(1);...
// MyGridDlg.cpp : implementation file // #include "stdafx.h" #include "MyGridDlg.h" #include "MyFrame.h" #include "afxdialogex.h" #include "Resource.h" #include "StyleColors.h" // MyGridDlg dialog IMPLEMENT_DYNAMIC(MyGridDlg, StyleDialog) MyGridDlg::MyGridDlg(CWnd* pParent /*=nullptr*/) :StyleDialog(IDD_...
// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2008 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.tx...
/* * Copyright (c) 2015, 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. * */ #include <pr...
// Copyright Benoit Blanchon 2014-2017 // MIT License // // Arduino JSON library // https://bblanchon.github.io/ArduinoJson/ // If you like this project, please add a star! #pragma once #include "ListConstIterator.hpp" #include "ListNode.hpp" namespace ArduinoJson { namespace Internals { // A read-write forward ite...
#pragma once #include <libgaem/core.hpp> #include <libgaem/render/device.hpp> #include <vector> namespace gaem { class GaemModel { public: struct Vertex { glm::vec2 position; glm::vec3 color; static std::vector<VkVertexInputBindingDescription> getBindingDescriptions(); static std::vector<VkVer...
#include "Camera.h" #include <iostream> Camera::Camera() { reset(); } Camera::Camera(const Vector4& e, const Vector4& d, const Vector4& up) { this->e = e; this->d = d; this->up = up; calculate_camera_matrix(); } Camera::~Camera() { } void Camera::calculate_camera_matrix() { Vector4 x, y, z;...
// Copyright 2018 Sabre Dart Studios #include "OWSGameplayAbilityTargetActor_Tr.h" #include "DrawDebugHelpers.h" #include "GameFramework/PlayerController.h" #include "Abilities/GameplayAbility.h" // -----------------------------------------------------------------------------------------------------------------------...
/* * Copyright 2008-2014 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...
/* -- MAGMA (version 2.5.4) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date October 2020 @generated from magmablas/zgemm_batched.cpp, normal z -> s, Thu Oct 8 23:05:36 2020 @author Jakub Kurzak @author Stan Tomov ...
#include <DataTypes/DataTypeFactory.h> #include <DataTypes/getLeastSupertype.h> #include <DataTypes/getMostSubtype.h> #include <sstream> #pragma GCC diagnostic ignored "-Wmissing-declarations" #include <gtest/gtest.h> namespace DB { static bool operator==(const IDataType & left, const IDataType & right) { return...
/*========================================================================= * * Copyright Insight Software Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h...
#include <iostream> #include <string> #include <cstring> #include <algorithm> #include <vector> #include <iterator> using namespace std; int main_03_02() { int n; cin >> n; vector<string> v(n); copy_n(istream_iterator<string>(cin), n, begin(v)); sort(begin(v), end(v), [](const string& l, const string& r) { ...
/* * Open Chinese Convert * * Copyright 2010-2014 BYVoid <byvoid@byvoid.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 * *...
//===-- AMDGPUMCTargetDesc.cpp - AMDGPU Target Descriptions ---------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
#include <moveit_cartesian_plan_plugin/widgets/path_planning_widget.hpp> #include <moveit_cartesian_plan_plugin/point_tree_model.hpp> #include <moveit_cartesian_plan_plugin/generate_cartesian_path.hpp> namespace moveit_cartesian_plan_plugin { namespace widgets { PathPlanningWidget::PathPlanningWidget(std::string n...
/* * Copyright (c) 2018, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of con...
//========================================================================= // Copyright (C) 2012 The Elastos 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 // // ...
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/migrationhubstrategy/model/ManagementPreference.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; nam...
//------------------------------------------------------------------ // Iwa_TiledParticlesFx for Marnie // based on ParticlesFx by Digital Video //------------------------------------------------------------------ // TnzCore includes #include "tofflinegl.h" #include "tstroke.h" #include "tpalette.h" #include "tvectori...
#include "s2020/Parser/DatumParser.h" #include "DiagContext.h" #include <gtest/gtest.h> using namespace s2020; using namespace s2020::parser; using namespace s2020::ast; namespace { class DatumParserTest : public ::testing::Test { protected: const llvm::MemoryBuffer &makeBuf(const char *str) { auto id = con...
// ImgCore.h // 图像处理函数 #include <string> #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" using namespace cv; #define free_ptr(p) if(p) delete p; p = NULL; /* 去除噪音 op: MORPH_OPEN – 开运算(Opening operation) MORPH_CLOSE – 闭运算(Closing operation) MORPH_GRADIENT -形态学梯度(Morphological gradient) M...
int ComputeSYMGS_omp( const SparseMatrix & A, const Vector & r, Vector & x, int is_first) { // This line and the next two lines should be removed and your version of ComputeSYMGS should be used. //return ComputeSYMGS_ref(A, r, x); assert(x.localLength==A.localNumberOfColumns); // Make sure x contain space for...
/**************************************************************************** * * Copyright (c) 2015 Estimation and Control Library (ECL). 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) 2018 European Spallation Source ERIC */ #include <arpa/inet.h> #include <chrono> #include <efu/Server.h> #include <sys/socket.h> #include <test/TestBase.h> #include <thread> uint16_t ServerPort = 8889; constexpr int mask_close = 0x0001; constexpr int mask_connect = 0x0002; constexpr int mask_send =...
// 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) 2021, The OpenThread Authors. * 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 * n...
//===- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp ----------------------===// // // 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 // //===---------------------------...
#include "leveldb/options.h" #include "leveldb/comparator.h" #include "leveldb/env.h" namespace leveldb { Options::Options() : comparator(BytewiseComparator()), create_if_missing(false), error_if_exists(false), paranoid_checks(false), env(Env::Default()), info_log(NULL), write...
/* Copyright (c) 2021 David Walters Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,...
//===----------------------------------------------------------------------===// // // 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) 2019. Huawei Technologies Co., Ltd. All rights reserved. // 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,...
// Copyright (c) 2014 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "shell/browser/api/electron_api_web_contents.h" #include <limits> #include <memory> #include <set> #include <string> #include <unordered_set> #include <utility> #include <vec...
#include "hsm/hsm.h" #include <boost/hana.hpp> #include <gtest/gtest.h> #include <future> #include <memory> namespace { // States struct S1 { }; struct S2 { }; // Events struct e1 { e1(const std::shared_ptr<std::promise<void>>& called) : called(called) { } std::shared_ptr<std::promise<void>...
#include "AppDelegate.h" #include "WorldScene.h" USING_NS_CC; static cocos2d::Size designResolutionSize = cocos2d::Size(1024, 768); static cocos2d::Size smallResolutionSize = cocos2d::Size(480, 320); static cocos2d::Size mediumResolutionSize = cocos2d::Size(1024, 768); static cocos2d::Size largeResolutionSize = cocos...
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DinoColorSet_Christmas_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------...
// 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 "base/threading/platform_thread.h" #include <errno.h> #include <pthread.h> #include <sched.h> #include <stddef.h> #include <stdint.h> #inclu...
// NOLINT(legal/copyright) // SYMBOL "file_slurp" template <typename T1> int casadi_file_slurp(const char* fname, casadi_int n, T1* x) { casadi_int i; FILE *fp; fp = fopen(fname, "r"); if (!fp) return 1; for (i=0;i<n;++i) { if (fscanf(fp, "%lg", x++)<=0) return 2; } fclose(fp); return 0; }
#define WIN32_LEAN_AND_MEAN #include <windows.h> class SavedWindowData { public: SavedWindowData(); void Save(HWND hwnd, int numMonitors); void Restore(int numMonitors); bool IsStillUsed() const; bool CheckUnusedCount(); private: static const int MAX_MONITORS = 5; static const int MIN_MONITORS = 2; void Re...
/* * Copyright (C) 2005 - 2012 MaNGOS <http://www.getmangos.com/> * * Copyright (C) 2008 - 2012 Trinity <http://www.trinitycore.org/> * * Copyright (C) 2010 - 2012 ProjectSkyfire <http://www.projectskyfire.org/> * * Copyright (C) 2011 - 2012 ArkCORE <http://www.arkania.net/> * * This program is free software; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { cout<< "Enter the no of diamonds"<<endl; ll x; cin>>x; vector<ll> mp,np; ll i,var1; cout<< "Enter the purity levels of all diamonds"<<endl; for(i=0;i<x;i++) { cin>>var1; mp.pus...
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ #include <engine/demo.h> #include <engine/shared/demo.h> #include <engine/engine.h> #include <engine/shared/config.h> #include...
/* * Copyright (c) 2018-2019, The Mybtcfx Developers. * Portions Copyright (c) 2012-2017, The CryptoNote Developers, The Bytecoin Developers. * * This file is part of 4xBIT. * * This file is subject to the terms and conditions defined in the * file 'LICENSE', which is part of this source code package. */ #incl...
// 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/test/base/testing_browser_process.h" #include "base/prefs/pref_service.h" #include "base/strings/string_util.h" #include "base/time/...
//============================================================================= /** * @file amh_rh_ss.cpp * * $Id: amh_rh_ss.cpp 95536 2012-02-20 12:34:23Z johnnyw $ * * Creates code for AMH-RH operations. * * @author Mayur Deshpande <mayur@ics.uci.edu> */ //===============================================...
#include "stdafx.h" #include "Color.h" Color::Color() : r(0), g(0), b(0) {} Color::Color(byte r, byte g, byte b) : r(r), g(g), b(b) {} byte &Color::operator[](nat item) { switch (item) { case 0: return b; case 1: return r; case 2: return g; } return r; }
#ifndef BANK_MANAGER_HPP #define BANK_MANAGER_HPP #include "Transaction.hpp" #include "coherence/lang.ns" #include "coherence/net/NamedCache.hpp" using namespace coherence::lang; using coherence::net::NamedCache; class BankManager { public: // ----- constructor ----------------------------------...
// // 54. Spiral Matrix.cpp // leetcode // // Created by Yuebin Yang on 2017/2/3. // Copyright © 2017年 yuebin. All rights reserved. // #include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> result; ...
class Solution { public: int countSubstrings(string s, string t) { map<string, int> tCnt; for(int pos = 0; pos < t.length(); ++pos){ for(int len = 1; pos + len - 1 < t.length(); ++len){ tCnt[t.substr(pos, len)] += 1; } } int ...
// grid.cpp /** * Copyright (C) 2010 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 distributed in the hope that it will be ...
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010-2013 Facebook, Inc. (http://www.facebook.com) | +---------...
// Written: fmckenna /* ***************************************************************************** Copyright (c) 2016-2017, The Regents of the University of California (Regents). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the f...
// // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org // // 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 granted to anyone to use this software for any purpose...
/** * 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...
/************************************************************************* * * REALM CONFIDENTIAL * __________________ * * [2011] - [2014] Realm Inc * All Rights Reserved. * * NOTICE: All information contained herein is, and remains * the property of Realm Incorporated and its suppliers, * if any. The int...
/* 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...
// Copyright (c) 2016-2020 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.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
/* * Copyright 2020-2022 Hewlett Packard Enterprise Development LP * Copyright 2004-2019 Cray Inc. * Other additional copyright holders may be indicated within. * * The entirety of this work is licensed under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with...
/* uefipatch_main.cpp Copyright (c) 2018, LongSoft. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-li...
/****************************************************************************** This source file is part of the tomviz project. Copyright Kitware, Inc. This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software distributed u...
// Name: // This program calculates the tax and tip on a restaurant bill. #include <iostream> int main() { double tax, tip, total_bill, total_meal_cost; // Welcome to the Restaurant Bill Calculator. std::cout << "Welcome to the Restaurant Bill Calculator!\n "; std::cout << "What is the 'total meal cost'? "; ...
#include <Processors/LimitTransform.h> namespace DB { namespace ErrorCodes { extern const int LOGICAL_ERROR; } LimitTransform::LimitTransform( const Block & header_, UInt64 limit_, UInt64 offset_, size_t num_streams, bool always_read_till_end_, bool with_ties_, SortDescription description_) : IP...
#include "de_web_plugin.h" #include "de_web_plugin_private.h" #include "thermostat_ui_configuration.h" /*! Handle packets related to the ZCL Thermostat UI Configration cluster. \param ind the APS level data indication containing the ZCL packet \param zclFrame the actual ZCL frame which holds the Thermostat clu...
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // 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,...
/*! * Copyright (c) 2018 by Contributors * Implementation of IR Node API * \file node.cc */ #include <tvm/node/node.h> #include <memory> #include <atomic> #include <mutex> #include <unordered_map> namespace tvm { namespace { // single manager of operator information. struct TypeManager { // mutex to avoid reg...
//////////////////////////////////////////////////// // BSD 3-Clause License // // Copyright (C) 2020, University of Duisburg-Essen, // University of Edinburgh // Copyright note valid unless otherwise stated in // individual files. // All rights reserved. //////////////////////////////////////////////////// #include...
/* * Copyright (c) 2022 Salesforce, Inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ #include "git_api.h" #include <cstring> #include <cstdlib> #include "git2.h" #include "git2...
// Copyright (C) 2016-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your op...
/* * Copyright (c) 2021, Itamar S. <itamar8910@gmail.com> * * SPDX-License-Identifier: BSD-2-Clause */ #include "FileDB.h" #include <AK/LexicalPath.h> #include <AK/NonnullRefPtr.h> #include <LibCore/File.h> namespace LanguageServers { RefPtr<const GUI::TextDocument> FileDB::get_document(String const& filename) ...
/* Copyright 2012-present Facebook, Inc. * Licensed under the Apache License, Version 2.0 */ #include "make_unique.h" #include "watchman.h" #include "InMemoryView.h" #ifdef HAVE_PORT_CREATE #define WATCHMAN_PORT_EVENTS \ FILE_MODIFIED | FILE_ATTRIB | FILE_NOFOLLOW struct watchman_port_file { file_obj_t port_fi...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE401_Memory_Leak__strdup_char_83_bad.cpp Label Definition File: CWE401_Memory_Leak__strdup.label.xml Template File: sources-sinks-83_bad.tmpl.cpp */ /* * @description * CWE: 401 Memory Leak * BadSource: Allocate data using strdup() * GoodSource: Allocate dat...
#include <Common/escapeForFileName.h> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsign-compare" #include <gtest/gtest.h> #pragma GCC diagnostic pop using namespace DB; TEST(Common, unescapeForFileName) { EXPECT_EQ(unescapeForFileName(escapeForFileName("172.19.0.6")), "172.19.0.6"); EXPECT_...
/****************************************************************************** Copyright (c) 2017, Farbod Farshidian. 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 mu...
#include "knn.h" extern "C"{ void workload( float inputQuery[NUM_FEATURE], float searchSpace[NUM_PT_IN_SEARCHSPACE*NUM_FEATURE], float distance[NUM_PT_IN_SEARCHSPACE] ){ #pragma HLS INTERFACE m_axi port=inputQuery offset=slave bundle=gmem #pragma HLS INTERFACE s_axilite port=inputQuery bundle=contr...
#include "global.h" #include "PumpDevice.h" void PumpDevice::Open() { AddElementToQueue( IOHIDElementCookie(2) ); AddElementToQueue( IOHIDElementCookie(3) ); AddElementToQueue( IOHIDElementCookie(4) ); AddElementToQueue( IOHIDElementCookie(6) ); AddElementToQueue( IOHIDElementCookie(7) ); AddElementToQueue( IOHI...
#include <stdio.h> #include <stdlib.h> #include <string.h> main(){ int idade; char nome[20]; printf("Digite a sua idade: "); scanf("%i", &idade); fflush(stdin); //limpa o buffer printf("Digite seu nome:"); gets(nome); printf("%s", nome); }