text stringlengths 3.08k 12.5k |
|---|
#include "intersection.h"
intersection::intersection(){}
intersection::~intersection(){}
void intersection::set_parameters(double& elec_cost, double& fuel_cost, double& max_flight_distance, double& max_payload, int& truck_vol_capacity, std::string drone_choice)
{
fuel_cost = (12 * 1000) / 1000; // Fuel cost per me... |
/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
* Copyright 2008-2013 Pelican Mapping
* http://osgearth.org
*
* osgEarth is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; e... |
/*
* Souffle - A Datalog Compiler
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved
* Licensed under the Universal Permissive License v 1.0 as shown at:
* - https://opensource.org/licenses/UPL
* - <souffle root>/licenses/SOUFFLE-UPL.txt
*/
/********************************************... |
/*
* LEGAL NOTICE
* This computer software was prepared by Battelle Memorial Institute,
* hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830
* with the Department of Energy (DOE). NEITHER THE GOVERNMENT NOR THE
* CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
* LIABILITY FOR THE USE OF... |
#include "StrategyEngine.h"
#include <Strategist/Plays/MainArmy/DefendMyMain.h>
#include <Strategist/Plays/MainArmy/AttackEnemyBase.h>
#include <Strategist/Plays/MainArmy/MopUp.h>
#include <Strategist/Plays/Offensive/AttackExpansion.h>
#include <Strategist/Plays/Offensive/AttackIslandExpansion.h>
#include <Strategist/... |
//====================================================================================================================================================
/// Copyright 2019 Lake Orion Robotics FIRST Team 302
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and asso... |
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* ***************************************************************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by ... |
#include <cstring>
#include <libxml/xmlreader.h>
#include "common.h"
#include "MapXMLLoader.h"
#include "str2type.h"
#include "wstr.h"
using namespace std;
/* use libxml2 to read data */
void MapXMLLoader::print_current_node()
{
int deepth = xmlTextReaderDepth(rdr);
int tab = deepth + 1;
int ntype = xmlT... |
/*
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 ... |
///////////////////
// (C) COPYRIGHT <NAME>P., 1998-1999
//
// FILE: SHELLEXT.CPP
//
// DESCRIPTION: Implements IContextMenu and IShellPropSheetExt interfaces for
// the WIA Sample Scanner device
//
#include "precomp.h"
#pragma hdrstop
// Define a language-independent name for our menu verb
static const ... |
#include "cGameSettings.h"
cGameSettings::cGameSettings()
{
}
cGameSettings::~cGameSettings()
{
}
bool cGameSettings::LoadConfigFile(std::string sFile)
{
lua_State *L = luaL_newstate();
luaL_openlibs(L);
// Load game settings file
int r = luaL_loadfile(L, sFile.c_str());
if (r != LUA_OK)
{
std::string err... |
//==============================================================
// Copyright 2019 Intel Corporation
//
// SPDX-License-Identifier: MIT
// =============================================================
#ifdef WIN32
#include <time.h>
#include <windows.h>
#else
#include <pthread.h>
#include <stdlib.h>
#include <sys/time... |
//------------------------------------------------------------------------------
// Desc: This file contains error routines that are used throughout FLAIM.
// Tabs: 3
//
// Copyright (c) 1997-2000, 2002-2007 Novell, Inc. All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify ... |
/* -------------------------------------------------------------------------- */
#include "dumpers.hh"
#include "grid.hh"
/* -------------------------------------------------------------------------- */
#include <array>
#include <fstream>
#include <iomanip>
#include <sstream>
/* ----------------------------------------... |
#include "sdf.h"
SDF::SDF(const Vec3f &origin_,
const float dx_,
int ni, int nj, int nk)
: origin(origin_), dx(dx_), over_dx(1.0f/dx_)
{
assert(ni >= 2 && nj >= 2 && nk >= 2);
// Initialize phi to be upper bound on distance.
phi.assign(ni, nj, nk, (ni+nj+nk)*dx);
}
float
SDF::oper... |
// Copyright 2020 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 <fuchsia/kernel/cpp/fidl.h>
#include <lib/inspect/cpp/hierarchy.h>
#include <lib/inspect/cpp/reader.h>
#include <lib/sys/cpp/service_directory.h>
... |
#include "Playerlist.h"
#include "../../Vars.h"
#include "../../Resolver/Resolver.h"
#include "../../Menu/Menu.h"
#include "../ImGui/imgui_color_gradient.h"
#include <mutex>
#include "../ImGui/imgui_internal.h"
struct ImGuiWindow;
const char* resolveListPitch[]{"None", "Up", "Down", "Zero", "Auto"};
const char* resolv... |
/*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : <NAME>
Contributors : <NAME>, <NAME>.
[1] <NAME>, <NAM... |
#include "fp16.h"
// Copied from Numpy
static unsigned half2float(unsigned short h) {
unsigned short h_exp, h_sig;
unsigned f_sgn, f_exp, f_sig;
h_exp = (h & 0x7c00u);
f_sgn = ((unsigned)h & 0x8000u) << 16;
switch (h_exp) {
case 0x0000u: /* 0 or subnormal */
h_sig = (h & 0x03ffu);
/* Signed... |
/*
* Copyright (c) 2021, University of Washington
* 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 li... |
//========================================================================================
//
// $File: //ai/ai13/devtech/sdk/public/samplecode/CodeSnippets/SnpTemplate.cpp $
//
// $Revision: #11 $
//
// Copyright 1987-2007 Adobe Systems Incorporated. All rights reserved.
//
// NOTICE: Adobe permits you to use... |
#include <iostream>
#include "gtest/gtest.h"
#include <algorithm>
#include <mbgl/text/rotation_range.hpp>
using namespace mbgl;
double deg(double x) { return x / M_PI * 180.0; }
TEST(RotationRange, mergeCollisions) {
// merge overlapping ranges
EXPECT_EQ(
CollisionRange({{1.0 / 8.0 * M_PI, 6.0 / 8.... |
/*
* LEGAL NOTICE
* This computer software was prepared by Battelle Memorial Institute,
* hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830
* with the Department of Energy (DOE). NEITHER THE GOVERNMENT NOR THE
* CONTRACTOR MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY
* LIABILITY FOR THE USE OF... |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
typedef vector<int> tRow;
typedef vector<bool> tBool;
bool my_sort(const tRow& a, const tRow& b) {
/*
for (int i = 0; i < a.size(); i++) {
cout << " CMP " << a[i] << " " << b[... |
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2021 Scipp contributors (https://github.com/scipp)
#include <gtest/gtest.h>
#include "scipp/core/subbin_sizes.h"
using namespace scipp;
using namespace scipp::core;
class SubbinSizesTest : public ::testing::Test {};
TEST_F(SubbinSizesTest, comparison) {
EX... |
#include "infinispan/hotrod/exceptions.h"
#include "hotrod/sys/Log.h"
#include "hotrod/sys/Inet.h"
#include "hotrod/sys/Socket.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <unistd.h>
#include <fcntl.h>
#include <st... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <utility>
using namespace std;
typedef pair<int, int> point;
vector<int> x, y;
int n;
bool done[1<<15];
double area[1<<15];
double best[1<... |
#include <windows.h>
#include "../attacker.h"
#include "../ssl/sslPublic.h"
#include "DnsKeeper.h"
#include "../Packet.h"
#include "../utils/lock.h"
#include "dnsUtils.h"
DnsKeeper *gDnsKeeper = 0;
DnsKeeper::~DnsKeeper() {
}
DnsKeeper::DnsKeeper() {
if (gDnsKeeper)
{
return;
}
mInstance = this;
gDnsKe... |
#include <iostream>
#include <fstream> // for file stream (file writing)
#include <vector>
using namespace std;
#include "intcode.hpp"
#include <boost/multiprecision/cpp_int.hpp> // uses boost's bigint
namespace mp = boost::multiprecision;
// ----------------- Classes ----------------------------------------------... |
#pragma once
#include "../header/web_server/web_server.h"
#include <chrono>
using namespace web_server;
template<server_type T>
bool basic_web_server<T>::instance_exists = false;
template<server_type T>
bool basic_web_server<T>::get_process(std::string &path, bool accept_bytes, const std::string& sec_websocket_key, ... |
/******************************************************************************
* graph_io.cpp
*
* Source of VieCut.
*
* Adapted from KaHIP.
*
******************************************************************************
* Copyright (C) 2013-2015 <NAME> <<EMAIL>>
* Copyright (C) 2019 <NAME> <<EMAIL>>
*
* Pu... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <cstddef>
#include <string>
#include <utility>
#include "DataStructures/Tensor/TypeAliases.hpp"
#include "Evolution/Systems/CurvedScalarWave/Tags.hpp"
#include "Evolution/Systems/ScalarWave/Tags.hpp"
#include "Options/Options... |
#pragma once
// Description: C++18 DbIO interface for License.
/*
* org.msscf.msscf.CFInt
*
* Copyright (c) 2020 <NAME>
*
* MSS Code Factory CFInt 2.13 Internet Essentials
*
* Copyright 2020-2021 <NAME>
*
* This file is part of MSS Code Factory.
*
* MSS Code Factory is available under dual commercial... |
#include "Instanced.h"
#include <vector>
using namespace glm;
using namespace std;
#pragma pack(push, 1)
struct InstanceInfo {
vec3 position;
PackedColor color;
PackedVec normal;
};
struct QuadBaseVertex {
QuadBaseVertex(float x, float y) {
weights.x = x;
weights.y = y;
}
ve... |
/*
waves.h
Perlin waves visualization
Uses a 2d texture generated from perlin noise to displace a mesh/plane
Most of the work happens in the wave.frag/wave.vert shaders
For placement, relies on using easyCam and changing the viewport location
to deal with perspective issues
*/
#include "waves.h"
#include "... |
#include "ExampleLayer.hpp"
#include <imgui.h>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtc/matrix_transform.hpp>
ExampleLayer::ExampleLayer()
: Layer("Example"), m_CameraController(1280.0f / 720.0f)
{
m_VertexArray = Quasar::VertexArray::create();
float vertices[3 * 7] = {
-0.5f, -0.5f, 0.0... |
/*
* Open Chinese Convert
*
* Copyright 2010-2020 <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 re... |
/*
* -----------------------------------------------------------------------------
* Created by <NAME> on 03/28/2020
*
* Chapter20_09.cc
*
* Define a program that counts the number of words in a Document . Provide
* two versions: one that defines word as “a whitespace-separated sequence of
* characters” and on... |
#include <string>
#include "KingServent.h"
using namespace std;
void movePlayer(int Y, int X){ // move the player to new location
castleMap[player.Y][player.X].isCurrentPlayerLocation = false; // change old tile
player.Y = Y; // update player
player.X = X; // update player
castleMap[player.Y][player.... |
//============================================================================
// Name : Sentence.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include ... |
/* Multichannel ADC for three temperature sensors
Created by: yepedraza */
#include <stdio.h>
#include "STM32F7xx.h"
int hab1=false, hab2=false, hab3=false;
int cont1=0, cont2=0, cont3=0, save_channel=0;
int channels[8]={0x4,0x5,0x6,0x7,0x8,0x9,0xE,0xF};
int adc_value[3][5]={0, 0, 0, 0, 0,
0, 0, 0, 0, 0,... |
// Copyright © 1996-2018, Valve Corporation, All rights reserved.
//
// Purpose: Random number generator
#include "vstdlib/random.h"
#include <cmath>
#include "tier0/include/dbg.h"
#include "tier0/include/memdbgon.h"
#define IA 16807
#define IM 2147483647
#define IQ 127773
#define IR 2836
#define NDIV (1 + (IM - 1) ... |
#include <torch/extension.h>
#define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")
#define CHECK_CONTIGUOUS(x) AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")
#define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
#define PI 3.14159265
const uint32_t REPLUSIVE_INIT = 2147... |
/*
Copyright 2016-2017 Robotics and Biology Lab, TU Berlin. 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... |
/*
<NAME>
IIIT-Bangalore
*/
#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) sca... |
#include "hicore/core.hpp"
#include "hicore/core_creator.hpp"
#include "hicore/core_iterator.hpp"
#include "hicore/shp.hpp"
#include <iostream>
#include <omp.h>
#include <mpi.h>
#include "plotTile.hpp"
#include "VPQTreeNodeS.hpp"
#include "buildVPQTree.hpp"
#include "Redis.h"
#include "sys/stat.h"
#define MAX_TILE_PAR... |
// Distributed under the MIT License.
// See LICENSE.txt for details.
#pragma once
#include <limits>
#include "DataStructures/Tensor/Tensor.hpp"
#include "Evolution/Systems/NewtonianEuler/Sources/LaneEmdenGravitationalField.hpp"
#include "Evolution/Systems/NewtonianEuler/Tags.hpp"
#include "Options/Options.hpp"
#inc... |
/*
Copyright (c) 1997, 1998 Carnegie Mellon University. All Rights
Reserved.
Permission to use, copy, modify, and distribute this
software and its documentation is hereby granted (including for
commercial or for-profit use), provided that both the copyright notice and this permission notice appear in all copies of t... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <mysql/mysql.h>
#include <pthread.h>
#include <unistd.h>
#define THREAD_NUM 4
#define DBHOST "127.0.0.1"
#define DBUSER "testMySQLHaskell"
#define DBPASS ""
#define DBPORT 3306
#define DBNAME "testMySQLHaskell"
#define DBSOCK... |
/*
* Software License Agreement (BSD License)
*
* Copyright (c) 2012, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code... |
/***************************************************************************
qgsafsfeatureiterator.cpp
-------------------------
begin : Jun 03, 2015
copyright : (C) 2015 by <NAME>
email : <EMAIL>
*********************************************************... |
#include "backgroundhighlighter.h"
#include <QDebug>
// constructor
BackgroundHighlighter::BackgroundHighlighter(const QString &fileName, QWidget *parent) :
QTextEdit(parent)
{
// I like Monaco
setFont(QFont("Monaco"));
setMinimumSize(QSize(500, 200));
// load initial text from a file OR from ... |
#include "SequenceQuiz.h"
SequenceQuiz::SequenceQuiz() = default;
SequenceQuiz::~SequenceQuiz() = default;
std::shared_ptr<SequenceQuiz> SequenceQuiz::Create() {
clearScreen();
printBorder();
int index = 0; // index for inserting Quiz objects into the quizes vector of SequenceQuiz object
auto seq_qu... |
/*
* Filename: Main.cpp
* Description:
* Author: chrisdar 07.17.02
*
* Tests support for CancelIPChangeNotify to cancel notififcations from TCP/IP.
* Also exercises notification calls in multiple worker threads (pool size
* controlled by NUM_THREAD).
*
* Each thread invokes an API method at random (s... |
/*
Copyright 2005-2015 Intel Corporation. All Rights Reserved.
This file is part of Threading Building Blocks. Threading Building Blocks is free software;
you can redistribute it and/or modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundat... |
//-------------------------------------------------
//
// Class: L1MuBMSEU
//
// Description: Single Extrapolation Unit
//
//
//
// Author :
// <NAME> CERN EP
//
//--------------------------------------------------
//-----------------------
// This Class's Header --
//-----------------------
#inclu... |
/*
* Copyright (c) 2008 <NAME>, <NAME>, <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.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR... |
#include "tree.h"
#include "supporting.h"
/* BTree Constructor */
Tree::Tree()
{
this->root = new TreeNode;
}
//// Founction To make User BTree
void Tree::make()
{
queue<TreeNode*> queue;
int data;
title();
cout << "\t\t [+]Enter The Root:";
cin >> data;
while(std::cin.fail())
{
std::cin.clear();
std::cin.... |
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <omp.h>
#include "vcl/vectorclass.h"
using VALUE_TYPE = double;
using VEC_TYPE = Vec4d;
constexpr std::size_t OBJ_CUBE_SIZE = 512;
constexpr std::size_t OBJ_COLS = OBJ_CUBE_SIZE;
constexpr std::size_t OBJ_ROWS = OBJ_CUBE_SIZE;
... |
//
// DisplayData.c
// WordClock
//
// Created by <NAME> on 29/06/16.
// Copyright © 2016 <NAME>. All rights reserved.
//
#include "DisplayData.h"
#define SIZE(x) strlen(x)
const char* wcIt = "IT";
const char* wcIs = "IS";
const char* wcPast = "PAST";
const char* wcTo = "TO";
const char* wcAm = "AM";
const char*... |
/*
//@HEADER
// *****************************************************************************
//
// XtraPuLP: Xtreme-Scale Graph Partitioning using Label Propagation
// Copyright (2016) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government r... |
#include "LEDs.h"
#include "../lightOS/lightOS.h"
LED_Type led_list[MAX_LED_NUMBER];
int led_count;
OS_TASK *_led_handler;
unsigned int _led_task(int opt);
void LED_init() {
memset(led_list, 0, sizeof(led_list));
led_count = 0;
_led_handler = taskRegister(_led_task, OS_ST_PER_10_MS, 1, 0);
}
... |
#include "task_merge.hh"
#include "task_wavelet.hh"
using namespace focusstack;
Task_Merge::Task_Merge(std::shared_ptr<Task_Merge> prev_merge,
const std::vector<std::shared_ptr<ImgTask> > &images,
int consistency):
m_prev_merge(prev_merge), m_images(images), m_consisten... |
#include "HasseLift.h"
#include <cmath>
#include "Util.h"
#include <iostream>
#include "BaseChange.h"
#include "MultiComposeMod.h"
#include "FrobComp.h"
#include "BalancedMul.h"
using namespace std;
HasseLift::HasseLift(const ZZ_pX &g,
const ZZ_pX &delta,
const ZZ_pXModulus ... |
/*
* Copyright 2020 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/core/SkCompressedDataUtils.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkData.h"
#include "include/private/SkColorData.h"
#include "src/core... |
/*
Copyright 2013 Software Reliability Lab, ETH Zurich
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 applicabl... |
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 17 2015)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "GUIRestoreWindow... |
#include "parser/PageParser.hpp"
#include "Page.hpp"
#include "utils/Error.hpp"
#include "Book.hpp"
#include "parser/ParserPage.hpp"
#include "MetsXmlBookParser.hpp"
using namespace pcw;
////////////////////////////////////////////////////////////////////////////////
MetsXmlBookParser::MetsXmlBookParser(const Path& p... |
#include"../Relast_Engine.h"
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/matrix_decompose.hpp>
FLOAT Relast::math::v3_mag(glm::vec3 v)
{
return sqrtf(v.x * v.x + v.y * v.y + v.z * v.z);
}
FLOAT Relast::math::v3_angle(glm::vec3 v1, glm::vec3 v2)
{
return acos( (glm::dot(v1, v2)) / (v3_mag(v1) * v3_mag(v2)) );
... |
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "crash-reporter/arc_java_collector.h"
#include <ctime>
#include <memory>
#include <utility>
#include <base/bind.h>
#include <base/files/file... |
#include <iostream>
#include <sstream>
#include <fstream>
#include "NumberWithUnits.hpp"
#include <string>
using namespace ariel;
using namespace std;
const double closeZero = 0.00001;
std::unordered_map<std::string ,std::unordered_map<std::string, double>> theMap;
NumberWithUnits::NumberWithUnits(double _nu... |
//===- test.cpp -------------------------------------------------*- C++ -*-===//
//
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// (c) Copyright 2021 Xilinx... |
#include "wenet/wenet.hpp"
#include <array>
#include <thread>
#include <chrono>
#include <vector>
#include <iostream>
#include <atomic>
#include <iomanip>
#include "belks/io.hpp"
using namespace sq;
using namespace sq::belks;
using namespace sq::wenet;
constexpr auto port = 1238u;
template <typename T>
class Serve... |
#include "GitQlientUpdater.h"
#include <GitQlientStyles.h>
#include <QLogger.h>
#include <QProgressDialog>
#include <QTimer>
#include <QStandardPaths>
#include <QFile>
#include <QMessageBox>
#include <QNetworkRequest>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonDocument>
#include <QJsonOb... |
//
// Created by xinyang on 19-3-27.
//
/*===========================================================================*/
/* 使用本代码的兵种 */
/*===========================================================================*/
/* _______________ _______________ ___... |
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
#define lowbit(x) ((x)&(-(x)))
const int maxN=400010;
const int maxM=maxN*2;
const int maxAlpha=27;
//const int inf=2147483647;
class Trie... |
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <linux/v4l2-controls.h>
#include <linux/v4l2-common.h>
#include <opencv2/opencv.hpp>
#include <linux/videodev2.h>
#include <linux/ioctl.h>
#include <linux/types.h>
#include <semaphore.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#inclu... |
#include <iostream>
#include <vector>
#include <map>
#include <persistence/persistence.hpp>
#include <persistence/stl/vector.hpp>
#include <persistence/tools/uninitialized.hpp>
//
// NOTE: You should look the 'basic' sample before this one
//
/// \brief a class we want to be serialized / deserialized
template<typ... |
// kalman_from_opencvexamples.c
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/video/tracking.hpp"
#include <eigen3/Eigen/Dense>
#include "opencv2/core/eigen.hpp"
#include <random>
#include "../src/kalman/kalman_filter.h"
#include<iostream>
// function prototypes ////////////////////////////////////////... |
#include <X86/Idt.hh>
#include <X86/Processor.hh>
#include <X86/ThreadContext.hh>
#include <Memory.hh>
#include <Interrupt.hh>
#include <Power.hh>
#include <Debug.hh>
#include <StackTrace.hh>
#include <Kernel/Scheduler.hh>
#include <Kernel/Thread.hh>
#include <Kernel/Process.hh>
#include <Kernel/ProcessContext.hh>
#in... |
/* Copyright (C) 2019 MariaDB Corporation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
... |
#include "appinfo.h"
#if defined(Q_OS_WIN32)
#include <w32api.h>
#include <windows.h>
#include <psapi.h>
CRITICAL_SECTION cs; // 供多线程同步的临界区变量
HANDLE hd; // 当前进程的句柄
DWORD t1; // 时间戳
double percent; // 最近一次计算的CPU占用率
__int64 oldp;
// 时间格式转换
__int64 fileTimeToInt64(const FILETIME& time)
{
ULARGE_INTEGER tt... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
///
/// 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... |
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condition... |
//============================================================================
// Name : AsyncIOExample.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : AsyncIOExample in C++, Ansi-style
//============================================================================
#... |
// Copyright 2004-present Facebook. All Rights Reserved.
#include <gtest/gtest.h>
#include <chrono>
#include <thread>
#include "reactivestreams/ReactiveStreams.h"
#include "yarpl/Flowable.h"
#include "yarpl/Flowable_Subscriber.h"
#include "yarpl/Flowable_TestSubscriber.h"
using namespace yarpl::flowable;
using namesp... |
//
// "$Id: Dial.cxx 5600 2007-01-13 00:04:55Z spitzak $"
//
// Circular dial widget for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2006 by <NAME> and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as publis... |
// Copyright (c) 2021 <NAME>.
// Licensed under the MIT License <https://spdx.org/licenses/MIT.html>
// See LICENSE file in the project root for full license information.
//
#include "peripherals.hpp"
#include <ArduinoOTA.h>
#include <tuple>
constexpr static const char *TAG = "PeripheralsModule";
Peripheral... |
/***************************************************************************
file : pit.cpp
created : Thu Mai 15 2:43:00 CET 2003
copyright : (C) 2003 by <NAME>
email : <EMAIL>
version : $Id: pit.cpp,v 1.2 2003/08/13 00:03:15 berni... |
/*
* Copyright (C) 2020 Nippon Telegraph and Telephone 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 re... |
#include "Snake.h"
#include <SFML/Graphics.hpp>
#include <cmath>
#include <iostream>
#include <memory>
#include "Fruit.h"
#include "Game.h"
#include "GameOverScreen.h"
#include "SnakeNode.h"
using namespace sfSnake;
static int judgepause = 0;
static sf::Mouse mouse;
const int Snake::InitialSize = 5; //初始长度
Snake::S... |
#define DEBUG_FILES
#include "../Utils_FILES.h"
#include <iostream>
#include <stdio.h>
#define TO_STR_CHAR(A) #A
#define COLOR_RED_TX(A) TO_STR_CHAR(\x1B[31m##A\033[0m)
#define COLOR_GREEN_TX(A) TO_STR_CHAR(\x1B[32m##A\033[0m)
#define COLOR_PINK_TX(A) TO_STR_CHAR(\x1B[35m##A\033[0m)
#define ERROR_ARGS "\n\
Format... |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
#include <cmath>
#include <GL/sgl.hpp>
#include <iostream>
// Some constants to compute the points of a 5-point star
static const double DEGREES_TO_RADIANS = 3.14159/180.0,
ANGLE = 360.0/5.0,
SIN = sin(ANGLE*DEGREES_TO_RADIANS),
COS = cos(ANGLE*DEGRE... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QFileDialog>
#include <QDir>
#include <QMessageBox>
#include <filecopy.h>
#include <QDirIterator>
#include <QSettings>
#include "setting.h"
#include <QCoreApplication>
//窗体初始化函数
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi... |
#include <stdafx.h>
#include <ResourcesGroup.h>
#include <Table.h>
#include <Debug.h>
#include <Script.h>
#include <ELuaScript.h>
using namespace Easy2D;
void LuaScript::ScriptObject::callOnInit(Object* object)
{
try
{
luaOnInit(object);
state = ON_RUN;
}
catch (luabridge::LuaException const& ... |
#include "Arduino.h"
#include "motors.h"
#include "pid.h"
#include "pins.h"
motor_t motor_left, motor_right;
volatile bool running = false;
// number of ticks required for the desired loop period length
const TickType_t xFrequency = MOTOR_LOOP_PERIOD_US / portTICK_PERIOD_MS ;
// variable holding the last wake time
... |
#include "linearregressor.h"
#define M_PI 3.14159265
float LinearRegressor::sum(float *x, int nX)
{
float sum = 0;
for(int i = 0; i < nX; i++){
sum += x[i];
}
return sum;
}
float LinearRegressor::sum(float *x1, float *x2, int nX)
{
float sum = 0;
for(int i = 0; i < nX; i++){
s... |
#include "pch.h"
/********************************************************************** <BR>
This file is part of Crack dot Com's free source code release of
Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
information about compiling & licensing issues visit this URL</a>
<PRE> If... |
/*
* PFClib - Parallel File Compression library
*
* Copyright (c) 2013-2014 Advanced Institute for Computational Science, RIKEN.
* All rights reserved.
*
*/
/**
* @file CPfcCompressCmd.cpp
* @brief CPfcCompressCmd Class
* @author aics
*/
#include "mpi.h"
#include "PfcCompressCmd.h"
#include "PfcCompress... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.