text stringlengths 3.08k 12.5k |
|---|
/*
* This is a calculator written as a solution to the
* exercises from Programming: Principles and Practice Using C++
* by <NAME>
*
*/
#include "token.h"
#include "table.h"
const string prompt = "> "; // PRINT prompt to indicate the need for input
const string result = "= "; // PRINT before out... |
// author : <NAME>
// date : 2015/11/27
// compiler : DevC++ 5.11 (MinGW with GNU 4.9.2)
// course : C++OOP2
using namespace std;
//-------------------------------------------------------------
#include <string>
#include <iostream>
#include <memory> //shared_ptr
namespace jj01
{
class Base1 { };
class Derived1: pub... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "Options/Options.hpp"
#include "PointwiseFunctions/AnalyticData/AnalyticData.hpp"
#include "PointwiseFunctions/AnalyticSolutions/GeneralRelativity/Minkowski.hpp"
#include "Point... |
#include "colorlinez_scene.h"
#include <QGraphicsSceneMouseEvent>
#include <QMessageBox>
#include <cmath>
#include <QDebug>
colorlinez_scene::colorlinez_scene(QRectF rect,QObject *parent ):QGraphicsScene(rect,parent)
{
model = new colorlinez2(net_size[0],net_size[1]);
model->player_add();
draw_matrix();
}
... |
#include <algorithm>
#include <exception>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
struct Point {
int x, y, z;
int& operator[] (int index) {
switch (index) {
case ... |
/*************************************************************************//**
* entnode.cc \class EntNode *
* *
* Description: The EntNode class is used to store a collection of entity *
* ... |
//=========================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
///////////
// This file is a part of the ATools project
// Some parts of code are the property of Microsoft, Qt or Aeonsoft
// The rest is released without license and without any warranty
///////////
#include <stdafx.h>
#include "World.h"
#include "Collision.h"
#include "Landscape.h"
#include "Object.h"
#include "Mo... |
// Implementation of quaternion routines.
#include "ltquatbase.h"
static int g_QNext[3] = { QY, QZ, QX };
void quat_ConvertToMatrix(const float *pQuat, float mat[4][4])
{
float s, xs, ys, zs, wx, wy, wz, xx, xy, xz, yy, yz, zz;
// get the values for matrix calcuation...
s = 2.0f / ((pQuat[0] *... |
#include "compare_documents.h"
#include <catboost/private/libs/algo/apply.h>
#include <catboost/libs/helpers/exception.h>
#include <catboost/libs/model/model.h>
#include <catboost/libs/data/data_provider.h>
#include <util/generic/utility.h>
using namespace NCB;
static void CalcIndicatorCoefficients(
const TFull... |
// Copyright (c) 2016-2020 The CryptoCoderz Team / LipsInc
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "clientcontrolpage.h"
#include "ui_clientcontrolpage.h"
#include "clientmodel.h"
#include "walletmodel.h"
#i... |
#include <vector>
#include <string>
#include <regex>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFFER_SIZE 32738
static void print_help(const char* name)
{
printf("OVERVIEW: Converts flatbuffers schema .fbs to C header\n\n");
printf("USAGE: %s -i <input> -o <output> -n <... |
/*
kubeVision - OpenCV (part of the KubeVision)
Modified by: <NAME> - 2015
New features: Web-service and distributed search
Based on: Find-Object - Mathieu Labbe - IntRoLab - Universite de Sherbrooke
URL: https://github.com/introlab/find-object
*/
#include <QtNetwork/QNetworkInterface>
#include <QtNetwork/QTcpS... |
#include "Prewitt.h"
int main(int argc, char ** argv)
{
int long_index = 0, opt = 0;
char * input_video = NULL, * output_video = NULL;
int goal,lowestGoal,highestGoal,profiling,priority,orchPort,execTimes,threads=1;
char *appName = NULL, *indPolicy = NULL;
static struct option long_options[] = ... |
/*
* Copyright 2009-2017 Alibaba Cloud 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... |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <numeric>
#include <string>
#include <algorithm>
#include <iostream>
#include <vector>
#include <bitset>
#include <queue>
#include <map>
#include <utility>
#include <functional>
#include <iomanip>
#include <unordered_map>
#include <set>
u... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
static int flipscreen;
static struct re... |
#include <cstdlib>
#include <iostream>
#include <ctime>
#include "game.h"
#include <string>
#include <vector>
#include <time.h>
#include <fstream>
#include <bits/stdc++.h>
using namespace std;
int time_left ;
int player;
string opp_move;
class node{
public:
string move;
int value;
int carry;
... |
/******************************************************************************
* Copyright (c) Open Connectivity Foundation (OCF), AllJoyn Open Source
* Project (AJOSP) Contributors and others.
*
* SPDX-License-Identifier: Apache-2.0
*
* All rights reserved. This program and the accompanying material... |
#include "spatialPartition/adaptiveGrid.h"
int AdaptiveGrid :: partition()
{
FileReader fr;
// char *filename = "/home/satish/mpigis/mpiio/src//MPI_GridCells.txt"; //4603
// char *filename = "/home/satish/mpigis/mpiio/src/quadtreeGrids/TwentyEightKCells.txt"; //28732
char *filename = "/home/satish... |
#include <stdio.h>
#include <stdlib.h>
#include "mmult.h"
// --------------------------------------------------------------------
// function to be accelerated in HW wrapped with AXI4-Stream interface
void mmult_hw (AXI_VAL in_stream[IS_SIZE], AXI_VAL out_stream[OS_SIZE])
{
#pragma HLS INTERFACE s_axilite port=return... |
/*
* C++ wrapper of DiagramData - just to have something clean to wrap
*
* Copyright (C) 2007, <NAME>, <<EMAIL>>
*
* This 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,... |
/*
File: osx_helpers.cpp
Author: <NAME>
Date: 10\07\2017
Description:
** Holds any helpful functions used by the platform
*/
const char* GetErrnoName(i32 errorNo)
{
switch (errorNo)
{
case EPERM: return "EPERM";
case ENOENT: return "ENOENT";
case ESRCH: return "ESRCH";
cas... |
/*
* Copyright (c) 2019 Opticks Team. All Rights Reserved.
*
* This file is part of Opticks
* (see https://bitbucket.org/simoncblyth/opticks).
*
* 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 ... |
#include<nds.h>
#include<netdb.h>
#include<fcntl.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include"text.h"
#include"keyboard.h"
extern u32 keysPress();
void getTouch(short &x,short &y);
void iac(int sc,const char *ptr);
void Send(int sd,const char buf[],int n,int f)
{
for(int i=0;i<n;i+=send(sd,buf+i,n-i,0));
... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, <NAME>, 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:
*
* * Redistributions of source code must reta... |
/*
This is a list of the common operations in a linked list !
I will keep upadating it as I learn new operations
*/
#include <iostream>
using namespace std;
struct node{
int data ;
node *next ;
} *head ;
class Lnklist{
public :
Lnklist() ; // initializes the head pointer to NULL at first
node* node_... |
/*
nymph_utilities.cpp - Implements the NymphRPC Utilities class.
Revision 0
Notes:
-
History:
2017/06/24, <NAME> : Initial version.
(c) Nyanko.ws
*/
#include "nymph_utilities.h"
#include "nymph_logger.h"
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
#include <P... |
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// 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 <stdint.h>
#include <iostream>
#include <radioacek/tcp_connection.h>
#include <radioacek/remote_player_collection.h>
#include <radioacek/listener.h>
#include <boost/regex.hpp>
#include <string>
#include <thread>
using std::cerr;
using std::endl;
using std::string;
using std::cout;
using std::thread;
using st... |
/*
* Copyright (c) 2019, the neonavigation 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:
*
* * Redistributions of source code must retain the above copyright
* notice, ... |
#include "swsscalethread.h"
#include <QFile>
#include <QDebug>
extern "C" {
#include <libswscale/swscale.h>
#include <libavutil/imgutils.h>
#include <libswresample/swresample.h>
}
#define SWS_ERROR_BUF(ret) \
char errbuf[1024]; \
av_strerror(ret, errbuf, sizeof (errbuf));
#define CHECK_END(ret, funcStr) \... |
/*
SONET problem in Gecode.
Translation of the EssencePrime model in the Minion Translator examples:
http://www.cs.st-andrews.ac.uk/~andrea/examples/sonet/sonet_problem.eprime
"""
The SONET problem is a network design problem: set up a network between
n nodes, where only certain nodes require a connectio... |
#include "cost.h"
#include <cmath>
#include <functional>
#include <iterator>
#include <map>
#include <string>
#include <vector>
#include <iostream>
#include "vehicle.h"
using std::string;
using std::vector;
using namespace std;
/**
* TODO: change weights for cost functions.
*/
const float COMFORT = pow(10, 2);
con... |
//===============================
// AUTHOR : <NAME>, <NAME> and <NAME>
// CREATE DATE : June 15, 2018
//===============================
#include <printf.h>
#include "galapagos_packet.h"
//#include "ap_cint.h"
#include "ap_int.h"
#include "hls_stream.h"
#include "ap_utils.h"
#include "raw_bridge.hpp"
//raw_t... |
/*
CF 2/1/19
Reference Timing Code:
Creates a time-controlled state transition from AUTON to DELAYED, to TELEOP, to GAMEOVER
based on defined limits. Communication from the interrupt-driven timer to the operational
code is via the currentState variable in software and the MOTORENABLE (pin 13) in hardware.
... |
/*
Copyright (c) 2012, <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; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ... |
/************************************************
BSD 3-Clause License
Copyright (c) 2019, HPCN Group, UAM Spain (hpcn-uam.es)
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 sour... |
/*
* yosys -- Yosys Open SYnthesis Suite
*
* Copyright (C) 2020 The Symbiflow Authors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
... |
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): <NAME>
*
* Copyright (C) 2014 Inria
*
* Modification(s):
* - YYYY/MM Author: Descriptio... |
/*
* Copyright (c) 2021, the SerenityOS developers.
* 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
* ... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: <NAME> <<EMAIL>>
*
* 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
... |
/////////////////////////////////////////////////////////////////////////////
// Name: dCollisionConvexHullNodeInfo.h
// Purpose:
// Author: <NAME>
// Modified by:
// Created: 22/05/2010 08:02:08
// RCS-ID:
// Copyright: Copyright (c) <2010> <Newton Game Dynamics>
// License:
// This ... |
#pragma once
#include "ast.hpp"
#include "def.hpp"
#include "stmt.hpp"
#include "expr.hpp"
#include "type_annot.hpp"
#include "../store.hpp"
#include "../string.hpp"
namespace mt {
class StringVisitor {
public:
explicit StringVisitor(const StringRegistry* string_registry,
const Store* stor... |
#include <iostream> /* std::cout */
#include <algorithm> /* std::max */
#include <vector> /* std:vector */
#include <string> /* std::string */
#include "print_utils.h" /* print_table_row */
... |
// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.md file.
#include "src/shared/flags.h"
#include "src/shared/test_case.h"
#include "src/shared/platform.h"
... |
/*
* Copyright (c) 2011 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 contribut... |
/*
* Copyright (c) 2012-2013 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementation of the... |
/**
* @Author: <NAME> <vicostudio>
* @Date: 29/04/2018 20:10:29
* @Email: <EMAIL>
* @Last modified by: vicostudio
* @Last modified time: 29/04/2018 20:27:54
*/
#include "Network.hpp"
Neural::Network::Network(const std::vector<unsigned> &topology, double recentAverageSmoothingFactor): ANetworkData(topology... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "IODIMetadata.h"
#include <fstream>
#include "DexOutput.h"
#include "DexUtil.h"
#include "Show.h"
#include "StlUtil.h"
#... |
//
// Copyright 2021-2022 <NAME>
// This file is part of the Tiny Lang compiler.
// Tiny Lang is licensed under the BSD-3 license. See the COPYING file for more information.
//
#include <iostream>
#include <parser/Parser.hpp>
#include <ast.hpp>
// Returns the function arguments
bool Parser::getFunctionArgs(std::vecto... |
/*=========================================================================
Program: Visualization Toolkit
Module: TestTriangle.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distribute... |
/*
* TODO
* Documentation
* Add all constants in config.hpp
*/
#include "navigator.hpp"
Navigator::Navigator(Block& _block_l, Block& _block_r, Gp2Group& _front_gp2,
Gp2Group& _back_gp2, float _period, float _period_pos):
pos(),
dst(),
block_l(_block_l),
block_r(_block_r),
front_gp2(_front_gp2),
back_gp2(... |
#include "gurka.h"
#include <gtest/gtest.h>
using namespace valhalla;
std::pair<baldr::RoadClass, baldr::RoadClass>
ReclassifyFerryConnectionEdge(std::map<std::string, std::string> const& way_description) {
constexpr double gridsize_metres = 1000;
const std::string ascii_map = R"(
A--B--b--C----D--E
... |
// Copyright (c) 2015, <NAME>.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#include "Updater.h"
#pragma comment(lib, "Urlmon.lib")
#pragma comment(lib, "Version.lib")
#pragma comment(lib, "wininet.lib")
#include <Windows.h>
#include <Shlobj.h> // Has to be included before WinInet to a... |
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
#define BOOST_TEST_MODULE ExplicitRecomputationTest
#include <memory>
#include <vector>
#include <boost/test/unit_test.hpp>
#include <filereader.hpp>
#include <onnxutil.hpp>
#include <popart/builder.hpp>
#include <popart/dataflow.hpp>
#include <popart/inputsha... |
#include <unordered_map>
#include <map>
#include "Common/Common.h"
#include "Common/Globals.h"
#include "Common/Cvar.h"
#include "Common/String.h"
#include "Common/Console.h"
static std::unordered_map<std::string, Cvar *> cvars;
bool Cvar::initialised = false; // flag for init-only cvars
// public, static
void Cvar... |
/// @file
/// @brief Contains Switch::System::Windows::Forms::ControlStyle enum.
#pragma once
#include <Switch/System/Enum.hpp>
namespace Switch {
namespace System {
namespace Windows {
namespace Forms {
/// @brief Specifies control functionality.
enum class ControlStyles {
/// @... |
/*---------------------------------------------------------------------------*\
Copyright (C) 2011-2015 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of Caelus.
Caelus is free software: you can redistribute it and/or modify it
... |
/*
[BSD-style license for Stamina and Charisma]
* Copyright (c) 1997-2009, <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 cop... |
#include <gtest/gtest.h>
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <utility>
#include <mxx/env.hpp>
#include <mxx/comm.hpp>
#include <mxx/file.hpp>
#include <mxx/distribution.hpp>
#include <suffix_array.hpp>
#include <lcp.hpp>
#include <divsufsort_wrapper.hpp>
#include "s... |
#include "util.h"
#include "camera.h"
static const float SPEED = 50.0f;
static const float MOUSE_SPEED = 0.025f;
static Camera* camera;
static void error_callback(int error, const char* description)
{
std::cerr << description << std::endl;
}
GLFWwindow* init(const char* exampleName, int width, int height)
{
... |
/***********************************************************************
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
* *
* This file is part of EvtGen. *
* ... |
/*/-------------------------------------------------------------------------------------//
Filename: Simulate_Games.cpp
Contributor: <NAME>
Date: 11/3/2020
Reference:
Description: A client for testing the specifications of the ChessBoard class
using a file of real c... |
/*
Copyright 2005-2012 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks.
Threading Building Blocks is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundat... |
/*
Copyright 2020 FUJITSU CLOUD TECHNOLOGIES LIMITED 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 app... |
//------------------------------------------------------------------------------
// Created : 06.08.21
// Author : <NAME>
// Description : Import Spinnnaker-based capturer into project (see TMKDCL-380)
//------------------------------------------------------------------------------
#include "captureManager... |
/* +---------------------------------------------------------------------------+
| The Mobile Robot Programming Toolkit (MRPT) |
| |
| http://www.mrpt.org/ ... |
#pragma once
/** @class Splitter_module
@brief Splits an incoming data stream into two or three parts.
Simplified block diagram
------------------------
```
fifo_port<T> _____ ____ fifo_export<T>
\ /
Splitter_module --- sig1_export<T>
signal_port<T> ___/... |
/*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : <NAME>
Contributors : <NAME>, <NAME>.
[1] <NAME>, <NAM... |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed u... |
/****************************************************************************
**
** Copyright (C) 2015 Canonical, Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
** Licensees holding valid commercial Qt lic... |
// TetradEngine.cpp : Implementation of CTetradEngine
#include "stdafx.h"
#include "TetradEngine.h"
#include "Position.h"
#include "MoveResult.h"
#include "Tetrad.h"
#include "ComHelper.h"
static BOARD_DIRECTION ConvertBoardDirection( const Implbits::BoardDirection dir )
{
switch ( dir )
{
case Implbits:... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
ofSetFrameRate(60);
//-
// parameters
params1.setName("paramsGroup1"); // main container
params1.add(bPrevious.set("<", false));
params1.add(bNext.set(">", false));
params1.add(bEnable.set("Enable", false... |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may ... |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of t... |
/**************************************************************************************************************************
Copyright(C) 2014-2017 www.xionggf.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to d... |
/*
Copyright (C) 2005-2007 Feeling Software Inc.
MIT License: http://www.opensource.org/licenses/mit-license.php
Portions of the code surrounded by PREMIUM conditional compilation
blocks are copyright Feeling Software Inc., strictly confidential and released
to Premium Support licensees only.... |
#include "xutil.hh"
#include "xdoc.hh"
#include "xbuffer.hh"
#include <assert.h>
#include <string.h>
using std::string;
static void add_last(xmlNodePtr leader, xmlNodePtr cur)
{
assert(leader);
assert(cur);
assert(leader != cur);
assert(cur->type != XML_DOCUMENT_FRAG_NODE);
xmlNodePtr p = leader-... |
#include<iostream>
#include<vector>
using namespace std;
struct node {
int key_value;
node *left;
node *right;
};
class btree {
public:
btree();
~btree();
void insert(int key);
node *search(int key);
void destroy_tree();
node *getRoot();
private:
void insert(int key, node *leaf);
node *... |
#include <vector>
#include <cstdlib>
#include "turtle.hh"
using namespace std;
enum Direction {
NONE = 0,
UP = 1, // 0001
RIGHT = 1 << 1,// 0010
DOWN = 1 << 2, // 0100
LEFT = 1 << 3, // 1000
};
class Cell {
unsigned walls_; // 1101
bool visited_;
//? Board board_;
unsigned col_, row_;
static const int ... |
/*
===========================================================================
Moka Source Code
Copyright 2019 <NAME>. All rights reserved.
https://github.com/stuartdadams/moka
stuartdadams | linkedin.com/in/stuartdadams
This file is part of the Moka Real-Time Physically-Based Rendering Project.
Permission is hereby ... |
/*-------------------------------------------------------------------------
*
* heapfuncs.c
* Functions to investigate heap pages
*
* We check the input to these functions for corrupt pointers etc. that
* might cause crashes, but at the same time we try to print out as much
* information as possible, even if i... |
/* The smooth Class Library
* Copyright (C) 1998-2020 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of "The Artistic License, Version 2.0".
*
* THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WIT... |
#include "core/core.h"
#include "core/assert.h"
#include "core/logging/logging.h"
#include "core/platform/glfw.h"
#include "core/renderer/opengl/shader_program.h"
#include "core/utility/fixme.h"
#include "core/utility/no_exception.h"
#include "core/utility/stb_image.h"
#include <sds/array.h>
#include <sds/array/make_a... |
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <sys/time.h>
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <boost/filesystem.hpp>
// user-defined parameters
bool toVisualize = true;
bool toSave = true;
struct timeval ti, tf;
void tic... |
#include "graph.h"
#include <algorithm>
#include <cassert>
#include <unordered_set>
#include <iostream>
size_t numberOfNodesInEstimates(
const std::vector<TransformEstimate> &pairwise_estimates)
{
size_t num_nodes = 0;
for (const auto &est : pairwise_estimates) {
num_nodes = std::max({num_nodes, est.sourc... |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Source: https://github.com/ecnerwala/cp-book/blob/master/src/seg_tree.hpp
struct segpoint {
int a;
segpoint() : a(0) {}
segpoint(int a) : a(a) {}
explicit operator bool() const noexcept { return a; }
operator int() const noexcept { re... |
#include "../headers/draw.h"
#include "../headers/window_size.h"
#include "../headers/field_radius.h"
#include "../headers/colours.h"
#include "../headers/window_functions.h"
#include<math.h>
const double DEG2RAD=3.14159/180.0;
void drawPartEllipse(float x, float y, float radiusX, float radiusY, double alpha, double ... |
#include <iostream>
#include <vector>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <iterator>
#include "Python.h"
#include "numpy/arrayobject.h"
using std::vector;
int layer_xt(double p, double h, double u_top, double u_bot,
double &dx, double &dt) {
// From She... |
// sample_pcsc_03.cpp
//
#include <windows.h>
#include <winscard.h>
#include <stdio.h>
#include <tchar.h>
#include <assert.h>
#pragma comment (lib, "winscard.lib")
#define SAMPLE_TITLE _T("READ BINARY/UPDATE BINARY (TypeA Mifare Standard)")
#define PCSC_TRANS_BUFF_LEN (262)
#define PCSC_RECV_BUFF_LEN (262)
typedef... |
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
#define _CRT_SECURE_NO_DEPRECATE // For Visual Studio: this allows the unsafe operation fopen() without issuing a warning
#include "logfile.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <ios>
RawLogEvent::RawLogEve... |
/*
* Copyright 2021 Hewlett Packard Enterprise Development LP
* Other additional copyright holders may be indicated within.
*
* The entirety of this work is 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 c... |
#include "common.h"
#include "helpers/LightData.h"
#include <json.inl>
#include <fstream>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace GLHelpers;
LightDataGL::LightDataGL() :
lightListBuffer(create_object<BufferObject>())
{
}
int LightData::loadFromJSON(std::s... |
//*******************************************************
// Purpose: main program for lang compiler
//
// Author: <NAME>
// Email: <EMAIL>
//
// Date: 2/20/2015
//
//*******************************************************
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <fstream... |
#include "assets.h"
#include "scene.h"
#include "../geometry/mesh.h"
#include "../gameobject/gameobject.h"
#include "../script/lua.h"
#include <cstring>
#include <fstream>
#include <QOpenGLTexture>
Scene * Scene::main;
int Scene::width;
int Scene::height;
QTime Scene::startedTime(QTime::currentTime());
QMediaPlayer S... |
/** \file Interface.cc
* \author <NAME> <<EMAIL>>
* \date 10-14-04
* \brief Interface class implementation
*
* Class implementation
*/
/*
* 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 Founda... |
/* =====================================================================================
* Keyboard listening class.
*
* Copyright (C) 2018-2020 <NAME> (no) <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the foll... |
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.