text stringlengths 3.08k 12.5k |
|---|
/**
* Copyright 2020 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 applicable law or agreed ... |
#include <cstring>
typedef void (*void_func)();
#include "cryptonight.h"
#include "cryptonight_aesni.h"
#include "xmrstak/backend/cpu/crypto/asm/cnR/CryptonightR_template.h"
#include "xmrstak/misc/console.hpp"
static inline void add_code(uint8_t*& p, void (*p1)(), void (*p2)())
{
const ptrdiff_t size = reinterpret_... |
/*
** ClanLib SDK
** Copyright (c) 1997-2020 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for a... |
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.0,
* as published by the Free Software Foundation.
*
* This program is also distributed with... |
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMessageBox>
#include "domxml.h"
#include <QDebug>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
// 开始 车辆管理界面
on_actionCar_triggered();
connectDB();
initData();
DomXM... |
#include <sstream>
#include <string>
#include <cmath>
#include "ros/ros.h"
#include "sensor_msgs/LaserScan.h"
#include <geometry_msgs/PoseStamped.h>
#include "scan_matching_skeleton/correspond.h"
#include "scan_matching_skeleton/transform.h"
#include "scan_matching_skeleton/visualization.h"
#include <tf/transform_broa... |
/*
* Copyright 2015 <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 agreed to in writ... |
// /mnt/ex/dist/win32/wx/MinGW/wx/docs/wx_wxeraseevent.html
#include <iostream>
#include <fstream>
using namespace std;
bool leftcompare(string s1, string s2) {
if (s2.length()>s1.size()) return false;
else return s1.substr(0,s2.size())==s2;
}
bool rightcompare(string s1, string s2) {
if (s2.length()>s1.size()) re... |
//
// Created by leodlplq on 29/12/2021.
//
#include "include/Text.hpp"
Text::Text(const FilePath &filePath, const int width, const int height, const std::string fontName):
_wHeight(height), _wWidth(width), _fontName(fontName)
{
init(filePath);
}
void Text::init(const FilePath &filePath) {
FT_Library _ft;
... |
/*
* Vega Strike
* Copyright (C) 2001-2002 <NAME>
*
* http://vegastrike.sourceforge.net/
*
* 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... |
#include "Graph.h"
Graph::Graph(int width, int height) : n_map_width(width), n_map_height(height) {
this->nodes.resize(static_cast<unsigned long>(this->n_map_width * this->n_map_height));
int i{0};
for(auto &n : nodes) {
n = std::make_shared<Node>();
n->x = i % this->n_map_width;
n-... |
#pragma once
#include "threadpool.hpp"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <cstdio>
#include <cerrno>
#include <fcntl.h>
#include <cstdlib>
#include <cassert>
#include <sys/epoll.h>
#include <csignal>
#include <unistd.h>
#include <iostream>
#include <cstring>
#include <vecto... |
#include "Gui.hpp"
#include "Engine/Display/DisplayWindow.hpp"
Gui::Gui() :
show_demo_window(false),
show_another_window(false)
{
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.IniFilename = nullptr;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeybo... |
// 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 "chrome/browser/bookmarks/bookmark_codec.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/bookmarks/b... |
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <syslog.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/epoll.h>
using namespa... |
// Copyright (c) 2014 <NAME>
// Released under the MIT License (http://opensource.org/licenses/MIT)
#include "jvar.h"
#include <vector>
#ifdef _MSC_VER
#include <Windows.h>
#define getTickCount GetTickCount
#endif
using namespace std;
using namespace jvar;
/**
* \example misc.cpp
* This example shows misc functi... |
#include <cstdio>
#include <cstdlib>
/// ROS
#include <cv_bridge/cv_bridge.h>
#include <image_transport/image_transport.h>
#include <message_filters/subscriber.h>
#include <message_filters/sync_policies/approximate_time.h>
#include <message_filters/time_synchronizer.h>
#include <ros/ros.h>
#include <sensor_msgs/Image.h... |
/*
UrchinTSS
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
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 right... |
//-------------------------------------------------------------------
//
// File: TAddChannel.cpp
//
// Author: <NAME>
//
// Date: 03.06.98
//
// Desc: Dialog for addition of channels to cue sheet
//
// Copyright ©1998 mediapede Software
//
//---------------------------------------------------------------------
// In... |
#pragma once
#include <cstdint>
#include <string>
enum class ChatRequestType : uint16_t {
LOGINAVATAR = 0,
LOGOUTAVATAR,
DESTROYAVATAR,
GETAVATAR,
CREATEROOM,
DESTROYROOM, // 5
SENDINSTANTMESSAGE,
SENDROOMMESSAGE,
SENDBROADCASTMESSAGE,
ADDFRIEND,
REMOVEFRIEND, // 10
FR... |
#include "map.hpp"
#include <array>
#include <cstring>
#include <functional>
#include <future>
#include <iostream>
#include <numeric>
#include <random>
#include <vector>
using namespace std;
// Separate `value` into `num` parts by normal distribution
static vector<double> __sep_norm(size_t num, double value)
{
vec... |
#include "simulation/ElementCommon.h"
#include "simulation/Air.h"
static int update(UPDATE_FUNC_ARGS);
void Element::Element_HEAC()
{
Identifier = "DEFAULT_PT_HEAC";
Name = "HEAC";
Colour = PIXPACK(0xCB6351);
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;
Advection = 0.0f;
AirDrag = 0.00f * CFDS;
Ai... |
/* darkseed2-tools - Tools to inspect Dark Seed II resources
*
* Copyright (c) 2014, <NAME> (DrMcCoy) <<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:
*
* 1. Redistributions of so... |
//
// ecuaObject.cpp
// EsoterionCarrotUniverseAlpha
//
// Created by <NAME> on 7. 12. 14.
//
//
#include "ecuaObject.h"
#include "ofxOsc.h"
static ofxOscSender *sender = NULL; //KX each obj same sender
ecuaObject::ecuaObject(ofVec3f _p) {
setup(_p);
if (sender==NULL) {
cout << "NEW SENDER"... |
#define __USE_MINGW_ANSI_STDIO 0
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <stack>
#include <deque>
#include <string.h>
#include <sstream>
... |
/* sapphire.cpp -- the Sapphire II stream cipher class.
Dedicated to the Public Domain the author and inventor:
(<NAME>). This code comes with no warranty.
Use it at your own risk.
Ported from the Pascal implementation of the Sapphire Stream
Cipher 9 December 1994.
Added hash pre- and post-proc... |
/*
* Copyright 2008-2013 NVIDIA Corporation
* Modifications Copyright© 2019 Advanced Micro Devices, 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
*
* ... |
#include <opencv2/opencv.hpp>
#include <iostream>
#include <math.h>
#define K 3
using namespace std;
using namespace cv;
//Create the kernel: we're creating a convolution/filtering matrix populated with 1 to blur our image.
//For that, we use the functionality of the native dataType Mat_ with the aux of the input str... |
// MadronaLib: a C++ framework for DSP applications.
// Copyright (c) 2013 Madrona Labs LLC. http://www.madronalabs.com
// Distributed under the MIT license: http://madrona-labs.mit-license.org/
#include "MLEnvelope.h"
static const float kMinAttack = 0.0001;
static const float kMinDecay = 0.0001;
MLEnvelope::MLEnve... |
/*
* Copyright (c) 2020, the mcl_3dl authors
* 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 l... |
/*
* Copyright (c) CERN 2016
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
/*=auto=========================================================================
Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
Module: $RCSfile: vtkFSSurfaceHelper.h... |
#include <iostream>
#include <fstream>
#include <sys/stat.h>
#include "../../include/utils/parsing.hpp"
/* true if the character passed is a whitespace character (space, tab, newline); Else false */
bool parsing::utils::is_whitespace(const char& c)
{
return c == ' ' || c == '\t' || c == '\n';
}
/* given a startin... |
/*
/////////// ********************************************************************************************* \\\\\\\\\\\
| This program |
| Solving Boundary Value Problem by Shooting method ... |
/**********************************************************************************
Copyright (c) 2020 <NAME>
MIT License
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,... |
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, i... |
#include <sstream>
#include <fstream>
#include <iostream>
#include <vector>
#include "../xmlRep.h"
#include "ioTools.h"
#include "doStats.h"
using namespace std;
// if handed an xml file, will be looking at a single calculation
// so no .g???. in the output files
// eventually support handing a file that is the list... |
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2012, <NAME>. All rights reserved.
// Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided ... |
#include <QDebug>
#include <QStringList>
#include "dataobjecttablemodel.h"
//start id=extractHeaders
DataObjectTableModel::
DataObjectTableModel(DataObject* headerModel, QObject* parent) :
QAbstractTableModel(parent) {
if (headerModel != NULL) {
extractHeaders(headerModel);
}
}
int DataObjectTableM... |
#include <qlabel.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qtimer.h>
#include <qspinbox.h>
#include <qsocketdevice.h>
#include <qhostaddress.h>
#include <qpixmap.h>
#include <qdatastream.h>
#include <qcstring.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/in.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 <support/Autolock.h>
#include <media/MediaDefs.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <media/MediaAddOn.h>
#include <Autolock.h>
#include <Directory.h>
#include <Entry.h>
#include <Path.h>
#include <String.h>
#include "LegacyMediaAddOn.h"
#include "LegacyAudioConsumer.h"
#... |
#include "cnnroiconfig.h"
#include <QFile>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QLoggingCategory>
#include <QRegularExpression>
static constexpr auto CONFIG_MAX_ROIS = 20;
static constexpr auto CONFIG_TAG_CNN = "Cnn";
static constexpr auto CONFIG_TAG_ROINAME = "Ro... |
#include "Scene.h"
#include<string>
#include<fstream>
#include"GameObject.h"
#include"RessourcesLoader.h"
#include "imgui/imgui_impl_glfw.h"
#include "imgui/imgui_impl_opengl3.h"
#include <vector>
#include <iostream>
#include "ScriptManager.h"
static GameObjectClone currentObj;
Scene::Scene(const char* name) {
this... |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
#pragma once
#include "glmanager.hpp"
#include "esMatrix.h"
inline static std::array<GLfloat, 24 * 3> vertices = {
-0.5f, -0.5f, -0.5f,
-0.5f, -0.5f, 0.5f,
0.5f, -0.5f, 0.5f,
0.5f, -0.5f, -0.5f,
-0.5f, 0.5f, -0.5f,
-0.5f, 0.5f, 0.5f,
0.5f, 0.5f, 0.5f,
0.5f, 0.5f, -0.5f,
-0... |
#include "CreateDeck.h"
static const unsigned int sizeofdeck = 10;
static const std::string namebeast[16] = { "Socrate","Platon","Aristote","Confucius",
"Sénèque","Averroès","Montaigne","Descartes",
"Erasme","Voltaire","Moontesquieu","Rousseau",
"Diderot","Kant","Marx","Nietzsche"
... |
#include "ProgramCache.h"
ProgramCache::ProgramCache() :
_numProgLines(0) {}
void ProgramCache::addCommand(PoiCommand cmd){
if (_numProgLines >= N_PROG_STEPS){
LOGE(PCACHE, "Error. Number of programming steps exceeds maximum (%d).", N_PROG_STEPS);
// reset current program
clearProgram();
return;
}... |
/* main.cc - Main application entry-point.
*
* -----------------------------------------------------------------------
*
* Copyright (C) 2016 <NAME> https://steve.kemp.fi/
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that... |
//B 2016/2017, Zadaća 1, Zadatak 4
#include <iostream>
#include <string>
#include <vector>
#include <stdexcept>
typedef std::vector<std::string> strvec;
std::string ObrniFraze (std::string ulaz, strvec fraze);
std::string IzmijeniUPigLatin (std::string ulaz, strvec fraze);
bool Nijeslovo(strvec fraze);
... |
/*
------------------------------------------------------------------------------
rand.c: By <NAME>. My random number generator, ISAAC. Public Domain
MODIFIED:
960327: Creation (addition of randinit, really)
970719: use context, not global variables, for internal state
980324: make a portable version
010626: ... |
//===- EhFrame.cpp -------------------------------------------------------===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------------------... |
/*
Part of BridgeData.
Copyright (C) 2016-17 by <NAME>.
See LICENSE and README.
*/
#include <iomanip>
#include <array>
#include <sstream>
#include <fstream>
#include "Group.h"
#include "Files.h"
#include "parse.h"
#include "dll.h"
#include "Bexcept.h"
using namespace std;
void makeTraceDDS(
boards... |
/*
* Another World engine rewrite
* Copyright (C) 2004-2005 <NAME> (<EMAIL>)
*/
#ifndef _WIN32
#include <sys/param.h>
#endif
#include <sys/stat.h>
#include <string.h>
#include "file.h"
#include "util.h"
#include "dirent.h"
#define MAXPATHLEN 256
#if defined(_WIN32) || defined(_WIN64)
#define snprintf _snprintf ... |
#include "line3_t.hpp"
#include <point3.hpp>
using namespace fun;
using namespace std;
CPPUNIT_TEST_SUITE_REGISTRATION( line3_TestCase );
void line3_TestCase::setUp()
{
_l0 = new line3<int>(3, 7, 5);
_l1 = new line3<int>(1, 2, 1);
_l2 = new line3<int>(3, 8, 4);
_lg0 = new line3<GF<3> >(0, 1, 2);
_lg1 = ne... |
// B 16/17, Zadaća 2, Zadatak 2
// Autotestovi by <NAME> (<EMAIL> | @eon : etf.ba)
// NAPOMENA: i javni ATo-vi su dio postavke!
#include <iostream>
#include <deque>
#include <vector>
#include <cmath>
#include <stdexcept>
#include <type_traits>
#include <iomanip>
using namespace std;
enum class SmjerKretan... |
/*
* Circle.cpp
* RVO2 Library
*
* Copyright 2008 University of North Carolina at Chapel Hill
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/... |
#include <iostream>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <vector>
#include <string>
#include <stdlib.h>
#include <algorithm>
#include <string.h>
#include <inttypes.h>
#include <typeinfo>
... |
//********************************************************
// Syzygy is licensed under the BSD license v2
// see the file SZG_CREDITS for detils
//********************************************************
#include "arPrecompiled.h"
#include "arViewport.h"
arViewport::arViewport() :
_left(0),
_bottom(0),
... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "image_conv2D.h"
static unsigned char *ch_images; // Images data region
static unsigned char *image_in; // Image to be processed
static unsigned char *image_out; // Ouput image of size [OHEIGHT*OWIDTH*3] (convolved) sw
void sw_convolutio... |
/*
* Copyright 2007-2021 CM4all GmbH
* All rights reserved.
*
* author: <NAME> <<EMAIL>>
*
* 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
... |
/*
* All rights reserved. Distributed under the terms of the MIT license.
*/
#include <Button.h>
#include <Catalog.h>
#include <ControlLook.h>
#include <GroupLayout.h>
#include <GroupView.h>
#include <LayoutBuilder.h>
#include <ListView.h>
#include <ScrollView.h>
#include <StringView.h>
#include <Url.... |
/*==========================================================================
* Copyright (C) 1997-1999 Microsoft Corporation.
*
* File: sound.cpp
* Content: DirectSound management
*
***************************************************************************/
#include <dmusicc.h>
#include <dmusici.h>
... |
// This file is part of cobcy, a COBOL-to-C compiler.
//
// Copyright (c) 1995-2008 by <NAME> <<EMAIL>>
// This file is free software, distributed under the MIT License.
#include "semutil.h"
#include "semextern.h"
#include "symbase.h"
#include "symconst.h"
#include "symlabel.h"
#include <stdio.h>
extern long int ival... |
//
// See the file LICENSE for redistribution information.
//
// Copyright (c) 2002,2009 Oracle. All rights reserved.
//
//
#ifdef _MSC_VER
#pragma warning( disable : 4996 ) // warning: deprecation of strdup() in VS8
#endif
#include "dbxml_config.h"
#include <dbxml/DbXml.hpp>
#include <iostream>
#include <cerrno>
#... |
#include <iostream>
#include <boost/numeric/ublas/vector.hpp>
#include "fileparser.hpp"
#include "ublas_extra.hpp"
void printDoubleArray(double* arr, size_t length, bayesopt::utils::FileParser &fp);
void printUblasVec(boost::numeric::ublas::vector<double> &ublas_vec, bayesopt::utils::FileParser &fp);
int main()
{
... |
#include <cstdio>
#include <cstring>
#include "os_2Table.h"
#include "bufferReader.h"
OS_2Table::OS_2Table(const Tag* tag)
:
Table(tag),
version_(0),
xAvgCharWidth_(0),
usWeightClass_(0),
usWidthClass_(0),
fsType_(0),
ySubscriptXSize_(0),
ySubscriptYSize_(0),
ySubscriptXOffset_(0),
ySubscriptYOffset_(0),
ySuperscriptX... |
/*
* Airton InfraRed module
* For YKRH remote control replacement
* <NAME> 2016
*
* Airton IR code is composed of 13 bytes
* the IR frequency is 38Khz (33% duty cycle)
* Bytes are sent in LSB first order
* Byte 0 is a constant value (I guess the "address" of the aircond)
* Bytes 2,5,7,8,10 are not used
* Byt... |
/*
* ParticleSwarmOptimization.cpp
*
* Created on: Jul 29, 2012
* Author: anders
*/
#include <iostream>
#include <unistd.h>
#include <thread>
#include <errno.h>
#include <cstring>
#include <cstdlib>
#include <limits>
#include <fstream>
#include <ctime>
#include <vector>
#include "Optimizer/ParticleSwarmOpt... |
#include "library.h"
#include <algorithm>
#include <filesystem>
#include <iostream>
#include <iterator>
#include <map>
#include <string>
#include <unordered_map>
using std::advance;
using std::cout;
using std::endl;
using std::map;
using std::runtime_error;
using std::stable_sort;
using std::unordered_map;
bool fin... |
#include "StdAfx.h"
#include "Projection.h"
#include "ProjectionUtils.h"
#include "ProjectionLambertAzimuthal.h"
#define _USE_MATH_DEFINES
#include <math.h>
#define EPSLN 1.0e-10
CProjectionLambertAzimuthal::CProjectionLambertAzimuthal ()
{
}
CProjectionLambertAzimuthal::~CProjectionLambertAzimuthal ()
{
}
void... |
// Copyright 2020 Christian (nikize)
/// @file
/// @brief Doshisha protocol support
/// @see https://www.doshisha-led.com/
// Supports:
// Brand: Doshisha, Model: CZ-S32D LED Light
// Brand: Doshisha, Model: CZ-S38D LED Light
// Brand: Doshisha, Model: CZ-S50D LED Light
// Brand: Doshisha, Model: RCZ01 rem... |
#include "renderer_sdl.hpp"
#include <iostream>
#include "constants.hpp"
RendererSdl::RendererSdl() {
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
std::cout << "Could not initialize SDL" << std::endl;
abort();
}
window_ = SDL_CreateWindow(nullptr, 0, 0, constants::screen_width,
cons... |
#include "string.hpp"
#include <cstdarg>
#include <algorithm>
void StringPrintfVA(std::string &output, const std::string &Format, va_list &FormatArgs)
{
// First, find the length of the formatted string. This partly to limit RAM use, but mostly to make absolutely
// sure that no albeit huge predefined buffer wil... |
#include "SHA1.h"
int stream_length(std::ifstream & stream) {
stream.seekg (0, stream.end);
int length = stream.tellg();
stream.seekg (0, stream.beg);
return length;
}
uint32_t rotate_left(uint32_t n, int d) {
d = 32 - d; // rotate right 32 - d times
return (n >> d)|(n << (NUM_BITS - d));
}
... |
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <stdexcept>
#include <iterator>
class StrVec{
public:
friend bool operator==(const StrVec&, const StrVec&);
friend bool operator!=(const StrVec&, const StrVec&);
StrVec():
elements(nullptr), firs... |
#include <sophus/se3.h>
#include <string>
#include <iostream>
#include <fstream>
// need pangolin for plotting trajectory
#include <pangolin/pangolin.h>
using namespace std;
// function for plotting trajectory, don't edit this code
// start point is red and end point is blue
void DrawTrajectory(vector<Sophus::SE3, ... |
/*
* Copyright (c) 2005, <NAME> and IFS Institute for Software at HSR Rapperswil, Switzerland
* All rights reserved.
*
* This library/application is free software; you can redistribute and/or modify it under the terms of
* the license that is included with this library/application in the file license.txt.
*/
#in... |
/*
* I2C.cpp
*
* Created: 25-Sep-20 15:31:00
* Author: Davod
*/
#include "Includes.h"
#define SCL_FREQ 100000
#define TWBAUD (F_CPU/(2*SCL_FREQ) - 5)
#define CareAck false
uint8_t currentChar;
RingBuffer<16> wordLength;
uint8_t currentWord;
bool isTransmitting = false;
bool addressDone = false;... |
/* reverse engineering by sigsegv
* based on TF2 version 20151007a
* server/tf/tf_bot_temp.cpp
*/
ConVar bot_debug("bot_debug", "0", FCVAR_CHEAT, "Bot debugging.");
ConVar bot_forcefireweapon("bot_forcefireweapon", "", FCVAR_NONE,
"Force bots with the specified weapon to fire.");
ConVar bot_forceattack("... |
#include <sys/select.h>
#include <sys/errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
#defin... |
//--------------------------------------------------------------------------//
// iq / rgba . tiny codes . 2008 //
//--------------------------------------------------------------------------//
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#include <windows.h>
#... |
#include "ColorDialog.h"
#include "ui_ColorDialog.h"
#include <LUtils.h>
ColorDialog::ColorDialog(QWidget *parent, LPlugins *plugs, QString colorFilePath) : QDialog(parent), ui(new Ui::ColorDialog){
ui->setupUi(this); //load the designer file
filepath = colorFilePath;
this->setWindowIcon( LXDG::findIcon("format... |
// Copyright(c) 2016 YamaArashi
//
// 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... |
//! @file
#include "GameWidget.hpp"
#include "StatWidget.hpp"
#include <QInputDialog>
#include <QVBoxLayout>
GameWidget::GameWidget(QWidget* parent)
: QWidget(parent)
, _game()
, _resetButton()
, _enemyWidget()
, _boardView() {
_game.setTypes({{"pkm_1"}});
_game.resize({1, 1});
_game.fillBoard();
setS... |
#include <bits/stdc++.h>
#define INF 2000000000
using namespace std;
typedef long long ll;
int read(){
int f = 1, x = 0;
char c = getchar();
while(c < '0' || c > '9'){if(c == '-') f = -f; c = getchar();}
while(c >= '0' && c <= '9')x = x * 10 + c - '0', c = getchar();
return f * x;
}
struct TreeNod... |
#include <list>
#include <numeric>
#include "gtest/gtest.h"
#include "gmock/gmock.h" // for ContainerEq
#include "fmt/format.h"
// TODO:
// carry might create a longer output list for example 99 11 will generate output of size 3
// the input lists might be in a different lengths
namespace {
struct zip final ... |
#include <chrono>
#include <fstream>
#include <iostream>
#include <math.h>
#include <mpi.h>
#include <vector>
#include "adios2.h"
#include "mgard/compress.hpp"
#define SECONDS(d) std::chrono::duration_cast<std::chrono::seconds>(d).count()
template <typename Type>
void FileWriter_ad(const char *filename, Type *data,
... |
#include<bits/stdc++.h>
//#include <ext/pb_ds/detail/standard_policies.hpp>
const double pi=acos(-1.0);
//memset ( a , 0 , n * sizeof(ll) ) ;
using namespace std;
//using namespace __gnu_pbds;
#define endl '\n'
#define sl(n) scanf("%lld",&n)
#define mp make_pair
#define pb push_back
... |
#include <string>
#include <fstream>
#include <memory>
#include <limits>
#include "matrix/Matrix"
#include "io/BmpIO.hpp"
#include "Common.hpp"
using namespace sipl;
MatrixXb BmpIO::read(const char* filename)
{
return read(std::string(filename));
}
MatrixXb BmpIO::read(const std::string& filename)
{
std::ifs... |
#include "Dadda.hpp"
#define UNUSED(x) (void)(x)
vector<int> Dadda(map<int, int> Ins, int nIn1, int nIn2, string &file) // Get two integer numbers as input sizes and create the Wallace Tree PPA
{
UNUSED(nIn1);
UNUSED(nIn2);
int inputNumber = 0;
vector<PartialProduct> partialIn; //to store all partial ... |
#include "charfilter.h"
#include <library/cpp/unicode/normalization/normalization.h>
#include <util/charset/unidata.h>
namespace NUnicode {
namespace NPrivate {
const TDecompositionTable& LemmerDecomposition();
}
}
static const wchar32* LemmerDecompositionInt(wchar32 ch, bool advancedGermanUmlauts, bo... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
/* Copyright (c) 2010-2018, <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 con... |
/****************************************************************************\
Part of the XeTeX typesetting system
Copyright (c) 1994-2008 by SIL International
Copyright (c) 2009 by <NAME>
Copyright (c) 2012, 2013 by <NAME>
Copyright (c) 2012-2015 by <NAME>
SIL Author(s): <NAME>
Permission is hereby granted, f... |
/* -----------------------------------------------------------------------------------
*
* File plane.cpp
* Ported By <NAME>
* Contact <EMAIL>
*
* -----------------------------------------------------------------------------------
*
* Copyright (c) 2010-2013 XMS... |
#include "al2o3_platform/platform.h"
#include "al2o3_tinystl/string.hpp"
#include "data_bufferutils/lz4.h"
#include "data_bufferutils/crc32c.h"
#include "data_binnybundle/bundle.h"
#include "data_binify/writehelper.hpp"
void InitHeader(Binify::WriteHelper &writer) {
// write header
writer.Comment("------------------... |
// Copyright (c) 2021 Graphcore Ltd. All rights reserved.
//
// This is a custom op/pattern for computing exponential moving averages of model weights
//
#include <popart/graph.hpp>
#include <popart/ir.hpp>
#include <popart/op.hpp>
#include <iostream>
#include <memory>
#include <popart/builder.hpp>
#include <popart/d... |
/*
Version: 99
Generator Magic: 85590203
ID Bound: 42
Instruction Schema: 0
=================================================
*/
#include <stdint.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include "GLSL.std.450.h"
// Predefined types:
// =================================================
typedef doub... |
/* -------------------------------------------------------------------------- *
* Simbody(tm) *
* -------------------------------------------------------------------------- *
* This is part of the SimTK biosimulation toolkit originating from *
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.