text stringlengths 3.08k 12.5k |
|---|
#include <iostream>
#include <list>
#include <set>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include "modelagem.h"
using std::list;
using std::vector;
using std::set;
using namespace std;
// ------------------------------------------------------------------------------
Grafo::Gra... |
// Copyright (C) Extensible Service Proxy Authors
// 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 lis... |
/** @file
@brief Implementation
@date 2015
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, 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 L... |
#include "Compressor.hpp"
#define STB_IMAGE_IMPLEMENTATION
#include <iostream>
#include <stb_image.h>
#include <stdexcept>
#include <vector>
using namespace Example;
static const std::string SHADER_FRAG = R"(#version 330 core
in vec2 v_texCoords;
out vec4 fragmentColor;
uniform sampler2D tex;
void ... |
#include <bits/stdc++.h>
using namespace std;
int partition(int arr[], int arr1[], int low, int high);
void quicksort(int arr[], int arr1[], int low, int high);
void quickSort(int arr[], int arr1[], int low, int high)
{
int pi;
if (low < high)
{
/* pi is partitioning index, arr[p] is no... |
//
// main.cpp
// MP2_Flight_Simulator
//
// Created by XuYiwen on 3/2/16.
// Copyright © 2016 evx. All rights reserved.
//
#include "Model.hpp"
#include "Shader.hpp"
#include "Camera.hpp"
#include <istream>
#include <string>
#include <sstream>
#define FONT GLUT_BITMAP_HELVETICA_12
using namespace std;
MountainS... |
#include "../include/HttpResponse.h"
#include "../../net/include/TimeStamp.h"
using namespace soc::http;
HttpResponseBuilder::HttpResponseBuilder(HttpRequest *request,
net::TcpConnection *conn)
: uri_(request->getUrl()), version_(request->getVersion()),
method_(reque... |
#include<iostream>
#include<cmath>
using namespace std;
class Set {
public:
char *arr;
int c;
Set(int i) {
c = i;
arr = new char[c];
}
void getElements() {
cout << "\nEnter array elements:\n";
for (int i = 0; i < c; i++)
cin >> arr[i];
}
void removeDuplicates() {
for (int i = 0; i... |
/*
Copyright (c) 2007 <NAME>. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... |
#include <cassert>
#include <chrono>
//#include "../common/cmdline.h"
//#include "../common/print.hpp"
//#include "../common/io.h"
#include "stool/include/io.hpp"
#include "stool/include/cmdline.h"
#include "stool/include/debug.hpp"
#include "../include/rlbwt_iterator.hpp"
#include "../include/bwt.hpp"
#include <sdsl... |
#pragma once
#include "traffic/traffic_info.hpp"
#include "drape_frontend/traffic_generator.hpp"
#include "drape/pointers.hpp"
#include "geometry/point2d.hpp"
#include "geometry/polyline2d.hpp"
#include "geometry/screenbase.hpp"
#include "indexer/index.hpp"
#include "indexer/mwm_set.hpp"
#include "base/thread.hpp... |
// Delaunay Triangulation of a set of 3D points in the xy-plane.
// (Terrain triangulation)
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/IO/Verbose_ostream.h>
#include <CGAL/IO/OFF.h>
#include <CGAL/boost/graph/IO/OFF.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Triangu... |
// Quelli basati sui confronti non scendono più di nlogn
// BubbleSort
// Complessità: n^2
// Scambi: n^2
void bubbleSort(int *vett, int n) {
for (int i = 0; i < n; ++i) {
for(int j = n-1; j > i; j--){
if(vett[j-1] > vett[j])
exchange(vett[j-1],vett[j]);
}
}
}
// Se... |
/*
* Copyright (c) by CryptoLab inc.
* This program is licensed under a
* Creative Commons Attribution-NonCommercial 3.0 Unported License.
* You should have received a copy of the license along with this
* work. If not, see <http://creativecommons.org/licenses/by-nc/3.0/>.
*/
#include "SchemeAlgo.h"
void Scheme... |
// Copyright 2006-2008 the V8 project 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 <errno.h>
#include <signal.h>
#include <stdio.h>
#include "include/libplatform/libplatform.h"
#include "src/assembler.h"
#include "src/ba... |
#include "LuaNoise.h"
#include <FastNoiseC/FastNoise.h>
#include <glm/glm.hpp>
void LuaNoise::load_to(sol::table & table)
{
// We need to create a lua context to obtain the FFI stuff,
// this is a costly operation but thanksfully is done only once
// per script so perfomance is not an issue
sol::state_view sview... |
/******************************************************************************
** Copyright (c) 2015, Intel Corporation **
** All rights reserved. **
** **
... |
/*
uda.hpp: MSCP controller port (UDA50)
Copyright Vulcan Inc. 2019 via Living Computers: Museum + Labs, Seattle, WA.
Contributed under the BSD 2-clause license.
*/
#pragma once
#include <memory>
#include "utils.hpp"
#include "qunibusadapter.hpp"
#include "qunibusdevice.hpp"
#include "storagecontroller.h... |
/* \author <NAME> */
// Create simple 3d highway enviroment using PCL
// for exploring self-driving car sensors
#include "sensors/lidar.h"
#include "render/render.h"
#include "processPointClouds.h"
// using templates for processPointClouds so also include .cpp to help linker
#include "processPointClouds.cpp"
std::vec... |
#include "iot_cmd.h"
#include <Ezo_i2c_util.h>
bool receive_command(String &string_buffer){
if (Serial.available()) { //if theres any characters in the UART buffer
string_buffer = Serial.readString(); //get them until its a complete command
Seria... |
/***************************************************************************\
ColorBank.cpp
<NAME>
February 17, 1998
Provides the bank of colors used by all the BSP objects.
\***************************************************************************/
#include "stdafx.h"
#include <io.h>
#include "State... |
// AUTORIGHTS
// -------------------------------------------------------
// Copyright (C) 2013 <NAME>
//
// Based on code from http://www.ics.uci.edu/~yyang8/
// research/pose/, which is in turn based on code from
// http://cs.brown.edu/~pff/dt/.
//
// This file is part of the voc-releaseX code
// (http://people.cs.... |
#include <QDebug>
#include <QJsonDocument>
#include <QJsonObject>
#include <QVariantMap>
#include <QThread>
#include "QsLog.h"
#include "controller.h"
#include "mainwindow.h"
#include "network.h"
#include "miner.h"
Controller::Controller(QObject *parent) :
QObject(parent)
{
// view(new MainWindow),
//... |
/*
* EasySplash - tool for animated splash screens
* Copyright (C) 2014, 2015 O.S. Systems Software LTDA.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#include <config.h>
#include <getopt.h>
#include <iostream>
#include <queue>
#include <fstream>
#include <cstring>
#include <unistd.h>
#include <fcntl.h>
#i... |
//=======================================================================
// Copyright 2001 <NAME>, <NAME>, <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 "../../core/lib.hh"
#include "../../core/qps/op.hh"
#include "../../tests/random.hh"
#include "../reporter.hh"
#include "../thread.hh"
#include <gflags/gflags.h>
#include <sstream>
#include <vector>
DEFINE_int64(use_nic_idx, 0, "Which NIC to create QP");
DEFINE_int64(reg_mem_name, 73, "The name to register a... |
// 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 you under the Apache License, Version 2.0 (the
// "License"); you may... |
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "verilator_memutil.h"
#include <array>
#include <cassert>
#include <cstring>
#include <getopt.h>
#include <iostream>
#include <sstream>
#include <string>
#incl... |
//===-- HexagonHazardRecognizer.cpp - Hexagon Post RA Hazard Recognizer ---===//
//
// 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
//
//===---------------------------... |
/*-----------------------------------------------------------------
Copyright (C) 2015
<NAME>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option... |
// <NAME>, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2016
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// File Version: 3.0.0 (2016/06/19)
#include <GTEnginePCH.h>
#include <Graphics/DX... |
#include "common.hpp"
#include "taxodium.pb.h"
// column numbers of fixed metadata
typedef struct {
int strain_column;
int date_column;
int genbank_column;
} MetaColumns;
typedef struct {
std::string name;
int column; // column in metadata file
int index; // index in proto list
int32_t cou... |
/*
* Program: Period98
*
* File: xgprojec.cpp
* Purpose: implementation-file for
* ?
* Author: <NAME>
* Created: 1996
* Copyright: (c) 1996-1998, <NAME>
*/
#include "xgeneral.h"
#include "xgprojec.h"
#include "xgmainfr.h"
#include "xpspecia.h"
#include "xfgraph.h"
#inc... |
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2014 Torus Knot Software Ltd
Also see acknowledgements in Readme.html
You may use this sa... |
// Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
/*************************************************************************
-------------------------------------------------------------------------
StringUtils.cpp
*************************************************************************/
#inclu... |
/*
// Copyright (c) 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://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... |
#include "DQM/SiStripCommissioningSummary/interface/DaqScopeModeSummaryFactory.h"
#include "CondFormats/SiStripObjects/interface/DaqScopeModeAnalysis.h"
#include "DataFormats/SiStripCommon/interface/SiStripEnumsAndStrings.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <iostream>
#include <sstream... |
// -*- Mode:C++; Coding:us-ascii-unix; fill-column:158 -*-
/**************************************************************************************************************************************************************/
/**
@file mandelbrot_binary.cpp
@author <NAME> <https://www.mitchr.me>
@brief This p... |
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
... |
// Copyright 2010 The Emscripten Authors. All rights reserved.
// Emscripten is available under two separate licenses, the MIT license and the
// University of Illinois/NCSA Open Source License. Both these licenses can be
// found in the LICENSE file.
/* The Computer Language Benchmarks Game
http://shootout.aliot... |
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#include <sstream>
#include <limits>
#include <map>
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/IFC4/include/IfcCove... |
#include "myPrimitives.h"
#include "Application.h"
// =============================================================================================================================
// CUBE
// =============================================================================================================================
... |
#include "stdafx.h"
#include "PluginInstance.h"
#include <boost/type_index.hpp>
#include <iostream>
#include "PluginAPI.h"
#include "DeviceContainer.h"
PluginInstance::PluginInstance(boost::asio::io_service& io, std::string fileName, uint32_t id)
: m_fileName(fileName)
, m_loaded{false}
, m_id(id)
, m_io(io)
... |
#include <Rcpp.h>
#include "DesignProcedure.h"
#include "Cell.h"
#include "Calibration.h"
#include "StudyPhase.h"
#include <iostream>
#include <time.h>
// Class constructor performing action that are generally applicable to all the
// runner methods that will be called on the instantiated object. For example,
// we ... |
//
// Created by jaken on 18-10-28.
//
#include "BuddyGpuMalloc.hpp"
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <atomic>
#include <mutex>
#define LEFT_LEAF(i... |
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O2 -g" -- %s
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --builder 'clang' --debugger 'lldb' \
// RUN: --cflags "-O0 -g" -- %s
// REQUIRES: lldb
// UNSUPPORTED: system-windows
//// Check that the debuggi... |
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup(){
ofBackground(0,0,0);
// 2 output channels,
// 0 input channels
// 22050 samples per second
// 256 samples per buffer
// 4 num buffers (latency)
sampleRate = 44100;
volume = 1.0f;
lAudio = ne... |
/******************************************************************************
* Copyright (c) 2016 - present Advanced Micro Devices, Inc. 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 dea... |
//-----------------------------------------------
// Copyright 2010 Wellcome Trust Sanger Institute
// Written by Jared Simpson (<EMAIL>)
// Released under the GPL
//-----------------------------------------------
//
// OverlapTools - Wrapper for the overlap machinery
// to perform an overlap computation for two strin... |
#include <Rcpp.h>
using namespace Rcpp;
#include "vec_equal.h"
//including the header allows us to use that function on this script
// This is a simple example of exporting a C++ function to R. You can
// source this function into an R session using the Rcpp::sourceCpp
// function (or via the Source button on the ed... |
#include "VariableExtern.h"
#include "ConcreteTableColumn.h"
#include "VariablesTable.h"
#include "VariableDeclaration.h"
#include "VariableName.h"
#include "SetOperations.h"
#include "NamespaceTable.h"
#include "NamespaceId.h"
VariableExtern::VariableExtern(DataExtractor *next, ConcreteTableColumn *prototype, Variabl... |
//===-- DiffConsumer.cpp - Difference Consumer ------------------*- 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
//
//===---------------------------... |
#include <cstdio>
#include <cstring>
struct Student{
char sid[11];
int cid;
char name[11];
int score[4];
bool isdel;
int rank;
int total;
int passed;
};
Student student[1111];
int scnt=0;
bool tag = false;
const double eps = 1e-6;
void menu(){
puts("Welcome to Student Performance Management System (SPMS)."... |
#include "kalman_filter.h"
#include <cmath>
#include <iostream>
using Eigen::MatrixXd;
using Eigen::VectorXd;
KalmanFilter::KalmanFilter() {
}
KalmanFilter::~KalmanFilter() {
}
void KalmanFilter::Init(VectorXd &x_in, MatrixXd &P_in, MatrixXd &F_in,
MatrixXd &H_in, MatrixXd &R_in, MatrixXd &Q_in) {
x_ = x_in;
P_ ... |
// See LICENSE_CELLO file for license and copyright information
/// @file mesh_RefineShear.cpp
/// @author <NAME> (<EMAIL>)
/// @date Mon Jul 21 16:02:39 PDT 2014
/// @brief Implementation of RefineShear class
#include "mesh.hpp"
// #define TRACE_REFINE_SHEAR
//-----------------------------------------... |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iomanip>
#include <boost/asio.hpp>
#ifdef _WIN32_WINNT
#include <Windows.h>
#endif
#include "Logger.h"
const int SOURCE_COLUMN_WIDTH = 12;
const int MICROSECONDS_COLUMN_WIDTH = 6;
const int TIMESTAMP_COLUMN_WIDTH = 9 + MICROSECONDS_COLUMN_WIDTH;
const in... |
/*
* File: static_pattern_database.cpp
* Author: malone
*
* Created on October 22, 2012, 9:38 PM
*/
#include <iostream>
#include <ostream>
#include <math.h>
#include "static_pattern_database.h"
#include "best_score_calculator.h"
heuristics::StaticPatternDatabase::StaticPatternDatabase(int variableCount, in... |
/*
* zsummerX License
* -----------
*
* zsummerX is licensed under the terms of the MIT license reproduced below.
* This means that zsummerX is free software and can be used for both academic
* and commercial purposes at absolutely no cost.
*
*
* ============================================================... |
#define TRACE
#include <xtd/xtd>
using namespace std;
using namespace xtd;
using namespace xtd::forms;
class form1 : public form {
public:
form1() {
text("Form and Messages");
}
protected:
void wnd_proc(message& message) override {
form::wnd_proc(message);
switch (message.msg()) {
case W... |
//
// 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... |
// 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... |
#include "subcommand.hpp"
#include "../vg.hpp"
#include "../utility.hpp"
#include "../mapper.hpp"
#include "../stream.hpp"
#include "../alignment.hpp"
#include <unistd.h>
#include <getopt.h>
using namespace vg;
using namespace vg::subcommand;
void help_annotate(char** argv) {
cerr << "usage: " << argv[0] << " an... |
#include <iostream>
#include<string>
#include"headers/global.h"
#include"Database/database.h"
#include"module_commit.h"
#include"module_detect_changes.h"
#include"module_new_branch.h"
#include"module_list.h"
#include "module_reset.h"
#include "module_ignore.h"
#include"module_add.h"
#include "module_checkout.h"
#inclu... |
/** @file
@brief Implementation
@date 2015
@author
Sensics, Inc.
<http://sensics.com/osvr>
*/
// Copyright 2015 Sensics, 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
//
// htt... |
#include "sm_manager.h"
#include "rm/rm.h"
#include "ix/ix.h"
#include "record_printer.h"
#include <sys/stat.h>
#include <unistd.h>
#include <fstream>
DbMeta SmManager::db;
std::map<std::string, std::unique_ptr<RmFileHandle>> SmManager::fhs;
std::map<std::string, std::unique_ptr<IxIndexHandle>> SmManager::ihs;
bool S... |
/*
* Copyright 2018 Yamana Laboratory, Waseda University
* Supported by JST CREST Grant Number JPMJCR1503, Japan.
*
* 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... |
// Concord
//
// Copyright (c) 2018 VMware, Inc. All Rights Reserved.
//
// This product is licensed to you under the Apache 2.0 license (the "License").
// You may not use this product except in compliance with the Apache 2.0
// License.
//
// This product may include a number of subcomponents with separate co... |
// MABE is a product of The Hintze Lab @ MSU
// for general research information:
// hintzelab.msu.edu
// for MABE documentation:
// github.com/Hintzelab/MABE/wiki
//
// Copyright (c) 2015 Michigan State University. All rights reserved.
// to view the full license, visit:
// github... |
//=======================================================================
// Copyright (c) 2014-2020 <NAME>
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//=======================================================================
#... |
#include "HttpStreamer.h"
#include "Message.h"
void HttpStreamer::start(size_t numWorkers) {
WSAStartup(MAKEWORD(2, 2), &mWsaData);
mhServSock = socket(PF_INET, SOCK_STREAM, 0);
memset(&mServAddr, 0, sizeof(mServAddr));
mServAddr.sin_family = AF_INET;
mServAddr.sin_addr.s_addr = htonl(INADDR_ANY... |
#include "QtOpenCVTools.h"
#include <QDebug>
using namespace cv;
cv::Mat QImageToMat(QImage image)
{
cv::Mat mat;
switch (image.format())
{
case QImage::Format_ARGB32:
case QImage::Format_RGB32:
case QImage::Format_ARGB32_Premultiplied:
mat = cv::Mat(image.height(), image.width(), CV_8UC4, (void*)image.const... |
#include "assetdb.h"
#include <QCoreApplication>
AssetDB::AssetDB()
{
//QString path = QCoreApplication::applicationDirPath() + "/resources";
QString path = ":/resources";
QDir dir (path);
dir.setFilter(QDir::NoDotAndDotDot | QDir::Dirs);
QFileInfoList raceFoldersInfo = dir.entryInfo... |
#include "vwutils.h"
VideoWriter::VideoWriter(char* filename, float fps, int fwidth, int fheight, bool iscolor)
{
int error=avio_open(&avioctx, filename, AVIO_FLAG_WRITE);
if (error<0)
{
av_strerror(error, ebuf, sizeof(ebuf));
printf("Could not open output file: %s", ebuf);
}
filepath=filename;
frame_wid... |
/*
* datasetisosurface.cpp
*
* Created on: Dec 4, 2012
* @author <NAME>
*/
#include "datasetisosurface.h"
#include "datasetmesh.h"
#include "datasetscalar.h"
#include "isosurfacethread.h"
#include "../models.h"
#include "../mesh/trianglemesh2.h"
#include "../../gui/gl/glfunctions.h"
#include "../../gui/gl/mesh... |
/******************************************************************
* File name: LED8x11_display_example1.cpp
* Version: v1.0
* Dev: GitHub@Rr42
* Description:
* Example Arduino program for the 8x11 LED display that shows
* an animated ball bouncing around in a box.
*******************************************... |
#include "Cartridge.h"
#include <iostream>
#include <fstream>
#include "unzip.h"
Cartridge::Cartridge(const std::string& romPath) : romFullPath(romPath) {
LoadFile(romFullPath);
if (hasBattery) {
size_t slashPosition = romFullPath.find_last_of("/");
romName = romFullPath.substr(slashPosition + 1);
size_t... |
// Denoising using Fields of Experts [1]. This example problem also comes
// with Ceres Solver, a solver for nonlinear least squares problems and
// can be used for comparing the two solvers.
//
// [1] <NAME> and <NAME>. “Fields of Experts.” International Journal of
// Computer Vision, 82(2):205–229, 2009.
#includ... |
#include "data.h"
#include "renderer.h"
#include <iostream>
#include <chrono>
#include <thread>
using namespace std;
bool handleInput(Display *disp, Board &b, Tetro *t, const ControlScheme &ctrl){
bool didSomething = 0;
XEvent event;
while(XCheckMaskEvent(disp, KeyPressMask, &event)){
if(event.xkey.keycode == c... |
struct DancingLinks
{
static const int Left = 0;
static const int Right = 1;
static const int Up = 2;
static const int Down = 3;
static const int Col = 4;
static const int Row = 5;
static const int TotalLinks = 6;
struct Node
{
int links[TotalLinks];
Node() { memset... |
#include <AMReX_ParmParse.H>
#include <AMReX_PlotFileUtil.H>
#include "amr-wind/incflo.H"
#include "amr-wind/core/Physics.H"
#include "amr-wind/utilities/console_io.H"
#include "amr-wind/utilities/IOManager.H"
using namespace amrex;
namespace {
const std::string level_prefix{"Level_"};
}
void GotoNextLine(std::istre... |
/**
* \file Live.cc
* \brief Implementation of the Live class
* \author <NAME>
*/
#include <stack>
#include "llvm/IR/Instructions.h"
#include "llvm/Support/FormattedStream.h"
#include "Live.h"
#include "Analyzer.h"
#include "Debug.h"
using namespace llvm;
char Live::ID = 0;
static RegisterPass<Live>
X("live-val... |
#include <EffectSpec.h>
#include <Asserter.h>
#include <Util.h>
#include <Blink.h>
#include <BoingBoing.h>
#include <BoxShrinkGrow.h>
#include <BoxWoopWoop.h>
#include <FlowingBox.h>
#include <GameOfLife.h>
#include <MovingBoxShrinkGrow.h>
#include <Rain.h>
#include <RandomSparkle.h>
#include <Ripples.h>
#include <Stai... |
#include <memory>
#include <functional>
#include <iostream>
using namespace std;
///
/// Objects can be created in many ways in C++, we are particularly interested in two:
/// 1) Stack-allocated objects, which have automatic lifetime management.
/// 2) Dynamically-allocated objects, which should be managed by a stac... |
/*
* VGDE - Video Game Development Environment
* Copyright (c) 2020-2021 <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... |
#include "ActiveVar.h"
#include <algorithm>
void ActiveVar::execute() {
for (auto &func : this->module->get_functions()) {
if (func->get_basic_blocks().empty()) {
continue;
} else {
func_ = func;
live_in.clear();
live_out.clear();
def_v... |
#include "formatter.h"
using namespace pcmutils;
void Formatter::Init(Handle<Object> exports) {
Local<FunctionTemplate> tpl = FunctionTemplate::New(New);
tpl->InstanceTemplate()->SetInternalFieldCount(1);
tpl->SetClassName(String::NewSymbol("Formatter"));
NODE_SET_PROTOTYPE_METHOD(tpl, "format", Format);
... |
#include "lru.hpp"
lru_cache::lru_cache(size_t cap) : capacity(cap) {
assert(cap > 0);
root = new node();
queBegin = root;
size = 0;
}
lru_cache::~lru_cache() {
node * a = root, *b = a;
while (a -> prev != nullptr) {
a = a -> prev;
delete b;
b = a;
}
}
lru_... |
// Test for boxmuller.h on CPU
#include <Random123/philox.h>
#include <Random123/threefry.h>
#include <Random123/boxmuller.hpp>
#include "util.h" // for timer()
#if __GNUC__>=7
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
#endif
typedef r123::Philox4x32 CBRNGF;
#if R123_USE_64BIT
typedef r123::Threefry2x... |
#ifdef _WIN32
# include <windows.h>
#endif
#include <chrono>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "../../server/TracyFileRead.hpp"
#include "../../server/TracyFileWrite.hpp"
#include "../../server/TracyPrint.hpp"
#include "../../server/TracyVersion.hpp"
#include "../../server/TracyWork... |
// GCF.cxx
// implementation for the class GCF, which handles Greatest Common Factor.
#include "GCF.hxx"
#include "Class.hxx"
#include "Integer1.hxx"
// NOTE: 0 is a "bad case" for the definition of GCF.
// Franci uses the following definitions to handle 0 and 1-ary cases
// * GCF(0,a)=|a|, a in _Z_
// * GC... |
// Copyright (C) 2015-2020 Virgil Security, 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:
//
// (1) Redistributions of source code must retain the above copyright
// ... |
/*
# Copyright 2018 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 writi... |
#include <cstdio>
#include <cstdint>
#include <cmath>
#include <float.h>
#include <vector>
#include <deque>
#include "spectrogram.h"
extern "C" {
#include "libpngio/pngio.h"
#include "libhue/libhue.h"
}
#define BUF_SIZE 1024
typedef hue_RGBA8 rgba;
static std::vector<rgba> draw_samples(
const std::vector<float>... |
/*
* IRIS Localization and Mapping (LaMa)
*
* Copyright (c) 2019-today, <NAME>, University of Aveiro - Portugal
* All rights reserved.
* License: New BSD
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* ... |
#include "stdafx.h"
#include "base_unit.h"
base_unit::base_unit() noexcept : unit(), power() {}
base_unit::base_unit(const str &unit, const fraction &power) : unit(unit), power(power) {}
base_unit::base_unit(const str &unit, const int &power) : unit(unit), power(power, 1) {}
base_unit::base_unit(const str &str_u... |
/*
// License Agreement (3-clause BSD License)
// Copyright (c) 2015, <NAME>, all rights reserved.
// Third party copyrights and patents are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions... |
/*
* Copyright (c) 2012-2016, <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 ... |
#include "p2Defs.h"
#include "p2Log.h"
#include "j1App.h"
#include "j1Input.h"
#include "j1Textures.h"
#include "j1Audio.h"
#include "j1Render.h"
#include "j1Window.h"
#include "j1Map.h"
#include "j1Scene.h"
#include "j1Player.h"
#include "j1Fade.h"
#include "j1PathFinding.h"
#include "j1EntityManager.h"
#include "j1En... |
#pragma once
/*
C++11 constexpr versions of cmath functions needed for the FFT.
Copyright (C) 2012 <NAME>
Distributed under the GNU General Public License. See license.txt for details.
*/
#include <limits> // nan
constexpr double tol = 0.001;
constexpr double abs_const(const double x) { return x < 0.0 ? -x :... |
#include <gtest/gtest.h>
#include "include/sudoku.h"
TEST(BackendTest, CheckSection)
{
sudoku::Board board;
EXPECT_TRUE(board.CheckSection({1, 2, 0, 3, 4, 5, 6, 7, 9}));
EXPECT_FALSE(board.CheckSection({1, 2, 0, 3, 4, 5, 7, 7, 9}));
EXPECT_DEATH(board.CheckSection({1, 2, 0, 30, 4, 5, 7, 7, 9}), "out of range"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.