text stringlengths 3.08k 12.5k |
|---|
// Distributed under the MIT License.
// See LICENSE.txt for details.
/// \file
/// Defines class SegmentId.
#pragma once
#include <cstddef>
#include <iosfwd>
#include <pup.h>
#include "Domain/Structure/Side.hpp"
#include "Utilities/ConstantExpressions.hpp"
#include "Utilities/ErrorHandling/Assert.hpp"
/*!
* \in... |
#pragma once
#include <protobuf/referee.pb.h>
#include <protobuf/LogFrame.pb.h>
#include "TeamInfo.hpp"
#include "GameState.hpp"
#include "SystemState.hpp"
#include <Utils.hpp>
#include <QThread>
#include <QMutex>
#include <QTime>
#include <vector>
#include <stdint.h>
class QUdpSocket;
namespace NewRefereeModuleEnu... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, <NAME>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
... |
#include <vector>
#include <string>
#include <iostream>
using namespace std;
class Slot
{
public:
int row;
int col;
bool across;
Slot( int newRow, int newCol, bool newAcross )
: row( newRow ), col( newCol ), across( newAcross )
{
};
};
... |
#include <dmzEventCallbackMasks.h>
#include <dmzEventModule.h>
#include <dmzEventObserverUtil.h>
#include <dmzRuntimeLog.h>
#include <dmzRuntimeConfigToTypesBase.h>
#include <dmzRuntimeDefinitions.h>
#include <dmzRuntimeEventType.h>
#include <dmzTypesHashTableStringTemplate.h>
#include <dmzTypesHashTableHandleTemplate.... |
// Copyright <NAME> 2021.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
#include "ttauri/GUI/gui_system.hpp"
#include "ttauri/widgets/widget.hpp"
#include "ttauri/crt.hpp"
#include "ttauri/log.hpp"
// Every wid... |
#include "Globals.h"
#include "Application.h"
#include "ModuleInput.h"
#include"Importer.h"
#include "imgui.h"
#include "imgui_impl_sdl.h"
#include "imgui_impl_opengl3.h"
#include "FileDialog.h"
#define MAX_KEYS 300
ModuleInput::ModuleInput(Application* app, bool startEnabled) : Module(app, startEnabled)
{
keyboard ... |
/*
* Copyright (C) 2004-2021 Intel Corporation.
* SPDX-License-Identifier: MIT
*/
/*! @file
* This file contains a static and dynamic instruction length mix profiler
*/
#include "pin.H"
#include <list>
#include <iostream>
#include <fstream>
#include <stdlib.h>
using std::cerr;
using std::endl;
using std::list;
... |
//---------------------------------------------------------------------------
// Sword3 Engine (c) 1999-2000 by Kingsoft
//
// File: KMp3Quant.cpp
// Desc: MP3 Decoder originally Copyright (C) 1995-1997 Xing Technology
// Corp. http://www.xingtech.com
// Layer III dequant
//--------------------------------... |
/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#include <pthr... |
/*=========================================================================
Program: ParaView
Module: vtkVRActiveObjectManipulationStyle.cxx
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under t... |
// Copyright (c) 2018-2019 The Unit-e developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <wallet/rpcadmin.h>
#include <key_io.h>
#include <consensus/validation.h>
#include <esperanza/admincommand.h>
#include <n... |
#include <Arduino.h>
#include <TensorFlowLite.h>
#include "main_functions.h"
#include "audio_provider.h"
#include "command_responder.h"
#include "feature_provider.h"
#include "micro_features_micro_model_settings.h"
#include "model.h"
#include "recognize_commands.h"
#include "tensorflow/lite/micro/micro_error_reporte... |
/*
* This file is part of the Dronecode Camera Manager
*
* Copyright (C) 2017 Intel 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://... |
//
// Copyright 2021 the gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
/* Author: Kushashwa, http://www.github.com/krshrimali */
#include <torch/torch.h>
/* Sample code for training a FCN on MNIST dataset using PyTorch C++ API */
/* This code uses VGG-16 Layer Network */
struct Net: torch::nn::Module {
// VGG-16 Layer
// conv1_1 - conv1_2 - pool 1 - conv2_1 - conv2_2 - pool 2 -... |
/**********
Copyright (c) 2018, Xilinx, 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:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the follo... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "linux_support.h"
#include "tier0/threadtools.h" // For ThreadInMainThread()
#include "tier1/strtools.h"
char s... |
//***************************************************************************
//* Copyright (c) 2019 University of Warwick
//* All Rights Reserved
//* See file LICENSE for details.
//***************************************************************************
#include "bin_refinement.hpp"
#include "toolchain/subgraph_u... |
/*
* Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
*
* 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 req... |
/* Aliquot integer power abundance calculator.
*
* This program scans an exponent range for a given base for an aliquot sum
* which can be determined to be abundant based on its factors up to 10^4. It
* will output any such exponents, along with the factors that establish
* abundance, to a log file.
*
* (C) <NAM... |
#include <qcc/platform.h>
#include <signal.h>
#include <stdio.h>
#include <vector>
#include <qcc/Mutex.h>
#include <qcc/String.h>
#include <alljoyn/AllJoynStd.h>
#include <alljoyn/BusAttachment.h>
#include <alljoyn/BusObject.h>
#include <alljoyn/Init.h>
#include <alljoyn/MsgArg.h>
#include <alljoyn/version.h>
#incl... |
/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: <NAME> <<EMAIL>>
*
* 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 "CHtmlRender.h"
typedef std::wstring wstring;
wstring CHtmlRender::head[6] = {L"<h1>",L"<h2>", L"<h3>", L"<h4>", L"<h5>", L"<h6>"};
wstring CHtmlRender::_head[6] = { L"</h1>", L"</h2>", L"</h3>", L"</h4>", L"</h5>", L"</h6>" };
wstring CHtmlRender::li = L"<li>", CHtmlRender::_li = L"</li>",
CHtmlRender::ul... |
#include "Walk.h"
#include "DLA.h"
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <gsl/gsl_rng.h>
#include <iostream>
bool DLA::closeToSeed(Vector<2> point)
{
// Check if a seed is close to another seed
for (int i = 0; i < seeds.size(); ++i) {
if ((seeds.at(i) - point).getMagnitu... |
// This file is distributed under the BSD 3-Clause License. See LICENSE for details.
//
// Created by birdeclipse on 5/23/18.
#include "lgraph.hpp"
#include "pass_abc.hpp"
void Pass_abc::write_src_info(const LGraph *g, const index_offset &inp, std::ofstream &fs) {
auto src_idx = inp.idx;
auto src_type = g->nod... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkGeoAssignCoordinates.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distribu... |
/**
* Given an array S of n integers,
* are there elements a, b, c in S such that a + b + c = 0?
* Find all unique triplets in the array which gives the sum of zero.
* For example, given array S = [-1, 0, 1, 2, -1, -4],
* A solution set is:
* [
* [-1, 0, 1],
* [-1, -1, 2]
* ]
*/
/**
* 以下代码思考有欠缺,有漏解情况
* 我的思... |
//===- DbiModuleDescriptorBuilder.cpp - PDB Mod Info Creation ---*- C++ -*-===//
//
// 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) 2015 <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:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following di... |
#include <stack>
#include "../Generator/Code/World/World.h"
#include "../noise/Simplex/simplex.h"
using namespace generator;
using namespace landmass;
enum class WaterType { land, sea, lake, river};
enum class Biome { sea, lake, beach, land};
Attribute height {32, AttributeType::Vertex};
Attribute moisture {32, Attr... |
/* ========================================
ID: mathema6
TASK:
LANG: C++14
* File Name :
* Creation Date :
* Last Modified :
* Created By : <NAME> <<EMAIL>>
* URL :
* Points/Time :
* 319.61 (v1)
* (v2)
*
* Total/ETA : 500
* Status :
* AC
* AC
*
==================... |
#include "GUIFigures.h"
#include "GUIPhysBasic.h"
//////////////////////////////////////////////////////
//**CCButton
//////////////////////////////////////////////////////
FButton::FButton(BasicInterface* super)
:ButtonInterface(super)
{
DeclareElementName(FButton, this->EName);
ButtonSettings BS;
BS.IdleColor = ... |
/*
|_______________________|
|_______________________| ChartJS C++ Examples
|_______________________|
|_______________________| https://github.com/efernea/chartjs-cpp
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
SPDX-License-Identifier: MIT
Copyright (c) 2020-2021 <NAME> <http://mirafx.com>.... |
#include "world.h"
#include "../core/console.h"
#include "../core/content.h"
#include "../mathutils.h"
#include <util/log.h>
#include "cell.h"
#include "food.h"
#include <sstream>
NeuralNetwork* World::m_neuralNetwork = 0;
uint32 World::m_weightCount = 0;
// 8192.0f
World::World() :
m_radius(2048.0f),
m_sp... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
#include "hostpolicy_init.h"
#include <trace.h>
#include "bundle/runner.h"
void make_palstr_arr(size_t argc, const pal::char_t** argv, std::vector<pal::string_t>* out)
{
out->re... |
// PROBLEM STATEMENT: Problem: Given two strings - a pattern and a text, determine if the pattern appears
// in the text and if it does, enumerate all its occurrences in O(|n|+|m|) time.
// n = text length, m = pattern length.
/**********************************... |
//
// Created by marvinle on 2019/2/26 8:08 PM.
//
#include "../include/Epoll.h"
#include "../include/Util.h"
#include <iostream>
#include <vector>
#include <sys/epoll.h>
#include <cstdio>
std::unordered_map<int, std::shared_ptr<HttpData>> Epoll::httpDataMap;
const int Epoll::MAX_EVENTS = 10000;
epoll_event *Epoll:... |
#include <iostream>
#include <string>
using namespace std;
enum UserType {ADMIN = 1, NORMAL};
class ShoppingCart {
};
class UserAccount {
string userName;
string password;
//int userType; //1 is admin, 2 is normal user
//string type; //"admin", "normal", "ADMIN", "Admin"
UserType type;
};
class Order {
};
e... |
#pragma once
#include <array>
#include <vector>
#include <numbers>
#include <cmath>
#include "../Memory.h"
#include "../SDK/GlobalVars.h"
#include "../ConfigStructs.h"
#include "imgui/imgui.h"
class Entity;
struct SurfaceData;
struct Trace;
struct Vector;
struct WeaponInfo;
struct Color4;
struct ... |
// $Id$
//
// Copyright (c) 2002-2008 <NAME> and rational discovery llc
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <iostream>
... |
/*
* Copyright (c) 2003-2005 The Regents of The University of Michigan
* 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
* not... |
/*
* Copyright (c) 2016-2017 <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, merg... |
/*
NitroHax -- Cheat tool for the Nintendo DS
Copyright (C) 2008 Michael "Chishm" Chisholm
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 3 of the License, or
... |
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
/*======
This file is part of PerconaFT.
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
PerconaFT is free software: you can redistribute it and/or modif... |
/*
The main file of the MSA indexing tool, this module is created
mainly to intake the command line options.
*/
#include <iostream>
#include <string>
#include <cstring>
#include "index.h"
#include "extract.h"
#include "tabulate_nucleotides.h"
typedef unsigned long long int __uint64;
void print_help() {
std::cout <... |
/*------------------------------------------------------------------------------------------*\
This file contains material supporting chapter 2 of the book:
OpenCV3 Computer Vision Application Programming Cookbook
Third Edition
by <NAME>, Packt Publishing, 2016.
This program is free software; permission is hereby gran... |
#include <Arduino.h>
#include <SPI.h>
#include <WiFi.h>
#include "BLEDevice.h"
#include "BLEServer.h"
#include "BLEUUID.h"
#include "nvs_flash.h"
#include "nvs.h"
#include "Preferences.h"
#include "knock.h"
#define PREF_WIFI_SSID "WIFI_SSID"
#define PREF_WIFI_PASS "<PASSWORD>"
// 0x1824 is the GATT servic... |
#include "Model_2D_Ising.hpp"
#include <stdio.h>
#include <string.h>
#include "../randomDistribution/mersenne_twister.hpp"
// constructor
State::State(){
// initialization of paramters[]
int i;
for(i=0;i<N;i++){
State::parameters[i]=1;
}
}
// return data header
char* StateHeader(){
// generate header
... |
//************************************************************************
// Copyright 2021 Massachusetts Institute of Technology
// SPDX License Identifier: BSD-2-Clause
//
// File Name:
// Program: Common Evaluation Platform (CEP)
// Description:
// Notes:
//
//****************************... |
#include "Crypto/Hash.hpp"
#include <functional>
#include <QMap>
#include <QLatin1String>
#include <QCryptographicHash>
#include <QString>
#include <QVector>
#include <QByteArray>
#include <QRandomGenerator>
static void setBit(unsigned long& num, unsigned long bit) { num |= (1 << bit); }
static int getBit(unsigned l... |
// COLMAP - Structure-from-Motion and Multi-View Stereo.
// Copyright (C) 2017 <NAME> <jsch at inf.ethz.ch>
//
// 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 3 of the License... |
/***************************************************************
*
* Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you
* may not use this file except in compliance with the License. Y... |
#include <string>
#include <memory>
#include "external/json/json.h"
#include "entity.h"
#include "entitymanager.h"
#include "entityeditor.h"
#include "window.h"
#include "input.h"
#include "timer.h"
#include "objectbutton.h"
#include "mapeditor.h"
#include "tilebar.h"
#include "tileset.h"
#include "editorstate.h"
#incl... |
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <iostream>
#include <time.h> /* time */
#include <conio.h>
#include <cctype> // uppercase
#include <stdlib.h>// para limpar a variavel /* srand, rand */
#include <string> // atribuir variavel do tipo string
#include<bits/stdc++.h> // usar a função tran... |
#define BOOST_GEOMETRY_NO_ROBUSTNESS
#include "geom.h"
#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/index/rtree.hpp>
#include "geometry/correct.hpp"
#include <boost/range/adaptor/transformed.hpp>
#include <boost/range/irange.hpp>
typedef boost::geometry::model::segment<Point> simplify_s... |
/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
#include "stdafx.h"
#include <Windows.h>
// Internal Includes
#include <osvr/PluginKit/PluginKit.h>
#include <osvr/PluginKit/TrackerInterfaceC.h>
// Standard includes
#include <cmath>
#include <iostream>
#include <fstream>
#include "TrackerKudanGeneric.h"
/// Add your Kudan license key here
const std::string kLic... |
//
// Tiled image code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by <NAME> and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//... |
/************************************************************
*
* OPEN TRANSACTIONS
*
* Financial Cryptography and Digital Cash
* Library, Protocol, API, Server, CLI, GUI
*
* -- Anonymous Numbered Accounts.
* -- Untraceable Digital Cash.
* -- Triple-Signed Receipts... |
#include "solid/frame/manager.hpp"
#include "solid/frame/scheduler.hpp"
#include "solid/frame/service.hpp"
#include "solid/frame/aio/aioresolver.hpp"
#include "solid/frame/mprpc/mprpcconfiguration.hpp"
#include "solid/frame/mprpc/mprpcservice.hpp"
#include "solid/utility/workpool.hpp"
#include "mprpc_file_messages.... |
#pragma once
enum struct TileSuperType
{
TILE_SUPER_TYPE_UNDEFINED = -1,
TILE_SUPER_TYPE_GROUND = 0,
TILE_SUPER_TYPE_WATER = 1,
TILE_SUPER_TYPE_AIR = 2
};
// Tile types for the C++ code.
enum struct TileType
{
TILE_TYPE_UNDEFINED = -1,
TILE_TYPE_FIRST = 0,
TILE_TYPE_FIELD = 0,
TILE_TYPE_SCRUB ... |
//=== OSAtomicChecker.cpp - OSAtomic functions evaluator --------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include <M5StickC.h>
#include <WiFi.h>
#include <HTTPClient.h>
#define UIBUTTONS 4
#define MAX_UIBUTTON_TEXT_SIZE 20
#define UIBUTTON_SIZE (TFT_HEIGHT / UIBUTTONS)
#define MAX_POINTS 3
#define NUMBER_SHUTTERS 3
#define MAX_SHUTTER_NAME_SIZE 15
#define MAX_SHUTTER_CMD_SIZE 20
#define MAX_URL_SIZE 100
typedef struc... |
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <torch/extension.h>
namespace {
struct LocalState {
// TLS state that changes operators
c10::impl::LocalDispatchKeySet dispatch_modifier;
bool grad_mode_enabled;
at::DispatchKeySet apply(at::DispatchKeySet ks) const {
return (ks | dispatch_modifier.in... |
#include <fstream>
#include <boost/timer.hpp>
#include "acrbslam/config.h"
#include "acrbslam/cloudmap.h"
#include "acrbslam/converter.h"
#include "acrbslam/wifi.h"
#include "acrbslam/data.h"
#include "acrbslam/viz.h"
#include "acrbslam/octomap_mapping.h"
acrbslam::Data data;
namespace acrbslam
{
void *wifi_recv(vo... |
/****************************************************************************
*
* Copyright 2017 Samsung Electronics 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... |
#include "output.hpp"
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <string>
#include <vector>
////////////////////////////
int getAbsoluteX(int x);
int getAbsoluteY(int y);
int getAbsoluteCoordinate(int value, int console, int track);
int coordinatesOutOfBo... |
// MIT License
//
// Copyright (c) 2020, The Regents of the University of California,
// through Lawrence Berkeley National Laboratory (subject to receipt of any
// required approvals from the U.S. Dept. of Energy). All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy... |
/* tcp_acceptor_test+http.cc
<NAME>, September 2015
Copyright (c) 2015 mldb.ai inc. All rights reserved.
This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved.
Unit test for TcpAcceptor and HttpSocketHandler
*/
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include <iostream>
... |
//-*****************************************************************************
//
// Copyright (c) 2009-2012,
// Sony Pictures Imageworks Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with ... |
/* b03902082 江懿友 */
#include <cstdlib>
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <cstring>
#include <cstdio>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/select.h>
#include <fcntl... |
#include <stdio.h>
#include "ali_api_core.h"
#include "ali_string_utils.h"
#include "ali_rkvstore.h"
#include "json/value.h"
#include "json/reader.h"
using namespace aliyun;
namespace {
void Json2Type(const Json::Value& value, std::string* item);
void Json2Type(const Json::Value& value, RkvstoreCreateInstance... |
/*
* Copyright (c) 2010, Dust Networks, Inc.
*/
#include "BoostLog.h"
#include <iomanip>
#include <sstream>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
const int LOG_TIMEOUT = 1;
// note: we intentionally pass the string parameter by v... |
#include<bits/stdc++.h>
using namespace std;
#define pf(x) printf("%d",x)
#define pfd(x,y) printf("%d %d",x,y)
#define pfl(x) printf("%ld",x)
#define pfll(x) printf("%lld",x)
#define pfllu(x)
#define nl printf("\n")
#define cs(x) printf("Case %d: ",x)
#define csn(x) printf("Case %d:\n",x)
#define all(x) x... |
// 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 writing, software
// distributed... |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/thumbnails/thumbnail_scheduler_impl.h"
#include <algorithm>
// static
constexpr int ThumbnailSchedulerImpl::kMaxTotalCaptur... |
////////////////////////////////////////////////////////////////////////////////
// Filename: geometryinterface.cpp
////////////////////////////////////////////////////////////////////////////////
#include "pch.h"
#include "geometryinterface.h"
GeometryInterface::BufferType::BufferType(ID3D12Device *d... |
#include "..\Inc\CRRenderPassManager.h"
RenderPassManager* RenderPassManager::ins = nullptr;
RenderPassManager::RenderPassManager()
{
}
RenderPassManager::~RenderPassManager()
{
}
RenderPassManager * RenderPassManager::Instance()
{
if (ins == nullptr)
ins = new RenderPassManager();
return ins;
}
void RenderPa... |
#include "unit.h"
#include "game.h"
#include "tinystrat.h"
#include "data.h"
extern "C" {
#include "lib/mod/mod32.h"
}
static void combat_face_frame(object *face, uint8_t anim_id, uint8_t attacked)
{
// set combat faces
static const uint8_t face_anims[][2][2] = { // attacking, attacked ; 2 frames
{{2,... |
#include <emp-tool/emp-tool.h>
#include "emp-tool/utils/hash.h"
#include "emp-sh2pc/emp-sh2pc.h"
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <stdio.h>
#include <ctype.h>
#include <vector>
#include "hmac.h"
#include "hmac_optimized.h"
#include <sstream>
#include <string>
#include <iostream>
using name... |
#include <cctype>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <string>
#include <string_view>
#include <vector>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <optional>
#include "pcap.hpp"
using namespace std;
inline ... |
#include <iostream>
struct capacity_overflow{};
template<typename t_data>
class Grid {
private:
Grid *memory_;
size_t x_size_, y_size_, length_;
t_data value_;
size_t get_index(size_t x, size_t y) const{
return y * x_size_ + x;
};
void clear(){
value_ = get_average();
... |
#include <memory>
#include <iostream>
#include <stdexcept>
#include <unordered_map>
#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include "renderer.hpp"
#include "util.hpp"
static const std::unordered_map<GLenum, std::string> oglErrorMap {
{GL_INVALID_ENUM, "GL_INVALID_ENUM"},... |
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <tuple>
#in... |
/******************************************************************************
** Copyright (C) 1999 by CEA
*******************************************************************************
**
** UNIT
**
** Version: 1.0
**
** Author: <NAME>
**
** Date: 03/02/00
**
** File: im_thres... |
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistri... |
/*
@file: control_base.cpp
@author: pdsherman
@date: April. 2021
@brief: control base object
*/
#include <pendulum/LoggingData.h>
#include <pendulum/State.h>
#include <pendulum/Control.h>
#include <plant/ExampleDigital.hpp>
#include <libs/control/Pid.hpp>
#include <libs/control/DigitalPid.hpp>
#includ... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2013-2014 <NAME> - http://www.igorski.nl
*
* 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 limitati... |
#include <gtest/gtest.h>
#include <platform.h>
#include <reach/reach.h>
#include <type/subtype.h>
#include "util.h"
#include <memory>
#define TEST_COMPILE(src, pass) DO(test_compile(src, pass))
class ReachTest : public PassTest
{};
TEST_F(ReachTest, IsectHasSubtypes)
{
const char* src =
"trait TA\n"
... |
/**
* This file is part of the LePi Project:
* https://github.com/cosmac/LePi
*
* MIT License
*
* Copyright (c) 2017 <NAME>
*
* 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... |
#include <algorithm>
#include <iostream>
#include <sstream>
#include <vector>
#include <cstdio>
using namespace std;
struct ride
{
int start_i, start_j, end_i, end_j;
int start_t, end_t;
} ;
struct solution
{
vector<int> ok_ride; // 0 = not solved, 1 = no bonus, 2 = bonus
vector<vector<int> > sol;
};... |
#define _USE_MATH_DEFINES
#include <iostream>
#include <fstream>
#include <complex>
#include <string>
#include <vector>
#include <cmath>
#include <chrono>
#include <mpi.h>
const std::complex<double> I (0,1);
void write (std::vector< std::vector< std::complex<double>> > storage, int rank)
{
std::string fnam... |
#include "gesture_detection.hpp"
#include "osp_socket.hpp"
bool TapDetection::isTap() {
/*checks current magintude values for a tap*/
if (curr_tot_acc > acc_thr && curr_d_tot_acc_dt > da_dt_thr) {
return true;
}
return false;
}
TapDetection::TapDetection(int fs, float acc_thr, float da_dt_thr,... |
/* Split and merge segmentation algorithm implementation.
* @file
* @date 2018-09-18
* @author Anonymous
*/
#include "cvlib.hpp"
#define SIGMA_SZ 3
#define THETA_SZ 2
namespace
{
struct descriptor : public std::vector<double>
{
using std::vector<double>::vector;
descriptor operator-(const... |
/****************************************************************************
Copyright (c) 2008-2020 <NAME> (<NAME>)
github: https://github.com/kevinwu1024/ExtremeCopy
site: http://www.easersoft.com
Licensed under the Apache License, Version 2.0 License (the "License"); you may not use this file except
in complianc... |
/*********************************************************************************
* This file is part of CUTE.
*
* Copyright (c) 2013-2018 <NAME>, IFS
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
... |
//
// ofxDetectAndTrack.cpp
// sample_detect_then_track
//
// Created by <NAME> on 2021/06/15.
//
#include "ofxDetectAndTrack.h"
ofxDetectAndTrack::ofxDetectAndTrack()
{
}
ofxDetectAndTrack::~ofxDetectAndTrack()
{
}
void ofxDetectAndTrack::setup(string _tracking_label,
flo... |
// $Id: server.cpp 91825 2010-09-17 09:10:22Z johnnyw $
#include "Payload_Receiver.h"
#include "ace/Get_Opt.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_sys_time.h"
namespace
{
// defaults only
const ACE_TCHAR *ior_output_file = ACE_TEXT("test.ior");
int expected = 200;
int maybe_lost = 400;
}
int
p... |
#include "supervisor.h"
#include "events.h"
#include "selfplay.h"
#include "scheduler.h"
#include "selfplaymanager.h"
#include "puct/evaluator.h"
#include <statemachine/basestate.h>
#include <statemachine/statemachine.h>
#include <k273/logging.h>
#include <k273/strutils.h>
#include <k273/exception.h>
#include <unis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.