text stringlengths 3.08k 22k |
|---|
/*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... |
/*
* LdapNetworkBackend.cpp
*
* Created on: 06.01.2017
* Author: felix
*/
#include <iostream>
#include <QtCore/QDateTime>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QList>
#include <QtCore/QTextStream>
#include <backend/ConfigurationLoader.h>
#include <backend/DhcpHost.h>
#include <back... |
/**
8 Queens Problem
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_13_A
8 queens puzzle using Minimum Remaining Value(MRV) for row selection
and min-conflicts heuristic for col selection
<NAME>
05/02/2016
**/
#include <iostream>
#include <cstdlib>
#include <algorithm>
#in... |
/*
* Copyright (c) 2020-2021, NVIDIA 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... |
#include "SimplePose.h"
bool SimplePose::hasGPU = true;
bool SimplePose::toUseGPU = true;
SimplePose *SimplePose::detector = nullptr;
SimplePose::SimplePose(AAssetManager *mgr, bool useGPU) {
hasGPU = ncnn::get_gpu_count() > 0;
toUseGPU = hasGPU && useGPU;
PersonNet = new ncnn::Net();
// opt 需要在加载前设置... |
/*
* Copyright 2020-2021 AVSystem <<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 o... |
#include <GLFW/glfw3.h>
#include <iostream>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "include/Shader.h"
#include "include/Model.h"
#include "include/Camera.h"
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void mou... |
#include "render.h"
#define _USE_MATH_DEFINES
#include <math.h>
const char* kColoredPrimitiveVertexShader = R"glsl(
# version 330 core
layout (location = 0) in vec2 position;
uniform mat4 projection;
void main() {
gl_Position = projection * vec4(position, 0, 1);
}
)glsl";
const char* kColoredPrimitiveFragme... |
/**
* @file main.cpp
*
* @date Apr 12, 2011
* @author <NAME>
*/
#include <tlm.h>
#include <string>
#include "reporting.h"
#include "globaldefs.h"
#include "RAM.h"
#include "IoModule.h"
#include "SimpleBusAT.h"
#include "Cpu.h"
#include "Accelerator.h"
using namespace sc_core;
// command line parsing
#include ... |
#pragma once
#include "Engine/Math/Vector4.hpp"
#include "Engine/Math/MathUtils.hpp"
#include "Engine/Math/VectorUtils.hpp"
#include "Engine/Math/EulerAngles.hpp"
class Matrix4 {
public:
//STRUCTORS
Matrix4();
Matrix4(Vector4 r1, Vector4 r2, Vector4 r3, Vector4 r4);
Matrix4(float arr[16]);
//SCALING
static Mat... |
#include "gui_game_state.h"
#include "gui_game_state_manager.h"
#include "gui_states.h"
#include "gui_game_ships_placing_state.h"
#include "game_battle_area.h"
#include "application.h"
#include "game_brain_player.h"
#include "gui_button_factory.h"
#include "engine/graphics.h"
#include "engine/font.h"
#include "engine/... |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <GLES2/gl2.h>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include <fstream>
#include <iomanip>
#include "BoxExpandView.hpp"
#incl... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/*** This code is rewritten by <NAME> (<EMAIL>) ***
*** funded by iPlantCollaborative (www.iplantcollaborative.org). ***/
#include <stdio.h>
#includ... |
/* -*- mode: C++; indent-tabs-mode: nil; -*-
*
* This file is a part of LEMON, a generic C++ optimization library.
*
* Copyright (C) 2003-2013
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
*
* Permission to use, modify and distribut... |
#include <algorithm>
#include <cassert>
#include <list>
#include <string>
#include <string.h>
#define EGL_EGLEXT_PROTOTYPES 1
#include "../Client.h"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <EGL/eglext.h>
#include <nexus_config.h>
#include <nexus_core_utils.h>
#include <nexus_display.h>
#include <n... |
#include "BitmapPrimitiveShape.h"
#include "Bitmap.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include "IndexIterator.h"
#include <MiscLib/Performance.h>
#include <float.h>
using namespace MiscLib;
void BitmapPrimitiveShape::PreWrapBitmap(
const GfxTL::AABox< GfxTL::Vector2Df > &b... |
#include "ros/ros.h"
#include "ros/package.h"
#include <cstdint>
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <set>
#include <thread>
#include "point.hpp"
#include "common.hpp"
#include "visualization_msgs/Marker.h"
#include "nord_messages/Vector2.h"
#include "nord_messages/PlanSr... |
/*
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of cond... |
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <random>
#include <fftw3.h>
#include <sstream>
#include "binner.hpp"
#include "galaxy.hpp"
std::vector<galaxy> fileRead(std::string filename) {
std::vector<galaxy> gals;
std::ifstream fin(fi... |
/*
* Object segmentation via PCL Euclidean Cluster Extraction ROS node
* neven_ros_node.cpp
*
* _ _______ _______ __
* / |/ / __/ | / / __/ |/ /
* / / _/ | |/ / _// /
* /_/|_/___/ |___/___/_/|_/
*
*
* Copyright (C) 2020 Neven
* By 1487Quantum (https://github.co... |
/*************************************************
* main.cpp
*
* Release: Sep 2016
* Update: Sep 2016
*
* University of North Carolina at Chapel Hill
* Department of Computer Science
*
* <NAME>, <EMAIL>
*************************************************/
#include <cstdlib>
#include <vector>
#include <s... |
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <netdb.h>
#include <netinet/in.h>
#include <unistd.h>
#include <string>
#include <cstring>
#include <thread>
#include <utility>
#include <queue>
#include <csignal>
class ReadException : public std::exception {};
class WriteException : public std::exce... |
/*
* Copyright (c) 2020-2021 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
// BuildSystemGenerator.cpp
#include "BuildSystemGenerator.h"
#include "Cbuild.h"
#include "CbuildKernel.h"
#include "CbuildUtils.h"
#include "ErrLog.h"
#include "RteFsUtils.h"
#include "RteUtils.h"
#incl... |
#include "AnalysisGraph.hpp"
#include <range/v3/all.hpp>
#include <sqlite3.h>
using namespace std;
using namespace delphi::utils;
/*
============================================================================
Private: Initializing model parameters
=====================================================================... |
/****************************************************************************
Copyright (c) 2011 cocos2d-x.org http://cocos2d-x.org
Copyright (c) 2011 <NAME>
Copyright (c) 2011 <NAME>, <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associa... |
#include "allh.h"
Circle::Circle(PSC * c):Curve(c) {}
/*
Arguments below are:
Psc * c: the piecewise smooth complex being meshed.
Point & a: the centerpoint of the circle.
double b: the radius of the circle.
*/
Circle::Circle(PSC * c, Point & a, double b):Curve(c) {
type = CURVE_CIRCLE;
this->c = c;
... |
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthBendvelope bendvelope1; //xy=506.888916015625,291.8888854980469
AudioSynthBendvelope bendvelope2; //xy=511.8889465332031,372.8888854980469
AudioSy... |
// Copyright (c) 2012 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.
// This file is meant for debugging use to manually trigger a proper
// suspend, excercising the full path through the power manager.
// The actual... |
/** @file
A brief file description
@section license License
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
... |
/*
* Tencent is pleased to support the open source community by making PaxosStore available.
* Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of... |
#include "common.h"
#include <pybind11/stl.h>
#define GET_SKSCALAR_PTR(pos) \
((pos.is_none()) ? nullptr : &(pos.cast<std::vector<SkScalar>>())[0])
void initShader(py::module &m) {
py::class_<SkShader, sk_sp<SkShader>, SkFlattenable> shader(
m, "Shader", R"docstring(
Shaders specify the source color(s) for wh... |
/**
GDevelop - Text Object Extension
Copyright (c) 2008-2016 <NAME> (<EMAIL>)
This project is released under the MIT License.
*/
#include <SFML/Graphics.hpp>
#include "GDCore/Tools/Localization.h"
#include "GDCpp/Runtime/CommonTools.h"
#include "GDCpp/Runtime/FontManager.h"
#include "GDCpp/Runtime/ImageManager.h"
#in... |
/**************************************************************************
*
* Copyright 2017 Intel Corporation
* 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 Softwar... |
/*
* Copyright (c)2015 - 2016 Oasis LMF Limited
* 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 ... |
// ------------------------------------------------------------------------------
// File and Version Information:
// $Id: DetAlignElem.cc,v 1.21 2004/08/06 05:58:28 bartoldu Exp $
//
// Description: Define the alignment parameters for a detector element. These
// consist of a translation vector plus a set of ... |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, 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
//
//===---------------------------... |
#include "BasicTypes.h"
#include <math.h>
#include "CRenderTerrain.h"
#include "CCockpit.h"
#include "gl/glut.h"
#include "CTextureLoader.h"
#include "CSolidSphere.h"
static char s[1000];
static int frame=0,time,timebase=0;
int font=(int)GLUT_BITMAP_HELVETICA_10;
#define PI 3.14159265
int CRenderTerrai... |
#include "mesh.h"
#include "core.h"
void mesh::compute_normals()
{
for(auto & v : vertices) v.normal = float3();
for(auto & t : triangles)
{
auto & v0 = vertices[t[0]], & v1 = vertices[t[1]], & v2 = vertices[t[2]];
const float3 n = cross(v1.position - v0.position, v2.position - v0.position)... |
//
// Created by nunol on 12/22/2021.
//
#include <Abstractions/Environment.hpp>
#include <cstdarg>
#include <csignal>
std::shared_ptr<Logger> Environment::m_logger;
std::unordered_map<std::string, std::unordered_map<std::string, void*>> Environment::m_components;
AtomicCounter Environment::m_objectsCount(0);
Atomi... |
// -*- C++ -*-
// SPDX-License-Identifier: BSL-1.0
//
// Copyright <NAME> 2019-2020.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#include "reader.h"
#include <absl/strings/string_view.h>
#incl... |
#include "IKTrackingTask.h"
#include <OpenSim/Simulation/Model/Model.h>
#include "IKTaskData.h"
#include "OpenSimUtil.h"
using namespace OpenSim;
using SimTK::Vec3;
using SimTK::Vector;
using SimTK::Transform;
using std::vector;
using std::cout;
using std::endl;
/* IKTrackingTask ***********************************... |
#include "altruct/algorithm/search/binary_search.h"
#include "gtest/gtest.h"
#include <vector>
using namespace std;
using namespace altruct::search;
TEST(binary_search_test, poly_zero) {
auto p = [](double x) { return ((1 * x - 2) * x + 0) * x + 1; };
EXPECT_NEAR(-0.618033988749895, lower_bound(-... |
/*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 pers... |
/*
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; c-set-offset 'innamespace 0; -*- */
/*
* LLNS Copyright Start
* Copyright (c) 2016, Lawrence Livermore National Security
* This work was performed under the auspices of the U.S. Department
* of Energy by Lawrence Livermore National Laboratory in part ... |
// https://github.com/shouxieai/unet-pytorch
#include <builder/trt_builder.hpp>
#include <infer/trt_infer.hpp>
#include <common/preprocess_kernel.cuh>
#include <common/ilogger.hpp>
using namespace cv;
using namespace std;
bool requires(const char* name);
static vector<int> _classes_colors = {
0, 0, 0, 128, 0, 0,... |
// Copyright (c) 2015 The CSUTIL 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 <deque>
#include <string>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <assert... |
/*************************************************************************/
/* quick_open.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/tools/flip_server/mem_cache.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
#incl... |
/*
* Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file.
*
* 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 lis... |
#include "search/engine.hpp"
#include "search/search_tests_support/test_search_engine.hpp"
#include "search/search_tests_support/test_search_request.hpp"
#include "search/tracer.hpp"
#include "indexer/classificator_loader.hpp"
#include "indexer/data_source.hpp"
#include "storage/country.hpp"
#include "storage/country... |
#include <functional>
#include "fmt/core.h"
#include "hier_tree.hpp"
unsigned int Hier_tree::generic_pattern_size(const pattern_t& gset) const {
unsigned int total = 0;
for (auto p : gset) {
total += p.second;
}
return total;
}
// given a generic pattern, find all instantiations of that pattern in a subg... |
/*
Copyright (c) 2009, 2011, Monty Program Ab
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 "dag/dag_block.hpp"
#include <gtest/gtest.h>
#include <iostream>
#include <vector>
#include "common/static_init.hpp"
#include "common/types.hpp"
#include "dag/vdf_sortition.hpp"
#include "logger/log.hpp"
#include "node/full_node.hpp"
#include "util/util.hpp"
#include "util_test/samples.hpp"
#include "util_t... |
#include <bitset>
#include "tables.h"
struct WeightClass
{
static const int Size = 2;
static const QString Type;
static WeightClass parse(const quint8 *data)
{ return { qFromBigEndian<quint16>(data) }; }
static QString toString(const WeightClass &value)
{
QString name;
switch... |
#include "Names.hpp"
#include "BranchSafety.hpp"
#include "Utility.hpp"
#include <llvm/IR/Module.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/IR/DebugInfo.h>
#include <llvm/Pass.h>
#include <llvm/IR/CFG.h>
#include <llvm/IR/InstrTypes.h>
#include "llvm/IR/InstIterator.h"
#include <sstream>
using namespace l... |
#include "Globals.h"
#include "Application.h"
#include "ModulePlayer.h"
#include "Primitive.h"
#include "PhysVehicle3D.h"
#include "PhysBody3D.h"
ModulePlayer::ModulePlayer(Application* app, bool start_enabled) : Module(app, start_enabled), vehicle(NULL)
{
turn = acceleration = brake = 0.0f;
}
ModulePlayer::~ModuleP... |
//===-- MipsSEFrameLowering.cpp - Mips32/64 Frame Information -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
// ===================================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top leve... |
#include "popstar.h"
#include "mainwindow.h"
#include "game_over.h"
#include "ui_popstar.h"
#include <iostream>
#include <Windows.h>
popstar::popstar(QWidget *parent) :
QWidget(parent),
ui(new Ui::popstar)
{
ui->setupUi(this);
this->setFixedSize(636, 350); // 固定窗口大小
this->set... |
#include "HelloWorldScene.h"
USING_NS_CC;
Scene* HelloWorld::createScene()
{
// 'scene' is an autorelease object
auto scene = Scene::create();
// 'layer' is an autorelease object
auto layer = HelloWorld::create();
// add layer as a child to scene
scene->addChild(layer);
// return th... |
/**
*************************************************************
* @file glovehttpclient.cpp
* @brief HTTP Client for Glove
*
* @author <NAME> <<EMAIL>>
* @version 0.3
* @date 1 jun 2016
*
* Notes:
* - Lots of ideas borrowed from other projects
*
* Changelog
* 20170127 : - Error handler for background requests
* 2... |
#include <giygas/Matrix4x4.hpp>
#include <cmath>
using namespace giygas;
using namespace std;
Matrix4x4 Matrix4x4::operator*(const Matrix4x4 &rhs) const {
Matrix4x4 out;
// Note: Parenthesis added for readability.
// TODO: Look for optimizations here.
out.c0r0 = (c0r0 * rhs.c0r0) + (c1r0 * rhs.c0r1) +... |
//---------- P_User.cpp -----------------------------------------------------
//----------------------------------------------------------------------------
#include "precHeader.h"
//----------------------------------------------------------------------------
#include "P_User.h"
#include "pOwnBtnImageStd.h"
#include "m... |
/* <NAME>
Feb 16 2015 */
#include "parse.h"
std::map<std::string, std::string> Parse::dict; // first string maps to second string
void Parse::initialize()
{
// map various possible user-input strings to the constant ID used throughout the engine
using P = Parse;
if (dict.size() == 0)
{
std::cout << "\nLoadin... |
/*
* Copyright 2018 Metrological
*
* 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... |
/*
* Copyright (c) 2016-2017 dresden elektronik ingenieurtechnik gmbh.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
*/
#include <QString>
#include <QTcpSocket... |
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... |
//Day6Task2_RamiWailShoula.cpp
// Implement all operator overloading in Class Complex;
//Full implementation without using <complex> header
//includes
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
using std::string;
// Complex class definition
class Complex {
public:
// Default + Ove... |
#include "xSL20.h"
void xSL20::begin(int refrate) {
refreshRate = refrate;
delay(5);
readEEPROM();
writeTrimmingValue();
setConfiguration();
preCalculateConstants();
}
void xSL20::measure(bool calculate_temps) {
if (checkConfig()) {
readEEPROM();
writeTrimmingValue();
setConfiguration();
}
readPTAT();
... |
#include "runetaggenerator.h"
#include <QGraphicsEllipseItem>
#include <QPrinter>
#include <QPrintDialog>
#include <QFileDialog>
#include <QFile>
#include <QString>
#include <QMessageBox>
#include <QThread>
#include <fstream>
#include <time.h>
#include <vector>
#include <cassert>
#include <MarkPoint.... |
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
class BreakOut : public olc::PixelGameEngine{
public:
BreakOut(){
sAppName = "Breakout";
}
private:
olc::vf2d vBatPos{ 0.0f, 0.0f };
float fBatWidth{ 40.0f };
float fBatSpeed{ 3.0f };
olc::vf2d vBallPos{ 0.0f, 0.0f };
olc::vf2d vBallDir{ 0.0f, 0.0f... |
#include "ch.h"
#include "hal.h"
#include <math.h>
#include "ws2812b.h"
#include "stm32f4xx_conf.h"
// Settings
#define WS2812B_CLK_HZ 800000
#define WS2812B_LED_NUM 4
#define TIM_PERIOD (((168000000 / 2 / WS2812B_CLK_HZ) - 1))
#define LED_BUFFER_LEN (WS2812B_LED_NUM + 1)
#define BITBUFFER_PAD 50
#define BITBUFFER... |
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
//#include <unordered_set>
#include "hashTable.h"
#include "timer.h"
using namespace std;
#define MAXROWS 500
#define MAXCOLS 500
char grid[MAXROWS][MAXCOLS];
// Forward declarations
//unordered_set<string> table;
int stringCount;
//hashTa... |
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <iostream>
# include <cctype>
# include <exception>
# include <string>
// Standard Template Library
# include <list>
# include <map>
using namespace std;
// Global variables (Remember to put the prefix 'g')
/**
Error message
// Lexical error
... |
/*
* Copyright (C) 2016 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... |
/*
* elfutils.cpp
*
* Created on: 2014年10月7日
* Author: boyliang
*/
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stddef.h>
#include "common.h"
#include "elfutils.h"
static inline Elf32_Shdr *findSecti... |
#include <Windows.h>
#include <GLFW/glfw3.h>
#include <gl/GLU.h>
#include <iostream>
#include <vector>
#include <cstdlib>
#include "colors.h"
#include "primitives.h"
/* rotate Sun */
float sunAngle = 0.0f;
/* scale Sun */
float sunSA = 1.5f;
float sunSB = 1.5f;
float sunSC = 1.5f;
/* translate Sun */
float sunTA = -... |
#include "daisySP.h"
#include "daisy_patch.h"
#include "reverb.h"
#include "knog.h"
using namespace daisy;
using namespace daisysp;
DaisyPatch patch;
Reverb verb;
DcBlock blk[2];
Knog xover;
Knog rtlow;
Knog rtmid;
Knog fdamp;
Knog eq1fr;
Knog eq1gn;
Knog eq2fr;
Knog eq2gn;
enum State : uint8_t
{
ParamSelect ... |
/*
Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is also distributed with cer... |
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related... |
#include <iostream>
#include <fstream>
#include <chrono>
#include <string>
// Because I'm too lazy to type
typedef uint64_t ull_t;
typedef uint32_t u_t;
typedef int64_t ll_t;
unsigned verb_lvl = 0;
void read_or_die(std::string pattern, std::istream& input) {
for (auto a:pattern) {
if (a != input.get()) {... |
#include "../../core/PhysiCell_cell.h"
// #include "libsbmlsim/libsbmlsim.h"
// Model_t* my_model;
SBMLDocument_t* sbml_doc;
// Model my_sbml_model;
//extern "C" {
//}
//SBMLSIM_EXPORT myResult* simulateSBMLFromFile(const char* file, double sim_time, double dt, int print_interval, int print_amount, int method, int... |
/*****************************************************************************
* @file : test_gammacorrection.cpp
* @brief : Testbench for Gammacorrection.
*
* System: : cloudFPGA
* Component : Role
* Language : Vivado HLS
*
* Created: April 2020
* Authors: FAB, WEI, NGL, DID
*
* Copyrig... |
#include <cstdlib>
#include <vector>
#include <cmath>
#include <cstring>
#include <gl/glut.h>
#include "SocialForce.h"
using namespace std;
// Global Constant Variables
const float PI = 3.14159265359F;
// Global Variables
GLsizei winWidth = 992; // Window width (16:9 ratio)
GLsizei winHeight = 558; // W... |
//
// Created by Khyber on 4/2/2018.
//
#include "DsvMissingDataStats.h"
#include <fstream>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <vector>
#include <cstring>
//#include "utils.h"
#define likely(x) __builtin_expect (!!(x), 1)
#define unlikely(x) __builtin_expect (!!(x), 0)
#define... |
#if defined WINDOWS || _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
#include <stdio.h>
#include <time.h>
#include <string.h>
#include "../../../include/XApiCpp.h"
#ifndef USE_CMAKE
#ifdef _WIN64
#pragma comment(lib, "../../lib/XAPI_CPP_x64.lib")
#else
#pragma comment(lib, "../../lib/XAPI_CPP_x86.lib... |
#include "stdafx.h"
#include "ROPBuffer.h"
#define SE_DEBUG_PRIVILEGE (20L)
BOOL EnableDebugPriv()
{
BOOL RetVal = FALSE;
HANDLE hToken = NULL;
TOKEN_PRIVILEGES priv = { 0 };
if (FALSE == OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
goto Leave;
... |
#include "ofxBlackMagic.h"
#include "ColorConversion.h"
ofxBlackMagic::ofxBlackMagic()
:grayPixOld(true)
,colorPixOld(true)
,yuvTexOld(true)
,grayTexOld(true)
,colorTexOld(true) {
}
bool ofxBlackMagic::setup(int width, int height, float framerate, int deviceId, ColorFrameCaptureMode colorFrameCaptureMode) {
if(!... |
#include <iostream>
#include <time.h>
#include <conio.h>
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
using namespace std;
int i = 0;
enum eDir { STOP = 0, LEFT = 1, UPLEFT = 2, DOWNLEFT = 3, RIGHT = 4, UPRIGHT = 5, DOWNRIGHT = 6};
int paddle_offset = 60;
int paddle_size = 80;
int w... |
/*
* Copyright 2021 IBM 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 agreed... |
#pragma once
#include "node.hpp"
#include "edge.hpp"
#include "functions.hpp"
#include "globals.hpp"
class event_handler{
private:
void clear_vectors();
void select_algorithms(const sf::Event &event, sf::RenderWindow &window);
public:
void interactivity(const sf::Event &event, sf::RenderWindow &window);
... |
// sl_util.cpp
// helper functions for structured light
// by <NAME>
#include "sl_util.h"
#define DBUG 0
using namespace std;
using namespace cv;
// Convert a 10-bit Gray code value into a binary integer representation
// Thanks to http://www.dspguru.com/dsp/tricks/gray-code-conversion
uint16_t gray2bin(uint16_t gr... |
#include "graph_generator.hpp"
#include "graph.hpp"
#include <atomic>
#include <functional>
#include <iostream>
#include <list>
#include <mutex>
#include <random>
#include <thread>
namespace {
using uni_course_cpp::EdgeColor;
using uni_course_cpp::Graph;
using uni_course_cpp::VertexId;
const int MAX_THREADS_COUNT =... |
/**
* asp_therm - implementation of real gas equations of state
*
*
* Copyright (c) 2020-2021 <NAME>
*
* This library is distributed under the MIT License.
* See LICENSE file in the project root for full license information.
*/
#include "model_general.h"
#include "gas_description_dynamic.h"
#include "gas_ng_go... |
#include <wmrde/demo/rockymodel.h>
//& to pass object by reference
//FUNCTIONS FOR THE ROCKY 7 ROVER
void rocky(WmrModel& mdl, Real state[], Real qvel[]) {
//Rocky 7 rover model
//dimensions
const Real k1 = 10.5/100; //vertical offset between (R)over reference to (D)ifferential
const Real k2 = 12.075/100; //for... |
#include "Test_GRTree.h"
int validateNeighborhood(RNbHdr n1,RNbHdr n2 )
{
//printf("R - %d\tGR - %d\n",n1->nbhCnt, n2->nbhCnt);
if(n1->nbhCnt!=n2->nbhCnt)
{
printf("\tnbh count mismatch %d %d\n",n1->nbhCnt,n2->nbhCnt);
getchar();
}
// int flag=0;
// RNB nb_temp1... |
#include "driver.h"
#include "vidhrdw/generic.h"
#include "vidhrdw/konamiic.h"
static int sprite_colorbase;
/***************************************************************************
Callbacks for the K053247
***************************************************************************/
static void sprite_call... |
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include "spline.h"
#define SPLINE_PARAM_NUM(X) (4 * ((X) - 1))
double *spline(double data[][2], int pointNum) {
int paramNum = SPLINE_PARAM_NUM(pointNum);
Matrix *b = createMatrix({paramNum, 1}, true);
Matrix *A = createMatrix({paramNum, paramNum}, true);
do... |
#include "pch.h"
//----------------------------
PI3D_texture CreateStringTexture(const char *cp, int size1[2], PI3D_driver drv, void *winHFONT){
HFONT h_font = (HFONT)winHFONT;
if(!h_font)
return NULL;
HWND hwnd = (HWND)drv->GetGraphInterface()->GetHWND();
SIZE size;
{
HDC hdc = GetDC(hw... |
/*
* Fadecandy driver for the Enttec DMX USB Pro.
*
* Copyright (c) 2013 <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 th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.