text stringlengths 3.08k 22k |
|---|
#include <algorithm>
#include "sun.h"
#include "rf/context.h"
static vec3f CameraDefaultPos(0, 0, 0);
namespace game {
// In meters
const real32 EarthRadius = 6.3710088e6f;
const real32 SunDistance = 1.496e11f;
void InitCamera(camera *Camera, config *Config)
{
Camera->Position = Config->CameraPosition;
CameraDefau... |
#pragma once
#include <iostream>
// #include <cassert>
#include <list>
#include <iostream>
// #include "talsh.h"
#include "talsh/talshxx.hpp"
#ifndef USE_HIP
#include "cudamemset.hpp"
#endif
namespace ti_internal {
template<typename> struct is_complex : std::false_type {};
template<typename T> struct is_complex<... |
/*
* Copyright 2019 Xilinx, 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 agreed to... |
//
// Model.cpp
// teapot
//
// Created by XuYiwen on 4/6/16.
// Copyright © 2016 evx. All rights reserved.
//
#include "Model.hpp"
void Teapot::load_obj(char* filename){
objLoader *objData = new objLoader();
objData->load(filename);
numFaces = objData->faceCount;
numVertices = objData->verte... |
#include "stdafx.h"
#pragma hdrstop
#include "..\igame_persistent.h"
#include "..\igame_level.h"
#include "..\environment.h"
#include "..\fmesh.h"
#include "ftreevisual.h"
shared_str m_xform ;
shared_str m_xform_v ;
shared_str c_consts ;
shared_str c_wave ;
shared_str c_wind ;
shared_str c... |
/*
30. Substring with Concatenation of All Words
You are given a string, s, and a list of words, words,
that are all of the same length.
Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once and without any intervening characters.
Example 1:
Input:
s = "barfoot... |
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <time.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "kcftracker.hpp"
//#include <dirent.h>
using namespace std;
using namespace cv;
int rect[2][2];
int num;
void onMouse(int event,int x,in... |
#include "aStar.h"
aStar::aStar() {
_open.clear();
_open.assign(1, vector<int>(3, 0));
_close.clear();
_close.assign(1, vector<int>(3, 0));
}
//--------------------------------------------------------------
void aStar::setCostMap(gridField costMap) { _costMap = costMap; }
//----------------------------... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2018, Case Western Reserve University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that t... |
#include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
#include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
#include "DataFormats/GeometrySurface/interface/Surface.h"
#include "DataFormats/GeometrySurface/inter... |
/*
* Copyright <NAME>, 2019
* Use, modification and distribution are subject to the
* Boost Software License, Version 1.0. (See accompanying file
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include "math_unit_test.hpp"
#include <numeric>
#include <utility>
#include <random>
#include <cm... |
/*
* Copyright 2016, Pythia authors (see AUTHORS file).
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, t... |
#include "alterCS.hpp"
//////////////////////////////////////////////////////////////
// //
// Methods of class alterCS //
// //
////////////////////////////////////////////... |
/* -*- c++ -*- */
/*
* Copyright 2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio.
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your optio... |
///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2020, STEREOLABS.
//
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIE... |
#include "./../include/Scene.h"
#include "./../include/Math.h"
#include "./../include/Sphere.h"
#include "./../include/Ray.h"
#include "./../include/Snowman.h"
#include <fstream>
#include <iostream>
using namespace std;
int num_spheres = 11;
Sphere sp[] = {
//Walls
// Ceiling
Sphere(1e5, vec3d(50, -... |
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "../InferenceTestImage.hpp"
#include <armnn/TypesUtils.hpp>
#include <armnnUtils/Permute.hpp>
#include <algorithm>
#include <fstream>
#include <iterator>
#include <string>
// Parameters used in normalizing images
struc... |
// ------------------------------------------------------
// Protrekkr
// Based on <NAME>'s NoiseTrekker.
//
// Copyright (C) 2008-2011 <NAME>.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
... |
#include "douyuplugin.h"
#include "../httputils.h"
#include "../cipher/CryptoUtils.h"
int gDouyuFlag = 0;
int DouyuPlugin::isDouyu(const char * url, const char * host) {
///client/plugin.json?plugininfo
if (strstr(host, "update.qvb.qcloud.com") && strstr(url, "/checkupdate/v2?"))
{
gDouyuFlag = 1;
return TRUE... |
//
// main.cpp
// Neural Net
//
// Created by <NAME> on 8/21/16.
// Last edited by <NAME> on 9/4/16.
//
#pragma warning(disable:4996)
#include <iostream>
#include <fstream>
#include <cstdlib> //std::rand, std::srand
#include <numeric> //std::accumulate
#include <sstream>
#include <string>
#include <cmath>... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/api/music_manager_private/device_id.h"
#include <CoreFoundation/CoreFoundation.h>
#include <DiskArbitration/DADisk.h>... |
/**
* \file PnlWznmPrsRec.cpp
* job handler for job PnlWznmPrsRec (implementation)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author <NAME> (auto-generation)
* \date created: 28 Nov 2020
*/
// IP header --- ABOVE
#ifdef WZNMCMBD
#include <Wznmcmbd.h>
#else
#include <Wznmd.h>
#endif
#include "PnlWznm... |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include "dpso/dpso.h"
#include "dpso_utils/cfg_ext.h"
#include "dpso_utils/cfg_private.h"
#include "flow.h"
#include "utils.h"
static void testGet(
const char* key,
const char* defaultVal,
const char* expectedVal,
int lineNu... |
/* The MIT License (MIT)
*
* Copyright (c) 2015 <NAME> (<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 use... |
/*
* basic_example.cpp
*
* Created on: Nov 22, 2017 12:03
* Description:
*
* Copyright (c) 2017 <NAME> (rdu)
*/
// standard libaray
#include <iostream>
#include <vector>
#include <ctime>
#include <cmath>
// user
#include "graph/graph.hpp"
#include "graph/search/dijkstra.hpp"
using namespace rdu;
#define ROW_... |
#include <Rcpp.h>
#include <RcppParallel.h>
#include <iostream>
#include <algorithm>
#include <map>
//[[Rcpp::depends(RcppParallel)]]
using namespace Rcpp;
using namespace RcppParallel;
using namespace std;
// worker to rank the expression data in parallel
struct expressionRank : public Worker {
const RMatrix<doubl... |
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of th... |
#include "label.h"
#include <resizeBuff.h>
char temp[TEMP_BUFF_SIZE];
label::label() : drawObj() { initLabel(); }
// These next two actually fit our rectangle to the text.
label::label(char* inText)
: drawObj() {
initLabel();
setValue(inText);
setSize(getTextWidth(),getTextHeight());
}
label::label(char* ... |
/*
* vpr_constraints_writer.cpp
*
* Author: khalid88
*/
#include "vpr_constraints_serializer.h"
#include "vpr_constraints_uxsdcxx.h"
#include "vtr_time.h"
#include "globals.h"
#include "pugixml.hpp"
#include "pugixml_util.hpp"
#include "echo_files.h"
#include "clustered_netlist_utils.h"
#include <fstream>
... |
//===- AMDGPUOpenMP.cpp - AMDGPUOpenMP ToolChain Implementation -*- C++ -*-===//
//
// 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 "RWLock.h"
#include <Common/Stopwatch.h>
#include <Common/Exception.h>
#include <Common/CurrentMetrics.h>
#include <Common/ProfileEvents.h>
namespace ProfileEvents
{
extern const Event RWLockAcquiredReadLocks;
extern const Event RWLockAcquiredWriteLocks;
extern const Event RWLockReadersWaitMillis... |
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, WVU Interactive Robotics Laboratory
* https://web.statler.wvu.edu/~irl/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or w... |
#include "../common/util.h"
#include "../common/shader.h"
#include "material.h"
#include "mesh.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
const char* VERTEX_SRC = "#version 330 core\n"
"layout(location=0) in vec3 position;" // Ve... |
// Example 19-3. Stereo calibration, rectification, and correspondence
#pragma warning(disable : 4996)
#include <opencv2/opencv.hpp>
#include <iostream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
using namespace std;
void help(char* argv[]) {
cout
<< "\n\nEx... |
#include "ros/ros.h"
#include "road_detection/Road.h"
#include "gazebo/gazebo.hh"
#include "gazebo_msgs/LinkStates.h"
#include "geometry_msgs/Pose.h"
#include "std_msgs/Float64.h"
#include "std_msgs/Int64.h"
#include "nav_msgs/Odometry.h"
//ft2
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"
#include <tf2_ros/transfor... |
// Copyright (c) 2006-2008 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 "base/gfx/png_decoder.h"
#include "base/logging.h"
#include "skia/include/SkBitmap.h"
extern "C" {
#include "third_party/libpng/png.h"... |
// bslx_versionfunctions.t.cpp -*-C++-*-
#include <bslx_versionfunctions.h>
#include <bsls_assert.h>
#include <bsls_asserttest.h>
#include <bsls_bsltestutil.h>
#include <bsls_types.h>
#include <bsl_cstdlib.h>
#include <bsl_iostream.h>
using namespace BloombergLP;
using namespa... |
#include <MidiFile.h>
#include <set>
#include <utility>
#include <iostream>
#include <string.h>
#include "Resources.hpp"
#include "AudioEngine.hpp"
#include "AudioResources.hpp"
#include "MIDIChannel.hpp"
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
const double PI = 3.14159265358979;
us... |
#include "generated/cpp/SQLite3Base.h"
#include "json/JSONIterator.h"
#include "db/DBAdapter.h"
#include "common/RhodesApp.h"
#include "statistic/RhoProfiler.h"
#include "common/StringConverter.h"
extern "C" {
int rho_db_open(const char* szDBPath, const char* szDBPartition, void** ppDB);
int rho_db_close(void* pDB);
i... |
#include "drift_cornering_ilqr.h"
#include <math.h>
#include <boost/random.hpp>
#include <ros/ros.h>
#include <ilqr_msgs/IlqrInput.h>
#include <ilqr_msgs/IlqrOutput.h>
#include <ilqr_msgs/BoolStamped.h>
#define G 9.81
namespace stationary {
#include "ilqr_params_stationary.h"
// extern "C" {
#includ... |
#include "vec3.h"
// prints vec3's
void vec3::printv3(const vec3& v) {
cout << v.X() << " " << v.Y() << " " << v.Z();
}
// Represents a 3 dimensional vector <x, y, z>
vec3::vec3(float x, float y, float z) {
this->x = x; this->y = y; this->z = z;
}
// Represents a 3 dimensional vector <f, f, f>
vec3::vec3(floa... |
/*
* MIT License
*
* Copyright (c) 2020 ETJump team <<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 use... |
#include <cstring>
#include <sstream>
#include "nnet/Convolutional.hpp"
#include "nnet/vector.hpp"
#include "nnet/core.hpp"
using namespace std;
Convolutional::Convolutional(size_t rank, const size_t *inputDims, const size_t *kernelDims, size_t inputs, size_t outputs, nnet_float initweight, ActivationFunction *func,... |
#include "PortWorker.h"
#include <unistd.h>
#include <cerrno>
#include <cstring>
#include <poll.h>
PortWorker::PortWorker(std::shared_ptr<ILogger>& _logger, IMessageSender& _sender, const IConfig& _config, const PortConfig& _portConfig, RemoteBufferTracker& _remoteBufferTracker):
logger(_logger),
sender(_send... |
//
// Created by <NAME> on 1/11/20.
//
#include <iostream>
#include <string>
#include <chrono>
#include <thread>
#include <stdlib.h>
#include "sys.h"
using namespace std;
using namespace this_thread;
float D0(); //no parameters
float GCD_finder(float a, float b);
int main() {
//sleep_for(std::chrono::secon... |
#include "TraceEngine.h"
#include "SDL.h"
#include "AssertUtils.h"
#include "CPUImage.h"
#include "HittableList.h"
#include "Material.h"
#include "Sphere.h"
#include <chrono>
#include <vector>
void UploadStagingImageToTexture(CPUImage &stagingImage,
SDL_Texture *output... |
//////////////////////////////////////////////////////////////////////
// CIsosurface text.
//////////////////////////////////////////////////////////////////////
#include <math.h>
#include "marstd.h"
#include "../Util/SOpenGL.h"
#include "framework.h"
#include <SDL2/SDL_messagebox.h>
//////////////////////... |
auto VDC::hsync() -> void {
timing.hstate = HDS;
timing.hoffset = 0;
latch.horizontalDisplayStart = max(2, timing.horizontalDisplayStart) + 1 << 3;
latch.horizontalDisplayWidth = timing.horizontalDisplayWidth + 1 << 3;
latch.horizontalDisplayEnd = timing.horizontalDisplayEnd + 1 << 3;
latch.horizontalSyncW... |
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
*
* Change Date: 2024-11-26
*
* On the date above, in accordance with the Business Source License, use
* of this software will be g... |
/* Copyright (C) 2005-2011, <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright notice,
this list of co... |
// ------------------------------------------------ OpenPose C++ Demo ------------------------------------------------
// This example summarizes all the functionality of the OpenPose library. It can...
// 1. Read a frames source (images, video, webcam, 3D stereo Flir cameras, etc.).
// 2. Extract and render bo... |
#include "header.hpp"
#include <cstdio>
class test{
private:
int passou, falhou;
void testSum(){
string msg, s;
s = "sum(3,4)";
msg = "3 + 4 deveria dar 7";
verifica(runExpr(s).str() == "7", msg);
s = "sum(3,-404)";
msg = "3 + (-404) deveria dar -401";
verifica(runExpr(s).str() == "-401", msg);
... |
// $Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/rdbModel/src/test/copyCalibration.cxx,v 1.3 2013/09/16 21:15:59 jrb Exp $
// Make copies of existing calib. metadata, substituting values for flavor
// as specified. Arguments are
// filepath for file containing list of serial numbers
// new value for fl... |
#include "sha1.hpp"
#include "config.hpp"
#include "tcpserver.hpp"
#include "protocol-http.hpp"
#include "protocol-websocket.hpp"
#include "protocol-arch.hpp"
using namespace std;
using namespace arch;
TCPServer::WriteRequest::WriteRequest(
std::string* buffer,
uv_handle_t* hlink,
TCPConnection* connection,
ConnC... |
/**
* Copyright (C) 2016-2017 Xilinx, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... |
//--------------------------------------------------------------------------------------
//
//
// Copyright 2014 ADVANCED MICRO DEVICES, INC. All Rights Reserved.
//
// AMD is granting you permission to use this software and documentation (if
// any) (collectively, the "Materials") pursuant to the terms and conditions... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QPainter>
#include <unistd.h>
#include <QTimer>
#include "QFileDialog"
#include "fstream"
#include "cmath"
#include "algorithm"
int speed = 1;
int W = 1, H = 1, mx_x = 0, mx_y = 0, R = 5;
int timer_interval = 1000;
QWidget *par;
QString fileName;
std::ifstrea... |
#pragma once
#define DEBUG 1
#if defined(ARDUINO)
#define AVR_PLATFORM
#endif
#if defined(WIN32)
#include <codecvt>
#include <functional>
#include <locale>
#elif defined(__linux__)
#include <functional>
#endif
#if defined(AVR_PLATFORM)
#include "Arduino.hpp"
#define ASM(x) __ASM volatile (x)
#define sleep(x) delay... |
#include "video.hpp"
#include "hwvideo/hwsprites.hpp"
#include "globals.hpp"
#include "frontend/config.hpp"
/***************************************************************************
Video Emulation: OutRun Sprite Rendering Hardware.
Based on MAME source code.
Copyright <NAME>.
All rights reserved.
... |
//===-- X86VZeroUpper.cpp - AVX vzeroupper instruction inserter -----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** Copyright (c) 2010, Monash University
** All rights reserved.
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
**
** ... |
//=---------------------------------------------------------------------=
//
// $Id$ $Name$
//
// The contents of this file are subject to the AAF SDK Public Source
// License Agreement Version 2.0 (the "License"); You may not use this
// file except in compliance with the License. The License is available
// in AAFSD... |
//
// GUI_Menu.cpp
// GUI_EditText
//
// Created by <NAME> on 18/1/2562 BE.
// Copyright © 2562 Jimmy Software Co., Ltd. All rights reserved.
//
#include "GUI_Menu.h"
#include "GUI_shapes.h"
#include "GUI_Fonts.h"
#include <iterator>
GUI_MenuItem *GUI_MenuItem::create( GUI_View *parent, const char *title, int x, ... |
// $Id$
//****************************************************************************
//* This file is property of and copyright by the ALICE HLT Project *
//* ALICE Experiment at CERN, All rights reserved. *
//* ... |
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <fstream>
#include <thread>
#include <chrono>
#define OPENCV
#include "yolo_v2_class.hpp" // imported functions from DLL
#ifdef OPENCV
#include <opencv2/opencv.hpp> // C++
#include "opencv2/core/version.hpp"
#ifndef C... |
/*
Copyright (C) 2018-2020 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
#include "List.h"
#include "Graph.h"
#include <iostream>
using namespace std;
void menu()
{
AdjList* adjlist = nullptr;
int n, subchoice, init_choice;
char ch;
string str;
cout << "\nWelcome! \nSelect a preset for initialising the empty graph:\n"
<< "1. Directed and weighted\n"
<< "2. Non-directed and... |
// Copyright (c) 2014 Baidu, 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 agreed... |
/* Copyright (c) 2013, Ford Motor Company
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of co... |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 <NAME> <<EMAIL>>
//
// 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... |
// main.cpp : Defines the entry point for the console application.
// Basic application layout source from the following tutorial
// http://www.willusher.io/pages/sdl2/
#include "stdafx.h"
// Map the input within a given range on the screen (width or height accepted as input)
double mapTo(int input, int imageSize, do... |
//@C Copyright Notice
//@C ================
//@C This file is part of CPSW. It is subject to the license terms in the LICENSE.txt
//@C file found in the top-level directory of this distribution and at
//@C https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
//@C
//@C No part of CPSW, including this... |
//
//
// The MIT License (MIT)
//
// Copyright (c) 2016 <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, ... |
#include "file_handler.h"
/**
* @brief funcion que escribe bytes en archivo comprimido
* @param oImage [in] GreyImage - imagen a comprimir
* @param filename [in] string - nombre de archivo
* @param type [in] string - tipo P5 o P6
* @param width [in] int - image width
* @param height [in] int - image height
* @p... |
// SAP - Systeme D'archivage Pukall (Thomson TO8/TO8D/TO9/TO9+)
//
#include "SAMdisk.h"
#include "BitstreamTrackBuilder.h"
#define SAP_SIGNATURE "SYSTEME D'ARCHIVAGE PUKALL S.A.P. (c) <NAME> 1998"
#define SAP_SECTORS_PER_TRACK 16
#define SAP_CRYPT_BYTE 0xb3 // data fields are XORed with this
typedef struct
{
uint... |
#include "KMC/kmc_step_funcs.hpp"
/**
* @brief: Perform kinetic monte carlo step of protein object when no heads
* are attached.
*
* @param: &pData Refernce for head object
* @param: Npj Number of rods near head object
* @param: ep_j Array of rod object pointers near head
* @param: &uFilterJ Filter of non-uniqu... |
#include "PlayGameState.h"
#include "Pokitto.h"
#include "src/utils/Enums.h"
#include "src/images/Images.h"
#include "src/sounds/Sounds.h"
using PC=Pokitto::Core;
using PD=Pokitto::Display;
using PS=Pokitto::Sound;
const uint8_t cellSize[] = { 24, 16, 12 };
const uint8_t offsetX[] = { 44, 45, 44 };
const uint8_t ... |
//dfs, detect cycle in undirected graph
//https://www.geeksforgeeks.org/detect-cycle-undirected-graph/
//Runtime: 1872 ms, faster than 20.00% of C++ online submissions for Detect Cycles in 2D Grid.
//Memory Usage: 245.8 MB, less than 20.00% of C++ online submissions for Detect Cycles in 2D Grid.
class Solution {
public... |
/*
Copyright (c) by respective owners including Yahoo!, Microsoft, and
individual contributors. All rights reserved. Released under a BSD (revised)
license as described in the file LICENSE.
*/
#include "reductions.h"
#include "interactions.h"
#include "parse_args.h"
#include "vw.h"
using namespace std;
struct audit_... |
#include "relive_api.hpp"
#include "TlvsAO.hpp"
#include "TypesCollectionAO.hpp"
#include "../../AliveLibAE/DebugHelpers.hpp"
#include "../../AliveLibCommon/stdafx_common.h"
#include "../../AliveLibCommon/logger.hpp"
#include "LvlReaderWriter.hpp"
#include "CamConverter.hpp"
#include "JsonModelTypes.hpp"
#include "... |
/////////////////////////////////////////////////////////////////////////////
// Name: src/x11/utils.cpp
// Purpose: Various utilities
// Author: <NAME>
// Modified by:
// Created: 17/09/98
// Copyright: (c) <NAME>
// (c) 2013 <NAME>
// Licence: wxWindows licence
/////////////////... |
#include "util.h"
void RandomGen::init(int seed) {
generator.seed(seed);
}
int RandomGen::get(int max) {
return get(0, max);
}
long long RandomGen::getLL() {
return uniform_int_distribution<long long>(-(1LL << 62), 1LL << 62)(generator);
}
int RandomGen::get(Range r) {
return get(r.getStart(), r.getEnd());... |
//===--- VerifyDiagnosticsClient.cpp - Verifying Diagnostic Client --------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
/*
Copyright (c) 2005-2021, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following d... |
#include "dot_reconstructor.h"
#ifdef WIN32
#include <windows.h>
#else
#include "port_ini.h"
#endif
#include <cmath>
#include <vnl/algo/vnl_matrix_inverse.h>
#include <vnl/vnl_trace.h>
#include "fltfile_utils.h"
#include "special_functions.h"
inline int FLOOR(float x) {return x>0.0f ? (int)x : -((int)(1.0f-x));}
i... |
/**
* @file main.cpp
* @brief Projekt IPK 2 - Server
*
* @date 2013/03/11
* @author <NAME>, <EMAIL>
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <string.h>
#include <... |
// 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 may... |
#include "Attack.h"
Attack::Attack(){
randomSeed(os_random());
}
void Attack::generate(){
if(debug) Serial.print("generating Macs...");
Mac _randomBeaconMac;
uint8_t _randomMacBuffer[6];
beaconAdrs._clear();
for(int i=0;i<macListLen;i++) channels[i] = random(1,12);
do{
getRandomVendorMac(_random... |
#include "position.hpp"
#include "bitboard.hpp"
const Square Position::rook_ini[PlayerDim][CastlingFlagDim] = {{7, 0}, {63, 56}};
sheena::Array3d<uint64_t, PlayerDim, PieceDim, NSquare> Position::hash_seed;
const FEN startpos({"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR","w","KQkq","-","0","1"});
void Position::xor_... |
/*
* Funambol is a mobile platform developed by Funambol, Inc.
* Copyright (C) 2003 - 2007 Funambol, Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by
* the Free Software Foundation with the addit... |
/* -------------------------------------------------------------------------- *
* Simbody(tm): SimTKcommon *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
#include "recon_surface/pset.hpp"
#include <pcl/io/pcd_io.h>
#include <pcl/io/ply_io.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl_conversions/pcl_conversions.h>
// Init and test if input file contains the right properties
void Pset::read_pointCloud2(const sensor_msgs::PointCloud2 msg) {... |
/*
* Copyright (c) 2012 The Trustees of University of Illinois.
* All rights reserved.
*
* Author(s): <NAME> <<EMAIL>>
*
*/
/*
* dsde_exchange_ibarrier.cpp
*
* Created on: Dec 8, 2011
* Author: htor
*/
#include "dsde_internal.h"
typedef struct {
DSDE_Free_fn free_fn; ///< the fre... |
/* @STSHELL_LICENSE_START@
*
* __ _______ ___________
* / |/ / __ \/ ___/_ __/
* / /|_/ / / / /\__ \ / /
* / / / / /_/ /___/ // /
* /_/ /_/\____//____//_/
*
* Multi-Objective System Tuner
* Copyright (c) 2007-2022 Politecnico di Milano
*
* Development leader: <NAME>
*... |
#include "Reader.h"
using namespace std;
std::vector<std::vector<double>> Reader::calcNodeDistances(std::vector<Node>& vNodes)
{
std::vector<std::vector<double>> m;
unsigned int nNodes = vNodes.size();
//resize the vector
m.resize(nNodes);
for (unsigned int i = 0; i < nNodes; i++) m.at(i).resize(nNod... |
/*Copyright (c) 2013 The CK2 to EU3 Converter Project
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, m... |
/**
******************************************************************************
Copyright (c) 2013-2015 Particle Industries, 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 S... |
// Portal.cpp: implementation of the CPortal class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "r__sector.h"
#include "Common/LevelStructure.hpp"
#include "xrEngine/xr_object.h"
#include "FBasicVisual.h"
#include "xrEngine/IGame_Persistent.h"
///////////////... |
/*************************************************************************************
This file is a part of CrashRpt library.
Copyright (c) 2003, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following condi... |
//===--- IRGenFunction.cpp - Swift Per-Function IR Generation -------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.