text stringlengths 3.08k 12.5k |
|---|
/*
* Copyright (c) 2013 The Regents of The University of Michigan
* 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, ... |
#include <OpenVolumeMesh/FileManager/FileManager.hh>
//#include <OpenVolumeMesh/Geometry/VectorT.hh>
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
#include <iostream>
#include <fstream>
#include <algorithm>
#include "TetStructure.h"
//#include <OpenVolumeMesh/Mesh/HexahedralMesh.hh>
using namespace OpenVolumeMesh;
... |
/*
* Copyright (C) 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 law or agree... |
#include "AoC/2017/problem_03.h"
#include "AoC/problems_map.h"
#include "AoC/utils/2d_array.h"
#include "AoC/utils/assert.h"
#include "AoC/utils/geo.h"
#include "range/v3/numeric/accumulate.hpp"
#include "range/v3/view/cycle.hpp"
#include "range/v3/view/exclusive_scan.hpp"
#include "range/v3/view/iota.hpp"
#include "... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
class CandyShop {
public:
int countProbablePlaces(vector <int> X, vector <int> Y, vector <int> R) {
int sol... |
#include "cmdline.hpp"
#include <cassert>
#include <stdexcept>
#include <tclap/ArgException.h>
#include "output.hpp"
BaseCmdLine::BaseCmdLine(const std::string &version, const std::string &message,
TCLAP::CmdLineOutput *const output)
: _version(version), _message(message), _output(outp... |
/** @file
MODULE : H263MotionVectorPredictorImpl1
TAG : H263MVPI1
FILE NAME : H263MotionVectorPredictorImpl1.cpp
DESCRIPTION : A class to predicting motion vectors from the surrounding motion
vectors of previously encoded/decoded macroblocks. Implements the
IMot... |
#include "altruct/structure/math/complex.h"
#include "gtest/gtest.h"
using namespace std;
using namespace altruct::math;
typedef complex<double> cplx;
TEST(complex_test, constructor) {
cplx z1;
EXPECT_EQ(0.0, z1.a);
EXPECT_EQ(0.0, z1.b);
cplx z2(5.0);
EXPECT_EQ(5.0, z2.a);
EX... |
#include "edgeProfiling.hpp"
#include "varFilter.hpp"
#include <llvm/IR/Function.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/User.h>
#include <llvm/IR/ValueSymbolTable.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/IR/InstIterator.h>
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/Constants.h>
#include ... |
#include "zip.h"
#include "unzip.h"
#include <Shellapi.h>
#include <shlobj.h>
#pragma comment(lib, "unzip/zlib.lib")
bool UnzipCPP::m_shellapi = false;
UnzipCPP::UnzipCPP()
{
}
UnzipCPP::~UnzipCPP()
{
}
std::string UnzipCPP::WStringToString(std::wstring oWString)
{
int iBufferSize = WideCharToMultiByte(CP_OEMCP, ... |
/*
* =====================================================================================
*
* Filename: main.cpp
* Created: 10/23/2017 17:57:06
* Last Modified: 10/24/2017 11:35:24
*
* Description: usage as
* gdbtrace binfile pid
* gdbtrace binfile pid
... |
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
const int MAXN = 200005;
const int MAXP = 19;
const int NONE = -1;
const int INF = 1e9;
int n, k, r;
bool is_station[MAXN];
int highest_station[MAXN];
int tin[MAXN];
int tout[MAXN];
int up[MAXN][MAXP];
int depth[MAXN];
... |
/*
* Copyright 2012 Esrille Inc.
* Copyright 2008, 2009 Google Inc.
* Copyright 2006 Nintendo Co., 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... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <iostream>
#include <stack>
using namespace std;
long sizeConverted;
/*
* Verification can be done here : http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibmaths.html#fibmod
* Tutorial : https://www.youtube.com/watch... |
#include <iostream>
#include <fstream>
#include <chrono>
#include <SceneObjects/Sphere.hpp>
#include <SceneObjects/CompositeSceneObject.hpp>
#include <Materials/Lambertian.hpp>
#include <Materials/Metal.hpp>
#include <Materials/Dielectric.hpp>
#include <SimpleRT/SimpleRT.hpp>
#include <MultiThreadedRT/MultiThreadedRT... |
/* ----------------------------------------------------------------------
Module: ULS.DLL (Service Provider)
File: spserver.cpp
Content: This file contains the server and its authentication.
History:
10/15/96 Chu, Lon-Chan [lonchanc]
Created.
Copyright (c) Microsoft Corporation 1996-1997
... |
/***********************************************************************
* Copyright 2011-2012 Computer Graphics Group RWTH Aachen University. *
* All rights reserved. *
* Distributed under the terms of the MIT License (see LICENSE.TXT). *
***************************... |
/***************
* PROGRAM: codekey
* NAME: codekey.cpp
* DESCRIPTION: main module for keyfile coder
* AUTHORS: <NAME>
* HISTORY:
* DATE NAME COMMENT
* 29.01.97 ah initial release
***************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "typedef... |
#pragma once
#include "../interfaces/INodeNet.hpp"
#include "../interfaces/INodeUser.hpp"
#include "fd_listener.hpp"
#include "nroute.hpp"
#include <map>
#include <sstream>
#include <string>
#include <thread>
// #include <sys/socket.h>
// #include <netinet/in.h>
#include <arpa/inet.h>
// struct Relaydata{
// int ... |
//
// FrameBuffer.cc
// Copyright (C) 2021 <NAME>
//
#include "FrameBuffer.hh"
#include "MathUtility.hh"
#include "Print.hh"
#include <fstream>
#include <algorithm>
#include <memory>
#include <cassert>
#include <png.h>
// **** FrameBuffer Class ****
int FrameBuffer::init(int w, int h, const Color& c)
{
if (w <= 0 ... |
#include "bounds.h"
/*
* Intersect computes the intersection of the input ray with this bounding box.
* Unlike the Intersect functions of the Shape classes, this does not output an entire Intersection data package,
* but just outputs the t parameterization that the intersection would have with the ray.
* This is ... |
#include "cnf.hpp"
#include <algorithm>
#include <iostream>
#include <cassert>
#include <cmath>
#define ALL(V) std::begin(V), std::end(V)
bool match(const int p, const PValue v) {
return 0 < p * static_cast<int>(v);
}
/* ========== Valuation ========== */
Valuation::Valuation(const int size_)
: size(size_)... |
/*
* The original MSD format is simply:
*
* #PARAM0:PARAM1:PARAM2:PARAM3;
* #NEXTPARAM0:PARAM1:PARAM2:PARAM3;
*
* (The first field is typically an identifier, but doesn't have to be.)
*
* The semicolon is not optional, though if we hit a # on a new line, eg:
* #VALUE:PARAM1
* #VALUE2:PARAM2
* we'll recover.
... |
#include <Windows.h>
#include <optional>
#include <memory>
#include "InstallInfo.h"
const wchar_t* RegistryExpectedAppRoot{ L"SOFTWARE\\Microsoft\\ServerManagementGateway" };
const wchar_t* PortFieldName{ L"SmePort" };
const wchar_t* RegistryUninstallRoot{ L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" };
... |
/******************************************************************************
* Copyright (c) 2015 <NAME>
* Distributed under the MIT license
* (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
*
* Project:
* Filename: sm3.cc
* Version: 1.0
* Author: <NAME>
* E-mail: ... |
//////////////////////////////////////////////////////////////////////////////
// This file is part of 'CPIX Development Firmware'.
// It is subject to the license terms in the LICENSE.txt file found in the
// top-level directory of this distribution and at:
// https://confluence.slac.stanford.edu/display/ppareg/L... |
#include <LEDTableApps/animations.hpp>
#include <LEDTableEngine/core/baseController.hpp>
#include <complex>
#define RAND_FLOAT(A, B) (A + static_cast<float>(rand()) / (static_cast<float>(RAND_MAX / B)))
using namespace led;
namespace ledApps{
AnimationApp::AnimationApp() {
}
AnimationApp::~AnimationApp() {
}
void... |
#include "Checkout.hpp"
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include "Book.hpp"
namespace {
constexpr bool kOutputTrace = true;
// Call this function from within the carefully_move_books functions, just
// before kicking off the recursion and then just after each move.
void trace(
... |
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
#define MAX 100
typedef struct Sach
{
char MaSach[10];
char TenSach[30];
char NhaXuatBan[30];
char TenTacGia[30];
float GiaBan;
int NamPhatHanh;
}SACH;
typedef struct ThuVien
{
int n; // số lượng
SAC... |
// <NAME>
// July 2019
#include <iostream>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <SFML/Graphics.hpp>
#include <time.h>
using namespace sf;
const Color dead_cell(26,27,29);
// const Color live_cell(2,252,251);
const Color live_cell(152,121,2);
const unsigned int cell_size... |
/*
the vast starry sky,
bright for those who chase the light.
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define mk make_pair
const int inf=(int)1e9;
const ll INF=(ll)5e18;
const int MOD=998244353;
int add(int x,int y){x+=y; return x>=MOD ? x-MOD : x;}
int sub(int x... |
#include "WaziDev.h"
// #include <SPI.h>
#include <EEPROM.h>
#include <LowPower.h>
#include <Base64.h>
#include "local_lorawan.h"
WaziDev::WaziDev() {}
unsigned char AppSkey[16];
unsigned char NwkSkey[16];
struct EEPROMConfig
{
uint16_t head;
uint8_t packetNumber;
};
uint8_t WaziDev::setupLoRaWAN(const uin... |
#include "HeaderAndFooter.h"
TBTK::DocumentationExamples::HeaderAndFooter headerAndFooter("SuperconductivityMagneticImpurity");
//! [SuperconductivityMagneticImpurity]
#include "TBTK/Property/DOS.h"
#include "TBTK/PropertyExtractor/Diagonalizer.h"
#include "TBTK/Range.h"
#include "TBTK/Smooth.h"
#include "TBTK/Solver/... |
/****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Copyri... |
#include "control_processor.hpp"
using namespace std;
ControlProcessor::ControlProcessor(DnnConfig *cfg, Datapath *dp)
: cfg(cfg), dp(dp), data_size(cfg->bit_width / 8),
num_output_lines(cfg->num_outputs / cfg->nbout_line_length),
nfu3_flag(cfg->nbin_line_length * cfg->nbin_... |
#include "path.h"
const double INF = 65000;
const int8_t N = 46;
double f[N][N];
int16_t ddx[8] = {-1, -1, -1, 0, 1, 1, 1, 0};//{0, -1, 0, 1, 0, -1, 0, 1}; //
int16_t ddy[8] = {-1, 0, 1, 1, 1, 0, -1, -1};//{-1, 0, 1, 0, -1, 0, 1, 0}; //
double dis(pii a, pii b)
{
//return 1;
return std::hypot(a.first - b.first, a.s... |
#include "GameState.h"
#ifndef IMGUI_DEFINE_MATH_OPERATORS
#define IMGUI_DEFINE_MATH_OPERATORS
#endif
#include <ImGui/Inc/imgui.h>
#include <ImGui/Inc/ImPlot.h>
#include <ImGui/Src/imgui_internal.h>
using namespace JimmyGod::Graphics;
using namespace JimmyGod::Input;
using namespace JimmyGod::Math;
us... |
#include "enemy.hpp"
#include "config.hpp"
//Enumeration of player controls
enum eTypes {MOVELEFT = 0, FOLLOW, MOVELEFTSHOOT};
// Parametrized Constructor : Creates Enemy
Enemy::Enemy(Texture *texture, Texture *eBulletTexture, Vector2u windowBounds, Vector2f position, Vector2f moveDirection,
int type, int hp... |
/*
* Copyright 2014 Google Inc. 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 applic... |
#include <cmath>
#include "QtCore/QSettings"
#include "Logger/Log.h"
#include "ViewSettings.h"
using namespace SideCar::GUI::AScope;
static const char* const kGateMin = "GateMin";
static const char* const kGateMax = "GateMax";
static const char* const kRangeMin = "RangeMin";
static const char* const kRangeMax = "R... |
// Copyright 2021 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
#include "../SIPL/Core.hpp"
#include "../tube-segmentation.hpp"
#include <iostream>
#include <queue>
#include <vector>
#include <string>
using namespace SIPL;
typedef struct TubeValidation {
float averageDistanceFromCenterline;
float percentageExtractedCenterlines;
float recall;
float precision;
unsigned int inco... |
#include <iostream>
#include "Camera.h"
#include "CvTestbed.h"
#include "Shared.h"
#include <opencv2/opencv.hpp>
using namespace alvar;
using namespace std;
const int calib_count_max=50;
const int etalon_rows=6;
const int etalon_columns=8;
std::stringstream calibrationFilename;
void videocallback(IplImage *image)
{... |
/*
* Copyright 2018-2019 Fairtide Pte. 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 o... |
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
using ll = long long;
ll firstBiggerMultiple(ll increment, ll target) {
ll multiple = 0;
while (multiple < target) {
multiple += increment;
}
return multiple;
}
bool isPri... |
/*
File: EventReceiver.cpp
Author: <NAME>
Date: 2014.03.10
Copyright 2016 Manuvr, 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 req... |
// Copyright <NAME> 1999 - 2021.
// 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)
// This work is based on an earlier work:
// "Algorithm 910: A Portable C++ Multiple-Precision System for Sp... |
/*
MIT License
Copyright(c) 2019 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this softwareand associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute... |
/*
Copyright (c) 2006, <NAME> and <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 ... |
/*
* Copyright (c) 2018 ARM Limited. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
* 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... |
/*
* Copyright (C) 2009 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... |
#include "../../Flare.h"
#include "FlareStoryMenu.h"
#include "../../Game/FlareGame.h"
#include "../../Game/FlareSaveGame.h"
#include "../../Player/FlareMenuPawn.h"
#include "../../Player/FlareMenuManager.h"
#include "../../Player/FlarePlayerController.h"
#define LOCTEXT_NAMESPACE "FlareStoryMenu"
/*--------------... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
const int mod = 1000000009;
int C[31][31];
int F[31];
int ways[31][31]; // [l][r] to pick words from l to r i... |
/*
______ ______ __ __ __ ______ __ __
/\___ \ /\ ___\ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \
\/_/ /__ \ \ __\ \ \ \-. \ \ \ \ \/_/\ \/ \ \ __ \
/\_____\ \ \_____\ \ \_\\"\_\ \ \_\ \ \_\ \ \_\ \_\
\/_____/ \/_____/ \/_/ \/_/ \/_/ \/_/ \/_/\/_/
ZGame... |
/*
* Copyright (c) 2013 <NAME>, <EMAIL>
* 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 conditi... |
#include "widget.h"
#include "ui_widget.h"
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
initUI();
// multiselection in list using ctrl + click
ui->list_assignments
->setSelectionMode(QAbstractItemView::ExtendedSelection);
}
Widget::~Wid... |
#include "hash.h"
#include "scrypt.h"
#include "argon2.h"
#include "hashx17.h"
#include "Lyra2RE.h"
#include "cryptonight/crypto/hash-ops.h"
#include "yescrypt/yescrypt.h"
uint32_t murmur3_32(const uint8_t* key, size_t len, uint32_t seed) {
uint32_t h = seed;
if (len > 3) {
const uint32_t* key_x4 = (const uint... |
/*
* Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
*
* 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
*
* Unl... |
// tests for the various variadic compile-time utilities
// almost all are "implemented" using static assertions
#include <type_traits>
#include <tudocomp/util/integer_sequence.hpp>
#include <tudocomp/util/type_list.hpp>
using namespace tdc;
// integer sequences
using mtseq_t = std::index_sequence<>;
using testse... |
//
// LinkedListQueue.cpp
//
// This file implements a Queue class based upon a linked list data structure.
// It includes support for a reverse() method that does not require additional
// memory allocation.
//
// --------------------------------------------------------------------------
// Attribution: "Programming A... |
/*
INFORMATICA 12 CFU – Modulo di Programmazione
(ING. INFORMATICA)
Prof. <NAME>
APPELLO DEL 22/02/2018
Si consideri un programma per gestire la raccolta delle informazioni relative ai buoni
sconto offerti da un sito di prenotazione alberghi ai propri clienti. Un buono sconto è
descritto da un tipo strutturato d... |
#include "Engine.hpp"
Server::Server() {
};
Server::~Server() {
}
bool Server::InitiatePort(int portNum) {
static struct sockaddr_in sa_zero;
struct sockaddr_in sa;
int x = 1;
int fd;
if ( ( fd = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 )
{
// -- TODO: insert logging mechanism
return... |
/*
MIT License
Copyright (c) 2019 GIS Core R&D Department, NavInfo Co., Ltd
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, co... |
// Libhalog
// Author: <EMAIL>
#include <unistd.h>
#include "clib/hal_hazard_version.h"
#include "clib/hal_util.h"
#include <gtest/gtest.h>
using namespace libhalog;
using namespace libhalog::clib;
class GObject: public HALHazardNodeI {
public:
GObject(int64_t &counter) : counter_(counter) {
__sync_add_a... |
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <ZMPT101B.h>
#include <ACS712.h>
#include <LiquidCrystal.h>
#include <EEPROM.h>
#include <SIM800L.h>
#include <ArduinoJson.h>
#define DEVICE "12345678"
#define DEBUG true
#define DEBUG_SIM false
#define BAUD 9600
#define BAUD_SIM 9600
#define RS_SIM 11
#defin... |
#include "muscle.h"
#include "msa.h"
#include "objscore.h"
#include "profile.h"
#define TRACE 0
#define COMPARE_3_52 0
#define BRUTE_LETTERS 0
static SCORE ScoreColLetters(const MSA &msa, unsigned uColIndex)
{
SCOREMATRIX &Mx = *g_ptrScoreMatrix;
const unsigned uSeqCount = msa.GetSeqCount();
#i... |
/*
* Functions to preform an ARP Spoof
* requires two packets to be send:
* - One for the router
* - One for the victim
*/
#include "mitm.h"
#include "../main.h"
static volatile int keepRunning = 1;
void intHandler(int i) {
keepRunning = 0;
}
// Data structure for configured packet
struct arpPacket {
Eth... |
#include <GL/glut.h>
#include "GrBackendSurface.h"
#include "GrContext.h"
#include "SkCanvas.h"
#include "SkRandom.h"
#include "SkSurface.h"
#include "gl/GrGLInterface.h"
#include "gl/GrGLUtil.h"
#if defined(SK_BUILD_FOR_ANDROID)
#include <GLES/gl.h>
#elif defined(SK_BUILD_FOR_UNIX)
#include <GL/gl.h>
#elif defined(S... |
//
// Scale.cpp
// CircuitApp
//
// Created by <NAME> on 8/19/18.
// Copyright © 2018 <NAME>. All rights reserved.
//
#include "Scale.hpp"
#include <vector>
static const std::vector<Degree> natural_minor = {0,2,3,5,7,8,10};
static const std::vector<Degree> major = {0,2,4,5,7,9,11};
static const std... |
#include <algorithm>
#include <fstream>
#include <vector>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <Eigen/Core>
#include <Eigen/Householder>
#include <Eigen/SparseCore>
#include <Euclid/Descriptor/HKS.h>
#include <Euclid/Descriptor/Histogram.h>
#include <Euclid/IO/OffIO.h>
#include <Eu... |
// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// packet capture helper. This initiates packet capture on a device
// and stores the output pcap file to the specified destination.
#include <... |
#define F_CPU 8000000L
#include <util/delay.h>
#include <util/delay_basic.h>
#include "Librairie.h"
#include "Roue.h"
void debounce() {
_delay_ms(10);
}
bool isButtonPressed() {
if ( !(PIND & 0x04) )
return false;
debounce();
return (PIND & 0x04) ? true : false;
}
bool isButtonReleased() {
return (... |
/* Kattis - Eulerian Path
[Note: This was my first Eulerian path problem... subsequently I realised that we don't need to modify
Hierholzer's algorithm, it automatically deals with Eulerian paths as well as cycles. Refer to my Notion
page for the shorter version of Hierholzer's]
I can't begin to describe my annoyance... |
/*
Copyright (C) 1993 <NAME>
Copyright (C) 2002 <NAME>, <NAME>
This file contains programs and data originally developed by <NAME>
with minor changes and improvements by <NAME>.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as publishe... |
#include <vector>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <nag.h>
#include <nagg01.h>
#include <nagd01.h>
#include <nagg05.h>
#include <nagg08.h>
#include <omp.h>
#include "myrand.h"
#define NSUM... |
///////////////////////////////////////////////////////////////////////////
//
// NAME
// Convert.cpp -- convert between image types, copy images, select bands
//
// DESCRIPTION
// See Convert.h for a full description
//
// SEE ALSO
// Convert.h full description
//
// Copyright � <NAME>, 2001.
// See Copyr... |
/* Copyright (c) 2015 <NAME> <<EMAIL>>
* Copyright (c) 2014 ToolsOnAir Broadcast Engineering GmbH
*
* 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... |
//
// Stroustrup - Programming Principles & Practice
//
// Chapter 20 Exercise 12
//
// Complete the definition of a List from 20.4.1-2. Get the high() example to
// run. Allocate a Link to represent one past the end.
//
// Had many issues with this exercise. Mostly dealing with the difference
// between pointers and ... |
#include "asciimon_loader.h"
#include "../Utilities/t_casts.h"
#include "asciimon_cache.h"
#include "game_funcs.h"
#include "d_stat_names.h"
#include "t_casts.h"
#include "asciimon_move_cache.h"
#include "move_loader.h"
#include <iostream>
#include <cassert>
const std::string fileType = "Asciimon File... |
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <filesystem>
#include <stb_image.h>
#include<glm.hpp>
#include<gtc/matrix_transform.hpp>
#include<gtc/type_ptr.hpp>
#include "Shaders/Shader.h"
bool isWireFrame = false;
const int SCREEN_WIDTH = 600;
const int SCREEN_HEIGHT = 600;
void fram... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "statelib.h"
// #define DEEP_DEBUG_READ
// #define DEBUG_READ
bool quiet;
int line_number;
const char* fname;
int NextLeftBracket(FILE* in)
{
for (;;) {
int c = fgetc(in);
if ('['==c) return c;
if (EOF==c) return c;
if ('\n'==c) l... |
/* Copyright (c) 2018 PaddlePaddle 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 applicable law or... |
//////////////////////////////////////////////////////////////////////////////
//
// CmFocus.cpp: Implementation of the CmFocus classes
//
//////////////////////////////////////////////////////////////////////////////
//
// author: <NAME>
// website: http://wegalink.eu
//
////////////////////////////////////////... |
// { dg-do run { target c++14 } }
// { dg-require-thread-fence "" }
// Copyright (C) 2015-2017 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published... |
/*
Author: <NAME>
email: <EMAIL>
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
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, i... |
#include "ProcessContainer.h"
#include "SysInfo.h"
#include "util.h"
#include <chrono>
#include <iomanip>
#include <iostream>
#include <ncurses.h>
#include <sstream>
#include <string>
#include <thread>
#include <time.h>
#include <vector>
using namespace std;
char *getCString(std::string str) {
char *cstr = new char... |
// Copyright 2021 <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 writi... |
/*
* This file belongs to the Galois project, a C++ library for exploiting
* parallelism. The code is being released under the terms of the 3-Clause BSD
* License (a copy is located in LICENSE.txt at the top-level directory).
*
* Copyright (C) 2018, The University of Texas at Austin. All rights reserved.
* UNIVER... |
/*
* Copyright (c) 2018, Ubiquity Robotics
* 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 c... |
#include "spearmint.h"
#include "spearmint_statics.hpp"
#include "chemfiles/Trajectory.hpp"
#include "chemfiles/Frame.hpp"
#include "spear/Molecule.hpp"
#include "spear/Grid.hpp"
std::map<std::string, char> residue_codes({
{"GLU", 'E'}, {"ASP", 'D'}, {"ALA", 'A'}, {"VAL", 'V'}, {"PHE", 'F'}, {"LEU", 'L'},
{"... |
#include <iostream>
#include <fstream>
#include <string>
#include "network.h"
#include "utils.h"
#include "parser.h"
#include "option_list.h"
#include "blas.h"
#include "assert.h"
#include "image.h"
#include <sys/time.h>
#include <gflags/gflags.h>
#include <opencv/cv.h>
#include <opencv2/highgui/highgui.hpp>
#include <... |
#include "circuit_parser.h"
#include <unistd.h>
using namespace psjjjj;
using namespace std;
CircuitParser::CircuitParser(shared_ptr<const ModOrganizer> mod_organizer) {
mod_organizer_ = move(mod_organizer);
}
CircuitParsingResultProto CircuitParser::parse(const CircuitProto &circuit) {
CircuitParsingResultP... |
#include <array>
#include <cassert>
#include <iostream>
#include <iterator>
#include <numeric>
#include <type_traits>
#include <boost/mpl/vector.hpp>
#define png_infopp_NULL nullptr
#define int_p_NULL nullptr
#include <boost/gil/gil_all.hpp>
#include <boost/gil/extension/io/png_dynamic_io.hpp>
#include <boost/gi... |
#define BOOST_TEST_MODULE Utils UtilsTest
#define BOOST_TEST_DYN_LINK
#define GOOGLE_STRIP_LOG 4
#include "../src/Utils.h"
#include <boost/test/unit_test.hpp>
#include <iostream>
using namespace Utils;
BOOST_AUTO_TEST_CASE( roundToNearestIntTest )
{
BOOST_CHECK_EQUAL( roundToNearestInt( 0 ), 0 );
BOOST_CHEC... |
/**
* 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... |
// C++ standard headers
#include <exception>
#include <string>
// Boost headers
#include <boost/shared_ptr.hpp>
// ROS headers
#include <ros/ros.h>
//#include <image_transport/image_transport.h>
#include <control_msgs/JointTrajectoryControllerState.h>
#include <ros/topic.h>
#include <sensor_msgs/PointCl... |
/*******************************************************************************
* nemesis. an experimental finite element code. *
* Copyright (C) 2004-2011 F.E.Karaoulanis [http://www.nemesis-project.org] *
* ... |
/*
* If not stated otherwise in this file or this component's Licenses.txt file the
* following copyright and licenses apply:
*
* Copyright 2017 RDK Management
*
* 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 ... |
#include "globals.h"
#include "flags.h"
#include "fluxmap.h"
#include "decoders/decoders.h"
#include "encoders/encoders.h"
#include "arch/aeslanier/aeslanier.h"
#include "arch/amiga/amiga.h"
#include "arch/apple2/apple2.h"
#include "arch/brother/brother.h"
#include "arch/c64/c64.h"
#include "arch/f85/f85.h"
... |
#include "dataio/StdinDataIO.h"
#include "iogateway/PlainTextMessageIOGateway.h"
#include "reflector/ReflectServer.h"
#include "system/SetupSystem.h"
#include "util/MiscUtilityFunctions.h"
#include "util/SocketCallbackMechanism.h"
#include "zg/udp/IUDPMulticastNotificationTarget.h"
#include "zg/udp/UDPMulticastTransce... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.