text stringlengths 3.08k 12.5k |
|---|
#include "CheckinHousePage.h"
#include "ticketHash.h"
#include "message.h"
#include "serialWebRequests.h"
#include "minorGems/game/Font.h"
#include "minorGems/game/game.h"
#include "minorGems/util/stringUtils.h"
extern Font *mainFont;
extern char *serverURL;
extern int userID;
CheckinHousePage::CheckinHouse... |
//
// Least-recently used (LRU) queue device
// Clients and workers are shown here in-process
//
// NOTICE: increase file open limitation
// if increasing clients or workers.
#include <functional>
#include <iostream>
#include <memory>
#include <queue>
#include <string>
#include <vector>
#include <boost/asi... |
#include <iostream>
#include <array>
#include <random>
#include <cmath>
#include <cstddef>
#include <utility>
#include <omp.h>
#include <chrono>
using std::cout; using std::endl;
double PI = std::acos(-1);
template<size_t N, class T>
std::ostream& operator<<(std::ostream& os, const std::array<T,N> arr)
{
for (aut... |
#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_ = Ma... |
/* This software and supporting documentation are distributed by
* Institut Federatif de Recherche 49
* CEA/NeuroSpin, Batiment 145,
* 91191 Gif-sur-Yvette cedex
* France
*
* This software is governed by the CeCILL-B license under
* French law and abiding by the rules of distribution of free soft... |
#include <GL/glut.h> // GLUT, include glu.h and gl.h
#include <eigen3/Eigen/Dense>
#include <iostream>
#include "ant.h"
#include "grid.h"
#include <thread>
#include <chrono>
#include "hsv_to_rgb.h"
#include "display.h"
void run_ant_main(grid::grid &squares, ant::ant_interface * ants, unsigned int num_ants);
/* Handl... |
// Copyright (c) 2011 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 "crypto/symmetric_key.h"
#include <CommonCrypto/CommonCryptor.h>
#include <CoreFoundation/CFString.h>
#include <Security/cssm.h>
#include "... |
#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
struct splay
{
int key;
splay* lchild;
splay* rchild;
};
class SplayTree
{
public:
SplayTree()
{
}
// RR(Y rotates to the right)
splay* RR_Rotate(splay* k2)
{
s... |
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to y... |
/* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain so... |
// csatr_packagename.cpp -*-C++-*-
#include <clang/Basic/SourceLocation.h>
#include <csabase_analyser.h>
#include <csabase_diagnostic_builder.h>
#include <csabase_filenames.h>
#include <csabase_ppobserver.h>
#include <csabase_registercheck.h>
#include <ctype.h>
#include <ll... |
#include "Geant/HadronicProcess.h"
#include "Geant/LightTrack.h"
#include "Geant/HadronicCrossSectionStore.h"
#include "Geant/HadronicFinalStateModelStore.h"
#include "Geant/HadronicFinalStateModel.h"
#include "Geant/Isotope.h"
#include "Geant/Material.h"
#include "Geant/MaterialCuts.h"
#include "Geant/MaterialProperti... |
/**
* @file MBNet_1000.cpp
* @brief Detect object type
* @author <EMAIL>
*/
#include "MBNet_1000.h"
#include "names.h"
#include "stdlib.h"
#include "errno.h"
MBNet_1000::MBNet_1000(KPUClass& kpu, Sipeed_ST7789& lcd, Sipeed_OV2640& camera)
:_kpu(kpu),_lcd(lcd), _camera(camera),
_model(nullptr), _count(0), _resul... |
// Baidu RPC - A framework to host and access services throughout Baidu.
// Copyright (c) 2014 Baidu, Inc.
// Date: Sun Jul 13 15:04:18 CST 2014
#include <sys/epoll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h> //
#include <gtest/gtest.h>
#include "butil/gperftools_profiler.h"... |
/* -------------------------------------------------------------------------- *
* OpenSim Moco: exampleMocoInverse.cpp *
* -------------------------------------------------------------------------- *
* Copyright (c) 2020 Stanford University and the Authors *
... |
#include "simcore/br_rod.hpp"
BrRod::BrRod(unsigned long seed) : Object(seed) {
std::fill(body_frame_, body_frame_ + 6, 0.0);
}
void BrRod::InsertRod(std::string insertion_type, double buffer) {
if (buffer < 0) {
buffer = length_;
}
if (insertion_type.compare("random") == 0) {
InsertRandom();
} else... |
/*
purpose: solve vigenere cipher with key length within 4-6 given (cexercise4)
author: <NAME>
1 guess possible keyword lengths
2 break word into groups encrypted by the same letter of the keyword for frequency analysis
3 run the index of coincidence (ioc) on every group and get an average
... |
// Riders of Fortune 2.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include "pch.h"
#include <iostream>
#include <iomanip>
using namespace std;
const int rows = 8;
const int columns = 8;
char gameBoard[rows][columns];
void drawBoard(int, int);
void changePosition(int &,... |
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/OnlineMetaData/interface/DCSRecord.h"
#include "DataFormats/Scalers/interface/DcsStatus.h"
#include "FWCore/Framework/interface/stream/EDFilter.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/Conf... |
#include "pcm-file-source.h"
#include "cstringext.h"
#include "base64.h"
#include "rtp-profile.h"
#include "rtp-payload.h"
#include <assert.h>
extern "C" uint32_t rtp_ssrc(void);
PCMFileSource::PCMFileSource(const char *file)
{
m_fp = fopen(file, "rb");
m_speed = 1.0;
m_status = 0;
m_rtp_clock = 0;
m_rtcp_clock... |
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
string toStr(long long x) {
ostringstream os;
os << x;
return os.str();
}
bool in(long long x, const vector<long long> &left, ... |
/*******************************************************************************
* Copyright (c) 2013, Esoteric Software
* 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. Redistributio... |
#include "imgui.h"
#include "imgui_impl_gl.h"
#include "imgui_impl_sdl.h"
#include "gl/vcGLState.h"
#include "gl/vcShader.h"
#include "gl/vcRenderShaders.h"
#include "gl/vcFramebuffer.h"
#include "gl/vcMesh.h"
#include "gl/vcLayout.h"
//GL Data
vcTexture *g_pFontTexture = nullptr;
vcShader *pImGuiShader = nullptr;
vc... |
/* ************************************************************************
* Copyright 2016-2021 Advanced Micro Devices, Inc.
*
* ************************************************************************ */
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include "testing_common.hpp"
using namespace std;... |
/*
* Copyright (C) 2015, <NAME>
* TU Darmstadt - Graphics, Capture and Massively Parallel Computing
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-Clause license. See the LICENSE.txt file for details.
*/
#include <cstdlib>
#include <iostream>
#include "u... |
/* @@@LICENSE
*
* Copyright (c) 2009-2013 LG Electronics, 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 appli... |
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#include "tre_reader.h"
#include "swganh/byte_buffer.h"
#include "swganh/logger.h"
#include <array>
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <std... |
#include "HttpClient.h"
using namespace std;
using namespace http_client;
const string strBoundary = "----Zn516969Mx0KrHhG0X99Yef9r8JZsRJSXC";
const string strMultiPartContentType = "multipart/form-data";
const string strJsonContentType = "application/json";
CHttpClient::CHttpClient(const string& strAuth,const strin... |
#include "OrtUtils.h"
size_t OrtUtils::vectorProduct(const std::vector<int64_t>& vector)
{
if (vector.empty())
return 0;
size_t product = 1;
for (const auto& element : vector)
product *= element;
return product;
}
std::wstring OrtUtils::charToWstring(const char* str)
{
typedef s... |
/****************************************************************************
*
* Copyright (C) 2002-2003, Karlsruhe University
*
* File path: piggybacker/common/1275tree.cc
* Description: Builds a position independent copy of the Open Firmware
* device tree.
*
* Redistribution and use in source and binary fo... |
#pragma once
#include "uvgrtp/frame.hh"
#include "uvgrtp/socket.hh"
#include "uvgrtp/util.hh"
#include <atomic>
#include <memory>
#include <unordered_map>
#include <vector>
#include <mutex>
#if defined(_MSC_VER)
typedef SSIZE_T ssize_t;
#endif
const int MAX_MSG_COUNT = 5000;
const int MAX_QUEUED_MSGS = 10;
cons... |
/*
Copyright (c) 2007-2016 Contributors as noted in the AUTHORS file
This file is part of libzmq, the ZeroMQ core engine in C++.
libzmq is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Found... |
/*============================================================================
HDRITools - High Dynamic Range Image Tools
Copyright 2008-2011 Program of Computer Graphics, Cornell University
Distributed under the OSI-approved MIT License (the "License");
see accompanying file LICENSE for details.
This softw... |
#include "Perceptron.h"
#include <iomanip>
using namespace torch;
using namespace std;
Perceptron::Perceptron(float treshold, float learning_rate, int neurons){
setTreshold(treshold);
setLearning_Rate(learning_rate);
setBias(0.01f);
torch::Tensor r = torch::rand(neurons);
setW(r);
}
void Perceptr... |
/*
LatticePruner.cpp
Copyright (c) [2012-], <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... |
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
//===================================================================
#define IM1 2147483563
#define IM2 2147483399
#define AM (1.0/IM1)
#define IMM1 (IM1-1)
#define IA1 40014
#define IA2 40692
#define IQ1... |
//
// SkyNet Project
// Copyright (C) 2018 by Contributors <https://github.com/Tyill/skynet>
//
// This code is licensed under the MIT License.
//
// 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 Sof... |
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include <algorithm>
#include "Noelle.hpp"
using namespace llvm::noelle ;
namespace {
struct CAT : public ModulePass {
static ch... |
#include "main/multikey_sum.hh"
#include "NTL/ZZ.h"
#include "pbc/pbc.h"
#include "main/sha.hh"
#include <util/util.hh>
using namespace std;
static inline NTL::ZZ
L(const NTL::ZZ &u, const NTL::ZZ &n)
{
return (u - 1) / n;
}
static inline NTL::ZZ
Lfast(const NTL::ZZ &u, const NTL::ZZ &ninv, const NTL::ZZ &two_... |
#include <stdafx.h>
#include "Image.h"
struct PdbInfo
{
DWORD Signature;
BYTE Guid[16];
DWORD Age;
char PdbFileName[1];
};
struct ImageVersion
{
uint8_t Guid[16];
uint64_t Version;
};
void Image::Initialize()
{
const ImageVersion cVersions[] = {
{{0x2B, 0x4E, 0x... |
/**
* 好智障,对于这种题目不熟悉几次分析错误......
*
* 首先是差分,可以递归前计算一次之前的贡献,递归完后再计算一次,
* 两次相减就是自己的答案,这个思想可以推广到可减的运算上
*
* 然后是特殊情况的判定:
*
* 1 (1)
* / \
* 2 (0) 3 (0)
* 然后路径从2 -> 3
* 这个路径会被拆成2 -> 1和1 -> 3,注意我们向下的深度减1了,
* 所以1处会被记录两次答案......
* 所以解决办法就是,特判之,预先加上答案,然后计算标记时同时应用加和减的
*/
#include <cassert>
#include <cstdio>... |
/**
*Licensed to the Apache Software Foundation (ASF) under one
*or more contributor license agreements. See the NOTICE file
*distributed with this work for additional information
*regarding copyright ownership. The ASF licenses this file
*to you under the Apache License, Version 2.0 (the
*"License"); you may n... |
/**
* @file BrushStrokeSample.cxx
* @author <NAME>
*
* @brief
*
* @date 2020-05-01
*/
#include "painty/renderer/BrushStrokeSample.hxx"
#include <fstream>
#include <iostream>
#include "painty/io/ImageIO.hxx"
painty::BrushStrokeSample::BrushStrokeSample() {
loadSample("data/sample_0");
}
painty::BrushStrokeS... |
/*
* ap.cpp
*
* Created on: 2020. 3. 20.
* Author: Baram
*/
#include "ap.h"
#include "nrf52botBLE.h"
void bootCmdif(void);
static void threadUsb(void const *argument);
static void threadLED(void const *argument);
static void threadLCD(void const *argument);
static void threadBLE(void const *argument);
... |
// Copyright (c) 2017 nyorain
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt
#define DLG_DEFAULT_TAGS "window",
#include "window.hpp"
#include <ny/key.hpp> // ny::Keycode
#include <ny/mouseButton.hpp> // ny::MouseButton
#... |
//----------------------------------------------------------------------------
//
// 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... |
#include "CServerRWListen.h"
#include "CServerSocket.h"
#include "CApplication.h"
#include "CServerConnectListen.h"
#include "CServerConnector.h"
#include "CLogger.h"
#include "CDateTime.h"
#include "SocketUtil.h"
#include "CThreadPool.h"
CServerRWListen::CServerRWListen(CServerSocket *tSerSocket, bool isDetach)
... |
#include <pybind11/pybind11.h>
#include <pybind11/operators.h>
#include <pybind11/stl.h>
#include "opentimelineio/event/event.h"
#include "opentimelineio/event/eventStack.h"
#include "opentimelineio/edit/edit.h"
#include "opentimelineio/edit/insertItemEdit.h"
#include "opentimelineio/edit/removeItemEdit.h"
#include "... |
#ifdef HAVE_CONFIG_H
#include <../../config.h>
#endif
/*
* Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University
* Copyright (c) 1991 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provi... |
/*
* This file is part of PowerDNS or dnsdist.
* Copyright -- PowerDNS.COM B.V. and its contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* In addition, for t... |
// hgx2bmp.cpp, (for P/Invoke), 2018/6/5
// originally code by asmodean
// contact:
// web: http://asmodean.reverse.net
// email: asmodean [at] hush.com
// irc: asmodean on efnet (irc.efnet.net)
// This code helps decompress Windmill's HG-3 (*.hg3) and HG-2 (*.hg2) images.
#include "hgx2bmp.h"
#include <st... |
// Game class
#include "game.hpp"
// Window size
float WINDOW_WIDTH = 1920;
float WINDOW_HEIGHT = 1080;
// Static functions
// Initializer functions
void Game::initVariables()
{
// Initialize some variables
this->window = NULL;
this->fullscreen_ = false;
this->dt = 0.f;
}
void Game::initWindow()
{
// Creat... |
#include "chunkstring.h"
#include <library/unittest/registar.h>
using namespace NSrvKernel;
class TChunkStringTest: public TTestBase {
public:
UNIT_TEST_SUITE(TChunkStringTest);
UNIT_TEST(TestCompare);
UNIT_TEST(TestStartsWith);
UNIT_TEST(TestIterator);
UNIT_TEST(TestCutFront);
UNIT_TEST(Test... |
#include "quill/detail/TimestampFormatter.h"
#include "quill/Fmt.h" // for buffer
#include "quill/QuillError.h" // for QUILL_THROW, QuillError
#include "quill/detail/misc/Macros.h" // for QUILL_UNLIKELY
#include "quill/detail/misc/Os.h" // for gmtime_rs, localtime_rs
#include <array> ... |
#include "types.hpp"
#include "pressio/type_traits.hpp"
#include "pressio/expressions.hpp"
#include "pressio/ops.hpp"
namespace
{
bool test_span(pressio4py::py_f_arr a)
{
// span starting from index=2
auto s = pressio::span(a, 2, 5);
if (s.extent(0)!=5) return false;
if (s(0)!=2.) return false;
if (s(1)!=... |
/**
* Copyright (c) 2020 University of Luxembourg. 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... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2020, Locus Robotics
* 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 re... |
#include <limits>
#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/Triangulat... |
/*
* Copyright (c) 2009 <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, modify, merge, publish, di... |
#include "interlecto.h"
int main(int argc, char **argv, char**envp) {
web::enviro Enviro(argc, argv, envp);
web::content Content(Enviro);
web::format Page(Enviro);
return web::main(Enviro);
}
namespace web {
std::ostream&cout(std::cout);
std::ostream&cerr(std::cerr);
std::istream&cin(std::cin);
const string n... |
/***************************************************************************
qgsgraduatedhistogramwidget.cpp
-------------------------------
begin : May 2015
copyright : (C) 2015 by <NAME>
email : <EMAIL>
***********... |
#include "apt_preferences.h"
#include "ui_apt_preferences.h"
#include <QDirIterator>
#include <QListWidgetItem>
#include<QDebug>
#include <QProcess>
#include <QMessageBox>
#include <QFileDialog>
#include "bootloader.h"
#include <QTextBrowser>
Apt_Preferences::Apt_Preferences(QWidget *parent) :
QWidget(parent),
... |
// Copyright 2018 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 "commands.h"
#include <fcntl.h>
#include <stdio.h>
#include <new>
#include <fbl/algorithm.h>
#include <fbl/unique_fd.h>
#include <fbl/unique_pt... |
// Copyleft 2006 <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 any later version.
/*
<NAME>
revision history:
rev date comments
00 24ju... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void function_verificar_puesto(int[],int,char []);//prototipo
int function_impresion(int[]);
void reserva_no_fumador(int,int[],char []);
void reserva_fumador(int,int[],char []);
main(){
int v[10]={0};//inicia un arreglo en 0
int n,i,a,p;
char res[10],c[1... |
#include <cassert>
#include <tao/json/contrib/schema.hpp>
#include <velocypack/Iterator.h>
#include <velocypack/velocypack-aliases.h>
#include <validation/events_from_slice.hpp>
#include <validation/types.hpp>
#include <validation/validation.hpp>
namespace {
using namespace arangodb;
using namespace arangodb::valid... |
#include "StdAfx.h"
#include "PVSPreprocessor.h"
PVSPreprocessor::PVSPreprocessor()
{
}
bool PVSPreprocessor::addMeshesFromXmlFile(const string inputPath)
{
//Load XML file
xml_document doc;
xml_parse_result result = doc.load_file(inputPath.c_str());
if(!result)
{
errorMessages.push_back("Cannot load XML fi... |
/* Copyright 2019, Gurobi Optimization, LLC
This example considers the following nonconvex nonlinear problem
maximize 2 x + y
subject to exp(x) + 4 sqrt(y) <= 9
x, y >= 0
We show you two approaches to solve this:
1) Use a piecewise-linear approach to handle general function
constraints (... |
#include <pybind11/pybind11.h>
#include <mecab.h>
namespace py = pybind11;
class Iterator {
private:
const MeCab::Node *cursor;
public:
Iterator(const MeCab::Node* cursor) : cursor(cursor) {}
const MeCab::Node& operator*() const { return *cursor; }
Iterator& operator++() { cursor = cursor->next; return *thi... |
// ==========================================================================
// BAM Realigner
// ==========================================================================
// Copyright (c) 2014, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with o... |
// Copyright (c) 2016-2019 LG Electronics, 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... |
/*
* CiderPress
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
* See the file LICENSE for distribution terms.
*/
/*
* Convert MacPaint 'PNTG' images.
*/
#include "StdAfx.h"
#include "MacPaint.h"
/*
* The files are always 576x720 monochrome.
*
* This format often starts with a Mac... |
#include "ControlOT.h"
ControlOT::ControlOT() {
createNodesInfo();
}
void ControlOT::createNodesInfo() {
NodeInfo nodeLivingRoom = createNodeInfo(4, "Salón", 0, 0);
NodeInfo nodeKidsRoom = createNodeInfo(11, "Nenes", 0, 0);
NodeInfo nodeExternal = createNodeInfo(1, "Balcón", 0, 0);
NodeInfo nodeWorkingR... |
#include <iostream>
#include <fstream>
#include <cmath>
#include <cassert>
#include <algorithm>
#include "../utils.h"
#include "hdre.h"
std::map<std::string, HDRE*> HDRE::s_loaded_hdres;
HDRE::HDRE()
{
init();
}
HDRE::HDRE(const char* filename)
{
init();
load(filename);
}
void HDRE... |
#include <cmath>
#include "gameplayState.h"
#include "app.h"
#include "Assets.h"
#include "noiseGenerator.h"
#include "terrain.h"
#include "player.h"
gameplayState::gameplayState(app * tEngine, sf::RenderWindow * tWindow)
{
window = tWindow;
engine = tEngine;
init();
}
gameplaySt... |
#include "ArrowFunctions.h"
#include <iostream>
#include <arrow/api.h>
#include <arrow/io/api.h>
#include <parquet/arrow/reader.h>
#include <parquet/arrow/writer.h>
/*
C++ functions
-------------
These C++ functions are used to call into the Arrow library
and are then called to by their corresponding C functions ... |
// 点分树 luogu-P6329
#include <bits/stdc++.h>
#define see(x) cerr<<#x<<"="<<x<<endl;
#define _max(x,y) ((x>y)?x:y)
#define _min(x,y) ((x<y)?x:y)
using namespace std;
typedef long long ll;
template<typename _Tp>
inline void red(_Tp &x) {
x = 0; bool fg = 0; char ch = getchar();
while (ch < '0' || ch > '9') {if (ch... |
// #pragma GCC optimize("Ofast,unroll-loops")
// #pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define ll int
#define ull unsigned long long
#define dd double
#define ld long double
#define sl(n) scanf("%lld", &n)
#define si(n) scanf("%d", &n)
#define sd(n) scanf("%lf", &n)
#define ... |
// Linear Complementarity Problem solver
// used to compute ship collision forces
// see Game Physics by <NAME>
//
/*
Copyright © 2021 <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 withou... |
#include "include/command_pattern/ecs_dcm.hpp"
using namespace dcm;
ECS_DCM::ECS_DCM() :
combined_client_(nullptr),
receiver_(nullptr),
sim_flow_invoker_(nullptr),
import_energy_c_(nullptr),
export_energy_c_(nullptr),
get_energy_c_(nullptr),
get_nameplate_c_(nu... |
#include "lib.h"
void col_update_bit_map_init(COL_UPDATE_BIT_MAP *bit_map) {
bit_map->bits = NULL;
bit_map->more_dirty = NULL;
bit_map->num_bits_words = 0;
bit_map->num_dirty = 0;
}
void col_update_bit_map_clear(COL_UPDATE_BIT_MAP *bit_map) {
const uint32 inline_capacity = lengthof(bit_map->inline_dirty);
... |
//============================================================================
// Name : A6.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostr... |
#include <core123/circular_shared_buffer.hpp>
#include <core123/sew.hpp>
#include <core123/ut.hpp>
#include <core123/envto.hpp>
#include <thread>
#include <chrono>
#include <memory>
using core123::circular_shared_buffer;
using core123::envto;
namespace sew = core123::sew;
using std::string;
string tmpfilename;
bool x... |
/*
* 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... |
/*
* Copyright 2012, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <BufferIO.h>
#include <Directory.h>
#include <Entry.h>
#include <File.h>
#include <String.h>
#include <mail_util.h>
struct mail_heade... |
/*
* Copyright (c) 2017 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
* 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 ... |
#include "Variant.h"
#include "split.h"
#include "fastahack/Fasta.h"
#include <getopt.h>
#include <cmath>
using namespace std;
using namespace vcflib;
void printSummary(char** argv) {
cerr << "usage: " << argv[0] << " [options] <vcf file>" << endl
<< endl
<< "options:" << endl
<< " ... |
/*********************************************************************/
/* Copyright (c) 2011 - 2012, The University of Texas at Austin. */
/* All rights reserved. */
/* */
/* Redistribution and use in sou... |
/*
* Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC)
* 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... |
#include <algorithm>
#include <exception>
#include <fstream>
#include <iostream>
#include <iterator>
#include <locale>
#include <string>
#include <boost/locale.hpp>
#include <boost/program_options.hpp>
#include "common.hpp"
#include "regex_parser.hpp"
#include "engine.hpp"
namespace po = boost::program_options;
std... |
#include <utility>
#include "Tools/Documentation/documentation.h"
#include "Module/Decoder/Generic/ML/Decoder_maximum_likelihood_std.hpp"
#include "Module/Decoder/Generic/ML/Decoder_maximum_likelihood_naive.hpp"
#include "Module/Decoder/Generic/Chase/Decoder_chase_std.hpp"
#include "Factory/Module/Decoder/Decoder.hpp"... |
#include <ros/ros.h>
#include <vector>
#include "inertiallabs_msgs/ins_data.h"
#include "inertiallabs_msgs/sensor_data.h"
#include "inertiallabs_msgs/gps_data.h"
#include <tf/transform_listener.h>
#include <geometry_msgs/PoseStamped.h>
#include <geometry_msgs/TwistStamped.h>
#define M_PI 3.141592653589793238... |
/**
* @file
*/
#pragma once
#include "src/common/TypeParameterised.hpp"
#include "src/generate/IndentableGenerator.hpp"
namespace birch {
/**
* C++ code generator.
*
* @ingroup io
*/
class CppGenerator: public IndentableGenerator {
public:
/**
* Constructor.
*
* @param base Base stream.
* @param l... |
/*
Chemical Kinetics and Dynamics Library
Copyright (C) 2008-2013, <NAME> <<EMAIL>>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
vers... |
/*
** Copyright 2004, <NAME>, <EMAIL>. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#include <ScrollView.h>
#include <Application.h>
#include <Window.h>
#include <Box.h>
#include <stdio.h>
//#define ARCHIVE_TEST
//#define CHANGE_BORDER_TEST
//#define SIZE_TEST
uint32 gNumWindo... |
#include "instruction.hpp"
#define ASM_OPCODE_CALL 0xE8
#define ASM_OPCODE_JMP 0xE9
instruction::instruction( duint addr )
{
ZeroMemory( &m_info, sizeof BASIC_INSTRUCTION_INFO );
DbgDisasmFastAt( addr, &m_info );
m_address = addr;
analyze();
}
std::size_t instruction::size() const
{
return m_info.size;
}
st... |
/* Copyright (c) 2017, <NAME> *
* *
* Permission to use, copy, modify, and/or distribute this software for any *
* purpose with or without fee is hereby granted, provided that the above ... |
#include "saber/core/context.h"
#include "saber/core/tensor_op.h"
#include "saber/funcs/attention_padding_mask.h"
#include "saber/saber_types.h"
#include "test_saber_func.h"
#include "test_saber_base.h"
#include <vector>
#include<cmath>
using namespace anakin::saber;
template <typename dtype, typename TargetType_D, ty... |
// Copyright (c) 2021 ICHIRO ITS
//
// 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, di... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.