text stringlengths 3.08k 22k |
|---|
/*
Copyright (c) 2012, <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:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following ... |
/*
ttt.cpp
<NAME>, CISP360
11/11/18
*/
#include <iostream>
#include <string>
#include <cctype>
#include <cstdlib>
#include <vector>
using namespace std;
const int arraySize = 10;
typedef string arr[arraySize];
void menu(int & , int & ), rules(), updateBoard(arr nums, int, string), displayBoard(arr nums),... |
/*
TM1650.cpp - Library implementation for TM1650.
Part of the TM16xx library by Maxint. See https://github.com/maxint-rd/TM16xx
The Arduino TM16xx library supports LED & KEY and LED Matrix modules based on TM1638, TM1637, TM1640 as well as individual chips.
Simply use print() on 7-segment displays and use Adafruit GF... |
/* Linguagens de Programação 2017.1
* Autorship: <NAME> and <NAME>
*
* Implementation of the List ADT using doubly linked list
*/
// Quick compilation
// g++ src/driver.cpp -o bin/list -I include -Wall -std=c++11
#include <iostream>
#include <cassert>
#include "list.h"
template <typename T>
void print( ls::lis... |
#include "Rock.hpp"
#include "Hero.hpp"
#include "Basket.hpp"
#include "Misc.hpp"
#include "global.h"
#include "debug.h"
#define BOUNCE_Y_COORD 460
Rock :: Rock()
{
type = TYPE_ROCK;
action = ACTION_IDLE_RIGHT;
minVelocity.x = 1;
minVelocity.y = 1;
maxVelocity.x ... |
/****************************************************************************************
*
* ROVER SANITY CHECKER - NOVA ROVER TEAM - URC2018
* This is the code executed onboard the rover to check that core functionalities are
* operating within expected ranges. If a range is exceeded for a specified leng... |
/*!
* @section LICENSE
*
* @copyright
* Copyright (c) 2015-2019 Intel Corporation
*
* @copyright
* 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
*
* @copyright
* http://www.apach... |
// https://developer.blender.org/diffusion/B/browse/master/source/blender/blenlib/intern/math_geom.c;3b4a8f1cfa7339f3db9ddd4a7974b8cc30d7ff0b$2411
#include "polyfill.h"
#include <set>
#include <cmath>
#include <algorithm>
struct horizontal_segment {
int y, x0, x1;
};
struct coord {
int x, y;
};
struct intersecti... |
/*
* serial/main.cpp
*
* Created on: Jan 25, 2017
* Author: dbourge
*
* miniIsosurface is distributed under the OSI-approved BSD 3-clause License.
* See LICENSE.txt for details.
*
* Copyright (c) 2017
* National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under
* the terms of Contract DE... |
#include "driver.h"
#include "m6502/m6502.h"
#include "machine/6821pia.h"
#define BASE_TIME 1/.894
#define BASE_FREQ 1789773*8
int exidy_sample_channels[3];
unsigned int exidy_sh8253_count[3]; /* 8253 Counter */
int exidy_sh8253_clstate[3]; /* which byte to load */
int flag;
static signed char exidy_waveform1[16] ... |
#include <iostream>
#include <math.h>
/*array form of the polynomial to calculate CRC parity*/
const bool gCRC24A[25] = {1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1};
const bool gCRC24B[25] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,... |
// Copyright (c) 2017-2021 Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge,... |
// Adapted from
// https://stackoverflow.com/questions/34511312/how-to-encode-a-video-from-several-images-generated-in-a-c-program-without-wri
#include "movie.h"
#ifdef USE_CAIRO
#include <librsvg-2.0/librsvg/rsvg.h>
#endif
#include <vector>
using namespace std;
// One-time initialization.
class FFmpegInitialize {
... |
/**********************************************************************
Audacity: A Digital Audio Editor
WaveTrackView.cpp
<NAME> split from TrackPanel.cpp
**********************************************************************/
#include "WaveTrackView.h"
#include "../../../../Experimental.h"
#include <wx/graphic... |
/*
* ISHProfiler -- an image-based computational workflow for accurate detection of molecular signals
* <https://github.com/dvischi/ish>
*
* Copyright (c) 2017 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
... |
#include "DShotRMT.h"
#include "freertos/task.h"
#define LOG_LOCAL_LEVEL ESP_LOG_DEBUG
#include "esp_log.h"
static const char *TAG = "dshot-rmt";
#define DSHOT_ERROR_CHECK(x) ({ \
esp_err_t __ret = x; \
if (__ret != ESP_OK) \
return __ret; \
__ret; ... |
#include "BMPImage.h"
#include <fstream>
#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
// Default constructor. Do nothing.
BMPImage::BMPImage()
{
}
// Generates an empty image given image width: w and height: h
BMPImage::BMPImage(int w, int h)
{
width = w;
height = h;
... |
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007; // 998244353; // 998244853;
template <typename T>
struct modular {
constexpr modular() : val(0){}
constexpr modular(const modular<T>& _m) : val(_m.val) {}
template <typename U> constexpr modular(const U& _r = U()) {
val = -... |
/*
* RawRawAminoAcid-test.cpp
*
* Copyright (c) 2012 <NAME>
* Copyright (c) 2012 <NAME>
*
* This file is part of the Mass Spectrometry Toolkit (MSTK).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal... |
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <Eigen/Core>
#include "igl/AABB.h"
#include "igl/adjacency_list.h"
#include "igl/adjacency_matrix.h"
#include "... |
#include "typeset_painter.h"
#include <typeset_themes.h>
#include <typeset_view.h>
#ifndef NDEBUG
#include <iostream>
#endif
#include <array>
#include <QDialog>
#include <QLabel>
#include <QPainterPath>
//EVENTUALLY: probably want to codegen these
static constexpr double ASCENT[3] = {
12.34375,
8.546875,
... |
#define GLEW_STATIC
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "vector"
#include <memory>
#include "common/OBJ_Loader.h"
#include "Cloth.h"
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "Shad... |
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <iostream>
#include <vector>
#include "pbc_c.h"
#include "calc_c.h"
using namespace std;
namespace py = pybind11;
// void pbc_apply3x3(const double * pos, int len, double * pbc, double a);
int hbonds_number(const double* array1, int len1, const dou... |
/*
Copyright 2008 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 writing,... |
#include <iostream>
#include <vcrate/vcx/Executable.hpp>
#include <vcrate/Alias.hpp>
#include <vcrate/Interpreter/Interpreter.hpp>
#include <vcrate/instruction/Instruction.hpp>
#include <vcrate/bytecode/Operations.hpp>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iomanip>
using namespace vcrate... |
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <ctime>
#include <commonmath.h>
#include <convexoptimization.h>
#include <numericalpde.h>
#include <timemanagement.h>
using namespace ContinuumRobotLibrary;
#ifdef QT_CORE_LIB
#include <simpleplotting.h>
#endif
//Independent Parameters
const double E ... |
/**
* $Id: I3GeometryDecomposer.cxx 173058 2019-05-07 13:50:47Z jvansanten $
*
* Copyright (C) 2012
* <NAME> <<EMAIL>>
* and the IceCube Collaboration <http://www.icecube.wisc.edu>
*
*/
#include <icetray/I3Module.h>
#include <icetray/I3Units.h>
#include <dataclasses/geometry/I3Geometry.h>
#include <data... |
/*******************************************************************************
Copyright(C) <NAME> 2013.
This file is part of the Sortix C Library.
The Sortix C Library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published b... |
#pragma once
#define _CRT_SECURE_NO_WARNINGS
#include "World.hpp"
#include "Server.hpp"
#include "enet/enet.h"
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
#include <random>
#include <chrono>
extern ENetHost* Server;
extern unsigned char* ItemsDatData;
extern int ItemsDa... |
/*
* Firmware for GRA & AFCH's NCS318 Nixie Clock
* Copyright 2019 <NAME>
*
* 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
* l... |
#include <srrg_system_utils/system_utils.h>
#include <srrg_boss/id_context.h>
#include <srrg_boss/serializer.h>
#include <srrg_boss/deserializer.h>
#include <srrg_messages/laser_message.h>
#include <srrg_messages/imu_message.h>
#include <srrg_messages/joint_state_message.h>
#include <srrg_messages/image_message.h>
#inc... |
// --------------------------------------------------------------------------------
// 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 withou... |
#define _CRT_SECURE_NO_WARNINGS
//#include <windows.h>
#include <iostream>
#include <stdio.h>
#include <vector>
#include <memory>
#include <algorithm>
#include <numeric>
#include <string>
#include <set>
#include <tuple>
#include <functional>
#include <cstring>
#include <deque>
#include <array>
#include <map>
#include ... |
#include <cstring>
#include <string>
// BMP
#include <libnsbmp.h>
// BMP
#include "libnsgif.h"
// JPEG
#include <turbojpeg.h>
// STB
#define STB_IMAGE_IMPLEMENTATION
#define STBI_NO_BMP
#define STBI_NO_HDR
#define STBI_NO_JPEG
#define STBI_NO_PIC
#define STBI_NO_PNG
#define STBI_ONLY_GIF
#define STBI_ONLY_PNM
#defi... |
// mosquitto_sub -t home/sensores/arduino/#
// por: <NAME> - 2019
//
#include <SPI.h>
#include <DHT.h>
#include <DHT_U.h>
#include <Arduino.h>
#include <Ethernet.h>
#include <PubSubClient.h>
#include <Adafruit_Sensor.h>
//.. define pinagem dos sensores
#define DHTTYPE DHT22 // Sensor DHT 22 (AM2302)
#define DHTPIN ... |
#include "doro_manager.h"
#include "ui_doro_manager.h"
doro_manager::doro_manager(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::doro_manager)
{
ui->setupUi(this);
//Setting Application style to Fusion
QApplication::setStyle(QStyleFactory::create("Fusion"));
this->timer1 = new QTimer(this)... |
/*
This file forms part of hpGEM. This package has been developed over a number of
years by various people at the University of Twente and a full list of
contributors can be found at http://hpgem.org/about-the-code/team
This code is distributed using BSD 3-Clause License. A copy of which can found
below.
Copyr... |
#include <cstdio>
#include <string>
#include <math.h>
#include <stdlib.h>
#include "ppapi/cpp/instance.h"
#include "ppapi/cpp/module.h"
#include "ppapi/cpp/text_input_controller.h"
#include "ppapi/cpp/view.h"
#include "ppapi/cpp/var.h"
#include "ppapi/cpp/graphics_3d.h"
#include "ppapi/utility/completion_callback_fact... |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <math.h>
#include <ctype.h>
#include <errno.h>
#include <raikv/shm_ht.h>
#include <raikv/monitor.h>
using namespace rai;
using namespace kv;
static const char *
get_arg( ... |
#include "OnDiskDataset.h"
#include <fstream>
#include <set>
#include <array>
#include "Database.h"
#include "Query.h"
#include "Json.h"
OnDiskDataset::OnDiskDataset(const fs::path &db_base, const std::string &fname)
: name(fname), db_base(db_base) {
std::ifstream in(db_base / name, std::ifstream::binary);
... |
#include "include/data_io.hpp"
#include "include/depthmap_utility.hpp"
#include "include/depthmap_stitcher.hpp"
#include "include/timer.hpp"
#include <opencv2/opencv.hpp>
#include <ceres/ceres.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <iostream>
#include <string>
#include <random>
#include <rege... |
//
// by Jia, Apr 2019
//
#include "PDBClient.h"
#include "RedditComment.h"
#include <RedditAuthor.h>
#include <RedditSub.h>
#include <RedditFeatures.h>
#include <RedditSubsAndComments.h>
#include <RedditJoin.h>
#include <RedditJoinSubsAndComments.h>
#include <RedditPositiveLabelSelection.h>
#include <RedditNegativeLa... |
#include <vector>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <stdlib.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <allegro5/allegro_image.h>
#include <allegro5/allegro_primitives.h>
#include "map.h"
#include "main.h"
#includ... |
// TortoiseSVN - a Windows shell extension for easy version control
// Copyright (C) 2003-2008, 2011-2016 - TortoiseSVN
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// ... |
#include "FILEOPR.h"
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!! RANDOM NUMBER GENERATER FOR ACCOUNT BALANCE !!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
float FILEOPR::getRBal( )
{
//Random seed.
random_device rd;
// Initialize Mersenne Twister
// pseudo-random number generato... |
/* nsapi_dns.cpp
* Original work Copyright (c) 2013 <NAME> (henry[dot]leinen [at] online [dot] de)
* Modified work Copyright (c) 2015 ARM 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 Li... |
#include "ros/ros.h"
#include "crazyflie_driver/Orientation.h"
#include "crazyflie_driver/AddCrazyflie.h"
#include "crazyflie_driver/UpdateParams.h"
#include "std_srvs/Empty.h"
#include "geometry_msgs/Twist.h"
#include "geometry_msgs/Vector3Stamped.h"
#include "sensor_msgs/Temperature.h"
#include "sensor_msgs/MagneticF... |
//===- odla_pipeline.cc
//----------------------------------------------------===//
//
// Copyright (C) 2019-2020 Alibaba Group Holding Limited.
// Copyright (c) 2020 Graphcore Ltd. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complian... |
//===-- RISCVFrameLowering.cpp - RISCV Frame Information ------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
//==============================================================================================
// Originally written in 2016 by <NAME> <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all copyright and related and
// neighboring rights to this software to the public domain worldwide. Thi... |
// Copyright (c) 2009-2010 <NAME>
// Copyright (c) 2009-2014 The Bitcoin developers
// Copyright (c) 2016-2020 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
#include "legacy/stakemodifier... |
// -*- C++ -*-
//
// Package: HcalTestBeam
// Class : HcalTB06Analysis
//
// Implementation:
// Main analysis class for Hcal Test Beam 2006 Analysis
//
// Original Author:
// Created: 19 November 2015
//
// user include files
#include "SimG4CMS/HcalTestBeam/interface/HcalTB06Histo.h"
#include "Si... |
/*
Copyright (C) 2019 <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
dist... |
/*
* Copyright 2012-2014 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... |
#include <hre/config.h>
#include <hre/user.h>
#include <dm/dm.h>
#include <dm/dm_boost.h>
#include <ltsmin-lib/ltsmin-standard.h>
#include <popt.h>
#include <vector>
#include <iostream>
#include <boost/config.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/grap... |
/* Siconos is a program dedicated to modeling, simulation and control
* of non smooth dynamical systems.
*
* Copyright 2016 INRIA.
*
* 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
*
*... |
/*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... |
#include "sceneloader.h"
#include <json/value.h>
#include <ospcommon/math/vec.h>
#include <ospray/ospray_cpp/Material.h>
#include <stdexcept>
#include <fstream>
#define TINYOBJLOADER_IMPLEMENTATION
#include "tiny_obj_loader.h"
#include <json/json.h>
cpp::Group model::loadobj(const std::string& objFileName) {
tiny... |
// Copyright 2017 <NAME>.
//
// Distributed under the Boost Software License, Version 1.0.
//
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/variant2/variant.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/core/lightweight_test_trait.hpp>
#i... |
/*
Copyright (c) 2015, <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 following discla... |
/*
* cmdparser.cpp
*
* Created on: 31.01.2020
* Author: Yannick
*/
#include <CmdParser.h>
#include "ErrorHandler.h"
#include "CommandHandler.h"
#include "FFBoardMainCommandThread.h"
#include "critical.hpp"
CmdParser::CmdParser(uint32_t reservedBuffer) {
this->reservedBuffer = reservedBuffer;
buffer.reser... |
/* Copyright libuv project contributors. 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, cop... |
#include "WProgram.h"
#include "watchcore.hpp"
#include "watchmode.hpp"
#include "clockmode.hpp"
#include "tempuraturemode.hpp"
#include "timermode.hpp"
#include "stopwatchmode.hpp"
#include "testmode.hpp"
#include <Wire.h>
#include <Time.h>
#define dc 16
#define cs 10
#define rst 9
WatchCore::WatchCore() : disp... |
#include<iostream>
#include<sys/socket.h>
#include<netinet/in.h>
#include<unistd.h>
#include<string.h>
#include<arpa/inet.h> //inet_pton function
#include<fstream>
void ls(int);
void download(int,char[]);
void upload(int, char[]);
void how_to_use();
int main(){
how_to_use();
int client_sock;
struct sockaddr_in ... |
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
using namespace std;
#include <itkImage.h>
#include <itkImageFileReader.h>
#include <itkImageFileWriter.h>
#include <itkBinaryThresholdImageFilter.h>
#include <itkBinaryNotImageFilter.h>
#include <itkImageToVTKImageFilter.h>
#include <itkRescal... |
/**
* The MIT License
*
* Copyright (c) 2020 <NAME> (https://github.com/ilwoong)
*
* 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 limita... |
/* Copyright 2021 iwatake2222
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
dis... |
/*
* 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 "stdafx.h"
float Random()
{
static std::mt19937 seed{ std::random_device()() };
return std::uniform_real_distribution<float>(0.0, 1.0)(seed);
}
double GetTime()
{
static auto start = std::chrono::high_resolution_clock::now();
auto now = std::chrono::high_resolution_clock::now();
return std::... |
// **************************************************************************
// class PkPass
// 02.07.2021
// Model for handling locally stored passes managed by this app
// **************************************************************************
// MIT License
// Copyright © 2021 <NAME>
// Permission is hereby gran... |
#include "clustering.h"
#include "common/random_utils.h"
#include "common/geometry/point.h"
#include "common/geometry/delaunay_triangulation.h"
using namespace geometry;
#include <algorithm>
#include <iomanip>
DotNode* GeometricKMeans::getNextMean(const vector<DotNode*>& means, ConnectedDotGraph& g)
{
VD minDist;
... |
#include "glfw_view.hpp"
#include <mbgl/util/string.hpp>
GLFWView::GLFWView(bool fullscreen) : fullscreen(fullscreen) {
#ifdef NVIDIA
glDiscardFramebufferEXT = (PFNGLDISCARDFRAMEBUFFEREXTPROC)glfwGetProcAddress("glDiscardFramebufferEXT");
#endif
}
GLFWView::~GLFWView() { glfwTerminate(); }
void GLFWView::initia... |
/* -------------------------------------------------------------------------- *
* OpenSim: testStaticOptimization.cpp *
* -------------------------------------------------------------------------- *
* The OpenSim API is a toolkit for musculoskeletal modeling and simulation. *
... |
#include <stdio.h>
#include "query1_kernel.hpp"
#include "../db_utils/Accumulator.hpp"
#include "../db_utils/Tuple.hpp"
#include "../db_utils/Unroller.hpp"
using namespace std::chrono;
// how many elements to compute per cycle
constexpr int kElementsPerCycle = 12;
// the kernel name
class Query1;
bool SubmitQuery... |
/*
*/
#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>
using namespace std;
class call_record
{
public:
string firstname;
string lastname;
string cell_number;
int relays;
int call_length;
double net_cost;
double tax_rate;
double call_tax;
double total_cost... |
asm(".code16gcc\n");
//asm("jmp 0:main");
#include <stdint.h>
#include "include/io.h"
#include "include/string.h"
const char *OS_INFO = "MiraiOS 0.1";
const char *PROMPT_INFO = "wkcn > ";
const char *HELP_INFO = "\
Input a 1~5 for parallel running. A stream nums for serial running \n\r\
Commands:\n\r\
r Go to lo... |
// Copyright 2020-2022 The Defold Foundation
// Copyright 2014-2020 King
// Copyright 2009-2014 <NAME>, <NAME>
// Licensed under the Defold License version 1.0 (the "License"); you may not use
// this file except in compliance with the License.
//
// You may obtain a copy of the License, together with FAQs at
// https... |
/*
Copyright (c) 2017, The University of Bristol, Senate House, Tyndall Avenue, Bristol, BS8 1TH, United Kingdom.
Copyright (c) 2020, COSIC-KU Leuven, Kasteel<NAME>berg 10, bus 2452, B-3001 Leuven-Heverlee, Belgium.
All rights reserved
*/
/*
* XOR_Machine.cpp
*
* Created on: Mar 10, 2019
* Author: dragos
*... |
//--------------------------------------------------------------------------
// Copyright (C) 2014-2018 Cisco and/or its affiliates. All rights reserved.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License Version 2 as published
// by the Fr... |
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Header: AssemblyName.cpp
**
** Purpose: Implements AssemblyName (loader domain) architecture
**
** Date: August 10, 1999
**
====================... |
/* Ameba implementation of NetworkInterfaceAPI
* Copyright (c) 2015 ARM 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*... |
/******************************************************************************
* SAGE - Scalable Adaptive Graphics Environment
*
* Module: envInterface.cpp - a part of SAGE Application Interface Library
* taking care of communcation with the Free Space Manager.
* Author : <NAME>
*
* Copyright (C) 200... |
/*
* Copyright 2017 Couchbase, 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... |
/* Copyright 2021 CyberTech Labs Ltd.
*
* 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... |
/*
Author: <NAME>
Purpose: Following is a source file for the Graph.hpp. It defines
the greedy method of Dikjstra algo to give shortest path between start and end
vertex: greedy method being performing the process in stages. It uses an adjacency
list structure.
*/
#include "Graph.hpp"
/*Destructor to di... |
#include <ctime>
#include <cstdlib>
#include <memory>
#include "Game.h"
#include "RenderObject.h"
#include "GOPlayer.h"
#include "GOFrame.h"
#include "GOConsumable.h"
Game::Game() {
//Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
throw std::runtime_error("SDL could not initialize! SDL Error: " + ... |
#include <cstdio>
#include <cstdint>
#include <cstring>
#include <cassert>
#include <vector>
#include <algorithm>
#include <sys/time.h>
static inline int ascii_std(const uint8_t *data, int len)
{
return !std::any_of(data, data+len, [] (int8_t b) { return b < 0; });
}
static inline int ascii_u64(const uint8_t *da... |
#include <sqlite_orm/sqlite_orm.h>
#include <iostream>
#include <cassert>
using std::cout;
using std::endl;
struct MarvelHero {
int id;
std::string name;
std::string abilities;
short points;
};
int main(int, char **argv) {
cout << "path = " << argv[0] << endl;
using namespace sqlite_orm... |
/*
* Copyright (C) 2008 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... |
//
// 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 and the following disclaimer.
// * Redistributions in bin... |
#include "stdafx.h"
#include "SquarePS2Seq.h"
#include "SquarePS2Format.h"
#include "ScaleConversion.h"
DECLARE_FORMAT(SquarePS2);
using namespace std;
// ******
// BGMSeq
// ******
BGMSeq::BGMSeq(RawFile* file, uint32_t offset)
: VGMSeq(SquarePS2Format::name, file, offset)
{
UseLinearAmplitudeScale();
UseReverb(... |
//
// fitDistribution.cpp
// fitDistribution
//
// Created by <NAME> on 4/2/20.
// Copyright © 2020 <NAME>. All rights reserved.
//
// NAME
// fitDistribution - finds the cumulative distribution that best fits a set of points
//
// SYNOPSIS
// fitDistribution inputFile
//
// DESCRIPTION
// fitDistrib... |
///////////////////////////////////////////////////////////////////////////
// **** WAVPACK **** //
// Hybrid Lossless Wavefile Compressor //
// Copyright (c) 1998 - 2007 Conifer Software. //
// ... |
// See the file "COPYING" in the main distribution directory for copyright.
#include "zeek/zeek-config.h"
#include "zeek/packet_analysis/protocol/arp/ARP.h"
#ifdef HAVE_NET_ETHERNET_H
#include <net/ethernet.h>
#elif defined(HAVE_SYS_ETHERNET_H)
#include <sys/ethernet.h>
#elif defined(HAVE_NETINET_IF_ETHER_H)
#include... |
#include "stdafx.h"
#include "RenderAPI_D3D12.h"
#include "D3DError.inl"
#include "../FBRenderAPI/HeaderOnlyUtil.h"
void intrusive_ptr_add_ref(IUnknown* p) { p->AddRef(); }
void intrusive_ptr_release(IUnknown* p) { p->Release(); }
extern "C" {
fb::RenderAPI* Initialize(fb::RenderAPI::eResult* ret, fb::InitInfo* init... |
//*****************************************************************************
// Copyright 2017-2018 Intel 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://w... |
#include "Metastable.hpp"
#include "dsp/digital.hpp"
const uint8_t nWeights = 20;
struct Weight {
float mass;
float position;
float velocity;
float acceleration;
};
struct MassSystem {
Weight weights[nWeights] = {{}};
float spring[nWeights] = {};
float center[nWeights] = {};
float damp[nWeights] = {};
voi... |
#include "openglwindow.hpp"
#include <fmt/core.h>
#include <imgui.h>
#include <tiny_obj_loader.h>
#include <cppitertools/itertools.hpp>
#include <glm/gtx/fast_trigonometry.hpp>
#include <glm/gtx/hash.hpp>
#include <unordered_map>
// Custom specialization of std::hash injected in namespace std
namespace s... |
/*
CapacitiveSense.h v.04 - Capacitive Sensing Library for 'duino / Wiring
https://github.com/PaulStoffregen/CapacitiveSensor
http://www.pjrc.com/teensy/td_libs_CapacitiveSensor.html
http://playground.arduino.cc/Main/CapacitiveSensor
Copyright (c) 2009 <NAME> All right reserved.
Version 05 by <NAME> - Support no... |
//===-- CSKYRegisterInfo.h - CSKY Register Information Impl ---*- C++ -*---===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.