text stringlengths 3.08k 12.5k |
|---|
#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
#include <iostream>
#include "assert.hpp"
#include <cmath>
// Note that this is a bunch of if/switch statements
// for the sake of brevity and clarity
// A much more robust implementation could use a std::unordered_map
// to link between keys and desired actions fo... |
/*
Copyright (c) 2019-2020, <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 follo... |
#include <vector>
#include <utility>
#include <set>
#include <cstdint>
#include <iostream>
#include <cassert>
#include "testlib.h"
using namespace std;
struct UnionFind {
int n;
vector<int> p, r;
int gn;
UnionFind(int _n = 0) : n(_n), p(n, -1), r(n, 1), gn(n) {}
void merge(int a, int b) {
... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corpor... |
/**
* ScriptDev3 is an extension for mangos providing enhanced features for
* area triggers, creatures, game objects, instances, items, and spells beyond
* the default database scripting in mangos.
*
* Copyright (C) 2006-2013 ScriptDev2 <http://www.scriptdev2.com/>
* Copyright (C) 2014-2022 MaNGOS <https://getma... |
#include <stdio.h> // for snprintf
#include "extract_one_feature.hpp"
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include "boost/algorithm/string.hpp"
#include "google/protobuf/text_format.h"
#include "leveldb/db.h"
#include "leveldb/write_batch.h"
#include "caffe/blob.hpp"
#include "... |
/*
Copyright (c) 2021 <NAME>. See the COPYRIGHT
file at the top-level directory of this distribution.
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
option. T... |
// Copyright 2016 The Gemmlowp Authors. 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 required by ... |
#include "../KeyDefines.h"
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/i2c.h"
#include "hardware/irq.h"
#include "pico/util/queue.h"
#include "WireHandler.h"
#include "I2CWireHandler.h"
queue_t localEventQueue;
queue_t receivedEventQueue;
// Interrupt handler
void i2c1_irq_handler() ... |
/*
* Copyright 2014 The WebRTC 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 in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... |
//
// Rectangle3DOverlay.cpp
// interface/src/ui/overlays
//
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// include this before QGLWidget, which includes an earlier version... |
/*
* Copyright (c) 2014, Shogun Toolbox Foundation
* 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 o... |
// Engine.cpp
// created on 2021/3/28
// author @zoloypzuo
#include "ZeloPreCompiledHeader.h"
#include "Engine.h"
#include "Core/OS/whereami.h"
#include "Core/Profiler/Profiler.h"
#include "Renderer/OpenGL/GLRenderSystem.h"
// enable vld
#ifdef DETECT_MEMORY_LEAK
#include <vld.h>
#endif
using namespace Zelo;
using ... |
#include <stdlib.h>
#include <stdio.h>
#include "db/db_flash.h"
extern char * SegTable;// declare in db_flash_tools.cc
extern uint64_t SegTotal;// declare in db_flash_tools.cc
namespace leveldb{
extern int is_flash_inited;
int Flash::flash_init(const std::string& dbname){
if(is_flash_inited){
//printf("_... |
/**
* BSD 3-Clause License
*
* Copyright (c) 2019, <NAME> - <EMAIL>
* Technical University of Munich
* Chair of Robotics, Artificial Intelligence and Real-time Systems
* Department of Informatics / I6, Boltzmannstraße 3, 85748 Garching bei München, Germany
* https://www6.in.tum.de
*
* All rights reserved.
*
... |
/**
* @file InputSense.cpp
*
* @date 19.12.2015
* @author Andre
* @description
*/
#include "InputSense.hpp"
#include "hw_config.h"
#include "tools/systimer.h"
#include <stdio.h>
#define TEMPERATURE_INTERVAL 5000 // ms
#define OVERTEMPERATURE_LIMIT 70.0 // Celsius
#define VOLTAGE_FILTER_LENGTH ... |
/* <starsha/c_family_file.cc>
Implements <starsha/c_family_file.h>.
Copyright 2010-2014 Tagged
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/lic... |
#include "rosplan_planning_system/ProblemGeneration/ProblemInterface.h"
#include <fstream>
#include <sstream>
#include <string>
#include <ctime>
#include <string>
#include <streambuf>
namespace KCL_rosplan {
/*-------------*/
/* constructor */
/*-------------*/
ProblemInterface::ProblemInterface(ros::NodeHandle&... |
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.end()
#define pr(v) { for(int i=0;i<v.size();i++) { v[i]==I... |
#include <iostream>
#include <algorithm>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <sys/types.h>
#include <unistd.h>
#include "tree.h"
#include "hashmap_node.h"
#include "array_node.h"
using namespace std;
const int NUM_ALPHABET = 30;
Node* create_hash_node(const Tree *tree... |
#pragma once
#ifndef MALLOC
#define MALLOC 2
#endif
#include <cpuid.h>
#include <cstddef>
#include <cstdint>
#include <cctype>
#include <cstring>
#include <string>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
extern void allocator_init();
extern void set_affinity(int runner_id);
exter... |
/*
* Copyright (C) 2018 <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 wr... |
#include "Scores.h"
//Scores
Scores::Scores()
{
the_scores = new stru_scores[100];
the_scores[0].name = "BOB";
the_scores[0].score = "500000";
the_scores[1].name = "JAQUE123";
the_scores[1].score = "235000";
the_scores[2].name = "Claudette";
the_scores[2].score = "243000";
the_scores[3].name = "PAPA";
the... |
// g2o - General Graph Optimization
// Copyright (C) 2011 <NAME>, <NAME>, <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... |
/** \file kmers_main.cpp
*
* Defines the "vg kmers" subcommand, which generates the kmers in a graph.
*/
#include <omp.h>
#include <unistd.h>
#include <getopt.h>
#include <iostream>
#include "subcommand.hpp"
#include "../vg.hpp"
#include "../vg_set.hpp"
#include "../kmer.hpp"
using namespace std;
using namespa... |
// ////////////////////////////////////////////////////////
// # Title
// Cyclical figurate numbers
//
// # URL
// https://projecteuler.net/problem=61
// http://euler.stephan-brumme.com/61/
//
// # Problem
// Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers... |
#include <cstdio>
#include <mpi.h>
#define A_TAG 0
#define B_TAG 1
#define C_TAG 2
int world_rank, world_size;
// Read size of matrix_a and matrix_b (n, m, l) and whole data of matrixes from stdin
//
// n_ptr: pointer to n
// m_ptr: pointer to m
// l_ptr: pointer to l
// a_mat_ptr: pointer to matrix a (... |
#include "CommandLine.h"
CommandLine::CommandLine(Stream *_serial, char* _token): m_stream(_serial), token(_token)
{
input.index = 0;
commands.index = 0;
#if COMMANDLINE_HISTORY
history.index = 0;
#endif
}
CommandLine::CommandLine(char* _token) :
CommandLine(nullptr, _token)
{
}
CommandLine:... |
#include "options.h"
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <algorithm>
#include <iostream>
#include "lib/dir.h"
#include "lib/version.h"
namespace {
void usage(int argc, char** argv) {
fprintf(stderr, "Usage: %s [OPTIONS] [path...]\n", argv[0]);
fprintf(stde... |
// -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
#include <boost/program_options.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/format.hpp>
#include "mm/ug_bitext.h"
#include "mm/tpt_typedefs.h"
#include "mm/ug_prime_sampling1.h"
#include "generic/sorting/VectorIndexSorter.h"
#include "g... |
#include "MSNSBConnection.h"
#include "MSNConnection.h"
#include "Buddy.h"
#include <algorithm>
//#pragma mark Constructor
MSNSBConnection::MSNSBConnection(const char *server, uint16 port, MSNManager *man)
: MSNConnection(server, port, man) {
};
MSNSBConnection::~MSNSBConnection(void) {
};
//#pragma mark BLooper... |
void assert_nearly_equal(double a, double b) {
assert_true(abs(a - b) < EPS);
}
void assert_equal(point a, point b) {
assert_nearly_equal(real(a), real(b));
assert_nearly_equal(imag(a), imag(b));
}
void test() {
point res1, res2;
// Circle circle intersection
assert_equal(intersect(point(0,0)... |
// Copyright (C) 2014-2020 <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 3 of the License, or (at your option)
// any later version.
//
// This program is distribu... |
//===========================================================================//
/* MIT License
Copyright (c) 2019 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restrictio... |
#include "testApp.h"
//#include "ofxVectorMath.h"
#include "ofxSimpleGuiToo.h"
bool myBool1Animate;
bool myBool2;
bool myBool3;
bool myBool4;
bool myBool5;
bool myBool6;
bool myBool7;
bool myBool8;
bool myBool9;
int myInt1;
int myInt2;
int myInt3;
int myInt4;
int myInt5;
int myInt6;
int myInt7;
int myInt8;
... |
#include "CubicSolver.h"
#include "loguru.hpp"
#include <queue>
#include <map>
CubicSolverNode::CubicSolverNode(int count) {
bitvector = new bool[count];
for(int i = 0; i < count; i++){
bitvector[i] = false;
}
size = count;
conditionalConstraints = new std::vector<std::pair<ASTNode*, ASTNod... |
#include "MemoryStream.h"
#include "MBPakFile.h"
#include "MBPakFileEntry.h"
#include "../../external/cryptopp/aes.h"
#include "../../external/cryptopp/cryptlib.h"
#include "../../external/cryptopp/rijndael.h"
#include "../../external/cryptopp/modes.h"
#include "../../external/cryptopp/files.h"
#include "../../external... |
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it wil... |
// g++ --std=c++11 -l wiringPi test-7920.cpp
#include <unistd.h>
#include <wiringPi.h>
#include <wiringPiSPI.h>
#include <cstdint>
#include <cstdio>
#include <ctime>
static const int MAIN_pin_dc = 12;
static const int MAIN_pin_cs = 16;
static const int MAIN_pin_rst = 18;
static const int MAIN_width = 128;
s... |
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <array>
template <typename T>
constexpr void GrowToEncompass(T& min, T& max, T val)
{
min = std::min(min, val);
max = std::max(max, val);
}
struct Point
{
constexpr Point(int X =... |
//*********************************************************
// RunSetup.cpp - setup process control files
//*********************************************************
#include "RunSetup.hpp"
char * RunSetup::PROGRAM_DIRECTORY = "PROGRAM_DIRECTORY";
char * RunSetup::CONTROL_DIRECTORY = "CONTROL_DIRECTORY";
char * Run... |
//
// Find number of runs, subruns and events in an art format ROOT file.
//
// See the implementation of usage() for the documentation.
//
#include "Offline/Print/eventCount/FileInfo.hh"
#include "canvas/Persistency/Provenance/EventAuxiliary.h"
#include "canvas/Persistency/Provenance/SubRunAuxiliary.h"
#include "TBr... |
/*
* Adwin.cpp
*
* Copyright (C) 2008 Universitat Politècnica de Catalunya
* @author <NAME> - <NAME> (abifet,<EMAIL>)
*
* 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 Fre... |
#include "TaskSpaceComputedMuscleControl.h"
#include <OpenSim/Common/GCVSplineSet.h>
#include <OpenSim/Simulation/Manager/Manager.h>
#include <OpenSim/Analyses/Kinematics.h>
#include <OpenSim/Analyses/BodyKinematics.h>
#include <OpenSim/Analyses/ForceReporter.h>
#include <OpenSim/Common/MarkerData.h>
#include <OpenSim... |
#include "stdafx.h"
#include "Polynomial.h"
using namespace std;
Polynomial::Polynomial()
{
for(int i = 0; i < Terms; i++)
{
exponet[i] = 0;
coeff[i] = 0;
}
terms = 0;
}
Polynomial Polynomial::operator+( const Polynomial& rhs) const
{
Polynomial PolyResult;
bool exponetExists;
int s;
P... |
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <complex>
#include <queue>
#include <set>
#include <unordered_set>
#include <list>
#include <chrono>
#include <random>
#include <iostream>
#incl... |
// Qt
#include <QtCore/QMutexLocker>
#include <QtCore/QTimer>
#include <QtNetwork/QTcpSocket>
// Hb
#include <HbGlobal.h>
#include <HbLogService.h>
// Local
#include <com/HbAbstractServer.h>
#include <com/HbAbstractSocket.h>
#include <com/HbSocketHandler.h>
#include <config/com/HbNetworkConfig.h>
#include <contract/HbN... |
/*******************************************************************************
Copyright (c) 2010, <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 mus... |
#include <iostream>
// Matlab includes
#include <matrix.h>
#include <mex.h>
// cpd_cuda
#include "cpd_cuda.h"
// input arguments
#define IN_X prhs[0]
#define IN_Y prhs[1]
#define IN_omega prhs[2]
#define IN_beta prhs[3]
#define IN_lambda prhs[4]
#define IN_maxIter prhs[5]
#define IN_tol prhs[6]
// output argume... |
#include "DetectorDescription/Core/interface/DDPartSelection.h"
#include "DetectorDescription/Core/interface/DDValue.h"
#include "DetectorDescription/OfflineDBLoader/interface/GeometryInfoDump.h"
#include "DetectorDescription/Core/interface/DDRotationMatrix.h"
#include "DetectorDescription/Core/interface/DDTranslation.... |
#include <Fractal.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/rotate_vector.hpp>
/*
* Implement Fractal class to generate Koch snowflakes mesh (generate snowflake mesh using triangle list).
* Koch snowflake: https://en.wikipedia.org/wiki/Koch_snowflake
*/
Fractal::Fractal()
{
//add initial tria... |
/* =============================================================================
*
* Title: GPX to GeoJSON converter
* Author: <NAME>
* License: Copyright (c), 2021 <NAME>
* MIT license (http://opensource.org/licenses/MIT)
* Description: Simple CLI utility to convert GPX to ... |
// SPDX-FileCopyrightText: 2021 metaquarx <<EMAIL>>
// SPDX-License-Identifier: Apache-2.0
#include "Helpers.hpp"
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <unordered_map>
struct instruction {
std::pair<int, int> x;
std::pair<int, int> y;
std::pair<int, int> z;
bool state;
};
static a... |
#include <math/subtract.h>
#include <stdio.h>
#include <math.h>
#include <malloc.h>
#include <png.h>
int math::subtract( int a, int b )
{
return a - b;
}
/*
The following is just some code I found online to use libpng:
http://www.labbookpages.co.uk/software/imgProc/files/libPNG/makePNG.c
*/
// LibPNG example... |
//
// FlappyBird.cpp
// LaserShow
//
// Created by <NAME> on 18/03/2014.
//
//
#include "FlappyBird.h"
FlappyBird::FlappyBird() {
gameWidth = 800;
gameHeight = 600;
gameRect.set(0,0,800,600);
reset();
top = 0;
bottom = 600;
ypos = top;
xpos = 100;
yvel = 0;
radius = 20;
sensitivity = 1;
columnsP... |
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <gtest/gtest.h>
#include <ie_core.hpp>
#include "tests_common.hpp"
#include "single_layer_common.hpp"
#include "ir_gen_helper.hpp"
using namespace ::testing;
using namespace InferenceEngine;
using namespace single_layer_te... |
#include "mo_load_cloud_coefficients.h"
// read cloud optical property LUT coefficients from NetCDF file
void load_cld_lutcoeff(CloudOptics &cloud_spec, std::string cld_coeff_file) {
yakl::SimpleNetCDF io;
// Open cloud optical property coefficient file
io.open(cld_coeff_file , yakl::NETCDF_MODE_READ);
// R... |
#include "../../include/Components/Board.hpp"
#include "../../include/Pieces/Pawn.hpp"
#include "../../include/Pieces/Rook.hpp"
#include "../../include/Pieces/Knight.hpp"
#include "../../include/Pieces/Bishop.hpp"
#include "../../include/Pieces/King.hpp"
#include "../../include/Pieces/Queen.hpp"
#include "../../include... |
/*
Copyright (c) 2016, TU Dresden
Copyright (c) 2017, Heidelberg University
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
noti... |
/*
2013 (c) <NAME>
<EMAIL>
*/
#include "memcached.h"
int memSock;
void closeMemcache() {
close(memSock);
}
int initMemcache() {
struct sockaddr_in addr;
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(config.memcachedPort);
addr.sin_addr.s_addr = in... |
// _THE BlowFishEnc ENCRYPTION ALGORITHM_
// by <NAME>
// Revised code--3/20/94
// Converted to C++ class 5/96, <NAME>
// Updated to support FileEncryption Utility by <NAME>, 9/02
#include "fileblocksBlowFish.h"
#include "fileblocksdata.h" // holds the random digit tables
#define S(x,i)(SBoxes[i][x.w.byte##i])
#defin... |
/* Copyright (C) 2010 Ion Torrent Systems, Inc. All Rights Reserved */
#include <math.h>
#include <stdio.h>
#include "utils.h"
#include "xtalk_sim.h"
Coordinate GetWellLocation(int row,int col,DATA_TYPE pitch)
{
// find the center location (in microns) of a well in a hex-packed array
// given a hex well spacing and ... |
// WORK IN PROGRESS!!
//Based Heavily on AssetLoadingDemo
#include "FlyingCameraDemo.h"
#include "RelativeFilepathsToResources.h"
#include "Timepoint.h"
FlyingCameraDemo::FlyingCameraDemo(InitReport* initReport) : AssetLoadingDemo(initReport) {
Timepoint creation("FlyingCameraDemo: Beginning Construction of obj... |
#include "LaunchPad.hpp"
#include <algorithm>
#include <iostream>
namespace {
const uint8_t HEADER_LENGTH = 6;
const unsigned MAX_SYSEX_DATA_LENGTH = 256;
const uint8_t SYSEX_HEADER[HEADER_LENGTH] = {0xF0, 0x00, 0x20, 0x29, 0x02, 0x0D};
const uint8_t SYSEX_END = 0xF7;
enum SysexCommand
{
PROGRAMMER_MODE = 0x0E,
... |
/*
* File: main.cpp
* Author: Travis
*
* Created on October 15, 2015, 9:25 AM
*/
#include <cstdlib>
//#include <iostream>
#include "CImg.h"
#include "Grid_1.h"
#include <ctime>
#define RED 0
#define GREEN 1
#define BLUE 2
using namespace std;
using namespace cimg_library;
template <typename T>
void draw_gri... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
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 condit... |
#pragma once
struct PurpleLight : GrayModuleLightWidget
{
PurpleLight()
{
addBaseColor(SCHEME_PURPLE);
}
};
struct CKD6B : app::SvgSwitch
{
CKD6B()
{
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/CKD6B_0.svg")));
addFrame(APP->window->loadSvg(asset::plugin(pluginInstance, "res/CKD6B_1.sv... |
//Andrew
//Lab 4, Course Objects with Serializations
//Editor Used: Visual Studio Code
//Compiler Used: Visual Studio Developer Command Prompt
#include <iostream>
using std::ios;
using std::cout;
using std::cin;
using std::endl;
#include <fstream>
using std::ifstream;
using std::ofstream;
#include <string>
using std... |
/*
* Copyright (c) 2011 Surfnet
* Copyright (c) 2011 .SE (The Internet Infrastructure Foundation).
* Copyright (c) 2011 OpenDNSSEC AB (svb)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are me... |
/* Copyright (C) 2020 <NAME> */
#include "stdafx.h"
#include "ReportManViewer.h"
#include "TT32App.h"
#include "TTDbse.h"
#include "InfoSystem.h"
#include <process.h>
// -----------------------------------------------------------------------
void CReportManViewer::DoReport(const wxString &name, const std::map<wx... |
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2019 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* ... |
/************************************************
Copyright (c) 2016, Xilinx, 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 copyrig... |
/**
* Obs: Para compilar corretamente, usar o comando "g++ main.cpp -std=gnu++11 -o main"
*/
#include <chrono>
#include <cstring>
#include <iomanip>
#include <iostream>
using namespace std;
typedef chrono::high_resolution_clock Clock;
typedef chrono::milliseconds milliseconds;
#include "base.cpp"
#include "search... |
//
// Created by biezhihua on 2017/7/9.
//
#include "Native1Lesson.h"
#include "../graphics/GLUtils.h"
#include <android/log.h>
#define LOG_TAG "lesson1"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
#de... |
/*
* 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... |
/* SPDX-License-Identifier: BSD-2-Clause */
#include "parser.h"
#include "errors.h"
#include "lexer.h"
#include "syntax.h"
#include "eval.h"
#include <initializer_list>
#include <fstream>
#include <cstring>
#include <cctype>
using std::string;
static bool opt_show_tokens;
static bool opt_show_syntax_tree;
static bo... |
/* ==========================================================================================
Author: <NAME>
Company:
Filename: main.cpp
Last modifed: 06.04.2017 by <NAME>
Description: Extended three-dimensional rotation invariant local binary patterns (LBP)
*
Please cite the article:... |
/*
* Copyright (C) 2010 - 2012 ProjectSkyfire <http://www.projectskyfire.org/>
*
* Copyright (C) 2012 - 2012 FrenchCORE <http://www.frcore.com/>
* Copyright (C) 2008 - 2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you c... |
/*
Solver for the "Tapa" puzzle in Something Is Off
(https://2019.galacticpuzzlehunt.com/puzzle/something-is-off)
Input format:
R C
N
r1 c1 n1 x11 x12 x13...
r2 c2 n2 x21 x22 x23...
...
where
R = number of rows
C = number of columns
N = number of cells containing numbers
ri, ci = row and column of cell i (... |
/* This file is part of nSkinz by namazso, licensed under the MIT license:
*
* MIT License
*
* Copyright (c) namazso 2018
*
* 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 res... |
/*
Program: Question 3 for COS10008 Assignment 1 (C++)
Module: Main
Version: 005
Author: <NAME>
Description:
Draws a pattern of star shapes via SwinGame with random colours
*/
// Call necessary modules/libraries via header files
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <vector>
#inclu... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "AUInfos.h"
AUInfos::AUInfos(float speed)
{
expressionSpeed = speed;
setEmptyValues();
}
AUInfos::~AUInfos()
{
}
float AUInfos::getSpeed()
{
return expressionSpeed;
}
void AUInfos::setSpeed(float speed)
{
expressionSpeed = ... |
// Copyright (c) 2016, the Seth Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is
// governed by a BSD license that can be found in the LICENSE file.
#include "./sequence_test.h"
#include "../../libraries/CImg.h"
static struct single_bit_t
single_bit_test... |
#include "skybox.h"
#include "vertices.h"
#include <iostream>
#include <stdio.h>
#include <GL/glew.h>
#include "opengp.h"
#include "skybox_vshader.h"
#include "skybox_fshader.h"
Skybox::Skybox(unsigned int width, unsigned int height) :
RenderingContext(width, height) {
}
void Skybox::init(Vertices* vertices... |
#pragma GCC optimize ("O2")
#include<bits/stdc++.h>
#include<unistd.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define F first
#define S second
#define PB push_back
#define ALL(x) begin(x),end(x)
#define SZ(x) ((int)(x).size())
#define IOS ios_base::sync_with_s... |
/*
<NAME>
Cisco Systems, Inc.
*/
/*
Copyright (c) 2015-2015 Cisco Systems, 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... |
/*
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 no... |
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include "ESP8266HTTPClient.h"
#include "time.h"
#include <ESPAsyncTCP.h>
#include "ArduinoOTA.h"
#include <ESPAsyncWebServer.h>
#include "GlobalConfig.h"
#include <LinkedList.h>
#define LED 2
#define pinMotionSensor 4
#define pinRelayShocker 5
// #define pinReserved 16
A... |
//
// Created by <EMAIL> on 27/02/17.
//
#include "RPLidarHelper.h"
RPLidarHelper::RPLidarHelper(string comFile, unsigned int baudrate) {
this->comFile = comFile;
this->baudrate = baudrate;
}
void RPLidarHelper::init() {
// create the driver instance
this->driver = RPlidarDriver::CreateDriver(DRIVER_... |
#include <fstream>
#include <iostream>
using namespace std;
/// Un monom de un anumit grad
struct Monom {
Monom* urm = NULL;
int grad;
int coef;
/// Adauga un nou monom dupa acesta
void adauga_succesor(Monom* m) {
m->urm = urm;
urm = m;
}
/// Construieste un nou monom cu ... |
#include <stdio.h>
#include <stdlib.h> // atoi, malloc, free, posix_memalign, _Exit, EXIT_SUCCESS/FAILURE
#include <stdint.h>
#include "simd.h"
#include "environ.h" // detectCPU, detectSIMD, printSysconf
#include "timers.h"
#if defined(_OPENMP)
# include <omp.h>
#endif
#include <iostream>
using std::cout;
using ... |
/*
$Id: unittest.cc 5026 2010-02-17 20:25:03Z rares $
Copyright (C) 2007 by The Regents of the University of California
Redistribution of this file is permitted under the terms of the BSD
license
Date: 10/22/2007
Author: <NAME> <rares (at) ics.uci.edu>
*/
#include "topk.h"
#include "topksearch.h"
#incl... |
/**
* particle_filter.cpp
*
* Created on: Dec 12, 2016
* Author: <NAME>
*/
#include "particle_filter.h"
#include <math.h>
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <random>
#include <string>
#include <vector>
#include "helper_functions.h"
using std::string;
using ... |
/*
Author: <NAME>
The maximum time of 2-neighbor bootstrap percolation: Complexity results
Rudini Sampaio
Theorem 5.1, pg 6
*/
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
using namespace std;
class Graph{
public:
int n;
vector< vector<int> > a... |
/*(c) CiggBit. All rights reserved.netID
* See license.txt for more information
*/
#include "PulNet_Handler.h"
#include "Network.h"
#include "Utility.h"
#include <atomic>
#include <enet/enet.h>
#include <fstream>
#include <future>
#include <iostream>
#include <map>
#include <utility>
#include <strin... |
/*-------------------------------------------------------------------------
Loading pong
--------------------------------------------------------------------------*/
#include <nds.h>
#include <stdio.h>
extern int screenMode;
extern void fadeOut(void);
static bool drawnStuff = false;
static int leftpaddle_yPos = 76;... |
/**
* Created by <NAME>
* https://github.com/Mnenmenth
*
* Modified from https://learnopengl.com/code_viewer_gh.php?code=includes/learnopengl/shader_s.h
*/
#include "ShaderProgram.h"
#include "../INCLUDE_GL.h"
#define glUniform(type, value) glUniform ## type(glGetUniformLocation(m_ID, name), value)
#define ... |
/**************************************************************************************************
* INCLUDES
*************************************************************************************************/
#include "FusionEKF.h"
#include "tools.h"
#include "Eigen/Dense"
#include <iostream>
#include <stdint.h>... |
#include "Event.h"
#include "Config/Property.h"
#include "Logger.h"
#include "MIDIPlayer.h"
#include "RoundedEdgeRectangleShape.hpp"
#include <cstddef>
#include <optional>
#include <random>
#include <type_traits>
std::unique_ptr<Event> Event::create_event_from_name(std::string_view name)
{
if(name == "Text")
... |
#include <iostream>
#include <fstream>
#include <assert.h>
#include <vector>
#include <algorithm>
#include <cmath>
#include <chrono> // chrono::high_resolution_clock
#include "priority/storage.hpp"
#include "priority/calculate.hpp"
// Uncomment this line when performance is measured
//#define NDEBUG
const int debug_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.