text stringlengths 3.08k 12.5k |
|---|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <fcntl.h>
#include <time.h>
#include <string>
using namespace std;
#include "logger.h"
#include "uv.h"
static string g_log_path;
static string g_prefix;
static uv_fs_t g_file_handle;
static uint32_t g_current_day;
static uint32_t... |
/*++
Copyright (C) Microsoft Corporation, 2000
Module Name:
Test6
Abstract:
Test6 implementation.
Author:
<NAME> (ericperl) 06/22/2000
Environment:
Win32
Notes:
?Notes?
--*/
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h... |
#include "../headers/sidebar.h"
#include <fstream>
#include <sstream>
Sidebar::Sidebar() {
}
Sidebar::Sidebar(float left, float width) :_left(left), _width(width) {
//set up the sidebar rectangle:
rect.setFillColor(sf::Color(105, 105, 105)); //(192,192,192)); //silver
rect.setPosition(sf::Vector2f(left,... |
#include <Gosu/Font.hpp>
#include <Gosu/Graphics.hpp>
#include <Gosu/Image.hpp>
#include <Gosu/Math.hpp>
#include <Gosu/Text.hpp>
#include <Gosu/TR1.hpp>
#include "Common.hpp"
#include "FormattedString.hpp"
#include <cassert>
#include <map>
using namespace std;
struct Gosu::Font::Impl
{
Graphics* graphics;
wst... |
#include "debugger.h"
#include "info_elf.h"
#include "register.h"
#include <iostream>
#include <iterator>
#include <sstream>
#include <stdio.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
constexpr long long MASK_INT3 = 0x000000cc;
constexpr long long MASK_OLD = 0xFFFFFFFFFFFFFF00;
static voi... |
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in co... |
#include "engine/camera.hpp"
#include "engine/parser.hpp"
#include "utils/types.hpp"
#include <GL/gl.h>
#include <IL/il.h>
#include <iostream>
#include <sstream>
#ifdef __APPLE__
# include <GLUT/glut.h>
#else
# include <GL/glew.h>
# include <GL/glut.h>
#endif
// singletons
Camera CAMERA;
Group GROUP;
GroupBu... |
#include <bits/stdc++.h>
using namespace std;
// LazySegTree template code by : hitonanode
template <typename VAL, typename DVAL>
struct LazySegTree
{
int N;
int head;
vector<VAL> val;
vector<DVAL> dval;
VAL I_val;
DVAL I_dval;
using vv2v = function<VAL(const VAL&, const VAL&)>;
usin... |
#include "header/Verb.h"
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <random>
#include <string>
#include <vector>
using namespace std;
vector<VerbForms> read_from_file(const string& file_path)
{
vector<VerbForms> verbs;
VerbForms forms;
ifstream file(file_path);... |
//--------------------------------------------------------------------------
// Copyright (C) 2014-2018 Cisco 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 as published
// by the Fr... |
/**
* 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... |
/* * Copyright (c) 2020, Intel Corporation
*
* 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, p... |
/*!
* @file
* */
#include "Comm_Gateway.hpp"
#include "hps_fpga_addresses.h"
#include <stdint.h>
#include <poll.h>
#include <fcntl.h>
///Port on which socket is created
#define COMPORT 6666
///Send/Receive Frequence in Hz
#define COMFREQ 50
///Alf Communication Server object
Alf_Communication<Server> ServerComm;
... |
/*
* Copyright (c) 2012 <NAME>
* This code is released under the MIT license (see LICENSE file).
*/
#include "util/inference/bp/LinearVariableNodeUpdater.h"
#include <math.h>
#include <assert.h>
#include <stdlib.h>
//#define SUPER_VERBOSE
#ifdef SUPER_VERBOSE
#include <iostream>
#endif
LinearVariableNodeUpdater:... |
/* MIT License
*
* Copyright (c) 2020 <NAME> and <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, m... |
#include <gtest/gtest.h>
#include <algorithm>
#include <string>
#include <map>
#include <sstream>
#include <stdint.h>
#include <tins/hw_address.h>
using namespace Tins;
class HWAddressTest : public testing::Test {
public:
static const std::string address;
static const uint8_t* byte_address, *empty_addr;
};
... |
#include "AES256CBC.h"
#ifdef OS_Darwin
#include <CommonCrypto/CommonCryptor.h>
#else
#include <openssl/evp.h>
#include <openssl/aes.h>
#endif
#include "rct/Log.h"
#include "SHA256.h"
#if defined OS_Darwin && defined OPENSSL_VERSION_NUMBER && OPENSSL_VERSION_NUMBER < 0x10100000L
static EVP_CIPHER_CTX *EVP_CIPHER_CTX... |
#include "altruct/structure/graph/graph.h"
#include "altruct/io/iostream_overloads.h"
#include "structure_test_util.h"
#include "gtest/gtest.h"
using namespace std;
using namespace altruct::graph;
using namespace altruct::test_util;
namespace {
typedef weighted_edge<int> iedge;
graph<iedge> g({... |
// Copyright (C) 2000, International Business Machines
// Corporation and others. All Rights Reserved.
#include <cfloat>
#include <numeric>
#include <algorithm>
#include "CoinSort.hpp"
#include "BCP_vector.hpp"
#include "BCP_lp_branch.hpp"
#include "OsiSolverInterface.hpp"
#include "BCP_var.hpp"
#include "BCP_cut.h... |
#include "helper.h"
PolygonShape::PolygonShape(std::vector<Point> vertices){
int minX = 0xFFFF, minY = 0xFFFF, maxX = 0, maxY = 0;
this->length = vertices.size();
this->vertices = new Point[length];
for (int i = 0; i < this->length; i++) {
this->vertices[i] = Point(vertices[i].x, vertices[i].y)... |
/**
* @file main.cpp
* @date 2021-01-16
* @author <NAME>
* @brief
* @remark
* @warning
* LGE Advanced Robotics Laboratory
* Copyright (c) 2020 LG Electronics Inc., LTD., Seoul, Korea
* All Rights are Reserved.
*
* SPDX-License-Identifier: MIT
*/
#include "cloisim_ros_bringup_p... |
#include <algorithm>
#include <cstdio>
#include <iostream>
const int MAX_N = 1000050;
struct Node {
int l; // left son
int r; // right son
long long v; // value
long long t; // tag
} tree[MAX_N << 2];
struct Que {
int op;
int l;
int r;
int i; // index
long long v;... |
//
// Copyright 2012 <NAME> and <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 o... |
#include <sys/stat.h>
#include <unistd.h>
#include <cassert>
#include <cstdio>
#include <cstring>
#include "MoELayerPlugin.h"
#include "thirdparty/dbg.h"
#include "utility.h"
REGISTER_TENSORRT_PLUGIN(MoELayerPluginCreator);
// parameter fields
namespace field_name {
const char *EXPERT_COUNT{"expert_count"};
const c... |
#include "TestHarness.h"
#include "DgR3Line.h"
#include "query/DgR3QueryLineLine.h"
#include "query/DgR3QueryPointLine.h"
#include "query/DgR3QueryLinePlane.h"
typedef double Real;
typedef Dg::R3::Vector<Real> vec;
typedef Dg::R3::Plane<Real> plane;
typedef Dg::R3... |
//---------------------------------------------------------------------------
//
// 3 nodes example for testing contract on a link
//
// <NAME>
// Argonne National Laboratory
// 9700 S. Cass Ave.
// Argonne, IL 60439
// <EMAIL>
//
//--------------------------------------------------------------------------
#include <... |
/*
* Simple LPC (Linear Predictive Coding) decoder in C++
* by <NAME> [github.com/JakubVojvoda]
* 2015
*
* Source code is licensed under MIT License
* (for more details see LICENSE)
*
*/
#include "decoder.h"
#include <fstream>
#include <string>
#include <sstream>
double value(std::vector<double> x, unsig... |
#include "popup.h"
#include <qlayout.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qdebug.h>
#include <qcursor.h>
#include <qsizepolicy.h>
#include "../data/entry.h"
#include <qdir.h>
#include <qfontdatabase.h>
#define MAX_ENTRY 5
#define MIN_ENTRY 0
popup::popup(QWidget* parent)
: QDialog(parent)
{
... |
//+--------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1996.
//
// File: drt.cxx
//
// Contents: DRT main routine
//
//---------------------------------------------------------------
#include "headers.cxx"
#include "../../h/d... |
#include <iostream>
#include <string>
#include <fstream>
#include <thread>
#include <chrono>
#include <ctime>
#include <popl.hpp>
#include <spdlog/spdlog.h>
#include "opencv2/core.hpp"
#include "opencv2/videoio.hpp"
#include "opencv2/highgui.hpp"
#include "SFML/Network.hpp"
using namespace std;
using namespace cv;
... |
/*
Created: 21 March 2018
Last Updated: 16 May 2018
<NAME>
<EMAIL>
Texas A&M University
-----
Tool for building ttbar system
- all-had: Two top-tagged AK8
- l+jets: 1 top-tagged AK8 + 1 leptonic top (AK4+lep+nu)
- dilepton: 2 leptonic tops (AK4+lep+nu)
*/
#include "Analysis/CyMiniAna/interface/ttbarR... |
/* Copyright(c) 2012 Optimal Bits Sweden AB. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use,... |
#include <stdio.h>
#include <string.h>
#include <getopt.h>
#include "ctr.h"
gsl_rng * RANDOM_NUMBER = NULL;
void print_usage_and_exit() {
// print usage information
printf("**************************relational collaborative topic models for recommendations************************\n");
printf("usage:\n");
prin... |
#include "KeyLogger.h"
#include <iostream>
#include <fstream>
#include <Windows.h>
#include <vector>
# define KEY_DOWN_MASK 0x8000
# define TOGGLED_KEY_MASK 1
# define PRESSED_SINCE_LAST_CALL_MASK 1
using namespace std;
KeyLogger::KeyLogger(Logger* logger) {
this->logger = logger;
}
map<int, wstring> KeyLogger::... |
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
<NAME>, <EMAIL>
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with San... |
/*
** Author: <NAME>
** Internet: <EMAIL>
**
** Copyright (c) 1998-2003, <NAME>
** All rights reserved.
**
** "You can get credit for something or get it done, but not both."
** Dr. <NAME>
**
** BSD License follows.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted ... |
// Nome: parsedecl.cpp
// Progetto: CPP/Parser
// Autore: <NAME>
// Descrizione: parser di dichiarazioni
#include <string.h>
#include <iostream.h>
#include "parser.h"
#include "cmm.h"
// DECL
// scanner visibile come sc. o come estensione di CScan!
// 1* come estensione di cscan
// Function name : pars... |
#include "RetroEngine.hpp"
void RetroGameLoop_Create(void *objPtr)
{
NativeEntity_RetroGameLoop *entity = (NativeEntity_RetroGameLoop *)objPtr;
entity->pauseMenu = nullptr;
}
void RetroGameLoop_Main(void *objPtr)
{
NativeEntity_RetroGameLoop *entity = (NativeEntity_RetroGameLoop *)objPtr;
... |
#include <iostream>
#include <fstream>
#include <GLEW/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform.hpp>
#include "Model.h"
#include "SceneManager.h"
#include "Shader.h"
#include "Renderer.h"
#include "OGLDriver.h"
#include "... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/gl/GrGLOpsRenderPass.h"
#include "src/gpu/GrContextPriv.h"
#include "src/gpu/GrFixedClip.h"
#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrRenderTar... |
/**
* Calculate template length (tlen) for each read. This field is not set by newer
* versions of PacBio BLASR, but some tools rely on it.
*/
#include <iostream>
#include "util/err.h"
#include "util/constants.h"
#include "boost/program_options.hpp"
#include "boost/algorithm/string/predicate.hpp"
#include "htsli... |
// win32_EvoWorkThreadInterface.cpp
//
// EvoWindows
#include "stdafx.h"
#include "assert.h"
#include "Resource.h"
#include "gridPOI.h"
#include "GridPoint24.h"
#include "EvolutionTypes.h"
#include "EvolutionCore.h"
#include "EvoReadBuffer.h"
#include "EvoHistorySysGlue.h"
#include "win32_script.h"
#include "win32_Evo... |
//
// fleece_tool.cc
//
// Copyright (c) 2015 Couchbase, 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
//
// Un... |
/*
Image Uploader - free application for uploading images/files to the Internet
Copyright 2007-2018 <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
... |
// api.cpp: functional tests of the value type API
//
// Copyright (C) 2017-2021 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.
#include <universal/utility/directives.hpp>
// configure the value<> environment
#define BITBLOCK... |
/*
* Copyright (c) 2013-2014,2016 - Adjacent Link LLC, Bridgewater,
* New Jersey
* Copyright (c) 2008-2012 - DRS CenGen, LLC, Columbia, Maryland
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ar... |
// Copyright 2009, Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and ... |
#include "opencv2/opencv.hpp"
using namespace cv;
#include <iostream>
using namespace std;
struct Fish
{
Mat_<float> map_x, map_y;
void make_barrel_maps(const Size &s, float kx, float ky)
{
map_x.create(s);
map_y.create(s);
// the image size
int w = s.width;
int h = s.height;
float Cx = float(w)/2;... |
#include <String.h>
#include <stdint.h>
#include <Liballoc.h>
#include <Paging.h>
void reverse(char *str, int length)
{
int c;
char *begin, *end, temp;
begin = str;
end = str;
for (c = 0; c < length - 1; c++)
end++;
for (c = 0; c < length/2; c++)
{
temp = *end;
*end =... |
#include "epd7color.h"
#include <stdio.h>
#include <stdlib.h>
#include "esp_log.h"
#include "freertos/task.h"
// display.print / println handling
// TODO: Implement printf
size_t Epd7Color::write(uint8_t v){
Adafruit_GFX::write(v);
return 1;
}
uint8_t Epd7Color::_unicodeEasy(uint8_t c) {
if (c<191 && c>131 && c!... |
/*
* getSeq.cc
*
* License: Artistic License, see file LICENSE.TXT or
* https://opensource.org/licenses/artistic-license-1.0
*
* Description: retrieve genomic sequences from a mysql database
*/
// Project includes
#include "randseqaccess.hh"
// standard C/C++ includes
#include <getopt.h> /* for ge... |
// REQUIRES: cpu, linux
// RUN: %clangxx -fsycl -c %s -o %t.o
// RUN: %clangxx -fsycl %t.o %sycl_libs_dir/libsycl-cmath.o -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
#include "math_utils.hpp"
#include <CL/sycl.hpp>
#include <iostream>
#inclu... |
/**************************************************************************************/
/* */
/* Visualization Library */
/* http://visualizationlibrary.org ... |
//#include <hiredis/hiredis.h>
#include "dcpots/base/logger.h"
#include "dcpots/dcrpc/share/dcrpc.h"
#include "dcpots/dcrpc/server/dcsrpc.h"
#include "dcpots/base/cmdline_opt.h"
#include "dcpots/utility/redis/dcredis.h"
#include "dcpots/base/dcseqnum.hpp"
#include "dcpots/base/msg_proto.hpp"
#include "dcpots/base/dcuti... |
/*class BasicHepMCHeavyIonValidation
*
* Class to fill dqm monitor elements from existing EDM file
* <NAME> - 04/2013
*/
#include "Validation/EventGenerator/interface/BasicHepMCHeavyIonValidation.h"
#include "CLHEP/Units/defs.h"
#include "CLHEP/Units/PhysicalConstants.h"
#include "Validation/EventGenerator/in... |
/*
* Copyright (c) 2014 <NAME> <<EMAIL>>
* BSD Simplified License, see the file "LICENSE.txt" in this distribution.
* See https://github.com/Ant1r/ofxPof for documentation and updates.
*/
#include "pofFluid.h"
t_class *pofFluid_class;
void *pofFluid_new(t_floatarg w,t_floatarg h, t_floatarg down)
{
if(w == 0) w ... |
#include "process/openflow.hpp"
#include <cassert>
#include "fib.hpp"
#include "network.hpp"
#include "node.hpp"
#include "policy/policy.hpp"
#include "lib/hash.hpp"
#include "lib/logger.hpp"
#include "model-access.hpp"
#include "model.h"
size_t OpenflowUpdateState::num_of_installed_updates(int node_order) const
{
... |
/*
* (C) 2012-2020 see Authors.txt
*
* This file is part of MPC-BE.
*
* MPC-BE 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 of the License, or
* (at your option) any later version.
... |
#include<bits/stdc++.h>
#include<unistd.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define F first
#define S second
#define PB push_back
#define ALL(x) begin(x),end(x)
#define SZ(x) ((int)(x).size())
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define ... |
/*
* Class myInsolation
* Description:
* Calculate total insolation at time of day in weather from
* a surface
*
* By: <NAME> February 2021
* 16-Feb-2021 New
*
//
// MIT License
//
// Copyright (C) 2021 - <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// o... |
#include <vector>
#include <stdexcept>
#include <mutex>
#include "MemorySpace.h"
#include "ModuleBanker.h"
#include "DataStructures.h"
#include "utils.h"
template<typename Type>
bool MemorySpace::values_push_back(std::mutex *vector_mutex, std::vector<Type*> &destination, const int maxLength, Type *appendData){
try{
... |
#include "ukf.hpp"
#include "eigen_csv.hpp"
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
using namespace Eigen;
// Prediction step
void UKF::predict(double tp) {
MatrixXd Pxxi(nx,nx), Pxxp(nx,nx), Xi(nx,nsp), Xp(nx,nsp), W(nw,nsp);
VectorXd xesti, xestp;
xesti = xest.bac... |
#include "llvm/IR/Constants.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/raw_ostream.h"
#include "generate-seeds.h"
#include <iomanip>
#include <iostream>
#include <fstream>
#include <vector>
#include <utility>
namespace {
typedef std::vector<CallInst*> Invocations;
typedef std::pair<uint64_t, unsigned> Cons... |
/***************************************************************************
qgis.r.in.cpp
---------------------
begin : May 2015
copyright : (C) 2015 by <NAME>
email : <EMAIL>
***************************************************************************
* ... |
/**
* \file
* \date August 1, 2019
* \author Zermingore
* \brief Car (specific Unit) class definition
*/
#include <game/units/Car.hh>
#include <debug/Debug.hh>
#include <graphics/Sprite.hh>
#include <graphics/Properties.hh>
#include <game/units/UnitsFactory.hh>
#include <resources/ResourcesManager.hh>
Car::Ca... |
// fastq_index.c
//
// THIS SOFTWARE IS DISTRIBUTED UNDER
// CC0 1.0 Universal
// Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
//
// Developed by:
// <NAME>, PhD.
// Biotechnology Research Institute for Drug Discovery
// National Institute of Advanced Industrial Science and Technology ... |
#include <bits/stdc++.h>
using namespace std;
struct points
{
long long int x ;
long long int y ;
long long int index ;
points(long long i , long long int a , long long int b)
{
index = i;
x=a;
y=b;
}
};
inline bool operator<(const points& lhs, c... |
#include "netdrive.h"
// ----- NetDriveService -----
NetDriveService::NetDriveService() : NetService("NetDrive") {
// set default c64 port
m_addrPair.c64Port = 6463;
m_addrPair.myPort = 6463;
}
NetDriveService::~NetDriveService() {}
void NetDriveService::shareFiles(const CBMFileList &files) {
stopAl... |
#include "mpegts_demuxer.h"
#include "simple_buffer.h"
#include "common.h"
MpegTsDemuxer::MpegTsDemuxer()
: mPmtId(0), mPcrId(0) {
}
MpegTsDemuxer::~MpegTsDemuxer() {
}
int MpegTsDemuxer::decode(SimpleBuffer *pIn, TsFrame *&prOut) {
bool g = pIn->empty();
while (!pIn->empty()) {
... |
/*
* vitamin-k
*
* Copyright 2016 <NAME> - www.saschawillems.de
* Copyright 2017-2018 Collabora Ltd.
*
* Authors: <NAME> <<EMAIL>>
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <sys/stat.h>
#include <vulkan/vulkan.h>
#include <iostream>
#include <chrono>
#include <string>
#include <array>
#include... |
/*--------------------------------------------------------*/
/*Copyright 2001-2018 Heterogeneous Computing Laboratory,
School of Computer Science, University College Dublin
Redistribution and use in source and binary forms,
with or without modification, are permitted provided
that the following conditions are met:... |
// Copyright (c) 2017-2020 TKEY DMCC LLC & Tkeycoin Dao. All rights reserved.
// Website: www.tkeycoin.com
//
// 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, incl... |
/*************************************************************************/
/* editor_path.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
//-------------------------------------------------------------------------
// Simple back-propagation neural network example
// Copyright (C) 2017 <NAME>
// Copyright (C) 2018 <NAME>
// MIT license: https://opensource.org/licenses/MIT
//-------------------------------------------------------------------------
... |
/// \file dataAccess.cc
/// \author <NAME> <<EMAIL>>
///
/// Copyright (c) 2021 by <NAME> <<EMAIL>>
/// Permission to use, copy, modify, and/or distribute this software for any
/// purpose with or without fee is hereby granted, provided that the above
/// copyright notice and this permission notice appear in all copies... |
#include "Mat4.h"
#include "Matrix.h"
#include <math.h>
#include <android/log.h>
#include <mylog.h>
#include <string.h>
Mat4::Mat4(){
this->matrix = new float[16];
}
Mat4::~Mat4()
{
delete matrix;
}
void Mat4::loadIdentity()
{
this->matrix = new float[16];
Matrix::setIdentityM(matrix, 0);
}
void Mat4::setTranslatio... |
/**
* @copyright Copyright 2016 The J-PET Framework Authors. 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 find a copy of the License in the LICENCE file.
*
* Unless required by applicable la... |
// Q1
#include <iostream>
#include <string>
#include <stack>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
string text;
cin >> text;
stack<char> text_stack;
bool flag = true;
for (size_t i = 0; i < text.length(); ++ i) {
sw... |
/*
* \file ppWintegrand.cpp
* \brief
* \date Created on: 2009-06-11
* \author Author: siudmy
*/
#include "ppWintegrand.h"
#include "../utils/FortranFunction.h"
VINHAC::ppWintegrand::ppWintegrand(DataSource *ds, BeamHandler *beamHandler) :
ds(ds), beamHandler(beamHandler), isWplus(false), isWminus(false) {
... |
// Copyright (c) 2021 MIT Digital Currency Initiative,
// Federal Reserve Bank of Boston
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "uhs/transaction/transaction.hpp"
#include "uhs/transaction/val... |
//********************************************************************************
// Copyright (c) 2007-2014 Intel Corporation. All rights reserved. **
// **
// Redistribution and use in source and binary forms, with or withou... |
/******************************************************************************
* Copyright (c) 2018 McAfee, LLC - All Rights Reserved.
*****************************************************************************/
#include "include/BrokerSettings.h"
#include "include/Configuration.h"
#include "include/SimpleLog.h"
... |
/****************************************************************************
* Copyright (c) 2015 - 2016, CEA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code mus... |
#include <stdio.h>
#include "water.h"
const CPos kWaterCen(0.0f, 0.0f, 0.0f); // Water is always centered at (0,0,0)
// Helper function for determining if a float is less than or equal to
// another float
inline bool ToleranceLE(float a, float b, float tolerance = 0.001f)
{
return ((a - tolerance) <= b);
}
// Const... |
// calcPSF variables declaration
// description are in variables.hpp
#include <cstdio>
// constants
extern int buffer_length;
extern int Calculation_length;
extern int Log_file_length;
extern int Log_length;
extern char* Log_buffer;
extern int Solution_length;
extern int Potential_length;
extern int Potential_file_len... |
/**
* @file
* @author <NAME>
* @brief Implementation of src/tcl_iface/slave_thread.hxx
*/
#include <deque>
#include <string>
#include <cstring>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <cassert>
#include <csetjmp>
#include <SDL.h>
#include <SDL_thread.h>
#include <tcl.h>
#include "... |
#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
#include <string>
#include <pthread.h>
#include <iostream>
#include <vector>
#include "MySQLQueryHandler.hpp"
#include "DNSQueryHandler.hpp"
/**
* Parsing/usage functions
*/
char *progname;
static void usage();
static void parse_args(int, char**,int*, int*)... |
/*
Copyright (c) 2007 <NAME>. 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 require... |
#include "rsw_math.h"
#define MANGLE_TYPES
#define PORTABLEGL_IMPLEMENTATION
#include "GLObjects.h"
#include <iostream>
#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>
#define WIDTH 640
#define HEIGHT 480
using namespace std;
using rsw::vec4;
using rsw::mat4;
vec4 Red(1.0f, 0.0f, 0.0f, 0.0f);
vec4 Green(0.0f, 1.0... |
#include "vtkTriangleReader.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkCell.h"
#include "vtkCellType.h"
#include "vtkCellData.h"
#include "vtkIdTypeArray.h"
#include "vtkCellArray.h"
#include <vtkIntArray.h>
#include "vtkPoints.h"
#include "vtkUnstructuredGrid.h"
#include "vtkSmartPo... |
#include "systemc.h"
#include "systemperl.h"
//#include "env_memory.h"
//#include "SpTraceVcd.h"
#include "verilated_vcd_sc.h"
#include <unistd.h>
#include "it_cfg_driver.h"
#include "it_cfg_monitor.h"
#include "Vlcfg.h"
#include "load_ihex.h"
#include <assert.h>
extern char *optarg;
extern int optind, opterr, optopt... |
/**********
Copyright (c) 2017, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the fol... |
/*__ _(_) __ _ ___ ___ _ _ __| | __ _ _ _| |_ ___
/ _` | |/ _` |/ _ \/ __| | | |/ _` |/ _` | | | | __/ _ \
| (_| | | (_| | (_) \__ \ |_| | (_| | (_| | |_| | || (_) |
\__, |_|\__,_|\___/|___/\__,_|\__,_|\__,_|\__,_|\__\___/
|___/ Snake Game Basic */
///Notice: Please complile wi... |
#include <ADS1115_lite.h>
#include "host_comms.hpp"
ADS1115_lite near_adc(ADS1115_ADDRESS_ADDR_GND);
ADS1115_lite far_adc(ADS1115_ADDRESS_ADDR_VDD);
// #define ADS1115_REG_CONFIG_PGA_6_144V (0x0000) // +/-6.144V range = Gain 2/3
// #define ADS1115_REG_CONFIG_PGA_4_096V (0x0200) // +/-4.096V range = Gain 1
// #... |
#include <vector>
#include <string>
#include <iostream>
#include <chrono>
#include <algorithm>
#include <iterator>
using namespace std;
struct Item {
int i; // original index
int w; // weight
int v; // value
};
struct Problem {
int id; // ID of the problem
int n; ... |
// src/compute-masks
// wujian@2018
// Copyright 2018 <NAME>
// See ../../COPYING for clarification regarding multiple authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// htt... |
#include "Mesh.hpp"
#include <vector>
#include <Log.hpp>
Mesh::Mesh () {}
Mesh::~Mesh () {
glDeleteVertexArrays(1, &m_VAO);
glDeleteBuffers (1, &m_EBO);
glDeleteBuffers(1, &m_positionVBO);
glDeleteBuffers(1, &m_texCoordVBO);
glDeleteBuffers(1, &m_normalVBO);
glDeleteBuffers(1, &m_colorVBO);
}
void Mesh::S... |
/*
Copyright (c) 2019, Electrux
All rights reserved.
Using the BSD 3-Clause license for the project,
main LICENSE file resides in project's root directory.
Please read that file and understand the license terms
before using or altering the project.
*/
#include <vector>
#include <string>
#include <optional>
#in... |
#include "DirectedGraph.h"
void DirectedGraph::DrawGraph(sf::RenderWindow& window)
{
sf::RenderTexture img;
sf::Vector2u windowSize = window.getSize();
img.create(windowSize.x, windowSize.y - 100);
GraphRepresentation oldRep = m_currentRepresentation;
ChangeToAdjacencyMatrix();
sf::Font fontArial;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.