text stringlengths 3.08k 12.5k |
|---|
#include "mbed.h"
#include "stm32746g_discovery_lcd.h"
#include "stm32746g_discovery_ts.h"
using namespace std::chrono;
// 480x272 velikost displaye
#define setX 150
#define setY 120
#define setWidth 180
#define setHeight 50
#define incDecX 400
#define incDecSize 50
#define incY 120
#define decY 180
InterruptIn but... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <cctype>
#include <cassert>
#include <cmath>
#include <set>
#include <stack>
#include <utility>
#include <map>
#include <string>
#include <sstream>
using namespace std;
#define SIZE 109
#define ep... |
/*
* Copyright (C) <NAME> - All Rights Reserved
*
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
*
* Written by <NAME> <<EMAIL>>
*/
/*******************************************************************************
* @file: async/serialChannel.cpp
*******... |
//
// Created by <NAME> on 2021/11/17.
//
#include "aes_cbc_crypt.h"
#ifdef Debug
#include <iostream>
#elif Release
#include <stdexcept>
#endif
#include <cstring>
/**
* @brief 初始化密钥
* @details DES 加密算法,密钥 8 位,多余丢弃,不足补 0
* @param _password 8 位密钥
* @return bool
*/
bool AesCBCCrypt::Init(const std::string &_passwo... |
#include "skeletalstorage.h"
using namespace Tempest;
struct SkeletalStorage::Impl {
virtual ~Impl() = default;
virtual size_t alloc(size_t bonesCount) = 0;
virtual void free (const size_t objId, const size_t bonesCount) = 0;
virtual void bind(Uniforms& ubo, uint8_t bind, uint8_t fId, size_t id) = 0;
v... |
/*
Copyright (c) 2012 <NAME>, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following d... |
/*************************************************************************/
/* editor_log.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include "TestHarness.h"
#include "MockSupport.h"
#include "MockSupport_c.h"
extern "C"{
#include "stm32f4xx_conf.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_adc.h"
#include "bsp.h"
#include "adc_driver.h"
}
#include "test_rcc_mock.h"
#include "test_gpio_mock.h"
#include "test_adc_mock.h"
G... |
/* Rotary encoder handler for arduino. v1.1
*
* Copyright 2011 <NAME>. Licenced under the GNU GPL Version 3.
* Contact: <EMAIL>
*
* A typical mechanical rotary encoder emits a two bit gray code
* on 3 output pins. Every step in the output (often accompanied
* by a physical 'click') generates a specific sequence ... |
// Copyright (c) 2021 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 applicabl... |
// Code by <NAME>.
// Release under MIT license.
#include <iostream>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_mixer.h>
#include <Box2D/Box2D.h>
#define TICK_INTERVAL 50
using namespace std;
static SDL_Renderer *gRenderer = NULL;
static Uint32 next_time;
stati... |
#include <cstdio>
#include <cstdlib>
#include <cstring> // strcmp
#include <string>
#include <signal.h>
#include <pins/pins.h>
#include "common.h"
#include "libvMI_int.h"
#include "vMI_input.h"
/**
* This file contains an implementation of lib2vf supporting multiple modules
*/
CvMIInput::CvMIIn... |
/**
* Code in this file are adapted from:
* https://github.com/KnightKingWalk/KnightKing/blob/master/src/tests/test_node2vec.cpp
*
*/
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 <NAME>, Tsinghua University
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this soft... |
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
... |
//
// BuyTickets.cpp
// Hw 11
// Object Oriented Vieshow Cinemas Taipei QSquare system
//
// Created by <NAME> on 2018/6/3.
// Copyright © 2018年 <NAME>. All rights reserved.
//
#include <iomanip>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
#include "BuyTickets.h"
extern char hours[17][8... |
#include "Peer.hpp"
#include "opcodes.hpp"
#include "EngineInterface.hpp"
#include <QCoreApplication>
#include <iostream>
bool operator <(std::reference_wrapper<Peer> a, std::reference_wrapper<Peer> b) {
return a.get() < b.get();
}
bool operator ==(std::reference_wrapper<Peer> a, std::reference_wrapper<Peer> b) {
... |
//******************************************************************
//
// Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except ... |
/**
* @file test_traj_opt_node.cpp
* @author <NAME> (<EMAIL>)
* @brief
* @version 1.0
* @date 2021-12-07
*
* @copyright Copyright (c) 2021
*
*/
#include <geometry_msgs/Point.h>
#include <geometry_msgs/PoseArray.h>
#include <nav_msgs/Path.h>
#include "map_server/grid_map.h"
#include <quadrotor_msgs/PositionCom... |
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1991 - 1992.
//
// File: PINDEX.HXX
//
// Contents: Persistent Index
//
// Classes: CPersIndex
//
// History: 3-Apr-91 BartoszM Created stub.
/... |
#include <Arduino.h>
// PCB Factory - Tool control board
// using Pronteer.nz Grbl CNC shield v 3.00 clone
// ================================================
// INTERFACE TO GRBL CNC CONTROLLER
// ================================================
// the below pins are connected to the Grbl cnc controller board
/... |
/* Copyright (C) 2016 <NAME>.
* This file is part of 0 A.D.
*
* 0 A.D. 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.
*
* 0 A.... |
#include "fridge.h"
byte fridgeState[2] = { IDLE, IDLE }; // [0] - current fridgeTemp state; [1] - fridgeTemp state t - 1 history
double peakEstimator = 30; // to predict COOL overshoot; units of deg C per hour (always positive)
double peakEstimate = 0; // to determine prediction error = (estimate - actua... |
//===- LegalizeStandardForSPIRV.cpp - Legalize ops for SPIR-V lowering ----===//
//
// Copyright 2019 The MLIR 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.... |
/*
Copyright (c) 2011-2013 <NAME> <<EMAIL>>
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,... |
//
// Created by shahar on 06/04/2020.
//
#include "FamilyTree.hpp"
#include <iostream>
family::Tree& family::Tree:: search(string son) {
Tree *temp=this;
if(temp) {
if (this->root == son) {
// cout << "yes i found" << this->root << endl;
return *this;
}
else {... |
/**
* Http服务器,提供静态文件映射与动态脚本服务功能
* EricJeffrey 2019/10/3
*/
#include "thread_pool.h"
#include "wrappers.h"
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/stat.h>
int num_tot_thread = 4;
int back_log = 20;
unsigned int port = 2333;
int time_out_epoll = 100;
int max_events_epoll = 10;... |
/* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include <errno.h>
#include <folly/ssl/Init.h>
#include <signal.h>
#include <string.h>
#include <thrift/lib/cpp2/server/... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <array>
#include <cstddef>
#include "DataStructures/DataBox/Tag.hpp"
#include "DataStructures/Matrix.hpp"
#include "DataStructures/Tensor/EagerMath/Magnitude.hpp" // IWYU pragma: keep
#include "DataStructures/Tensor/Tensor.h... |
// Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this softw... |
#include <iostream>
#include <cassert>
using namespace std;
/*
队列的设计:
该队列为链式队列,无表头结点。
队头指针 front 指向链表的第一个结点(不是表头),尾指针指向链表的尾结点,
从链表尾部入队,链表头部出队。
如图 ./queue.jpg 所示
*/
const bool show = true; // 是否在每次操作后显示相关信息
typedef struct Node
{
int data;
Node *next;
Node(int v = 0, Node* p = nullptr) : data(v), next(p) {};
... |
//
// HTTPTimeServer.cpp
//
// $Id: //poco/1.4/Net/samples/HTTPTimeServer/src/HTTPTimeServer.cpp#2 $
//
// This sample demonstrates the HTTPServer and related classes.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free of charge, t... |
#include "controler/Game/GameControler.h"
#include "model/Game/db_game.h"
#include "model/GameInformation/db_gameinformation.h"
#include "model/Player/db_player.h"
#include "controler/WHR/proba_win.h"
#include <ctime>
#include <math.h>
#define CHANGE_CONSTANTE 10.0
#define ELO_CONSTANTE 400.0
GameControler::GameCo... |
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <sensor_msgs/Image.h>
#include <geometry_msgs/PointStamped.h>
#include <opencv2/opencv.hpp>
#include <opencv2/fe... |
/*---------------------------------------------------------------------------------------------*
* Copyright (C) 2012 <NAME> - www.bltek.com - Boulder Language Technologies *
* *
* www.bavieca.org is the website of ... |
#include "FusionEKF.h"
#include "tools.h"
#include "Eigen/Dense"
#include <iostream>
using namespace std;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::vector;
/*
* Constructor.
*/
FusionEKF::FusionEKF() {
is_initialized_ = false;
previous_timestamp_ = 0;
// initializing matrices
R_laser_ = Mat... |
// This example is derived from the ssd_mobilenet_object_detection opencv demo
// and adapted to be used with Intel RealSense Cameras
// Please see https://github.com/opencv/opencv/blob/master/LICENSE
#include <opencv2/dnn.hpp>
#include <librealsense2/rs.hpp>
#include "../cv-helpers.hpp"
const size_t inWidth = 3... |
// Adapted from here:
// https://chromium.googlesource.com/chromiumos/platform/power_manager/+/refs/heads/0.12.433.B62/xidle.cc
#include <gdk/gdkx.h>
#include <glib.h>
#include <limits>
#include "activity_detector.h"
using std::numeric_limits;
using std::pair;
static inline int64_t XSyncValueToInt64(XSyncValue value... |
//----------------------------------------------------------------------------
//
// TSDuck - The MPEG Transport Stream Toolkit
// Copyright (c) 2005-2020, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following c... |
//------------------------------------------------------------------------------
// File: EZProp.cpp
//
// Desc: DirectShow sample code - implementation of CEZRgb24Properties class.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------... |
/*========================== begin_copyright_notice ============================
Copyright (C) 2017-2021 Intel Corporation
SPDX-License-Identifier: MIT
============================= end_copyright_notice ===========================*/
//
// GenXPrinter is a pass that prints the LLVM IR for a function, together
// Gen... |
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2019 Intel Corporation. All Rights Reserved.
#include <librealsense2/rs.hpp>
#include "example-imgui.hpp"
/*
This example introduces the concept of spatial stream alignment.
For example usecase of alignment, please check out align-advanced ... |
// Copyright (C) 2009-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... |
#include "RegularizedLinearProgram.h"
#include "LPRobust.h"
#include <math/VectorPrinter.h>
#include <math/linalgebra.h>
#include <iostream>
#include <errors.h>
using namespace Optimization;
using namespace std;
RegularizedLinearProgram::RegularizedLinearProgram()
:norm(Inf),verbose(0)
{}
bool RegularizedLinearProg... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2017 GDB ImageWatch contributors
* (github.com/csantosbh/gdb-imagewatch/)
*
* 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 r... |
#include "testconfig.hpp"
#include <vector>
void errexit(std::string s){
std::cerr<<s<<std::endl;
exit(1);
}
void TestConfig::parseCommandline(int argc, char** argv){
if(argc==1){
help();
errexit("");
}
if(tests.size()==0){
errexit("No test options provided. Use testConfig::addTest() to add.");
}
// Re... |
/*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
/*
u8g2_message.c
Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/)
Copyright (c) 2016, <EMAIL>
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 so... |
#include <stdio.h>
#include "agg_basics.h"
#include "agg_rendering_buffer.h"
#include "agg_rasterizer_scanline_aa.h"
#include "agg_scanline_u.h"
#include "agg_renderer_scanline.h"
#include "agg_blur.h"
#include "util/agg_color_conv.h"
#include "platform/agg_platform_support.h"
#include "ctrl/agg_slider_ctrl.h"
#include... |
#include "Precompiled.hpp"
#include "RenderSystem.hpp"
#include "MainGlobal.hpp"
#include "Common/Services.hpp"
#include "Graphics/Texture.hpp"
#include "Graphics/CoreRenderer.hpp"
#include "Game/Entity/EntitySystem.hpp"
#include "Game/Component/ComponentSystem.hpp"
#include "Game/Transform/TransformComponent.hpp"
#in... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
#include <stdio.h>
#include "spats.hpp"
#include "parse.hpp"
#include "mask.hpp"
#include "db.hpp"
bool
Spats::spats_handler(Fragment * r1, Fragment * r2, const char * handle, Counters * counters, Case * caseinfo)
{
//printf("R1: %s\nR2: %s\nH: %s\n", r1->string().c_str(), r2->string().c_str(), handle);
I... |
// Copyright 2015 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include <memory>
#include "fpdfsdk/javascript/ijs_context.h"
#include "fpdfs... |
#include <iostream>
#include "parallel.h"
#include "serial.h"
#include "util.h"
#include "omp.h"
/**
* @brief The paralle implementation of the **graph** algorithm.
* @param L: The sparse triangular matrix stored in the CSC format.
* @param b: The sparse vector stored in the CSC format.
* @param buffer: The buffer s... |
//========================================================================
//
// CachedFile.cc
//
// This file is licensed under the GPLv2 or later
//
// Copyright 2009 <NAME> <<EMAIL>>
// Copyright 2010, 2011 <NAME> <<EMAIL>>
// Copyright 2010, 2018 <NAME> <<EMAIL>>
// Copyright (C) 2013 <NAME> <<EMAIL>>
//
//========... |
// sktoolslib - common files for SK tools
// Copyright (C) 2012, 2020 - <NAME>
// 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 la... |
/******************************************************************************
** Copyright (c) 2017-2018, Intel Corporation **
** All rights reserved. **
** **
... |
/*--------------------------------------------------------------------------
Copyright (c) 2012-2013, The Linux Foundation. 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... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012-2013, Image Engine Design 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:
//
// ... |
/*
Copyright (C) 1999-2006 Id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
GtkRadiant is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... |
/*
* Copyright 2022 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/text/GrGlyphVector.h"
#include "include/private/chromium/SkChromeRemoteGlyphCache.h"
#include "src/core/SkReadBuffer.h"
#include "src/core/SkStrikeCache.h"
#... |
// **************************************************************************
// buffers.cpp - description
// -------------------
// begin : Mon Jun 19 2000
// coded by : <NAME>
// email : <EMAIL>
// Descriprtsion:
// This... |
//#include "NGM.h"
#include "Log.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include "PlatformSpecifics.h"
//#include "Config.h"
#include "NGMThreads.h"
#include <vector>
#include <string>
#include <ctime>
#include "zlib.h"
#include "Debug.h"
namespace __Log {
_Log * pInst... |
#include <iostream>
#include <vector>
using std::vector;
using std::pair;
using std::min;
const int INF = std::numeric_limits<int>::max();
const size_t root = 1;
size_t n, k, p;
vector<vector<int>> table;
vector<vector<size_t>> edges;
vector<vector<int>> costs;
vector<vector<vector<int>>> dp;
inline void add_edge... |
//////////////////////////////////////////////////
// Blabber [RosterItem.cpp]
//////////////////////////////////////////////////
#include "RosterItem.h"
#include "support/AppLocation.h"
#include <TranslationUtils.h>
#include "ui/HVIFUtil.h"
BBitmap *RosterItem::_kinda_online_icon = NULL;
BBitmap *RosterItem::_off... |
#include "stdh.h"
#include <Engine/Interface/UIInternalClasses.h>
#include "UIMsgBoxNumeric_only.h"
class CmdMsgNumericOnlyClose : public Command
{
public:
CmdMsgNumericOnlyClose() : m_pWnd(NULL), _pCmd(NULL) {}
void setData(CUIMsgBoxNumericOnly* pWnd, Command* pCmd = NULL)
{
m_pWnd = pWnd;
_pCmd = pCmd;
}
... |
/* g++ -Wall -w -o2 real_final_3.cpp cv.cpp system_management.cpp image_processing.cpp car_control.cpp car_lib.c -o real_final_3 `pkg-config --libs opencv` -lwiringPi */
/*
g++ -c system_management.cpp
g++ -c cv.cpp
g++ -c image_processing.cpp
g++ -c car_control.cpp
g++ -c car_lib.c
g++ -Wall -w -o2 -o real_final_3 rea... |
/*
* CAbout.cpp
*
* Created on: 04.08.2009
* Author: gerstrong
*/
#include "CAbout.h"
#include <base/utils/FindFile.h>
#include <base/CInput.h>
#include <base/GsLogging.h>
#include "fileio/CExeFile.h"
#include "graphics/GsGraphics.h"
#include <base/video/CVideoDriver.h>
#include "CVorticonMapLoader.h"
#incl... |
/*
* Copyright (C) 2011 True Blood <http://www.trueblood-servers.com/>
* By Asardial
*
* Copyright (C) 2011 - 2013 ArkCORE <http://www.arkania.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... |
#include <iostream>
#include <string>
#include <stdlib.h>
#include "smartcardpp.h"
#include "compat_getopt.h"
#include "compat_getpass.h"
void validateOnPinpad() {
PCSCManager mgr;
uint rdr, i, nr;
EstEidCard eid(mgr);
// Find first card
nr = mgr.getReaderCount();
for(i = 0; i < nr; i++) {
if(eid.isInReader(i... |
/**
* Copyright (c) 2017 <NAME>
* Licensed under the MIT License.
* See LICENSE file for more information.
*/
#include "cascadedShadowMaps.h"
#include "saiga/core/geometry/triangle_mesh_generator.h"
#include "saiga/core/imgui/imgui.h"
#include "saiga/core/math/random.h"
#include "saiga/opengl/shader/shaderLoader... |
//
// LeveledTexturedMesh.cpp
// G3M
//
// Created by <NAME> on 10/08/12.
//
//
#include "LeveledTexturedMesh.hpp"
#include "Vector3D.hpp"
#include "GL.hpp"
#include "TextureIDReference.hpp"
#include "GPUProgram.hpp"
#include "GPUProgramManager.hpp"
#include "Camera.hpp"
#include "GLState.hpp"
#include "ILogger.hp... |
/*=============================================================================
NifTK: A software platform for medical image computing.
Copyright (c) University College London (UCL). All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY o... |
/*
parser.cpp
Copyright (C) c650, 2017
*/
#include "./include/html.hpp"
#include "./include/helpers.hpp"
#include "./include/debug.hpp"
#include <vector>
#include <queue>
#include <unordered_map>
#include <stdexcept>
#include <regex>
#include <utility>
/* std::tolower */
#include <cctype>
/* std::transform */
#in... |
#include "tcp_sender.hh"
#include "tcp_config.hh"
#include <random>
// Dummy implementation of a TCP sender
template <typename... Targs>
void DUMMY_CODE(Targs &&... /* unused */) {}
using namespace std;
//! \param[in] capacity the capacity of the outgoing byte stream
//! \param[in] retx_timeout the initial amoun... |
//
// Copyright (c) 2017, 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 conditi... |
#include <msp430.h>
#include "header.h"
// Method to write to the testResult char in Flash, so initialise can detect: (i) that a first run test
// has been carried out and (ii) what were the results of that test. The code is as follows:
// result 0: good test
// result 1: possible bad battery?
// result 2: poss... |
// <NAME> V3
// <NAME> 2012-2017
/*
* SYSTEM_MODE:
* - AUTOMATIC: Automatically try to connect to Wi-Fi and the Particle Cloud and handle the cloud messages.
* - SEMI_AUTOMATIC: Manually connect to Wi-Fi and the Particle Cloud, but automatically handle the cloud messages.
* - MANUAL: Manually connect t... |
// Copyright (c) 2019, Solutions Paralint inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or wit... |
#include "Computerscare.hpp"
struct ComputerscareIso;
const int numKnobs = 16;
const int numToggles = 16;
const int numOutputs = 16;
struct ComputerscareIso : Module {
int counter = 0;
ComputerscareSVGPanel* panelRef;
enum ParamIds {
KNOB,
TOGGLES = KNOB + numKnobs,
NUM_PARAMS = TOGGLES + numToggles
};
... |
///Headers
#include <vector>
#include <cstdio>
#include <cmath>
#include <iostream>
/// Terraub Functions
double * getFieldSquareTerrain(int x0,int y0, int x1, int y1, unsigned int iterations);
double displace(unsigned int iterations,int x, int y);
double getMaxDeviation(unsigned int iterations);
double PRH(unsigned i... |
/* <stig/indy/slave_test.cc>
Test for <stig/indy/manager.h>.
Copyright 2010-2014 Stig LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENS... |
/* Software SPAMS v2.3 - Copyright 2009-2011 <NAME>
*
* This file is part of SPAMS.
*
* SPAMS 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 ... |
#include "mouse_mover.h"
void MouseMover::load_all_patterns() {
// for all weapons, load in their saved "patterns"
for (auto &weapon_name : weapon_names) {
// for development purposes: read .txt files from hardcoded patterns/ directory
loaded_patterns.insert({ weapon_name, load_pattern_from_file("patterns/" + we... |
/*
Modification of the Shader class from: https://learnopengl.com
Originally authored by <NAME>: https://twitter.com/JoeyDeVriez
Licensed under the terms of the CC BY-NC 4.0 license as published by Creative Commons: https://creativecommons.org/licenses/by/4.0/legalcode
*/
#include "Shader.h"
using namespace std;
Sha... |
// Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
#include "gtest/gtest.h"
#include "utils/concord_utils.hpp"
#include "utils/json.hpp"
#include "utils/rlp.hpp"
using namespace std;
using json = nlohmann::json;
using boost::multiprecision::uint256_t;
using concord::u... |
#include <iostream>
#include <cstdlib> // for abort
#include "specex_brent.h"
#define CGOLD 0.3819660
#define ZEPS 1.e-60
/*
Here ITMAX is the maximum allowed number of iterations; CGOLD is the golden ratio; ZEPS is
a small number that protects against trying to achieve fractional accuracy for a minimum that
happens ... |
#include <algorithm>
#include <thread>
#include "build/kmer_index/build.hpp"
#include "build/kmer_index/kmers.hpp"
#include "build/kmer_index/load.hpp"
#include "genotype/quasimap/search/BWT_search.hpp"
#include "genotype/quasimap/search/vBWT_jump.hpp"
using namespace gram;
/**
* Variant aware backward search on th... |
#include "mkl_unsym.h"
#include "factory.h"
static Register<pipenetwork::linear_system::Solver,
pipenetwork::linear_system::Mkl_unsym>
registry("mkl_pardiso");
pipenetwork::linear_system::Mkl_unsym::Mkl_unsym() : Solver() {
// configure pardiso
/* Auxiliary variables. */
char* var;
/* ----... |
#include <cstdlib>
#include <spot/gfx/graphics.h>
#define NODE( index ) ( gfx.models.get_node( index ) )
namespace spot::gfx
{
struct Colors
{
Handle<Material> black;
Handle<Material> white;
Handle<Material> red;
Handle<Material> green;
Handle<Material> blue;
Handle<Material> yellow;
};
Colors create_colors(... |
/**
* 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 odeGeom.cxx
* @author ... |
// clang-format off
#include<bits/stdc++.h>
// g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define ... |
#include <bits/stdc++.h>
using namespace std;
typedef double DB;
const int maxn = 51, maxm = 1251, maxe = 1562501;
const DB eps = 1e-9;
inline int sgn(DB x) {
return (x > eps) - (x < -eps);
}
inline DB sqr(DB x) {
return x * x;
}
int n, m, etot, dsu[maxn], qtot, que[maxn], stim, vis[maxm];
int dsu_find(int x) {
ret... |
/* ====================================================================
* The Vovida Software License, Version 1.0
*
* Copyright (c) 2000 Vovida Networks, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... |
// SPDX-License-Identifier: Apache-2.0
/**
* Copyright (C) 2021 <NAME> <<EMAIL>>
*
* @file unittest_interpreter.cpp
* @date 02 April 2021
* @brief interpreter test
* @see https://github.com/nnstreamer/nntrainer
* @author <NAME> <<EMAIL>>
* @bug No known bugs except for NYI items
*/
#include <functional>
#incl... |
// 最小的k个数
// 题目:输入n个整数,找出其中最小的k个数。例如输入4、5、1、6、2、7、3、8
// 这8个数字,则最小的4个数字是1、2、3、4。
#include <iostream>
#include <set>
#include <Iterator>
#include <cstdlib>
#include <vector>
using namespace std;
typedef multiset<int, std::greater<int>> intSet;
typedef multiset<int, std::greater<int>>::iterator setIterator;
int RandomI... |
/*
the vast starry sky,
bright for those who chase the light.
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define mk make_pair
const int inf=(int)1e9;
const ll INF=(ll)5e18;
const int MOD=998244353;
int _abs(int x){return x<0 ? -x : x;}
int add(int x,int y){x+=y; ret... |
#include <iostream>
using std::endl;
using std::cout;
// This is a definition - it allocates storage, it is "the real object".
// Because it is at global scope it is initialized to 0.
int a_definition;
// This is a declaration - it makes the name known to the program.
// This will typically appear in a header file, ... |
#include <fstream>
#include <iostream>
#include "WhitakerSMoney.h"
// ---- Helper Functions -----
namespace {
// Returns the dollar value of an amount of cents
long dollarsFromCents(long cents) {
return cents / 100;
}
// Returns the leftover cents value of an amount of cents when the dollars are removed
... |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
#include <thread>
#include "../utils.h"
#include "../../kv_store/include/read_response_selector.h"
#include "integer_counter.h"
#define NUM_SESSIONS 2
#define NUM_OPS 3
app_co... |
#include "Board.h"
std::string Board::get_save_path() {
char* path = SDL_GetPrefPath(COMP_NAME, GAME_NAME);
std::string complete_path {path};
complete_path = complete_path + "save_game";
return complete_path;
}
bool Board::save(Options &opts) {
std::string complete_path = get_save_path();
st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.