text stringlengths 3.08k 12.5k |
|---|
/*
* Copyright (c) 2019, 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 certa... |
#include <iostream>
#include <string>
#include <vector>
#include <windows.h>
using namespace std;
bool debugMode = true; //Debug
//user money
const char* userCurrency = "$";
double startingPocket = 5.99;
double startingBank = 30;
double userPocket = startingPocket;
double userBank = startingBank;
const int DANGER ... |
//
// Created by Srf on 2017/10/5.
//
#include "ResourceManager.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include "stb_image.h"
#include "common.h"
std::unordered_map<std::string, Texture2D> ResourceManager::textures;
std::unordered_map<std::string, Shader> ResourceManager::shaders;
std::unordere... |
/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#inc... |
#include "DataHolder.h"
#include <algorithm>
#include <unordered_set>
#include <fstream>
using namespace std;
DataHolder::DataHolder(const size_t nparts, const size_t localid, const bool varx)
: npart(nparts), pid(localid), varx(varx)
{}
void DataHolder::setLength(const size_t lx, const size_t ly){
nx = lx;
ny =... |
#include "ast.hpp"
#include "codegen.hpp"
#include "parser.hpp"
/**
* Name: LLVM_CTX
* Construct: Global variable
* Desc: The LLVM context of the program/module
*/
llvm::LLVMContext LLVM_CTX;
/**
* Name: BUILDER
* Construct: Global variable
* Desc: The LLVM IR building utility constructed under the global cont... |
/*
* Fast discrete cosine transform algorithms (C++)
*
* Copyright (c) 2018 Project Nayuki. (MIT License)
* https://www.nayuki.io/page/fast-discrete-cosine-transform-algorithms
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation file... |
/*-----------------------------------------------------------------------------
| Copyright (c) 2013, Nucleic Development Team.
|
| Distributed under the terms of the Modified BSD License.
|
| The full license is in the file COPYING.txt, distributed with this software.
|-------------------------------------------------... |
/***********************************************************
Author: <NAME>
Date: 11/5/2017
Abstract: Code for speech and recognition task
************************************************************/
//标准头文件
#include<ros/ros.h>
#include<iostream>
#include<std_msgs/String.h>
#include<string.h>
//navigation中需要使用的位姿信息头文... |
/**
* Copyright (c) 2012
* <NAME> <<EMAIL>>
* and the IceCube Collaboration <http://www.icecube.wisc.edu>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in a... |
// Copyright 2020 <NAME>
#include "src/preferencespanel.h"
#include <string>
#ifndef __WXOSX__
#include <filesystem>
#endif
#include <wx/config.h>
#include <wx/preferences.h>
#include <wx/wx.h>
using std::string;
#ifdef __WXOSX__
#include "src/filesystem.osx.polyfills.h"
#else
using std::filesystem::exists;
#en... |
/*
* Vector2.cpp
*
* Created on: November 12th, 2016
* Author: <NAME>
*/
#include <math.h> // pow()
#include <Mini2D/Units.hpp> // class definition
#define PI 3.14159265
#define DEG2RAD(x) ((x*PI)/180.0)
#define RAD2DEG(x) ((x*180.0)/PI)
namespace Mini2D {
... |
//
// VROGlyphAtlasOpenGL.cpp
// ViroKit
//
// Created by <NAME> on 7/10/18.
// Copyright © 2018 Viro Media. 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 ... |
/*
* Copyright (C) sunlei
*/
#include <sys/sysinfo.h>
#include <sys/wait.h>
#include <vector>
#include <ngx_core.h>
#include "base/at_exit.h"
#include "base/strings/stringprintf.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flags.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_socke... |
/*
* Copyright (c) 2011 The WebRTC 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 in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
// progressbar.cpp - GUIProgressBar object
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <sys/reboot.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <time.h>
#include <unistd.h>
#inc... |
/*
* Copyright (c) 2017, Intel Corporation
*
* 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, ... |
#include <ros/ros.h>
#include <geometry_msgs/PoseStamped.h>
#include <mavros_msgs/CommandBool.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/State.h>
#include <sensor_msgs/Imu.h>
#include "geometry_msgs/PoseStamped.h"
#include "geometry_msgs/Vector3Stamped.h"
#include <Eigen/Dense>
#include <Eigen/Core>
#in... |
#include "QtApp.hpp"
#include "QtMenu.hpp"
#include "PythonHelpers.h"
#include "PyUtils.h"
#include "PyThreading.hpp"
#include "PyQtGuiObject.hpp"
#include "QtBaseWidget.hpp"
#include <QAction>
#include <QTextCodec>
#include <QThread>
#include <QApplication>
#include <sys/types.h>
#include <unistd.h>
// Dummy vars fo... |
/*
* TCPServerProxy.cpp
*
* Created on: Apr 10, 2016
* Author: <NAME>
*/
#include "device/socket/tcp/TCPServerProxy.h"
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <string.h>
#include <cstdint>
#include ... |
#include <GL/glut.h>
#include <cmath>
#include <iostream>
#include <vector>
#include "arvore.h"
#include "cOpenGLWindow.h"
#include "cPoint.h"
#include "sCoordQuad.h"
cOpenGLWindow win(800, 800);
int count0 = 0;
int count1 = 0;
int funcao = 0;
int ray = 0;
bool quadric = false;
sCoordQuad rayTraci... |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
#include<assert.h>
#include<basicsecure.h>
#include<iomanip>
#include<secp256k1.h>
#include<sstream>
#include<string>
#include<string.h>
#include<utility>
#include"Secp256k1/Detail/context.hpp"
#include"Secp256k1/G.hpp"
#include"Secp256k1/PrivKey.hpp"
#include"Secp256k1/PubKey.hpp"
#include"Util/Str.hpp"
#include"Util/... |
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
/*
Copyright (c) 2019, Electrux
All rights reserved.
Using the BSD 3-Clause license for the project,
main LICENSE file resides in project's root directory.
Please read that file and understand the license terms
before using or altering the project.
*/
#include "ExecInternal.hpp"
#include "CallFunc.hpp"
std::str... |
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or ... |
#include <string>
#include "drawable.hpp"
#include "utils.hpp"
#include "controller.hpp"
#include "crossplat.hpp"
#include "limits.h"
#include <ncurses.h>
using namespace std;
using namespace KASM;
//Drawable classes/methods
/*
Renderable cell
character: Printed character
attr: binary flags for color, ... |
/**************************************************************
*
* 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... |
/**************************************************************
*
* 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... |
#include "pacman.h"
#include <display.h>
#include <BSidesBadge2020.h>
#include <BadgeOs.h>
#include <BadgeApp.h>
#include <menu.h>
#include <Pacman.h>
#ifdef ESP32
#include <soc/rtc.h>
#endif
pacman::Engine pacman_game;
BadgeApp pacman_app;
bool init_pacman = true;
bool exit_pacman = false;
#define ... |
#include "JsonImportPrivatePCH.h"
#include "AnimationBuilder.h"
#include "JsonImporter.h"
#include "UnrealUtilities.h"
#include "AnimationBuilder.h"
#include "LocTextNamespace.h"
#include "Runtime/Engine/Classes/Animation/AnimSequence.h"
#define LOCTEXT_NAMESPACE LOCTEXT_NAMESPACE_NAME
using namespace UnrealUtilit... |
#include <QPushButton>
#include "gotodialog.h"
#include "icons.h"
#include "ui_gotodialog.h"
#include "medo/state.h"
#include "helpers.h"
GotoDialog::GotoDialog(QWidget* parent, Storage* storage) : QDialog(parent), ui(new Ui::GotoDialog) {
ui->setupUi(this);
Helpers::setupResizableDialog(this);
ui->textSea... |
#include "Application.h"
#include "EnemyBEE.h"
#include "ModuleCollision.h"
#include "Animation.h"
#include "ModuleEnemies.h"
#include "ModuleParticles.h"
#include "ModulePlayer.h"
#include "ModulePlayer2.h"
#include <math.h>
Enemy_Bee::Enemy_Bee(int x, int y, bool powerUp) : Enemy(x, y)
{
counter2 = 0;
Front.PushBa... |
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
enum Cell {
WALL,
EMPTY,
CAMERA,
INITIAL,
LEFT,
RIGHT,
UP,
DOWN,
DEAD,
};
bool is_conveyor(Cell c) { return c >= LEFT && c <= DOWN; }
const int MN = 100;
const int MM = 100;
Cell factory[MN][MM];
pair<in... |
#include <Geometry/CSCGeometry/interface/CSCGeometry.h>
#include <Geometry/CSCGeometry/interface/CSCChamberSpecs.h>
#include <Geometry/CSCGeometry/interface/CSCLayerGeometry.h>
#include <Geometry/CSCGeometry/src/CSCWireGroupPackage.h>
#include <DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h>
#include <F... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with San... |
/* @(#)s_cbrt.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
* software is freely granted, provided th... |
#include <cmath>
#include "../rover_util/delayed_execution.h"
#include "../rover_util/utils.h"
#include "../rover_util/serial_command.h"
#include "../actuator/motor.h"
#include "../actuator/motor_constant.h"
#include "../constants.h"
//#include "../manager/accel_manager.h"
#include "../sensor/nineaxis.h"
#include "../a... |
//
//
// MIT License
//
// Copyright (c) 2017 Stellacore Corporation.
//
// 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 ... |
/**
* @file client.cpp
* @author <NAME>
*
* @brief CORBA C++11 client application
*
* @copyright Copyright (c) Remedy IT Expertise BV
*/
#include "testC.h"
#include "testlib/taox11_testlog.h"
#include "ace/Get_Opt.h"
#include "test_sequences.h"
#include "test_corba_sequences.h"
#include "test_bounded_se... |
#include "folk/folk.hpp"
#include "folk/scene/transform_component.hpp"
#include "folk/input.hpp"
#include "folk/render/visual_component.hpp"
#include "folk/core/error.hpp"
#include "folk/core/log.hpp"
#include <iostream>
// Esta función se llama antes de inicializar la escena
void Folk::engineInit() {
Folk::Engin... |
/*
* This file is part of the Visual Computing Library (VCL) release under the
* MIT license.
*
* Copyright (c) 2018 <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 r... |
//
// main.cpp
// lab6
//
// Created by <NAME> on 30.04.2018.
// Copyright © 2018 <NAME>. All rights reserved.
//
#include <iostream>
#include <stdlib.h>
#include <math.h>
struct Customer
{
int val;
unsigned int height;
Customer *right = NULL;
Customer *left = NULL;
};
struct Queue
{
Customer... |
// Copyright (c) 2011-2020 <NAME>
// See LICENSE and README
#include "framebuffer_viewer.h"
#include "compatible_opengl.h"
#include "fj_numeric.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace fj;
static const char USAGE[] =
"Usage: fbview [options] file(*.fb, *.mip)\n"
"Options:\n"
" ... |
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>
#include "DLStylerNode.h"
#include "DLStylerNodePrivate.h"
#include "DLStyler.h"
#include "DLStylerPrivate.h"
#include "DLStylerStyleRule.h"
#include "DLStylerStyleRulePrivate.h"
#include "DLStylerStyleItem.h"
#include "DLStylerStyleItemPriva... |
//
// Simu5G
//
// Authors: <NAME>, <NAME>, <NAME> (University of Pisa)
//
// This file is part of a software released under the license included in file
// "license.pdf". Please read LICENSE and README files before using it.
// The above files and the present reference are part of the software itself,... |
/*
* Copyright (C) 2018 <NAME>
* Licensed under MIT license, see file LICENSE in this source tree.
*/
#include <algorithm>
#include <cstdint>
#include <array>
#include <utility>
#include <numeric>
#include <iostream>
#include <boost/spirit/include/karma.hpp>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include ... |
/*
* Copyright (c) 1993-1997, Silicon Graphics, Inc.
* ALL RIGHTS RESERVED
* Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and this permission... |
#include "of_message_modify_flow.h"
using namespace std;
// constructor
of_message_modify_flow::of_message_modify_flow() {
clear();
}
// clears the object
void of_message_modify_flow::clear() {
msg_type = OFPT_FLOW_MOD;
flow_description.clear();
command = OFPFC_ADD;
idle_timeout = 0;
hard_timeout = 0;
buffer_i... |
/**
* @file llviewergesture.cpp
* @brief LLViewerGesture class implementation
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the G... |
// https://zh.puzzle-nurikabe.com/
#include <iostream>
using namespace std;
class GridType {
public:
GridType() {
}
GridType(string type) {
this -> type = type;
}
GridType(string type, int number) {
this -> type = type;
this -> number = number;
}
string getType() {
... |
#include "Step1.h"
#include "spdlog_wrapper.h"
namespace {
DWORD gShootCounterAddr = 0;
/* For infinite ammo patch */
BOOL gIsInfiniteAmmoPatched = FALSE;
LPVOID gInfiniteAmmoNewMemBlock = NULL;
LPVOID gInfiniteAmmoPatchCode = NULL;
const BYTE gVictim[] = {
0x83, 0x43, 0x6C,... |
#include "PathFinder.h"
bool PathFinder::CanWalkTo(Point p, int direction)
{
switch (direction)
{
case Direction::north:
return mMap.TileWalkable(p + Point(0, -1));
break;
case Direction::east:
return mMap.TileWalkable(p + Point(1, 0));
break;
case Direction::south:
return mMap.TileWalkable(p + Point(0,... |
/* $Id: dag_glue.cpp,v 1.3 2009/04/07 23:41:40 rumble Exp $ */
#include <stdlib.h>
#include <string>
#include <iostream>
#include <vector>
#include <string>
#include <climits>
#include <fstream>
#include <zlib.h>
#include <stdint.h>
#include "../common/dag_align.h"
#include "../common/dag_glue.h"
//extern "C" {
#incl... |
// fstexprintstrings.cc
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, ... |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2016 The Bitcoin Core developers
// Copyright (c) 2018-2020 Bitcoin Association
// Distributed under the Open BSV software license, see the accompanying file
// LICENSE.
#include "script.h"
#include "consensus/consensus.h"
#include "instruction_iterator.h"
#inclu... |
#include <assert.h>
#include <iostream>
#include <fstream>
#include <utility>
#include <algorithm>
#include <set>
#include <vector>
#include <string>
#include <math.h>
using namespace std;
#include "PSMScores.h"
#include "util/utils.h"
inline bool operator>(const PSMScoreHolder &one, const PSMScoreHolder &other)
... |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
int min(long long a, long long b){
if (a < b) return a;
else return b;
}
int max(long long a, long long b){
if (a > b) return a;
else return b;
}
struct Node{
int l;
int r;
... |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
// threaded version of exp_f0
#include "../src/robust_sampler.h"
#include "../src/robust_f0.h"
#include "../src/point.h"
#include "../src/hash.h"
#include "../src/exp_utils.h"
#include "../src/timer.h"
#include "../src/utils.h"
#include <functional>
#include <iostream>
#include <vector>
#include <thread>
#include <map... |
/* Copyright (C) 2014 InfiniDB, Inc.
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; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but W... |
/*
ID: skyline12
PROG: castle
LANG: C++11
*/
// <NAME> 5/5/2016
#include <fstream>
#include <vector>
using std::vector;
vector<vector<int> > module;
vector<vector<int> > mod; // processed module
vector<int> roomsize; // size of room with given no.
int M, N; // row, column
// colored the module
int process_module(); /... |
/**
* parser_worker_driver.cc
*/
#include <getopt.h>
#include <iostream>
#include <memory>
#include <signal.h>
#include <Parser.h>
#include <ParserCommon.h>
#include <ParserFactory.h>
#include <ParserWorker.h>
namespace BlackLibraryParsers = black_library::core::parsers;
struct options
{
BlackLibraryParsers:... |
/*
https://leetcode.com/problems/design-twitter/
355. Design Twitter
Medium
1667
251
Add to List
Share
Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user's news feed.
Implement the Twitter class:
Twitter() Init... |
#include <cmath>
#include <vector>
#include <iostream>
#include <glm\gtc\matrix_transform.hpp>
#include "Torus.h"
using namespace std;
Torus::Torus() {
prec = 48;
inner = 0.5f;
outer = 0.2f;
init();
}
Torus::Torus(float in, float out, int precIn) {
prec = precIn;
inner = in;
outer = out;
init();
}
float Toru... |
/*
license under zlib license
Copyright (C) 2020-2021 <NAME>
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,
... |
#include "Screen.h"
const String fMul[8] = {"0.1", "1 ", "2 ", "5 ", "10 ", "20 ", "50 ", "100"}; // frequency multipliers
//const String fMul[] = {"1/24", "1/12", "1/8 ", "1/6 ", "1/4 ", "1/3 ", "1/2 ", "2 "}; // frequency multipliers
Screen::Screen() {
// default constructor
}
Screen::Screen(UTFT _lcd, uin... |
#include <memory>
#include <units/acceleration.h>
#include <units/angular_acceleration.h>
#include <units/angular_velocity.h>
#include <units/length.h>
#include <units/velocity.h>
#include <subsys/interfaces/IChassis.h>
#include <subsys/DifferentialChassis.h>
#include <subsys/ChassisFactory.h>
#include <subsys/Swerv... |
#include <rabbit/graphics/texture.hpp>
#include <rabbit/core/config.hpp>
#include <rabbit/graphics/graphics.hpp>
#include <rabbit/core/compression.hpp>
#include <rabbit/graphics/image.hpp>
#include <rabbit/graphics/s3tc.hpp>
using namespace rb;
inline std::uint32_t calculate_mipmap_levels(const vec2u& textur... |
// license:BSD-3-Clause
// copyright-holders:<NAME>
/***************************************************************************
The Game Room Lethal Justice hardware
***************************************************************************/
#include "emu.h"
#include "includes/lethalj.h"
#define BLITTER_SOUR... |
#include "pch.h"
#include <stdio.h>
#include<string.h>
#include<malloc.h>
struct student {
int cod;
char* nume;
int nrNote;
int* note;
};
struct nodld {
student inf;
nodld* next;
nodld* prev;
};
nodld* creezNod(student s) {
nodld* nou = (nodld*)malloc(sizeof(nodld));
nou->inf.cod = s.cod;
nou->inf.nume = (ch... |
// -*- C++ -*-
//
// Package: SiStripDetId
// Class : SiStripSubStructure
//
// Implementation:
// <Notes on implementation>
//
// Original Author: dkcira
// Created: Wed Jan 25 07:19:38 CET 2006
//
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "DataFormats/SiStripDet... |
#include <moveit_benchmark_suite/benchmark.h>
#include <moveit_benchmark_suite/log.h>
#include <queue>
#include <moveit/collision_detection_fcl/fcl_compat.h>
#include <moveit/collision_detection_bullet/collision_env_bullet.h>
#include <moveit_benchmark_suite/yaml.h>
#include <moveit_benchmark_suite/constants.h>
usin... |
/**********
This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
This libr... |
/*
* Copyright (c) 2014-2017 The University of Utah
*
* 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... |
// Copyright: This program is released into the public domain.
// Refer to:
// https://docs.opencv.org/3.1.0/d3/d63/classcv_1_1Mat.html
#include <iostream>
#include <string>
#include <map>
#include <opencv2/core/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui/highgui.hpp>
#define ADD_TYPE(t) re... |
#include "Client.h"
Client* Client::instance_ = nullptr;
Client::Client() {
if (SDL_Init(0) == -1) {
printf("SDL_Init: %s\n", SDL_GetError());
exit(1);
}
if (SDLNet_Init() == -1) {
printf("SDLNet_Init: %s\n", SDLNet_GetError());
exit(2);
}
printf("Starting client...\n");
... |
#include <Box2D/Box2D.h>
#include <stdio.h>
#include <emscripten.h>
extern "C" {
extern void b2WorldBeginContactBody(void* contactPtr);
extern void b2WorldEndContactBody(void* contactPtr);
extern void b2WorldPreSolve(void* contactPtr, void* oldManifoldPtr);
extern void b2WorldPostSolve(void* contactPtr, void* ... |
/*
This Tool was created by GitRubbens on 2021
*/
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <map>
using namespace std;
bool isNmbr(string number) {
int nmbr = 0;
for (int i = 0;i < number.length() ;i++) {
if (((string)"0123456789").find(number.substr(i,i+1)) != -1) {
continue;
... |
#include <LPS331.h>
#include <Wire.h>
// Defines ///////////////////////////////////////////////////////////
// The Arduino two-wire interface uses a 7-bit number for the address,
// and sets the last bit correctly based on reads and writes
#define LPS331AP_ADDRESS_SA0_LOW 0b1011100
#define LPS331AP_ADDRESS_SA0_HIGH... |
/*========================================================================*
* *
* Distributed by Whiteley Research Inc., Sunnyvale, California, USA *
* http://wrcad.com *
* Copyright (... |
// License Summary: MIT see LICENSE file
#include "al2o3_platform/platform.h"
#include "al2o3_cmath/scalar.h"
#include "al2o3_memory/memory.h"
#include "fire.hpp"
#include <random>
static int const SuperSampleRate = 8;
Fire::Fire(uint32_t width_, uint32_t height_) :
width{width_},
height{height_},
doubleBuffer... |
#pragma GCC optimize ("O2")
#include<bits/stdc++.h>
#include<unistd.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define F first
#define S second
#define PB push_back
#define ALL(x) begin(x),end(x)
#define SZ(x) ((int)(x).size())
#define IOS ios_base::sync_with_s... |
#include <functional>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <vector>
#include <thread>
#include <future>
#include <chrono>
#include <atomic>
#include <string>
#include <random>
#include <mutex>
#include <cmath>
#include "excllocks.hpp"
#include "rwlocks.hpp"
#if 1
template<typename LockTy... |
//=====================================================================-*-C++-*-
// File and Version Information:
// $Id: RooUnfoldDagostini.cxx 298 2011-09-30 19:14:46Z T.J.Adye $
//
// Description:
// Unfolding interface to Fortran routine, BAYES, by <NAME> from
// http://www.roma1.infn.it/~dagos/bayes... |
#include <stdio.h>
#include <fcntl.h>
#include <assert.h>
#include <time.h>
#include <sys/time.h>
#include <sys/shm.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <curl/curl.h>
#include "context.h"
#include "tangram.h"
#include "platform_linux.h"
#include <iostream>
#include "glm/trigonome... |
#include "d3d12/Camera.h"
#include <algorithm>
#include <cmath>
DirectX::XMMATRIX PinholeCamera::GenerateViewPerspectiveTransform(float aspectRatio) const {
DirectX::XMVECTOR pos = DirectX::XMLoadFloat4(&this->position_);
DirectX::XMVECTOR look_at = DirectX::XMLoadFloat4(&this->look_at_);
DirectX::XMVECTOR up =... |
/**
contact: <EMAIL>
Copyright (c) 2018 University of Pennsylvania. All rights reserved.
Use of this source code is governed by license located in license file:
https://github.com/CBICA/InciSe/blob/main/LICENSE
**/
#include <mitkCommandLineParser.h>
#include <mitkIOUtil.h>
#include <mitkDataStorage.h>
#include <mitkSta... |
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "DataTypes.h"
#include "Intersections.h"
void Intersections::insertCoincidentPair(double s1, double e1, double s2, double e2,
const _Point& startPt, const _P... |
// ENNEoS loader demonstration
// Loads neural network genomes created
// by the ENNEoS encoder
//
// For testing the encoding of shellcode in neural networks
//
// <NAME>, <EMAIL>
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include "genotype.h"
#include "phenotype.h"
#include "CIn... |
//----------------------------------
// (c) Reliable Software, 2006
//----------------------------------
#include "precompiled.h"
#undef DBG_LOGGING
#define DBG_LOGGING false
#include "MergeInstrumentBar.h"
#include "UiManagerIds.h"
#include "UiStrings.h"
#include <Ctrl/Edit.h>
#include <Dbg/Out.h>
MergeInstrumen... |
/*
*
* extend.cpp
* Functions to extend a sparse distance matrix
*
*/
#include <cstddef> // size_t
#include <cstdint>
#include <vector>
#include "extend.hpp"
const float epsilon = 1E-10;
// Get indices where each row starts in the sparse matrix
std::vector<long> row_start_indices(const sparse_coo &sparse_rr_mat... |
////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2006 - 2015, <NAME>, <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 res... |
#include "../include/morph_library.h"
LoewnerMorphology::MorphColorMatrix LoewnerMorphology::Morph::morph_basic_operation(Circle *start, int pWidth, int *mask, int padding, bool type) {
int n = 2 * padding + 1;
MorphSmallestCircleProblemMask scp(start, mask, n, n, pWidth);
Circle result = scp.compute();
if (ty... |
#include "opengl_renderer.h"
#include <QQuickItem>
#include <QOpenGLBuffer>
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QOpenGLTexture>
#include <QtMath>
namespace
{
GLfloat constexpr coords[4][3] = {
{ +1, -1, -1 },
{ -1, -1, -1 },
{ -1, +1, -1 },
{ +1,... |
#include "sjobexecthreadinfo.h"
QString SJobExecThreadInfo::_err_string;
QTextStream SJobExecThreadInfo::_err_stream(&SJobExecThreadInfo::_err_string);
SJobExecThreadInfo::SJobExecThreadInfo(const QString &runDir, int threadId) :
_runDir(runDir),
_hasInfo(false),
_threadId(threadId),
_kind(QString()),... |
/*
pbrt source code Copyright(c) 1998-2012 <NAME> and <NAME>.
This file is part of pbrt.
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 copyr... |
#include "OGLExtention.hpp"
#include <iostream>
#if defined (WIN32)
#define getProcAddress wglGetProcAddress
#define TYPE char
#else
#define TYPE GLubyte
#if defined(__APPLE__)
#define getProcAddress NSGLGetProcAddress
#else
#define getProcAddress glXGetProcAddress
#endif
#endi... |
// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... |
#include <cstddef>
#include <cstdint>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <array>
#include <vector>
#include <functional>
#include "TestBed.hpp"
#include <qHilbert.hpp>
#define TRIALCOUNT 10
// With a 2D Hilbert curve, every 2 b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.