text stringlengths 7 961k |
|---|
#pragma once
#include "sparta/statistics/ContextCounter.hpp"
#include "sparta/statistics/StatisticSet.hpp"
#include "sparta/statistics/StatisticDef.hpp"
#include "sparta/trigger/SingleTrigger.hpp"
#include "sparta/statistics/ReadOnlyCounter.hpp"
#include "sparta/kernel/SpartaHandler.hpp"
namespace sparta {
/*!
* \b... |
/**
* load_model.cc
*
* Copyright 2019. All Rights Reserved.
*
* Created: May 27, 2019
* Authors: Toki Migimatsu
*/
#include "mex.hpp"
#include "mexAdapter.hpp"
#include "spatial_dyn/parsers/urdf.h"
class MexFunction : public matlab::mex::Function {
public:
MexFunction() = default;
virtual ~MexFunction... |
#include<iostream>
#include<windows.h>
#include<conio.h>
#include<stdlib.h>
#include<time.h>
using namespace std;
#define ARRIBA 72
#define IZQUIERDA 75
#define ABAJO 80
#define DERECHA 77
int Puntos;
int cuerpo[200][2];
int n=1;
int tam = 3;
int x=10, y=12;
int dir=3;
int xc=30, yc=20;
int xxc= 40, yyc=18;
int d;
i... |
#include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string... |
/*
Copyright (C) 2003-2006 MySQL AB
All rights reserved. Use is subject to license terms.
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; version 2 of the License.
This program is... |
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/inspector/v8-debugger-agent-impl.h"
#include <algorithm>
#include "src/debug/debug-interface.h"
#include "src/inspector/injected-script.... |
/*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) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "tools/benchmark/benchmark_codec_avif.h"
#include <avif/avif.h>
#include "lib/extras/time.h"
#include "lib/jxl/base/padded_bytes.h"
#in... |
/**********************************************************************
* Online Judge : POJ
* Problem Title : Mobile phones
* ID : 1195
* Date : 12/2/2008
* Time : 20:49:34
* Computer Name : EVERLASTING-PC
*****************************************... |
//=================================================================================================
/*!
// \file src/mathtest/smatsmatsub/SCaMCa.cpp
// \brief Source file for the SCaMCa sparse matrix/sparse matrix subtraction math test
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// This f... |
/*
* Qt4 bitcoin GUI.
*
* W.J. van der Laan 2011-2012
* The Bitcoin Developers 2011-2012
*/
#include "bitcoingui.h"
#include "transactiontablemodel.h"
#include "addressbookpage.h"
#include "sendcoinsdialog.h"
#include "signverifymessagedialog.h"
#include "optionsdialog.h"
#include "aboutdialog.h"
#include "clientm... |
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
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.
Permiss... |
#include <iostream>
#include "square/square.h"
int main() {
std::cout << "Hello, bazel!" << std::endl;
std::cout << Square(2) << std::endl;
return 0;
} |
#include "example.h"
A::A() {}
B::B() {}
C::C() {}
P::P() {} |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <SF_Timer.hpp>
START_ATF_NAMESPACE
namespace Info
{
using SF_TimerCheckTime2_ptr = int (WINAPIV*)(struct SF_Timer*, unsigned int);
usin... |
/* cpphello.cpp
page 348
*/
#include <iostream>
int main()
{
std::out << "Hello world!" << std::endl;
return 0;
} |
/*
* SPDX-License-Identifier: Apache-2.0
*/
//===------------------------ CompilerOptions.cpp -------------------------===//
//
// Copyright 2022 The IBM Research Authors.
//
// =============================================================================
//
// Functions for adding options.
//
//===-----------------... |
/*-----------------------------------------------------------------------------
MMG Model Parameter Structure Definition
Author: Suisei WADA (D1)
@Faculty of Naval Architecture and Ocean Engineering, Osaka University
Date: 10th May, 2020
----------------------------------------------------------------------... |
// 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 "components/cronet/ios/cronet_environment.h"
#include <utility>
#include "base/at_exit.h"
#include "base/atomicops.h"
#include "base/command_li... |
/*=========================================================================
*
* 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... |
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar
#include <java/util/NoSuchElementException.hpp>
extern void unimplemented_(const char16_t* name);
java::util::NoSuchElementException::NoSuchElementException(const ::default_init_tag&)
: super(*static_cast< ::default_i... |
/* Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <folly/portability/GMock.h>
#include <folly/portability/GTest.h>
#include <fizz/client/Synchr... |
//------------------------------------------------------------------------------
// nesci -- neuronal simulator conan interface
//
// Copyright (c) 2018 RWTH Aachen University, Germany,
// Virtual Reality & Immersive Visualization Group.
//------------------------------------------------------------------------------
/... |
// 10866. 덱
// 2019.05.22
// 덱
#include<iostream>
#include<queue>
#include<string>
using namespace std;
int main()
{
int n;
cin >> n;
deque<int> dq;
for (int i = 0; i < n; i++)
{
string s;
cin >> s;
// push_front
if (s == "push_front")
{
int n;
cin >> n;
dq.push_front(n);
}
// push_back
... |
#include "guiutil.h"
#include "kingcoinaddressvalidator.h"
#include "walletmodel.h"
#include "kingcoinunits.h"
#include "util.h"
#include "init.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For Qt::escape
#includ... |
#include "random.h"
#include "../params.h"
#include <iostream>
using namespace std;
using ll = long long;
int main(int, char* argv[]) {
long long seed = atoll(argv[1]);
auto gen = Random(seed);
int n = N_AND_Q_MAX;
int q = N_AND_Q_MAX;
printf("%d %d\n", n, q);
for (int i = 0; i < n; i++) {
... |
/*
* Copyright 2019 Google LLC.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/sksl/SkSLSectionAndParameterHelper.h"
#include "src/sksl/ir/SkSLBinaryExpression.h"
#include "src/sksl/ir/SkSLConstructor.h"
#include "src/sksl/ir/SkSLDoStatemen... |
#ifndef GUARD_DPSG_FEED_HPP
#define GUARD_DPSG_FEED_HPP
#include <type_traits>
/* template<class T, template<class...> class C> using feed_t;
A super simple but super useful meta-function, that extracts the template
parameters of the first type it receives and instanciate the template given
in second param... |
#include <gtest/gtest.h>
#include <c10/core/impl/InlineDeviceGuard.h>
#include <c10/core/impl/FakeGuardImpl.h>
using namespace c10;
using namespace c10::impl;
constexpr auto TestDeviceType = DeviceType::CUDA;
using TestGuardImpl = FakeGuardImpl<TestDeviceType>;
static Device dev(DeviceIndex index) {
return Device... |
#include <iostream>
using namespace std;
#define MAX 100001
bool check[MAX];
string s;
int main()
{
for (int i=2; i*i<MAX; ++i) {
if (check[i])
continue;
for (int j=i*i; j<MAX; j+=i)
check[j] = 1;
}
while (1) {
cin >> s;
if (s == "0")
break;
int ans = 0;
for (int i=5; i>0; i--) {
for (int... |
/*
* 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 ... |
#pragma once
#include "../../other/template.hpp"
class RangeSet {
protected:
using iterator = typename std::set<std::pair<ll, ll>>::iterator;
int sz;
std::set<std::pair<ll, ll>> st;
iterator st_emplace_hint(const iterator& itr, ll l, ll r) {
sz += r - l;
return st.emplace_hint(itr, l... |
#include "source/extensions/common/sqlutils/sqlutils.h"
#include "gtest/gtest.h"
namespace Envoy {
namespace Extensions {
namespace Common {
namespace SQLUtils {
// MetadataFromSQLTest class is used for parameterized tests.
// The values in the tests are:
// std::string - SQL query
// bool - whether to expect SQL pa... |
#include "BracketParser.hpp"
using namespace Brackets;
template <typename T>
BracketParser<T>::BracketParser(const BracketsVector& brackets_vector) {
for (const auto& bracket_pair : brackets_vector) {
auto [first_bracket, second_bracket] = bracket_pair;
open_bracket_to_matching_close_[first_bracket] = seco... |
// root_finding_example.cpp
// Copyright Paul A. Bristow 2010, 2015
// Use, modification and distribution are 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)
// Example of finding roots using Newton-Raphson, Halley.
... |
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/md_downloads/downloads_list_tracker.h"
#include <iterator>
#include "base/bind.h"
#include "base/bind_helpers.h"
#incl... |
/*
TODO:
- Goblin can live from a fall if it's falling and a block appears near it; SEE: https:youtu.be/jNi6DQEX3xQ?t=12
- WIN32: don't jump when maximizing through shortcut
- Better pixel shader: see casey's video (handmade char on octopath traveller)
NOTE:
use sox to convert audio into desired format:
sox [input]... |
#include "level0/pch.h"
#include "api.h"
VulkanDescriptorPool::VulkanDescriptorPool(VulkanDevice *device, uint32_t maxSets, const std::vector< RenderDescriptorPoolSize > &_poolSizes)
{
this->device = device;
std::vector< VkDescriptorPoolSize > poolSizes(_poolSizes.size());
for (size_t i = 0; i < _poolSizes.size(... |
/* -*- 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
*
* ... |
/*
* Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Function.h>
#include <AK/StringBuilder.h>
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/AbstractOperations.h>
#include <LibJS/Runtime/BoundFunction.h>
#include <LibJS/Runtime/ECMAScri... |
#include "Matrix_Vector_Activa.h"
#include "AESL_pkg.h"
using namespace std;
namespace ap_rtl {
void Matrix_Vector_Activa::thread_tmp1597_fu_18692_p2() {
tmp1597_fu_18692_p2 = (tmp_6411_fu_3348_p3.read() ^ tmp_7182_fu_18684_p3.read());
}
void Matrix_Vector_Activa::thread_tmp1598_fu_18712_p2() {
tmp1598_fu_1... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
//Copyright (c) 2015-2020 The PIVX developers
//Copyright (c) 2020 The BinJit Coin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or htt... |
/*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2012 Clifford Wolf <clifford@clifford.at>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in ... |
/* Copyright 2008 (C) Nicira, Inc.
*
* This file is part of NOX.
*
* NOX 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 of the License, or
* (at your option) any later version.
*
* N... |
#include "video_cap.hpp"
VideoCap::VideoCap() {
this->opts = NULL;
this->codec = NULL;
this->fmt_ctx = NULL;
this->video_dec_ctx = NULL;
this->video_stream = NULL;
this->video_stream_idx = -1;
this->frame = NULL;
this->img_convert_ctx = NULL;
this->frame_number = 0;
this->frame... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
// This file is licensed under the Elastic License 2.0. Copyright 2021 StarRocks Limited.
#include "exec/vectorized/analytic_node.h"
#include <algorithm>
#include <cmath>
#include <memory>
#include "column/chunk.h"
#include "column/column_helper.h"
#include "exec/pipeline/analysis/analytic_sink_operator.h"
#include ... |
#include "SaiObjectCollection.h"
#include "sai_serialize.h"
using namespace saimeta;
void SaiObjectCollection::clear()
{
SWSS_LOG_ENTER();
m_objects.clear();
}
bool SaiObjectCollection::objectExists(
_In_ const sai_object_meta_key_t& metaKey) const
{
SWSS_LOG_ENTER();
bool exists = m_objec... |
/*
Copyright 2015 Alex Frappier Lachapelle
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... |
/*
MIT License
Android remote Viewer, GUI ADB tools
Android Viewer developed to view and control your android device from a PC.
ADB exchange Android Viewer, support scale view, input tap from mouse,
input swipe from keyboard, save/copy screenshot, etc..
Copyright (c) 2016-2019 PS
GitHub: ... |
// Copyright (c) 2011-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 "data/tx_invalid.json.h"
#include "data/tx_valid.json.h"
#include "test/test_csignal.h"
#include "clientversion.h"
... |
/*
* This file is part of the CitizenFX project - http://citizen.re/
*
* See LICENSE and MENTIONS in the root of the source tree for information
* regarding licensing.
*/
#include <StdInc.h>
#include <Hooking.h>
#include <EntitySystem.h>
#include <CoreConsole.h>
#include <ConsoleHost.h>
#include <imgui.h>
#includ... |
#include "bmpch.h"
#include "WindowsInput.h"
#include "Basement/Core/Application.h"
#include <GLFW/glfw3.h>
namespace Basement {
#define GET_APP_NATIVE_WINDOW Application::GetInstance().GetWindow().GetNativeWindow()
Input* Input::s_Instance = new WindowsInput();
bool WindowsInput::IsKeyPressedImpl(int keycode)
... |
#include "CardComponent.h"
CardComponent::CardComponent(Icon &icon, int x, int y, double xScale, double yScale, CardMatch* game)
{
this->icon = icon;
this->icon.setDrawDepth(4);
this->face = Facing::Up;
this->setDrawDepth(3);
this->xpos = x;
this->ypos = y;
xMultiplyer = xScale;
yMultiplyer = yScale;
currentG... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkSQLDatabaseGraphSource.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... |
/****************************************************************************
Copyright (c) 2014 cocos2d-x.org
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentati... |
//
// Created by Kuba on 09.10.2021.
//
#include "fat12.h"
std::vector<unsigned char> fat;
std::vector<unsigned char> second_fat;
/**
* Nacte FAT 1 a FAT 2
*/
Fat12::Fat12(): VFS(FsType::Fat12) {
fat = Fat_Helper::Load_Fat_Table(1);
second_fat = Fat_Helper::Load_Fat_Table(1 + Fat_Helper::kFatTableSectorCount);
}... |
//===----------------------------------------------------------------------===//
// DuckDB
//
// duckdb/optimizer/rule/move_constants.hpp
//
//
//===----------------------------------------------------------------------===//
#pragma once
#include "duckdb/optimizer/rule.hpp"
namespace duckdb {... |
// Copyright (c) 2018, The Sherkitty 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
// ... |
// MIT License
//
// Copyright (c) 2022 Egor Kupaev
//
// 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 2010 The Kyua 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:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditio... |
// Copyright (C) 2020-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#include "eltwise/eltwise-cmp-add-avx512.hpp"
#include <immintrin.h>
#include <stdint.h>
#include "eltwise/eltwise-cmp-add-internal.hpp"
#include "hexl/util/check.hpp"
#include "hexl/util/util.hpp"
#include "util/avx512-util.hpp"
na... |
//dlfcn.cpp
// Copyright Querysoft Limited 2013
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "Software") to use, reproduce, display, distribute,
// execute, and transmit the Software,... |
#include "util/vector.h"
#include "math/lp/factorization.h"
namespace nla {
void const_iterator_mon::init_vars_by_the_mask(unsigned_vector & k_vars, unsigned_vector & j_vars) const {
// the last element for m_factorization.m_rooted_vars goes to k_vars
SASSERT(m_mask.size() + 1 == m_ff->m_vars.size());
k_v... |
#include "benchmark-msgpack.h"
#include <msgpack.h>
void msgpack_encode_nil(benchmark::State &state) {
msgpack_sbuffer sbuf;
msgpack_sbuffer_init(&sbuf);
msgpack_packer pk;
msgpack_packer_init(&pk, &sbuf, msgpack_sbuffer_write);
for (auto _: state) {
msgpack_sbuffer_clear(&sbuf);
msgpack_pack_nil(&pk);
... |
#include <catch2/catch.hpp>
#include <stack.h>
TEST_CASE("stack")
{
SECTION("creating")
{
SECTION("creating a stack with options")
{
SECTION("max size should of stack_s should be same given option")
{
stack_options_s stack_options;
stack_o... |
#include <iostream>
#include <utility>
#include <string>
#include <tuple>
using std::cin;
using std::cout;
using std::endl;
using std::tie;
using std::get;
using std::make_pair;
using std::make_tuple;
using std::pair;
using std::tuple;
using std::string;
struct Date {
public:
Date(const int& year, const int& mon... |
/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2020 UniPro <ugene@unipro.ru>
* http://ugene.net
*
* 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
* ... |
/*
Author: James Nuttall <james@cromulence.com>
Copyright (c) 2016 Cromulence 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 restriction, including without limitation the rights
to ... |
#include "Intellect.h"
namespace std
{
vector<unsigned int> distinct_by_two_digits_swapped(const vector<int>& g1, const vector<int>& g2)
{
vector<unsigned int> distinct_dig_orders;
if (g1.size() != g2.size())
return distinct_dig_orders;
for (unsigned int i = 0; i < g1.size(); i++)
if (g1[i] != g2[i])
... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* DIStribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
// Copyright 2016 Dawid Kurek. All Rights Reserved.
#include "gui/display.hpp"
#include "hqx/hqx.hpp"
namespace gui {
Display::Display(Byte const *const memory,
nana::form const &form)
: Worker{Clock}
, _width{Width}
, _height{Height}
, _scale{}
, _isUpdateNeeded{true}
, _color()
, _hq... |
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
/* created by Ghabriel Nunes <ghabriel.nunes@gmail.com> [2017] */
#include <deque>
#include <list>
#include <unordered_map>
#include <vector>
#include "debug.hpp"
#include "xtrace.hpp"
class A {};
template<typename T>
class B {};
template<typename T>
class C {
public:
T* begin() const { return nullptr; }
};
templ... |
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... |
/*
* Copyright (C) 2013 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 conditio... |
#include "stdafx.h"
#include "CppUnitTest.h"
#include "..\SimModule\MechanicalAction.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
namespace UnitTesting
{
TEST_CLASS(ActionOnPointTest)
{
public:
TEST_METHOD(Construction)
{
ActionOnPoint A;
ActionOnPoint B(Vect(0, 0, 0), Vect(0, 0, 0)... |
/**
* Copyright (C) 2015 MongoDB 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 usef... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "calendar.h"
int getChoice();
int main(void)
{
Calendar* calendar = (Calendar*) malloc(sizeof(Calendar));
create(calendar);
readFile(calendar);
while(true)
{
switch (getChoice())
{
case 0: destroy(calendar);
return ... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2017-2018 The Proton Core developers
// Copyright (c) 2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/lice... |
/**
*
* Copyright (c) 2021 Project CHIP 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 requi... |
/*\
| ------------------------------------------------------
| @file : UserModel.hpp
| @author : Fabien Beaujean, Luc Lorentz
| @description : modèle gestion des utilisateurs
| ------------------------------------------------------
\*/
#ifndef USERMODEL_HPP_INCLUDED
#define USERMODEL_HPP_INCLUDED
#include "../in... |
#ifndef SERIALIZATION_H
#define SERIALIZATION_H
/**
* Headers for all boost::serialization functionalities used in project.
*/
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/export.hpp>
#include <boost/serialization/base_object.hpp>
#include <boo... |
// hyperion local includes
#include "LedDeviceKarate.h"
LedDeviceKarate::LedDeviceKarate(const QJsonObject &deviceConfig)
: ProviderRs232()
{
_devConfig = deviceConfig;
_isDeviceReady = false;
_activeDeviceType = deviceConfig["type"].toString("UNSPECIFIED").toLower();
}
LedDevice* LedDeviceKarate::construct(cons... |
/*
* ConfigBroadcaster.actor.cpp
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ... |
//===- llvm/CodeGen/DwarfDebug.cpp - Dwarf Debug Framework ----------------===//
//
// 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 <cnr_interpolator_interface/internal/cnr_interpolator_base.h>
namespace cnr
{
namespace control
{
bool InterpolatorBase::initialize(cnr_logger::TraceLoggerPtr logger,
ros::NodeHandle& controller_nh,
InterpolatorTrajectoryPtr trj )
... |
// 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 "net/disk_cache/disk_cache_test_base.h"
#include <memory>
#include <utility>
#include "base/bind.h"
#include "base/files/file_util.h"
#incl... |
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012, 2013 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby ... |
// 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/extensions/default_apps.h"
#include <stddef.h>
#include <memory>
#include <set>
#include <string>
#include "base/lazy_inst... |
// License: BSD 3 clause
#include "tick/robust/model_modified_huber.h"
template <class T>
T TModelModifiedHuber<T>::loss_i(const ulong i, const Array<T> &coeffs) {
const T z = get_label(i) * get_inner_prod(i, coeffs);
if (z >= 1) {
return 0.;
} else {
if (z <= -1) {
return -4 * z;
} else {
... |
// 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.
#if defined(HAVE_CONFIG_H)
#incl... |
#include "AddDemo.hpp"
int add(int i, int j) {
return i + j;
} |
#include "App.h"
#include <ctime>
#include <QJsonDocument>
#include <QMessageBox>
#include <QJsonArray>
#include <QFile>
#include "window/MainWindow.h"
std::unique_ptr<QApplication> App::m_qapp = nullptr;
std::vector<std::unique_ptr<Group>> App::m_groups;
QJsonObject App::m_profile;
bool App::init(int argc, char**... |
/*
* Copyright (C) 2005-2020 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 ... |
/*
* BSD 2-Clause License
*
* Copyright (c) 2019, Christoph Neuhauser
* 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 ... |
#include "BleConnectionStatus.h"
BleConnectionStatus::BleConnectionStatus(void) {
}
void BleConnectionStatus::onConnect(BLEServer* pServer)
{
this->connected = true;
BLE2902* desc = (BLE2902*)this->inputKeyboard->getDescriptorByUUID(BLEUUID((uint16_t)0x2902));
desc->setNotifications(true);
}
void BleConnection... |
// -*- coding: us-ascii-unix -*-
#include "test-sys/test.hh"
#include "tests/test-util/print-objects.hh"
#include "tests/test-util/text-bitmap.hh"
#include "bitmap/color.hh"
#include "bitmap/draw.hh"
void test_boundary_fill(){
using namespace faint;
const std::string s =
"............."
".###########."
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.