text stringlengths 3.08k 12.5k |
|---|
/*
D - Teleporter
https://atcoder.jp/contests/abc167/tasks/abc167_d
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll>... |
#include "MyDrawableNodule.h"
#include "QPainter"
#include "mitkImage.h"
//itk&&vtk headers
#include "mitkImageVtkReadAccessor.h"
#include "mitkImageVtkWriteAccessor.h"
#include "mitkImagePixelReadAccessor.h"
#include "mitkImagePixelWriteAccessor.h"
CMyDrawableNodule::CMyDrawableNodule()
{
m_vNoduleInfo.... |
#include "includes/userspace_io.h"
static unsigned char ptoken_aes_key[16] = {"\0"};
void set_ptoken_aes_key(unsigned char* key) {
memcpy(ptoken_aes_key, key, sizeof(ptoken_aes_key));
}
static citadel_response_t core_handle_request(int32_t pid, struct citadel_op_request *request, void *metadata, bool translate... |
#define GL_GLEXT_PROTOTYPES 1
#include "GL/gl.h"
#include "GL/glext.h"
#include "wx/glcanvas.h"
#include <gtk-3.0/gtk/gtk.h>
#include <gtk-3.0/gdk/gdk.h>
#include "wx/gtk/glcanvas.h"
wxIMPLEMENT_CLASS(wxGLContext, wxObject);
wxGLContext::wxGLContext(wxGLCanvas* win, const wxGLContext* other, const wxGLContextAttrs... |
#include "CellCountHistory.h"
#include <Gamebuino-Meta.h>
#undef min
#undef max
#include <array>
#include "LifeCa.h"
class CellCounter {
std::array<uint8_t, 256> lookup_;
public:
CellCounter();
int countCells(const LifeCa& ca) const;
};
// Generated via generate_lookups.py
constexpr uint16_t y_lookup[H] = ... |
#include<stdio.h>
#include<stdlib.h>
#include<string>
#include<vector>
#include<iostream>
#include<fstream>
using namespace std;
enum lexType
{
UNKOWNSY,// 0
BEGINSY,// 1
ENDSY,// 2
FORSY,// 3
IFSY,// 4
THENSY,// 5
ELSESY,// 6
IDENTSY,// 7
INTSY,// 8
COLONSY,// 9
PLUSSY,// 10
STARSY,// 11
COMMASY,// 12... |
//
// DnaGenOptions.cpp
// Corrector Tester
//
// Created by <NAME> on 10/12/2016.
//
//
#include "DnaGenOptions.hpp"
DnaGenOptions::DnaGenOptions(int argc, const char * argv[]) {
po::options_description optionDescription("Options");
//define options
optionDescription.add_options()
("help", "P... |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2017 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 <pow.h>
#include <arith_uint256.h>
#include <chain.h>
#include <primitives/block.... |
#include <ENCRYPTO_utils/crypto/crypto.h>
#include <ENCRYPTO_utils/parse_options.h>
#include "../examples.h"
#include "common/seal_interpreter.h"
using namespace seal;
#include "argparse.hpp"
#include <cassert>
enum mode {
fhe
};
mode hash_mode(std::string m) {
if (m == "mpc") return fhe;
throw std::inval... |
#include "Server.h"
static pthread_t tid[MAX_NUM];
static int fd[MAX_NUM];
static sockaddr_in sock[MAX_NUM];
static string clientname[MAX_NUM];
static pthread_mutex_t mv = PTHREAD_MUTEX_INITIALIZER;
static sockaddr_in serveraddr;
static int connect_type;
static int serverfd;
static MyDataBase mdb;
static string tablen... |
/***************************************************************************
* Copyright (C) 2008 by <NAME> *
* <EMAIL> *
* *
* This program is free software; yo... |
#include <alia/html/bootstrap.hpp>
#include <alia/html/document.hpp>
#include <alia/html/dom.hpp>
#include <alia/html/fetch.hpp>
#include <alia/html/routing.hpp>
#include <alia/html/system.hpp>
#include <alia/html/widgets.hpp>
#include <sstream>
#include "../demolib/utilities.hpp"
/// [namespace]
using namespace alia... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Node {
char letter;
unsigned int weight;
struct Node *left;
struct Node *right;
} Node, *Tree;
typedef char *Code;
void InputAndSave(const char *filename) {
// 新建 / 打开文件
FILE *fp = fopen(filename, "w");
printf("Plea... |
// CompactOSDemo.cpp: 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
#include <string>
std::wstring GetMessageByID(DWORD MessageID)
{
std::wstring MessageString;
LPWSTR pBuffer = nullptr;
if (FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
nullpt... |
#include "conv.hpp"
#include "util.hpp"
#include <iostream>
#include <string.h>
#include <math.h>
// From Caffe
void conv_naive(float *input, float *weight, float *output, float *bias,
int nb, int ic, int ih, int iw, int oc, int oh, int ow, int fh, int fw, int s, int p)
{
float *in = (float*)malloc(... |
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
#include "PvlObject.h"
#include "IException.h"
#include <QString>
#include <iostream>
#include <sstream>
#include <fstream>
#include <stdlib.h>
#include <gtest/gtest.h>
#include <nlohmann/json.hpp>
using json = nlohmann::json;
using namespace Isis;
using namespace std;
TEST(PvlObject, HasKeyword){
PvlObject ... |
/*
Consider a game where there are n children (numbered 1,2,…,n) in a circle.
During the game, repeatedly k children are skipped and one child is removed from the circle.
In which order will the children be removed?
INPUT:
The only input line has an integer n and k.
OUTPUT:
Print n integers: the removal order.
CONS... |
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance w... |
// natRuntime.cc - Implementation of native side of Runtime class.
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
#include <... |
/*
* gi2bgi.cpp
* BloodyKart GI2BGI Converter
*
* Created by tcpp on 09/11/28.
* Copyright 2009 tcpp. All rights reserved.
*
*/
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <stdint.h>
using namespace std;
static inline float rsqrtf( float number )
{
union {
float f;... |
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
#include "include/game.h"
#include <QDebug>
#include <sstream>
#include <stdlib.h>
#include <QProcess>
#include <QString>
#include <QByteArray>
void* start_server(void* parent) {
system("python3 '/mnt/e/Workshops/ROV/Crash Course/Snake/server/server.py'");
}
Game::Game(QWidget *parent)
{
// init connection
... |
#include "MpcEvaluator.h"
namespace {
// Local Constants
// -----------------------------------------------------------------------------
// Cost multiplier to penalize a high difference between subsequent delta
// values.
const auto kDeltaDiffPenalty = 1e4;
// Local Helper-Functions
// -----------------------------... |
//
// Created by <NAME> on 2019-03-23.
//
// tyr
// Copyright (c) 2019 <NAME>
// Full license at tyr/LICENSE.txt
//
/*
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... |
//==============================================================================
// ldpc_decoder.cpp
//
// LDPC decoder implementation.
//------------------------------------------------------------------------------
// Copyright (c) 2019 <NAME>
//
// This source code is licensed under the MIT license found in the
// L... |
/* bcw0x1bd2 */
#include <bits/stdc++.h>
//
using namespace std;
//
#define REP(n,i) for(int (i)=0;(i)<(n);(i)++)
#define CDREP(n,i) for(int (i)=((n)-1);(i)>=0;(i)--)
#define CDFOR(s,e,i) for(int i=((e)-1);(i)>=(s);(i)--)
#define _SZ(n) memset((n),0,sizeof(n))
#define _SMO(n) memset((n),-1,sizeof(n))
#define _MC(n,m) m... |
#include <GShader.h>
#include <GMatrix.h>
#include <GBitmap.h>
#include <GColor.h>
float mirror(float x);
float repeat(float x);
class CanvasGradient : public GShader {
public:
// Constructor.
CanvasGradient(GPoint p0, GPoint p1, const GColor _colors[], int _count, GShader::TileMode mode = GShader::kClam... |
#include "rs-sci/random-other-distributions.hpp"
#include "rs-sci/random-engines.hpp"
#include "rs-tl/uuid.hpp"
#include "rs-unit-test.hpp"
#include <map>
#include <string>
using namespace RS::Sci;
using namespace RS::TL;
void test_rs_sci_random_choice_distribution() {
static constexpr int iterations = 1'000'000... |
/** @file
This plugin counts the number of times every header has appeared.
Maintains separate counts for client and origin headers.
@section license License
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work ... |
/*
* File: Tracking.cpp
* Project: Project Swarm PX4
* File Created: Thursday, 28th February 2019 4:22:12 PM
* Author: nknab
* Email: <EMAIL>
* Version: 1.0
* Brief: This Class Is Responsible For Tracking An Object Based On Color.
* -----
* Last Modified: Thursday, 28th February 2019 4:22:12 PM
* Modified By:... |
#include "binary_relation.hpp"
#include <utility>
using namespace pomagma;
rng_t rng;
size_t g_num_moved(0);
void move_to(Ob i __attribute__((unused)), Ob j __attribute__((unused))) {
// std::cout << i << '-' << j << ' ' << std::flush; //DEBUG
++g_num_moved;
}
bool test_fun1(Ob i, Ob j) { return i and j and... |
#include "ModelWindow.h"
#include "Node.h"
#include <DirectXMath.h>
#include <cassert>
void ModelWindow::Show(Graphics& gfx, const char* windowName, const Node& root) noexcept
{
/*windowName = windowName ? windowName : "Model";
int nodeIndexTracker = 0;
if ( ImGui::Begin( windowName ) )
{
ImGui::Columns( 2, nul... |
#include "game.h"
#include "camera.h"
#include "util/gui/cutscene.h"
#include "world.h"
#include "util/graphics/bitmap.h"
#include "util/debug.h"
#include "util/events.h"
#include "util/font.h"
#include "util/init.h"
#include "util/input/input-map.h"
#include "util/input/input-manager.h"
#include "util/input/input-so... |
#include "glm/common.hpp"
#include "glm/geometric.hpp"
#include "Math.h"
#include "RNG.h"
#include "Triangle.h"
Triangle::Triangle() : Shape(true)
{}
glm::vec3 Triangle::BarycentricCoefficients(const glm::vec3& point) const
{
const float triangle_area = Area();
const float triangle0_area = glm::max(glm::length(glm:... |
#include "CheckableButton.h"
CheckableButton::CheckableButton(int X, int Y, int Width, int Height, HWND Parent, HINSTANCE ins, HMENU ID, bool IsChecked, String Text, CheckableButtonType Type, StyleSheet Style, TextStyleSheet TextStyle)
{
if (!_ThisAtom)
InitBase(ins);
_Check = IsChecked;
_Type = Type;
_Style = ... |
/**
* @file
* @author Inmatarian <<EMAIL>>
* @section LICENSE
* Insert copyright and license information here.
*/
#include <cstdlib>
#include <cassert>
#include "debug.h"
#include "zstring.h"
#include "defines.h"
#include "zztEntity.h"
#include "gameWorld.h"
#include "gameBoard.h"
#include "abstractMusicStream.... |
// Copyright 2019 The Fuchsia 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 <fuchsia/wlan/mlme/cpp/fidl.h>
#include <lib/fake_ddk/fake_ddk.h>
#include <lib/fidl/cpp/decoder.h>
#include <lib/fidl/cpp/message.h>
#include <f... |
/**
* @file CreateSection.cpp
* @author <NAME>, hasherezade
* @brief Section Hijacking
*/
#include "CreateSection.h"
#include "utils.h"
/**
* @brief This function populate the necessary library function pointers.
*
* In order to use WINAPI's functions, we require to do some run-time dynamic
* linking. Thi... |
/* Open Sound Control for Audio Library for Teensy 3.x, 4.x
* Copyright (c) 2021, <NAME>, <EMAIL>
*
* Development of this library was enabled by PJRC.COM, LLC by sales of
* Teensy and Audio Adaptor boards, implementing libraries, and maintaining
* the forum at https://forum.pjrc.com/
*
* Please support PJRC's e... |
//
// Copyright (c) 2015 <NAME> <EMAIL>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including com... |
#include "sensesp_app.h"
#include "sensesp_app_builder.h"
#include "sensesp/sensors/digital_input.h"
#include "sensesp/signalk/signalk_output.h"
#include "sensesp/system/lambda_consumer.h"
#include "sensesp/transforms/debounce.h"
#include "sensesp/transforms/integrator.h"
using namespace sensesp;
/**
* This example ... |
/*
* OpenGL sample application demonstrating the use of a wrapper
*
*/
#include <iostream>
#include <vector>
#include "glad/glad.h"
#include <GLFW/glfw3.h>
#include "shaders.hpp"
#define POINTER(i) reinterpret_cast<const GLvoid*>(i)
///
/// \brief error_callback
/// \param description
///
static void error_callb... |
//
// Created by <NAME> on 2018-11-02.
//
#include "engine.h"
#include "dict.h"
#include "words.h"
#include "stack.h"
#include "util.h"
#include "lib.h"
extern "C" {
void* create_reader(int, char**);
int read_word_from_reader(void*, char*, int);
void destroy_reader(void*);
}
Reader::Reader(int argc, char... |
#include "srrg_data_structures/kd_tree.h"
#include "srrg_geometry/geometry_defs.h"
#include "srrg_test/test_helper.hpp"
using namespace srrg2_core;
int main(int argc_, char** argv_) {
return srrg2_test::runTests(argc_, argv_);
}
TEST(KDTree, NearestNeighborPerfect) {
constexpr size_t number_of_points = 1000;
... |
/**
* You are given as input an unsorted array of n distinct numbers, where n is a power of 2. Give an algorithm that identifies the second-largest number in the array, and that uses at most n + lg(n) - 2n comparisons.
*/
#include <iostream>
#include <limits>
#include <vector>
#include <map>
#include <algorithm>
... |
//
// Created by jiashuai on 17-10-25.
//
#include <thundersvm/solver/nusmosolver.h>
#include <thundersvm/kernel/smo_kernel.h>
using namespace svm_kernel;
float_type
NuSMOSolver::calculate_rho(const SyncData<float_type> &f_val, const SyncData<int> &y, SyncData<float_type> &alpha,
float_type... |
/* NOI 2019: Rigged Road
Idea: use UFDS to ensure that only unlabeled edges are enumerated when an entire path has to be labeled
Time Complexity: O(ElogE)
*/
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int MAX_N = 300000 + 5;
const int MAX_L = 20; // ~ Log N
const long long MOD = 1e9... |
//
// This script converts the CIFAR dataset to the leveldb format used
// by caffe to perform classification.
// Usage:
// convert_cifar_data input_folder output_db_file
// The CIFAR dataset could be downloaded at
// http://www.cs.toronto.edu/~kriz/cifar.html
//
//AJ: Edited it so that 1-5 batch goes to trainval... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsGNOMERegistry.h"
#incl... |
#include <iostream>
#include <stdint.h>
#include <string>
#include <sstream>
#include <cstdio>
#include <stdio.h>
#include <cstring>
#include <map>
#include "test.h"
#include "PacketIR.h"
#include "Connect.h"
using namespace std;
string dec2hex2(int dec, size_t length)
{
string s_temp; //存放转化后字符
int i;... |
#include <fmt/format.h>
#include <algorithm>
#include <bitset>
#include <functional>
#include <robin_hood.h>
#include <stack>
#include "advent.hpp"
#include "util.hpp"
using rule = std::vector<size_t>;
struct node {
std::vector<rule> rules;
std::optional<char> value;
node()
: rules({})
... |
#include "orbit_mpi.hh"
#include "MatrixOperations.hh"
#include "BufferStore.hh"
#include <cmath>
using namespace OrbitUtils;
int MatrixOperations::invert(double **a, int n){
// Taken from Nrecipes and slightly modified.
// Get matrix A(nxn) and transform it into A^(-1).
// Returns -1 if A^(-1) doesn't e... |
#include <algorithm>
#include <array>
#include <cstdio>
#include <iostream>
#include <stdexcept>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using uint64 = uint64_t;
using uint32 = uint32_t;
using int64 = int64_t;
using int32 = int32_t;
template <typename T> using Vec = std::vector<T>;
using I... |
/**
* @file listeners.cpp
* @Author <NAME> (<EMAIL>)
* @date November, 2014
* @brief function to create listeners
*
*/
#include "listeners.hpp"
#include <sys/un.h>
#include <sys/socket.h>
#include <fcntl.h> /* File control definitions */
#include <errno.h> /* Error number definitions */
#include <term... |
#ifdef _DEBUG
#undef _DEBUG
#include <Python.h>
#define _DEBUG 1
#else
#include <Python.h>
#endif
#include <unordered_map>
#include <fstream>
#include <conduit/conduit.h>
#include <stdlib.h>
#ifdef _MSC_VER
#include <editline/readline.h>
#else
#include <readline/readline.h>
#include <readline/history.h>
#endif
#inc... |
#pragma GCC target("popcnt")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
using ull = unsigned long long;
template <typename V> struct AbStr {
AbStr(V val_, int len_) : val(val_), len(len_) {}
AbStr() = default;
template <typename U> AbStr<V> r... |
#include "sprite.h"
#include "core.h"
#include <algorithm>
Sprite::Sprite() {
texture = nullptr;
centralized = false;
h_frames = 1;
v_frames = 1;
frame_index = 0;
vertex_data = new VertexData[4];
vertex_data_count = 4;
}
Sprite::~Sprite(){
delete[] vertex_data;
}
std::vector<RenderData... |
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=2000010;
const int maxM=maxN*2;
const int maxAlpha=27;
const int inf=2147483647;
class Trie
{
public:
int fail,cnt;
int s... |
#include <cmath>
#include "vec3d.h"
const double PI = 3.1415926535897932384626433832795;
//--------Constructors
//Contructor for vector class given (x, y, z)(null vector by default)
vec3d :: vec3d(float _x, float _y, float _z)
{
x=_x;
y=_y;
z=_z;
}
//Constructor to initialize a vector with a vector and magnitude ... |
//===------------------------------------------------------------*- C++ -*-===//
//
// Ripples: A C++ Library for Influence Maximization
// <NAME> <<EMAIL>>
// Pacific Northwest National Laboratory
//
//===-------------------------------------------------------------------... |
/*******************************************************************
* File : prophesee_ros_publisher.cpp *
* *
* Copyright: (c) 2015-2019 Prophesee *
*******************************************... |
/*
* Copyright 2020 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer;
* r... |
/*
* Base on "Windows Kernel Programing" Chapter 6, 8, 9.
* Example of process,thread,image,register notification. This is part of user-mode client.
* Target filename: SysMon
* /MTd
*/
#include <iostream>
#include <windows.h>
#include "../S5_SysMon/S5_SysMonCommon.h"
BYTE buffer[1 << 17]; // 128kb
int Error(const c... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of condit... |
/* Copyright (C) 2006 - 2013 ScriptDev2 <http://www.scriptdev2.com/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.... |
/**
* Copyright 2019-2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
/*
// Copyright (c) 2017 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
/* Copyright (C) 2006 - 2013 ScriptDev2 <http://www.scriptdev2.com/>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.... |
// Takes a bucketing for the previous street and an IR bucketing for the current
// streeet and creates a new perfect recall bucketing that remembers the
// bucket from the previous street.
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <unordered_map>
#include "board_tree.h"
#in... |
// https://raw.githubusercontent.com/Smorodov/Multitarget-tracker/master/KalmanFilter/Kalman.cpp
#include <iostream>
#include <vector>
#include <opencv2/opencv.hpp>
#include "kalman.hpp"
using namespace std;
using namespace cv;
//---------------------------------------------------------------------------
//----------... |
/*
* Copyright (c) 2019 Samsung Electronics Co., Ltd. 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... |
//
// Layer.cpp
//
// Copyright (c) 2001-2011 Virtual Terrain Project
// Free for all uses, see license.txt for details.
//
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include <algorithm>
#include "vtdata/vtLog.h"
#include "vtui/Helper.h"
#include "Builder.h"
// Layer headers
#include "Wat... |
/*
* Copyright (C) 2020 Open Source Robotics Foundation
*
* 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 appl... |
// -*-C++-*-
/*
(c) Copyright 2003-2006, Hewlett-Packard Development Company, LP
See the file named COPYING for license details
*/
/*
=pod
=head1 NAME
dsselect - Select subset of fields from a collection of traces, generate a new trace
=head1 SYNOPSIS
% dsselect [common-args] [--update-type] [--wher... |
#include <iostream>
#include <cassert>
#include <cmath>
#include <vector>
#include "DBox.H"
#include "RectMDArray.H"
#include "FFT1D.H"
#include "FFTMD.H"
#include "FFTW1D.H"
#include "PoissonSolver.H"
#include "Projection.H"
#include "FieldData.H"
#include "DeltaVelocity.H"
#include "RK4.H"
#include "WriteRectMDArray.... |
//
// RoboFace.cpp
//
#include "RoboFace.h"
#include "util.h"
#include "bitmap_data.h"
#define EYE_RADIUS 24
void RoboFace::begin() {
setColorDepth(8);
createSprite(M5.Lcd.width(), M5.Lcd.height() - marginY * 2);
createPalette(0);
}
void RoboFace::createPalette(int hue) {
if (hue == paletteHue)... |
#pragma once
#include "pch.h"
#include "./enforcer.h"
#include "./exception/casbin_enforcer_exception.h"
#include "./util/util.h"
// GetRolesForUser gets the roles that a user has.
vector<string> Enforcer :: GetRolesForUser(string name) {
vector<string> domain;
vector<string> res = this->model->m["g"].assert... |
//-
// ==========================================================================
// Copyright 1995,2006,2008 Autodesk, Inc. All rights reserved.
//
// Use of this software is subject to the terms of the Autodesk
// license agreement provided at the time of installation or download,
// or which otherwise accompanies th... |
#include <glm/ext/matrix_clip_space.hpp>
#include <glm/ext/matrix_transform.hpp>
#include <imgui.h>
#include "Renderer.h"
#include "Shader.h"
#include "../../Debug/Debug.h"
#include "Light.h"
#include "../Input/Input.h"
#include "../Input/Time.h"
#include "../Camera/Camera.h"
#include "../UI/UI.h"
void Renderer::LoadD... |
// Copyright 2019 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 <cstdint>
#include <cstdlib>
#include <iostream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "base/command_... |
#include "NodeGraph.h"
#include <raylib.h>
#include <deque>
std::deque<NodeGraph::Node*> NodeGraph::findPath(Node* start, Node* end)
{
// Find a path from start to end (The current implementation is obviously insufficient)
std::deque<Node*> path;
if (!start || !end)
{
//return an empty list
re... |
//===-- MipsTargetObjectFile.cpp - Mips Object Files ----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/* Copyright 2020 Canaan Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... |
#include "socket.hh"
#include "util.hh"
#include <cstddef>
#include <stdexcept>
#include <unistd.h>
using namespace std;
// default constructor for socket of (subclassed) domain and type
//! \param[in] domain is as described in [socket(7)](\ref man7::socket), probably `AF_INET` or `AF_UNIX`
//! \param[in] type is a... |
#include "MainLoop.hpp"
#include "ClientHandler.hpp"
#include "BackupJob.hpp"
#include <glog/logging.h>
#include <fstream>
#include <boost/filesystem.hpp>
#include <json.hpp>
#include <vector>
#include <algorithm>
#include <cryptopp/sha.h>
#include <cryptopp/hex.h>
#include <cryptopp/filters.h>
using namespace std;
... |
#include "StaticFileServing.h"
#include <QStringBuilder>
#include <QUrlQuery>
#include <QList>
#include <QPair>
#include <QFile>
#include <QFileInfo>
#include <QResource>
#include <QHostInfo>
#include <bonjour/bonjourserviceregister.h>
#include <bonjour/bonjourrecord.h>
#include <HyperionConfig.h>
#include <exception... |
#include "TimeScreen.h"
#include <time.h>
#include "../Fonts/northrup_serif8pt7b.h"
#include "../Images/WatchfaceBitmaps.h"
using namespace Watchy;
int fgColor;
// from https://github.com/spinalcode/Mickey
int getPixel(int16_t x, int16_t y, const uint8_t *bitmap) {
int16_t imageWidth = pgm_read_byte(bitmap);
i... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... |
#include <iostream>
#include <vector>
#include <filesystem>
#include <unordered_set>
#include <unordered_map>
#include <string>
#include <utility>
#include <cstdio>
#include <fstream>
#include <sstream>
#include <cerrno>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/epoll.h>
#include <fcntl.h>
#include <un... |
//
// COMP 371 Assignment Framework
//
// Created by <NAME> on 8/7/14.
// Updated by <NAME> on 14/1/15
//
// Copyright (c) 2014-2015 Concordia University. All rights reserved.
//
#include "Animation.h"
#include "Renderer.h"
#include "World.h"
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/quaternion.hpp>
... |
#include <iostream>
#include <iomanip>
#include <vector>
#include <functional>
#include <algorithm>
#include <unistd.h>
#include "schema.h"
#include "logger.h"
#include "dbconnector.h"
#include "redisclient.h"
#include "producerstatetable.h"
using namespace swss;
[[ noreturn ]] void usage(const std::string &program, ... |
#include <iostream>
#include "Match.h"
#include "Trainer.h"
#include "Generator.h"
#include <ostream>
#include <iterator>
#include "Network.h"
#include <GameLogic.h>
#include <thread>
#include <future>
#include <sys/mman.h>
#include <stdlib.h>
#include <unistd.h>
#include <SampleFilter.h>
#include <PosStreamer.h>
siz... |
/*! @file */
/*
Copyright (C) 2008, kobake
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial ap... |
//
// Based on: https://github.com/turanszkij/WickedEngine/blob/master/WickedEngine/wiAudio.h
//
#include "AudioDevice.h"
AudioDeviceCreation AudioDevice::Create() {
HRESULT hr;
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if( FAILED(hr) ) return AudioDeviceCreation::NoMultithreading;
hr = XAud... |
/*
* cmodule.cpp, component module interface class
*
* Copyright (c) 2009-2010 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lice... |
#include "main_engine/tracker/TrackingEngine.h"
MeshSequenceReader::MeshSequenceReader(MeshLoadingSettings& settings, int width,
int height, double K[3][3], int startFrame, int numTrackingFrames):
trackerInitialized(false)
{
m_nWidth = width;
m_nHeight = height;
startFrameNo = startFrame;
curre... |
//
// MIT License
//
// Copyright (c) 2019 <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 restriction, including without limitation the rights
// to use, copy, m... |
#include <iostream>
#include <regex>
#include <string>
#include "httplib.h"
#include "../interpreter/token.hpp"
#include "../interact/demodulator.hpp"
#include "../interact/modulator.hpp"
#include "dump_response.hpp"
#include "response.hpp"
#include "player.hpp"
const int GAME_FINISHED = 2;
// 10進数playerKey -> [2, pl... |
// Copyright (c) 2014-2021 The Gridcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or https://opensource.org/licenses/mit-license.php.
#include "amount.h"
#include "gridcoin/contract/message.h"
#include "gridcoin/contract/contract.h"
#include "script.h"
#include ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.