text stringlengths 3.08k 12.5k |
|---|
#include "main.hpp"
#include "options.hpp"
#include <cstdint> // for UINT32_MAX
void appvk::createSurface() {
// platform-agnostic version of vulkan create surface extension
if (glfwCreateWindowSurface(instance, w, nullptr, &surf) != VK_SUCCESS) {
throw std::runtime_error("cannot create window surfac... |
#include "dns.h"
DNS::DNS()
{
std::cout << "DNS Server: " << DNS_SERVER << "\n\n";
}
void DNS::get(std::string url)
{
build_message(url);
std::streamsize resp_sz = send_dns_request();
auto dns_response_header = reinterpret_cast<DNS_header*>(msg_buffer);
auto qname = &msg_buffer[sizeof(DNS_header)];
std:... |
/*This file is part of the FEBio Studio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio-Studio.txt for details.
Copyright (c) 2021 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any pers... |
/***********************************************************************************************************************
* *
* ANTIKERNEL v0.1 ... |
/* LibMemcached
* Copyright (C) 2006-2009 <NAME>
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
* the COPYING file in the parent directory for full text.
*
* Summary:
*
*/
#include <config.h>
#include <clients/utilities.h>
#include <cstdio>
#include <cassert>
#include <c... |
#include "kino_plan/bvp_solver.h"
#include "visualization_utils/visualization_utils.h"
#include "quadrotor_msgs/PositionCommand.h"
#include <ros/ros.h>
#include <Eigen/Eigen>
class BVPTest
{
public:
BVPTest(const ros::NodeHandle &nh): nh_(nh)
{
nh.param("test/start_px", start_state_[0], 0.0);
nh.param("tes... |
#include <ggwave.h>
#include <unistd.h>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <climits>
#include <vector>
#include <cmath>
#include "dsp.h"
#include "ringbuffer.hpp"
const int SAMPLE_RATE = 48000;
typedef enum {
IQ_SAMPLE_FORMAT_S8,
IQ_SAMPLE_FORMAT_F32,
} IQSampleFormat;
void usag... |
#include <fstream>
#include <iostream>
#include <sstream>
#include <string.h>
#include <vector>
#include <vapor/CFuncs.h>
#include <vapor/FileUtils.h>
#include <vapor/OptionParser.h>
#include <vapor/WASP.h>
using namespace Wasp;
using namespace VAPoR;
struct opt_t {
vector<string> dimnames;
vector<int> dimle... |
/*
* @Author: gongluck
* @Date: 2020-11-02 23:12:00
* @Last Modified by: gongluck
* @Last Modified time: 2020-11-02 23:12:00
*/
#include "aac.h"
#include <iomanip>
uint16_t get_syncword(const ADTS &adts)
{
return adts.syncwordH << 8 | adts.syncwordL;
}
void set_syncword(ADTS &adts, uint16_t syncword)
{
... |
#include "../Component/Render.h"
#include "../Component/Memory.h"
#include <thread>
#include <chrono>
#define MAX_WIDTH 256
#define MAX_HEIGHT 256
#define VIEW_WIDTH 160
#define VIEW_HEIGHT 144
#define RENDER_SDL_ 1
Render::Render(Memory* m){
mem = m;
data = (uint8_t*) malloc(256 * 256 * 2 / 8); // 256 x 256 screen... |
#include <nan.h>
#include <cstdint>
#include <cstddef>
///// Min compiler support and bswap intrins used in scalar region
#if defined(__GNUC__) // GCC, clang
# ifdef __clang__
# if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
# error("Requires clang >= 3.4")
# endif
# else
# if __GNUC__ < ... |
#include <NEAT/NEAT.h>
#include <cmath>
#include <cassert>
#include <cstring>
#include <iostream>
#include <sstream>
#include <fstream>
#include <filesystem>
#if __cplusplus < 201703L
namespace fs = std::experimental::filesystem;
#else
namespace fs = std::filesystem;
#endif
class XorNEAT : public NEAT
{
public:
... |
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <opencv2/opencv.hpp>
using std::cout;
using std::endl;
int window_width = 640;
int window_height = 480;
// Function turn a cv::Mat into a texture, and return the texture ID as a GLuint for use
static... |
/* +------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| https://www.mrpt.org/ |
| |
| Cop... |
/**
* Copyright (C) 2020, <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:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list o... |
#include "ros/ros.h"
#include "std_msgs/String.h"
#include <iostream>
#include <ctype.h>
#include <unistd.h>
#include "geometry_msgs/PoseStamped.h"
char robot1[10];
ros::Publisher ctrl_pub;
void number_callback(const std_msgs::String::ConstPtr& msg);
void qrread_callback(const std_msgs::String::ConstPtr& msg);
void ro... |
#include <frovedis.hpp>
#include <frovedis/matrix/rowmajor_matrix.hpp>
#include <frovedis/matrix/colmajor_matrix.hpp>
#include <frovedis/matrix/crs_matrix.hpp>
#include <frovedis/matrix/matrix_operations.hpp>
#define TYPE double
using namespace frovedis;
template <class T>
void show(const std::string& msg, const T& ... |
//
// Created by <NAME> on 8/21/16.
//
#include <random>
#include <thread>
#include <iostream>
#include "KCIPT.h"
#include "mmd.h"
#include "permutation.h"
#include <valarray>
#include <condition_variable>
#include <functional>
using std::thread;
using std::vector;
using std::valarray;
using std::mt19937;
class Barr... |
#include <Geometry/CommonTopologies/interface/CSCRadialStripTopology.h>
#include <FWCore/MessageLogger/interface/MessageLogger.h>
#include <cmath>
#include <algorithm>
CSCRadialStripTopology::CSCRadialStripTopology(int ns, float aw, float dh, float r, float yAx, float yMid)
: theNumberOfStrips(ns),
theAngul... |
#include "hh_report.h"
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cmath>
#include "util/time_util.h"
#define OUT_PADDED(stream, field_size, str) \
std::cout.fill(' '); \
if (field_size) stream << std::setw(field_size) << ' '; \
stream << str;
bool is_suspicious_process(pe... |
// Copyright (c) 2018, The LibertyChain Project
//
// 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 ... |
#include <cstdlib>
#include <ctime>
#include <string.h>
#include <boost/thread.hpp>
#include <3rdparty/zookeeper/ZooKeeper.hpp>
#include <3rdparty/zookeeper/ZooKeeperWatcher.hpp>
#include <3rdparty/zookeeper/ZooKeeperEvent.hpp>
#include <3rdparty/zookeeper/DoubleBarrier.h>
#include <3rdparty/zookeeper/CyclicBarrier.h... |
#include "asm.hpp"
#include "parser.hpp"
map<string, int> symMap {};
void pass1(char *inFile) {
printf("============= PASS1 ================\n");
char line[100]="";
FILE *fp = fopen(inFile, "r");
pc = 0;
while (fgets(line, sizeof(line), fp)) {
int size = parse(line);
if (*label) {
printf("symM... |
// =============================================================================
// Copyright 2017 National Technology & Engineering Solutions of Sandia, LLC
// (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
// Government retains certain rights in this software.
//
// Permission is hereby grante... |
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
struct Node {
ll sum;
int sz, col;
Node() {}
Node(ll _sum, int _sz, int _col) : sum(_sum), sz(_sz), col(_col) {}
};
template <typename D>
struct SegLazy {
using M = Node;
using Op = function<M(const M&, const M&)>;
using D2M... |
#include <net/ipv4.h>
#include <utils/log.h>
using namespace net;
ipv4_handler::ipv4_handler(ipv4_provider* backend, uint8_t protocol) {
this->protocol = protocol;
this->backend = backend;
backend->handlers.add(this);
}
ipv4_handler::~ipv4_handler() {
this->backend->handlers.remove(this->backend->handlers.find<... |
/*
* Copyright (c) 2021 Samsung Electronics Co., Ltd. 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
*
* Unle... |
#include <crimson.h>
#include <imgui.h>
#include "utils/tinyfiledialogs.h"
#include "panel.h"
#include "hierarchy.h"
#include "viewport.h"
#include "editor.h"
#include "console.h"
namespace Crimson {
void Editor::Save() {
if (m_isRunning) {
Log(LogType::WARNING, "Failed to save scene in play mode: Possible loss... |
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/virtualization/bin/vmm/guest.h"
#include <fcntl.h>
#include <lib/syslog/cpp/macros.h>
#include <zircon/status.h>
#include <zircon/syscalls/h... |
// Problem: https://www.geeksforgeeks.org/find-rotation-count-rotated-sorted-array/
// Ref: https://www.youtube.com/watch?v=4WmTRFZilj8&list=PL_z_8CaSLPWeYfhtuKHj-9MpYb6XQJ_f2&index=7
// https://www.techiedelight.com/find-number-rotations-circularly-sorted-array/
// https://youtu.be/4qjprDkJrjY
// THIS PROBL... |
// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences
// and <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 obta... |
/*
* BSD 2-Clause License
*
* Copyright (c) 2021, <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:
*
* 1. Redistributions of source code must retain the above copyright notice, this... |
#include "external/tinyfiledialogs.h"
#include "FunctionAPI/Graph.hh"
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <TGUI/TGUI.hpp>
#define NANOSVG_IMPLEMENTATION
#define NANOSVGRAST_IMPLEMENTATION
#include "external/nanosvg.h"
#include "external/nanosvgrast.h"
#include <vector>
#include <string>
... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
#include "CompMesh.h"
#include "GeoMesh.h"
#include "MathStatement.h"
#include "GeoElement.h"
#include "CompElement.h"
#include "CompE... |
/*
Copyright (c) 2020, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the followin... |
//
// VROPhysicsShape.m
// ViroRenderer
//
// Copyright © 2017 <NAME>. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// with... |
//
// Simon.cpp
// MesaDelTiempo for http://web.museodeljuguetesi.org.ar/
//
// Created by <NAME> on 4/1/12.
// Copyright (c) 2012 http://PatricioGonzalezVivo.com All rights reserved.
//
#include "Simon.h"
Simon::Simon(){
width = 800*1.625;
height = 600*1.625;
trackMode = TRACK_JUST_OBJECT;
nUser... |
/*
* Copyright 2011 (C) <NAME>
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYR... |
/**
* MIT License
*
* Copyright(c) 2021
*
* 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, d... |
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define ll long long int
#define ld long double
#define vi vector<int>
#define vll vector<long long int>
#define fi first
#define se second
#define sc(n) scanf("%d",&n);
#define scll(n) ... |
#include "ik_controller.h"
#include "atkui/framework.h"
#include <cmath>
#include <iostream>
using namespace atk;
using namespace glm;
bool IKController::solveIKAnalytic(Skeleton& skeleton,
int jointid, const vec3& goalPos, float epsilon) {
if (jointid == -1) return true;
Joint* ankle = skeleton.getByID(joi... |
#include <v4r/io/filesystem.h>
#include <boost/algorithm/string.hpp>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <opencv2/opencv.hpp>
#include <sstream>
#include <string>
void printUsage(int argc, char **argv);
void printUsage(int argc, char **argv) {
(void)argc;
std::cout <<... |
/*
INFORMATICA 12 CFU – Modulo di Programmazione
(ING. INFORMATICA)
Prof. <NAME>
APPELLO DEL 24/02/2017
Si consideri un programma per gestire la raccolta delle informazioni relative ad un listino prezzi di
prodotti da vendere, organizzato in una lista dinamica. Un prodotto è definito da un tipo strutturato
deno... |
#include "parser.hpp"
// 出現した命題変数の集合, CNF, 中身を表す変数名, 文字の読み込み位置
using result_t = std::tuple<std::set<Proposition>, std::vector<Clause>, std::string, int>;
// ユーティリティ
std::string getTmpName(){
static int i = 0;
return "_" + std::to_string(i++);
}
bool isAlphaNum(char c){
return ('a' <= c && c <= 'z')
|| ('A' <= c... |
// Copyright 2020 The Clspv 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 app... |
#include <iostream>
#include <cmath>
#include <GL/glut.h>
#ifndef CALLBACK
#define CALLBACK
#endif
using namespace std;
const double PI = 4 * atan(1);
double xang = 0;
double yang = 0;
int width = 500;
int height = 500;
GLfloat ctlpoints[5][7][3];
int showPoints = 0;
double time = 0;
GLUnurbsOb... |
#include "power_router.h"
#include "wandrr.h"
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <ifaddrs.h>
#include <cstdio>
#include "../../firmware/power_router/common/state.h"
using namespace wandrr;
PowerRouter::PowerRouter(const char *iface)
{
printf("power router starting initializati... |
#include <stdint.h>
#include <cerrno>
#include <cstdlib>
#include <cstdio>
#include <cstddef>
#include <cstring>
#include <map>
#include <string>
#include <vector>
#include <libiqo/iqo.hpp>
namespace {
std::map<std::string, std::string> getArgs(int argc, char * argv[])
{
std::map<std::string, std::st... |
#define DS_RAW_EXTENT_PTR_DEPRECATED /* allow */
#include <iostream>
#include <Lintel/MersenneTwisterRandom.hpp>
#include <Lintel/TestUtil.hpp>
#include <DataSeries/Extent.hpp>
#include <DataSeries/SequenceModule.hpp>
using namespace std;
using namespace boost;
namespace dataseries { namespace hack {
Extent... |
//
// Created by sakost on 01.06.2020.
//
#include "Algorithms.h"
#include <cmath>
QVector<QSet<uint_fast64_t> > Algorithms::Magoo(const Graph *graph, QTextBrowser *output) {
// does not work todo fix
if(graph->empty()){
output->append("Graph is empty. Exiting...");
return QVector< QSet< uint_... |
#include "FusionEKF.h"
#include "tools.h"
#include "Eigen/Dense"
#include <iostream>
using namespace std;
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::vector;
/*
* Constructor.
*/
FusionEKF::FusionEKF() {
is_initialized_ = false;
previous_timestamp_ = 0;
// initializing matrices
R_laser_ = Mat... |
#include<stdio.h>
#include<graphics.h>
#include<math.h>
#include<stdlib.h>
int origin[2][1000],h,w;
int plotLineWRTOrigin(int res, int axis)
{
//This function plots the line on the screen
float h = (float)getwindowheight();
float w = (float)getwindowwidth();
int i;
for(i=0;i<=res;i++)
{
... |
// Copyright (c) 2022 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... |
///////////////////////////////////////////////////////////////////////////////
// File: EcalEndcapNumberingScheme.cc
// Description: Numbering scheme for endcap electromagnetic calorimeter
///////////////////////////////////////////////////////////////////////////////
#include "Geometry/EcalCommonData/interface/EcalEn... |
#include "HeatmapProject.h"
#include <algorithm>
#include "gl_core_4_4.h"
#include "GLFW/glfw3.h"
#include "Gizmos.h"
bool HeatmapProject::startup()
{
if (Application::startup() == false)
{
return false;
}
glClearColor(0.3f, 0.3f, 0.3f, 1.0f);
glEnable(GL_DEPTH_TEST);
Gizmos::create()... |
#include "Sp_sampler.h"
#include "Rand_gen.h"
#include <iostream>
#define UNVISITED 0
#define VISITED_U 1
#define VISITED_V 2
using namespace std;
// Instantiates an object, that samples from the graph g.
// INPUT: g (a graphs), seed (the seed for the random sampler).
Sp_sampler::Sp_sampler( const Graph *g, const ui... |
#include "yololistwidget.h"
#include "GUI/YoloWidget/itemcreator.h"
#include "GUI/YoloWidget/yolowidgetitem.h"
#include "imagegenerator.h"
#include "Project/Analysis/analysis.h"
#include "Project/Analysis/analysisproxy.h"
#include "Project/Analysis/poi.h"
#include "Project/project.h"
#include "Project/videoproject.h"
... |
#include "sguieventsink.h"
/*
* AK_EMPTY = 0,
AK_ESC,
AK_F1, AK_F2, AK_F3, AK_F4, AK_F5, AK_F6, AK_F7, AK_F8, AK_F9, AK_F10, AK_F11, AK_F12,
AK_1, AK_2, AK_3, AK_4, AK_5, AK_6, AK_7, AK_8, AK_9, AK_0,
AK_MINUS, AK_PLUS, AK_TILDE, AK_BACKSPACE,
AK_TAB, AK_CAPS, AK_LSHIFT, AK_RSHIFT, AK_LCTRL, AK_R... |
#include "EditorCamera.h"
#include <glm/gtc/matrix_transform.hpp>
#include <Core/Input.h>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/quaternion.hpp>
#include "Settings.h"
using namespace HarmonyEditor;
const char* EditorCamera::InputStyleFields[] = { "Default", "Reversed", "Modern" };
const uint32_t Editor... |
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <algorithm>
#include <set>
#include <opencv2/opencv.hpp>
#include <chrono>
using namespace cv;
using namespace std;
const int imgsize=1024;
const string sample_img="nms_cpu.jpg";
const string boxfile="./boxes.txt";//x1, y1, x2, y2, s... |
// This file can be saved as a ".ino" file and compiled in the Arduino IDE
#include <Arduino.h>
#include <Wire.h>
#include <WString.h>
#define SLAVE_ADDRESS 0x27
#define LED_RED 0x0
#define LED_YELLOW 0x1
#define LED_GREEN 0x2
#define GEIGER_A 0x20
#define GEIGER_B 0x21
#define GEIGER_C 0x22
#define GEIGER_D 0x23
#def... |
/*-*- tab-width:3; indent-tabs-mode:nil; c-file-style:"ellemtel"; c-file-offsets:((innamespace . 0)(inclass . ++)) -*-*/
/*******************************************************************************
FILE : test_mkjournfile.cpp
COPYRIGHT : <NAME>, 2008-2020. All rights reserved.
See... |
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include <QDebug>
#include <QWidget>
#include <QKeyEvent>
#include <QImage>
#include <QPainter>
#include <QFileDialog>
#include "CanvasView.h"
#include "model/Blueprint.h"
#include "model/Page.h"
#include "model/Canvas.h"
#include "model/Shape.h"
#include "model/Bezi... |
/*******************************************************************************
* Copyright (c) 2007, 2008, CerroKai Development
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistribu... |
/*! \file */
/* ************************************************************************
* Copyright (c) 2021 Advanced Micro Devices, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Softwa... |
/*****************************************************************************/
/* Copyright (C) 2013 OSS Nokalva, Inc. All rights reserved. */
/*****************************************************************************/
/* THIS FILE IS PROPRIETARY MATERIAL OF OSS NOKALVA, INC. */
... |
//
// StarTouch.cpp
// StarEngine
//
// Created by <NAME> on 8/25/12.
// Copyright (c) 2012 SungLab. All rights reserved.
//
#include "StarTouch.h"
//StarTouch::StarTouch(StarTouchDelegate* _delegate,bool TUIO)
StarTouch::StarTouch(StarTouchDelegate* _delegate,Vec2 rect, bool TUIO)
{
delegate = _delega... |
/*
* Copyright 2002-2014 the original author or 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
*
* CC/LICENSE
*
* Unless required by applicable law or agreed to in wri... |
#include "dd3d.h"
#include <uuid/uuid.h>
#include "log.h"
#include "utils.h"
bool utils_bin2hex(uint8_t *src, uint32_t src_size, char* dst, uint32_t dst_size) {
bool rv = false;
if (src_size * 2 < dst_size) {
const char* char_map = "0123456789ABCDEF";
for (uint32_t i = 0; i < src_size; ++i) {
dst[2 * i] = ch... |
#include "ui/device_info_window.h"
#include "main.h"
#include "ui/run_ui.h"
#include <sstream>
DeviceInfoWindow::DeviceInfoWindow(
WindowRegistry* registry,
const Mutex<ControlTableMap>* control_table_map) :
registry(registry),
control_table_map(control_table_map),
handle(WINDOW_CreateUser(
... |
//#pragma hdrstop
#include <windows.h>
#include <iostream>
#include <fstream>
#include <string>
#include <tchar.h>
#include <iomanip>
#if defined(__CODEGEARC__)
#include <dir.h>
#else
#include <direct.h>
#endif
#include "rrUtils.h"
#include "rrStringUtils.h"
#include "GetOptions.h"
#include "Args.h"
#include "rr_c_api... |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0... |
// TO RUN: g++ -o CPU-Scheduling CPU-Scheduling.cpp && ./CPU-Scheduling
//Test Case:
//RoundRobin 2 get_array A 3 0 B 4 7 C 9 0 D 0 2 E 7 6 exit calculate show exit
#include<iostream>
#include<cstring>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
class Process
{
public:
char pr... |
#include <Arduino.h>
#include <SPI.h>
#include <ArduinoHttpClient.h>
#include <WiFi101.h>
#include <Wire.h>
#include <MPU6050.h>
#include <QueueArray.h>
#include <network_conf.h>
#include <MPU6050_util.h>
// Initialize the Wifi client library
String response;
int statusCode = 0;
const int led = LED_BUILTIN; // the p... |
#include "meanValueCoordinates.h"
#include "_external/JM/point3.h"
#include "_external/JM/MVCoordinates3D.h"
MeanValueCoordinates::MeanValueCoordinates()
{
}
MeanValueCoordinates::MeanValueCoordinates(Weights * _w,
Character * _character,
... |
#include "Console.hpp"
#include <SFML/Graphics/Text.hpp>
#include <SFML/Graphics/RenderTarget.hpp>
#include <cmath> // floor
#include <algorithm> // for_each
#include <iostream>
Console::Console(int width, int height, const sf::Font& font, int fontSize)
: font(font)
, texture(font.getTexture(fontSize))
... |
/******************************************************************************
** Copyright (c) 2015, Intel Corporation **
** All rights reserved. **
** **
... |
/****************************************************************************
* Copyright (c) 2016 - 2017, University of California, Berkeley. *
* *
* Author(s): <NAME>, EECS Department, UC Berkeley. *
* <NAME>, EE Department, USC. *
* *
* This file ... |
/*
* Copyright 2009, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include "LineNumberProgram.h"
#include <algorithm>
#include <stdio.h>
#include <string.h>
#include "Dwarf.h"
#include "Tracing.h"
static const uint8 kLineNumberStandardOpcodeOperands[]
= { 0, 1, 1, 1, 1, 0, 0, 0, 1, 0,... |
//--------------------------------------------------------------------
//
// DataCube.cpp
//
// Created on: Feb 1, 2018
// Author: Max
//
//--------------------------------------------------------------------
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <fstream... |
/*
Copyright (c) 2011 <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, distribute... |
#include<iostream>
#include<cstdlib>
#include<vector>
#include<cstring>
#include<cassert>
#include<string>
class Matrix {
protected:
size_t row_count,
column_count;
class Matrix_row {
double *arr;
size_t len;
public:
Matrix_ro... |
#include "MultiCubeMesh.h"
#include <glm\glm.hpp>
#include <vector>
using namespace std;
using namespace glm;
void MultiCubeMesh::init(uint N) {
// 6 caras de 4 vertices cada una
vector<float> vert;
vector<float> norm;
vector<float> tex;
// 6 caras de 2 triangulos cada una
vector<uint> ind;
vert.reserve(N * 6 ... |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This is implementation of a clang tool that rewrites raw pointer fields into
// CheckedPtr<T>:
// Pointee* field_
// becomes:
// CheckedPtr<Poi... |
#include <Poco/Exception.h>
#include <Poco/Glob.h>
#include <Poco/Logger.h>
#include <Poco/Net/StreamSocket.h>
#include <Poco/SharedPtr.h>
#include <Poco/StreamCopier.h>
#include <Poco/URI.h>
#include "net/AbstractHTTPScanner.h"
#include "net/HTTPUtil.h"
using namespace BeeeOn;
using namespace Poco;
using namespace P... |
#include "THitMap.h"
#include <iomanip>
#include <iostream>
// ROOT includes
#include "Rtypes.h"
#include "TStyle.h"
#include "TROOT.h" // useful for global ROOT pointers (such as gPad)
#include "TCanvas.h"
#include "TH2F.h"
#include "RtypesCore.h"
using namespace std;
const float THitMap::fXMinDummy = -0.5;
const ... |
#include <iostream>
#define GL_GLEXT_PROTOTYPES 1
#define GL3_PROTOTYPES 1
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtx/io.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/string_cast.hpp>
#include <... |
// 2006-11-25 <NAME> <<EMAIL>>
// Copyright (C) 2006-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 by the
// Free Software Foundation... |
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
#include <tf/transform_listener.h>
#include <nav_msgs/Odometry.h>
#include <sensor_msgs/JointState.h>
class kobayahsi_maru_simulation_node
{
public:
kobayahsi_maru_simulation_node();
~kobayahsi_maru_simulation_node(){}
void spin();
private:
voi... |
/*
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later ve... |
/*
Copyright 2021 <NAME> (<EMAIL>)
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 <cmath>
#include "Mesh.h"
Mesh::Mesh(surface s, float alpha, float beta, float time, int lod)
: s(s), alpha(alpha), beta(beta), time(time), lod(lod)
{
Mesh::first_update = false;
Mesh::saved_buffer = INT16_MAX;
isConic = false;
if(s > SEPARATOR)
isConic = true;
Mesh::model_transf... |
#include <fstream>
#include <iostream>
#include <sstream>
#include <cmath>
#include "str_util.h"
#include "infer.h"
#include <boost/algorithm/string.hpp>
#include "str_util.h"
using namespace str_util;
Infer::Infer(const string & type, const Pvec<double> & pz, const Pmat<double> & pw_z, int K) :
typ... |
#include "astc/compress_block.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include "astc/colors.h"
#include "astc/constants.h"
#include "astc/data_size.h"
#include "astc/endpoints.h"
#include "astc/endpoints_encode.h"
#include "astc/endpoints_min_max.h"
#include "astc/endpoints_principal_components.... |
#include "par2outinfo.h"
#include <QString>
#include "settings.h"
#include "mainwindow.h"
#include "clientinfo.h"
#include <cmath>
static int strLen(const QString& s)
{
const auto charset = Settings::getInstance().charset();
if(charset == "latin1" || charset == "ascii")
return s.toLatin1().length();
... |
#include <iostream>
#include <glow/glbase.h>
#include <glow/glutil.h>
#include <glow/GlBuffer.h>
#include <glow/GlFramebuffer.h>
#include <glow/GlProgram.h>
#include <glow/GlVertexArray.h>
#include <glow/ScopedBinder.h>
#include <algorithm>
#include <random>
#include <vector>
#include <opencv2/opencv.hpp>
#include <g... |
#include "ResourceQueueTest.h"
#include "common/DummyWorkUnit.h"
#include "core/ResourceQueue.h"
TEST_F(ResourceQueueTest, testEmpty) {
ResourceQueue q(1);
EXPECT_TRUE(q.empty());
DummyWorkUnit* dummy = new DummyWorkUnit;
q.push(dummy);
EXPECT_TRUE(!q.empty());
q.pop();
EXPECT_TRUE(q.empty());
delete d... |
#include "util.h"
/*!The logic of Fresnel class is to perform fresnel integral once over wide interval,
*and then to do 1-D interpolation to get further values of the integral.
*Fresnel integral is symmetric
*/
fresnelInt::fresnelInt()
{
EPSLON = 6.e-10;
MAXIT = 500;
FPMIN = 1.e-50;
XMIN = 1.5;
DELTAX... |
// src/wav-seperate.cc
// wujian@2018
// Copyright 2018 <NAME>
// See ../../COPYING for clarification regarding multiple 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
//
// h... |
#include "StatusEffects.h"
#include <sstream>
#include <fstream>
#include <cstring>
#include <iostream>
std::vector<std::string> aspectNum;
GlobalStatusEffects globalStatusEffects;
// Item Aspect: Regenerating Ammo, Runs once a second, Run it on a critter's hands once every 60 frames, checking for that aspect, inc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.