text stringlengths 3.08k 12.5k |
|---|
/**
* Copyright (c) 2015 rxi
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MIT license. See LICENSE for details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "ini.h"
struct ini_t {
char *data;
char *end;
};
... |
#include <algorithm>
#include <fstream>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <vector>
using namespace std;
struct Nodo {
vector<int> vic;
bool skip;
int level;
int low;
};
pair<vector<int>*, int> checkConn(vector<Nodo*>& G);
bool /*pair<bool, vector<int>*>*/ c... |
#include "BarGraphItem.h"
#include <QtQuick/qsgnode.h>
#include <QtQuick/qsgflatcolormaterial.h>
#include <QQuickWindow>
#include <QGuiApplication>
#include <QScreen>
#include <cmath>
BarGraphItem::BarGraphItem(QQuickItem *parent)
: QQuickItem(parent)
, m_color("blue")
, m_lineWidth(3)
, m_device_pix... |
//===- TestLoopFusion.cpp - Test loop fusion ------------------------------===//
//
// Copyright 2019 The MLIR Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.... |
/*!
* \brief represents a dataset
*
* \author <NAME>
* \version 2017.11.30
* \copyright MIT License
*/
#include <iostream>
#include <fstream>
#include <list>
#include <iterator>
using namespace std;
#include "VdXYZ.h"
#include "VdPoint.h"
#include "VdDataset.h"
#include "iniparser/iniparser.h"
VdDataset::... |
#include "Model.h"
#include "Application.h"
#include "ModuleShader.h"
#include "ModuleTexture.h"
#include "ModuleModelLoader.h"
#include "ModuleCamera.h"
#include "ComponentCamera.h"
#include "ModuleScene.h"
#include "assimp/DefaultLogger.hpp"
#include <assimp/cimport.h>
#include <assimp/material.h>
#include <assimp/me... |
// Optimise
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
// #define MULTI_TEST
#ifdef LOCAL
#define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__);
#define pc(...) PC(#__VA_ARGS__, __VA_ARGS__);
template <typename T, type... |
#include <list>
#include "disk.h"
#include "error_handling.h"
#include "game.h"
#include "io.h"
#include "command.h"
#include "monster.h"
#include "rings.h"
#include "misc.h"
#include "player.h"
#include "level.h"
#include "options.h"
#include "os.h"
#include "rogue.h"
#include "daemons.h"
using namespace std;
stat... |
// -*- C++ -*-
//
// Package: SimMuon/RPCDigitizer/
// Class: RPCChamberMasker
//
/**\class RPCChamberMasker RPCChamberMasker.cc SimMuon/RPCDigitizer/plugins/RPCChamberMasker.cc
Description:
Implementation:
Class to mask RPC digis on a for single DetIds
*/
//
// Original Author: <NAME>
// Cre... |
#include "spritebatcher.h"
#include "../common/shader.h"
#include <cassert>
#include <algorithm>
#include <glm/gtc/type_ptr.hpp>
const char* VERTEX_SRC = "#version 330 core\n"
"layout(location=0) in vec2 position;"
"layout(location=1) in ve... |
// Problem # : 11906
// Created on : 2018-06-17 14:36:34
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <algorithm>
#include <bitset>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#incl... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
#include "rodsPath.hpp"
#include "rodsErrorTable.hpp"
#include "rodsLog.hpp"
#include "mcollUtil.hpp"
#include "miscUtil.hpp"
/* redefine of some input option *... |
/*
---------------------------------------------------------------------------
Copyright (c) 1998-2008, <NAME>, Worcester, UK. All rights reserved.
LICENSE TERMS
The redistribution and use of this software (with or without changes)
is allowed without the payment of fees or royalties provided that:
1. source c... |
/////////////////////////////////////////////////////////////////////////
/// ///
/// ///
/// This Academic Free License applies to any software and associated ///
/// documentation (the "... |
//=====================================================================
//
// GFXImage.cpp -
//
// Last Modified: 2020/04/26 21:38:06
//
//=====================================================================
#include <stddef.h>
#include <string.h>
#include "GFXImage.h"
//------------------------------... |
/*
OOOOOOO OO OO OOOO OOO O
OO OO OOO OOO OO OO OO
OO O OOOOOOO OO OO OO
OO O OOOOOOO OO OO OO OOOO OO OOOOO OOO OO OOOOO OOOOOO ... |
/*
** EPITECH PROJECT, 2019
** NewDimension
** File description:
** Renderer
*/
#include <algorithm>
#include "engine/Renderer.hpp"
#include "engine/shapes/Sphere.hpp"
#include "engine/Window.hpp"
#include "engine/Scene.hpp"
constexpr nd::engine::math::Vector3f nd::engine::Renderer::reflect(const math::Vector3f &I, c... |
/*
* Fold expressions
*
* We have seen the fold expression a few times already, as it comes in very
* handy when you are processing parameters packs. Let's see in more detail
* what it is about.
*
* Scroll down to main, and check out the parameter packs in the program flow.
*/
// Fold expressions are part of ... |
#include "os.display.hpp"
int flag = 0;
/**
* Initialize the LCD and display system.
*/
void os::display::init(void) {
// initialize the LCD
os::dev->out->begin(16, 2);
os::dev->out->clear();
// null the command queue
cmd_queue = NULL;
cmd_queue_tail = NULL;
}
void os::display::update(void) {
if (cmd_queue) ... |
#include "Game.h"
#include "Board.h"
//sets up the board by adding 64 Squares, giving them coordinates and default colours
Game::Game()
{
std::cout << "About to make white player";
whitePlayer = new WhitePlayer();
board.addPiecesToSquares(whitePlayer->getPieces());
std::cout << "About to make black ... |
/**
* Copyright 2019-2021 Huawei Technologies Co., Ltd
*
* 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 applicabl... |
/*************************************************************************/
/* gradient.cpp */
/*************************************************************************/
/* This file is part of: */
/* ... |
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=303000;
const int Mod=998244353;
class SegmentData
{
public:
int ls,rs,sum,mul;
SegmentData()
{
mul=1;
return;
}
};
int n;
int Son[maxN... |
// BlockBed.cpp
#include "Globals.h"
#include "BlockBed.h"
#include "BroadcastInterface.h"
#include "../Entities/Player.h"
#include "../World.h"
#include "../BoundingBox.h"
#include "../Mobs/Monster.h"
#include "../BlockEntities/BedEntity.h"
void cBlockBedHandler::OnBroken(
cChunkInterface & a_ChunkInterface, ... |
#include <Windows.h>
#include <iostream>
enum { _Preorder = 1, _Inorder, _Postorder };
template <typename T>
class Node {
public:
T key;
Node* LNode;
Node* RNode;
Node(T key = 0, Node* LNode = NULL, Node* RNode = NULL) {
this->key = key;
this->LNode = NULL;
this->RNode = RN... |
#include <Urho3D/Core/Context.h>
#include <Urho3D/Engine/Engine.h>
#include <Urho3D/Engine/EngineDefs.h>
#include <Urho3D/IO/Log.h>
#include <Urho3D/Scene/Node.h>
#include <Urho3D/Scene/Scene.h>
#include <Urho3D/Graphics/StaticModel.h>
#include <Urho3D/Graphics/Model.h>
#include <Urho3D/Resource/ResourceCache.h>
#inc... |
// Copyright (c) 2015, <NAME> and <NAME>
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions ... |
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* <NAME> <<EMAIL>>
*
* Copyright:
* <NAME>, 2004
*
* Last modified:
* $Date$ by $Author$
* $Revision$
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www... |
//
// Copyright 2020 DreamWorks Animation
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with... |
/*!
* Copyright 2019 Breda University of Applied Sciences and Team Wisp (<NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <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 Lice... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
#include "rodsPath.hpp"
#include "rodsErrorTable.hpp"
#include "rodsLog.hpp"
#include "phybunUtil.hpp"
#include "miscUtil.hpp"
int
phybunUtil( rcComm_t *conn, r... |
/* Copyright (c) 2016, 2017, 2018, 2019, 2020, 2021 <NAME>
*
* 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.
*
* THE SOFTWARE IS PROVIDED "AS IS" ... |
/*
ID: felikju1
PROG: camelot
LANG: C++
*/
#include <cstdio>
#include <cmath>
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#define fi first
#define se second
#define pb push_back
#define mp make_... |
const double MLFMM_ALPHA(1.0);
#include "General.hpp"
#include "MLFMM_Env.hpp"
#include "Direct.hpp"
double printResults(const vector<complex>& mlfmm,
const vector<complex>& exact)
{
double TotRelError = 0;
double TotErrorSq = 0;
double TotNormSq = 0;
double MaxRelErr = 0;
int N = exact.size();
... |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <arrayfire.h>
#include <gtest/gtest.h>
#include "flashlight/fl/tensor/Index.h"
#include "flashlight/fl/tensor/Rando... |
/*
* Copyright (C) 2015 by <NAME> (<EMAIL>)
*
* Released under the MIT license, see LICENSE.txt
*/
#include <string>
#include <cstdlib>
#include <iostream>
#include <cassert>
#include <fstream>
#include <getopt.h>
#include <sstream>
#include <stdexcept>
#include "pathmapper.h"
#include "vgsgsql.h"
using namespac... |
#include "RRF_Raster.h"
#include <CppUtil/Qt/RawAPI_Define.h>
#include <CppUtil/Qt/RawAPI_OGLW.h>
#include <CppUtil/Engine/Scene.h>
#include <CppUtil/Engine/SObj.h>
#include <CppUtil/Engine/CmptMaterial.h>
#include <CppUtil/Engine/CmptGeometry.h>
#include <CppUtil/Engine/BSDF_FrostedGlass.h>
#include <CppUtil/OpenGL... |
// (C) 2018 University of Bristol, Bar-Ilan University. See License.txt
#include "Math/gf2n.h"
#include "Math/gfp.h"
#include "Math/Share.h"
#include "Auth/fake-stuff.h"
#include "Tools/benchmarking.h"
#include <fstream>
template<class T>
void make_share(vector<Share<T> >& Sa,const T& a,int N,const T& key,PRNG& G)
... |
/*
* Copyright 2009 <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distr... |
//============================================================================
// Name : main.cpp
// Author : rewrihitesh
// Version : 1.0
// Copyright : Your copyright notice
// Description : Reading Filein C++, Ansi-style
//============================================================================... |
// Copyright (C) 2005, 2006 International Business Machines and others.
// All Rights Reserved.
// This code is published under the Eclipse Public License.
//
// $Id: hs071_nlp.cpp 2005 2011-06-06 12:55:16Z stefan $
//
// Authors: <NAME>, <NAME> IBM 2005-08-16
#include "IPOPTSolver.h"
#include <cassert>
#incl... |
#include "Camera.h"
#include <stdio.h>
Camera::Camera() {
}
Camera::Camera(float fov, D3DVIEWPORT9& viewPort) {
pos = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
look = D3DXVECTOR3(0.0f, 0.0f, 1.0f);
up = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
right = D3DXVECTOR3(1.0f, 0.0f, 0.0f);
originalPos = pos;
vp = viewPort;
D3DXMatrixP... |
/*
* 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... |
#include "global.h"
#include "InputHandler_Linux_Joystick.h"
#include "RageLog.h"
#include "RageUtil.h"
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <linux/joystick.h>
#include <set>
static const char *Paths[InputHandler_Linux_Joystick::NUM_JOYSTICKS] ... |
/**************************************************************************\
*
* This file is part of the Coin 3D visualization library.
* Copyright (C) by <NAME> & Gas Technologies.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License... |
// Copyright (c) 2017-2019 Tkeycoin Dao. All rights reserved.
// Copyright (c) 2019-2020 TKEY DMCC LLC & Tkeycoin Dao. All rights reserved.
// Website: www.tkeycoin.com
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may... |
// A random search for LLVM codesize using the C++ API.
//
// While not intended for the majority of users, it is entirely straightforward
// to skip the Python frontend and interact with the C++ API directly. This file
// demonstrates a simple parallelized random search implemented for the LLVM
// compiler service.
//... |
/*=============================================================================
ALAudioMusic.cpp: MikMod driver for Unreal OpenAL audio output.
Revision history:
* Created by <NAME>.
=============================================================================*/
#include "ALAudioMusic.h"
/*------------------------... |
/*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : <NAME>
Contributors : <NAME>, <NAME>.
[1] <NAME>, <NAM... |
#include <WiFiClientSecure.h>
#include "CTBotSecureConnection.h"
#include "Utilities.h"
#define TELEGRAM_URL FSTR("api.telegram.org")
#define TELEGRAM_IP FSTR("172.16.31.10") // "192.168.3.11" <-- Old IP
#define TELEGRAM_PORT 443
CTBotSecureConnection::CTBotSecureConnection() {
m_useDNS = true;
}
bool CTBotSecu... |
/* -*- Mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2017-Present Couchbase, Inc.
*
* Use of this software is governed by the Business Source License included
* in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
* in that file, in accordance... |
// The Notices and Disclaimers for Ocean Worlds Autonomy Testbed for Exploration
// Research and Simulation can be found in README.md in the root directory of
// this repository.
#include "config.h"
#include <ros/ros.h>
#include <ros/exceptions.h>
#include <ros/duration.h>
#include <boost/regex.hpp>
#include <limit... |
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESPAsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <DNSServer.h>
#include <ArduinoJson.h>
#include <FS.h>
struct Configuration
{
const char *ssid;
const char *password;
IPAddress ip_address;
IPAddress gateway;
IPAddress subnet;
};
/* E... |
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "ecc32_mem_area.h"
#include "secded_enc.h"
#include <cassert>
#include <cstring>
#include <stdexcept>
Ecc32MemArea::Ecc32MemArea(const std::string &scope, uin... |
#include <QtEndian>
#include <QDebug>
#include "socket.hpp"
#include "scope.hpp"
#define PARSE_SIZE 1024 * 1024 * 1
Socket::Socket(Scope *parent) :
QThread(parent),
_socket(new QTcpSocket(this)),
_buffer(new QBuffer(this))
{
_buffer->open(QBuffer::WriteOnly);
memset(&pic_raw, 0, sizeo... |
#include "test_r_motion.h"
#include "r_motion/utils.h"
#include "r_utils/r_file.h"
#include "r_utils/r_string_utils.h"
#include "r_utils/r_avg.h"
#include "r_mux/r_demuxer.h"
#include "r_codec/r_video_decoder.h"
#include <deque>
// Added to the global namespace by test_r_mux.cpp, so extern'd here:
extern unsigned cha... |
#include "Indicator.h"
#include <FastLED.h>
#include "millis.h"
///////////////////////////////////////////////////////////////////////////////////////////////////
#define FPS 25
enum mode_t {
off,
fire,
disco
};
struct flame_t {
uint8_t heat;
uint8_t increment;
bool cooling;
};
#define P... |
#include "Player.hpp"
Player::Player(std::shared_ptr<SpriteSheet> sheet, int width, int height, std::shared_ptr<Background> bg)
: Sprite(sheet, width, height, bg), KeyboardEventListener() {
state = State::IDDLE_RIGHT;
spriteRect->x = 50;
spriteRect->y = 603;
ju... |
//
// Created by nova on 8/30/20.
//
#include "Client.h"
void Client::run()
{
LOG(INFO) << "========== Start AcmeCat Client ==========";
/* Get client's and server's private key */
std::shared_ptr<RSA> clientPrivateKey = nullptr;
std::string privateKeyPEM = globalConfigs["client"]["private_key"].asString();
auto... |
#include <iostream>
#include <cstdlib> // for srand and rand
#include <ctime> // for time()
#include <unistd.h> // for sleep
//#include <conio.h>
#include <stdio.h>
#include <termios.h>
#include <fcntl.h>
// to do list
// =========================================
// 1.add auto move by one direction choice
// and on... |
#include <iostream>
#include <stdio.h>
#include <pthread.h>
#include <cmath>
#include <unistd.h> //for usleep
using namespace std;
// bool RequestToSend = false;
// bool ArrivalNotificationSenderSide = false;
// bool TimeOut = false;
// bool ArrivalNotificationReceiverSide = false;
// int Sw = pow(2, m-1);
// int S... |
//
// main.cpp
// Kattis_Ocean Currents
//
// Created by mcr on 18/11/2020.
//
#pragma GCC optimize(3,"Ofast","inline")
//#include <bits/stdc++.h>
#include<iostream>
#include<sstream>
#include<iomanip>
#include<cmath>
# include <string.h>
#include<math.h>
#include<string>
#include<vector>
#include<queue>
#include... |
#include "gqf.h"
#include "cqf/gqf.h"
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h>
#include<iostream>
#include <fstream>
#include "hashutil.h"
#include "kmer.h"
#include <vector>
#include <chrono>
#include<cmath>
#include <random>
#include <algorithm>
#include "Benchmark_Utils_Script/gene... |
//
// This file is part of the libWetCloth open source project
//
// The code is licensed solely for academic and non-commercial use under the
// terms of the Clear BSD License. The terms of the Clear BSD License are
// provided below. Other licenses may be obtained by contacting the faculty
// of the Columbia Computer... |
#include "overlap.h"
#include "editdistance.h"
#include "math.h"
Overlap::Overlap(int offset, int overlapLen, int distance){
mOffset = offset;
mOverlapLen = overlapLen;
mDistance = distance;
mOverlapped = overlapLen>0;
}
Overlap Overlap::fit(Sequence r1, Sequence r2){
int len1 = r1.length();
i... |
//--------------------------------------------------------------------------------------------------
//
// File: m+mSendToMQOutputInputHandler.cpp
//
// Project: m+m
//
// Contains: The class definition for the input handler used by the SendToMQ output service.
//
// Written by: <NAME>
//
// Copyright: ... |
/*
* Copyright (c) 2018-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* 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
* ri... |
#include "Formats.h"
#include "PartFiles.h"
#include "Process.h"
#include "MergeFiles.h"
#include "TreeIndex.h"
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
/* creates last and then all previous snapshot block files. */
void DoProcessing(PathInfo& ps, PathPair paths, int firstSnap, int lastSnap, in... |
//Small header to get STLport numerous defines:
#include <utility>
#if defined (STLPORT) && !defined (_STLP_NO_EXTENSIONS)
# include <rope>
# if !defined (_STLP_USE_NO_IOSTREAMS)
# include <sstream>
# endif
#endif
#include "cppunit/cppunit_proxy.h"
// #include <stdlib.h> // for rand etc
#if defined (_STLP_US... |
#include"stdio.h"
#include"stdlib.h"
//agents
#include"agents/Unified_Neural_Model.h"
//environments
#include"environments/Function_Approximation.h"
#include"environments/SecCom.h"
#include"environments/Single_Cart_Pole.h"
#include"environments/Double_Cart_Pole.h"
#include"environments/Mountain_Car.h"
#include"envir... |
#include "memUse.hpp"
#include "../../common/taskLib/Backend.hpp"
using namespace std;
using namespace contech;
BackendMemUse::BackendMemUse()
{
resetBackend();
}
void BackendMemUse::resetBackend()
{
seqAllocCurrent = 0; seqAllocMax = 0;
seqFreeCurrent = 0; seqFreeMax = 0;
totalAllocSize = 0; effAllo... |
/*
Реализуйте ассоциативный массив с использованием хеш-таблицы. Использовать стандартную библиотеку (set, map, LinkedHashMap, и т. п.) не разрешается.
Входные данные
Входной файл содержит описание операций, их количество не превышает 100000. В каждой строке находится одна из следующих операций:
put x y — поставить в... |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <cctype>
using namespace std;
template<class T>
vector<T> tokenize(string s, const string &delim=" ") {
vector<T> ret;
string::size_type i=0;
... |
#include "XDATA.h"
using namespace ND;
// Title : Constructor
// Purpose : this constructor is used when you are trying to receive data
// Input : none
// Returns : none
XDATA::XDATA()
{
uint8_t i;
for (i = 0; i < (PAYLOAD_SIZE/8); i++) {
payload[i] = 0;
prev_payload[i] = 0;
}
ZERO();
}
// Title : ZERO
// Pu... |
/* doaddsub.c: bcmath library file. */
/*
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
Copyright (C) 2000 <NAME>
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 Sof... |
// SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>>
//
// SPDX-License-Identifier: Apache-2.0
#include "my_common.h"
static debug_level_t uDebugLevel = DEBUG_LOG;
#if 1 == N32_CFG_VALVE_ENABLED
static void turn_off_valve(unsigned int channel, unsigned int valve) {
// decreas number of timers
if (num_... |
#include <iostream>
#include <string>
#include <cstring>
#include <map>
#include <fstream>
#include <ctime>
#include <vector>
#include "interface.h"
using namespace std;
INTERFACE::INTERFACE() {
this->inputSv = "";
this->sockAddr = "0.0.0.0";
this->port = 54000;
}
INTERFACE::INTERFACE(const string vala){
thi... |
#include <iostream>
#include <map>
#include <vector>
#include <list>
#include "variadics.h"
#include "compile_time_computation.h"
#include "traits.h"
#include "policies.h"
#include "member_detection.h"
#include "sequences.h"
#include "tuple_cat.h"
#include "solutions.h"
using namespace std::string_literals;
templat... |
auto VDP::Sprite::write(n16 address, n16 data) -> void {
auto baseAddress = nametableAddress;
if(vdp.h40()) baseAddress &= ~0x1ff;
address -= baseAddress;
if(address >= frameObjectLimit()*8/2) return;
auto& object = cache[address >> 2];
switch(address & 3) {
case 0: object.y = data.bit( 0, 9); brea... |
/*
* Copyright (c) 2018 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, dis... |
#include <bits/stdc++.h>
#define N 100050
using namespace std;
const double eps = 1e-5;
int num_of_walks = 40;
int seq_len = 4;
int o[N];
char dis[N][N];
bool vis[N];
int n, m;
vector<int> E[N];
vector<double> p_merw[N];
class AliasTable{
public:
vector<int> A, B;
vector<double> S;
public:
... |
//
// chrome-os-x-cookie-decryptor
//
// Modified from Chromium, Copyright 2014 The Chromium Authors. All rights reserved.
//
// Build:
// g++ decryptor.cpp \
// -I/usr/local/opt/nspr/include/nspr \
// -I/usr/local/opt/nss/include/nss \
// -L/usr/local/opt/nspr/lib \
// -L/usr/local/opt/nss/lib \
// -lns... |
#define _USE_MATH_DEFINES
#include <cmath>
#include <algorithm>
#include <limits>
#include <iostream>
#include <fstream>
#include <vector>
#include "geometry.h"
const float sphere_radius = 1.5; // all the explosion fits in a sphere with this radius. The center lies in the origin.
const float noise_amplitude = 1.0; /... |
#include <bits/stdc++.h>
#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))
using namespace std;
typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;
bool f(vector<vector<int>> v, vector<string> s, int idx)
{
bool flg = true;
for (int i = 0; i < v.size();... |
// Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 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 ... |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <set>
#include <vector>
#include <unistd.h>
using namespace std;
struct tomato {
tomato(int row, int col, int height) : row(row), col(col), height(height) {}
bool operator== (const tomato& v) {
return row == v.row and col == v.col an... |
/*
* SingleCoreSolver.cpp
*
* Created on: 10 Jan 2018
* Author: konstantin
*/
#include "SingleCoreSolver.h"
#include "CPUSolver.h"
#include <iostream>
#include <cmath>
SingleCoreSolver::SingleCoreSolver(int gridSize, float reynold, float deltaTime, float gravityX, float gravityY, float length, const Bounda... |
#include <xx_three/xx_three.h>
#include <gfx-pbr/Api.h>
#include <stl/vector.hpp>
#include <cstring>
using namespace two;
static string vertex_shader =
"$input a_position, a_color0\n"
"$output v_color\n"
"#include <common.sh>\n"
"void main()\n"
"{\n"
" v_color = a_color0;\n"
" gl_Position = mul(u_mode... |
/* This software and supporting documentation are distributed by
* Institut Federatif de Recherche 49
* CEA/NeuroSpin, Batiment 145,
* 91191 Gif-sur-Yvette cedex
* France
*
* This software is governed by the CeCILL-B license under
* French law and abiding by the rules of distribution of free soft... |
#include <cstdio>
#include <faabric/util/func.h>
#include <sgx/SGXWAMRWasmModule.h>
#include <sgx/attestation.h>
#include <sgx/system.h>
#include <wasm/WasmExecutionContext.h>
extern "C"
{
void ocall_printf(const char* msg) { printf("%s", msg); }
}
thread_local faaslet_sgx_msg_buffer_t* faasletSgxMsgBufferPtr;
... |
/*
dijkstra_nonholonomic16.cc
[cost_to_go] = dijkstra_nonholonomic(A, xya_goal, xya_start);
where positive costs are given in matrix A with 16 different orientations.
Compile: mex -O dijkstra_nonholonomic16.cc
Written by <NAME> (<EMAIL>), 9/2007
*/
#include <math.h>
#include <set>
#include "mex... |
// jhcSpeechWeb.cpp : uses DLL to access Microsoft Azure Speech Services
//
// Written by <NAME>, <EMAIL>
//
///////////////////////////////////////////////////////////////////////////
//
// Copyright 2020 IBM Corporation
// Copyright 2020 Etaoin Systems
//
// Licensed under the Apache License, Version 2.0 (the "Licens... |
#include <iostream>
#include <vector>
#include <algorithm>
#include "../lib/matplotlibcpp.h"
#include <math.h>
using namespace std;
namespace plt = matplotlibcpp;
// Print 2D vectors coordinate values
void print2DVector(vector<vector<double> > vec)
{
for (int i = 0; i < vec.size(); ++i) {
cout << "(";
... |
// =========== Template ========== //
#include <bits/stdc++.h>
using namespace std;
int __fastio = []() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; } ();
template<typename A> ostream& operator<<(ostream &os, const set<A> &m) { os << "{"; string sep = ""; for (auto ... |
#include <sgltk/sgltk.h>
using namespace sgltk;
class Win : public Window {
bool shift;
double scale;
int interations;
glm::dvec2 center;
Texture_1d texture;
Mesh display_mesh;
Shader shader;
P_Camera cam;
void handle_resize();
void handle_mouse_wheel(int x, int y);
void handle_keyboard(const std::string... |
//============================================================================
//
// This file is part of GPSTk, the GPS Toolkit.
//
// The GPSTk is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation; ei... |
#include <ros/ros.h>
// PCL specific includes
#include <tf2_ros/transform_listener.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#include <tf2_sensor_msgs/tf2_sensor_msgs.h>
#include <tf2_eigen/tf2_eigen.h>
#include <tf2_ros/static_transform_broadcaster.h>
#include <string>
#include <sstream>
#include <cstdlib>... |
#include "RecoEgamma/ElectronIdentification/interface/ElectronMVAEstimator.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
ElectronMVAEstimato... |
#include <new>
#include <string>
#include <stdio.h>
#include <math.h>
#include <omp.h>
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) < (b) ? (a) : (b))
// thread block size
#define BSIZE 256
template <class T>
class AvgPoolGrad {
public:
void compute(const T& x, const T& y, const T& dy, T scal... |
/*
Copyright 2012 University of Washington
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.