text stringlengths 3.08k 12.5k |
|---|
#include <bits/stdc++.h>
using namespace std;
const int maxn = 4e5 + 5;
using ll = long long;
struct Edge {
int u, v, w;
bool operator<(const Edge &rhs) const { return w < rhs.w; }
};
vector<Edge> edges;
int n, m;
struct LCT {
int val[maxn], max[maxn], smax[maxn]; // 基于点权
int rev[maxn], ch[maxn][2], fa[maxn];... |
// Copyright (c) 2012, <NAME> <<EMAIL>>
//
// 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 DISCLAI... |
#define SDL_MAIN_HANDLED
#include <iostream>
#include <string>
#include "SDL2\SDL.h"
#include "SDL2\SDL_image.h"
const int SCREEN_WIDTH = 800;
const int SCREEN_HEIGHT = 600;
const int WINDOW_LEFT = 250;
const int WINDOW_TOP = 100;
const char *WINDOW_TITLE = "Frank's SDL2 Demo";
/**
-=-=-=-=-=-=-=- LogError -=-=-=-=... |
/*
* File: Config.cpp
* Author: <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Created on January 31, 2020, 2:05 PM
*/
#include "Config.h"
#include "Functions.h"
#include <limits>
#include <cmath>
using namespace std;
const bool Config::_CIRCULAR = false;
const double Config::_X = 0.0;
const double Confi... |
// -*-Mode: C++;-*-
//*BeginLicense**************************************************************
//
//---------------------------------------------------------------------------
// TAZeR (github.com/pnnl/tazer/)
//---------------------------------------------------------------------------
//
// Copyright ((c)) 2019, ... |
#include <GLXW/glxw.h>
#include <iostream>
#include <vector>
#include <defer.h>
#include "../assimp/include/assimp/Importer.hpp"
#include "../assimp/include/assimp/postprocess.h"
#include "../assimp/include/assimp/scene.h"
#include "utils/models.h"
GLfloat* importedModelCreate(const char* fname, unsigned int meshNumb... |
// Copyright (c) 2021 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... |
#include <stan/math/rev/mat.hpp>
#include <gtest/gtest.h>
#include <math/rev/mat/fun/util.hpp>
#include <vector>
using stan::math::matrix_d;
using stan::math::matrix_v;
using stan::math::promote_common;
using stan::math::row_vector_d;
using stan::math::row_vector_v;
using stan::math::var;
using stan::math::vector_d;
u... |
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <sys/shm.h>
#include <sys/types.h>
#include "../../sched.h"
// #define TEST_TIME
using namespace std;
// F: code blocks annotated with "// F:" are introduced to guide fuzzing
typedef struct... |
/*
*
* Copyright 2015 gRPC 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
/* Date/time module for the Pawn Abstract Machine
*
* Copyright (c) ITB CompuPhase, 2001-2009
*
* 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... |
/*
* level/special.cpp
*
*/
#include "object.h"
#include "../graphic/glob_gfx.h" // colors for the selbox determination
#include "../other/file/io.h"
#include "../other/globals.h"
Object::Object(const Cutbit& c, Type t, int st)
:
cb (c),
type (t),
subtype (st),
selbox_x (cb.get_xl())... |
/***************************************************************************
polepos.c
Sound handler
****************************************************************************/
#include "driver.h"
static int sample_msb = 0;
static int sample_lsb = 0;
static int sample_enable = 0;
static int current_position;
stat... |
#include <stdio.h>
#include <string.h>
#include <SimplePacket.h>
void PrintDump(uint8_t * pData, int nLen, int nWidth);
enum CMD_ID {
CMD_ID_TEST_STRING = 0,
CMD_ID_TEST2_UINT32
};
// This class demonstrates how to use CSimplePacket as a base class to process packets.
class CCommDevice : public CSimplePacket {
pr... |
#include "ofApp.h"
/*
All components instantiated within a gui
https://github.com/braitsch/ofxDatGui @braitsch
*/
void ofApp::setup()
{
// instantiate and position the gui //
gui = new ofxDatGui( ofxDatGuiAnchor::TOP_RIGHT );
// add some components //
gui->addTextInput("message", "# open framewor... |
/*
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 version.
This program is distributed in the hope that it will be usefu... |
#include <algorithm>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <cassert>
#include <climits>
#inclu... |
/** \file App.cpp */
#include "App.h"
// Tells C++ to invoke command-line main() function even on OS X and Win32.
G3D_START_AT_MAIN();
int main(int argc, char** argv) {
(void)argc; (void)argv;
GApp::Settings settings;
// Change the window and other startup parameters by modifying the
// settings ... |
/*******************************************************************\
Module:
Author: <NAME>, <EMAIL>
\*******************************************************************/
#include "json.h"
#include "structured_data.h"
#include <algorithm>
#include <ostream>
const jsont jsont::null_json_object(jsont::kindt::J_NU... |
#include "PostProcessor_pcp.h"
#include "gif.h"
#include "Animation.h"
void Animation::PlayAnimationEvent::
Execute(vtkObject *caller, unsigned long eventId, void *callData)
{
animation->play_animation();
}
void Animation::RenderFrameTimerEvent::
Execute(vtkObject * caller, unsigned long eventId, void * callData... |
/* ------------------------------------------------
Copyright 2014 AT&T Intellectual Property
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... |
// Copyright (c) 2016 Uber Technologies, 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 Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
// Copyright 2017 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 "cros-disks/rename_manager.h"
#include <linux/capability.h>
#include <string>
#include <base/bind.h>
#include <base/files/file_util.h>
#inc... |
/*
* Copyright (c) 2009-2011, 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
* ... |
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2004-2019 musikcube 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:
//
// * Redist... |
/* -----------------------------------------------------------------------------
* This file is part of SWIG, which is licensed as a whole under version 3
* (or any later version) of the GNU General Public License. Some additional
* terms also apply to certain portions of SWIG. The full details of the SWIG
* lice... |
#include "LZespolona.hh"
/******************************************
* Tworzy sprzezenie do liczby zespolonej *
******************************************/
LZespolona sprzez(LZespolona Liczba){
LZespolona Wynik;
Wynik.re = Liczba.re;
Wynik.im = Liczba.im * (-1);
return Wynik;
}
/****************************... |
/*
* Copyright (c) 2016, https://github.com/nebula-im/nebula
* 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
... |
#include <stdio.h>
#include <stdlib.h>
#include "mmult.h"
// --------------------------------------------------------------------
// function to be accelerated in HW wrapped with AXI4-Stream interface
void mmult_hw (AXI_VAL in_stream[IS_SIZE], AXI_VAL out_stream[OS_SIZE])
{
#pragma HLS INTERFACE s_axilite port=retur... |
#include "Animator.hpp"
#include "Engine/Engine.hpp"
void model::Animator::BoneTransform(double TimeInSeconds) {
transforms_.resize(100);
animation_time_ += TimeInSeconds;
if (animated_model_ != nullptr) {
if (loaded_animation_ != nullptr) {
if (animated_model_->is_animated_) {
... |
/*
* User.cpp
* MAMClient
*
* Created by <NAME> on 5/4/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
#include "User.h"
User::User( Socket *socket, GameMap *gameMap, Dialogue *dialogue, MapFile *mapFile )
{
this->m_socket = socket;
this->m_gameMap = gameMap;
this->m_... |
#include <fmt/format.h>
#include <algorithm>
#include <client/graphical/gui/control.hpp>
#include <client/graphical/gui/gui_container_component.hpp>
#include <ctime>
#include <numeric> // for std::accumulate
using namespace familyline::graphics::gui;
void ContainerComponent::add(int x, int y, std::unique_ptr<Contro... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <sys/time.h>
#include <math.h>
#include <vector>
#include "defs.h"
#include "common.h"
#include "io.c"
#include "lapl_ss.c"
double
stop_watch(double t0)
{
double time;
struct timeval t;
gettimeofday(&t, NULL);
time = (dou... |
#include "synccontroller_p.h"
#include "synchelper_p.h"
#include "conflictresolver.h"
using namespace QtDataSync;
using std::tie;
#define QTDATASYNC_LOG QTDATASYNC_LOG_CONTROLLER
SyncController::SyncController(const Defaults &defaults, QObject *parent) :
Controller{"sync", defaults, parent}
{}
void SyncController:... |
#include "Image.h"
#include "AssetManager.h"
#include <stb/stb_image.h>
#include <sstream>
#include "../util/MathUtil.h"
int Image::get_index(int x, int y)
{
logger->check(x >= 0 && y >= 0 && x < width && y < height,
"Pixel out of bounds ({},{}) / ({},{})", x, y, width, height);
return y * width + x;
}
glm::vec... |
#include "ddraw_vector_v2.h"
DDrawVectorDrawOverride::DDrawVectorDrawOverride
(const MObject& obj) : MHWRender::MPxDrawOverride(obj, NULL)
{
}
MHWRender::MPxDrawOverride*
DDrawVectorDrawOverride::create(const MObject& obj)
{
return new DDrawVectorDrawOverride(obj);
}
MHWRender::DrawAPI
DDrawVectorDrawOverr... |
// Vec library usage example: target hit detection
//
// This is an example of a basic interview-style problem on vector geometry for game programming.
// The premise is that we want to implement the hit-detection logic for a simple shooting gallery
// mini-game. There exists a flat, circular target at some position an... |
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Tencent is pleased to support the open source community by making WeChat QRCode available.
// Copyright (C) 2020 THL A29... |
/** @file
@brief Nod Plugin Implementation for OSVR
Enables Nod Data to be sent from the Nod service
into the OSVR server and used as an osvr object
Exposes:
3 analog (joystick x, joystick y, trigger)
10 buttons
1 Pose (x, y and z are still in development but orientation works)
these ... |
/*
* Copyright (c) 2019 Flight Dynamics and Control Lab
*
* 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, m... |
#include <stdint.h>
#include <stddef.h>
#include "debug.h"
#include "environment.h"
#include "controls.h"
const size_t max_allocator_space = 1024 * 16;
size_t next_allocation_start = 0;
uint8_t __attribute__((aligned(sizeof(size_t)))) allocator_space[max_allocator_space];
static void clear_allocator() {
next_all... |
/**
* If not stated otherwise in this file or this component's LICENSE
* file the following copyright and licenses apply:
*
* Copyright 2019 RDK Management
*
* 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 th... |
/****************************************************************************
* Copyright (c) 2015 - 2016, CEA
* 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 mus... |
//william 60/150
#include <iostream>
#include <algorithm>
#include <ctime>
#include <set>
#include <map>
#include <utility>
using namespace std;
#define MAXN 1000100
long long n, enc[MAXN];
struct TreapNode
{
long long elem, rs, ls, prioirty;
TreapNode *r, *l;
};
long long randint() {return rand();}
TreapNode* ... |
#include <iostream>
#include <sstream>
#include <vector>
#include <cstring>
#include "device_cl.h"
#include "compute_cl.h"
void _CheckCLError(cl_int error, int line)
{
if (error != CL_SUCCESS)
{
std::cout << "OpenCL call failed with error " << error << " @" << line << std::endl;
exit(1);
}
... |
#include "Halide.h"
#include "halide_image_io.h"
#include "halide_benchmark.h"
#include "bm3d.h"
#include "util.h"
#include <math.h>
#include <ctime>
using namespace Halide;
using namespace Halide::Tools;
/**
void ssim_(){
// Load an image:
Halide::Runtime::Buffer<uint8_t> a = load_image("../data/truffle.png... |
/* Copyright 2001, 2019 IBM Corporation
*
* 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 conditions and the
* following d... |
#include "MessageImageGenerator.h"
#include <QtGui/QPainter>
#include "../eirExe/Log.h"
#include "../eirExe/Result.h"
#include "../eirExe/ResultCode.h"
#include "ImageEntity.h"
MessageImageGenerator::MessageImageGenerator(void)
: width_i(0)
{
FUNCTION();
}
void MessageImageGenerator::setConfig(
con... |
// Copyright 2021 Edgecast Inc
// Licensed under the terms of the Apache 2.0 open source license
// See LICENSE file for terms.
/*
* Second Hit Caching Cache Admission Policy
*
*/
#include <algorithm>
#include <string>
#include <sstream>
#include <vector>
#include "bloomfilter.h"
#include "cache_policy.h"
#include... |
/* Copyright 2001, 2019 IBM Corporation
*
* 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 conditions and the
* following d... |
#include "SudokuType.hpp"
#include "SudokuFormat.hpp"
#include <assert.h>
#include <functional>
#include <unordered_map>
#include <unordered_set>
SudokuType::SudokuType()
: SudokuType(9)
{
}
SudokuType::SudokuType(unsigned size)
: SudokuType(isqrt(size), isqrt(size))
{
}
SudokuType::SudokuType(unsigned region_w... |
/*
*
* Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
*
* This library 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; either
* version 2.1 of the License, or (at your opti... |
#include <gtest/gtest.h>
#include <yarpl/Observable.h>
using namespace yarpl::observable;
TEST(Observable, SingleOnNext) {
auto a = Observable<int>::create([](std::unique_ptr<Observer<int>> obs) {
obs->onSubscribe(Subscription::create());
obs->onNext(1);
obs->onComplete();
});
std::vector<int> v;
... |
#include <string.h>
#include <string>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <string.h>
#include <errno.h>
#include <netinet/in.h>
#include <sys/poll.h>
//#i... |
/**************************************************************
* Project: DNS Export
* File: TCPReassembler.cpp
* Author: <NAME>
* University: Brno University of Technology
* Faculty: Faculty of Information Technology
* Course: Network Applications and Network Administration
* Date: 28.09.2018
* L... |
/*******************************************************************************
*
* MIT License
*
* Copyright (c) 2018 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
* ... |
// Copyright 2016 Google Inc. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the COPYING file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be... |
#include <v8.h>
#include <node.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <openssl/sha.h>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>
// link as C since we compile as C an... |
/*
* Copyright (C) 2011 Google Inc.
*
* 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 "platform.h"
#include "flash_ex.h"
/* Base address of the Flash sectors Bank 1 */
#define ADDR_FLASH_SECTOR_0 ((uint32_t)0x08000000) /* Base @ of Sector 0, 16 Kbytes */
#define ADDR_FLASH_SECTOR_1 ((uint32_t)0x08004000) /* Base @ of Sector 1, 16 Kbytes */
#define ADDR_FLASH_SECTOR_2 ((uint32_t)0x0... |
#include <sstream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <vector>
#include <cassert>
#include "Util.h"
#include <glm/gtx/transform.hpp>
const char* Util::PTXPath( const char* install_prefix, const char* cmake_target, const char* cu_stem, const char* ... |
#include<iomanip>
#include <sstream> // std::istringstream
#include "lm.hpp"
template <class T> LanguageModel* LanguageModel::load(T &in) {
LanguageModel *lm = NULL;
cerr << "[LOADING] start loading..." << endl;
string str, word;
size_t ngram_num_per_order[MAX_ORDER];
word_id_t word_ids[MAX_OR... |
#include <iostream>
#include <iomanip>
using namespace std;
/* The purpose of this program is to take and store user input regarding theater attendees' age, their favorite food, and give averages and other useful informaiton after user has input all data */
const int EIGHTTEEN_YEARS_OLD = 18;
const int THIRTY_YEARS_... |
#include "ImporterMesh.h"
#include "Application.h"
#include "ModuleFileSystem.h"
#include "ComponentMesh.h"
#include "Assimp/include/cimport.h"
#include "Assimp/include/scene.h"
#include "Assimp/include/postprocess.h"
#include "Assimp/include/cfileio.h"
bool ImporterMesh::Import(aiMesh* ai_mesh ,std::string& outp... |
/*
* DEBUG: section 00 UFS Store Dump Tool
* AUTHOR: <NAME>
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
*
* Squid is the result of efforts by numerous individuals from
* the Internet community; see the CONTRIBUTORS file for ful... |
#include <cmath>
#include "AMReX_GeometryShop.H"
#include "AMReX_WrappedGShop.H"
#include "AMReX_BoxIterator.H"
#include "AMReX_ParmParse.H"
#include "AMReX_RealVect.H"
#include "AMReX_SphereIF.H"
#include "AMReX_EBGraph.H"
namespace amrex
{
////////////
int checkGraph(const EBGraph& a_ebgraph)
{
const Box& d... |
#include "ssh_proxy.h"
#include "tpp_env.h"
SshProxy g_ssh_proxy;
SshProxy::SshProxy() :
ExThreadBase("ssh-proxy-thread"),
m_bind(NULL) {
m_timer_counter = 0;
m_noop_timeout_sec = 900; // default to 15 minutes.
}
SshProxy::~SshProxy() {
if (NULL != m_bind)
ssh_bind... |
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <cmath>
#include "window.hpp"
#include "shaderProgram.hpp"
#include "mesh.hpp"
#include "matrix.hpp"
#include "vertex.hpp"
#include "camera.hpp"
#include "texture.hpp"
const unsigned int WINDOW_WIDTH = 800;
const unsigned int WINDOW_HEIGHT =... |
#include "application_lab.h"
Application::Application()
{
initialized = false;
terminating = false;
}
Application::~Application()
{
terminating = true;
cycles.join();
delete[] data;
delete[] frames;
}
void Application::run_one_cycle()
{
if(connection_TCP->is_connected())
... |
/*
* MIT License
*
* Copyright (c) 2017 Twitter
*
* 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, ... |
#include <lfpRatiometer>
using namespace std;
// defining what's in the object's constructor
// user defines time window length (in samples) and sampling rate
lfpRatiometer::lfpRatiometer(int N_input, double sampling_input) {
// setting user defined variables
N=N_input;
f_size=N/2 + 1;
sampling=sampl... |
#include <cstdlib>
#include <cmath>
#include <set>
#include <iostream>
#include <algebra/infinite_vector.h>
using std::cout;
using std::endl;
using namespace MathTL;
class Squares
: public InfiniteDiagonalMatrix<float>
{
public:
double diag(const int& i) const
{
return i*i;
}
};
class SquaresPlusOne
: ... |
#include "pattern_book.h"
#include <algorithm>
#include <fstream>
using namespace std;
namespace {
ColumnPuyoList diff(const CoreField& before, const BitField& after)
{
ColumnPuyoList cpl;
for (int x = 1; x <= 6; ++x) {
for (int y = before.height(x) + 1; y <= 13; ++y) {
PuyoColor pc = a... |
#include "../Library/include/pkcs11.h"
#include <string.h>
//REMINDER: make sure to copy compile debug/release version of Library proj to generate dll file.
void encryptTest(CK_SESSION_HANDLE session) {
// setup
CK_BYTE iv[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x00, 0x01, 0x02, 0x03, 0x04, 0x... |
#include <stdio.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/inotify.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/joystick.h>
#include <linux/input.h>
const char* buttonNames[32] = {
"TRIGGER",
"THUMB",
"THUMB2",
"TOP",
"TOP2",
"PINKIE",
"BA... |
/**************************************************************************
*
* Copyright 2015 VMware, 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 with... |
// Example to run a model using one Edge TPU.
// It depends only on tflite and edgetpu.h
#include <algorithm>
#include <chrono> // NOLINT
#include <iostream>
#include <memory>
#include <ostream>
#include <string>
#include "edgetpu.h"
#include "src/cpp/examples/model_utils.h"
#include "src/cpp/test_utils.h"
#include ... |
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <assert.h>
#include <string.h> /* for memcmp */
#include <sys/time.h>
#include <time.h>
#include <iostream>
#include <sstream>
#include <iomanip>
#include "btree.h"
#include "defines.h"
using namespace std;
long diff_clocktime(struct timespec *time... |
// based on Seek Thermal Viewer/Streamer by http://github.com/fnoop/maverick
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "seek.h"
#include "SeekCam.h"
#include <iostream>
#include <string>
#include <signal.h>
#include <math.h>
#include <memory>
#include "args.h"
#include <fst... |
/**
* Basic Etermal example using the built
* in ETerminal and EShell implementations.
* This particular example uses glfw.
*/
#include <etermal/etermal.h>
#include <iostream>
#include <chrono>
#include <thread>
// Re-using the GLAD files used by Etermal itself -
// you can generate your own.
#define GLFW_DLL 1
#inc... |
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on
* the source.
*/
/*
* $Logfile: /Freespace2/code/JumpNode/JumpNode.cpp $
* $Revision: 110 $
... |
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include "../check-builder.hpp"
#include "../layoutable.hpp"
enum {
TOKEN_INVALID,
TOKEN_SCALAR,
TOKEN_STRING,
TOKEN_LBRACE,
TOKEN_RBRACE,
TOKEN_LBRACKET,
TOKEN_RBRACKET,
TOKEN_COLON,
TOKEN_COMMA,
TOKEN_E... |
#include "LagrangianHLLC.hpp"
#include "hydrodynamic_variables.hpp"
#include "../../misc/universal_error.hpp"
#include "../../misc/utils.hpp"
using namespace std;
namespace
{
class WaveSpeeds
{
public:
WaveSpeeds(double left_i,
double center_i,
double right_i) :
left(left_i),
center(center_i),
r... |
#include "core/math/Math.h"
#include "core-ext/utils/MeshBuilder.h"
#include "renderer/material/RrShaderProgram.h"
#include "renderer/texture/RrTexture.h"
#include "m04-editor/entities/UILightHandle.h"
#include "UILightHandleRenderer.h"
using namespace M04;
UILightHandleRenderer::UILightHandleRenderer ( UILightHandle... |
/*
* Chapter 2: Linked Lists
* Given two singly linked lists, determine if the two lists intersect.
* Return the intersecting node. Note that the intersection is defined
* based on reference, not value. That is, if the kth node of the first
* linked list is the exact same node (by reference) as the jth node of
* ... |
/*
* wsAnimation.cpp
*
* Created on: Nov 25, 2012
* Author: dsnettleton
*
* This file defines the class wsAnimation, which extends the abstract base
* type wsAsset. A wsAnimation is only part of the more complete type,
* wsModel, though the same animation can be applied to multiple wsMesh o... |
/* Copyright (c) 2015 Convey Computer Corporation
*
* This file is part of the OpenHT jpegscale application.
*
* Use and distribution licensed under the BSD 3-clause license.
* See the LICENSE file for the complete license text.
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "JobInfo.h"
#i... |
#include <iostream>
#include <string>
#include <algorithm>
#include <cassert>
#include <stdio.h>
#include <string.h>
#include <filesystem>
#include <stack>
#include "load.h"
#include "BlockHeader.h"
#include "Transaction.h"
#include "hashlib/sha256.h"
#include "Block.h"
#define CURL_STATICLIB 1
#include <curl/curl.h>... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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.... |
#include <iostream>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/wait.h>
using namespace std;
void Execute(char * path, char * args[], char * envp[]);
void StandardIn(char * path2, char * args2[], char * InputFile, char * envp[]);
void StandardOu... |
#include <vector>
#include <cstdio>
#include <cmath>
#include <sstream>
#include "Kokkos_Core.hpp"
#include "KokkosKernels_default_types.hpp"
#include "KokkosKernels_Handle.hpp"
#include "KokkosGraph_Distance1Color.hpp"
#include "KokkosGraph_Distance2Color.hpp"
//Greedy Graph Coloring
// -Generate the graph for a rec... |
#include "scene/lights/SpotLight.hpp"
#include "graphics/GPU.hpp"
#include "resources/Bounds.hpp"
SpotLight::SpotLight(const glm::vec3 & worldPosition, const glm::vec3 & worldDirection, const glm::vec3 & color, float innerAngle, float outerAngle, float radius) :
Light(color),
_lightDirection(glm::normalize(worldDire... |
#include "potts_meanpass_cpu_solver.h"
#include <math.h>
#include <thread>
#include <iostream>
#include <limits>
#include "cpu_kernels.h"
POTTS_MEANPASS_CPU_SOLVER_BASE::POTTS_MEANPASS_CPU_SOLVER_BASE(
const bool channels_first,
const int batch,
const int n_s,
const int n_c,
const flo... |
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
// Window dimensions
const GLint WIDTH = 800;
const GLint HEIGHT = 600;
GLuint VBO, VAO, shader, Rot... |
#define _CRT_SECURE_NO_WARNINGS
#include <boost/algorithm/string.hpp>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <vector>
#include <array>
#include <cmath>
using namespace std;
bool MergeFV(const vector<string>& inFiles, const vector<double>& inWeights_, const string& outFile) {
ve... |
#include <iostream>
#include "state_logic.h"
void best_move(State*, int, bool, bool, bool);
int best_path [3][3];
int current_path [3][3];
int best_value;
int options;
void copy_data(State* from, State* to);
void python_protocol ();
int main()
{
set_random();
init_piece_list();
wh... |
/*
<NAME>
Data Structures and Algorithms I, Spring 2016
Programming Assignment #1
-Creates an abstract base class (SimpleList) with derived classes (Stack, Queue)
-Parses a file and follows commands (operates on the SimpleLists)
*/
#include <iostream>
#include <fstream>
#include <sstream>
#include... |
#include <iostream>
#include <cmath>
#include <windows.h>
#include <ctime>
#include "mBotEmul.h"
#include "MeMCore.h"
class MBot : public MBotPos, MBotConfig {
MeDCMotor *motorR;
MeDCMotor *motorL;
public:
COLORREF ledLeftSet, ledRightSet;
bool buttonState = false;
MBot(MeDCMotor *rm, MeDCMotor *lm) {
motorR... |
/*****************************************************************************/
/* */
/* (C) Copyright 1995-1996 <NAME> */
/* Portions (C) Copyright 1999 <NAME> */
/* ... |
#include <Windows.h>
#include <iostream>
#include <vector>
#include <string>
#include "include\zlib.h"
struct File {
std::string Filename;
bool shouldCompress;
};
#pragma pack(push, 1)
struct Header {
char FileID[4];
int NumberOfEntries;
int DataLength;
};
struct IndexEntry {
char Name[12];
int Position;
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.