text stringlengths 5 1.04M |
|---|
// -*-c++-*-
/***************************************************************************
isocketstream.hpp - An istream for sockets
-------------------
begin : 08-JAN-2003
copyright : (C) 2003 by The RoboCup Soccer Server
... |
//
// Ponto.cpp
// OpenGLTest
//
// Created by Márcio Sarroglia Pinho on 18/08/20.
// Copyright © 2020 Márcio Sarroglia Pinho. All rights reserved.
//
#include "Ponto.h"
Ponto::Ponto ()
{
x=y=z=0;
}
Ponto::Ponto(float x, float y, float z)
{
this->x = x;
this->y = y;
this->z = z;
}
void Ponto::set(f... |
#include "leetrpc/rpc_client.h"
#include "leetrpc/rpc_status.h"
#include "add_client_stub.h"
#include "libbase/buffer.h"
#include <memory>
#include <iostream>
#include <string>
#include <unistd.h>
using namespace network;
using namespace libbase;
using namespace leetrpc;
void Print(std::shared_ptr<double> ret) {
... |
/*
+----------------------------------------------------------------------+
| Swoole |
+----------------------------------------------------------------------+
| This source file is subject to version 2.0 of the Apache license, |
| that is bundl... |
/* Copyright 2018 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 by Contributors
*/
#include "Debug.h"
namespace Halide {
namespace Internal {
int debug::debug_level() { return 0; }
} // namespace Internal
} // namespace Halide
|
#include <stdio.h>
#include <sys/time.h>
#include "pl_util.h"
#define FILE_MEMORY_STATUS "/proc/self/statm"
double now_us(void)
{
struct timeval tv;
double now = 0.0;
int rc = gettimeofday(&tv, 0);
if (rc == 0) {
now = 1000000.0 * tv.tv_sec + tv.tv_usec;
}
return now;
}
long total_mem... |
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2022 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: Apache-2... |
class Solution {
public:
int maxProfit(vector<int>& prices) {
if (prices.size() <= 1) return 0;
int res = 0;
for (int i = 1; i < prices.size(); i++)
if (prices[i] > prices[i - 1])
res += (prices[i] - prices[i - 1]);
return res;
}
}; |
#include "gtest/gtest.h"
#include "inc.h"
#include "stl_headers.h"
#include <list>
NS_BEGIN(elloop);
using namespace std;
//********************************** new case **********************************
RUN_GTEST(ListTest, Example, @);
auto printList = [](const list<int> &l, const string &info="") {
p(info);
... |
#include "add_activity_dialog.h"
#include "ui_add_activity_dialog.h"
#include "add_activity_info_dialog.h"
#include "add_field_dialog.h"
#include "application_state.h"
#include "error_macros.h"
#include <QMessageBox>
#include <QLineEdit>
#include <QDebug>
#include <QLabel>
AddActivityDialog::AddActivityDialog(QWidge... |
/*++
Copyright (C) 2004 - 2005 Microsoft Corporation
All rights reserved.
... |
/**
* @file Tests.cpp
*
* @brief Test routines for Zerocoin.
*
* @author Ian Miers, Christina Garman and Matthew Green
* @date June 2013
*
* @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green
* @license This project is released under the MIT license.
**/
// Copyright (c) 20... |
#include "stdafx.h"
#include <tc.common/byte_buffer.hpp>
TEST( byte_buffer , ctor_other_block_type ) {
tc::buffer::byte_buffer<tc::buffer::simple_block> block(24);
int val = 1000;
ASSERT_EQ(block.write(&val, sizeof(int)), sizeof(int));
ASSERT_EQ(block.length(), sizeof(int));
tc::buffer::byte_buffer<tc::buffer::r... |
//
// TreeLevelOrderTraversal.cpp
// HackerRank
//
// Created by Fabrizio Duroni on 14/12/2016.
//
// https://www.hackerrank.com/challenges/tree-level-order-traversal
#include <queue>
#include <iostream>
using namespace std;
struct node {
int data;
node* left;
node* right;
};
/*
Breadth first ... |
// The MIT License (MIT)
// Copyright (c) 2013 lailongwei<lailongwei@126.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 r... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtWidgets module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid comm... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include "../params.h"
#include "random.h"
using std::vector;
int main(int, char **argv) {
const long long seed = atoll(argv[1]);
// auto rng = Random(seed * 3 + 0);
const long long R = 0;
int D = -1;
long long N = -1;
switch (s... |
// 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 "chromeos/network/network_sms_handler.h"
#include <algorithm>
#include <deque>
#include <string>
#include <vector>
#include "base/bind.h"
#... |
#include <bits/stdc++.h>
using namespace std;
const int MM = 1e6+2, SZ = MM*4;
struct ari_seg{
#define lc (rt<<1)
#define rc (rt<<1|1)
#define nm ((nl+nr)>>1)
int K[SZ], D[SZ], LK[SZ], LD[SZ], S[SZ];
void push_up(int rt){
S[rt] = S[lc] + S[rc];
}
void push_down(int nl, int nr, int rt){
if(LK[rt] == 0 && L... |
#include <vector>
using namespace std;
// 12 ms, 9.9 MB. Greedy.
class Solution {
public:
bool canJump(vector<int>& nums) {
int farest = nums[0];
for (int i = 0; i < nums.size(); ++i) {
if (farest >= nums.size() - 1) {
return true;
}
if (i >= farest && nums[i] == 0) {
retur... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2016,2018,2019,2020, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at... |
#include <ctime>
#include "Citoyen.hpp"
#include "windowParam.hpp"
/**
* Constructeur d'Citoyen
*/
Citoyen::Citoyen(int hp, float speed){
m_texture.loadFromFile("img/sprite_electeur.png");
setTexture(m_texture);
setTextureRect(sf::IntRect(0,0,16,24));
setOrigin(((getTextureRect().width)/2),((getTe... |
/*------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
*
* Copyright (c) 2016 The Khronos Group Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ... |
/*
Copyright (c) 2019 Xavier Leclercq
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, ... |
#include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinamountfield.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include "qvalidatedlineedit.h"
#include "qvaluecombobox.h"
#include <QCheckBox>
#include <QDir>
#include <QIntValidator>
#... |
#include <iostream>
#include <string>
#include <sstream>
#include <vector>
#include <unordered_map>
#include <stdint.h>
#include <cmath>
using namespace std;
typedef int64_t Int;
typedef uint64_t UInt;
UInt gcd(UInt a, UInt b) {
if (b == 0) return a;
return gcd(b, a % b);
}
UInt gcd2(UInt a, UInt b) {
... |
/* nlsfuncs.cc: NLS helper functions
Copyright 2010, 2011, 2012, 2013 Red Hat, Inc.
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
#include <stdio.h>
#include <stdlib.h>... |
//*****************************************************************************
// Copyright 2017-2019 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://w... |
/*
* Copyright 2010 Utkin Dmitry
*
* 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 agr... |
// Copyright Daniel Wallin & Arvid Norberg 2009. Use, modification and distribution is
// subject to 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 "boost_python.hpp"
#include <libtorrent/create_torrent.hpp>
#include <libtorr... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkShadowMapPass.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software... |
#include "menu.h"
#include "ui_menu.h"
#include "StartPage.h"
#include "musicmemo.h"
#include <QDialog>
menu::menu(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::menu)
{
ui->setupUi(this);
ui->label->setPixmap(QPixmap(":/picture/menu.jpg"));
ui->label_2->setPixmap(QPixmap(":/pic... |
/** \copyright
* Copyright (c) 2021, Balazs Racz
* 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 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... |
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: Evangelos Anagnostopoulos, Bjoern Esser
*/
#include <shogun/base/Parameter.h>
#include <shogun/mathematics/Math.h>
#include <shogun/features/RandomFourierDotFeatures.h>
namespace shogun {
enum KernelName;
CRandomFourie... |
/*
Copyright (C) 2021 hidenorly
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
////////////////////////////////////////////////////////////////////////////
// Module : stalker_movement_manager_obstacles_path.cpp
// Created : 18.04.2007
// Modified : 18.04.2007
// Author : Dmitriy Iassenev
// Description : Stalker movement manager: dynamic obstacles avoidance: build path
////////////////////... |
// Copyright David Abrahams 2001-2004.
// Copyright (c) Jeremy Siek 2001-2003.
// Copyright (c) Thomas Witt 2002.
//
// Copyright (c) 2016 Hartmut Kaiser
//
// 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)
#if... |
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define ll long long int
#define ld long double
#define vi vector<int>
#define vll vector<long long int>
#define sc(n) scanf("%d",&n);
#define scll(n) scanf("%lld",&n);
#define scld(n) s... |
/*=========================================================================
*
* 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... |
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... |
// Copyright (c) 2012-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.
#include "limitedmap.h"
#include "test/test_Xchange.h"
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(limite... |
// The code is open source under the MIT license.
// Copyright 2019-2020, Phillip Keldenich, TU Braunschweig, Algorithms Group
// https://ibr.cs.tu-bs.de/alg
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to de... |
//===----------------------------------------------------------------------===//
//
// 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) 2009 Tommi Maekitalo
*
* This program 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 2 of the
* License, or (at your option) any later version.
*
* This program is di... |
#include "WorkingWithEncodings.h"
#include <system/type_info.h>
#include <system/text/encoding.h>
#include <system/string.h>
#include <system/shared_ptr.h>
#include <system/reflection/method_base.h>
#include <system/object.h>
#include <system/io/stream_reader.h>
#include <system/io/stream.h>
#include <system/details/d... |
/*******************************************************************************
* Copyright © 2014, Sergey Radionov <rsatom_gmail.com>
* 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.... |
#ifndef MINERVA_COMPRESSOR_HPP
#define MINERVA_COMPRESSOR_HPP
#include <string>
#include <cstdint>
#include <vector>
namespace minerva
{
enum compressor_algorithm
{
GZIP
};
class compressor
{
public:
compressor();
compressor(compressor_algorithm algorithm, size_t basis_size, uint8_t level=0);
... |
/*
* Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
/*
* 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... |
/**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* This program 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; eithe... |
//*****************************************************************************
// Copyright 2017-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://w... |
#include "Mesh.h"
#include "numeric_tools.h"
#include <algorithm>
#include <iostream>
using namespace Eigen;
using namespace Numerics;
void Mesh::setMeshKind(GeomKind kind)
{
m_mode = kind;
pm_abGeom = AbstractGeometry::setGeometry(kind);
}
// From cm to m
void Mesh::setBoundaries(VectorXd &bounda... |
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtNetwork module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licens... |
// -*- Mode: C++; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
#include "logic_inb.h"
#include "app_class.h"
#include "tokenizer.h"
#include "servant_utils.h"
namespace LogicService {
Yb::ElementTree::ElementPtr ping(
Yb::Session &session, Yb::ILogger &logger,
const Yb::StringDict ¶... |
/* ================================================================
*
* AtlasWerks Project
*
* Copyright (c) Sarang C. Joshi, Bradley C. Davis, J. Samuel Preston,
* Linh K. Ha. All rights reserved. See Copyright.txt or for details.
*
* This software is distributed WITHOUT ANY WARRANTY; without even the
* impli... |
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Nazara Engine - Renderer module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_VULKANRENDERER_VULKANRENDERIMAGE_HPP
#define NAZARA_VULKANRENDERER_VULKANRENDERIMAGE_HPP
#include <Nazara/Prere... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2019 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 <rpc/blockchain.h>
#include <amount.h>
#include <blockfilter.h>
#include <ch... |
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2017 Couchbase, 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
*
* ... |
#include<iostream>
#include<string.h>
using namespace std;
int main(){
char a[]="syamalarao";
char b[11];
int i=0;
int j=strlen(a)-1;
for(i=0;i<strlen(a);i++,j--){
cout<<&a[i]<<endl;
b[j]=a[i];
}
cout<<b<<endl;
cout<<strlen(a-1)<<endl;
}
|
/* 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... |
//
// Created by cc on 2020/6/15.
//
#include "HttpHelper.h"
#include <QFile>
#include <QApplication>
#include <QEventLoop>
#include "../http/QtHttpRequest.h"
using namespace std;
HttpHelper::HttpHelper() = default;
string HttpHelper::get(const std::string& url) {
string res;
auto http = pool.enqueue([&res... |
#include <catch2/catch.hpp>
#include "mocks/entity.hpp"
#include "mocks/server.hpp"
#include <map/offset.hpp>
#include <stdlib.h>
#include <unordered_map>
SCENARIO("Offset can be created and manipulated", "[offset]") {
GIVEN("All possible hex coordinates") {
WHEN("offsets are built") {
THEN("... |
// Copyright 2010-2021, Google 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 list of condit... |
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2019
// MIT License
#pragma once
#include "../Polyfills/type_traits.hpp"
#include "convertNumber.hpp"
#include "parseNumber.hpp"
namespace ARDUINOJSON_NAMESPACE {
template <typename T>
T parseInteger(const char *s) {
// try to reuse th... |
//
// 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 following disclaimer.
// * Redistributions in bin... |
/*
* Copyright (c) 2011-2013,2017-2018 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementati... |
/*
* Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
* Copyright (C) 2009-2010 ProFUSION embedded systems
* Copyright (C) 2009-2010 Samsung Electronics
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* This library is free s... |
// Implementation of ARIA Cryptosystem with 128 bit key
// Written by Siddharth Ramachandran
// November 1, 2015
#include <iostream>
#include <boost/multiprecision/cpp_int.hpp>
#include <string>
#include <algorithm>
#include <stdlib.h>
using namespace boost::multiprecision;
// Intialise S-Box values
static const ui... |
/**
* Copyright 2019 Huawei Technologies Co., Ltd
* 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 ag... |
#ifndef TVEventChangeHandler_hxx_seen
#define TVEventChangeHandler_hxx_seen
#include <TObject.h>
namespace EDep {
class TVEventChangeHandler;
}
/// A base class for handlers called by TEventChangeManager. The
/// TEventChangeManager keeps a vector of possible handlers that are used
/// everytime the event has c... |
/**
* @file RandomOrderVertexSet.hpp
* @brief The RandomOrderVertexSet class.
* @author Dominique LaSalle <dominique@solidlake.com>
* Copyright 2018
* @version 1
* @date 2018-05-19
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
#include <iostream>
using namespace std;
// disable padding
#pragma pack(push, 1)
struct Person {
char name[50];
int age;
double weight;
};
#pragma pack(pop)
int main(){
cout << sizeof(Person) << endl;
return 0;
} |
/*
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 ... |
/**
* Copyright (c) 2017-present, Facebook, 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 ... |
#include "drawboard.h"
#include "configuration.h"
#include "tetrisboard.h"
#include "game/player.h"
#include <sdl/graphic.h>
#include <sdl/imguiauxiliary.h>
#include <spdlog/spdlog.h>
#include <vector>
namespace mwetris::graphic {
namespace {
Vec2 calculateCenterOfMass(const tetris::Block& block) {
Vec2 pos... |
////////////////////////////////////////////////////////////////////////////////
//
// Network Embedded Systems - 2016/2017 (second semester)
// Interconnecting "mbeds" by a CAN
//
// Code for the MBED1 - Master
//
// Work done by:
// Joao Belfo - 78913
// Joao Girao - 78761
// Luis Rei - 78486
//
// Rev:... |
/*
* Copyright (c) 2020, 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 ... |
/*
* Copyright (c) 2021, 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 requir... |
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
... |
// Copyright (c) 2014 Dropbox, 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 agree... |
class Solution {
public:
int missingNumber(vector<int> &nums) {
int n = nums.size();
for (int i = 0; i < n; i++) {
if (nums[i] < n && nums[i] != i) {
int t = nums[nums[i]];
nums[nums[i]] = nums[i];
nums[i] = t;
i--;
}
}
for (int i = 0; i < n; i++)
if ... |
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file physxConvexMesh.cxx
* ... |
/*******************************************************************************
* Filename : fpucpacrregisters.hpp
*
* Details : Floating point unit CPACR. This header file is auto-generated
* for STM32F411 device.
*
*
*************************************************************************... |
// @@@ START COPYRIGHT @@@
//
// 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... |
#include <PnC/Scorpio2PnC/CtrlSet/OSCPosCtrl.hpp>
#include <PnC/Scorpio2PnC/TestSet/OSCTest.hpp>
OSCTest::OSCTest(RobotSystem* robot) : Test(robot) {
myUtils::pretty_constructor(1, "Scoprio2 OSC Test");
cfg_ = YAML::LoadFile(THIS_COM "Config/Scorpio/TEST/OSC_TEST.yaml");
phase_ = 0;
state_list_.clear(... |
///////////////////////////////////////////////////////////////////////
// File: unicharmap.cpp
// Description: Unicode character/ligature to integer id class.
// Author: Thomas Kielbus
//
// (C) Copyright 2006, Google Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may... |
// 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/renderer/extensions/context_menus_custom_bindings.h"
#include "base/bind.h"
#include "chrome/common/extensions/extension_messages.h"... |
// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h>
#include <cc/server_tag.h>
#i... |
/**
* 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... |
#include "pch.h"
#include "AppDelegate.h"
#include "ClassManage.h"
#include "util.h"
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
//if you want a different context,just modify the value of glContextAttrs
//it will takes effect on all platforms
void AppDelegate::initGLContextAttrs(... |
/*
* Copyright (c) 2015, 2016, 2017, 2018, 2019, Intel Corporation
*
* 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 ... |
#include <windows.h>
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
#include "InitShader.h"
#include "imgui_impl_glut.h"
#incl... |
/*
File: InputParser.cpp
Authors:
Indranil Saha (isaha@cse.iitk.ac.in)
Ankush Desai(ankush@eecs.berkeley.edu)
This file is used for parsing the inputs to complan.
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <math.h>
#include <stdlib.h>
#include "MotionPrimitives.h"
#include... |
#include <iostream>
#include <vector>
#include <array>
#include <math.h>
#include "consts.hpp"
#include "ensemble.hpp"
#include "MT.h"
using namespace std;
//コンストラクタ
Ens::Ens(){
int i, ix, iy;
div_t div_i;
double sum_ux=0, sum_uy=0, r1, r2;
init_genrand(1);
for(i=0; i<NAtom; i++){
div_i = div(i, NInitCo... |
bonsai_function u32
GetWorkerThreadCount()
{
u32 LogicalCoreCount = PlatformGetLogicalCoreCount();
u32 Bias = 1 + DEBUG_THREAD_COUNT_BIAS; // +1 because we already have a main thread
if (Bias >= LogicalCoreCount)
{
Bias = LogicalCoreCount - 1;
}
u32 ThreadCount = LogicalCoreCount - Bias;
return Thre... |
#include <Python.h>
#include <QDir>
#include <QMessageBox>
#include <QCloseEvent>
#include "app/app.h"
#include "window/base.h"
// Initialize global window count (used to detect when last window closes)
int BaseWindow::window_count = 0;
BaseWindow::BaseWindow(QString type)
: QMainWindow(), window_type(type), ui... |
//-----------------------------------------------------------------------------
// Copyright (c) 2015 GarageGames, LLC
//
// 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 restrictio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.