text stringlengths 3.08k 12.5k |
|---|
// Copyright (c) 2019, <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:
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the ... |
/*
Filename: class.cpp
Created by <NAME>, <NAME>
Date: 06/03/2015
Class: CS 163 - Program #5
Description: This file contains the functions of the class.h
*/
#include "class.h"
// ---------------------------------- TASK -----------------------------------
// Constructor
task::task()
{
name =... |
//
// Programmer: <NAME> <<EMAIL>>
// Creation Date: Fri Apr 12 11:24:53 EDT 2019
// Last Modified: Fri Apr 12 11:24:55 EDT 2019
// Filename: midiroll/tools/holeshift.cpp
// Syntax: C++11
// vim: ts=3
//
// Description: Transpose MIDI file when the hole positions are off
// fro... |
// Copyright 2020 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... |
#include <iostream>
#include <fstream>
#include <string>
#include <regex>
#include <list>
#include <climits>
#include <chrono>
struct Point {
int oX; // x Origin
int oY; // y Origin
int rX; // x Position
int rY; // y Position
int vX; // x Velocity
int vY; // y velocity
};
void displayPoints(std::list<Point>& P,... |
// Tags: DP
// Difficulty: 5
// Priority: 5
// Date: 07-09-2021
#include <bits/stdc++.h>
#define all(A) begin(A), end(A)
#define rall(A) rbegin(A), rend(A)
#define sz(A) int(A.size())
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
using namespace std;
typedef long ... |
#include <cstdio>
#include <iostream>
#include <string>
#include <sstream>
#include <regex>
#include <algorithm>
#include <iomanip>
#include "PasswordData.h"
using std::wcout;
using std::wcin;
using std::endl;
constexpr const wchar_t* path = L"data.idf";
std::wstring& trim(std::wstring& s);
bool WritePasswordData(Pa... |
#include <cppunit/extensions/HelperMacros.h>
#include "PhysicsTools/Utilities/interface/Operations.h"
#include "PhysicsTools/Utilities/interface/Gaussian.h"
#include "PhysicsTools/Utilities/interface/Exponential.h"
#include "PhysicsTools/Utilities/interface/Identity.h"
#include "PhysicsTools/Utilities/interface/Composi... |
/**
This is a refactored version of the original Nybble code, designed to operate
using protothreading.
<NAME>
Jan. 10, 2019
Based upon:
Main Arduino sketch for Nybble, the walking robot kitten.
Updates should be posted on GitHub: https://github.com/PetoiCamp/OpenCat
<NAME>
Aug. 27, 2018
... |
/*
* $Revision $
*
* Copyright 2003-2016 The MathWorks, Inc.
*/
#define S_FUNCTION_NAME vxtask1
#define S_FUNCTION_LEVEL 2
#define TASK_NAME (ssGetSFcnParam(S,0))
#define PRIORITY (ssGetSFcnParam(S,1))
#define STACK_SIZE (ssGetSFcnParam(S,2))
#define PARENT_MANAGET (ssGetSFcnParam(S,3))
#define... |
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 2002.
//
// File: htx.hxx
//
// Contents: Parser for an HTX file
//
// History: 96/Jan/3 DwightKr Created
//
//------------------------------... |
template <class T> T BezierUtil<T>::getCubicBezierCurve( const T x[4], float u )
{
float uinv = 1.f - u;
float uinvpow2 = uinv * uinv;
float u3x = u * 3.f;
float c0 = (uinvpow2*uinv);
float c1 = (u3x*uinvpow2);
float c2 = (u3x*u*uinv);
float c3 = (u*u*u);
T xu = x[0]*c0;
xu += x[1]*c1;
xu += x[2]*c... |
#include <bits/stdc++.h>
using namespace std;
/*************************************************************************************************************
*
* Link : https://www.codechef.com/FEB21C/problems/MEET
* Description:
A time is a string in the format "HH... |
/* Copyright (c) 2005, Regents of Massachusetts Institute of Technology,
* Brandeis University, Brown University, and University of Massachusetts
* Boston. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
#include "StageBreakScene.h"
#include <libgba-sprite-engine/effects/fade_out_scene.h>
#include "SelectionScene.h"
#include "assets.h"
#include "data/content/_compiled_sprites/palette_break.h"
#include "gameplay/Sequence.h"
#include "gameplay/multiplayer/Syncer.h"
#include "player/PlaybackState.h"
#include "utils/Scen... |
/*
* SerialCommunication.cpp
*
* Created on: 14 Aug 2014
* Author: alex
*/
#include "SerialCommunication.h"
#include <iostream>
#include <string>
#include <QCoreApplication>
#include <QTime>
using namespace std ;
void delay( int millisecondsToWait )
{
QTime dieTime = QTime::currentTime().addMSecs( mil... |
#include "UI/Configuration.h"
#include "Main/Application.h"
#include "Modules/ModuleCamera.h"
#include "Modules/ModuleModel.h"
#include "Modules/ModuleScene.h"
#include "Components/ComponentMesh.h"
#include "Resources/Mesh.h"
#include <vector>
#include "ImGui/imgui.h"
#include "ImGui/imgui.h"
#include "ImGui/imgui_in... |
#include "helper_function.h"
// For converting back and forth between radians and degrees.
constexpr double pi() { return M_PI; }
double deg2rad(double x) { return x * pi() / 180; }
double rad2deg(double x) { return x * 180 / pi(); }
int GetLaneNo(double d)
{
if (d > 0.0 && d <= 3.75)
{
return 1;
}
else if (d ... |
//
// Created by Zal on 11/19/16.
//
#include <assert.h>
#include <cmath>
#include "BinaryLayer.h"
using namespace bd;
BinaryLayer::BinaryLayer(uint w, uint h) {
this->init(w, h, 1.0);
this->bl_binMtx = new BinaryMatrix(w, h);
}
BinaryLayer::BinaryLayer(uint w, uint h, uint8 value) {
this->init(w, h, 1... |
// living.cpp
#include "living.h"
/********************************************************************
* Default Constructor
* Initializes some stuff.
********************************************************************/
Living :: Living(unsigned maxhp, unsigned attack) : Thing() {
setMaxHP(maxhp);
setAttackLe... |
//<NAME>
//hangman.h
//Purpose: Implementation of Hangman class described in hangman.h
#include "hangman.h"
Hangman::Hangman()
{
//set up hangman
body[0].firstLine = " ----\n";
body[1].firstLine = " | |\n";
body[2].firstLine = " |\n";
body[2].secondLine = " O |\n";
body[3].firstLine = " ... |
#include <cstring>
#include <iostream>
#include "data_file.h"
#include "fixed_size_register.h"
#include "known_variable_size_register.h"
#include "delimiter_register.h"
using namespace std;
#include <iostream>
char *serializeFixedSize(int id, char name[30], double salary, char job[20])
{
char *data = new char[sizeof... |
/**************************************************************
*
* 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... |
/*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : <NAME>
Contributors : <NAME>, <NAME>.
[1] <NAME>, <NAM... |
#include "ResourcesManager.h"
ResourcesManager::ResourcesManager() {
tJson configData = readConfigFile();
// Iterate thru objects
tJson objects = configData["objects"];
for (auto& obj : tJson::iterator_wrapper(configData["objects"])) {
objectMap[obj.key()] = this->processObjectFile(obj.value()... |
#pragma once
#include <string>
#include <vector>
#include <iostream>
#include <chrono>
#include "CLI11.hpp"
#include "daal.h"
#include "npyfile.h"
namespace dm = daal::data_management;
namespace ds = daal::services;
namespace da = daal::algorithms;
/*
* Parse a size argument as given to the command-line options.
... |
/* dbesk0.f -- translated by f2c (version 20100827).
This file no longer depends on f2c.
*/
#include "slatec-internal.hpp"
/* Table of constant values */
static integer const c__3 = 3;
static integer const c__16 = 16;
static integer const c__1 = 1;
static integer const c__2 = 2;
/* Initialized data */
static do... |
// -*- C++ -*-
/*!
* @file OpenCVCameraTest.cpp
* @brief USB Camera Acquire component
* @date $Date$
*
* @author <NAME> <<EMAIL>>
*
* $Id$
*/
#include "OpenCVCameraTest.h"
// Module specification
// <rtc-template block="module_spec">
static const char* opencvcamera_spec[] =
{
"implementation_id", "Ope... |
#include "MFxSlotWnd.h"
#include "MFxRackFrame.h"
#include <gui/dialog/MMessageBox.h>
INIT_RTTI( MFxSlotWnd::MFxSlotListener, "MFxSlotWnd::MFxSlotListener" );
/**
* constructor
*/
MFxSlotWnd::MFxSlotWnd( unsigned int index, MFxSlot* ptSlot ) :
MWndCollection(),
ivPtModel( ptSlot ),
ivPtListener( 0 ),... |
#include <string>
#include <iostream>
#include <ros/ros.h>
#include "gpoctomap.h"
#include "markerarray_pub.h"
void load_pcd(std::string filename, la3dm::point3f &origin, la3dm::PCLPointCloud &cloud) {
pcl::PCLPointCloud2 cloud2;
Eigen::Vector4f _origin;
Eigen::Quaternionf orientaion;
pcl::io::loadPCDF... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include "cbase.h"
#include "hl1_ai_basenpc.h"
#include "scripted.h"
#include "soundent.h"
#include "animation.h"
#inclu... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commerc... |
#include <glew.h>
#include <iostream>
#include "Debug.h"
#include "Scene2.h"
#include "Camera.h"
#include "DemoObject.h"
#include "ObjLoader.h"
#include "Mesh.h"
#include "Shader.h"
#include "Texture.h"
#include "MMath.h"
#include "Debug.h"
#include "Physics.h"
#include "Skybox.h"
Scene2::Scene2() : camera(nullptr), e... |
//https://www.opengl.org/archives/resources/code/samples/glut_examples/examples/examples.html
#include <GL/glut.h>
#include <thread>
using namespace std;
GLfloat light_diffuse[] = { 1.0, 0.0, 0.0, 1.0 }; /* Red diffuse light. */
GLfloat light_position[] = { 10.0, 10.0, 10.0, 0.0 }; /* Infinite light location. */
GL... |
#include "xml.h"
#include <procgen/procgen.h>
#include <procgen/utils/logger.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <cmath> // <ctin> ? pun intended
// low-precision PI, because M_PI sucks at Windows
#define MY_PI 3.1415
using json = nlohmann::json;
// Define 2D vector to simplify code
struct Po... |
#include "polybench.hpp"
static __attribute__((noinline)) void init_array(int w, int h, float *alpha, float imgIn[7680][4320]) {
int i, j;
*alpha = 0.25;
if (load_init("imgIn", imgIn[0], w * h))
return;
for (i = 0; i < w; i++)
for (j = 0; j < h; j++)
imgIn[i][j] = (float)((313 * i + 991 * j) % ... |
//
// Jan-2021, <NAME>
// MIT license
//
#include "text_renderer.h"
#include "mesh2.h"
#include "resources.h"
#include "ft2build.h"
#include "freetype/freetype.h"
#include "opengl_util/gll_binding.h"
#include "opengl_util/gll_program.h"
#include "opengl_util/gll_shader.h"
#include <array>
///////////////////
static ... |
#include "WavesGenerator.h"
#define USE_GPU_FFT 1
WavesGenerator::WavesGenerator(Context* in_context, int in_size, int in_length) {
context = in_context;
size = in_size;
length = in_length;
// init params
wave_amp = 0.0003f;
wind_speed = glm::vec2(32.0f, 32.0f);
dispersion_table = new fl... |
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Jefferson Science Associates LLC Copyright Notice:
//
// Copyright 251 2014 Jefferson Science Associates LLC All Rights Reserved. Redistribution
// and use in source and binary forms, with or without modification, are... |
/*
**
** Copyright (c) 2020 Japan Aerospace Exploration Agency.
** All Rights Reserved.
**
** This file is covered by the LICENSE.txt in the root of this project.
**
*/
#include "communication/communication.h"
#include "define.h"
#include "pthread.h"
#include "convert/publisher.h"
#include "errno.h"
extern "C" {
... |
/*
* (C) 2014 see Authors.txt
*
* This file is part of MPC-BE.
*
* MPC-BE 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 3 of the License, or
* (at your option) any later version.
*
* MPC-BE is... |
//
// Copyright (c) 2022 Riverbed Technology LLC
//
// This software is licensed under the terms and conditions of the MIT License
// accompanying the software ("License"). This software is distributed "AS IS"
// as set forth in the License.
//
#define __STR2__(x) #x
#define __STR1__(x) __STR2__(x)
#define __PPOUT_... |
#include <malloc.h>
#include <string.h>
#include <math.h>
#include <pthread.h>
#ifdef _WIN32
#include <stdio.h>
#else
#include <android/log.h>
#endif
#include "Image.h"
extern WORD **gLinesPtr;
extern WORD **gSclLinesPtr;
extern int gCancel;
extern int gMaxThreadNum;
extern char gDitherX_3bit[8][8];
extern ... |
/*
MDAL - Mesh Data Abstraction Library (MIT License)
Copyright (C) 2018 Lutra Consulting Limited
*/
#include "mdal_xmdf.hpp"
#include "mdal_utils.hpp"
#include "mdal_data_model.hpp"
#include "mdal_hdf5.hpp"
#include <string>
#include <vector>
#include <memory>
MDAL::LoaderXmdf::LoaderXmdf( const std::string &da... |
/**************************************************************************
*
* Copyright 2011 <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 r... |
// Copyright 2021 University of Adelaide
//
// 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 agr... |
/** @file 18.cpp Problem 18: Maximum path sum I
*
* By starting at the top of the triangle below and moving to adjacent numbers
* on the row below, the maximum total from top to bottom is 23.
*
* 3
* 7 4
* 2 4 6
* 8 5 9 3
*
* That is, 3 + 7 + 4 + 9 = 23.
*
* Find the maximum total from t... |
#include "DHASLogging.h"
#include <iostream>
#include <stdio.h>
#include <string>
#include <sstream>
#include "WebInterface.h"
#include "ModuleProvider.h"
#include "RESTInterface.h"
#include "EventProcessor.h"
#include "WebNotificationEngine.h"
#include <sched.h>
#include "config.h"
#include "WeatherHelper.h"
#include ... |
/*
<NAME>
IIIT Bangalore
*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include... |
/**********************************************************
File: barrier_bcast.cc
Description: Every process writes hello and its rank
Implementing the barrier and broadcast
functions based on a simple send and
receive.
Last update: ... |
#pragma once
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <array>
#include <exception>
#include <functional>
#include <initializer_list>
#include <istream>
#include <optional>
#include <ostream>
#include <vector>
#include <insertionfinder/algorithm.hpp>
#include <insertionfinder/twist.hpp>
namespa... |
/*
*
* Copyright 2014 <NAME>, <NAME>, <NAME> 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 copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*... |
// Definition of the antenna-related geometry functions
#include "geometryfunc.h"
#include <isce3/core/Quaternion.h>
#include <isce3/core/Vector.h>
#include <isce3/except/Error.h>
#include <isce3/geometry/geometry.h>
// Aliases
using namespace isce3::core;
namespace geom = isce3::geometry;
namespace ant = isce3::ante... |
// See LICENSE_CELLO file for license and copyright information
/// @file problem_MethodDebug.cpp
/// @author <NAME> (<EMAIL>)
/// @date 2020-03-19
/// @brief Implementation of the debug method
#include "problem.hpp"
#include "charm_simulation.hpp"
#include "test.hpp"
// #define DEBUG_METHOD_DEBUG
// #d... |
#include <libgearman/gearman.h>
#include <gearbox/core/strlcpy.h>
#include <gearbox/core/Json.h>
#include <gearbox/core/util.h>
#include <map>
std::map<std::string, bool> error;
std::map<std::string,Gearbox::Json> response;
static std::string gFunctionName;
static std::string gWorkload = "{}";
static gearman_worker_fn... |
#include <sstream>
#include <string>
#include "Game.hpp"
#include "GraphicsSystem.hpp"
#include "PhysicsSystem.hpp"
GraphicsSystem::GraphicsSystem(Game *game)
: Process(game)
, cameraPosition(0.0f, 2.5f)
, viewportSize(9)
{
m_debuggerFont = m_game->resourceManager.loadFont("UbuntuMono-R.ttf");
m_... |
/*
* Copyright 2017 Midokura SARL
*
* 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... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <string.h>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include "../indexing/SimpleIndexFlat.h"
#include <sys... |
/**
* Toward a resource manager.
*
* First of all, I believe that resources should be stored/managed by type. I
* am not sure this is the right way to do so, but I have the impression I
* should start like that.
* => one manager by resource type
*
* Also, I do not feel I will need to store managers in a contain... |
//#include "opencv2/highgui/highgui.hpp"
#include <opencv2\opencv.hpp>
#include <iostream>
#include <windows.h>
using namespace cv;
using namespace std;
// Mat& showpicture(Mat& star, int size) // if want return value, header need address sign '&'
// show Mosaic with point (The efficient way)
void showPoint(Mat& so... |
#include <iostream>
#include <array>
#include <random>
#include "RTree.h"
/// Simplify handling of 3 dimensional coordinate
struct Vec3
{
/// Default constructor
Vec3() {}
/// Construct from three elements
Vec3(float a_x, float a_y, float a_z)
{
v[0] = a_x;
v[1] = a_y;
v[2] = a_z;
... |
#include<climits>
#include<algorithm>
#include<queue>
#include<math.h>
#include<vector>
#include<iostream>
#include<string>
#include<utility>
using namespace std;
#include "graph.h"
Graph::Graph(int N){
size = N;
Adj.resize(size);
distance.resize(size);
parents.resize(size);
colors.resize(s... |
#include <iostream>
#include <sstream>
#include <string>
#include <ctime>
#include <cstdio>
#include "BARManager.hpp"
BARManager::BARManager(const char* calibrateFile, int markerLength)
{
cameraMatrix = Mat::eye(3, 3, CV_32FC1);//CV_64FC1
distCoeffs = Mat::zeros(8, 1, CV_32FC1);
if (calibrateFileLo... |
/*
* modelfactorymixlen.cpp
*
* Created on: Sep 2, 2015
* Author: minh
*/
#include "tree/phylotreemixlen.h"
#include "utils/timeutil.h"
#include "utils/tools.h"
#include "model/modelfactorymixlen.h"
#include "model/modelmarkov.h"
#include "model/modelmixture.h"
#include "rateheterotachy.h"
ModelFactoryMixl... |
/*
* A program that folds a strand of nucleic acids from a previously folded save file.
* This strand of nucleic acids can be composed of either DNA or RNA.
*
* (c) 2009 Mathews Lab, University of Rochester Medical Center.
* Written by <NAME>
*/
#include "refold.h"
//////////////////////////////////////////////... |
#include <string>
#include <algorithm>
#include <opencv2/opencv.hpp>
#include <librealsense2/rs.hpp>
#include <json.hpp>
#include <Strawberry.hpp>
#include <RealSenseD400.hpp>
#include <MultiCamD400.hpp>
#include <ConfigManager.hpp>
void PrintHelp() {
std::cout << "Controls: \n\t-save, s (Writes all output to di... |
/* Completed!
* 119 ms
*/
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <stdio.h>
#define MAXF 20
#define MAXN 1001
#define MAXM 10
#define MAXA 40000
#define MAXH 80003
#define NULL 0
#define salloc() &nodes[sidx]
struct Node {
int pid, area;
long long int cost;
bool reserve... |
#include <iostream>
#include "graph.h"
#include "voce.h"
#include <assert.h>
/**
* @brief Functor used for educational pourposes.
*
*/
struct _isEqualsChar {
/**
* @brief Returns true when a and b are the same character
*
* @param a First character
* @param b Second character
* @retur... |
#define _CRT_SECURE_NO_WARNINGS
#include <Windows.h>
#include <stdio.h>
#include <process.h> // needed for _beginthread()
#define NCURSES_MOUSE_VERSION
#include <curses.h>
#include "serial_comm/serial_init.h"
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdio... |
/** \file p21read.cc
** 21-Jul-1995
** This code was developed with the support of the United States Government,
** and is not subject to copyright.
** This file contains a simple little program to read in a file and
** write it back out to a new file. The purpose is to demonstrate the
** use of a Schema Class Librar... |
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2009 <NAME> http://bulletphysics.org
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 a... |
/*
* SEGS - Super Entity Game Server
* http://www.segs.io/
* Copyright (c) 2006 - 2018 SEGS Team (see AUTHORS.md)
* This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
*/
/*!
* @addtogroup MapServer Projects/CoX/Servers/MapServer
* @{
*/
#include "WorldSimulation... |
/*
* bpu.cc - the branch prediction unit for MIPS
* @author <NAME> <<EMAIL>>
* Copyright 2017-2018 MIPT-MIPS
*/
#include "bpentry.h"
#include "bpu.h"
// MIPT_MIPS modules
#include <infra/cache/cache_tag_array.h>
#include <infra/config/config.h>
// C++ generic modules
#include <map>
#include <memory>
#include <ve... |
/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the
License.
This program is distributed i... |
// 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 "ui/views/widget/desktop_aura/x11_window_event_filter.h"
#include <X11/extensions/XInput.h>
#include <X11/extensions/XInput2.h>
#include <X1... |
#pragma once
/*
References
https://github.com/HandmadeMath/Handmade-Math/blob/master/HandmadeMath.h
*/
#include <stdlib.h>
#include <math.h>
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
// doesn't deal with -0 vs +0
#define ABS(a) ((a) > 0 ? (a) : -(a))
inline doubl... |
#include <algorithm>
#include <cfloat>
#include <memory>
#include <vector>
#include <wayfire/plugin.hpp>
#include <wayfire/view.hpp>
#include <wayfire/view-access-interface.hpp>
#include <wayfire/signal-definitions.hpp>
#include <wayfire/view-transform.hpp>
#include <wayfire/parser/rule_parser.hpp>
#include <wayfire/l... |
#include "drillreader.h"
#include <stdio.h>
DrillReader::DrillReader(char *filename, const GPoint &offset, const GPoint &max, Mirror mirror)
{
mUnits = UNITS_INC;
mCoord = COORD_ABSOLUTE;
mXOffset = offset.x;
mYOffset = offset.y;
mReadX = 0.0f;
mReadY = 0.0f;
mXOffset92 = 0.0f;
mYOffse... |
#include "Logger.h"
#include "Timestamp.h"
#include "CurrentThread.h"
#include <fcntl.h>
#include <assert.h>
#include <mutex>
#include <memory>
#include <sstream>
#include <iomanip>
#undef DECLARE_VARIABLE
#define DECLARE_VARIABLE(type, shorttype, value, name) \
namespace fl##shorttype { ... |
#include <physycom/time.hpp>
#include "config.h"
#include "global_params.h"
config::config() {}
void config::set_config(jsoncons::json jconf)
{
this->city_tag = jconf.has_member("city_tag") ? jconf["city_tag"].as<std::string>() : "city_name";
this->file_pro = jconf.has_member("file_pro") ? jconf["file_pro"].as<s... |
// Written by <NAME>
// Released under CC BY-NC-SA 3.0 license
// Build a reflow oven: http://whizoo.com
//
// Touch controller for XPT2046
//
// For general software development, TOUCH_DEBUG should be enabled so that
// range checking happens on all parameters ensuring that all drawing takes
// place on th... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#include "ControlSystem/TimescaleTuner.hpp"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <functional>
#include <ostream>
#include <pup.h>
#include "Utilities/ConstantExpressions.hpp"
#include "Utilities/ErrorHandling/Assert.hp... |
#include <bits/stdc++.h>
#include "../rapidjson/document.h"
#include "../rapidjson/prettywriter.h"
using namespace rapidjson;
using namespace std;
const int maxn = 105;
const int maxk = 5;
const double pi = acos(-1.0);
int K;
int N;
vector<int> arr[maxk];
void input(const char *path)
{
ifstream file(path);
... |
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile$
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WA... |
#include "merge.h"
#include "Halide.h"
#include "align.h"
#include "Point.h"
#include "util.h"
using namespace Halide;
using namespace Halide::ConciseCasts;
/*
* merge_temporal -- combines aligned tiles in the temporal dimension by
* weighting various frames based on their L1 distance to the reference ... |
//===-- GEPExprArg.cpp - Promote args if they come from GEPs -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//===--- AArch64StorePairSuppress.cpp --- Suppress store pair formation ---===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
#include "Channel.hpp"
#include "Doorman.hpp"
#include "Xania.hpp"
#include "common/mask_hostname.hpp"
#include <arpa/inet.h>
#include <cstring>
#include <netdb.h>
using namespace std::literals;
static constexpr auto MaxIncomingDataBufferSize = 2048u;
std::string Channel::lookup(const sockaddr_in &address) const {... |
/*
* Copyright (c) 2015 Kaprica Security, 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... |
/****************************************************************************
* VLC-Qt - Qt and libvlc connector library
* Copyright (C) 2013 <NAME> <<EMAIL>>
*
* Based on Phonon multimedia library
* Copyright (C) 2011 <NAME> <<EMAIL>>
*
* This library is free software: you can redistribute it and/or modify
* it under ... |
/* Copyright (c) 2014-2015, <NAME> <<EMAIL>>
* Permission to use, copy, modify, and/or distribute this
* software for any purpose with or without fee is hereby granted,
* provided that the above copyright notice and this permission
* notice appear in all copies.
*/
#include "mapping-dialog.hpp"
#include "logic/m... |
/* Copyright (c) 2005, Regents of Massachusetts Institute of Technology,
* Brandeis University, Brown University, and University of Massachusetts
* Boston. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... |
#include "malarga_gui.h"
#include <cwctype>
using namespace Malarga;
RecordView::RecordView(RecordManager& m)
: winqry(420, 540, MsgViewProvider::Msg("title-history")),
btnback(MsgViewProvider::Msg("left-arrow"), true),
lblhsty(MsgViewProvider::Msg("title-history"), true),
lblpath(m.getPath()),
lblfin... |
// Copyright 2018 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 "address_space.h"
#include "magma_util/macros.h"
const AddressSpace::pte_t AddressSpace::kInvalidPte =
AddressSpace::pte_encode_unsafe(0xdea... |
#include "order_book.hpp"
#include "order_book_core.hpp"
// #define __DEBUG__
// order book for only one instrument
// searching by calculating address index in the book, price depth
// unsigned int fixed_shift_int(
// price_t price
// ){
// static float scale = 1/UNIT;
// return (unsigned int)(price*scale);
// }
... |
//#include <ESP8266WiFi.h>
#include <SmartThingsESP8266WiFi.h>
using HubitatClient = st::SmartThingsESP8266WiFi;
#include <ArduinoJson.h>
// Enable VCC measurement (must be at the top of the file in global scope)
ADC_MODE(ADC_VCC);
////////////////////////////////////////////////////////////////////////////////
// ... |
#include <base/GsEventContainer.h>
#include "engine/core/spritedefines.h"
#include <base/audio/Audio.h>
#include "CTank.h"
#include "CRay.h"
#include "fileio/KeenFiles.h"
CTank::CTank(CMap *p_map, Uint32 x, Uint32 y, object_t objtype) :
CVorticonSpriteObject(p_map, x, y, objtype, 0)
{
m_type = OBJ_TANK;
... |
#include "planning/body.hh"
#include "planning/joint_planner.hh"
#include "geometry/intersection/sphere_plane.hh"
#include "geometry/shapes/circle.hh"
#include "geometry/shapes/halfspace.hh"
#include "geometry/shapes/sphere.hh"
#include "geometry/visualization/put_circle.hh"
#include "viewer/primitives/simple_geomet... |
//**.****|****.****|****.****|****.****|****.****|****.****|****.****|****.****|
// * B_field_model.cc * galprop package * 4/14/2000
//**"****!****"****!****"****!****"****!****"****!****"****!****"****!****"****|
using namespace std;//AWS20050624
#include<iostream>
#include <cmath>
#include... |
#include "mbed.h"
# include "headers/song_def.h"
# include "headers/song.h"
#include "headers/NHD_0216HZ.h"
# include <string>
using namespace std;
# define BUTTON_1 D2
# define BUTTON_2 D3
# define BUTTON_3 D4
# define BUTTON_4 D5
# define RED_LED D6
# define GREEN_LED D7
# define BLUE_LED D8
# define SPEAKER D9... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.