text stringlengths 3.08k 12.5k |
|---|
/**
* Copyright 2020 <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 i... |
// Copyright (c) 1999-2018 <NAME>
// See the file COPYING for more information
#include "../../config.h"
#include <libpq-fe.h>
#include "sqlrbench.h"
class postgresqlbench : public sqlrbench {
public:
postgresqlbench(const char *connectstring,
const char *db,
uint64_t queries,
uint64_t rows,
u... |
#include "TestDriver.h"
#include "SimpleTest.h"
#include "MemoryDiagnostics.h"
using namespace std;
namespace {
/* Given a file path, returns the name of the file, excluding the path to it. */
string tailOf(const string& path) {
/* Find the last / or \ in the filename. */
size_t index = path.fi... |
#include "Message.hpp"
Message::Message(const char& _type,
const id_type& _id,
const time_type& _timestamp):
type(_type),
id(_id),
timestamp(_timestamp){};
void Message::setType(const char& _type){
if(_type =='A' || _type == 'F'){
// Messages related to adding new order.
... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <algorithm>
#include <locale>
#include <memory>
#include <sstream>
#include <boost/program_options.hpp>
#include <sudoku/sudoku.h>
#include "program_options.h"
std::string computeSerialFormatString(const sudoku::Dimensions& dims)
{
... |
/*
* Copyright (c) 2014 <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 restriction, including without limitation
* the rights to use, copy, modify, merge, publis... |
#include <iostream>
using std::cout;
#include <cstdlib>
using std::exit;
#include <cmath>
#include <Complex.h>
#include <phys_const.h>
#include <dacpp.h>
#include <c_da.h>
#define N_dim_max 20 // affect only erf and cerf table
Complex erf(Complex);
ostream& operator<<(ostream& s,c_da& x)
{
s << "RealPart =... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
unsigned char* mermaid_background_videor... |
#include "beziercurve.h"
#include <QtMath>
#include <QComboBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QMouseEvent>
#include <QPainter>
#include <QPainterPath>
/**
* @brief createNBezierCurve 生成N阶贝塞尔曲线点
* @param src 源贝塞尔控制点
* @param dest 目的贝塞尔曲线点
* @param precision 生成精度
*/
static void createNBezierC... |
// Tests for read/write functionality.
#include <gtest/gtest.h>
#include <cmath>
#include <array>
#include <chrono>
#include <thread>
#include <vector>
#include "fixtures.hpp"
#include <libsmu/libsmu.hpp>
using namespace smu;
// Read/write fixture initializing generic variables used by all read/write tests.
class ... |
#include <bits/stdc++.h>
using namespace std;
#define VERTEX_SIZE 10010
#define EDGE_SIZE 200020
typedef struct _Edge {
int to, next;
} Edge;
Edge edge[2][EDGE_SIZE];
int head[2][VERTEX_SIZE], edgePt[2];
int vertexNum, edgeNum;
void addEdge(int id, int from, int to) {
edge[id][edgePt[id]] = {... |
#include <string.h>
#include <math.h>
#include <vector>
#include "picosystem.hpp"
using namespace picosystem;
struct vec_t {
int32_t x, y;
};
// each square of the map is 4x4 pixels which on a 120x120 display
// means the map is 60x60 squares large
constexpr uint32_t scale = 8;
constexpr vec_t map_... |
// ---------------------------------------------------------------------------
//
// The ab-initio based multiscale library
//
// S / P H I / n X
//
// Copyright: Max-Planck-Institute for Iron Research
// 40237 Duesseldorf, Germany
//
// Contact: https://sxlib.mpie.d... |
// Copyright (c) 2003, Google 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 retain the above copyright
// notice, this list of condi... |
#include <string>
#include <vector>
#include <iostream>
#include <cstdio>
// OS Specific sleep
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include "serial/serial.h"
// ajouté
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "serial_amaury/GPS_raw.h"
#include <sstream>
// fin ajo... |
//
// udp_client_base.cc
// SocketServer
//
// Created by lemon on 2020/3/24.
// Copyright © 2020 lemon. All rights reserved.
//
#include "udp_client_base.h"
#include <iostream>
#include "../models/base_datagram.pb.h"
using namespace std;
// simple wrapped for call back in thread
static void *recvThreadFunc(void... |
/*
Shared encoder test routines
<NAME>
May 2021
This file is Unlicensed.
See the foot of the file, or refer to <http://unlicense.org>
*/
#pragma once
#include "Test_Common.hpp"
#include <functional>
template<typename Encoder, bool BufferPrintingDefault>
class TestBase_Encoder : public TestBase... |
#include "inicpp.h"
#include <string>
#include <vector>
#include <iostream>
#include <sstream>
using namespace inicpp;
using namespace std::literals;
std::string get_config()
{
std::string conf_str = ""
"[Section 1]\n"
"; comment\n"
"Option 1 = value 1 ; option 'Option 1' has value 'value ... |
/**************************************************************
*
* 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 y... |
// Copyright 2022 <NAME>
#include <omp.h>
#include <iostream>
#include <random>
#include <ctime>
#include <vector>
#include <algorithm>
#include <utility>
#include "../../../modules/task_2/shurygina_a_labeling_omp/labeling.h"
std::vector<int> getRandomImg(int rows, int cols) {
if ((rows <= 0) || (cols <= 0))
... |
#include <iostream>
#include <stdlib.h>
#include <string>
#include <fstream>
#include <sstream>
#include <deque>
#include <stack>
#include <GL/glut.h>
#include "checkers.cpp"
#include "shaders.h"
#include "Transform.h"
using namespace std;
// Main variables in the program.
#define MAINPROGRAM#include "varia... |
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or mod... |
#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <list>
#include <ncursesw/ncurses.h>
//#include <ncurses.h>
enum Move {
UP, DOWN, LEFT, RIGHT
};
struct Point {
int x, y;
Move m;
Point() : x(0), y(0), m(RIGHT) {}
Point(int x_, int y_, Move m_) : x(x_), y(y_), m(m_) {}
};
int Fie... |
/* Copyright (C) 2014 by <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 restriction, including without limitation the rights
* to use, copy, modify, merge, publish... |
#include "mbed.h"
#include "gps.h"
#include "trace_helper.h"
// Serial connection to the GPS
RawSerial *gps = new RawSerial(D8, D2, 9600);
void MyGPSClass::init() {
// send configuration data in UBX protocol
for(int i = 0; i < sizeof(UBLOX_INIT); i++) {
gps->putc( UBLOX_INIT[i... |
/**
* @file server_lag.cpp Create high INSERT load to create slave lag and check that Maxscale start routing queries to Master
*
* - in Maxscqale.cnf set max_slave_replication_lag=20
* - in parallel thread execute as many INSERTs as possible
* - using "select @@server_id;" check that queries go to one of the slav... |
// PhoeniX OS Interrupts subsystem
// Copyright © 2017 <NAME> a.k.a. PhoeniX
#pragma once
#include <stddef.h>
#include "mutex.hpp"
#include "thread.hpp"
struct TSS64_ENT {
uint32_t reserved1;
uint64_t rsp[3];
uint64_t reserved2;
uint64_t ist[7];
uint64_t reserved3;
uint16_t reserved4;
uint16_t i... |
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... |
#include "../include/bmp180.hpp"
#include "../include/i2c.hpp"
namespace
{
const uint8_t BMP180_ADDR = 0b11101110;
// Register addresses.
const uint8_t OUT_MSB = 0xF6;
const uint8_t AC1_MSB = 0xAA;
const uint8_t AC2_MSB = 0xAC;
const uint8_t AC3_MSB = 0xAE;
const uint8_t AC4_MSB = 0xB0;
... |
// Clarinet.C -- hacked version (by BGG) for RTcmix from Perry/Gary's STK
// original head/comment:
/***************************************************/
/*! \class Clarinet
\brief STK clarinet physical model class.
This class implements a simple clarinet
physical model, as discussed by Smith (1986),
... |
/****************************************************************************
*
* Copyright 2018 Samsung Electronics 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... |
/**
* @Author : zhang
* @create 2022/3/6 17:15
*/
#include <vector>
#include "CriticalPath.h"
#include "iostream"
#include "queue"
using namespace std;
/*
* @Description 安排指令执行顺序
* 输入N个指令,M个依赖关系,执行一条指令花费1ns
* 输出执行的最短时间
*/
const int C_MAX=1001;
const int INF=INT_MAX;
struct C_Edge{
int to;//终点
int l... |
#pragma once
#include <stdint.h>
namespace ig {
template <typename T, T V>
struct integral_constant {
static constexpr T value = V;
using value_type = T;
using type = integral_constant<T, V>;
constexpr operator value_type() const noexcept { return value; }
constexpr value_type operator()() const ... |
/*
* =====================================================================================
*
* Filename: SamToM4.cpp
*
* Description: Convert a sam file to a blasr m4 file.
*
* Version: 1.0
* Created: 04/03/2013 01:19:43 PM
* Revision: none
* Compiler: gcc
*
* ... |
/*
* Copyright 2018-2021 Board of Trustees of Stanford University
*
* 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... |
#pragma once
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
#include "tensor_info.hpp"
#include "host_data_reader.hpp"
#include "depthai-shared/json_helper.hpp"
std::unordered_map<std::string, unsigned> inverseVectorMapping(
const std::vector<std::string> &mapping
)
{
std::... |
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <semaphore.h>
#include <unistd.h>
#include <sys/time.h>
#include <signal.h>
#include "rrr.hpp"
#include "benchmark_service.h"
using namespace benchmark;
using namespace rrr;
using namespace std;
const char *svr_addr = "127.0.0.1:8848";
int byte_size... |
/*================================================================
* Copyright (C)2020 All rights reserved.
* FileName : TspAlgorithmBase.cc
* Author : elonkou
* Email : <EMAIL>
* Date : Wed Nov 10 17:20:24 2021
================================================================*/
#include "TspAlgorithmBase... |
/**
* > Author : TISparta
* > Date : 03-05-18
* > Tags : Sqrt decomposition, DSU
* > Difficulty : 6 / 10
*/
#include <bits/stdc++.h>
using namespace std;
int BLOCK_SIZE;
struct Query {
int L, R, id;
Query() {}
Query(const int& _L, const int& _R, const int& _id): L(_L), R(_R), id(_id) {}
bool ... |
#include "HmBle.hpp"
void HmBle::readAll() {
if (bleSerial->available() > 0) {
do {
cmdSerial->write(bleSerial->read());
} while (bleSerial->available() > 0);
cmdSerial->println();
}
}
void HmBle::send(const char* cmd, bool echo) {
if (echo) {
cmdSerial->printf("> %s\r\n", cmd);
}
bleSerial->print(cmd... |
/*
pwm_module.cpp - PWM Module class implementation.
Revision 0
Features:
- Allows for the control of PWM pins.
2017/07/11, <NAME>
*/
#include "pwm_module.h"
// Static initialisations.
HardwarePWM* PwmModule::hw_pwm = 0;
uint8 PwmModule::pinNum = 0;
Timer PwmModule::timer;
uint8* PwmModule::pins = 0;... |
#include "RFController.h"
#include <Arduino.h>
RF24 RFController(7, 8);
struct RGB_BUILDER
{
void Start(){
pinMode(RGB_RED, OUTPUT);
pinMode(RGB_GREEN, OUTPUT);
WAITING();
};
void ERROR(){
digitalWrite(RGB_GREEN, LOW);
digitalWrite(RGB_RED, HIGH);
};
void OK(){
digitalWrite(RGB_GREE... |
/*
* Created by <NAME>.
* Copyright (c) <NAME> 2017 All rights reserved.
*
* This file is part of HOG2.
*
* HOG2 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
*... |
/*
* Copyright 2021 Google LLC
*
* 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 ... |
#include <iostream>
#include <vector>
#include <queue>
#include <time.h>
#include <stdlib.h>
#include <png++/png.hpp>
class Tuple {
private:
int x, y;
public:
Tuple(int x, int y) {
this->x = x;
this->y = y;
}
int getX() {
return x;
}
int getY() {
return y;
}
};
class Sandpile {
private... |
//-----------------------------------------------------------------------------
// Created on: 11 July 2017
//-----------------------------------------------------------------------------
// Copyright (c) 2017, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// mo... |
/**
* @file llfontbitmapcache.cpp
* @brief Storage for previously rendered glyphs.
*
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of ... |
//=======================================================================
// Copyright <NAME> 2013-2018.
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://www.opensource.org/licenses/MIT)
//=======================================================================
... |
// Copyright (c) 2015 <NAME> and <NAME>.
// Distributed under the MIT software license, see LICENSE
#include "controllers/map-controller.h"
#include <utility>
#include <vector>
#include "engine/game.h"
#include "ui/victory.h"
const float kTowerGraphWeight = 1000.f;
void MapController::Load(unsigned width, unsign... |
#include <bits/stdc++.h>
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ... |
/*
* Copyright (C) 2011-2016 Intel Corporation. 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 li... |
#include "NodeGraph.h"
NodeGraph::NodeGraph(Node *node) : m_headNode(node) , m_tailNode(node) {
m_VertexSet.push_back(node);
//Delete after temporary implementation
m_currentNode = node;
m_GameEnd = false;
}
NodeGraph::NodeGraph(const std::string &filename) {
m_tailNode, m_currentNode, m... |
/* Copyright (c) <2009> <Newton Game Dynamics>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* inclu... |
/*
* (C) 2009 <NAME> <<EMAIL>>
* Licensed under the GNU General Public License.
* See LICENSE for details
*/
#include "sendfileprogressdialog.h"
#include <QFileInfo>
#include <QDir>
void FileSendProgressDialog::initialise()
{
connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(error(QAb... |
/*
* Two bodies with masses m and 10*m head to each other.
* The friction force F is proportional to the velocity v and has the opposite
* sign: F = -v * f0, where f0 is a constant.
*
* After collision, the body with mass m bounces in the other direction
* (and hence the sign of the friction force instantly chang... |
/**
MIT License
Copyright (c) 2018 <NAME> and <NAME> (Unmanned Systems and Robotics Lab, University of South Carolina, USA)
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, in... |
#include "Squad.h"
#include "Historican.h"
#include "core/API.h"
#include "core/Helpers.h"
#include "core/Map.h"
Squad::Squad() {
static int globalId = 0;
m_id = globalId++;
}
void Squad::OnStep() {
// Remove dead & lost vision of squad units (NOTE: units that despawn instantly, such as hellion, do not ge... |
#include <iostream>
#include <unordered_map>
#include <vector>
#include <limits>
#include <algorithm>
#include <stack>
enum Operator
{
ADD, SUBTRACT, MULTIPLY, DIVIDE, BLANK
};
class Term
{
public:
Term() = default;
Term(double v, Operator o) : value(v), op(o) {}
double get_value()
... |
// uuid.hpp - v1.1
/*
* Copyright (c) 2007 <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 copyri... |
/**
* Copyright (C) 2016 Virgil Security Inc.
*
* Lead Maintainer: Virgil Security Inc. <<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:
*
* (1) Redistributions of sour... |
// $Id: async_server.cpp 97114 2013-05-10 09:21:14Z johnnyw $
#include "simple_test_i.h"
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_strings.h"
#include "tao/ORB_Core.h"
#include "tao/IORTable/Async_IORTable.h"
#include "tao/IORTable/IORTable.h"
#include "tao/LocalObject.h"
#include "tao/PortableServer/PortableS... |
/****************************************************************************/
// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
// Copyright (C) 2001-2020 German Aerospace Center (DLR) and others.
// This program and the accompanying materials are made available under the
// terms of the Ecli... |
//
// Created by yidafu on 2107/10/05.
//
#include <iostream>
#include "bidirectional.h"
int initList( biLinkList &bL )
{
bL.head = bL.tail = NULL;
bL.len = 0;
return 1;
}
///
/// \param bL 双向链表
/// \param pos 插入的位置,应该是在 1 到 链表末尾的数字
/// \param e 插入的值
/// \return 插入成功 true 失败 false
bool insertList ( biLink... |
#include "opencv2/core.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/features2d.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace cv;
using namespace std;
Mat src; Mat s... |
#include <wgut/Win32Window.h>
#include <wgut/wgut_d3d11.h>
#include <wgut/wgut_d2d1.h>
#include <wgut/wgut_shader.h>
#include <wgut/OrbitCamera.h>
#include <wgut/MeshBuilder.h>
#include <stdexcept>
#include <iostream>
#include <DirectXMath.h>
auto SHADER = R"(
struct VS
{
float3 position: POSITION;
... |
#include <array>
#include <chrono>
#include <cstdint>
#include <cstring>
#include <string_view>
enum Colors : uint8_t { WHITE = 0x01 };
static volatile uint8_t &memory_loc(const uint16_t loc) {
return *reinterpret_cast<volatile uint8_t *>(loc);
}
static void poke(const uint16_t loc, const uint8_t value) {
memory... |
#include "Frontend/Parser.h"
#include "gross/Graph/NodeUtils.h"
#include "gross/Graph/Reductions/CSE.h"
#include "gross/Graph/Reductions/Peephole.h"
#include "gross/Graph/Reductions/ValuePromotion.h"
#include "gross/Graph/Reductions/MemoryLegalize.h"
#include "CodeGen/PreMachineLowering.h"
#include "gross/CodeGen/Graph... |
#include<iostream>
#include<vector>
#include<array>
#include <iomanip>
#include <string>
#include <fstream>
#include"FFANN.hpp"
#ifndef LONG
#define LONG long
#endif
#define LD LONG double
using std::cout;
using std::endl;
using std::setw;
using std::setfill;
using std::vector;
using std::array;
LD linearActivati... |
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <math.h>
#include <pybind11/numpy.h>
#include <pybind11/eigen.h>
#include <vector>
#include <pcl/point_types.h>
#include <pcl/features/fpfh_omp.h>
#include <pcl/features/normal_3d_omp.h>
#include <iostream>
namespace py = pybind11;
class PCLUtilsClass ... |
#include <gtest/gtest.h>
#include "utility/helpers.h"
TEST(Helpers, Divide) {
std::vector<int> setA = {4, 2, 9, 3, 5},
setB = {9, 6, 0, 5, 1};
std::set<int> refExclusiveA = {2, 3, 4},
refExclusiveB = {0, 1, 6},
refIntersect = {5, 9};
std::vector<i... |
#pragma once
#include "LevelManager.h"
#include "Levels/Splash.h"
#include "Levels/MainMenu.h"
#include "Levels/Level.h"
#include "Levels/ExitGame.h"
#include "Levels/Loading.h"
#include "Levels/Credits.h"
#include "UI/NuklearUI.h"
static struct nk_rect _outerRect;
LevelManager::LevelManager(Context* context) :
... |
#include <gtest/gtest.h>
#include <rtw/algorithm/quick_sort.hpp>
#include <array>
#include <vector>
#include <deque>
#include <random>
class QuickSortTest : public ::testing::Test{
protected:
QuickSortTest() {}
virtual ~QuickSortTest() {}
virtual void SetUp() override {}
virtual void TearDown() overri... |
#include <bits/stdc++.h>
using namespace std;
class MinCostMaxFlow
{
private:
static const int INF = numeric_limits<int>::max();
class Edge
{
public:
int flow;
int capacity;
int cost;
int node;
int next;
Edge(int f, int cap, int cst, int _node, int ... |
//***********************************************************************************************************
/** @file task_pid.cpp
*
*
*/
//***********************************************************************************************************
#include "textqueue.h" // Header for text queue class
#includ... |
#include <iostream>
#include <vector>
#include <algorithm>
#include <stdlib.h> /* srand, rand */
#include <time.h> /* time */
#include <map>
#include <string>
#include <ctime>
#include <Windows.h>
using namespace std;
class State {
public:
int i;
int j;
unsigned char S[256];
State(int i, ... |
/* Copyright (C) 2020-2021 <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 distribut... |
#include "MapBuilder.h"
MapBuilder::MapBuilder(){
entityManager = new EntityManager();
pixelMultiplier = 16;
boundBlock = ofColor(0,0,0);
pacman = ofColor(255,255, 0);
ghostC = ofColor(25, 255,0);
dotC = ofColor(255, 10, 0);
bigDotC = ofColor(167, 0, 150);
pacmanSpriteSheet.load("images/Background.... |
#include "onvifserverthread.h"
#include "wrapper/deviceservicewrapper.h"
#include "wrapper/ptzservicewrapper.h"
#include "wrapper/eventservicewrapper.h"
#include "wrapper/mediaservicewrapper.h"
#include "wrapper/imagingservicewrapper.h"
#include "wrapper/analyticsservicewrapper.h"
#include "wrapper/deviceioservi... |
// GMsg_LoginAck.cpp -*- C++ -*-
// $Id: GMsg_LoginAck.cpp,v 1.19 1997-10-01 17:53:07-07 jason Exp $
// Copyright 1996-1997 Lyra LLC, All rights reserved.
//
// message implementation
#ifdef __GNUC__
#pragma implementation "GMsg_LoginAck.h"
#endif
#ifdef WIN32
#define STRICT
#include "unix.h"
#include <winsock2.h>
#... |
// Copyright 2014 <NAME> <<EMAIL>>
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use, copy,
// modify, merge, publish,... |
/*=========================================================================
Copyright (c) 2007, Los Alamos National Security, LLC
All rights reserved.
Copyright 2007. Los Alamos National Security, LLC.
This software was produced under U... |
//============================================================================
// Name : MINI_PROJECT.cpp
// Author : <NAME>
// Version : 1.02
// Architecture: Singleton
// Description : Hello World in C++, Ansi-style
//============================================================================
#inclu... |
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxn = (int)8e5 + 1;
int tot;
struct Node {
int lch, rch, key;
LL x, y, dx, dy;
} pool[maxn];
inline int randL() {
return RAND_MAX == 0x7FFF ? rand() << 15 | rand() : rand();
}
inline int newNode(LL x, LL y) {
pool[++tot] = (Node){0, 0, r... |
#include<cstdio>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
#include<map>
#include<set>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define fi first
#define... |
#include "thunk_params.h"
#include "code_builder.h"
#include "runtime_interface.h"
#include "thunk_type.h"
#include "typeclosure.h"
#include "eval.h"
extern type_map types_map;
extern symtab_map symtabs;
extern CodeBuilder* code_builder;
extern RTInterface rt_glue;
using namespace std;
static bool has_gen_emp... |
#include "openglwindow.hpp"
#include <imgui.h>
#include <unordered_map>
#include <fmt/core.h>
#include "abcg.hpp"
std::unordered_map<std::string, std::string> teste;
void OpenGLWindow::handleEvent(SDL_Event &event) {
// Mouse events
if (event.type == SDL_MOUSEBUTTONDOWN) {
m_stick.click = !m_stick.drag;
... |
#include <gli.h>
#include <vector>
class Platformer : public gli::App
{
static const int TileSize = 16;
enum TileFlags : uint8_t
{
CollisionTop = 0x1,
CollisionBottom = 0x2,
CollisionRight = 0x4,
CollisionLeft = 0x8,
CollisionAll = 0xF,
Ladder = 0x10,
... |
/// @file ImageFactory.cc
///
/// @copyright (c) 2011 CSIRO
/// Australia Telescope National Facility (ATNF)
/// Commonwealth Scientific and Industrial Research Organisation (CSIRO)
/// PO Box 76, Epping NSW 1710, Australia
/// <EMAIL>
///
/// This file is part of the ASKAP software distribution.
///
/// The ASKAP soft... |
#include "common.hpp"
unsigned roundToPowOf2(unsigned number) {
double logd = log(number) / log(2);
logd = floor(logd);
return (unsigned)pow(2, (int)logd);
}
unsigned long get_env_var(const char *env_var, unsigned long default_value) {
if (const char *env_p = std::getenv(env_var)) {
return atoi(env_p);
... |
//
// MainProgram.cpp
// renderEngineCpp
// https://github.com/JaapWijnen/renderEngineCpp
//
// Created by <NAME> on 22/05/2018.
// Licensed under the terms of the MIT license
//
#include "MainProgram.h"
#include <GLFW/glfw3.h>
#include <random>
#include <ctime>
#include <algorithm>
#include <io... |
// Arena.cpp
#include <iostream>
#include <deque>
#include <string>
#include <fstream>
#include <vector>
#include <algorithm>
#include "Creature.h"
#include "Arena.h"
#include "helper_functions.h"
using namespace std;
// other useful definitions
string stringOfData(deque<Food> foodList) {
if (foodList.size() =... |
#include "Model.h"
#include <assimp/Importer.hpp>
#include <assimp/postprocess.h>
#include "../logging/RK_Log.h"
#include "../render/Renderer.h"
#include "../render/buffers/Texture.h"
#include "../render/buffers/VertexArray.h"
Model::Model(std::string path, int instanceCount, rkm::Mat4* matrices) :
mInstanceCount(ins... |
/*
* Copyright 2005, <NAME>. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Inspired by SoundCapture from Be newsletter (Media Kit Basics: Consumers
* and Producers)
*/
#include <stdio.h>
#include "VolumeSlider.h"
#include "icon_button.h"
#define VOLUME_CHANGED 'vlcg'
#define RATIO ... |
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <stdlib.h>
#include <vector>
#include <bits/stdc++.h>
#include <algorithm>
#include "Kruskal.h"
vector<vector<int> > union_find_algorithm(vector<vector<int> > v_multi_edges, int vertices){
int edge_counter = 0;
vector<vector<i... |
#include <assembly_dual_controllers/servers/joint_limit_avoidance_action_server.h>
JointLimitAvoidanceActionServer::JointLimitAvoidanceActionServer(std::string name, ros::NodeHandle &nh,
std::map<std::string, std::shared_ptr<FrankaModelUpdater> > &mu)
: ActionServerBase(name,nh,mu),
as... |
#include "submap.h"
SubMap::SubMap()
{
mapViewPort = {0,0,100,100};
dot_rect1 = {0,0,5,5};
dot_rect2 = {0,0,5,5};
dot_rect3 = {0,0,5,5};
dot_rect4 = {0,0,5,5};
gray_r = 128;
gray_g = 128;
gray_b = 128;
}
SubMap::~SubMap()
{
}
void SubMap::initParametersFromLabyrinth(L... |
//////////////////////////////////////////////////////////////////////////////
// NOTICE:
//
// ADLib, Prop and their related set of tools and documentation are in the
// public domain. The author(s) of this software reserve no copyrights on
// the source code and any code generated using the tools. You are encourag... |
#include <ntifs.h>
#include "..\inc\LogInput.h"
#define CanBePtr(v) (0x10000 < v && v < (MmUserProbeAddress - 0x10000))
void LogInVal(Log* log, ULONG argIdx, ULONG arg, ArgType* typ) {
if (typ == NULL) {
DbgPrint("[ERROR] Invalid input to LogInVal\n");
return;
}
switch (typ->typeKind) {
case FUNCPTR... |
#include <iostream>
#include <iomanip>
#include <string>
#include <pcrecpp.h>
#include "net/net.h"
extern "C" {
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <netinet/if_ether.h>
}
static inline std::string ipv4addressToString(const void * src) {
char ip[I... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.