text stringlengths 3.08k 12.5k |
|---|
#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <sys/epoll.h>
#include <fcntl.h>
#include <cstring>
#include <cassert>
#include"lst_timer.h"
using namespace std;
#define FD_LIMIT 65535
#define MAX_EVENT_NUMBER 1024
#define TIMESLOT 5
static int pipefd[2];
static sort_timer_lst timer_lst;
static ... |
#include "linux_parser.h"
#include <dirent.h>
#include <unistd.h>
#include <iostream>
#include <string>
#include <vector>
std::string LinuxParser::OperatingSystem() {
std::string line;
std::string key;
std::string value;
std::ifstream filestream(kOSPath);
if (filestream.is_open()) {
while (getline(file... |
#include "../include/Scene.hh"
#include "../include/Size.hh"
#include "../include/Matrix3D.hh"
void Scene::NewObject(
const Vector3D startCorner,
const Vector3D sizeTab,
const int objectIndex
) {
Vector3D objectTab[CUBE];
Matrix3D matrixDef, matrixShadow;
Vec.push_back(... |
/*
Copyright (c) 2020, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with certain software (including
but n... |
//Language: GNU C++
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <cstdarg>
#include <cassert>
#include <algorithm>
#include <vector>
#include <string>
#include <deque>
using namespace std;
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define pb push_back
#d... |
/*
Copyright (C) 2017, 2018 <NAME>
Permission to use, copy, modify, and 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.
*/
#include <common/c++/new.h>
#include <AudioCodec.h>
#include <errno.... |
// Copyright 2017 stufisher
#include "ir_Trotec.h"
#include <algorithm>
#include "IRremoteESP8266.h"
#include "IRutils.h"
// Constants
const uint16_t kTrotecHdrMark = 5952;
const uint16_t kTrotecHdrSpace = 7364;
const uint16_t kTrotecOneMark = 592;
const uint16_t kTrotecOneSpace = 1560;
const uint16_t kTrotecZeroMark... |
/*
// Copyright (c) 2018 Intel Corporation
//
// 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... |
/*! \file auto_boxplot.cpp
\brief An example to demonstrate boxplot settings, including auto-scaling.
\details See also:
example @c auto_1d_containers.cpp for an example autoscaling with multiple data-series.
example @c demo_boxplot.cpp for a wider range of use.
// Copyright <NAME> 2007
// Copyright <... |
/* Copyright (c) 2011 <NAME> <<EMAIL>>
* All rights reserved.
* $Id$
*/
#include <QPainter>
#include <QPainterPath>
#include <QApplication>
#include <QScrollArea>
#include <QScrollBar>
#include <QClipboard>
#include <QtCore/QtAlgorithms>
#include "picturewidget.h"
#include <qmath.h>
PictureWidget::PictureWidget(... |
/*
54. Spiral Matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.
Example 1:
Input:
[
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
Output: [1,2,3,6,9,8,7,4,5]
Example 2:
Input:
[
[1, 2, 3, 4],
[5, 6, 7, 8],
[9,10,11,12]
]
Output: [1,2,3,4,8,12,11,10,9,... |
#include "accelerometer_handler.h"
#include "mbed.h"
#include "fsl_port.h"
#include "fsl_gpio.h"
#define UINT14_MAX 16383
// FXOS8700CQ I2C address
#define FXOS8700CQ_SLAVE_ADDR0 (0x1E<<1) // with pins SA0=0, SA1=0
#define FXOS8700CQ_SLAVE_ADDR1 (0x1D<<1) // with pins SA0=1, SA1=0
#define FXOS8700CQ_SLAVE_ADDR2... |
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <random>
#include "SmallestEnclosingCircle.hpp"
using std::size_t;
using std::vector;
using std::max;
using std::min;
/*---- Members of struct Point ----*/
Point_Enclose Point_Enclose::subtract(const Point_Enclose &p) const {
return Point_Enclose{... |
/*
* window_PER.cc
*
* Created on: 03/07/2017
* Author: Ismael
*/
#include "window_PER.hh"
/* ClosestBond
*
* Computes and returns the closest bond to a given edge.
*
*/
Edge *ClosestBond( Complex *Chemical,
Edge *BoundaryE)
{
double MinDist = 1000.;
double ECoords[DIM_SMA];
BoundaryE->Ge... |
#include "pathsolver.h"
#include <stdlib.h>
#include <time.h>
#include <QDebug>
PathSolver::PathSolver(Snake &snake): BaseSolver(snake), snake(snake), map(snake.map)
{
// qDebug() << "PathSolver::constructor" << snake.map.num_rows;
srand(time(NULL));
this->table = QVector<QVector<TableCell>>(snake.map.num... |
#include "color_cube.h"
color_cube::color_cube(std::shared_ptr<camera> camera) : object(camera) {
using glm::vec3;
vec3 verts[24] = {
//Front
vec3(-1.0f, 1.0f, 1.0f), //ltf
vec3(1.0f, 1.0f, 1.0f), //rtf
vec3(1.0f, -1.0f, 1.0f), //rbf
vec3(-1.0f, -1.0f, 1.0f), //lb... |
// MIT License
// Copyright (c) 2019 kosay
// 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, pu... |
// Copyright 2018 Google LLC
// Copyright 2018-present Open Networking Foundation
// Copyright(c) 2021 Intel Corporation.
// SPDX-License-Identifier: Apache-2.0
#include <absl/strings/str_split.h>
#include <gflags/gflags.h>
#include "p4_service.h"
#include "config_monitoring_service.h"
#include "p4_service_interface.... |
#include <unistd.h>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include <array>
#include <cstdint>
#include <cstdio>
#include <ctime>
static const int MAIN_pin_reset = 18;
static const int MAIN_pin_interrupt = 8;
static const int MAIN_nbr_dev = 2;
static const std::array <int, MAI... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
#undef NDEBUG
#include <cassert>
#include <cstdio>
#include <string>
#include "glm/glm.hpp"
#include "geometry.h"
const struct { intersect_2d key; const char *name; } map[] = {
{ intersect_2d::none, "none" },
{ intersect_2d::inner, "inner" },
{ intersect_2d::north, "... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Lab_1.h"
#include "CleverAIController.h"
ACleverAIController::ACleverAIController()
{
bDeliveringOrder = false;
CurrentOrderNumber = -1;
PendingOrderNumber = -1;
MasterDecisionTimer = 0.0f;
}
float ACleverAIContr... |
// SPDX-License-Identifier: MIT
// Copyright (c) 2021 ETH Zurich, <NAME>
#include <iostream>
#include <string>
#include <boost/program_options.hpp>
namespace po = boost::program_options;
#include <filesystem>
#include <numeric>
#include <zisa/grid/grid.hpp>
#include <zisa/io/hdf5_serial_writer.hpp>
#include <zisa/ma... |
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>; using vvi = vector<vi>;
using ii = pair<int,int>; using vii = vector<ii>;
using l = long long; using vl = vector<l>; using vvl = vector<vl>;
using ll = pair<l,l>; using vll = vector<ll>; using vvll = vector<vll>;
using lu = unsigned long long;
usin... |
#include <ros/ros.h>
#include <pr2_algorithms/folding_assembly/folding_assembly_estimator.hpp>
#include <pr2_algorithms/TestBedFoldingFeedback.h>
#include <cstdlib>
#include <random>
using namespace manipulation_algorithms;
Eigen::Matrix3d skew(const Eigen::Vector3d &v)
{
Eigen::Matrix3d ret;
ret << 0, -v(2), v(... |
#include "zswcpositionadjuster.h"
#include "zvoxelarray.h"
#include "swctreenode.h"
#include "c_stack.h"
#include "tz_math.h"
#include "zstackgraph.h"
#include "neutubeconfig.h"
ZSwcPositionAdjuster::ZSwcPositionAdjuster() :
m_signal(NULL), m_mask(NULL), m_workspace(NULL),
m_background(NeuTube::IMAGE_BACKGROUND_DA... |
/*
* MIT License
*
* Copyright (c) 2018 <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, m... |
#include "Triangulation.h"
#pragma warning(disable:4267) // size_t->int
using namespace k3d;
int Triangulation(
MFnMesh &mfnMesh,
MIntArray &triangleCount, MIntArray &triangleList, MIntArray &triangleNList, MIntArray &triangleUVList,
MIntArray &vertexCount, MIntArray &vertexList, MIntArray &normalList, MIntArray ... |
/***********************************************************
CSCI 241 - Assignment 1 - Fall 2018 - Northern Illinois University
Progammer: <NAME>
Z-ID: z1761994
Section: 3?
TA: <NAME>, <NAME>, and <NAME>.
Date Due: January 29, 2018
Purpose: This program searchs through a vector using
binary search and linear... |
/*
* Website:
* https://github.com/wo3kie/dojo
*
* Author:
* <NAME>
*
* Compilation:
* g++ --std=c++11 https.cpp -o https -lssl
*
* Usage:
* $ ./https "test" "oRCO/U6JyPR/Og..."
*
* <feed xmlns:base="https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web"
* ... |
/*
* Copyright 1995, 1996, 1997, and 1998 WIDE Project.
* Adapted for tivodecode-ng
* See COPYING.md for license terms
*/
#include "tdconfig.h"
#include <algorithm>
#include "bits.hxx"
#include "md5.hxx"
/* Integer part of 4294967296 times abs(sin(i)), where i is in radians. */
static const uint32_t T[64] = {
... |
#include <iostream>
#define MAX_ENTRIES 1000
#define MAX_STUDENT 100
#define MAX_SUBJECT 10
using namespace std;
class StudentSubject { // design time class
int sroll; // unique roll of student
int subcode; // unique code of subject
friend class StudentSubjectList;
public:
StudentSubject () { // defalult con... |
// -*-C++-*-
/*
(c) Copyright 2004-2005, Hewlett-Packard Development Company, LP
See the file named COPYING for license details
*/
/** @file
implementation
*/
#include <algorithm>
#include <Lintel/HashMap.hpp>
#include <DataSeries/MinMaxIndexModule.hpp>
#include <DataSeries/TypeIndexModule.hpp>
using name... |
#include "geometrycentral/least_squares_conformal.h"
#include<Eigen/SparseCholesky>
using namespace geometrycentral;
LSCM::LSCM(HalfedgeMesh* m, Geometry<Euclidean>* g) : mesh(m), geom(g), vertexIndices(mesh), uvCoords(mesh) {}
void LSCM::separateVertices(VertexPtr v1, VertexPtr v2) {
// remap the vertex indice... |
#include <cstring>
#include <getopt.h>
#include <iostream>
#include <string>
#include <unistd.h>
#include "Options.h"
const std::string usage_simple("Usage: chisel [OPTIONS]... ORACLE PROGRAM");
const std::string error_message("Try 'chisel --help' for more information.");
void Option::showUsage() {
std::cerr << us... |
/*
* The MIT License (MIT)
* MIT License
*
* Copyright (c) 2019 Leaning Technologies Ltd
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without lim... |
// Copyright 2021 <NAME>
#include "../../../modules/task_1/pasukhin_d_crs/crs.h"
#include <complex>
#include <ctime>
#include <iostream>
#include <limits>
#include <random>
#include <vector>
//=======================================================================
// function : TransformToNorm
// purpose :
//======... |
#include "stdafx.h"
#include "Serial.h"
#define FC_DTRDSR 0x01
#define FC_RTSCTS 0x02
#define FC_XONXOFF 0x04
#define ASCII_BEL 0x07
#define ASCII_BS 0x08
#define ASCII_LF 0x0A
#define ASCII_CR 0x0D
#define ASCII_XON 0x11
#define ASCII_XOFF 0x13
using namespace c... |
/**Kattis - bustour
* TSP variant. We use 2 almost identical DPs, dp_left and dp_right. dp_left has a state of u,
* cities_left and returns the minimum cost to go from u, visit all the cities in cities_left and
* then go to the 0th city. dp_right has the same states but returns the minimum cost to go from
* u, visi... |
/**
* \file CruxApplicationList.cpp
* AUTHOR: <NAME>
* CREATE DATE: December 6th, 2010
* \brief Maintains a list of executable applications
*****************************************************************************/
#include "CruxApplicationList.h"
#include "io/carp.h"
#include "util/crux-utils.h"
#include "uti... |
/*******************************************************************************
* 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... |
//=============================================================================
// SquareSwapper 5000
//
// @author: <NAME> & <NAME>
// @description: Module to provide functions to work with Window objects
// @version: 1.0 29/11/2014
//=============================================================================
// Wi... |
/*
HipMer v 2.0, Copyright (c) 2020, The Regents of the University of California,
through Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from the U.S. Dept. of Energy). All rights reserved."
Redistribution and use in source and binary forms, with or without modification,
are ... |
#include "sphere.h"
extern int theta_steps, phi_steps;
extern bool gouraud;
Sphere::Sphere(const Vec3f &c, const float &r, Material *m) : Object3D(m), center(c), radius(r)
{
bbox = new BoundingBox(center - Vec3f(radius, radius, radius), center + Vec3f(radius, radius, radius));
}
Sphere::~Sphere() {}
bool Sphere::in... |
//#define DEBUG
#include "../Include/ModelLoader.h"
#define EQUAL(s1, s2) strcmp(s1, s2) == 0
std::string trim(const std::string& str, const std::string& whitespace = " \t\n\r") {
const auto strBegin = str.find_first_not_of(whitespace);
if (strBegin == std::string::npos)
return ""; // no content
const auto strEn... |
/*
* Copyright (c) 2019, NVIDIA 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 list of co... |
#include "VirtualBox.h"
bool vbox_reg_key_value()
{
TCHAR *szEntries[][3] = {
{ _T("HARDWARE\\DEVICEMAP\\Scsi\\Scsi Port 0\\Scsi Bus 0\\Target Id 0\\Logical Unit Id 0"), _T("Identifier"), _T("VBOX") },
{ _T("HARDWARE\\Description\\System"), _T("SystemBiosVersion"), _T("VBOX") },
{ _T("HARDWARE\\Description\\Sys... |
#include <omp.h>
#include <string>
#include <cstdlib>
#include <cstdint>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <stdio.h>
#include <assert.h>
#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unordered_map>
#include "config.hpp... |
#include <vector>
#include <iostream>
#include <cmath>
#include <limits>
#include "tgaimage.h"
#include "model.h"
#include "geometry.h"
const int width = 800;
const int height = 800;
const int depth = 255;
Model *model = NULL;
int *zbuffer = NULL;
Vec3f light_dir = Vec3f(1,-1,1).normalize();
Vec3f eye(1,1,3);
Vec3f... |
/************************************************************************************
Authors : <NAME> <<EMAIL>>
Copyright : Copyright <NAME>. 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 ob... |
/**
The MIT License (MIT)
Copyright (c) 2014 The authors of ceps
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... |
//===- TripleOptions.cpp --------------------------------------------------===//
//
// The MCLinker Project
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------------------... |
#include "mathDSP_F32.h"
#include <math.h>
/* acos_f32(x) <NAME> 2020
* This acos(x) approximation is intended as being fast, resonably accurate, and
* with continuous function and derivative (slope) between -1 and 1 x value.
* It is the result of a "Chebychev-zero" fit to the true values, and is a 7th
* o... |
/*
* See documentation at https://nRF24.github.io/RF24
* See License information at root directory of this library
* Author: <NAME> 2bndy5
*/
/**
* A simple example of streaming data from 1 nRF24L01 transceiver to another.
*
* This example was written to be used on 2 devices acting as "nodes".
* Use the Serial... |
#include <stdlib.h>
#include <iostream>
#include <string.h>
#include "FamilyTree.hpp"
using namespace std;
using namespace family;
/*this function will return pointer to the rel that the name that we enter bilong to*/
Tree* Tree:: findTree(string name ,Tree *temp){
Tree *current= NULL;
//if root=... |
//main
#include "JCEBA.LoadLibs.h"
void drawScene(void){
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
if(triedReshapping)
warnReshapping();
switch(currentScreen){
case SPLASH: splash();break;
case MENU: menu();break;
case PREMENU: preMenu();break;
... |
#pragma once
#include <math.h>
#include <boost/serialization/version.hpp>
#include "types/Point.hpp"
struct RANSACLine
{
Point p1, p2;
/**
* Line defined in terms of
* t1 * x + t2 * y + t3 = 0
*/
int t1, t2, t3;
float var;
RANSACLine(Point p1, Point p2, float var = 0) : p1(p1), p2(p2), var... |
//
// Copyright (c) 2016 Advanced Micro Devices, Inc. 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 without limitation the rights
/... |
/*
Copyright (c) 2015, <NAME>
All rights reserved.
Licensed under the BSD license.
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... |
/****************************************************************************//*
* Copyright (C) 2021 <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, includ... |
#include "llvm/Support/Casting.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "lumen/EIR/Builder/Passes.h"
#include "lumen/EIR/IR/EIRDialect.h"
#include "lumen/EIR/IR/EIROps.h"
#include "lumen/EIR/IR/EIRTypes.h"
using ::mlir::Block;
using ::mlir::BlockArgument;
u... |
//#include <Eigen/SVD>
#include <algorithm> // std::sort, std::stable_sort
#include <eigen3/Eigen/SVD>
#include <itkDataObject.h>
#include <itkImageRegionIterator.h>
#include <itkIndex.h>
#include <itkVariableLengthVector.h>
#include <itkVectorImage.h>
#include <m2CoreCommon.h>
#include <m2PcaImageFilter.h>
#include <... |
/**
* @file ReuseMapTest.cpp
* @brief ReuseMap class tester.
* @author zer0
* @date 2016-08-03
*/
#include <gtest/gtest.h>
#include <libtbag/container/ReuseMap.hpp>
using namespace libtbag;
using namespace libtbag::container;
//#define ENABLE_COMPILE_ERROR_OF_SHARED_REUSE_MAP
#if defined(ENABLE_COMPILE_ER... |
/**************************************************************************\
* Copyright (c) <NAME> & Gas Technologies AS
* 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... |
#include <cmath>
#include <iostream>
#include "space_charge.h"
#include "space_charge_cu.h"
#include "space_charge_parameter.h"
/*!
* \brief Constructor
* \param r_nx Horizontal mesh size. Transverse mesh size for SCHEFF.
* \param r_ny Vertical mesh size.
* \param r_nz Longitudinal mesh size.
*/
SpaceCharge::Spac... |
#ifdef __linux__
#else
#endif
#include <map>
#include <unordered_map>
#include "debug.hh"
#include "formats/media.hh"
#define INVALID_SEQ 0xffffffff
uvgrtp::formats::media::media(uvgrtp::socket *socket, uvgrtp::rtp *rtp_ctx, int flags):
socket_(socket), rtp_ctx_(rtp_ctx), flags_(flags), minfo_{}
{
fqueue_ =... |
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include "noisesimulator.hpp"
#include <algorithm>
#include "circuit.hpp"
#include "gate_factory.hpp"
#include "gate_merge.hpp"
#include "state.hpp"
/**
* \~japanese-en 回路にノイズを加えてサンプリングするクラス
*/
NoiseSimulator::NoiseSimulator(
const QuantumCircuit* init_ci... |
/*
calculator08buggy.cpp
Helpful comments removed.
We have inserted 3 bugs that the compiler will catch and 3 that it won't.
*/
#include "../std_lib_facilities.h"
struct Token {
char kind;
double value;
string name;
Token(char ch) :kind(ch), value(0) { }
Token(char ch, double val) :kind(ch)... |
#include "rect_atlas.h"
///////////////////////////////////////////
rect_atlas_t rect_atlas_create(int32_t width, int32_t height) {
rect_atlas_t result = {};
result.free_space.add({0,0,width,height});
result.w = width;
result.h = height;
return result;
}
///////////////////////////////////////////
void rect_at... |
/*
* Copyright (c) 2020, University of Illinois
* 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 ... |
/*
[A "BSD license"]
Copyright (c) 2017 <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 list of condition... |
// Copyright (c) 2013 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.
#include "xwalk/test/xwalkdriver/xwalk/navigation_tracker.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "xwalk/test/xwa... |
#include "coordinate_descent.h"
CoordinateDescent::CoordinateDescent(const DoubleMatrix& FA,
const DoubleMatrix& FB,
const DoubleArray& bins,
const int m,
const int k,
... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of condit... |
/*
Copyright [2008] [<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... |
/*!
* File CalcUtils.cpp
*/
#include <logic/CalcUtils.h>
float hpms::CalcHeightOf2DPointInside3DSector(const hpms::Triangle& sec, const glm::vec2& pos)
{
float det = (sec.z2 - sec.z3) * (sec.x1 - sec.x3) + (sec.x3 - sec.x2) * (sec.z1 - sec.z3);
float l1 = ((sec.z2 - sec.z3) * (pos.x - sec.x3) + (sec.x3 - se... |
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. 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. Redistri... |
/*
This file is part of PEST++.
PEST++ 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.
PEST++ is distributed in the hope that it wi... |
#include "ObjectDetector.h"
#include <opencv2/imgproc.hpp>
using namespace cv;
ObjectDetector::ObjectDetector(const char* tfliteModelPath, bool quantized, bool useXnn) {
m_modelQuantized = quantized;
initDetectionModel(tfliteModelPath, useXnn);
}
ObjectDetector::~ObjectDetector() {
if (m_model != nullp... |
// Test FTP
// Pointers to Page Zoom functions in PBCoreStruct are null
// Backspace in address bar intercepted by browser
// onNavigateComplete not getting called
// Inconsistent crash when returning from _MetaProc when 'Value' is null
// Orange button on WTxxxx
// Scaling mode for images
// SIP sometimes not showing ... |
// Copyright (c) 2019 by <NAME>. 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 applica... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
typedef struct sockaddr S... |
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int ct[50],pt[50];
int det;
void encrypt_hill(char a[50],int l,int k[3][3]) {
int ch[50];
int a1,b,c,x,y,z;
for(int i = 0; i < l; i++) {
ch[i]=char(a[i]);
}
for(int i = 0; i < l; i += 3 ) {
x=(ch[i]-65... |
//
// Copyright 2013 <NAME>
//
#include "tdbsc.hpp"
#include "tdbsc_fft.hpp"
#include "tdbsc_bspline.hpp"
#include "tdbsc_dihed.hpp"
#include <fstream>
#include <sstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <cstdlib>
#include <tr1/memory>
std::tr1::shared_ptr<std::ifstream> tdbsc_readheade... |
/* Copyright (c) 2015-2020 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless requi... |
/*-------------------------------------------------------------------------
File : module_win32.cpp
Author : FKling
Version : -
Orginal : 2019-10-24
Descr : Reading of a shared library and parsing of all exported functions
This is the win32 version of the module handler
Part of testrunner
BSD3 Licens... |
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
=================... |
/**************************************************************************
*
* alg5.cpp - Example programs for STL generic algorithms those
* producing scalar values.
*
* $Id$
*
***************************************************************************
*
* Licensed to the Apache Software Foundat... |
#include <mcc/map/chunk.hpp>
#include <mcc/gl/debug.hpp>
#include <GL/glew.h>
#include <glm/gtc/matrix_transform.hpp>
mcc::map::Chunk::Chunk(Generator& generator, Chunk* parent, glm::f64vec3 center, float vox_sz, int chunk_size, int level)
: generator(generator), parent(parent), center(center), vox_sz(vox_sz), c... |
#include "crobgame.h"
#include "crob.h"
#include "Arduino.h"
#include <EEPROM.h>
#include "names.h"
// put these in different files when I'm dead
void CrobGame::StartNewGame()
{
this->crob = Crob();
this->crob.age = 1;
this->crob.happy = 200;
this->crob.health = 200;
// this->crob.name = get_name()... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkGeoArcs.cxx
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT A... |
/*
Copyright (C) 2015, David "Davee" Morgan
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, dist... |
/*
* Copyright (C) 2018 <NAME> Frankline, Magnualand, HISII. All rights reserved.
* FileName :gameoflife.cpp
* Date :2018-01-30
*/
#include <iostream>
#include <cstdio>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#if defined(WINDOWS) || defined(_WIN32) || defined(_WIN64) || define... |
//=============================================================================
//
// Adventure Game Studio (AGS)
//
// Copyright (C) 1999-2011 <NAME> and 2011-20xx others
// The full list of copyright holders can be found in the Copyright.txt
// file, which is part of this source code distribution.
//
// The AGS sourc... |
/*
* Copyright 2018 Azlehria
*
* 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,
* di... |
/*The MIT License (MIT)
Copyright (c) 2015 k-brac
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) 2021 <NAME> https://gaztin.com/
*
* 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, includin... |
// Test program and examples for the C++ extension of the MPI library
// by <EMAIL>
#include <stdio.h>
#include <iostream.h>
// extern C is needed if mpi.c is compiled as a C file and not as
// a C++ file
extern "C"
{
#include "mpi.h"
}
#include "mpicpp.h"
void testallfu... |
// --------------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------------
#include <gtest/gtest.h>
#include <restful_mapper/json.h>
using namespace std;
using namespace restful_mapper;
// ------------------------... |
// run svm on fmri data
#include"fmri_svm_train.h"
#include"fmri_svm_common.h"
#include<nifti1_io.h>
extern "C" {
#include"svm_struct_api.h"
}
#include<iostream>
using namespace std;
///// parm reading /////
extern char *optarg;
extern int optind, opterr, optopt;
#include"getopt.h"
int getopt_long(int argc, char... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.