text stringlengths 3.08k 12.5k |
|---|
/* =========================================================================
Copyright (c) 2010-2012, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
... |
#include "core.h"
#include "screen.h"
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "../graphics/renderer.h"
#include "../graphics/glfwUtils.h"
#include "../graphics/texture.h"
#include "shader/shaders.h"
#include "../graphics/mesh/primitive.h"
#include "../graphics/debug/visualDebug.h"
#include "../graphic... |
/* Copyright 2019 Stanford University
* Copyright 2019 Los Alamos National Laboratory
*
* 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.... |
/*
MorseOutput.cpp - Library for flashing Morse code.
Created by <NAME>, 8 Feb 2011.
Inspired by <NAME>'s tutorial at
http://www.arduino.cc/en/Hacking/LibraryTutorial
BSD-Licensed (see LICENSE).
*/
#include "WProgram.h"
#include "MorseOutput.h"
// We'll calculate the dotting speed according to the PARIS sp... |
#include "Darknet_Detector/Darknet_Detector.h"
#include "Darknet_Detector/darknet/Option_Config.h"
Darknet_Detector::Darknet_Detector()
{
detector_loaded_ = false;
}
Darknet_Detector::~Darknet_Detector()
{
}
void Darknet_Detector::init_model(string cfg_file, string weights_file)
{
if(detector... |
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <v8.h>
#include <node.h>
#include <node_buffer.h>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <limits>
#include "code.h"
static Handle<Value> VException(const char *msg) {
HandleScope scope;
return Thr... |
#include "vulkan_device_score.hpp"
enum class vulkanQueueUseType : uint8_t
{
Render = 0,
Compute = 1,
Transfer_External = 2,
Transfer_Internal = 3
};
static const uint8_t vulkanQueueUseTypes_Count = 4;
inline static std::array<vulkanQueueUseType, vulkanQueueUseTypes_Count> QueueUseTypes = {
vul... |
#include "TwiFi.h"
#include <EEPROM.h>
#ifdef ESP8266
#include <ESP8266WiFi.h>
#elif ESP32
#include <WiFi.h>
#endif
/* Default Settings */
#define DEFAULT_WIFI 0
/* WiFi Attempt Duration */
#define WIFI_ATTEMPT_TIME 500
/* EEPROM Addresses. */
#define EEPROM_SAVED 0
#define EEPROM_WIFI 1
/* Functions *... |
#include <SDL2/SDL.h>
#include <sys/time.h>
#include "eye.h"
#include "hmd.h"
#include "ray_system.h"
#include "render_system.h"
#include "sdl.h"
#include "z_server.h"
void print_fps(int interval_sec);
class Main
{
public:
Main(int argc, char const *argv[]);
bool Init();
void RunMainLoop();
void Shutdown();... |
#include "UIField.h"
#include "InputManager.h"
#include "UIRenderer.h"
#include <GLFW/glfw3.h>
#include <iostream>
const int UIField::BIG_MAX_CHARS{ 25 };
const int UIField::MID_MAX_CHARS{ 10 };
const int UIField::SMALL_MAX_CHARS{ 7 };
namespace
{
const float TEXT_OFFSET{ 4.f };
const glm::vec4 DEACTIVATED_COLOUR... |
#include <vlog/embeddings/topktable.h>
#include <vlog/embeddings/topkiterator.h>
TopKTable::TopKTable(PredId_t predid, EDBLayer *layer,
std::string topk, std::string typeprediction,
std::string predentities, std::string predrelations) {
this->predid = predid;
this->topk = stoi(topk);
if (ty... |
/*
* Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.
*/
#in... |
/*=============================================================================
# Author: <NAME> - https://github.com/mjenrungrot/
# FileName: 512.cc
# Description: UVa Online Judge - 512
=============================================================================*/
#include <bits/stdc++.h>
usin... |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... |
/*
pmap: simple mapping utilities
Copyright (C) 2004 <NAME> <EMAIL>
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... |
// Scorer for DigitizerScorer
//
// ********************************************************************
// * *
// * *
// * This file was obtained from Topas MC Inc under the license *... |
/*
* Copyright (c) 2014 ARM Limited
* 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 of the funct... |
#include "gaussfft.hpp"
#include <boost/python/numpy.hpp>
//#include <chrono>
#include <iostream>
#include "nrlib/iotools/stringtools.hpp"
#include "nrlib/grid/grid.hpp"
#include "nrlib/grid/grid2d.hpp"
#include "nrlib/math/constants.hpp"
#include "nrlib/random/random.hpp"
#include "nrlib/variogram/variogram.hpp"
#i... |
/*
* fpu.cpp
*
* This example demonstrates how one can use odeint to solve the Fermi-Pasta-Ulam system.
* Created on: July 13, 2011
*
* Copyright 2011-2012 <NAME>
* Copyright 2011 <NAME>
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at... |
/*
* notifyd.cc : part of the Mace toolkit for building distributed systems
*
* Copyright (c) 2011, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of ... |
#include "7z.h"
// {4329AE19-DA56-4D1B-8DB9-D985929160BA}
MY_DEFINE_GUID(CLSID_ModuleSevenZip, 0x4329ae19, 0xda56, 0x4d1b, 0x8d, 0xb9, 0xd9, 0x85, 0x92, 0x91, 0x60, 0xba);
SevenZipModule::SevenZipModule()
{
m_nCurrentQuery = 0;
m_pPluginInfo = NULL;
}
bool SevenZipModule::Load()
{
string strPluginsPath = Info.Mo... |
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free ... |
#include <ros/ros.h>
#include <dynamic_reconfigure/server.h>
#include <visualization_msgs/Marker.h>
// Include opencv2
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#i... |
//Copyright (c) 2012, University of Cambridge
//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... |
/*
* GameRenderer.cpp
*
* Created on: Aug 16, 2015
* Author: axel
*/
#include <stddef.h>
#include <SDL2/SDL_blendmode.h>
#include <SDL2/SDL_pixels.h>
#include <SDL2/SDL_rect.h>
#include <SDL2/SDL_render.h>
#include <SDL2/SDL_timer.h>
#include <cstdint>
#include <iomanip>
#include <sstream>
#include <math.h>... |
/**
* Copyright (c) 2006-2018 Apple Inc. 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 b... |
/*
Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of
Technology
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 copyr... |
/*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 "stdafx.h"
#include "TelnetSession.h"
#define BUFFER_SIZE 10000
#include <iostream>
TelnetSession::TelnetSession(Connection *pConnection)
{
_connection = pConnection;
_buffer = static_cast<BYTE*>(malloc(BUFFER_SIZE));
_optionBuf = static_cast<BYTE*>(malloc(BUFFER_SIZE));
_outputBuf = static_cast<BYTE*>(m... |
#include <memory>
#include "utility/utility.h"
#include "sdl2d3/components.h"
#include "Box2DSystem.h"
Box2DSystem::Box2DSystem(sf::RenderWindow& rw)
: windowBody(nullptr)
, window(rw)
, debugEnabled(true)
, windowCollisionEnabled(false)
{
//Create world, initially 0 gravity
world = std::make_u... |
/*
* Copyright 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 required by applicable law or agree... |
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
using namespace std;
typedef unsigned char uchar;
#define CLUES 6
#define SIZE 5
typedef struct link {
link *up;
link *down;
link *left;
link *right;
uchar value;
bool dead;
}* node;
/*
* An interesting data structur... |
#include "ui_clip.h"
#include "core/os/os.h"
UI_Clip::UI_Clip() {
margin_[0] = 0;
margin_[1] = 0;
margin_[2] = 0;
margin_[3] = 0;
skin_="";
grid_="";
interval_= 128;
clipX_= 1;
clipY_= 1;
index_= 0;
autoplay_=false;
ctimer_=0;
axis_h_= AXIS_STRETCH_MODE_STRETCH;
axis_v_= AXIS_STRETCH_MODE_STRETCH;
cli... |
#include "Graphics/TextRenderer.h"
TextRenderer::TextRenderer()
{
this->_texture = NULL;
this->_program = NULL;
}
TextRenderer::~TextRenderer()
{
}
void TextRenderer::DrawStringAlpha(int x, int y, int textSize, const string &text, float rTop, float gTop, float bTop, float rBot, float gBot, float bBot, float alpha)... |
// std
#include <iostream>
#include <fstream>
// windows
#include <intrin.h>
#include <malloc.h>
#include <windows.h>
// OMLT
#include <DataAtlas.h>
#include <IDX.hpp>
#include <ContrastiveDivergence.h>
#include <BackPropagation.h>
#include <MovingAverage.h>
#include <ConfusionMatrix.h>
#include <RestrictedBoltzmannM... |
/****************************************************************************
* Copyright (c) 2021, 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 must retai... |
/*
* 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... |
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "Wither.h"
#include "../World.h"
#include "../Entities/Player.h"
#include "../Entities/WitherSkullEntity.h"
cWither::cWither(void) :
Super("Wither", mtWither, "entity.wither.hurt", "entity.wither.death", "en... |
/*************************************************************
* > File Name : c1084_2.cpp
* > Author : Tony
* > Created Time : 2019/11/05 16:53:17
* > Algorithm :
**************************************************************/
#include <bits/stdc++.h>
using namespace std;
typedef ... |
/*
* Copyright (C) 2011-2016 Intel Corporation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this li... |
#include "Vector2.h"
#include "sstream"
#include "string"
#include "Math.h"
#include <math.h>
const Vector2 Vector2::up = Vector2(0, 1);
const Vector2 Vector2::down = Vector2(0, -1);
const Vector2 Vector2::right = Vector2(1, 0);
const Vector2 Vector2::left = Vector2(-1, 0);
const Vector2 Vector2::zero = Vector2(0, 0... |
/*
* Copyright 1995, 1996 <NAME>. All rights reserved.
*
* This file is part of the Library RCS. See rcstest.c.
*/
/*
* rcsvfile.c - open & close the RCS ,v file and its temp successor
*
* External routines:
*
* RcsVfile::RcsVfile() - open the RCS ,v file and its temp successor
* RcsVfile::~Rcs... |
#define CROW_ENABLE_SSL
#include "crow_all.h"
#include <string>
#include <vector>
#include "PsiService.h"
#include "PsiController.h"
#include "DemoController.h"
#include "LogBase.h"
#include "AuthMiddleware.cpp"
int Main(char *filepath) {
LogBase::Inst();
int ret = 0;
// デモのために作ったログ表示機能
std::vecto... |
#include "gmw_structure.hpp"
#include <algorithm>
#include <limits>
bool postord_range::contains(int x) { return begin <= x && x <= end; }
int calc_cost_bottomup(std::shared_ptr<graphs::weighted_tree>& tree, std::vector<int>& delta,
std::vector<int>& cost, int idx, int p_idx);
int gmw_structu... |
/*
* Copyright (c) 2009 Car<NAME> University.
* 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
*
... |
//============================================================================
// Name : Assignment.cpp
// Author : near
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//===========================================================================... |
// SphereMapped.cpp
// OpenGL SuperBible
// Spheremapped texture projection
// Program by <NAME>.
#include <GLTools.h> // OpenGL toolkit
#include <GLMatrixStack.h>
#include <GLFrame.h>
#include <GLFrustum.h>
#include <GLGeometryTransform.h>
#include <StopWatch.h>
#include <math.h>
#include <stdlib.h>
#ifdef __APPLE_... |
/***************************************************************************************************************************
* move.cpp
*
* Author: Qyp
*
* Update Time: 2019.3.16
*
* Introduction: test function for sending command.msg
************************************************************************************... |
#include "stdafx.h"
#include "tpa.h"
#include <assert.h>
// Windows types used by the ExecuteAssembly function
typedef int32_t HRESULT;
typedef const char* LPCSTR;
typedef uint32_t DWORD;
typedef struct CALL_APPLICATION_MAIN_DATA
{
char* applicationBase;
char* runtimeDirectory;
int argc;
char** argv;
... |
////////////////////////////////////////////////////
// Mainfrm.cpp
#include "stdafx.h"
#include "resource.h"
#include "mainfrm.h"
// Definitions for the CMainFrame class
CMainFrame::CMainFrame() : m_sdiView(IDD_DIALOG1)
{
// Constructor for CMainFrame. Its called after CFrame's constructor
//Set m_SdiView ... |
#include "BarCodeEAN13.h"
#include <iostream>
#include <string.h>
#include <cctype>
using namespace std;
const string CBarCodeEAN13::ParityEncodings[] = {"111111", "110100", "110010", "110001", "101100", "100110", "100011", "101010", "101001", "100101"};
const string CBarCodeEAN13::EndBar = "101";
const st... |
/**
* coding: utf-8
*
* Copyright (C) 2013, <NAME>
* All rights reserved.
*/
#include <c4d_apibridge.h>
#include "internal.h"
#include "TeaPresso.h"
#include "res/c4d_symbols.h"
#define Tvfolder 1030299
TvLibrary* TvLibrary::Get(Int32 offset) {
static TvLibrary* lib = nullptr;
CheckLib(TEAPRESSO_LIB_ID,... |
/*
GUIDO Library
Copyright (C) 2002 <NAME>, <NAME>, <NAME>
Copyright (C) 2002-2013 Grame
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Grame Research Labora... |
/*
* Copyright (c) 2013-2016, ARM Limited, All Rights Reserved
* 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... |
#include <iostream>
#include <math.h>
#include "gcp/program/Program.h"
#include "gcp/models/GaussianClusterModel.h"
#include "gcp/util/Exception.h"
#include "gcp/util/LogStream.h"
#include "gcp/util/IoLock.h"
#include "gcp/util/Exception.h"
#include "gcp/pgutil/PgUtil.h"
#include "gcp/fftutil/Dft2d.h"
#include "gc... |
/*
// 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... |
/*This file is part of the FEBio Studio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio-Studio.txt for details.
Copyright (c) 2020 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any per... |
//
// Author: <NAME> (<EMAIL>)
//
//
//BSD 2-Clause License
//
//Copyright (c) 2018, Changjie
//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... |
// The MIT License (MIT)
// Copyright (c) 2013 lailongwei<<EMAIL>>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
/... |
/*
* Copyright 2015, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#include "BaseJob.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <Message.h>
#include "Conditions.h"
#include "Events.h"
BaseJob::BaseJob(const char* name)
:
BJob(name),
fC... |
#include "DataFetcher.h"
#include <common/Common.h>
#include <common/storage/Storagedata.h>
#include <components/worker/RetrieveChunksWork.h>
#include <components/worker/RetrieveDirEntriesWork.h>
#include <components/worker/RetrieveFsIDsWork.h>
#include <components/worker/RetrieveInodesWork.h>
#include <program/Progra... |
#include <iostream>
#include <sstream>
#include <fstream>
#include <stdexcept>
#include <map>
#include "tsp_instance.h"
using namespace std;
static inline string <rim(string &s) {
s.erase(s.begin(), find_if(s.begin(), s.end(), not1(ptr_fun<int, int>(isspace))));
return s;
}
static inline string &rtrim(st... |
// MIT License
//
// Copyright (c) 2020 <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, me... |
#include "GLUT/glut.h"
#define numVerts 8
class CPt2D {
public:
float x, y;
};
CPt2D verts[20] =
{
{100.0, -30.0},
{-100.0, 30.0},
{0.0, 50.0},
{400, 0},
{350, 250},
{-350, -250},
{... |
template<class... Ts>
void run_function(void *function, const Ts&... args) {
reinterpret_cast<void(*)(Ts...)>(function)(args...);
}
template<typename T>
void inline delete_array_null(T * ptr){
if(ptr != nullptr) {
delete[] ptr;
ptr = nullptr;
}
}
template <typename T>
std::string m128i_to_string(const __m128i... |
#include <stdio.h>
#include "platform/platform.h"
#include "T3D/Trigger.h"
#include "T3D/aiFishPlayer.h"
#include "T3D/InfluenceSwish.h"
static const F32 SWISH_BOX_FADE_OUT_TIME = 1.0f; //how long trigger effects continue when trigger is gone
static const F32 SWISH_SPEED = 0.4f; //how much each finger effects ... |
// Translated from hawaii.tcl
/*
Produce figure 6-12 from the VTK Textbook.
It is a translation of the original hawaii.tcl with a few additional
enhancements.
The image is centered on Honolulu, O'ahu.
Diamond Head is the crater lower left. Punchbowl is the crater in the centre.
The colorScheme option allows you to s... |
// Source file for the simple file conversion algorithm
// include files
#include "RNDataStructures/RNDataStructures.h"
#include <algorithm>
// program arguments
static int print_verbose = 0;
static int print_debug = 0;
static char *train_filename = NULL;
static char *test_filename = NULL;
... |
//
// Created by DefTruth on 2021/3/28.
//
#include "ort_utils.h"
//*************************************** ortcv::utils **********************************************//
Ort::Value ortcv::utils::transform::create_tensor(const cv::Mat &mat,
const std::vector<int64_t> &... |
/**************************************************************************\
* 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... |
//
// Copyright (c) 2018 <NAME>.
//
#include "Snake.hpp"
bool Snake::snake_is_here(int x, int y) {
Segment *segment = tail->to_head;
while (segment != nullptr) {
if (segment->x == x && segment->y == y)
return true;
segment = segment->to_head;
}
return false;
}
bool Snake... |
////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010-2015, University of Washington and Battelle
// Memorial Institute. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following cond... |
#include "binary.h"
using namespace plaidgadget;
std::string plaidgadget::ToStdString(const String &str)
{
std::string res(str.length(), ' ');
std::copy(str.begin(), str.end(), res.begin());
return res;
}
String plaidgadget::ToPGString(const std::string &str)
{
String res(str.length(), L' ');
... |
/*
* Shared main() & friends for test-suite programs.
*
*/
#ifdef WIN32
#include <winsock2.h>
#include <windows.h>
#else
#include <unistd.h>
#define Sleep( x ) sleep( x )
#endif
#include <ctype.h>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "test.... |
#include "colour.h"
void Colour::ToRGB(unsigned long a_colour, float& a_r, float& a_g, float& a_b)
{
a_r = float( ( a_colour >> 16 ) & 0xff ) / 255.f;
a_g = float( ( a_colour >> 8 ) & 0xff ) / 255.f;
a_b = float( ( a_colour & 0xff ) ) / 255.f;
}
void Colour::ToARGB(unsigned long a_colour, unsigned c... |
#include <include/glew.h>
#include "GLShader.h"
#include <GLUtils/GLUtils.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <io.h>
/**
Print out the information log for a shader object
*/
void printShaderInfoLog(GLuint shader){
int infologLength = 0;
int charsWritten... |
/*=============================================================================
* This is a part of the yLib Software Development Kit.
* Copyright (C) 1998-2000 YEAsoft Int'l.
* All rights reserved.
*=============================================================================
* Copyright (c) 1998-2000 YEAsoft Int... |
#include "ImageProcessing.h"
ImageProcessing::ImageProcessing(
const char *_inImgName,
const char *_outImgName,
int *_height,
int *_width,
int *_bitDepth,
... |
#include "UICellView.h"
void UICellView::setup(UICellModel _uiCellModel)
{
beforeSensorValue = SENSOR_VALUE_NULL;
uiCellModel = _uiCellModel;
uiFaceView.setup(&uiCellModel);
uiGraphView.setup(&uiCellModel);
uiGraphView.draw();
}
void UICellView::draw()
{
String title = uiCellModel.title;... |
/**
* func_instr.cpp - The methods for implementing the concept of
* disassembler of MIPS ISA.
* @author <NAME> <<EMAIL>>
* Copyright 2014 uArchSim iLab project
*/
#include <func_instr.h>
#include <sstream>
#include <iomanip>
#include <cstring>
#include <cstdlib>
const FuncInstr::ISAEntry FuncInstr::isaTable[] =
... |
#include "structure.h"
typedef struct
{
int freq;
int depth_size;
} TaxMappedInfo_t;
map<int, int64_t> TaxLevelFreqMap;
map<int, TaxMappedInfo_t> TaxMappedInfoMap;
void EstTaxDepth()
{
int64_t rid;
int taxid, size;
map<int, int> RefIdxFreqMap; //first=ref_idx, second=frequency
map<int, int>::iterator iter;
f... |
#include "Resource.h"
#include <windows.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include "OGLWindow.h"
#include "Matrix4x4.h"
#include "Vector4D.h"
#include <iostream>
// Initialising x, y, z axis to 1
float x_axis, y_axis, z_axis = 1;
OGLWindow::OGLWindow()
{
}
OGLWindow::~OGLWindow()
{
//Clean up the renderabl... |
#include "SVF2.h"
pdsp::SVF2::SVF2(){
addInput("signal", input_signal);
addInput("freq", input_cutoff);
addInput("reso", input_reso);
addOutput("lpf", output_lpf);
addOutput("hpf", output_hpf);
addOutput("bpf", output_bpf);
addOutput("notch", out... |
#pragma once
class LightDesc_t;
class lightpos_t;
enum LightType_t
{
MATERIAL_LIGHT_DISABLE = 0,
MATERIAL_LIGHT_POINT,
MATERIAL_LIGHT_DIRECTIONAL,
MATERIAL_LIGHT_SPOT,
};
class LightDesc_t
{
public:
LightType_t m_Type; //0x0000
Vector m_Color; //0x0004
Vector m_Position; ... |
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/freeglut.h>
#include <iostream>
#include <string>
#include "camera.h"
#include "parse.h"
int SPLINE_DIVISION = 10;
int left_mouse_button = 0;
int right_mouse_button = 0;
int last_x = 0, last_y = 0;
int zoom_mode = 0;
int width = 0, height = 0;
unsigned timestep = ... |
/*
* ntpclient.cpp - Library to get time from an ntp server
* Created by Davide `rainbow` Gerhard
* 12 May 2019
* For the license see LICENSE
*
* NOTE: very simple implementation; surely not compliant with RFC 5905
*
* From https://github.com/arduino-libraries/NTPClient
*/
#include <Arduino.h>
#include "ntpc... |
/*
optional.h
Copyright (c) <NAME>) 2017
Unit tests for AVL tree implementation in avltree.h.
*/
#include <assert.h>
#include "avltree.h"
#include "avltree-test-helper.h"
#include <iostream>
using std::cout;
using std::endl;
using std::left;
using std::right;
#include <iomanip>
using std::setw;
using std::setfill;
... |
// Copyright (c) 2017 ASMlover. All rights reserved.
//
// ____ __
// /\ _`\ /\ \
// \ \ \/\_\\ \ \___ __ ___ ____
// \ \ \/_/_\ \ _ `\ /'__`\ / __`\ /',__\
// \ \ \L\ \\ \ \ \ \/\ \L\.\_/\ \L\ \/\__, `\
// \ \____/ \ \_\ \_\ \__/.\_\ \____/\/\____/
// \/___/ \/_/\/_/\/__/\/_/\/___... |
#include <ros/ros.h>
#include <stdlib.h>
#include <stdio.h>
#include <std_msgs/String.h>
#include <tough_perception_common/MultisenseImageInterface.h>
#include <tough_perception_common/MultisensePointCloud.h>
#include <opencv2/core.hpp>
#include <opencv/highgui.h>
#include <pcl/point_types.h>
#include <pcl_ros/transfor... |
#include <iostream>
#include <cstring>
#include <string.h>
#include <itksys/Process.h>
#include <itksys/SystemTools.hxx>
#include <itkMultiThreader.h>
#include <itksys/SystemInformation.hxx>
#include "metaCommand.h"
struct ThreadStruct
{
std::string program;
float virtualMemUsed;
float physicalMemUsed;
float... |
/*
* Copyright 2010-2014 <NAME>. All rights reserved.
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
#include <ctype.h> // isspace
#include <stdint.h>
#include <stdlib.h> // size_t
#include <string.h> // strlen
#include <bx/hash.h>
#include "dbg.h"
#include "cmd.h"
#include <string>
#include <unord... |
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif
#include "Player.h"
#include"Bullet.h"
#include "Map.h"
#include <Input.h>
#include "TextureManager.h"
#include "Score Board.h"
const InputSet Player::PLAYER1_INPUTSET =... |
#include "ofMain.h"
#include "libuvc.h"
#include "bayer.h"
std::vector<uint8_t> bayer, rgb;
std::vector<uint16_t> bayer16, rgb16;
bool isFrameNew = false;
uvc_context_t *ctx;
uvc_device_t *dev;
uvc_device_handle_t *devh;
uvc_stream_ctrl_t ctrl;
uvc_error_t res;
// this isn't really safe. there should be a thread ch... |
/*
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, merge, publish, d... |
//
// Created by mac on 25/03/17.
//
#include "SearchType.h"
std::vector<Path*> SearchType::ExpandNode(Node* currentNode, Problem& problem) {
int actionCount = 4;
//Need to track path (nodes and actions)
std::vector<Path*> successors;
//first in action count is LEFT
for( int i = 0; i < actionCoun... |
/*************************************************************************************************************
Copyright (c) 2012-2016, Harman International Industries, Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the fol... |
#include <SFML/Graphics.hpp>
#include "vector_visualizer.h"
#include <vector>
#include <numeric>
#include <cstdlib>
#include <iterator>
using namespace std;
template<typename T>
class SortVisualizer {
private:
sf::FloatRect workspace;
sf::RenderWindow* window;
sf::View view;
VectorVisualizer<T>* vis... |
//
// SVFaceDetectPointNode.cpp
// SVEngine
// Copyright 2017-2020
// <NAME>,<NAME>,<NAME>,<NAME>,<NAME>,<NAME>
//
#include "SVFaceDetectPointNode.h"
#include "SVScene.h"
#include "SVCameraNode.h"
#include "../mtl/SVMtlCore.h"
#include "../rendercore/SVRenderMesh.h"
#include "../core/SVGeoGen.h"
#include "../basesys/SV... |
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* ... |
// https://leetcode-cn.com/problems/minimum-window-substring/
// 失败:未考虑字符串t有重复
#include <cstdio>
#include <string>
#include <vector>
#include <unordered_map>
using namespace std;
struct Node {
int index, start, end;
explicit Node(int i): index(i), start(-1), end(-1) { }
};
class Solution {
public:
string minWin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.