text stringlengths 3.08k 22k |
|---|
///
/// vAudio Implementation
///
/// Written by <NAME>. 2010.
///
#pragma comment(lib, "OpenAL32.lib")
#include "vAudio.h"
#include <vorbis\vorbisenc.h>
#include <vorbis\vorbisfile.h>
#include <vorbis\codec.h>
#include "vOggMemory.h"
LPALGENEFFECTS alGenEffects = NULL;
LPALDELETEEFFECTS alDeleteEffects = NULL;
LPAL... |
//Nab_WF_Analyzer_VarShaping.cpp
//<NAME>
//Jan. 10th, 2020 -> Updated Jan. 22nd, 2020 -> Jan. 28th, 2020: It still looks fine.
//Feb. 19th, 2020: Fixed some typos
//Feb. 19th, 2020: Branched off from Feb. 7th, 2020 version to vary structure of the Trapezoidal filter
//Varies width of each wings of the Trapezoidal filt... |
#include "io_thread.hpp"
#include "logging.hpp"
#include "data_registry.hpp"
#include "registry_entries.hpp"
#include "update_controller.hpp"
#ifdef WIRING_PI
#include <wiringPi.h>
#include <wiringPiSPI.h>
#endif
#include <string.h>
#include <sstream>
#include "spi.hpp"
#define MSG_BUFFER_SIZE 16
int sens... |
/*
* Scriptix - Lite-weight scripting interface
* Copyright (c) 2002, 2003, 2004, 2005 AwesomePlay Productions, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributio... |
#include <stdio.h>
#include <stdint.h>
#include <string.h>
//#include <errno.h>
#include <time.h>
#include <math.h>
#include "drv_sht21.h"
#include "Wire.h"
#define HAL_OK 1
#define SHT21_MEASURE_WAIT 120
#define ERROR_TEMP_VALUE -55;
#define ERROR_HUMI_VALUE 0;
float temperature, humi;
typedef enum{
SHT21_14BIT... |
#include "ukf.h"
#include "Eigen/Dense"
#include <iostream>
using namespace std;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::vector;
/**
* Initializes Unscented Kalman filter
* This is scaffolding, do not modify
*/
UKF::UKF() {
// if this is false, laser measurements will be ignored (except during i... |
#include "TCS3200.h"
#define DEBUG true
// Constructors
/// <summary>
/// Constructor for the TCS3200 class to interact with an TCS3200 color sensor.
/// </summary>
TCS3200::TCS3200(int* sPinArray, int output) {
this->OutputPin = output;
for (int i = 0; i < 4; i++) {
SPins[i] = sPinArray[i];
}
this->enableLED... |
/*
* Scene_Inca_Mainscreen.cpp
* enigma
*
* Created by <NAME> on 04/11/10.
* Copyright 2010 Casual Games France. All rights reserved.
*
*/
#include "EScene.h"
#include "Scene_Inca_Mainscreen.h"
#include "ESceneDirector.h"
#include "GlobalBank.h"
#include "MusicBank.h"
#include "MyGame.h"
#include "EMiniJeuC... |
/*
** Renderer multithreading framework
** Copyright (c) 2016 <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 softwar... |
#include "rooms.hpp"
#include "packets.hpp"
#include "config.hpp"
#include "src/exceptions.hpp"
#include <ctime>
MemberInfo::MemberInfo() {
user_id = 0;
}
MemberInfo::MemberInfo(MemberPtr member) {
user_id = member->getClient()->getID();
nick = member->getNick();
girl = member->isGirl();
color = member->getColor... |
#include "SimuEngine.hpp"
// (self note) static makes function callable only in this file (can still be transferred through pointer)
MixedComplementarityProblem * SimuEngine::create_mcp(EulerDiscretization::NumericalSimuInfo* info, ptrFunctionMCP2 F, ptrFunctionMCP_nabla NablaF)
{
// std::cout << "\n Defining the ... |
/*!
\brief Entry point for Android systems (android_main).
\file PVRShell/EntryPoint/android_main/main.cpp
\author PowerVR by Imagination, Developer Technology Team
\copyright Copyright (c) Imagination Technologies Limited.
*/
#include "PVRShell/OS/ShellOS.h"
#include "PVRShell/StateMachine.h"
#include "PVRCore/command... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <float.h>
#include <string.h>
#include <string.h>
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
#include "../../tinyexr.h"
#include "trackball.h"
static int mouse_x, mouse_y;
static int mouse_m_pressed;
static int mouse_r... |
#include <errno.h>
#include <stdio.h>
#include "tool/parse_interface.h"
#include <common/api_info.hpp>
#include <common/parse_api.hpp>
#include <common/trace_model.hpp>
#include <common/gl_utility.hpp>
#include <tool/config.hpp>
static int start_frame = 0;
static int end_frame = INT32_MAX;
static int our_tid = -1;
st... |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
///////////////////////////////////////////////////////... |
#include "bno055.h"
#include <stdlib.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
#include <utility/imumaths.h>
/* This driver uses the Adafruit unified sensor library (Adafruit_Sensor),
which provides a common 'type' for sensor data and some helper functions.
To use this driver you will also nee... |
#include <chrono>
#include <iostream>
#include <ratio>
#include <sstream>
#include <locale>
#include <iomanip>
#include <cassert>
#include <boost/date_time/posix_time/posix_time.hpp>
namespace pt = boost::posix_time;
using date = boost::gregorian::date;
/**
* Transparent implementation of joaDateTime core functiona... |
#include "cslang/GenCode.h"
#include "cslang/Utility.h"
#include "cslang/Tokenizer.h"
#include <stdarg.h>
namespace
{
void LeftAlign(std::ostream& output, int pos)
{
char spaces[256];
pos = pos >= 256 ? 2 : pos;
memset(spaces, ' ', pos);
spaces[pos] = '\0';
output << "\n" << spaces;
}
#define print(out, ..... |
/* ----------------------------------------------------------------------
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... |
// Copyright (C) 2019 <NAME> and <NAME>
// Licensed under the MIT License. See LICENSE file in the project
// root for full license information.
#include "mesh.h"
#include <dolfinx/common/MPI.h>
#include <dolfinx/common/log.h>
#include <dolfinx/common/types.h>
#include <dolfinx/fem/CoordinateElement.h>
#include <dolfi... |
/*! \file containerinfo.cpp
* \brief
*
* \version $Id$
*
*/
/*
* 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 f... |
#ifdef HAVE_CONFIG_H
#include <../../config.h>
#endif
/*
* Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University
* Copyright (c) 1991 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provi... |
#include "Espresso/Test Scene.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
Espresso::TestScene::TestScene(bool firstScene)
:Scene(firstScene), specularMap("", TextureType::DiffuseMap)
{
#if CUBETEST
float vertices2[] = {
// positions // norm... |
// Copyright 2021 The IREE Authors
//
// Licensed 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 "../PassDetail.h"
#include "iree-dialects/Dialect/PyDM/IR/PyDMOps.h"
#include "iree-dial... |
#include <iostream>
#include "config.hpp"
#define MAX_RAM 4294967296
#define BUFFER_SIZE 4096
struct Buffer
{
int idx;
char buff[BUFFER_SIZE];
};
#define COUNT (MAX_RAM / (int)sizeof(Buffer))
template <typename K, typename V>
void print_map(ft::map<K, V> &m)
{
std::cout << "map content: ";
typename ft::map<K, V>... |
// Highly modified from https://github.com/uWebSockets/uWebSockets/blob/master/benchmarks/throughput.cpp
// to implement the same binary protocol as the Go benchmark does for broadcast.
// License: https://github.com/uWebSockets/uWebSockets/blob/master/LICENSE
#include <iostream>
#include <vector>
#include <algorithm>... |
/*
Copyright (c) The University of Texas at Austin, 2013.
Copyright (c) <NAME>, 2013.
Authors: <NAME> (primary) and <NAME> (maintenance)
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/l... |
/*=================================================================================================
\file GameFieldCeiling.cpp
Game Play Library
Ceiling Game Field Source
\author <NAME>
\Date December 24, 2009
This source file contains the implementation of the ceiling version of the game field class.
========... |
#include <vector>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <string>
#include <sys/time.h>
// Copyright (c) 2010 <NAME>. All Rights Reserved.
// http://www.oriontransfer.co.nz
/*
This program is free software: you can redistribute i... |
/*
* Copyright (c) 2008 <NAME>, <NAME>, <NAME>
*
* 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... |
#include "operation.hpp"
#include <istream>
static bool
read_symbol(std::istream& stream, std::string& out)
{
int c;
while ((c = stream.get()) == ' ')
;
for (;;) {
if (c == EOF || c == ' ' || c == '\t' || c == ')')
break;
out.push_back(c);
c = stream.get();
}
return out.length() > 0;
}
static int
... |
#include "leetcode_treenode.h"
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#include "leetcode_string.h"
bool IsTreeNodeEqual(TreeNode* p, TreeNode* q) {
if (p == nullptr && q == nullptr)
return true;
else if (p == nullptr || q == nullptr)
return false;
return (p->val == q... |
/*----------------------------------------------------------------------
Copyright (c) <NAME>, http://www.coderanger.com
All Rights Reserved.
Please see the file "licence.txt" for licencing details.
File: TableCompareABC.cpp
Owner: <EMAIL>
Purpose: Abstract class for database syncronisation.
Override OnProcessTa... |
// Copyright 2020 <NAME>
#include <iostream>
#include <string>
#include <tuple>
#include <cmath>
#include <algorithm>
#include <unordered_set>
#include <vector>
#include "gtest/gtest.h"
#include "../../modules/arrays_and_strings/arrays_algorithms.h"
using std::vector;
using std::string;
using std::pair;
using std::ma... |
#include "../param/shader.hpp"
#include <GLFW/glfw3.h>
int min(int x, int y) { return y < x ? y : x; }
static char const* julia_vert = R"~(
#version 430 core
layout (location = 0) in vec3 pos;
out vec2 coord;
void main()
{
gl_Position = vec4(pos, 1.0);
coord = vec2(pos.x, -pos.y);
}
)~";
static char const* jul... |
#include "ccc/ccc.h"
#include <algorithm>
#include <set>
void print_address(const char* name, u64 address) {
fprintf(stderr, "%32s @ 0x%08lx\n", name, address);
}
enum OutputMode : u32 {
OUTPUT_DEFAULT,
OUTPUT_HELP,
OUTPUT_SYMBOLS,
OUTPUT_FILES,
OUTPUT_TYPES,
OUTPUT_PER_FILE,
OUTPUT_TEST
};
struct Options {... |
// Filename: p3dEmbed.cxx
// Created by: rdb (07Dec09)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should hav... |
//
// DMK.cpp
// Clock Signal
//
// Created by <NAME> on 08/01/2018.
// Copyright 2018 <NAME>. All rights reserved.
//
#include "DMK.hpp"
#include "../../Encodings/MFM/Constants.hpp"
#include "../../Encodings/MFM/Encoder.hpp"
#include "../../Track/PCMTrack.hpp"
using namespace Storage::Disk;
namespace {
std::... |
#include <stdio.h>
#include <iostream>
#include <sys/mount.h>
#include <mntent.h>
#include <sys/vfs.h>
#include <string.h>
#include <errno.h>
#include "DiskPartition.h"
#include "Assertions.h"
extern int errno;
namespace Hippo{
DiskPartition::DiskPartition(const std::string& name, bool isFormate)
:m_isMount(0)
... |
//
// Demonstrates how to generate of a Conduit Mesh Blueprint
// description of an AMReX Single Level dataset and render this
// data in situ using with ALPINE Ascent.
//
#include <AMReX_PlotFileUtil.H>
#include <AMReX_Conduit_Blueprint.H>
#include <AMReX_ParmParse.H>
#include <AMReX_Print.H>
#include "myfunc.H"
#... |
/*
_____ ______ _____ ______
|_ _| .' ___ ||_ _|.' ____ \
| | / .' \_| | | | (___ \_|
| | _ | | | | _.____`.
_| |__/ |\ `.___.'\ _| |_ | \____) |
|________| `.____ .'|_____| \______.'
(C)2019 LCIS
Description: Main program
Maintainer: <NAME>
*/
#include "main.h"
#include... |
#include "stdafx.h"
#include "packet_decoder_aac_common.h"
#include "../SDK/filesystem_helper.h"
#include "bitreader_helper.h"
size_t packet_decoder_aac_common::skipADTSHeader( const uint8_t * data,size_t size ) {
if ( size < 7 ) throw exception_io_data();
PFC_ASSERT( bitreader_helper::extract_int(data, 0, 1... |
#include "LiveData.h"
#include "menu.h"
LogSerial* syslog;
/**
* Debug level
*/
void debug(String msg, uint8_t debugLevel) {
syslog->println(msg);
}
/**
Init params with default values
*/
void LiveData::initParams() {
params.queueLoopCounter = 0;
// SIM
params.lastDataSent = 0;
params.sim800l_enabled... |
// UDP sender node
// Author: <NAME> <<EMAIL>>
#include "udp_sender.h"
#include "topic_sender.h"
#include "udp_packet.h"
#include <ros/init.h>
#include <ros/node_handle.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/timerfd.h>
#include <netdb.h>
#include <ros/console.h>
#include ... |
#include "mex.h"
#include "matrix.h"
#include <math.h>
#include "heap.hpp"
#include "utils.hpp"
#define MIN(a,b) ((a)>(b)?(b):(a))
#define MAX(a,b) ((a)>(b)?(a):(b))
// Implements fm2d in C++ code. See fm2d.m for better documentation
// about the actual workings of the algorithm.
// NB: When using matrix indices (i... |
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
/******************************************************************************/
/* */
/* Unit Name : yaw.cpp */
/* ... |
// ********************************************************* -*- C++ -*-
/*
* Copyright (C) 2004-2017 <NAME> <<EMAIL>>
*
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published... |
/*=============================================================================
UnDelphiInterface.cpp: Debugger Interface Interface
Copyright 1997-2001 Epic Games, Inc. All Rights Reserved.
Revision history:
* Created by <NAME>, <NAME>
=============================================================================*/
... |
#include <stdio.h>
#ifndef WIN32
#include <sys/socket.h>
#endif
#include "ga-common.h"
#include "ga-module.h"
#include "encoder-common.h"
#include "socketQ4S.h"
#include <string>
#include <sstream>
#define PORT 6015
#define BUFSIZE 2048
SOCKET ctrlsocket = -1; /* our socket */
struct sockaddr... |
/*
* Copyright 2017 The Polycube Authors
*
* 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 agree... |
#include "givio.h"
#include "givr.h"
#include <glm/gtc/matrix_transform.hpp>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/compatibility.hpp> // lerp
#include "inverse_kinematics.h"
#include "kinematic_chain.h"
#include "linear_blend_skinning.h"
#include "panel.h"
#include "picking_controls.h"
#include "turntab... |
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <cybozu/test.hpp>
#include <cybozu/csv.hpp>
#include <cybozu/file.hpp>
#ifdef _MSC_VER
#pragma warning(disable : 4510)
#pragma warning(disable : 4512)
#pragma warning(disable : 4610)
#endif
CYBOZU_TEST_AUTO(separator)
{
CYBOZU_TEST... |
#include <string.h>
#include "Camera.h"
#include "Game.h"
#include "Level.h"
#include "MathUtil.h"
#include "Log.h"
//Define things
//#define CAMERA_CD_PAN
//#define CAMERA_ROLL_SHIFT_FIX
//Constants
#define CAMERA_HSCROLL_LEFT -16
#define CAMERA_HSCROLL_SIZE 16
#define CAMERA_VSCROLL_OFFSET -16
#define CAMERA_V... |
/* Copyright (C) 2005-2020, UNIGINE. All rights reserved.
*
* This file is a part of the UNIGINE 2.11.0.1 SDK.
*
* Your use and / or redistribution of this software in source and / or
* binary form, with or without modification, is subject to: (i) your
* ongoing acceptance of and compliance with the terms and con... |
#include <array>
#include <numeric>
#include "MeasureEffectiveRetroreflectiveArea.h"
#include "visualizer/atengl.h"
#include "math/intersect.h"
static const real Pos = real(1) / sqrt(2);
const std::array<aten::vec4, MeasureEffectiveRetroreflectiveArea::VtxNum>
MeasureEffectiveRetroreflectiveArea::TriangleVtxs = {
... |
#include <cctype>
#include <fstream>
#include <iostream>
#include <random>
#include "contrib/json.h"
#include "frontends/common/parseInput.h"
#include "ir/ir.h"
#include "boolean_pruner.h"
#include "compiler_pruner.h"
#include "expression_pruner.h"
#include "pruner_options.h"
#include "pruner_util.h"
#include "repla... |
/*!
* @author <NAME>, K.K.
* @date 2019
* @copyright BSD-3-Clause
*/
#define __CL_ENABLE_EXCEPTIONS
#include <CL/cl.hpp>
#include <cassert>
#include <chrono>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <random>
#include <sstream>
#include <stdexcept>
#include <vector>
namespace {
std... |
#include "trs-fs.h"
#include "smb.h"
#include "storage.h"
#include "io.h"
#include <string.h>
#include <assert.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "smb.h"
#include "smb2/libsmb2... |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 Georgia Tech Research Corporation
* Copyright (c) 2009 INRIA
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Fr... |
/**
* Author: <NAME>
* Origin: E&E Engineering - Stellenbosch University
* For: Supertools, Coldflux Project - IARPA
* Created: 2019-04-25
* Modified:
* license:
* Description: Runs the LEF/DEF files through JoSIM.
* File: ToJosim.cpp
*/
#include "die2sim/ToJosim.hpp"
/**
* [executeDef2Josim ... |
// ***************************************************************************
// bamtools_sort.cpp (c) 2010 <NAME>, <NAME>
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
// Last modified: 27 March 2012 (DB)
// -------------------------... |
// Copyright 2008 by BBN Technologies Corp.
// All Rights Reserved.
#include "common/leak_detection.h"
#include "names/IdFTrainer.h"
#include "names/IdFDecoder.h"
#include "common/UnrecoverableException.h"
#include "common/ParamReader.h"
#include "names/IdFSentence.h"
#include "names/NameClassTags.h"
#incl... |
//
// 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 restriction, including without limitation the rights
// to use, copy, modify... |
#pragma once
#include <cmath>
#include<iostream>
#include <stdio.h>
namespace /* 定数 */{
/* 慣性モーメント */
float Ixx = 1;
float Iyy = 1;
float Izz = 1;
/* 重心からの位置 */
float l1 = 0.1;
float l2 = 0.2;
/* 重さ */
float M = 1;
/* 勾配法定数 */
float e = 0.04; //ステップ幅
float gamma... |
#include "pixel_converter.hpp"
#include "pixel_format.hpp"
#include <cassert>
#include <set>
#include <memory>
#include <deque>
#include <vector>
#include <algorithm>
using namespace ::atlas2d;
using namespace ::std;
namespace {
// Functions to convert pixel formats
void mirror_rgba8(unsigned char*... |
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2016 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... |
/*
* Copyright 2016 - 2019 <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 restriction, including without limitation the rights to use, copy, modify, merge, publish, ... |
/**
@file pipeline.cpp
@brief This file is part of Kalinka mediaserver.
@author <NAME> <<EMAIL>>
Copyright (c) 2007-2012 Kalinka Team
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 S... |
#include<iostream>
using namespace std;
class Int;
ostream & operator<<(ostream& os, Int & temp);
istream & operator>>(istream& os, Int & temp);
class Int
{
int i;
public:
Int(int n = 0){this->i = n;}
int getI() { return i;}
//add any member function needed here
friend ostream & operator<<(ostream& os, I... |
// Copyright 2013 The Flutter 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 "pointer_delegate.h"
#include <lib/trace/event.h>
#include <limits>
#include "flutter/fml/logging.h"
#include "flutter/fml/trace_event.h"
name... |
//
// Copyright 2021 <NAME>. All Rights Reserved.
//
// Licensed under the Apache License 2.0 (the "License"). You may not use
// this file except in compliance with the License. You can obtain a copy
// in the file LICENSE in the source distribution.
//
#include <iostream>
#include <list>
#include <unordered_set>
#i... |
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 restrictio... |
#include <allegro5/allegro.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <vector>
#include <cmath>
#include <cstdio>
#include <string>
const int SCALE = 2;
const int SCR_W = 800;
const int SCR_H = 600;
int ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h> // for usleep
#include <gu3000graphic.h>
#define BMP_FORMAT_BMP 0
//#define BMP_FORMAT_XWD 1
#define BMP_FORMAT_RAWBIT 2
#define BMP_FORMAT_RAWBYTE 3
typedef struct {
int width;
int height;
} BitmapSize;
void Err... |
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <iterator>
#include <map>
#include <regex>
#include <sstream>
#include "unicode.h"
#include "uninorms.h"
#include <codecvt>
#include <algorithm>
#include "tokenizer.h"
using namespace std;
using namespace ufal::unilib;
map<string, ... |
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* srm.cc
* Copyright (C) 1997 by the University of Southern California
* $Id: srm.cc,v 1.27 2005/08/25 18:58:08 johnh Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General... |
#include "MeshImporter.h"
#include "Assimp/include/scene.h"
#include "Assimp/include/postprocess.h"
#include "PanelInspector.h"
#include "Application.h"
#include "Globals.h"
#include "ModuleFileSystem.h"
#include "ModuleScene.h"
#include "GameObject.h"
#include "ComponentMesh.h"
#include "ComponentMaterial.h"
#includ... |
#include "vcsreader.h"
#include "lzmaDecoder.h"
#include "dx11global.h"
#include "shaderdevicedx11.h"
#include "memdbgon.h"
// VCS FILE:
// A VCS file contains:
// HEADER:
// 28 bytes - assume for now we are in shader version 6 as that is what is compiling
// This stores:
// Version
// Number of combos total
// Nu... |
#include "SwerveDrive.h"
#include "math/ConstMath.h"
#include "misc.h"
#include <frc/smartdashboard/SmartDashboard.h>
#include <math.h>
SwerveDrive::SwerveDrive(SwerveModule& flModule, SwerveModule& frModule, SwerveModule& blModule, SwerveModule& brModule, JrimmyGyro& gyro):
m_fl(flModule),
m_fr(frModule),
m_bl(blMod... |
#include <Arduino.h>
#include "wwvb.h"
// Room for 60 characters plus the null at the end
char time_char[61];
int p_idx = 0;
// Indicates that this is the last minute of last day of Jun or Dec
// and the leap second flag is on. This will cause a P sync failure
// at 00:00 (the next minute) because of the extra P that... |
#include <omp.h>
#include <math.h>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
#define SIGMOID_BOUND 6
typedef unsigned long long ull;
bool silent = false;
int n_threads = 6;
float global_lr = 0.0025f;
int... |
#include "delta_function.h"
#include "constants.h"
#include "context.h"
#include "exceptions.h"
#include "utilities.h"
DeltaFunction::~DeltaFunction() {}
int DeltaFunction::getType() { return id; }
int GaussianDeltaFunction::getType() { return id; }
int AdaptiveGaussianDeltaFunction::getType() { return id; }
int T... |
#include "stm32f4xx.h"
//#include "stm32f7xx.h"
namespace gpio {
enum class mode :int {
analog = 0b11, input = 0b00, output = 0b01, output_af = 0b10
};
enum class type:int {
PP = 0, OD = 1
};
enum class speed:int {
low = 0, medium = 0b01, high = 0b10, very_high = 0b11
};
enum class pupd:int {
nopupd ... |
#include "BotBoard.hpp"
using namespace std;
//using namespace polysync;
using namespace CIRC;
//namespace dm = polysync::datamodel;
//Default constructor, with initialization list.
BotBoard::BotBoard() :
outputTicks(false),
deviceIsOpen(false),
readErrorCount(0)
{
}
//Default destructor, see commented r... |
// Copyright (c) 2010 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 "chrome/browser/gpu_blacklist.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
#i... |
#include "predictions.h"
using namespace std;
//Step 1: Find the cloest vehicles (ahead and back) around the ego one for each lane, 6 cars in total
//Step 2: Get the data of those cloest vehicles
Predictions::Predictions(vector<vector<double>> const &sensor_fusion, CarData const &car, int horizon)
{
// Get the ... |
#include "GraphCuda.h"
#include "common_help.h"
void calcBeta_gpu(PtrStepSz<uchar4> source, float* tempDiffs,
int edgeCount, float& beta, cudaStream_t stream = nullptr);
void addTermWeights_gpu(PtrStepSz<uchar4> source, PtrStepSz<uchar> mask, PtrStepSz<float> push, PtrStepSz<float> sink,
gmmI& gmmbg, gmmI& gmmfg, fl... |
/*
* Copyright (C) 2009 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, t... |
#include <stdafx.h>
#include <Debug.h>
#include <Application.h>
#include <ELuaState.h>
using namespace Easy2D;
//#define LUA_REGINDEX LUA_REGISTRYINDEX //ONLY C ACCESS
#define LUA_REGINDEX LUA_GLOBALSINDEX
lua_State* LuaState::luaVM=nullptr;
size_t LuaState::classCount=0;
static void addBaseLibs (lua_S... |
#include <string>
//#include "Riostream.h"
#include "TMatrixDSparse.h"
//#include "TMatrixD.h"
TMatrixDSparse::TMatrixDSparse(Int_t no_rows,Int_t no_cols)
{
// Space is allocated for row/column indices and data, but the sparse structure
// information has still to be set !
Allocate(no_rows,no_cols,0,0,1);
}
T... |
// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2015 Oslo and Akershus University College of Applied Sciences
// and <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 ... |
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
/*
* Ceph - scalable distributed file system
*
* Copyright (C) 2014 <NAME> <<EMAIL>>
*
* LGPL2.1 (see COPYING-LGPL2.1) or later
*/
#include <gtest/gtest.h>
#include <cmath>
#include "common/bit_vector.hpp"
#include ... |
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2021 Intel Corporation. All Rights Reserved.
#pragma once
#include <string>
#include <cmath>
#include <map>
#include "example.hpp"
#include <imgui.h>
#include <imgui_impl_glfw.h>
//////////////////////////////
// ImGui Helpers /... |
#include <PnC/DracoPnC/PredictionModule/WalkingReferenceTrajectoryModule.hpp>
WalkingReferenceTrajectoryModule::WalkingReferenceTrajectoryModule(){
}
WalkingReferenceTrajectoryModule::WalkingReferenceTrajectoryModule(const std::vector<int> & index_to_side_in){
t_walk_start_ = 0.0;
// Initialize object pointe... |
/*
* 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... |
/*
** Copyright 2017-2021 Centreon
**
** 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... |
// --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
#include "Map.hpp"
#include <cppcodec/base64_default_rfc4648.hpp>
#include <pybind11/stl.h>
#include <algorithm>
#include <cstring>
#include <functional>
#include <stdexcept>
#include "Config.hpp"
constexpr unsigned FLIPPED_HORIZONTALLY_FLAG = 0x80000000;
constexpr unsigned FLIPPED_VERTICALLY_FLAG = 0x40000000;
conste... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.