text stringlengths 3.08k 22k |
|---|
#include "Model_3DS.h"
#include "../GLExtension/glxs.h"
#include <sstream>
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
// Load 3DS model
CModel3DS::CModel3DS(std::string filename)
{
m_TotalFaces = 0;
m_model = lib3ds_file_load(filename.c_str());
// If loading the model failed, we throw... |
#include "Main.h"
#include "AudioPreview.h"
//----------------------------
class C_client_audio_preview: public C_client{
private:
class C_mode_this;
friend class C_mode_this;
void InitLayout(C_mode_this &mod);
void ProcessInput(C_mode_this &mod, S_user_input &ui, bool &redraw);
void Tick(C_mode_this ... |
//===-- Unittests for the fopencookie function ----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
#include "minorGems/network/SocketClient.h"
#include "minorGems/system/Thread.h"
#include "minorGems/util/random/JenkinsRandomSource.h"
#include "minorGems/formats/encodingUtils.h"
JenkinsRandomSource randSource;
void usage() {
printf( "Usage:\n" );
printf( "stressTestClient server_address server_port em... |
#include "olcConsoleGameEngine.h"
using namespace std;
struct vec3d
{
float x, y, z;
};
struct triangle
{
vec3d p[3];
};
struct mesh
{
vector<triangle> tris;
};
struct mat4x4
{
float m[4][4] = { 0 };
};
class olcEngine3D : public olcConsoleGameEngine
{
public:
olcEngine3D()
{
m_sAppName = L"3D Demo";
}
... |
// this will requrire one to change the the source directory in the build system
#include "algorithms/CPlusPlus/Trees/huffmanCode/huffman.h"
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <sstream>
#include <iterator>
#include <algorithm>
#include <map>
#include <bitset>
#include <... |
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2017 <NAME>. All rights reserved. *... |
///////////////////////////////////////////////////////////////////////////////
///
/// \file Standard.hpp
/// Include standard header files.
///
/// Authors: <NAME>
/// Copyright 2010-2011, DigiPen Institute of Technology
///
///////////////////////////////////////////////////////////////////////////////
#pra... |
/*
Copyright [2018, 2019] [IBM Corporation]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... |
#include "stdafx.hxx"
#include "mod-abstract-racing.hxx"
#include "mws/mws-camera.hxx"
#include "gfx-state.hxx"
#include "gfx-vxo-ext.hxx"
//#include "renderer-openvg.h"
#include "mws/mws.hxx"
//#include "renderer.h"
//#include "3d-objects.h"
#include "track.hxx"
#include "rng/rng.hxx"
#include <glm/inc.hpp>
#include ... |
//////////////////////////////////////////////////////
///
/// <NAME> 2018
///
const char* usage = R"(
Form the APR form image: Takes an uint16_t input tiff image and forms the APR and saves it as hdf5. The hdf5 output of this program
can be used with the other apr examples, and also viewed with HDFView.
Usage:
(min... |
/*
* Copyright (c) 2014-2022 The Voxie Authors
*
* 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, mer... |
#include "OBJ_Loader.hpp"
#include "auxiliary.h"
#include "primitive.h"
mesh::mesh(const std::string &name,
const vector3f &pos,
float scale_,
std::shared_ptr<struct material> &mt)
:name_(name),mat(mt)
{
std::vector<AABB3f> objs;
areatotal = 0.f;
bounds = AABB3f();
model_matrix = matrix4f::Identity();
scale_m... |
#include "common.h"
#include "processing.h"
DSPfract sampleBuffer[MAX_NUM_CHANNEL][BLOCK_SIZE];
// Command line arguments: [input filename] [output filename] [gain: 0 to -inf dB, defualt -4] [output mode: defualt 2_2_0] //
int main(int argc, char* argv[])
{
// Check if right arguments were passed
if (argc < 3 || ... |
#include "TextureRect.h"
#include <assert.h>
#include "HelpFunction.h"
#include "MatrixState3D.h"
#include "Constant.h"
#include "CalNormal.h"
#include <string.h>
#include <mylog.h>
TextureRect::TextureRect(float* vdataIn, int vdataByteCount, int vCountIn, int* indexDataIn, int indexDataByteCount, int indexCountIn, VkD... |
//
// VROSkybox.cpp
// ViroRenderer
//
// Created by <NAME> on 1/11/16.
// Copyright © 2016 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 witho... |
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ... |
// This file is a part of Simple-XX/SimpleKernel
// (https://github.com/Simple-XX/SimpleKernel).
// Based on https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
// multiboot2.cpp for Simple-XX/SimpleKernel.
#include "assert.h"
#include "multiboot2.h"
using namespace MULTIBOOT2;
void MULTIBOOT2::print_... |
#include "ipc_client.h"
#include "parser.h"
#include "prost_planner.h"
#include "utils/base64.h"
#include "utils/string_utils.h"
#include "utils/strxml.h"
#include "utils/system_utils.h"
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <netdb.h>
#include <sstream>
#include <sys/s... |
/*
* This file belongs to the Galois project, a C++ library for exploiting parallelism.
* The code is being released under the terms of the 3-Clause BSD License (a
* copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
#include "Ucodei.h"
#include "Label.h"
#include "UcodeiStack.h"
#include "Interpret.h"
Interpret::Interpret() : stack(STACKSIZE)
{
arBase = 4;
tcycle = 0;
exeCount = 0 ;
}
int Interpret::findAddr(int n)
{
int temp;
if (!instrBuf[n].value1)
errmsg("findAddr()", "Lexical level is zero ...");
else if (i... |
/*
* {_ {__ {__{_______ {__ {__
* {_ __ {_ {__ {___{__ {__ {__ {__
* {_ {__ {__ {__ { {__{__ {__ {__ {__ {__
* {__ {__ {__ {__ {__{_ {__ {_ {__ {__
* {______ {__ {__ {_ {__{__ {__ {_____ {__... |
#include "ukf.h"
#include <Eigen/Dense>
#include <cmath>
using Eigen::MatrixXd;
using Eigen::VectorXd;
/**
* Initializes Unscented Kalman filter
*/
UKF::UKF() {
// if this is false, laser measurements will be ignored (except during init)
use_laser_ = true;
// if this is false, radar measurements will be ignor... |
// ===============================
// PC-BSD SysAdm Bridge Server
// Available under the 3-clause BSD License
// Written by: <NAME> <<EMAIL>> May 2016
// =================================
#include "globals.h"
#include <unistd.h>
#include <sys/types.h>
#include "BridgeServer.h"
#define DEBUG 0
#define USELOG 1 //tur... |
/* <NAME>
* HiMER Lab at U. of Illinois, Chicago
* ArUco Marker Joint Tracker
*
* interface.cpp
* Contains functions for getting program options and displaying program usage.
*
* ImGui sample code obtained from: https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx11/main.cpp
* ImGui fon... |
/*=========================================================================
Library: TubeTK
Copyright 2010 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Lic... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
#include <QtCore/QMultiHash>
#include "Model.h"
#include "Manager.h"
HsQMLAutoListModel::HsQMLAutoListModel(QObject* parent)
: QAbstractListModel(parent)
, mMode(ByReset)
, mEqualityTestValid(false)
, mKeyFunctionValid(false)
, mOldOffset(0)
, mDefer(false)
, mPending(false)
{
}
void HsQM... |
#include <Arduino.h>
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
#include <WiFiClient.h>
#include <PubSubClient.h>
//for LED status
#include <T... |
// Copyright (c) 2017-2020, Lawrence Livermore National Security, LLC and
// other Axom Project Developers. See the top-level COPYRIGHT file for details.
//
// SPDX-License-Identifier: (BSD-3-Clause)
/**
* \file
*
* \brief Example code to support slam user doc examples
*/
/* This example code contains snippets us... |
#include "controller.h"
#include "model/game.h"
#include "model/player.h"
#include "model/move.h"
#include "model/PGN.h"
#include "view/text_view.h"
using namespace std;
Controller::Controller() {
// Arbitrarily set current game/view pointers
this->game = NULL;
this->text_view = NULL;
this->lastGame = ... |
/******************************************************************************
* @file hgpu_md5.cpp
* @author <NAME> <<EMAIL>>
* @version 1.0.3
*
* @brief [HGPU library]
* MD5 submodule for HGPU package
*
*
* @section LICENSE
*
* Copyright (c) 2013-2017 <NAME>
* All rights reserved.
*... |
// RTSP Pusher
#include "xop/RtspPusher.h"
#include "xop/DigestAuthenticator.h"
#include "net/Timer.h"
#include <thread>
#include <memory>
#include <iostream>
#include <string>
#include "md5/md5.hpp"
// #define PUSH_TEST "rtsp://10.11.165.203:554/test"
class H264File
{
public:
H264File(int buf_siz... |
#include <drivers/vga.h>
#include <common/fonts.h>
using namespace dogos::drivers;
using namespace dogos::common;
using namespace dogos::hardware;
VideoGraphicsArray::VideoGraphicsArray() :
miscPort(0x3c2),
crtcIndexPort(0x3d4),
crtcDataPort(0x3d5),
sequencerIndexPort(0x3c4),
sequencerDataPort(0x3c5),
graphicsControll... |
/*
* Hardware.cpp
*
* Provides a simple access point for all the hardware connected
* If we connect more hardware to the device we need to add access methods here.
*
* Created on: 22/05/2013
* Author: roger
*/
#include "Hardware.h"
ILI9341_t3 Graphics(TFT_CS, TFT_DC);
MAX30105 particleSensor;
TimeChang... |
/*
* Copyright 2020-2021 <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 agreed to in wri... |
#include "../behaviors/naobehavior.h"
#include "../audio/audio.h"
#include <common/RobotInfo.h>
extern int agentBodyType;
static Effectors UTWalkJointToSimEffectors(const Joint j) {
switch (j) {
case HeadYaw:
return EFF_H1;
case HeadPitch:
return EFF_H2;
case LHipYawPitch:
retu... |
#include <portinfo>
#include "Query.hh" // implementation of class methods
#include "geomodelgrids/serial/Model.hh" // USES Model
#include "geomodelgrids/serial/ModelInfo.hh" // USES ModelInfo
#include "geomodelgrids/serial/Block.hh" // USES Block
#include "geomodelgrids/serial/Surface.hh" // USES Surface
#include "g... |
#include "emp-sh2pc/emp-sh2pc.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <bitset>
#include <string>
#include <vector>
#include <assert.h>
#include <time.h>
using namespace emp;
using namespace std;
const int INT_SIZE = 16;
// Based off of the EMP example
void test_millionare(int party, in... |
/*
* Copyright (c) 2014 Hackdirt Ltd.
* Author: <NAME> (<EMAIL>)
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from the
* use of this software. Permission is granted to anyone to use this software for
* any pu... |
/*
check_util.c -- utility functions needed only by ckmame itself
Copyright (C) 1999-2015 <NAME> and <NAME>
This file is part of ckmame, a program to check rom sets for MAME.
The authors can be contacted at <<EMAIL>>
Redistribution and use in source and binary forms, with or without
modification, are perm... |
/*
Authors:
<NAME>
<NAME>
*/
#include <cmath>
#include <iostream>
#include <franka/duration.h>
#include <franka/exception.h>
#include <franka/model.h>
#include <franka/robot.h>
#include <franka/gripper.h>
#include <cmath> // for isnan()
#include <limits> // for quiet_NaN
// for subscribers
#include "ros/ros.h"
#i... |
/* WarGame.cpp
* <NAME>
* CIS 554-M401 Object Oriented Programming in C++
* Syracuse University
* HW #5 - Student-Selected Program
* 2/16/2020
* This program contains the implementation of the class methods defined in the WarGame.h header file
*/
#include "WarGame.h"
#include <iostream>
#include <iomanip>
#inclu... |
/**
* Copyright (C) 2020 Lachesis <<EMAIL>>
*
* Permission to use, copy, modify, and 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 all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DI... |
// Copyright (c) 2019-2021 Simons Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0.txt
//
// Unless required by applicable l... |
#include <array>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <numeric>
#include <thread>
#include <xcb/xcb.h>
#include <xcb/xcb_util.h>
#include <xcb/xproto.h>
#include <xcb/randr.h>
namespace candella
{
struct version_info... |
/*
2010-2016
<NAME>
http://guillaumebelz.wordpress.com/
http://guillaume.belz.free.fr/
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compil... |
//Copyright (C) 2010 by <NAME>
//
//Released under the MIT license, see LICENSE.txt
#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <fstream>
#include <algorithm>
#include <iterator>
#include "ftagtrain.h"
#include "ftaggen.h"
#include "ftagargs.h"
#include "axtpair.h"
using namespa... |
#include "CCalibFromLines.h"
#include <mrpt/math/geometry.h>
CCalibFromLines::CCalibFromLines(CObservationTree *model, TCalibFromLinesParams *params) :
CExtrinsicCalib(model)
{
this->params = params;
}
CCalibFromLines::~CCalibFromLines(){}
void CCalibFromLines::segmentLines(const cv::Mat &image, Eigen::MatrixXf... |
//==============================================================================
// Copyright Intel Corporation
//
// SPDX-License-Identifier: MIT
//==============================================================================
///
/// A minimal oneAPI Video Processing Library (oneVPL) encode application.
///
/// @fil... |
#include "flowchart.h"
#include <QPointF>
#include <QString>
#include "block.h"
#include "blocktype.h"
#include "blockpin.h"
#include <QJsonValue>
#include <QJsonObject>
#include "jsonforqt.h"
#include <QMap>
#include <QList>
#include <QSet>
#include <QVector>
#include <QHash>
#include "compiledblockinfo.h"
FlowChart... |
#include "webcam.h"
#include <linux/videodev2.h>
#include <libv4l2.h>
#include <system_error>
#include <stdexcept>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <error.h>
#include <fcntl.h>
//using namespace zxwebcam::Webcam;
//using namespace zxwebcam::configuration_error;
using namespace zxwebcam;
namespa... |
#include <vector>
#include <cstdlib>
#include <GL/glut.h>
#include "particles.h"
#include "pool.h"
using namespace std;
#define LINE_SIZE (256)
#define FRAME_MSEC (17)
#define EMIT_FRAME_DELAY (2)
#define EMIT_AMOUNT (5)
#define MIN_TRI_SIZE (0.3)
#define MAX_TRI_SIZE (0.8)
#define LIFE_TIME (60)
Pool<Triparticle> p... |
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "imgui/imgui_impl_glfw.h"
#include "imgui/imgui_impl_opengl3.h"
#include "GOs/dragon.h"
#include "DragonDB.h"
#include "projectDefines.h"
#include "graphicUtilities.h"
#include "VertexBuffer.h"
#include "IndexBuffer.h"
#include "VertexBufferLayout.h"
#include "Ver... |
// Tic-Tac-Toe -- This program simulates a tic-tac-toe game in which a player play against the computer, and the one gets three consecutive in a row/column/diagonal wins
// Comp Sci 40S <NAME>
// 2021-03-22
#include<iostream>
#include<windows.h>
#include<conio.h>
using namespace std;
//Enumerated Type... |
#include <map>
#include <string>
#include <fstream>
#include <cstring>
#include <algorithm>
#include "table.hpp"
#include "storage.hpp"
#include "parser.hpp"
#include "simple_ra.hpp"
using namespace RelationalAlgebra;
Database::Database() {
std::ifstream db_file(DATA + std::string(".") + SCHEMA, std::ios::in | s... |
#include <string>
#include <iostream>
#include <cassert>
#include <cstdio>
#include "common.h"
#include "tiny_obj_loader.h"
#include "mesh_loader.h"
#include "eson.h"
bool
MeshLoader::LoadObj(
Mesh& mesh,
const char* filename)
{
#ifdef ENABLE_OSD_PATCH
return false;
#else
std::vector<tinyobj::shape_t> shapes;... |
/*
Copyright (c) 2019 <NAME> (<EMAIL>)
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute... |
#include "lab4_mpi.h"
#include <malloc.h>
#include "mpi.h"
#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
#define pb push_back
using namespace std;
void print_matrix(string name, int M, int N, bool* A){
cerr << name << ": \n";
for(int i=0; i<M; i++){
for(int j=0; j<N; j++){
cerr <... |
#include "dinputcontroller.h"
#include "controllermanager.h"
#include <wbemidl.h>
#include <oleauto.h>
#include <stdexcept>
BOOL IsXInputDevice(const GUID* pGuidProductFromDirectInput);
DinputController::DinputController(const DIDEVICEINSTANCE* pdidInstance,
ControllerManager* par... |
#include <opencv2/opencv.hpp>
#include <chrono>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#ifdef __ANDROID__
#include <android/log.h>
#endif
using namespace cv;
using namespace std;
long long int get_now() {
return chrono::duration_cast<st... |
/***
*
* Copyright (c) 1999, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object co... |
/*
* MMA8653 library
* (C) 2012 Akafugu Corporation
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This ... |
/*
* MPEG1 / MPEG2 video parser
* Copyright (c) 2000,2001 <NAME>
* Copyright (c) 2002-2004 <NAME> <<EMAIL>>
*
* This file is part of FFmpeg.
*
* FFmpeg 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 Found... |
//@@@@AUTOBLOCK+============================================================;
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
... |
/*!
* @file modplayer.cpp
* Project modplayer Library
* @brief modplayer wrapper for the ptplay library for the ZPUino, ported by <NAME>
* Version 1.0
* @author <NAME>
* @date 4/10/12
* License GPL
*/
#include "modplayer.h"
#include <SD.h>
#include "ptplay.h"
//#include "RetroCade.h"
#define DEBUG... |
#include "core/IR.h"
#include "core/DiagnosticEmitter.h"
#include "util/ADT.h"
#include <QtGlobal>
#include <QObject>
#include <QQueue>
#include <QDebug>
namespace{
const char ILLEGAL_CHARS_1[] = {
'.', '[', ']', '(', ')', '<', '>', '\\', '/', '+', '=', '*', '~', '`', '\'', '"', ',', '?', '@', '#', '$', '%', '^'... |
#include "livewidget.h"
#include "cellularautomatas.h"
#include <QDebug>
#include <QMouseEvent>
#include <QOpenGLFramebufferObject>
#include <QOpenGLTexture>
#include <math.h>
GLuint FramebufferName = 0;
QOpenGLTexture* texture1;
LiveWidget::LiveWidget(QWidget *parent) :
angularSpeed(0)
{
framebuffer = 0;
... |
/**************************************************************
*
* 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 "ros/ros.h"
#include "EventTriggerUtility.h"
#include "GuiCommConstants.h"
#include "elderly_care_simulation/EventTrigger.h"
#include "elderly_care_simulation/GuiComm.h"
#include <queue>
#include <unistd.h> // sleep
#include "Scheduler.h"
using namespace elderly_care_simulation;
Scheduler scheduler;
Schedu... |
/*
-- clMAGMA (version 1.0) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date
@precisions normal z -> s d c
*/
// includes, system
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
// includes, project
#in... |
#include "converter.hpp"
#include "comsolmesh.hpp"
#include "utils.hpp"
#include <iomanip>
#include <iostream>
#include <sstream>
using namespace std;
// mappings
// Comsol id (minus one)----|--->
// |
using TriMapper = ComsolToAeroElementMapper< 2, 0, 1 >;
us... |
/*
DISCLAIMER:
This file I wrote is a part of a larger program I wrote
as a University course assignment. While I have asked permission
from said instructors for permission to post my code. If any
instructor or professor use this assignment or similar
for their classes and find this code or part of this c... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
#define SINGLE 121
bool done[31][1<<4][121][122];
double dp[31][1<<4][121][122];
int sz;
template<class T> int bitcount(T x) {
i... |
/*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team.
* Copyright (c) 2018,2019,2020, by the GROMA... |
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
/*
Autor: <NAME>, <NAME>
Descripcion del Problema: Tenemos un boleto de descuento
el cual reduce el precio de un vuelo en su mitad o 50% y
queremos recorrer las ciudades de tal manera que nuestra
primera Ciudad o ... |
#include <iostream>
#include <chrono>
#include <fstream>
#include "fsmpp2/fsmpp2.hpp"
#include "fsmpp2/plantuml.hpp"
#include "fsmpp2/state_machine.hpp"
namespace sm
{
// Context data shared among all states
struct ContextData {
void setTimeout(std::chrono::seconds time) {
timeout = time;
}
void ... |
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
class RadioRange {
public:
double RadiusProbability(vector <int> x, vector <int> y, vector <int> r, int z)
... |
/**
* Copyright (C) <NAME> 2021
*
* apic.h -- Advanced programmable interrupt controller
*
* /PROJECT - Aurora v1.0
* /AUTHOR - <NAME>
*
*============================================================
*/
#include <arch\x86_64\apic.h>
#include <arch\x86_64\ioapic.h>
#include <arch\x86_64\mmngr\vmmngr.h>
#in... |
//
// ENCChart.cpp
// International Hydrographic Organization
// IHO Transfer Standard for Digital Hydrographic Data, Publication S-57
//
// Created by <NAME> on 22/02/2015.
// Copyright (c) 2015 Cellyceos. All rights reserved.
//
#include "ihoS57.h"
#include <iomanip>
#include <iostream>
using namespace std;
... |
/*
* Copyright (C) 2019 <NAME>
*
* This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
*/
#include "TextLayout.h"
#include <utf8.h>
#include <iostream>
#include "Util.h"
using namespace Napi;
#define UNICODE_SPACE 0x20
#define UNICODE_DOT 0x2E
... |
// SSObject.cpp
// SSCore
//
// Created by <NAME> on 3/15/20.
// Copyright © 2020 Southern Stars. All rights reserved.
//
// Base class for all types of celestial objects (stars, planets, constellations, etc.)
// Also includes SSObjectArray, a class for storing a collection of objects,
// and saving/loading them from C... |
/* Copyright (C) 2017 NEC Laboratories America, Inc. ("NECLA"). All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree. An additional grant of patent rights
* can be found in the PATENTS file in the same directory.
*/
#include ... |
#include <map>
#include "gfx.h"
#include "menus.h"
#include "save.h"
#include "gui/VillagerMenu.hpp"
extern std::map<u16, std::string> g_villagerDatabase;
static std::vector<ImageButton *> m_villagerEditorButtons;
static Text *m_villagerNameText = nullptr;
static Villager *m_currentlySelectedVillager = nullptr;
bool ... |
#include "Water.h"
#include "../Geometry/Edge.h"
#include "../Geometry/DistanceObject.h"
#include "../Containers/ocsort.h"
#include "../Math/MathUtils.h"
Water::Water() : triangleList(200), vertexList(100)
{
color.set(0.0f, 0.48f, 0.68f, 1.0f);
}
void Water::addVertex(const Tuple3f &vertex)
{
vertexL... |
#include "ContUT.h"
double YearUTC[101];
bool PopYearUTC = false;
/***********************************************************************
* NAME : void PopulateYearUTC()
*
* DESCRIPTION : Calculates the continuous time in hours since 00:00
* on 19500101 for all years between 1950 and 2050
*
* ******... |
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* threshold.cc
* Copyright (C) 2000 by the University of Southern California
* $Id: threshold.cc,v 1.3 2005/08/25 18:58:06 johnh Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the ... |
#include <gtest/gtest.h>
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/engine.h>
void
handleErrors() {
ERR_print_errors_fp(stderr);
}
int
encrypt(unsigned char *plaintext,
int plai... |
#include <array>
#include <memory>
#include <cstring>
#include <cstdlib>
#include <clocale>
#include <sstream>
#include <getopt.h>
#include <libgen.h>
#include <unistd.h>
#include <iostream>
#include <ncpp/Visual.hh>
#include <ncpp/NotCurses.hh>
using namespace ncpp;
static void usage(std::ostream& os, const char* na... |
#include "HUD.h"
HUD::HUD()
{
}
HUD::~HUD()
{
}
void HUD::initialise(SDL_Renderer* r, SDL_Point cam)
{
boostColour = { 255, 255, 255, 255 };
colour = { 255, 255, 255 };
bossRed = 255;
theBossIsHere = false;
m_font = TTF_OpenFont("assets/Lazer84.ttf", 300);
m_sdl_renderer = r;
//Health texture
healthSur... |
/*
* Copyright 2021 The DAPHNE 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... |
/*
* neo_usboard_v2_node.cpp
*
* Created on: Oct 14, 2020
* Author: mad
*/
#include <ros/ros.h>
#include <vnx/vnx.h>
#include <pilot/base/CAN_Proxy.h>
#include <pilot/base/SerialPort.h>
#include <pilot/usboard/USBoardModule.h>
#include <pilot/usboard/USBoardModuleClient.hxx>
#include <neo_msgs/USBoardV2.h>... |
/*
* Copyright (c) 2012 <NAME>, <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,
* including co... |
// By <NAME> <<EMAIL>> - 20220313
// Based on:
// http://numbers.computation.free.fr/Constants/Algorithms/nthdigit.html
// http://numbers.computation.free.fr/Constants/Algorithms/pidec.cpp
#include <Arduino.h>
#include <TM1637.h>
//#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
// ModInt ... |
#include "utils.h"
#include "graph.h"
#include <cassert>
#include <random>
#include <algorithm>
#include <set>
#include "stdio.h"
#include <queue>
#include <stack>
Utils::Utils()
{
MaxWccSzList.clear();
}
std::vector<int> Utils::reInsert(std::shared_ptr<Graph> graph,std::vector<int> solution,const std::vector<int>... |
// Copyright 2021 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 ... |
//
// Author: <NAME> <<EMAIL>>
// Copyright (c) 1994-2018 <NAME>
//
// 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 Software without
// restriction, including without limitati... |
/* Copyright 2020, RespiraWorks
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
d... |
#include "ParticleEmitter.h"
#include <gl_core_4_4.h>
ParticleEmitter::ParticleEmitter()
: m_particles(nullptr),
m_firstDead(0),
m_maxParticles(0),
m_position(0, 0, 0),
m_vao(0), m_vbo(0), m_ibo(0),
m_vertexData(nullptr) {
}
ParticleEmitter::~ParticleEmitter() {
delete[] m_particles;
delete[] m_vertexData;
... |
//===- CodeEmitterGen.cpp - Code Emitter Generator ------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.