text stringlengths 3.08k 22k |
|---|
//------------------------------------------------------------------------------
//
// Copyright 2018-2019 Fetch.AI Limited
//
// 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
//
// ... |
#include "backpack.h"
#include "player.h"
#include <iomanip>
#include <iostream>
#include <time.h>
using namespace std;
// Generate drops after defeating monsters and update player's backpack
void generateDrops(vector<Item> &items, Player &player) {
string heal = "", weapon = "";
int healsNum, weaponsNum = 0;... |
#include <stan/math/prim.hpp>
#include <test/unit/util.hpp>
#include <gtest/gtest.h>
TEST(MathMatrixPrimMat, append_col) {
using Eigen::Dynamic;
using Eigen::Matrix;
using Eigen::MatrixXd;
using Eigen::RowVectorXd;
using Eigen::VectorXd;
using stan::math::append_col;
using std::vector;
MatrixXd m33(3,... |
#include "core.h"
#include "wbcomprosacharacter.h"
#include "wbcomprosacharacterconfig.h"
#include "configmanager.h"
#include "idatastream.h"
#include "wbeventmanager.h"
#include "wbcomprosahands.h"
#include "rosagame.h"
#include "rosapersistence.h"
#include "hsv.h"
#include "mathcore.h"
#include "rosaframework.h"
#inc... |
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2022-01-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... |
/*
Copyright (c) 2017-2022,
Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
*/
#include "helicsVersion.hpp"
#include "../common/JsonProcessingFuncti... |
/***************************************************************************
copyright : (C) 2002 - 2008 by <NAME>
email : <EMAIL>
***************************************************************************/
/**********************************************************************... |
#include "GraphicsFrameWork.h"
#include <ctime>
using namespace std;
GraphicsFrameWork::GraphicsFrameWork(SDL_Renderer *ren,SDL_Window *win) {
_ren = ren;
_win = win;
SDL_GetWindowSize(_win, &SCRW, &SCRH);
}
void GraphicsFrameWork::Text(char *t,int x,int y,int size,int r,int g,int b)
{
int f_w,f_h;
... |
// @Copyright 2007 <NAME>
//
#include <iostream>
#include <iomanip>
#include <fstream>
#include <list>
#include <vector>
#include <sstream>
#include "complex.h"
#include "mesh.h"
#include "function.h"
using namespace std;
class Lorentz
{
public:
double x0, Gamma, Prefact;
double Gamma2;
Lorentz() : Prefact(0.0)... |
/*
* Copyright 2017 <NAME>
*
* 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, copy, modi... |
/** \file
*
*/
#include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "DataFormats/GeometryCommonDetAlgo/interface/ErrorFrameTransformer.h"
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
#include "DataFormats/Trac... |
// winsockudp3.cpp : Defines the entry point for the console application.
//
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#define TRIGGERED 25
#include <winsock2.h>
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <thread>
#include <future>
#include <iostream>
#include <mutex>
#include <c... |
#include <iostream>
#include <string>
#include "helpers.h"
#include "path_planner.h"
using std::cout;
using std::endl;
PathPlanner::PathPlanner(vector<double> &maps_s, vector<double> &maps_x, vector<double> &maps_y) : maps_s(maps_s), maps_x(maps_x), maps_y(maps_y) { }
vector<vector<double>> PathPlanner::plan(Car &c... |
#include "Game.h"
#include "Globals.h"
#include "Actors.h"
#include "MOD.h"
clGameManager::clGameManager()
: m_Keys()
, m_LevelMin( -4.1f, -2.2f, 0.0f )
, m_LevelMax( +4.1f, +2.2f, 0.0f )
{
m_Scene = make_intrusive<clSceneNode>();
m_SpaceShip = make_intrusive<clSpaceShip>();
m_SpaceShip->AttachToScene( m_Scene... |
#include <klv/string_view.hpp>
#include <gtest/gtest.h>
#include <sstream>
#include <iomanip>
namespace stdx = klv;
using stdx::string_view;
void test_strview_basics(const string_view& sv, const char *p, size_t n) {
ASSERT_EQ(p, sv.data());
ASSERT_EQ(n, sv.size());
ASSERT_EQ(n, sv.length());
ASSERT_... |
// -*- C++ -*-
/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2009
Free Software Foundation, Inc.
Written by <NAME> (<EMAIL>)
This file is part of groff.
groff 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 Found... |
/*
* elf_load.cpp - elf file management
*/
#include <elf_load.h>
#include <arch/elf.h>
#include <arch/stack.h>
#include <debug.h>
#include <elf_native.h>
#include <errno.h>
#include <kernel.h>
#include <mmap.h>
#include <sys/mman.h>
#include <unistd.h>
#include <vm.h>
namespace {
int
ph_flags_to_prot(const ElfN_Ph... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
struct osd_bitmap *sprite_bm;
struct osd_b... |
#include "huffman.hpp"
#include <utility>
#include <vector>
#include <queue>
#include <ostream>
#include <istream>
#include <algorithm>
#include <cstring>
bit_reader::bit_reader(std::istream &stream, statistic &stat)
: stream(stream), stat(stat) {
}
huffman_tree::char_counter bit_reader::read_counter() {
huf... |
// ysoftman
// apr(Apache Portable Runtime) library test
/*
# openssl 설치
bash install_openssl.sh
# apr 설치
bash install_apr.sh
# 빌드
bash build.sh
*/
#include "apr.h"
#include "apr_portable.h"
#include "apr_file_io.h"
#include "apr_strings.h"
#include "apr_network_io.h"
#include "apr_pools.h"
#include "apr_poll.h"
#in... |
#include "AIG.h"
#include "binaryDS.h"
using namespace std;
int posY_max,posX_max;
int main(int argc, char** argv) {
if(MNIST_DS == 1)
{posY_max=28; posX_max=224;}
else
{posY_max=32*3; posX_max=32*8;}//3*8*32;
struct rusage buf;
int start,stop,start_simplf,stop_simplf,start_app,... |
#include <regex>
#include <map>
#include <bitset>
#include <stack>
#include "Assembler.hpp"
using namespace std;
const regex Assembler::rTypeExp ("(addu|add|subu|sub|and|or|xor|nor|sltu|slt|sllv|srlv|srav|jr|sll|srl|sra)\\b");
const regex Assembler::iTypeExp ("(addiu|addi|andi|ori|xori|lui|lw|sw|beq|bne|sltiu|slti)\... |
/*************************************************************************/
/* open_simplex_noise.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include "uar.h"
#pragma hdrstop
#include "lib.h"
#include "version.h"
UARArchiveJob::UARArchiveJob()
{
dump_flags = 0;
delete_source_objects = false;
keep_archive_backups = true;
nologo = false;
}
String UARArchiveJob::Usage()
{
return String().Cat()
<< NFormat("uar COFF librarian, version %d.%d.r%d, release... |
#include "detectlane.h"
DetectLane::DetectLane() {
// cvCreateTrackbar("Hough", "Threshold", &hough_lowerbound, max_houghThreshold);
//cvCreateTrackbar("Hough_minLinlength", "Threshold", &minLinlength, 150);
cvCreateTrackbar("MinShadow H", "Threshold", &minLaneInShadow[0], 255);
cvCreateTrackbar("MinSh... |
//========= Copyright Valve Corporation, All rights reserved. ============//
#include "stdafx.h"
#include "physdll.h"
#include "vphysics/constraints.h"
#include "tier0/icommandline.h"
#include "filesystem_tools.h"
#include "simplify.h"
#include "keyvalues.h"
#include "studio.h"
IPhysicsCollision *physcollision = NULL;... |
#include <Python.h>
#include <numpy/arrayobject.h>
#include "../src/pointmap/pointmap.h"
#include <string>
// docstrings for our module
// *************************
static char module_docstring[] = "This module provides a method to create and update a pointmap";
static char update_map_docstring[] = "Me... |
/*********************************************************************
* This file is distributed as part of the C++ port of the APRIL tags
* library. The code is licensed under GPLv2.
*
* Original author: <NAME> <<EMAIL>>
* C++ port and modifications: <NAME> <<EMAIL>>
********************************************... |
/*
* LikelihoodRecoAnalyser.cpp
*
* Created on: Mey 13, 2015
* Author: ejclemen
*/
#include "../../interface/Analysers/LikelihoodRecoAnalyser.h"
#include "../../interface/LumiReWeighting.h"
#include "../../interface/EventWeightProvider.h"
#include "../../interface/PoissonMeanShifter.h"
#include "../../interf... |
#pragma once
#include <optional>
#include <tuple>
#include <rapidjson/rapidjson.h>
#include <virt_wrap/Error.hpp>
#include "wrapper/depends.hpp"
#include "wrapper/dispatch.hpp"
#include "wrapper/domain_actions_table.hpp"
#include "wrapper/virt2json.hpp"
#include "base.hpp"
#include "flagwork.hpp"
#include "hdl_ctx.hpp"... |
#include <rlpbr.hpp>
#include <iostream>
#include <cstdlib>
#include <cuda_runtime.h>
#include <glm/gtx/transform.hpp>
#include "oiio_bridge.hpp"
using namespace std;
using namespace RLpbr;
template<typename T>
static vector<T> copyToHost(const T *dev_ptr, uint32_t width,
uint32_t heigh... |
#include "StdAfx.h"
#include "ParticleFilter.h"
// dynamic model: s = {x, y, vx, vy}
ParticleFilter::ParticleFilter(void) { }
ParticleFilter::~ParticleFilter(void) { }
void ParticleFilter::release() {
delete[] particles;
}
void ParticleFilter::setParamsAndInit(int numParticles, int hx, int hy, CvPoint ex... |
#include "protocol.h"
#include "crc8.h"
#include "controller.h"
#include "encoder.h"
#include "mem_overlay.h"
#include "motor.h"
#include "config.h"
#include "queue.h"
#include "stepper.h"
#include "laser.h"
#include <cstring>
static void start_bootloader() {
static const uint32_t sys_mem_base = 0x1FFFF000;
// disa... |
/***************************************************************************
sn76496.c
Routines to emulate the Texas Instruments SN76489 / SN76496 programmable
tone /noise generator. Also known as (or at least compatible with) TMS9919.
Noise emulation is not accurate due to lack of documentation. The ... |
/*
Copyright 2011-2017 <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 writing, software
di... |
#define MACRO11__C
/*
Assembler compatible with MACRO-11.
Copyright (c) 2001, <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:
o Redistributions of source code must retain the above copyrig... |
#include <pangolin/pangolin.h>
#include <pangolin/video/video_record_repeat.h>
#include <pangolin/gl/gltexturecache.h>
#include <pangolin/gl/glpixformat.h>
#include <pangolin/handler/handler_image.h>
template<typename T>
std::pair<float,float> GetOffsetScale(const pangolin::Image<T>& img, float type_max, float format_... |
/*
Copyright (c) 2013, Intel Corporation
Copyright (c) 2015, <NAME>
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 a... |
/**
* Copyright (C) 2019 Samsung Electronics Co., Ltd. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requ... |
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "linux_platform_device.h"
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unis... |
//=======================================================================================
// Box.cpp by <NAME> (C) 2008 All Rights Reserved.
//=======================================================================================
#include "..\Headers\RectangleBox.h"
#include "..\Headers\Vertex.h"
RectangleBox::Recta... |
/*******************************************************************************
* *
* PrimeSense NITE 1.3 - Point Viewer Sample *
* Copyright (C) 2010 PrimeSense Ltd. ... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/tests/test_browser_font.h"
#include <stdint.h>
#include <string.h>
#include "ppapi/cpp/image_data.h"
#include "ppapi/cpp/trusted/bro... |
/*
* Copyright 2020 NVIDIA 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 agreed to in ... |
#include "StringGraphComponent.hpp"
#include "Graph.hpp"
using namespace std;
// contig extraction params
size_t MAX_BRANCHES = 18;
size_t MAX_START_NODES = 100;
double LENGTH_THRESHOLD = 0.05;
double QUALITY_THRESHOLD = 1.0;
//#define ABS(x) ((x < 0) ? x * (-1) : x)
#define MAX(x,y) ((x > y) ? x : y)
#pragma regio... |
#include "pf/basic/string.h"
#include "pf/support/helpers.h"
#include "pf/db/connection_interface.h"
#include "pf/db/schema/blueprint.h"
#include "pf/db/schema/grammars/mysql_grammar.h"
using namespace pf_basic::string;
using namespace pf_support;
using namespace pf_db::schema::grammars;
MysqlGrammar::MysqlGrammar() ... |
// Copyright 2009 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
/*
==============================================================================
BlockDiagram.cpp
Created: 23 Jul 2020 1:35:07pm
Author: <NAME>
==============================================================================
*/
#include <JuceHeader.h>
#include "BlockDiagram.h"
//=======... |
#include <ctpg/ctpg.hpp>
#include <iostream>
#include <variant>
#include <string>
#include <vector>
#include <map>
using namespace ctpg;
using namespace ctpg::ftors;
class js_value_type;
using js_array_type = std::vector<js_value_type>;
using js_object_type = std::map<std::string, js_value_type>;
using js_object_ele... |
// MABE is a product of The Hintze Lab @ MSU
// for general research information:
// hintzelab.msu.edu
// for MABE documentation:
// github.com/Hintzelab/MABE/wiki
//
// Copyright (c) 2015 Michigan State University. All rights reserved.
// to view the full license, visit:
// github... |
/**
* @file tcp_event.cpp
* @author matthewv
* @date May 6, 2011
* @date Copyright 2011, SmarterTravelMedia
*
* @brief Implementation of event/state machine based tcp socket
*/
#include <arpa/inet.h>
#include <memory.h>
#include <sys/fcntl.h>
#include <sys/syslog.h>
#include "meventmgr.h"
#include "tcp_event.h... |
/* Copyright 2015 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, ... |
#include "eve.h"
#include "ui_eve.h"
char VERTICAL=1;
char HORIZONTAL=0;
int attack;
int photon_count;
QString polarization;
QString alice_polarization;
QString bob_polarization;
QString eve_bob_polarization;
QString buffer;
QString key;
QString seance_key;
QString sum_key;
QString bob_key;
//bool logging... |
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
using namespace std;
int nTestCases;
char cube[6][3][3];
vector<vector<string>> vCmds;
void InitCube() {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
cube[0][i][j] = 'w';
cube[1][i][j] = 'y';
cube[2][i][j] = 'r';
... |
/* Copyright (c) 2019 - 2021 Advanced Micro Devices, Inc.
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 "FiniteAutomata.h"
#include <string>
#include <iostream>
#include <map>
#include <vector>
#include <queue>
#include <set>
std::string a_z = "abcdefghijklmnopqrstuvwxyz";
std::string A_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
std::string zero_nine = "0123456789";
void Automata::Allocate(unsigned int size) ... |
/****************************************************************************
Copyright (c) 2017-2018 <NAME> Co., Ltd.
http://www.cocos2d-x.org
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 Softw... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
/**************************************************************
*
* 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 "stdafx.h"
#include "Collider.h"
#include "../../../GlobalObjects/Physix/Manifold.h"
#include "../Transform2D.h"
#include "../../../../Global/MathTools/utils.h"
#include "CircleCollider.h"
#include "RectCollider.h"
//Circle vs Circle with Manifold hit Collition
bool Collider::checkCircleCircle(const Vec2& p... |
// Copyright (c) 2021 <NAME> and <NAME>
//
// WRAPD uses the MIT License (https://opensource.org/licenses/MIT)
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, includin... |
/*
* Copyright 2011 <NAME> (<EMAIL>).
*
* 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 t... |
#include "ChunkDataStructure.h"
#include "Block/BlockLibrary.h"
#include "Primitives.h"
#include <Aphelion/Renderer/Renderer.h>
#include <Aphelion/Core/Application.h>
#include <Aphelion/Core/Event/NetEvent.h>
void GenerateChunkMesh(ChunkData& chunk)
{
auto& vao = chunk.vao;
// Generate face chunk
constex... |
/*--------------------------------------------------------------------------
File : pth_ms8607.cpp
Author : <NAME> Feb. 12, 2017
Desc : MS8607 environment sensor implementation
- Temperature, Humidity, Barometric pressure
Copyright (c) 2017, I-SYST inc., all rights reserved
Permission t... |
#include "solid/frame/aio/openssl/aiosecurecontext.hpp"
#include "solid/frame/aio/openssl/aiosecuresocket.hpp"
#include "solid/frame/manager.hpp"
#include "solid/frame/scheduler.hpp"
#include "solid/frame/service.hpp"
#include "solid/frame/aio/aioactor.hpp"
#include "solid/frame/aio/aioreactor.hpp"
#include "solid/fr... |
/*
FILE: blue_noise.cpp
AUTHOR: <NAME> (<EMAIL>)
DATE: 2/12/2019
Description: Randomized sequences that have only high frequency content
*/
#include "codegen.h"
#include "manual_test.h"
#include <random>
#include <algorithm>
static void BestCandidateN(std::vector<float>& values, size_t numValues, std::mt19937& rng, ... |
#include <iostream>
#include "ydogukan_Yildirim_Dogukan_hw3_SubSeqsList.h"
using namespace std;
SubSeqsList::SubSeqsList() { // default constructor that creates an empty list
hHead = NULL;
}
bool SubSeqsList::numberExistsInList(int number) {
// Given a number, returns true if the number exists in the list
SubSeq... |
//
// Created by <NAME>.
//
// uncomment to disable assert()
// #define NDEBUG
#include <cassert>
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <ios>
#include <sstream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <array>
#... |
#include "Criteria/traveldistancecriterion.h"
#include "map.h"
#include "mcdmfunction.h"
#include "newray.h"
#include <algorithm>
#include <iostream>
#include <iterator>
#define PI 3.14159265358979323846 /* pi */
#include <unistd.h>
using namespace std;
using namespace dummy;
void cleanPossibleDestination(std::list<P... |
#include "direction.h"
#include "model_parsing.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
using namespace SB_CONFIG;
using namespace std;
SbDIR::SbDIR() {
//Adding the encoding for each direction
add_encode(SbDIR::N,3);
add_encode(SbDIR::NE,4);
add_encode(SbDIR::E,5);
add_encode(SbDIR::... |
/*
* Copyright © 2021 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the “Software”), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distr... |
#include <iostream>
#include "menu.h"
#include "seguridad.h"
#include "pacientes.h"
#include "ingreso.h"
using namespace std;
char opcion = 's';
string pacientes[100][7] =
{
{ "Maria", "Guadalupe", "Villafranca", "Zelaya", "44", "Femenino", "Olancho"},
{ "Maria", "Jerusalem", "Cruz", "Villatoro", "34", "Feme... |
/* vim:tabstop=4:expandtab:shiftwidth=4
*
* Idesk -- DesktopConfig.cpp
*
* Copyright (c) 2002, Chris (nikon) (<EMAIL>)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistri... |
/* =========================================================================
Copyright (c) 2010-2012, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, L... |
#include<iostream>
#include<fstream>
#include<string.h>
#include<iomanip>
using namespace std;
class Colleges{
//variables
public:
char clgName[100];
int seatOBC[3];
// int seatSC;
int seatGEN[3];
// int seatST;
int totalSeats[3];
int wom;
char courseName[3][50];
int marksOBC[... |
#include "Cloth.hpp"
Cloth::Cloth(GLFWwindow* theWindow, glm::vec3 theLightPos, glm::vec3 theLightColor, float width, float height) {
//std::cout << "init cloth" << std::endl;
window = theWindow;
lightPos = theLightPos;
lightColor = theLightColor;
SCR_WIDTH = width;
SCR_HEIGHT = height;
clothShader = new Shad... |
// the last.cpp : Defines the entry point for the application.
//
#include<bits/stdc++.h>
using namespace std;
//you can change the maximum number rows here
const int STEP = 20;
class chart_maker
{
public:
//save data user given
vector<double> data0;
//save chart
double chart[STEP][11];
//init the class
c... |
#define W32
#define MSI
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "MsiQuery.h" // MSI API
//________________________________________________________________________________
//
// Constants and globals
//_________________________________________________________________________... |
#include "nbody_particle_system.hpp"
using namespace nbody;
static float force;
static std::uint32_t number_of_groups;
static std::uint16_t width;
static std::uint16_t height;
static std::unique_ptr<particle_system::view_t> particles{nullptr};
static std::unique_ptr<particle_system::scratch_t> mutated{nullptr};
static... |
#include "../../include/services/ClientCommunicationManager.h"
#include "../../include/services/Frontend.h"
using namespace socialine::utils;
std::string ClientCommunicationManager::username;
std::string ClientCommunicationManager::session_cookie;
int ClientCommunicationManager::notification_socket;
socklen_t Client... |
#include "HCISocket.hpp"
#include "utils/string_formats.hpp"
#include "Log/Log.hpp"
using namespace std;
// Create one HCI socket per Bluetooth controller
vector<shared_ptr<HCISocket>> HCISocket::create_all(uv_loop_t* loop, shared_ptr<HCIFormat> hci_format) {
vector<shared_ptr<HCISocket>> hci_sockets;
Socket soc... |
#include "../src/options.hpp"
#include "../src/wbtree.hpp"
#include <algorithm>
#include <random>
using namespace ygg;
template <class InitialFlags, class Flags>
class BalanceAnalyzer {
private:
constexpr static size_t COUNT_INTERVAL = 1000;
template <class NodeFlags>
class Node : public WBTreeNodeBase<Node<Node... |
/**
* @file fswsassetblacklist.cpp
* @brief Asset Blacklist and Derender
*
* $LicenseInfo:firstyear=2012&license=fsviewerlgpl$
* Phoenix Firestorm Viewer Source Code
* Copyright (C) 2012, Wolfspirit Magic
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU L... |
// Copyright 2010-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... |
/*!
* \file swp_tree_weighted_cache.cpp
* \author <NAME>
* Copyright (C) 2010 <NAME>
*
* Project: sweepc (population balance solver)
* Sourceforge: http://sourceforge.net/projects/mopssuite
*
* \brief Implementation of the binary tree structure for the storage
* of particle properties for... |
/*
* 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 <string>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include "json11.hpp"
#include <cassert>
#include <list>
#include <set>
#include <unordered_map>
#include <cstring>
using namespace json11;
using std::string;
// Check that Json has the properties we want.
#include <type_tra... |
/******************************************************************************
* (c) Copyright 2017 <NAME>sea.
* This file is part of Oculus Viewer
*
* Oculus Viewer 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 ... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup()
{
ofSetLogLevel(OF_LOG_NOTICE);
ofSetVerticalSync(true);
ofFill();
ofSetFrameRate(30);
glPointSize(1);
canvas.render = OF_MESH_WIREFRAME;
#ifdef LEAP_MOTION_ON
hand_id = 0; // 0-... |
/*
Created: 29 August 2017
Last Updated: 28 May 2018
<NAME>
<EMAIL>
Texas A&M University
-----
Make histograms for systematic uncertainties (& nominal)
to go into plots || TRexFitter
*/
#include "Analysis/goldilocks/interface/histogrammer4ML.h"
histogrammer4ML::histogrammer4ML( configuration& cmaConfig... |
//
// (C) Copyright 1998-2004 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited ... |
/*
Copyright (C) 2011 by <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute,... |
using simd::float_4;
template <typename T = float>
struct APPath1 {
APPath1() {}
T process(T input) {
T out1 = (input - d2) * a0 + d1;
d1 = input;
d2 = out1;
return out1;
}
void setCoefficients(float coeff0) {
a0 = T(coeff0);
}
T d1 = T(0);
T d2 = T(0);
T a0 = T(0);
};
temp... |
#include <opencv2/opencv.hpp>
#include <cmath>
#include <vector>
#include <string>
using std::vector;
#include <lime.hpp>
cv::Mat sst, vfield, out;
vector<cv::Point> sings;
const int ksize = 21;
void detectSingularity() {
const int width = out.cols;
const int height = out.rows;
vector<cv::Point2f> p... |
#include "./utils.hpp"
#include "./colormod.hpp"
#include <sstream>
#include <string>
#include <map>
#include <experimental/filesystem>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <thread>
#include <csignal>
using namespace std;
using namespace std::experimental;
void CustomAssertImpl_(const... |
/***
* IIR Filter Library - Implementation
*
* Copyright (C) 2016 <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that i... |
#include <ros/ros.h>
// KDL stuff
#include <sensor_msgs/JointState.h>
#include <std_msgs/Float64.h>
#include <sstream>
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <math.h>
#include <boost/lexical_cast.hpp>
using namespace std;
vector<double> right_arm_joint_positions;
vector<... |
/*
* Note that we did not create this file, but adapted it for our use
* As such, it does not fully conform to our commenting standards
*
*/
#include "audioutil.h"
#include <QDebug>
AudioUtil::AudioUtil(QString filePath) : // audio util to be used with waveformwidget for waveform display
fileHandlingMode(FUL... |
//
// Created by <NAME>, 2019
//
#include <memory>
#include <regex>
#include <experimental/filesystem>
#include <sstream>
#include <chrono>
#include "cxxopts/cxxopts.hpp"
#include "NonPosInvIdx.hpp"
#include "DocumentsHandler.hpp"
using v_str = std::vector<std::string>;
class QueryOperation{
protected:
v_str *qu... |
/*------------------------------------------------------------------------------
CGMF-1.1
Copyright TRIAD/LANL/DOE - see file LICENSE
For any questions about CGMF, please contact us at <EMAIL>
-------------------------------------------------------------------------------*/
/*! @file omsetform.cpp
\brief Calc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.