text stringlengths 3.08k 12.5k |
|---|
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2009 CaH4e3
*
* 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
... |
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <geometry_msgs/PointStamped.h>
#include <opencv2/highgui/highgui.hpp>
#include <cv_bridge/cv_bridge.h>
#include <sstream>
#include <fstream>
#include <string>
std::vector<cv::Mat> video_to_img(std::string video_path)
{
cv::VideoCapture cap(vi... |
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <math.h>
#include <cstring>
#include <string>
#include "BigInteger.hpp"
using namespace std;
int findLastIndex(string& str, char x);
void removeCharsFromString( string &str, char const * charsToRemove );
int hexToBigInt(string hex, BigUnsigned& b);
... |
#include <array>
#include <cmath>
#include <limits>
#include <random>
#include <vector>
// c++ -Ofast -fopenmp -mavx2 -mfma NeuNetNaive.cpp -fopt-info-vec
// -ftree-loop-if-convert-stores
// --param max-completely-peel-times=1
#include <omp.h>
// #define SCALAR
#include "approx_vexp.h"
template<typename T>
T sigmoi... |
/**
* @mainpage Embedded Thermometer
* @author <NAME>
* 1. This project works with the use of an Arduino Uno board, temperature sensor with a serial module and a push-button.
* 2. The temperature sensor is read in real time and the measurements are sent to the terminal and memory tasks.
* 3. If the push-button is ... |
#include <algorithm>
#include <iostream>
#include <cstring>
#include <sstream>
#include <vector>
using namespace std;
struct Node {
int q1, q2, q3, q4;
int lbound, rbound;
Node *parent, *left, *right;
};
struct Point {
bool x, y;
};
struct Query {
char type;
int lbound, rbound;
};
struct qresult {
int q1, q... |
// Copyright 2008-2016 <NAME> (http://conradsanderson.id.au)
// Copyright 2008-2016 National ICT Australia (NICTA)
//
// 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.or... |
/*=========================================================================
*
* 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... |
/*
ID: your_id_here
TASK: test
LANG: C++
*/
/* LANG can be C++11 or C++14 for those more recent releases */
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int N, M;
bool visited[1001] = { false }; /* false = unvisited, true = visited... |
// Copyright 2021 LeoDrive.
//
// 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 wr... |
/* <NAME> Lib.cpp */
#include "lib.h"
/*-------------------------------------------------------
opens files to be used as input and output
Receives: input, output
Returns: nothing
---------------------------------------------------------*/
char openfiles (ifstream &input1, ofstream &output1)
{
char infile1[20],
... |
/**
* \file dnn/src/common/elemwise/opr_impl_helper.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed... |
#include "skel.h"
int interfaces[ROUTER_NUM_INTERFACES];
int get_sock(const char *if_name)
{
int res;
int s = socket(AF_PACKET, SOCK_RAW, 768);
DIE(s == -1, "socket");
struct ifreq intf;
strcpy(intf.ifr_name, if_name);
res = ioctl(s, SIOCGIFINDEX, &intf);
DIE(res, "ioctl SIOCGIFINDEX");
struct sockaddr_ll a... |
/**
* Copyright (C) 2020-2021 Licensed under the Apache License, Version
* 2.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is located
* at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writin... |
/* Author : TING
* Date : 2019/06/05
* Email : <EMAIL>
*/
#include <itp/gmx>
#include <set>
#include <vector>
#include <utility>
#include <optional>
class Handle : public itp::GmxHandle
{
public:
using GmxHandle::GmxHandle;
std::optional<int> getPbcMe(int mol, rvec lowPos, rvec upPos, rvec nbi... |
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2012-2013 <NAME>, Jupiter Jazz Limited
// Copyright (c) 2014-2015 <NAME>, The appleseedhq Organization
//
// Permission is h... |
#include "roundbox.h"
RoundBox::RoundBox(void) {
createPoints(1.0f, 1.0f, 1.0f, Point3D(Vector3D(-0.5f, -0.5f, -0.5f), Color(1.0f, 1.0f, 1.0f)));
generateDisplayList();
}
RoundBox::RoundBox(float height, float width, float depth) {
createPoints(height, width, depth, Point3D(0, 0, 0));
generateDisplayList();
}
Ro... |
#include "../shared.h"
#include "../base_modules/base_modules.h"
#include "tools.h"
#include "ntos.h"
#include "utils.h"
NTSTATUS last_status = 0;
size_t win::virtual_query(HANDLE h_process, void* p_address, uint32_t e_class, void* p_buffer, const size_t dw_length)
{
SIZE_T return_len = 0;
last_status = NtQueryVir... |
/*
* Copyright (c) 2015 - 2021, Intel Corporation
*
* 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 condition... |
//===-- Internalize.cpp - Mark functions internal -------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Jefferson Science Associates LLC Copyright Notice:
//
// Copyright 251 2014 Jefferson Science Associates LLC All Rights Reserved. Redistribution
// and use in source and binary forms, with or without modification, are... |
/***********************************************************************************************************************
* *
* libscopehal v0.1 ... |
/*
============================================================================
Name : PostInst.cpp
Author : <NAME>
Copyright : Your copyright notice
Description : Exe source file
============================================================================
*/
// Include Files
#include "PostInst.h"
#inc... |
//******************************************************************************************************************************************************
//
//Modified version by <NAME>, Dec 2011 to allow compilation with GCC on Unix.
//Originals provided by Neuralynx.
//
// Mat2NlxSE.cpp
// Author: <NAME>
// Cr... |
#include "Etterna/Globals/global.h"
#include "InputHandler_Win32_Pump.h"
#include "Etterna/Singletons/PrefsManager.h"
#include "RageUtil/Misc/RageLog.h"
#include "RageUtil/Utils/RageUtil.h"
#include "RageUtil/Misc/RageInputDevice.h"
#include "archutils/Win32/ErrorStrings.h"
#include "archutils/Win32/USB.h"
REGISTER_I... |
#include <SerialFlash.h>
#include <Adafruit_ILI9341_STM.h>
//Buffer sizes
#define USB_BUFFER_SIZE 128
#define FLASH_BUFFER_SIZE 1024
//Max filename length (8.3 plus a null char terminator)
#define FILENAME_STRING_SIZE 13
//State machine
#define STATE_START 0
#define STATE_SIZE 1
#define STATE_... |
#include <iostream>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <geometry/draw.hpp>
#define GRADIENT_MAX_CHECK
#define EDGE_THICK_CHECK
#include <lsd/lsd_el.hpp>
#include <lsd/lsd_ep.hpp>
#include <edge/edge_simple.hpp>
#include <edge/edge_drawing.hpp>
#include <... |
#include "../records/RandomAccessFilm.h"
void reportVisualError(const RandomAccessFilm &in,
const RandomAccessFilm &ref)
{
float displayMax = 100.0f;
// scale to display max
RandomAccessFilm displayIn = in;
displayIn.scale(Spectrum(displayMax, displayMax, displayMax));
RandomAccessFi... |
#include "fill_drawable.h"
#include "view.h"
view::view():
last_drawn(vector2(-1, -1)), last_size(vector2(-1, -1)) {
this->id = view_id++;
this->x = 0;
this->y = 0;
this->width = 0;
this->height = 0;
this->background = nullptr;
}
view::view(int x, int y, int width, int height):
last_drawn(vector2(-1, -1)), la... |
//https://omegaup.com/arena/problem/karel-obscuro-vs-karel
#include <cstdio>
#include <queue>
#include <iostream>
using namespace std;
struct inf
{
int t, mi, ma, i;
} inp;
struct pri
{
int n, d, t;
}n, np;
struct vinf
{
int d, t;
};
struct hp2
{
bool operator () (pri i, pri j)
{
if(i.... |
/**
* This is a demo to be used with EPD47 parallel from Lilygo:
* https://github.com/martinberlin/cale-idf/wiki/Model-parallel-ED047TC1.h
*
* The touch awareness of rotation is not working OK for rotation 1 & 3
* Still did not discovered why, if you do just make a pull request!
*
* This class expects L58Touch... |
//
// Created by oleg on 4/4/16.
//
#include "lexem_types.h"
#include "lexical_analysis.h"
using namespace std;
map<vertex, map<char, vertex>> edges;
map<vertex, lexem_types> terminals;
set<string> keywords = {
"for", "do", "while", "int", "boll", "double", "main", "else", "to", "downto", "cinout"
};
set<... |
/*
Copyright (c) 2015 - 2020 Advanced Micro Devices, Inc. All rights reserved.
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... |
// ****************************************************************************
// NOTICE
//
// This is the copyright work of The MITRE Corporation, and was produced
// for the U. S. Government under Contract Number DTFAWA-10-C-00080, and
// is subject to Federal Aviation Administration Acquisition Management
// System... |
#include "lccv.hpp"
#include <libcamera/libcamera/stream.h>
#include <time.h>
using namespace cv;
using namespace lccv;
PiCamera::PiCamera()
{
app = new LibcameraApp(std::make_unique<Options>());
options = static_cast<Options *>(app->GetOptions());
still_flags = LibcameraApp::FLAG_STILL_NONE;
options-... |
#include "pppch.h"
#include "SceneSerializer.h"
#include <yaml-cpp/yaml.h>
namespace YAML {
template <>
struct convert<glm::vec3> {
static Node encode(const glm::vec3& rhs) {
Node node;
node.push_back(rhs.x);
node.push_back(rhs.y);
node.push_back(rhs.z);
return node;
}
static bool decode(cons... |
//
// SetSourceIP.cpp
//
// This sample demonstrates setting the source IP address.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Net/SSLManager.h"
#include "Poco/Net/RejectCertificateHandler.h"
#include "Poco/Net... |
/*
Copyright (c) 2008-2018, <NAME> All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the fo... |
//
// Created by cheesema on 21.01.18.
//
//////////////////////////////////////////////////////
///
/// <NAME> 2018
const char* usage = R"(
Example setting the APR iterator using random access
Usage:
(using *_apr.h5 output of Example_get_apr)
Example_random_accesss -i input_apr_hdf5 -d input_directory
Note: There ... |
#include <iostream>
#include <string>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <progresso/progresso.h>
namespace
{
constexpr const char HideCursor[] = "\033[?25l";
constexpr const char ShowCursor[] = "\033[?25h";
}
namespace progresso
{
progresso::progresso(
u... |
/* -*- C++ -*- */
/*=============================================================================
// //
// This file is part of the TypeAccess/C-Super-Script software package. //
// //
// Copyright (C) 1995 <NAME>, <NAME>, //
// <NAME>, and Carnegie Mellon University ... |
/* -------------------------------------------------------------------------- *
* OpenSim Moco: exampleMocoTrack.cpp *
* -------------------------------------------------------------------------- *
* Copyright (c) 2019 Stanford University and the Authors *
... |
/*
// Copyright (C) 2020-2022 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 l... |
#include "jpeg.h"
#include <algorithm>
#include <csetjmp> // for mozjpeg error handling
#include <iostream>
#include <mozjpeg/jpeglib.h>
const uint8_t Jpeg::header_magic[] = { 0xFF, 0xD8, 0xFF };
bool Jpeg::keep_exif_ = false;
bool Jpeg::keep_icc_profile_ = false;
bool Jpeg::keep_all_metadata_ = false;
bool Jpeg::f... |
#include "dir_win.h"
#include "../menu_win.h"
#include "../../ncurse-wrap/util_nblock.h"
#include "../../ncurse-wrap/util_nborder.h"
static const Position _preP(5, 3);
static const Position _curP(2, 20);
static const Position _nextP(5, 60);
static const QStringList supportedFormat(QStringList() << "*.mp3" << "*.flac" ... |
#include <limits>
#include <stdexcept>
#include <algorithm>
#include <math.h>
#include <map>
#include "problem.h"
unsigned int Problem::getNodeCount() {
return Nodes.size();
}
unsigned int Problem::getVehicleCount() {
return Vehicles.size();
}
unsigned int Problem::getDumpCount() {
return Dumps.size... |
//
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) Contributors to the OpenEXR Project.
//
#ifdef NDEBUG
# undef NDEBUG
#endif
#include <ImfOutputFile.h>
#include <ImfInputFile.h>
#include <ImfChannelList.h>
#include <ImfArray.h>
#include <ImfFrameBuffer.h>
#include <ImfHeader.h>
#include <ImfThreading.h... |
#include <boost/test/unit_test.hpp>
#include "libs/sources_handling/row_data_input.h"
namespace local
{
column_data::data_type first {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
};
column_data::data_type second {
10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 1... |
#include <LoadObj.hpp>
#include <glm/glm.hpp>
#include <StringUtil.hpp>
#include <Log.hpp>
#include <vector>
#include <memory>
#include <iostream>
#include <fstream>
#include <unordered_map>
struct FaceCommand {
glm::ivec3 elem[3];
};
namespace std {
template<> struct hash<glm::ivec3>
{
// crappy hash, bu... |
// Copyright (c) 2015-2016, ETH Zurich, <NAME>, Zurich Eye
// 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
// noti... |
// Copyright 2020 Makani Technologies LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ... |
// Copyright 2015 Open Source Robotics Foundation, 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... |
// Copyright 2017 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 <fbl/algorithm.h>
#include <fbl/auto_call.h>
#include <limits>
#include <lib/fdio/io.h>
#include <stdio.h>
#include <zircon/assert.h>
#include "w... |
#pragma once
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/seq/size.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/stringize.hpp>
namespace myeosio {
template<typename T>
struct reflector {
typedef std::false... |
#include <polycrypto/PolyOps.h>
#include <polycrypto/PolyCrypto.h>
#include <polycrypto/RootsOfUnityEval.h>
#include <polycrypto/Dkg.h>
#include <polycrypto/Lagrange.h>
#include <polycrypto/FFThresh.h> // for random_subset()
#include <vector>
#include <cmath>
#include <iostream>
#include <ctime>
#include <fstream>
#i... |
/*
Ornament.cpp - IoT LED Ornament
<NAME>
<EMAIL>
Released into the public domain.
*/
#include "Arduino.h"
#include "Ornament.h"
#include <Adafruit_NeoPixel.h>
const int Ornament::led_count = 6;
const int Ornament::c_red = Adafruit_NeoPixel::Color(0, 255, 0);
const int Ornament::c_green = Adafruit_NeoPixel:... |
#include "AnalogSensor.h"
AnalogSensor::AnalogSensor()
{
pinMode(ADC_SPI_CS, OUTPUT);
// set initial PIN state
digitalWrite(ADC_SPI_CS, HIGH);
}
bool AnalogSensor::begin(uint8_t pins[ANALOG_CH_MAX], uint8_t types[ANALOG_CH_MAX], uint8_t adcExt, float range[ANALOG_CH_MAX][2])
{
// SPISettings settings(16000... |
#include <cstdint>
#include <iostream>
#include <filesystem>
#include <string>
#include <fstream>
#include <stack>
#if (defined(_MSC_VER) && _MSC_VER == 1900)
namespace fs = std::tr2::sys;
#else
namespace fs = std::filesystem;
#endif
#include "external/json/src/json.hpp"
using json = nlohmann::json;
... |
#include "spaceship.h"
#include "keyboard.h"
#include "window.h"
#include "level.h"
#include "config.h"
#include "shared.h"
static struct SPACESHIP player_list[MAX_SPACESHIPS]=
{
{250,
100,
Utils::CRect::Zero(),
3,3,{0},SPACESHIP_DIRECTION::LEFT,nullptr},
{250,
100,
... |
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <sys/farptr.h>
#include <dpmi.h>
#include <go32.h>
#include <pc.h>
#include <bios.h>
#include <time.h>
#include <unistd.h>
#include <iterator>
#include <string>
#include <memory>
#include <vector>
#include <array>
using std::vector;
using std::array;
#i... |
/*
This file is part of KDDockWidgets.
SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <<EMAIL>>
Author: <NAME> <<EMAIL>>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
Contact KDAB at <<EMAIL>> for commercial licensing options.
*/
/**
* @file
* @brief A widge... |
/*
MY VIDEO LIBRARY
C++ Project by <NAME> (9inpachi)
Made Opensource by me :)
Enjoy
*/
#include<iostream>
#include<fstream>
#include <direct.h>
using namespace std;
ifstream readFile;
ofstream writeToFile;
int chooseOption;
class video{
public:
//All variables used
string fileNameOutput;
st... |
//
// Created by Neil on 5/21/18.
// Particle filter node for localization
// (c) <NAME>, 2018, All Rights Reserved
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "sensor_msgs/NavSatFix.h"
#include "geometry_msgs/Pose2D.h"
#include "particle_filter.h"
#include <math.h>
#include <iostream>
#include "json.hp... |
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writi... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "Native.h"
#include <boost/optional.hpp>
#include <fstream>
#include <json/json.h>
#include <json/value.h>
#include "Deb... |
/* Copyright 2001, 2019 IBM Corporation
*
* 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 d... |
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
#include "db/db_table_walker.h"
#include <tbb/atomic.h>
#include "base/logging.h"
#include "base/task.h"
#include "db/db.h"
#include "db/db_partition.h"
#include "db/db_table.h"
#include "db/db_table_partition.h"
int DBTableWalker::walker_task... |
// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
//
// 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 <config.h>
#include <string>
#inclu... |
#include "Eigen-3.3/Eigen/Core"
#include "Eigen-3.3/Eigen/QR"
#include "helpers.h"
#include "json.hpp"
#include <chrono>
#include <iostream>
#include <math.h>
#include <thread>
#include <uWS/uWS.h>
#include <vector>
// for convenience
using json = nlohmann::json;
// Checks if the SocketIO event has JSON data.
// I... |
// =====================================================
// _______ _____ _______
// | ___| \| ___|
// | ___| -- | ___|
// |_______|_____/|_______|
// ---
// Ethan Development Editor
// =========================... |
/* Copyright (c) 2006, NIF File Format Library and Tools
All rights reserved. Please see niflib.h for license. */
//-----------------------------------NOTICE----------------------------------//
// Some of this file is automatically filled in by a Python script. Only //
// add custom code in the designated areas o... |
/*
* Copyright 2012 <NAME>, CRACS & INESC-TEC, DCC/FCUP
*
* 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 requir... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include "DataStructures/Tensor/TypeAliases.hpp"
// IWYU pragma: no_forward_declare Tensor
/// \cond
namespace gsl {
template <typename T>
class not_null;
} // namespace gsl
class DataVector;
/// \endcond
namespace grmhd {
namespa... |
/*
* File: microsurgery.cpp
* Copyright (C) 2009 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS)
*/
#include <string.h>
#include "tr/mo/microsurgery.h"
#include "tr/structures/descriptor.h"
#include "tr/mo/nodemoutils.h"
using namespace internal;
void nodeUpdateLinks(xptr node... |
/**
* @file llmetrics.cpp
* @author Kelly
* @date 2007-05-25
* @brief Metrics accumulation and associated functions
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/... |
#include "sdlwrapper.hpp"
#include "opengl_util.hpp"
#include "aabb.hpp"
#include "quads.hpp"
#include "atlas.hpp"
#include <iostream>
#include <string>
#include <exception>
#include <memory>
#include <vector>
#include <cmath>
int run()
{
unsigned win_w = 640;
unsigned win_h = 640;
sdl2::SDL sdl;
sdl2::VideoSys... |
#include <rectangle_cover.hpp>
#include <range/v3/core.hpp>
#include <range/v3/algorithm/count_if.hpp>
#include <range/v3/view/transform.hpp>
#include <array>
#include <cassert>
#include <limits>
#include <regex>
#include <string>
std::vector<Rectangle> parseInput(std::string_view input)
{
std::regex rx_line(R"(... |
// This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited.
#include "exec/vectorized/sorting/sorting.h"
#include <gtest/gtest.h>
#include <random>
#include "column/chunk.h"
#include "column/column_helper.h"
#include "exec/vectorized/sorting/sort_helper.h"
#include "exprs/vect... |
/*
Copyright (c) 2013, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of co... |
/* 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 <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <cs... |
#include "mouseeventeater.h"
#include "frmboxes.h"
#include "pkmviewer.h"
#include <QMenu>
MouseEventEater::MouseEventEater(QObject *parent) :
QObject(parent)
{
}
extern box_obj * frmCurBox;
extern int frmCurBoxNum;
int frmCurSlotNum = 0;
extern party_obj * frmParty;
pkmviewer * pview;
pokemon_obj * apkm = new poke... |
#include "../../head.h"
class SolutionMayTLERECURSIVE {
public:
int stoneGameV(std::vector<int> const & stoneValue) {
// plagiarizing from https://leetcode.com/problems/stone-game-v/discuss/806761/Python-DP
if (stoneValue.empty()) {
return 0;
}
int const stoneValueSize... |
/*
* TResourceFile.cc
*
* Turbo Vision - Version 2.0
*
* Copyright (c) 1994 by Borland International
* All Rights Reserved.
*
* Modified by <NAME> <<EMAIL>>
*/
#define Uses_TResourceFile
#define Uses_TResourceItem
#define Uses_fpstream
#define Uses_TCollection
#define Uses_TStringCollection
#define Uses_TReso... |
/* SevSegShift Library
*
* Copyright 2020 <NAME>
*
* 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... |
#pragma once
/********************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015, <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
*... |
#include <ork/lev2/gfx/egl.inl>
#include <GL/gl.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
//#include <xf86drm.h>
#include <xf86drmMode.h>
static const EGLint configAttribs[] = {
EGL_SURFACE_TYPE,
EGL_PBUFFER_BIT,
EGL_BLUE_SIZE,
8,
EGL_GREEN_SIZE,
8,
EGL_RED_SIZE,
8,... |
// 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 restriction, including without limitation the rights
// to use, copy, ... |
#include <algorithm>
#include <cmath>
#include <cstdint>
#include "bms_relay.h"
#include "packet.h"
namespace {
template <class T>
inline T clamp(T x, T lower, T upper) {
return std::min(upper, std::max(x, lower));
}
inline int16_t int16FromNetworkOrder(const void* const p) {
uint8_t* const charPointer = (uint8... |
#include "IntervalGen/IntGenForPosit32OneApprox.h"
#include "luts.h"
#include "math.h"
posit32 IntervalGenerator::MpfrCalculateFunction(posit32 x) {
/*
mpfr_set_d(mval, x, MPFR_RNDN);
mpfr_exp2(mval, mval, MPFR_RNDN);
return FromMPFR(mval);
*/
// If you want to make it run faster, you can... |
#pragma once
#include "enet/enet.h"
#include "lib/json/json.hpp"
#include "Server.hpp"
#include "World.hpp"
#include <vector>
#include <fstream>
#include <iostream>
#include <string>
struct InventoryItem {
unsigned short itemId;
unsigned char quantity;
};
struct PlayerInventory {
std::vector<Inve... |
#include <crystalnet-contrib/image/bmp.hpp>
#include <cstdint>
#include <cstdio>
#include <memory>
// https://en.wikipedia.org/wiki/BMP_file_format#Pixel_storage
uint32_t row_size(uint32_t width, uint8_t bitspp)
{
return ((width * bitspp + 31) / 32) * 4;
}
struct bmp_header_t {
uint32_t file_size; // fi... |
#include "dosspector.h"
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "vent.h"
struct _bmTrack {
uint8_t sectorsUsed[2];
uint8_t unused[2];
};
struct _vtoc {
uint8_t unused;
uint8_t catalogTrack;
uint8_t catalogSector;
uint8_t dosVersion;
uint8_t unused2[2];
uint8_t volumeNumber... |
#include <SPI.h>
#include <SD.h>
bool PlayFlag = 0; //to save status of recorder,playing or recording
bool RecFlag = 0;
uint8_t PLAYBtn = 5; //Pins for Recording and Playing the voice Samples
uint8_t RECBtn = 6;
uint8_t STOPBtn = 2;
const byte Speaker = 3; // OC2B
uint32_t dataCount = 0;
unsigned int numBytes;
... |
#include <windows.h>
#include <string>
#include <iostream>
#include <unordered_map>
#include <iomanip>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "nlp/WTSDR.h"
#include "vis/PrettySDR.h"
void print(std::wstring &str)
{
DWORD numCharsToWrite = str.length();
LPDWORD numCharsWritt... |
/**
* Copyright (C) <NAME> 2021
*
* xhci.h -- USB extensible host controller interface
*
* /PROJECT - Aurora Xeneva
* /AUTHOR - <NAME>
*
* ======================================================
*/
#include <drivers\usb\xhci.h>
#include <drivers\pci.h>
#include <stdio.h>
#include <arch\x86_64\mmngr\kheap.... |
/******************************************************************************
* *
* Copyright 2019 <NAME> *
* *
* Licensed un... |
#include "stdafx.h"
#include "PGLLPointCloud.h"
#include <algorithm>
#include <filesystem>
#include "Graphics/Application/TextureList.h"
#include "Graphics/Core/ShaderList.h"
#include "Graphics/Core/VAO.h"
#include "Utilities/FileManagement.h"
// Initialization of static attributes
const std::string PGLLPointCloud::B... |
#include <cmath> // sqrtf
#include <cuda.h>
#include <cuda_runtime.h>
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/shape_inference.h"
#include "tensorflow/core/framework/common_shape_fns.h"
using namespace tensorflow;
REGISTER_OP("Sphe... |
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "tools/v8windbg/src/local-variables.h"
#include <vector>
#include "tools/v8windbg/base/utilities.h"
#include "tools/v8windbg/src/object-inspe... |
/*
the vast starry sky,
bright for those who chase the light.
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define mk make_pair
const int inf=(int)1e9;
const ll INF=(ll)5e18;
const int MOD=998244353;
int add(int x,int y){x+=y; return x>=MOD ? x-MOD : x;}
int sub(int x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.